Spade
Mini Shell
main.js000064400000000733151167217540006042
0ustar00jQuery(document).ready(function($){
$('.owl-carousel').owlCarousel({
center: false,
loop: true,
margin:10,
nav:true,
autoplay:true,
autoplayTimeout:2500,
autoplayHoverPause:true,
responsive:{
0:{
items:1
},
600:{
items:2
},
1000:{
items:4
}
}
});
});owl.carousel.min.js000064400000126466151167217540010331 0ustar00/**
* Owl Carousel v2.3.4
* Copyright 2013-2018 David Deutsch
* Licensed under: SEE LICENSE IN
https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE
*/
!function(a,b,c,d){function
e(b,c){this.settings=null,this.options=a.extend({},e.Defaults,c),this.$element=a(b),this._handlers={},this._plugins={},this._supress={},this._current=null,this._speed=null,this._coordinates=[],this._breakpoint=null,this._width=null,this._items=[],this._clones=[],this._mergers=[],this._widths=[],this._invalidated={},this._pipe=[],this._drag={time:null,target:null,pointer:null,stage:{start:null,current:null},direction:null},this._states={current:{},tags:{initializing:["busy"],animating:["busy"],dragging:["interacting"]}},a.each(["onResize","onThrottledResize"],a.proxy(function(b,c){this._handlers[c]=a.proxy(this[c],this)},this)),a.each(e.Plugins,a.proxy(function(a,b){this._plugins[a.charAt(0).toLowerCase()+a.slice(1)]=new
b(this)},this)),a.each(e.Workers,a.proxy(function(b,c){this._pipe.push({filter:c.filter,run:a.proxy(c.run,this)})},this)),this.setup(),this.initialize()}e.Defaults={items:3,loop:!1,center:!1,rewind:!1,checkVisibility:!0,mouseDrag:!0,touchDrag:!0,pullDrag:!0,freeDrag:!1,margin:0,stagePadding:0,merge:!1,mergeFit:!0,autoWidth:!1,startPosition:0,rtl:!1,smartSpeed:250,fluidSpeed:!1,dragEndSpeed:!1,responsive:{},responsiveRefreshRate:200,responsiveBaseElement:b,fallbackEasing:"swing",slideTransition:"",info:!1,nestedItemSelector:!1,itemElement:"div",stageElement:"div",refreshClass:"owl-refresh",loadedClass:"owl-loaded",loadingClass:"owl-loading",rtlClass:"owl-rtl",responsiveClass:"owl-responsive",dragClass:"owl-drag",itemClass:"owl-item",stageClass:"owl-stage",stageOuterClass:"owl-stage-outer",grabClass:"owl-grab"},e.Width={Default:"default",Inner:"inner",Outer:"outer"},e.Type={Event:"event",State:"state"},e.Plugins={},e.Workers=[{filter:["width","settings"],run:function(){this._width=this.$element.width()}},{filter:["width","items","settings"],run:function(a){a.current=this._items&&this._items[this.relative(this._current)]}},{filter:["items","settings"],run:function(){this.$stage.children(".cloned").remove()}},{filter:["width","items","settings"],run:function(a){var
b=this.settings.margin||"",c=!this.settings.autoWidth,d=this.settings.rtl,e={width:"auto","margin-left":d?b:"","margin-right":d?"":b};!c&&this.$stage.children().css(e),a.css=e}},{filter:["width","items","settings"],run:function(a){var
b=(this.width()/this.settings.items).toFixed(3)-this.settings.margin,c=null,d=this._items.length,e=!this.settings.autoWidth,f=[];for(a.items={merge:!1,width:b};d--;)c=this._mergers[d],c=this.settings.mergeFit&&Math.min(c,this.settings.items)||c,a.items.merge=c>1||a.items.merge,f[d]=e?b*c:this._items[d].width();this._widths=f}},{filter:["items","settings"],run:function(){var
b=[],c=this._items,d=this.settings,e=Math.max(2*d.items,4),f=2*Math.ceil(c.length/2),g=d.loop&&c.length?d.rewind?e:Math.max(e,f):0,h="",i="";for(g/=2;g>0;)b.push(this.normalize(b.length/2,!0)),h+=c[b[b.length-1]][0].outerHTML,b.push(this.normalize(c.length-1-(b.length-1)/2,!0)),i=c[b[b.length-1]][0].outerHTML+i,g-=1;this._clones=b,a(h).addClass("cloned").appendTo(this.$stage),a(i).addClass("cloned").prependTo(this.$stage)}},{filter:["width","items","settings"],run:function(){for(var
a=this.settings.rtl?1:-1,b=this._clones.length+this._items.length,c=-1,d=0,e=0,f=[];++c<b;)d=f[c-1]||0,e=this._widths[this.relative(c)]+this.settings.margin,f.push(d+e*a);this._coordinates=f}},{filter:["width","items","settings"],run:function(){var
a=this.settings.stagePadding,b=this._coordinates,c={width:Math.ceil(Math.abs(b[b.length-1]))+2*a,"padding-left":a||"","padding-right":a||""};this.$stage.css(c)}},{filter:["width","items","settings"],run:function(a){var
b=this._coordinates.length,c=!this.settings.autoWidth,d=this.$stage.children();if(c&&a.items.merge)for(;b--;)a.css.width=this._widths[this.relative(b)],d.eq(b).css(a.css);else
c&&(a.css.width=a.items.width,d.css(a.css))}},{filter:["items"],run:function(){this._coordinates.length<1&&this.$stage.removeAttr("style")}},{filter:["width","items","settings"],run:function(a){a.current=a.current?this.$stage.children().index(a.current):0,a.current=Math.max(this.minimum(),Math.min(this.maximum(),a.current)),this.reset(a.current)}},{filter:["position"],run:function(){this.animate(this.coordinates(this._current))}},{filter:["width","position","items","settings"],run:function(){var
a,b,c,d,e=this.settings.rtl?1:-1,f=2*this.settings.stagePadding,g=this.coordinates(this.current())+f,h=g+this.width()*e,i=[];for(c=0,d=this._coordinates.length;c<d;c++)a=this._coordinates[c-1]||0,b=Math.abs(this._coordinates[c])+f*e,(this.op(a,"<=",g)&&this.op(a,">",h)||this.op(b,"<",g)&&this.op(b,">",h))&&i.push(c);this.$stage.children(".active").removeClass("active"),this.$stage.children(":eq("+i.join("),
:eq(")+")").addClass("active"),this.$stage.children(".center").removeClass("center"),this.settings.center&&this.$stage.children().eq(this.current()).addClass("center")}}],e.prototype.initializeStage=function(){this.$stage=this.$element.find("."+this.settings.stageClass),this.$stage.length||(this.$element.addClass(this.options.loadingClass),this.$stage=a("<"+this.settings.stageElement+">",{class:this.settings.stageClass}).wrap(a("<div/>",{class:this.settings.stageOuterClass})),this.$element.append(this.$stage.parent()))},e.prototype.initializeItems=function(){var
b=this.$element.find(".owl-item");if(b.length)return
this._items=b.get().map(function(b){return
a(b)}),this._mergers=this._items.map(function(){return 1}),void
this.refresh();this.replace(this.$element.children().not(this.$stage.parent())),this.isVisible()?this.refresh():this.invalidate("width"),this.$element.removeClass(this.options.loadingClass).addClass(this.options.loadedClass)},e.prototype.initialize=function(){if(this.enter("initializing"),this.trigger("initialize"),this.$element.toggleClass(this.settings.rtlClass,this.settings.rtl),this.settings.autoWidth&&!this.is("pre-loading")){var
a,b,c;a=this.$element.find("img"),b=this.settings.nestedItemSelector?"."+this.settings.nestedItemSelector:d,c=this.$element.children(b).width(),a.length&&c<=0&&this.preloadAutoWidthImages(a)}this.initializeStage(),this.initializeItems(),this.registerEventHandlers(),this.leave("initializing"),this.trigger("initialized")},e.prototype.isVisible=function(){return!this.settings.checkVisibility||this.$element.is(":visible")},e.prototype.setup=function(){var
b=this.viewport(),c=this.options.responsive,d=-1,e=null;c?(a.each(c,function(a){a<=b&&a>d&&(d=Number(a))}),e=a.extend({},this.options,c[d]),"function"==typeof
e.stagePadding&&(e.stagePadding=e.stagePadding()),delete
e.responsive,e.responsiveClass&&this.$element.attr("class",this.$element.attr("class").replace(new
RegExp("("+this.options.responsiveClass+"-)\\S+\\s","g"),"$1"+d))):e=a.extend({},this.options),this.trigger("change",{property:{name:"settings",value:e}}),this._breakpoint=d,this.settings=e,this.invalidate("settings"),this.trigger("changed",{property:{name:"settings",value:this.settings}})},e.prototype.optionsLogic=function(){this.settings.autoWidth&&(this.settings.stagePadding=!1,this.settings.merge=!1)},e.prototype.prepare=function(b){var
c=this.trigger("prepare",{content:b});return
c.data||(c.data=a("<"+this.settings.itemElement+"/>").addClass(this.options.itemClass).append(b)),this.trigger("prepared",{content:c.data}),c.data},e.prototype.update=function(){for(var
b=0,c=this._pipe.length,d=a.proxy(function(a){return
this[a]},this._invalidated),e={};b<c;)(this._invalidated.all||a.grep(this._pipe[b].filter,d).length>0)&&this._pipe[b].run(e),b++;this._invalidated={},!this.is("valid")&&this.enter("valid")},e.prototype.width=function(a){switch(a=a||e.Width.Default){case
e.Width.Inner:case e.Width.Outer:return this._width;default:return
this._width-2*this.settings.stagePadding+this.settings.margin}},e.prototype.refresh=function(){this.enter("refreshing"),this.trigger("refresh"),this.setup(),this.optionsLogic(),this.$element.addClass(this.options.refreshClass),this.update(),this.$element.removeClass(this.options.refreshClass),this.leave("refreshing"),this.trigger("refreshed")},e.prototype.onThrottledResize=function(){b.clearTimeout(this.resizeTimer),this.resizeTimer=b.setTimeout(this._handlers.onResize,this.settings.responsiveRefreshRate)},e.prototype.onResize=function(){return!!this._items.length&&(this._width!==this.$element.width()&&(!!this.isVisible()&&(this.enter("resizing"),this.trigger("resize").isDefaultPrevented()?(this.leave("resizing"),!1):(this.invalidate("width"),this.refresh(),this.leave("resizing"),void
this.trigger("resized")))))},e.prototype.registerEventHandlers=function(){a.support.transition&&this.$stage.on(a.support.transition.end+".owl.core",a.proxy(this.onTransitionEnd,this)),!1!==this.settings.responsive&&this.on(b,"resize",this._handlers.onThrottledResize),this.settings.mouseDrag&&(this.$element.addClass(this.options.dragClass),this.$stage.on("mousedown.owl.core",a.proxy(this.onDragStart,this)),this.$stage.on("dragstart.owl.core
selectstart.owl.core",function(){return!1})),this.settings.touchDrag&&(this.$stage.on("touchstart.owl.core",a.proxy(this.onDragStart,this)),this.$stage.on("touchcancel.owl.core",a.proxy(this.onDragEnd,this)))},e.prototype.onDragStart=function(b){var
d=null;3!==b.which&&(a.support.transform?(d=this.$stage.css("transform").replace(/.*\(|\)|
/g,"").split(","),d={x:d[16===d.length?12:4],y:d[16===d.length?13:5]}):(d=this.$stage.position(),d={x:this.settings.rtl?d.left+this.$stage.width()-this.width()+this.settings.margin:d.left,y:d.top}),this.is("animating")&&(a.support.transform?this.animate(d.x):this.$stage.stop(),this.invalidate("position")),this.$element.toggleClass(this.options.grabClass,"mousedown"===b.type),this.speed(0),this._drag.time=(new
Date).getTime(),this._drag.target=a(b.target),this._drag.stage.start=d,this._drag.stage.current=d,this._drag.pointer=this.pointer(b),a(c).on("mouseup.owl.core
touchend.owl.core",a.proxy(this.onDragEnd,this)),a(c).one("mousemove.owl.core
touchmove.owl.core",a.proxy(function(b){var
d=this.difference(this._drag.pointer,this.pointer(b));a(c).on("mousemove.owl.core
touchmove.owl.core",a.proxy(this.onDragMove,this)),Math.abs(d.x)<Math.abs(d.y)&&this.is("valid")||(b.preventDefault(),this.enter("dragging"),this.trigger("drag"))},this)))},e.prototype.onDragMove=function(a){var
b=null,c=null,d=null,e=this.difference(this._drag.pointer,this.pointer(a)),f=this.difference(this._drag.stage.start,e);this.is("dragging")&&(a.preventDefault(),this.settings.loop?(b=this.coordinates(this.minimum()),c=this.coordinates(this.maximum()+1)-b,f.x=((f.x-b)%c+c)%c+b):(b=this.settings.rtl?this.coordinates(this.maximum()):this.coordinates(this.minimum()),c=this.settings.rtl?this.coordinates(this.minimum()):this.coordinates(this.maximum()),d=this.settings.pullDrag?-1*e.x/5:0,f.x=Math.max(Math.min(f.x,b+d),c+d)),this._drag.stage.current=f,this.animate(f.x))},e.prototype.onDragEnd=function(b){var
d=this.difference(this._drag.pointer,this.pointer(b)),e=this._drag.stage.current,f=d.x>0^this.settings.rtl?"left":"right";a(c).off(".owl.core"),this.$element.removeClass(this.options.grabClass),(0!==d.x&&this.is("dragging")||!this.is("valid"))&&(this.speed(this.settings.dragEndSpeed||this.settings.smartSpeed),this.current(this.closest(e.x,0!==d.x?f:this._drag.direction)),this.invalidate("position"),this.update(),this._drag.direction=f,(Math.abs(d.x)>3||(new
Date).getTime()-this._drag.time>300)&&this._drag.target.one("click.owl.core",function(){return!1})),this.is("dragging")&&(this.leave("dragging"),this.trigger("dragged"))},e.prototype.closest=function(b,c){var
e=-1,f=30,g=this.width(),h=this.coordinates();return
this.settings.freeDrag||a.each(h,a.proxy(function(a,i){return"left"===c&&b>i-f&&b<i+f?e=a:"right"===c&&b>i-g-f&&b<i-g+f?e=a+1:this.op(b,"<",i)&&this.op(b,">",h[a+1]!==d?h[a+1]:i-g)&&(e="left"===c?a+1:a),-1===e},this)),this.settings.loop||(this.op(b,">",h[this.minimum()])?e=b=this.minimum():this.op(b,"<",h[this.maximum()])&&(e=b=this.maximum())),e},e.prototype.animate=function(b){var
c=this.speed()>0;this.is("animating")&&this.onTransitionEnd(),c&&(this.enter("animating"),this.trigger("translate")),a.support.transform3d&&a.support.transition?this.$stage.css({transform:"translate3d("+b+"px,0px,0px)",transition:this.speed()/1e3+"s"+(this.settings.slideTransition?"
"+this.settings.slideTransition:"")}):c?this.$stage.animate({left:b+"px"},this.speed(),this.settings.fallbackEasing,a.proxy(this.onTransitionEnd,this)):this.$stage.css({left:b+"px"})},e.prototype.is=function(a){return
this._states.current[a]&&this._states.current[a]>0},e.prototype.current=function(a){if(a===d)return
this._current;if(0===this._items.length)return
d;if(a=this.normalize(a),this._current!==a){var
b=this.trigger("change",{property:{name:"position",value:a}});b.data!==d&&(a=this.normalize(b.data)),this._current=a,this.invalidate("position"),this.trigger("changed",{property:{name:"position",value:this._current}})}return
this._current},e.prototype.invalidate=function(b){return"string"===a.type(b)&&(this._invalidated[b]=!0,this.is("valid")&&this.leave("valid")),a.map(this._invalidated,function(a,b){return
b})},e.prototype.reset=function(a){(a=this.normalize(a))!==d&&(this._speed=0,this._current=a,this.suppress(["translate","translated"]),this.animate(this.coordinates(a)),this.release(["translate","translated"]))},e.prototype.normalize=function(a,b){var
c=this._items.length,e=b?0:this._clones.length;return!this.isNumeric(a)||c<1?a=d:(a<0||a>=c+e)&&(a=((a-e/2)%c+c)%c+e/2),a},e.prototype.relative=function(a){return
a-=this._clones.length/2,this.normalize(a,!0)},e.prototype.maximum=function(a){var
b,c,d,e=this.settings,f=this._coordinates.length;if(e.loop)f=this._clones.length/2+this._items.length-1;else
if(e.autoWidth||e.merge){if(b=this._items.length)for(c=this._items[--b].width(),d=this.$element.width();b--&&!((c+=this._items[b].width()+this.settings.margin)>d););f=b+1}else
f=e.center?this._items.length-1:this._items.length-e.items;return
a&&(f-=this._clones.length/2),Math.max(f,0)},e.prototype.minimum=function(a){return
a?0:this._clones.length/2},e.prototype.items=function(a){return
a===d?this._items.slice():(a=this.normalize(a,!0),this._items[a])},e.prototype.mergers=function(a){return
a===d?this._mergers.slice():(a=this.normalize(a,!0),this._mergers[a])},e.prototype.clones=function(b){var
c=this._clones.length/2,e=c+this._items.length,f=function(a){return
a%2==0?e+a/2:c-(a+1)/2};return
b===d?a.map(this._clones,function(a,b){return
f(b)}):a.map(this._clones,function(a,c){return
a===b?f(c):null})},e.prototype.speed=function(a){return
a!==d&&(this._speed=a),this._speed},e.prototype.coordinates=function(b){var
c,e=1,f=b-1;return
b===d?a.map(this._coordinates,a.proxy(function(a,b){return
this.coordinates(b)},this)):(this.settings.center?(this.settings.rtl&&(e=-1,f=b+1),c=this._coordinates[b],c+=(this.width()-c+(this._coordinates[f]||0))/2*e):c=this._coordinates[f]||0,c=Math.ceil(c))},e.prototype.duration=function(a,b,c){return
0===c?0:Math.min(Math.max(Math.abs(b-a),1),6)*Math.abs(c||this.settings.smartSpeed)},e.prototype.to=function(a,b){var
c=this.current(),d=null,e=a-this.relative(c),f=(e>0)-(e<0),g=this._items.length,h=this.minimum(),i=this.maximum();this.settings.loop?(!this.settings.rewind&&Math.abs(e)>g/2&&(e+=-1*f*g),a=c+e,(d=((a-h)%g+g)%g+h)!==a&&d-e<=i&&d-e>0&&(c=d-e,a=d,this.reset(c))):this.settings.rewind?(i+=1,a=(a%i+i)%i):a=Math.max(h,Math.min(i,a)),this.speed(this.duration(c,a,b)),this.current(a),this.isVisible()&&this.update()},e.prototype.next=function(a){a=a||!1,this.to(this.relative(this.current())+1,a)},e.prototype.prev=function(a){a=a||!1,this.to(this.relative(this.current())-1,a)},e.prototype.onTransitionEnd=function(a){if(a!==d&&(a.stopPropagation(),(a.target||a.srcElement||a.originalTarget)!==this.$stage.get(0)))return!1;this.leave("animating"),this.trigger("translated")},e.prototype.viewport=function(){var
d;return
this.options.responsiveBaseElement!==b?d=a(this.options.responsiveBaseElement).width():b.innerWidth?d=b.innerWidth:c.documentElement&&c.documentElement.clientWidth?d=c.documentElement.clientWidth:console.warn("Can
not detect viewport
width."),d},e.prototype.replace=function(b){this.$stage.empty(),this._items=[],b&&(b=b
instanceof
jQuery?b:a(b)),this.settings.nestedItemSelector&&(b=b.find("."+this.settings.nestedItemSelector)),b.filter(function(){return
1===this.nodeType}).each(a.proxy(function(a,b){b=this.prepare(b),this.$stage.append(b),this._items.push(b),this._mergers.push(1*b.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)},this)),this.reset(this.isNumeric(this.settings.startPosition)?this.settings.startPosition:0),this.invalidate("items")},e.prototype.add=function(b,c){var
e=this.relative(this._current);c=c===d?this._items.length:this.normalize(c,!0),b=b
instanceof
jQuery?b:a(b),this.trigger("add",{content:b,position:c}),b=this.prepare(b),0===this._items.length||c===this._items.length?(0===this._items.length&&this.$stage.append(b),0!==this._items.length&&this._items[c-1].after(b),this._items.push(b),this._mergers.push(1*b.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)):(this._items[c].before(b),this._items.splice(c,0,b),this._mergers.splice(c,0,1*b.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)),this._items[e]&&this.reset(this._items[e].index()),this.invalidate("items"),this.trigger("added",{content:b,position:c})},e.prototype.remove=function(a){(a=this.normalize(a,!0))!==d&&(this.trigger("remove",{content:this._items[a],position:a}),this._items[a].remove(),this._items.splice(a,1),this._mergers.splice(a,1),this.invalidate("items"),this.trigger("removed",{content:null,position:a}))},e.prototype.preloadAutoWidthImages=function(b){b.each(a.proxy(function(b,c){this.enter("pre-loading"),c=a(c),a(new
Image).one("load",a.proxy(function(a){c.attr("src",a.target.src),c.css("opacity",1),this.leave("pre-loading"),!this.is("pre-loading")&&!this.is("initializing")&&this.refresh()},this)).attr("src",c.attr("src")||c.attr("data-src")||c.attr("data-src-retina"))},this))},e.prototype.destroy=function(){this.$element.off(".owl.core"),this.$stage.off(".owl.core"),a(c).off(".owl.core"),!1!==this.settings.responsive&&(b.clearTimeout(this.resizeTimer),this.off(b,"resize",this._handlers.onThrottledResize));for(var
d in
this._plugins)this._plugins[d].destroy();this.$stage.children(".cloned").remove(),this.$stage.unwrap(),this.$stage.children().contents().unwrap(),this.$stage.children().unwrap(),this.$stage.remove(),this.$element.removeClass(this.options.refreshClass).removeClass(this.options.loadingClass).removeClass(this.options.loadedClass).removeClass(this.options.rtlClass).removeClass(this.options.dragClass).removeClass(this.options.grabClass).attr("class",this.$element.attr("class").replace(new
RegExp(this.options.responsiveClass+"-\\S+\\s","g"),"")).removeData("owl.carousel")},e.prototype.op=function(a,b,c){var
d=this.settings.rtl;switch(b){case"<":return
d?a>c:a<c;case">":return
d?a<c:a>c;case">=":return
d?a<=c:a>=c;case"<=":return
d?a>=c:a<=c}},e.prototype.on=function(a,b,c,d){a.addEventListener?a.addEventListener(b,c,d):a.attachEvent&&a.attachEvent("on"+b,c)},e.prototype.off=function(a,b,c,d){a.removeEventListener?a.removeEventListener(b,c,d):a.detachEvent&&a.detachEvent("on"+b,c)},e.prototype.trigger=function(b,c,d,f,g){var
h={item:{count:this._items.length,index:this.current()}},i=a.camelCase(a.grep(["on",b,d],function(a){return
a}).join("-").toLowerCase()),j=a.Event([b,"owl",d||"carousel"].join(".").toLowerCase(),a.extend({relatedTarget:this},h,c));return
this._supress[b]||(a.each(this._plugins,function(a,b){b.onTrigger&&b.onTrigger(j)}),this.register({type:e.Type.Event,name:b}),this.$element.trigger(j),this.settings&&"function"==typeof
this.settings[i]&&this.settings[i].call(this,j)),j},e.prototype.enter=function(b){a.each([b].concat(this._states.tags[b]||[]),a.proxy(function(a,b){this._states.current[b]===d&&(this._states.current[b]=0),this._states.current[b]++},this))},e.prototype.leave=function(b){a.each([b].concat(this._states.tags[b]||[]),a.proxy(function(a,b){this._states.current[b]--},this))},e.prototype.register=function(b){if(b.type===e.Type.Event){if(a.event.special[b.name]||(a.event.special[b.name]={}),!a.event.special[b.name].owl){var
c=a.event.special[b.name]._default;a.event.special[b.name]._default=function(a){return!c||!c.apply||a.namespace&&-1!==a.namespace.indexOf("owl")?a.namespace&&a.namespace.indexOf("owl")>-1:c.apply(this,arguments)},a.event.special[b.name].owl=!0}}else
b.type===e.Type.State&&(this._states.tags[b.name]?this._states.tags[b.name]=this._states.tags[b.name].concat(b.tags):this._states.tags[b.name]=b.tags,this._states.tags[b.name]=a.grep(this._states.tags[b.name],a.proxy(function(c,d){return
a.inArray(c,this._states.tags[b.name])===d},this)))},e.prototype.suppress=function(b){a.each(b,a.proxy(function(a,b){this._supress[b]=!0},this))},e.prototype.release=function(b){a.each(b,a.proxy(function(a,b){delete
this._supress[b]},this))},e.prototype.pointer=function(a){var
c={x:null,y:null};return
a=a.originalEvent||a||b.event,a=a.touches&&a.touches.length?a.touches[0]:a.changedTouches&&a.changedTouches.length?a.changedTouches[0]:a,a.pageX?(c.x=a.pageX,c.y=a.pageY):(c.x=a.clientX,c.y=a.clientY),c},e.prototype.isNumeric=function(a){return!isNaN(parseFloat(a))},e.prototype.difference=function(a,b){return{x:a.x-b.x,y:a.y-b.y}},a.fn.owlCarousel=function(b){var
c=Array.prototype.slice.call(arguments,1);return this.each(function(){var
d=a(this),f=d.data("owl.carousel");f||(f=new
e(this,"object"==typeof
b&&b),d.data("owl.carousel",f),a.each(["next","prev","to","destroy","refresh","replace","add","remove"],function(b,c){f.register({type:e.Type.Event,name:c}),f.$element.on(c+".owl.carousel.core",a.proxy(function(a){a.namespace&&a.relatedTarget!==this&&(this.suppress([c]),f[c].apply(this,[].slice.call(arguments,1)),this.release([c]))},f))})),"string"==typeof
b&&"_"!==b.charAt(0)&&f[b].apply(f,c)})},a.fn.owlCarousel.Constructor=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var
e=function(b){this._core=b,this._interval=null,this._visible=null,this._handlers={"initialized.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoRefresh&&this.watch()},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers)};e.Defaults={autoRefresh:!0,autoRefreshInterval:500},e.prototype.watch=function(){this._interval||(this._visible=this._core.isVisible(),this._interval=b.setInterval(a.proxy(this.refresh,this),this._core.settings.autoRefreshInterval))},e.prototype.refresh=function(){this._core.isVisible()!==this._visible&&(this._visible=!this._visible,this._core.$element.toggleClass("owl-hidden",!this._visible),this._visible&&this._core.invalidate("width")&&this._core.refresh())},e.prototype.destroy=function(){var
a,c;b.clearInterval(this._interval);for(a in
this._handlers)this._core.$element.off(a,this._handlers[a]);for(c in
Object.getOwnPropertyNames(this))"function"!=typeof
this[c]&&(this[c]=null)},a.fn.owlCarousel.Constructor.Plugins.AutoRefresh=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var
e=function(b){this._core=b,this._loaded=[],this._handlers={"initialized.owl.carousel
change.owl.carousel
resized.owl.carousel":a.proxy(function(b){if(b.namespace&&this._core.settings&&this._core.settings.lazyLoad&&(b.property&&"position"==b.property.name||"initialized"==b.type)){var
c=this._core.settings,e=c.center&&Math.ceil(c.items/2)||c.items,f=c.center&&-1*e||0,g=(b.property&&b.property.value!==d?b.property.value:this._core.current())+f,h=this._core.clones().length,i=a.proxy(function(a,b){this.load(b)},this);for(c.lazyLoadEager>0&&(e+=c.lazyLoadEager,c.loop&&(g-=c.lazyLoadEager,e++));f++<e;)this.load(h/2+this._core.relative(g)),h&&a.each(this._core.clones(this._core.relative(g)),i),g++}},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers)};e.Defaults={lazyLoad:!1,lazyLoadEager:0},e.prototype.load=function(c){var
d=this._core.$stage.children().eq(c),e=d&&d.find(".owl-lazy");!e||a.inArray(d.get(0),this._loaded)>-1||(e.each(a.proxy(function(c,d){var
e,f=a(d),g=b.devicePixelRatio>1&&f.attr("data-src-retina")||f.attr("data-src")||f.attr("data-srcset");this._core.trigger("load",{element:f,url:g},"lazy"),f.is("img")?f.one("load.owl.lazy",a.proxy(function(){f.css("opacity",1),this._core.trigger("loaded",{element:f,url:g},"lazy")},this)).attr("src",g):f.is("source")?f.one("load.owl.lazy",a.proxy(function(){this._core.trigger("loaded",{element:f,url:g},"lazy")},this)).attr("srcset",g):(e=new
Image,e.onload=a.proxy(function(){f.css({"background-image":'url("'+g+'")',opacity:"1"}),this._core.trigger("loaded",{element:f,url:g},"lazy")},this),e.src=g)},this)),this._loaded.push(d.get(0)))},e.prototype.destroy=function(){var
a,b;for(a in
this.handlers)this._core.$element.off(a,this.handlers[a]);for(b in
Object.getOwnPropertyNames(this))"function"!=typeof
this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Lazy=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var
e=function(c){this._core=c,this._previousHeight=null,this._handlers={"initialized.owl.carousel
refreshed.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&this.update()},this),"changed.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&"position"===a.property.name&&this.update()},this),"loaded.owl.lazy":a.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&a.element.closest("."+this._core.settings.itemClass).index()===this._core.current()&&this.update()},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers),this._intervalId=null;var
d=this;a(b).on("load",function(){d._core.settings.autoHeight&&d.update()}),a(b).resize(function(){d._core.settings.autoHeight&&(null!=d._intervalId&&clearTimeout(d._intervalId),d._intervalId=setTimeout(function(){d.update()},250))})};e.Defaults={autoHeight:!1,autoHeightClass:"owl-height"},e.prototype.update=function(){var
b=this._core._current,c=b+this._core.settings.items,d=this._core.settings.lazyLoad,e=this._core.$stage.children().toArray().slice(b,c),f=[],g=0;a.each(e,function(b,c){f.push(a(c).height())}),g=Math.max.apply(null,f),g<=1&&d&&this._previousHeight&&(g=this._previousHeight),this._previousHeight=g,this._core.$stage.parent().height(g).addClass(this._core.settings.autoHeightClass)},e.prototype.destroy=function(){var
a,b;for(a in
this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in
Object.getOwnPropertyNames(this))"function"!=typeof
this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.AutoHeight=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var
e=function(b){this._core=b,this._videos={},this._playing=null,this._handlers={"initialized.owl.carousel":a.proxy(function(a){a.namespace&&this._core.register({type:"state",name:"playing",tags:["interacting"]})},this),"resize.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.video&&this.isInFullScreen()&&a.preventDefault()},this),"refreshed.owl.carousel":a.proxy(function(a){a.namespace&&this._core.is("resizing")&&this._core.$stage.find(".cloned
.owl-video-frame").remove()},this),"changed.owl.carousel":a.proxy(function(a){a.namespace&&"position"===a.property.name&&this._playing&&this.stop()},this),"prepared.owl.carousel":a.proxy(function(b){if(b.namespace){var
c=a(b.content).find(".owl-video");c.length&&(c.css("display","none"),this.fetch(c,a(b.content)))}},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers),this._core.$element.on("click.owl.video",".owl-video-play-icon",a.proxy(function(a){this.play(a)},this))};e.Defaults={video:!1,videoHeight:!1,videoWidth:!1},e.prototype.fetch=function(a,b){var
c=function(){return
a.attr("data-vimeo-id")?"vimeo":a.attr("data-vzaar-id")?"vzaar":"youtube"}(),d=a.attr("data-vimeo-id")||a.attr("data-youtube-id")||a.attr("data-vzaar-id"),e=a.attr("data-width")||this._core.settings.videoWidth,f=a.attr("data-height")||this._core.settings.videoHeight,g=a.attr("href");if(!g)throw
new Error("Missing video
URL.");if(d=g.match(/(http:|https:|)\/\/(player.|www.|app.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com|be\-nocookie\.com)|vzaar\.com)\/(video\/|videos\/|embed\/|channels\/.+\/|groups\/.+\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/),d[3].indexOf("youtu")>-1)c="youtube";else
if(d[3].indexOf("vimeo")>-1)c="vimeo";else{if(!(d[3].indexOf("vzaar")>-1))throw
new Error("Video URL not
supported.");c="vzaar"}d=d[6],this._videos[g]={type:c,id:d,width:e,height:f},b.attr("data-video",g),this.thumbnail(a,this._videos[g])},e.prototype.thumbnail=function(b,c){var
d,e,f,g=c.width&&c.height?"width:"+c.width+"px;height:"+c.height+"px;":"",h=b.find("img"),i="src",j="",k=this._core.settings,l=function(c){e='<div
class="owl-video-play-icon"></div>',d=k.lazyLoad?a("<div/>",{class:"owl-video-tn
"+j,srcType:c}):a("<div/>",{class:"owl-video-tn",style:"opacity:1;background-image:url("+c+")"}),b.after(d),b.after(e)};if(b.wrap(a("<div/>",{class:"owl-video-wrapper",style:g})),this._core.settings.lazyLoad&&(i="data-src",j="owl-lazy"),h.length)return
l(h.attr(i)),h.remove(),!1;"youtube"===c.type?(f="//img.youtube.com/vi/"+c.id+"/hqdefault.jpg",l(f)):"vimeo"===c.type?a.ajax({type:"GET",url:"//vimeo.com/api/v2/video/"+c.id+".json",jsonp:"callback",dataType:"jsonp",success:function(a){f=a[0].thumbnail_large,l(f)}}):"vzaar"===c.type&&a.ajax({type:"GET",url:"//vzaar.com/api/videos/"+c.id+".json",jsonp:"callback",dataType:"jsonp",success:function(a){f=a.framegrab_url,l(f)}})},e.prototype.stop=function(){this._core.trigger("stop",null,"video"),this._playing.find(".owl-video-frame").remove(),this._playing.removeClass("owl-video-playing"),this._playing=null,this._core.leave("playing"),this._core.trigger("stopped",null,"video")},e.prototype.play=function(b){var
c,d=a(b.target),e=d.closest("."+this._core.settings.itemClass),f=this._videos[e.attr("data-video")],g=f.width||"100%",h=f.height||this._core.$stage.height();this._playing||(this._core.enter("playing"),this._core.trigger("play",null,"video"),e=this._core.items(this._core.relative(e.index())),this._core.reset(e.index()),c=a('<iframe
frameborder="0" allowfullscreen mozallowfullscreen
webkitAllowFullScreen
></iframe>'),c.attr("height",h),c.attr("width",g),"youtube"===f.type?c.attr("src","//www.youtube.com/embed/"+f.id+"?autoplay=1&rel=0&v="+f.id):"vimeo"===f.type?c.attr("src","//player.vimeo.com/video/"+f.id+"?autoplay=1"):"vzaar"===f.type&&c.attr("src","//view.vzaar.com/"+f.id+"/player?autoplay=true"),a(c).wrap('<div
class="owl-video-frame"
/>').insertAfter(e.find(".owl-video")),this._playing=e.addClass("owl-video-playing"))},e.prototype.isInFullScreen=function(){var
b=c.fullscreenElement||c.mozFullScreenElement||c.webkitFullscreenElement;return
b&&a(b).parent().hasClass("owl-video-frame")},e.prototype.destroy=function(){var
a,b;this._core.$element.off("click.owl.video");for(a in
this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in
Object.getOwnPropertyNames(this))"function"!=typeof
this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Video=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var
e=function(b){this.core=b,this.core.options=a.extend({},e.Defaults,this.core.options),this.swapping=!0,this.previous=d,this.next=d,this.handlers={"change.owl.carousel":a.proxy(function(a){a.namespace&&"position"==a.property.name&&(this.previous=this.core.current(),this.next=a.property.value)},this),"drag.owl.carousel
dragged.owl.carousel
translated.owl.carousel":a.proxy(function(a){a.namespace&&(this.swapping="translated"==a.type)},this),"translate.owl.carousel":a.proxy(function(a){a.namespace&&this.swapping&&(this.core.options.animateOut||this.core.options.animateIn)&&this.swap()},this)},this.core.$element.on(this.handlers)};e.Defaults={animateOut:!1,
animateIn:!1},e.prototype.swap=function(){if(1===this.core.settings.items&&a.support.animation&&a.support.transition){this.core.speed(0);var
b,c=a.proxy(this.clear,this),d=this.core.$stage.children().eq(this.previous),e=this.core.$stage.children().eq(this.next),f=this.core.settings.animateIn,g=this.core.settings.animateOut;this.core.current()!==this.previous&&(g&&(b=this.core.coordinates(this.previous)-this.core.coordinates(this.next),d.one(a.support.animation.end,c).css({left:b+"px"}).addClass("animated
owl-animated-out").addClass(g)),f&&e.one(a.support.animation.end,c).addClass("animated
owl-animated-in").addClass(f))}},e.prototype.clear=function(b){a(b.target).css({left:""}).removeClass("animated
owl-animated-out
owl-animated-in").removeClass(this.core.settings.animateIn).removeClass(this.core.settings.animateOut),this.core.onTransitionEnd()},e.prototype.destroy=function(){var
a,b;for(a in this.handlers)this.core.$element.off(a,this.handlers[a]);for(b
in Object.getOwnPropertyNames(this))"function"!=typeof
this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Animate=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var
e=function(b){this._core=b,this._call=null,this._time=0,this._timeout=0,this._paused=!0,this._handlers={"changed.owl.carousel":a.proxy(function(a){a.namespace&&"settings"===a.property.name?this._core.settings.autoplay?this.play():this.stop():a.namespace&&"position"===a.property.name&&this._paused&&(this._time=0)},this),"initialized.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoplay&&this.play()},this),"play.owl.autoplay":a.proxy(function(a,b,c){a.namespace&&this.play(b,c)},this),"stop.owl.autoplay":a.proxy(function(a){a.namespace&&this.stop()},this),"mouseover.owl.autoplay":a.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"mouseleave.owl.autoplay":a.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.play()},this),"touchstart.owl.core":a.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"touchend.owl.core":a.proxy(function(){this._core.settings.autoplayHoverPause&&this.play()},this)},this._core.$element.on(this._handlers),this._core.options=a.extend({},e.Defaults,this._core.options)};e.Defaults={autoplay:!1,autoplayTimeout:5e3,autoplayHoverPause:!1,autoplaySpeed:!1},e.prototype._next=function(d){this._call=b.setTimeout(a.proxy(this._next,this,d),this._timeout*(Math.round(this.read()/this._timeout)+1)-this.read()),this._core.is("interacting")||c.hidden||this._core.next(d||this._core.settings.autoplaySpeed)},e.prototype.read=function(){return(new
Date).getTime()-this._time},e.prototype.play=function(c,d){var
e;this._core.is("rotating")||this._core.enter("rotating"),c=c||this._core.settings.autoplayTimeout,e=Math.min(this._time%(this._timeout||c),c),this._paused?(this._time=this.read(),this._paused=!1):b.clearTimeout(this._call),this._time+=this.read()%c-e,this._timeout=c,this._call=b.setTimeout(a.proxy(this._next,this,d),c-e)},e.prototype.stop=function(){this._core.is("rotating")&&(this._time=0,this._paused=!0,b.clearTimeout(this._call),this._core.leave("rotating"))},e.prototype.pause=function(){this._core.is("rotating")&&!this._paused&&(this._time=this.read(),this._paused=!0,b.clearTimeout(this._call))},e.prototype.destroy=function(){var
a,b;this.stop();for(a in
this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in
Object.getOwnPropertyNames(this))"function"!=typeof
this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.autoplay=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){"use
strict";var
e=function(b){this._core=b,this._initialized=!1,this._pages=[],this._controls={},this._templates=[],this.$element=this._core.$element,this._overrides={next:this._core.next,prev:this._core.prev,to:this._core.to},this._handlers={"prepared.owl.carousel":a.proxy(function(b){b.namespace&&this._core.settings.dotsData&&this._templates.push('<div
class="'+this._core.settings.dotClass+'">'+a(b.content).find("[data-dot]").addBack("[data-dot]").attr("data-dot")+"</div>")},this),"added.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.dotsData&&this._templates.splice(a.position,0,this._templates.pop())},this),"remove.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.dotsData&&this._templates.splice(a.position,1)},this),"changed.owl.carousel":a.proxy(function(a){a.namespace&&"position"==a.property.name&&this.draw()},this),"initialized.owl.carousel":a.proxy(function(a){a.namespace&&!this._initialized&&(this._core.trigger("initialize",null,"navigation"),this.initialize(),this.update(),this.draw(),this._initialized=!0,this._core.trigger("initialized",null,"navigation"))},this),"refreshed.owl.carousel":a.proxy(function(a){a.namespace&&this._initialized&&(this._core.trigger("refresh",null,"navigation"),this.update(),this.draw(),this._core.trigger("refreshed",null,"navigation"))},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this.$element.on(this._handlers)};e.Defaults={nav:!1,navText:['<span
aria-label="Previous">‹</span>','<span
aria-label="Next">›</span>'],navSpeed:!1,navElement:'button
type="button"
role="presentation"',navContainer:!1,navContainerClass:"owl-nav",navClass:["owl-prev","owl-next"],slideBy:1,dotClass:"owl-dot",dotsClass:"owl-dots",dots:!0,dotsEach:!1,dotsData:!1,dotsSpeed:!1,dotsContainer:!1},e.prototype.initialize=function(){var
b,c=this._core.settings;this._controls.$relative=(c.navContainer?a(c.navContainer):a("<div>").addClass(c.navContainerClass).appendTo(this.$element)).addClass("disabled"),this._controls.$previous=a("<"+c.navElement+">").addClass(c.navClass[0]).html(c.navText[0]).prependTo(this._controls.$relative).on("click",a.proxy(function(a){this.prev(c.navSpeed)},this)),this._controls.$next=a("<"+c.navElement+">").addClass(c.navClass[1]).html(c.navText[1]).appendTo(this._controls.$relative).on("click",a.proxy(function(a){this.next(c.navSpeed)},this)),c.dotsData||(this._templates=[a('<button
role="button">').addClass(c.dotClass).append(a("<span>")).prop("outerHTML")]),this._controls.$absolute=(c.dotsContainer?a(c.dotsContainer):a("<div>").addClass(c.dotsClass).appendTo(this.$element)).addClass("disabled"),this._controls.$absolute.on("click","button",a.proxy(function(b){var
d=a(b.target).parent().is(this._controls.$absolute)?a(b.target).index():a(b.target).parent().index();b.preventDefault(),this.to(d,c.dotsSpeed)},this));for(b
in
this._overrides)this._core[b]=a.proxy(this[b],this)},e.prototype.destroy=function(){var
a,b,c,d,e;e=this._core.settings;for(a in
this._handlers)this.$element.off(a,this._handlers[a]);for(b in
this._controls)"$relative"===b&&e.navContainer?this._controls[b].html(""):this._controls[b].remove();for(d
in this.overides)this._core[d]=this._overrides[d];for(c in
Object.getOwnPropertyNames(this))"function"!=typeof
this[c]&&(this[c]=null)},e.prototype.update=function(){var
a,b,c,d=this._core.clones().length/2,e=d+this._core.items().length,f=this._core.maximum(!0),g=this._core.settings,h=g.center||g.autoWidth||g.dotsData?1:g.dotsEach||g.items;if("page"!==g.slideBy&&(g.slideBy=Math.min(g.slideBy,g.items)),g.dots||"page"==g.slideBy)for(this._pages=[],a=d,b=0,c=0;a<e;a++){if(b>=h||0===b){if(this._pages.push({start:Math.min(f,a-d),end:a-d+h-1}),Math.min(f,a-d)===f)break;b=0,++c}b+=this._core.mergers(this._core.relative(a))}},e.prototype.draw=function(){var
b,c=this._core.settings,d=this._core.items().length<=c.items,e=this._core.relative(this._core.current()),f=c.loop||c.rewind;this._controls.$relative.toggleClass("disabled",!c.nav||d),c.nav&&(this._controls.$previous.toggleClass("disabled",!f&&e<=this._core.minimum(!0)),this._controls.$next.toggleClass("disabled",!f&&e>=this._core.maximum(!0))),this._controls.$absolute.toggleClass("disabled",!c.dots||d),c.dots&&(b=this._pages.length-this._controls.$absolute.children().length,c.dotsData&&0!==b?this._controls.$absolute.html(this._templates.join("")):b>0?this._controls.$absolute.append(new
Array(b+1).join(this._templates[0])):b<0&&this._controls.$absolute.children().slice(b).remove(),this._controls.$absolute.find(".active").removeClass("active"),this._controls.$absolute.children().eq(a.inArray(this.current(),this._pages)).addClass("active"))},e.prototype.onTrigger=function(b){var
c=this._core.settings;b.page={index:a.inArray(this.current(),this._pages),count:this._pages.length,size:c&&(c.center||c.autoWidth||c.dotsData?1:c.dotsEach||c.items)}},e.prototype.current=function(){var
b=this._core.relative(this._core.current());return
a.grep(this._pages,a.proxy(function(a,c){return
a.start<=b&&a.end>=b},this)).pop()},e.prototype.getPosition=function(b){var
c,d,e=this._core.settings;return"page"==e.slideBy?(c=a.inArray(this.current(),this._pages),d=this._pages.length,b?++c:--c,c=this._pages[(c%d+d)%d].start):(c=this._core.relative(this._core.current()),d=this._core.items().length,b?c+=e.slideBy:c-=e.slideBy),c},e.prototype.next=function(b){a.proxy(this._overrides.to,this._core)(this.getPosition(!0),b)},e.prototype.prev=function(b){a.proxy(this._overrides.to,this._core)(this.getPosition(!1),b)},e.prototype.to=function(b,c,d){var
e;!d&&this._pages.length?(e=this._pages.length,a.proxy(this._overrides.to,this._core)(this._pages[(b%e+e)%e].start,c)):a.proxy(this._overrides.to,this._core)(b,c)},a.fn.owlCarousel.Constructor.Plugins.Navigation=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){"use
strict";var
e=function(c){this._core=c,this._hashes={},this.$element=this._core.$element,this._handlers={"initialized.owl.carousel":a.proxy(function(c){c.namespace&&"URLHash"===this._core.settings.startPosition&&a(b).trigger("hashchange.owl.navigation")},this),"prepared.owl.carousel":a.proxy(function(b){if(b.namespace){var
c=a(b.content).find("[data-hash]").addBack("[data-hash]").attr("data-hash");if(!c)return;this._hashes[c]=b.content}},this),"changed.owl.carousel":a.proxy(function(c){if(c.namespace&&"position"===c.property.name){var
d=this._core.items(this._core.relative(this._core.current())),e=a.map(this._hashes,function(a,b){return
a===d?b:null}).join();if(!e||b.location.hash.slice(1)===e)return;b.location.hash=e}},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this.$element.on(this._handlers),a(b).on("hashchange.owl.navigation",a.proxy(function(a){var
c=b.location.hash.substring(1),e=this._core.$stage.children(),f=this._hashes[c]&&e.index(this._hashes[c]);f!==d&&f!==this._core.current()&&this._core.to(this._core.relative(f),!1,!0)},this))};e.Defaults={URLhashListener:!1},e.prototype.destroy=function(){var
c,d;a(b).off("hashchange.owl.navigation");for(c in
this._handlers)this._core.$element.off(c,this._handlers[c]);for(d in
Object.getOwnPropertyNames(this))"function"!=typeof
this[d]&&(this[d]=null)},a.fn.owlCarousel.Constructor.Plugins.Hash=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){function
e(b,c){var e=!1,f=b.charAt(0).toUpperCase()+b.slice(1);return
a.each((b+" "+h.join(f+" ")+f).split("
"),function(a,b){if(g[b]!==d)return e=!c||b,!1}),e}function
f(a){return e(a,!0)}var
g=a("<support>").get(0).style,h="Webkit Moz O
ms".split("
"),i={transition:{end:{WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",transition:"transitionend"}},animation:{end:{WebkitAnimation:"webkitAnimationEnd",MozAnimation:"animationend",OAnimation:"oAnimationEnd",animation:"animationend"}}},j={csstransforms:function(){return!!e("transform")},csstransforms3d:function(){return!!e("perspective")},csstransitions:function(){return!!e("transition")},cssanimations:function(){return!!e("animation")}};j.csstransitions()&&(a.support.transition=new
String(f("transition")),a.support.transition.end=i.transition.end[a.support.transition]),j.cssanimations()&&(a.support.animation=new
String(f("animation")),a.support.animation.end=i.animation.end[a.support.animation]),j.csstransforms()&&(a.support.transform=new
String(f("transform")),a.support.transform3d=j.csstransforms3d())}(window.Zepto||window.jQuery,window,document);admin_custom_tabs.js000064400000000606151167367470010620
0ustar00/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder
<https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights
reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
admin_fields.js000064400000000606151167367470007543 0ustar00/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder
<https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights
reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
admin_fields_conditions.js000064400000002510151167367470011770 0ustar00/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder
<https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights
reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
function getFieldSelectOptions_server(fieldId){
var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.fieldSelectOptions&format=json");
if(token.length > 0 && fieldId > 0){
var request = token+'=1&id='+fieldId;
}
return jQuery.ajax({
type: 'GET',
url: getUrl,
dataType: 'jsonp',
data: request,
jsonp: 'callback'
});
}
function getFieldSelectOptions(fieldKey){
// first check if the field is set
if(jQuery("#jform_addconditions__addconditions"+fieldKey+"__match_field").length)
{
var fieldId =
jQuery("#jform_addconditions__addconditions"+fieldKey+"__match_field
option:selected").val();
getFieldSelectOptions_server(fieldId).done(function(result) {
if(result){
jQuery('textarea#jform_addconditions__addconditions'+fieldKey+'__match_options').val(result);
}
else
{
jQuery('textarea#jform_addconditions__addconditions'+fieldKey+'__match_options').val('');
}
});
}
}
admin_fields_relations.js000064400000007615151167367470011632 0ustar00/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder
<https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights
reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
jQuery(document).ready(function()
{
// check and load all the customcode edit buttons
getEditCustomCodeButtons();
});
// little script to set the value
function getCodeGlueOptions(field) {
// get the ID
var id = jQuery(field).attr('id');
var target = id.split('__');
//set the subID
var subID = target[0]+'__'+target[1];
// get listfield value
var listfield =
jQuery('#'+subID+'__listfield').val();
// get type value
var type = jQuery('#'+subID+'__join_type').val();
// get area value
var area = jQuery('#'+subID+'__area').val();
// check that values are set
if (_isSet(listfield) && _isSet(type) && _isSet(area)) {
// get joinfields values
var joinfields =
jQuery('#'+subID+'__joinfields').val();
// get codeGlueOptions
getCodeGlueOptions_server(listfield, joinfields, type,
area).done(function(result) {
if(result){
jQuery('#'+subID+'__set').val(result);
} else {
jQuery('#'+subID+'__set').val('');
}
});
} else {
jQuery('#'+subID+'__set').val('');
}
}
function getCodeGlueOptions_server(listfield, joinfields, type, area){
var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getCodeGlueOptions&format=json");
// make sure the joinfields are set
if (!_isSet(joinfields)) {
joinfields = 'none';
}
if(token.length > 0 && listfield > 0 && type > 0
&& area > 0) {
var request =
token+'=1&listfield='+listfield+'&type='+type+'&area='+area+'&joinfields='+joinfields;
}
return jQuery.ajax({
type: 'GET',
url: getUrl,
dataType: 'jsonp',
data: request,
jsonp: 'callback'
});
}
// the isSet function
function _isSet(val)
{
if ((val != undefined) && (val != null) && 0 !==
val.length){
return true;
}
return false;
}
function getEditCustomCodeButtons_server(id) {
var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod);
let requestParams = '';
if (token.length > 0 && id > 0) {
requestParams =
token+'=1&id='+id+'&return_here='+return_here;
}
// Construct URL with parameters for GET request
const urlWithParams = getUrl + '&' + requestParams;
// Using the Fetch API for the GET request
return fetch(urlWithParams, {
method: 'GET',
headers: {
'Content-Type': 'application/json'
}
}).then(response => {
if (!response.ok) {
throw new Error('Network response was not ok');
}
return response.json();
});
}
function getEditCustomCodeButtons() {
// Get the id using pure JavaScript
const id = document.querySelector("#jform_id").value;
getEditCustomCodeButtons_server(id).then(function(result) {
if (typeof result === 'object') {
Object.entries(result).forEach(([field, buttons]) => {
// Creating the div element for buttons
const div = document.createElement('div');
div.className = 'control-group';
div.innerHTML = '<div
class="control-label"><label>Add/Edit
Customcode</label></div><div class="controls
control-customcode-buttons-'+field+'"></div>';
// Insert the div before .control-wrapper-{field}
const insertBeforeElement =
document.querySelector(".control-wrapper-"+field);
insertBeforeElement.parentNode.insertBefore(div, insertBeforeElement);
// Adding buttons to the div
Object.entries(buttons).forEach(([name, button]) => {
const controlsDiv =
document.querySelector(".control-customcode-buttons-"+field);
controlsDiv.innerHTML += button;
});
});
}
}).catch(error => {
console.error('Error:', error);
});
}
admin_view.js000064400000101373151167367470007252 0ustar00/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder
<https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights
reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
// Some Global Values
jform_vvvvvybvwa_required = false;
jform_vvvvvygvwb_required = false;
jform_vvvvvygvwc_required = false;
jform_vvvvvygvwd_required = false;
jform_vvvvvygvwe_required = false;
jform_vvvvvygvwf_required = false;
jform_vvvvvygvwg_required = false;
jform_vvvvvygvwh_required = false;
// Initial Script
document.addEventListener('DOMContentLoaded', function()
{
var add_css_view_vvvvvxb = jQuery("#jform_add_css_view
input[type='radio']:checked").val();
vvvvvxb(add_css_view_vvvvvxb);
var add_css_views_vvvvvxc = jQuery("#jform_add_css_views
input[type='radio']:checked").val();
vvvvvxc(add_css_views_vvvvvxc);
var add_javascript_view_file_vvvvvxd =
jQuery("#jform_add_javascript_view_file
input[type='radio']:checked").val();
vvvvvxd(add_javascript_view_file_vvvvvxd);
var add_javascript_views_file_vvvvvxe =
jQuery("#jform_add_javascript_views_file
input[type='radio']:checked").val();
vvvvvxe(add_javascript_views_file_vvvvvxe);
var add_javascript_view_footer_vvvvvxf =
jQuery("#jform_add_javascript_view_footer
input[type='radio']:checked").val();
vvvvvxf(add_javascript_view_footer_vvvvvxf);
var add_javascript_views_footer_vvvvvxg =
jQuery("#jform_add_javascript_views_footer
input[type='radio']:checked").val();
vvvvvxg(add_javascript_views_footer_vvvvvxg);
var add_php_ajax_vvvvvxh = jQuery("#jform_add_php_ajax
input[type='radio']:checked").val();
vvvvvxh(add_php_ajax_vvvvvxh);
var add_php_getitem_vvvvvxi = jQuery("#jform_add_php_getitem
input[type='radio']:checked").val();
vvvvvxi(add_php_getitem_vvvvvxi);
var add_php_getitems_vvvvvxj = jQuery("#jform_add_php_getitems
input[type='radio']:checked").val();
vvvvvxj(add_php_getitems_vvvvvxj);
var add_php_getitems_after_all_vvvvvxk =
jQuery("#jform_add_php_getitems_after_all
input[type='radio']:checked").val();
vvvvvxk(add_php_getitems_after_all_vvvvvxk);
var add_php_getlistquery_vvvvvxl =
jQuery("#jform_add_php_getlistquery
input[type='radio']:checked").val();
vvvvvxl(add_php_getlistquery_vvvvvxl);
var add_php_getform_vvvvvxm = jQuery("#jform_add_php_getform
input[type='radio']:checked").val();
vvvvvxm(add_php_getform_vvvvvxm);
var add_php_before_save_vvvvvxn = jQuery("#jform_add_php_before_save
input[type='radio']:checked").val();
vvvvvxn(add_php_before_save_vvvvvxn);
var add_php_save_vvvvvxo = jQuery("#jform_add_php_save
input[type='radio']:checked").val();
vvvvvxo(add_php_save_vvvvvxo);
var add_php_postsavehook_vvvvvxp =
jQuery("#jform_add_php_postsavehook
input[type='radio']:checked").val();
vvvvvxp(add_php_postsavehook_vvvvvxp);
var add_php_allowadd_vvvvvxq = jQuery("#jform_add_php_allowadd
input[type='radio']:checked").val();
vvvvvxq(add_php_allowadd_vvvvvxq);
var add_php_allowedit_vvvvvxr = jQuery("#jform_add_php_allowedit
input[type='radio']:checked").val();
vvvvvxr(add_php_allowedit_vvvvvxr);
var add_php_before_cancel_vvvvvxs =
jQuery("#jform_add_php_before_cancel
input[type='radio']:checked").val();
vvvvvxs(add_php_before_cancel_vvvvvxs);
var add_php_after_cancel_vvvvvxt =
jQuery("#jform_add_php_after_cancel
input[type='radio']:checked").val();
vvvvvxt(add_php_after_cancel_vvvvvxt);
var add_php_batchcopy_vvvvvxu = jQuery("#jform_add_php_batchcopy
input[type='radio']:checked").val();
vvvvvxu(add_php_batchcopy_vvvvvxu);
var add_php_batchmove_vvvvvxv = jQuery("#jform_add_php_batchmove
input[type='radio']:checked").val();
vvvvvxv(add_php_batchmove_vvvvvxv);
var add_php_before_publish_vvvvvxw =
jQuery("#jform_add_php_before_publish
input[type='radio']:checked").val();
vvvvvxw(add_php_before_publish_vvvvvxw);
var add_php_after_publish_vvvvvxx =
jQuery("#jform_add_php_after_publish
input[type='radio']:checked").val();
vvvvvxx(add_php_after_publish_vvvvvxx);
var add_php_before_delete_vvvvvxy =
jQuery("#jform_add_php_before_delete
input[type='radio']:checked").val();
vvvvvxy(add_php_before_delete_vvvvvxy);
var add_php_after_delete_vvvvvxz =
jQuery("#jform_add_php_after_delete
input[type='radio']:checked").val();
vvvvvxz(add_php_after_delete_vvvvvxz);
var add_php_document_vvvvvya = jQuery("#jform_add_php_document
input[type='radio']:checked").val();
vvvvvya(add_php_document_vvvvvya);
var add_sql_vvvvvyb = jQuery("#jform_add_sql
input[type='radio']:checked").val();
vvvvvyb(add_sql_vvvvvyb);
var source_vvvvvyc = jQuery("#jform_source
input[type='radio']:checked").val();
var add_sql_vvvvvyc = jQuery("#jform_add_sql
input[type='radio']:checked").val();
vvvvvyc(source_vvvvvyc,add_sql_vvvvvyc);
var source_vvvvvye = jQuery("#jform_source
input[type='radio']:checked").val();
var add_sql_vvvvvye = jQuery("#jform_add_sql
input[type='radio']:checked").val();
vvvvvye(source_vvvvvye,add_sql_vvvvvye);
var add_custom_import_vvvvvyg = jQuery("#jform_add_custom_import
input[type='radio']:checked").val();
vvvvvyg(add_custom_import_vvvvvyg);
var add_custom_import_vvvvvyh = jQuery("#jform_add_custom_import
input[type='radio']:checked").val();
vvvvvyh(add_custom_import_vvvvvyh);
var add_custom_button_vvvvvyi = jQuery("#jform_add_custom_button
input[type='radio']:checked").val();
vvvvvyi(add_custom_button_vvvvvyi);
});
// the vvvvvxb function
function vvvvvxb(add_css_view_vvvvvxb)
{
// set the function logic
if (add_css_view_vvvvvxb == 1)
{
jQuery('#jform_css_view-lbl').closest('.control-group').show();
}
else
{
jQuery('#jform_css_view-lbl').closest('.control-group').hide();
}
}
// the vvvvvxc function
function vvvvvxc(add_css_views_vvvvvxc)
{
// set the function logic
if (add_css_views_vvvvvxc == 1)
{
jQuery('#jform_css_views-lbl').closest('.control-group').show();
}
else
{
jQuery('#jform_css_views-lbl').closest('.control-group').hide();
}
}
// the vvvvvxd function
function vvvvvxd(add_javascript_view_file_vvvvvxd)
{
// set the function logic
if (add_javascript_view_file_vvvvvxd == 1)
{
jQuery('#jform_javascript_view_file-lbl').closest('.control-group').show();
}
else
{
jQuery('#jform_javascript_view_file-lbl').closest('.control-group').hide();
}
}
// the vvvvvxe function
function vvvvvxe(add_javascript_views_file_vvvvvxe)
{
// set the function logic
if (add_javascript_views_file_vvvvvxe == 1)
{
jQuery('#jform_javascript_views_file-lbl').closest('.control-group').show();
}
else
{
jQuery('#jform_javascript_views_file-lbl').closest('.control-group').hide();
}
}
// the vvvvvxf function
function vvvvvxf(add_javascript_view_footer_vvvvvxf)
{
// set the function logic
if (add_javascript_view_footer_vvvvvxf == 1)
{
jQuery('#jform_javascript_view_footer-lbl').closest('.control-group').show();
}
else
{
jQuery('#jform_javascript_view_footer-lbl').closest('.control-group').hide();
}
}
// the vvvvvxg function
function vvvvvxg(add_javascript_views_footer_vvvvvxg)
{
// set the function logic
if (add_javascript_views_footer_vvvvvxg == 1)
{
jQuery('#jform_javascript_views_footer-lbl').closest('.control-group').show();
}
else
{
jQuery('#jform_javascript_views_footer-lbl').closest('.control-group').hide();
}
}
// the vvvvvxh function
function vvvvvxh(add_php_ajax_vvvvvxh)
{
// set the function logic
if (add_php_ajax_vvvvvxh == 1)
{
jQuery('#jform_ajax_input-lbl').closest('.control-group').show();
jQuery('#jform_php_ajaxmethod-lbl').closest('.control-group').show();
}
else
{
jQuery('#jform_ajax_input-lbl').closest('.control-group').hide();
jQuery('#jform_php_ajaxmethod-lbl').closest('.control-group').hide();
}
}
// the vvvvvxi function
function vvvvvxi(add_php_getitem_vvvvvxi)
{
// set the function logic
if (add_php_getitem_vvvvvxi == 1)
{
jQuery('#jform_php_getitem-lbl').closest('.control-group').show();
}
else
{
jQuery('#jform_php_getitem-lbl').closest('.control-group').hide();
}
}
// the vvvvvxj function
function vvvvvxj(add_php_getitems_vvvvvxj)
{
// set the function logic
if (add_php_getitems_vvvvvxj == 1)
{
jQuery('#jform_php_getitems-lbl').closest('.control-group').show();
}
else
{
jQuery('#jform_php_getitems-lbl').closest('.control-group').hide();
}
}
// the vvvvvxk function
function vvvvvxk(add_php_getitems_after_all_vvvvvxk)
{
// set the function logic
if (add_php_getitems_after_all_vvvvvxk == 1)
{
jQuery('#jform_php_getitems_after_all-lbl').closest('.control-group').show();
}
else
{
jQuery('#jform_php_getitems_after_all-lbl').closest('.control-group').hide();
}
}
// the vvvvvxl function
function vvvvvxl(add_php_getlistquery_vvvvvxl)
{
// set the function logic
if (add_php_getlistquery_vvvvvxl == 1)
{
jQuery('#jform_php_getlistquery-lbl').closest('.control-group').show();
}
else
{
jQuery('#jform_php_getlistquery-lbl').closest('.control-group').hide();
}
}
// the vvvvvxm function
function vvvvvxm(add_php_getform_vvvvvxm)
{
// set the function logic
if (add_php_getform_vvvvvxm == 1)
{
jQuery('#jform_php_getform-lbl').closest('.control-group').show();
}
else
{
jQuery('#jform_php_getform-lbl').closest('.control-group').hide();
}
}
// the vvvvvxn function
function vvvvvxn(add_php_before_save_vvvvvxn)
{
// set the function logic
if (add_php_before_save_vvvvvxn == 1)
{
jQuery('#jform_php_before_save-lbl').closest('.control-group').show();
}
else
{
jQuery('#jform_php_before_save-lbl').closest('.control-group').hide();
}
}
// the vvvvvxo function
function vvvvvxo(add_php_save_vvvvvxo)
{
// set the function logic
if (add_php_save_vvvvvxo == 1)
{
jQuery('#jform_php_save-lbl').closest('.control-group').show();
}
else
{
jQuery('#jform_php_save-lbl').closest('.control-group').hide();
}
}
// the vvvvvxp function
function vvvvvxp(add_php_postsavehook_vvvvvxp)
{
// set the function logic
if (add_php_postsavehook_vvvvvxp == 1)
{
jQuery('#jform_php_postsavehook-lbl').closest('.control-group').show();
}
else
{
jQuery('#jform_php_postsavehook-lbl').closest('.control-group').hide();
}
}
// the vvvvvxq function
function vvvvvxq(add_php_allowadd_vvvvvxq)
{
// set the function logic
if (add_php_allowadd_vvvvvxq == 1)
{
jQuery('#jform_php_allowadd-lbl').closest('.control-group').show();
}
else
{
jQuery('#jform_php_allowadd-lbl').closest('.control-group').hide();
}
}
// the vvvvvxr function
function vvvvvxr(add_php_allowedit_vvvvvxr)
{
// set the function logic
if (add_php_allowedit_vvvvvxr == 1)
{
jQuery('#jform_php_allowedit-lbl').closest('.control-group').show();
}
else
{
jQuery('#jform_php_allowedit-lbl').closest('.control-group').hide();
}
}
// the vvvvvxs function
function vvvvvxs(add_php_before_cancel_vvvvvxs)
{
// set the function logic
if (add_php_before_cancel_vvvvvxs == 1)
{
jQuery('#jform_php_before_cancel-lbl').closest('.control-group').show();
}
else
{
jQuery('#jform_php_before_cancel-lbl').closest('.control-group').hide();
}
}
// the vvvvvxt function
function vvvvvxt(add_php_after_cancel_vvvvvxt)
{
// set the function logic
if (add_php_after_cancel_vvvvvxt == 1)
{
jQuery('#jform_php_after_cancel-lbl').closest('.control-group').show();
}
else
{
jQuery('#jform_php_after_cancel-lbl').closest('.control-group').hide();
}
}
// the vvvvvxu function
function vvvvvxu(add_php_batchcopy_vvvvvxu)
{
// set the function logic
if (add_php_batchcopy_vvvvvxu == 1)
{
jQuery('#jform_php_batchcopy-lbl').closest('.control-group').show();
}
else
{
jQuery('#jform_php_batchcopy-lbl').closest('.control-group').hide();
}
}
// the vvvvvxv function
function vvvvvxv(add_php_batchmove_vvvvvxv)
{
// set the function logic
if (add_php_batchmove_vvvvvxv == 1)
{
jQuery('#jform_php_batchmove-lbl').closest('.control-group').show();
}
else
{
jQuery('#jform_php_batchmove-lbl').closest('.control-group').hide();
}
}
// the vvvvvxw function
function vvvvvxw(add_php_before_publish_vvvvvxw)
{
// set the function logic
if (add_php_before_publish_vvvvvxw == 1)
{
jQuery('#jform_php_before_publish-lbl').closest('.control-group').show();
}
else
{
jQuery('#jform_php_before_publish-lbl').closest('.control-group').hide();
}
}
// the vvvvvxx function
function vvvvvxx(add_php_after_publish_vvvvvxx)
{
// set the function logic
if (add_php_after_publish_vvvvvxx == 1)
{
jQuery('#jform_php_after_publish-lbl').closest('.control-group').show();
}
else
{
jQuery('#jform_php_after_publish-lbl').closest('.control-group').hide();
}
}
// the vvvvvxy function
function vvvvvxy(add_php_before_delete_vvvvvxy)
{
// set the function logic
if (add_php_before_delete_vvvvvxy == 1)
{
jQuery('#jform_php_before_delete-lbl').closest('.control-group').show();
}
else
{
jQuery('#jform_php_before_delete-lbl').closest('.control-group').hide();
}
}
// the vvvvvxz function
function vvvvvxz(add_php_after_delete_vvvvvxz)
{
// set the function logic
if (add_php_after_delete_vvvvvxz == 1)
{
jQuery('#jform_php_after_delete-lbl').closest('.control-group').show();
}
else
{
jQuery('#jform_php_after_delete-lbl').closest('.control-group').hide();
}
}
// the vvvvvya function
function vvvvvya(add_php_document_vvvvvya)
{
// set the function logic
if (add_php_document_vvvvvya == 1)
{
jQuery('#jform_php_document-lbl').closest('.control-group').show();
}
else
{
jQuery('#jform_php_document-lbl').closest('.control-group').hide();
}
}
// the vvvvvyb function
function vvvvvyb(add_sql_vvvvvyb)
{
// set the function logic
if (add_sql_vvvvvyb == 1)
{
jQuery('#jform_source').closest('.control-group').show();
// add required attribute to source field
if (jform_vvvvvybvwa_required)
{
updateFieldRequired('source',0);
jQuery('#jform_source').prop('required','required');
jQuery('#jform_source').attr('aria-required',true);
jQuery('#jform_source').addClass('required');
jform_vvvvvybvwa_required = false;
}
}
else
{
jQuery('#jform_source').closest('.control-group').hide();
// remove required attribute from source field
if (!jform_vvvvvybvwa_required)
{
updateFieldRequired('source',1);
jQuery('#jform_source').removeAttr('required');
jQuery('#jform_source').removeAttr('aria-required');
jQuery('#jform_source').removeClass('required');
jform_vvvvvybvwa_required = true;
}
}
}
// the vvvvvyc function
function vvvvvyc(source_vvvvvyc,add_sql_vvvvvyc)
{
// set the function logic
if (source_vvvvvyc == 2 && add_sql_vvvvvyc == 1)
{
jQuery('#jform_sql').closest('.control-group').show();
}
else
{
jQuery('#jform_sql').closest('.control-group').hide();
}
}
// the vvvvvye function
function vvvvvye(source_vvvvvye,add_sql_vvvvvye)
{
// set the function logic
if (source_vvvvvye == 1 && add_sql_vvvvvye == 1)
{
jQuery('#jform_addtables-lbl').closest('.control-group').show();
}
else
{
jQuery('#jform_addtables-lbl').closest('.control-group').hide();
}
}
// the vvvvvyg function
function vvvvvyg(add_custom_import_vvvvvyg)
{
// set the function logic
if (add_custom_import_vvvvvyg == 1)
{
jQuery('#jform_html_import_view').closest('.control-group').show();
// add required attribute to html_import_view field
if (jform_vvvvvygvwb_required)
{
updateFieldRequired('html_import_view',0);
jQuery('#jform_html_import_view').prop('required','required');
jQuery('#jform_html_import_view').attr('aria-required',true);
jQuery('#jform_html_import_view').addClass('required');
jform_vvvvvygvwb_required = false;
}
jQuery('.note_advanced_import').closest('.control-group').show();
jQuery('#jform_php_import_display').closest('.control-group').show();
// add required attribute to php_import_display field
if (jform_vvvvvygvwc_required)
{
updateFieldRequired('php_import_display',0);
jQuery('#jform_php_import_display').prop('required','required');
jQuery('#jform_php_import_display').attr('aria-required',true);
jQuery('#jform_php_import_display').addClass('required');
jform_vvvvvygvwc_required = false;
}
jQuery('#jform_php_import_ext').closest('.control-group').show();
// add required attribute to php_import_ext field
if (jform_vvvvvygvwd_required)
{
updateFieldRequired('php_import_ext',0);
jQuery('#jform_php_import_ext').prop('required','required');
jQuery('#jform_php_import_ext').attr('aria-required',true);
jQuery('#jform_php_import_ext').addClass('required');
jform_vvvvvygvwd_required = false;
}
jQuery('#jform_php_import_headers').closest('.control-group').show();
// add required attribute to php_import_headers field
if (jform_vvvvvygvwe_required)
{
updateFieldRequired('php_import_headers',0);
jQuery('#jform_php_import_headers').prop('required','required');
jQuery('#jform_php_import_headers').attr('aria-required',true);
jQuery('#jform_php_import_headers').addClass('required');
jform_vvvvvygvwe_required = false;
}
jQuery('#jform_php_import').closest('.control-group').show();
// add required attribute to php_import field
if (jform_vvvvvygvwf_required)
{
updateFieldRequired('php_import',0);
jQuery('#jform_php_import').prop('required','required');
jQuery('#jform_php_import').attr('aria-required',true);
jQuery('#jform_php_import').addClass('required');
jform_vvvvvygvwf_required = false;
}
jQuery('#jform_php_import_save').closest('.control-group').show();
// add required attribute to php_import_save field
if (jform_vvvvvygvwg_required)
{
updateFieldRequired('php_import_save',0);
jQuery('#jform_php_import_save').prop('required','required');
jQuery('#jform_php_import_save').attr('aria-required',true);
jQuery('#jform_php_import_save').addClass('required');
jform_vvvvvygvwg_required = false;
}
jQuery('#jform_php_import_setdata').closest('.control-group').show();
// add required attribute to php_import_setdata field
if (jform_vvvvvygvwh_required)
{
updateFieldRequired('php_import_setdata',0);
jQuery('#jform_php_import_setdata').prop('required','required');
jQuery('#jform_php_import_setdata').attr('aria-required',true);
jQuery('#jform_php_import_setdata').addClass('required');
jform_vvvvvygvwh_required = false;
}
}
else
{
jQuery('#jform_html_import_view').closest('.control-group').hide();
// remove required attribute from html_import_view field
if (!jform_vvvvvygvwb_required)
{
updateFieldRequired('html_import_view',1);
jQuery('#jform_html_import_view').removeAttr('required');
jQuery('#jform_html_import_view').removeAttr('aria-required');
jQuery('#jform_html_import_view').removeClass('required');
jform_vvvvvygvwb_required = true;
}
jQuery('.note_advanced_import').closest('.control-group').hide();
jQuery('#jform_php_import_display').closest('.control-group').hide();
// remove required attribute from php_import_display field
if (!jform_vvvvvygvwc_required)
{
updateFieldRequired('php_import_display',1);
jQuery('#jform_php_import_display').removeAttr('required');
jQuery('#jform_php_import_display').removeAttr('aria-required');
jQuery('#jform_php_import_display').removeClass('required');
jform_vvvvvygvwc_required = true;
}
jQuery('#jform_php_import_ext').closest('.control-group').hide();
// remove required attribute from php_import_ext field
if (!jform_vvvvvygvwd_required)
{
updateFieldRequired('php_import_ext',1);
jQuery('#jform_php_import_ext').removeAttr('required');
jQuery('#jform_php_import_ext').removeAttr('aria-required');
jQuery('#jform_php_import_ext').removeClass('required');
jform_vvvvvygvwd_required = true;
}
jQuery('#jform_php_import_headers').closest('.control-group').hide();
// remove required attribute from php_import_headers field
if (!jform_vvvvvygvwe_required)
{
updateFieldRequired('php_import_headers',1);
jQuery('#jform_php_import_headers').removeAttr('required');
jQuery('#jform_php_import_headers').removeAttr('aria-required');
jQuery('#jform_php_import_headers').removeClass('required');
jform_vvvvvygvwe_required = true;
}
jQuery('#jform_php_import').closest('.control-group').hide();
// remove required attribute from php_import field
if (!jform_vvvvvygvwf_required)
{
updateFieldRequired('php_import',1);
jQuery('#jform_php_import').removeAttr('required');
jQuery('#jform_php_import').removeAttr('aria-required');
jQuery('#jform_php_import').removeClass('required');
jform_vvvvvygvwf_required = true;
}
jQuery('#jform_php_import_save').closest('.control-group').hide();
// remove required attribute from php_import_save field
if (!jform_vvvvvygvwg_required)
{
updateFieldRequired('php_import_save',1);
jQuery('#jform_php_import_save').removeAttr('required');
jQuery('#jform_php_import_save').removeAttr('aria-required');
jQuery('#jform_php_import_save').removeClass('required');
jform_vvvvvygvwg_required = true;
}
jQuery('#jform_php_import_setdata').closest('.control-group').hide();
// remove required attribute from php_import_setdata field
if (!jform_vvvvvygvwh_required)
{
updateFieldRequired('php_import_setdata',1);
jQuery('#jform_php_import_setdata').removeAttr('required');
jQuery('#jform_php_import_setdata').removeAttr('aria-required');
jQuery('#jform_php_import_setdata').removeClass('required');
jform_vvvvvygvwh_required = true;
}
}
}
// the vvvvvyh function
function vvvvvyh(add_custom_import_vvvvvyh)
{
// set the function logic
if (add_custom_import_vvvvvyh == 0)
{
jQuery('.note_beginner_import').closest('.control-group').show();
}
else
{
jQuery('.note_beginner_import').closest('.control-group').hide();
}
}
// the vvvvvyi function
function vvvvvyi(add_custom_button_vvvvvyi)
{
// set the function logic
if (add_custom_button_vvvvvyi == 1)
{
jQuery('#jform_custom_button-lbl').closest('.control-group').show();
jQuery('#jform_php_controller-lbl').closest('.control-group').show();
jQuery('#jform_php_controller_list-lbl').closest('.control-group').show();
jQuery('#jform_php_model-lbl').closest('.control-group').show();
jQuery('#jform_php_model_list-lbl').closest('.control-group').show();
}
else
{
jQuery('#jform_custom_button-lbl').closest('.control-group').hide();
jQuery('#jform_php_controller-lbl').closest('.control-group').hide();
jQuery('#jform_php_controller_list-lbl').closest('.control-group').hide();
jQuery('#jform_php_model-lbl').closest('.control-group').hide();
jQuery('#jform_php_model_list-lbl').closest('.control-group').hide();
}
}
// update fields required
function updateFieldRequired(name, status) {
// check if not_required exist
if (document.getElementById('jform_not_required')) {
var not_required =
jQuery('#jform_not_required').val().split(",");
if(status == 1)
{
not_required.push(name);
}
else
{
not_required = removeFieldFromNotRequired(not_required, name);
}
jQuery('#jform_not_required').val(fixNotRequiredArray(not_required).toString());
}
}
// remove field from not_required
function removeFieldFromNotRequired(array, what) {
return array.filter(function(element){
return element !== what;
});
}
// fix not required array
function fixNotRequiredArray(array) {
var seen = {};
return removeEmptyFromNotRequiredArray(array).filter(function(item) {
return seen.hasOwnProperty(item) ? false : (seen[item] = true);
});
}
// remove empty from not_required array
function removeEmptyFromNotRequiredArray(array) {
return array.filter(function (el) {
// remove ( 一_一) as well - lol
return (el.length > 0 && '一_一' !== el);
});
}
// the isSet function
function isSet(val)
{
if ((val != undefined) && (val != null) && 0 !==
val.length){
return true;
}
return false;
}
jQuery(document).ready(function()
{
// check if this view has alias field
checkAliasField();
// check if this view has category field
checkCategoryField();
// get the linked details
getLinked();
// set button
addButtonID('admin_fields','create_edit_buttons', 1);
// <-- first
var valueSwitch = jQuery("#jform_add_custom_import
input[type='radio']:checked").val();
getDynamicScripts(valueSwitch);
// now load the fields
getAjaxDisplay('admin_fields');
getAjaxDisplay('admin_fields_conditions');
getAjaxDisplay('admin_fields_relations');
// set button
addButtonID('admin_fields_conditions','create_edit_buttons',
1); // <-- second
// set button to create more fields
addButton('field','create_edit_buttons'); // <--
third
// set button
addButtonID('admin_fields_relations','create_edit_buttons',
1); // <-- forth
// set button
addButtonID('admin_custom_tabs','addtabs-lbl', 1); //
<-- fifth
// check and load all the customcode edit buttons
getEditCustomCodeButtons();
});
function checkAliasField() {
getCodeFrom_server(1, 'type', 'type',
'checkAliasField').then(function(result) {
if(result){
// remove the notice
jQuery('.note_create_edit_notice_p').remove();
} else {
// hide everything about alias management
jQuery('#jform_alias_builder_type').closest('.control-group').remove();
jQuery('#jform_alias_builder').closest('.control-group').remove();
jQuery('.note_alias_builder_default').closest('.control-group').remove();
jQuery('.note_alias_builder_custom').closest('.control-group').remove();
}
});
}
function checkCategoryField() {
getCodeFrom_server(1, 'type', 'type',
'checkCategoryField').then(function(result) {
if(result){
// remove the notice
jQuery('.note_create_edit_notice_p').remove();
} else {
// hide everything about category management
jQuery('#jform_add_category_submenu').closest('.control-group').remove();
jQuery('.note_category_menu_switch').closest('.control-group').remove();
}
});
}
function getAjaxDisplay(type){
getCodeFrom_server(1, type, 'type',
'getAjaxDisplay').then(function(result) {
if(result){
jQuery('#display_'+type).html(result);
}
// set button
addButtonID(type,'header_'+type+'_buttons', 2); //
<-- little edit button
});
}
function addData(result,where){
jQuery(result).insertAfter(jQuery(where).closest('.control-group'));
}
function getTableColumns(fieldKey, table_, nr_){
// first check if the field is set
if(jQuery("#jform_addtables_"+table_+"addtables"+fieldKey+nr_+"_table").length)
{
// get options
var tableName =
jQuery("#jform_addtables_"+table_+"addtables"+fieldKey+nr_+"_table
option:selected").val();
getCodeFrom_server(1, tableName, 'table',
'tableColumns').then(function(result) {
if(result){
jQuery("textarea#jform_addtables_"+table_+"addtables"+fieldKey+nr_+"_sourcemap").val(result);
} else {
jQuery("textarea#jform_addtables_"+table_+"addtables"+fieldKey+nr_+"_sourcemap").val('');
}
});
}
}
function getDynamicScripts(id){
if (1 == id) {
// get the current values
var current_import_display =
jQuery('textarea#jform_php_import_display').val();
var current_import =
jQuery('textarea#jform_php_import').val();
var current_headers =
jQuery('textarea#jform_php_import_headers').val();
var current_setdata =
jQuery('textarea#jform_php_import_setdata').val();
var current_save =
jQuery('textarea#jform_php_import_save').val();
var current_view =
jQuery('textarea#jform_html_import_view').val();
var current_ext =
jQuery('textarea#jform_php_import_ext').val();
// set the display method script
if(current_import_display.length == 0){
getCodeFrom_server(1, 'display', 'type',
'getDynamicScripts').then(function(result) {
if(result){
jQuery('textarea#jform_php_import_display').val(result);
}
});
}
// set the import method script
if(current_import.length == 0){
getCodeFrom_server(1, 'import', 'type',
'getDynamicScripts').then(function(result) {
if(result){
jQuery('textarea#jform_php_import').val(result);
}
});
}
// set the headers method script
if(current_headers.length == 0){
getCodeFrom_server(1, 'headers', 'type',
'getDynamicScripts').then(function(result) {
if(result){
jQuery('textarea#jform_php_import_headers').val(result);
}
});
}
// set the setData method script
if(current_setdata.length == 0){
getCodeFrom_server(1, 'setdata', 'type',
'getDynamicScripts').then(function(result) {
if(result){
jQuery('textarea#jform_php_import_setdata').val(result);
}
});
}
// set the save method script
if(current_save.length == 0){
getCodeFrom_server(1, 'save', 'type',
'getDynamicScripts').then(function(result) {
if(result){
jQuery('textarea#jform_php_import_save').val(result);
}
});
}
// set the view script
if(current_view.length == 0){
getCodeFrom_server(1, 'view', 'type',
'getDynamicScripts').then(function(result) {
if(result){
jQuery('textarea#jform_html_import_view').val(result);
}
});
}
// set the import ext script
if(current_ext.length == 0){
getCodeFrom_server(1, 'ext', 'type',
'getDynamicScripts').then(function(result) {
if(result){
jQuery('textarea#jform_php_import_ext').val(result);
}
});
}
}
}
function getCodeFrom_server(id, type, type_name, callingName) {
var url = "index.php?option=com_componentbuilder&task=ajax."
+ callingName +
"&format=json&raw=true&vdm="+vastDevMod;
if (token.length > 0 && id > 0 && type.length >
0) {
url += '&' + token + '=1&' + type_name +
'=' + type + '&id=' + id;
}
var getUrl = JRouter(url);
return fetch(getUrl, {
method: 'GET',
headers: {
'Content-Type': 'application/json'
}
}).then(function(response) {
if (response.ok) {
return response.json();
} else {
throw new Error('Network response was not ok');
}
}).then(function(data) {
return data;
}).catch(function(error) {
console.error('There was a problem with the fetch operation:',
error);
});
}
function getEditCustomCodeButtons_server(id) {
var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod);
let requestParams = '';
if (token.length > 0 && id > 0) {
requestParams =
token+'=1&id='+id+'&return_here='+return_here;
}
// Construct URL with parameters for GET request
const urlWithParams = getUrl + '&' + requestParams;
// Using the Fetch API for the GET request
return fetch(urlWithParams, {
method: 'GET',
headers: {
'Content-Type': 'application/json'
}
}).then(response => {
if (!response.ok) {
throw new Error('Network response was not ok');
}
return response.json();
});
}
function getEditCustomCodeButtons() {
// Get the id using pure JavaScript
const id = document.querySelector("#jform_id").value;
getEditCustomCodeButtons_server(id).then(function(result) {
if (typeof result === 'object') {
Object.entries(result).forEach(([field, buttons]) => {
// Creating the div element for buttons
const div = document.createElement('div');
div.className = 'control-group';
div.innerHTML = '<div
class="control-label"><label>Add/Edit
Customcode</label></div><div class="controls
control-customcode-buttons-'+field+'"></div>';
// Insert the div before .control-wrapper-{field}
const insertBeforeElement =
document.querySelector(".control-wrapper-"+field);
insertBeforeElement.parentNode.insertBefore(div, insertBeforeElement);
// Adding buttons to the div
Object.entries(buttons).forEach(([name, button]) => {
const controlsDiv =
document.querySelector(".control-customcode-buttons-"+field);
controlsDiv.innerHTML += button;
});
});
}
}).catch(error => {
console.error('Error:', error);
});
}
function addButtonID_server(type, size){
var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getButtonID&format=json&raw=true&vdm="+vastDevMod);
if(token.length > 0 && type.length > 0 && size >
0){
var request =
token+'=1&type='+type+'&size='+size;
}
return jQuery.ajax({
type: 'GET',
url: getUrl,
dataType: 'json',
data: request,
jsonp: false
});
}
function addButtonID(type, where, size){
addButtonID_server(type, size).done(function(result) {
if(result){
if (2 == size) {
jQuery('#'+where).html(result);
} else {
addData(result, '#jform_'+where);
}
}
});
}
function addButton_server(type, size){
var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getButton&format=json&raw=true&vdm="+vastDevMod);
if(token.length > 0 && type.length > 0){
var request =
token+'=1&type='+type+'&size='+size;
}
return jQuery.ajax({
type: 'GET',
url: getUrl,
dataType: 'json',
data: request,
jsonp: false
});
}
function addButton(type, where, size){
// just to insure that default behaviour still works
size = typeof size !== 'undefined' ? size : 1;
addButton_server(type, size).done(function(result) {
if(result){
if (2 == size) {
jQuery('#'+where).html(result);
} else {
addData(result, '#jform_'+where);
}
}
})
}
function getLinked() {
getCodeFrom_server(1, 'type', 'type',
'getLinked').then(function(result) {
if (result.error) {
console.error(result.error);
} else if (result) {
document.getElementById('display_linked_to').innerHTML =
result;
}
});
}
class_extends.js000064400000004556151167367470007774 0ustar00/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder
<https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights
reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
jQuery(document).ready(function()
{
// load the used in div
// jQuery('#usedin').show();
// check and load all the customcode edit buttons
setTimeout(getEditCustomCodeButtons, 300);
});
function getEditCustomCodeButtons_server(id) {
var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod);
let requestParams = '';
if (token.length > 0 && id > 0) {
requestParams =
token+'=1&id='+id+'&return_here='+return_here;
}
// Construct URL with parameters for GET request
const urlWithParams = getUrl + '&' + requestParams;
// Using the Fetch API for the GET request
return fetch(urlWithParams, {
method: 'GET',
headers: {
'Content-Type': 'application/json'
}
}).then(response => {
if (!response.ok) {
throw new Error('Network response was not ok');
}
return response.json();
});
}
function getEditCustomCodeButtons() {
// Get the id using pure JavaScript
const id = document.querySelector("#jform_id").value;
getEditCustomCodeButtons_server(id).then(function(result) {
if (typeof result === 'object') {
Object.entries(result).forEach(([field, buttons]) => {
// Creating the div element for buttons
const div = document.createElement('div');
div.className = 'control-group';
div.innerHTML = '<div
class="control-label"><label>Add/Edit
Customcode</label></div><div class="controls
control-customcode-buttons-'+field+'"></div>';
// Insert the div before .control-wrapper-{field}
const insertBeforeElement =
document.querySelector(".control-wrapper-"+field);
insertBeforeElement.parentNode.insertBefore(div, insertBeforeElement);
// Adding buttons to the div
Object.entries(buttons).forEach(([name, button]) => {
const controlsDiv =
document.querySelector(".control-customcode-buttons-"+field);
controlsDiv.innerHTML += button;
});
});
}
}).catch(error => {
console.error('Error:', error);
});
}
class_method.js000064400000012636151167367470007600 0ustar00/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder
<https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights
reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
// Some Global Values
jform_vvvvwamvxa_required = false;
// Initial Script
document.addEventListener('DOMContentLoaded', function()
{
var extension_type_vvvvwam =
jQuery("#jform_extension_type").val();
vvvvwam(extension_type_vvvvwam);
});
// the vvvvwam function
function vvvvwam(extension_type_vvvvwam)
{
if (isSet(extension_type_vvvvwam) &&
extension_type_vvvvwam.constructor !== Array)
{
var temp_vvvvwam = extension_type_vvvvwam;
var extension_type_vvvvwam = [];
extension_type_vvvvwam.push(temp_vvvvwam);
}
else if (!isSet(extension_type_vvvvwam))
{
var extension_type_vvvvwam = [];
}
var extension_type =
extension_type_vvvvwam.some(extension_type_vvvvwam_SomeFunc);
// set this function logic
if (extension_type)
{
jQuery('#jform_joomla_plugin_group').closest('.control-group').show();
// add required attribute to joomla_plugin_group field
if (jform_vvvvwamvxa_required)
{
updateFieldRequired('joomla_plugin_group',0);
jQuery('#jform_joomla_plugin_group').prop('required','required');
jQuery('#jform_joomla_plugin_group').attr('aria-required',true);
jQuery('#jform_joomla_plugin_group').addClass('required');
jform_vvvvwamvxa_required = false;
}
}
else
{
jQuery('#jform_joomla_plugin_group').closest('.control-group').hide();
// remove required attribute from joomla_plugin_group field
if (!jform_vvvvwamvxa_required)
{
updateFieldRequired('joomla_plugin_group',1);
jQuery('#jform_joomla_plugin_group').removeAttr('required');
jQuery('#jform_joomla_plugin_group').removeAttr('aria-required');
jQuery('#jform_joomla_plugin_group').removeClass('required');
jform_vvvvwamvxa_required = true;
}
}
}
// the vvvvwam Some function
function extension_type_vvvvwam_SomeFunc(extension_type_vvvvwam)
{
// set the function logic
if (extension_type_vvvvwam == 'plugins' ||
extension_type_vvvvwam == 'plugin')
{
return true;
}
return false;
}
// update fields required
function updateFieldRequired(name, status) {
// check if not_required exist
if (document.getElementById('jform_not_required')) {
var not_required =
jQuery('#jform_not_required').val().split(",");
if(status == 1)
{
not_required.push(name);
}
else
{
not_required = removeFieldFromNotRequired(not_required, name);
}
jQuery('#jform_not_required').val(fixNotRequiredArray(not_required).toString());
}
}
// remove field from not_required
function removeFieldFromNotRequired(array, what) {
return array.filter(function(element){
return element !== what;
});
}
// fix not required array
function fixNotRequiredArray(array) {
var seen = {};
return removeEmptyFromNotRequiredArray(array).filter(function(item) {
return seen.hasOwnProperty(item) ? false : (seen[item] = true);
});
}
// remove empty from not_required array
function removeEmptyFromNotRequiredArray(array) {
return array.filter(function (el) {
// remove ( 一_一) as well - lol
return (el.length > 0 && '一_一' !== el);
});
}
// the isSet function
function isSet(val)
{
if ((val != undefined) && (val != null) && 0 !==
val.length){
return true;
}
return false;
}
jQuery(document).ready(function()
{
// load the used in div
// jQuery('#usedin').show();
// check and load all the customcode edit buttons
setTimeout(getEditCustomCodeButtons, 300);
});
function getEditCustomCodeButtons_server(id) {
var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod);
let requestParams = '';
if (token.length > 0 && id > 0) {
requestParams =
token+'=1&id='+id+'&return_here='+return_here;
}
// Construct URL with parameters for GET request
const urlWithParams = getUrl + '&' + requestParams;
// Using the Fetch API for the GET request
return fetch(urlWithParams, {
method: 'GET',
headers: {
'Content-Type': 'application/json'
}
}).then(response => {
if (!response.ok) {
throw new Error('Network response was not ok');
}
return response.json();
});
}
function getEditCustomCodeButtons() {
// Get the id using pure JavaScript
const id = document.querySelector("#jform_id").value;
getEditCustomCodeButtons_server(id).then(function(result) {
if (typeof result === 'object') {
Object.entries(result).forEach(([field, buttons]) => {
// Creating the div element for buttons
const div = document.createElement('div');
div.className = 'control-group';
div.innerHTML = '<div
class="control-label"><label>Add/Edit
Customcode</label></div><div class="controls
control-customcode-buttons-'+field+'"></div>';
// Insert the div before .control-wrapper-{field}
const insertBeforeElement =
document.querySelector(".control-wrapper-"+field);
insertBeforeElement.parentNode.insertBefore(div, insertBeforeElement);
// Adding buttons to the div
Object.entries(buttons).forEach(([name, button]) => {
const controlsDiv =
document.querySelector(".control-customcode-buttons-"+field);
controlsDiv.innerHTML += button;
});
});
}
}).catch(error => {
console.error('Error:', error);
});
}
class_property.js000064400000012636151167367470010204 0ustar00/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder
<https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights
reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
// Some Global Values
jform_vvvvwalvwz_required = false;
// Initial Script
document.addEventListener('DOMContentLoaded', function()
{
var extension_type_vvvvwal =
jQuery("#jform_extension_type").val();
vvvvwal(extension_type_vvvvwal);
});
// the vvvvwal function
function vvvvwal(extension_type_vvvvwal)
{
if (isSet(extension_type_vvvvwal) &&
extension_type_vvvvwal.constructor !== Array)
{
var temp_vvvvwal = extension_type_vvvvwal;
var extension_type_vvvvwal = [];
extension_type_vvvvwal.push(temp_vvvvwal);
}
else if (!isSet(extension_type_vvvvwal))
{
var extension_type_vvvvwal = [];
}
var extension_type =
extension_type_vvvvwal.some(extension_type_vvvvwal_SomeFunc);
// set this function logic
if (extension_type)
{
jQuery('#jform_joomla_plugin_group').closest('.control-group').show();
// add required attribute to joomla_plugin_group field
if (jform_vvvvwalvwz_required)
{
updateFieldRequired('joomla_plugin_group',0);
jQuery('#jform_joomla_plugin_group').prop('required','required');
jQuery('#jform_joomla_plugin_group').attr('aria-required',true);
jQuery('#jform_joomla_plugin_group').addClass('required');
jform_vvvvwalvwz_required = false;
}
}
else
{
jQuery('#jform_joomla_plugin_group').closest('.control-group').hide();
// remove required attribute from joomla_plugin_group field
if (!jform_vvvvwalvwz_required)
{
updateFieldRequired('joomla_plugin_group',1);
jQuery('#jform_joomla_plugin_group').removeAttr('required');
jQuery('#jform_joomla_plugin_group').removeAttr('aria-required');
jQuery('#jform_joomla_plugin_group').removeClass('required');
jform_vvvvwalvwz_required = true;
}
}
}
// the vvvvwal Some function
function extension_type_vvvvwal_SomeFunc(extension_type_vvvvwal)
{
// set the function logic
if (extension_type_vvvvwal == 'plugins' ||
extension_type_vvvvwal == 'plugin')
{
return true;
}
return false;
}
// update fields required
function updateFieldRequired(name, status) {
// check if not_required exist
if (document.getElementById('jform_not_required')) {
var not_required =
jQuery('#jform_not_required').val().split(",");
if(status == 1)
{
not_required.push(name);
}
else
{
not_required = removeFieldFromNotRequired(not_required, name);
}
jQuery('#jform_not_required').val(fixNotRequiredArray(not_required).toString());
}
}
// remove field from not_required
function removeFieldFromNotRequired(array, what) {
return array.filter(function(element){
return element !== what;
});
}
// fix not required array
function fixNotRequiredArray(array) {
var seen = {};
return removeEmptyFromNotRequiredArray(array).filter(function(item) {
return seen.hasOwnProperty(item) ? false : (seen[item] = true);
});
}
// remove empty from not_required array
function removeEmptyFromNotRequiredArray(array) {
return array.filter(function (el) {
// remove ( 一_一) as well - lol
return (el.length > 0 && '一_一' !== el);
});
}
// the isSet function
function isSet(val)
{
if ((val != undefined) && (val != null) && 0 !==
val.length){
return true;
}
return false;
}
jQuery(document).ready(function()
{
// load the used in div
// jQuery('#usedin').show();
// check and load all the customcode edit buttons
setTimeout(getEditCustomCodeButtons, 300);
});
function getEditCustomCodeButtons_server(id) {
var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod);
let requestParams = '';
if (token.length > 0 && id > 0) {
requestParams =
token+'=1&id='+id+'&return_here='+return_here;
}
// Construct URL with parameters for GET request
const urlWithParams = getUrl + '&' + requestParams;
// Using the Fetch API for the GET request
return fetch(urlWithParams, {
method: 'GET',
headers: {
'Content-Type': 'application/json'
}
}).then(response => {
if (!response.ok) {
throw new Error('Network response was not ok');
}
return response.json();
});
}
function getEditCustomCodeButtons() {
// Get the id using pure JavaScript
const id = document.querySelector("#jform_id").value;
getEditCustomCodeButtons_server(id).then(function(result) {
if (typeof result === 'object') {
Object.entries(result).forEach(([field, buttons]) => {
// Creating the div element for buttons
const div = document.createElement('div');
div.className = 'control-group';
div.innerHTML = '<div
class="control-label"><label>Add/Edit
Customcode</label></div><div class="controls
control-customcode-buttons-'+field+'"></div>';
// Insert the div before .control-wrapper-{field}
const insertBeforeElement =
document.querySelector(".control-wrapper-"+field);
insertBeforeElement.parentNode.insertBefore(div, insertBeforeElement);
// Adding buttons to the div
Object.entries(buttons).forEach(([name, button]) => {
const controlsDiv =
document.querySelector(".control-customcode-buttons-"+field);
controlsDiv.innerHTML += button;
});
});
}
}).catch(error => {
console.error('Error:', error);
});
}
component_admin_views.js000064400000000606151167367470011514 0ustar00/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder
<https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights
reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
component_config.js000064400000000606151167367470010454 0ustar00/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder
<https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights
reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
component_custom_admin_menus.js000064400000000606151167367470013100
0ustar00/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder
<https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights
reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
component_custom_admin_views.js000064400000000606151167367470013106
0ustar00/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder
<https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights
reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
component_dashboard.js000064400000004446151167367470011144 0ustar00/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder
<https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights
reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
jQuery(document).ready(function()
{
// check and load all the customcode edit buttons
getEditCustomCodeButtons();
});
function getEditCustomCodeButtons_server(id) {
var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod);
let requestParams = '';
if (token.length > 0 && id > 0) {
requestParams =
token+'=1&id='+id+'&return_here='+return_here;
}
// Construct URL with parameters for GET request
const urlWithParams = getUrl + '&' + requestParams;
// Using the Fetch API for the GET request
return fetch(urlWithParams, {
method: 'GET',
headers: {
'Content-Type': 'application/json'
}
}).then(response => {
if (!response.ok) {
throw new Error('Network response was not ok');
}
return response.json();
});
}
function getEditCustomCodeButtons() {
// Get the id using pure JavaScript
const id = document.querySelector("#jform_id").value;
getEditCustomCodeButtons_server(id).then(function(result) {
if (typeof result === 'object') {
Object.entries(result).forEach(([field, buttons]) => {
// Creating the div element for buttons
const div = document.createElement('div');
div.className = 'control-group';
div.innerHTML = '<div
class="control-label"><label>Add/Edit
Customcode</label></div><div class="controls
control-customcode-buttons-'+field+'"></div>';
// Insert the div before .control-wrapper-{field}
const insertBeforeElement =
document.querySelector(".control-wrapper-"+field);
insertBeforeElement.parentNode.insertBefore(div, insertBeforeElement);
// Adding buttons to the div
Object.entries(buttons).forEach(([name, button]) => {
const controlsDiv =
document.querySelector(".control-customcode-buttons-"+field);
controlsDiv.innerHTML += button;
});
});
}
}).catch(error => {
console.error('Error:', error);
});
}
component_files_folders.js000064400000000606151167367470012027 0ustar00/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder
<https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights
reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
component_modules.js000064400000000606151167367470010657 0ustar00/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder
<https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights
reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
component_mysql_tweaks.js000064400000000606151167367470011732 0ustar00/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder
<https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights
reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
component_placeholders.js000064400000000606151167367500011646 0ustar00/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder
<https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights
reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
component_plugins.js000064400000000606151167367500010662 0ustar00/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder
<https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights
reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
component_site_views.js000064400000000606151167367500011362 0ustar00/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder
<https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights
reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
component_updates.js000064400000000606151167367500010646 0ustar00/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder
<https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights
reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
custom_admin_view.js000064400000031251151167367500010633 0ustar00/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder
<https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights
reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
// Initial Script
document.addEventListener('DOMContentLoaded', function()
{
var add_php_view_vvvvvyj = jQuery("#jform_add_php_view
input[type='radio']:checked").val();
vvvvvyj(add_php_view_vvvvvyj);
var add_php_jview_display_vvvvvyk =
jQuery("#jform_add_php_jview_display
input[type='radio']:checked").val();
vvvvvyk(add_php_jview_display_vvvvvyk);
var add_php_jview_vvvvvyl = jQuery("#jform_add_php_jview
input[type='radio']:checked").val();
vvvvvyl(add_php_jview_vvvvvyl);
var add_php_document_vvvvvym = jQuery("#jform_add_php_document
input[type='radio']:checked").val();
vvvvvym(add_php_document_vvvvvym);
var add_css_document_vvvvvyn = jQuery("#jform_add_css_document
input[type='radio']:checked").val();
vvvvvyn(add_css_document_vvvvvyn);
var add_javascript_file_vvvvvyo = jQuery("#jform_add_javascript_file
input[type='radio']:checked").val();
vvvvvyo(add_javascript_file_vvvvvyo);
var add_js_document_vvvvvyp = jQuery("#jform_add_js_document
input[type='radio']:checked").val();
vvvvvyp(add_js_document_vvvvvyp);
var add_custom_button_vvvvvyq = jQuery("#jform_add_custom_button
input[type='radio']:checked").val();
vvvvvyq(add_custom_button_vvvvvyq);
var add_css_vvvvvyr = jQuery("#jform_add_css
input[type='radio']:checked").val();
vvvvvyr(add_css_vvvvvyr);
var add_php_ajax_vvvvvys = jQuery("#jform_add_php_ajax
input[type='radio']:checked").val();
vvvvvys(add_php_ajax_vvvvvys);
});
// the vvvvvyj function
function vvvvvyj(add_php_view_vvvvvyj)
{
// set the function logic
if (add_php_view_vvvvvyj == 1)
{
jQuery('#jform_php_view-lbl').closest('.control-group').show();
}
else
{
jQuery('#jform_php_view-lbl').closest('.control-group').hide();
}
}
// the vvvvvyk function
function vvvvvyk(add_php_jview_display_vvvvvyk)
{
// set the function logic
if (add_php_jview_display_vvvvvyk == 1)
{
jQuery('#jform_php_jview_display-lbl').closest('.control-group').show();
}
else
{
jQuery('#jform_php_jview_display-lbl').closest('.control-group').hide();
}
}
// the vvvvvyl function
function vvvvvyl(add_php_jview_vvvvvyl)
{
// set the function logic
if (add_php_jview_vvvvvyl == 1)
{
jQuery('#jform_php_jview-lbl').closest('.control-group').show();
}
else
{
jQuery('#jform_php_jview-lbl').closest('.control-group').hide();
}
}
// the vvvvvym function
function vvvvvym(add_php_document_vvvvvym)
{
// set the function logic
if (add_php_document_vvvvvym == 1)
{
jQuery('#jform_php_document-lbl').closest('.control-group').show();
}
else
{
jQuery('#jform_php_document-lbl').closest('.control-group').hide();
}
}
// the vvvvvyn function
function vvvvvyn(add_css_document_vvvvvyn)
{
// set the function logic
if (add_css_document_vvvvvyn == 1)
{
jQuery('#jform_css_document-lbl').closest('.control-group').show();
}
else
{
jQuery('#jform_css_document-lbl').closest('.control-group').hide();
}
}
// the vvvvvyo function
function vvvvvyo(add_javascript_file_vvvvvyo)
{
// set the function logic
if (add_javascript_file_vvvvvyo == 1)
{
jQuery('#jform_javascript_file-lbl').closest('.control-group').show();
}
else
{
jQuery('#jform_javascript_file-lbl').closest('.control-group').hide();
}
}
// the vvvvvyp function
function vvvvvyp(add_js_document_vvvvvyp)
{
// set the function logic
if (add_js_document_vvvvvyp == 1)
{
jQuery('#jform_js_document-lbl').closest('.control-group').show();
}
else
{
jQuery('#jform_js_document-lbl').closest('.control-group').hide();
}
}
// the vvvvvyq function
function vvvvvyq(add_custom_button_vvvvvyq)
{
// set the function logic
if (add_custom_button_vvvvvyq == 1)
{
jQuery('#jform_custom_button-lbl').closest('.control-group').show();
jQuery('#jform_php_controller-lbl').closest('.control-group').show();
jQuery('#jform_php_model-lbl').closest('.control-group').show();
}
else
{
jQuery('#jform_custom_button-lbl').closest('.control-group').hide();
jQuery('#jform_php_controller-lbl').closest('.control-group').hide();
jQuery('#jform_php_model-lbl').closest('.control-group').hide();
}
}
// the vvvvvyr function
function vvvvvyr(add_css_vvvvvyr)
{
// set the function logic
if (add_css_vvvvvyr == 1)
{
jQuery('#jform_css-lbl').closest('.control-group').show();
}
else
{
jQuery('#jform_css-lbl').closest('.control-group').hide();
}
}
// the vvvvvys function
function vvvvvys(add_php_ajax_vvvvvys)
{
// set the function logic
if (add_php_ajax_vvvvvys == 1)
{
jQuery('#jform_ajax_input-lbl').closest('.control-group').show();
jQuery('#jform_php_ajaxmethod-lbl').closest('.control-group').show();
}
else
{
jQuery('#jform_ajax_input-lbl').closest('.control-group').hide();
jQuery('#jform_php_ajaxmethod-lbl').closest('.control-group').hide();
}
}
// the isSet function
function isSet(val)
{
if ((val != undefined) && (val != null) && 0 !==
val.length){
return true;
}
return false;
}
jQuery(document).ready(function()
{
// get the linked details
getLinked();
// check and load all the custom code edit buttons
getEditCustomCodeButtons();
});
function getCodeFrom_server(id, type, type_name, callingName) {
var url = "index.php?option=com_componentbuilder&task=ajax."
+ callingName +
"&format=json&raw=true&vdm="+vastDevMod;
if (token.length > 0 && id > 0 && type.length >
0) {
url += '&' + token + '=1&' + type_name +
'=' + type + '&id=' + id;
}
var getUrl = JRouter(url);
return fetch(getUrl, {
method: 'GET',
headers: {
'Content-Type': 'application/json'
}
}).then(function(response) {
if (response.ok) {
return response.json();
} else {
throw new Error('Network response was not ok');
}
}).then(function(data) {
return data;
}).catch(function(error) {
console.error('There was a problem with the fetch operation:',
error);
});
}
function getLinked() {
getCodeFrom_server(1, 'type', 'type',
'getLinked').then(function(result) {
if (result.error) {
console.error(result.error);
} else if (result) {
document.getElementById('display_linked_to').innerHTML =
result;
}
});
}
function getSnippetDetails(id){
getCodeFrom_server(id, '_type', '_type',
'snippetDetails').then(function(result) {
if(result.snippet){
var description = '';
if (result.description.length > 0) {
description =
'<p>'+result.description+'</p>';
}
var library = '';
if (result.library.length > 0) {
library = '
<b>('+result.library+')</b>';
}
var code = '<div
id="snippet-code"><b>'+result.name+'
('+result.type+')</b> <a
href="'+result.url+'" target="_blank" >see
more details'+library+'</a><br
/><em>'+result.heading+'</em><br
/><textarea id="snippet" class="span12"
rows="11">'+result.snippet+'</textarea></div>';
jQuery('#snippet-code').remove();
jQuery('.snippet-code').append(code);
// make sure the code block is active
jQuery("#snippet").focus(function() {
var jQuerythis = jQuery(this);
jQuerythis.select();
// Work around Chrome's little problem
jQuerythis.mouseup(function() {
// Prevent further mouseup intervention
jQuerythis.unbind("mouseup");
return false;
});
});
}
if(result.usage){
var usage = '<div
id="snippet-usage"><p>'+result.usage+'</p></div>';
jQuery('#snippet-usage').remove();
jQuery('.snippet-usage').append(usage);
}
})
}
function getDynamicValues_server(dynamicId){
var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getDynamicValues&format=json");
if(token.length > 0 && dynamicId > 0){
var request =
token+'=1&view=custom_admin_view&id='+dynamicId;
}
return jQuery.ajax({
type: 'GET',
url: getUrl,
dataType: 'jsonp',
data: request,
jsonp: 'callback'
});
}
function getDynamicValues(id){
getDynamicValues_server(id).done(function(result) {
if(result){
jQuery('#dynamic_values').remove();
jQuery('.dynamic_values').append('<div
id="dynamic_values">'+result+'</div>');
// make sure the code bocks are active
jQuery("code").click(function() {
jQuery(this).selText().addClass("selected");
});
}
})
}
function getLayoutDetails_server(id){
var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getLayoutDetails&format=json&vdm="+vastDevMod);
if(token.length > 0 && id > 0){
var request = token+'=1&id='+id;
}
return jQuery.ajax({
type: 'GET',
url: getUrl,
dataType: 'jsonp',
data: request,
jsonp: 'callback'
});
}
function getLayoutDetails(id){
getLayoutDetails_server(id).done(function(result) {
if(result){
jQuery('#details').append(result);
// make sure the code bocks are active
jQuery("code").click(function() {
jQuery(this).selText().addClass("selected");
});
}
})
}
function getTemplateDetails(id){
getCodeFrom_server(id, 'type', 'type',
'templateDetails').then(function(result) {
if(result){
jQuery('#details').append(result);
// make sure the code bocks are active
jQuery("code").click(function() {
jQuery(this).selText().addClass("selected");
});
}
})
}
// set snippets that are on the page
var snippetIds = [];
var snippets = {};
var snippet = 0;
jQuery(document).ready(function($)
{
jQuery("#jform_snippet option").each(function()
{
var key = jQuery(this).val();
var text = jQuery(this).text();
snippets[key] = text;
snippetIds.push(key);
});
snippet = jQuery("#jform_snippet").val();
getSnippets();
});
function getSnippets(){
jQuery("#loading").show();
// clear the selection
jQuery('#jform_snippet').find('option').remove().end();
jQuery('#jform_snippet').trigger('liszt:updated');
// get libraries value if set
var libraries = jQuery("#jform_libraries").val();
if (libraries) {
getCodeFrom_server(1, JSON.stringify(libraries), 'libraries',
'getSnippets').then(function(result) {
setSnippets(result);
jQuery("#loading").hide();
if (typeof snippetButton !== 'undefined') {
// ensure button is correct
var snippet = jQuery('#jform_snippet').val();
snippetButton(snippet);
}
});
}
else
{
// load all snippets in none is selected
setSnippets(snippetIds);
jQuery("#loading").hide();
}
}
function setSnippets(array){
if (array) {
jQuery('#jform_snippet').append('<option
value="">'+select_a_snippet+'</option>');
jQuery.each( array, function( i, id ) {
if (id in snippets) {
jQuery('#jform_snippet').append('<option
value="'+id+'">'+snippets[id]+'</option>');
}
if (id == snippet) {
jQuery('#jform_snippet').val(id);
}
});
} else {
jQuery('#jform_snippet').append('<option
value="">'+create_a_snippet+'</option>');
}
jQuery('#jform_snippet').trigger('liszt:updated');
}
function getEditCustomCodeButtons_server(id) {
var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod);
let requestParams = '';
if (token.length > 0 && id > 0) {
requestParams =
token+'=1&id='+id+'&return_here='+return_here;
}
// Construct URL with parameters for GET request
const urlWithParams = getUrl + '&' + requestParams;
// Using the Fetch API for the GET request
return fetch(urlWithParams, {
method: 'GET',
headers: {
'Content-Type': 'application/json'
}
}).then(response => {
if (!response.ok) {
throw new Error('Network response was not ok');
}
return response.json();
});
}
function getEditCustomCodeButtons() {
// Get the id using pure JavaScript
const id = document.querySelector("#jform_id").value;
getEditCustomCodeButtons_server(id).then(function(result) {
if (typeof result === 'object') {
Object.entries(result).forEach(([field, buttons]) => {
// Creating the div element for buttons
const div = document.createElement('div');
div.className = 'control-group';
div.innerHTML = '<div
class="control-label"><label>Add/Edit
Customcode</label></div><div class="controls
control-customcode-buttons-'+field+'"></div>';
// Insert the div before .control-wrapper-{field}
const insertBeforeElement =
document.querySelector(".control-wrapper-"+field);
insertBeforeElement.parentNode.insertBefore(div, insertBeforeElement);
// Adding buttons to the div
Object.entries(buttons).forEach(([name, button]) => {
const controlsDiv =
document.querySelector(".control-customcode-buttons-"+field);
controlsDiv.innerHTML += button;
});
});
}
}).catch(error => {
console.error('Error:', error);
});
}
custom_code.js000064400000033720151167367500007426 0ustar00/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder
<https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights
reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
// Some Global Values
jform_vvvvwahvwv_required = false;
jform_vvvvwaivww_required = false;
jform_vvvvwaivwx_required = false;
jform_vvvvwaivwy_required = false;
// Initial Script
document.addEventListener('DOMContentLoaded', function()
{
var target_vvvvwah = jQuery("#jform_target
input[type='radio']:checked").val();
vvvvwah(target_vvvvwah);
var target_vvvvwai = jQuery("#jform_target
input[type='radio']:checked").val();
vvvvwai(target_vvvvwai);
var target_vvvvwaj = jQuery("#jform_target
input[type='radio']:checked").val();
var type_vvvvwaj = jQuery("#jform_type
input[type='radio']:checked").val();
vvvvwaj(target_vvvvwaj,type_vvvvwaj);
var type_vvvvwak = jQuery("#jform_type
input[type='radio']:checked").val();
var target_vvvvwak = jQuery("#jform_target
input[type='radio']:checked").val();
vvvvwak(type_vvvvwak,target_vvvvwak);
});
// the vvvvwah function
function vvvvwah(target_vvvvwah)
{
// set the function logic
if (target_vvvvwah == 2)
{
jQuery('#jform_function_name').closest('.control-group').show();
// add required attribute to function_name field
if (jform_vvvvwahvwv_required)
{
updateFieldRequired('function_name',0);
jQuery('#jform_function_name').prop('required','required');
jQuery('#jform_function_name').attr('aria-required',true);
jQuery('#jform_function_name').addClass('required');
jform_vvvvwahvwv_required = false;
}
jQuery('.note_jcb_placeholder').closest('.control-group').show();
jQuery('#jform_system_name').closest('.control-group').show();
}
else
{
jQuery('#jform_function_name').closest('.control-group').hide();
// remove required attribute from function_name field
if (!jform_vvvvwahvwv_required)
{
updateFieldRequired('function_name',1);
jQuery('#jform_function_name').removeAttr('required');
jQuery('#jform_function_name').removeAttr('aria-required');
jQuery('#jform_function_name').removeClass('required');
jform_vvvvwahvwv_required = true;
}
jQuery('.note_jcb_placeholder').closest('.control-group').hide();
jQuery('#jform_system_name').closest('.control-group').hide();
}
}
// the vvvvwai function
function vvvvwai(target_vvvvwai)
{
// set the function logic
if (target_vvvvwai == 1)
{
jQuery('#jform_component').closest('.control-group').show();
// add required attribute to component field
if (jform_vvvvwaivww_required)
{
updateFieldRequired('component',0);
jQuery('#jform_component').prop('required','required');
jQuery('#jform_component').attr('aria-required',true);
jQuery('#jform_component').addClass('required');
jform_vvvvwaivww_required = false;
}
jQuery('#jform_path').closest('.control-group').show();
// add required attribute to path field
if (jform_vvvvwaivwx_required)
{
updateFieldRequired('path',0);
jQuery('#jform_path').prop('required','required');
jQuery('#jform_path').attr('aria-required',true);
jQuery('#jform_path').addClass('required');
jform_vvvvwaivwx_required = false;
}
jQuery('#jform_from_line').closest('.control-group').show();
jQuery('#jform_hashtarget').closest('.control-group').show();
jQuery('#jform_to_line').closest('.control-group').show();
jQuery('#jform_type').closest('.control-group').show();
// add required attribute to type field
if (jform_vvvvwaivwy_required)
{
updateFieldRequired('type',0);
jQuery('#jform_type').prop('required','required');
jQuery('#jform_type').attr('aria-required',true);
jQuery('#jform_type').addClass('required');
jform_vvvvwaivwy_required = false;
}
}
else
{
jQuery('#jform_component').closest('.control-group').hide();
// remove required attribute from component field
if (!jform_vvvvwaivww_required)
{
updateFieldRequired('component',1);
jQuery('#jform_component').removeAttr('required');
jQuery('#jform_component').removeAttr('aria-required');
jQuery('#jform_component').removeClass('required');
jform_vvvvwaivww_required = true;
}
jQuery('#jform_path').closest('.control-group').hide();
// remove required attribute from path field
if (!jform_vvvvwaivwx_required)
{
updateFieldRequired('path',1);
jQuery('#jform_path').removeAttr('required');
jQuery('#jform_path').removeAttr('aria-required');
jQuery('#jform_path').removeClass('required');
jform_vvvvwaivwx_required = true;
}
jQuery('#jform_from_line').closest('.control-group').hide();
jQuery('#jform_hashtarget').closest('.control-group').hide();
jQuery('#jform_to_line').closest('.control-group').hide();
jQuery('#jform_type').closest('.control-group').hide();
// remove required attribute from type field
if (!jform_vvvvwaivwy_required)
{
updateFieldRequired('type',1);
jQuery('#jform_type').removeAttr('required');
jQuery('#jform_type').removeAttr('aria-required');
jQuery('#jform_type').removeClass('required');
jform_vvvvwaivwy_required = true;
}
}
}
// the vvvvwaj function
function vvvvwaj(target_vvvvwaj,type_vvvvwaj)
{
// set the function logic
if (target_vvvvwaj == 1 && type_vvvvwaj == 1)
{
jQuery('#jform_hashendtarget').closest('.control-group').show();
jQuery('#jform_to_line').closest('.control-group').show();
}
else
{
jQuery('#jform_hashendtarget').closest('.control-group').hide();
jQuery('#jform_to_line').closest('.control-group').hide();
}
}
// the vvvvwak function
function vvvvwak(type_vvvvwak,target_vvvvwak)
{
// set the function logic
if (type_vvvvwak == 1 && target_vvvvwak == 1)
{
jQuery('#jform_hashendtarget').closest('.control-group').show();
jQuery('#jform_to_line').closest('.control-group').show();
}
else
{
jQuery('#jform_hashendtarget').closest('.control-group').hide();
jQuery('#jform_to_line').closest('.control-group').hide();
}
}
// update fields required
function updateFieldRequired(name, status) {
// check if not_required exist
if (document.getElementById('jform_not_required')) {
var not_required =
jQuery('#jform_not_required').val().split(",");
if(status == 1)
{
not_required.push(name);
}
else
{
not_required = removeFieldFromNotRequired(not_required, name);
}
jQuery('#jform_not_required').val(fixNotRequiredArray(not_required).toString());
}
}
// remove field from not_required
function removeFieldFromNotRequired(array, what) {
return array.filter(function(element){
return element !== what;
});
}
// fix not required array
function fixNotRequiredArray(array) {
var seen = {};
return removeEmptyFromNotRequiredArray(array).filter(function(item) {
return seen.hasOwnProperty(item) ? false : (seen[item] = true);
});
}
// remove empty from not_required array
function removeEmptyFromNotRequiredArray(array) {
return array.filter(function (el) {
// remove ( 一_一) as well - lol
return (el.length > 0 && '一_一' !== el);
});
}
// the isSet function
function isSet(val)
{
if ((val != undefined) && (val != null) && 0 !==
val.length){
return true;
}
return false;
}
jQuery(document).ready(function()
{
var target = jQuery("#jform_target
input[type='radio']:checked").val();
if (target == 2) {
jQuery('#usedin').show();
var functioName = jQuery('#jform_function_name').val();
// check if this function name is taken
checkFunctionName(functioName);
}
var type = jQuery("#jform_comment_type
input[type='radio']:checked").val();
if (type == 2) {
jQuery('#html-comment-info').show();
jQuery('#phpjs-comment-info').hide();
} else {
jQuery('#html-comment-info').hide();
jQuery('#phpjs-comment-info').show();
}
// check and load all the custom code edit buttons
getEditCustomCodeButtons();
});
function setCustomCodePlaceholder() {
var ide = jQuery('#jform_id').val();
var functioName = jQuery('#jform_function_name').val();
if (ide > 0 && functioName.length > 2) {
jQuery('#jcb-placeholder').html('<code>[CUSTO'+'MCODE='+functioName+']</code>');
jQuery('#jcb-placeholder-arg').html('<code>[CUSTO'+'MCODE='+functioName+'+value1,value2]</code>');
} else if (ide > 0){
jQuery('#jcb-placeholder').html('<code>[not
ready]</code>');
jQuery('#jcb-placeholder-arg').html('<code>[not
ready]</code>');
} else if (functioName.length > 2) {
jQuery('#jcb-placeholder').html('<code>[CUSTO'+'MCODE='+functioName+']</code>');
jQuery('#jcb-placeholder-arg').html('<code>[CUSTO'+'MCODE='+functioName+'+value1,value2]</code>');
} else {
jQuery('#jcb-placeholder').html('<code>[save to
see]</code>');
jQuery('#jcb-placeholder-arg').html('<code>[save to
see]</code>');
}
// update the notes
if (ide > 0) {
jQuery('.placeholder-key-id').text(ide);
}
}
function checkFunctionName(functioName) {
if (functioName.length > 2) {
var ide = jQuery('#jform_id').val();
if (ide == 0) {
ide = -1;
}
checkFunctionName_server(functioName, ide).done(function(result) {
if(result.name && result.message){
// show notice that functioName is okay
jQuery.UIkit.notify({message: result.message, timeout: 5000, status:
result.status, pos: 'top-right'});
jQuery('#jform_function_name').val(result.name);
// now start search for where the function is used
usedin(result.name, ide);
} else if(result.message){
// show notice that functioName is not okay
jQuery.UIkit.notify({message: result.message, timeout: 5000, status:
result.status, pos: 'top-right'});
jQuery('#jform_function_name').val('');
} else {
// set an error that message was not send
jQuery.UIkit.notify({message:
Joomla.JText._('COM_COMPONENTBUILDER_FUNCTION_NAME_ALREADY_TAKEN_PLEASE_TRY_AGAIN'),
timeout: 5000, status: 'danger', pos: 'top-right'});
jQuery('#jform_function_name').val('');
}
// set custom code placeholder
setCustomCodePlaceholder();
});
} else {
// set an error that message was not send
jQuery.UIkit.notify({message:
Joomla.JText._('COM_COMPONENTBUILDER_YOU_MUST_ADD_AN_UNIQUE_FUNCTION_NAME'),
timeout: 5000, status: 'danger', pos: 'top-right'});
jQuery('#jform_function_name').val('');
// set custom code placeholder
setCustomCodePlaceholder();
}
}
// check Function name
function checkFunctionName_server(functioName, ide){
var getUrl =
"index.php?option=com_componentbuilder&task=ajax.checkFunctionName&raw=true&format=json";
if(token.length > 0){
var request =
'token='+token+'&functioName='+functioName+'&id='+ide;
}
return jQuery.ajax({
type: 'POST',
url: getUrl,
dataType: 'json',
data: request,
jsonp: false
});
}
// check where this Function is used
function usedin(functioName, ide) {
var found = false;
jQuery('#before-usedin').hide();
jQuery('#note-usedin-not').hide();
jQuery('#note-usedin-found').hide();
jQuery('#loading-usedin').show();
var targets =
['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v'];
// if you update this, also update (below 21) &
[customcode-codeUsedInHtmlNote]!
var targetNumber = 21;
var run = 0;
var usedinChecker = setInterval(function(){
var target = targets[run];
usedin_server(functioName, ide, target).done(function(used) {
if (used.in) {
jQuery('#usedin-'+used.id).show();
jQuery('#area-'+used.id).html(used.in);
jQuery.UIkit.notify({message: used.in, timeout: 5000, status:
'success', pos: 'top-right'});
found = true;
} else {
jQuery('#usedin-'+target).hide();
}
if (run == targetNumber) {
jQuery('#loading-usedin').hide();
if (found) {
jQuery('#note-usedin-found').show();
} else {
jQuery('#note-usedin-not').show();
}
}
});
if (run == targetNumber) {
clearInterval(usedinChecker);
}
run++;
}, 800);
}
function usedin_server(functioName, ide, target){
var getUrl =
"index.php?option=com_componentbuilder&task=ajax.usedin&format=json";
if(token.length > 0){
var request =
token+'=1&functioName='+functioName+'&id='+ide+'&target='+target+'&raw=true&return_here='+return_here;
}
return jQuery.ajax({
type: 'GET',
url: getUrl,
dataType: 'json',
data: request,
jsonp: false
});
}
function getEditCustomCodeButtons_server(id) {
var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod);
let requestParams = '';
if (token.length > 0 && id > 0) {
requestParams =
token+'=1&id='+id+'&return_here='+return_here;
}
// Construct URL with parameters for GET request
const urlWithParams = getUrl + '&' + requestParams;
// Using the Fetch API for the GET request
return fetch(urlWithParams, {
method: 'GET',
headers: {
'Content-Type': 'application/json'
}
}).then(response => {
if (!response.ok) {
throw new Error('Network response was not ok');
}
return response.json();
});
}
function getEditCustomCodeButtons() {
// Get the id using pure JavaScript
const id = document.querySelector("#jform_id").value;
getEditCustomCodeButtons_server(id).then(function(result) {
if (typeof result === 'object') {
Object.entries(result).forEach(([field, buttons]) => {
// Creating the div element for buttons
const div = document.createElement('div');
div.className = 'control-group';
div.innerHTML = '<div
class="control-label"><label>Add/Edit
Customcode</label></div><div class="controls
control-customcode-buttons-'+field+'"></div>';
// Insert the div before .control-wrapper-{field}
const insertBeforeElement =
document.querySelector(".control-wrapper-"+field);
insertBeforeElement.parentNode.insertBefore(div, insertBeforeElement);
// Adding buttons to the div
Object.entries(buttons).forEach(([name, button]) => {
const controlsDiv =
document.querySelector(".control-customcode-buttons-"+field);
controlsDiv.innerHTML += button;
});
});
}
}).catch(error => {
console.error('Error:', error);
});
}
dynamic_get.js000064400000136263151167367500007413 0ustar00/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder
<https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights
reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
// Some Global Values
jform_vvvvvzgvwi_required = false;
jform_vvvvvzivwj_required = false;
jform_vvvvvzjvwk_required = false;
jform_vvvvvzkvwl_required = false;
jform_vvvvvzlvwm_required = false;
jform_vvvvvzwvwn_required = false;
jform_vvvvvzwvwo_required = false;
jform_vvvvwabvwp_required = false;
jform_vvvvwabvwq_required = false;
jform_vvvvwabvwr_required = false;
jform_vvvvwacvws_required = false;
jform_vvvvwadvwt_required = false;
jform_vvvvwaevwu_required = false;
// Initial Script
document.addEventListener('DOMContentLoaded', function()
{
var gettype_vvvvvzg = jQuery("#jform_gettype").val();
vvvvvzg(gettype_vvvvvzg);
var main_source_vvvvvzh = jQuery("#jform_main_source").val();
vvvvvzh(main_source_vvvvvzh);
var main_source_vvvvvzi = jQuery("#jform_main_source").val();
vvvvvzi(main_source_vvvvvzi);
var main_source_vvvvvzj = jQuery("#jform_main_source").val();
vvvvvzj(main_source_vvvvvzj);
var main_source_vvvvvzk = jQuery("#jform_main_source").val();
vvvvvzk(main_source_vvvvvzk);
var main_source_vvvvvzl = jQuery("#jform_main_source").val();
vvvvvzl(main_source_vvvvvzl);
var addcalculation_vvvvvzm = jQuery("#jform_addcalculation
input[type='radio']:checked").val();
vvvvvzm(addcalculation_vvvvvzm);
var addcalculation_vvvvvzn = jQuery("#jform_addcalculation
input[type='radio']:checked").val();
var gettype_vvvvvzn = jQuery("#jform_gettype").val();
vvvvvzn(addcalculation_vvvvvzn,gettype_vvvvvzn);
var addcalculation_vvvvvzo = jQuery("#jform_addcalculation
input[type='radio']:checked").val();
var gettype_vvvvvzo = jQuery("#jform_gettype").val();
vvvvvzo(addcalculation_vvvvvzo,gettype_vvvvvzo);
var main_source_vvvvvzr = jQuery("#jform_main_source").val();
vvvvvzr(main_source_vvvvvzr);
var main_source_vvvvvzs = jQuery("#jform_main_source").val();
vvvvvzs(main_source_vvvvvzs);
var add_php_before_getitem_vvvvvzt =
jQuery("#jform_add_php_before_getitem
input[type='radio']:checked").val();
var gettype_vvvvvzt = jQuery("#jform_gettype").val();
vvvvvzt(add_php_before_getitem_vvvvvzt,gettype_vvvvvzt);
var add_php_after_getitem_vvvvvzu =
jQuery("#jform_add_php_after_getitem
input[type='radio']:checked").val();
var gettype_vvvvvzu = jQuery("#jform_gettype").val();
vvvvvzu(add_php_after_getitem_vvvvvzu,gettype_vvvvvzu);
var gettype_vvvvvzw = jQuery("#jform_gettype").val();
vvvvvzw(gettype_vvvvvzw);
var add_php_getlistquery_vvvvvzx =
jQuery("#jform_add_php_getlistquery
input[type='radio']:checked").val();
var gettype_vvvvvzx = jQuery("#jform_gettype").val();
vvvvvzx(add_php_getlistquery_vvvvvzx,gettype_vvvvvzx);
var add_php_before_getitems_vvvvvzy =
jQuery("#jform_add_php_before_getitems
input[type='radio']:checked").val();
var gettype_vvvvvzy = jQuery("#jform_gettype").val();
vvvvvzy(add_php_before_getitems_vvvvvzy,gettype_vvvvvzy);
var add_php_after_getitems_vvvvvzz =
jQuery("#jform_add_php_after_getitems
input[type='radio']:checked").val();
var gettype_vvvvvzz = jQuery("#jform_gettype").val();
vvvvvzz(add_php_after_getitems_vvvvvzz,gettype_vvvvvzz);
var gettype_vvvvwab = jQuery("#jform_gettype").val();
vvvvwab(gettype_vvvvwab);
var gettype_vvvvwac = jQuery("#jform_gettype").val();
vvvvwac(gettype_vvvvwac);
var gettype_vvvvwad = jQuery("#jform_gettype").val();
vvvvwad(gettype_vvvvwad);
var gettype_vvvvwae = jQuery("#jform_gettype").val();
var add_php_router_parse_vvvvwae =
jQuery("#jform_add_php_router_parse
input[type='radio']:checked").val();
vvvvwae(gettype_vvvvwae,add_php_router_parse_vvvvwae);
var gettype_vvvvwag = jQuery("#jform_gettype").val();
vvvvwag(gettype_vvvvwag);
});
// the vvvvvzg function
function vvvvvzg(gettype_vvvvvzg)
{
if (isSet(gettype_vvvvvzg) && gettype_vvvvvzg.constructor !==
Array)
{
var temp_vvvvvzg = gettype_vvvvvzg;
var gettype_vvvvvzg = [];
gettype_vvvvvzg.push(temp_vvvvvzg);
}
else if (!isSet(gettype_vvvvvzg))
{
var gettype_vvvvvzg = [];
}
var gettype = gettype_vvvvvzg.some(gettype_vvvvvzg_SomeFunc);
// set this function logic
if (gettype)
{
jQuery('#jform_getcustom').closest('.control-group').show();
// add required attribute to getcustom field
if (jform_vvvvvzgvwi_required)
{
updateFieldRequired('getcustom',0);
jQuery('#jform_getcustom').prop('required','required');
jQuery('#jform_getcustom').attr('aria-required',true);
jQuery('#jform_getcustom').addClass('required');
jform_vvvvvzgvwi_required = false;
}
}
else
{
jQuery('#jform_getcustom').closest('.control-group').hide();
// remove required attribute from getcustom field
if (!jform_vvvvvzgvwi_required)
{
updateFieldRequired('getcustom',1);
jQuery('#jform_getcustom').removeAttr('required');
jQuery('#jform_getcustom').removeAttr('aria-required');
jQuery('#jform_getcustom').removeClass('required');
jform_vvvvvzgvwi_required = true;
}
}
}
// the vvvvvzg Some function
function gettype_vvvvvzg_SomeFunc(gettype_vvvvvzg)
{
// set the function logic
if (gettype_vvvvvzg == 3 || gettype_vvvvvzg == 4)
{
return true;
}
return false;
}
// the vvvvvzh function
function vvvvvzh(main_source_vvvvvzh)
{
if (isSet(main_source_vvvvvzh) && main_source_vvvvvzh.constructor
!== Array)
{
var temp_vvvvvzh = main_source_vvvvvzh;
var main_source_vvvvvzh = [];
main_source_vvvvvzh.push(temp_vvvvvzh);
}
else if (!isSet(main_source_vvvvvzh))
{
var main_source_vvvvvzh = [];
}
var main_source = main_source_vvvvvzh.some(main_source_vvvvvzh_SomeFunc);
// set this function logic
if (main_source)
{
jQuery('#jform_select_all').closest('.control-group').show();
}
else
{
jQuery('#jform_select_all').closest('.control-group').hide();
}
}
// the vvvvvzh Some function
function main_source_vvvvvzh_SomeFunc(main_source_vvvvvzh)
{
// set the function logic
if (main_source_vvvvvzh == 1 || main_source_vvvvvzh == 2)
{
return true;
}
return false;
}
// the vvvvvzi function
function vvvvvzi(main_source_vvvvvzi)
{
if (isSet(main_source_vvvvvzi) && main_source_vvvvvzi.constructor
!== Array)
{
var temp_vvvvvzi = main_source_vvvvvzi;
var main_source_vvvvvzi = [];
main_source_vvvvvzi.push(temp_vvvvvzi);
}
else if (!isSet(main_source_vvvvvzi))
{
var main_source_vvvvvzi = [];
}
var main_source = main_source_vvvvvzi.some(main_source_vvvvvzi_SomeFunc);
// set this function logic
if (main_source)
{
jQuery('#jform_view_table_main').closest('.control-group').show();
// add required attribute to view_table_main field
if (jform_vvvvvzivwj_required)
{
updateFieldRequired('view_table_main',0);
jQuery('#jform_view_table_main').prop('required','required');
jQuery('#jform_view_table_main').attr('aria-required',true);
jQuery('#jform_view_table_main').addClass('required');
jform_vvvvvzivwj_required = false;
}
}
else
{
jQuery('#jform_view_table_main').closest('.control-group').hide();
// remove required attribute from view_table_main field
if (!jform_vvvvvzivwj_required)
{
updateFieldRequired('view_table_main',1);
jQuery('#jform_view_table_main').removeAttr('required');
jQuery('#jform_view_table_main').removeAttr('aria-required');
jQuery('#jform_view_table_main').removeClass('required');
jform_vvvvvzivwj_required = true;
}
}
}
// the vvvvvzi Some function
function main_source_vvvvvzi_SomeFunc(main_source_vvvvvzi)
{
// set the function logic
if (main_source_vvvvvzi == 1)
{
return true;
}
return false;
}
// the vvvvvzj function
function vvvvvzj(main_source_vvvvvzj)
{
if (isSet(main_source_vvvvvzj) && main_source_vvvvvzj.constructor
!== Array)
{
var temp_vvvvvzj = main_source_vvvvvzj;
var main_source_vvvvvzj = [];
main_source_vvvvvzj.push(temp_vvvvvzj);
}
else if (!isSet(main_source_vvvvvzj))
{
var main_source_vvvvvzj = [];
}
var main_source = main_source_vvvvvzj.some(main_source_vvvvvzj_SomeFunc);
// set this function logic
if (main_source)
{
jQuery('#jform_view_selection').closest('.control-group').show();
// add required attribute to view_selection field
if (jform_vvvvvzjvwk_required)
{
updateFieldRequired('view_selection',0);
jQuery('#jform_view_selection').prop('required','required');
jQuery('#jform_view_selection').attr('aria-required',true);
jQuery('#jform_view_selection').addClass('required');
jform_vvvvvzjvwk_required = false;
}
}
else
{
jQuery('#jform_view_selection').closest('.control-group').hide();
// remove required attribute from view_selection field
if (!jform_vvvvvzjvwk_required)
{
updateFieldRequired('view_selection',1);
jQuery('#jform_view_selection').removeAttr('required');
jQuery('#jform_view_selection').removeAttr('aria-required');
jQuery('#jform_view_selection').removeClass('required');
jform_vvvvvzjvwk_required = true;
}
}
}
// the vvvvvzj Some function
function main_source_vvvvvzj_SomeFunc(main_source_vvvvvzj)
{
// set the function logic
if (main_source_vvvvvzj == 1)
{
return true;
}
return false;
}
// the vvvvvzk function
function vvvvvzk(main_source_vvvvvzk)
{
if (isSet(main_source_vvvvvzk) && main_source_vvvvvzk.constructor
!== Array)
{
var temp_vvvvvzk = main_source_vvvvvzk;
var main_source_vvvvvzk = [];
main_source_vvvvvzk.push(temp_vvvvvzk);
}
else if (!isSet(main_source_vvvvvzk))
{
var main_source_vvvvvzk = [];
}
var main_source = main_source_vvvvvzk.some(main_source_vvvvvzk_SomeFunc);
// set this function logic
if (main_source)
{
jQuery('#jform_db_table_main').closest('.control-group').show();
// add required attribute to db_table_main field
if (jform_vvvvvzkvwl_required)
{
updateFieldRequired('db_table_main',0);
jQuery('#jform_db_table_main').prop('required','required');
jQuery('#jform_db_table_main').attr('aria-required',true);
jQuery('#jform_db_table_main').addClass('required');
jform_vvvvvzkvwl_required = false;
}
}
else
{
jQuery('#jform_db_table_main').closest('.control-group').hide();
// remove required attribute from db_table_main field
if (!jform_vvvvvzkvwl_required)
{
updateFieldRequired('db_table_main',1);
jQuery('#jform_db_table_main').removeAttr('required');
jQuery('#jform_db_table_main').removeAttr('aria-required');
jQuery('#jform_db_table_main').removeClass('required');
jform_vvvvvzkvwl_required = true;
}
}
}
// the vvvvvzk Some function
function main_source_vvvvvzk_SomeFunc(main_source_vvvvvzk)
{
// set the function logic
if (main_source_vvvvvzk == 2)
{
return true;
}
return false;
}
// the vvvvvzl function
function vvvvvzl(main_source_vvvvvzl)
{
if (isSet(main_source_vvvvvzl) && main_source_vvvvvzl.constructor
!== Array)
{
var temp_vvvvvzl = main_source_vvvvvzl;
var main_source_vvvvvzl = [];
main_source_vvvvvzl.push(temp_vvvvvzl);
}
else if (!isSet(main_source_vvvvvzl))
{
var main_source_vvvvvzl = [];
}
var main_source = main_source_vvvvvzl.some(main_source_vvvvvzl_SomeFunc);
// set this function logic
if (main_source)
{
jQuery('#jform_db_selection').closest('.control-group').show();
// add required attribute to db_selection field
if (jform_vvvvvzlvwm_required)
{
updateFieldRequired('db_selection',0);
jQuery('#jform_db_selection').prop('required','required');
jQuery('#jform_db_selection').attr('aria-required',true);
jQuery('#jform_db_selection').addClass('required');
jform_vvvvvzlvwm_required = false;
}
}
else
{
jQuery('#jform_db_selection').closest('.control-group').hide();
// remove required attribute from db_selection field
if (!jform_vvvvvzlvwm_required)
{
updateFieldRequired('db_selection',1);
jQuery('#jform_db_selection').removeAttr('required');
jQuery('#jform_db_selection').removeAttr('aria-required');
jQuery('#jform_db_selection').removeClass('required');
jform_vvvvvzlvwm_required = true;
}
}
}
// the vvvvvzl Some function
function main_source_vvvvvzl_SomeFunc(main_source_vvvvvzl)
{
// set the function logic
if (main_source_vvvvvzl == 2)
{
return true;
}
return false;
}
// the vvvvvzm function
function vvvvvzm(addcalculation_vvvvvzm)
{
// set the function logic
if (addcalculation_vvvvvzm == 1)
{
jQuery('#jform_php_calculation-lbl').closest('.control-group').show();
}
else
{
jQuery('#jform_php_calculation-lbl').closest('.control-group').hide();
}
}
// the vvvvvzn function
function vvvvvzn(addcalculation_vvvvvzn,gettype_vvvvvzn)
{
if (isSet(addcalculation_vvvvvzn) &&
addcalculation_vvvvvzn.constructor !== Array)
{
var temp_vvvvvzn = addcalculation_vvvvvzn;
var addcalculation_vvvvvzn = [];
addcalculation_vvvvvzn.push(temp_vvvvvzn);
}
else if (!isSet(addcalculation_vvvvvzn))
{
var addcalculation_vvvvvzn = [];
}
var addcalculation =
addcalculation_vvvvvzn.some(addcalculation_vvvvvzn_SomeFunc);
if (isSet(gettype_vvvvvzn) && gettype_vvvvvzn.constructor !==
Array)
{
var temp_vvvvvzn = gettype_vvvvvzn;
var gettype_vvvvvzn = [];
gettype_vvvvvzn.push(temp_vvvvvzn);
}
else if (!isSet(gettype_vvvvvzn))
{
var gettype_vvvvvzn = [];
}
var gettype = gettype_vvvvvzn.some(gettype_vvvvvzn_SomeFunc);
// set this function logic
if (addcalculation && gettype)
{
jQuery('.note_calculation_item').closest('.control-group').show();
}
else
{
jQuery('.note_calculation_item').closest('.control-group').hide();
}
}
// the vvvvvzn Some function
function addcalculation_vvvvvzn_SomeFunc(addcalculation_vvvvvzn)
{
// set the function logic
if (addcalculation_vvvvvzn == 1)
{
return true;
}
return false;
}
// the vvvvvzn Some function
function gettype_vvvvvzn_SomeFunc(gettype_vvvvvzn)
{
// set the function logic
if (gettype_vvvvvzn == 1 || gettype_vvvvvzn == 3)
{
return true;
}
return false;
}
// the vvvvvzo function
function vvvvvzo(addcalculation_vvvvvzo,gettype_vvvvvzo)
{
if (isSet(addcalculation_vvvvvzo) &&
addcalculation_vvvvvzo.constructor !== Array)
{
var temp_vvvvvzo = addcalculation_vvvvvzo;
var addcalculation_vvvvvzo = [];
addcalculation_vvvvvzo.push(temp_vvvvvzo);
}
else if (!isSet(addcalculation_vvvvvzo))
{
var addcalculation_vvvvvzo = [];
}
var addcalculation =
addcalculation_vvvvvzo.some(addcalculation_vvvvvzo_SomeFunc);
if (isSet(gettype_vvvvvzo) && gettype_vvvvvzo.constructor !==
Array)
{
var temp_vvvvvzo = gettype_vvvvvzo;
var gettype_vvvvvzo = [];
gettype_vvvvvzo.push(temp_vvvvvzo);
}
else if (!isSet(gettype_vvvvvzo))
{
var gettype_vvvvvzo = [];
}
var gettype = gettype_vvvvvzo.some(gettype_vvvvvzo_SomeFunc);
// set this function logic
if (addcalculation && gettype)
{
jQuery('.note_calculation_items').closest('.control-group').show();
}
else
{
jQuery('.note_calculation_items').closest('.control-group').hide();
}
}
// the vvvvvzo Some function
function addcalculation_vvvvvzo_SomeFunc(addcalculation_vvvvvzo)
{
// set the function logic
if (addcalculation_vvvvvzo == 1)
{
return true;
}
return false;
}
// the vvvvvzo Some function
function gettype_vvvvvzo_SomeFunc(gettype_vvvvvzo)
{
// set the function logic
if (gettype_vvvvvzo == 2 || gettype_vvvvvzo == 4)
{
return true;
}
return false;
}
// the vvvvvzr function
function vvvvvzr(main_source_vvvvvzr)
{
if (isSet(main_source_vvvvvzr) && main_source_vvvvvzr.constructor
!== Array)
{
var temp_vvvvvzr = main_source_vvvvvzr;
var main_source_vvvvvzr = [];
main_source_vvvvvzr.push(temp_vvvvvzr);
}
else if (!isSet(main_source_vvvvvzr))
{
var main_source_vvvvvzr = [];
}
var main_source = main_source_vvvvvzr.some(main_source_vvvvvzr_SomeFunc);
// set this function logic
if (main_source)
{
jQuery('#jform_php_custom_get-lbl').closest('.control-group').show();
}
else
{
jQuery('#jform_php_custom_get-lbl').closest('.control-group').hide();
}
}
// the vvvvvzr Some function
function main_source_vvvvvzr_SomeFunc(main_source_vvvvvzr)
{
// set the function logic
if (main_source_vvvvvzr == 3)
{
return true;
}
return false;
}
// the vvvvvzs function
function vvvvvzs(main_source_vvvvvzs)
{
if (isSet(main_source_vvvvvzs) && main_source_vvvvvzs.constructor
!== Array)
{
var temp_vvvvvzs = main_source_vvvvvzs;
var main_source_vvvvvzs = [];
main_source_vvvvvzs.push(temp_vvvvvzs);
}
else if (!isSet(main_source_vvvvvzs))
{
var main_source_vvvvvzs = [];
}
var main_source = main_source_vvvvvzs.some(main_source_vvvvvzs_SomeFunc);
// set this function logic
if (main_source)
{
jQuery('#jform_filter-lbl').closest('.control-group').show();
jQuery('#jform_global-lbl').closest('.control-group').show();
jQuery('#jform_group-lbl').closest('.control-group').show();
jQuery('#jform_order-lbl').closest('.control-group').show();
jQuery('#jform_where-lbl').closest('.control-group').show();
jQuery('#jform_join_db_table-lbl').closest('.control-group').show();
jQuery('#jform_join_view_table-lbl').closest('.control-group').show();
}
else
{
jQuery('#jform_filter-lbl').closest('.control-group').hide();
jQuery('#jform_global-lbl').closest('.control-group').hide();
jQuery('#jform_group-lbl').closest('.control-group').hide();
jQuery('#jform_order-lbl').closest('.control-group').hide();
jQuery('#jform_where-lbl').closest('.control-group').hide();
jQuery('#jform_join_db_table-lbl').closest('.control-group').hide();
jQuery('#jform_join_view_table-lbl').closest('.control-group').hide();
}
}
// the vvvvvzs Some function
function main_source_vvvvvzs_SomeFunc(main_source_vvvvvzs)
{
// set the function logic
if (main_source_vvvvvzs == 1 || main_source_vvvvvzs == 2)
{
return true;
}
return false;
}
// the vvvvvzt function
function vvvvvzt(add_php_before_getitem_vvvvvzt,gettype_vvvvvzt)
{
if (isSet(add_php_before_getitem_vvvvvzt) &&
add_php_before_getitem_vvvvvzt.constructor !== Array)
{
var temp_vvvvvzt = add_php_before_getitem_vvvvvzt;
var add_php_before_getitem_vvvvvzt = [];
add_php_before_getitem_vvvvvzt.push(temp_vvvvvzt);
}
else if (!isSet(add_php_before_getitem_vvvvvzt))
{
var add_php_before_getitem_vvvvvzt = [];
}
var add_php_before_getitem =
add_php_before_getitem_vvvvvzt.some(add_php_before_getitem_vvvvvzt_SomeFunc);
if (isSet(gettype_vvvvvzt) && gettype_vvvvvzt.constructor !==
Array)
{
var temp_vvvvvzt = gettype_vvvvvzt;
var gettype_vvvvvzt = [];
gettype_vvvvvzt.push(temp_vvvvvzt);
}
else if (!isSet(gettype_vvvvvzt))
{
var gettype_vvvvvzt = [];
}
var gettype = gettype_vvvvvzt.some(gettype_vvvvvzt_SomeFunc);
// set this function logic
if (add_php_before_getitem && gettype)
{
jQuery('#jform_php_before_getitem-lbl').closest('.control-group').show();
}
else
{
jQuery('#jform_php_before_getitem-lbl').closest('.control-group').hide();
}
}
// the vvvvvzt Some function
function
add_php_before_getitem_vvvvvzt_SomeFunc(add_php_before_getitem_vvvvvzt)
{
// set the function logic
if (add_php_before_getitem_vvvvvzt == 1)
{
return true;
}
return false;
}
// the vvvvvzt Some function
function gettype_vvvvvzt_SomeFunc(gettype_vvvvvzt)
{
// set the function logic
if (gettype_vvvvvzt == 1 || gettype_vvvvvzt == 3)
{
return true;
}
return false;
}
// the vvvvvzu function
function vvvvvzu(add_php_after_getitem_vvvvvzu,gettype_vvvvvzu)
{
if (isSet(add_php_after_getitem_vvvvvzu) &&
add_php_after_getitem_vvvvvzu.constructor !== Array)
{
var temp_vvvvvzu = add_php_after_getitem_vvvvvzu;
var add_php_after_getitem_vvvvvzu = [];
add_php_after_getitem_vvvvvzu.push(temp_vvvvvzu);
}
else if (!isSet(add_php_after_getitem_vvvvvzu))
{
var add_php_after_getitem_vvvvvzu = [];
}
var add_php_after_getitem =
add_php_after_getitem_vvvvvzu.some(add_php_after_getitem_vvvvvzu_SomeFunc);
if (isSet(gettype_vvvvvzu) && gettype_vvvvvzu.constructor !==
Array)
{
var temp_vvvvvzu = gettype_vvvvvzu;
var gettype_vvvvvzu = [];
gettype_vvvvvzu.push(temp_vvvvvzu);
}
else if (!isSet(gettype_vvvvvzu))
{
var gettype_vvvvvzu = [];
}
var gettype = gettype_vvvvvzu.some(gettype_vvvvvzu_SomeFunc);
// set this function logic
if (add_php_after_getitem && gettype)
{
jQuery('#jform_php_after_getitem-lbl').closest('.control-group').show();
}
else
{
jQuery('#jform_php_after_getitem-lbl').closest('.control-group').hide();
}
}
// the vvvvvzu Some function
function
add_php_after_getitem_vvvvvzu_SomeFunc(add_php_after_getitem_vvvvvzu)
{
// set the function logic
if (add_php_after_getitem_vvvvvzu == 1)
{
return true;
}
return false;
}
// the vvvvvzu Some function
function gettype_vvvvvzu_SomeFunc(gettype_vvvvvzu)
{
// set the function logic
if (gettype_vvvvvzu == 1 || gettype_vvvvvzu == 3)
{
return true;
}
return false;
}
// the vvvvvzw function
function vvvvvzw(gettype_vvvvvzw)
{
if (isSet(gettype_vvvvvzw) && gettype_vvvvvzw.constructor !==
Array)
{
var temp_vvvvvzw = gettype_vvvvvzw;
var gettype_vvvvvzw = [];
gettype_vvvvvzw.push(temp_vvvvvzw);
}
else if (!isSet(gettype_vvvvvzw))
{
var gettype_vvvvvzw = [];
}
var gettype = gettype_vvvvvzw.some(gettype_vvvvvzw_SomeFunc);
// set this function logic
if (gettype)
{
jQuery('#jform_add_php_after_getitem').closest('.control-group').show();
// add required attribute to add_php_after_getitem field
if (jform_vvvvvzwvwn_required)
{
updateFieldRequired('add_php_after_getitem',0);
jQuery('#jform_add_php_after_getitem').prop('required','required');
jQuery('#jform_add_php_after_getitem').attr('aria-required',true);
jQuery('#jform_add_php_after_getitem').addClass('required');
jform_vvvvvzwvwn_required = false;
}
jQuery('#jform_add_php_before_getitem').closest('.control-group').show();
// add required attribute to add_php_before_getitem field
if (jform_vvvvvzwvwo_required)
{
updateFieldRequired('add_php_before_getitem',0);
jQuery('#jform_add_php_before_getitem').prop('required','required');
jQuery('#jform_add_php_before_getitem').attr('aria-required',true);
jQuery('#jform_add_php_before_getitem').addClass('required');
jform_vvvvvzwvwo_required = false;
}
}
else
{
jQuery('#jform_add_php_after_getitem').closest('.control-group').hide();
// remove required attribute from add_php_after_getitem field
if (!jform_vvvvvzwvwn_required)
{
updateFieldRequired('add_php_after_getitem',1);
jQuery('#jform_add_php_after_getitem').removeAttr('required');
jQuery('#jform_add_php_after_getitem').removeAttr('aria-required');
jQuery('#jform_add_php_after_getitem').removeClass('required');
jform_vvvvvzwvwn_required = true;
}
jQuery('#jform_add_php_before_getitem').closest('.control-group').hide();
// remove required attribute from add_php_before_getitem field
if (!jform_vvvvvzwvwo_required)
{
updateFieldRequired('add_php_before_getitem',1);
jQuery('#jform_add_php_before_getitem').removeAttr('required');
jQuery('#jform_add_php_before_getitem').removeAttr('aria-required');
jQuery('#jform_add_php_before_getitem').removeClass('required');
jform_vvvvvzwvwo_required = true;
}
}
}
// the vvvvvzw Some function
function gettype_vvvvvzw_SomeFunc(gettype_vvvvvzw)
{
// set the function logic
if (gettype_vvvvvzw == 1 || gettype_vvvvvzw == 3)
{
return true;
}
return false;
}
// the vvvvvzx function
function vvvvvzx(add_php_getlistquery_vvvvvzx,gettype_vvvvvzx)
{
if (isSet(add_php_getlistquery_vvvvvzx) &&
add_php_getlistquery_vvvvvzx.constructor !== Array)
{
var temp_vvvvvzx = add_php_getlistquery_vvvvvzx;
var add_php_getlistquery_vvvvvzx = [];
add_php_getlistquery_vvvvvzx.push(temp_vvvvvzx);
}
else if (!isSet(add_php_getlistquery_vvvvvzx))
{
var add_php_getlistquery_vvvvvzx = [];
}
var add_php_getlistquery =
add_php_getlistquery_vvvvvzx.some(add_php_getlistquery_vvvvvzx_SomeFunc);
if (isSet(gettype_vvvvvzx) && gettype_vvvvvzx.constructor !==
Array)
{
var temp_vvvvvzx = gettype_vvvvvzx;
var gettype_vvvvvzx = [];
gettype_vvvvvzx.push(temp_vvvvvzx);
}
else if (!isSet(gettype_vvvvvzx))
{
var gettype_vvvvvzx = [];
}
var gettype = gettype_vvvvvzx.some(gettype_vvvvvzx_SomeFunc);
// set this function logic
if (add_php_getlistquery && gettype)
{
jQuery('#jform_php_getlistquery-lbl').closest('.control-group').show();
}
else
{
jQuery('#jform_php_getlistquery-lbl').closest('.control-group').hide();
}
}
// the vvvvvzx Some function
function
add_php_getlistquery_vvvvvzx_SomeFunc(add_php_getlistquery_vvvvvzx)
{
// set the function logic
if (add_php_getlistquery_vvvvvzx == 1)
{
return true;
}
return false;
}
// the vvvvvzx Some function
function gettype_vvvvvzx_SomeFunc(gettype_vvvvvzx)
{
// set the function logic
if (gettype_vvvvvzx == 2 || gettype_vvvvvzx == 4)
{
return true;
}
return false;
}
// the vvvvvzy function
function vvvvvzy(add_php_before_getitems_vvvvvzy,gettype_vvvvvzy)
{
if (isSet(add_php_before_getitems_vvvvvzy) &&
add_php_before_getitems_vvvvvzy.constructor !== Array)
{
var temp_vvvvvzy = add_php_before_getitems_vvvvvzy;
var add_php_before_getitems_vvvvvzy = [];
add_php_before_getitems_vvvvvzy.push(temp_vvvvvzy);
}
else if (!isSet(add_php_before_getitems_vvvvvzy))
{
var add_php_before_getitems_vvvvvzy = [];
}
var add_php_before_getitems =
add_php_before_getitems_vvvvvzy.some(add_php_before_getitems_vvvvvzy_SomeFunc);
if (isSet(gettype_vvvvvzy) && gettype_vvvvvzy.constructor !==
Array)
{
var temp_vvvvvzy = gettype_vvvvvzy;
var gettype_vvvvvzy = [];
gettype_vvvvvzy.push(temp_vvvvvzy);
}
else if (!isSet(gettype_vvvvvzy))
{
var gettype_vvvvvzy = [];
}
var gettype = gettype_vvvvvzy.some(gettype_vvvvvzy_SomeFunc);
// set this function logic
if (add_php_before_getitems && gettype)
{
jQuery('#jform_php_before_getitems-lbl').closest('.control-group').show();
}
else
{
jQuery('#jform_php_before_getitems-lbl').closest('.control-group').hide();
}
}
// the vvvvvzy Some function
function
add_php_before_getitems_vvvvvzy_SomeFunc(add_php_before_getitems_vvvvvzy)
{
// set the function logic
if (add_php_before_getitems_vvvvvzy == 1)
{
return true;
}
return false;
}
// the vvvvvzy Some function
function gettype_vvvvvzy_SomeFunc(gettype_vvvvvzy)
{
// set the function logic
if (gettype_vvvvvzy == 2 || gettype_vvvvvzy == 4)
{
return true;
}
return false;
}
// the vvvvvzz function
function vvvvvzz(add_php_after_getitems_vvvvvzz,gettype_vvvvvzz)
{
if (isSet(add_php_after_getitems_vvvvvzz) &&
add_php_after_getitems_vvvvvzz.constructor !== Array)
{
var temp_vvvvvzz = add_php_after_getitems_vvvvvzz;
var add_php_after_getitems_vvvvvzz = [];
add_php_after_getitems_vvvvvzz.push(temp_vvvvvzz);
}
else if (!isSet(add_php_after_getitems_vvvvvzz))
{
var add_php_after_getitems_vvvvvzz = [];
}
var add_php_after_getitems =
add_php_after_getitems_vvvvvzz.some(add_php_after_getitems_vvvvvzz_SomeFunc);
if (isSet(gettype_vvvvvzz) && gettype_vvvvvzz.constructor !==
Array)
{
var temp_vvvvvzz = gettype_vvvvvzz;
var gettype_vvvvvzz = [];
gettype_vvvvvzz.push(temp_vvvvvzz);
}
else if (!isSet(gettype_vvvvvzz))
{
var gettype_vvvvvzz = [];
}
var gettype = gettype_vvvvvzz.some(gettype_vvvvvzz_SomeFunc);
// set this function logic
if (add_php_after_getitems && gettype)
{
jQuery('#jform_php_after_getitems-lbl').closest('.control-group').show();
}
else
{
jQuery('#jform_php_after_getitems-lbl').closest('.control-group').hide();
}
}
// the vvvvvzz Some function
function
add_php_after_getitems_vvvvvzz_SomeFunc(add_php_after_getitems_vvvvvzz)
{
// set the function logic
if (add_php_after_getitems_vvvvvzz == 1)
{
return true;
}
return false;
}
// the vvvvvzz Some function
function gettype_vvvvvzz_SomeFunc(gettype_vvvvvzz)
{
// set the function logic
if (gettype_vvvvvzz == 2 || gettype_vvvvvzz == 4)
{
return true;
}
return false;
}
// the vvvvwab function
function vvvvwab(gettype_vvvvwab)
{
if (isSet(gettype_vvvvwab) && gettype_vvvvwab.constructor !==
Array)
{
var temp_vvvvwab = gettype_vvvvwab;
var gettype_vvvvwab = [];
gettype_vvvvwab.push(temp_vvvvwab);
}
else if (!isSet(gettype_vvvvwab))
{
var gettype_vvvvwab = [];
}
var gettype = gettype_vvvvwab.some(gettype_vvvvwab_SomeFunc);
// set this function logic
if (gettype)
{
jQuery('#jform_add_php_after_getitems').closest('.control-group').show();
// add required attribute to add_php_after_getitems field
if (jform_vvvvwabvwp_required)
{
updateFieldRequired('add_php_after_getitems',0);
jQuery('#jform_add_php_after_getitems').prop('required','required');
jQuery('#jform_add_php_after_getitems').attr('aria-required',true);
jQuery('#jform_add_php_after_getitems').addClass('required');
jform_vvvvwabvwp_required = false;
}
jQuery('#jform_add_php_before_getitems').closest('.control-group').show();
// add required attribute to add_php_before_getitems field
if (jform_vvvvwabvwq_required)
{
updateFieldRequired('add_php_before_getitems',0);
jQuery('#jform_add_php_before_getitems').prop('required','required');
jQuery('#jform_add_php_before_getitems').attr('aria-required',true);
jQuery('#jform_add_php_before_getitems').addClass('required');
jform_vvvvwabvwq_required = false;
}
jQuery('#jform_add_php_getlistquery').closest('.control-group').show();
// add required attribute to add_php_getlistquery field
if (jform_vvvvwabvwr_required)
{
updateFieldRequired('add_php_getlistquery',0);
jQuery('#jform_add_php_getlistquery').prop('required','required');
jQuery('#jform_add_php_getlistquery').attr('aria-required',true);
jQuery('#jform_add_php_getlistquery').addClass('required');
jform_vvvvwabvwr_required = false;
}
}
else
{
jQuery('#jform_add_php_after_getitems').closest('.control-group').hide();
// remove required attribute from add_php_after_getitems field
if (!jform_vvvvwabvwp_required)
{
updateFieldRequired('add_php_after_getitems',1);
jQuery('#jform_add_php_after_getitems').removeAttr('required');
jQuery('#jform_add_php_after_getitems').removeAttr('aria-required');
jQuery('#jform_add_php_after_getitems').removeClass('required');
jform_vvvvwabvwp_required = true;
}
jQuery('#jform_add_php_before_getitems').closest('.control-group').hide();
// remove required attribute from add_php_before_getitems field
if (!jform_vvvvwabvwq_required)
{
updateFieldRequired('add_php_before_getitems',1);
jQuery('#jform_add_php_before_getitems').removeAttr('required');
jQuery('#jform_add_php_before_getitems').removeAttr('aria-required');
jQuery('#jform_add_php_before_getitems').removeClass('required');
jform_vvvvwabvwq_required = true;
}
jQuery('#jform_add_php_getlistquery').closest('.control-group').hide();
// remove required attribute from add_php_getlistquery field
if (!jform_vvvvwabvwr_required)
{
updateFieldRequired('add_php_getlistquery',1);
jQuery('#jform_add_php_getlistquery').removeAttr('required');
jQuery('#jform_add_php_getlistquery').removeAttr('aria-required');
jQuery('#jform_add_php_getlistquery').removeClass('required');
jform_vvvvwabvwr_required = true;
}
}
}
// the vvvvwab Some function
function gettype_vvvvwab_SomeFunc(gettype_vvvvwab)
{
// set the function logic
if (gettype_vvvvwab == 2 || gettype_vvvvwab == 4)
{
return true;
}
return false;
}
// the vvvvwac function
function vvvvwac(gettype_vvvvwac)
{
if (isSet(gettype_vvvvwac) && gettype_vvvvwac.constructor !==
Array)
{
var temp_vvvvwac = gettype_vvvvwac;
var gettype_vvvvwac = [];
gettype_vvvvwac.push(temp_vvvvwac);
}
else if (!isSet(gettype_vvvvwac))
{
var gettype_vvvvwac = [];
}
var gettype = gettype_vvvvwac.some(gettype_vvvvwac_SomeFunc);
// set this function logic
if (gettype)
{
jQuery('#jform_pagination').closest('.control-group').show();
// add required attribute to pagination field
if (jform_vvvvwacvws_required)
{
updateFieldRequired('pagination',0);
jQuery('#jform_pagination').prop('required','required');
jQuery('#jform_pagination').attr('aria-required',true);
jQuery('#jform_pagination').addClass('required');
jform_vvvvwacvws_required = false;
}
}
else
{
jQuery('#jform_pagination').closest('.control-group').hide();
// remove required attribute from pagination field
if (!jform_vvvvwacvws_required)
{
updateFieldRequired('pagination',1);
jQuery('#jform_pagination').removeAttr('required');
jQuery('#jform_pagination').removeAttr('aria-required');
jQuery('#jform_pagination').removeClass('required');
jform_vvvvwacvws_required = true;
}
}
}
// the vvvvwac Some function
function gettype_vvvvwac_SomeFunc(gettype_vvvvwac)
{
// set the function logic
if (gettype_vvvvwac == 2)
{
return true;
}
return false;
}
// the vvvvwad function
function vvvvwad(gettype_vvvvwad)
{
if (isSet(gettype_vvvvwad) && gettype_vvvvwad.constructor !==
Array)
{
var temp_vvvvwad = gettype_vvvvwad;
var gettype_vvvvwad = [];
gettype_vvvvwad.push(temp_vvvvwad);
}
else if (!isSet(gettype_vvvvwad))
{
var gettype_vvvvwad = [];
}
var gettype = gettype_vvvvwad.some(gettype_vvvvwad_SomeFunc);
// set this function logic
if (gettype)
{
jQuery('#jform_add_php_router_parse').closest('.control-group').show();
// add required attribute to add_php_router_parse field
if (jform_vvvvwadvwt_required)
{
updateFieldRequired('add_php_router_parse',0);
jQuery('#jform_add_php_router_parse').prop('required','required');
jQuery('#jform_add_php_router_parse').attr('aria-required',true);
jQuery('#jform_add_php_router_parse').addClass('required');
jform_vvvvwadvwt_required = false;
}
}
else
{
jQuery('#jform_add_php_router_parse').closest('.control-group').hide();
// remove required attribute from add_php_router_parse field
if (!jform_vvvvwadvwt_required)
{
updateFieldRequired('add_php_router_parse',1);
jQuery('#jform_add_php_router_parse').removeAttr('required');
jQuery('#jform_add_php_router_parse').removeAttr('aria-required');
jQuery('#jform_add_php_router_parse').removeClass('required');
jform_vvvvwadvwt_required = true;
}
}
}
// the vvvvwad Some function
function gettype_vvvvwad_SomeFunc(gettype_vvvvwad)
{
// set the function logic
if (gettype_vvvvwad == 1 || gettype_vvvvwad == 2)
{
return true;
}
return false;
}
// the vvvvwae function
function vvvvwae(gettype_vvvvwae,add_php_router_parse_vvvvwae)
{
if (isSet(gettype_vvvvwae) && gettype_vvvvwae.constructor !==
Array)
{
var temp_vvvvwae = gettype_vvvvwae;
var gettype_vvvvwae = [];
gettype_vvvvwae.push(temp_vvvvwae);
}
else if (!isSet(gettype_vvvvwae))
{
var gettype_vvvvwae = [];
}
var gettype = gettype_vvvvwae.some(gettype_vvvvwae_SomeFunc);
if (isSet(add_php_router_parse_vvvvwae) &&
add_php_router_parse_vvvvwae.constructor !== Array)
{
var temp_vvvvwae = add_php_router_parse_vvvvwae;
var add_php_router_parse_vvvvwae = [];
add_php_router_parse_vvvvwae.push(temp_vvvvwae);
}
else if (!isSet(add_php_router_parse_vvvvwae))
{
var add_php_router_parse_vvvvwae = [];
}
var add_php_router_parse =
add_php_router_parse_vvvvwae.some(add_php_router_parse_vvvvwae_SomeFunc);
// set this function logic
if (gettype && add_php_router_parse)
{
jQuery('#jform_php_router_parse').closest('.control-group').show();
// add required attribute to php_router_parse field
if (jform_vvvvwaevwu_required)
{
updateFieldRequired('php_router_parse',0);
jQuery('#jform_php_router_parse').prop('required','required');
jQuery('#jform_php_router_parse').attr('aria-required',true);
jQuery('#jform_php_router_parse').addClass('required');
jform_vvvvwaevwu_required = false;
}
}
else
{
jQuery('#jform_php_router_parse').closest('.control-group').hide();
// remove required attribute from php_router_parse field
if (!jform_vvvvwaevwu_required)
{
updateFieldRequired('php_router_parse',1);
jQuery('#jform_php_router_parse').removeAttr('required');
jQuery('#jform_php_router_parse').removeAttr('aria-required');
jQuery('#jform_php_router_parse').removeClass('required');
jform_vvvvwaevwu_required = true;
}
}
}
// the vvvvwae Some function
function gettype_vvvvwae_SomeFunc(gettype_vvvvwae)
{
// set the function logic
if (gettype_vvvvwae == 1 || gettype_vvvvwae == 2)
{
return true;
}
return false;
}
// the vvvvwae Some function
function
add_php_router_parse_vvvvwae_SomeFunc(add_php_router_parse_vvvvwae)
{
// set the function logic
if (add_php_router_parse_vvvvwae == 1)
{
return true;
}
return false;
}
// the vvvvwag function
function vvvvwag(gettype_vvvvwag)
{
if (isSet(gettype_vvvvwag) && gettype_vvvvwag.constructor !==
Array)
{
var temp_vvvvwag = gettype_vvvvwag;
var gettype_vvvvwag = [];
gettype_vvvvwag.push(temp_vvvvwag);
}
else if (!isSet(gettype_vvvvwag))
{
var gettype_vvvvwag = [];
}
var gettype = gettype_vvvvwag.some(gettype_vvvvwag_SomeFunc);
// set this function logic
if (gettype)
{
jQuery('#jform_plugin_events').closest('.control-group').show();
}
else
{
jQuery('#jform_plugin_events').closest('.control-group').hide();
}
}
// the vvvvwag Some function
function gettype_vvvvwag_SomeFunc(gettype_vvvvwag)
{
// set the function logic
if (gettype_vvvvwag == 1)
{
return true;
}
return false;
}
// update fields required
function updateFieldRequired(name, status) {
// check if not_required exist
if (document.getElementById('jform_not_required')) {
var not_required =
jQuery('#jform_not_required').val().split(",");
if(status == 1)
{
not_required.push(name);
}
else
{
not_required = removeFieldFromNotRequired(not_required, name);
}
jQuery('#jform_not_required').val(fixNotRequiredArray(not_required).toString());
}
}
// remove field from not_required
function removeFieldFromNotRequired(array, what) {
return array.filter(function(element){
return element !== what;
});
}
// fix not required array
function fixNotRequiredArray(array) {
var seen = {};
return removeEmptyFromNotRequiredArray(array).filter(function(item) {
return seen.hasOwnProperty(item) ? false : (seen[item] = true);
});
}
// remove empty from not_required array
function removeEmptyFromNotRequiredArray(array) {
return array.filter(function (el) {
// remove ( 一_一) as well - lol
return (el.length > 0 && '一_一' !== el);
});
}
// the isSet function
function isSet(val)
{
if ((val != undefined) && (val != null) && 0 !==
val.length){
return true;
}
return false;
}
jQuery(document).ready(function()
{
// get the linked details
getLinked();
var valueSwitch = jQuery("#jform_add_php_router_parse
input[type='radio']:checked").val();
getDynamicScripts(valueSwitch);
// check and load all the custom code edit buttons
getEditCustomCodeButtons();
});
function setSelectAll(select_all){
// get source type
var main_source = jQuery("#jform_main_source").val();
if (1 == main_source) {
var key = 'view';
} else if (2 == main_source) {
var key = 'db';
} else {
return true;
}
// only continue if set
if (select_all == 1) {
// set default notice
jQuery("#jform_"+key+"_selection").val('a.*');
// set the selection text area to read only
jQuery("#jform_"+key+"_selection").prop("readonly",
true);
} else {
// remove the read only from selection text area
jQuery("#jform_"+key+"_selection").prop("readonly",
false);
// get selected options
var value_main = jQuery("#jform_"+key+"_table_main
option:selected").val();
// make sure that all fields are set as selected
if (key === 'view') {
getViewTableColumns(value_main, 'a', key, 3, true,
'', '');
} else {
getDbTableColumns(value_main, 'a', key, 3, true, '',
'');
}
}
}
function getViewTableColumns_server(viewId,asKey,rowType){
var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.viewTableColumns&format=json&raw=true");
if (token.length > 0 && viewId > 0 && asKey.length
> 0)
{
var request =
token+'=1&as='+asKey+'&type='+rowType+'&id='+viewId;
}
return jQuery.ajax({
type: 'GET',
url: getUrl,
dataType: 'json',
data: request,
jsonp: false
});
}
function getViewTableColumns(id, asKey, key, rowType, main, table_, nr_){
// check if this is the main view
if (main){
var select_all = jQuery("#jform_select_all
input[type='radio']:checked").val();
// do not continue if set
if (select_all == 1){
setSelectAll(select_all);
return true;
}
}
getViewTableColumns_server(id, asKey, rowType).done(function(result) {
if (result) {
loadSelectionData(result, 'view', key, main, table_, nr_);
} else {
loadSelectionData(false, 'view', key, main, table_, nr_);
}
})
}
function getDbTableColumns_server(name,asKey,rowType)
{
var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.dbTableColumns&format=json&raw=true");
if (token.length > 0 && name.length > 0 &&
asKey.length > 0) {
var request =
token+'=1&as='+asKey+'&type='+rowType+'&name='+name;
}
return jQuery.ajax({
type: 'GET',
url: getUrl,
dataType: 'json',
data: request,
jsonp: false
});
}
function getDbTableColumns(name, asKey, key, rowType, main, table_, nr_){
// check if this is the main view
if (main){
var select_all = jQuery("#jform_select_all
input[type='radio']:checked").val();
// do not continue if set
if (select_all == 1){
setSelectAll(select_all);
return true;
}
}
getDbTableColumns_server(name,asKey,rowType).done(function(result) {
if (result) {
loadSelectionData(result, 'db', key, main, table_, nr_);
} else {
loadSelectionData(false, 'db', key, main, table_, nr_);
}
})
}
function loadSelectionData(result, type, key, main, table_, nr_)
{
if (main)
{
var textArea = 'textarea#jform_'+key+'_selection';
}
else
{
var textArea =
'textarea#jform_join_'+type+'_table'+table_+'_join_'+type+'_table'+key+nr_+'_selection';
}
// no update the text area
if (result)
{
jQuery(textArea).val(result);
}
else
{
jQuery(textArea).val('');
}
}
function updateSubItems(fieldName, fieldNr, table_, nr_) {
if(jQuery('#jform_join_'+fieldName+'_table'+table_+'_join_'+fieldName+'_table'+fieldNr+nr_+'_'+fieldName+'_table').length)
{
jQuery('#adminForm').on('change',
'#jform_join_'+fieldName+'_table'+table_+'_join_'+fieldName+'_table'+fieldNr+nr_+'_'+fieldName+'_table',function
(e) {
e.preventDefault();
// get options
var value1 =
jQuery("#jform_join_"+fieldName+"_table"+table_+"_join_"+fieldName+"_table"+fieldNr+nr_+"_"+fieldName+"_table
option:selected").val();
var as_value2 =
jQuery("#jform_join_"+fieldName+"_table"+table_+"_join_"+fieldName+"_table"+fieldNr+nr_+"_as
option:selected").val();
var row_value1 =
jQuery("#jform_join_"+fieldName+"_table"+table_+"_join_"+fieldName+"_table"+fieldNr+nr_+"_row_type
option:selected").val();
if (fieldName === 'view') {
getViewTableColumns(value1, as_value2, fieldNr, row_value1, false,
table_, nr_);
} else {
getDbTableColumns(value1, as_value2, fieldNr, row_value1, false,
table_, nr_);
}
});
jQuery('#adminForm').on('change',
'#jform_join_'+fieldName+'_table'+table_+'_join_'+fieldName+'_table'+fieldNr+nr_+'_as',function
(e) {
e.preventDefault();
// get options
var value1 =
jQuery("#jform_join_"+fieldName+"_table"+table_+"_join_"+fieldName+"_table"+fieldNr+nr_+"_"+fieldName+"_table
option:selected").val();
var as_value2 =
jQuery("#jform_join_"+fieldName+"_table"+table_+"_join_"+fieldName+"_table"+fieldNr+nr_+"_as
option:selected").val();
var row_value1 =
jQuery("#jform_join_"+fieldName+"_table"+table_+"_join_"+fieldName+"_table"+fieldNr+nr_+"_row_type
option:selected").val();
if (fieldName === 'view') {
getViewTableColumns(value1, as_value2, fieldNr, row_value1, false,
table_, nr_);
} else {
getDbTableColumns(value1, as_value2, fieldNr, row_value1, false,
table_, nr_);
}
});
jQuery('#adminForm').on('change',
'#jform_join_'+fieldName+'_table'+table_+'_join_'+fieldName+'_table'+fieldNr+nr_+'_row_type',function
(e) {
e.preventDefault();
// get options
var value1 =
jQuery("#jform_join_"+fieldName+"_table"+table_+"_join_"+fieldName+"_table"+fieldNr+nr_+"_"+fieldName+"_table
option:selected").val();
var as_value2 =
jQuery("#jform_join_"+fieldName+"_table"+table_+"_join_"+fieldName+"_table"+fieldNr+nr_+"_as
option:selected").val();
var row_value1 =
jQuery("#jform_join_"+fieldName+"_table"+table_+"_join_"+fieldName+"_table"+fieldNr+nr_+"_row_type
option:selected").val();
if (fieldName === 'view') {
getViewTableColumns(value1, as_value2, fieldNr, row_value1, false,
table_, nr_);
} else {
getDbTableColumns(value1, as_value2, fieldNr, row_value1, false,
table_, nr_);
}
});
}
}
function getDynamicScripts(id){
if (1 == id) {
// get the current values
var current_router_parse =
jQuery('textarea#jform_php_router_parse').val();
// set the router parse method script
if(current_router_parse.length == 0){
getCodeFrom_server(1, 'routerparse', 'type',
'getDynamicScripts').then(function(result) {
if(result){
jQuery('textarea#jform_php_router_parse').val(result);
}
});
}
}
}
function getCodeFrom_server(id, type, type_name, callingName) {
var url = "index.php?option=com_componentbuilder&task=ajax."
+ callingName +
"&format=json&raw=true&vdm="+vastDevMod;
if (token.length > 0 && id > 0 && type.length >
0) {
url += '&' + token + '=1&' + type_name +
'=' + type + '&id=' + id;
}
var getUrl = JRouter(url);
return fetch(getUrl, {
method: 'GET',
headers: {
'Content-Type': 'application/json'
}
}).then(function(response) {
if (response.ok) {
return response.json();
} else {
throw new Error('Network response was not ok');
}
}).then(function(data) {
return data;
}).catch(function(error) {
console.error('There was a problem with the fetch operation:',
error);
});
}
function getEditCustomCodeButtons_server(id) {
var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod);
let requestParams = '';
if (token.length > 0 && id > 0) {
requestParams =
token+'=1&id='+id+'&return_here='+return_here;
}
// Construct URL with parameters for GET request
const urlWithParams = getUrl + '&' + requestParams;
// Using the Fetch API for the GET request
return fetch(urlWithParams, {
method: 'GET',
headers: {
'Content-Type': 'application/json'
}
}).then(response => {
if (!response.ok) {
throw new Error('Network response was not ok');
}
return response.json();
});
}
function getEditCustomCodeButtons() {
// Get the id using pure JavaScript
const id = document.querySelector("#jform_id").value;
getEditCustomCodeButtons_server(id).then(function(result) {
if (typeof result === 'object') {
Object.entries(result).forEach(([field, buttons]) => {
// Creating the div element for buttons
const div = document.createElement('div');
div.className = 'control-group';
div.innerHTML = '<div
class="control-label"><label>Add/Edit
Customcode</label></div><div class="controls
control-customcode-buttons-'+field+'"></div>';
// Insert the div before .control-wrapper-{field}
const insertBeforeElement =
document.querySelector(".control-wrapper-"+field);
insertBeforeElement.parentNode.insertBefore(div, insertBeforeElement);
// Adding buttons to the div
Object.entries(buttons).forEach(([name, button]) => {
const controlsDiv =
document.querySelector(".control-customcode-buttons-"+field);
controlsDiv.innerHTML += button;
});
});
}
}).catch(error => {
console.error('Error:', error);
});
}
function getLinked() {
getCodeFrom_server(1, 'type', 'type',
'getLinked').then(function(result) {
if (result.error) {
console.error(result.error);
} else if (result) {
document.getElementById('display_linked_to').innerHTML =
result;
}
});
}
field.js000064400000071265151167367500006213 0ustar00/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder
<https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights
reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
// Some Global Values
jform_vvvvwbfvxe_required = false;
jform_vvvvwbgvxf_required = false;
jform_vvvvwbhvxg_required = false;
jform_vvvvwbivxh_required = false;
jform_vvvvwblvxi_required = false;
jform_vvvvwblvxj_required = false;
// Initial Script
document.addEventListener('DOMContentLoaded', function()
{
var datalenght_vvvvwbf = jQuery("#jform_datalenght").val();
vvvvwbf(datalenght_vvvvwbf);
var datadefault_vvvvwbg = jQuery("#jform_datadefault").val();
vvvvwbg(datadefault_vvvvwbg);
var datatype_vvvvwbh = jQuery("#jform_datatype").val();
vvvvwbh(datatype_vvvvwbh);
var datatype_vvvvwbi = jQuery("#jform_datatype").val();
vvvvwbi(datatype_vvvvwbi);
var store_vvvvwbl = jQuery("#jform_store").val();
vvvvwbl(store_vvvvwbl);
var add_css_view_vvvvwbm = jQuery("#jform_add_css_view
input[type='radio']:checked").val();
vvvvwbm(add_css_view_vvvvwbm);
var add_css_views_vvvvwbn = jQuery("#jform_add_css_views
input[type='radio']:checked").val();
vvvvwbn(add_css_views_vvvvwbn);
var add_javascript_view_footer_vvvvwbo =
jQuery("#jform_add_javascript_view_footer
input[type='radio']:checked").val();
vvvvwbo(add_javascript_view_footer_vvvvwbo);
var add_javascript_views_footer_vvvvwbp =
jQuery("#jform_add_javascript_views_footer
input[type='radio']:checked").val();
vvvvwbp(add_javascript_views_footer_vvvvwbp);
});
// the vvvvwbf function
function vvvvwbf(datalenght_vvvvwbf)
{
if (isSet(datalenght_vvvvwbf) && datalenght_vvvvwbf.constructor
!== Array)
{
var temp_vvvvwbf = datalenght_vvvvwbf;
var datalenght_vvvvwbf = [];
datalenght_vvvvwbf.push(temp_vvvvwbf);
}
else if (!isSet(datalenght_vvvvwbf))
{
var datalenght_vvvvwbf = [];
}
var datalenght = datalenght_vvvvwbf.some(datalenght_vvvvwbf_SomeFunc);
// set this function logic
if (datalenght)
{
jQuery('#jform_datalenght_other').closest('.control-group').show();
// add required attribute to datalenght_other field
if (jform_vvvvwbfvxe_required)
{
updateFieldRequired('datalenght_other',0);
jQuery('#jform_datalenght_other').prop('required','required');
jQuery('#jform_datalenght_other').attr('aria-required',true);
jQuery('#jform_datalenght_other').addClass('required');
jform_vvvvwbfvxe_required = false;
}
}
else
{
jQuery('#jform_datalenght_other').closest('.control-group').hide();
// remove required attribute from datalenght_other field
if (!jform_vvvvwbfvxe_required)
{
updateFieldRequired('datalenght_other',1);
jQuery('#jform_datalenght_other').removeAttr('required');
jQuery('#jform_datalenght_other').removeAttr('aria-required');
jQuery('#jform_datalenght_other').removeClass('required');
jform_vvvvwbfvxe_required = true;
}
}
}
// the vvvvwbf Some function
function datalenght_vvvvwbf_SomeFunc(datalenght_vvvvwbf)
{
// set the function logic
if (datalenght_vvvvwbf == 'Other')
{
return true;
}
return false;
}
// the vvvvwbg function
function vvvvwbg(datadefault_vvvvwbg)
{
if (isSet(datadefault_vvvvwbg) && datadefault_vvvvwbg.constructor
!== Array)
{
var temp_vvvvwbg = datadefault_vvvvwbg;
var datadefault_vvvvwbg = [];
datadefault_vvvvwbg.push(temp_vvvvwbg);
}
else if (!isSet(datadefault_vvvvwbg))
{
var datadefault_vvvvwbg = [];
}
var datadefault = datadefault_vvvvwbg.some(datadefault_vvvvwbg_SomeFunc);
// set this function logic
if (datadefault)
{
jQuery('#jform_datadefault_other').closest('.control-group').show();
// add required attribute to datadefault_other field
if (jform_vvvvwbgvxf_required)
{
updateFieldRequired('datadefault_other',0);
jQuery('#jform_datadefault_other').prop('required','required');
jQuery('#jform_datadefault_other').attr('aria-required',true);
jQuery('#jform_datadefault_other').addClass('required');
jform_vvvvwbgvxf_required = false;
}
}
else
{
jQuery('#jform_datadefault_other').closest('.control-group').hide();
// remove required attribute from datadefault_other field
if (!jform_vvvvwbgvxf_required)
{
updateFieldRequired('datadefault_other',1);
jQuery('#jform_datadefault_other').removeAttr('required');
jQuery('#jform_datadefault_other').removeAttr('aria-required');
jQuery('#jform_datadefault_other').removeClass('required');
jform_vvvvwbgvxf_required = true;
}
}
}
// the vvvvwbg Some function
function datadefault_vvvvwbg_SomeFunc(datadefault_vvvvwbg)
{
// set the function logic
if (datadefault_vvvvwbg == 'Other')
{
return true;
}
return false;
}
// the vvvvwbh function
function vvvvwbh(datatype_vvvvwbh)
{
if (isSet(datatype_vvvvwbh) && datatype_vvvvwbh.constructor !==
Array)
{
var temp_vvvvwbh = datatype_vvvvwbh;
var datatype_vvvvwbh = [];
datatype_vvvvwbh.push(temp_vvvvwbh);
}
else if (!isSet(datatype_vvvvwbh))
{
var datatype_vvvvwbh = [];
}
var datatype = datatype_vvvvwbh.some(datatype_vvvvwbh_SomeFunc);
// set this function logic
if (datatype)
{
jQuery('#jform_datadefault').closest('.control-group').show();
jQuery('#jform_indexes').closest('.control-group').show();
// add required attribute to indexes field
if (jform_vvvvwbhvxg_required)
{
updateFieldRequired('indexes',0);
jQuery('#jform_indexes').prop('required','required');
jQuery('#jform_indexes').attr('aria-required',true);
jQuery('#jform_indexes').addClass('required');
jform_vvvvwbhvxg_required = false;
}
}
else
{
jQuery('#jform_datadefault').closest('.control-group').hide();
jQuery('#jform_indexes').closest('.control-group').hide();
// remove required attribute from indexes field
if (!jform_vvvvwbhvxg_required)
{
updateFieldRequired('indexes',1);
jQuery('#jform_indexes').removeAttr('required');
jQuery('#jform_indexes').removeAttr('aria-required');
jQuery('#jform_indexes').removeClass('required');
jform_vvvvwbhvxg_required = true;
}
}
}
// the vvvvwbh Some function
function datatype_vvvvwbh_SomeFunc(datatype_vvvvwbh)
{
// set the function logic
if (datatype_vvvvwbh == 'CHAR' || datatype_vvvvwbh ==
'VARCHAR' || datatype_vvvvwbh == 'DATETIME' ||
datatype_vvvvwbh == 'DATE' || datatype_vvvvwbh ==
'TIME' || datatype_vvvvwbh == 'INT' || datatype_vvvvwbh
== 'TINYINT' || datatype_vvvvwbh == 'BIGINT' ||
datatype_vvvvwbh == 'FLOAT' || datatype_vvvvwbh ==
'DECIMAL' || datatype_vvvvwbh == 'DOUBLE')
{
return true;
}
return false;
}
// the vvvvwbi function
function vvvvwbi(datatype_vvvvwbi)
{
if (isSet(datatype_vvvvwbi) && datatype_vvvvwbi.constructor !==
Array)
{
var temp_vvvvwbi = datatype_vvvvwbi;
var datatype_vvvvwbi = [];
datatype_vvvvwbi.push(temp_vvvvwbi);
}
else if (!isSet(datatype_vvvvwbi))
{
var datatype_vvvvwbi = [];
}
var datatype = datatype_vvvvwbi.some(datatype_vvvvwbi_SomeFunc);
// set this function logic
if (datatype)
{
jQuery('#jform_datalenght').closest('.control-group').show();
// add required attribute to datalenght field
if (jform_vvvvwbivxh_required)
{
updateFieldRequired('datalenght',0);
jQuery('#jform_datalenght').prop('required','required');
jQuery('#jform_datalenght').attr('aria-required',true);
jQuery('#jform_datalenght').addClass('required');
jform_vvvvwbivxh_required = false;
}
}
else
{
jQuery('#jform_datalenght').closest('.control-group').hide();
// remove required attribute from datalenght field
if (!jform_vvvvwbivxh_required)
{
updateFieldRequired('datalenght',1);
jQuery('#jform_datalenght').removeAttr('required');
jQuery('#jform_datalenght').removeAttr('aria-required');
jQuery('#jform_datalenght').removeClass('required');
jform_vvvvwbivxh_required = true;
}
}
}
// the vvvvwbi Some function
function datatype_vvvvwbi_SomeFunc(datatype_vvvvwbi)
{
// set the function logic
if (datatype_vvvvwbi == 'CHAR' || datatype_vvvvwbi ==
'VARCHAR' || datatype_vvvvwbi == 'INT' ||
datatype_vvvvwbi == 'TINYINT' || datatype_vvvvwbi ==
'BIGINT' || datatype_vvvvwbi == 'FLOAT' ||
datatype_vvvvwbi == 'DECIMAL' || datatype_vvvvwbi ==
'DOUBLE')
{
return true;
}
return false;
}
// the vvvvwbl function
function vvvvwbl(store_vvvvwbl)
{
if (isSet(store_vvvvwbl) && store_vvvvwbl.constructor !== Array)
{
var temp_vvvvwbl = store_vvvvwbl;
var store_vvvvwbl = [];
store_vvvvwbl.push(temp_vvvvwbl);
}
else if (!isSet(store_vvvvwbl))
{
var store_vvvvwbl = [];
}
var store = store_vvvvwbl.some(store_vvvvwbl_SomeFunc);
// set this function logic
if (store)
{
jQuery('#jform_initiator_on_get_model').closest('.control-group').show();
jQuery('#jform_initiator_on_save_model').closest('.control-group').show();
jQuery('.note_expert_field_save_mode').closest('.control-group').show();
jQuery('#jform_on_get_model_field').closest('.control-group').show();
// add required attribute to on_get_model_field field
if (jform_vvvvwblvxi_required)
{
updateFieldRequired('on_get_model_field',0);
jQuery('#jform_on_get_model_field').prop('required','required');
jQuery('#jform_on_get_model_field').attr('aria-required',true);
jQuery('#jform_on_get_model_field').addClass('required');
jform_vvvvwblvxi_required = false;
}
jQuery('#jform_on_save_model_field').closest('.control-group').show();
// add required attribute to on_save_model_field field
if (jform_vvvvwblvxj_required)
{
updateFieldRequired('on_save_model_field',0);
jQuery('#jform_on_save_model_field').prop('required','required');
jQuery('#jform_on_save_model_field').attr('aria-required',true);
jQuery('#jform_on_save_model_field').addClass('required');
jform_vvvvwblvxj_required = false;
}
}
else
{
jQuery('#jform_initiator_on_get_model').closest('.control-group').hide();
jQuery('#jform_initiator_on_save_model').closest('.control-group').hide();
jQuery('.note_expert_field_save_mode').closest('.control-group').hide();
jQuery('#jform_on_get_model_field').closest('.control-group').hide();
// remove required attribute from on_get_model_field field
if (!jform_vvvvwblvxi_required)
{
updateFieldRequired('on_get_model_field',1);
jQuery('#jform_on_get_model_field').removeAttr('required');
jQuery('#jform_on_get_model_field').removeAttr('aria-required');
jQuery('#jform_on_get_model_field').removeClass('required');
jform_vvvvwblvxi_required = true;
}
jQuery('#jform_on_save_model_field').closest('.control-group').hide();
// remove required attribute from on_save_model_field field
if (!jform_vvvvwblvxj_required)
{
updateFieldRequired('on_save_model_field',1);
jQuery('#jform_on_save_model_field').removeAttr('required');
jQuery('#jform_on_save_model_field').removeAttr('aria-required');
jQuery('#jform_on_save_model_field').removeClass('required');
jform_vvvvwblvxj_required = true;
}
}
}
// the vvvvwbl Some function
function store_vvvvwbl_SomeFunc(store_vvvvwbl)
{
// set the function logic
if (store_vvvvwbl == 6)
{
return true;
}
return false;
}
// the vvvvwbm function
function vvvvwbm(add_css_view_vvvvwbm)
{
// set the function logic
if (add_css_view_vvvvwbm == 1)
{
jQuery('#jform_css_view-lbl').closest('.control-group').show();
}
else
{
jQuery('#jform_css_view-lbl').closest('.control-group').hide();
}
}
// the vvvvwbn function
function vvvvwbn(add_css_views_vvvvwbn)
{
// set the function logic
if (add_css_views_vvvvwbn == 1)
{
jQuery('#jform_css_views-lbl').closest('.control-group').show();
}
else
{
jQuery('#jform_css_views-lbl').closest('.control-group').hide();
}
}
// the vvvvwbo function
function vvvvwbo(add_javascript_view_footer_vvvvwbo)
{
// set the function logic
if (add_javascript_view_footer_vvvvwbo == 1)
{
jQuery('#jform_javascript_view_footer-lbl').closest('.control-group').show();
}
else
{
jQuery('#jform_javascript_view_footer-lbl').closest('.control-group').hide();
}
}
// the vvvvwbp function
function vvvvwbp(add_javascript_views_footer_vvvvwbp)
{
// set the function logic
if (add_javascript_views_footer_vvvvwbp == 1)
{
jQuery('#jform_javascript_views_footer-lbl').closest('.control-group').show();
}
else
{
jQuery('#jform_javascript_views_footer-lbl').closest('.control-group').hide();
}
}
// update fields required
function updateFieldRequired(name, status) {
// check if not_required exist
if (document.getElementById('jform_not_required')) {
var not_required =
jQuery('#jform_not_required').val().split(",");
if(status == 1)
{
not_required.push(name);
}
else
{
not_required = removeFieldFromNotRequired(not_required, name);
}
jQuery('#jform_not_required').val(fixNotRequiredArray(not_required).toString());
}
}
// remove field from not_required
function removeFieldFromNotRequired(array, what) {
return array.filter(function(element){
return element !== what;
});
}
// fix not required array
function fixNotRequiredArray(array) {
var seen = {};
return removeEmptyFromNotRequiredArray(array).filter(function(item) {
return seen.hasOwnProperty(item) ? false : (seen[item] = true);
});
}
// remove empty from not_required array
function removeEmptyFromNotRequiredArray(array) {
return array.filter(function (el) {
// remove ( 一_一) as well - lol
return (el.length > 0 && '一_一' !== el);
});
}
// the isSet function
function isSet(val)
{
if ((val != undefined) && (val != null) && 0 !==
val.length){
return true;
}
return false;
}
jQuery(document).ready(function()
{
// get type value
var fieldtype = jQuery("#jform_fieldtype
option:selected").val();
getFieldTypeProperties(fieldtype, false);
// get the linked details
getLinked();
// get the validation rules
getValidationRulesTable();
// set button to create more fields
addButton('validation_rule',
'validation_rules_header', 2);
// get the field type text
var fieldText = jQuery("#jform_fieldtype
option:selected").text().toLowerCase();
// now check if database input is needed
dbChecker(fieldText);
// check and load all the custom code edit buttons
getEditCustomCodeButtons();
});
// the options row id key
var rowIdKey = 'properties';
function getFieldTypeProperties(fieldtype, db){
getCodeFrom_server(fieldtype, 'type', 'type',
'fieldTypeProperties').then(function(result) {
if(result.subform){
// load the list of properties
propertiesArray = result.nameListOptions;
// remove previous forms of exist
jQuery('.prop_removal').remove();
// hide notice
jQuery('.note_select_field_type').closest('.control-group').remove();
// append to note_filter_information class
jQuery('.note_filter_information').closest('.control-group').prepend(result.extra);
// append to note_filter_information class
if(result.textarea){
jQuery.each( result.textarea, function( i, tField ) {
// append to note_filter_information class
jQuery('.note_filter_information').closest('.control-group').prepend(tField);
});
}
// append to note_filter_information class
jQuery('.note_filter_information').closest('.control-group').prepend(result.subform);
// add the watcher
rowWatcher();
// initialize the new form
jQuery('div.subform-repeatable').subformRepeatable();
// update all the list fields to only show items not selected already
propertyDynamicSet();
// set the field type info
jQuery('#help').remove();
jQuery('.helpNote').append('<div
id="help">'+result.description+'<br
/>'+result.values_description+'</div>');
// load the database properties if not set and defaults were found
if (db && result.database){
// update datatype
jQuery('#jform_datatype').val(result.database.datatype);
jQuery('#jform_datatype').trigger("liszt:updated");
jQuery('#jform_datatype').trigger("change");
// be sure to remove from no required
updateFieldRequired('datatype', 0);
// update datalenght
jQuery('#jform_datalenght').val(result.database.datalenght);
jQuery('#jform_datalenght').trigger("liszt:updated");
jQuery('#jform_datalenght').trigger("change");
// be sure to remove from no required
updateFieldRequired('datalenght', 0);
// load the datalenght_other if needed
if ('Other' === result.database.datalenght){
jQuery('#jform_datalenght_other').val(result.database.datalenght_other);
// be sure to remove from no required
updateFieldRequired('datalenght_other', 0);
}
// update datadefault
jQuery('#jform_datadefault').val(result.database.datadefault);
jQuery('#jform_datadefault').trigger("liszt:updated");
jQuery('#jform_datadefault').trigger("change");
// load the datadefault_other if needed
if ('Other' === result.database.datadefault){
jQuery('#jform_datadefault_other').val(result.database.datadefault_other);
// be sure to remove from no required
updateFieldRequired('datadefault_other', 0);
}
// update indexes
jQuery('#jform_indexes').val(result.database.indexes);
jQuery('#jform_indexes').trigger("liszt:updated");
jQuery('#jform_indexes').trigger("change");
// be sure to remove from no required
updateFieldRequired('indexes', 0);
// update store
jQuery('#jform_store').val(result.database.store);
jQuery('#jform_store').trigger("liszt:updated");
jQuery('#jform_store').trigger("change");
// be sure to remove from no required
updateFieldRequired('store', 0);
}
}
})
}
function getFieldPropertyDesc(field, targetForm){
// get the ID
var id = jQuery(field).attr('id');
// build the target array
var target = id.split('__');
// get property value
var property = jQuery(field).val();
// first check that there isn't any of this property type already
set
if (propertyIsSet(property, id, targetForm)) {
// reset the selection
jQuery('#'+id).val('');
jQuery('#'+id).trigger("liszt:updated");
// give out a notice
jQuery.UIkit.notify({message:
Joomla.JText._('COM_COMPONENTBUILDER_PROPERTY_ALREADY_SELECTED_TRY_ANOTHER'),
timeout: 5000, status: 'warning', pos: 'top-center'});
// update the values
jQuery('#'+target[0]+'__desc').val('');
jQuery('#'+target[0]+'__value').val('');
} else {
// do a dynamic update
propertyDynamicSet();
// get type value
if (targetForm === 'properties') {
var fieldtype = jQuery("#jform_fieldtype
option:selected").val();
} else {
var fieldtype = 'extra';
}
getFieldPropertyDesc_server(fieldtype, property).done(function(result) {
if(result.desc || result.value){
// update the values
jQuery('#'+target[0]+'__desc').val(result.desc);
jQuery('#'+target[0]+'__value').val(result.value);
} else {
// update the values
jQuery('#'+target[0]+'__desc').val(Joomla.JText._('COM_COMPONENTBUILDER_NO_DESCRIPTION_FOUND'));
jQuery('#'+target[0]+'__value').val('');
}
});
}
}
// set properties the options
propertiesArray = {};
var propertyIdRemoved;
function propertyDynamicSet() {
propertiesAvailable = {};
propertiesSelectedArray = {};
propertiesTrackerArray = {};
var i;
for (i = 0; i < 70; i++) { // for now this is the number of field we
should check
// build ID
var id_check = rowIdKey+'_'+rowIdKey+i+'__name';
// first check if Id is on page as that not the same as the one currently
calling
if (jQuery("#"+id_check).length && propertyIdRemoved
!== id_check) {
// build the selected array
var key = jQuery("#"+id_check+"
option:selected").val();
var text = jQuery("#"+id_check+"
option:selected").text();
propertiesSelectedArray[key] = text;
// keep track of the value set
propertiesTrackerArray[id_check] = key;
// clear the options out
jQuery("#"+id_check).find('option').remove().end();
}
}
// trigger chosen on the list fields
jQuery('.field_list_name_options').chosen({"disable_search_threshold":10,"search_contains":true,"allow_single_deselect":true,"placeholder_text_multiple":Joomla.JText._("COM_COMPONENTBUILDER_TYPE_OR_SELECT_SOME_OPTIONS"),"placeholder_text_single":Joomla.JText._("COM_COMPONENTBUILDER_SELECT_A_PROPERTY"),"no_results_text":Joomla.JText._("COM_COMPONENTBUILDER_NO_RESULTS_MATCH")});
// now build the list to keep
jQuery.each( propertiesArray, function( prop, name ) {
if (!propertiesSelectedArray.hasOwnProperty(prop)) {
propertiesAvailable[prop] = name;
}
});
// now add the lists back
jQuery.each( propertiesTrackerArray, function( tId, tKey ) {
if (jQuery('#'+tId).length) {
jQuery('#'+tId).append('<option
value="'+tKey+'">'+propertiesSelectedArray[tKey]+'</option>');
jQuery.each( propertiesAvailable, function( aKey, aValue ) {
jQuery('#'+tId).append('<option
value="'+aKey+'">'+aValue+'</option>');
});
jQuery('#'+tId).val(tKey);
jQuery('#'+tId).trigger('liszt:updated');
}
});
}
function rowWatcher() {
jQuery(document).on('subform-row-remove', function(event, row){
propertyIdRemoved =
jQuery(row.innerHTML).find('.field_list_name_options').attr('id');
propertyDynamicSet();
});
jQuery(document).on('subform-row-add', function(event, row){
propertyDynamicSet();
});
}
function propertyIsSet(prop, id, targetForm) {
var i;
for (i = 0; i < 70; i++) { // for now this is the number of field we
should check
// build ID
var id_check = targetForm+'_'+targetForm+i+'__name';
// first check if Id is on page as that not the same as the one currently
calling
if (jQuery("#"+id_check).length && id_check != id) {
// get the property value
var tmp = jQuery("#"+id_check+"
option:selected").val();
// now validate
if (tmp === prop) {
return true;
}
}
}
return false;
}
function getFieldPropertyDesc_server(fieldtype, property){
var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getFieldPropertyDesc&format=json&raw=true&vdm="+vastDevMod);
if(token.length > 0 && (fieldtype > 0 || fieldtype.length
> 0) && property.length > 0){
var request =
token+'=1&fieldtype='+fieldtype+'&property='+property;
}
return jQuery.ajax({
type: 'GET',
url: getUrl,
dataType: 'json',
data: request,
jsonp: false
});
}
function getValidationRulesTable(){
getCodeFrom_server(1,'type','type',
'getValidationRulesTable').then(function(result) {
if(result){
jQuery('#display_validation_rules').html(result);
}
});
}
function dbChecker(type){
if ('note' === type || 'spacer' === type) {
// update the datatype selection
jQuery('#jform_datatype').val('').trigger('liszt:updated').change();
jQuery('#jform_datalenght').val('').trigger('liszt:updated').change();
jQuery('#jform_datadefault').val('').trigger('liszt:updated').change();
jQuery('#jform_datadefault').val('').trigger('liszt:updated').change();
jQuery('#jform_indexes').val(0).trigger('liszt:updated').change();
jQuery('#jform_store').val(0).trigger('liszt:updated').change();
// remove the datatype
jQuery('#jform_datatype-lbl').closest('.control-group').hide();
jQuery('#jform_datatype').closest('.control-group').hide();
updateFieldRequired('datatype',1);
jQuery('#jform_datatype').removeAttr('required');
jQuery('#jform_datatype').removeAttr('aria-required');
jQuery('#jform_datatype').removeClass('required');
// remove the null selection
jQuery('#jform_null_switch-lbl').closest('.control-group').hide();
jQuery('#jform_null_switch').closest('.control-group').hide();
updateFieldRequired('null_switch',1);
jQuery('#jform_null_switch').removeAttr('required');
jQuery('#jform_null_switch').removeAttr('aria-required');
jQuery('#jform_null_switch').removeClass('required');
// remove the store (modeling method)
jQuery('#jform_store-lbl').closest('.control-group').hide();
jQuery('#jform_store').closest('.control-group').hide();
updateFieldRequired('store',1);
jQuery('#jform_store').removeAttr('required');
jQuery('#jform_store').removeAttr('aria-required');
jQuery('#jform_store').removeClass('required');
// show notice
jQuery('.note_no_database_settings_needed').closest('.control-group').show();
jQuery('.note_database_settings_needed').closest('.control-group').hide();
} else {
// add the datatype
jQuery('#jform_datatype-lbl').closest('.control-group').show();
jQuery('#jform_datatype').closest('.control-group').show();
updateFieldRequired('datatype',0);
jQuery('#jform_datatype').prop('required','required');
jQuery('#jform_datatype').attr('aria-required',true);
jQuery('#jform_datatype').addClass('required');
// add the null selection
jQuery('#jform_null_switch-lbl').closest('.control-group').show();
jQuery('#jform_null_switch').closest('.control-group').show();
updateFieldRequired('null_switch',0);
jQuery('#jform_null_switch').prop('required','required');
jQuery('#jform_null_switch').attr('aria-required',true);
jQuery('#jform_null_switch').addClass('required');
// remove the store (modeling method)
jQuery('#jform_store-lbl').closest('.control-group').show();
jQuery('#jform_store').closest('.control-group').show();
updateFieldRequired('store',0);
jQuery('#jform_store').prop('required','required');
jQuery('#jform_store').attr('aria-required',true);
jQuery('#jform_store').addClass('required');
// remove notice
jQuery('.note_no_database_settings_needed').closest('.control-group').hide();
jQuery('.note_database_settings_needed').closest('.control-group').show();
}
}
function getCodeFrom_server(id, type, type_name, callingName) {
var url = "index.php?option=com_componentbuilder&task=ajax."
+ callingName +
"&format=json&raw=true&vdm="+vastDevMod;
if (token.length > 0 && id > 0 && type.length >
0) {
url += '&' + token + '=1&' + type_name +
'=' + type + '&id=' + id;
}
var getUrl = JRouter(url);
return fetch(getUrl, {
method: 'GET',
headers: {
'Content-Type': 'application/json'
}
}).then(function(response) {
if (response.ok) {
return response.json();
} else {
throw new Error('Network response was not ok');
}
}).then(function(data) {
return data;
}).catch(function(error) {
console.error('There was a problem with the fetch operation:',
error);
});
}
function getLinked() {
getCodeFrom_server(1, 'type', 'type',
'getLinked').then(function(result) {
if (result.error) {
console.error(result.error);
} else if (result) {
document.getElementById('display_linked_to').innerHTML =
result;
}
});
}
function addButton_server(type, size){
var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getButton&format=json&raw=true&vdm="+vastDevMod);
if(token.length > 0 && type.length > 0){
var request =
token+'=1&type='+type+'&size='+size;
}
return jQuery.ajax({
type: 'GET',
url: getUrl,
dataType: 'json',
data: request,
jsonp: false
});
}
function addButton(type, where, size){
// just to insure that default behaviour still works
size = typeof size !== 'undefined' ? size : 1;
addButton_server(type, size).done(function(result) {
if(result){
if (2 == size) {
jQuery('#'+where).html(result);
} else {
addData(result, '#jform_'+where);
}
}
})
}
function getEditCustomCodeButtons_server(id) {
var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod);
let requestParams = '';
if (token.length > 0 && id > 0) {
requestParams =
token+'=1&id='+id+'&return_here='+return_here;
}
// Construct URL with parameters for GET request
const urlWithParams = getUrl + '&' + requestParams;
// Using the Fetch API for the GET request
return fetch(urlWithParams, {
method: 'GET',
headers: {
'Content-Type': 'application/json'
}
}).then(response => {
if (!response.ok) {
throw new Error('Network response was not ok');
}
return response.json();
});
}
function getEditCustomCodeButtons() {
// Get the id using pure JavaScript
const id = document.querySelector("#jform_id").value;
getEditCustomCodeButtons_server(id).then(function(result) {
if (typeof result === 'object') {
Object.entries(result).forEach(([field, buttons]) => {
// Creating the div element for buttons
const div = document.createElement('div');
div.className = 'control-group';
div.innerHTML = '<div
class="control-label"><label>Add/Edit
Customcode</label></div><div class="controls
control-customcode-buttons-'+field+'"></div>';
// Insert the div before .control-wrapper-{field}
const insertBeforeElement =
document.querySelector(".control-wrapper-"+field);
insertBeforeElement.parentNode.insertBefore(div, insertBeforeElement);
// Adding buttons to the div
Object.entries(buttons).forEach(([name, button]) => {
const controlsDiv =
document.querySelector(".control-customcode-buttons-"+field);
controlsDiv.innerHTML += button;
});
});
}
}).catch(error => {
console.error('Error:', error);
});
}
fieldtype.js000064400000066262151167367500007116 0ustar00/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder
<https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights
reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
// Some Global Values
jform_vvvvwbqvxk_required = false;
jform_vvvvwbsvxl_required = false;
jform_vvvvwbuvxm_required = false;
jform_vvvvwbwvxn_required = false;
jform_vvvvwbxvxo_required = false;
jform_vvvvwbyvxp_required = false;
jform_vvvvwcdvxq_required = false;
jform_vvvvwcdvxr_required = false;
// Initial Script
document.addEventListener('DOMContentLoaded', function()
{
var datalenght_vvvvwbq = jQuery("#jform_datalenght").val();
var has_defaults_vvvvwbq = jQuery("#jform_has_defaults
input[type='radio']:checked").val();
vvvvwbq(datalenght_vvvvwbq,has_defaults_vvvvwbq);
var datadefault_vvvvwbs = jQuery("#jform_datadefault").val();
var has_defaults_vvvvwbs = jQuery("#jform_has_defaults
input[type='radio']:checked").val();
vvvvwbs(datadefault_vvvvwbs,has_defaults_vvvvwbs);
var datatype_vvvvwbu = jQuery("#jform_datatype").val();
var has_defaults_vvvvwbu = jQuery("#jform_has_defaults
input[type='radio']:checked").val();
vvvvwbu(datatype_vvvvwbu,has_defaults_vvvvwbu);
var datatype_vvvvwbw = jQuery("#jform_datatype").val();
var has_defaults_vvvvwbw = jQuery("#jform_has_defaults
input[type='radio']:checked").val();
vvvvwbw(datatype_vvvvwbw,has_defaults_vvvvwbw);
var has_defaults_vvvvwbx = jQuery("#jform_has_defaults
input[type='radio']:checked").val();
var datatype_vvvvwbx = jQuery("#jform_datatype").val();
vvvvwbx(has_defaults_vvvvwbx,datatype_vvvvwbx);
var datatype_vvvvwby = jQuery("#jform_datatype").val();
var has_defaults_vvvvwby = jQuery("#jform_has_defaults
input[type='radio']:checked").val();
vvvvwby(datatype_vvvvwby,has_defaults_vvvvwby);
var store_vvvvwca = jQuery("#jform_store").val();
var datatype_vvvvwca = jQuery("#jform_datatype").val();
var has_defaults_vvvvwca = jQuery("#jform_has_defaults
input[type='radio']:checked").val();
vvvvwca(store_vvvvwca,datatype_vvvvwca,has_defaults_vvvvwca);
var datatype_vvvvwcb = jQuery("#jform_datatype").val();
var store_vvvvwcb = jQuery("#jform_store").val();
var has_defaults_vvvvwcb = jQuery("#jform_has_defaults
input[type='radio']:checked").val();
vvvvwcb(datatype_vvvvwcb,store_vvvvwcb,has_defaults_vvvvwcb);
var has_defaults_vvvvwcc = jQuery("#jform_has_defaults
input[type='radio']:checked").val();
var store_vvvvwcc = jQuery("#jform_store").val();
var datatype_vvvvwcc = jQuery("#jform_datatype").val();
vvvvwcc(has_defaults_vvvvwcc,store_vvvvwcc,datatype_vvvvwcc);
var has_defaults_vvvvwcd = jQuery("#jform_has_defaults
input[type='radio']:checked").val();
vvvvwcd(has_defaults_vvvvwcd);
});
// the vvvvwbq function
function vvvvwbq(datalenght_vvvvwbq,has_defaults_vvvvwbq)
{
if (isSet(datalenght_vvvvwbq) && datalenght_vvvvwbq.constructor
!== Array)
{
var temp_vvvvwbq = datalenght_vvvvwbq;
var datalenght_vvvvwbq = [];
datalenght_vvvvwbq.push(temp_vvvvwbq);
}
else if (!isSet(datalenght_vvvvwbq))
{
var datalenght_vvvvwbq = [];
}
var datalenght = datalenght_vvvvwbq.some(datalenght_vvvvwbq_SomeFunc);
if (isSet(has_defaults_vvvvwbq) &&
has_defaults_vvvvwbq.constructor !== Array)
{
var temp_vvvvwbq = has_defaults_vvvvwbq;
var has_defaults_vvvvwbq = [];
has_defaults_vvvvwbq.push(temp_vvvvwbq);
}
else if (!isSet(has_defaults_vvvvwbq))
{
var has_defaults_vvvvwbq = [];
}
var has_defaults =
has_defaults_vvvvwbq.some(has_defaults_vvvvwbq_SomeFunc);
// set this function logic
if (datalenght && has_defaults)
{
jQuery('#jform_datalenght_other').closest('.control-group').show();
// add required attribute to datalenght_other field
if (jform_vvvvwbqvxk_required)
{
updateFieldRequired('datalenght_other',0);
jQuery('#jform_datalenght_other').prop('required','required');
jQuery('#jform_datalenght_other').attr('aria-required',true);
jQuery('#jform_datalenght_other').addClass('required');
jform_vvvvwbqvxk_required = false;
}
}
else
{
jQuery('#jform_datalenght_other').closest('.control-group').hide();
// remove required attribute from datalenght_other field
if (!jform_vvvvwbqvxk_required)
{
updateFieldRequired('datalenght_other',1);
jQuery('#jform_datalenght_other').removeAttr('required');
jQuery('#jform_datalenght_other').removeAttr('aria-required');
jQuery('#jform_datalenght_other').removeClass('required');
jform_vvvvwbqvxk_required = true;
}
}
}
// the vvvvwbq Some function
function datalenght_vvvvwbq_SomeFunc(datalenght_vvvvwbq)
{
// set the function logic
if (datalenght_vvvvwbq == 'Other')
{
return true;
}
return false;
}
// the vvvvwbq Some function
function has_defaults_vvvvwbq_SomeFunc(has_defaults_vvvvwbq)
{
// set the function logic
if (has_defaults_vvvvwbq == 1)
{
return true;
}
return false;
}
// the vvvvwbs function
function vvvvwbs(datadefault_vvvvwbs,has_defaults_vvvvwbs)
{
if (isSet(datadefault_vvvvwbs) && datadefault_vvvvwbs.constructor
!== Array)
{
var temp_vvvvwbs = datadefault_vvvvwbs;
var datadefault_vvvvwbs = [];
datadefault_vvvvwbs.push(temp_vvvvwbs);
}
else if (!isSet(datadefault_vvvvwbs))
{
var datadefault_vvvvwbs = [];
}
var datadefault = datadefault_vvvvwbs.some(datadefault_vvvvwbs_SomeFunc);
if (isSet(has_defaults_vvvvwbs) &&
has_defaults_vvvvwbs.constructor !== Array)
{
var temp_vvvvwbs = has_defaults_vvvvwbs;
var has_defaults_vvvvwbs = [];
has_defaults_vvvvwbs.push(temp_vvvvwbs);
}
else if (!isSet(has_defaults_vvvvwbs))
{
var has_defaults_vvvvwbs = [];
}
var has_defaults =
has_defaults_vvvvwbs.some(has_defaults_vvvvwbs_SomeFunc);
// set this function logic
if (datadefault && has_defaults)
{
jQuery('#jform_datadefault_other').closest('.control-group').show();
// add required attribute to datadefault_other field
if (jform_vvvvwbsvxl_required)
{
updateFieldRequired('datadefault_other',0);
jQuery('#jform_datadefault_other').prop('required','required');
jQuery('#jform_datadefault_other').attr('aria-required',true);
jQuery('#jform_datadefault_other').addClass('required');
jform_vvvvwbsvxl_required = false;
}
}
else
{
jQuery('#jform_datadefault_other').closest('.control-group').hide();
// remove required attribute from datadefault_other field
if (!jform_vvvvwbsvxl_required)
{
updateFieldRequired('datadefault_other',1);
jQuery('#jform_datadefault_other').removeAttr('required');
jQuery('#jform_datadefault_other').removeAttr('aria-required');
jQuery('#jform_datadefault_other').removeClass('required');
jform_vvvvwbsvxl_required = true;
}
}
}
// the vvvvwbs Some function
function datadefault_vvvvwbs_SomeFunc(datadefault_vvvvwbs)
{
// set the function logic
if (datadefault_vvvvwbs == 'Other')
{
return true;
}
return false;
}
// the vvvvwbs Some function
function has_defaults_vvvvwbs_SomeFunc(has_defaults_vvvvwbs)
{
// set the function logic
if (has_defaults_vvvvwbs == 1)
{
return true;
}
return false;
}
// the vvvvwbu function
function vvvvwbu(datatype_vvvvwbu,has_defaults_vvvvwbu)
{
if (isSet(datatype_vvvvwbu) && datatype_vvvvwbu.constructor !==
Array)
{
var temp_vvvvwbu = datatype_vvvvwbu;
var datatype_vvvvwbu = [];
datatype_vvvvwbu.push(temp_vvvvwbu);
}
else if (!isSet(datatype_vvvvwbu))
{
var datatype_vvvvwbu = [];
}
var datatype = datatype_vvvvwbu.some(datatype_vvvvwbu_SomeFunc);
if (isSet(has_defaults_vvvvwbu) &&
has_defaults_vvvvwbu.constructor !== Array)
{
var temp_vvvvwbu = has_defaults_vvvvwbu;
var has_defaults_vvvvwbu = [];
has_defaults_vvvvwbu.push(temp_vvvvwbu);
}
else if (!isSet(has_defaults_vvvvwbu))
{
var has_defaults_vvvvwbu = [];
}
var has_defaults =
has_defaults_vvvvwbu.some(has_defaults_vvvvwbu_SomeFunc);
// set this function logic
if (datatype && has_defaults)
{
jQuery('#jform_datalenght').closest('.control-group').show();
// add required attribute to datalenght field
if (jform_vvvvwbuvxm_required)
{
updateFieldRequired('datalenght',0);
jQuery('#jform_datalenght').prop('required','required');
jQuery('#jform_datalenght').attr('aria-required',true);
jQuery('#jform_datalenght').addClass('required');
jform_vvvvwbuvxm_required = false;
}
}
else
{
jQuery('#jform_datalenght').closest('.control-group').hide();
// remove required attribute from datalenght field
if (!jform_vvvvwbuvxm_required)
{
updateFieldRequired('datalenght',1);
jQuery('#jform_datalenght').removeAttr('required');
jQuery('#jform_datalenght').removeAttr('aria-required');
jQuery('#jform_datalenght').removeClass('required');
jform_vvvvwbuvxm_required = true;
}
}
}
// the vvvvwbu Some function
function datatype_vvvvwbu_SomeFunc(datatype_vvvvwbu)
{
// set the function logic
if (datatype_vvvvwbu == 'CHAR' || datatype_vvvvwbu ==
'VARCHAR' || datatype_vvvvwbu == 'INT' ||
datatype_vvvvwbu == 'TINYINT' || datatype_vvvvwbu ==
'BIGINT' || datatype_vvvvwbu == 'FLOAT' ||
datatype_vvvvwbu == 'DECIMAL' || datatype_vvvvwbu ==
'DOUBLE')
{
return true;
}
return false;
}
// the vvvvwbu Some function
function has_defaults_vvvvwbu_SomeFunc(has_defaults_vvvvwbu)
{
// set the function logic
if (has_defaults_vvvvwbu == 1)
{
return true;
}
return false;
}
// the vvvvwbw function
function vvvvwbw(datatype_vvvvwbw,has_defaults_vvvvwbw)
{
if (isSet(datatype_vvvvwbw) && datatype_vvvvwbw.constructor !==
Array)
{
var temp_vvvvwbw = datatype_vvvvwbw;
var datatype_vvvvwbw = [];
datatype_vvvvwbw.push(temp_vvvvwbw);
}
else if (!isSet(datatype_vvvvwbw))
{
var datatype_vvvvwbw = [];
}
var datatype = datatype_vvvvwbw.some(datatype_vvvvwbw_SomeFunc);
if (isSet(has_defaults_vvvvwbw) &&
has_defaults_vvvvwbw.constructor !== Array)
{
var temp_vvvvwbw = has_defaults_vvvvwbw;
var has_defaults_vvvvwbw = [];
has_defaults_vvvvwbw.push(temp_vvvvwbw);
}
else if (!isSet(has_defaults_vvvvwbw))
{
var has_defaults_vvvvwbw = [];
}
var has_defaults =
has_defaults_vvvvwbw.some(has_defaults_vvvvwbw_SomeFunc);
// set this function logic
if (datatype && has_defaults)
{
jQuery('#jform_datadefault').closest('.control-group').show();
jQuery('#jform_indexes').closest('.control-group').show();
// add required attribute to indexes field
if (jform_vvvvwbwvxn_required)
{
updateFieldRequired('indexes',0);
jQuery('#jform_indexes').prop('required','required');
jQuery('#jform_indexes').attr('aria-required',true);
jQuery('#jform_indexes').addClass('required');
jform_vvvvwbwvxn_required = false;
}
}
else
{
jQuery('#jform_datadefault').closest('.control-group').hide();
jQuery('#jform_indexes').closest('.control-group').hide();
// remove required attribute from indexes field
if (!jform_vvvvwbwvxn_required)
{
updateFieldRequired('indexes',1);
jQuery('#jform_indexes').removeAttr('required');
jQuery('#jform_indexes').removeAttr('aria-required');
jQuery('#jform_indexes').removeClass('required');
jform_vvvvwbwvxn_required = true;
}
}
}
// the vvvvwbw Some function
function datatype_vvvvwbw_SomeFunc(datatype_vvvvwbw)
{
// set the function logic
if (datatype_vvvvwbw == 'CHAR' || datatype_vvvvwbw ==
'VARCHAR' || datatype_vvvvwbw == 'DATETIME' ||
datatype_vvvvwbw == 'DATE' || datatype_vvvvwbw ==
'TIME' || datatype_vvvvwbw == 'INT' || datatype_vvvvwbw
== 'TINYINT' || datatype_vvvvwbw == 'BIGINT' ||
datatype_vvvvwbw == 'FLOAT' || datatype_vvvvwbw ==
'DECIMAL' || datatype_vvvvwbw == 'DOUBLE')
{
return true;
}
return false;
}
// the vvvvwbw Some function
function has_defaults_vvvvwbw_SomeFunc(has_defaults_vvvvwbw)
{
// set the function logic
if (has_defaults_vvvvwbw == 1)
{
return true;
}
return false;
}
// the vvvvwbx function
function vvvvwbx(has_defaults_vvvvwbx,datatype_vvvvwbx)
{
if (isSet(has_defaults_vvvvwbx) &&
has_defaults_vvvvwbx.constructor !== Array)
{
var temp_vvvvwbx = has_defaults_vvvvwbx;
var has_defaults_vvvvwbx = [];
has_defaults_vvvvwbx.push(temp_vvvvwbx);
}
else if (!isSet(has_defaults_vvvvwbx))
{
var has_defaults_vvvvwbx = [];
}
var has_defaults =
has_defaults_vvvvwbx.some(has_defaults_vvvvwbx_SomeFunc);
if (isSet(datatype_vvvvwbx) && datatype_vvvvwbx.constructor !==
Array)
{
var temp_vvvvwbx = datatype_vvvvwbx;
var datatype_vvvvwbx = [];
datatype_vvvvwbx.push(temp_vvvvwbx);
}
else if (!isSet(datatype_vvvvwbx))
{
var datatype_vvvvwbx = [];
}
var datatype = datatype_vvvvwbx.some(datatype_vvvvwbx_SomeFunc);
// set this function logic
if (has_defaults && datatype)
{
jQuery('#jform_datadefault').closest('.control-group').show();
jQuery('#jform_indexes').closest('.control-group').show();
// add required attribute to indexes field
if (jform_vvvvwbxvxo_required)
{
updateFieldRequired('indexes',0);
jQuery('#jform_indexes').prop('required','required');
jQuery('#jform_indexes').attr('aria-required',true);
jQuery('#jform_indexes').addClass('required');
jform_vvvvwbxvxo_required = false;
}
}
else
{
jQuery('#jform_datadefault').closest('.control-group').hide();
jQuery('#jform_indexes').closest('.control-group').hide();
// remove required attribute from indexes field
if (!jform_vvvvwbxvxo_required)
{
updateFieldRequired('indexes',1);
jQuery('#jform_indexes').removeAttr('required');
jQuery('#jform_indexes').removeAttr('aria-required');
jQuery('#jform_indexes').removeClass('required');
jform_vvvvwbxvxo_required = true;
}
}
}
// the vvvvwbx Some function
function has_defaults_vvvvwbx_SomeFunc(has_defaults_vvvvwbx)
{
// set the function logic
if (has_defaults_vvvvwbx == 1)
{
return true;
}
return false;
}
// the vvvvwbx Some function
function datatype_vvvvwbx_SomeFunc(datatype_vvvvwbx)
{
// set the function logic
if (datatype_vvvvwbx == 'CHAR' || datatype_vvvvwbx ==
'VARCHAR' || datatype_vvvvwbx == 'DATETIME' ||
datatype_vvvvwbx == 'DATE' || datatype_vvvvwbx ==
'TIME' || datatype_vvvvwbx == 'INT' || datatype_vvvvwbx
== 'TINYINT' || datatype_vvvvwbx == 'BIGINT' ||
datatype_vvvvwbx == 'FLOAT' || datatype_vvvvwbx ==
'DECIMAL' || datatype_vvvvwbx == 'DOUBLE')
{
return true;
}
return false;
}
// the vvvvwby function
function vvvvwby(datatype_vvvvwby,has_defaults_vvvvwby)
{
if (isSet(datatype_vvvvwby) && datatype_vvvvwby.constructor !==
Array)
{
var temp_vvvvwby = datatype_vvvvwby;
var datatype_vvvvwby = [];
datatype_vvvvwby.push(temp_vvvvwby);
}
else if (!isSet(datatype_vvvvwby))
{
var datatype_vvvvwby = [];
}
var datatype = datatype_vvvvwby.some(datatype_vvvvwby_SomeFunc);
if (isSet(has_defaults_vvvvwby) &&
has_defaults_vvvvwby.constructor !== Array)
{
var temp_vvvvwby = has_defaults_vvvvwby;
var has_defaults_vvvvwby = [];
has_defaults_vvvvwby.push(temp_vvvvwby);
}
else if (!isSet(has_defaults_vvvvwby))
{
var has_defaults_vvvvwby = [];
}
var has_defaults =
has_defaults_vvvvwby.some(has_defaults_vvvvwby_SomeFunc);
// set this function logic
if (datatype && has_defaults)
{
jQuery('#jform_store').closest('.control-group').show();
// add required attribute to store field
if (jform_vvvvwbyvxp_required)
{
updateFieldRequired('store',0);
jQuery('#jform_store').prop('required','required');
jQuery('#jform_store').attr('aria-required',true);
jQuery('#jform_store').addClass('required');
jform_vvvvwbyvxp_required = false;
}
}
else
{
jQuery('#jform_store').closest('.control-group').hide();
// remove required attribute from store field
if (!jform_vvvvwbyvxp_required)
{
updateFieldRequired('store',1);
jQuery('#jform_store').removeAttr('required');
jQuery('#jform_store').removeAttr('aria-required');
jQuery('#jform_store').removeClass('required');
jform_vvvvwbyvxp_required = true;
}
}
}
// the vvvvwby Some function
function datatype_vvvvwby_SomeFunc(datatype_vvvvwby)
{
// set the function logic
if (datatype_vvvvwby == 'CHAR' || datatype_vvvvwby ==
'VARCHAR' || datatype_vvvvwby == 'TEXT' ||
datatype_vvvvwby == 'MEDIUMTEXT' || datatype_vvvvwby ==
'LONGTEXT' || datatype_vvvvwby == 'BLOB' ||
datatype_vvvvwby == 'TINYBLOB' || datatype_vvvvwby ==
'MEDIUMBLOB' || datatype_vvvvwby == 'LONGBLOB')
{
return true;
}
return false;
}
// the vvvvwby Some function
function has_defaults_vvvvwby_SomeFunc(has_defaults_vvvvwby)
{
// set the function logic
if (has_defaults_vvvvwby == 1)
{
return true;
}
return false;
}
// the vvvvwca function
function vvvvwca(store_vvvvwca,datatype_vvvvwca,has_defaults_vvvvwca)
{
if (isSet(store_vvvvwca) && store_vvvvwca.constructor !== Array)
{
var temp_vvvvwca = store_vvvvwca;
var store_vvvvwca = [];
store_vvvvwca.push(temp_vvvvwca);
}
else if (!isSet(store_vvvvwca))
{
var store_vvvvwca = [];
}
var store = store_vvvvwca.some(store_vvvvwca_SomeFunc);
if (isSet(datatype_vvvvwca) && datatype_vvvvwca.constructor !==
Array)
{
var temp_vvvvwca = datatype_vvvvwca;
var datatype_vvvvwca = [];
datatype_vvvvwca.push(temp_vvvvwca);
}
else if (!isSet(datatype_vvvvwca))
{
var datatype_vvvvwca = [];
}
var datatype = datatype_vvvvwca.some(datatype_vvvvwca_SomeFunc);
if (isSet(has_defaults_vvvvwca) &&
has_defaults_vvvvwca.constructor !== Array)
{
var temp_vvvvwca = has_defaults_vvvvwca;
var has_defaults_vvvvwca = [];
has_defaults_vvvvwca.push(temp_vvvvwca);
}
else if (!isSet(has_defaults_vvvvwca))
{
var has_defaults_vvvvwca = [];
}
var has_defaults =
has_defaults_vvvvwca.some(has_defaults_vvvvwca_SomeFunc);
// set this function logic
if (store && datatype && has_defaults)
{
jQuery('.note_whmcs_encryption').closest('.control-group').show();
}
else
{
jQuery('.note_whmcs_encryption').closest('.control-group').hide();
}
}
// the vvvvwca Some function
function store_vvvvwca_SomeFunc(store_vvvvwca)
{
// set the function logic
if (store_vvvvwca == 4)
{
return true;
}
return false;
}
// the vvvvwca Some function
function datatype_vvvvwca_SomeFunc(datatype_vvvvwca)
{
// set the function logic
if (datatype_vvvvwca == 'CHAR' || datatype_vvvvwca ==
'VARCHAR' || datatype_vvvvwca == 'TEXT' ||
datatype_vvvvwca == 'MEDIUMTEXT' || datatype_vvvvwca ==
'LONGTEXT' || datatype_vvvvwca == 'BLOB' ||
datatype_vvvvwca == 'TINYBLOB' || datatype_vvvvwca ==
'MEDIUMBLOB' || datatype_vvvvwca == 'LONGBLOB')
{
return true;
}
return false;
}
// the vvvvwca Some function
function has_defaults_vvvvwca_SomeFunc(has_defaults_vvvvwca)
{
// set the function logic
if (has_defaults_vvvvwca == 1)
{
return true;
}
return false;
}
// the vvvvwcb function
function vvvvwcb(datatype_vvvvwcb,store_vvvvwcb,has_defaults_vvvvwcb)
{
if (isSet(datatype_vvvvwcb) && datatype_vvvvwcb.constructor !==
Array)
{
var temp_vvvvwcb = datatype_vvvvwcb;
var datatype_vvvvwcb = [];
datatype_vvvvwcb.push(temp_vvvvwcb);
}
else if (!isSet(datatype_vvvvwcb))
{
var datatype_vvvvwcb = [];
}
var datatype = datatype_vvvvwcb.some(datatype_vvvvwcb_SomeFunc);
if (isSet(store_vvvvwcb) && store_vvvvwcb.constructor !== Array)
{
var temp_vvvvwcb = store_vvvvwcb;
var store_vvvvwcb = [];
store_vvvvwcb.push(temp_vvvvwcb);
}
else if (!isSet(store_vvvvwcb))
{
var store_vvvvwcb = [];
}
var store = store_vvvvwcb.some(store_vvvvwcb_SomeFunc);
if (isSet(has_defaults_vvvvwcb) &&
has_defaults_vvvvwcb.constructor !== Array)
{
var temp_vvvvwcb = has_defaults_vvvvwcb;
var has_defaults_vvvvwcb = [];
has_defaults_vvvvwcb.push(temp_vvvvwcb);
}
else if (!isSet(has_defaults_vvvvwcb))
{
var has_defaults_vvvvwcb = [];
}
var has_defaults =
has_defaults_vvvvwcb.some(has_defaults_vvvvwcb_SomeFunc);
// set this function logic
if (datatype && store && has_defaults)
{
jQuery('.note_whmcs_encryption').closest('.control-group').show();
}
else
{
jQuery('.note_whmcs_encryption').closest('.control-group').hide();
}
}
// the vvvvwcb Some function
function datatype_vvvvwcb_SomeFunc(datatype_vvvvwcb)
{
// set the function logic
if (datatype_vvvvwcb == 'CHAR' || datatype_vvvvwcb ==
'VARCHAR' || datatype_vvvvwcb == 'TEXT' ||
datatype_vvvvwcb == 'MEDIUMTEXT' || datatype_vvvvwcb ==
'LONGTEXT' || datatype_vvvvwcb == 'BLOB' ||
datatype_vvvvwcb == 'TINYBLOB' || datatype_vvvvwcb ==
'MEDIUMBLOB' || datatype_vvvvwcb == 'LONGBLOB')
{
return true;
}
return false;
}
// the vvvvwcb Some function
function store_vvvvwcb_SomeFunc(store_vvvvwcb)
{
// set the function logic
if (store_vvvvwcb == 4)
{
return true;
}
return false;
}
// the vvvvwcb Some function
function has_defaults_vvvvwcb_SomeFunc(has_defaults_vvvvwcb)
{
// set the function logic
if (has_defaults_vvvvwcb == 1)
{
return true;
}
return false;
}
// the vvvvwcc function
function vvvvwcc(has_defaults_vvvvwcc,store_vvvvwcc,datatype_vvvvwcc)
{
if (isSet(has_defaults_vvvvwcc) &&
has_defaults_vvvvwcc.constructor !== Array)
{
var temp_vvvvwcc = has_defaults_vvvvwcc;
var has_defaults_vvvvwcc = [];
has_defaults_vvvvwcc.push(temp_vvvvwcc);
}
else if (!isSet(has_defaults_vvvvwcc))
{
var has_defaults_vvvvwcc = [];
}
var has_defaults =
has_defaults_vvvvwcc.some(has_defaults_vvvvwcc_SomeFunc);
if (isSet(store_vvvvwcc) && store_vvvvwcc.constructor !== Array)
{
var temp_vvvvwcc = store_vvvvwcc;
var store_vvvvwcc = [];
store_vvvvwcc.push(temp_vvvvwcc);
}
else if (!isSet(store_vvvvwcc))
{
var store_vvvvwcc = [];
}
var store = store_vvvvwcc.some(store_vvvvwcc_SomeFunc);
if (isSet(datatype_vvvvwcc) && datatype_vvvvwcc.constructor !==
Array)
{
var temp_vvvvwcc = datatype_vvvvwcc;
var datatype_vvvvwcc = [];
datatype_vvvvwcc.push(temp_vvvvwcc);
}
else if (!isSet(datatype_vvvvwcc))
{
var datatype_vvvvwcc = [];
}
var datatype = datatype_vvvvwcc.some(datatype_vvvvwcc_SomeFunc);
// set this function logic
if (has_defaults && store && datatype)
{
jQuery('.note_whmcs_encryption').closest('.control-group').show();
}
else
{
jQuery('.note_whmcs_encryption').closest('.control-group').hide();
}
}
// the vvvvwcc Some function
function has_defaults_vvvvwcc_SomeFunc(has_defaults_vvvvwcc)
{
// set the function logic
if (has_defaults_vvvvwcc == 1)
{
return true;
}
return false;
}
// the vvvvwcc Some function
function store_vvvvwcc_SomeFunc(store_vvvvwcc)
{
// set the function logic
if (store_vvvvwcc == 4)
{
return true;
}
return false;
}
// the vvvvwcc Some function
function datatype_vvvvwcc_SomeFunc(datatype_vvvvwcc)
{
// set the function logic
if (datatype_vvvvwcc == 'CHAR' || datatype_vvvvwcc ==
'VARCHAR' || datatype_vvvvwcc == 'TEXT' ||
datatype_vvvvwcc == 'MEDIUMTEXT' || datatype_vvvvwcc ==
'LONGTEXT' || datatype_vvvvwcc == 'BLOB' ||
datatype_vvvvwcc == 'TINYBLOB' || datatype_vvvvwcc ==
'MEDIUMBLOB' || datatype_vvvvwcc == 'LONGBLOB')
{
return true;
}
return false;
}
// the vvvvwcd function
function vvvvwcd(has_defaults_vvvvwcd)
{
// set the function logic
if (has_defaults_vvvvwcd == 1)
{
jQuery('#jform_datatype').closest('.control-group').show();
// add required attribute to datatype field
if (jform_vvvvwcdvxq_required)
{
updateFieldRequired('datatype',0);
jQuery('#jform_datatype').prop('required','required');
jQuery('#jform_datatype').attr('aria-required',true);
jQuery('#jform_datatype').addClass('required');
jform_vvvvwcdvxq_required = false;
}
jQuery('#jform_null_switch').closest('.control-group').show();
// add required attribute to null_switch field
if (jform_vvvvwcdvxr_required)
{
updateFieldRequired('null_switch',0);
jQuery('#jform_null_switch').prop('required','required');
jQuery('#jform_null_switch').attr('aria-required',true);
jQuery('#jform_null_switch').addClass('required');
jform_vvvvwcdvxr_required = false;
}
}
else
{
jQuery('#jform_datatype').closest('.control-group').hide();
// remove required attribute from datatype field
if (!jform_vvvvwcdvxq_required)
{
updateFieldRequired('datatype',1);
jQuery('#jform_datatype').removeAttr('required');
jQuery('#jform_datatype').removeAttr('aria-required');
jQuery('#jform_datatype').removeClass('required');
jform_vvvvwcdvxq_required = true;
}
jQuery('#jform_null_switch').closest('.control-group').hide();
// remove required attribute from null_switch field
if (!jform_vvvvwcdvxr_required)
{
updateFieldRequired('null_switch',1);
jQuery('#jform_null_switch').removeAttr('required');
jQuery('#jform_null_switch').removeAttr('aria-required');
jQuery('#jform_null_switch').removeClass('required');
jform_vvvvwcdvxr_required = true;
}
}
}
// update fields required
function updateFieldRequired(name, status) {
// check if not_required exist
if (document.getElementById('jform_not_required')) {
var not_required =
jQuery('#jform_not_required').val().split(",");
if(status == 1)
{
not_required.push(name);
}
else
{
not_required = removeFieldFromNotRequired(not_required, name);
}
jQuery('#jform_not_required').val(fixNotRequiredArray(not_required).toString());
}
}
// remove field from not_required
function removeFieldFromNotRequired(array, what) {
return array.filter(function(element){
return element !== what;
});
}
// fix not required array
function fixNotRequiredArray(array) {
var seen = {};
return removeEmptyFromNotRequiredArray(array).filter(function(item) {
return seen.hasOwnProperty(item) ? false : (seen[item] = true);
});
}
// remove empty from not_required array
function removeEmptyFromNotRequiredArray(array) {
return array.filter(function (el) {
// remove ( 一_一) as well - lol
return (el.length > 0 && '一_一' !== el);
});
}
// the isSet function
function isSet(val)
{
if ((val != undefined) && (val != null) && 0 !==
val.length){
return true;
}
return false;
}
jQuery(document).ready(function($)
{
// check and load all the custom code edit buttons
getEditCustomCodeButtons();
});
function getEditCustomCodeButtons_server(id) {
var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod);
let requestParams = '';
if (token.length > 0 && id > 0) {
requestParams =
token+'=1&id='+id+'&return_here='+return_here;
}
// Construct URL with parameters for GET request
const urlWithParams = getUrl + '&' + requestParams;
// Using the Fetch API for the GET request
return fetch(urlWithParams, {
method: 'GET',
headers: {
'Content-Type': 'application/json'
}
}).then(response => {
if (!response.ok) {
throw new Error('Network response was not ok');
}
return response.json();
});
}
function getEditCustomCodeButtons() {
// Get the id using pure JavaScript
const id = document.querySelector("#jform_id").value;
getEditCustomCodeButtons_server(id).then(function(result) {
if (typeof result === 'object') {
Object.entries(result).forEach(([field, buttons]) => {
// Creating the div element for buttons
const div = document.createElement('div');
div.className = 'control-group';
div.innerHTML = '<div
class="control-label"><label>Add/Edit
Customcode</label></div><div class="controls
control-customcode-buttons-'+field+'"></div>';
// Insert the div before .control-wrapper-{field}
const insertBeforeElement =
document.querySelector(".control-wrapper-"+field);
insertBeforeElement.parentNode.insertBefore(div, insertBeforeElement);
// Adding buttons to the div
Object.entries(buttons).forEach(([name, button]) => {
const controlsDiv =
document.querySelector(".control-customcode-buttons-"+field);
controlsDiv.innerHTML += button;
});
});
}
}).catch(error => {
console.error('Error:', error);
});
}
help_document.js000064400000020523151167367500007745 0ustar00/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder
<https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights
reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
// Some Global Values
jform_vvvvwcovyc_required = false;
jform_vvvvwcpvyd_required = false;
jform_vvvvwcqvye_required = false;
jform_vvvvwcrvyf_required = false;
jform_vvvvwctvyg_required = false;
// Initial Script
document.addEventListener('DOMContentLoaded', function()
{
var location_vvvvwco = jQuery("#jform_location
input[type='radio']:checked").val();
vvvvwco(location_vvvvwco);
var location_vvvvwcp = jQuery("#jform_location
input[type='radio']:checked").val();
vvvvwcp(location_vvvvwcp);
var type_vvvvwcq = jQuery("#jform_type").val();
vvvvwcq(type_vvvvwcq);
var type_vvvvwcr = jQuery("#jform_type").val();
vvvvwcr(type_vvvvwcr);
var type_vvvvwcs = jQuery("#jform_type").val();
vvvvwcs(type_vvvvwcs);
var target_vvvvwct = jQuery("#jform_target
input[type='radio']:checked").val();
vvvvwct(target_vvvvwct);
});
// the vvvvwco function
function vvvvwco(location_vvvvwco)
{
// set the function logic
if (location_vvvvwco == 1)
{
jQuery('#jform_admin_view').closest('.control-group').show();
// add required attribute to admin_view field
if (jform_vvvvwcovyc_required)
{
updateFieldRequired('admin_view',0);
jQuery('#jform_admin_view').prop('required','required');
jQuery('#jform_admin_view').attr('aria-required',true);
jQuery('#jform_admin_view').addClass('required');
jform_vvvvwcovyc_required = false;
}
}
else
{
jQuery('#jform_admin_view').closest('.control-group').hide();
// remove required attribute from admin_view field
if (!jform_vvvvwcovyc_required)
{
updateFieldRequired('admin_view',1);
jQuery('#jform_admin_view').removeAttr('required');
jQuery('#jform_admin_view').removeAttr('aria-required');
jQuery('#jform_admin_view').removeClass('required');
jform_vvvvwcovyc_required = true;
}
}
}
// the vvvvwcp function
function vvvvwcp(location_vvvvwcp)
{
// set the function logic
if (location_vvvvwcp == 2)
{
jQuery('#jform_site_view').closest('.control-group').show();
// add required attribute to site_view field
if (jform_vvvvwcpvyd_required)
{
updateFieldRequired('site_view',0);
jQuery('#jform_site_view').prop('required','required');
jQuery('#jform_site_view').attr('aria-required',true);
jQuery('#jform_site_view').addClass('required');
jform_vvvvwcpvyd_required = false;
}
}
else
{
jQuery('#jform_site_view').closest('.control-group').hide();
// remove required attribute from site_view field
if (!jform_vvvvwcpvyd_required)
{
updateFieldRequired('site_view',1);
jQuery('#jform_site_view').removeAttr('required');
jQuery('#jform_site_view').removeAttr('aria-required');
jQuery('#jform_site_view').removeClass('required');
jform_vvvvwcpvyd_required = true;
}
}
}
// the vvvvwcq function
function vvvvwcq(type_vvvvwcq)
{
if (isSet(type_vvvvwcq) && type_vvvvwcq.constructor !== Array)
{
var temp_vvvvwcq = type_vvvvwcq;
var type_vvvvwcq = [];
type_vvvvwcq.push(temp_vvvvwcq);
}
else if (!isSet(type_vvvvwcq))
{
var type_vvvvwcq = [];
}
var type = type_vvvvwcq.some(type_vvvvwcq_SomeFunc);
// set this function logic
if (type)
{
jQuery('#jform_url').closest('.control-group').show();
// add required attribute to url field
if (jform_vvvvwcqvye_required)
{
updateFieldRequired('url',0);
jQuery('#jform_url').prop('required','required');
jQuery('#jform_url').attr('aria-required',true);
jQuery('#jform_url').addClass('required');
jform_vvvvwcqvye_required = false;
}
}
else
{
jQuery('#jform_url').closest('.control-group').hide();
// remove required attribute from url field
if (!jform_vvvvwcqvye_required)
{
updateFieldRequired('url',1);
jQuery('#jform_url').removeAttr('required');
jQuery('#jform_url').removeAttr('aria-required');
jQuery('#jform_url').removeClass('required');
jform_vvvvwcqvye_required = true;
}
}
}
// the vvvvwcq Some function
function type_vvvvwcq_SomeFunc(type_vvvvwcq)
{
// set the function logic
if (type_vvvvwcq == 3)
{
return true;
}
return false;
}
// the vvvvwcr function
function vvvvwcr(type_vvvvwcr)
{
if (isSet(type_vvvvwcr) && type_vvvvwcr.constructor !== Array)
{
var temp_vvvvwcr = type_vvvvwcr;
var type_vvvvwcr = [];
type_vvvvwcr.push(temp_vvvvwcr);
}
else if (!isSet(type_vvvvwcr))
{
var type_vvvvwcr = [];
}
var type = type_vvvvwcr.some(type_vvvvwcr_SomeFunc);
// set this function logic
if (type)
{
jQuery('#jform_article').closest('.control-group').show();
// add required attribute to article field
if (jform_vvvvwcrvyf_required)
{
updateFieldRequired('article',0);
jQuery('#jform_article').prop('required','required');
jQuery('#jform_article').attr('aria-required',true);
jQuery('#jform_article').addClass('required');
jform_vvvvwcrvyf_required = false;
}
}
else
{
jQuery('#jform_article').closest('.control-group').hide();
// remove required attribute from article field
if (!jform_vvvvwcrvyf_required)
{
updateFieldRequired('article',1);
jQuery('#jform_article').removeAttr('required');
jQuery('#jform_article').removeAttr('aria-required');
jQuery('#jform_article').removeClass('required');
jform_vvvvwcrvyf_required = true;
}
}
}
// the vvvvwcr Some function
function type_vvvvwcr_SomeFunc(type_vvvvwcr)
{
// set the function logic
if (type_vvvvwcr == 1)
{
return true;
}
return false;
}
// the vvvvwcs function
function vvvvwcs(type_vvvvwcs)
{
if (isSet(type_vvvvwcs) && type_vvvvwcs.constructor !== Array)
{
var temp_vvvvwcs = type_vvvvwcs;
var type_vvvvwcs = [];
type_vvvvwcs.push(temp_vvvvwcs);
}
else if (!isSet(type_vvvvwcs))
{
var type_vvvvwcs = [];
}
var type = type_vvvvwcs.some(type_vvvvwcs_SomeFunc);
// set this function logic
if (type)
{
jQuery('#jform_content-lbl').closest('.control-group').show();
}
else
{
jQuery('#jform_content-lbl').closest('.control-group').hide();
}
}
// the vvvvwcs Some function
function type_vvvvwcs_SomeFunc(type_vvvvwcs)
{
// set the function logic
if (type_vvvvwcs == 2)
{
return true;
}
return false;
}
// the vvvvwct function
function vvvvwct(target_vvvvwct)
{
// set the function logic
if (target_vvvvwct == 1)
{
jQuery('#jform_groups').closest('.control-group').show();
// add required attribute to groups field
if (jform_vvvvwctvyg_required)
{
updateFieldRequired('groups',0);
jQuery('#jform_groups').prop('required','required');
jQuery('#jform_groups').attr('aria-required',true);
jQuery('#jform_groups').addClass('required');
jform_vvvvwctvyg_required = false;
}
}
else
{
jQuery('#jform_groups').closest('.control-group').hide();
// remove required attribute from groups field
if (!jform_vvvvwctvyg_required)
{
updateFieldRequired('groups',1);
jQuery('#jform_groups').removeAttr('required');
jQuery('#jform_groups').removeAttr('aria-required');
jQuery('#jform_groups').removeClass('required');
jform_vvvvwctvyg_required = true;
}
}
}
// update fields required
function updateFieldRequired(name, status) {
// check if not_required exist
if (document.getElementById('jform_not_required')) {
var not_required =
jQuery('#jform_not_required').val().split(",");
if(status == 1)
{
not_required.push(name);
}
else
{
not_required = removeFieldFromNotRequired(not_required, name);
}
jQuery('#jform_not_required').val(fixNotRequiredArray(not_required).toString());
}
}
// remove field from not_required
function removeFieldFromNotRequired(array, what) {
return array.filter(function(element){
return element !== what;
});
}
// fix not required array
function fixNotRequiredArray(array) {
var seen = {};
return removeEmptyFromNotRequiredArray(array).filter(function(item) {
return seen.hasOwnProperty(item) ? false : (seen[item] = true);
});
}
// remove empty from not_required array
function removeEmptyFromNotRequiredArray(array) {
return array.filter(function (el) {
// remove ( 一_一) as well - lol
return (el.length > 0 && '一_一' !== el);
});
}
// the isSet function
function isSet(val)
{
if ((val != undefined) && (val != null) && 0 !==
val.length){
return true;
}
return false;
}
index.html000064400000000054151167367500006553 0ustar00<html><body
bgcolor="#FFFFFF"></body></html>joomla_component.js000064400000046552151167367500010474
0ustar00/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder
<https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights
reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
// Some Global Values
jform_vvvvvwcvvv_required = false;
jform_vvvvvwdvvw_required = false;
jform_vvvvvwgvvx_required = false;
jform_vvvvvwgvvy_required = false;
jform_vvvvvwgvvz_required = false;
// Initial Script
document.addEventListener('DOMContentLoaded', function()
{
var emptycontributors_vvvvvvv = jQuery("#jform_emptycontributors
input[type='radio']:checked").val();
vvvvvvv(emptycontributors_vvvvvvv);
var update_server_target_vvvvvvw =
jQuery("#jform_update_server_target
input[type='radio']:checked").val();
var add_update_server_vvvvvvw = jQuery("#jform_add_update_server
input[type='radio']:checked").val();
vvvvvvw(update_server_target_vvvvvvw,add_update_server_vvvvvvw);
var add_update_server_vvvvvvx = jQuery("#jform_add_update_server
input[type='radio']:checked").val();
var update_server_target_vvvvvvx =
jQuery("#jform_update_server_target
input[type='radio']:checked").val();
vvvvvvx(add_update_server_vvvvvvx,update_server_target_vvvvvvx);
var update_server_target_vvvvvvy =
jQuery("#jform_update_server_target
input[type='radio']:checked").val();
var add_update_server_vvvvvvy = jQuery("#jform_add_update_server
input[type='radio']:checked").val();
vvvvvvy(update_server_target_vvvvvvy,add_update_server_vvvvvvy);
var update_server_target_vvvvvwa =
jQuery("#jform_update_server_target
input[type='radio']:checked").val();
var add_update_server_vvvvvwa = jQuery("#jform_add_update_server
input[type='radio']:checked").val();
vvvvvwa(update_server_target_vvvvvwa,add_update_server_vvvvvwa);
var add_update_server_vvvvvwc = jQuery("#jform_add_update_server
input[type='radio']:checked").val();
vvvvvwc(add_update_server_vvvvvwc);
var buildcomp_vvvvvwd = jQuery("#jform_buildcomp
input[type='radio']:checked").val();
vvvvvwd(buildcomp_vvvvvwd);
var dashboard_type_vvvvvwe = jQuery("#jform_dashboard_type
input[type='radio']:checked").val();
vvvvvwe(dashboard_type_vvvvvwe);
var dashboard_type_vvvvvwf = jQuery("#jform_dashboard_type
input[type='radio']:checked").val();
vvvvvwf(dashboard_type_vvvvvwf);
var translation_tool_vvvvvwg =
jQuery("#jform_translation_tool").val();
vvvvvwg(translation_tool_vvvvvwg);
});
// the vvvvvvv function
function vvvvvvv(emptycontributors_vvvvvvv)
{
// set the function logic
if (emptycontributors_vvvvvvv == 1)
{
jQuery('#jform_number').closest('.control-group').show();
}
else
{
jQuery('#jform_number').closest('.control-group').hide();
}
}
// the vvvvvvw function
function vvvvvvw(update_server_target_vvvvvvw,add_update_server_vvvvvvw)
{
// set the function logic
if (update_server_target_vvvvvvw == 1 && add_update_server_vvvvvvw
== 1)
{
jQuery('#jform_update_server').closest('.control-group').show();
jQuery('.note_update_server_note_ftp').closest('.control-group').show();
}
else
{
jQuery('#jform_update_server').closest('.control-group').hide();
jQuery('.note_update_server_note_ftp').closest('.control-group').hide();
}
}
// the vvvvvvx function
function vvvvvvx(add_update_server_vvvvvvx,update_server_target_vvvvvvx)
{
// set the function logic
if (add_update_server_vvvvvvx == 1 && update_server_target_vvvvvvx
== 1)
{
jQuery('#jform_update_server').closest('.control-group').show();
jQuery('.note_update_server_note_ftp').closest('.control-group').show();
}
else
{
jQuery('#jform_update_server').closest('.control-group').hide();
jQuery('.note_update_server_note_ftp').closest('.control-group').hide();
}
}
// the vvvvvvy function
function vvvvvvy(update_server_target_vvvvvvy,add_update_server_vvvvvvy)
{
// set the function logic
if (update_server_target_vvvvvvy == 2 && add_update_server_vvvvvvy
== 1)
{
jQuery('.note_update_server_note_zip').closest('.control-group').show();
}
else
{
jQuery('.note_update_server_note_zip').closest('.control-group').hide();
}
}
// the vvvvvwa function
function vvvvvwa(update_server_target_vvvvvwa,add_update_server_vvvvvwa)
{
// set the function logic
if (update_server_target_vvvvvwa == 3 && add_update_server_vvvvvwa
== 1)
{
jQuery('.note_update_server_note_other').closest('.control-group').show();
}
else
{
jQuery('.note_update_server_note_other').closest('.control-group').hide();
}
}
// the vvvvvwc function
function vvvvvwc(add_update_server_vvvvvwc)
{
// set the function logic
if (add_update_server_vvvvvwc == 1)
{
jQuery('#jform_update_server_target').closest('.control-group').show();
// add required attribute to update_server_target field
if (jform_vvvvvwcvvv_required)
{
updateFieldRequired('update_server_target',0);
jQuery('#jform_update_server_target').prop('required','required');
jQuery('#jform_update_server_target').attr('aria-required',true);
jQuery('#jform_update_server_target').addClass('required');
jform_vvvvvwcvvv_required = false;
}
}
else
{
jQuery('#jform_update_server_target').closest('.control-group').hide();
// remove required attribute from update_server_target field
if (!jform_vvvvvwcvvv_required)
{
updateFieldRequired('update_server_target',1);
jQuery('#jform_update_server_target').removeAttr('required');
jQuery('#jform_update_server_target').removeAttr('aria-required');
jQuery('#jform_update_server_target').removeClass('required');
jform_vvvvvwcvvv_required = true;
}
}
}
// the vvvvvwd function
function vvvvvwd(buildcomp_vvvvvwd)
{
// set the function logic
if (buildcomp_vvvvvwd == 1)
{
jQuery('#jform_buildcompsql').closest('.control-group').show();
// add required attribute to buildcompsql field
if (jform_vvvvvwdvvw_required)
{
updateFieldRequired('buildcompsql',0);
jQuery('#jform_buildcompsql').prop('required','required');
jQuery('#jform_buildcompsql').attr('aria-required',true);
jQuery('#jform_buildcompsql').addClass('required');
jform_vvvvvwdvvw_required = false;
}
}
else
{
jQuery('#jform_buildcompsql').closest('.control-group').hide();
// remove required attribute from buildcompsql field
if (!jform_vvvvvwdvvw_required)
{
updateFieldRequired('buildcompsql',1);
jQuery('#jform_buildcompsql').removeAttr('required');
jQuery('#jform_buildcompsql').removeAttr('aria-required');
jQuery('#jform_buildcompsql').removeClass('required');
jform_vvvvvwdvvw_required = true;
}
}
}
// the vvvvvwe function
function vvvvvwe(dashboard_type_vvvvvwe)
{
// set the function logic
if (dashboard_type_vvvvvwe == 2)
{
jQuery('#jform_dashboard').closest('.control-group').show();
jQuery('.note_dynamic_dashboard').closest('.control-group').show();
}
else
{
jQuery('#jform_dashboard').closest('.control-group').hide();
jQuery('.note_dynamic_dashboard').closest('.control-group').hide();
}
}
// the vvvvvwf function
function vvvvvwf(dashboard_type_vvvvvwf)
{
// set the function logic
if (dashboard_type_vvvvvwf == 1)
{
jQuery('.note_botton_component_dashboard').closest('.control-group').show();
}
else
{
jQuery('.note_botton_component_dashboard').closest('.control-group').hide();
}
}
// the vvvvvwg function
function vvvvvwg(translation_tool_vvvvvwg)
{
if (isSet(translation_tool_vvvvvwg) &&
translation_tool_vvvvvwg.constructor !== Array)
{
var temp_vvvvvwg = translation_tool_vvvvvwg;
var translation_tool_vvvvvwg = [];
translation_tool_vvvvvwg.push(temp_vvvvvwg);
}
else if (!isSet(translation_tool_vvvvvwg))
{
var translation_tool_vvvvvwg = [];
}
var translation_tool =
translation_tool_vvvvvwg.some(translation_tool_vvvvvwg_SomeFunc);
// set this function logic
if (translation_tool)
{
jQuery('#jform_crowdin_account_api_key').closest('.control-group').show();
jQuery('.note_crowdin').closest('.control-group').show();
jQuery('#jform_crowdin_project_api_key').closest('.control-group').show();
// add required attribute to crowdin_project_api_key field
if (jform_vvvvvwgvvx_required)
{
updateFieldRequired('crowdin_project_api_key',0);
jQuery('#jform_crowdin_project_api_key').prop('required','required');
jQuery('#jform_crowdin_project_api_key').attr('aria-required',true);
jQuery('#jform_crowdin_project_api_key').addClass('required');
jform_vvvvvwgvvx_required = false;
}
jQuery('#jform_crowdin_project_identifier').closest('.control-group').show();
// add required attribute to crowdin_project_identifier field
if (jform_vvvvvwgvvy_required)
{
updateFieldRequired('crowdin_project_identifier',0);
jQuery('#jform_crowdin_project_identifier').prop('required','required');
jQuery('#jform_crowdin_project_identifier').attr('aria-required',true);
jQuery('#jform_crowdin_project_identifier').addClass('required');
jform_vvvvvwgvvy_required = false;
}
jQuery('#jform_crowdin_username').closest('.control-group').show();
// add required attribute to crowdin_username field
if (jform_vvvvvwgvvz_required)
{
updateFieldRequired('crowdin_username',0);
jQuery('#jform_crowdin_username').prop('required','required');
jQuery('#jform_crowdin_username').attr('aria-required',true);
jQuery('#jform_crowdin_username').addClass('required');
jform_vvvvvwgvvz_required = false;
}
}
else
{
jQuery('#jform_crowdin_account_api_key').closest('.control-group').hide();
jQuery('.note_crowdin').closest('.control-group').hide();
jQuery('#jform_crowdin_project_api_key').closest('.control-group').hide();
// remove required attribute from crowdin_project_api_key field
if (!jform_vvvvvwgvvx_required)
{
updateFieldRequired('crowdin_project_api_key',1);
jQuery('#jform_crowdin_project_api_key').removeAttr('required');
jQuery('#jform_crowdin_project_api_key').removeAttr('aria-required');
jQuery('#jform_crowdin_project_api_key').removeClass('required');
jform_vvvvvwgvvx_required = true;
}
jQuery('#jform_crowdin_project_identifier').closest('.control-group').hide();
// remove required attribute from crowdin_project_identifier field
if (!jform_vvvvvwgvvy_required)
{
updateFieldRequired('crowdin_project_identifier',1);
jQuery('#jform_crowdin_project_identifier').removeAttr('required');
jQuery('#jform_crowdin_project_identifier').removeAttr('aria-required');
jQuery('#jform_crowdin_project_identifier').removeClass('required');
jform_vvvvvwgvvy_required = true;
}
jQuery('#jform_crowdin_username').closest('.control-group').hide();
// remove required attribute from crowdin_username field
if (!jform_vvvvvwgvvz_required)
{
updateFieldRequired('crowdin_username',1);
jQuery('#jform_crowdin_username').removeAttr('required');
jQuery('#jform_crowdin_username').removeAttr('aria-required');
jQuery('#jform_crowdin_username').removeClass('required');
jform_vvvvvwgvvz_required = true;
}
}
}
// the vvvvvwg Some function
function translation_tool_vvvvvwg_SomeFunc(translation_tool_vvvvvwg)
{
// set the function logic
if (translation_tool_vvvvvwg == 1)
{
return true;
}
return false;
}
// update fields required
function updateFieldRequired(name, status) {
// check if not_required exist
if (document.getElementById('jform_not_required')) {
var not_required =
jQuery('#jform_not_required').val().split(",");
if(status == 1)
{
not_required.push(name);
}
else
{
not_required = removeFieldFromNotRequired(not_required, name);
}
jQuery('#jform_not_required').val(fixNotRequiredArray(not_required).toString());
}
}
// remove field from not_required
function removeFieldFromNotRequired(array, what) {
return array.filter(function(element){
return element !== what;
});
}
// fix not required array
function fixNotRequiredArray(array) {
var seen = {};
return removeEmptyFromNotRequiredArray(array).filter(function(item) {
return seen.hasOwnProperty(item) ? false : (seen[item] = true);
});
}
// remove empty from not_required array
function removeEmptyFromNotRequiredArray(array) {
return array.filter(function (el) {
// remove ( 一_一) as well - lol
return (el.length > 0 && '一_一' !== el);
});
}
// the isSet function
function isSet(val)
{
if ((val != undefined) && (val != null) && 0 !==
val.length){
return true;
}
return false;
}
jQuery(document).ready(function()
{
// check what is the dashboard switch
var dasboard_type = jQuery("#jform_dashboard_type
input[type='radio']:checked").val();
dasboardSwitch(dasboard_type);
// set buttons
function setButtons1() {
addButtonID('component_files_folders','button_component_files_folders',
1);
addButtonID('component_site_views','button_create_edit_views',
1);
}
function setButtons2() {
addButtonID('component_updates','component_version',
1);
addButtonID('component_mysql_tweaks','button_mysql_tweak_options',
1);
addButtonID('component_custom_admin_views','button_create_edit_views',
1);
}
function setButtons3() {
addButtonID('component_custom_admin_menus','button_add_custom_menus',
1);
addButtonID('component_config','button_add_config',
1);
addButtonID('component_admin_views','button_create_edit_views',
1);
}
// use setTimeout() to execute
setTimeout(setButtons1, 1000);
setTimeout(setButtons2, 2000);
setTimeout(setButtons3, 3000);
// now load the displays
function setDisplays1() {
getAjaxDisplay('component_admin_views');
}
function setDisplays2() {
getAjaxDisplay('component_custom_admin_views');
}
function setDisplays3() {
getAjaxDisplay('component_site_views');
}
// use setTimeout() to execute
setTimeout(setDisplays1, 1500);
setTimeout(setDisplays2, 2500);
setTimeout(setDisplays3, 3500);
// check and load all the customcode edit buttons
setTimeout(getEditCustomCodeButtons, 400);
// get crowdin detail if set
setTimeout(getTranslationToolDetails, 600);
});
function getTranslationToolDetails(){
// get the translation tool selection
var tool = jQuery("#jform_translation_tool").val();
// trigger Crowdin
if (tool == 1) {
// get the identifier
var identifier =
jQuery("#jform_crowdin_project_identifier").val();
// get the key
var key = jQuery("#jform_crowdin_project_api_key").val();
// query server for details
getCrowdinDetails_server(identifier, key).done(function(result) {
if (result.error){
jQuery('#crowdin_information_box').show();
jQuery('#crowdin_error_box').show();
jQuery('#crowdin_error_box').html(result.error);
jQuery('#crowdin_success_box').hide();
} else if(result.html) {
jQuery('#crowdin_success_box').show();
jQuery('#crowdin_success_box').html(result.html);
jQuery('#crowdin_error_box').hide();
jQuery('#crowdin_information_box').hide();
} else {
jQuery('#crowdin_information_box').show();
jQuery('#crowdin_success_box').hide();
}
});
}
}
function getCrowdinDetails_server(identifier, key){
var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getCrowdinDetails&format=json&raw=true&vdm="+vastDevMod);
if(token.length > 0 && identifier.length > 0 &&
key.length > 0){
var request =
token+'=1&identifier='+identifier+'&key='+key;
}
return jQuery.ajax({
type: 'GET',
url: getUrl,
dataType: 'json',
data: request,
jsonp: false
});
}
function getAjaxDisplay(type){
getAjaxDisplay_server(type).done(function(result) {
if(result){
jQuery('#display_'+type).html(result);
}
// set button
addButtonID(type,'header_'+type+'_buttons', 2); //
<-- little edit button
});
}
function getAjaxDisplay_server(type){
var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getAjaxDisplay&format=json&raw=true&vdm="+vastDevMod);
if(token.length > 0 && type.length > 0){
var request = token+'=1&type=' + type;
}
return jQuery.ajax({
type: 'GET',
url: getUrl,
dataType: 'json',
data: request,
jsonp: false
});
}
function addData(result, where){
jQuery(result).insertAfter(jQuery(where).closest('.control-group'));
}
function dasboardSwitch(value){
// hide if default
if (2 == value) {
jQuery('.control-group-componentdashboard-one').hide();
} else {
// default behaviour
if (jQuery('div.control-group-componentdashboard-one').length)
{
jQuery('.control-group-componentdashboard-one').show();
} else {
addButtonID('component_dashboard','button_component_dashboard',
1);
}
}
}
function getEditCustomCodeButtons_server(id) {
var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod);
let requestParams = '';
if (token.length > 0 && id > 0) {
requestParams =
token+'=1&id='+id+'&return_here='+return_here;
}
// Construct URL with parameters for GET request
const urlWithParams = getUrl + '&' + requestParams;
// Using the Fetch API for the GET request
return fetch(urlWithParams, {
method: 'GET',
headers: {
'Content-Type': 'application/json'
}
}).then(response => {
if (!response.ok) {
throw new Error('Network response was not ok');
}
return response.json();
});
}
function getEditCustomCodeButtons() {
// Get the id using pure JavaScript
const id = document.querySelector("#jform_id").value;
getEditCustomCodeButtons_server(id).then(function(result) {
if (typeof result === 'object') {
Object.entries(result).forEach(([field, buttons]) => {
// Creating the div element for buttons
const div = document.createElement('div');
div.className = 'control-group';
div.innerHTML = '<div
class="control-label"><label>Add/Edit
Customcode</label></div><div class="controls
control-customcode-buttons-'+field+'"></div>';
// Insert the div before .control-wrapper-{field}
const insertBeforeElement =
document.querySelector(".control-wrapper-"+field);
insertBeforeElement.parentNode.insertBefore(div, insertBeforeElement);
// Adding buttons to the div
Object.entries(buttons).forEach(([name, button]) => {
const controlsDiv =
document.querySelector(".control-customcode-buttons-"+field);
controlsDiv.innerHTML += button;
});
});
}
}).catch(error => {
console.error('Error:', error);
});
}
function addButtonID_server(type, size){
var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getButtonID&format=json&raw=true&vdm="+vastDevMod);
if(token.length > 0 && type.length > 0 && size >
0){
var request =
token+'=1&type='+type+'&size='+size;
}
return jQuery.ajax({
type: 'GET',
url: getUrl,
dataType: 'json',
data: request,
jsonp: false
});
}
function addButtonID(type, where, size){
addButtonID_server(type, size).done(function(result) {
if(result){
if (2 == size) {
jQuery('#'+where).html(result);
} else {
addData(result, '#jform_'+where);
}
}
});
}
function addButton_server(type, size){
var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getButton&format=json&raw=true&vdm="+vastDevMod);
if(token.length > 0 && type.length > 0){
var request =
token+'=1&type='+type+'&size='+size;
}
return jQuery.ajax({
type: 'GET',
url: getUrl,
dataType: 'json',
data: request,
jsonp: false
});
}
function addButton(type, where, size){
// just to insure that default behaviour still works
size = typeof size !== 'undefined' ? size : 1;
addButton_server(type, size).done(function(result) {
if(result){
if (2 == size) {
jQuery('#'+where).html(result);
} else {
addData(result, '#jform_'+where);
}
}
})
}
joomla_module.js000064400000040505151167367500007747 0ustar00/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder
<https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights
reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
// Initial Script
document.addEventListener('DOMContentLoaded', function()
{
var add_class_helper_vvvvvwh =
jQuery("#jform_add_class_helper").val();
vvvvvwh(add_class_helper_vvvvvwh);
var add_class_helper_header_vvvvvwi =
jQuery("#jform_add_class_helper_header
input[type='radio']:checked").val();
var add_class_helper_vvvvvwi =
jQuery("#jform_add_class_helper").val();
vvvvvwi(add_class_helper_header_vvvvvwi,add_class_helper_vvvvvwi);
var update_server_target_vvvvvwk =
jQuery("#jform_update_server_target
input[type='radio']:checked").val();
var add_update_server_vvvvvwk = jQuery("#jform_add_update_server
input[type='radio']:checked").val();
vvvvvwk(update_server_target_vvvvvwk,add_update_server_vvvvvwk);
var add_update_server_vvvvvwl = jQuery("#jform_add_update_server
input[type='radio']:checked").val();
var update_server_target_vvvvvwl =
jQuery("#jform_update_server_target
input[type='radio']:checked").val();
vvvvvwl(add_update_server_vvvvvwl,update_server_target_vvvvvwl);
var update_server_target_vvvvvwm =
jQuery("#jform_update_server_target
input[type='radio']:checked").val();
var add_update_server_vvvvvwm = jQuery("#jform_add_update_server
input[type='radio']:checked").val();
vvvvvwm(update_server_target_vvvvvwm,add_update_server_vvvvvwm);
var update_server_target_vvvvvwo =
jQuery("#jform_update_server_target
input[type='radio']:checked").val();
var add_update_server_vvvvvwo = jQuery("#jform_add_update_server
input[type='radio']:checked").val();
vvvvvwo(update_server_target_vvvvvwo,add_update_server_vvvvvwo);
});
// the vvvvvwh function
function vvvvvwh(add_class_helper_vvvvvwh)
{
if (isSet(add_class_helper_vvvvvwh) &&
add_class_helper_vvvvvwh.constructor !== Array)
{
var temp_vvvvvwh = add_class_helper_vvvvvwh;
var add_class_helper_vvvvvwh = [];
add_class_helper_vvvvvwh.push(temp_vvvvvwh);
}
else if (!isSet(add_class_helper_vvvvvwh))
{
var add_class_helper_vvvvvwh = [];
}
var add_class_helper =
add_class_helper_vvvvvwh.some(add_class_helper_vvvvvwh_SomeFunc);
// set this function logic
if (add_class_helper)
{
jQuery('#jform_add_class_helper_header').closest('.control-group').show();
jQuery('#jform_class_helper_code-lbl').closest('.control-group').show();
}
else
{
jQuery('#jform_add_class_helper_header').closest('.control-group').hide();
jQuery('#jform_class_helper_code-lbl').closest('.control-group').hide();
}
}
// the vvvvvwh Some function
function add_class_helper_vvvvvwh_SomeFunc(add_class_helper_vvvvvwh)
{
// set the function logic
if (add_class_helper_vvvvvwh == 1 || add_class_helper_vvvvvwh == 2)
{
return true;
}
return false;
}
// the vvvvvwi function
function vvvvvwi(add_class_helper_header_vvvvvwi,add_class_helper_vvvvvwi)
{
if (isSet(add_class_helper_header_vvvvvwi) &&
add_class_helper_header_vvvvvwi.constructor !== Array)
{
var temp_vvvvvwi = add_class_helper_header_vvvvvwi;
var add_class_helper_header_vvvvvwi = [];
add_class_helper_header_vvvvvwi.push(temp_vvvvvwi);
}
else if (!isSet(add_class_helper_header_vvvvvwi))
{
var add_class_helper_header_vvvvvwi = [];
}
var add_class_helper_header =
add_class_helper_header_vvvvvwi.some(add_class_helper_header_vvvvvwi_SomeFunc);
if (isSet(add_class_helper_vvvvvwi) &&
add_class_helper_vvvvvwi.constructor !== Array)
{
var temp_vvvvvwi = add_class_helper_vvvvvwi;
var add_class_helper_vvvvvwi = [];
add_class_helper_vvvvvwi.push(temp_vvvvvwi);
}
else if (!isSet(add_class_helper_vvvvvwi))
{
var add_class_helper_vvvvvwi = [];
}
var add_class_helper =
add_class_helper_vvvvvwi.some(add_class_helper_vvvvvwi_SomeFunc);
// set this function logic
if (add_class_helper_header && add_class_helper)
{
jQuery('#jform_class_helper_header-lbl').closest('.control-group').show();
}
else
{
jQuery('#jform_class_helper_header-lbl').closest('.control-group').hide();
}
}
// the vvvvvwi Some function
function
add_class_helper_header_vvvvvwi_SomeFunc(add_class_helper_header_vvvvvwi)
{
// set the function logic
if (add_class_helper_header_vvvvvwi == 1)
{
return true;
}
return false;
}
// the vvvvvwi Some function
function add_class_helper_vvvvvwi_SomeFunc(add_class_helper_vvvvvwi)
{
// set the function logic
if (add_class_helper_vvvvvwi == 1 || add_class_helper_vvvvvwi == 2)
{
return true;
}
return false;
}
// the vvvvvwk function
function vvvvvwk(update_server_target_vvvvvwk,add_update_server_vvvvvwk)
{
// set the function logic
if (update_server_target_vvvvvwk == 1 && add_update_server_vvvvvwk
== 1)
{
jQuery('#jform_update_server').closest('.control-group').show();
jQuery('.note_update_server_note_ftp').closest('.control-group').show();
}
else
{
jQuery('#jform_update_server').closest('.control-group').hide();
jQuery('.note_update_server_note_ftp').closest('.control-group').hide();
}
}
// the vvvvvwl function
function vvvvvwl(add_update_server_vvvvvwl,update_server_target_vvvvvwl)
{
// set the function logic
if (add_update_server_vvvvvwl == 1 && update_server_target_vvvvvwl
== 1)
{
jQuery('#jform_update_server').closest('.control-group').show();
jQuery('.note_update_server_note_ftp').closest('.control-group').show();
}
else
{
jQuery('#jform_update_server').closest('.control-group').hide();
jQuery('.note_update_server_note_ftp').closest('.control-group').hide();
}
}
// the vvvvvwm function
function vvvvvwm(update_server_target_vvvvvwm,add_update_server_vvvvvwm)
{
// set the function logic
if (update_server_target_vvvvvwm == 2 && add_update_server_vvvvvwm
== 1)
{
jQuery('.note_update_server_note_zip').closest('.control-group').show();
}
else
{
jQuery('.note_update_server_note_zip').closest('.control-group').hide();
}
}
// the vvvvvwo function
function vvvvvwo(update_server_target_vvvvvwo,add_update_server_vvvvvwo)
{
// set the function logic
if (update_server_target_vvvvvwo == 3 && add_update_server_vvvvvwo
== 1)
{
jQuery('.note_update_server_note_other').closest('.control-group').show();
}
else
{
jQuery('.note_update_server_note_other').closest('.control-group').hide();
}
}
// the isSet function
function isSet(val)
{
if ((val != undefined) && (val != null) && 0 !==
val.length){
return true;
}
return false;
}
jQuery(document).ready(function() {
// get the linked details
getLinked();
// check and load all the customcode edit buttons
setTimeout(getEditCustomCodeButtons, 300);
});
function setModuleCode() {
var selected_get = jQuery("#jform_add_class_helper
option:selected").val();
var custom_gets = jQuery("#jform_custom_get").val();
var libraries = jQuery("#jform_libraries").val();
var values = {'class': selected_get, 'get':
custom_gets, 'lib': libraries};
var editor_id = 'jform_mod_code';
getCodeFrom_server(1, JSON.stringify(values), 'data',
'getModuleCode').then(function(result) {
if(result.tmpl){
addCodeToEditor(result.tmpl.code, editor_id, result.tmpl.merge,
result.tmpl.merge_target);
}
if(result.css){
addCodeToEditor(result.css.code, editor_id, result.css.merge,
result.css.merge_target);
}
if(result.class){
addCodeToEditor(result.class.code, editor_id, result.class.merge,
result.class.merge_target);
}
if(result.get){
addCodeToEditor(result.get.code, editor_id, result.get.merge,
result.get.merge_target);
}
if(result.lib){
addCodeToEditor(result.lib.code, editor_id, result.lib.merge,
result.lib.merge_target);
}
});
}
function getLinked() {
getCodeFrom_server(1, 'type', 'type',
'getLinked').then(function(result) {
if (result.error) {
console.error(result.error);
} else if (result) {
document.getElementById('display_linked_to').innerHTML =
result;
}
});
}
function getCodeFrom_server(id, type, type_name, callingName) {
var url = "index.php?option=com_componentbuilder&task=ajax."
+ callingName +
"&format=json&raw=true&vdm="+vastDevMod;
if (token.length > 0 && id > 0 && type.length >
0) {
url += '&' + token + '=1&' + type_name +
'=' + type + '&id=' + id;
}
var getUrl = JRouter(url);
return fetch(getUrl, {
method: 'GET',
headers: {
'Content-Type': 'application/json'
}
}).then(function(response) {
if (response.ok) {
return response.json();
} else {
throw new Error('Network response was not ok');
}
}).then(function(data) {
return data;
}).catch(function(error) {
console.error('There was a problem with the fetch operation:',
error);
});
}
function addCodeToEditor(code_string, editor_id, merge, merge_target){
if (Joomla.editors.instances.hasOwnProperty(editor_id)) {
var old_code_string = Joomla.editors.instances[editor_id].getValue();
if (merge && old_code_string.length > 0) {
// make sure not to load the same string twice
if (old_code_string.indexOf(code_string) == -1) {
if ('prepend' === merge_target) {
var _string = code_string + "\n\n" + old_code_string;
} else if (merge_target && 'append' !== merge_target)
{
var old_code_array = old_code_string.split(merge_target);
if (old_code_array.length > 1) {
var _string = old_code_array.shift() + "\n\n" + code_string
+ "\n\n" + merge_target + old_code_array.join(merge_target);
} else {
var _string = code_string + "\n\n" + merge_target +
old_code_array.join('');
}
} else {
var _string = old_code_string + "\n\n" + code_string;
}
Joomla.editors.instances[editor_id].setValue(_string.trim());
return true;
}
} else {
Joomla.editors.instances[editor_id].setValue(code_string.trim());
return true;
}
} else {
var old_code_string = jQuery('textarea#'+editor_id).val();
if (merge && old_code_string.length > 0) {
// make sure not to load the same string twice
if (old_code_string.indexOf(code_string) == -1) {
if ('prepend' === merge_target) {
var _string = code_string + "\n\n" + old_code_string;
} else if (merge_target && 'append' !== merge_target)
{
var old_code_array = old_code_string.split(merge_target);
if (old_code_array.length > 1) {
var _string = old_code_array.shift() + "\n\n" + code_string
+ "\n\n" + merge_target + old_code_array.join(merge_target);
} else {
var _string = code_string + "\n\n" + merge_target +
old_code_array.join('');
}
} else {
var _string = old_code_string + "\n\n" + code_string;
}
jQuery('textarea#'+editor_id).val(_string.trim());
return true;
}
} else {
jQuery('textarea#'+editor_id).val(code_string.trim());
return true;
}
}
return false;
}
function removeCodeFromEditor(code_string, editor_id){
if (Joomla.editors.instances.hasOwnProperty(editor_id)) {
var old_code_string = Joomla.editors.instances[editor_id].getValue();
if (old_code_string.length > 0) {
// make sure string is found
if (old_code_string.indexOf(code_string) !== -1) {
// remove the code
Joomla.editors.instances[editor_id].setValue(old_code_string.replace(code_string+"\n\n",'').replace("\n\n"+code_string,'').replace(code_string,''));
return true;
}
}
} else {
var old_code_string = jQuery('textarea#'+editor_id).val();
if (old_code_string.length > 0) {
// make sure string is found
if (old_code_string.indexOf(code_string) !== -1) {
// remove the code
jQuery('textarea#'+editor_id).val(old_code_string.replace(code_string+"\n\n",'').replace("\n\n"+code_string,'').replace(code_string,''));
return true;
}
}
}
return false;
}
function getEditCustomCodeButtons_server(id) {
var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod);
let requestParams = '';
if (token.length > 0 && id > 0) {
requestParams =
token+'=1&id='+id+'&return_here='+return_here;
}
// Construct URL with parameters for GET request
const urlWithParams = getUrl + '&' + requestParams;
// Using the Fetch API for the GET request
return fetch(urlWithParams, {
method: 'GET',
headers: {
'Content-Type': 'application/json'
}
}).then(response => {
if (!response.ok) {
throw new Error('Network response was not ok');
}
return response.json();
});
}
function getEditCustomCodeButtons() {
// Get the id using pure JavaScript
const id = document.querySelector("#jform_id").value;
getEditCustomCodeButtons_server(id).then(function(result) {
if (typeof result === 'object') {
Object.entries(result).forEach(([field, buttons]) => {
// Creating the div element for buttons
const div = document.createElement('div');
div.className = 'control-group';
div.innerHTML = '<div
class="control-label"><label>Add/Edit
Customcode</label></div><div class="controls
control-customcode-buttons-'+field+'"></div>';
// Insert the div before .control-wrapper-{field}
const insertBeforeElement =
document.querySelector(".control-wrapper-"+field);
insertBeforeElement.parentNode.insertBefore(div, insertBeforeElement);
// Adding buttons to the div
Object.entries(buttons).forEach(([name, button]) => {
const controlsDiv =
document.querySelector(".control-customcode-buttons-"+field);
controlsDiv.innerHTML += button;
});
});
}
}).catch(error => {
console.error('Error:', error);
});
}
function getSnippetDetails(id){
getCodeFrom_server(id, '_type', '_type',
'snippetDetails').then(function(result) {
if(result.snippet){
var description = '';
if (result.description.length > 0) {
description =
'<p>'+result.description+'</p>';
}
var library = '';
if (result.library.length > 0) {
library = '
<b>('+result.library+')</b>';
}
var code = '<div
id="snippet-code"><b>'+result.name+'
('+result.type+')</b> <a
href="'+result.url+'" target="_blank" >see
more details'+library+'</a><br
/><em>'+result.heading+'</em><br
/><textarea id="snippet" class="span12"
rows="11">'+result.snippet+'</textarea></div>';
jQuery('#snippet-code').remove();
jQuery('.snippet-code').append(code);
// make sure the code block is active
jQuery("#snippet").focus(function() {
var jQuerythis = jQuery(this);
jQuerythis.select();
// Work around Chrome's little problem
jQuerythis.mouseup(function() {
// Prevent further mouseup intervention
jQuerythis.unbind("mouseup");
return false;
});
});
}
if(result.usage){
var usage = '<div
id="snippet-usage"><p>'+result.usage+'</p></div>';
jQuery('#snippet-usage').remove();
jQuery('.snippet-usage').append(usage);
}
})
}
// set snippets that are on the page
var snippetIds = [];
var snippets = {};
var snippet = 0;
jQuery(document).ready(function($)
{
jQuery("#jform_snippet option").each(function()
{
var key = jQuery(this).val();
var text = jQuery(this).text();
snippets[key] = text;
snippetIds.push(key);
});
snippet = jQuery("#jform_snippet").val();
getSnippets();
});
function getSnippets(){
jQuery("#loading").show();
// clear the selection
jQuery('#jform_snippet').find('option').remove().end();
jQuery('#jform_snippet').trigger('liszt:updated');
// get libraries value if set
var libraries = jQuery("#jform_libraries").val();
if (libraries) {
getCodeFrom_server(1, JSON.stringify(libraries), 'libraries',
'getSnippets').then(function(result) {
setSnippets(result);
jQuery("#loading").hide();
if (typeof snippetButton !== 'undefined') {
// ensure button is correct
var snippet = jQuery('#jform_snippet').val();
snippetButton(snippet);
}
});
}
else
{
// load all snippets in none is selected
setSnippets(snippetIds);
jQuery("#loading").hide();
}
}
function setSnippets(array){
if (array) {
jQuery('#jform_snippet').append('<option
value="">'+select_a_snippet+'</option>');
jQuery.each( array, function( i, id ) {
if (id in snippets) {
jQuery('#jform_snippet').append('<option
value="'+id+'">'+snippets[id]+'</option>');
}
if (id == snippet) {
jQuery('#jform_snippet').val(id);
}
});
} else {
jQuery('#jform_snippet').append('<option
value="">'+create_a_snippet+'</option>');
}
jQuery('#jform_snippet').trigger('liszt:updated');
}
joomla_module_files_folders_urls.js000064400000000606151167367500013712
0ustar00/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder
<https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights
reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
joomla_module_updates.js000064400000000606151167367500011472 0ustar00/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder
<https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights
reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
joomla_plugin.js000064400000061613151167367500007763 0ustar00/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder
<https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights
reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
// Initial Script
document.addEventListener('DOMContentLoaded', function()
{
var class_extends_vvvvvwq =
jQuery("#jform_class_extends").val();
var joomla_plugin_group_vvvvvwq =
jQuery("#jform_joomla_plugin_group").val();
vvvvvwq(class_extends_vvvvvwq,joomla_plugin_group_vvvvvwq);
var joomla_plugin_group_vvvvvwr =
jQuery("#jform_joomla_plugin_group").val();
var class_extends_vvvvvwr =
jQuery("#jform_class_extends").val();
vvvvvwr(joomla_plugin_group_vvvvvwr,class_extends_vvvvvwr);
var class_extends_vvvvvws =
jQuery("#jform_class_extends").val();
vvvvvws(class_extends_vvvvvws);
var update_server_target_vvvvvwu =
jQuery("#jform_update_server_target
input[type='radio']:checked").val();
var add_update_server_vvvvvwu = jQuery("#jform_add_update_server
input[type='radio']:checked").val();
vvvvvwu(update_server_target_vvvvvwu,add_update_server_vvvvvwu);
var add_update_server_vvvvvwv = jQuery("#jform_add_update_server
input[type='radio']:checked").val();
var update_server_target_vvvvvwv =
jQuery("#jform_update_server_target
input[type='radio']:checked").val();
vvvvvwv(add_update_server_vvvvvwv,update_server_target_vvvvvwv);
var update_server_target_vvvvvww =
jQuery("#jform_update_server_target
input[type='radio']:checked").val();
var add_update_server_vvvvvww = jQuery("#jform_add_update_server
input[type='radio']:checked").val();
vvvvvww(update_server_target_vvvvvww,add_update_server_vvvvvww);
var update_server_target_vvvvvwy =
jQuery("#jform_update_server_target
input[type='radio']:checked").val();
var add_update_server_vvvvvwy = jQuery("#jform_add_update_server
input[type='radio']:checked").val();
vvvvvwy(update_server_target_vvvvvwy,add_update_server_vvvvvwy);
});
// the vvvvvwq function
function vvvvvwq(class_extends_vvvvvwq,joomla_plugin_group_vvvvvwq)
{
if (isSet(class_extends_vvvvvwq) &&
class_extends_vvvvvwq.constructor !== Array)
{
var temp_vvvvvwq = class_extends_vvvvvwq;
var class_extends_vvvvvwq = [];
class_extends_vvvvvwq.push(temp_vvvvvwq);
}
else if (!isSet(class_extends_vvvvvwq))
{
var class_extends_vvvvvwq = [];
}
var class_extends =
class_extends_vvvvvwq.some(class_extends_vvvvvwq_SomeFunc);
if (isSet(joomla_plugin_group_vvvvvwq) &&
joomla_plugin_group_vvvvvwq.constructor !== Array)
{
var temp_vvvvvwq = joomla_plugin_group_vvvvvwq;
var joomla_plugin_group_vvvvvwq = [];
joomla_plugin_group_vvvvvwq.push(temp_vvvvvwq);
}
else if (!isSet(joomla_plugin_group_vvvvvwq))
{
var joomla_plugin_group_vvvvvwq = [];
}
var joomla_plugin_group =
joomla_plugin_group_vvvvvwq.some(joomla_plugin_group_vvvvvwq_SomeFunc);
// set this function logic
if (class_extends && joomla_plugin_group)
{
jQuery('#jform_method_selection-lbl').closest('.control-group').show();
jQuery('#jform_property_selection-lbl').closest('.control-group').show();
}
else
{
jQuery('#jform_method_selection-lbl').closest('.control-group').hide();
jQuery('#jform_property_selection-lbl').closest('.control-group').hide();
}
}
// the vvvvvwq Some function
function class_extends_vvvvvwq_SomeFunc(class_extends_vvvvvwq)
{
// set the function logic
if (isSet(class_extends_vvvvvwq))
{
return true;
}
return false;
}
// the vvvvvwq Some function
function joomla_plugin_group_vvvvvwq_SomeFunc(joomla_plugin_group_vvvvvwq)
{
// set the function logic
if (isSet(joomla_plugin_group_vvvvvwq))
{
return true;
}
return false;
}
// the vvvvvwr function
function vvvvvwr(joomla_plugin_group_vvvvvwr,class_extends_vvvvvwr)
{
if (isSet(joomla_plugin_group_vvvvvwr) &&
joomla_plugin_group_vvvvvwr.constructor !== Array)
{
var temp_vvvvvwr = joomla_plugin_group_vvvvvwr;
var joomla_plugin_group_vvvvvwr = [];
joomla_plugin_group_vvvvvwr.push(temp_vvvvvwr);
}
else if (!isSet(joomla_plugin_group_vvvvvwr))
{
var joomla_plugin_group_vvvvvwr = [];
}
var joomla_plugin_group =
joomla_plugin_group_vvvvvwr.some(joomla_plugin_group_vvvvvwr_SomeFunc);
if (isSet(class_extends_vvvvvwr) &&
class_extends_vvvvvwr.constructor !== Array)
{
var temp_vvvvvwr = class_extends_vvvvvwr;
var class_extends_vvvvvwr = [];
class_extends_vvvvvwr.push(temp_vvvvvwr);
}
else if (!isSet(class_extends_vvvvvwr))
{
var class_extends_vvvvvwr = [];
}
var class_extends =
class_extends_vvvvvwr.some(class_extends_vvvvvwr_SomeFunc);
// set this function logic
if (joomla_plugin_group && class_extends)
{
jQuery('#jform_method_selection-lbl').closest('.control-group').show();
jQuery('#jform_property_selection-lbl').closest('.control-group').show();
}
else
{
jQuery('#jform_method_selection-lbl').closest('.control-group').hide();
jQuery('#jform_property_selection-lbl').closest('.control-group').hide();
}
}
// the vvvvvwr Some function
function joomla_plugin_group_vvvvvwr_SomeFunc(joomla_plugin_group_vvvvvwr)
{
// set the function logic
if (isSet(joomla_plugin_group_vvvvvwr))
{
return true;
}
return false;
}
// the vvvvvwr Some function
function class_extends_vvvvvwr_SomeFunc(class_extends_vvvvvwr)
{
// set the function logic
if (isSet(class_extends_vvvvvwr))
{
return true;
}
return false;
}
// the vvvvvws function
function vvvvvws(class_extends_vvvvvws)
{
if (isSet(class_extends_vvvvvws) &&
class_extends_vvvvvws.constructor !== Array)
{
var temp_vvvvvws = class_extends_vvvvvws;
var class_extends_vvvvvws = [];
class_extends_vvvvvws.push(temp_vvvvvws);
}
else if (!isSet(class_extends_vvvvvws))
{
var class_extends_vvvvvws = [];
}
var class_extends =
class_extends_vvvvvws.some(class_extends_vvvvvws_SomeFunc);
// set this function logic
if (class_extends)
{
jQuery('#jform_add_head').closest('.control-group').show();
}
else
{
jQuery('#jform_add_head').closest('.control-group').hide();
}
}
// the vvvvvws Some function
function class_extends_vvvvvws_SomeFunc(class_extends_vvvvvws)
{
// set the function logic
if (isSet(class_extends_vvvvvws))
{
return true;
}
return false;
}
// the vvvvvwu function
function vvvvvwu(update_server_target_vvvvvwu,add_update_server_vvvvvwu)
{
// set the function logic
if (update_server_target_vvvvvwu == 1 && add_update_server_vvvvvwu
== 1)
{
jQuery('#jform_update_server').closest('.control-group').show();
jQuery('.note_update_server_note_ftp').closest('.control-group').show();
}
else
{
jQuery('#jform_update_server').closest('.control-group').hide();
jQuery('.note_update_server_note_ftp').closest('.control-group').hide();
}
}
// the vvvvvwv function
function vvvvvwv(add_update_server_vvvvvwv,update_server_target_vvvvvwv)
{
// set the function logic
if (add_update_server_vvvvvwv == 1 && update_server_target_vvvvvwv
== 1)
{
jQuery('#jform_update_server').closest('.control-group').show();
jQuery('.note_update_server_note_ftp').closest('.control-group').show();
}
else
{
jQuery('#jform_update_server').closest('.control-group').hide();
jQuery('.note_update_server_note_ftp').closest('.control-group').hide();
}
}
// the vvvvvww function
function vvvvvww(update_server_target_vvvvvww,add_update_server_vvvvvww)
{
// set the function logic
if (update_server_target_vvvvvww == 2 && add_update_server_vvvvvww
== 1)
{
jQuery('.note_update_server_note_zip').closest('.control-group').show();
}
else
{
jQuery('.note_update_server_note_zip').closest('.control-group').hide();
}
}
// the vvvvvwy function
function vvvvvwy(update_server_target_vvvvvwy,add_update_server_vvvvvwy)
{
// set the function logic
if (update_server_target_vvvvvwy == 3 && add_update_server_vvvvvwy
== 1)
{
jQuery('.note_update_server_note_other').closest('.control-group').show();
}
else
{
jQuery('.note_update_server_note_other').closest('.control-group').hide();
}
}
// the isSet function
function isSet(val)
{
if ((val != undefined) && (val != null) && 0 !==
val.length){
return true;
}
return false;
}
jQuery(document).ready(function()
{
// get the linked details
getLinked();
// load the active array values
buildSelectionMemory('property');
buildSelectionMemory('method');
// load the active selection array values
getClassCodeIds('joomla_plugin_group',
'jform_class_extends', false);
getClassCodeIds('property',
'jform_joomla_plugin_group', false);
getClassCodeIds('method', 'jform_joomla_plugin_group',
false);
// check and load all the customcode edit buttons
setTimeout(getEditCustomCodeButtons, 300);
// trigger the row watcher
rowWatcher();
});
function getCodeFrom_server(id, type, type_name, callingName) {
var url = "index.php?option=com_componentbuilder&task=ajax."
+ callingName +
"&format=json&raw=true&vdm="+vastDevMod;
if (token.length > 0 && id > 0 && type.length >
0) {
url += '&' + token + '=1&' + type_name +
'=' + type + '&id=' + id;
}
var getUrl = JRouter(url);
return fetch(getUrl, {
method: 'GET',
headers: {
'Content-Type': 'application/json'
}
}).then(function(response) {
if (response.ok) {
return response.json();
} else {
throw new Error('Network response was not ok');
}
}).then(function(data) {
return data;
}).catch(function(error) {
console.error('There was a problem with the fetch operation:',
error);
});
}
// set selection the options
selectionMemory = {'property':{},'method':{}};
selectionActiveArray = {'property':{},'method':{}};
selectedIdRemoved =
{'property':'not','method':'not'};
function buildSelectionMemory(type) {
var i;
for (i = 0; i < 70; i++) {
// build ID
var id_check =
'jform_'+type+'_selection'+'__'+type+'_selection'+i+'__'+type;
// set memory
if (jQuery("#"+id_check).length) {
selectionMemory[type][id_check] = jQuery("#"+id_check+"
option:selected").val();
}
}
}
function getClassHeaderCode(){
// now get the values
var value = jQuery("#jform_class_extends
option:selected").val();
var add_value = jQuery("#jform_add_head
input[type='radio']:checked").val();
if (add_value == 1 && value > 0){
// we first check local memory
var _result = jQuery.jStorage.get('extends_header_'+value,
null);
if (_result) {
// now set the code
addCodeToEditor(_result, "jform_head", false, null);
} else {
// now get the code
getCodeFrom_server(value, 'extends', 'type',
'getClassHeaderCode').then(function(result) {
if(result){
// now set the code
addCodeToEditor(result, "jform_head", false, null);
// add result to local memory
jQuery.jStorage.set('extends_header_'+value, result, {TTL:
expire});
}
});
}
}
}
function getClassCodeIds(type, target_field, reset_all){
// now get the value
var value = jQuery('#'+target_field).val();
// now get the code
getCodeFrom_server(value, type, 'type',
'getClassCodeIds').then(function(result) {
if(result){
// reset the selection
selectionActiveArray[type] = {};
// update the active array
jQuery.each(result, function(i, prop) {
selectionActiveArray[type][prop] = selectionArray[type][prop];
});
// update the active field selection
updateActiveFieldSelection(type, reset_all);
}
});
}
function updateActiveFieldSelection(type, reset_all){
// update the selection options
if ('joomla_plugin_group' === type) {
// get value if not going to reset all
if (!reset_all){
// get the active values
var activeValue = jQuery("#jform_"+type+"
option:selected").val();
var activeText = jQuery("#jform_"+type+"
option:selected").text();
// clear the options out
jQuery("#jform_"+type).find('option').remove().end();
// add the active selection back (must be what is available)
jQuery("#jform_"+type).append('<option
value="'+activeValue+'">'+activeText+'</option>');
// now add the lists back
jQuery.each( selectionActiveArray[type], function(aValue, aText ) {
if (activeValue !== aValue) {
jQuery("#jform_"+type).append('<option
value="'+aValue+'">'+aText+'</option>');
}
});
jQuery("#jform_"+type).val(activeValue);
} else {
// clear the options out
jQuery("#jform_"+type).find('option').remove().end();
// now add the lists back
jQuery.each( selectionActiveArray[type], function(aValue, aText ) {
jQuery("#jform_"+type).append('<option
value="'+aValue+'">'+aText+'</option>');
});
jQuery("#jform_"+type).val('');
}
jQuery("#jform_"+type).trigger('liszt:updated');
// reset all when global update is made
if (reset_all) {
resetAll('method');
resetAll('property');
}
} else {
selectionDynamicUpdate(type);
// reset all when global update is made
if (reset_all) {
resetAll(type);
}
}
}
function resetAll(type) {
var i;
for (i = 0; i < 10; i++) {
// build ID
var id_check =
'jform_'+type+'_selection'+'__'+type+'_selection'+i+'__'+type;
// first check if Id is on page as that not the same as the one currently
calling
if (jQuery("#"+id_check).length) {
if (i == 0) {
jQuery('#'+id_check).val('');
jQuery('#'+id_check).trigger('liszt:updated');
} else {
// remove the row
jQuery('#'+id_check).closest('tr').remove();
}
}
}
Joomla.editors.instances['jform_main_class_code'].setValue('');
selectionMemory = {'property':{},'method':{}};
}
function getClassCode(field, type){
// get the ID
var id = jQuery(field).attr('id');
// now get the value
var value = jQuery('#' + id).val();
// check if we have a memory for this field, if true remove code of old
selection and clear memory
if (selectionMemory[type].hasOwnProperty(id) &&
selectionMemory[type][id] > 0) {
// the old id to remove
var old_value = selectionMemory[type][id];
// remove the code // we first check local memory
var _result =
jQuery.jStorage.get('code_4_'+type+'_'+old_value,
null);
if (_result) {
// now remove the code
if (removeCodeFromEditor(_result, 'jform_main_class_code')) {
selectionMemory[type][id] = 0;
}
} else {
// now get the code
getCodeFrom_server(old_value, type, 'type',
'getClassCode').then(function(result) {
if(result){
// now remove the code
if (removeCodeFromEditor(result, 'jform_main_class_code'))
{
selectionMemory[type][id] = 0;
}
// add result to local memory
jQuery.jStorage.set('code_4_'+type+'_'+old_value,
result, {TTL: expire});
}
});
}
}
if (propertyIsSet(value, id, type)) {
// reset the selection
jQuery('#'+id).val('');
jQuery('#'+id).trigger("liszt:updated");
// give out a notice
jQuery.UIkit.notify({message:
Joomla.JText._('COM_COMPONENTBUILDER_ALREADY_SELECTED_TRY_ANOTHER'),
timeout: 5000, status: 'warning', pos: 'top-center'});
} else {
// set the active removed value
selectedIdRemoved[type] = id;
// do a dynamic update (to remove what was already used)
selectionDynamicUpdate(type);
// set the add action
if (type === 'property') {
var _action_add = 'prepend';
} else {
var _action_add = 'append';
}
// we first check local memory
var _result =
jQuery.jStorage.get('code_4_'+type+'_'+value, null);
if (_result) {
// now set the code
if (addCodeToEditor(_result, "jform_main_class_code", true,
_action_add)) {
selectionMemory[type][id] = value;
}
} else {
// now get the code
getCodeFrom_server(value, type, 'type',
'getClassCode').then(function(result) {
if(result){
// now set the code
if (addCodeToEditor(result, "jform_main_class_code", true,
_action_add)) {
selectionMemory[type][id] = value;
}
// add result to local memory
jQuery.jStorage.set('code_4_'+type+'_'+value,
result, {TTL: expire});
}
});
}
}
}
function selectionDynamicUpdate(type) {
selectionAvailable = {};
selectionSelectedArray = {};
selectionTrackerArray = {};
var i;
for (i = 0; i < 70; i++) { // for now this is the number of field we
should check
// build ID
var id_check =
'jform_'+type+'_selection'+'__'+type+'_selection'+i+'__'+type;
// first check if Id is on page as that not the same as the one currently
calling
if (jQuery("#"+id_check).length &&
selectedIdRemoved[type] !== id_check) {
// build the selected array
var key = jQuery("#"+id_check+"
option:selected").val();
var text = jQuery("#"+id_check+"
option:selected").text();
selectionSelectedArray[key] = text;
// keep track of the value set
selectionTrackerArray[id_check] = key;
// clear the options out
jQuery("#"+id_check).find('option').remove().end();
}
}
// now build the list to keep
jQuery.each( selectionActiveArray[type], function( prop, name ) {
if (!selectionSelectedArray.hasOwnProperty(prop)) {
selectionAvailable[prop] = name;
}
});
// now add the lists back
jQuery.each( selectionTrackerArray, function( tId, tKey ) {
if (jQuery('#'+tId).length) {
jQuery('#'+tId).append('<option
value="'+tKey+'">'+selectionSelectedArray[tKey]+'</option>');
jQuery.each( selectionAvailable, function( aKey, aValue ) {
jQuery('#'+tId).append('<option
value="'+aKey+'">'+aValue+'</option>');
});
jQuery('#'+tId).val(tKey);
jQuery('#'+tId).trigger('liszt:updated');
}
});
}
function rowWatcher() {
jQuery(document).on('subform-row-remove', function(event, row){
// we first chck if this is a method call
var valid_call =
jQuery(row.innerHTML).find('.method_selection_list').attr('id');
var type_call = 'method';
if (!isSet(valid_call)){
// now lets see if this is a property call
var valid_call =
jQuery(row.innerHTML).find('.property_selection_list').attr('id');
var type_call = 'property';
}
// so lets update selection if call valid
if (isSet(valid_call)){
selectedIdRemoved[type_call] = valid_call;
selectionDynamicUpdate(type_call);
// also remove from code
var valid_value = jQuery(row.innerHTML).find('#' + valid_call
+ ' option:selected').val();
if (valid_value === '') {
valid_value = selectionMemory[type_call][valid_call];
}
// remove the code // we first check local memory
var _result =
jQuery.jStorage.get('code_4_'+type_call+'_'+valid_value,
null);
if (_result) {
// now remove the code
if (removeCodeFromEditor(_result, 'jform_main_class_code'))
{
selectionMemory[type_call][valid_call] = 0;
}
} else {
// now get the code
getCodeFrom_server(valid_value, type_call, 'type',
'getClassCode').then(function(result) {
if(result){
if (removeCodeFromEditor(result, 'jform_main_class_code'))
{
selectionMemory[type_call][valid_call] = 0;;
}
// add result to local memory
jQuery.jStorage.set('code_4_'+type_call+'_'+valid_value,
result, {TTL: expire});
}
});
}
}
});
jQuery(document).on('subform-row-add', function(event, row){
// we first chck if this is a method call
var valid_call =
jQuery(row.innerHTML).find('.method_selection_list').attr('id');
var type_call = 'method';
if (!isSet(valid_call)){
// now lets see if this is a property call
var valid_call =
jQuery(row.innerHTML).find('.property_selection_list').attr('id');
var type_call = 'property';
}
// so lets update selection if call valid
if (isSet(valid_call)){
selectedIdRemoved[type_call] = 'not';
selectionDynamicUpdate(type_call);
}
});
}
function propertyIsSet(prop, id, type) {
var i;
for (i = 0; i < 70; i++) { // for now this is the number of field we
should check
// build ID
var id_check =
'jform_'+type+'_selection'+'__'+type+'_selection'+i+'__'+type;
// first check if Id is on page as that not the same as the one currently
calling
if (jQuery("#"+id_check).length && id_check != id) {
// get the property value
var tmp = jQuery("#"+id_check+"
option:selected").val();
// now validate
if (tmp === prop) {
return true;
}
}
}
return false;
}
function addCodeToEditor(code_string, editor_id, merge, merge_target){
if (Joomla.editors.instances.hasOwnProperty(editor_id)) {
var old_code_string = Joomla.editors.instances[editor_id].getValue();
if (merge && old_code_string.length > 0) {
// make sure not to load the same string twice
if (old_code_string.indexOf(code_string) == -1) {
if ('prepend' === merge_target) {
var _string = code_string + "\n\n" + old_code_string;
} else if (merge_target && 'append' !== merge_target)
{
var old_code_array = old_code_string.split(merge_target);
if (old_code_array.length > 1) {
var _string = old_code_array.shift() + "\n\n" + code_string
+ "\n\n" + merge_target + old_code_array.join(merge_target);
} else {
var _string = code_string + "\n\n" + merge_target +
old_code_array.join('');
}
} else {
var _string = old_code_string + "\n\n" + code_string;
}
Joomla.editors.instances[editor_id].setValue(_string.trim());
return true;
}
} else {
Joomla.editors.instances[editor_id].setValue(code_string.trim());
return true;
}
} else {
var old_code_string = jQuery('textarea#'+editor_id).val();
if (merge && old_code_string.length > 0) {
// make sure not to load the same string twice
if (old_code_string.indexOf(code_string) == -1) {
if ('prepend' === merge_target) {
var _string = code_string + "\n\n" + old_code_string;
} else if (merge_target && 'append' !== merge_target)
{
var old_code_array = old_code_string.split(merge_target);
if (old_code_array.length > 1) {
var _string = old_code_array.shift() + "\n\n" + code_string
+ "\n\n" + merge_target + old_code_array.join(merge_target);
} else {
var _string = code_string + "\n\n" + merge_target +
old_code_array.join('');
}
} else {
var _string = old_code_string + "\n\n" + code_string;
}
jQuery('textarea#'+editor_id).val(_string.trim());
return true;
}
} else {
jQuery('textarea#'+editor_id).val(code_string.trim());
return true;
}
}
return false;
}
function removeCodeFromEditor(code_string, editor_id){
if (Joomla.editors.instances.hasOwnProperty(editor_id)) {
var old_code_string = Joomla.editors.instances[editor_id].getValue();
if (old_code_string.length > 0) {
// make sure string is found
if (old_code_string.indexOf(code_string) !== -1) {
// remove the code
Joomla.editors.instances[editor_id].setValue(old_code_string.replace(code_string+"\n\n",'').replace("\n\n"+code_string,'').replace(code_string,''));
return true;
}
}
} else {
var old_code_string = jQuery('textarea#'+editor_id).val();
if (old_code_string.length > 0) {
// make sure string is found
if (old_code_string.indexOf(code_string) !== -1) {
// remove the code
jQuery('textarea#'+editor_id).val(old_code_string.replace(code_string+"\n\n",'').replace("\n\n"+code_string,'').replace(code_string,''));
return true;
}
}
}
return false;
}
function getLinked() {
getCodeFrom_server(1, 'type', 'type',
'getLinked').then(function(result) {
if (result.error) {
console.error(result.error);
} else if (result) {
document.getElementById('display_linked_to').innerHTML =
result;
}
});
}
function getEditCustomCodeButtons_server(id) {
var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod);
let requestParams = '';
if (token.length > 0 && id > 0) {
requestParams =
token+'=1&id='+id+'&return_here='+return_here;
}
// Construct URL with parameters for GET request
const urlWithParams = getUrl + '&' + requestParams;
// Using the Fetch API for the GET request
return fetch(urlWithParams, {
method: 'GET',
headers: {
'Content-Type': 'application/json'
}
}).then(response => {
if (!response.ok) {
throw new Error('Network response was not ok');
}
return response.json();
});
}
function getEditCustomCodeButtons() {
// Get the id using pure JavaScript
const id = document.querySelector("#jform_id").value;
getEditCustomCodeButtons_server(id).then(function(result) {
if (typeof result === 'object') {
Object.entries(result).forEach(([field, buttons]) => {
// Creating the div element for buttons
const div = document.createElement('div');
div.className = 'control-group';
div.innerHTML = '<div
class="control-label"><label>Add/Edit
Customcode</label></div><div class="controls
control-customcode-buttons-'+field+'"></div>';
// Insert the div before .control-wrapper-{field}
const insertBeforeElement =
document.querySelector(".control-wrapper-"+field);
insertBeforeElement.parentNode.insertBefore(div, insertBeforeElement);
// Adding buttons to the div
Object.entries(buttons).forEach(([name, button]) => {
const controlsDiv =
document.querySelector(".control-customcode-buttons-"+field);
controlsDiv.innerHTML += button;
});
});
}
}).catch(error => {
console.error('Error:', error);
});
}
joomla_plugin_files_folders_urls.js000064400000000606151167367500013723
0ustar00/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder
<https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights
reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
joomla_plugin_group.js000064400000000606151167367500011172 0ustar00/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder
<https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights
reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
joomla_plugin_updates.js000064400000000606151167367500011503 0ustar00/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder
<https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights
reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
jquery.json.min.js000064400000003545151167367500010175 0ustar00/*! jQuery
JSON plugin v2.5.1 */
!function($){"use strict";var
escape=/["\\\x00-\x1f\x7f-\x9f]/g,meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},hasOwn=Object.prototype.hasOwnProperty;$.toJSON="object"==typeof
JSON&&JSON.stringify?JSON.stringify:function(a){if(null===a)return"null";var
b,c,d,e,f=$.type(a);if("undefined"===f)return void
0;if("number"===f||"boolean"===f)return
String(a);if("string"===f)return
$.quoteString(a);if("function"==typeof a.toJSON)return
$.toJSON(a.toJSON());if("date"===f){var
g=a.getUTCMonth()+1,h=a.getUTCDate(),i=a.getUTCFullYear(),j=a.getUTCHours(),k=a.getUTCMinutes(),l=a.getUTCSeconds(),m=a.getUTCMilliseconds();return
10>g&&(g="0"+g),10>h&&(h="0"+h),10>j&&(j="0"+j),10>k&&(k="0"+k),10>l&&(l="0"+l),100>m&&(m="0"+m),10>m&&(m="0"+m),'"'+i+"-"+g+"-"+h+"T"+j+":"+k+":"+l+"."+m+'Z"'}if(b=[],$.isArray(a)){for(c=0;c<a.length;c++)b.push($.toJSON(a[c])||"null");return"["+b.join(",")+"]"}if("object"==typeof
a){for(c in a)if(hasOwn.call(a,c)){if(f=typeof
c,"number"===f)d='"'+c+'"';else{if("string"!==f)continue;d=$.quoteString(c)}f=typeof
a[c],"function"!==f&&"undefined"!==f&&(e=$.toJSON(a[c]),b.push(d+":"+e))}return"{"+b.join(",")+"}"}},$.evalJSON="object"==typeof
JSON&&JSON.parse?JSON.parse:function(str){return
eval("("+str+")")},$.secureEvalJSON="object"==typeof
JSON&&JSON.parse?JSON.parse:function(str){var
filtered=str.replace(/\\["\\\/bfnrtu]/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"");if(/^[\],:{}\s]*$/.test(filtered))return
eval("("+str+")");throw new SyntaxError("Error
parsing JSON, source is not valid.")},$.quoteString=function(a){return
a.match(escape)?'"'+a.replace(escape,function(a){var
b=meta[a];return"string"==typeof
b?b:(b=a.charCodeAt(),"\\u00"+Math.floor(b/16).toString(16)+(b%16).toString(16))})+'"':'"'+a+'"'}}(jQuery);jstorage.min.js000064400000017246151167367500007527
0ustar00(function(){function C(){var
a="{}";if("userDataBehavior"==f){g.load("jStorage");try{a=g.getAttribute("jStorage")}catch(b){}try{r=g.getAttribute("jStorage_update")}catch(c){}h.jStorage=a}D();x();E()}function
u(){var
a;clearTimeout(F);F=setTimeout(function(){if("localStorage"==f||"globalStorage"==f)a=h.jStorage_update;else
if("userDataBehavior"==f){g.load("jStorage");try{a=g.getAttribute("jStorage_update")}catch(b){}}if(a&&a!=r){r=a;var
l=p.parse(p.stringify(c.__jstorage_meta.CRC32)),k;C();k=p.parse(p.stringify(c.__jstorage_meta.CRC32));
var d,n=[],e=[];for(d in
l)l.hasOwnProperty(d)&&(k[d]?l[d]!=k[d]&&"2."==String(l[d]).substr(0,2)&&n.push(d):e.push(d));for(d
in
k)k.hasOwnProperty(d)&&(l[d]||n.push(d));s(n,"updated");s(e,"deleted")}},25)}function
s(a,b){a=[].concat(a||[]);var c,k,d,n;if("flushed"==b){a=[];for(c
in
m)m.hasOwnProperty(c)&&a.push(c);b="deleted"}c=0;for(d=a.length;c<d;c++){if(m[a[c]])for(k=0,n=m[a[c]].length;k<n;k++)m[a[c]][k](a[c],b);if(m["*"])for(k=0,n=m["*"].length;k<n;k++)m["*"][k](a[c],b)}}function
v(){var a=(+new Date).toString();
if("localStorage"==f||"globalStorage"==f)try{h.jStorage_update=a}catch(b){f=!1}else"userDataBehavior"==f&&(g.setAttribute("jStorage_update",a),g.save("jStorage"));u()}function
D(){if(h.jStorage)try{c=p.parse(String(h.jStorage))}catch(a){h.jStorage="{}"}else
h.jStorage="{}";z=h.jStorage?String(h.jStorage).length:0;c.__jstorage_meta||(c.__jstorage_meta={});c.__jstorage_meta.CRC32||(c.__jstorage_meta.CRC32={})}function
w(){if(c.__jstorage_meta.PubSub){for(var a=+new
Date-2E3,b=0,l=c.__jstorage_meta.PubSub.length;b<
l;b++)if(c.__jstorage_meta.PubSub[b][0]<=a){c.__jstorage_meta.PubSub.splice(b,c.__jstorage_meta.PubSub.length-b);break}c.__jstorage_meta.PubSub.length||delete
c.__jstorage_meta.PubSub}try{h.jStorage=p.stringify(c),g&&(g.setAttribute("jStorage",h.jStorage),g.save("jStorage")),z=h.jStorage?String(h.jStorage).length:0}catch(k){}}function
q(a){if("string"!=typeof a&&"number"!=typeof
a)throw new TypeError("Key name must be string or
numeric");if("__jstorage_meta"==a)throw new
TypeError("Reserved key name");
return!0}function x(){var
a,b,l,k,d=Infinity,n=!1,e=[];clearTimeout(G);if(c.__jstorage_meta&&"object"==typeof
c.__jstorage_meta.TTL){a=+new
Date;l=c.__jstorage_meta.TTL;k=c.__jstorage_meta.CRC32;for(b in
l)l.hasOwnProperty(b)&&(l[b]<=a?(delete l[b],delete k[b],delete
c[b],n=!0,e.push(b)):l[b]<d&&(d=l[b]));Infinity!=d&&(G=setTimeout(x,Math.min(d-a,2147483647)));n&&(w(),v(),s(e,"deleted"))}}function
E(){var a;if(c.__jstorage_meta.PubSub){var
b,l=A,k=[];for(a=c.__jstorage_meta.PubSub.length-1;0<=a;a--)b=
c.__jstorage_meta.PubSub[a],b[0]>A&&(l=b[0],k.unshift(b));for(a=k.length-1;0<=a;a--){b=k[a][1];var
d=k[a][2];if(t[b])for(var
n=0,e=t[b].length;n<e;n++)try{t[b][n](b,p.parse(p.stringify(d)))}catch(g){}}A=l}}var
y=window.jQuery||window.$||(window.$={}),p={parse:window.JSON&&(window.JSON.parse||window.JSON.decode)||String.prototype.evalJSON&&function(a){return
String(a).evalJSON()}||y.parseJSON||y.evalJSON,stringify:Object.toJSON||window.JSON&&(window.JSON.stringify||window.JSON.encode)||y.toJSON};if("function"!==
typeof p.parse||"function"!==typeof p.stringify)throw
Error("No JSON support found, include
//cdnjs.cloudflare.com/ajax/libs/json2/20110223/json2.js to page");var
c={__jstorage_meta:{CRC32:{}}},h={jStorage:"{}"},g=null,z=0,f=!1,m={},F=!1,r=0,t={},A=+new
Date,G,B={isXML:function(a){return(a=(a?a.ownerDocument||a:0).documentElement)?"HTML"!==a.nodeName:!1},encode:function(a){if(!this.isXML(a))return!1;try{return(new
XMLSerializer).serializeToString(a)}catch(b){try{return
a.xml}catch(c){}}return!1},
decode:function(a){var b="DOMParser"in window&&(new
DOMParser).parseFromString||window.ActiveXObject&&function(a){var
b=new
ActiveXObject("Microsoft.XMLDOM");b.async="false";b.loadXML(a);return
b};if(!b)return!1;a=b.call("DOMParser"in window&&new
DOMParser||window,a,"text/xml");return
this.isXML(a)?a:!1}};y.jStorage={version:"0.4.12",set:function(a,b,l){q(a);l=l||{};if("undefined"==typeof
b)return
this.deleteKey(a),b;if(B.isXML(b))b={_is_xml:!0,xml:B.encode(b)};else{if("function"==typeof
b)return;
b&&"object"==typeof
b&&(b=p.parse(p.stringify(b)))}c[a]=b;for(var
k=c.__jstorage_meta.CRC32,d=p.stringify(b),g=d.length,e=2538058380^g,h=0,f;4<=g;)f=d.charCodeAt(h)&255|(d.charCodeAt(++h)&255)<<8|(d.charCodeAt(++h)&255)<<16|(d.charCodeAt(++h)&255)<<24,f=1540483477*(f&65535)+((1540483477*(f>>>16)&65535)<<16),f^=f>>>24,f=1540483477*(f&65535)+((1540483477*(f>>>16)&65535)<<16),e=1540483477*(e&65535)+((1540483477*(e>>>16)&65535)<<16)^f,g-=4,++h;switch(g){case
3:e^=(d.charCodeAt(h+2)&255)<<16;case 2:e^=
(d.charCodeAt(h+1)&255)<<8;case
1:e^=d.charCodeAt(h)&255,e=1540483477*(e&65535)+((1540483477*(e>>>16)&65535)<<16)}e^=e>>>13;e=1540483477*(e&65535)+((1540483477*(e>>>16)&65535)<<16);k[a]="2."+((e^e>>>15)>>>0);this.setTTL(a,l.TTL||0);s(a,"updated");return
b},get:function(a,b){q(a);return a in
c?c[a]&&"object"==typeof
c[a]&&c[a]._is_xml?B.decode(c[a].xml):c[a]:"undefined"==typeof
b?null:b},deleteKey:function(a){q(a);return a in c?(delete
c[a],"object"==typeof c.__jstorage_meta.TTL&&a in
c.__jstorage_meta.TTL&&
delete c.__jstorage_meta.TTL[a],delete
c.__jstorage_meta.CRC32[a],w(),v(),s(a,"deleted"),!0):!1},setTTL:function(a,b){var
l=+new Date;q(a);b=Number(b)||0;return a in
c?(c.__jstorage_meta.TTL||(c.__jstorage_meta.TTL={}),0<b?c.__jstorage_meta.TTL[a]=l+b:delete
c.__jstorage_meta.TTL[a],w(),x(),v(),!0):!1},getTTL:function(a){var b=+new
Date;q(a);return a in
c&&c.__jstorage_meta.TTL&&c.__jstorage_meta.TTL[a]?(a=c.__jstorage_meta.TTL[a]-b)||0:0},flush:function(){c={__jstorage_meta:{CRC32:{}}};w();v();s(null,
"flushed");return!0},storageObj:function(){function
a(){}a.prototype=c;return new a},index:function(){var a=[],b;for(b in
c)c.hasOwnProperty(b)&&"__jstorage_meta"!=b&&a.push(b);return
a},storageSize:function(){return z},currentBackend:function(){return
f},storageAvailable:function(){return!!f},listenKeyChange:function(a,b){q(a);m[a]||(m[a]=[]);m[a].push(b)},stopListening:function(a,b){q(a);if(m[a])if(b)for(var
c=m[a].length-1;0<=c;c--)m[a][c]==b&&m[a].splice(c,1);else
delete m[a]},subscribe:function(a,
b){a=(a||"").toString();if(!a)throw new TypeError("Channel
not
defined");t[a]||(t[a]=[]);t[a].push(b)},publish:function(a,b){a=(a||"").toString();if(!a)throw
new TypeError("Channel not
defined");c.__jstorage_meta||(c.__jstorage_meta={});c.__jstorage_meta.PubSub||(c.__jstorage_meta.PubSub=[]);c.__jstorage_meta.PubSub.unshift([+new
Date,a,b]);w();v()},reInit:function(){C()},noConflict:function(a){delete
window.$.jStorage;a&&(window.jStorage=this);return
this}};(function(){var a=!1;if("localStorage"in
window)try{window.localStorage.setItem("_tmptest","tmpval"),a=!0,window.localStorage.removeItem("_tmptest")}catch(b){}if(a)try{window.localStorage&&(h=window.localStorage,f="localStorage",r=h.jStorage_update)}catch(c){}else
if("globalStorage"in
window)try{window.globalStorage&&(h="localhost"==window.location.hostname?window.globalStorage["localhost.localdomain"]:window.globalStorage[window.location.hostname],f="globalStorage",r=h.jStorage_update)}catch(k){}else
if(g=document.createElement("link"),
g.addBehavior){g.style.behavior="url(#default#userData)";document.getElementsByTagName("head")[0].appendChild(g);try{g.load("jStorage")}catch(d){g.setAttribute("jStorage","{}"),g.save("jStorage"),g.load("jStorage")}a="{}";try{a=g.getAttribute("jStorage")}catch(m){}try{r=g.getAttribute("jStorage_update")}catch(e){}h.jStorage=a;f="userDataBehavior"}else{g=null;return}D();x();"localStorage"==f||"globalStorage"==f?"addEventListener"in
window?window.addEventListener("storage",u,!1):document.attachEvent("onstorage",
u):"userDataBehavior"==f&&setInterval(u,1E3);E();"addEventListener"in
window&&window.addEventListener("pageshow",function(a){a.persisted&&u()},!1)})()})();language.js000064400000000606151167367500006702
0ustar00/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder
<https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights
reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
language_translation.js000064400000002503151167367500011316 0ustar00/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder
<https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights
reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
jQuery(document).ready(function($)
{
// set button to add more languages
addButton('language','entranslation');
});
function addData(result,where){
jQuery(result).insertAfter(jQuery(where).closest('.control-group'));
}
function addButton_server(type, size){
var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getButton&format=json&raw=true&vdm="+vastDevMod);
if(token.length > 0 && type.length > 0){
var request =
token+'=1&type='+type+'&size='+size;
}
return jQuery.ajax({
type: 'GET',
url: getUrl,
dataType: 'json',
data: request,
jsonp: false
});
}
function addButton(type, where, size){
// just to insure that default behaviour still works
size = typeof size !== 'undefined' ? size : 1;
addButton_server(type, size).done(function(result) {
if(result){
if (2 == size) {
jQuery('#'+where).html(result);
} else {
addData(result, '#jform_'+where);
}
}
})
}
layout.js000064400000017615151167367500006444 0ustar00/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder
<https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights
reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
// Initial Script
document.addEventListener('DOMContentLoaded', function()
{
var add_php_view_vvvvvzf = jQuery("#jform_add_php_view
input[type='radio']:checked").val();
vvvvvzf(add_php_view_vvvvvzf);
});
// the vvvvvzf function
function vvvvvzf(add_php_view_vvvvvzf)
{
// set the function logic
if (add_php_view_vvvvvzf == 1)
{
jQuery('#jform_php_view-lbl').closest('.control-group').show();
}
else
{
jQuery('#jform_php_view-lbl').closest('.control-group').hide();
}
}
// the isSet function
function isSet(val)
{
if ((val != undefined) && (val != null) && 0 !==
val.length){
return true;
}
return false;
}
jQuery(document).ready(function($)
{
// check and load all the custom code edit buttons
getEditCustomCodeButtons();
});
function getCodeFrom_server(id, type, type_name, callingName) {
var url = "index.php?option=com_componentbuilder&task=ajax."
+ callingName +
"&format=json&raw=true&vdm="+vastDevMod;
if (token.length > 0 && id > 0 && type.length >
0) {
url += '&' + token + '=1&' + type_name +
'=' + type + '&id=' + id;
}
var getUrl = JRouter(url);
return fetch(getUrl, {
method: 'GET',
headers: {
'Content-Type': 'application/json'
}
}).then(function(response) {
if (response.ok) {
return response.json();
} else {
throw new Error('Network response was not ok');
}
}).then(function(data) {
return data;
}).catch(function(error) {
console.error('There was a problem with the fetch operation:',
error);
});
}
function getEditCustomCodeButtons_server(id) {
var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod);
let requestParams = '';
if (token.length > 0 && id > 0) {
requestParams =
token+'=1&id='+id+'&return_here='+return_here;
}
// Construct URL with parameters for GET request
const urlWithParams = getUrl + '&' + requestParams;
// Using the Fetch API for the GET request
return fetch(urlWithParams, {
method: 'GET',
headers: {
'Content-Type': 'application/json'
}
}).then(response => {
if (!response.ok) {
throw new Error('Network response was not ok');
}
return response.json();
});
}
function getEditCustomCodeButtons() {
// Get the id using pure JavaScript
const id = document.querySelector("#jform_id").value;
getEditCustomCodeButtons_server(id).then(function(result) {
if (typeof result === 'object') {
Object.entries(result).forEach(([field, buttons]) => {
// Creating the div element for buttons
const div = document.createElement('div');
div.className = 'control-group';
div.innerHTML = '<div
class="control-label"><label>Add/Edit
Customcode</label></div><div class="controls
control-customcode-buttons-'+field+'"></div>';
// Insert the div before .control-wrapper-{field}
const insertBeforeElement =
document.querySelector(".control-wrapper-"+field);
insertBeforeElement.parentNode.insertBefore(div, insertBeforeElement);
// Adding buttons to the div
Object.entries(buttons).forEach(([name, button]) => {
const controlsDiv =
document.querySelector(".control-customcode-buttons-"+field);
controlsDiv.innerHTML += button;
});
});
}
}).catch(error => {
console.error('Error:', error);
});
}
function getSnippetDetails(id){
getCodeFrom_server(id, '_type', '_type',
'snippetDetails').then(function(result) {
if(result.snippet){
var description = '';
if (result.description.length > 0) {
description =
'<p>'+result.description+'</p>';
}
var library = '';
if (result.library.length > 0) {
library = '
<b>('+result.library+')</b>';
}
var code = '<div
id="snippet-code"><b>'+result.name+'
('+result.type+')</b> <a
href="'+result.url+'" target="_blank" >see
more details'+library+'</a><br
/><em>'+result.heading+'</em><br
/><textarea id="snippet" class="span12"
rows="11">'+result.snippet+'</textarea></div>';
jQuery('#snippet-code').remove();
jQuery('.snippet-code').append(code);
// make sure the code block is active
jQuery("#snippet").focus(function() {
var jQuerythis = jQuery(this);
jQuerythis.select();
// Work around Chrome's little problem
jQuerythis.mouseup(function() {
// Prevent further mouseup intervention
jQuerythis.unbind("mouseup");
return false;
});
});
}
if(result.usage){
var usage = '<div
id="snippet-usage"><p>'+result.usage+'</p></div>';
jQuery('#snippet-usage').remove();
jQuery('.snippet-usage').append(usage);
}
})
}
function getDynamicValues_server(dynamicId){
var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getDynamicValues&format=json");
if(token.length > 0 && dynamicId > 0){
var request = token+'=1&view=layout&id='+dynamicId;
}
return jQuery.ajax({
type: 'GET',
url: getUrl,
dataType: 'jsonp',
data: request,
jsonp: 'callback'
});
}
function getDynamicValues(id){
getDynamicValues_server(id).done(function(result) {
if(result){
jQuery('#dynamic_values').remove();
jQuery('.dynamic_values').append('<div
id="dynamic_values">'+result+'</div>');
// make sure the code bocks are active
jQuery("code").click(function() {
jQuery(this).selText().addClass("selected");
});
}
})
}
function getLayoutDetails_server(id){
var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getLayoutDetails&format=json&vdm="+vastDevMod);
if(token.length > 0 && id > 0){
var request = token+'=1&id='+id;
}
return jQuery.ajax({
type: 'GET',
url: getUrl,
dataType: 'jsonp',
data: request,
jsonp: 'callback'
});
}
function getLayoutDetails(id){
getLayoutDetails_server(id).done(function(result) {
if(result){
jQuery('#details').append(result);
// make sure the code bocks are active
jQuery("code").click(function() {
jQuery(this).selText().addClass("selected");
});
}
})
}
// set snippets that are on the page
var snippetIds = [];
var snippets = {};
var snippet = 0;
jQuery(document).ready(function($)
{
jQuery("#jform_snippet option").each(function()
{
var key = jQuery(this).val();
var text = jQuery(this).text();
snippets[key] = text;
snippetIds.push(key);
});
snippet = jQuery("#jform_snippet").val();
getSnippets();
});
function getSnippets(){
jQuery("#loading").show();
// clear the selection
jQuery('#jform_snippet').find('option').remove().end();
jQuery('#jform_snippet').trigger('liszt:updated');
// get libraries value if set
var libraries = jQuery("#jform_libraries").val();
if (libraries) {
getCodeFrom_server(1, JSON.stringify(libraries), 'libraries',
'getSnippets').then(function(result) {
setSnippets(result);
jQuery("#loading").hide();
if (typeof snippetButton !== 'undefined') {
// ensure button is correct
var snippet = jQuery('#jform_snippet').val();
snippetButton(snippet);
}
});
}
else
{
// load all snippets in none is selected
setSnippets(snippetIds);
jQuery("#loading").hide();
}
}
function setSnippets(array){
if (array) {
jQuery('#jform_snippet').append('<option
value="">'+select_a_snippet+'</option>');
jQuery.each( array, function( i, id ) {
if (id in snippets) {
jQuery('#jform_snippet').append('<option
value="'+id+'">'+snippets[id]+'</option>');
}
if (id == snippet) {
jQuery('#jform_snippet').val(id);
}
});
} else {
jQuery('#jform_snippet').append('<option
value="">'+create_a_snippet+'</option>');
}
jQuery('#jform_snippet').trigger('liszt:updated');
}
library.js000064400000062272151167367500006572 0ustar00/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder
<https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights
reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
// Some Global Values
jform_vvvvwapvxb_required = false;
jform_vvvvwbdvxc_required = false;
jform_vvvvwbdvxd_required = false;
// Initial Script
document.addEventListener('DOMContentLoaded', function()
{
var how_vvvvwan = jQuery("#jform_how").val();
var target_vvvvwan = jQuery("#jform_target
input[type='radio']:checked").val();
vvvvwan(how_vvvvwan,target_vvvvwan);
var how_vvvvwap = jQuery("#jform_how").val();
var target_vvvvwap = jQuery("#jform_target
input[type='radio']:checked").val();
vvvvwap(how_vvvvwap,target_vvvvwap);
var how_vvvvwar = jQuery("#jform_how").val();
var target_vvvvwar = jQuery("#jform_target
input[type='radio']:checked").val();
vvvvwar(how_vvvvwar,target_vvvvwar);
var how_vvvvwat = jQuery("#jform_how").val();
var target_vvvvwat = jQuery("#jform_target
input[type='radio']:checked").val();
vvvvwat(how_vvvvwat,target_vvvvwat);
var how_vvvvwav = jQuery("#jform_how").val();
var target_vvvvwav = jQuery("#jform_target
input[type='radio']:checked").val();
vvvvwav(how_vvvvwav,target_vvvvwav);
var target_vvvvwaw = jQuery("#jform_target
input[type='radio']:checked").val();
var how_vvvvwaw = jQuery("#jform_how").val();
vvvvwaw(target_vvvvwaw,how_vvvvwaw);
var how_vvvvwax = jQuery("#jform_how").val();
var target_vvvvwax = jQuery("#jform_target
input[type='radio']:checked").val();
vvvvwax(how_vvvvwax,target_vvvvwax);
var target_vvvvway = jQuery("#jform_target
input[type='radio']:checked").val();
var how_vvvvway = jQuery("#jform_how").val();
vvvvway(target_vvvvway,how_vvvvway);
var how_vvvvwaz = jQuery("#jform_how").val();
var target_vvvvwaz = jQuery("#jform_target
input[type='radio']:checked").val();
vvvvwaz(how_vvvvwaz,target_vvvvwaz);
var target_vvvvwba = jQuery("#jform_target
input[type='radio']:checked").val();
var how_vvvvwba = jQuery("#jform_how").val();
vvvvwba(target_vvvvwba,how_vvvvwba);
var target_vvvvwbb = jQuery("#jform_target
input[type='radio']:checked").val();
var type_vvvvwbb = jQuery("#jform_type
input[type='radio']:checked").val();
vvvvwbb(target_vvvvwbb,type_vvvvwbb);
var target_vvvvwbd = jQuery("#jform_target
input[type='radio']:checked").val();
vvvvwbd(target_vvvvwbd);
var target_vvvvwbe = jQuery("#jform_target
input[type='radio']:checked").val();
vvvvwbe(target_vvvvwbe);
});
// the vvvvwan function
function vvvvwan(how_vvvvwan,target_vvvvwan)
{
if (isSet(how_vvvvwan) && how_vvvvwan.constructor !== Array)
{
var temp_vvvvwan = how_vvvvwan;
var how_vvvvwan = [];
how_vvvvwan.push(temp_vvvvwan);
}
else if (!isSet(how_vvvvwan))
{
var how_vvvvwan = [];
}
var how = how_vvvvwan.some(how_vvvvwan_SomeFunc);
if (isSet(target_vvvvwan) && target_vvvvwan.constructor !== Array)
{
var temp_vvvvwan = target_vvvvwan;
var target_vvvvwan = [];
target_vvvvwan.push(temp_vvvvwan);
}
else if (!isSet(target_vvvvwan))
{
var target_vvvvwan = [];
}
var target = target_vvvvwan.some(target_vvvvwan_SomeFunc);
// set this function logic
if (how && target)
{
jQuery('#jform_addconditions-lbl').closest('.control-group').show();
}
else
{
jQuery('#jform_addconditions-lbl').closest('.control-group').hide();
}
}
// the vvvvwan Some function
function how_vvvvwan_SomeFunc(how_vvvvwan)
{
// set the function logic
if (how_vvvvwan == 2)
{
return true;
}
return false;
}
// the vvvvwan Some function
function target_vvvvwan_SomeFunc(target_vvvvwan)
{
// set the function logic
if (target_vvvvwan == 1)
{
return true;
}
return false;
}
// the vvvvwap function
function vvvvwap(how_vvvvwap,target_vvvvwap)
{
if (isSet(how_vvvvwap) && how_vvvvwap.constructor !== Array)
{
var temp_vvvvwap = how_vvvvwap;
var how_vvvvwap = [];
how_vvvvwap.push(temp_vvvvwap);
}
else if (!isSet(how_vvvvwap))
{
var how_vvvvwap = [];
}
var how = how_vvvvwap.some(how_vvvvwap_SomeFunc);
if (isSet(target_vvvvwap) && target_vvvvwap.constructor !== Array)
{
var temp_vvvvwap = target_vvvvwap;
var target_vvvvwap = [];
target_vvvvwap.push(temp_vvvvwap);
}
else if (!isSet(target_vvvvwap))
{
var target_vvvvwap = [];
}
var target = target_vvvvwap.some(target_vvvvwap_SomeFunc);
// set this function logic
if (how && target)
{
jQuery('#jform_php_setdocument').closest('.control-group').show();
// add required attribute to php_setdocument field
if (jform_vvvvwapvxb_required)
{
updateFieldRequired('php_setdocument',0);
jQuery('#jform_php_setdocument').prop('required','required');
jQuery('#jform_php_setdocument').attr('aria-required',true);
jQuery('#jform_php_setdocument').addClass('required');
jform_vvvvwapvxb_required = false;
}
}
else
{
jQuery('#jform_php_setdocument').closest('.control-group').hide();
// remove required attribute from php_setdocument field
if (!jform_vvvvwapvxb_required)
{
updateFieldRequired('php_setdocument',1);
jQuery('#jform_php_setdocument').removeAttr('required');
jQuery('#jform_php_setdocument').removeAttr('aria-required');
jQuery('#jform_php_setdocument').removeClass('required');
jform_vvvvwapvxb_required = true;
}
}
}
// the vvvvwap Some function
function how_vvvvwap_SomeFunc(how_vvvvwap)
{
// set the function logic
if (how_vvvvwap == 3)
{
return true;
}
return false;
}
// the vvvvwap Some function
function target_vvvvwap_SomeFunc(target_vvvvwap)
{
// set the function logic
if (target_vvvvwap == 1)
{
return true;
}
return false;
}
// the vvvvwar function
function vvvvwar(how_vvvvwar,target_vvvvwar)
{
if (isSet(how_vvvvwar) && how_vvvvwar.constructor !== Array)
{
var temp_vvvvwar = how_vvvvwar;
var how_vvvvwar = [];
how_vvvvwar.push(temp_vvvvwar);
}
else if (!isSet(how_vvvvwar))
{
var how_vvvvwar = [];
}
var how = how_vvvvwar.some(how_vvvvwar_SomeFunc);
if (isSet(target_vvvvwar) && target_vvvvwar.constructor !== Array)
{
var temp_vvvvwar = target_vvvvwar;
var target_vvvvwar = [];
target_vvvvwar.push(temp_vvvvwar);
}
else if (!isSet(target_vvvvwar))
{
var target_vvvvwar = [];
}
var target = target_vvvvwar.some(target_vvvvwar_SomeFunc);
// set this function logic
if (how && target)
{
jQuery('.note_display_library_config').closest('.control-group').show();
}
else
{
jQuery('.note_display_library_config').closest('.control-group').hide();
}
}
// the vvvvwar Some function
function how_vvvvwar_SomeFunc(how_vvvvwar)
{
// set the function logic
if (how_vvvvwar == 2 || how_vvvvwar == 3)
{
return true;
}
return false;
}
// the vvvvwar Some function
function target_vvvvwar_SomeFunc(target_vvvvwar)
{
// set the function logic
if (target_vvvvwar == 1)
{
return true;
}
return false;
}
// the vvvvwat function
function vvvvwat(how_vvvvwat,target_vvvvwat)
{
if (isSet(how_vvvvwat) && how_vvvvwat.constructor !== Array)
{
var temp_vvvvwat = how_vvvvwat;
var how_vvvvwat = [];
how_vvvvwat.push(temp_vvvvwat);
}
else if (!isSet(how_vvvvwat))
{
var how_vvvvwat = [];
}
var how = how_vvvvwat.some(how_vvvvwat_SomeFunc);
if (isSet(target_vvvvwat) && target_vvvvwat.constructor !== Array)
{
var temp_vvvvwat = target_vvvvwat;
var target_vvvvwat = [];
target_vvvvwat.push(temp_vvvvwat);
}
else if (!isSet(target_vvvvwat))
{
var target_vvvvwat = [];
}
var target = target_vvvvwat.some(target_vvvvwat_SomeFunc);
// set this function logic
if (how && target)
{
jQuery('.note_display_library_files_folders_urls').closest('.control-group').show();
}
else
{
jQuery('.note_display_library_files_folders_urls').closest('.control-group').hide();
}
}
// the vvvvwat Some function
function how_vvvvwat_SomeFunc(how_vvvvwat)
{
// set the function logic
if (how_vvvvwat == 1 || how_vvvvwat == 2 || how_vvvvwat == 3)
{
return true;
}
return false;
}
// the vvvvwat Some function
function target_vvvvwat_SomeFunc(target_vvvvwat)
{
// set the function logic
if (target_vvvvwat == 1)
{
return true;
}
return false;
}
// the vvvvwav function
function vvvvwav(how_vvvvwav,target_vvvvwav)
{
if (isSet(how_vvvvwav) && how_vvvvwav.constructor !== Array)
{
var temp_vvvvwav = how_vvvvwav;
var how_vvvvwav = [];
how_vvvvwav.push(temp_vvvvwav);
}
else if (!isSet(how_vvvvwav))
{
var how_vvvvwav = [];
}
var how = how_vvvvwav.some(how_vvvvwav_SomeFunc);
if (isSet(target_vvvvwav) && target_vvvvwav.constructor !== Array)
{
var temp_vvvvwav = target_vvvvwav;
var target_vvvvwav = [];
target_vvvvwav.push(temp_vvvvwav);
}
else if (!isSet(target_vvvvwav))
{
var target_vvvvwav = [];
}
var target = target_vvvvwav.some(target_vvvvwav_SomeFunc);
// set this function logic
if (how && target)
{
jQuery('.note_no_behaviour_one').closest('.control-group').show();
jQuery('.note_no_behaviour_three').closest('.control-group').show();
jQuery('.note_no_behaviour_two').closest('.control-group').show();
}
else
{
jQuery('.note_no_behaviour_one').closest('.control-group').hide();
jQuery('.note_no_behaviour_three').closest('.control-group').hide();
jQuery('.note_no_behaviour_two').closest('.control-group').hide();
}
}
// the vvvvwav Some function
function how_vvvvwav_SomeFunc(how_vvvvwav)
{
// set the function logic
if (how_vvvvwav == 0)
{
return true;
}
return false;
}
// the vvvvwav Some function
function target_vvvvwav_SomeFunc(target_vvvvwav)
{
// set the function logic
if (target_vvvvwav == 1)
{
return true;
}
return false;
}
// the vvvvwaw function
function vvvvwaw(target_vvvvwaw,how_vvvvwaw)
{
if (isSet(target_vvvvwaw) && target_vvvvwaw.constructor !== Array)
{
var temp_vvvvwaw = target_vvvvwaw;
var target_vvvvwaw = [];
target_vvvvwaw.push(temp_vvvvwaw);
}
else if (!isSet(target_vvvvwaw))
{
var target_vvvvwaw = [];
}
var target = target_vvvvwaw.some(target_vvvvwaw_SomeFunc);
if (isSet(how_vvvvwaw) && how_vvvvwaw.constructor !== Array)
{
var temp_vvvvwaw = how_vvvvwaw;
var how_vvvvwaw = [];
how_vvvvwaw.push(temp_vvvvwaw);
}
else if (!isSet(how_vvvvwaw))
{
var how_vvvvwaw = [];
}
var how = how_vvvvwaw.some(how_vvvvwaw_SomeFunc);
// set this function logic
if (target && how)
{
jQuery('.note_no_behaviour_one').closest('.control-group').show();
jQuery('.note_no_behaviour_three').closest('.control-group').show();
jQuery('.note_no_behaviour_two').closest('.control-group').show();
}
else
{
jQuery('.note_no_behaviour_one').closest('.control-group').hide();
jQuery('.note_no_behaviour_three').closest('.control-group').hide();
jQuery('.note_no_behaviour_two').closest('.control-group').hide();
}
}
// the vvvvwaw Some function
function target_vvvvwaw_SomeFunc(target_vvvvwaw)
{
// set the function logic
if (target_vvvvwaw == 1)
{
return true;
}
return false;
}
// the vvvvwaw Some function
function how_vvvvwaw_SomeFunc(how_vvvvwaw)
{
// set the function logic
if (how_vvvvwaw == 0)
{
return true;
}
return false;
}
// the vvvvwax function
function vvvvwax(how_vvvvwax,target_vvvvwax)
{
if (isSet(how_vvvvwax) && how_vvvvwax.constructor !== Array)
{
var temp_vvvvwax = how_vvvvwax;
var how_vvvvwax = [];
how_vvvvwax.push(temp_vvvvwax);
}
else if (!isSet(how_vvvvwax))
{
var how_vvvvwax = [];
}
var how = how_vvvvwax.some(how_vvvvwax_SomeFunc);
if (isSet(target_vvvvwax) && target_vvvvwax.constructor !== Array)
{
var temp_vvvvwax = target_vvvvwax;
var target_vvvvwax = [];
target_vvvvwax.push(temp_vvvvwax);
}
else if (!isSet(target_vvvvwax))
{
var target_vvvvwax = [];
}
var target = target_vvvvwax.some(target_vvvvwax_SomeFunc);
// set this function logic
if (how && target)
{
jQuery('.note_yes_behaviour_one').closest('.control-group').show();
jQuery('.note_yes_behaviour_two').closest('.control-group').show();
}
else
{
jQuery('.note_yes_behaviour_one').closest('.control-group').hide();
jQuery('.note_yes_behaviour_two').closest('.control-group').hide();
}
}
// the vvvvwax Some function
function how_vvvvwax_SomeFunc(how_vvvvwax)
{
// set the function logic
if (how_vvvvwax == 1)
{
return true;
}
return false;
}
// the vvvvwax Some function
function target_vvvvwax_SomeFunc(target_vvvvwax)
{
// set the function logic
if (target_vvvvwax == 1)
{
return true;
}
return false;
}
// the vvvvway function
function vvvvway(target_vvvvway,how_vvvvway)
{
if (isSet(target_vvvvway) && target_vvvvway.constructor !== Array)
{
var temp_vvvvway = target_vvvvway;
var target_vvvvway = [];
target_vvvvway.push(temp_vvvvway);
}
else if (!isSet(target_vvvvway))
{
var target_vvvvway = [];
}
var target = target_vvvvway.some(target_vvvvway_SomeFunc);
if (isSet(how_vvvvway) && how_vvvvway.constructor !== Array)
{
var temp_vvvvway = how_vvvvway;
var how_vvvvway = [];
how_vvvvway.push(temp_vvvvway);
}
else if (!isSet(how_vvvvway))
{
var how_vvvvway = [];
}
var how = how_vvvvway.some(how_vvvvway_SomeFunc);
// set this function logic
if (target && how)
{
jQuery('.note_yes_behaviour_one').closest('.control-group').show();
jQuery('.note_yes_behaviour_two').closest('.control-group').show();
}
else
{
jQuery('.note_yes_behaviour_one').closest('.control-group').hide();
jQuery('.note_yes_behaviour_two').closest('.control-group').hide();
}
}
// the vvvvway Some function
function target_vvvvway_SomeFunc(target_vvvvway)
{
// set the function logic
if (target_vvvvway == 1)
{
return true;
}
return false;
}
// the vvvvway Some function
function how_vvvvway_SomeFunc(how_vvvvway)
{
// set the function logic
if (how_vvvvway == 1)
{
return true;
}
return false;
}
// the vvvvwaz function
function vvvvwaz(how_vvvvwaz,target_vvvvwaz)
{
if (isSet(how_vvvvwaz) && how_vvvvwaz.constructor !== Array)
{
var temp_vvvvwaz = how_vvvvwaz;
var how_vvvvwaz = [];
how_vvvvwaz.push(temp_vvvvwaz);
}
else if (!isSet(how_vvvvwaz))
{
var how_vvvvwaz = [];
}
var how = how_vvvvwaz.some(how_vvvvwaz_SomeFunc);
if (isSet(target_vvvvwaz) && target_vvvvwaz.constructor !== Array)
{
var temp_vvvvwaz = target_vvvvwaz;
var target_vvvvwaz = [];
target_vvvvwaz.push(temp_vvvvwaz);
}
else if (!isSet(target_vvvvwaz))
{
var target_vvvvwaz = [];
}
var target = target_vvvvwaz.some(target_vvvvwaz_SomeFunc);
// set this function logic
if (how && target)
{
jQuery('.note_build_in_behaviour_one').closest('.control-group').show();
jQuery('.note_build_in_behaviour_three').closest('.control-group').show();
jQuery('.note_build_in_behaviour_two').closest('.control-group').show();
}
else
{
jQuery('.note_build_in_behaviour_one').closest('.control-group').hide();
jQuery('.note_build_in_behaviour_three').closest('.control-group').hide();
jQuery('.note_build_in_behaviour_two').closest('.control-group').hide();
}
}
// the vvvvwaz Some function
function how_vvvvwaz_SomeFunc(how_vvvvwaz)
{
// set the function logic
if (how_vvvvwaz == 4)
{
return true;
}
return false;
}
// the vvvvwaz Some function
function target_vvvvwaz_SomeFunc(target_vvvvwaz)
{
// set the function logic
if (target_vvvvwaz == 1)
{
return true;
}
return false;
}
// the vvvvwba function
function vvvvwba(target_vvvvwba,how_vvvvwba)
{
if (isSet(target_vvvvwba) && target_vvvvwba.constructor !== Array)
{
var temp_vvvvwba = target_vvvvwba;
var target_vvvvwba = [];
target_vvvvwba.push(temp_vvvvwba);
}
else if (!isSet(target_vvvvwba))
{
var target_vvvvwba = [];
}
var target = target_vvvvwba.some(target_vvvvwba_SomeFunc);
if (isSet(how_vvvvwba) && how_vvvvwba.constructor !== Array)
{
var temp_vvvvwba = how_vvvvwba;
var how_vvvvwba = [];
how_vvvvwba.push(temp_vvvvwba);
}
else if (!isSet(how_vvvvwba))
{
var how_vvvvwba = [];
}
var how = how_vvvvwba.some(how_vvvvwba_SomeFunc);
// set this function logic
if (target && how)
{
jQuery('.note_build_in_behaviour_one').closest('.control-group').show();
jQuery('.note_build_in_behaviour_three').closest('.control-group').show();
jQuery('.note_build_in_behaviour_two').closest('.control-group').show();
}
else
{
jQuery('.note_build_in_behaviour_one').closest('.control-group').hide();
jQuery('.note_build_in_behaviour_three').closest('.control-group').hide();
jQuery('.note_build_in_behaviour_two').closest('.control-group').hide();
}
}
// the vvvvwba Some function
function target_vvvvwba_SomeFunc(target_vvvvwba)
{
// set the function logic
if (target_vvvvwba == 1)
{
return true;
}
return false;
}
// the vvvvwba Some function
function how_vvvvwba_SomeFunc(how_vvvvwba)
{
// set the function logic
if (how_vvvvwba == 4)
{
return true;
}
return false;
}
// the vvvvwbb function
function vvvvwbb(target_vvvvwbb,type_vvvvwbb)
{
// set the function logic
if (target_vvvvwbb == 1 && type_vvvvwbb == 2)
{
jQuery('#jform_libraries').closest('.control-group').show();
}
else
{
jQuery('#jform_libraries').closest('.control-group').hide();
}
}
// the vvvvwbd function
function vvvvwbd(target_vvvvwbd)
{
// set the function logic
if (target_vvvvwbd == 1)
{
jQuery('#jform_how').closest('.control-group').show();
// add required attribute to how field
if (jform_vvvvwbdvxc_required)
{
updateFieldRequired('how',0);
jQuery('#jform_how').prop('required','required');
jQuery('#jform_how').attr('aria-required',true);
jQuery('#jform_how').addClass('required');
jform_vvvvwbdvxc_required = false;
}
jQuery('#jform_type').closest('.control-group').show();
// add required attribute to type field
if (jform_vvvvwbdvxd_required)
{
updateFieldRequired('type',0);
jQuery('#jform_type').prop('required','required');
jQuery('#jform_type').attr('aria-required',true);
jQuery('#jform_type').addClass('required');
jform_vvvvwbdvxd_required = false;
}
}
else
{
jQuery('#jform_how').closest('.control-group').hide();
// remove required attribute from how field
if (!jform_vvvvwbdvxc_required)
{
updateFieldRequired('how',1);
jQuery('#jform_how').removeAttr('required');
jQuery('#jform_how').removeAttr('aria-required');
jQuery('#jform_how').removeClass('required');
jform_vvvvwbdvxc_required = true;
}
jQuery('#jform_type').closest('.control-group').hide();
// remove required attribute from type field
if (!jform_vvvvwbdvxd_required)
{
updateFieldRequired('type',1);
jQuery('#jform_type').removeAttr('required');
jQuery('#jform_type').removeAttr('aria-required');
jQuery('#jform_type').removeClass('required');
jform_vvvvwbdvxd_required = true;
}
}
}
// the vvvvwbe function
function vvvvwbe(target_vvvvwbe)
{
// set the function logic
if (target_vvvvwbe == 2)
{
jQuery('.note_yes_behaviour_library').closest('.control-group').show();
}
else
{
jQuery('.note_yes_behaviour_library').closest('.control-group').hide();
}
}
// update fields required
function updateFieldRequired(name, status) {
// check if not_required exist
if (document.getElementById('jform_not_required')) {
var not_required =
jQuery('#jform_not_required').val().split(",");
if(status == 1)
{
not_required.push(name);
}
else
{
not_required = removeFieldFromNotRequired(not_required, name);
}
jQuery('#jform_not_required').val(fixNotRequiredArray(not_required).toString());
}
}
// remove field from not_required
function removeFieldFromNotRequired(array, what) {
return array.filter(function(element){
return element !== what;
});
}
// fix not required array
function fixNotRequiredArray(array) {
var seen = {};
return removeEmptyFromNotRequiredArray(array).filter(function(item) {
return seen.hasOwnProperty(item) ? false : (seen[item] = true);
});
}
// remove empty from not_required array
function removeEmptyFromNotRequiredArray(array) {
return array.filter(function (el) {
// remove ( 一_一) as well - lol
return (el.length > 0 && '一_一' !== el);
});
}
// the isSet function
function isSet(val)
{
if ((val != undefined) && (val != null) && 0 !==
val.length){
return true;
}
return false;
}
jQuery(document).ready(function()
{
// get the linked details
getLinked();
// now load the displays
getAjaxDisplay('library_config');
getAjaxDisplay('library_files_folders_urls');
// check and load all the customcode edit buttons
setTimeout(getEditCustomCodeButtons, 300);
});
function addData(result,where){
jQuery(result).insertAfter(jQuery(where).closest('.control-group'));
}
function getAjaxDisplay(type){
getCodeFrom_server(1, type, 'type',
'getAjaxDisplay').then(function(result) {
if (result) {
jQuery('#display_'+type).html(result);
}
// set button
addButtonID(type,'header_'+type+'_buttons', 2); //
<-- little edit button
});
}
function getFieldSelectOptions(fieldKey){
// first check if the field is set
if(jQuery("#jform_addconditions__addconditions"+fieldKey+"__option_field").length)
{
var fieldId =
jQuery("#jform_addconditions__addconditions"+fieldKey+"__option_field
option:selected").val();
getCodeFrom_server(fieldId, 'type', 'type',
'fieldSelectOptions').then(function(result) {
if(result) {
jQuery('textarea#jform_addconditions__addconditions'+fieldKey+'__field_options').val(result);
} else {
jQuery('textarea#jform_addconditions__addconditions'+fieldKey+'__field_options').val('');
}
});
}
}
function getCodeFrom_server(id, type, type_name, callingName) {
var url = "index.php?option=com_componentbuilder&task=ajax."
+ callingName +
"&format=json&raw=true&vdm="+vastDevMod;
if (token.length > 0 && id > 0 && type.length >
0) {
url += '&' + token + '=1&' + type_name +
'=' + type + '&id=' + id;
}
var getUrl = JRouter(url);
return fetch(getUrl, {
method: 'GET',
headers: {
'Content-Type': 'application/json'
}
}).then(function(response) {
if (response.ok) {
return response.json();
} else {
throw new Error('Network response was not ok');
}
}).then(function(data) {
return data;
}).catch(function(error) {
console.error('There was a problem with the fetch operation:',
error);
});
}
function getEditCustomCodeButtons_server(id) {
var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod);
let requestParams = '';
if (token.length > 0 && id > 0) {
requestParams =
token+'=1&id='+id+'&return_here='+return_here;
}
// Construct URL with parameters for GET request
const urlWithParams = getUrl + '&' + requestParams;
// Using the Fetch API for the GET request
return fetch(urlWithParams, {
method: 'GET',
headers: {
'Content-Type': 'application/json'
}
}).then(response => {
if (!response.ok) {
throw new Error('Network response was not ok');
}
return response.json();
});
}
function getEditCustomCodeButtons() {
// Get the id using pure JavaScript
const id = document.querySelector("#jform_id").value;
getEditCustomCodeButtons_server(id).then(function(result) {
if (typeof result === 'object') {
Object.entries(result).forEach(([field, buttons]) => {
// Creating the div element for buttons
const div = document.createElement('div');
div.className = 'control-group';
div.innerHTML = '<div
class="control-label"><label>Add/Edit
Customcode</label></div><div class="controls
control-customcode-buttons-'+field+'"></div>';
// Insert the div before .control-wrapper-{field}
const insertBeforeElement =
document.querySelector(".control-wrapper-"+field);
insertBeforeElement.parentNode.insertBefore(div, insertBeforeElement);
// Adding buttons to the div
Object.entries(buttons).forEach(([name, button]) => {
const controlsDiv =
document.querySelector(".control-customcode-buttons-"+field);
controlsDiv.innerHTML += button;
});
});
}
}).catch(error => {
console.error('Error:', error);
});
}
function addButtonID_server(type, size){
var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getButtonID&format=json&raw=true&vdm="+vastDevMod);
if(token.length > 0 && type.length > 0 && size >
0){
var request =
token+'=1&type='+type+'&size='+size;
}
return jQuery.ajax({
type: 'GET',
url: getUrl,
dataType: 'json',
data: request,
jsonp: false
});
}
function addButtonID(type, where, size){
addButtonID_server(type, size).done(function(result) {
if(result){
if (2 == size) {
jQuery('#'+where).html(result);
} else {
addData(result, '#jform_'+where);
}
}
});
}
function addButton_server(type, size){
var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getButton&format=json&raw=true&vdm="+vastDevMod);
if(token.length > 0 && type.length > 0){
var request =
token+'=1&type='+type+'&size='+size;
}
return jQuery.ajax({
type: 'GET',
url: getUrl,
dataType: 'json',
data: request,
jsonp: false
});
}
function addButton(type, where, size){
// just to insure that default behaviour still works
size = typeof size !== 'undefined' ? size : 1;
addButton_server(type, size).done(function(result) {
if(result){
if (2 == size) {
jQuery('#'+where).html(result);
} else {
addData(result, '#jform_'+where);
}
}
})
}
function getLinked() {
getCodeFrom_server(1, 'type', 'type',
'getLinked').then(function(result) {
if (result.error) {
console.error(result.error);
} else if (result) {
document.getElementById('display_linked_to').innerHTML =
result;
}
});
}
library_config.js000064400000000606151167367500010110 0ustar00/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder
<https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights
reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
library_files_folders_urls.js000064400000000606151167367500012530
0ustar00/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder
<https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights
reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
marked.js000064400000135002151167367500006361 0ustar00/**
* marked - a markdown parser
* Copyright (c) 2011-2022, Christopher Jeffrey. (MIT Licensed)
* https://github.com/markedjs/marked
*/
!function(e,t){"object"==typeof
exports&&"undefined"!=typeof
module?t(exports):"function"==typeof
define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof
globalThis?globalThis:e||self).marked={})}(this,function(r){"use
strict";function i(e,t){for(var u=0;u<t.length;u++){var
n=t[u];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in
n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function
s(e,t){(null==t||t>e.length)&&(t=e.length);for(var u=0,n=new
Array(t);u<t;u++)n[u]=e[u];return n}function x(e,t){var
u="undefined"!=typeof
Symbol&&e[Symbol.iterator]||e["@@iterator"];if(u)return(u=u.call(e)).next.bind(u);if(Array.isArray(e)||(u=function(e,t){if(e){if("string"==typeof
e)return s(e,t);var
u=Object.prototype.toString.call(e).slice(8,-1);return"Map"===(u="Object"===u&&e.constructor?e.constructor.name:u)||"Set"===u?Array.from(e):"Arguments"===u||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(u)?s(e,t):void
0}}(e))||t&&e&&"number"==typeof
e.length){u&&(e=u);var n=0;return function(){return
n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new
TypeError("Invalid attempt to iterate non-iterable instance.\nIn order
to be iterable, non-array objects must have a [Symbol.iterator]()
method.")}function
e(){return{baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}r.defaults=e();function
u(e){return t[e]}var
n=/[&<>"']/,l=/[&<>"']/g,a=/[<>"']|&(?!#?\w+;)/,o=/[<>"']|&(?!#?\w+;)/g,t={"&":"&","<":"<",">":">",'"':""","'":"'"};function
D(e,t){if(t){if(n.test(e))return e.replace(l,u)}else if(a.test(e))return
e.replace(o,u);return e}var
c=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function m(e){return
e.replace(c,function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""})}var
h=/(^|[^\[])\^/g;function p(u,e){u=u.source||u,e=e||"";var
n={replace:function(e,t){return
t=(t=t.source||t).replace(h,"$1"),u=u.replace(e,t),n},getRegex:function(){return
new RegExp(u,e)}};return n}var
f=/[^\w:]/g,g=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function F(e,t,u){if(e){var
n;try{n=decodeURIComponent(m(u)).replace(f,"").toLowerCase()}catch(e){return
null}if(0===n.indexOf("javascript:")||0===n.indexOf("vbscript:")||0===n.indexOf("data:"))return
null}t&&!g.test(u)&&(u=function(e,t){A["
"+e]||(d.test(e)?A[" "+e]=e+"/":A["
"+e]=w(e,"/",!0));var u=-1===(e=A["
"+e]).indexOf(":");return"//"===t.substring(0,2)?u?t:e.replace(C,"$1")+t:"/"===t.charAt(0)?u?t:e.replace(k,"$1")+t:e+t}(t,u));try{u=encodeURI(u).replace(/%25/g,"%")}catch(e){return
null}return u}var
A={},d=/^[^:]+:\/*[^/]*$/,C=/^([^:]+:)[\s\S]*$/,k=/^([^:]+:\/*[^/]*)[\s\S]*$/;var
E={exec:function(){}};function b(e){for(var
t,u,n=1;n<arguments.length;n++)for(u in
t=arguments[n])Object.prototype.hasOwnProperty.call(t,u)&&(e[u]=t[u]);return
e}function B(e,t){var u=e.replace(/\|/g,function(e,t,u){for(var
n=!1,r=t;0<=--r&&"\\"===u[r];)n=!n;return
n?"|":" |"}).split(/
\|/),n=0;if(u[0].trim()||u.shift(),u[u.length-1].trim()||u.pop(),u.length>t)u.splice(t);else
for(;u.length<t;)u.push("");for(;n<u.length;n++)u[n]=u[n].trim().replace(/\\\|/g,"|");return
u}function w(e,t,u){var n=e.length;if(0===n)return"";for(var
r=0;r<n;){var i=e.charAt(n-r-1);if(i!==t||u){if(i===t||!u)break;r++}else
r++}return e.substr(0,n-r)}function
v(e){e&&e.sanitize&&!e.silent&&console.warn("marked():
sanitize and sanitizer parameters are deprecated since version 0.7.0,
should not be used and will be removed in the future. Read more here:
https://marked.js.org/#/USING_ADVANCED.md#options")}function
y(e,t){if(t<1)return"";for(var
u="";1<t;)1&t&&(u+=e),t>>=1,e+=e;return
u+e}function _(e,t,u,n){var
r=t.href,i=t.title?D(t.title):null,t=e[1].replace(/\\([\[\]])/g,"$1");if("!"===e[0].charAt(0))return{type:"image",raw:u,href:r,title:i,text:D(t)};n.state.inLink=!0;t={type:"link",raw:u,href:r,title:i,text:t,tokens:n.inlineTokens(t,[])};return
n.state.inLink=!1,t}var z=function(){function
e(e){this.options=e||r.defaults}var t=e.prototype;return
t.space=function(e){e=this.rules.block.newline.exec(e);if(e&&0<e[0].length)return{type:"space",raw:e[0]}},t.code=function(e){var
t=this.rules.block.code.exec(e);if(t){e=t[0].replace(/^
{1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:w(e,"\n")}}},t.fences=function(e){var
t=this.rules.block.fences.exec(e);if(t){var
u=t[0],e=function(e,t){if(null===(e=e.match(/^(\s+)(?:```)/)))return t;var
u=e[1];return t.split("\n").map(function(e){var
t=e.match(/^\s+/);return
null!==t&&t[0].length>=u.length?e.slice(u.length):e}).join("\n")}(u,t[3]||"");return{type:"code",raw:u,lang:t[2]&&t[2].trim(),text:e}}},t.heading=function(e){var
t=this.rules.block.heading.exec(e);if(t){var
u=t[2].trim();/#$/.test(u)&&(e=w(u,"#"),!this.options.pedantic&&e&&!/
$/.test(e)||(u=e.trim()));u={type:"heading",raw:t[0],depth:t[1].length,text:u,tokens:[]};return
this.lexer.inline(u.text,u.tokens),u}},t.hr=function(e){e=this.rules.block.hr.exec(e);if(e)return{type:"hr",raw:e[0]}},t.blockquote=function(e){var
t=this.rules.block.blockquote.exec(e);if(t){e=t[0].replace(/^ *>
?/gm,"");return{type:"blockquote",raw:t[0],tokens:this.lexer.blockTokens(e,[]),text:e}}},t.list=function(e){var
t=this.rules.block.list.exec(e);if(t){var
u,n,r,i,s,l,a,o,D,c,h,p=1<(g=t[1].trim()).length,f={type:"list",raw:"",ordered:p,start:p?+g.slice(0,-1):"",loose:!1,items:[]},g=p?"\\d{1,9}\\"+g.slice(-1):"\\"+g;this.options.pedantic&&(g=p?g:"[*+-]");for(var
F=new RegExp("^( {0,3}"+g+")((?:
[^\\n]*)?(?:\\n|$))");e&&(h=!1,t=F.exec(e))&&!this.rules.block.hr.test(e);){if(u=t[0],e=e.substring(u.length),a=t[2].split("\n",1)[0],o=e.split("\n",1)[0],this.options.pedantic?(i=2,c=a.trimLeft()):(i=t[2].search(/[^
]/),c=a.slice(i=4<i?1:i),i+=t[1].length),s=!1,!a&&/^
*$/.test(o)&&(u+=o+"\n",e=e.substring(o.length+1),h=!0),!h)for(var
A=new RegExp("^
{0,"+Math.min(3,i-1)+"}(?:[*+-]|\\d{1,9}[.)])");e&&(a=D=e.split("\n",1)[0],this.options.pedantic&&(a=a.replace(/^
{1,4}(?=( {4})*[^ ])/g," ")),!A.test(a));){if(a.search(/[^
]/)>=i||!a.trim())c+="\n"+a.slice(i);else{if(s)break;c+="\n"+a}s||a.trim()||(s=!0),u+=D+"\n",e=e.substring(D.length+1)}f.loose||(l?f.loose=!0:/\n
*\n *$/.test(u)&&(l=!0)),this.options.gfm&&(n=/^\[[ xX]\]
/.exec(c))&&(r="[ ] "!==n[0],c=c.replace(/^\[[ xX]\]
+/,"")),f.items.push({type:"list_item",raw:u,task:!!n,checked:r,loose:!1,text:c}),f.raw+=u}f.items[f.items.length-1].raw=u.trimRight(),f.items[f.items.length-1].text=c.trimRight(),f.raw=f.raw.trimRight();for(var
d=f.items.length,C=0;C<d;C++){this.lexer.state.top=!1,f.items[C].tokens=this.lexer.blockTokens(f.items[C].text,[]);var
k=f.items[C].tokens.filter(function(e){return"space"===e.type}),E=k.every(function(e){for(var
t,u=0,n=x(e.raw.split(""));!(t=n()).done;)if("\n"===t.value&&(u+=1),1<u)return!0;return!1});!f.loose&&k.length&&E&&(f.loose=!0,f.items[C].loose=!0)}return
f}},t.html=function(e){var
t=this.rules.block.html.exec(e);if(t){e={type:"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:t[0]};return
this.options.sanitize&&(e.type="paragraph",e.text=this.options.sanitizer?this.options.sanitizer(t[0]):D(t[0]),e.tokens=[],this.lexer.inline(e.text,e.tokens)),e}},t.def=function(e){e=this.rules.block.def.exec(e);if(e)return
e[3]&&(e[3]=e[3].substring(1,e[3].length-1)),{type:"def",tag:e[1].toLowerCase().replace(/\s+/g,"
"),raw:e[0],href:e[2],title:e[3]}},t.table=function(e){e=this.rules.block.table.exec(e);if(e){var
t={type:"table",header:B(e[1]).map(function(e){return{text:e}}),align:e[2].replace(/^
*|\| *$/g,"").split(/ *\| */),rows:e[3]?e[3].replace(/\n[
\t]*$/,"").split("\n"):[]};if(t.header.length===t.align.length){t.raw=e[0];for(var
u,n,r,i=t.align.length,s=0;s<i;s++)/^ *-+:
*$/.test(t.align[s])?t.align[s]="right":/^ *:-+:
*$/.test(t.align[s])?t.align[s]="center":/^ *:-+
*$/.test(t.align[s])?t.align[s]="left":t.align[s]=null;for(i=t.rows.length,s=0;s<i;s++)t.rows[s]=B(t.rows[s],t.header.length).map(function(e){return{text:e}});for(i=t.header.length,u=0;u<i;u++)t.header[u].tokens=[],this.lexer.inlineTokens(t.header[u].text,t.header[u].tokens);for(i=t.rows.length,u=0;u<i;u++)for(r=t.rows[u],n=0;n<r.length;n++)r[n].tokens=[],this.lexer.inlineTokens(r[n].text,r[n].tokens);return
t}}},t.lheading=function(e){e=this.rules.block.lheading.exec(e);if(e){e={type:"heading",raw:e[0],depth:"="===e[2].charAt(0)?1:2,text:e[1],tokens:[]};return
this.lexer.inline(e.text,e.tokens),e}},t.paragraph=function(e){e=this.rules.block.paragraph.exec(e);if(e){e={type:"paragraph",raw:e[0],text:"\n"===e[1].charAt(e[1].length-1)?e[1].slice(0,-1):e[1],tokens:[]};return
this.lexer.inline(e.text,e.tokens),e}},t.text=function(e){e=this.rules.block.text.exec(e);if(e){e={type:"text",raw:e[0],text:e[0],tokens:[]};return
this.lexer.inline(e.text,e.tokens),e}},t.escape=function(e){e=this.rules.inline.escape.exec(e);if(e)return{type:"escape",raw:e[0],text:D(e[1])}},t.tag=function(e){e=this.rules.inline.tag.exec(e);if(e)return!this.lexer.state.inLink&&/^<a
/i.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(e[0]):D(e[0]):e[0]}},t.link=function(e){var
t=this.rules.inline.link.exec(e);if(t){e=t[2].trim();if(!this.options.pedantic&&/^</.test(e)){if(!/>$/.test(e))return;var
u=w(e.slice(0,-1),"\\");if((e.length-u.length)%2==0)return}else{var
n=function(e,t){if(-1===e.indexOf(t[1]))return-1;for(var
u=e.length,n=0,r=0;r<u;r++)if("\\"===e[r])r++;else
if(e[r]===t[0])n++;else if(e[r]===t[1]&&--n<0)return
r;return-1}(t[2],"()");-1<n&&(r=(0===t[0].indexOf("!")?5:4)+t[1].length+n,t[2]=t[2].substring(0,n),t[0]=t[0].substring(0,r).trim(),t[3]="")}var
r,u=t[2],n="";return
this.options.pedantic?(r=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(u))&&(u=r[1],n=r[3]):n=t[3]?t[3].slice(1,-1):"",u=u.trim(),_(t,{href:(u=/^</.test(u)?this.options.pedantic&&!/>$/.test(e)?u.slice(1):u.slice(1,-1):u)&&u.replace(this.rules.inline._escapes,"$1"),title:n&&n.replace(this.rules.inline._escapes,"$1")},t[0],this.lexer)}},t.reflink=function(e,t){if((u=this.rules.inline.reflink.exec(e))||(u=this.rules.inline.nolink.exec(e))){var
e=(u[2]||u[1]).replace(/\s+/g,"
");if((e=t[e.toLowerCase()])&&e.href)return
_(u,e,u[0],this.lexer);var
u=u[0].charAt(0);return{type:"text",raw:u,text:u}}},t.emStrong=function(e,t,u){void
0===u&&(u="");var
n=this.rules.inline.emStrong.lDelim.exec(e);if(n&&(!n[3]||!u.match(/(?:[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD23\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDF70-\uDF81\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF30-\uDF3B\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF2\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDE70-\uDEBE\uDEC0-\uDEC9\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD834[\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/))){var
r=n[1]||n[2]||"";if(!r||""===u||this.rules.inline.punctuation.exec(u)){var
i,s=n[0].length-1,l=s,a=0,o="*"===n[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(o.lastIndex=0,t=t.slice(-1*e.length+s);null!=(n=o.exec(t));)if(i=n[1]||n[2]||n[3]||n[4]||n[5]||n[6])if(i=i.length,n[3]||n[4])l+=i;else
if(!((n[5]||n[6])&&s%3)||(s+i)%3){if(!(0<(l-=i))){if(i=Math.min(i,i+l+a),Math.min(s,i)%2){var
D=e.slice(1,s+n.index+i);return{type:"em",raw:e.slice(0,s+n.index+i+1),text:D,tokens:this.lexer.inlineTokens(D,[])}}D=e.slice(2,s+n.index+i-1);return{type:"strong",raw:e.slice(0,s+n.index+i+1),text:D,tokens:this.lexer.inlineTokens(D,[])}}}else
a+=i}}},t.codespan=function(e){var
t=this.rules.inline.code.exec(e);if(t){var u=t[2].replace(/\n/g,"
"),n=/[^ ]/.test(u),e=/^ /.test(u)&&/
$/.test(u),u=D(u=n&&e?u.substring(1,u.length-1):u,!0);return{type:"codespan",raw:t[0],text:u}}},t.br=function(e){e=this.rules.inline.br.exec(e);if(e)return{type:"br",raw:e[0]}},t.del=function(e){e=this.rules.inline.del.exec(e);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2],[])}},t.autolink=function(e,t){e=this.rules.inline.autolink.exec(e);if(e){var
u,t="@"===e[2]?"mailto:"+(u=D(this.options.mangle?t(e[1]):e[1])):u=D(e[1]);return{type:"link",raw:e[0],text:u,href:t,tokens:[{type:"text",raw:u,text:u}]}}},t.url=function(e,t){var
u,n,r,i;if(u=this.rules.inline.url.exec(e)){if("@"===u[2])r="mailto:"+(n=D(this.options.mangle?t(u[0]):u[0]));else{for(;i=u[0],u[0]=this.rules.inline._backpedal.exec(u[0])[0],i!==u[0];);n=D(u[0]),r="www."===u[1]?"http://"+n:n}return{type:"link",raw:u[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}},t.inlineText=function(e,t){e=this.rules.inline.text.exec(e);if(e){t=this.lexer.state.inRawBlock?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(e[0]):D(e[0]):e[0]:D(this.options.smartypants?t(e[0]):e[0]);return{type:"text",raw:e[0],text:t}}},e}(),$={newline:/^(?:
*(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^
{0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]*
*(?=\n|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\*
*){3,})(?:\n+|$)/,heading:/^
{0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}>
?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)(
[^\n]+?)?(?:\n|$)/,html:"^
{0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?:
+|\\n|/?>)[\\s\\S]*?(?:(?:\\n
*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*?
*/?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n
*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[
\\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^
{0,3}\[(label)\]: *(?:\n *)?<?([^\s>]+)>?(?:(?: +(?:\n *)?| *\n
*)(title))? *(?:\n+|$)/,table:E,lheading:/^([^\n]+)\n {0,3}(=+|-+)
*(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|
+\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\.|[^\[\]\\])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};$.def=p($.def).replace("label",$._label).replace("title",$._title).getRegex(),$.bullet=/(?:[*+-]|\d{1,9}[.)])/,$.listItemStart=p(/^(
*)(bull)
*/).replace("bull",$.bullet).getRegex(),$.list=p($.list).replace(/bull/g,$.bullet).replace("hr","\\n+(?=\\1?(?:(?:-
*){3,}|(?:_ *){3,}|(?:\\*
*){3,})(?:\\n+|$))").replace("def","\\n+(?="+$.def.source+")").getRegex(),$._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",$._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,$.html=p($.html,"i").replace("comment",$._comment).replace("tag",$._tag).replace("attribute",/
+[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *=
*'[^'\n]*'| *=
*[^\s"'=<>`]+)?/).getRegex(),$.paragraph=p($._paragraph).replace("hr",$.hr).replace("heading","
{0,3}#{1,6}
").replace("|lheading","").replace("|table","").replace("blockquote","
{0,3}>").replace("fences","
{0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list","
{0,3}(?:[*+-]|1[.)])
").replace("html","</?(?:tag)(?:
+|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",$._tag).getRegex(),$.blockquote=p($.blockquote).replace("paragraph",$.paragraph).getRegex(),$.normal=b({},$),$.gfm=b({},$.normal,{table:"^
*([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\|
*)?(?:\\n((?:(?!
*\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),$.gfm.table=p($.gfm.table).replace("hr",$.hr).replace("heading","
{0,3}#{1,6} ").replace("blockquote","
{0,3}>").replace("code","
{4}[^\\n]").replace("fences","
{0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list","
{0,3}(?:[*+-]|1[.)])
").replace("html","</?(?:tag)(?:
+|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",$._tag).getRegex(),$.gfm.paragraph=p($._paragraph).replace("hr",$.hr).replace("heading","
{0,3}#{1,6}
").replace("|lheading","").replace("table",$.gfm.table).replace("blockquote","
{0,3}>").replace("fences","
{0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list","
{0,3}(?:[*+-]|1[.)])
").replace("html","</?(?:tag)(?:
+|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",$._tag).getRegex(),$.pedantic=b({},$.normal,{html:p("^
*(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1>
*(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?>
*(?:\\n{2,}|\\s*$))").replace("comment",$._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^
*\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))?
*(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:E,paragraph:p($.normal._paragraph).replace("hr",$.hr).replace("heading","
*#{1,6}
*[^\n]").replace("lheading",$.lheading).replace("blockquote","
{0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var
S={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:E,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^[^_*]*?\_\_[^_*]*?\*[^_*]*?(?=\_\_)|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?\_[^_*]*?(?=\*\*)|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^(
{2,}|\\)\n(?!\s*$)/,del:E,text:/^(`+|[^`])(?:(?=
{2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?=
{2,}\n)))/,punctuation:/^([\spunctuation])/};function T(e){return
e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…")}function
R(e){for(var
t,u="",n=e.length,r=0;r<n;r++)t=e.charCodeAt(r),u+="&#"+(t=.5<Math.random()?"x"+t.toString(16):t)+";";return
u}S._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",S.punctuation=p(S.punctuation).replace(/punctuation/g,S._punctuation).getRegex(),S.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,S.escapedEmSt=/\\\*|\\_/g,S._comment=p($._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),S.emStrong.lDelim=p(S.emStrong.lDelim).replace(/punct/g,S._punctuation).getRegex(),S.emStrong.rDelimAst=p(S.emStrong.rDelimAst,"g").replace(/punct/g,S._punctuation).getRegex(),S.emStrong.rDelimUnd=p(S.emStrong.rDelimUnd,"g").replace(/punct/g,S._punctuation).getRegex(),S._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,S._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,S._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[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])?)+(?![-_])/,S.autolink=p(S.autolink).replace("scheme",S._scheme).replace("email",S._email).getRegex(),S._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,S.tag=p(S.tag).replace("comment",S._comment).replace("attribute",S._attribute).getRegex(),S._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,S._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,S._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,S.link=p(S.link).replace("label",S._label).replace("href",S._href).replace("title",S._title).getRegex(),S.reflink=p(S.reflink).replace("label",S._label).replace("ref",$._label).getRegex(),S.nolink=p(S.nolink).replace("ref",$._label).getRegex(),S.reflinkSearch=p(S.reflinkSearch,"g").replace("reflink",S.reflink).replace("nolink",S.nolink).getRegex(),S.normal=b({},S),S.pedantic=b({},S.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:p(/^!?\[(label)\]\((.*?)\)/).replace("label",S._label).getRegex(),reflink:p(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",S._label).getRegex()}),S.gfm=b({},S.normal,{escape:p(S.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?=
{2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^
](?=
{2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/}),S.gfm.url=p(S.gfm.url,"i").replace("email",S.gfm._extended_email).getRegex(),S.breaks=b({},S.gfm,{br:p(S.br).replace("{2,}","*").getRegex(),text:p(S.gfm.text).replace("\\b_","\\b_|
{2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var
I=function(){function
u(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||r.defaults,this.options.tokenizer=this.options.tokenizer||new
z,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,(this.tokenizer.lexer=this).inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};e={block:$.normal,inline:S.normal};this.options.pedantic?(e.block=$.pedantic,e.inline=S.pedantic):this.options.gfm&&(e.block=$.gfm,this.options.breaks?e.inline=S.breaks:e.inline=S.gfm),this.tokenizer.rules=e}u.lex=function(e,t){return
new u(t).lex(e)},u.lexInline=function(e,t){return new
u(t).inlineTokens(e)};var e,t,n=u.prototype;return n.lex=function(e){var
t;for(e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g,"
"),this.blockTokens(e,this.tokens);t=this.inlineQueue.shift();)this.inlineTokens(t.src,t.tokens);return
this.tokens},n.blockTokens=function(r,t){var u,e,i,n,s=this;for(void
0===t&&(t=[]),this.options.pedantic&&(r=r.replace(/^
+$/gm,""));r;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(function(e){return!!(u=e.call({lexer:s},r,t))&&(r=r.substring(u.raw.length),t.push(u),!0)})))if(u=this.tokenizer.space(r))r=r.substring(u.raw.length),1===u.raw.length&&0<t.length?t[t.length-1].raw+="\n":t.push(u);else
if(u=this.tokenizer.code(r))r=r.substring(u.raw.length),!(e=t[t.length-1])||"paragraph"!==e.type&&"text"!==e.type?t.push(u):(e.raw+="\n"+u.raw,e.text+="\n"+u.text,this.inlineQueue[this.inlineQueue.length-1].src=e.text);else
if(u=this.tokenizer.fences(r))r=r.substring(u.raw.length),t.push(u);else
if(u=this.tokenizer.heading(r))r=r.substring(u.raw.length),t.push(u);else
if(u=this.tokenizer.hr(r))r=r.substring(u.raw.length),t.push(u);else
if(u=this.tokenizer.blockquote(r))r=r.substring(u.raw.length),t.push(u);else
if(u=this.tokenizer.list(r))r=r.substring(u.raw.length),t.push(u);else
if(u=this.tokenizer.html(r))r=r.substring(u.raw.length),t.push(u);else
if(u=this.tokenizer.def(r))r=r.substring(u.raw.length),!(e=t[t.length-1])||"paragraph"!==e.type&&"text"!==e.type?this.tokens.links[u.tag]||(this.tokens.links[u.tag]={href:u.href,title:u.title}):(e.raw+="\n"+u.raw,e.text+="\n"+u.raw,this.inlineQueue[this.inlineQueue.length-1].src=e.text);else
if(u=this.tokenizer.table(r))r=r.substring(u.raw.length),t.push(u);else
if(u=this.tokenizer.lheading(r))r=r.substring(u.raw.length),t.push(u);else
if(i=r,this.options.extensions&&this.options.extensions.startBlock&&function(){var
t,u=1/0,n=r.slice(1);s.options.extensions.startBlock.forEach(function(e){"number"==typeof(t=e.call({lexer:this},n))&&0<=t&&(u=Math.min(u,t))}),u<1/0&&0<=u&&(i=r.substring(0,u+1))}(),this.state.top&&(u=this.tokenizer.paragraph(i)))e=t[t.length-1],n&&"paragraph"===e.type?(e.raw+="\n"+u.raw,e.text+="\n"+u.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=e.text):t.push(u),n=i.length!==r.length,r=r.substring(u.raw.length);else
if(u=this.tokenizer.text(r))r=r.substring(u.raw.length),(e=t[t.length-1])&&"text"===e.type?(e.raw+="\n"+u.raw,e.text+="\n"+u.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=e.text):t.push(u);else
if(r){var l="Infinite loop on byte:
"+r.charCodeAt(0);if(this.options.silent){console.error(l);break}throw
new Error(l)}return
this.state.top=!0,t},n.inline=function(e,t){this.inlineQueue.push({src:e,tokens:t})},n.inlineTokens=function(r,t){var
u,e,i,s=this;void 0===t&&(t=[]);var
n,l,a,o=r;if(this.tokens.links){var
D=Object.keys(this.tokens.links);if(0<D.length)for(;null!=(n=this.tokenizer.rules.inline.reflinkSearch.exec(o));)D.includes(n[0].slice(n[0].lastIndexOf("[")+1,-1))&&(o=o.slice(0,n.index)+"["+y("a",n[0].length-2)+"]"+o.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(n=this.tokenizer.rules.inline.blockSkip.exec(o));)o=o.slice(0,n.index)+"["+y("a",n[0].length-2)+"]"+o.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(n=this.tokenizer.rules.inline.escapedEmSt.exec(o));)o=o.slice(0,n.index)+"++"+o.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;r;)if(l||(a=""),l=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(function(e){return!!(u=e.call({lexer:s},r,t))&&(r=r.substring(u.raw.length),t.push(u),!0)})))if(u=this.tokenizer.escape(r))r=r.substring(u.raw.length),t.push(u);else
if(u=this.tokenizer.tag(r))r=r.substring(u.raw.length),(e=t[t.length-1])&&"text"===u.type&&"text"===e.type?(e.raw+=u.raw,e.text+=u.text):t.push(u);else
if(u=this.tokenizer.link(r))r=r.substring(u.raw.length),t.push(u);else
if(u=this.tokenizer.reflink(r,this.tokens.links))r=r.substring(u.raw.length),(e=t[t.length-1])&&"text"===u.type&&"text"===e.type?(e.raw+=u.raw,e.text+=u.text):t.push(u);else
if(u=this.tokenizer.emStrong(r,o,a))r=r.substring(u.raw.length),t.push(u);else
if(u=this.tokenizer.codespan(r))r=r.substring(u.raw.length),t.push(u);else
if(u=this.tokenizer.br(r))r=r.substring(u.raw.length),t.push(u);else
if(u=this.tokenizer.del(r))r=r.substring(u.raw.length),t.push(u);else
if(u=this.tokenizer.autolink(r,R))r=r.substring(u.raw.length),t.push(u);else
if(this.state.inLink||!(u=this.tokenizer.url(r,R))){if(i=r,this.options.extensions&&this.options.extensions.startInline&&function(){var
t,u=1/0,n=r.slice(1);s.options.extensions.startInline.forEach(function(e){"number"==typeof(t=e.call({lexer:this},n))&&0<=t&&(u=Math.min(u,t))}),u<1/0&&0<=u&&(i=r.substring(0,u+1))}(),u=this.tokenizer.inlineText(i,T))r=r.substring(u.raw.length),"_"!==u.raw.slice(-1)&&(a=u.raw.slice(-1)),l=!0,(e=t[t.length-1])&&"text"===e.type?(e.raw+=u.raw,e.text+=u.text):t.push(u);else
if(r){var c="Infinite loop on byte:
"+r.charCodeAt(0);if(this.options.silent){console.error(c);break}throw
new Error(c)}}else r=r.substring(u.raw.length),t.push(u);return
t},e=u,t=[{key:"rules",get:function(){return{block:$,inline:S}}}],(n=null)&&i(e.prototype,n),t&&i(e,t),Object.defineProperty(e,"prototype",{writable:!1}),u}(),Z=function(){function
e(e){this.options=e||r.defaults}var t=e.prototype;return
t.code=function(e,t,u){var
n=(t||"").match(/\S*/)[0];return!this.options.highlight||null!=(t=this.options.highlight(e,n))&&t!==e&&(u=!0,e=t),e=e.replace(/\n$/,"")+"\n",n?'<pre><code
class="'+this.options.langPrefix+D(n,!0)+'">'+(u?e:D(e,!0))+"</code></pre>\n":"<pre><code>"+(u?e:D(e,!0))+"</code></pre>\n"},t.blockquote=function(e){return"<blockquote>\n"+e+"</blockquote>\n"},t.html=function(e){return
e},t.heading=function(e,t,u,n){return
this.options.headerIds?"<h"+t+'
id="'+this.options.headerPrefix+n.slug(u)+'">'+e+"</h"+t+">\n":"<h"+t+">"+e+"</h"+t+">\n"},t.hr=function(){return
this.options.xhtml?"<hr/>\n":"<hr>\n"},t.list=function(e,t,u){var
n=t?"ol":"ul";return"<"+n+(t&&1!==u?'
start="'+u+'"':"")+">\n"+e+"</"+n+">\n"},t.listitem=function(e){return"<li>"+e+"</li>\n"},t.checkbox=function(e){return"<input
"+(e?'checked=""
':"")+'disabled=""
type="checkbox"'+(this.options.xhtml?"
/":"")+">
"},t.paragraph=function(e){return"<p>"+e+"</p>\n"},t.table=function(e,t){return"<table>\n<thead>\n"+e+"</thead>\n"+(t=t&&"<tbody>"+t+"</tbody>")+"</table>\n"},t.tablerow=function(e){return"<tr>\n"+e+"</tr>\n"},t.tablecell=function(e,t){var
u=t.header?"th":"td";return(t.align?"<"+u+'
align="'+t.align+'">':"<"+u+">")+e+"</"+u+">\n"},t.strong=function(e){return"<strong>"+e+"</strong>"},t.em=function(e){return"<em>"+e+"</em>"},t.codespan=function(e){return"<code>"+e+"</code>"},t.br=function(){return
this.options.xhtml?"<br/>":"<br>"},t.del=function(e){return"<del>"+e+"</del>"},t.link=function(e,t,u){if(null===(e=F(this.options.sanitize,this.options.baseUrl,e)))return
u;e='<a href="'+D(e)+'"';return
t&&(e+='
title="'+t+'"'),e+=">"+u+"</a>"},t.image=function(e,t,u){if(null===(e=F(this.options.sanitize,this.options.baseUrl,e)))return
u;u='<img src="'+e+'"
alt="'+u+'"';return t&&(u+='
title="'+t+'"'),u+=this.options.xhtml?"/>":">"},t.text=function(e){return
e},e}(),O=function(){function e(){}var t=e.prototype;return
t.strong=function(e){return e},t.em=function(e){return
e},t.codespan=function(e){return e},t.del=function(e){return
e},t.html=function(e){return e},t.text=function(e){return
e},t.link=function(e,t,u){return""+u},t.image=function(e,t,u){return""+u},t.br=function(){return""},e}(),q=function(){function
e(){this.seen={}}var t=e.prototype;return t.serialize=function(e){return
e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},t.getNextSafeSlug=function(e,t){var
u=e,n=0;if(this.seen.hasOwnProperty(u))for(n=this.seen[e];u=e+"-"+
++n,this.seen.hasOwnProperty(u););return
t||(this.seen[e]=n,this.seen[u]=0),u},t.slug=function(e,t){void
0===t&&(t={});e=this.serialize(e);return
this.getNextSafeSlug(e,t.dryrun)},e}(),L=function(){function
u(e){this.options=e||r.defaults,this.options.renderer=this.options.renderer||new
Z,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new
O,this.slugger=new q}u.parse=function(e,t){return new
u(t).parse(e)},u.parseInline=function(e,t){return new
u(t).parseInline(e)};var e=u.prototype;return e.parse=function(e,t){void
0===t&&(t=!0);for(var
u,n,r,i,s,l,a,o,D,c,h,p,f,g,F,A,d="",C=e.length,k=0;k<C;k++)if(o=e[k],!(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[o.type])||!1===(A=this.options.extensions.renderers[o.type].call({parser:this},o))&&["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(o.type))switch(o.type){case"space":continue;case"hr":d+=this.renderer.hr();continue;case"heading":d+=this.renderer.heading(this.parseInline(o.tokens),o.depth,m(this.parseInline(o.tokens,this.textRenderer)),this.slugger);continue;case"code":d+=this.renderer.code(o.text,o.lang,o.escaped);continue;case"table":for(l=D="",r=o.header.length,u=0;u<r;u++)l+=this.renderer.tablecell(this.parseInline(o.header[u].tokens),{header:!0,align:o.align[u]});for(D+=this.renderer.tablerow(l),a="",r=o.rows.length,u=0;u<r;u++){for(l="",i=(s=o.rows[u]).length,n=0;n<i;n++)l+=this.renderer.tablecell(this.parseInline(s[n].tokens),{header:!1,align:o.align[n]});a+=this.renderer.tablerow(l)}d+=this.renderer.table(D,a);continue;case"blockquote":a=this.parse(o.tokens),d+=this.renderer.blockquote(a);continue;case"list":for(D=o.ordered,E=o.start,c=o.loose,r=o.items.length,a="",u=0;u<r;u++)f=(p=o.items[u]).checked,g=p.task,h="",p.task&&(F=this.renderer.checkbox(f),c?0<p.tokens.length&&"paragraph"===p.tokens[0].type?(p.tokens[0].text=F+"
"+p.tokens[0].text,p.tokens[0].tokens&&0<p.tokens[0].tokens.length&&"text"===p.tokens[0].tokens[0].type&&(p.tokens[0].tokens[0].text=F+"
"+p.tokens[0].tokens[0].text)):p.tokens.unshift({type:"text",text:F}):h+=F),h+=this.parse(p.tokens,c),a+=this.renderer.listitem(h,g,f);d+=this.renderer.list(a,D,E);continue;case"html":d+=this.renderer.html(o.text);continue;case"paragraph":d+=this.renderer.paragraph(this.parseInline(o.tokens));continue;case"text":for(a=o.tokens?this.parseInline(o.tokens):o.text;k+1<C&&"text"===e[k+1].type;)a+="\n"+((o=e[++k]).tokens?this.parseInline(o.tokens):o.text);d+=t?this.renderer.paragraph(a):a;continue;default:var
E='Token with "'+o.type+'" type was not
found.';if(this.options.silent)return void console.error(E);throw new
Error(E)}else d+=A||"";return
d},e.parseInline=function(e,t){t=t||this.renderer;for(var
u,n,r="",i=e.length,s=0;s<i;s++)if(u=e[s],!(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[u.type])||!1===(n=this.options.extensions.renderers[u.type].call({parser:this},u))&&["escape","html","link","image","strong","em","codespan","br","del","text"].includes(u.type))switch(u.type){case"escape":r+=t.text(u.text);break;case"html":r+=t.html(u.text);break;case"link":r+=t.link(u.href,u.title,this.parseInline(u.tokens,t));break;case"image":r+=t.image(u.href,u.title,u.text);break;case"strong":r+=t.strong(this.parseInline(u.tokens,t));break;case"em":r+=t.em(this.parseInline(u.tokens,t));break;case"codespan":r+=t.codespan(u.text);break;case"br":r+=t.br();break;case"del":r+=t.del(this.parseInline(u.tokens,t));break;case"text":r+=t.text(u.text);break;default:var
l='Token with "'+u.type+'" type was not
found.';if(this.options.silent)return void console.error(l);throw new
Error(l)}else r+=n||"";return r},u}();function
j(e,u,n){if(null==e)throw new Error("marked(): input parameter is
undefined or null");if("string"!=typeof e)throw new
Error("marked(): input parameter is of type
"+Object.prototype.toString.call(e)+", string
expected");if("function"==typeof
u&&(n=u,u=null),v(u=b({},j.defaults,u||{})),n){var
r,i=u.highlight;try{r=I.lex(e,u)}catch(e){return n(e)}var s=function(t){var
e;if(!t)try{u.walkTokens&&j.walkTokens(r,u.walkTokens),e=L.parse(r,u)}catch(e){t=e}return
u.highlight=i,t?n(t):n(null,e)};if(!i||i.length<3)return s();if(delete
u.highlight,!r.length)return s();var l=0;return
j.walkTokens(r,function(u){"code"===u.type&&(l++,setTimeout(function(){i(u.text,u.lang,function(e,t){return
e?s(e):(null!=t&&t!==u.text&&(u.text=t,u.escaped=!0),void(0===--l&&s()))})},0))}),void(0===l&&s())}try{var
t=I.lex(e,u);return
u.walkTokens&&j.walkTokens(t,u.walkTokens),L.parse(t,u)}catch(e){if(e.message+="\nPlease
report this to
https://github.com/markedjs/marked.",u.silent)return"<p>An
error
occurred:</p><pre>"+D(e.message+"",!0)+"</pre>";throw
e}}j.options=j.setOptions=function(e){return
b(j.defaults,e),e=j.defaults,r.defaults=e,j},j.getDefaults=e,j.defaults=r.defaults,j.use=function(){for(var
e=arguments.length,t=new Array(e),u=0;u<e;u++)t[u]=arguments[u];var
n,r=b.apply(void
0,[{}].concat(t)),s=j.defaults.extensions||{renderers:{},childTokens:{}};t.forEach(function(l){var
t;l.extensions&&(n=!0,l.extensions.forEach(function(r){if(!r.name)throw
new Error("extension name required");var
i;if(r.renderer&&(i=s.renderers?s.renderers[r.name]:null,s.renderers[r.name]=i?function(){for(var
e=arguments.length,t=new Array(e),u=0;u<e;u++)t[u]=arguments[u];var
n=r.renderer.apply(this,t);return
n=!1===n?i.apply(this,t):n}:r.renderer),r.tokenizer){if(!r.level||"block"!==r.level&&"inline"!==r.level)throw
new Error("extension level must be 'block' or
'inline'");s[r.level]?s[r.level].unshift(r.tokenizer):s[r.level]=[r.tokenizer],r.start&&("block"===r.level?s.startBlock?s.startBlock.push(r.start):s.startBlock=[r.start]:"inline"===r.level&&(s.startInline?s.startInline.push(r.start):s.startInline=[r.start]))}r.childTokens&&(s.childTokens[r.name]=r.childTokens)})),l.renderer&&function(){var
e,s=j.defaults.renderer||new Z;for(e in l.renderer)!function(r){var
i=s[r];s[r]=function(){for(var e=arguments.length,t=new
Array(e),u=0;u<e;u++)t[u]=arguments[u];var
n=l.renderer[r].apply(s,t);return
n=!1===n?i.apply(s,t):n}}(e);r.renderer=s}(),l.tokenizer&&function(){var
e,s=j.defaults.tokenizer||new z;for(e in l.tokenizer)!function(r){var
i=s[r];s[r]=function(){for(var e=arguments.length,t=new
Array(e),u=0;u<e;u++)t[u]=arguments[u];var
n=l.tokenizer[r].apply(s,t);return
n=!1===n?i.apply(s,t):n}}(e);r.tokenizer=s}(),l.walkTokens&&(t=j.defaults.walkTokens,r.walkTokens=function(e){l.walkTokens.call(this,e),t&&t.call(this,e)}),n&&(r.extensions=s),j.setOptions(r)})},j.walkTokens=function(e,l){for(var
a,t=x(e);!(a=t()).done;)!function(){var
t=a.value;switch(l.call(j,t),t.type){case"table":for(var
e=x(t.header);!(u=e()).done;){var
u=u.value;j.walkTokens(u.tokens,l)}for(var
n,r=x(t.rows);!(n=r()).done;)for(var i=x(n.value);!(s=i()).done;){var
s=s.value;j.walkTokens(s.tokens,l)}break;case"list":j.walkTokens(t.items,l);break;default:j.defaults.extensions&&j.defaults.extensions.childTokens&&j.defaults.extensions.childTokens[t.type]?j.defaults.extensions.childTokens[t.type].forEach(function(e){j.walkTokens(t[e],l)}):t.tokens&&j.walkTokens(t.tokens,l)}}()},j.parseInline=function(e,t){if(null==e)throw
new Error("marked.parseInline(): input parameter is undefined or
null");if("string"!=typeof e)throw new
Error("marked.parseInline(): input parameter is of type
"+Object.prototype.toString.call(e)+", string
expected");v(t=b({},j.defaults,t||{}));try{var
u=I.lexInline(e,t);return
t.walkTokens&&j.walkTokens(u,t.walkTokens),L.parseInline(u,t)}catch(e){if(e.message+="\nPlease
report this to
https://github.com/markedjs/marked.",t.silent)return"<p>An
error
occurred:</p><pre>"+D(e.message+"",!0)+"</pre>";throw
e}},j.Parser=L,j.parser=L.parse,j.Renderer=Z,j.TextRenderer=O,j.Lexer=I,j.lexer=I.lex,j.Tokenizer=z,j.Slugger=q;var
P=(j.parse=j).options,Q=j.setOptions,U=j.use,M=j.walkTokens,N=j.parseInline,X=j,G=L.parse,E=I.lex;r.Lexer=I,r.Parser=L,r.Renderer=Z,r.Slugger=q,r.TextRenderer=O,r.Tokenizer=z,r.getDefaults=e,r.lexer=E,r.marked=j,r.options=P,r.parse=X,r.parseInline=N,r.parser=G,r.setOptions=Q,r.use=U,r.walkTokens=M,Object.defineProperty(r,"__esModule",{value:!0})});placeholder.js000064400000010163151167367510007401
0ustar00/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder
<https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights
reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
jQuery(document).ready(function()
{
jQuery('#placedin').show();
var placeholderName = jQuery('#jform_target').val();
// check if this function name is taken
checkPlaceholderName(placeholderName);
});
function setPlaceholderName(){
// noting for now (we may add more functionality later)
}
function checkPlaceholderName(placeholderName) {
if (placeholderName.length > 2) {
var ide = jQuery('#jform_id').val();
if (ide == 0) {
ide = -1;
}
checkPlaceholderName_server(placeholderName, ide).done(function(result)
{
if(result.name && result.message){
// show notice that placeholderName is okay
jQuery.UIkit.notify({message: result.message, timeout: 5000, status:
result.status, pos: 'top-right'});
jQuery('#jform_target').val(result.name);
// now start search for where the function is used
placedin(result.name, ide);
} else if(result.message){
// show notice that placeholderName is not okay
jQuery.UIkit.notify({message: result.message, timeout: 5000, status:
result.status, pos: 'top-right'});
jQuery('#jform_target').val('');
} else {
// set an error that message was not send
jQuery.UIkit.notify({message:
Joomla.JText._('COM_COMPONENTBUILDER_PLACEHOLDER_ALREADY_TAKEN_PLEASE_TRY_AGAIN'),
timeout: 5000, status: 'danger', pos: 'top-right'});
jQuery('#jform_target').val('');
}
// set custom code placeholder
setPlaceholderName();
});
} else {
// set an error that message was not send
jQuery.UIkit.notify({message:
Joomla.JText._('COM_COMPONENTBUILDER_YOU_MUST_ADD_AN_UNIQUE_PLACEHOLDER'),
timeout: 5000, status: 'danger', pos: 'top-right'});
jQuery('#jform_target').val('');
// set custom code placeholder
setPlaceholderName();
}
}
// check Placeholder
function checkPlaceholderName_server(placeholderName, ide){
var getUrl =
"index.php?option=com_componentbuilder&task=ajax.checkPlaceholderName&raw=true&format=json";
if(token.length > 0){
var request =
'token='+token+'&placeholderName='+placeholderName+'&id='+ide;
}
return jQuery.ajax({
type: 'POST',
url: getUrl,
dataType: 'json',
data: request,
jsonp: false
});
}
// check where this Function is used
function placedin(placeholder, ide) {
var found = false;
jQuery('#before-placedin').hide();
jQuery('#note-placedin-not').hide();
jQuery('#note-placedin-found').hide();
jQuery('#loading-placedin').show();
var targets =
['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v'];
// if you update this, also update (below 21) &
[customcode-codeUsedInHtmlNote]!
var targetNumber = 21;
var run = 0;
var placedinChecker = setInterval(function(){
var target = targets[run];
placedin_server(placeholder, ide, target).done(function(used) {
if (used.in) {
jQuery('#placedin-'+used.id).show();
jQuery('#area-'+used.id).html(used.in);
jQuery.UIkit.notify({message: used.in, timeout: 5000, status:
'success', pos: 'top-right'});
found = true;
} else {
jQuery('#placedin-'+target).hide();
}
if (run == targetNumber) {
jQuery('#loading-placedin').hide();
if (found) {
jQuery('#note-placedin-found').show();
} else {
jQuery('#note-placedin-not').show();
}
}
});
if (run == targetNumber) {
clearInterval(placedinChecker);
}
run++;
}, 800);
}
function placedin_server(placeholder, ide, target){
var getUrl =
"index.php?option=com_componentbuilder&task=ajax.placedin&format=json";
if(token.length > 0){
var request =
token+'=1&placeholder='+placeholder+'&id='+ide+'&target='+target+'&raw=true&return_here='+return_here;
}
return jQuery.ajax({
type: 'GET',
url: getUrl,
dataType: 'json',
data: request,
jsonp: false
});
}
server.js000064400000040600151167367510006424 0ustar00/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder
<https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights
reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
// Some Global Values
jform_vvvvwcevxt_required = false;
jform_vvvvwcevxu_required = false;
jform_vvvvwcevxv_required = false;
jform_vvvvwcevxw_required = false;
jform_vvvvwcevxx_required = false;
jform_vvvvwcfvxy_required = false;
jform_vvvvwcgvxz_required = false;
jform_vvvvwcivya_required = false;
jform_vvvvwckvyb_required = false;
// Initial Script
document.addEventListener('DOMContentLoaded', function()
{
var protocol_vvvvwce = jQuery("#jform_protocol").val();
vvvvwce(protocol_vvvvwce);
var protocol_vvvvwcf = jQuery("#jform_protocol").val();
vvvvwcf(protocol_vvvvwcf);
var protocol_vvvvwcg = jQuery("#jform_protocol").val();
var authentication_vvvvwcg =
jQuery("#jform_authentication").val();
vvvvwcg(protocol_vvvvwcg,authentication_vvvvwcg);
var protocol_vvvvwci = jQuery("#jform_protocol").val();
var authentication_vvvvwci =
jQuery("#jform_authentication").val();
vvvvwci(protocol_vvvvwci,authentication_vvvvwci);
var protocol_vvvvwck = jQuery("#jform_protocol").val();
var authentication_vvvvwck =
jQuery("#jform_authentication").val();
vvvvwck(protocol_vvvvwck,authentication_vvvvwck);
var protocol_vvvvwcm = jQuery("#jform_protocol").val();
var authentication_vvvvwcm =
jQuery("#jform_authentication").val();
vvvvwcm(protocol_vvvvwcm,authentication_vvvvwcm);
});
// the vvvvwce function
function vvvvwce(protocol_vvvvwce)
{
if (isSet(protocol_vvvvwce) && protocol_vvvvwce.constructor !==
Array)
{
var temp_vvvvwce = protocol_vvvvwce;
var protocol_vvvvwce = [];
protocol_vvvvwce.push(temp_vvvvwce);
}
else if (!isSet(protocol_vvvvwce))
{
var protocol_vvvvwce = [];
}
var protocol = protocol_vvvvwce.some(protocol_vvvvwce_SomeFunc);
// set this function logic
if (protocol)
{
jQuery('#jform_authentication').closest('.control-group').show();
// add required attribute to authentication field
if (jform_vvvvwcevxt_required)
{
updateFieldRequired('authentication',0);
jQuery('#jform_authentication').prop('required','required');
jQuery('#jform_authentication').attr('aria-required',true);
jQuery('#jform_authentication').addClass('required');
jform_vvvvwcevxt_required = false;
}
jQuery('#jform_host').closest('.control-group').show();
// add required attribute to host field
if (jform_vvvvwcevxu_required)
{
updateFieldRequired('host',0);
jQuery('#jform_host').prop('required','required');
jQuery('#jform_host').attr('aria-required',true);
jQuery('#jform_host').addClass('required');
jform_vvvvwcevxu_required = false;
}
jQuery('#jform_port').closest('.control-group').show();
// add required attribute to port field
if (jform_vvvvwcevxv_required)
{
updateFieldRequired('port',0);
jQuery('#jform_port').prop('required','required');
jQuery('#jform_port').attr('aria-required',true);
jQuery('#jform_port').addClass('required');
jform_vvvvwcevxv_required = false;
}
jQuery('#jform_path').closest('.control-group').show();
// add required attribute to path field
if (jform_vvvvwcevxw_required)
{
updateFieldRequired('path',0);
jQuery('#jform_path').prop('required','required');
jQuery('#jform_path').attr('aria-required',true);
jQuery('#jform_path').addClass('required');
jform_vvvvwcevxw_required = false;
}
jQuery('.note_ssh_security').closest('.control-group').show();
jQuery('#jform_username').closest('.control-group').show();
// add required attribute to username field
if (jform_vvvvwcevxx_required)
{
updateFieldRequired('username',0);
jQuery('#jform_username').prop('required','required');
jQuery('#jform_username').attr('aria-required',true);
jQuery('#jform_username').addClass('required');
jform_vvvvwcevxx_required = false;
}
}
else
{
jQuery('#jform_authentication').closest('.control-group').hide();
// remove required attribute from authentication field
if (!jform_vvvvwcevxt_required)
{
updateFieldRequired('authentication',1);
jQuery('#jform_authentication').removeAttr('required');
jQuery('#jform_authentication').removeAttr('aria-required');
jQuery('#jform_authentication').removeClass('required');
jform_vvvvwcevxt_required = true;
}
jQuery('#jform_host').closest('.control-group').hide();
// remove required attribute from host field
if (!jform_vvvvwcevxu_required)
{
updateFieldRequired('host',1);
jQuery('#jform_host').removeAttr('required');
jQuery('#jform_host').removeAttr('aria-required');
jQuery('#jform_host').removeClass('required');
jform_vvvvwcevxu_required = true;
}
jQuery('#jform_port').closest('.control-group').hide();
// remove required attribute from port field
if (!jform_vvvvwcevxv_required)
{
updateFieldRequired('port',1);
jQuery('#jform_port').removeAttr('required');
jQuery('#jform_port').removeAttr('aria-required');
jQuery('#jform_port').removeClass('required');
jform_vvvvwcevxv_required = true;
}
jQuery('#jform_path').closest('.control-group').hide();
// remove required attribute from path field
if (!jform_vvvvwcevxw_required)
{
updateFieldRequired('path',1);
jQuery('#jform_path').removeAttr('required');
jQuery('#jform_path').removeAttr('aria-required');
jQuery('#jform_path').removeClass('required');
jform_vvvvwcevxw_required = true;
}
jQuery('.note_ssh_security').closest('.control-group').hide();
jQuery('#jform_username').closest('.control-group').hide();
// remove required attribute from username field
if (!jform_vvvvwcevxx_required)
{
updateFieldRequired('username',1);
jQuery('#jform_username').removeAttr('required');
jQuery('#jform_username').removeAttr('aria-required');
jQuery('#jform_username').removeClass('required');
jform_vvvvwcevxx_required = true;
}
}
}
// the vvvvwce Some function
function protocol_vvvvwce_SomeFunc(protocol_vvvvwce)
{
// set the function logic
if (protocol_vvvvwce == 2)
{
return true;
}
return false;
}
// the vvvvwcf function
function vvvvwcf(protocol_vvvvwcf)
{
if (isSet(protocol_vvvvwcf) && protocol_vvvvwcf.constructor !==
Array)
{
var temp_vvvvwcf = protocol_vvvvwcf;
var protocol_vvvvwcf = [];
protocol_vvvvwcf.push(temp_vvvvwcf);
}
else if (!isSet(protocol_vvvvwcf))
{
var protocol_vvvvwcf = [];
}
var protocol = protocol_vvvvwcf.some(protocol_vvvvwcf_SomeFunc);
// set this function logic
if (protocol)
{
jQuery('.note_ftp_signature').closest('.control-group').show();
jQuery('#jform_signature').closest('.control-group').show();
// add required attribute to signature field
if (jform_vvvvwcfvxy_required)
{
updateFieldRequired('signature',0);
jQuery('#jform_signature').prop('required','required');
jQuery('#jform_signature').attr('aria-required',true);
jQuery('#jform_signature').addClass('required');
jform_vvvvwcfvxy_required = false;
}
}
else
{
jQuery('.note_ftp_signature').closest('.control-group').hide();
jQuery('#jform_signature').closest('.control-group').hide();
// remove required attribute from signature field
if (!jform_vvvvwcfvxy_required)
{
updateFieldRequired('signature',1);
jQuery('#jform_signature').removeAttr('required');
jQuery('#jform_signature').removeAttr('aria-required');
jQuery('#jform_signature').removeClass('required');
jform_vvvvwcfvxy_required = true;
}
}
}
// the vvvvwcf Some function
function protocol_vvvvwcf_SomeFunc(protocol_vvvvwcf)
{
// set the function logic
if (protocol_vvvvwcf == 1)
{
return true;
}
return false;
}
// the vvvvwcg function
function vvvvwcg(protocol_vvvvwcg,authentication_vvvvwcg)
{
if (isSet(protocol_vvvvwcg) && protocol_vvvvwcg.constructor !==
Array)
{
var temp_vvvvwcg = protocol_vvvvwcg;
var protocol_vvvvwcg = [];
protocol_vvvvwcg.push(temp_vvvvwcg);
}
else if (!isSet(protocol_vvvvwcg))
{
var protocol_vvvvwcg = [];
}
var protocol = protocol_vvvvwcg.some(protocol_vvvvwcg_SomeFunc);
if (isSet(authentication_vvvvwcg) &&
authentication_vvvvwcg.constructor !== Array)
{
var temp_vvvvwcg = authentication_vvvvwcg;
var authentication_vvvvwcg = [];
authentication_vvvvwcg.push(temp_vvvvwcg);
}
else if (!isSet(authentication_vvvvwcg))
{
var authentication_vvvvwcg = [];
}
var authentication =
authentication_vvvvwcg.some(authentication_vvvvwcg_SomeFunc);
// set this function logic
if (protocol && authentication)
{
jQuery('#jform_password').closest('.control-group').show();
// add required attribute to password field
if (jform_vvvvwcgvxz_required)
{
updateFieldRequired('password',0);
jQuery('#jform_password').prop('required','required');
jQuery('#jform_password').attr('aria-required',true);
jQuery('#jform_password').addClass('required');
jform_vvvvwcgvxz_required = false;
}
}
else
{
jQuery('#jform_password').closest('.control-group').hide();
// remove required attribute from password field
if (!jform_vvvvwcgvxz_required)
{
updateFieldRequired('password',1);
jQuery('#jform_password').removeAttr('required');
jQuery('#jform_password').removeAttr('aria-required');
jQuery('#jform_password').removeClass('required');
jform_vvvvwcgvxz_required = true;
}
}
}
// the vvvvwcg Some function
function protocol_vvvvwcg_SomeFunc(protocol_vvvvwcg)
{
// set the function logic
if (protocol_vvvvwcg == 2)
{
return true;
}
return false;
}
// the vvvvwcg Some function
function authentication_vvvvwcg_SomeFunc(authentication_vvvvwcg)
{
// set the function logic
if (authentication_vvvvwcg == 1 || authentication_vvvvwcg == 3 ||
authentication_vvvvwcg == 5)
{
return true;
}
return false;
}
// the vvvvwci function
function vvvvwci(protocol_vvvvwci,authentication_vvvvwci)
{
if (isSet(protocol_vvvvwci) && protocol_vvvvwci.constructor !==
Array)
{
var temp_vvvvwci = protocol_vvvvwci;
var protocol_vvvvwci = [];
protocol_vvvvwci.push(temp_vvvvwci);
}
else if (!isSet(protocol_vvvvwci))
{
var protocol_vvvvwci = [];
}
var protocol = protocol_vvvvwci.some(protocol_vvvvwci_SomeFunc);
if (isSet(authentication_vvvvwci) &&
authentication_vvvvwci.constructor !== Array)
{
var temp_vvvvwci = authentication_vvvvwci;
var authentication_vvvvwci = [];
authentication_vvvvwci.push(temp_vvvvwci);
}
else if (!isSet(authentication_vvvvwci))
{
var authentication_vvvvwci = [];
}
var authentication =
authentication_vvvvwci.some(authentication_vvvvwci_SomeFunc);
// set this function logic
if (protocol && authentication)
{
jQuery('#jform_private').closest('.control-group').show();
// add required attribute to private field
if (jform_vvvvwcivya_required)
{
updateFieldRequired('private',0);
jQuery('#jform_private').prop('required','required');
jQuery('#jform_private').attr('aria-required',true);
jQuery('#jform_private').addClass('required');
jform_vvvvwcivya_required = false;
}
}
else
{
jQuery('#jform_private').closest('.control-group').hide();
// remove required attribute from private field
if (!jform_vvvvwcivya_required)
{
updateFieldRequired('private',1);
jQuery('#jform_private').removeAttr('required');
jQuery('#jform_private').removeAttr('aria-required');
jQuery('#jform_private').removeClass('required');
jform_vvvvwcivya_required = true;
}
}
}
// the vvvvwci Some function
function protocol_vvvvwci_SomeFunc(protocol_vvvvwci)
{
// set the function logic
if (protocol_vvvvwci == 2)
{
return true;
}
return false;
}
// the vvvvwci Some function
function authentication_vvvvwci_SomeFunc(authentication_vvvvwci)
{
// set the function logic
if (authentication_vvvvwci == 2 || authentication_vvvvwci == 3)
{
return true;
}
return false;
}
// the vvvvwck function
function vvvvwck(protocol_vvvvwck,authentication_vvvvwck)
{
if (isSet(protocol_vvvvwck) && protocol_vvvvwck.constructor !==
Array)
{
var temp_vvvvwck = protocol_vvvvwck;
var protocol_vvvvwck = [];
protocol_vvvvwck.push(temp_vvvvwck);
}
else if (!isSet(protocol_vvvvwck))
{
var protocol_vvvvwck = [];
}
var protocol = protocol_vvvvwck.some(protocol_vvvvwck_SomeFunc);
if (isSet(authentication_vvvvwck) &&
authentication_vvvvwck.constructor !== Array)
{
var temp_vvvvwck = authentication_vvvvwck;
var authentication_vvvvwck = [];
authentication_vvvvwck.push(temp_vvvvwck);
}
else if (!isSet(authentication_vvvvwck))
{
var authentication_vvvvwck = [];
}
var authentication =
authentication_vvvvwck.some(authentication_vvvvwck_SomeFunc);
// set this function logic
if (protocol && authentication)
{
jQuery('#jform_private_key').closest('.control-group').show();
// add required attribute to private_key field
if (jform_vvvvwckvyb_required)
{
updateFieldRequired('private_key',0);
jQuery('#jform_private_key').prop('required','required');
jQuery('#jform_private_key').attr('aria-required',true);
jQuery('#jform_private_key').addClass('required');
jform_vvvvwckvyb_required = false;
}
}
else
{
jQuery('#jform_private_key').closest('.control-group').hide();
// remove required attribute from private_key field
if (!jform_vvvvwckvyb_required)
{
updateFieldRequired('private_key',1);
jQuery('#jform_private_key').removeAttr('required');
jQuery('#jform_private_key').removeAttr('aria-required');
jQuery('#jform_private_key').removeClass('required');
jform_vvvvwckvyb_required = true;
}
}
}
// the vvvvwck Some function
function protocol_vvvvwck_SomeFunc(protocol_vvvvwck)
{
// set the function logic
if (protocol_vvvvwck == 2)
{
return true;
}
return false;
}
// the vvvvwck Some function
function authentication_vvvvwck_SomeFunc(authentication_vvvvwck)
{
// set the function logic
if (authentication_vvvvwck == 4 || authentication_vvvvwck == 5)
{
return true;
}
return false;
}
// the vvvvwcm function
function vvvvwcm(protocol_vvvvwcm,authentication_vvvvwcm)
{
if (isSet(protocol_vvvvwcm) && protocol_vvvvwcm.constructor !==
Array)
{
var temp_vvvvwcm = protocol_vvvvwcm;
var protocol_vvvvwcm = [];
protocol_vvvvwcm.push(temp_vvvvwcm);
}
else if (!isSet(protocol_vvvvwcm))
{
var protocol_vvvvwcm = [];
}
var protocol = protocol_vvvvwcm.some(protocol_vvvvwcm_SomeFunc);
if (isSet(authentication_vvvvwcm) &&
authentication_vvvvwcm.constructor !== Array)
{
var temp_vvvvwcm = authentication_vvvvwcm;
var authentication_vvvvwcm = [];
authentication_vvvvwcm.push(temp_vvvvwcm);
}
else if (!isSet(authentication_vvvvwcm))
{
var authentication_vvvvwcm = [];
}
var authentication =
authentication_vvvvwcm.some(authentication_vvvvwcm_SomeFunc);
// set this function logic
if (protocol && authentication)
{
jQuery('#jform_secret').closest('.control-group').show();
}
else
{
jQuery('#jform_secret').closest('.control-group').hide();
}
}
// the vvvvwcm Some function
function protocol_vvvvwcm_SomeFunc(protocol_vvvvwcm)
{
// set the function logic
if (protocol_vvvvwcm == 2)
{
return true;
}
return false;
}
// the vvvvwcm Some function
function authentication_vvvvwcm_SomeFunc(authentication_vvvvwcm)
{
// set the function logic
if (authentication_vvvvwcm == 2 || authentication_vvvvwcm == 3 ||
authentication_vvvvwcm == 4 || authentication_vvvvwcm == 5)
{
return true;
}
return false;
}
// update fields required
function updateFieldRequired(name, status) {
// check if not_required exist
if (document.getElementById('jform_not_required')) {
var not_required =
jQuery('#jform_not_required').val().split(",");
if(status == 1)
{
not_required.push(name);
}
else
{
not_required = removeFieldFromNotRequired(not_required, name);
}
jQuery('#jform_not_required').val(fixNotRequiredArray(not_required).toString());
}
}
// remove field from not_required
function removeFieldFromNotRequired(array, what) {
return array.filter(function(element){
return element !== what;
});
}
// fix not required array
function fixNotRequiredArray(array) {
var seen = {};
return removeEmptyFromNotRequiredArray(array).filter(function(item) {
return seen.hasOwnProperty(item) ? false : (seen[item] = true);
});
}
// remove empty from not_required array
function removeEmptyFromNotRequiredArray(array) {
return array.filter(function (el) {
// remove ( 一_一) as well - lol
return (el.length > 0 && '一_一' !== el);
});
}
// the isSet function
function isSet(val)
{
if ((val != undefined) && (val != null) && 0 !==
val.length){
return true;
}
return false;
}
site_view.js000064400000033206151167367510007120 0ustar00/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder
<https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights
reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
// Initial Script
document.addEventListener('DOMContentLoaded', function()
{
var add_php_view_vvvvvyt = jQuery("#jform_add_php_view
input[type='radio']:checked").val();
vvvvvyt(add_php_view_vvvvvyt);
var add_php_jview_display_vvvvvyu =
jQuery("#jform_add_php_jview_display
input[type='radio']:checked").val();
vvvvvyu(add_php_jview_display_vvvvvyu);
var add_php_jview_vvvvvyv = jQuery("#jform_add_php_jview
input[type='radio']:checked").val();
vvvvvyv(add_php_jview_vvvvvyv);
var add_php_document_vvvvvyw = jQuery("#jform_add_php_document
input[type='radio']:checked").val();
vvvvvyw(add_php_document_vvvvvyw);
var add_css_document_vvvvvyx = jQuery("#jform_add_css_document
input[type='radio']:checked").val();
vvvvvyx(add_css_document_vvvvvyx);
var add_javascript_file_vvvvvyy = jQuery("#jform_add_javascript_file
input[type='radio']:checked").val();
vvvvvyy(add_javascript_file_vvvvvyy);
var add_js_document_vvvvvyz = jQuery("#jform_add_js_document
input[type='radio']:checked").val();
vvvvvyz(add_js_document_vvvvvyz);
var add_css_vvvvvza = jQuery("#jform_add_css
input[type='radio']:checked").val();
vvvvvza(add_css_vvvvvza);
var add_php_ajax_vvvvvzb = jQuery("#jform_add_php_ajax
input[type='radio']:checked").val();
vvvvvzb(add_php_ajax_vvvvvzb);
var add_custom_button_vvvvvzc = jQuery("#jform_add_custom_button
input[type='radio']:checked").val();
vvvvvzc(add_custom_button_vvvvvzc);
var button_position_vvvvvzd =
jQuery("#jform_button_position").val();
vvvvvzd(button_position_vvvvvzd);
});
// the vvvvvyt function
function vvvvvyt(add_php_view_vvvvvyt)
{
// set the function logic
if (add_php_view_vvvvvyt == 1)
{
jQuery('#jform_php_view-lbl').closest('.control-group').show();
}
else
{
jQuery('#jform_php_view-lbl').closest('.control-group').hide();
}
}
// the vvvvvyu function
function vvvvvyu(add_php_jview_display_vvvvvyu)
{
// set the function logic
if (add_php_jview_display_vvvvvyu == 1)
{
jQuery('#jform_php_jview_display-lbl').closest('.control-group').show();
}
else
{
jQuery('#jform_php_jview_display-lbl').closest('.control-group').hide();
}
}
// the vvvvvyv function
function vvvvvyv(add_php_jview_vvvvvyv)
{
// set the function logic
if (add_php_jview_vvvvvyv == 1)
{
jQuery('#jform_php_jview-lbl').closest('.control-group').show();
}
else
{
jQuery('#jform_php_jview-lbl').closest('.control-group').hide();
}
}
// the vvvvvyw function
function vvvvvyw(add_php_document_vvvvvyw)
{
// set the function logic
if (add_php_document_vvvvvyw == 1)
{
jQuery('#jform_php_document-lbl').closest('.control-group').show();
}
else
{
jQuery('#jform_php_document-lbl').closest('.control-group').hide();
}
}
// the vvvvvyx function
function vvvvvyx(add_css_document_vvvvvyx)
{
// set the function logic
if (add_css_document_vvvvvyx == 1)
{
jQuery('#jform_css_document-lbl').closest('.control-group').show();
}
else
{
jQuery('#jform_css_document-lbl').closest('.control-group').hide();
}
}
// the vvvvvyy function
function vvvvvyy(add_javascript_file_vvvvvyy)
{
// set the function logic
if (add_javascript_file_vvvvvyy == 1)
{
jQuery('#jform_javascript_file-lbl').closest('.control-group').show();
}
else
{
jQuery('#jform_javascript_file-lbl').closest('.control-group').hide();
}
}
// the vvvvvyz function
function vvvvvyz(add_js_document_vvvvvyz)
{
// set the function logic
if (add_js_document_vvvvvyz == 1)
{
jQuery('#jform_js_document-lbl').closest('.control-group').show();
}
else
{
jQuery('#jform_js_document-lbl').closest('.control-group').hide();
}
}
// the vvvvvza function
function vvvvvza(add_css_vvvvvza)
{
// set the function logic
if (add_css_vvvvvza == 1)
{
jQuery('#jform_css-lbl').closest('.control-group').show();
}
else
{
jQuery('#jform_css-lbl').closest('.control-group').hide();
}
}
// the vvvvvzb function
function vvvvvzb(add_php_ajax_vvvvvzb)
{
// set the function logic
if (add_php_ajax_vvvvvzb == 1)
{
jQuery('#jform_ajax_input-lbl').closest('.control-group').show();
jQuery('#jform_php_ajaxmethod-lbl').closest('.control-group').show();
}
else
{
jQuery('#jform_ajax_input-lbl').closest('.control-group').hide();
jQuery('#jform_php_ajaxmethod-lbl').closest('.control-group').hide();
}
}
// the vvvvvzc function
function vvvvvzc(add_custom_button_vvvvvzc)
{
// set the function logic
if (add_custom_button_vvvvvzc == 1)
{
jQuery('#jform_custom_button-lbl').closest('.control-group').show();
jQuery('#jform_php_controller-lbl').closest('.control-group').show();
jQuery('#jform_php_model-lbl').closest('.control-group').show();
}
else
{
jQuery('#jform_custom_button-lbl').closest('.control-group').hide();
jQuery('#jform_php_controller-lbl').closest('.control-group').hide();
jQuery('#jform_php_model-lbl').closest('.control-group').hide();
}
}
// the vvvvvzd function
function vvvvvzd(button_position_vvvvvzd)
{
if (isSet(button_position_vvvvvzd) &&
button_position_vvvvvzd.constructor !== Array)
{
var temp_vvvvvzd = button_position_vvvvvzd;
var button_position_vvvvvzd = [];
button_position_vvvvvzd.push(temp_vvvvvzd);
}
else if (!isSet(button_position_vvvvvzd))
{
var button_position_vvvvvzd = [];
}
var button_position =
button_position_vvvvvzd.some(button_position_vvvvvzd_SomeFunc);
// set this function logic
if (button_position)
{
jQuery('.note_custom_toolbar_placeholder').closest('.control-group').show();
}
else
{
jQuery('.note_custom_toolbar_placeholder').closest('.control-group').hide();
}
}
// the vvvvvzd Some function
function button_position_vvvvvzd_SomeFunc(button_position_vvvvvzd)
{
// set the function logic
if (button_position_vvvvvzd == 5)
{
return true;
}
return false;
}
// the isSet function
function isSet(val)
{
if ((val != undefined) && (val != null) && 0 !==
val.length){
return true;
}
return false;
}
jQuery(document).ready(function()
{
// get the linked details
getLinked();
// check and load all the custom code edit buttons
getEditCustomCodeButtons();
});
function getCodeFrom_server(id, type, type_name, callingName) {
var url = "index.php?option=com_componentbuilder&task=ajax."
+ callingName +
"&format=json&raw=true&vdm="+vastDevMod;
if (token.length > 0 && id > 0 && type.length >
0) {
url += '&' + token + '=1&' + type_name +
'=' + type + '&id=' + id;
}
var getUrl = JRouter(url);
return fetch(getUrl, {
method: 'GET',
headers: {
'Content-Type': 'application/json'
}
}).then(function(response) {
if (response.ok) {
return response.json();
} else {
throw new Error('Network response was not ok');
}
}).then(function(data) {
return data;
}).catch(function(error) {
console.error('There was a problem with the fetch operation:',
error);
});
}
function getLinked() {
getCodeFrom_server(1, 'type', 'type',
'getLinked').then(function(result) {
if (result.error) {
console.error(result.error);
} else if (result) {
document.getElementById('display_linked_to').innerHTML =
result;
}
});
}
function getSnippetDetails(id){
getCodeFrom_server(id, '_type', '_type',
'snippetDetails').then(function(result) {
if(result.snippet){
var description = '';
if (result.description.length > 0) {
description =
'<p>'+result.description+'</p>';
}
var library = '';
if (result.library.length > 0) {
library = '
<b>('+result.library+')</b>';
}
var code = '<div
id="snippet-code"><b>'+result.name+'
('+result.type+')</b> <a
href="'+result.url+'" target="_blank" >see
more details'+library+'</a><br
/><em>'+result.heading+'</em><br
/><textarea id="snippet" class="span12"
rows="11">'+result.snippet+'</textarea></div>';
jQuery('#snippet-code').remove();
jQuery('.snippet-code').append(code);
// make sure the code block is active
jQuery("#snippet").focus(function() {
var jQuerythis = jQuery(this);
jQuerythis.select();
// Work around Chrome's little problem
jQuerythis.mouseup(function() {
// Prevent further mouseup intervention
jQuerythis.unbind("mouseup");
return false;
});
});
}
if(result.usage){
var usage = '<div
id="snippet-usage"><p>'+result.usage+'</p></div>';
jQuery('#snippet-usage').remove();
jQuery('.snippet-usage').append(usage);
}
})
}
function getDynamicValues_server(dynamicId){
var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getDynamicValues&format=json");
if(token.length > 0 && dynamicId > 0){
var request = token+'=1&view=site_view&id='+dynamicId;
}
return jQuery.ajax({
type: 'GET',
url: getUrl,
dataType: 'jsonp',
data: request,
jsonp: 'callback'
});
}
function getDynamicValues(id){
getDynamicValues_server(id).done(function(result) {
if(result){
jQuery('#dynamic_values').remove();
jQuery('.dynamic_values').append('<div
id="dynamic_values">'+result+'</div>');
// make sure the code bocks are active
jQuery("code").click(function() {
jQuery(this).selText().addClass("selected");
});
}
})
}
function getLayoutDetails_server(id){
var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getLayoutDetails&format=json&vdm="+vastDevMod);
if(token.length > 0 && id > 0){
var request = token+'=1&id='+id;
}
return jQuery.ajax({
type: 'GET',
url: getUrl,
dataType: 'jsonp',
data: request,
jsonp: 'callback'
});
}
function getLayoutDetails(id){
getLayoutDetails_server(id).done(function(result) {
if(result){
jQuery('#details').append(result);
// make sure the code bocks are active
jQuery("code").click(function() {
jQuery(this).selText().addClass("selected");
});
}
})
}
function getTemplateDetails(id){
getCodeFrom_server(id, 'type', 'type',
'templateDetails').then(function(result) {
if(result){
jQuery('#details').append(result);
// make sure the code bocks are active
jQuery("code").click(function() {
jQuery(this).selText().addClass("selected");
});
}
})
}
// set snippets that are on the page
var snippetIds = [];
var snippets = {};
var snippet = 0;
jQuery(document).ready(function($)
{
jQuery("#jform_snippet option").each(function()
{
var key = jQuery(this).val();
var text = jQuery(this).text();
snippets[key] = text;
snippetIds.push(key);
});
snippet = jQuery("#jform_snippet").val();
getSnippets();
});
function getSnippets(){
jQuery("#loading").show();
// clear the selection
jQuery('#jform_snippet').find('option').remove().end();
jQuery('#jform_snippet').trigger('liszt:updated');
// get libraries value if set
var libraries = jQuery("#jform_libraries").val();
if (libraries) {
getCodeFrom_server(1, JSON.stringify(libraries), 'libraries',
'getSnippets').then(function(result) {
setSnippets(result);
jQuery("#loading").hide();
if (typeof snippetButton !== 'undefined') {
// ensure button is correct
var snippet = jQuery('#jform_snippet').val();
snippetButton(snippet);
}
});
}
else
{
// load all snippets in none is selected
setSnippets(snippetIds);
jQuery("#loading").hide();
}
}
function setSnippets(array){
if (array) {
jQuery('#jform_snippet').append('<option
value="">'+select_a_snippet+'</option>');
jQuery.each( array, function( i, id ) {
if (id in snippets) {
jQuery('#jform_snippet').append('<option
value="'+id+'">'+snippets[id]+'</option>');
}
if (id == snippet) {
jQuery('#jform_snippet').val(id);
}
});
} else {
jQuery('#jform_snippet').append('<option
value="">'+create_a_snippet+'</option>');
}
jQuery('#jform_snippet').trigger('liszt:updated');
}
function getEditCustomCodeButtons_server(id) {
var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod);
let requestParams = '';
if (token.length > 0 && id > 0) {
requestParams =
token+'=1&id='+id+'&return_here='+return_here;
}
// Construct URL with parameters for GET request
const urlWithParams = getUrl + '&' + requestParams;
// Using the Fetch API for the GET request
return fetch(urlWithParams, {
method: 'GET',
headers: {
'Content-Type': 'application/json'
}
}).then(response => {
if (!response.ok) {
throw new Error('Network response was not ok');
}
return response.json();
});
}
function getEditCustomCodeButtons() {
// Get the id using pure JavaScript
const id = document.querySelector("#jform_id").value;
getEditCustomCodeButtons_server(id).then(function(result) {
if (typeof result === 'object') {
Object.entries(result).forEach(([field, buttons]) => {
// Creating the div element for buttons
const div = document.createElement('div');
div.className = 'control-group';
div.innerHTML = '<div
class="control-label"><label>Add/Edit
Customcode</label></div><div class="controls
control-customcode-buttons-'+field+'"></div>';
// Insert the div before .control-wrapper-{field}
const insertBeforeElement =
document.querySelector(".control-wrapper-"+field);
insertBeforeElement.parentNode.insertBefore(div, insertBeforeElement);
// Adding buttons to the div
Object.entries(buttons).forEach(([name, button]) => {
const controlsDiv =
document.querySelector(".control-customcode-buttons-"+field);
controlsDiv.innerHTML += button;
});
});
}
}).catch(error => {
console.error('Error:', error);
});
}
snippet.js000064400000000606151167367510006602 0ustar00/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder
<https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights
reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
snippet_type.js000064400000000606151167367510007643 0ustar00/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder
<https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights
reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
strtotime.js000064400000021226151167367510007153 0ustar00function strtotime
(text, now) {
// discuss at: http://locutus.io/php/strtotime/
// original by: Caio Ariede (http://caioariede.com)
// improved by: Kevin van Zonneveld (http://kvz.io)
// improved by: Caio Ariede (http://caioariede.com)
// improved by: A. Matías Quezada (http://amatiasq.com)
// improved by: preuter
// improved by: Brett Zamir (http://brett-zamir.me)
// improved by: Mirko Faber
// input by: David
// bugfixed by: Wagner B. Soares
// bugfixed by: Artur Tchernychev
// bugfixed by: Stephan Bösch-Plepelits (http://github.com/plepe)
// note 1: Examples all have a fixed timestamp to prevent
// note 1: tests to fail because of variable time(zones)
// example 1: strtotime('+1 day', 1129633200)
// returns 1: 1129719600
// example 2: strtotime('+1 week 2 days 4 hours 2 seconds',
1129633200)
// returns 2: 1130425202
// example 3: strtotime('last month', 1129633200)
// returns 3: 1127041200
// example 4: strtotime('2009-05-04 08:30:00 GMT')
// returns 4: 1241425800
// example 5: strtotime('2009-05-04 08:30:00+00')
// returns 5: 1241425800
// example 6: strtotime('2009-05-04 08:30:00+02:00')
// returns 6: 1241418600
// example 7: strtotime('2009-05-04T08:30:00Z')
// returns 7: 1241425800
var parsed
var match
var today
var year
var date
var days
var ranges
var len
var times
var regex
var i
var fail = false
if (!text) {
return fail
}
// Unecessary spaces
text = text.replace(/^\s+|\s+$/g, '')
.replace(/\s{2,}/g, ' ')
.replace(/[\t\r\n]/g, '')
.toLowerCase()
// in contrast to php, js Date.parse function interprets:
// dates given as yyyy-mm-dd as in timezone: UTC,
// dates with "." or "-" as MDY instead of DMY
// dates with two-digit years differently
// etc...etc...
// ...therefore we manually parse lots of common date formats
var pattern = new RegExp([
'^(\\d{1,4})',
'([\\-\\.\\/:])',
'(\\d{1,2})',
'([\\-\\.\\/:])',
'(\\d{1,4})',
'(?:\\s(\\d{1,2}):(\\d{2})?:?(\\d{2})?)?',
'(?:\\s([A-Z]+)?)?$'
].join(''))
match = text.match(pattern)
if (match && match[2] === match[4]) {
if (match[1] > 1901) {
switch (match[2]) {
case '-':
// YYYY-M-D
if (match[3] > 12 || match[5] > 31) {
return fail
}
return new Date(match[1], parseInt(match[3], 10) - 1, match[5],
match[6] || 0, match[7] || 0, match[8] || 0, match[9] || 0) /
1000
case '.':
// YYYY.M.D is not parsed by strtotime()
return fail
case '/':
// YYYY/M/D
if (match[3] > 12 || match[5] > 31) {
return fail
}
return new Date(match[1], parseInt(match[3], 10) - 1, match[5],
match[6] || 0, match[7] || 0, match[8] || 0, match[9] || 0) /
1000
}
} else if (match[5] > 1901) {
switch (match[2]) {
case '-':
// D-M-YYYY
if (match[3] > 12 || match[1] > 31) {
return fail
}
return new Date(match[5], parseInt(match[3], 10) - 1, match[1],
match[6] || 0, match[7] || 0, match[8] || 0, match[9] || 0) /
1000
case '.':
// D.M.YYYY
if (match[3] > 12 || match[1] > 31) {
return fail
}
return new Date(match[5], parseInt(match[3], 10) - 1, match[1],
match[6] || 0, match[7] || 0, match[8] || 0, match[9] || 0) /
1000
case '/':
// M/D/YYYY
if (match[1] > 12 || match[3] > 31) {
return fail
}
return new Date(match[5], parseInt(match[1], 10) - 1, match[3],
match[6] || 0, match[7] || 0, match[8] || 0, match[9] || 0) /
1000
}
} else {
switch (match[2]) {
case '-':
// YY-M-D
if (match[3] > 12 || match[5] > 31 || (match[1] < 70
&& match[1] > 38)) {
return fail
}
year = match[1] >= 0 && match[1] <= 38 ? +match[1]
+ 2000 : match[1]
return new Date(year, parseInt(match[3], 10) - 1, match[5],
match[6] || 0, match[7] || 0, match[8] || 0, match[9] || 0) /
1000
case '.':
// D.M.YY or H.MM.SS
if (match[5] >= 70) {
// D.M.YY
if (match[3] > 12 || match[1] > 31) {
return fail
}
return new Date(match[5], parseInt(match[3], 10) - 1, match[1],
match[6] || 0, match[7] || 0, match[8] || 0, match[9] || 0) /
1000
}
if (match[5] < 60 && !match[6]) {
// H.MM.SS
if (match[1] > 23 || match[3] > 59) {
return fail
}
today = new Date()
return new Date(today.getFullYear(), today.getMonth(),
today.getDate(),
match[1] || 0, match[3] || 0, match[5] || 0, match[9] || 0) /
1000
}
// invalid format, cannot be parsed
return fail
case '/':
// M/D/YY
if (match[1] > 12 || match[3] > 31 || (match[5] < 70
&& match[5] > 38)) {
return fail
}
year = match[5] >= 0 && match[5] <= 38 ? +match[5]
+ 2000 : match[5]
return new Date(year, parseInt(match[1], 10) - 1, match[3],
match[6] || 0, match[7] || 0, match[8] || 0, match[9] || 0) /
1000
case ':':
// HH:MM:SS
if (match[1] > 23 || match[3] > 59 || match[5] > 59) {
return fail
}
today = new Date()
return new Date(today.getFullYear(), today.getMonth(),
today.getDate(),
match[1] || 0, match[3] || 0, match[5] || 0) / 1000
}
}
}
// other formats and "now" should be parsed by Date.parse()
if (text === 'now') {
return now === null || isNaN(now)
? new Date().getTime() / 1000 | 0
: now | 0
}
if (!isNaN(parsed = Date.parse(text))) {
return parsed / 1000 | 0
}
// Browsers !== Chrome have problems parsing ISO 8601 date strings, as
they do
// not accept lower case characters, space, or shortened time zones.
// Therefore, fix these problems and try again.
// Examples:
// 2015-04-15 20:33:59+02
// 2015-04-15 20:33:59z
// 2015-04-15t20:33:59+02:00
pattern = new RegExp([
'^([0-9]{4}-[0-9]{2}-[0-9]{2})',
'[ t]',
'([0-9]{2}:[0-9]{2}:[0-9]{2}(\\.[0-9]+)?)',
'([\\+-][0-9]{2}(:[0-9]{2})?|z)'
].join(''))
match = text.match(pattern)
if (match) {
// @todo: time zone information
if (match[4] === 'z') {
match[4] = 'Z'
} else if (match[4].match(/^([+-][0-9]{2})$/)) {
match[4] = match[4] + ':00'
}
if (!isNaN(parsed = Date.parse(match[1] + 'T' + match[2] +
match[4]))) {
return parsed / 1000 | 0
}
}
date = now ? new Date(now * 1000) : new Date()
days = {
'sun': 0,
'mon': 1,
'tue': 2,
'wed': 3,
'thu': 4,
'fri': 5,
'sat': 6
}
ranges = {
'yea': 'FullYear',
'mon': 'Month',
'day': 'Date',
'hou': 'Hours',
'min': 'Minutes',
'sec': 'Seconds'
}
function lastNext (type, range, modifier) {
var diff
var day = days[range]
if (typeof day !== 'undefined') {
diff = day - date.getDay()
if (diff === 0) {
diff = 7 * modifier
} else if (diff > 0 && type === 'last') {
diff -= 7
} else if (diff < 0 && type === 'next') {
diff += 7
}
date.setDate(date.getDate() + diff)
}
}
function process (val) {
// @todo: Reconcile this with regex using \s, taking into account
// browser issues with split and regexes
var splt = val.split(' ')
var type = splt[0]
var range = splt[1].substring(0, 3)
var typeIsNumber = /\d+/.test(type)
var ago = splt[2] === 'ago'
var num = (type === 'last' ? -1 : 1) * (ago ? -1 : 1)
if (typeIsNumber) {
num *= parseInt(type, 10)
}
if (ranges.hasOwnProperty(range) &&
!splt[1].match(/^mon(day|\.)?$/i)) {
return date['set' + ranges[range]](date['get' +
ranges[range]]() + num)
}
if (range === 'wee') {
return date.setDate(date.getDate() + (num * 7))
}
if (type === 'next' || type === 'last') {
lastNext(type, range, num)
} else if (!typeIsNumber) {
return false
}
return true
}
times =
'(years?|months?|weeks?|days?|hours?|minutes?|min|seconds?|sec' +
'|sunday|sun\\.?|monday|mon\\.?|tuesday|tue\\.?|wednesday|wed\\.?'
+
'|thursday|thu\\.?|friday|fri\\.?|saturday|sat\\.?)'
regex = '([+-]?\\d+\\s' + times + '|' +
'(last|next)\\s' + times + ')(\\sago)?'
match = text.match(new RegExp(regex, 'gi'))
if (!match) {
return fail
}
for (i = 0, len = match.length; i < len; i++) {
if (!process(match[i])) {
return fail
}
}
return (date.getTime() / 1000)
}
template.js000064400000020324151167367510006732 0ustar00/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder
<https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights
reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
// Initial Script
document.addEventListener('DOMContentLoaded', function()
{
var add_php_view_vvvvvze = jQuery("#jform_add_php_view
input[type='radio']:checked").val();
vvvvvze(add_php_view_vvvvvze);
});
// the vvvvvze function
function vvvvvze(add_php_view_vvvvvze)
{
// set the function logic
if (add_php_view_vvvvvze == 1)
{
jQuery('#jform_php_view-lbl').closest('.control-group').show();
}
else
{
jQuery('#jform_php_view-lbl').closest('.control-group').hide();
}
}
// the isSet function
function isSet(val)
{
if ((val != undefined) && (val != null) && 0 !==
val.length){
return true;
}
return false;
}
jQuery(document).ready(function($)
{
// check and load all the custom code edit buttons
getEditCustomCodeButtons();
});
function getCodeFrom_server(id, type, type_name, callingName) {
var url = "index.php?option=com_componentbuilder&task=ajax."
+ callingName +
"&format=json&raw=true&vdm="+vastDevMod;
if (token.length > 0 && id > 0 && type.length >
0) {
url += '&' + token + '=1&' + type_name +
'=' + type + '&id=' + id;
}
var getUrl = JRouter(url);
return fetch(getUrl, {
method: 'GET',
headers: {
'Content-Type': 'application/json'
}
}).then(function(response) {
if (response.ok) {
return response.json();
} else {
throw new Error('Network response was not ok');
}
}).then(function(data) {
return data;
}).catch(function(error) {
console.error('There was a problem with the fetch operation:',
error);
});
}
function getEditCustomCodeButtons_server(id) {
var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod);
let requestParams = '';
if (token.length > 0 && id > 0) {
requestParams =
token+'=1&id='+id+'&return_here='+return_here;
}
// Construct URL with parameters for GET request
const urlWithParams = getUrl + '&' + requestParams;
// Using the Fetch API for the GET request
return fetch(urlWithParams, {
method: 'GET',
headers: {
'Content-Type': 'application/json'
}
}).then(response => {
if (!response.ok) {
throw new Error('Network response was not ok');
}
return response.json();
});
}
function getEditCustomCodeButtons() {
// Get the id using pure JavaScript
const id = document.querySelector("#jform_id").value;
getEditCustomCodeButtons_server(id).then(function(result) {
if (typeof result === 'object') {
Object.entries(result).forEach(([field, buttons]) => {
// Creating the div element for buttons
const div = document.createElement('div');
div.className = 'control-group';
div.innerHTML = '<div
class="control-label"><label>Add/Edit
Customcode</label></div><div class="controls
control-customcode-buttons-'+field+'"></div>';
// Insert the div before .control-wrapper-{field}
const insertBeforeElement =
document.querySelector(".control-wrapper-"+field);
insertBeforeElement.parentNode.insertBefore(div, insertBeforeElement);
// Adding buttons to the div
Object.entries(buttons).forEach(([name, button]) => {
const controlsDiv =
document.querySelector(".control-customcode-buttons-"+field);
controlsDiv.innerHTML += button;
});
});
}
}).catch(error => {
console.error('Error:', error);
});
}
function getSnippetDetails(id){
getCodeFrom_server(id, '_type', '_type',
'snippetDetails').then(function(result) {
if(result.snippet){
var description = '';
if (result.description.length > 0) {
description =
'<p>'+result.description+'</p>';
}
var library = '';
if (result.library.length > 0) {
library = '
<b>('+result.library+')</b>';
}
var code = '<div
id="snippet-code"><b>'+result.name+'
('+result.type+')</b> <a
href="'+result.url+'" target="_blank" >see
more details'+library+'</a><br
/><em>'+result.heading+'</em><br
/><textarea id="snippet" class="span12"
rows="11">'+result.snippet+'</textarea></div>';
jQuery('#snippet-code').remove();
jQuery('.snippet-code').append(code);
// make sure the code block is active
jQuery("#snippet").focus(function() {
var jQuerythis = jQuery(this);
jQuerythis.select();
// Work around Chrome's little problem
jQuerythis.mouseup(function() {
// Prevent further mouseup intervention
jQuerythis.unbind("mouseup");
return false;
});
});
}
if(result.usage){
var usage = '<div
id="snippet-usage"><p>'+result.usage+'</p></div>';
jQuery('#snippet-usage').remove();
jQuery('.snippet-usage').append(usage);
}
})
}
function getDynamicValues_server(dynamicId){
var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getDynamicValues&format=json");
if(token.length > 0 && dynamicId > 0){
var request = token+'=1&view=template&id='+dynamicId;
}
return jQuery.ajax({
type: 'GET',
url: getUrl,
dataType: 'jsonp',
data: request,
jsonp: 'callback'
});
}
function getDynamicValues(id){
getDynamicValues_server(id).done(function(result) {
if(result){
jQuery('#dynamic_values').remove();
jQuery('.dynamic_values').append('<div
id="dynamic_values">'+result+'</div>');
// make sure the code bocks are active
jQuery("code").click(function() {
jQuery(this).selText().addClass("selected");
});
}
})
}
function getLayoutDetails_server(id){
var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getLayoutDetails&format=json&vdm="+vastDevMod);
if(token.length > 0 && id > 0){
var request = token+'=1&id='+id;
}
return jQuery.ajax({
type: 'GET',
url: getUrl,
dataType: 'jsonp',
data: request,
jsonp: 'callback'
});
}
function getLayoutDetails(id){
getLayoutDetails_server(id).done(function(result) {
if(result){
jQuery('#details').append(result);
// make sure the code bocks are active
jQuery("code").click(function() {
jQuery(this).selText().addClass("selected");
});
}
})
}
function getTemplateDetails(id){
getCodeFrom_server(id, 'type', 'type',
'templateDetails').then(function(result) {
if(result){
jQuery('#details').append(result);
// make sure the code bocks are active
jQuery("code").click(function() {
jQuery(this).selText().addClass("selected");
});
}
})
}
// set snippets that are on the page
var snippetIds = [];
var snippets = {};
var snippet = 0;
jQuery(document).ready(function($)
{
jQuery("#jform_snippet option").each(function()
{
var key = jQuery(this).val();
var text = jQuery(this).text();
snippets[key] = text;
snippetIds.push(key);
});
snippet = jQuery("#jform_snippet").val();
getSnippets();
});
function getSnippets(){
jQuery("#loading").show();
// clear the selection
jQuery('#jform_snippet').find('option').remove().end();
jQuery('#jform_snippet').trigger('liszt:updated');
// get libraries value if set
var libraries = jQuery("#jform_libraries").val();
if (libraries) {
getCodeFrom_server(1, JSON.stringify(libraries), 'libraries',
'getSnippets').then(function(result) {
setSnippets(result);
jQuery("#loading").hide();
if (typeof snippetButton !== 'undefined') {
// ensure button is correct
var snippet = jQuery('#jform_snippet').val();
snippetButton(snippet);
}
});
}
else
{
// load all snippets in none is selected
setSnippets(snippetIds);
jQuery("#loading").hide();
}
}
function setSnippets(array){
if (array) {
jQuery('#jform_snippet').append('<option
value="">'+select_a_snippet+'</option>');
jQuery.each( array, function( i, id ) {
if (id in snippets) {
jQuery('#jform_snippet').append('<option
value="'+id+'">'+snippets[id]+'</option>');
}
if (id == snippet) {
jQuery('#jform_snippet').val(id);
}
});
} else {
jQuery('#jform_snippet').append('<option
value="">'+create_a_snippet+'</option>');
}
jQuery('#jform_snippet').trigger('liszt:updated');
}
timeago.js000064400000016347151167367510006556 0ustar00/**
* Timeago is a jQuery plugin that makes it easy to support automatically
* updating fuzzy timestamps (e.g. "4 minutes ago" or "about
1 day ago").
*
* @name timeago
* @version 1.5.4
* @requires jQuery v1.2.3+
* @author Ryan McGeary
* @license MIT License -
http://www.opensource.org/licenses/mit-license.php
*
* For usage and examples, visit:
* http://timeago.yarp.com/
*
* Copyright (c) 2008-2017, Ryan McGeary (ryan -[at]- mcgeary [*dot*] org)
*/
(function (factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['jquery'], factory);
} else if (typeof module === 'object' && typeof
module.exports === 'object') {
factory(require('jquery'));
} else {
// Browser globals
factory(jQuery);
}
}(function ($) {
$.timeago = function(timestamp) {
if (timestamp instanceof Date) {
return inWords(timestamp);
} else if (typeof timestamp === "string") {
return inWords($.timeago.parse(timestamp));
} else if (typeof timestamp === "number") {
return inWords(new Date(timestamp));
} else {
return inWords($.timeago.datetime(timestamp));
}
};
var $t = $.timeago;
$.extend($.timeago, {
settings: {
refreshMillis: 60000,
allowPast: true,
allowFuture: false,
localeTitle: false,
cutoff: 0,
autoDispose: true,
strings: {
prefixAgo: null,
prefixFromNow: null,
suffixAgo: "ago",
suffixFromNow: "from now",
inPast: 'any moment now',
seconds: "less than a minute",
minute: "about a minute",
minutes: "%d minutes",
hour: "about an hour",
hours: "about %d hours",
day: "a day",
days: "%d days",
month: "about a month",
months: "%d months",
year: "about a year",
years: "%d years",
wordSeparator: " ",
numbers: []
}
},
inWords: function(distanceMillis) {
if (!this.settings.allowPast && ! this.settings.allowFuture)
{
throw 'timeago allowPast and allowFuture settings can not
both be set to false.';
}
var $l = this.settings.strings;
var prefix = $l.prefixAgo;
var suffix = $l.suffixAgo;
if (this.settings.allowFuture) {
if (distanceMillis < 0) {
prefix = $l.prefixFromNow;
suffix = $l.suffixFromNow;
}
}
if (!this.settings.allowPast && distanceMillis >= 0) {
return this.settings.strings.inPast;
}
var seconds = Math.abs(distanceMillis) / 1000;
var minutes = seconds / 60;
var hours = minutes / 60;
var days = hours / 24;
var years = days / 365;
function substitute(stringOrFunction, number) {
var string = $.isFunction(stringOrFunction) ?
stringOrFunction(number, distanceMillis) : stringOrFunction;
var value = ($l.numbers && $l.numbers[number]) || number;
return string.replace(/%d/i, value);
}
var words = seconds < 45 && substitute($l.seconds,
Math.round(seconds)) ||
seconds < 90 && substitute($l.minute, 1) ||
minutes < 45 && substitute($l.minutes,
Math.round(minutes)) ||
minutes < 90 && substitute($l.hour, 1) ||
hours < 24 && substitute($l.hours, Math.round(hours)) ||
hours < 42 && substitute($l.day, 1) ||
days < 30 && substitute($l.days, Math.round(days)) ||
days < 45 && substitute($l.month, 1) ||
days < 365 && substitute($l.months, Math.round(days /
30)) ||
years < 1.5 && substitute($l.year, 1) ||
substitute($l.years, Math.round(years));
var separator = $l.wordSeparator || "";
if ($l.wordSeparator === undefined) { separator = " "; }
return $.trim([prefix, words, suffix].join(separator));
},
parse: function(iso8601) {
var s = $.trim(iso8601);
s = s.replace(/\.\d+/,""); // remove milliseconds
s = s.replace(/-/,"/").replace(/-/,"/");
s = s.replace(/T/," ").replace(/Z/," UTC");
s = s.replace(/([\+\-]\d\d)\:?(\d\d)/," $1$2"); // -04:00
-> -0400
s = s.replace(/([\+\-]\d\d)$/," $100"); // +09 -> +0900
return new Date(s);
},
datetime: function(elem) {
var iso8601 = $t.isTime(elem) ? $(elem).attr("datetime") :
$(elem).attr("title");
return $t.parse(iso8601);
},
isTime: function(elem) {
// jQuery's `is()` doesn't play well with HTML5 in IE
return $(elem).get(0).tagName.toLowerCase() === "time"; //
$(elem).is("time");
}
});
// functions that can be called via $(el).timeago('action')
// init is default when no action is given
// functions are called with context of a single element
var functions = {
init: function() {
functions.dispose.call(this);
var refresh_el = $.proxy(refresh, this);
refresh_el();
var $s = $t.settings;
if ($s.refreshMillis > 0) {
this._timeagoInterval = setInterval(refresh_el, $s.refreshMillis);
}
},
update: function(timestamp) {
var date = (timestamp instanceof Date) ? timestamp :
$t.parse(timestamp);
$(this).data('timeago', { datetime: date });
if ($t.settings.localeTitle) {
$(this).attr("title", date.toLocaleString());
}
refresh.apply(this);
},
updateFromDOM: function() {
$(this).data('timeago', { datetime: $t.parse(
$t.isTime(this) ? $(this).attr("datetime") :
$(this).attr("title") ) });
refresh.apply(this);
},
dispose: function () {
if (this._timeagoInterval) {
window.clearInterval(this._timeagoInterval);
this._timeagoInterval = null;
}
}
};
$.fn.timeago = function(action, options) {
var fn = action ? functions[action] : functions.init;
if (!fn) {
throw new Error("Unknown function name '"+ action
+"' for timeago");
}
// each over objects here and call the requested function
this.each(function() {
fn.call(this, options);
});
return this;
};
function refresh() {
var $s = $t.settings;
//check if it's still visible
if ($s.autoDispose &&
!$.contains(document.documentElement,this)) {
//stop if it has been removed
$(this).timeago("dispose");
return this;
}
var data = prepareData(this);
if (!isNaN(data.datetime)) {
if ( $s.cutoff === 0 || Math.abs(distance(data.datetime)) <
$s.cutoff) {
$(this).text(inWords(data.datetime));
} else {
if ($(this).attr('title').length > 0) {
$(this).text($(this).attr('title'));
}
}
}
return this;
}
function prepareData(element) {
element = $(element);
if (!element.data("timeago")) {
element.data("timeago", { datetime: $t.datetime(element)
});
var text = $.trim(element.text());
if ($t.settings.localeTitle) {
element.attr("title",
element.data('timeago').datetime.toLocaleString());
} else if (text.length > 0 && !($t.isTime(element)
&& element.attr("title"))) {
element.attr("title", text);
}
}
return element.data("timeago");
}
function inWords(date) {
return $t.inWords(distance(date));
}
function distance(date) {
return (new Date().getTime() - date.getTime());
}
// fix for IE6 suckage
document.createElement("abbr");
document.createElement("time");
}));
validation_rule.js000064400000011745151167367510010307 0ustar00/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder
<https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights
reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
jQuery(document).ready(function()
{
// get the rule name
var ruleName = jQuery('#jform_name').val();
// check if this rule name is taken
checkRuleName(ruleName);
// get type value
var rulefilename = jQuery("#jform_inherit
option:selected").val();
if(jQuery('#jform_php').length == 0) {
getExistingValidationRuleCode(rulefilename);
}
// load the used in div
// jQuery('#usedin').show();
// check and load all the customcode edit buttons
setTimeout(getEditCustomCodeButtons, 300);
});
function getExistingValidationRuleCode_server(rulefilename){
var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getExistingValidationRuleCode&format=json&raw=true");
if(token.length > 0 && rulefilename.length > 0){
var request = token+'=1&name='+rulefilename;
}
return jQuery.ajax({
type: 'GET',
url: getUrl,
dataType: 'json',
data: request,
jsonp: false
});
}
function getExistingValidationRuleCode(rulefilename,setValue){
getExistingValidationRuleCode_server(rulefilename).done(function(result)
{
if(result.values){
jQuery('textarea#jform_php').val(result.values);
}
})
}
function checkRuleName(ruleName) {
if (ruleName.length > 2) {
var ide = jQuery('#jform_id').val();
if (ide == 0) {
ide = -1;
}
checkRuleName_server(ruleName, ide).done(function(result) {
if(result.name && result.message){
// show notice that functioName is okay
jQuery.UIkit.notify({message: result.message, timeout: result.timeout,
status: result.status, pos: 'top-right'});
jQuery('#jform_name').val(result.name);
// now start search for where the function is used
usedin(result.name, ide);
} else if(result.message){
// show notice that ruleName is not okay
jQuery.UIkit.notify({message: result.message, timeout: result.timeout,
status: result.status, pos: 'top-right'});
jQuery('#jform_name').val('');
} else {
// set an error that message was not send
jQuery.UIkit.notify({message:
Joomla.JText._('COM_COMPONENTBUILDER_VALIDATION_RULE_NAME_ALREADY_TAKEN_PLEASE_TRY_AGAIN'),
timeout: 7000, status: 'danger', pos: 'top-right'});
jQuery('#jform_name').val('');
}
});
} else {
// set an error that message was not send
jQuery.UIkit.notify({message:
Joomla.JText._('COM_COMPONENTBUILDER_YOU_MUST_ADD_AN_UNIQUE_VALIDATION_RULE_NAME'),
timeout: 5000, status: 'danger', pos: 'top-right'});
jQuery('#jform_name').val('');
}
}
// check Function Name
function checkRuleName_server(ruleName, ide){
var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.checkRuleName&format=json&raw=true");
if(token.length > 0){
var request =
token+'=1&name='+ruleName+'&id='+ide;
}
return jQuery.ajax({
type: 'GET',
url: getUrl,
dataType: 'json',
data: request,
jsonp: false
});
}
function getEditCustomCodeButtons_server(id) {
var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod);
let requestParams = '';
if (token.length > 0 && id > 0) {
requestParams =
token+'=1&id='+id+'&return_here='+return_here;
}
// Construct URL with parameters for GET request
const urlWithParams = getUrl + '&' + requestParams;
// Using the Fetch API for the GET request
return fetch(urlWithParams, {
method: 'GET',
headers: {
'Content-Type': 'application/json'
}
}).then(response => {
if (!response.ok) {
throw new Error('Network response was not ok');
}
return response.json();
});
}
function getEditCustomCodeButtons() {
// Get the id using pure JavaScript
const id = document.querySelector("#jform_id").value;
getEditCustomCodeButtons_server(id).then(function(result) {
if (typeof result === 'object') {
Object.entries(result).forEach(([field, buttons]) => {
// Creating the div element for buttons
const div = document.createElement('div');
div.className = 'control-group';
div.innerHTML = '<div
class="control-label"><label>Add/Edit
Customcode</label></div><div class="controls
control-customcode-buttons-'+field+'"></div>';
// Insert the div before .control-wrapper-{field}
const insertBeforeElement =
document.querySelector(".control-wrapper-"+field);
insertBeforeElement.parentNode.insertBefore(div, insertBeforeElement);
// Adding buttons to the div
Object.entries(buttons).forEach(([name, button]) => {
const controlsDiv =
document.querySelector(".control-customcode-buttons-"+field);
controlsDiv.innerHTML += button;
});
});
}
}).catch(error => {
console.error('Error:', error);
});
}
admin/export.js000064400000003425151167411240007521
0ustar00jQuery.noConflict();
var RSMembership = {}
RSMembership.$ = jQuery;
RSMembership.exportCSV = {
totalItems : 0,
view : '',
setProgress: function (current) {
if (RSMembership.$('#com-rsmembership-joomla-configuration-progress
.com-rsmembership-bar').length > 0) {
var currentProgress = (current * 100) / this.totalItems;
RSMembership.$('#com-rsmembership-joomla-configuration-progress
.com-rsmembership-bar').css('width', currentProgress +
'%').text(parseInt(currentProgress) + '%');
}
},
setCSV : function(from, fileHash) {
if (this.totalItems > 0 && from == this.totalItems) {
RSMembership.$('#com-rsmembership-joomla-configuration-progress').hide();
window.location.assign('index.php?option=com_rsmembership&task='+this.view+'.exportcsv&filehash='+fileHash);
}
else
{
RSMembership.$.ajax({
dataType: 'json',
type: 'POST',
url: 'index.php',
data: {
option: 'com_rsmembership',
task: this.view+'.writecsv',
start: from,
filehash: fileHash
},
beforeSend: function() {
RSMembership.$('#j-main-container').find('.alert').remove();
RSMembership.$('#com-rsmembership-joomla-configuration-progress').show();
},
success: function(data) {
if (data.success == true) {
from = data.response.newFrom;
fileHash = data.response.fileHash;
RSMembership.exportCSV.setProgress(from);
setTimeout(function(){
RSMembership.exportCSV.setCSV(from,fileHash);
},700);
} else {
RSMembership.$('#com-rsmembership-joomla-configuration-progress').hide();
RSMembership.$('#j-main-container').prepend(RSMembership.$('<div
class="alert
alert-error"></div>').text(data.response));
}
}
});
}
}
}
admin/index.html000064400000000054151167411240007632
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>admin/ordertable.js000064400000000560151167411240010320
0ustar00Joomla.orderTable = function(listOrder) {
table = document.getElementById("sortTable");
direction = document.getElementById("directionTable");
order = table.options[table.selectedIndex].value;
if (order != listOrder) {
dirn = 'asc';
} else {
dirn = direction.options[direction.selectedIndex].value;
}
Joomla.tableOrdering(order, dirn, '');
}admin/script.js000064400000000565151167411240007506 0ustar00// XML HTTP
Object
function rsmembership_get_xml_http_object()
{
var xmlHttp=null;
try
{
// Firefox, Opera 8.0+, Safari
xmlHttp=new XMLHttpRequest();
}
catch (e)
{
// Internet Explorer
try
{
xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
}
}
return xmlHttp;
}admin/ui/core.js000064400000020506151167411240007544 0ustar00/*!
* jQuery UI Core 1.10.3
* http://jqueryui.com
*
* Copyright 2013 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/category/ui-core/
*/
(function( $, undefined ) {
var uuid = 0,
runiqueId = /^ui-id-\d+$/;
// $.ui might exist from components with no dependencies, e.g.,
$.ui.position
$.ui = $.ui || {};
$.extend( $.ui, {
version: "1.10.3",
keyCode: {
BACKSPACE: 8,
COMMA: 188,
DELETE: 46,
DOWN: 40,
END: 35,
ENTER: 13,
ESCAPE: 27,
HOME: 36,
LEFT: 37,
NUMPAD_ADD: 107,
NUMPAD_DECIMAL: 110,
NUMPAD_DIVIDE: 111,
NUMPAD_ENTER: 108,
NUMPAD_MULTIPLY: 106,
NUMPAD_SUBTRACT: 109,
PAGE_DOWN: 34,
PAGE_UP: 33,
PERIOD: 190,
RIGHT: 39,
SPACE: 32,
TAB: 9,
UP: 38
}
});
// plugins
$.fn.extend({
focus: (function( orig ) {
return function( delay, fn ) {
return typeof delay === "number" ?
this.each(function() {
var elem = this;
setTimeout(function() {
$( elem ).focus();
if ( fn ) {
fn.call( elem );
}
}, delay );
}) :
orig.apply( this, arguments );
};
})( $.fn.focus ),
scrollParent: function() {
var scrollParent;
if (($.ui.ie &&
(/(static|relative)/).test(this.css("position"))) ||
(/absolute/).test(this.css("position"))) {
scrollParent = this.parents().filter(function() {
return
(/(relative|absolute|fixed)/).test($.css(this,"position"))
&&
(/(auto|scroll)/).test($.css(this,"overflow")+$.css(this,"overflow-y")+$.css(this,"overflow-x"));
}).eq(0);
} else {
scrollParent = this.parents().filter(function() {
return
(/(auto|scroll)/).test($.css(this,"overflow")+$.css(this,"overflow-y")+$.css(this,"overflow-x"));
}).eq(0);
}
return (/fixed/).test(this.css("position")) ||
!scrollParent.length ? $(document) : scrollParent;
},
zIndex: function( zIndex ) {
if ( zIndex !== undefined ) {
return this.css( "zIndex", zIndex );
}
if ( this.length ) {
var elem = $( this[ 0 ] ), position, value;
while ( elem.length && elem[ 0 ] !== document ) {
// Ignore z-index if position is set to a value where z-index is
ignored by the browser
// This makes behavior of this function consistent across browsers
// WebKit always returns auto if the element is positioned
position = elem.css( "position" );
if ( position === "absolute" || position ===
"relative" || position === "fixed" ) {
// IE returns 0 when zIndex is not specified
// other browsers return a string
// we ignore the case of nested elements with an explicit value of 0
// <div style="z-index: -10;"><div
style="z-index: 0;"></div></div>
value = parseInt( elem.css( "zIndex" ), 10 );
if ( !isNaN( value ) && value !== 0 ) {
return value;
}
}
elem = elem.parent();
}
}
return 0;
},
uniqueId: function() {
return this.each(function() {
if ( !this.id ) {
this.id = "ui-id-" + (++uuid);
}
});
},
removeUniqueId: function() {
return this.each(function() {
if ( runiqueId.test( this.id ) ) {
$( this ).removeAttr( "id" );
}
});
}
});
// selectors
function focusable( element, isTabIndexNotNaN ) {
var map, mapName, img,
nodeName = element.nodeName.toLowerCase();
if ( "area" === nodeName ) {
map = element.parentNode;
mapName = map.name;
if ( !element.href || !mapName || map.nodeName.toLowerCase() !==
"map" ) {
return false;
}
img = $( "img[usemap=#" + mapName + "]" )[0];
return !!img && visible( img );
}
return ( /input|select|textarea|button|object/.test( nodeName ) ?
!element.disabled :
"a" === nodeName ?
element.href || isTabIndexNotNaN :
isTabIndexNotNaN) &&
// the element and all of its ancestors must be visible
visible( element );
}
function visible( element ) {
return $.expr.filters.visible( element ) &&
!$( element ).parents().addBack().filter(function() {
return $.css( this, "visibility" ) === "hidden";
}).length;
}
$.extend( $.expr[ ":" ], {
data: $.expr.createPseudo ?
$.expr.createPseudo(function( dataName ) {
return function( elem ) {
return !!$.data( elem, dataName );
};
}) :
// support: jQuery <1.8
function( elem, i, match ) {
return !!$.data( elem, match[ 3 ] );
},
focusable: function( element ) {
return focusable( element, !isNaN( $.attr( element, "tabindex"
) ) );
},
tabbable: function( element ) {
var tabIndex = $.attr( element, "tabindex" ),
isTabIndexNaN = isNaN( tabIndex );
return ( isTabIndexNaN || tabIndex >= 0 ) && focusable(
element, !isTabIndexNaN );
}
});
// support: jQuery <1.8
if ( !$( "<a>" ).outerWidth( 1 ).jquery ) {
$.each( [ "Width", "Height" ], function( i, name ) {
var side = name === "Width" ? [ "Left",
"Right" ] : [ "Top", "Bottom" ],
type = name.toLowerCase(),
orig = {
innerWidth: $.fn.innerWidth,
innerHeight: $.fn.innerHeight,
outerWidth: $.fn.outerWidth,
outerHeight: $.fn.outerHeight
};
function reduce( elem, size, border, margin ) {
$.each( side, function() {
size -= parseFloat( $.css( elem, "padding" + this ) ) || 0;
if ( border ) {
size -= parseFloat( $.css( elem, "border" + this +
"Width" ) ) || 0;
}
if ( margin ) {
size -= parseFloat( $.css( elem, "margin" + this ) ) || 0;
}
});
return size;
}
$.fn[ "inner" + name ] = function( size ) {
if ( size === undefined ) {
return orig[ "inner" + name ].call( this );
}
return this.each(function() {
$( this ).css( type, reduce( this, size ) + "px" );
});
};
$.fn[ "outer" + name] = function( size, margin ) {
if ( typeof size !== "number" ) {
return orig[ "outer" + name ].call( this, size );
}
return this.each(function() {
$( this).css( type, reduce( this, size, true, margin ) + "px"
);
});
};
});
}
// support: jQuery <1.8
if ( !$.fn.addBack ) {
$.fn.addBack = function( selector ) {
return this.add( selector == null ?
this.prevObject : this.prevObject.filter( selector )
);
};
}
// support: jQuery 1.6.1, 1.6.2 (http://bugs.jquery.com/ticket/9413)
if ( $( "<a>" ).data( "a-b", "a"
).removeData( "a-b" ).data( "a-b" ) ) {
$.fn.removeData = (function( removeData ) {
return function( key ) {
if ( arguments.length ) {
return removeData.call( this, $.camelCase( key ) );
} else {
return removeData.call( this );
}
};
})( $.fn.removeData );
}
// deprecated
$.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() );
$.support.selectstart = "onselectstart" in
document.createElement( "div" );
$.fn.extend({
disableSelection: function() {
return this.bind( ( $.support.selectstart ? "selectstart" :
"mousedown" ) +
".ui-disableSelection", function( event ) {
event.preventDefault();
});
},
enableSelection: function() {
return this.unbind( ".ui-disableSelection" );
}
});
$.extend( $.ui, {
// $.ui.plugin is deprecated. Use $.widget() extensions instead.
plugin: {
add: function( module, option, set ) {
var i,
proto = $.ui[ module ].prototype;
for ( i in set ) {
proto.plugins[ i ] = proto.plugins[ i ] || [];
proto.plugins[ i ].push( [ option, set[ i ] ] );
}
},
call: function( instance, name, args ) {
var i,
set = instance.plugins[ name ];
if ( !set || !instance.element[ 0 ].parentNode || instance.element[ 0
].parentNode.nodeType === 11 ) {
return;
}
for ( i = 0; i < set.length; i++ ) {
if ( instance.options[ set[ i ][ 0 ] ] ) {
set[ i ][ 1 ].apply( instance.element, args );
}
}
}
},
// only used by resizable
hasScroll: function( el, a ) {
//If overflow is hidden, the element might have extra content, but the
user wants to hide it
if ( $( el ).css( "overflow" ) === "hidden") {
return false;
}
var scroll = ( a && a === "left" ) ?
"scrollLeft" : "scrollTop",
has = false;
if ( el[ scroll ] > 0 ) {
return true;
}
// TODO: determine which cases actually cause this to happen
// if the element doesn't have the scroll set, see if it's
possible to
// set the scroll
el[ scroll ] = 1;
has = ( el[ scroll ] > 0 );
el[ scroll ] = 0;
return has;
}
});
})( jQuery );
admin/ui/datepicker.js000064400000231034151167411240010727 0ustar00/*!
* jQuery UI Datepicker 1.10.3
* http://jqueryui.com
*
* Copyright 2013 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/datepicker/
*
* Depends:
* jquery.ui.core.js
*/
(function( $, undefined ) {
$.extend($.ui, { datepicker: { version: "1.10.3" } });
var PROP_NAME = "datepicker",
instActive;
/* Date picker manager.
Use the singleton instance of this class, $.datepicker, to interact with
the date picker.
Settings for (groups of) date pickers are maintained in an instance
object,
allowing multiple different settings on the same page. */
function Datepicker() {
this._curInst = null; // The current instance in use
this._keyEvent = false; // If the last event was a key event
this._disabledInputs = []; // List of date picker inputs that have been
disabled
this._datepickerShowing = false; // True if the popup picker is showing ,
false if not
this._inDialog = false; // True if showing within a "dialog",
false if not
this._mainDivId = "ui-datepicker-div"; // The ID of the main
datepicker division
this._inlineClass = "ui-datepicker-inline"; // The name of the
inline marker class
this._appendClass = "ui-datepicker-append"; // The name of the
append marker class
this._triggerClass = "ui-datepicker-trigger"; // The name of the
trigger marker class
this._dialogClass = "ui-datepicker-dialog"; // The name of the
dialog marker class
this._disableClass = "ui-datepicker-disabled"; // The name of
the disabled covering marker class
this._unselectableClass = "ui-datepicker-unselectable"; // The
name of the unselectable cell marker class
this._currentClass = "ui-datepicker-current-day"; // The name of
the current day marker class
this._dayOverClass = "ui-datepicker-days-cell-over"; // The name
of the day hover marker class
this.regional = []; // Available regional settings, indexed by language
code
this.regional[""] = { // Default regional settings
closeText: "Done", // Display text for close link
prevText: "Prev", // Display text for previous month link
nextText: "Next", // Display text for next month link
currentText: "Today", // Display text for current month link
monthNames:
["January","February","March","April","May","June",
"July","August","September","October","November","December"],
// Names of months for drop-down and formatting
monthNamesShort: ["Jan", "Feb", "Mar",
"Apr", "May", "Jun", "Jul",
"Aug", "Sep", "Oct", "Nov",
"Dec"], // For formatting
dayNames: ["Sunday", "Monday", "Tuesday",
"Wednesday", "Thursday", "Friday",
"Saturday"], // For formatting
dayNamesShort: ["Sun", "Mon", "Tue",
"Wed", "Thu", "Fri", "Sat"], // For
formatting
dayNamesMin:
["Su","Mo","Tu","We","Th","Fr","Sa"],
// Column headings for days starting at Sunday
weekHeader: "Wk", // Column header for week of the year
dateFormat: "mm/dd/yy", // See format options on parseDate
firstDay: 0, // The first day of the week, Sun = 0, Mon = 1, ...
isRTL: false, // True if right-to-left language, false if left-to-right
showMonthAfterYear: false, // True if the year select precedes month,
false for month then year
yearSuffix: "" // Additional text to append to the year in the
month headers
};
this._defaults = { // Global defaults for all the date picker instances
showOn: "focus", // "focus" for popup on focus,
// "button" for trigger button, or "both" for
either
showAnim: "fadeIn", // Name of jQuery animation for popup
showOptions: {}, // Options for enhanced animations
defaultDate: null, // Used when field is blank: actual date,
// +/-number for offset from today, null for today
appendText: "", // Display text following the input box, e.g.
showing the format
buttonText: "...", // Text for trigger button
buttonImage: "", // URL for trigger button image
buttonImageOnly: false, // True if the image appears alone, false if it
appears on a button
hideIfNoPrevNext: false, // True to hide next/previous month links
// if not applicable, false to just disable them
navigationAsDateFormat: false, // True if date formatting applied to
prev/today/next links
gotoCurrent: false, // True if today link goes back to current selection
instead
changeMonth: false, // True if month can be selected directly, false if
only prev/next
changeYear: false, // True if year can be selected directly, false if
only prev/next
yearRange: "c-10:c+10", // Range of years to display in
drop-down,
// either relative to today's year (-nn:+nn), relative to currently
displayed year
// (c-nn:c+nn), absolute (nnnn:nnnn), or a combination of the above
(nnnn:-n)
showOtherMonths: false, // True to show dates in other months, false to
leave blank
selectOtherMonths: false, // True to allow selection of dates in other
months, false for unselectable
showWeek: false, // True to show week of the year, false to not show it
calculateWeek: this.iso8601Week, // How to calculate the week of the
year,
// takes a Date and returns the number of the week for it
shortYearCutoff: "+10", // Short year values < this are in
the current century,
// > this are in the previous century,
// string value starting with "+" for current year + value
minDate: null, // The earliest selectable date, or null for no limit
maxDate: null, // The latest selectable date, or null for no limit
duration: "fast", // Duration of display/closure
beforeShowDay: null, // Function that takes a date and returns an array
with
// [0] = true if selectable, false if not, [1] = custom CSS class
name(s) or "",
// [2] = cell title (optional), e.g. $.datepicker.noWeekends
beforeShow: null, // Function that takes an input field and
// returns a set of custom settings for the date picker
onSelect: null, // Define a callback function when a date is selected
onChangeMonthYear: null, // Define a callback function when the month or
year is changed
onClose: null, // Define a callback function when the datepicker is
closed
numberOfMonths: 1, // Number of months to show at a time
showCurrentAtPos: 0, // The position in multipe months at which to show
the current month (starting at 0)
stepMonths: 1, // Number of months to step back/forward
stepBigMonths: 12, // Number of months to step back/forward for the big
links
altField: "", // Selector for an alternate field to store
selected dates into
altFormat: "", // The date format to use for the alternate
field
constrainInput: true, // The input is constrained by the current date
format
showButtonPanel: false, // True to show button panel, false to not show
it
autoSize: false, // True to size the input for the date format, false to
leave as is
disabled: false // The initial disabled state
};
$.extend(this._defaults, this.regional[""]);
this.dpDiv = bindHover($("<div id='" + this._mainDivId +
"' class='ui-datepicker ui-widget ui-widget-content
ui-helper-clearfix ui-corner-all'></div>"));
}
$.extend(Datepicker.prototype, {
/* Class name added to elements to indicate already configured with a date
picker. */
markerClassName: "hasDatepicker",
//Keep track of the maximum number of rows displayed (see #7043)
maxRows: 4,
// TODO rename to "widget" when switching to widget factory
_widgetDatepicker: function() {
return this.dpDiv;
},
/* Override the default settings for all instances of the date picker.
* @param settings object - the new settings to use as defaults
(anonymous object)
* @return the manager object
*/
setDefaults: function(settings) {
extendRemove(this._defaults, settings || {});
return this;
},
/* Attach the date picker to a jQuery selection.
* @param target element - the target input field or division or span
* @param settings object - the new settings to use for this date picker
instance (anonymous)
*/
_attachDatepicker: function(target, settings) {
var nodeName, inline, inst;
nodeName = target.nodeName.toLowerCase();
inline = (nodeName === "div" || nodeName ===
"span");
if (!target.id) {
this.uuid += 1;
target.id = "dp" + this.uuid;
}
inst = this._newInst($(target), inline);
inst.settings = $.extend({}, settings || {});
if (nodeName === "input") {
this._connectDatepicker(target, inst);
} else if (inline) {
this._inlineDatepicker(target, inst);
}
},
/* Create a new instance object. */
_newInst: function(target, inline) {
var id = target[0].id.replace(/([^A-Za-z0-9_\-])/g, "\\\\$1");
// escape jQuery meta chars
return {id: id, input: target, // associated target
selectedDay: 0, selectedMonth: 0, selectedYear: 0, // current selection
drawMonth: 0, drawYear: 0, // month being drawn
inline: inline, // is datepicker inline or not
dpDiv: (!inline ? this.dpDiv : // presentation div
bindHover($("<div class='" + this._inlineClass +
" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix
ui-corner-all'></div>")))};
},
/* Attach the date picker to an input field. */
_connectDatepicker: function(target, inst) {
var input = $(target);
inst.append = $([]);
inst.trigger = $([]);
if (input.hasClass(this.markerClassName)) {
return;
}
this._attachments(input, inst);
input.addClass(this.markerClassName).keydown(this._doKeyDown).
keypress(this._doKeyPress).keyup(this._doKeyUp);
this._autoSize(inst);
$.data(target, PROP_NAME, inst);
//If disabled option is true, disable the datepicker once it has been
attached to the input (see ticket #5665)
if( inst.settings.disabled ) {
this._disableDatepicker( target );
}
},
/* Make attachments based on settings. */
_attachments: function(input, inst) {
var showOn, buttonText, buttonImage,
appendText = this._get(inst, "appendText"),
isRTL = this._get(inst, "isRTL");
if (inst.append) {
inst.append.remove();
}
if (appendText) {
inst.append = $("<span class='" + this._appendClass +
"'>" + appendText + "</span>");
input[isRTL ? "before" : "after"](inst.append);
}
input.unbind("focus", this._showDatepicker);
if (inst.trigger) {
inst.trigger.remove();
}
showOn = this._get(inst, "showOn");
if (showOn === "focus" || showOn === "both") { //
pop-up date picker when in the marked field
input.focus(this._showDatepicker);
}
if (showOn === "button" || showOn === "both") { //
pop-up date picker when button clicked
buttonText = this._get(inst, "buttonText");
buttonImage = this._get(inst, "buttonImage");
inst.trigger = $(this._get(inst, "buttonImageOnly") ?
$("<img/>").addClass(this._triggerClass).
attr({ src: buttonImage, alt: buttonText, title: buttonText }) :
$("<button
type='button'></button>").addClass(this._triggerClass).
html(!buttonImage ? buttonText : $("<img/>").attr(
{ src:buttonImage, alt:buttonText, title:buttonText })));
input[isRTL ? "before" : "after"](inst.trigger);
inst.trigger.click(function() {
if ($.datepicker._datepickerShowing && $.datepicker._lastInput
=== input[0]) {
$.datepicker._hideDatepicker();
} else if ($.datepicker._datepickerShowing &&
$.datepicker._lastInput !== input[0]) {
$.datepicker._hideDatepicker();
$.datepicker._showDatepicker(input[0]);
} else {
$.datepicker._showDatepicker(input[0]);
}
return false;
});
}
},
/* Apply the maximum length for the date format. */
_autoSize: function(inst) {
if (this._get(inst, "autoSize") && !inst.inline) {
var findMax, max, maxI, i,
date = new Date(2009, 12 - 1, 20), // Ensure double digits
dateFormat = this._get(inst, "dateFormat");
if (dateFormat.match(/[DM]/)) {
findMax = function(names) {
max = 0;
maxI = 0;
for (i = 0; i < names.length; i++) {
if (names[i].length > max) {
max = names[i].length;
maxI = i;
}
}
return maxI;
};
date.setMonth(findMax(this._get(inst, (dateFormat.match(/MM/) ?
"monthNames" : "monthNamesShort"))));
date.setDate(findMax(this._get(inst, (dateFormat.match(/DD/) ?
"dayNames" : "dayNamesShort"))) + 20 -
date.getDay());
}
inst.input.attr("size", this._formatDate(inst, date).length);
}
},
/* Attach an inline date picker to a div. */
_inlineDatepicker: function(target, inst) {
var divSpan = $(target);
if (divSpan.hasClass(this.markerClassName)) {
return;
}
divSpan.addClass(this.markerClassName).append(inst.dpDiv);
$.data(target, PROP_NAME, inst);
this._setDate(inst, this._getDefaultDate(inst), true);
this._updateDatepicker(inst);
this._updateAlternate(inst);
//If disabled option is true, disable the datepicker before showing it
(see ticket #5665)
if( inst.settings.disabled ) {
this._disableDatepicker( target );
}
// Set display:block in place of inst.dpDiv.show() which won't work
on disconnected elements
// http://bugs.jqueryui.com/ticket/7552 - A Datepicker created on a
detached div has zero height
inst.dpDiv.css( "display", "block" );
},
/* Pop-up the date picker in a "dialog" box.
* @param input element - ignored
* @param date string or Date - the initial date to display
* @param onSelect function - the function to call when a date is
selected
* @param settings object - update the dialog date picker
instance's settings (anonymous object)
* @param pos int[2] - coordinates for the dialog's position within
the screen or
* event - with x/y coordinates or
* leave empty for default (screen centre)
* @return the manager object
*/
_dialogDatepicker: function(input, date, onSelect, settings, pos) {
var id, browserWidth, browserHeight, scrollX, scrollY,
inst = this._dialogInst; // internal instance
if (!inst) {
this.uuid += 1;
id = "dp" + this.uuid;
this._dialogInput = $("<input type='text'
id='" + id +
"' style='position: absolute; top: -100px; width:
0px;'/>");
this._dialogInput.keydown(this._doKeyDown);
$("body").append(this._dialogInput);
inst = this._dialogInst = this._newInst(this._dialogInput, false);
inst.settings = {};
$.data(this._dialogInput[0], PROP_NAME, inst);
}
extendRemove(inst.settings, settings || {});
date = (date && date.constructor === Date ?
this._formatDate(inst, date) : date);
this._dialogInput.val(date);
this._pos = (pos ? (pos.length ? pos : [pos.pageX, pos.pageY]) : null);
if (!this._pos) {
browserWidth = document.documentElement.clientWidth;
browserHeight = document.documentElement.clientHeight;
scrollX = document.documentElement.scrollLeft ||
document.body.scrollLeft;
scrollY = document.documentElement.scrollTop ||
document.body.scrollTop;
this._pos = // should use actual width/height below
[(browserWidth / 2) - 100 + scrollX, (browserHeight / 2) - 150 +
scrollY];
}
// move input on screen for focus, but hidden behind dialog
this._dialogInput.css("left", (this._pos[0] + 20) +
"px").css("top", this._pos[1] + "px");
inst.settings.onSelect = onSelect;
this._inDialog = true;
this.dpDiv.addClass(this._dialogClass);
this._showDatepicker(this._dialogInput[0]);
if ($.blockUI) {
$.blockUI(this.dpDiv);
}
$.data(this._dialogInput[0], PROP_NAME, inst);
return this;
},
/* Detach a datepicker from its control.
* @param target element - the target input field or division or span
*/
_destroyDatepicker: function(target) {
var nodeName,
$target = $(target),
inst = $.data(target, PROP_NAME);
if (!$target.hasClass(this.markerClassName)) {
return;
}
nodeName = target.nodeName.toLowerCase();
$.removeData(target, PROP_NAME);
if (nodeName === "input") {
inst.append.remove();
inst.trigger.remove();
$target.removeClass(this.markerClassName).
unbind("focus", this._showDatepicker).
unbind("keydown", this._doKeyDown).
unbind("keypress", this._doKeyPress).
unbind("keyup", this._doKeyUp);
} else if (nodeName === "div" || nodeName === "span")
{
$target.removeClass(this.markerClassName).empty();
}
},
/* Enable the date picker to a jQuery selection.
* @param target element - the target input field or division or span
*/
_enableDatepicker: function(target) {
var nodeName, inline,
$target = $(target),
inst = $.data(target, PROP_NAME);
if (!$target.hasClass(this.markerClassName)) {
return;
}
nodeName = target.nodeName.toLowerCase();
if (nodeName === "input") {
target.disabled = false;
inst.trigger.filter("button").
each(function() { this.disabled = false; }).end().
filter("img").css({opacity: "1.0", cursor:
""});
} else if (nodeName === "div" || nodeName === "span")
{
inline = $target.children("." + this._inlineClass);
inline.children().removeClass("ui-state-disabled");
inline.find("select.ui-datepicker-month,
select.ui-datepicker-year").
prop("disabled", false);
}
this._disabledInputs = $.map(this._disabledInputs,
function(value) { return (value === target ? null : value); }); //
delete entry
},
/* Disable the date picker to a jQuery selection.
* @param target element - the target input field or division or span
*/
_disableDatepicker: function(target) {
var nodeName, inline,
$target = $(target),
inst = $.data(target, PROP_NAME);
if (!$target.hasClass(this.markerClassName)) {
return;
}
nodeName = target.nodeName.toLowerCase();
if (nodeName === "input") {
target.disabled = true;
inst.trigger.filter("button").
each(function() { this.disabled = true; }).end().
filter("img").css({opacity: "0.5", cursor:
"default"});
} else if (nodeName === "div" || nodeName === "span")
{
inline = $target.children("." + this._inlineClass);
inline.children().addClass("ui-state-disabled");
inline.find("select.ui-datepicker-month,
select.ui-datepicker-year").
prop("disabled", true);
}
this._disabledInputs = $.map(this._disabledInputs,
function(value) { return (value === target ? null : value); }); //
delete entry
this._disabledInputs[this._disabledInputs.length] = target;
},
/* Is the first field in a jQuery collection disabled as a datepicker?
* @param target element - the target input field or division or span
* @return boolean - true if disabled, false if enabled
*/
_isDisabledDatepicker: function(target) {
if (!target) {
return false;
}
for (var i = 0; i < this._disabledInputs.length; i++) {
if (this._disabledInputs[i] === target) {
return true;
}
}
return false;
},
/* Retrieve the instance data for the target control.
* @param target element - the target input field or division or span
* @return object - the associated instance data
* @throws error if a jQuery problem getting data
*/
_getInst: function(target) {
try {
return $.data(target, PROP_NAME);
}
catch (err) {
throw "Missing instance data for this datepicker";
}
},
/* Update or retrieve the settings for a date picker attached to an input
field or division.
* @param target element - the target input field or division or span
* @param name object - the new settings to update or
* string - the name of the setting to change or retrieve,
* when retrieving also "all" for all instance settings or
* "defaults" for all global defaults
* @param value any - the new value for the setting
* (omit if above is an object or to retrieve a value)
*/
_optionDatepicker: function(target, name, value) {
var settings, date, minDate, maxDate,
inst = this._getInst(target);
if (arguments.length === 2 && typeof name === "string")
{
return (name === "defaults" ? $.extend({},
$.datepicker._defaults) :
(inst ? (name === "all" ? $.extend({}, inst.settings) :
this._get(inst, name)) : null));
}
settings = name || {};
if (typeof name === "string") {
settings = {};
settings[name] = value;
}
if (inst) {
if (this._curInst === inst) {
this._hideDatepicker();
}
date = this._getDateDatepicker(target, true);
minDate = this._getMinMaxDate(inst, "min");
maxDate = this._getMinMaxDate(inst, "max");
extendRemove(inst.settings, settings);
// reformat the old minDate/maxDate values if dateFormat changes and a
new minDate/maxDate isn't provided
if (minDate !== null && settings.dateFormat !== undefined
&& settings.minDate === undefined) {
inst.settings.minDate = this._formatDate(inst, minDate);
}
if (maxDate !== null && settings.dateFormat !== undefined
&& settings.maxDate === undefined) {
inst.settings.maxDate = this._formatDate(inst, maxDate);
}
if ( "disabled" in settings ) {
if ( settings.disabled ) {
this._disableDatepicker(target);
} else {
this._enableDatepicker(target);
}
}
this._attachments($(target), inst);
this._autoSize(inst);
this._setDate(inst, date);
this._updateAlternate(inst);
this._updateDatepicker(inst);
}
},
// change method deprecated
_changeDatepicker: function(target, name, value) {
this._optionDatepicker(target, name, value);
},
/* Redraw the date picker attached to an input field or division.
* @param target element - the target input field or division or span
*/
_refreshDatepicker: function(target) {
var inst = this._getInst(target);
if (inst) {
this._updateDatepicker(inst);
}
},
/* Set the dates for a jQuery selection.
* @param target element - the target input field or division or span
* @param date Date - the new date
*/
_setDateDatepicker: function(target, date) {
var inst = this._getInst(target);
if (inst) {
this._setDate(inst, date);
this._updateDatepicker(inst);
this._updateAlternate(inst);
}
},
/* Get the date(s) for the first entry in a jQuery selection.
* @param target element - the target input field or division or span
* @param noDefault boolean - true if no default date is to be used
* @return Date - the current date
*/
_getDateDatepicker: function(target, noDefault) {
var inst = this._getInst(target);
if (inst && !inst.inline) {
this._setDateFromField(inst, noDefault);
}
return (inst ? this._getDate(inst) : null);
},
/* Handle keystrokes. */
_doKeyDown: function(event) {
var onSelect, dateStr, sel,
inst = $.datepicker._getInst(event.target),
handled = true,
isRTL = inst.dpDiv.is(".ui-datepicker-rtl");
inst._keyEvent = true;
if ($.datepicker._datepickerShowing) {
switch (event.keyCode) {
case 9: $.datepicker._hideDatepicker();
handled = false;
break; // hide on tab out
case 13: sel = $("td." + $.datepicker._dayOverClass +
":not(." +
$.datepicker._currentClass + ")", inst.dpDiv);
if (sel[0]) {
$.datepicker._selectDay(event.target, inst.selectedMonth,
inst.selectedYear, sel[0]);
}
onSelect = $.datepicker._get(inst, "onSelect");
if (onSelect) {
dateStr = $.datepicker._formatDate(inst);
// trigger custom callback
onSelect.apply((inst.input ? inst.input[0] : null), [dateStr,
inst]);
} else {
$.datepicker._hideDatepicker();
}
return false; // don't submit the form
case 27: $.datepicker._hideDatepicker();
break; // hide on escape
case 33: $.datepicker._adjustDate(event.target, (event.ctrlKey ?
-$.datepicker._get(inst, "stepBigMonths") :
-$.datepicker._get(inst, "stepMonths")), "M");
break; // previous month/year on page up/+ ctrl
case 34: $.datepicker._adjustDate(event.target, (event.ctrlKey ?
+$.datepicker._get(inst, "stepBigMonths") :
+$.datepicker._get(inst, "stepMonths")), "M");
break; // next month/year on page down/+ ctrl
case 35: if (event.ctrlKey || event.metaKey) {
$.datepicker._clearDate(event.target);
}
handled = event.ctrlKey || event.metaKey;
break; // clear on ctrl or command +end
case 36: if (event.ctrlKey || event.metaKey) {
$.datepicker._gotoToday(event.target);
}
handled = event.ctrlKey || event.metaKey;
break; // current on ctrl or command +home
case 37: if (event.ctrlKey || event.metaKey) {
$.datepicker._adjustDate(event.target, (isRTL ? +1 : -1),
"D");
}
handled = event.ctrlKey || event.metaKey;
// -1 day on ctrl or command +left
if (event.originalEvent.altKey) {
$.datepicker._adjustDate(event.target, (event.ctrlKey ?
-$.datepicker._get(inst, "stepBigMonths") :
-$.datepicker._get(inst, "stepMonths")), "M");
}
// next month/year on alt +left on Mac
break;
case 38: if (event.ctrlKey || event.metaKey) {
$.datepicker._adjustDate(event.target, -7, "D");
}
handled = event.ctrlKey || event.metaKey;
break; // -1 week on ctrl or command +up
case 39: if (event.ctrlKey || event.metaKey) {
$.datepicker._adjustDate(event.target, (isRTL ? -1 : +1),
"D");
}
handled = event.ctrlKey || event.metaKey;
// +1 day on ctrl or command +right
if (event.originalEvent.altKey) {
$.datepicker._adjustDate(event.target, (event.ctrlKey ?
+$.datepicker._get(inst, "stepBigMonths") :
+$.datepicker._get(inst, "stepMonths")), "M");
}
// next month/year on alt +right
break;
case 40: if (event.ctrlKey || event.metaKey) {
$.datepicker._adjustDate(event.target, +7, "D");
}
handled = event.ctrlKey || event.metaKey;
break; // +1 week on ctrl or command +down
default: handled = false;
}
} else if (event.keyCode === 36 && event.ctrlKey) { // display
the date picker on ctrl+home
$.datepicker._showDatepicker(this);
} else {
handled = false;
}
if (handled) {
event.preventDefault();
event.stopPropagation();
}
},
/* Filter entered characters - based on date format. */
_doKeyPress: function(event) {
var chars, chr,
inst = $.datepicker._getInst(event.target);
if ($.datepicker._get(inst, "constrainInput")) {
chars = $.datepicker._possibleChars($.datepicker._get(inst,
"dateFormat"));
chr = String.fromCharCode(event.charCode == null ? event.keyCode :
event.charCode);
return event.ctrlKey || event.metaKey || (chr < " " ||
!chars || chars.indexOf(chr) > -1);
}
},
/* Synchronise manual entry and field/alternate field. */
_doKeyUp: function(event) {
var date,
inst = $.datepicker._getInst(event.target);
if (inst.input.val() !== inst.lastVal) {
try {
date = $.datepicker.parseDate($.datepicker._get(inst,
"dateFormat"),
(inst.input ? inst.input.val() : null),
$.datepicker._getFormatConfig(inst));
if (date) { // only if valid
$.datepicker._setDateFromField(inst);
$.datepicker._updateAlternate(inst);
$.datepicker._updateDatepicker(inst);
}
}
catch (err) {
}
}
return true;
},
/* Pop-up the date picker for a given input field.
* If false returned from beforeShow event handler do not show.
* @param input element - the input field attached to the date picker
or
* event - if triggered by focus
*/
_showDatepicker: function(input) {
input = input.target || input;
if (input.nodeName.toLowerCase() !== "input") { // find from
button/image trigger
input = $("input", input.parentNode)[0];
}
if ($.datepicker._isDisabledDatepicker(input) || $.datepicker._lastInput
=== input) { // already here
return;
}
var inst, beforeShow, beforeShowSettings, isFixed,
offset, showAnim, duration;
inst = $.datepicker._getInst(input);
if ($.datepicker._curInst && $.datepicker._curInst !== inst) {
$.datepicker._curInst.dpDiv.stop(true, true);
if ( inst && $.datepicker._datepickerShowing ) {
$.datepicker._hideDatepicker( $.datepicker._curInst.input[0] );
}
}
beforeShow = $.datepicker._get(inst, "beforeShow");
beforeShowSettings = beforeShow ? beforeShow.apply(input, [input, inst])
: {};
if(beforeShowSettings === false){
return;
}
extendRemove(inst.settings, beforeShowSettings);
inst.lastVal = null;
$.datepicker._lastInput = input;
$.datepicker._setDateFromField(inst);
if ($.datepicker._inDialog) { // hide cursor
input.value = "";
}
if (!$.datepicker._pos) { // position below input
$.datepicker._pos = $.datepicker._findPos(input);
$.datepicker._pos[1] += input.offsetHeight; // add the height
}
isFixed = false;
$(input).parents().each(function() {
isFixed |= $(this).css("position") === "fixed";
return !isFixed;
});
offset = {left: $.datepicker._pos[0], top: $.datepicker._pos[1]};
$.datepicker._pos = null;
//to avoid flashes on Firefox
inst.dpDiv.empty();
// determine sizing offscreen
inst.dpDiv.css({position: "absolute", display:
"block", top: "-1000px"});
$.datepicker._updateDatepicker(inst);
// fix width for dynamic number of date pickers
// and adjust position before showing
offset = $.datepicker._checkOffset(inst, offset, isFixed);
inst.dpDiv.css({position: ($.datepicker._inDialog && $.blockUI ?
"static" : (isFixed ? "fixed" :
"absolute")), display: "none",
left: offset.left + "px", top: offset.top + "px"});
if (!inst.inline) {
showAnim = $.datepicker._get(inst, "showAnim");
duration = $.datepicker._get(inst, "duration");
inst.dpDiv.zIndex($(input).zIndex()+100);
$.datepicker._datepickerShowing = true;
if ( $.effects && $.effects.effect[ showAnim ] ) {
inst.dpDiv.show(showAnim, $.datepicker._get(inst,
"showOptions"), duration);
} else {
inst.dpDiv[showAnim || "show"](showAnim ? duration : null);
}
if ( $.datepicker._shouldFocusInput( inst ) ) {
inst.input.focus();
}
$.datepicker._curInst = inst;
}
},
/* Generate the date picker content. */
_updateDatepicker: function(inst) {
this.maxRows = 4; //Reset the max number of rows being displayed (see
#7043)
instActive = inst; // for delegate hover events
inst.dpDiv.empty().append(this._generateHTML(inst));
this._attachHandlers(inst);
inst.dpDiv.find("." + this._dayOverClass + "
a").mouseover();
var origyearshtml,
numMonths = this._getNumberOfMonths(inst),
cols = numMonths[1],
width = 17;
inst.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3
ui-datepicker-multi-4").width("");
if (cols > 1) {
inst.dpDiv.addClass("ui-datepicker-multi-" +
cols).css("width", (width * cols) + "em");
}
inst.dpDiv[(numMonths[0] !== 1 || numMonths[1] !== 1 ? "add" :
"remove") +
"Class"]("ui-datepicker-multi");
inst.dpDiv[(this._get(inst, "isRTL") ? "add" :
"remove") +
"Class"]("ui-datepicker-rtl");
if (inst === $.datepicker._curInst &&
$.datepicker._datepickerShowing && $.datepicker._shouldFocusInput(
inst ) ) {
inst.input.focus();
}
// deffered render of the years select (to avoid flashes on Firefox)
if( inst.yearshtml ){
origyearshtml = inst.yearshtml;
setTimeout(function(){
//assure that inst.yearshtml didn't change.
if( origyearshtml === inst.yearshtml && inst.yearshtml ){
inst.dpDiv.find("select.ui-datepicker-year:first").replaceWith(inst.yearshtml);
}
origyearshtml = inst.yearshtml = null;
}, 0);
}
},
// #6694 - don't focus the input if it's already focused
// this breaks the change event in IE
// Support: IE and jQuery <1.9
_shouldFocusInput: function( inst ) {
return inst.input && inst.input.is( ":visible" )
&& !inst.input.is( ":disabled" ) &&
!inst.input.is( ":focus" );
},
/* Check positioning to remain on screen. */
_checkOffset: function(inst, offset, isFixed) {
var dpWidth = inst.dpDiv.outerWidth(),
dpHeight = inst.dpDiv.outerHeight(),
inputWidth = inst.input ? inst.input.outerWidth() : 0,
inputHeight = inst.input ? inst.input.outerHeight() : 0,
viewWidth = document.documentElement.clientWidth + (isFixed ? 0 :
$(document).scrollLeft()),
viewHeight = document.documentElement.clientHeight + (isFixed ? 0 :
$(document).scrollTop());
offset.left -= (this._get(inst, "isRTL") ? (dpWidth -
inputWidth) : 0);
offset.left -= (isFixed && offset.left ===
inst.input.offset().left) ? $(document).scrollLeft() : 0;
offset.top -= (isFixed && offset.top === (inst.input.offset().top
+ inputHeight)) ? $(document).scrollTop() : 0;
// now check if datepicker is showing outside window viewport - move to a
better place if so.
offset.left -= Math.min(offset.left, (offset.left + dpWidth >
viewWidth && viewWidth > dpWidth) ?
Math.abs(offset.left + dpWidth - viewWidth) : 0);
offset.top -= Math.min(offset.top, (offset.top + dpHeight > viewHeight
&& viewHeight > dpHeight) ?
Math.abs(dpHeight + inputHeight) : 0);
return offset;
},
/* Find an object's position on the screen. */
_findPos: function(obj) {
var position,
inst = this._getInst(obj),
isRTL = this._get(inst, "isRTL");
while (obj && (obj.type === "hidden" || obj.nodeType
!== 1 || $.expr.filters.hidden(obj))) {
obj = obj[isRTL ? "previousSibling" :
"nextSibling"];
}
position = $(obj).offset();
return [position.left, position.top];
},
/* Hide the date picker from view.
* @param input element - the input field attached to the date picker
*/
_hideDatepicker: function(input) {
var showAnim, duration, postProcess, onClose,
inst = this._curInst;
if (!inst || (input && inst !== $.data(input, PROP_NAME))) {
return;
}
if (this._datepickerShowing) {
showAnim = this._get(inst, "showAnim");
duration = this._get(inst, "duration");
postProcess = function() {
$.datepicker._tidyDialog(inst);
};
// DEPRECATED: after BC for 1.8.x $.effects[ showAnim ] is not needed
if ( $.effects && ( $.effects.effect[ showAnim ] || $.effects[
showAnim ] ) ) {
inst.dpDiv.hide(showAnim, $.datepicker._get(inst,
"showOptions"), duration, postProcess);
} else {
inst.dpDiv[(showAnim === "slideDown" ? "slideUp" :
(showAnim === "fadeIn" ? "fadeOut" :
"hide"))]((showAnim ? duration : null), postProcess);
}
if (!showAnim) {
postProcess();
}
this._datepickerShowing = false;
onClose = this._get(inst, "onClose");
if (onClose) {
onClose.apply((inst.input ? inst.input[0] : null), [(inst.input ?
inst.input.val() : ""), inst]);
}
this._lastInput = null;
if (this._inDialog) {
this._dialogInput.css({ position: "absolute", left:
"0", top: "-100px" });
if ($.blockUI) {
$.unblockUI();
$("body").append(this.dpDiv);
}
}
this._inDialog = false;
}
},
/* Tidy up after a dialog display. */
_tidyDialog: function(inst) {
inst.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar");
},
/* Close date picker if clicked elsewhere. */
_checkExternalClick: function(event) {
if (!$.datepicker._curInst) {
return;
}
var $target = $(event.target),
inst = $.datepicker._getInst($target[0]);
if ( ( ( $target[0].id !== $.datepicker._mainDivId &&
$target.parents("#" + $.datepicker._mainDivId).length === 0
&&
!$target.hasClass($.datepicker.markerClassName) &&
!$target.closest("." + $.datepicker._triggerClass).length
&&
$.datepicker._datepickerShowing && !($.datepicker._inDialog
&& $.blockUI) ) ) ||
( $target.hasClass($.datepicker.markerClassName) &&
$.datepicker._curInst !== inst ) ) {
$.datepicker._hideDatepicker();
}
},
/* Adjust one of the date sub-fields. */
_adjustDate: function(id, offset, period) {
var target = $(id),
inst = this._getInst(target[0]);
if (this._isDisabledDatepicker(target[0])) {
return;
}
this._adjustInstDate(inst, offset +
(period === "M" ? this._get(inst,
"showCurrentAtPos") : 0), // undo positioning
period);
this._updateDatepicker(inst);
},
/* Action for current link. */
_gotoToday: function(id) {
var date,
target = $(id),
inst = this._getInst(target[0]);
if (this._get(inst, "gotoCurrent") && inst.currentDay)
{
inst.selectedDay = inst.currentDay;
inst.drawMonth = inst.selectedMonth = inst.currentMonth;
inst.drawYear = inst.selectedYear = inst.currentYear;
} else {
date = new Date();
inst.selectedDay = date.getDate();
inst.drawMonth = inst.selectedMonth = date.getMonth();
inst.drawYear = inst.selectedYear = date.getFullYear();
}
this._notifyChange(inst);
this._adjustDate(target);
},
/* Action for selecting a new month/year. */
_selectMonthYear: function(id, select, period) {
var target = $(id),
inst = this._getInst(target[0]);
inst["selected" + (period === "M" ? "Month"
: "Year")] =
inst["draw" + (period === "M" ? "Month" :
"Year")] =
parseInt(select.options[select.selectedIndex].value,10);
this._notifyChange(inst);
this._adjustDate(target);
},
/* Action for selecting a day. */
_selectDay: function(id, month, year, td) {
var inst,
target = $(id);
if ($(td).hasClass(this._unselectableClass) ||
this._isDisabledDatepicker(target[0])) {
return;
}
inst = this._getInst(target[0]);
inst.selectedDay = inst.currentDay = $("a", td).html();
inst.selectedMonth = inst.currentMonth = month;
inst.selectedYear = inst.currentYear = year;
this._selectDate(id, this._formatDate(inst,
inst.currentDay, inst.currentMonth, inst.currentYear));
},
/* Erase the input field and hide the date picker. */
_clearDate: function(id) {
var target = $(id);
this._selectDate(target, "");
},
/* Update the input field with the selected date. */
_selectDate: function(id, dateStr) {
var onSelect,
target = $(id),
inst = this._getInst(target[0]);
dateStr = (dateStr != null ? dateStr : this._formatDate(inst));
if (inst.input) {
inst.input.val(dateStr);
}
this._updateAlternate(inst);
onSelect = this._get(inst, "onSelect");
if (onSelect) {
onSelect.apply((inst.input ? inst.input[0] : null), [dateStr, inst]);
// trigger custom callback
} else if (inst.input) {
inst.input.trigger("change"); // fire the change event
}
if (inst.inline){
this._updateDatepicker(inst);
} else {
this._hideDatepicker();
this._lastInput = inst.input[0];
if (typeof(inst.input[0]) !== "object") {
inst.input.focus(); // restore focus
}
this._lastInput = null;
}
},
/* Update any alternate field to synchronise with the main field. */
_updateAlternate: function(inst) {
var altFormat, date, dateStr,
altField = this._get(inst, "altField");
if (altField) { // update alternate field too
altFormat = this._get(inst, "altFormat") || this._get(inst,
"dateFormat");
date = this._getDate(inst);
dateStr = this.formatDate(altFormat, date,
this._getFormatConfig(inst));
$(altField).each(function() { $(this).val(dateStr); });
}
},
/* Set as beforeShowDay function to prevent selection of weekends.
* @param date Date - the date to customise
* @return [boolean, string] - is this date selectable?, what is its CSS
class?
*/
noWeekends: function(date) {
var day = date.getDay();
return [(day > 0 && day < 6), ""];
},
/* Set as calculateWeek to determine the week of the year based on the ISO
8601 definition.
* @param date Date - the date to get the week for
* @return number - the number of the week within the year that contains
this date
*/
iso8601Week: function(date) {
var time,
checkDate = new Date(date.getTime());
// Find Thursday of this week starting on Monday
checkDate.setDate(checkDate.getDate() + 4 - (checkDate.getDay() || 7));
time = checkDate.getTime();
checkDate.setMonth(0); // Compare with Jan 1
checkDate.setDate(1);
return Math.floor(Math.round((time - checkDate) / 86400000) / 7) + 1;
},
/* Parse a string value into a date object.
* See formatDate below for the possible formats.
*
* @param format string - the expected format of the date
* @param value string - the date in the above format
* @param settings Object - attributes include:
* shortYearCutoff number - the cutoff year for determining the
century (optional)
* dayNamesShort string[7] - abbreviated names of the days from Sunday
(optional)
* dayNames string[7] - names of the days from Sunday (optional)
* monthNamesShort string[12] - abbreviated names of the months
(optional)
* monthNames string[12] - names of the months (optional)
* @return Date - the extracted date value or null if value is blank
*/
parseDate: function (format, value, settings) {
if (format == null || value == null) {
throw "Invalid arguments";
}
value = (typeof value === "object" ? value.toString() : value +
"");
if (value === "") {
return null;
}
var iFormat, dim, extra,
iValue = 0,
shortYearCutoffTemp = (settings ? settings.shortYearCutoff : null) ||
this._defaults.shortYearCutoff,
shortYearCutoff = (typeof shortYearCutoffTemp !== "string" ?
shortYearCutoffTemp :
new Date().getFullYear() % 100 + parseInt(shortYearCutoffTemp, 10)),
dayNamesShort = (settings ? settings.dayNamesShort : null) ||
this._defaults.dayNamesShort,
dayNames = (settings ? settings.dayNames : null) ||
this._defaults.dayNames,
monthNamesShort = (settings ? settings.monthNamesShort : null) ||
this._defaults.monthNamesShort,
monthNames = (settings ? settings.monthNames : null) ||
this._defaults.monthNames,
year = -1,
month = -1,
day = -1,
doy = -1,
literal = false,
date,
// Check whether a format character is doubled
lookAhead = function(match) {
var matches = (iFormat + 1 < format.length &&
format.charAt(iFormat + 1) === match);
if (matches) {
iFormat++;
}
return matches;
},
// Extract a number from the string value
getNumber = function(match) {
var isDoubled = lookAhead(match),
size = (match === "@" ? 14 : (match === "!" ? 20
:
(match === "y" && isDoubled ? 4 : (match ===
"o" ? 3 : 2)))),
digits = new RegExp("^\\d{1," + size + "}"),
num = value.substring(iValue).match(digits);
if (!num) {
throw "Missing number at position " + iValue;
}
iValue += num[0].length;
return parseInt(num[0], 10);
},
// Extract a name from the string value and convert to an index
getName = function(match, shortNames, longNames) {
var index = -1,
names = $.map(lookAhead(match) ? longNames : shortNames, function (v,
k) {
return [ [k, v] ];
}).sort(function (a, b) {
return -(a[1].length - b[1].length);
});
$.each(names, function (i, pair) {
var name = pair[1];
if (value.substr(iValue, name.length).toLowerCase() ===
name.toLowerCase()) {
index = pair[0];
iValue += name.length;
return false;
}
});
if (index !== -1) {
return index + 1;
} else {
throw "Unknown name at position " + iValue;
}
},
// Confirm that a literal character matches the string value
checkLiteral = function() {
if (value.charAt(iValue) !== format.charAt(iFormat)) {
throw "Unexpected literal at position " + iValue;
}
iValue++;
};
for (iFormat = 0; iFormat < format.length; iFormat++) {
if (literal) {
if (format.charAt(iFormat) === "'" &&
!lookAhead("'")) {
literal = false;
} else {
checkLiteral();
}
} else {
switch (format.charAt(iFormat)) {
case "d":
day = getNumber("d");
break;
case "D":
getName("D", dayNamesShort, dayNames);
break;
case "o":
doy = getNumber("o");
break;
case "m":
month = getNumber("m");
break;
case "M":
month = getName("M", monthNamesShort, monthNames);
break;
case "y":
year = getNumber("y");
break;
case "@":
date = new Date(getNumber("@"));
year = date.getFullYear();
month = date.getMonth() + 1;
day = date.getDate();
break;
case "!":
date = new Date((getNumber("!") - this._ticksTo1970) /
10000);
year = date.getFullYear();
month = date.getMonth() + 1;
day = date.getDate();
break;
case "'":
if (lookAhead("'")){
checkLiteral();
} else {
literal = true;
}
break;
default:
checkLiteral();
}
}
}
if (iValue < value.length){
extra = value.substr(iValue);
if (!/^\s+/.test(extra)) {
throw "Extra/unparsed characters found in date: " + extra;
}
}
if (year === -1) {
year = new Date().getFullYear();
} else if (year < 100) {
year += new Date().getFullYear() - new Date().getFullYear() % 100 +
(year <= shortYearCutoff ? 0 : -100);
}
if (doy > -1) {
month = 1;
day = doy;
do {
dim = this._getDaysInMonth(year, month - 1);
if (day <= dim) {
break;
}
month++;
day -= dim;
} while (true);
}
date = this._daylightSavingAdjust(new Date(year, month - 1, day));
if (date.getFullYear() !== year || date.getMonth() + 1 !== month ||
date.getDate() !== day) {
throw "Invalid date"; // E.g. 31/02/00
}
return date;
},
/* Standard date formats. */
ATOM: "yy-mm-dd", // RFC 3339 (ISO 8601)
COOKIE: "D, dd M yy",
ISO_8601: "yy-mm-dd",
RFC_822: "D, d M y",
RFC_850: "DD, dd-M-y",
RFC_1036: "D, d M y",
RFC_1123: "D, d M yy",
RFC_2822: "D, d M yy",
RSS: "D, d M y", // RFC 822
TICKS: "!",
TIMESTAMP: "@",
W3C: "yy-mm-dd", // ISO 8601
_ticksTo1970: (((1970 - 1) * 365 + Math.floor(1970 / 4) - Math.floor(1970
/ 100) +
Math.floor(1970 / 400)) * 24 * 60 * 60 * 10000000),
/* Format a date object into a string value.
* The format can be combinations of the following:
* d - day of month (no leading zero)
* dd - day of month (two digit)
* o - day of year (no leading zeros)
* oo - day of year (three digit)
* D - day name short
* DD - day name long
* m - month of year (no leading zero)
* mm - month of year (two digit)
* M - month name short
* MM - month name long
* y - year (two digit)
* yy - year (four digit)
* @ - Unix timestamp (ms since 01/01/1970)
* ! - Windows ticks (100ns since 01/01/0001)
* "..." - literal text
* '' - single quote
*
* @param format string - the desired format of the date
* @param date Date - the date value to format
* @param settings Object - attributes include:
* dayNamesShort string[7] - abbreviated names of the days from Sunday
(optional)
* dayNames string[7] - names of the days from Sunday (optional)
* monthNamesShort string[12] - abbreviated names of the months
(optional)
* monthNames string[12] - names of the months (optional)
* @return string - the date in the above format
*/
formatDate: function (format, date, settings) {
if (!date) {
return "";
}
var iFormat,
dayNamesShort = (settings ? settings.dayNamesShort : null) ||
this._defaults.dayNamesShort,
dayNames = (settings ? settings.dayNames : null) ||
this._defaults.dayNames,
monthNamesShort = (settings ? settings.monthNamesShort : null) ||
this._defaults.monthNamesShort,
monthNames = (settings ? settings.monthNames : null) ||
this._defaults.monthNames,
// Check whether a format character is doubled
lookAhead = function(match) {
var matches = (iFormat + 1 < format.length &&
format.charAt(iFormat + 1) === match);
if (matches) {
iFormat++;
}
return matches;
},
// Format a number, with leading zero if necessary
formatNumber = function(match, value, len) {
var num = "" + value;
if (lookAhead(match)) {
while (num.length < len) {
num = "0" + num;
}
}
return num;
},
// Format a name, short or long as requested
formatName = function(match, value, shortNames, longNames) {
return (lookAhead(match) ? longNames[value] : shortNames[value]);
},
output = "",
literal = false;
if (date) {
for (iFormat = 0; iFormat < format.length; iFormat++) {
if (literal) {
if (format.charAt(iFormat) === "'" &&
!lookAhead("'")) {
literal = false;
} else {
output += format.charAt(iFormat);
}
} else {
switch (format.charAt(iFormat)) {
case "d":
output += formatNumber("d", date.getDate(), 2);
break;
case "D":
output += formatName("D", date.getDay(), dayNamesShort,
dayNames);
break;
case "o":
output += formatNumber("o",
Math.round((new Date(date.getFullYear(), date.getMonth(),
date.getDate()).getTime() - new Date(date.getFullYear(), 0, 0).getTime()) /
86400000), 3);
break;
case "m":
output += formatNumber("m", date.getMonth() + 1, 2);
break;
case "M":
output += formatName("M", date.getMonth(),
monthNamesShort, monthNames);
break;
case "y":
output += (lookAhead("y") ? date.getFullYear() :
(date.getYear() % 100 < 10 ? "0" : "") +
date.getYear() % 100);
break;
case "@":
output += date.getTime();
break;
case "!":
output += date.getTime() * 10000 + this._ticksTo1970;
break;
case "'":
if (lookAhead("'")) {
output += "'";
} else {
literal = true;
}
break;
default:
output += format.charAt(iFormat);
}
}
}
}
return output;
},
/* Extract all possible characters from the date format. */
_possibleChars: function (format) {
var iFormat,
chars = "",
literal = false,
// Check whether a format character is doubled
lookAhead = function(match) {
var matches = (iFormat + 1 < format.length &&
format.charAt(iFormat + 1) === match);
if (matches) {
iFormat++;
}
return matches;
};
for (iFormat = 0; iFormat < format.length; iFormat++) {
if (literal) {
if (format.charAt(iFormat) === "'" &&
!lookAhead("'")) {
literal = false;
} else {
chars += format.charAt(iFormat);
}
} else {
switch (format.charAt(iFormat)) {
case "d": case "m": case "y": case
"@":
chars += "0123456789";
break;
case "D": case "M":
return null; // Accept anything
case "'":
if (lookAhead("'")) {
chars += "'";
} else {
literal = true;
}
break;
default:
chars += format.charAt(iFormat);
}
}
}
return chars;
},
/* Get a setting value, defaulting if necessary. */
_get: function(inst, name) {
return inst.settings[name] !== undefined ?
inst.settings[name] : this._defaults[name];
},
/* Parse existing date and initialise date picker. */
_setDateFromField: function(inst, noDefault) {
if (inst.input.val() === inst.lastVal) {
return;
}
var dateFormat = this._get(inst, "dateFormat"),
dates = inst.lastVal = inst.input ? inst.input.val() : null,
defaultDate = this._getDefaultDate(inst),
date = defaultDate,
settings = this._getFormatConfig(inst);
try {
date = this.parseDate(dateFormat, dates, settings) || defaultDate;
} catch (event) {
dates = (noDefault ? "" : dates);
}
inst.selectedDay = date.getDate();
inst.drawMonth = inst.selectedMonth = date.getMonth();
inst.drawYear = inst.selectedYear = date.getFullYear();
inst.currentDay = (dates ? date.getDate() : 0);
inst.currentMonth = (dates ? date.getMonth() : 0);
inst.currentYear = (dates ? date.getFullYear() : 0);
this._adjustInstDate(inst);
},
/* Retrieve the default date shown on opening. */
_getDefaultDate: function(inst) {
return this._restrictMinMax(inst,
this._determineDate(inst, this._get(inst, "defaultDate"), new
Date()));
},
/* A date may be specified as an exact value or a relative one. */
_determineDate: function(inst, date, defaultDate) {
var offsetNumeric = function(offset) {
var date = new Date();
date.setDate(date.getDate() + offset);
return date;
},
offsetString = function(offset) {
try {
return $.datepicker.parseDate($.datepicker._get(inst,
"dateFormat"),
offset, $.datepicker._getFormatConfig(inst));
}
catch (e) {
// Ignore
}
var date = (offset.toLowerCase().match(/^c/) ?
$.datepicker._getDate(inst) : null) || new Date(),
year = date.getFullYear(),
month = date.getMonth(),
day = date.getDate(),
pattern = /([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,
matches = pattern.exec(offset);
while (matches) {
switch (matches[2] || "d") {
case "d" : case "D" :
day += parseInt(matches[1],10); break;
case "w" : case "W" :
day += parseInt(matches[1],10) * 7; break;
case "m" : case "M" :
month += parseInt(matches[1],10);
day = Math.min(day, $.datepicker._getDaysInMonth(year, month));
break;
case "y": case "Y" :
year += parseInt(matches[1],10);
day = Math.min(day, $.datepicker._getDaysInMonth(year, month));
break;
}
matches = pattern.exec(offset);
}
return new Date(year, month, day);
},
newDate = (date == null || date === "" ? defaultDate : (typeof
date === "string" ? offsetString(date) :
(typeof date === "number" ? (isNaN(date) ? defaultDate :
offsetNumeric(date)) : new Date(date.getTime()))));
newDate = (newDate && newDate.toString() === "Invalid
Date" ? defaultDate : newDate);
if (newDate) {
newDate.setHours(0);
newDate.setMinutes(0);
newDate.setSeconds(0);
newDate.setMilliseconds(0);
}
return this._daylightSavingAdjust(newDate);
},
/* Handle switch to/from daylight saving.
* Hours may be non-zero on daylight saving cut-over:
* > 12 when midnight changeover, but then cannot generate
* midnight datetime, so jump to 1AM, otherwise reset.
* @param date (Date) the date to check
* @return (Date) the corrected date
*/
_daylightSavingAdjust: function(date) {
if (!date) {
return null;
}
date.setHours(date.getHours() > 12 ? date.getHours() + 2 : 0);
return date;
},
/* Set the date(s) directly. */
_setDate: function(inst, date, noChange) {
var clear = !date,
origMonth = inst.selectedMonth,
origYear = inst.selectedYear,
newDate = this._restrictMinMax(inst, this._determineDate(inst, date, new
Date()));
inst.selectedDay = inst.currentDay = newDate.getDate();
inst.drawMonth = inst.selectedMonth = inst.currentMonth =
newDate.getMonth();
inst.drawYear = inst.selectedYear = inst.currentYear =
newDate.getFullYear();
if ((origMonth !== inst.selectedMonth || origYear !== inst.selectedYear)
&& !noChange) {
this._notifyChange(inst);
}
this._adjustInstDate(inst);
if (inst.input) {
inst.input.val(clear ? "" : this._formatDate(inst));
}
},
/* Retrieve the date(s) directly. */
_getDate: function(inst) {
var startDate = (!inst.currentYear || (inst.input &&
inst.input.val() === "") ? null :
this._daylightSavingAdjust(new Date(
inst.currentYear, inst.currentMonth, inst.currentDay)));
return startDate;
},
/* Attach the onxxx handlers. These are declared statically so
* they work with static code transformers like Caja.
*/
_attachHandlers: function(inst) {
var stepMonths = this._get(inst, "stepMonths"),
id = "#" + inst.id.replace( /\\\\/g, "\\" );
inst.dpDiv.find("[data-handler]").map(function () {
var handler = {
prev: function () {
$.datepicker._adjustDate(id, -stepMonths, "M");
},
next: function () {
$.datepicker._adjustDate(id, +stepMonths, "M");
},
hide: function () {
$.datepicker._hideDatepicker();
},
today: function () {
$.datepicker._gotoToday(id);
},
selectDay: function () {
$.datepicker._selectDay(id,
+this.getAttribute("data-month"),
+this.getAttribute("data-year"), this);
return false;
},
selectMonth: function () {
$.datepicker._selectMonthYear(id, this, "M");
return false;
},
selectYear: function () {
$.datepicker._selectMonthYear(id, this, "Y");
return false;
}
};
$(this).bind(this.getAttribute("data-event"),
handler[this.getAttribute("data-handler")]);
});
},
/* Generate the HTML for the current state of the date picker. */
_generateHTML: function(inst) {
var maxDraw, prevText, prev, nextText, next, currentText, gotoDate,
controls, buttonPanel, firstDay, showWeek, dayNames, dayNamesMin,
monthNames, monthNamesShort, beforeShowDay, showOtherMonths,
selectOtherMonths, defaultDate, html, dow, row, group, col,
selectedDate,
cornerClass, calender, thead, day, daysInMonth, leadDays, curRows,
numRows,
printDate, dRow, tbody, daySettings, otherMonth, unselectable,
tempDate = new Date(),
today = this._daylightSavingAdjust(
new Date(tempDate.getFullYear(), tempDate.getMonth(),
tempDate.getDate())), // clear time
isRTL = this._get(inst, "isRTL"),
showButtonPanel = this._get(inst, "showButtonPanel"),
hideIfNoPrevNext = this._get(inst, "hideIfNoPrevNext"),
navigationAsDateFormat = this._get(inst,
"navigationAsDateFormat"),
numMonths = this._getNumberOfMonths(inst),
showCurrentAtPos = this._get(inst, "showCurrentAtPos"),
stepMonths = this._get(inst, "stepMonths"),
isMultiMonth = (numMonths[0] !== 1 || numMonths[1] !== 1),
currentDate = this._daylightSavingAdjust((!inst.currentDay ? new
Date(9999, 9, 9) :
new Date(inst.currentYear, inst.currentMonth, inst.currentDay))),
minDate = this._getMinMaxDate(inst, "min"),
maxDate = this._getMinMaxDate(inst, "max"),
drawMonth = inst.drawMonth - showCurrentAtPos,
drawYear = inst.drawYear;
if (drawMonth < 0) {
drawMonth += 12;
drawYear--;
}
if (maxDate) {
maxDraw = this._daylightSavingAdjust(new Date(maxDate.getFullYear(),
maxDate.getMonth() - (numMonths[0] * numMonths[1]) + 1,
maxDate.getDate()));
maxDraw = (minDate && maxDraw < minDate ? minDate :
maxDraw);
while (this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1)) >
maxDraw) {
drawMonth--;
if (drawMonth < 0) {
drawMonth = 11;
drawYear--;
}
}
}
inst.drawMonth = drawMonth;
inst.drawYear = drawYear;
prevText = this._get(inst, "prevText");
prevText = (!navigationAsDateFormat ? prevText :
this.formatDate(prevText,
this._daylightSavingAdjust(new Date(drawYear, drawMonth - stepMonths,
1)),
this._getFormatConfig(inst)));
prev = (this._canAdjustMonth(inst, -1, drawYear, drawMonth) ?
"<a class='ui-datepicker-prev ui-corner-all'
data-handler='prev' data-event='click'" +
" title='" + prevText + "'><span
class='ui-icon ui-icon-circle-triangle-" + ( isRTL ?
"e" : "w") + "'>" + prevText +
"</span></a>" :
(hideIfNoPrevNext ? "" : "<a
class='ui-datepicker-prev ui-corner-all ui-state-disabled'
title='"+ prevText +"'><span class='ui-icon
ui-icon-circle-triangle-" + ( isRTL ? "e" : "w") +
"'>" + prevText + "</span></a>"));
nextText = this._get(inst, "nextText");
nextText = (!navigationAsDateFormat ? nextText :
this.formatDate(nextText,
this._daylightSavingAdjust(new Date(drawYear, drawMonth + stepMonths,
1)),
this._getFormatConfig(inst)));
next = (this._canAdjustMonth(inst, +1, drawYear, drawMonth) ?
"<a class='ui-datepicker-next ui-corner-all'
data-handler='next' data-event='click'" +
" title='" + nextText + "'><span
class='ui-icon ui-icon-circle-triangle-" + ( isRTL ?
"w" : "e") + "'>" + nextText +
"</span></a>" :
(hideIfNoPrevNext ? "" : "<a
class='ui-datepicker-next ui-corner-all ui-state-disabled'
title='"+ nextText + "'><span class='ui-icon
ui-icon-circle-triangle-" + ( isRTL ? "w" : "e") +
"'>" + nextText + "</span></a>"));
currentText = this._get(inst, "currentText");
gotoDate = (this._get(inst, "gotoCurrent") &&
inst.currentDay ? currentDate : today);
currentText = (!navigationAsDateFormat ? currentText :
this.formatDate(currentText, gotoDate, this._getFormatConfig(inst)));
controls = (!inst.inline ? "<button type='button'
class='ui-datepicker-close ui-state-default ui-priority-primary
ui-corner-all' data-handler='hide'
data-event='click'>" +
this._get(inst, "closeText") + "</button>" :
"");
buttonPanel = (showButtonPanel) ? "<div
class='ui-datepicker-buttonpane ui-widget-content'>" +
(isRTL ? controls : "") +
(this._isInRange(inst, gotoDate) ? "<button
type='button' class='ui-datepicker-current ui-state-default
ui-priority-secondary ui-corner-all' data-handler='today'
data-event='click'" +
">" + currentText + "</button>" :
"") + (isRTL ? "" : controls) +
"</div>" : "";
firstDay = parseInt(this._get(inst, "firstDay"),10);
firstDay = (isNaN(firstDay) ? 0 : firstDay);
showWeek = this._get(inst, "showWeek");
dayNames = this._get(inst, "dayNames");
dayNamesMin = this._get(inst, "dayNamesMin");
monthNames = this._get(inst, "monthNames");
monthNamesShort = this._get(inst, "monthNamesShort");
beforeShowDay = this._get(inst, "beforeShowDay");
showOtherMonths = this._get(inst, "showOtherMonths");
selectOtherMonths = this._get(inst, "selectOtherMonths");
defaultDate = this._getDefaultDate(inst);
html = "";
dow;
for (row = 0; row < numMonths[0]; row++) {
group = "";
this.maxRows = 4;
for (col = 0; col < numMonths[1]; col++) {
selectedDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth,
inst.selectedDay));
cornerClass = " ui-corner-all";
calender = "";
if (isMultiMonth) {
calender += "<div class='ui-datepicker-group";
if (numMonths[1] > 1) {
switch (col) {
case 0: calender += " ui-datepicker-group-first";
cornerClass = " ui-corner-" + (isRTL ? "right"
: "left"); break;
case numMonths[1]-1: calender += "
ui-datepicker-group-last";
cornerClass = " ui-corner-" + (isRTL ? "left" :
"right"); break;
default: calender += " ui-datepicker-group-middle";
cornerClass = ""; break;
}
}
calender += "'>";
}
calender += "<div class='ui-datepicker-header
ui-widget-header ui-helper-clearfix" + cornerClass +
"'>" +
(/all|left/.test(cornerClass) && row === 0 ? (isRTL ? next :
prev) : "") +
(/all|right/.test(cornerClass) && row === 0 ? (isRTL ? prev :
next) : "") +
this._generateMonthYearHeader(inst, drawMonth, drawYear, minDate,
maxDate,
row > 0 || col > 0, monthNames, monthNamesShort) + // draw month
headers
"</div><table
class='ui-datepicker-calendar'><thead>" +
"<tr>";
thead = (showWeek ? "<th
class='ui-datepicker-week-col'>" + this._get(inst,
"weekHeader") + "</th>" : "");
for (dow = 0; dow < 7; dow++) { // days of the week
day = (dow + firstDay) % 7;
thead += "<th" + ((dow + firstDay + 6) % 7 >= 5 ?
" class='ui-datepicker-week-end'" : "") +
">" +
"<span title='" + dayNames[day] +
"'>" + dayNamesMin[day] +
"</span></th>";
}
calender += thead +
"</tr></thead><tbody>";
daysInMonth = this._getDaysInMonth(drawYear, drawMonth);
if (drawYear === inst.selectedYear && drawMonth ===
inst.selectedMonth) {
inst.selectedDay = Math.min(inst.selectedDay, daysInMonth);
}
leadDays = (this._getFirstDayOfMonth(drawYear, drawMonth) - firstDay +
7) % 7;
curRows = Math.ceil((leadDays + daysInMonth) / 7); // calculate the
number of rows to generate
numRows = (isMultiMonth ? this.maxRows > curRows ? this.maxRows :
curRows : curRows); //If multiple months, use the higher number of rows
(see #7043)
this.maxRows = numRows;
printDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1
- leadDays));
for (dRow = 0; dRow < numRows; dRow++) { // create date picker rows
calender += "<tr>";
tbody = (!showWeek ? "" : "<td
class='ui-datepicker-week-col'>" +
this._get(inst, "calculateWeek")(printDate) +
"</td>");
for (dow = 0; dow < 7; dow++) { // create date picker days
daySettings = (beforeShowDay ?
beforeShowDay.apply((inst.input ? inst.input[0] : null),
[printDate]) : [true, ""]);
otherMonth = (printDate.getMonth() !== drawMonth);
unselectable = (otherMonth && !selectOtherMonths) ||
!daySettings[0] ||
(minDate && printDate < minDate) || (maxDate &&
printDate > maxDate);
tbody += "<td class='" +
((dow + firstDay + 6) % 7 >= 5 ? "
ui-datepicker-week-end" : "") + // highlight weekends
(otherMonth ? " ui-datepicker-other-month" : "")
+ // highlight days from other months
((printDate.getTime() === selectedDate.getTime() &&
drawMonth === inst.selectedMonth && inst._keyEvent) || // user
pressed key
(defaultDate.getTime() === printDate.getTime() &&
defaultDate.getTime() === selectedDate.getTime()) ?
// or defaultDate is current printedDate and defaultDate is
selectedDate
" " + this._dayOverClass : "") + // highlight
selected day
(unselectable ? " " + this._unselectableClass + "
ui-state-disabled": "") + // highlight unselectable days
(otherMonth && !showOtherMonths ? "" : "
" + daySettings[1] + // highlight custom dates
(printDate.getTime() === currentDate.getTime() ? " " +
this._currentClass : "") + // highlight selected day
(printDate.getTime() === today.getTime() ? "
ui-datepicker-today" : "")) + "'" + //
highlight today (if different)
((!otherMonth || showOtherMonths) && daySettings[2] ? "
title='" + daySettings[2].replace(/'/g,
"'") + "'" : "") + // cell
title
(unselectable ? "" : "
data-handler='selectDay' data-event='click'
data-month='" + printDate.getMonth() + "'
data-year='" + printDate.getFullYear() + "'") +
">" + // actions
(otherMonth && !showOtherMonths ? " " :
// display for other months
(unselectable ? "<span
class='ui-state-default'>" + printDate.getDate() +
"</span>" : "<a class='ui-state-default"
+
(printDate.getTime() === today.getTime() ? "
ui-state-highlight" : "") +
(printDate.getTime() === currentDate.getTime() ? "
ui-state-active" : "") + // highlight selected day
(otherMonth ? " ui-priority-secondary" : "") +
// distinguish dates from other months
"' href='#'>" + printDate.getDate() +
"</a>")) + "</td>"; // display selectable
date
printDate.setDate(printDate.getDate() + 1);
printDate = this._daylightSavingAdjust(printDate);
}
calender += tbody + "</tr>";
}
drawMonth++;
if (drawMonth > 11) {
drawMonth = 0;
drawYear++;
}
calender += "</tbody></table>" + (isMultiMonth ?
"</div>" +
((numMonths[0] > 0 && col === numMonths[1]-1) ?
"<div
class='ui-datepicker-row-break'></div>" :
"") : "");
group += calender;
}
html += group;
}
html += buttonPanel;
inst._keyEvent = false;
return html;
},
/* Generate the month and year header. */
_generateMonthYearHeader: function(inst, drawMonth, drawYear, minDate,
maxDate,
secondary, monthNames, monthNamesShort) {
var inMinYear, inMaxYear, month, years, thisYear, determineYear, year,
endYear,
changeMonth = this._get(inst, "changeMonth"),
changeYear = this._get(inst, "changeYear"),
showMonthAfterYear = this._get(inst, "showMonthAfterYear"),
html = "<div class='ui-datepicker-title'>",
monthHtml = "";
// month selection
if (secondary || !changeMonth) {
monthHtml += "<span
class='ui-datepicker-month'>" + monthNames[drawMonth] +
"</span>";
} else {
inMinYear = (minDate && minDate.getFullYear() === drawYear);
inMaxYear = (maxDate && maxDate.getFullYear() === drawYear);
monthHtml += "<select class='ui-datepicker-month'
data-handler='selectMonth'
data-event='change'>";
for ( month = 0; month < 12; month++) {
if ((!inMinYear || month >= minDate.getMonth()) &&
(!inMaxYear || month <= maxDate.getMonth())) {
monthHtml += "<option value='" + month +
"'" +
(month === drawMonth ? " selected='selected'" :
"") +
">" + monthNamesShort[month] +
"</option>";
}
}
monthHtml += "</select>";
}
if (!showMonthAfterYear) {
html += monthHtml + (secondary || !(changeMonth && changeYear) ?
" " : "");
}
// year selection
if ( !inst.yearshtml ) {
inst.yearshtml = "";
if (secondary || !changeYear) {
html += "<span class='ui-datepicker-year'>" +
drawYear + "</span>";
} else {
// determine range of years to display
years = this._get(inst, "yearRange").split(":");
thisYear = new Date().getFullYear();
determineYear = function(value) {
var year = (value.match(/c[+\-].*/) ? drawYear +
parseInt(value.substring(1), 10) :
(value.match(/[+\-].*/) ? thisYear + parseInt(value, 10) :
parseInt(value, 10)));
return (isNaN(year) ? thisYear : year);
};
year = determineYear(years[0]);
endYear = Math.max(year, determineYear(years[1] || ""));
year = (minDate ? Math.max(year, minDate.getFullYear()) : year);
endYear = (maxDate ? Math.min(endYear, maxDate.getFullYear()) :
endYear);
inst.yearshtml += "<select class='ui-datepicker-year'
data-handler='selectYear'
data-event='change'>";
for (; year <= endYear; year++) {
inst.yearshtml += "<option value='" + year +
"'" +
(year === drawYear ? " selected='selected'" :
"") +
">" + year + "</option>";
}
inst.yearshtml += "</select>";
html += inst.yearshtml;
inst.yearshtml = null;
}
}
html += this._get(inst, "yearSuffix");
if (showMonthAfterYear) {
html += (secondary || !(changeMonth && changeYear) ?
" " : "") + monthHtml;
}
html += "</div>"; // Close datepicker_header
return html;
},
/* Adjust one of the date sub-fields. */
_adjustInstDate: function(inst, offset, period) {
var year = inst.drawYear + (period === "Y" ? offset : 0),
month = inst.drawMonth + (period === "M" ? offset : 0),
day = Math.min(inst.selectedDay, this._getDaysInMonth(year, month)) +
(period === "D" ? offset : 0),
date = this._restrictMinMax(inst, this._daylightSavingAdjust(new
Date(year, month, day)));
inst.selectedDay = date.getDate();
inst.drawMonth = inst.selectedMonth = date.getMonth();
inst.drawYear = inst.selectedYear = date.getFullYear();
if (period === "M" || period === "Y") {
this._notifyChange(inst);
}
},
/* Ensure a date is within any min/max bounds. */
_restrictMinMax: function(inst, date) {
var minDate = this._getMinMaxDate(inst, "min"),
maxDate = this._getMinMaxDate(inst, "max"),
newDate = (minDate && date < minDate ? minDate : date);
return (maxDate && newDate > maxDate ? maxDate : newDate);
},
/* Notify change of month/year. */
_notifyChange: function(inst) {
var onChange = this._get(inst, "onChangeMonthYear");
if (onChange) {
onChange.apply((inst.input ? inst.input[0] : null),
[inst.selectedYear, inst.selectedMonth + 1, inst]);
}
},
/* Determine the number of months to show. */
_getNumberOfMonths: function(inst) {
var numMonths = this._get(inst, "numberOfMonths");
return (numMonths == null ? [1, 1] : (typeof numMonths ===
"number" ? [1, numMonths] : numMonths));
},
/* Determine the current maximum date - ensure no time components are set.
*/
_getMinMaxDate: function(inst, minMax) {
return this._determineDate(inst, this._get(inst, minMax +
"Date"), null);
},
/* Find the number of days in a given month. */
_getDaysInMonth: function(year, month) {
return 32 - this._daylightSavingAdjust(new Date(year, month,
32)).getDate();
},
/* Find the day of the week of the first of a month. */
_getFirstDayOfMonth: function(year, month) {
return new Date(year, month, 1).getDay();
},
/* Determines if we should allow a "next/prev" month display
change. */
_canAdjustMonth: function(inst, offset, curYear, curMonth) {
var numMonths = this._getNumberOfMonths(inst),
date = this._daylightSavingAdjust(new Date(curYear,
curMonth + (offset < 0 ? offset : numMonths[0] * numMonths[1]), 1));
if (offset < 0) {
date.setDate(this._getDaysInMonth(date.getFullYear(),
date.getMonth()));
}
return this._isInRange(inst, date);
},
/* Is the given date in the accepted range? */
_isInRange: function(inst, date) {
var yearSplit, currentYear,
minDate = this._getMinMaxDate(inst, "min"),
maxDate = this._getMinMaxDate(inst, "max"),
minYear = null,
maxYear = null,
years = this._get(inst, "yearRange");
if (years){
yearSplit = years.split(":");
currentYear = new Date().getFullYear();
minYear = parseInt(yearSplit[0], 10);
maxYear = parseInt(yearSplit[1], 10);
if ( yearSplit[0].match(/[+\-].*/) ) {
minYear += currentYear;
}
if ( yearSplit[1].match(/[+\-].*/) ) {
maxYear += currentYear;
}
}
return ((!minDate || date.getTime() >= minDate.getTime()) &&
(!maxDate || date.getTime() <= maxDate.getTime()) &&
(!minYear || date.getFullYear() >= minYear) &&
(!maxYear || date.getFullYear() <= maxYear));
},
/* Provide the configuration settings for formatting/parsing. */
_getFormatConfig: function(inst) {
var shortYearCutoff = this._get(inst, "shortYearCutoff");
shortYearCutoff = (typeof shortYearCutoff !== "string" ?
shortYearCutoff :
new Date().getFullYear() % 100 + parseInt(shortYearCutoff, 10));
return {shortYearCutoff: shortYearCutoff,
dayNamesShort: this._get(inst, "dayNamesShort"), dayNames:
this._get(inst, "dayNames"),
monthNamesShort: this._get(inst, "monthNamesShort"),
monthNames: this._get(inst, "monthNames")};
},
/* Format the given date for display. */
_formatDate: function(inst, day, month, year) {
if (!day) {
inst.currentDay = inst.selectedDay;
inst.currentMonth = inst.selectedMonth;
inst.currentYear = inst.selectedYear;
}
var date = (day ? (typeof day === "object" ? day :
this._daylightSavingAdjust(new Date(year, month, day))) :
this._daylightSavingAdjust(new Date(inst.currentYear, inst.currentMonth,
inst.currentDay)));
return this.formatDate(this._get(inst, "dateFormat"), date,
this._getFormatConfig(inst));
}
});
/*
* Bind hover events for datepicker elements.
* Done via delegate so the binding only occurs once in the lifetime of the
parent div.
* Global instActive, set by _updateDatepicker allows the handlers to find
their way back to the active picker.
*/
function bindHover(dpDiv) {
var selector = "button, .ui-datepicker-prev, .ui-datepicker-next,
.ui-datepicker-calendar td a";
return dpDiv.delegate(selector, "mouseout", function() {
$(this).removeClass("ui-state-hover");
if (this.className.indexOf("ui-datepicker-prev") !== -1) {
$(this).removeClass("ui-datepicker-prev-hover");
}
if (this.className.indexOf("ui-datepicker-next") !== -1) {
$(this).removeClass("ui-datepicker-next-hover");
}
})
.delegate(selector, "mouseover", function(){
if (!$.datepicker._isDisabledDatepicker( instActive.inline ?
dpDiv.parent()[0] : instActive.input[0])) {
$(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");
$(this).addClass("ui-state-hover");
if (this.className.indexOf("ui-datepicker-prev") !== -1) {
$(this).addClass("ui-datepicker-prev-hover");
}
if (this.className.indexOf("ui-datepicker-next") !== -1) {
$(this).addClass("ui-datepicker-next-hover");
}
}
});
}
/* jQuery extend now ignores nulls! */
function extendRemove(target, props) {
$.extend(target, props);
for (var name in props) {
if (props[name] == null) {
target[name] = props[name];
}
}
return target;
}
/* Invoke the datepicker functionality.
@param options string - a command, optionally followed by additional
parameters or
Object - settings for attaching new datepicker functionality
@return jQuery object */
$.fn.datepicker = function(options){
/* Verify an empty collection wasn't passed - Fixes #6976 */
if ( !this.length ) {
return this;
}
/* Initialise the date picker. */
if (!$.datepicker.initialized) {
$(document).mousedown($.datepicker._checkExternalClick);
$.datepicker.initialized = true;
}
/* Append datepicker main container to body if not exist. */
if ($("#"+$.datepicker._mainDivId).length === 0) {
$("body").append($.datepicker.dpDiv);
}
var otherArgs = Array.prototype.slice.call(arguments, 1);
if (typeof options === "string" && (options ===
"isDisabled" || options === "getDate" || options ===
"widget")) {
return $.datepicker["_" + options + "Datepicker"].
apply($.datepicker, [this[0]].concat(otherArgs));
}
if (options === "option" && arguments.length === 2
&& typeof arguments[1] === "string") {
return $.datepicker["_" + options + "Datepicker"].
apply($.datepicker, [this[0]].concat(otherArgs));
}
return this.each(function() {
typeof options === "string" ?
$.datepicker["_" + options + "Datepicker"].
apply($.datepicker, [this].concat(otherArgs)) :
$.datepicker._attachDatepicker(this, options);
});
};
$.datepicker = new Datepicker(); // singleton instance
$.datepicker.initialized = false;
$.datepicker.uuid = new Date().getTime();
$.datepicker.version = "1.10.3";
})(jQuery);
admin/ui/index.html000064400000000054151167411240010247
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>admin/ui/mouse.js000064400000011172151167411240007743
0ustar00/*!
* jQuery UI Mouse 1.10.3
* http://jqueryui.com
*
* Copyright 2013 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/mouse/
*
* Depends:
* jquery.ui.widget.js
*/
(function( $, undefined ) {
var mouseHandled = false;
$( document ).mouseup( function() {
mouseHandled = false;
});
$.widget("ui.mouse", {
version: "1.10.3",
options: {
cancel: "input,textarea,button,select,option",
distance: 1,
delay: 0
},
_mouseInit: function() {
var that = this;
this.element
.bind("mousedown."+this.widgetName, function(event) {
return that._mouseDown(event);
})
.bind("click."+this.widgetName, function(event) {
if (true === $.data(event.target, that.widgetName +
".preventClickEvent")) {
$.removeData(event.target, that.widgetName +
".preventClickEvent");
event.stopImmediatePropagation();
return false;
}
});
this.started = false;
},
// TODO: make sure destroying one instance of mouse doesn't mess
with
// other instances of mouse
_mouseDestroy: function() {
this.element.unbind("."+this.widgetName);
if ( this._mouseMoveDelegate ) {
$(document)
.unbind("mousemove."+this.widgetName,
this._mouseMoveDelegate)
.unbind("mouseup."+this.widgetName, this._mouseUpDelegate);
}
},
_mouseDown: function(event) {
// don't let more than one widget handle mouseStart
if( mouseHandled ) { return; }
// we may have missed mouseup (out of window)
(this._mouseStarted && this._mouseUp(event));
this._mouseDownEvent = event;
var that = this,
btnIsLeft = (event.which === 1),
// event.target.nodeName works around a bug in IE 8 with
// disabled inputs (#7620)
elIsCancel = (typeof this.options.cancel === "string"
&& event.target.nodeName ?
$(event.target).closest(this.options.cancel).length : false);
if (!btnIsLeft || elIsCancel || !this._mouseCapture(event)) {
return true;
}
this.mouseDelayMet = !this.options.delay;
if (!this.mouseDelayMet) {
this._mouseDelayTimer = setTimeout(function() {
that.mouseDelayMet = true;
}, this.options.delay);
}
if (this._mouseDistanceMet(event) && this._mouseDelayMet(event))
{
this._mouseStarted = (this._mouseStart(event) !== false);
if (!this._mouseStarted) {
event.preventDefault();
return true;
}
}
// Click event may never have fired (Gecko & Opera)
if (true === $.data(event.target, this.widgetName +
".preventClickEvent")) {
$.removeData(event.target, this.widgetName +
".preventClickEvent");
}
// these delegates are required to keep context
this._mouseMoveDelegate = function(event) {
return that._mouseMove(event);
};
this._mouseUpDelegate = function(event) {
return that._mouseUp(event);
};
$(document)
.bind("mousemove."+this.widgetName, this._mouseMoveDelegate)
.bind("mouseup."+this.widgetName, this._mouseUpDelegate);
event.preventDefault();
mouseHandled = true;
return true;
},
_mouseMove: function(event) {
// IE mouseup check - mouseup happened when mouse was out of window
if ($.ui.ie && ( !document.documentMode || document.documentMode
< 9 ) && !event.button) {
return this._mouseUp(event);
}
if (this._mouseStarted) {
this._mouseDrag(event);
return event.preventDefault();
}
if (this._mouseDistanceMet(event) && this._mouseDelayMet(event))
{
this._mouseStarted =
(this._mouseStart(this._mouseDownEvent, event) !== false);
(this._mouseStarted ? this._mouseDrag(event) : this._mouseUp(event));
}
return !this._mouseStarted;
},
_mouseUp: function(event) {
$(document)
.unbind("mousemove."+this.widgetName,
this._mouseMoveDelegate)
.unbind("mouseup."+this.widgetName, this._mouseUpDelegate);
if (this._mouseStarted) {
this._mouseStarted = false;
if (event.target === this._mouseDownEvent.target) {
$.data(event.target, this.widgetName + ".preventClickEvent",
true);
}
this._mouseStop(event);
}
return false;
},
_mouseDistanceMet: function(event) {
return (Math.max(
Math.abs(this._mouseDownEvent.pageX - event.pageX),
Math.abs(this._mouseDownEvent.pageY - event.pageY)
) >= this.options.distance
);
},
_mouseDelayMet: function(/* event */) {
return this.mouseDelayMet;
},
// These are placeholder methods, to be overriden by extending plugin
_mouseStart: function(/* event */) {},
_mouseDrag: function(/* event */) {},
_mouseStop: function(/* event */) {},
_mouseCapture: function(/* event */) { return true; }
});
})(jQuery);
admin/ui/slider.js000064400000044567151167411240010113 0ustar00/*!
* jQuery UI Slider 1.10.3
* http://jqueryui.com
*
* Copyright 2013 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/slider/
*
* Depends:
* jquery.ui.core.js
* jquery.ui.mouse.js
* jquery.ui.widget.js
*/
(function( $, undefined ) {
// number of pages in a slider
// (how many times can you page up/down to go through the whole range)
var numPages = 5;
$.widget( "ui.slider", $.ui.mouse, {
version: "1.10.3",
widgetEventPrefix: "slide",
options: {
animate: false,
distance: 0,
max: 100,
min: 0,
orientation: "horizontal",
range: false,
step: 1,
value: 0,
values: null,
// callbacks
change: null,
slide: null,
start: null,
stop: null
},
_create: function() {
this._keySliding = false;
this._mouseSliding = false;
this._animateOff = true;
this._handleIndex = null;
this._detectOrientation();
this._mouseInit();
this.element
.addClass( "ui-slider" +
" ui-slider-" + this.orientation +
" ui-widget" +
" ui-widget-content" +
" ui-corner-all");
this._refresh();
this._setOption( "disabled", this.options.disabled );
this._animateOff = false;
},
_refresh: function() {
this._createRange();
this._createHandles();
this._setupEvents();
this._refreshValue();
},
_createHandles: function() {
var i, handleCount,
options = this.options,
existingHandles = this.element.find( ".ui-slider-handle"
).addClass( "ui-state-default ui-corner-all" ),
handle = "<a class='ui-slider-handle ui-state-default
ui-corner-all' href='#'></a>",
handles = [];
handleCount = ( options.values && options.values.length ) || 1;
if ( existingHandles.length > handleCount ) {
existingHandles.slice( handleCount ).remove();
existingHandles = existingHandles.slice( 0, handleCount );
}
for ( i = existingHandles.length; i < handleCount; i++ ) {
handles.push( handle );
}
this.handles = existingHandles.add( $( handles.join( "" )
).appendTo( this.element ) );
this.handle = this.handles.eq( 0 );
this.handles.each(function( i ) {
$( this ).data( "ui-slider-handle-index", i );
});
},
_createRange: function() {
var options = this.options,
classes = "";
if ( options.range ) {
if ( options.range === true ) {
if ( !options.values ) {
options.values = [ this._valueMin(), this._valueMin() ];
} else if ( options.values.length && options.values.length !==
2 ) {
options.values = [ options.values[0], options.values[0] ];
} else if ( $.isArray( options.values ) ) {
options.values = options.values.slice(0);
}
}
if ( !this.range || !this.range.length ) {
this.range = $( "<div></div>" )
.appendTo( this.element );
classes = "ui-slider-range" +
// note: this isn't the most fittingly semantic framework class
for this element,
// but worked best visually with a variety of themes
" ui-widget-header ui-corner-all";
} else {
this.range.removeClass( "ui-slider-range-min
ui-slider-range-max" )
// Handle range switching from true to min/max
.css({
"left": "",
"bottom": ""
});
}
this.range.addClass( classes +
( ( options.range === "min" || options.range ===
"max" ) ? " ui-slider-range-" + options.range :
"" ) );
} else {
this.range = $([]);
}
},
_setupEvents: function() {
var elements = this.handles.add( this.range ).filter( "a" );
this._off( elements );
this._on( elements, this._handleEvents );
this._hoverable( elements );
this._focusable( elements );
},
_destroy: function() {
this.handles.remove();
this.range.remove();
this.element
.removeClass( "ui-slider" +
" ui-slider-horizontal" +
" ui-slider-vertical" +
" ui-widget" +
" ui-widget-content" +
" ui-corner-all" );
this._mouseDestroy();
},
_mouseCapture: function( event ) {
var position, normValue, distance, closestHandle, index, allowed, offset,
mouseOverHandle,
that = this,
o = this.options;
if ( o.disabled ) {
return false;
}
this.elementSize = {
width: this.element.outerWidth(),
height: this.element.outerHeight()
};
this.elementOffset = this.element.offset();
position = { x: event.pageX, y: event.pageY };
normValue = this._normValueFromMouse( position );
distance = this._valueMax() - this._valueMin() + 1;
this.handles.each(function( i ) {
var thisDistance = Math.abs( normValue - that.values(i) );
if (( distance > thisDistance ) ||
( distance === thisDistance &&
(i === that._lastChangedValue || that.values(i) === o.min ))) {
distance = thisDistance;
closestHandle = $( this );
index = i;
}
});
allowed = this._start( event, index );
if ( allowed === false ) {
return false;
}
this._mouseSliding = true;
this._handleIndex = index;
closestHandle
.addClass( "ui-state-active" )
.focus();
offset = closestHandle.offset();
mouseOverHandle = !$( event.target ).parents().addBack().is(
".ui-slider-handle" );
this._clickOffset = mouseOverHandle ? { left: 0, top: 0 } : {
left: event.pageX - offset.left - ( closestHandle.width() / 2 ),
top: event.pageY - offset.top -
( closestHandle.height() / 2 ) -
( parseInt( closestHandle.css("borderTopWidth"), 10 ) || 0 )
-
( parseInt( closestHandle.css("borderBottomWidth"), 10 ) ||
0) +
( parseInt( closestHandle.css("marginTop"), 10 ) || 0)
};
if ( !this.handles.hasClass( "ui-state-hover" ) ) {
this._slide( event, index, normValue );
}
this._animateOff = true;
return true;
},
_mouseStart: function() {
return true;
},
_mouseDrag: function( event ) {
var position = { x: event.pageX, y: event.pageY },
normValue = this._normValueFromMouse( position );
this._slide( event, this._handleIndex, normValue );
return false;
},
_mouseStop: function( event ) {
this.handles.removeClass( "ui-state-active" );
this._mouseSliding = false;
this._stop( event, this._handleIndex );
this._change( event, this._handleIndex );
this._handleIndex = null;
this._clickOffset = null;
this._animateOff = false;
return false;
},
_detectOrientation: function() {
this.orientation = ( this.options.orientation === "vertical" )
? "vertical" : "horizontal";
},
_normValueFromMouse: function( position ) {
var pixelTotal,
pixelMouse,
percentMouse,
valueTotal,
valueMouse;
if ( this.orientation === "horizontal" ) {
pixelTotal = this.elementSize.width;
pixelMouse = position.x - this.elementOffset.left - ( this._clickOffset
? this._clickOffset.left : 0 );
} else {
pixelTotal = this.elementSize.height;
pixelMouse = position.y - this.elementOffset.top - ( this._clickOffset ?
this._clickOffset.top : 0 );
}
percentMouse = ( pixelMouse / pixelTotal );
if ( percentMouse > 1 ) {
percentMouse = 1;
}
if ( percentMouse < 0 ) {
percentMouse = 0;
}
if ( this.orientation === "vertical" ) {
percentMouse = 1 - percentMouse;
}
valueTotal = this._valueMax() - this._valueMin();
valueMouse = this._valueMin() + percentMouse * valueTotal;
return this._trimAlignValue( valueMouse );
},
_start: function( event, index ) {
var uiHash = {
handle: this.handles[ index ],
value: this.value()
};
if ( this.options.values && this.options.values.length ) {
uiHash.value = this.values( index );
uiHash.values = this.values();
}
return this._trigger( "start", event, uiHash );
},
_slide: function( event, index, newVal ) {
var otherVal,
newValues,
allowed;
if ( this.options.values && this.options.values.length ) {
otherVal = this.values( index ? 0 : 1 );
if ( ( this.options.values.length === 2 && this.options.range
=== true ) &&
( ( index === 0 && newVal > otherVal) || ( index === 1
&& newVal < otherVal ) )
) {
newVal = otherVal;
}
if ( newVal !== this.values( index ) ) {
newValues = this.values();
newValues[ index ] = newVal;
// A slide can be canceled by returning false from the slide callback
allowed = this._trigger( "slide", event, {
handle: this.handles[ index ],
value: newVal,
values: newValues
} );
otherVal = this.values( index ? 0 : 1 );
if ( allowed !== false ) {
this.values( index, newVal, true );
}
}
} else {
if ( newVal !== this.value() ) {
// A slide can be canceled by returning false from the slide callback
allowed = this._trigger( "slide", event, {
handle: this.handles[ index ],
value: newVal
} );
if ( allowed !== false ) {
this.value( newVal );
}
}
}
},
_stop: function( event, index ) {
var uiHash = {
handle: this.handles[ index ],
value: this.value()
};
if ( this.options.values && this.options.values.length ) {
uiHash.value = this.values( index );
uiHash.values = this.values();
}
this._trigger( "stop", event, uiHash );
},
_change: function( event, index ) {
if ( !this._keySliding && !this._mouseSliding ) {
var uiHash = {
handle: this.handles[ index ],
value: this.value()
};
if ( this.options.values && this.options.values.length ) {
uiHash.value = this.values( index );
uiHash.values = this.values();
}
//store the last changed value index for reference when handles overlap
this._lastChangedValue = index;
this._trigger( "change", event, uiHash );
}
},
value: function( newValue ) {
if ( arguments.length ) {
this.options.value = this._trimAlignValue( newValue );
this._refreshValue();
this._change( null, 0 );
return;
}
return this._value();
},
values: function( index, newValue ) {
var vals,
newValues,
i;
if ( arguments.length > 1 ) {
this.options.values[ index ] = this._trimAlignValue( newValue );
this._refreshValue();
this._change( null, index );
return;
}
if ( arguments.length ) {
if ( $.isArray( arguments[ 0 ] ) ) {
vals = this.options.values;
newValues = arguments[ 0 ];
for ( i = 0; i < vals.length; i += 1 ) {
vals[ i ] = this._trimAlignValue( newValues[ i ] );
this._change( null, i );
}
this._refreshValue();
} else {
if ( this.options.values && this.options.values.length ) {
return this._values( index );
} else {
return this.value();
}
}
} else {
return this._values();
}
},
_setOption: function( key, value ) {
var i,
valsLength = 0;
if ( key === "range" && this.options.range === true )
{
if ( value === "min" ) {
this.options.value = this._values( 0 );
this.options.values = null;
} else if ( value === "max" ) {
this.options.value = this._values( this.options.values.length-1 );
this.options.values = null;
}
}
if ( $.isArray( this.options.values ) ) {
valsLength = this.options.values.length;
}
$.Widget.prototype._setOption.apply( this, arguments );
switch ( key ) {
case "orientation":
this._detectOrientation();
this.element
.removeClass( "ui-slider-horizontal ui-slider-vertical" )
.addClass( "ui-slider-" + this.orientation );
this._refreshValue();
break;
case "value":
this._animateOff = true;
this._refreshValue();
this._change( null, 0 );
this._animateOff = false;
break;
case "values":
this._animateOff = true;
this._refreshValue();
for ( i = 0; i < valsLength; i += 1 ) {
this._change( null, i );
}
this._animateOff = false;
break;
case "min":
case "max":
this._animateOff = true;
this._refreshValue();
this._animateOff = false;
break;
case "range":
this._animateOff = true;
this._refresh();
this._animateOff = false;
break;
}
},
//internal value getter
// _value() returns value trimmed by min and max, aligned by step
_value: function() {
var val = this.options.value;
val = this._trimAlignValue( val );
return val;
},
//internal values getter
// _values() returns array of values trimmed by min and max, aligned by
step
// _values( index ) returns single value trimmed by min and max, aligned
by step
_values: function( index ) {
var val,
vals,
i;
if ( arguments.length ) {
val = this.options.values[ index ];
val = this._trimAlignValue( val );
return val;
} else if ( this.options.values && this.options.values.length )
{
// .slice() creates a copy of the array
// this copy gets trimmed by min and max and then returned
vals = this.options.values.slice();
for ( i = 0; i < vals.length; i+= 1) {
vals[ i ] = this._trimAlignValue( vals[ i ] );
}
return vals;
} else {
return [];
}
},
// returns the step-aligned value that val is closest to, between
(inclusive) min and max
_trimAlignValue: function( val ) {
if ( val <= this._valueMin() ) {
return this._valueMin();
}
if ( val >= this._valueMax() ) {
return this._valueMax();
}
var step = ( this.options.step > 0 ) ? this.options.step : 1,
valModStep = (val - this._valueMin()) % step,
alignValue = val - valModStep;
if ( Math.abs(valModStep) * 2 >= step ) {
alignValue += ( valModStep > 0 ) ? step : ( -step );
}
// Since JavaScript has problems with large floats, round
// the final value to 5 digits after the decimal point (see #4124)
return parseFloat( alignValue.toFixed(5) );
},
_valueMin: function() {
return this.options.min;
},
_valueMax: function() {
return this.options.max;
},
_refreshValue: function() {
var lastValPercent, valPercent, value, valueMin, valueMax,
oRange = this.options.range,
o = this.options,
that = this,
animate = ( !this._animateOff ) ? o.animate : false,
_set = {};
if ( this.options.values && this.options.values.length ) {
this.handles.each(function( i ) {
valPercent = ( that.values(i) - that._valueMin() ) / ( that._valueMax()
- that._valueMin() ) * 100;
_set[ that.orientation === "horizontal" ? "left" :
"bottom" ] = valPercent + "%";
$( this ).stop( 1, 1 )[ animate ? "animate" : "css"
]( _set, o.animate );
if ( that.options.range === true ) {
if ( that.orientation === "horizontal" ) {
if ( i === 0 ) {
that.range.stop( 1, 1 )[ animate ? "animate" :
"css" ]( { left: valPercent + "%" }, o.animate );
}
if ( i === 1 ) {
that.range[ animate ? "animate" : "css" ]( {
width: ( valPercent - lastValPercent ) + "%" }, { queue: false,
duration: o.animate } );
}
} else {
if ( i === 0 ) {
that.range.stop( 1, 1 )[ animate ? "animate" :
"css" ]( { bottom: ( valPercent ) + "%" }, o.animate
);
}
if ( i === 1 ) {
that.range[ animate ? "animate" : "css" ]( {
height: ( valPercent - lastValPercent ) + "%" }, { queue: false,
duration: o.animate } );
}
}
}
lastValPercent = valPercent;
});
} else {
value = this.value();
valueMin = this._valueMin();
valueMax = this._valueMax();
valPercent = ( valueMax !== valueMin ) ?
( value - valueMin ) / ( valueMax - valueMin ) * 100 :
0;
_set[ this.orientation === "horizontal" ? "left" :
"bottom" ] = valPercent + "%";
this.handle.stop( 1, 1 )[ animate ? "animate" :
"css" ]( _set, o.animate );
if ( oRange === "min" && this.orientation ===
"horizontal" ) {
this.range.stop( 1, 1 )[ animate ? "animate" :
"css" ]( { width: valPercent + "%" }, o.animate );
}
if ( oRange === "max" && this.orientation ===
"horizontal" ) {
this.range[ animate ? "animate" : "css" ]( { width:
( 100 - valPercent ) + "%" }, { queue: false, duration: o.animate
} );
}
if ( oRange === "min" && this.orientation ===
"vertical" ) {
this.range.stop( 1, 1 )[ animate ? "animate" :
"css" ]( { height: valPercent + "%" }, o.animate );
}
if ( oRange === "max" && this.orientation ===
"vertical" ) {
this.range[ animate ? "animate" : "css" ]( {
height: ( 100 - valPercent ) + "%" }, { queue: false, duration:
o.animate } );
}
}
},
_handleEvents: {
keydown: function( event ) {
/*jshint maxcomplexity:25*/
var allowed, curVal, newVal, step,
index = $( event.target ).data( "ui-slider-handle-index" );
switch ( event.keyCode ) {
case $.ui.keyCode.HOME:
case $.ui.keyCode.END:
case $.ui.keyCode.PAGE_UP:
case $.ui.keyCode.PAGE_DOWN:
case $.ui.keyCode.UP:
case $.ui.keyCode.RIGHT:
case $.ui.keyCode.DOWN:
case $.ui.keyCode.LEFT:
event.preventDefault();
if ( !this._keySliding ) {
this._keySliding = true;
$( event.target ).addClass( "ui-state-active" );
allowed = this._start( event, index );
if ( allowed === false ) {
return;
}
}
break;
}
step = this.options.step;
if ( this.options.values && this.options.values.length ) {
curVal = newVal = this.values( index );
} else {
curVal = newVal = this.value();
}
switch ( event.keyCode ) {
case $.ui.keyCode.HOME:
newVal = this._valueMin();
break;
case $.ui.keyCode.END:
newVal = this._valueMax();
break;
case $.ui.keyCode.PAGE_UP:
newVal = this._trimAlignValue( curVal + ( (this._valueMax() -
this._valueMin()) / numPages ) );
break;
case $.ui.keyCode.PAGE_DOWN:
newVal = this._trimAlignValue( curVal - ( (this._valueMax() -
this._valueMin()) / numPages ) );
break;
case $.ui.keyCode.UP:
case $.ui.keyCode.RIGHT:
if ( curVal === this._valueMax() ) {
return;
}
newVal = this._trimAlignValue( curVal + step );
break;
case $.ui.keyCode.DOWN:
case $.ui.keyCode.LEFT:
if ( curVal === this._valueMin() ) {
return;
}
newVal = this._trimAlignValue( curVal - step );
break;
}
this._slide( event, index, newVal );
},
click: function( event ) {
event.preventDefault();
},
keyup: function( event ) {
var index = $( event.target ).data( "ui-slider-handle-index"
);
if ( this._keySliding ) {
this._keySliding = false;
this._stop( event, index );
this._change( event, index );
$( event.target ).removeClass( "ui-state-active" );
}
}
}
});
}(jQuery));
admin/ui/timepicker.js000064400000220446151167411240010755 0ustar00/*!
jQuery Timepicker Addon - v1.4 - 2013-08-11
* http://trentrichardson.com/examples/timepicker
* Copyright (c) 2013 Trent Richardson; Licensed MIT */
(function ($) {
/*
* Lets not redefine timepicker, Prevent "Uncaught RangeError: Maximum
call stack size exceeded"
*/
$.ui.timepicker = $.ui.timepicker || {};
if ($.ui.timepicker.version) {
return;
}
/*
* Extend jQueryUI, get it started with our version number
*/
$.extend($.ui, {
timepicker: {
version: "1.4"
}
});
/*
* Timepicker manager.
* Use the singleton instance of this class, $.timepicker, to interact with
the time picker.
* Settings for (groups of) time pickers are maintained in an instance
object,
* allowing multiple different settings on the same page.
*/
var Timepicker = function () {
this.regional = []; // Available regional settings, indexed by language
code
this.regional[''] = { // Default regional settings
currentText: 'Now',
closeText: 'Done',
amNames: ['AM', 'A'],
pmNames: ['PM', 'P'],
timeFormat: 'HH:mm',
timeSuffix: '',
timeOnlyTitle: 'Choose Time',
timeText: 'Time',
hourText: 'Hour',
minuteText: 'Minute',
secondText: 'Second',
millisecText: 'Millisecond',
microsecText: 'Microsecond',
timezoneText: 'Time Zone',
isRTL: false
};
this._defaults = { // Global defaults for all the datetime picker
instances
showButtonPanel: true,
timeOnly: false,
showHour: null,
showMinute: null,
showSecond: null,
showMillisec: null,
showMicrosec: null,
showTimezone: null,
showTime: true,
stepHour: 1,
stepMinute: 1,
stepSecond: 1,
stepMillisec: 1,
stepMicrosec: 1,
hour: 0,
minute: 0,
second: 0,
millisec: 0,
microsec: 0,
timezone: null,
hourMin: 0,
minuteMin: 0,
secondMin: 0,
millisecMin: 0,
microsecMin: 0,
hourMax: 23,
minuteMax: 59,
secondMax: 59,
millisecMax: 999,
microsecMax: 999,
minDateTime: null,
maxDateTime: null,
onSelect: null,
hourGrid: 0,
minuteGrid: 0,
secondGrid: 0,
millisecGrid: 0,
microsecGrid: 0,
alwaysSetTime: true,
separator: ' ',
altFieldTimeOnly: true,
altTimeFormat: null,
altSeparator: null,
altTimeSuffix: null,
pickerTimeFormat: null,
pickerTimeSuffix: null,
showTimepicker: true,
timezoneList: null,
addSliderAccess: false,
sliderAccessArgs: null,
controlType: 'slider',
defaultValue: null,
parse: 'strict'
};
$.extend(this._defaults, this.regional['']);
};
$.extend(Timepicker.prototype, {
$input: null,
$altInput: null,
$timeObj: null,
inst: null,
hour_slider: null,
minute_slider: null,
second_slider: null,
millisec_slider: null,
microsec_slider: null,
timezone_select: null,
hour: 0,
minute: 0,
second: 0,
millisec: 0,
microsec: 0,
timezone: null,
hourMinOriginal: null,
minuteMinOriginal: null,
secondMinOriginal: null,
millisecMinOriginal: null,
microsecMinOriginal: null,
hourMaxOriginal: null,
minuteMaxOriginal: null,
secondMaxOriginal: null,
millisecMaxOriginal: null,
microsecMaxOriginal: null,
ampm: '',
formattedDate: '',
formattedTime: '',
formattedDateTime: '',
timezoneList: null,
units: ['hour', 'minute', 'second',
'millisec', 'microsec'],
support: {},
control: null,
/*
* Override the default settings for all instances of the time picker.
* @param {Object} settings object - the new settings to use as defaults
(anonymous object)
* @return {Object} the manager object
*/
setDefaults: function (settings) {
extendRemove(this._defaults, settings || {});
return this;
},
/*
* Create a new Timepicker instance
*/
_newInst: function ($input, opts) {
var tp_inst = new Timepicker(),
inlineSettings = {},
fns = {},
overrides, i;
for (var attrName in this._defaults) {
if (this._defaults.hasOwnProperty(attrName)) {
var attrValue = $input.attr('time:' + attrName);
if (attrValue) {
try {
inlineSettings[attrName] = eval(attrValue);
} catch (err) {
inlineSettings[attrName] = attrValue;
}
}
}
}
overrides = {
beforeShow: function (input, dp_inst) {
if ($.isFunction(tp_inst._defaults.evnts.beforeShow)) {
return tp_inst._defaults.evnts.beforeShow.call($input[0], input,
dp_inst, tp_inst);
}
},
onChangeMonthYear: function (year, month, dp_inst) {
// Update the time as well : this prevents the time from disappearing
from the $input field.
tp_inst._updateDateTime(dp_inst);
if ($.isFunction(tp_inst._defaults.evnts.onChangeMonthYear)) {
tp_inst._defaults.evnts.onChangeMonthYear.call($input[0], year,
month, dp_inst, tp_inst);
}
},
onClose: function (dateText, dp_inst) {
if (tp_inst.timeDefined === true && $input.val() !==
'') {
tp_inst._updateDateTime(dp_inst);
}
if ($.isFunction(tp_inst._defaults.evnts.onClose)) {
tp_inst._defaults.evnts.onClose.call($input[0], dateText, dp_inst,
tp_inst);
}
}
};
for (i in overrides) {
if (overrides.hasOwnProperty(i)) {
fns[i] = opts[i] || null;
}
}
tp_inst._defaults = $.extend({}, this._defaults, inlineSettings, opts,
overrides, {
evnts: fns,
timepicker: tp_inst // add timepicker as a property of datepicker:
$.datepicker._get(dp_inst, 'timepicker');
});
tp_inst.amNames = $.map(tp_inst._defaults.amNames, function (val) {
return val.toUpperCase();
});
tp_inst.pmNames = $.map(tp_inst._defaults.pmNames, function (val) {
return val.toUpperCase();
});
// detect which units are supported
tp_inst.support = detectSupport(
tp_inst._defaults.timeFormat +
(tp_inst._defaults.pickerTimeFormat ?
tp_inst._defaults.pickerTimeFormat : '') +
(tp_inst._defaults.altTimeFormat ? tp_inst._defaults.altTimeFormat :
''));
// controlType is string - key to our this._controls
if (typeof(tp_inst._defaults.controlType) === 'string') {
if (tp_inst._defaults.controlType === 'slider' &&
typeof($.ui.slider) === 'undefined') {
tp_inst._defaults.controlType = 'select';
}
tp_inst.control = tp_inst._controls[tp_inst._defaults.controlType];
}
// controlType is an object and must implement create, options, value
methods
else {
tp_inst.control = tp_inst._defaults.controlType;
}
// prep the timezone options
var timezoneList = [-720, -660, -600, -570, -540, -480, -420, -360,
-300, -270, -240, -210, -180, -120, -60,
0, 60, 120, 180, 210, 240, 270, 300, 330, 345, 360, 390, 420, 480,
525, 540, 570, 600, 630, 660, 690, 720, 765, 780, 840];
if (tp_inst._defaults.timezoneList !== null) {
timezoneList = tp_inst._defaults.timezoneList;
}
var tzl = timezoneList.length, tzi = 0, tzv = null;
if (tzl > 0 && typeof timezoneList[0] !== 'object')
{
for (; tzi < tzl; tzi++) {
tzv = timezoneList[tzi];
timezoneList[tzi] = { value: tzv, label:
$.timepicker.timezoneOffsetString(tzv, tp_inst.support.iso8601) };
}
}
tp_inst._defaults.timezoneList = timezoneList;
// set the default units
tp_inst.timezone = tp_inst._defaults.timezone !== null ?
$.timepicker.timezoneOffsetNumber(tp_inst._defaults.timezone) :
((new Date()).getTimezoneOffset() * -1);
tp_inst.hour = tp_inst._defaults.hour < tp_inst._defaults.hourMin ?
tp_inst._defaults.hourMin :
tp_inst._defaults.hour > tp_inst._defaults.hourMax ?
tp_inst._defaults.hourMax : tp_inst._defaults.hour;
tp_inst.minute = tp_inst._defaults.minute <
tp_inst._defaults.minuteMin ? tp_inst._defaults.minuteMin :
tp_inst._defaults.minute > tp_inst._defaults.minuteMax ?
tp_inst._defaults.minuteMax : tp_inst._defaults.minute;
tp_inst.second = tp_inst._defaults.second <
tp_inst._defaults.secondMin ? tp_inst._defaults.secondMin :
tp_inst._defaults.second > tp_inst._defaults.secondMax ?
tp_inst._defaults.secondMax : tp_inst._defaults.second;
tp_inst.millisec = tp_inst._defaults.millisec <
tp_inst._defaults.millisecMin ? tp_inst._defaults.millisecMin :
tp_inst._defaults.millisec > tp_inst._defaults.millisecMax ?
tp_inst._defaults.millisecMax : tp_inst._defaults.millisec;
tp_inst.microsec = tp_inst._defaults.microsec <
tp_inst._defaults.microsecMin ? tp_inst._defaults.microsecMin :
tp_inst._defaults.microsec > tp_inst._defaults.microsecMax ?
tp_inst._defaults.microsecMax : tp_inst._defaults.microsec;
tp_inst.ampm = '';
tp_inst.$input = $input;
if (tp_inst._defaults.altField) {
tp_inst.$altInput = $(tp_inst._defaults.altField).css({
cursor: 'pointer'
}).focus(function () {
$input.trigger("focus");
});
}
if (tp_inst._defaults.minDate === 0 || tp_inst._defaults.minDateTime ===
0) {
tp_inst._defaults.minDate = new Date();
}
if (tp_inst._defaults.maxDate === 0 || tp_inst._defaults.maxDateTime ===
0) {
tp_inst._defaults.maxDate = new Date();
}
// datepicker needs minDate/maxDate, timepicker needs
minDateTime/maxDateTime..
if (tp_inst._defaults.minDate !== undefined &&
tp_inst._defaults.minDate instanceof Date) {
tp_inst._defaults.minDateTime = new
Date(tp_inst._defaults.minDate.getTime());
}
if (tp_inst._defaults.minDateTime !== undefined &&
tp_inst._defaults.minDateTime instanceof Date) {
tp_inst._defaults.minDate = new
Date(tp_inst._defaults.minDateTime.getTime());
}
if (tp_inst._defaults.maxDate !== undefined &&
tp_inst._defaults.maxDate instanceof Date) {
tp_inst._defaults.maxDateTime = new
Date(tp_inst._defaults.maxDate.getTime());
}
if (tp_inst._defaults.maxDateTime !== undefined &&
tp_inst._defaults.maxDateTime instanceof Date) {
tp_inst._defaults.maxDate = new
Date(tp_inst._defaults.maxDateTime.getTime());
}
tp_inst.$input.bind('focus', function () {
tp_inst._onFocus();
});
return tp_inst;
},
/*
* add our sliders to the calendar
*/
_addTimePicker: function (dp_inst) {
var currDT = (this.$altInput && this._defaults.altFieldTimeOnly)
? this.$input.val() + ' ' + this.$altInput.val() :
this.$input.val();
this.timeDefined = this._parseTime(currDT);
this._limitMinMaxDateTime(dp_inst, false);
this._injectTimePicker();
},
/*
* parse the time string from input value or _setTime
*/
_parseTime: function (timeString, withDate) {
if (!this.inst) {
this.inst = $.datepicker._getInst(this.$input[0]);
}
if (withDate || !this._defaults.timeOnly) {
var dp_dateFormat = $.datepicker._get(this.inst,
'dateFormat');
try {
var parseRes = parseDateTimeInternal(dp_dateFormat,
this._defaults.timeFormat, timeString,
$.datepicker._getFormatConfig(this.inst), this._defaults);
if (!parseRes.timeObj) {
return false;
}
$.extend(this, parseRes.timeObj);
} catch (err) {
$.timepicker.log("Error parsing the date/time string: " +
err +
"\ndate/time string = " + timeString +
"\ntimeFormat = " + this._defaults.timeFormat +
"\ndateFormat = " + dp_dateFormat);
return false;
}
return true;
} else {
var timeObj = $.datepicker.parseTime(this._defaults.timeFormat,
timeString, this._defaults);
if (!timeObj) {
return false;
}
$.extend(this, timeObj);
return true;
}
},
/*
* generate and inject html for timepicker into ui datepicker
*/
_injectTimePicker: function () {
var $dp = this.inst.dpDiv,
o = this.inst.settings,
tp_inst = this,
litem = '',
uitem = '',
show = null,
max = {},
gridSize = {},
size = null,
i = 0,
l = 0;
// Prevent displaying twice
if ($dp.find("div.ui-timepicker-div").length === 0 &&
o.showTimepicker) {
var noDisplay = ' style="display:none;"',
html = '<div class="ui-timepicker-div' + (o.isRTL ?
' ui-timepicker-rtl' : '') +
'"><dl>' + '<dt
class="ui_tpicker_time_label"' + ((o.showTime) ?
'' : noDisplay) + '>' + o.timeText +
'</dt>' +
'<dd class="ui_tpicker_time"' +
((o.showTime) ? '' : noDisplay) + '></dd>';
// Create the markup
for (i = 0, l = this.units.length; i < l; i++) {
litem = this.units[i];
uitem = litem.substr(0, 1).toUpperCase() + litem.substr(1);
show = o['show' + uitem] !== null ? o['show' +
uitem] : this.support[litem];
// Added by Peter Medeiros:
// - Figure out what the hour/minute/second max should be based on the
step values.
// - Example: if stepMinute is 15, then minMax is 45.
max[litem] = parseInt((o[litem + 'Max'] - ((o[litem +
'Max'] - o[litem + 'Min']) % o['step' +
uitem])), 10);
gridSize[litem] = 0;
html += '<dt class="ui_tpicker_' + litem +
'_label"' + (show ? '' : noDisplay) +
'>' + o[litem + 'Text'] + '</dt>' +
'<dd class="ui_tpicker_' + litem +
'"><div class="ui_tpicker_' + litem +
'_slider"' + (show ? '' : noDisplay) +
'></div>';
if (show && o[litem + 'Grid'] > 0) {
html += '<div style="padding-left:
1px"><table
class="ui-tpicker-grid-label"><tr>';
if (litem === 'hour') {
for (var h = o[litem + 'Min']; h <= max[litem]; h +=
parseInt(o[litem + 'Grid'], 10)) {
gridSize[litem]++;
var tmph = $.datepicker.formatTime(this.support.ampm ?
'hht' : 'HH', {hour: h}, o);
html += '<td data-for="' + litem +
'">' + tmph + '</td>';
}
}
else {
for (var m = o[litem + 'Min']; m <= max[litem]; m +=
parseInt(o[litem + 'Grid'], 10)) {
gridSize[litem]++;
html += '<td data-for="' + litem +
'">' + ((m < 10) ? '0' : '') + m +
'</td>';
}
}
html += '</tr></table></div>';
}
html += '</dd>';
}
// Timezone
var showTz = o.showTimezone !== null ? o.showTimezone :
this.support.timezone;
html += '<dt class="ui_tpicker_timezone_label"'
+ (showTz ? '' : noDisplay) + '>' + o.timezoneText +
'</dt>';
html += '<dd class="ui_tpicker_timezone" ' +
(showTz ? '' : noDisplay) + '></dd>';
// Create the elements from string
html += '</dl></div>';
var $tp = $(html);
// if we only want time picker...
if (o.timeOnly === true) {
$tp.prepend('<div class="ui-widget-header
ui-helper-clearfix ui-corner-all">' + '<div
class="ui-datepicker-title">' + o.timeOnlyTitle +
'</div>' + '</div>');
$dp.find('.ui-datepicker-header,
.ui-datepicker-calendar').hide();
}
// add sliders, adjust grids, add events
for (i = 0, l = tp_inst.units.length; i < l; i++) {
litem = tp_inst.units[i];
uitem = litem.substr(0, 1).toUpperCase() + litem.substr(1);
show = o['show' + uitem] !== null ? o['show' +
uitem] : this.support[litem];
// add the slider
tp_inst[litem + '_slider'] = tp_inst.control.create(tp_inst,
$tp.find('.ui_tpicker_' + litem + '_slider'), litem,
tp_inst[litem], o[litem + 'Min'], max[litem], o['step'
+ uitem]);
// adjust the grid and add click event
if (show && o[litem + 'Grid'] > 0) {
size = 100 * gridSize[litem] * o[litem + 'Grid'] /
(max[litem] - o[litem + 'Min']);
$tp.find('.ui_tpicker_' + litem + '
table').css({
width: size + "%",
marginLeft: o.isRTL ? '0' : ((size / (-2 *
gridSize[litem])) + "%"),
marginRight: o.isRTL ? ((size / (-2 * gridSize[litem])) +
"%") : '0',
borderCollapse: 'collapse'
}).find("td").click(function (e) {
var $t = $(this),
h = $t.html(),
n = parseInt(h.replace(/[^0-9]/g), 10),
ap = h.replace(/[^apm]/ig),
f = $t.data('for'); // loses scope, so we use data-for
if (f === 'hour') {
if (ap.indexOf('p') !== -1 && n < 12) {
n += 12;
}
else {
if (ap.indexOf('a') !== -1 && n === 12) {
n = 0;
}
}
}
tp_inst.control.value(tp_inst, tp_inst[f + '_slider'],
litem, n);
tp_inst._onTimeChange();
tp_inst._onSelectHandler();
}).css({
cursor: 'pointer',
width: (100 / gridSize[litem]) + '%',
textAlign: 'center',
overflow: 'hidden'
});
} // end if grid > 0
} // end for loop
// Add timezone options
this.timezone_select =
$tp.find('.ui_tpicker_timezone').append('<select></select>').find("select");
$.fn.append.apply(this.timezone_select,
$.map(o.timezoneList, function (val, idx) {
return $("<option />").val(typeof val ===
"object" ? val.value : val).text(typeof val ===
"object" ? val.label : val);
}));
if (typeof(this.timezone) !== "undefined" &&
this.timezone !== null && this.timezone !== "") {
var local_timezone = (new Date(this.inst.selectedYear,
this.inst.selectedMonth, this.inst.selectedDay, 12)).getTimezoneOffset() *
-1;
if (local_timezone === this.timezone) {
selectLocalTimezone(tp_inst);
} else {
this.timezone_select.val(this.timezone);
}
} else {
if (typeof(this.hour) !== "undefined" && this.hour
!== null && this.hour !== "") {
this.timezone_select.val(o.timezone);
} else {
selectLocalTimezone(tp_inst);
}
}
this.timezone_select.change(function () {
tp_inst._onTimeChange();
tp_inst._onSelectHandler();
});
// End timezone options
// inject timepicker into datepicker
var $buttonPanel = $dp.find('.ui-datepicker-buttonpane');
if ($buttonPanel.length) {
$buttonPanel.before($tp);
} else {
$dp.append($tp);
}
this.$timeObj = $tp.find('.ui_tpicker_time');
if (this.inst !== null) {
var timeDefined = this.timeDefined;
this._onTimeChange();
this.timeDefined = timeDefined;
}
// slideAccess integration:
http://trentrichardson.com/2011/11/11/jquery-ui-sliders-and-touch-accessibility/
if (this._defaults.addSliderAccess) {
var sliderAccessArgs = this._defaults.sliderAccessArgs,
rtl = this._defaults.isRTL;
sliderAccessArgs.isRTL = rtl;
setTimeout(function () { // fix for inline mode
if ($tp.find('.ui-slider-access').length === 0) {
$tp.find('.ui-slider:visible').sliderAccess(sliderAccessArgs);
// fix any grids since sliders are shorter
var sliderAccessWidth =
$tp.find('.ui-slider-access:eq(0)').outerWidth(true);
if (sliderAccessWidth) {
$tp.find('table:visible').each(function () {
var $g = $(this),
oldWidth = $g.outerWidth(),
oldMarginLeft = $g.css(rtl ? 'marginRight' :
'marginLeft').toString().replace('%', ''),
newWidth = oldWidth - sliderAccessWidth,
newMarginLeft = ((oldMarginLeft * newWidth) / oldWidth) +
'%',
css = { width: newWidth, marginRight: 0, marginLeft: 0 };
css[rtl ? 'marginRight' : 'marginLeft'] =
newMarginLeft;
$g.css(css);
});
}
}
}, 10);
}
// end slideAccess integration
tp_inst._limitMinMaxDateTime(this.inst, true);
}
},
/*
* This function tries to limit the ability to go outside the
* min/max date range
*/
_limitMinMaxDateTime: function (dp_inst, adjustSliders) {
var o = this._defaults,
dp_date = new Date(dp_inst.selectedYear, dp_inst.selectedMonth,
dp_inst.selectedDay);
if (!this._defaults.showTimepicker) {
return;
} // No time so nothing to check here
if ($.datepicker._get(dp_inst, 'minDateTime') !== null
&& $.datepicker._get(dp_inst, 'minDateTime') !==
undefined && dp_date) {
var minDateTime = $.datepicker._get(dp_inst, 'minDateTime'),
minDateTimeDate = new Date(minDateTime.getFullYear(),
minDateTime.getMonth(), minDateTime.getDate(), 0, 0, 0, 0);
if (this.hourMinOriginal === null || this.minuteMinOriginal === null ||
this.secondMinOriginal === null || this.millisecMinOriginal === null ||
this.microsecMinOriginal === null) {
this.hourMinOriginal = o.hourMin;
this.minuteMinOriginal = o.minuteMin;
this.secondMinOriginal = o.secondMin;
this.millisecMinOriginal = o.millisecMin;
this.microsecMinOriginal = o.microsecMin;
}
if (dp_inst.settings.timeOnly || minDateTimeDate.getTime() ===
dp_date.getTime()) {
this._defaults.hourMin = minDateTime.getHours();
if (this.hour <= this._defaults.hourMin) {
this.hour = this._defaults.hourMin;
this._defaults.minuteMin = minDateTime.getMinutes();
if (this.minute <= this._defaults.minuteMin) {
this.minute = this._defaults.minuteMin;
this._defaults.secondMin = minDateTime.getSeconds();
if (this.second <= this._defaults.secondMin) {
this.second = this._defaults.secondMin;
this._defaults.millisecMin = minDateTime.getMilliseconds();
if (this.millisec <= this._defaults.millisecMin) {
this.millisec = this._defaults.millisecMin;
this._defaults.microsecMin = minDateTime.getMicroseconds();
} else {
if (this.microsec < this._defaults.microsecMin) {
this.microsec = this._defaults.microsecMin;
}
this._defaults.microsecMin = this.microsecMinOriginal;
}
} else {
this._defaults.millisecMin = this.millisecMinOriginal;
this._defaults.microsecMin = this.microsecMinOriginal;
}
} else {
this._defaults.secondMin = this.secondMinOriginal;
this._defaults.millisecMin = this.millisecMinOriginal;
this._defaults.microsecMin = this.microsecMinOriginal;
}
} else {
this._defaults.minuteMin = this.minuteMinOriginal;
this._defaults.secondMin = this.secondMinOriginal;
this._defaults.millisecMin = this.millisecMinOriginal;
this._defaults.microsecMin = this.microsecMinOriginal;
}
} else {
this._defaults.hourMin = this.hourMinOriginal;
this._defaults.minuteMin = this.minuteMinOriginal;
this._defaults.secondMin = this.secondMinOriginal;
this._defaults.millisecMin = this.millisecMinOriginal;
this._defaults.microsecMin = this.microsecMinOriginal;
}
}
if ($.datepicker._get(dp_inst, 'maxDateTime') !== null
&& $.datepicker._get(dp_inst, 'maxDateTime') !==
undefined && dp_date) {
var maxDateTime = $.datepicker._get(dp_inst, 'maxDateTime'),
maxDateTimeDate = new Date(maxDateTime.getFullYear(),
maxDateTime.getMonth(), maxDateTime.getDate(), 0, 0, 0, 0);
if (this.hourMaxOriginal === null || this.minuteMaxOriginal === null ||
this.secondMaxOriginal === null || this.millisecMaxOriginal === null) {
this.hourMaxOriginal = o.hourMax;
this.minuteMaxOriginal = o.minuteMax;
this.secondMaxOriginal = o.secondMax;
this.millisecMaxOriginal = o.millisecMax;
this.microsecMaxOriginal = o.microsecMax;
}
if (dp_inst.settings.timeOnly || maxDateTimeDate.getTime() ===
dp_date.getTime()) {
this._defaults.hourMax = maxDateTime.getHours();
if (this.hour >= this._defaults.hourMax) {
this.hour = this._defaults.hourMax;
this._defaults.minuteMax = maxDateTime.getMinutes();
if (this.minute >= this._defaults.minuteMax) {
this.minute = this._defaults.minuteMax;
this._defaults.secondMax = maxDateTime.getSeconds();
if (this.second >= this._defaults.secondMax) {
this.second = this._defaults.secondMax;
this._defaults.millisecMax = maxDateTime.getMilliseconds();
if (this.millisec >= this._defaults.millisecMax) {
this.millisec = this._defaults.millisecMax;
this._defaults.microsecMax = maxDateTime.getMicroseconds();
} else {
if (this.microsec > this._defaults.microsecMax) {
this.microsec = this._defaults.microsecMax;
}
this._defaults.microsecMax = this.microsecMaxOriginal;
}
} else {
this._defaults.millisecMax = this.millisecMaxOriginal;
this._defaults.microsecMax = this.microsecMaxOriginal;
}
} else {
this._defaults.secondMax = this.secondMaxOriginal;
this._defaults.millisecMax = this.millisecMaxOriginal;
this._defaults.microsecMax = this.microsecMaxOriginal;
}
} else {
this._defaults.minuteMax = this.minuteMaxOriginal;
this._defaults.secondMax = this.secondMaxOriginal;
this._defaults.millisecMax = this.millisecMaxOriginal;
this._defaults.microsecMax = this.microsecMaxOriginal;
}
} else {
this._defaults.hourMax = this.hourMaxOriginal;
this._defaults.minuteMax = this.minuteMaxOriginal;
this._defaults.secondMax = this.secondMaxOriginal;
this._defaults.millisecMax = this.millisecMaxOriginal;
this._defaults.microsecMax = this.microsecMaxOriginal;
}
}
if (adjustSliders !== undefined && adjustSliders === true) {
var hourMax = parseInt((this._defaults.hourMax -
((this._defaults.hourMax - this._defaults.hourMin) %
this._defaults.stepHour)), 10),
minMax = parseInt((this._defaults.minuteMax -
((this._defaults.minuteMax - this._defaults.minuteMin) %
this._defaults.stepMinute)), 10),
secMax = parseInt((this._defaults.secondMax -
((this._defaults.secondMax - this._defaults.secondMin) %
this._defaults.stepSecond)), 10),
millisecMax = parseInt((this._defaults.millisecMax -
((this._defaults.millisecMax - this._defaults.millisecMin) %
this._defaults.stepMillisec)), 10),
microsecMax = parseInt((this._defaults.microsecMax -
((this._defaults.microsecMax - this._defaults.microsecMin) %
this._defaults.stepMicrosec)), 10);
if (this.hour_slider) {
this.control.options(this, this.hour_slider, 'hour', { min:
this._defaults.hourMin, max: hourMax });
this.control.value(this, this.hour_slider, 'hour', this.hour
- (this.hour % this._defaults.stepHour));
}
if (this.minute_slider) {
this.control.options(this, this.minute_slider, 'minute', {
min: this._defaults.minuteMin, max: minMax });
this.control.value(this, this.minute_slider, 'minute',
this.minute - (this.minute % this._defaults.stepMinute));
}
if (this.second_slider) {
this.control.options(this, this.second_slider, 'second', {
min: this._defaults.secondMin, max: secMax });
this.control.value(this, this.second_slider, 'second',
this.second - (this.second % this._defaults.stepSecond));
}
if (this.millisec_slider) {
this.control.options(this, this.millisec_slider, 'millisec',
{ min: this._defaults.millisecMin, max: millisecMax });
this.control.value(this, this.millisec_slider, 'millisec',
this.millisec - (this.millisec % this._defaults.stepMillisec));
}
if (this.microsec_slider) {
this.control.options(this, this.microsec_slider, 'microsec',
{ min: this._defaults.microsecMin, max: microsecMax });
this.control.value(this, this.microsec_slider, 'microsec',
this.microsec - (this.microsec % this._defaults.stepMicrosec));
}
}
},
/*
* when a slider moves, set the internal time...
* on time change is also called when the time is updated in the text
field
*/
_onTimeChange: function () {
if (!this._defaults.showTimepicker) {
return;
}
var hour = (this.hour_slider) ? this.control.value(this,
this.hour_slider, 'hour') : false,
minute = (this.minute_slider) ? this.control.value(this,
this.minute_slider, 'minute') : false,
second = (this.second_slider) ? this.control.value(this,
this.second_slider, 'second') : false,
millisec = (this.millisec_slider) ? this.control.value(this,
this.millisec_slider, 'millisec') : false,
microsec = (this.microsec_slider) ? this.control.value(this,
this.microsec_slider, 'microsec') : false,
timezone = (this.timezone_select) ? this.timezone_select.val() :
false,
o = this._defaults,
pickerTimeFormat = o.pickerTimeFormat || o.timeFormat,
pickerTimeSuffix = o.pickerTimeSuffix || o.timeSuffix;
if (typeof(hour) === 'object') {
hour = false;
}
if (typeof(minute) === 'object') {
minute = false;
}
if (typeof(second) === 'object') {
second = false;
}
if (typeof(millisec) === 'object') {
millisec = false;
}
if (typeof(microsec) === 'object') {
microsec = false;
}
if (typeof(timezone) === 'object') {
timezone = false;
}
if (hour !== false) {
hour = parseInt(hour, 10);
}
if (minute !== false) {
minute = parseInt(minute, 10);
}
if (second !== false) {
second = parseInt(second, 10);
}
if (millisec !== false) {
millisec = parseInt(millisec, 10);
}
if (microsec !== false) {
microsec = parseInt(microsec, 10);
}
var ampm = o[hour < 12 ? 'amNames' :
'pmNames'][0];
// If the update was done in the input field, the input field should not
be updated.
// If the update was done using the sliders, update the input field.
var hasChanged = (hour !== this.hour || minute !== this.minute || second
!== this.second || millisec !== this.millisec || microsec !== this.microsec
||
(this.ampm.length > 0 && (hour < 12) !==
($.inArray(this.ampm.toUpperCase(), this.amNames) !== -1)) ||
(this.timezone !== null && timezone !== this.timezone));
if (hasChanged) {
if (hour !== false) {
this.hour = hour;
}
if (minute !== false) {
this.minute = minute;
}
if (second !== false) {
this.second = second;
}
if (millisec !== false) {
this.millisec = millisec;
}
if (microsec !== false) {
this.microsec = microsec;
}
if (timezone !== false) {
this.timezone = timezone;
}
if (!this.inst) {
this.inst = $.datepicker._getInst(this.$input[0]);
}
this._limitMinMaxDateTime(this.inst, true);
}
if (this.support.ampm) {
this.ampm = ampm;
}
// Updates the time within the timepicker
this.formattedTime = $.datepicker.formatTime(o.timeFormat, this, o);
if (this.$timeObj) {
if (pickerTimeFormat === o.timeFormat) {
this.$timeObj.text(this.formattedTime + pickerTimeSuffix);
}
else {
this.$timeObj.text($.datepicker.formatTime(pickerTimeFormat, this, o)
+ pickerTimeSuffix);
}
}
this.timeDefined = true;
if (hasChanged) {
this._updateDateTime();
}
},
/*
* call custom onSelect.
* bind to sliders slidestop, and grid click.
*/
_onSelectHandler: function () {
var onSelect = this._defaults.onSelect || this.inst.settings.onSelect;
var inputEl = this.$input ? this.$input[0] : null;
if (onSelect && inputEl) {
onSelect.apply(inputEl, [this.formattedDateTime, this]);
}
},
/*
* update our input with the new date time..
*/
_updateDateTime: function (dp_inst) {
dp_inst = this.inst || dp_inst;
var dtTmp = (dp_inst.currentYear > 0?
new Date(dp_inst.currentYear, dp_inst.currentMonth,
dp_inst.currentDay) :
new Date(dp_inst.selectedYear, dp_inst.selectedMonth,
dp_inst.selectedDay)),
dt = $.datepicker._daylightSavingAdjust(dtTmp),
//dt = $.datepicker._daylightSavingAdjust(new
Date(dp_inst.selectedYear, dp_inst.selectedMonth, dp_inst.selectedDay)),
//dt = $.datepicker._daylightSavingAdjust(new Date(dp_inst.currentYear,
dp_inst.currentMonth, dp_inst.currentDay)),
dateFmt = $.datepicker._get(dp_inst, 'dateFormat'),
formatCfg = $.datepicker._getFormatConfig(dp_inst),
timeAvailable = dt !== null && this.timeDefined;
this.formattedDate = $.datepicker.formatDate(dateFmt, (dt === null ? new
Date() : dt), formatCfg);
var formattedDateTime = this.formattedDate;
// if a slider was changed but datepicker doesn't have a value yet,
set it
if (dp_inst.lastVa === "") {
dp_inst.currentYear = dp_inst.selectedYear;
dp_inst.currentMonth = dp_inst.selectedMonth;
dp_inst.currentDay = dp_inst.selectedDay;
}
/*
* remove following lines to force every changes in date picker to change
the input value
* Bug descriptions: when an input field has a default value, and click
on the field to pop up the date picker.
* If the user manually empty the value in the input field, the date
picker will never change selected value.
*/
//if (dp_inst.lastVal !== undefined && (dp_inst.lastVal.length
> 0 && this.$input.val().length === 0)) {
// return;
//}
if (this._defaults.timeOnly === true) {
formattedDateTime = this.formattedTime;
} else if (this._defaults.timeOnly !== true &&
(this._defaults.alwaysSetTime || timeAvailable)) {
formattedDateTime += this._defaults.separator + this.formattedTime +
this._defaults.timeSuffix;
}
this.formattedDateTime = formattedDateTime;
if (!this._defaults.showTimepicker) {
this.$input.val(this.formattedDate);
} else if (this.$altInput && this._defaults.timeOnly === false
&& this._defaults.altFieldTimeOnly === true) {
this.$altInput.val(this.formattedTime);
this.$input.val(this.formattedDate);
} else if (this.$altInput) {
this.$input.val(formattedDateTime);
var altFormattedDateTime = '',
altSeparator = this._defaults.altSeparator ?
this._defaults.altSeparator : this._defaults.separator,
altTimeSuffix = this._defaults.altTimeSuffix ?
this._defaults.altTimeSuffix : this._defaults.timeSuffix;
if (!this._defaults.timeOnly) {
if (this._defaults.altFormat) {
altFormattedDateTime =
$.datepicker.formatDate(this._defaults.altFormat, (dt === null ? new Date()
: dt), formatCfg);
}
else {
altFormattedDateTime = this.formattedDate;
}
if (altFormattedDateTime) {
altFormattedDateTime += altSeparator;
}
}
if (this._defaults.altTimeFormat) {
altFormattedDateTime +=
$.datepicker.formatTime(this._defaults.altTimeFormat, this, this._defaults)
+ altTimeSuffix;
}
else {
altFormattedDateTime += this.formattedTime + altTimeSuffix;
}
this.$altInput.val(altFormattedDateTime);
} else {
this.$input.val(formattedDateTime);
}
this.$input.trigger("change");
},
_onFocus: function () {
if (!this.$input.val() && this._defaults.defaultValue) {
this.$input.val(this._defaults.defaultValue);
var inst = $.datepicker._getInst(this.$input.get(0)),
tp_inst = $.datepicker._get(inst, 'timepicker');
if (tp_inst) {
if (tp_inst._defaults.timeOnly && (inst.input.val() !==
inst.lastVal)) {
try {
$.datepicker._updateDatepicker(inst);
} catch (err) {
$.timepicker.log(err);
}
}
}
}
},
/*
* Small abstraction to control types
* We can add more, just be sure to follow the pattern: create, options,
value
*/
_controls: {
// slider methods
slider: {
create: function (tp_inst, obj, unit, val, min, max, step) {
var rtl = tp_inst._defaults.isRTL; // if rtl go -60->0 instead of
0->60
return obj.prop('slide', null).slider({
orientation: "horizontal",
value: rtl ? val * -1 : val,
min: rtl ? max * -1 : min,
max: rtl ? min * -1 : max,
step: step,
slide: function (event, ui) {
tp_inst.control.value(tp_inst, $(this), unit, rtl ? ui.value * -1 :
ui.value);
tp_inst._onTimeChange();
},
stop: function (event, ui) {
tp_inst._onSelectHandler();
}
});
},
options: function (tp_inst, obj, unit, opts, val) {
if (tp_inst._defaults.isRTL) {
if (typeof(opts) === 'string') {
if (opts === 'min' || opts === 'max') {
if (val !== undefined) {
return obj.slider(opts, val * -1);
}
return Math.abs(obj.slider(opts));
}
return obj.slider(opts);
}
var min = opts.min,
max = opts.max;
opts.min = opts.max = null;
if (min !== undefined) {
opts.max = min * -1;
}
if (max !== undefined) {
opts.min = max * -1;
}
return obj.slider(opts);
}
if (typeof(opts) === 'string' && val !== undefined)
{
return obj.slider(opts, val);
}
return obj.slider(opts);
},
value: function (tp_inst, obj, unit, val) {
if (tp_inst._defaults.isRTL) {
if (val !== undefined) {
return obj.slider('value', val * -1);
}
return Math.abs(obj.slider('value'));
}
if (val !== undefined) {
return obj.slider('value', val);
}
return obj.slider('value');
}
},
// select methods
select: {
create: function (tp_inst, obj, unit, val, min, max, step) {
var sel = '<select class="ui-timepicker-select"
data-unit="' + unit + '" data-min="' + min +
'" data-max="' + max + '"
data-step="' + step + '">',
format = tp_inst._defaults.pickerTimeFormat ||
tp_inst._defaults.timeFormat;
for (var i = min; i <= max; i += step) {
sel += '<option value="' + i + '"' +
(i === val ? ' selected' : '') + '>';
if (unit === 'hour') {
sel += $.datepicker.formatTime($.trim(format.replace(/[^ht ]/ig,
'')), {hour: i}, tp_inst._defaults);
}
else if (unit === 'millisec' || unit ===
'microsec' || i >= 10) { sel += i; }
else {sel += '0' + i.toString(); }
sel += '</option>';
}
sel += '</select>';
obj.children('select').remove();
$(sel).appendTo(obj).change(function (e) {
tp_inst._onTimeChange();
tp_inst._onSelectHandler();
});
return obj;
},
options: function (tp_inst, obj, unit, opts, val) {
var o = {},
$t = obj.children('select');
if (typeof(opts) === 'string') {
if (val === undefined) {
return $t.data(opts);
}
o[opts] = val;
}
else { o = opts; }
return tp_inst.control.create(tp_inst, obj, $t.data('unit'),
$t.val(), o.min || $t.data('min'), o.max ||
$t.data('max'), o.step || $t.data('step'));
},
value: function (tp_inst, obj, unit, val) {
var $t = obj.children('select');
if (val !== undefined) {
return $t.val(val);
}
return $t.val();
}
}
} // end _controls
});
$.fn.extend({
/*
* shorthand just to use timepicker.
*/
timepicker: function (o) {
o = o || {};
var tmp_args = Array.prototype.slice.call(arguments);
if (typeof o === 'object') {
tmp_args[0] = $.extend(o, {
timeOnly: true
});
}
return $(this).each(function () {
$.fn.datetimepicker.apply($(this), tmp_args);
});
},
/*
* extend timepicker to datepicker
*/
datetimepicker: function (o) {
o = o || {};
var tmp_args = arguments;
if (typeof(o) === 'string') {
if (o === 'getDate') {
return $.fn.datepicker.apply($(this[0]), tmp_args);
} else {
return this.each(function () {
var $t = $(this);
$t.datepicker.apply($t, tmp_args);
});
}
} else {
return this.each(function () {
var $t = $(this);
$t.datepicker($.timepicker._newInst($t, o)._defaults);
});
}
}
});
/*
* Public Utility to parse date and time
*/
$.datepicker.parseDateTime = function (dateFormat, timeFormat,
dateTimeString, dateSettings, timeSettings) {
var parseRes = parseDateTimeInternal(dateFormat, timeFormat,
dateTimeString, dateSettings, timeSettings);
if (parseRes.timeObj) {
var t = parseRes.timeObj;
parseRes.date.setHours(t.hour, t.minute, t.second, t.millisec);
parseRes.date.setMicroseconds(t.microsec);
}
return parseRes.date;
};
/*
* Public utility to parse time
*/
$.datepicker.parseTime = function (timeFormat, timeString, options) {
var o = extendRemove(extendRemove({}, $.timepicker._defaults), options ||
{}),
iso8601 = (timeFormat.replace(/\'.*?\'/g,
'').indexOf('Z') !== -1);
// Strict parse requires the timeString to match the timeFormat exactly
var strictParse = function (f, s, o) {
// pattern for standard and localized AM/PM markers
var getPatternAmpm = function (amNames, pmNames) {
var markers = [];
if (amNames) {
$.merge(markers, amNames);
}
if (pmNames) {
$.merge(markers, pmNames);
}
markers = $.map(markers, function (val) {
return val.replace(/[.*+?|()\[\]{}\\]/g, '\\$&');
});
return '(' + markers.join('|') + ')?';
};
// figure out position of time elements.. cause js cant do named
captures
var getFormatPositions = function (timeFormat) {
var finds =
timeFormat.toLowerCase().match(/(h{1,2}|m{1,2}|s{1,2}|l{1}|c{1}|t{1,2}|z|'.*?')/g),
orders = {
h: -1,
m: -1,
s: -1,
l: -1,
c: -1,
t: -1,
z: -1
};
if (finds) {
for (var i = 0; i < finds.length; i++) {
if (orders[finds[i].toString().charAt(0)] === -1) {
orders[finds[i].toString().charAt(0)] = i + 1;
}
}
}
return orders;
};
var regstr = '^' + f.toString()
.replace(/([hH]{1,2}|mm?|ss?|[tT]{1,2}|[zZ]|[lc]|'.*?')/g,
function (match) {
var ml = match.length;
switch (match.charAt(0).toLowerCase()) {
case 'h':
return ml === 1 ? '(\\d?\\d)' : '(\\d{' + ml +
'})';
case 'm':
return ml === 1 ? '(\\d?\\d)' : '(\\d{' + ml +
'})';
case 's':
return ml === 1 ? '(\\d?\\d)' : '(\\d{' + ml +
'})';
case 'l':
return '(\\d?\\d?\\d)';
case 'c':
return '(\\d?\\d?\\d)';
case 'z':
return '(z|[-+]\\d\\d:?\\d\\d|\\S+)?';
case 't':
return getPatternAmpm(o.amNames, o.pmNames);
default: // literal escaped in quotes
return '(' + match.replace(/\'/g,
"").replace(/(\.|\$|\^|\\|\/|\(|\)|\[|\]|\?|\+|\*)/g, function
(m) { return "\\" + m; }) + ')?';
}
})
.replace(/\s/g, '\\s?') +
o.timeSuffix + '$',
order = getFormatPositions(f),
ampm = '',
treg;
treg = s.match(new RegExp(regstr, 'i'));
var resTime = {
hour: 0,
minute: 0,
second: 0,
millisec: 0,
microsec: 0
};
if (treg) {
if (order.t !== -1) {
if (treg[order.t] === undefined || treg[order.t].length === 0) {
ampm = '';
resTime.ampm = '';
} else {
ampm = $.inArray(treg[order.t].toUpperCase(), o.amNames) !== -1 ?
'AM' : 'PM';
resTime.ampm = o[ampm === 'AM' ? 'amNames' :
'pmNames'][0];
}
}
if (order.h !== -1) {
if (ampm === 'AM' && treg[order.h] ===
'12') {
resTime.hour = 0; // 12am = 0 hour
} else {
if (ampm === 'PM' && treg[order.h] !==
'12') {
resTime.hour = parseInt(treg[order.h], 10) + 12; // 12pm = 12 hour,
any other pm = hour + 12
} else {
resTime.hour = Number(treg[order.h]);
}
}
}
if (order.m !== -1) {
resTime.minute = Number(treg[order.m]);
}
if (order.s !== -1) {
resTime.second = Number(treg[order.s]);
}
if (order.l !== -1) {
resTime.millisec = Number(treg[order.l]);
}
if (order.c !== -1) {
resTime.microsec = Number(treg[order.c]);
}
if (order.z !== -1 && treg[order.z] !== undefined) {
resTime.timezone = $.timepicker.timezoneOffsetNumber(treg[order.z]);
}
return resTime;
}
return false;
};// end strictParse
// First try JS Date, if that fails, use strictParse
var looseParse = function (f, s, o) {
try {
var d = new Date('2012-01-01 ' + s);
if (isNaN(d.getTime())) {
d = new Date('2012-01-01T' + s);
if (isNaN(d.getTime())) {
d = new Date('01/01/2012 ' + s);
if (isNaN(d.getTime())) {
throw "Unable to parse time with native Date: " + s;
}
}
}
return {
hour: d.getHours(),
minute: d.getMinutes(),
second: d.getSeconds(),
millisec: d.getMilliseconds(),
microsec: d.getMicroseconds(),
timezone: d.getTimezoneOffset() * -1
};
}
catch (err) {
try {
return strictParse(f, s, o);
}
catch (err2) {
$.timepicker.log("Unable to parse \ntimeString: " + s +
"\ntimeFormat: " + f);
}
}
return false;
}; // end looseParse
if (typeof o.parse === "function") {
return o.parse(timeFormat, timeString, o);
}
if (o.parse === 'loose') {
return looseParse(timeFormat, timeString, o);
}
return strictParse(timeFormat, timeString, o);
};
/**
* Public utility to format the time
* @param {string} format format of the time
* @param {Object} time Object not a Date for timezones
* @param {Object} [options] essentially the regional[].. amNames,
pmNames, ampm
* @returns {string} the formatted time
*/
$.datepicker.formatTime = function (format, time, options) {
options = options || {};
options = $.extend({}, $.timepicker._defaults, options);
time = $.extend({
hour: 0,
minute: 0,
second: 0,
millisec: 0,
microsec: 0,
timezone: null
}, time);
var tmptime = format,
ampmName = options.amNames[0],
hour = parseInt(time.hour, 10);
if (hour > 11) {
ampmName = options.pmNames[0];
}
tmptime =
tmptime.replace(/(?:HH?|hh?|mm?|ss?|[tT]{1,2}|[zZ]|[lc]|'.*?')/g,
function (match) {
switch (match) {
case 'HH':
return ('0' + hour).slice(-2);
case 'H':
return hour;
case 'hh':
return ('0' + convert24to12(hour)).slice(-2);
case 'h':
return convert24to12(hour);
case 'mm':
return ('0' + time.minute).slice(-2);
case 'm':
return time.minute;
case 'ss':
return ('0' + time.second).slice(-2);
case 's':
return time.second;
case 'l':
return ('00' + time.millisec).slice(-3);
case 'c':
return ('00' + time.microsec).slice(-3);
case 'z':
return $.timepicker.timezoneOffsetString(time.timezone === null ?
options.timezone : time.timezone, false);
case 'Z':
return $.timepicker.timezoneOffsetString(time.timezone === null ?
options.timezone : time.timezone, true);
case 'T':
return ampmName.charAt(0).toUpperCase();
case 'TT':
return ampmName.toUpperCase();
case 't':
return ampmName.charAt(0).toLowerCase();
case 'tt':
return ampmName.toLowerCase();
default:
return match.replace(/'/g, "");
}
});
return tmptime;
};
/*
* the bad hack :/ override datepicker so it doesn't close on select
// inspired:
http://stackoverflow.com/questions/1252512/jquery-datepicker-prevent-closing-picker-when-clicking-a-date/1762378#1762378
*/
$.datepicker._base_selectDate = $.datepicker._selectDate;
$.datepicker._selectDate = function (id, dateStr) {
var inst = this._getInst($(id)[0]),
tp_inst = this._get(inst, 'timepicker');
if (tp_inst) {
tp_inst._limitMinMaxDateTime(inst, true);
inst.inline = inst.stay_open = true;
//This way the onSelect handler called from calendarpicker get the full
dateTime
this._base_selectDate(id, dateStr);
inst.inline = inst.stay_open = false;
this._notifyChange(inst);
this._updateDatepicker(inst);
} else {
this._base_selectDate(id, dateStr);
}
};
/*
* second bad hack :/ override datepicker so it triggers an event when
changing the input field
* and does not redraw the datepicker on every selectDate event
*/
$.datepicker._base_updateDatepicker = $.datepicker._updateDatepicker;
$.datepicker._updateDatepicker = function (inst) {
// don't popup the datepicker if there is another instance already
opened
var input = inst.input[0];
if ($.datepicker._curInst && $.datepicker._curInst !== inst
&& $.datepicker._datepickerShowing &&
$.datepicker._lastInput !== input) {
return;
}
if (typeof(inst.stay_open) !== 'boolean' || inst.stay_open ===
false) {
this._base_updateDatepicker(inst);
// Reload the time control when changing something in the input text
field.
var tp_inst = this._get(inst, 'timepicker');
if (tp_inst) {
tp_inst._addTimePicker(inst);
}
}
};
/*
* third bad hack :/ override datepicker so it allows spaces and colon in
the input field
*/
$.datepicker._base_doKeyPress = $.datepicker._doKeyPress;
$.datepicker._doKeyPress = function (event) {
var inst = $.datepicker._getInst(event.target),
tp_inst = $.datepicker._get(inst, 'timepicker');
if (tp_inst) {
if ($.datepicker._get(inst, 'constrainInput')) {
var ampm = tp_inst.support.ampm,
tz = tp_inst._defaults.showTimezone !== null ?
tp_inst._defaults.showTimezone : tp_inst.support.timezone,
dateChars = $.datepicker._possibleChars($.datepicker._get(inst,
'dateFormat')),
datetimeChars = tp_inst._defaults.timeFormat.toString()
.replace(/[hms]/g, '')
.replace(/TT/g, ampm ? 'APM' : '')
.replace(/Tt/g, ampm ? 'AaPpMm' : '')
.replace(/tT/g, ampm ? 'AaPpMm' : '')
.replace(/T/g, ampm ? 'AP' : '')
.replace(/tt/g, ampm ? 'apm' : '')
.replace(/t/g, ampm ? 'ap' : '') +
" " + tp_inst._defaults.separator +
tp_inst._defaults.timeSuffix +
(tz ? tp_inst._defaults.timezoneList.join('') :
'') +
(tp_inst._defaults.amNames.join('')) +
(tp_inst._defaults.pmNames.join('')) +
dateChars,
chr = String.fromCharCode(event.charCode === undefined ? event.keyCode
: event.charCode);
return event.ctrlKey || (chr < ' ' || !dateChars ||
datetimeChars.indexOf(chr) > -1);
}
}
return $.datepicker._base_doKeyPress(event);
};
/*
* Fourth bad hack :/ override _updateAlternate function used in inline
mode to init altField
* Update any alternate field to synchronise with the main field.
*/
$.datepicker._base_updateAlternate = $.datepicker._updateAlternate;
$.datepicker._updateAlternate = function (inst) {
var tp_inst = this._get(inst, 'timepicker');
if (tp_inst) {
var altField = tp_inst._defaults.altField;
if (altField) { // update alternate field too
var altFormat = tp_inst._defaults.altFormat ||
tp_inst._defaults.dateFormat,
date = this._getDate(inst),
formatCfg = $.datepicker._getFormatConfig(inst),
altFormattedDateTime = '',
altSeparator = tp_inst._defaults.altSeparator ?
tp_inst._defaults.altSeparator : tp_inst._defaults.separator,
altTimeSuffix = tp_inst._defaults.altTimeSuffix ?
tp_inst._defaults.altTimeSuffix : tp_inst._defaults.timeSuffix,
altTimeFormat = tp_inst._defaults.altTimeFormat !== null ?
tp_inst._defaults.altTimeFormat : tp_inst._defaults.timeFormat;
altFormattedDateTime += $.datepicker.formatTime(altTimeFormat, tp_inst,
tp_inst._defaults) + altTimeSuffix;
if (!tp_inst._defaults.timeOnly &&
!tp_inst._defaults.altFieldTimeOnly && date !== null) {
if (tp_inst._defaults.altFormat) {
altFormattedDateTime =
$.datepicker.formatDate(tp_inst._defaults.altFormat, date, formatCfg) +
altSeparator + altFormattedDateTime;
}
else {
altFormattedDateTime = tp_inst.formattedDate + altSeparator +
altFormattedDateTime;
}
}
$(altField).val(altFormattedDateTime);
}
}
else {
$.datepicker._base_updateAlternate(inst);
}
};
/*
* Override key up event to sync manual input changes.
*/
$.datepicker._base_doKeyUp = $.datepicker._doKeyUp;
$.datepicker._doKeyUp = function (event) {
var inst = $.datepicker._getInst(event.target),
tp_inst = $.datepicker._get(inst, 'timepicker');
if (tp_inst) {
if (tp_inst._defaults.timeOnly && (inst.input.val() !==
inst.lastVal)) {
try {
$.datepicker._updateDatepicker(inst);
} catch (err) {
$.timepicker.log(err);
}
}
}
return $.datepicker._base_doKeyUp(event);
};
/*
* override "Today" button to also grab the time.
*/
$.datepicker._base_gotoToday = $.datepicker._gotoToday;
$.datepicker._gotoToday = function (id) {
var inst = this._getInst($(id)[0]),
$dp = inst.dpDiv;
this._base_gotoToday(id);
var tp_inst = this._get(inst, 'timepicker');
selectLocalTimezone(tp_inst);
var now = new Date();
this._setTime(inst, now);
$('.ui-datepicker-today', $dp).click();
};
/*
* Disable & enable the Time in the datetimepicker
*/
$.datepicker._disableTimepickerDatepicker = function (target) {
var inst = this._getInst(target);
if (!inst) {
return;
}
var tp_inst = this._get(inst, 'timepicker');
$(target).datepicker('getDate'); // Init
selected[Year|Month|Day]
if (tp_inst) {
inst.settings.showTimepicker = false;
tp_inst._defaults.showTimepicker = false;
tp_inst._updateDateTime(inst);
}
};
$.datepicker._enableTimepickerDatepicker = function (target) {
var inst = this._getInst(target);
if (!inst) {
return;
}
var tp_inst = this._get(inst, 'timepicker');
$(target).datepicker('getDate'); // Init
selected[Year|Month|Day]
if (tp_inst) {
inst.settings.showTimepicker = true;
tp_inst._defaults.showTimepicker = true;
tp_inst._addTimePicker(inst); // Could be disabled on page load
tp_inst._updateDateTime(inst);
}
};
/*
* Create our own set time function
*/
$.datepicker._setTime = function (inst, date) {
var tp_inst = this._get(inst, 'timepicker');
if (tp_inst) {
var defaults = tp_inst._defaults;
// calling _setTime with no date sets time to defaults
tp_inst.hour = date ? date.getHours() : defaults.hour;
tp_inst.minute = date ? date.getMinutes() : defaults.minute;
tp_inst.second = date ? date.getSeconds() : defaults.second;
tp_inst.millisec = date ? date.getMilliseconds() : defaults.millisec;
tp_inst.microsec = date ? date.getMicroseconds() : defaults.microsec;
//check if within min/max times..
tp_inst._limitMinMaxDateTime(inst, true);
tp_inst._onTimeChange();
tp_inst._updateDateTime(inst);
}
};
/*
* Create new public method to set only time, callable as
$().datepicker('setTime', date)
*/
$.datepicker._setTimeDatepicker = function (target, date, withDate) {
var inst = this._getInst(target);
if (!inst) {
return;
}
var tp_inst = this._get(inst, 'timepicker');
if (tp_inst) {
this._setDateFromField(inst);
var tp_date;
if (date) {
if (typeof date === "string") {
tp_inst._parseTime(date, withDate);
tp_date = new Date();
tp_date.setHours(tp_inst.hour, tp_inst.minute, tp_inst.second,
tp_inst.millisec);
tp_date.setMicroseconds(tp_inst.microsec);
} else {
tp_date = new Date(date.getTime());
tp_date.setMicroseconds(date.getMicroseconds());
}
if (tp_date.toString() === 'Invalid Date') {
tp_date = undefined;
}
this._setTime(inst, tp_date);
}
}
};
/*
* override setDate() to allow setting time too within Date object
*/
$.datepicker._base_setDateDatepicker = $.datepicker._setDateDatepicker;
$.datepicker._setDateDatepicker = function (target, date) {
var inst = this._getInst(target);
if (!inst) {
return;
}
if (typeof(date) === 'string') {
date = new Date(date);
if (!date.getTime()) {
$.timepicker.log("Error creating Date object from string.");
}
}
var tp_inst = this._get(inst, 'timepicker');
var tp_date;
if (date instanceof Date) {
tp_date = new Date(date.getTime());
tp_date.setMicroseconds(date.getMicroseconds());
} else {
tp_date = date;
}
// This is important if you are using the timezone option,
javascript's Date
// object will only return the timezone offset for the current locale, so
we
// adjust it accordingly. If not using timezone option this won't
matter..
// If a timezone is different in tp, keep the timezone as is
if (tp_inst) {
// look out for DST if tz wasn't specified
if (!tp_inst.support.timezone && tp_inst._defaults.timezone ===
null) {
tp_inst.timezone = tp_date.getTimezoneOffset() * -1;
}
date = $.timepicker.timezoneAdjust(date, tp_inst.timezone);
tp_date = $.timepicker.timezoneAdjust(tp_date, tp_inst.timezone);
}
this._updateDatepicker(inst);
this._base_setDateDatepicker.apply(this, arguments);
this._setTimeDatepicker(target, tp_date, true);
};
/*
* override getDate() to allow getting time too within Date object
*/
$.datepicker._base_getDateDatepicker = $.datepicker._getDateDatepicker;
$.datepicker._getDateDatepicker = function (target, noDefault) {
var inst = this._getInst(target);
if (!inst) {
return;
}
var tp_inst = this._get(inst, 'timepicker');
if (tp_inst) {
// if it hasn't yet been defined, grab from field
if (inst.lastVal === undefined) {
this._setDateFromField(inst, noDefault);
}
var date = this._getDate(inst);
if (date && tp_inst._parseTime($(target).val(),
tp_inst.timeOnly)) {
date.setHours(tp_inst.hour, tp_inst.minute, tp_inst.second,
tp_inst.millisec);
date.setMicroseconds(tp_inst.microsec);
// This is important if you are using the timezone option,
javascript's Date
// object will only return the timezone offset for the current locale,
so we
// adjust it accordingly. If not using timezone option this won't
matter..
if (tp_inst.timezone != null) {
// look out for DST if tz wasn't specified
if (!tp_inst.support.timezone && tp_inst._defaults.timezone
=== null) {
tp_inst.timezone = date.getTimezoneOffset() * -1;
}
date = $.timepicker.timezoneAdjust(date, tp_inst.timezone);
}
}
return date;
}
return this._base_getDateDatepicker(target, noDefault);
};
/*
* override parseDate() because UI 1.8.14 throws an error about "Extra
characters"
* An option in datapicker to ignore extra format characters would be
nicer.
*/
$.datepicker._base_parseDate = $.datepicker.parseDate;
$.datepicker.parseDate = function (format, value, settings) {
var date;
try {
date = this._base_parseDate(format, value, settings);
} catch (err) {
// Hack! The error message ends with a colon, a space, and
// the "extra" characters. We rely on that instead of
// attempting to perfectly reproduce the parsing algorithm.
if (err.indexOf(":") >= 0) {
date = this._base_parseDate(format, value.substring(0, value.length -
(err.length - err.indexOf(':') - 2)), settings);
$.timepicker.log("Error parsing the date string: " + err +
"\ndate string = " + value + "\ndate format = " +
format);
} else {
throw err;
}
}
return date;
};
/*
* override formatDate to set date with time to the input
*/
$.datepicker._base_formatDate = $.datepicker._formatDate;
$.datepicker._formatDate = function (inst, day, month, year) {
var tp_inst = this._get(inst, 'timepicker');
if (tp_inst) {
tp_inst._updateDateTime(inst);
return tp_inst.$input.val();
}
return this._base_formatDate(inst);
};
/*
* override options setter to add time to maxDate(Time) and minDate(Time).
MaxDate
*/
$.datepicker._base_optionDatepicker = $.datepicker._optionDatepicker;
$.datepicker._optionDatepicker = function (target, name, value) {
var inst = this._getInst(target),
name_clone;
if (!inst) {
return null;
}
var tp_inst = this._get(inst, 'timepicker');
if (tp_inst) {
var min = null,
max = null,
onselect = null,
overrides = tp_inst._defaults.evnts,
fns = {},
prop;
if (typeof name === 'string') { // if min/max was set with the
string
if (name === 'minDate' || name === 'minDateTime')
{
min = value;
} else if (name === 'maxDate' || name ===
'maxDateTime') {
max = value;
} else if (name === 'onSelect') {
onselect = value;
} else if (overrides.hasOwnProperty(name)) {
if (typeof (value) === 'undefined') {
return overrides[name];
}
fns[name] = value;
name_clone = {}; //empty results in exiting function after overrides
updated
}
} else if (typeof name === 'object') { //if min/max was set
with the JSON
if (name.minDate) {
min = name.minDate;
} else if (name.minDateTime) {
min = name.minDateTime;
} else if (name.maxDate) {
max = name.maxDate;
} else if (name.maxDateTime) {
max = name.maxDateTime;
}
for (prop in overrides) {
if (overrides.hasOwnProperty(prop) && name[prop]) {
fns[prop] = name[prop];
}
}
}
for (prop in fns) {
if (fns.hasOwnProperty(prop)) {
overrides[prop] = fns[prop];
if (!name_clone) { name_clone = $.extend({}, name); }
delete name_clone[prop];
}
}
if (name_clone && isEmptyObject(name_clone)) { return; }
if (min) { //if min was set
if (min === 0) {
min = new Date();
} else {
min = new Date(min);
}
tp_inst._defaults.minDate = min;
tp_inst._defaults.minDateTime = min;
} else if (max) { //if max was set
if (max === 0) {
max = new Date();
} else {
max = new Date(max);
}
tp_inst._defaults.maxDate = max;
tp_inst._defaults.maxDateTime = max;
} else if (onselect) {
tp_inst._defaults.onSelect = onselect;
}
}
if (value === undefined) {
return this._base_optionDatepicker.call($.datepicker, target, name);
}
return this._base_optionDatepicker.call($.datepicker, target, name_clone
|| name, value);
};
/*
* jQuery isEmptyObject does not check hasOwnProperty - if someone has
added to the object prototype,
* it will return false for all objects
*/
var isEmptyObject = function (obj) {
var prop;
for (prop in obj) {
if (obj.hasOwnProperty(prop)) {
return false;
}
}
return true;
};
/*
* jQuery extend now ignores nulls!
*/
var extendRemove = function (target, props) {
$.extend(target, props);
for (var name in props) {
if (props[name] === null || props[name] === undefined) {
target[name] = props[name];
}
}
return target;
};
/*
* Determine by the time format which units are supported
* Returns an object of booleans for each unit
*/
var detectSupport = function (timeFormat) {
var tf = timeFormat.replace(/'.*?'/g,
'').toLowerCase(), // removes literals
isIn = function (f, t) { // does the format contain the token?
return f.indexOf(t) !== -1 ? true : false;
};
return {
hour: isIn(tf, 'h'),
minute: isIn(tf, 'm'),
second: isIn(tf, 's'),
millisec: isIn(tf, 'l'),
microsec: isIn(tf, 'c'),
timezone: isIn(tf, 'z'),
ampm: isIn(tf, 't') && isIn(timeFormat,
'h'),
iso8601: isIn(timeFormat, 'Z')
};
};
/*
* Converts 24 hour format into 12 hour
* Returns 12 hour without leading 0
*/
var convert24to12 = function (hour) {
hour %= 12;
if (hour === 0) {
hour = 12;
}
return String(hour);
};
var computeEffectiveSetting = function (settings, property) {
return settings && settings[property] ? settings[property] :
$.timepicker._defaults[property];
};
/*
* Splits datetime string into date and time substrings.
* Throws exception when date can't be parsed
* Returns {dateString: dateString, timeString: timeString}
*/
var splitDateTime = function (dateTimeString, timeSettings) {
// The idea is to get the number separator occurrences in datetime and
the time format requested (since time has
// fewer unknowns, mostly numbers and am/pm). We will use the time
pattern to split.
var separator = computeEffectiveSetting(timeSettings,
'separator'),
format = computeEffectiveSetting(timeSettings, 'timeFormat'),
timeParts = format.split(separator), // how many occurrences of
separator may be in our format?
timePartsLen = timeParts.length,
allParts = dateTimeString.split(separator),
allPartsLen = allParts.length;
if (allPartsLen > 1) {
return {
dateString: allParts.splice(0, allPartsLen -
timePartsLen).join(separator),
timeString: allParts.splice(0, timePartsLen).join(separator)
};
}
return {
dateString: dateTimeString,
timeString: ''
};
};
/*
* Internal function to parse datetime interval
* Returns: {date: Date, timeObj: Object}, where
* date - parsed date without time (type Date)
* timeObj = {hour: , minute: , second: , millisec: , microsec: } -
parsed time. Optional
*/
var parseDateTimeInternal = function (dateFormat, timeFormat,
dateTimeString, dateSettings, timeSettings) {
var date,
parts,
parsedTime;
parts = splitDateTime(dateTimeString, timeSettings);
date = $.datepicker._base_parseDate(dateFormat, parts.dateString,
dateSettings);
if (parts.timeString === '') {
return {
date: date
};
}
parsedTime = $.datepicker.parseTime(timeFormat, parts.timeString,
timeSettings);
if (!parsedTime) {
throw 'Wrong time format';
}
return {
date: date,
timeObj: parsedTime
};
};
/*
* Internal function to set timezone_select to the local timezone
*/
var selectLocalTimezone = function (tp_inst, date) {
if (tp_inst && tp_inst.timezone_select) {
var now = date || new Date();
tp_inst.timezone_select.val(-now.getTimezoneOffset());
}
};
/*
* Create a Singleton Instance
*/
$.timepicker = new Timepicker();
/**
* Get the timezone offset as string from a date object (eg
'+0530' for UTC+5.5)
* @param {number} tzMinutes if not a number, less than -720 (-1200), or
greater than 840 (+1400) this value is returned
* @param {boolean} iso8601 if true formats in accordance to iso8601
"+12:45"
* @return {string}
*/
$.timepicker.timezoneOffsetString = function (tzMinutes, iso8601) {
if (isNaN(tzMinutes) || tzMinutes > 840 || tzMinutes < -720) {
return tzMinutes;
}
var off = tzMinutes,
minutes = off % 60,
hours = (off - minutes) / 60,
iso = iso8601 ? ':' : '',
tz = (off >= 0 ? '+' : '-') + ('0' +
Math.abs(hours)).slice(-2) + iso + ('0' +
Math.abs(minutes)).slice(-2);
if (tz === '+00:00') {
return 'Z';
}
return tz;
};
/**
* Get the number in minutes that represents a timezone string
* @param {string} tzString formatted like "+0500",
"-1245", "Z"
* @return {number} the offset minutes or the original string if it
doesn't match expectations
*/
$.timepicker.timezoneOffsetNumber = function (tzString) {
var normalized = tzString.toString().replace(':',
''); // excuse any iso8601, end up with "+1245"
if (normalized.toUpperCase() === 'Z') { // if iso8601 with Z,
its 0 minute offset
return 0;
}
if (!/^(\-|\+)\d{4}$/.test(normalized)) { // possibly a user defined tz,
so just give it back
return tzString;
}
return ((normalized.substr(0, 1) === '-' ? -1 : 1) * // plus or
minus
((parseInt(normalized.substr(1, 2), 10) * 60) + // hours (converted to
minutes)
parseInt(normalized.substr(3, 2), 10))); // minutes
};
/**
* No way to set timezone in js Date, so we must adjust the minutes to
compensate. (think setDate, getDate)
* @param {Date} date
* @param {string} toTimezone formatted like "+0500",
"-1245"
* @return {Date}
*/
$.timepicker.timezoneAdjust = function (date, toTimezone) {
var toTz = $.timepicker.timezoneOffsetNumber(toTimezone);
if (!isNaN(toTz)) {
date.setMinutes(date.getMinutes() + -date.getTimezoneOffset() - toTz);
}
return date;
};
/**
* Calls `timepicker()` on the `startTime` and `endTime` elements, and
configures them to
* enforce date range limits.
* n.b. The input value must be correctly formatted (reformatting is not
supported)
* @param {Element} startTime
* @param {Element} endTime
* @param {Object} options Options for the timepicker() call
* @return {jQuery}
*/
$.timepicker.timeRange = function (startTime, endTime, options) {
return $.timepicker.handleRange('timepicker', startTime,
endTime, options);
};
/**
* Calls `datetimepicker` on the `startTime` and `endTime` elements, and
configures them to
* enforce date range limits.
* @param {Element} startTime
* @param {Element} endTime
* @param {Object} options Options for the `timepicker()` call. Also
supports `reformat`,
* a boolean value that can be used to reformat the input values to the
`dateFormat`.
* @param {string} method Can be used to specify the type of picker to be
added
* @return {jQuery}
*/
$.timepicker.datetimeRange = function (startTime, endTime, options) {
$.timepicker.handleRange('datetimepicker', startTime, endTime,
options);
};
/**
* Calls `datepicker` on the `startTime` and `endTime` elements, and
configures them to
* enforce date range limits.
* @param {Element} startTime
* @param {Element} endTime
* @param {Object} options Options for the `timepicker()` call. Also
supports `reformat`,
* a boolean value that can be used to reformat the input values to the
`dateFormat`.
* @return {jQuery}
*/
$.timepicker.dateRange = function (startTime, endTime, options) {
$.timepicker.handleRange('datepicker', startTime, endTime,
options);
};
/**
* Calls `method` on the `startTime` and `endTime` elements, and
configures them to
* enforce date range limits.
* @param {string} method Can be used to specify the type of picker to be
added
* @param {Element} startTime
* @param {Element} endTime
* @param {Object} options Options for the `timepicker()` call. Also
supports `reformat`,
* a boolean value that can be used to reformat the input values to the
`dateFormat`.
* @return {jQuery}
*/
$.timepicker.handleRange = function (method, startTime, endTime, options)
{
options = $.extend({}, {
minInterval: 0, // min allowed interval in milliseconds
maxInterval: 0, // max allowed interval in milliseconds
start: {}, // options for start picker
end: {} // options for end picker
}, options);
function checkDates(changed, other) {
var startdt = startTime[method]('getDate'),
enddt = endTime[method]('getDate'),
changeddt = changed[method]('getDate');
if (startdt !== null) {
var minDate = new Date(startdt.getTime()),
maxDate = new Date(startdt.getTime());
minDate.setMilliseconds(minDate.getMilliseconds() +
options.minInterval);
maxDate.setMilliseconds(maxDate.getMilliseconds() +
options.maxInterval);
if (options.minInterval > 0 && minDate > enddt) { //
minInterval check
endTime[method]('setDate', minDate);
}
else if (options.maxInterval > 0 && maxDate < enddt) { //
max interval check
endTime[method]('setDate', maxDate);
}
else if (startdt > enddt) {
other[method]('setDate', changeddt);
}
}
}
function selected(changed, other, option) {
if (!changed.val()) {
return;
}
var date = changed[method].call(changed, 'getDate');
if (date !== null && options.minInterval > 0) {
if (option === 'minDate') {
date.setMilliseconds(date.getMilliseconds() + options.minInterval);
}
if (option === 'maxDate') {
date.setMilliseconds(date.getMilliseconds() - options.minInterval);
}
}
if (date.getTime) {
other[method].call(other, 'option', option, date);
}
}
$.fn[method].call(startTime, $.extend({
onClose: function (dateText, inst) {
checkDates($(this), endTime);
},
onSelect: function (selectedDateTime) {
selected($(this), endTime, 'minDate');
}
}, options, options.start));
$.fn[method].call(endTime, $.extend({
onClose: function (dateText, inst) {
checkDates($(this), startTime);
},
onSelect: function (selectedDateTime) {
selected($(this), startTime, 'maxDate');
}
}, options, options.end));
checkDates(startTime, endTime);
selected(startTime, endTime, 'minDate');
selected(endTime, startTime, 'maxDate');
return $([startTime.get(0), endTime.get(0)]);
};
/**
* Log error or data to the console during error or debugging
* @param {Object} err pass any type object to log to the console during
error or debugging
* @return {void}
*/
$.timepicker.log = function (err) {
if (window.console) {
window.console.log(err);
}
};
/*
* Add util object to allow access to private methods for testability.
*/
$.timepicker._util = {
_extendRemove: extendRemove,
_isEmptyObject: isEmptyObject,
_convert24to12: convert24to12,
_detectSupport: detectSupport,
_selectLocalTimezone: selectLocalTimezone,
_computeEffectiveSetting: computeEffectiveSetting,
_splitDateTime: splitDateTime,
_parseDateTimeInternal: parseDateTimeInternal
};
/*
* Microsecond support
*/
if (!Date.prototype.getMicroseconds) {
Date.prototype.microseconds = 0;
Date.prototype.getMicroseconds = function () { return this.microseconds;
};
Date.prototype.setMicroseconds = function (m) {
this.setMilliseconds(this.getMilliseconds() + Math.floor(m / 1000));
this.microseconds = m % 1000;
return this;
};
}
/*
* Keep up with the version
*/
$.timepicker.version = "1.4";
})(jQuery);
admin/ui/widget.js000064400000036346151167411240010110 0ustar00/*!
* jQuery UI Widget 1.10.3
* http://jqueryui.com
*
* Copyright 2013 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/jQuery.widget/
*/
(function( $, undefined ) {
var uuid = 0,
slice = Array.prototype.slice,
_cleanData = $.cleanData;
$.cleanData = function( elems ) {
for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
try {
$( elem ).triggerHandler( "remove" );
// http://bugs.jquery.com/ticket/8235
} catch( e ) {}
}
_cleanData( elems );
};
$.widget = function( name, base, prototype ) {
var fullName, existingConstructor, constructor, basePrototype,
// proxiedPrototype allows the provided prototype to remain unmodified
// so that it can be used as a mixin for multiple widgets (#8876)
proxiedPrototype = {},
namespace = name.split( "." )[ 0 ];
name = name.split( "." )[ 1 ];
fullName = namespace + "-" + name;
if ( !prototype ) {
prototype = base;
base = $.Widget;
}
// create selector for plugin
$.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) {
return !!$.data( elem, fullName );
};
$[ namespace ] = $[ namespace ] || {};
existingConstructor = $[ namespace ][ name ];
constructor = $[ namespace ][ name ] = function( options, element ) {
// allow instantiation without "new" keyword
if ( !this._createWidget ) {
return new constructor( options, element );
}
// allow instantiation without initializing for simple inheritance
// must use "new" keyword (the code above always passes args)
if ( arguments.length ) {
this._createWidget( options, element );
}
};
// extend with the existing constructor to carry over any static
properties
$.extend( constructor, existingConstructor, {
version: prototype.version,
// copy the object used to create the prototype in case we need to
// redefine the widget later
_proto: $.extend( {}, prototype ),
// track widgets that inherit from this widget in case this widget is
// redefined after a widget inherits from it
_childConstructors: []
});
basePrototype = new base();
// we need to make the options hash a property directly on the new
instance
// otherwise we'll modify the options hash on the prototype that
we're
// inheriting from
basePrototype.options = $.widget.extend( {}, basePrototype.options );
$.each( prototype, function( prop, value ) {
if ( !$.isFunction( value ) ) {
proxiedPrototype[ prop ] = value;
return;
}
proxiedPrototype[ prop ] = (function() {
var _super = function() {
return base.prototype[ prop ].apply( this, arguments );
},
_superApply = function( args ) {
return base.prototype[ prop ].apply( this, args );
};
return function() {
var __super = this._super,
__superApply = this._superApply,
returnValue;
this._super = _super;
this._superApply = _superApply;
returnValue = value.apply( this, arguments );
this._super = __super;
this._superApply = __superApply;
return returnValue;
};
})();
});
constructor.prototype = $.widget.extend( basePrototype, {
// TODO: remove support for widgetEventPrefix
// always use the name + a colon as the prefix, e.g., draggable:start
// don't prefix for widgets that aren't DOM-based
widgetEventPrefix: existingConstructor ? basePrototype.widgetEventPrefix
: name
}, proxiedPrototype, {
constructor: constructor,
namespace: namespace,
widgetName: name,
widgetFullName: fullName
});
// If this widget is being redefined then we need to find all widgets
that
// are inheriting from it and redefine all of them so that they inherit
from
// the new version of this widget. We're essentially trying to
replace one
// level in the prototype chain.
if ( existingConstructor ) {
$.each( existingConstructor._childConstructors, function( i, child ) {
var childPrototype = child.prototype;
// redefine the child widget using the same prototype that was
// originally used, but inherit from the new version of the base
$.widget( childPrototype.namespace + "." +
childPrototype.widgetName, constructor, child._proto );
});
// remove the list of existing child constructors from the old
constructor
// so the old child constructors can be garbage collected
delete existingConstructor._childConstructors;
} else {
base._childConstructors.push( constructor );
}
$.widget.bridge( name, constructor );
};
$.widget.extend = function( target ) {
var input = slice.call( arguments, 1 ),
inputIndex = 0,
inputLength = input.length,
key,
value;
for ( ; inputIndex < inputLength; inputIndex++ ) {
for ( key in input[ inputIndex ] ) {
value = input[ inputIndex ][ key ];
if ( input[ inputIndex ].hasOwnProperty( key ) && value !==
undefined ) {
// Clone objects
if ( $.isPlainObject( value ) ) {
target[ key ] = $.isPlainObject( target[ key ] ) ?
$.widget.extend( {}, target[ key ], value ) :
// Don't extend strings, arrays, etc. with objects
$.widget.extend( {}, value );
// Copy everything else by reference
} else {
target[ key ] = value;
}
}
}
}
return target;
};
$.widget.bridge = function( name, object ) {
var fullName = object.prototype.widgetFullName || name;
$.fn[ name ] = function( options ) {
var isMethodCall = typeof options === "string",
args = slice.call( arguments, 1 ),
returnValue = this;
// allow multiple hashes to be passed on init
options = !isMethodCall && args.length ?
$.widget.extend.apply( null, [ options ].concat(args) ) :
options;
if ( isMethodCall ) {
this.each(function() {
var methodValue,
instance = $.data( this, fullName );
if ( !instance ) {
return $.error( "cannot call methods on " + name + "
prior to initialization; " +
"attempted to call method '" + options +
"'" );
}
if ( !$.isFunction( instance[options] ) || options.charAt( 0 ) ===
"_" ) {
return $.error( "no such method '" + options +
"' for " + name + " widget instance" );
}
methodValue = instance[ options ].apply( instance, args );
if ( methodValue !== instance && methodValue !== undefined ) {
returnValue = methodValue && methodValue.jquery ?
returnValue.pushStack( methodValue.get() ) :
methodValue;
return false;
}
});
} else {
this.each(function() {
var instance = $.data( this, fullName );
if ( instance ) {
instance.option( options || {} )._init();
} else {
$.data( this, fullName, new object( options, this ) );
}
});
}
return returnValue;
};
};
$.Widget = function( /* options, element */ ) {};
$.Widget._childConstructors = [];
$.Widget.prototype = {
widgetName: "widget",
widgetEventPrefix: "",
defaultElement: "<div>",
options: {
disabled: false,
// callbacks
create: null
},
_createWidget: function( options, element ) {
element = $( element || this.defaultElement || this )[ 0 ];
this.element = $( element );
this.uuid = uuid++;
this.eventNamespace = "." + this.widgetName + this.uuid;
this.options = $.widget.extend( {},
this.options,
this._getCreateOptions(),
options );
this.bindings = $();
this.hoverable = $();
this.focusable = $();
if ( element !== this ) {
$.data( element, this.widgetFullName, this );
this._on( true, this.element, {
remove: function( event ) {
if ( event.target === element ) {
this.destroy();
}
}
});
this.document = $( element.style ?
// element within the document
element.ownerDocument :
// element is window or document
element.document || element );
this.window = $( this.document[0].defaultView ||
this.document[0].parentWindow );
}
this._create();
this._trigger( "create", null, this._getCreateEventData() );
this._init();
},
_getCreateOptions: $.noop,
_getCreateEventData: $.noop,
_create: $.noop,
_init: $.noop,
destroy: function() {
this._destroy();
// we can probably remove the unbind calls in 2.0
// all event bindings should go through this._on()
this.element
.unbind( this.eventNamespace )
// 1.9 BC for #7810
// TODO remove dual storage
.removeData( this.widgetName )
.removeData( this.widgetFullName )
// support: jquery <1.6.3
// http://bugs.jquery.com/ticket/9413
.removeData( $.camelCase( this.widgetFullName ) );
this.widget()
.unbind( this.eventNamespace )
.removeAttr( "aria-disabled" )
.removeClass(
this.widgetFullName + "-disabled " +
"ui-state-disabled" );
// clean up events and states
this.bindings.unbind( this.eventNamespace );
this.hoverable.removeClass( "ui-state-hover" );
this.focusable.removeClass( "ui-state-focus" );
},
_destroy: $.noop,
widget: function() {
return this.element;
},
option: function( key, value ) {
var options = key,
parts,
curOption,
i;
if ( arguments.length === 0 ) {
// don't return a reference to the internal hash
return $.widget.extend( {}, this.options );
}
if ( typeof key === "string" ) {
// handle nested keys, e.g., "foo.bar" => { foo: { bar: ___
} }
options = {};
parts = key.split( "." );
key = parts.shift();
if ( parts.length ) {
curOption = options[ key ] = $.widget.extend( {}, this.options[ key ]
);
for ( i = 0; i < parts.length - 1; i++ ) {
curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {};
curOption = curOption[ parts[ i ] ];
}
key = parts.pop();
if ( value === undefined ) {
return curOption[ key ] === undefined ? null : curOption[ key ];
}
curOption[ key ] = value;
} else {
if ( value === undefined ) {
return this.options[ key ] === undefined ? null : this.options[ key
];
}
options[ key ] = value;
}
}
this._setOptions( options );
return this;
},
_setOptions: function( options ) {
var key;
for ( key in options ) {
this._setOption( key, options[ key ] );
}
return this;
},
_setOption: function( key, value ) {
this.options[ key ] = value;
if ( key === "disabled" ) {
this.widget()
.toggleClass( this.widgetFullName + "-disabled
ui-state-disabled", !!value )
.attr( "aria-disabled", value );
this.hoverable.removeClass( "ui-state-hover" );
this.focusable.removeClass( "ui-state-focus" );
}
return this;
},
enable: function() {
return this._setOption( "disabled", false );
},
disable: function() {
return this._setOption( "disabled", true );
},
_on: function( suppressDisabledCheck, element, handlers ) {
var delegateElement,
instance = this;
// no suppressDisabledCheck flag, shuffle arguments
if ( typeof suppressDisabledCheck !== "boolean" ) {
handlers = element;
element = suppressDisabledCheck;
suppressDisabledCheck = false;
}
// no element argument, shuffle and use this.element
if ( !handlers ) {
handlers = element;
element = this.element;
delegateElement = this.widget();
} else {
// accept selectors, DOM elements
element = delegateElement = $( element );
this.bindings = this.bindings.add( element );
}
$.each( handlers, function( event, handler ) {
function handlerProxy() {
// allow widgets to customize the disabled handling
// - disabled as an array instead of boolean
// - disabled class as method for disabling individual parts
if ( !suppressDisabledCheck &&
( instance.options.disabled === true ||
$( this ).hasClass( "ui-state-disabled" ) ) ) {
return;
}
return ( typeof handler === "string" ? instance[ handler ] :
handler )
.apply( instance, arguments );
}
// copy the guid so direct unbinding works
if ( typeof handler !== "string" ) {
handlerProxy.guid = handler.guid =
handler.guid || handlerProxy.guid || $.guid++;
}
var match = event.match( /^(\w+)\s*(.*)$/ ),
eventName = match[1] + instance.eventNamespace,
selector = match[2];
if ( selector ) {
delegateElement.delegate( selector, eventName, handlerProxy );
} else {
element.bind( eventName, handlerProxy );
}
});
},
_off: function( element, eventName ) {
eventName = (eventName || "").split( " " ).join(
this.eventNamespace + " " ) + this.eventNamespace;
element.unbind( eventName ).undelegate( eventName );
},
_delay: function( handler, delay ) {
function handlerProxy() {
return ( typeof handler === "string" ? instance[ handler ] :
handler )
.apply( instance, arguments );
}
var instance = this;
return setTimeout( handlerProxy, delay || 0 );
},
_hoverable: function( element ) {
this.hoverable = this.hoverable.add( element );
this._on( element, {
mouseenter: function( event ) {
$( event.currentTarget ).addClass( "ui-state-hover" );
},
mouseleave: function( event ) {
$( event.currentTarget ).removeClass( "ui-state-hover" );
}
});
},
_focusable: function( element ) {
this.focusable = this.focusable.add( element );
this._on( element, {
focusin: function( event ) {
$( event.currentTarget ).addClass( "ui-state-focus" );
},
focusout: function( event ) {
$( event.currentTarget ).removeClass( "ui-state-focus" );
}
});
},
_trigger: function( type, event, data ) {
var prop, orig,
callback = this.options[ type ];
data = data || {};
event = $.Event( event );
event.type = ( type === this.widgetEventPrefix ?
type :
this.widgetEventPrefix + type ).toLowerCase();
// the original event may come from any element
// so we need to reset the target on the new event
event.target = this.element[ 0 ];
// copy original event properties over to the new event
orig = event.originalEvent;
if ( orig ) {
for ( prop in orig ) {
if ( !( prop in event ) ) {
event[ prop ] = orig[ prop ];
}
}
}
this.element.trigger( event, data );
return !( $.isFunction( callback ) &&
callback.apply( this.element[0], [ event ].concat( data ) ) === false
||
event.isDefaultPrevented() );
}
};
$.each( { show: "fadeIn", hide: "fadeOut" }, function(
method, defaultEffect ) {
$.Widget.prototype[ "_" + method ] = function( element, options,
callback ) {
if ( typeof options === "string" ) {
options = { effect: options };
}
var hasOptions,
effectName = !options ?
method :
options === true || typeof options === "number" ?
defaultEffect :
options.effect || defaultEffect;
options = options || {};
if ( typeof options === "number" ) {
options = { duration: options };
}
hasOptions = !$.isEmptyObject( options );
options.complete = callback;
if ( options.delay ) {
element.delay( options.delay );
}
if ( hasOptions && $.effects && $.effects.effect[
effectName ] ) {
element[ method ]( options );
} else if ( effectName !== method && element[ effectName ] ) {
element[ effectName ]( options.duration, options.easing, callback );
} else {
element.queue(function( next ) {
$( this )[ method ]();
if ( callback ) {
callback.call( element[ 0 ] );
}
next();
});
}
};
});
})( jQuery );
jquery.magnific-popup.min.js000064400000051204151167411240012124
0ustar00/*! Magnific Popup - v1.0.0 - 2014-12-12
* http://dimsemenov.com/plugins/magnific-popup/
* Copyright (c) 2014 Dmitry Semenov; */
(function(e){"function"==typeof
define&&define.amd?define(["jquery"],e):"object"==typeof
exports?e(require("jquery")):e(window.jQuery||window.Zepto)})(function(e){var
t,n,i,o,r,a,s,l="Close",c="BeforeClose",d="AfterClose",u="BeforeAppend",p="MarkupParse",f="Open",m="Change",g="mfp",h="."+g,v="mfp-ready",C="mfp-removing",y="mfp-prevent-close",w=function(){},b=!!window.jQuery,I=e(window),x=function(e,n){t.ev.on(g+e+h,n)},k=function(t,n,i,o){var
r=document.createElement("div");return
r.className="mfp-"+t,i&&(r.innerHTML=i),o?n&&n.appendChild(r):(r=e(r),n&&r.appendTo(n)),r},T=function(n,i){t.ev.triggerHandler(g+n,i),t.st.callbacks&&(n=n.charAt(0).toLowerCase()+n.slice(1),t.st.callbacks[n]&&t.st.callbacks[n].apply(t,e.isArray(i)?i:[i]))},E=function(n){return
n===s&&t.currTemplate.closeBtn||(t.currTemplate.closeBtn=e(t.st.closeMarkup.replace("%title%",t.st.tClose)),s=n),t.currTemplate.closeBtn},_=function(){e.magnificPopup.instance||(t=new
w,t.init(),e.magnificPopup.instance=t)},S=function(){var
e=document.createElement("p").style,t=["ms","O","Moz","Webkit"];if(void
0!==e.transition)return!0;for(;t.length;)if(t.pop()+"Transition"in
e)return!0;return!1};w.prototype={constructor:w,init:function(){var
n=navigator.appVersion;t.isIE7=-1!==n.indexOf("MSIE
7."),t.isIE8=-1!==n.indexOf("MSIE
8."),t.isLowIE=t.isIE7||t.isIE8,t.isAndroid=/android/gi.test(n),t.isIOS=/iphone|ipad|ipod/gi.test(n),t.supportsTransition=S(),t.probablyMobile=t.isAndroid||t.isIOS||/(Opera
Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows
Phone)|IEMobile/i.test(navigator.userAgent),o=e(document),t.popupsCache={}},open:function(n){i||(i=e(document.body));var
r;if(n.isObj===!1){t.items=n.items.toArray(),t.index=0;var
s,l=n.items;for(r=0;l.length>r;r++)if(s=l[r],s.parsed&&(s=s.el[0]),s===n.el[0]){t.index=r;break}}else
t.items=e.isArray(n.items)?n.items:[n.items],t.index=n.index||0;if(t.isOpen)return
t.updateItemHTML(),void
0;t.types=[],a="",t.ev=n.mainEl&&n.mainEl.length?n.mainEl.eq(0):o,n.key?(t.popupsCache[n.key]||(t.popupsCache[n.key]={}),t.currTemplate=t.popupsCache[n.key]):t.currTemplate={},t.st=e.extend(!0,{},e.magnificPopup.defaults,n),t.fixedContentPos="auto"===t.st.fixedContentPos?!t.probablyMobile:t.st.fixedContentPos,t.st.modal&&(t.st.closeOnContentClick=!1,t.st.closeOnBgClick=!1,t.st.showCloseBtn=!1,t.st.enableEscapeKey=!1),t.bgOverlay||(t.bgOverlay=k("bg").on("click"+h,function(){t.close()}),t.wrap=k("wrap").attr("tabindex",-1).on("click"+h,function(e){t._checkIfClose(e.target)&&t.close()}),t.container=k("container",t.wrap)),t.contentContainer=k("content"),t.st.preloader&&(t.preloader=k("preloader",t.container,t.st.tLoading));var
c=e.magnificPopup.modules;for(r=0;c.length>r;r++){var
d=c[r];d=d.charAt(0).toUpperCase()+d.slice(1),t["init"+d].call(t)}T("BeforeOpen"),t.st.showCloseBtn&&(t.st.closeBtnInside?(x(p,function(e,t,n,i){n.close_replaceWith=E(i.type)}),a+="
mfp-close-btn-in"):t.wrap.append(E())),t.st.alignTop&&(a+="
mfp-align-top"),t.fixedContentPos?t.wrap.css({overflow:t.st.overflowY,overflowX:"hidden",overflowY:t.st.overflowY}):t.wrap.css({top:I.scrollTop(),position:"absolute"}),(t.st.fixedBgPos===!1||"auto"===t.st.fixedBgPos&&!t.fixedContentPos)&&t.bgOverlay.css({height:o.height(),position:"absolute"}),t.st.enableEscapeKey&&o.on("keyup"+h,function(e){27===e.keyCode&&t.close()}),I.on("resize"+h,function(){t.updateSize()}),t.st.closeOnContentClick||(a+="
mfp-auto-cursor"),a&&t.wrap.addClass(a);var
u=t.wH=I.height(),m={};if(t.fixedContentPos&&t._hasScrollBar(u)){var
g=t._getScrollbarSize();g&&(m.marginRight=g)}t.fixedContentPos&&(t.isIE7?e("body,
html").css("overflow","hidden"):m.overflow="hidden");var
C=t.st.mainClass;return t.isIE7&&(C+="
mfp-ie7"),C&&t._addClassToMFP(C),t.updateItemHTML(),T("BuildControls"),e("html").css(m),t.bgOverlay.add(t.wrap).prependTo(t.st.prependTo||i),t._lastFocusedEl=document.activeElement,setTimeout(function(){t.content?(t._addClassToMFP(v),t._setFocus()):t.bgOverlay.addClass(v),o.on("focusin"+h,t._onFocusIn)},16),t.isOpen=!0,t.updateSize(u),T(f),n},close:function(){t.isOpen&&(T(c),t.isOpen=!1,t.st.removalDelay&&!t.isLowIE&&t.supportsTransition?(t._addClassToMFP(C),setTimeout(function(){t._close()},t.st.removalDelay)):t._close())},_close:function(){T(l);var
n=C+" "+v+"
";if(t.bgOverlay.detach(),t.wrap.detach(),t.container.empty(),t.st.mainClass&&(n+=t.st.mainClass+"
"),t._removeClassFromMFP(n),t.fixedContentPos){var
i={marginRight:""};t.isIE7?e("body,
html").css("overflow",""):i.overflow="",e("html").css(i)}o.off("keyup"+h+"
focusin"+h),t.ev.off(h),t.wrap.attr("class","mfp-wrap").removeAttr("style"),t.bgOverlay.attr("class","mfp-bg"),t.container.attr("class","mfp-container"),!t.st.showCloseBtn||t.st.closeBtnInside&&t.currTemplate[t.currItem.type]!==!0||t.currTemplate.closeBtn&&t.currTemplate.closeBtn.detach(),t._lastFocusedEl&&e(t._lastFocusedEl).focus(),t.currItem=null,t.content=null,t.currTemplate=null,t.prevHeight=0,T(d)},updateSize:function(e){if(t.isIOS){var
n=document.documentElement.clientWidth/window.innerWidth,i=window.innerHeight*n;t.wrap.css("height",i),t.wH=i}else
t.wH=e||I.height();t.fixedContentPos||t.wrap.css("height",t.wH),T("Resize")},updateItemHTML:function(){var
n=t.items[t.index];t.contentContainer.detach(),t.content&&t.content.detach(),n.parsed||(n=t.parseEl(t.index));var
i=n.type;if(T("BeforeChange",[t.currItem?t.currItem.type:"",i]),t.currItem=n,!t.currTemplate[i]){var
o=t.st[i]?t.st[i].markup:!1;T("FirstMarkupParse",o),t.currTemplate[i]=o?e(o):!0}r&&r!==n.type&&t.container.removeClass("mfp-"+r+"-holder");var
a=t["get"+i.charAt(0).toUpperCase()+i.slice(1)](n,t.currTemplate[i]);t.appendContent(a,i),n.preloaded=!0,T(m,n),r=n.type,t.container.prepend(t.contentContainer),T("AfterChange")},appendContent:function(e,n){t.content=e,e?t.st.showCloseBtn&&t.st.closeBtnInside&&t.currTemplate[n]===!0?t.content.find(".mfp-close").length||t.content.append(E()):t.content=e:t.content="",T(u),t.container.addClass("mfp-"+n+"-holder"),t.contentContainer.append(t.content)},parseEl:function(n){var
i,o=t.items[n];if(o.tagName?o={el:e(o)}:(i=o.type,o={data:o,src:o.src}),o.el){for(var
r=t.types,a=0;r.length>a;a++)if(o.el.hasClass("mfp-"+r[a])){i=r[a];break}o.src=o.el.attr("data-mfp-src"),o.src||(o.src=o.el.attr("href"))}return
o.type=i||t.st.type||"inline",o.index=n,o.parsed=!0,t.items[n]=o,T("ElementParse",o),t.items[n]},addGroup:function(e,n){var
i=function(i){i.mfpEl=this,t._openClick(i,e,n)};n||(n={});var
o="click.magnificPopup";n.mainEl=e,n.items?(n.isObj=!0,e.off(o).on(o,i)):(n.isObj=!1,n.delegate?e.off(o).on(o,n.delegate,i):(n.items=e,e.off(o).on(o,i)))},_openClick:function(n,i,o){var
r=void
0!==o.midClick?o.midClick:e.magnificPopup.defaults.midClick;if(r||2!==n.which&&!n.ctrlKey&&!n.metaKey){var
a=void
0!==o.disableOn?o.disableOn:e.magnificPopup.defaults.disableOn;if(a)if(e.isFunction(a)){if(!a.call(t))return!0}else
if(a>I.width())return!0;n.type&&(n.preventDefault(),t.isOpen&&n.stopPropagation()),o.el=e(n.mfpEl),o.delegate&&(o.items=i.find(o.delegate)),t.open(o)}},updateStatus:function(e,i){if(t.preloader){n!==e&&t.container.removeClass("mfp-s-"+n),i||"loading"!==e||(i=t.st.tLoading);var
o={status:e,text:i};T("UpdateStatus",o),e=o.status,i=o.text,t.preloader.html(i),t.preloader.find("a").on("click",function(e){e.stopImmediatePropagation()}),t.container.addClass("mfp-s-"+e),n=e}},_checkIfClose:function(n){if(!e(n).hasClass(y)){var
i=t.st.closeOnContentClick,o=t.st.closeOnBgClick;if(i&&o)return!0;if(!t.content||e(n).hasClass("mfp-close")||t.preloader&&n===t.preloader[0])return!0;if(n===t.content[0]||e.contains(t.content[0],n)){if(i)return!0}else
if(o&&e.contains(document,n))return!0;return!1}},_addClassToMFP:function(e){t.bgOverlay.addClass(e),t.wrap.addClass(e)},_removeClassFromMFP:function(e){this.bgOverlay.removeClass(e),t.wrap.removeClass(e)},_hasScrollBar:function(e){return(t.isIE7?o.height():document.body.scrollHeight)>(e||I.height())},_setFocus:function(){(t.st.focus?t.content.find(t.st.focus).eq(0):t.wrap).focus()},_onFocusIn:function(n){return
n.target===t.wrap[0]||e.contains(t.wrap[0],n.target)?void
0:(t._setFocus(),!1)},_parseMarkup:function(t,n,i){var
o;i.data&&(n=e.extend(i.data,n)),T(p,[t,n,i]),e.each(n,function(e,n){if(void
0===n||n===!1)return!0;if(o=e.split("_"),o.length>1){var
i=t.find(h+"-"+o[0]);if(i.length>0){var
r=o[1];"replaceWith"===r?i[0]!==n[0]&&i.replaceWith(n):"img"===r?i.is("img")?i.attr("src",n):i.replaceWith('<img
src="'+n+'"
class="'+i.attr("class")+'"
/>'):i.attr(o[1],n)}}else
t.find(h+"-"+e).html(n)})},_getScrollbarSize:function(){if(void
0===t.scrollbarSize){var
e=document.createElement("div");e.style.cssText="width:
99px; height: 99px; overflow: scroll; position: absolute; top:
-9999px;",document.body.appendChild(e),t.scrollbarSize=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}return
t.scrollbarSize}},e.magnificPopup={instance:null,proto:w.prototype,modules:[],open:function(t,n){return
_(),t=t?e.extend(!0,{},t):{},t.isObj=!0,t.index=n||0,this.instance.open(t)},close:function(){return
e.magnificPopup.instance&&e.magnificPopup.instance.close()},registerModule:function(t,n){n.options&&(e.magnificPopup.defaults[t]=n.options),e.extend(this.proto,n.proto),this.modules.push(t)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'<button
title="%title%" type="button"
class="mfp-close">×</button>',tClose:"Close
(Esc)",tLoading:"Loading..."}},e.fn.magnificPopup=function(n){_();var
i=e(this);if("string"==typeof n)if("open"===n){var
o,r=b?i.data("magnificPopup"):i[0].magnificPopup,a=parseInt(arguments[1],10)||0;r.items?o=r.items[a]:(o=i,r.delegate&&(o=o.find(r.delegate)),o=o.eq(a)),t._openClick({mfpEl:o},i,r)}else
t.isOpen&&t[n].apply(t,Array.prototype.slice.call(arguments,1));else
n=e.extend(!0,{},n),b?i.data("magnificPopup",n):i[0].magnificPopup=n,t.addGroup(i,n);return
i};var
P,O,z,M="inline",B=function(){z&&(O.after(z.addClass(P)).detach(),z=null)};e.magnificPopup.registerModule(M,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content
not
found"},proto:{initInline:function(){t.types.push(M),x(l+"."+M,function(){B()})},getInline:function(n,i){if(B(),n.src){var
o=t.st.inline,r=e(n.src);if(r.length){var
a=r[0].parentNode;a&&a.tagName&&(O||(P=o.hiddenClass,O=k(P),P="mfp-"+P),z=r.after(O).detach().removeClass(P)),t.updateStatus("ready")}else
t.updateStatus("error",o.tNotFound),r=e("<div>");return
n.inlineElement=r,r}return
t.updateStatus("ready"),t._parseMarkup(i,{},n),i}}});var
F,H="ajax",L=function(){F&&i.removeClass(F)},A=function(){L(),t.req&&t.req.abort()};e.magnificPopup.registerModule(H,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'<a
href="%url%">The content</a> could not be
loaded.'},proto:{initAjax:function(){t.types.push(H),F=t.st.ajax.cursor,x(l+"."+H,A),x("BeforeChange."+H,A)},getAjax:function(n){F&&i.addClass(F),t.updateStatus("loading");var
o=e.extend({url:n.src,success:function(i,o,r){var
a={data:i,xhr:r};T("ParseAjax",a),t.appendContent(e(a.data),H),n.finished=!0,L(),t._setFocus(),setTimeout(function(){t.wrap.addClass(v)},16),t.updateStatus("ready"),T("AjaxContentAdded")},error:function(){L(),n.finished=n.loadError=!0,t.updateStatus("error",t.st.ajax.tError.replace("%url%",n.src))}},t.st.ajax.settings);return
t.req=e.ajax(o),""}}});var
j,N=function(n){if(n.data&&void 0!==n.data.title)return
n.data.title;var i=t.st.image.titleSrc;if(i){if(e.isFunction(i))return
i.call(t,n);if(n.el)return
n.el.attr(i)||""}return""};e.magnificPopup.registerModule("image",{options:{markup:'<div
class="mfp-figure"><div
class="mfp-close"></div><figure><div
class="mfp-img"></div><figcaption><div
class="mfp-bottom-bar"><div
class="mfp-title"></div><div
class="mfp-counter"></div></div></figcaption></figure></div>',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'<a
href="%url%">The image</a> could not be
loaded.'},proto:{initImage:function(){var
e=t.st.image,n=".image";t.types.push("image"),x(f+n,function(){"image"===t.currItem.type&&e.cursor&&i.addClass(e.cursor)}),x(l+n,function(){e.cursor&&i.removeClass(e.cursor),I.off("resize"+h)}),x("Resize"+n,t.resizeImage),t.isLowIE&&x("AfterChange",t.resizeImage)},resizeImage:function(){var
e=t.currItem;if(e&&e.img&&t.st.image.verticalFit){var
n=0;t.isLowIE&&(n=parseInt(e.img.css("padding-top"),10)+parseInt(e.img.css("padding-bottom"),10)),e.img.css("max-height",t.wH-n)}},_onImageHasSize:function(e){e.img&&(e.hasSize=!0,j&&clearInterval(j),e.isCheckingImgSize=!1,T("ImageHasSize",e),e.imgHidden&&(t.content&&t.content.removeClass("mfp-loading"),e.imgHidden=!1))},findImageSize:function(e){var
n=0,i=e.img[0],o=function(r){j&&clearInterval(j),j=setInterval(function(){return
i.naturalWidth>0?(t._onImageHasSize(e),void
0):(n>200&&clearInterval(j),n++,3===n?o(10):40===n?o(50):100===n&&o(500),void
0)},r)};o(1)},getImage:function(n,i){var
o=0,r=function(){n&&(n.img[0].complete?(n.img.off(".mfploader"),n===t.currItem&&(t._onImageHasSize(n),t.updateStatus("ready")),n.hasSize=!0,n.loaded=!0,T("ImageLoadComplete")):(o++,200>o?setTimeout(r,100):a()))},a=function(){n&&(n.img.off(".mfploader"),n===t.currItem&&(t._onImageHasSize(n),t.updateStatus("error",s.tError.replace("%url%",n.src))),n.hasSize=!0,n.loaded=!0,n.loadError=!0)},s=t.st.image,l=i.find(".mfp-img");if(l.length){var
c=document.createElement("img");c.className="mfp-img",n.el&&n.el.find("img").length&&(c.alt=n.el.find("img").attr("alt")),n.img=e(c).on("load.mfploader",r).on("error.mfploader",a),c.src=n.src,l.is("img")&&(n.img=n.img.clone()),c=n.img[0],c.naturalWidth>0?n.hasSize=!0:c.width||(n.hasSize=!1)}return
t._parseMarkup(i,{title:N(n),img_replaceWith:n.img},n),t.resizeImage(),n.hasSize?(j&&clearInterval(j),n.loadError?(i.addClass("mfp-loading"),t.updateStatus("error",s.tError.replace("%url%",n.src))):(i.removeClass("mfp-loading"),t.updateStatus("ready")),i):(t.updateStatus("loading"),n.loading=!0,n.hasSize||(n.imgHidden=!0,i.addClass("mfp-loading"),t.findImageSize(n)),i)}}});var
W,R=function(){return void 0===W&&(W=void
0!==document.createElement("p").style.MozTransform),W};e.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(e){return
e.is("img")?e:e.find("img")}},proto:{initZoom:function(){var
e,n=t.st.zoom,i=".zoom";if(n.enabled&&t.supportsTransition){var
o,r,a=n.duration,s=function(e){var
t=e.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),i="all
"+n.duration/1e3+"s
"+n.easing,o={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},r="transition";return
o["-webkit-"+r]=o["-moz-"+r]=o["-o-"+r]=o[r]=i,t.css(o),t},d=function(){t.content.css("visibility","visible")};x("BuildControls"+i,function(){if(t._allowZoom()){if(clearTimeout(o),t.content.css("visibility","hidden"),e=t._getItemToZoom(),!e)return
d(),void
0;r=s(e),r.css(t._getOffset()),t.wrap.append(r),o=setTimeout(function(){r.css(t._getOffset(!0)),o=setTimeout(function(){d(),setTimeout(function(){r.remove(),e=r=null,T("ZoomAnimationEnded")},16)},a)},16)}}),x(c+i,function(){if(t._allowZoom()){if(clearTimeout(o),t.st.removalDelay=a,!e){if(e=t._getItemToZoom(),!e)return;r=s(e)}r.css(t._getOffset(!0)),t.wrap.append(r),t.content.css("visibility","hidden"),setTimeout(function(){r.css(t._getOffset())},16)}}),x(l+i,function(){t._allowZoom()&&(d(),r&&r.remove(),e=null)})}},_allowZoom:function(){return"image"===t.currItem.type},_getItemToZoom:function(){return
t.currItem.hasSize?t.currItem.img:!1},_getOffset:function(n){var
i;i=n?t.currItem.img:t.st.zoom.opener(t.currItem.el||t.currItem);var
o=i.offset(),r=parseInt(i.css("padding-top"),10),a=parseInt(i.css("padding-bottom"),10);o.top-=e(window).scrollTop()-r;var
s={width:i.width(),height:(b?i.innerHeight():i[0].offsetHeight)-a-r};return
R()?s["-moz-transform"]=s.transform="translate("+o.left+"px,"+o.top+"px)":(s.left=o.left,s.top=o.top),s}}});var
Z="iframe",q="//about:blank",D=function(e){if(t.currTemplate[Z]){var
n=t.currTemplate[Z].find("iframe");n.length&&(e||(n[0].src=q),t.isIE8&&n.css("display",e?"block":"none"))}};e.magnificPopup.registerModule(Z,{options:{markup:'<div
class="mfp-iframe-scaler"><div
class="mfp-close"></div><iframe
class="mfp-iframe" src="//about:blank"
frameborder="0"
allowfullscreen></iframe></div>',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){t.types.push(Z),x("BeforeChange",function(e,t,n){t!==n&&(t===Z?D():n===Z&&D(!0))}),x(l+"."+Z,function(){D()})},getIframe:function(n,i){var
o=n.src,r=t.st.iframe;e.each(r.patterns,function(){return
o.indexOf(this.index)>-1?(this.id&&(o="string"==typeof
this.id?o.substr(o.lastIndexOf(this.id)+this.id.length,o.length):this.id.call(this,o)),o=this.src.replace("%id%",o),!1):void
0});var a={};return
r.srcAction&&(a[r.srcAction]=o),t._parseMarkup(i,a,n),t.updateStatus("ready"),i}}});var
K=function(e){var n=t.items.length;return
e>n-1?e-n:0>e?n+e:e},Y=function(e,t,n){return
e.replace(/%curr%/gi,t+1).replace(/%total%/gi,n)};e.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'<button
title="%title%" type="button" class="mfp-arrow
mfp-arrow-%dir%"></button>',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous
(Left arrow key)",tNext:"Next (Right arrow
key)",tCounter:"%curr% of
%total%"},proto:{initGallery:function(){var
n=t.st.gallery,i=".mfp-gallery",r=Boolean(e.fn.mfpFastClick);return
t.direction=!0,n&&n.enabled?(a+="
mfp-gallery",x(f+i,function(){n.navigateByImgClick&&t.wrap.on("click"+i,".mfp-img",function(){return
t.items.length>1?(t.next(),!1):void
0}),o.on("keydown"+i,function(e){37===e.keyCode?t.prev():39===e.keyCode&&t.next()})}),x("UpdateStatus"+i,function(e,n){n.text&&(n.text=Y(n.text,t.currItem.index,t.items.length))}),x(p+i,function(e,i,o,r){var
a=t.items.length;o.counter=a>1?Y(n.tCounter,r.index,a):""}),x("BuildControls"+i,function(){if(t.items.length>1&&n.arrows&&!t.arrowLeft){var
i=n.arrowMarkup,o=t.arrowLeft=e(i.replace(/%title%/gi,n.tPrev).replace(/%dir%/gi,"left")).addClass(y),a=t.arrowRight=e(i.replace(/%title%/gi,n.tNext).replace(/%dir%/gi,"right")).addClass(y),s=r?"mfpFastClick":"click";o[s](function(){t.prev()}),a[s](function(){t.next()}),t.isIE7&&(k("b",o[0],!1,!0),k("a",o[0],!1,!0),k("b",a[0],!1,!0),k("a",a[0],!1,!0)),t.container.append(o.add(a))}}),x(m+i,function(){t._preloadTimeout&&clearTimeout(t._preloadTimeout),t._preloadTimeout=setTimeout(function(){t.preloadNearbyImages(),t._preloadTimeout=null},16)}),x(l+i,function(){o.off(i),t.wrap.off("click"+i),t.arrowLeft&&r&&t.arrowLeft.add(t.arrowRight).destroyMfpFastClick(),t.arrowRight=t.arrowLeft=null}),void
0):!1},next:function(){t.direction=!0,t.index=K(t.index+1),t.updateItemHTML()},prev:function(){t.direction=!1,t.index=K(t.index-1),t.updateItemHTML()},goTo:function(e){t.direction=e>=t.index,t.index=e,t.updateItemHTML()},preloadNearbyImages:function(){var
e,n=t.st.gallery.preload,i=Math.min(n[0],t.items.length),o=Math.min(n[1],t.items.length);for(e=1;(t.direction?o:i)>=e;e++)t._preloadItem(t.index+e);for(e=1;(t.direction?i:o)>=e;e++)t._preloadItem(t.index-e)},_preloadItem:function(n){if(n=K(n),!t.items[n].preloaded){var
i=t.items[n];i.parsed||(i=t.parseEl(n)),T("LazyLoad",i),"image"===i.type&&(i.img=e('<img
class="mfp-img"
/>').on("load.mfploader",function(){i.hasSize=!0}).on("error.mfploader",function(){i.hasSize=!0,i.loadError=!0,T("LazyLoadError",i)}).attr("src",i.src)),i.preloaded=!0}}}});var
U="retina";e.magnificPopup.registerModule(U,{options:{replaceSrc:function(e){return
e.src.replace(/\.\w+$/,function(e){return"@2x"+e})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var
e=t.st.retina,n=e.ratio;n=isNaN(n)?n():n,n>1&&(x("ImageHasSize."+U,function(e,t){t.img.css({"max-width":t.img[0].naturalWidth/n,width:"100%"})}),x("ElementParse."+U,function(t,i){i.src=e.replaceSrc(i,n)}))}}}}),function(){var
t=1e3,n="ontouchstart"in
window,i=function(){I.off("touchmove"+r+"
touchend"+r)},o="mfpFastClick",r="."+o;e.fn.mfpFastClick=function(o){return
e(this).each(function(){var a,s=e(this);if(n){var
l,c,d,u,p,f;s.on("touchstart"+r,function(e){u=!1,f=1,p=e.originalEvent?e.originalEvent.touches[0]:e.touches[0],c=p.clientX,d=p.clientY,I.on("touchmove"+r,function(e){p=e.originalEvent?e.originalEvent.touches:e.touches,f=p.length,p=p[0],(Math.abs(p.clientX-c)>10||Math.abs(p.clientY-d)>10)&&(u=!0,i())}).on("touchend"+r,function(e){i(),u||f>1||(a=!0,e.preventDefault(),clearTimeout(l),l=setTimeout(function(){a=!1},t),o())})})}s.on("click"+r,function(){a||o()})})},e.fn.destroyMfpFastClick=function(){e(this).off("touchstart"+r+"
click"+r),n&&I.off("touchmove"+r+"
touchend"+r)}}(),_()});rsmembership.js000064400000045474151167411240007622
0ustar00var RSMembership = {};
RSMembership.parseJSON = function (data) {
if (typeof data != 'object') {
var match = data.match(/{.*}/);
return jQuery.parseJSON(match[0]);
}
return jQuery.parseJSON(data);
};
RSMembership.utils = {
format_decimals : 2,
format_decimals_point: '.',
format_thousands_sep: '',
random: function(){
return Math.ceil(10000*Math.random());
},
magnificModal: function(modal_id) {
if (typeof jQuery == 'undefined')
{
alert(Joomla.JText._('COM_RSMEMBERSHIP_JQUERY_NOT_FOUND'));
}
else {
jQuery.magnificPopup.open({
type: 'inline',
preloader: true,
overflowY: 'scroll',
items: {
src: modal_id,
callbacks: {
beforeOpen: function () {
jQuery(modal_id).show();
},
close: function () {
jQuery(modal_id).hide();
}
}
}
});
}
},
tooltipster: function (){
if (typeof jQuery == 'undefined')
{
alert(Joomla.JText._('COM_RSMEMBERSHIP_JQUERY_NOT_FOUND'));
}
else {
jQuery('.hasRsmemTooltip').tooltipster({
functionInit: function(instance, helper){
var $origin = jQuery(helper.origin),
dataOptions = $origin.attr('data-tooltipster');
if(dataOptions){
dataOptions = JSON.parse(dataOptions);
jQuery.each(dataOptions, function(name, option){
instance.option(name, option);
});
}
}
});
}
},
number_format: function(number) {
var decimals = RSMembership.utils.format_decimals;
var dec_point = RSMembership.utils.format_decimals_point;
var thousands_point = RSMembership.utils.format_thousands_sep;
if (number == null || !isFinite(number)) {
console.log('number is not valid');
return number;
}
if (!decimals) {
var len = number.toString().split('.').length;
decimals = len > 1 ? len : 0;
}
if (!dec_point) {
dec_point = '.';
}
if (!thousands_point) {
thousands_point = ',';
}
number = parseFloat(number).toFixed(decimals);
number = number.replace(".", dec_point);
var splitNum = number.split(dec_point);
splitNum[0] = splitNum[0].replace(/\B(?=(\d{3})+(?!\d))/g,
thousands_point);
number = splitNum.join(dec_point);
return number;
}
};
RSMembership.subscribe = {
init: {
ajax_wait : false,
timeout : false,
captcha_url : '',
validations : [],
field_validations : [],
err_html_class : 'rsm_field_error',
check_user_url : ''
},
// Username related function
ajax_flag: function() {
if (RSMembership.subscribe.init.timeout) {
clearTimeout(RSMembership.subscribe.init.timeout);
}
RSMembership.subscribe.init.ajax_wait = true;
RSMembership.subscribe.init.timeout = setTimeout(function () {
RSMembership.subscribe.init.ajax_wait = false;
RSMembership.subscribe.check_username(document.getElementById('rsm_username'));
} , 2000);
},
validate_username: function(username) {
var regex = new
RegExp("[\<|\>|\"|\'|\%|\;|\(|\)|\&]",
"i");
if(username.length < 2 || regex.test(username)) {
return false;
}
return true;
},
check_username: function(what) {
// convert to jQuery object
what = jQuery(what);
var regex = new
RegExp("[\<|\>|\"|\'|\%|\;|\(|\)|\&]",
"i");
var clean_value = what.val().replace(regex, '');
what.val(clean_value);
username = what.val();
var message = jQuery('#rsm_username_message');
if (!RSMembership.subscribe.validate_username(username)) {
message.show('fast');
message.addClass('rsm_error');
message.html(Joomla.JText._('COM_RSMEMBERSHIP_PLEASE_TYPE_USERNAME'));
return false;
}
message.hide('fast');
message.removeClass('rsm_error');
message.html('');
if (RSMembership.subscribe.init.ajax_wait) {
return true;
}
var params = {
username : jQuery('#rsm_username').val().trim(),
name : jQuery('#name').val(),
email : jQuery('#email').val()
};
jQuery.ajax({
type : 'POST',
url : RSMembership.subscribe.init.check_user_url,
dataType : 'html',
data : params,
beforeSend : function () {
jQuery('#rsm_loading').show('fast');
}
}).done(function (response) {
jQuery('#rsm_loading').hide('fast');
RSMembership.subscribe.init.ajax_wait = false;
if (jQuery('#rsm_suggestions_ol li').length) {
jQuery.each(jQuery('#rsm_suggestions_ol > li'),
function(){
jQuery(this).remove();
});
}
var is_available = false;
var suggestions = response.split('|');
for (var i=0; i<suggestions.length; i++) {
if (suggestions[i] == what.val().trim()) {
is_available = true;
}
var a = jQuery('<a>', {'href' :
'javascript: void(0);'});
a.html(suggestions[i]);
a.bind('click', function(){
RSMembership.subscribe.add_username(jQuery(this).html());
});
var li = jQuery('<li>');
li.append(a);
jQuery('#rsm_suggestions_ol').append(li);
}
message.show('fast');
var suggestions_container = jQuery('#rsm_suggestions');
if (is_available)
{
suggestions_container.hide('fast');
message.removeClass('rsm_error').addClass('rsm_ok');
message.html(Joomla.JText._('COM_RSMEMBERSHIP_USERNAME_IS_OK'));
}
else
{
suggestions_container.css({'opacity': 1, 'filter'
: 'alpha(opacity = 100)'}).fadeIn('fast');
message.removeClass('rsm_ok').addClass('rsm_error');
message.html(Joomla.JText._('COM_RSMEMBERSHIP_USERNAME_NOT_OK'));
}
});
},
add_username: function(username) {
var message = jQuery('#rsm_username_message');
jQuery('#rsm_username').val(username);
jQuery('#rsm_suggestions').hide('fast');
message.hide('fast');
message.removeClass('rsm_error').addClass('rsm_ok');
message.html(Joomla.JText._('COM_RSMEMBERSHIP_USERNAME_IS_OK'));
},
// Captcha functions
refresh_captcha: function() {
var url = RSMembership.subscribe.init.captcha_url.replace(/#SID#/,
'captcha' + RSMembership.utils.random());
jQuery('#submit_captcha_image').attr('src', url);
return false;
},
// Form validation function
validate_subscribe: function(form) {
var form = jQuery(form);
var msg = new Array();
// Clear the previous error fields
form.find('.rsm_field_error').removeClass('rsm_field_error');
// default validations: membershipterms, username, password, name
if (RSMembership.subscribe.init.validations.length)
{
jQuery.each(RSMembership.subscribe.init.validations, function(i,
validation) {
if (typeof RSMembership.subscribe[validation] == 'function')
{
RSMembership.subscribe[validation](form, msg);
}
});
}
if (RSMembership.subscribe.init.field_validations.length)
{
jQuery.each(RSMembership.subscribe.init.field_validations, function(i,
field) {
field.required = parseInt(field.required);
if (field.field_type == 'checkbox' || field.field_type ==
'radio')
{
if (field.required) {
var is_checked = false;
for(var j = 0; j < field.field_id.length; j++)
{
if
(form.find('#'+field.field_id[j]).is(':checked')){
is_checked = true;
break;
}
}
if (!is_checked) {
msg.push(field.err_msg);
}
}
}
else
{
if (field.required &&
form.find('#'+field.field_id).val().length == 0){
msg.push(field.err_msg);
form.find('#'+field.field_id).addClass('rsm_field_error');
}
if (typeof field.rule != 'undefined') {
var field_value = form.find('#'+field.field_id).val();
if (field_value.length > 0) {
if (typeof RSMembership.subscribe[field.rule] ==
'function')
{
var msg_set = (typeof field.err_msg_rule != 'undefined' ?
field.err_msg_rule : field.err_msg);
RSMembership.subscribe[field.rule](form, msg, field.field_id,
msg_set);
}
}
}
}
});
}
if (msg.length > 0) {
// Build the error messages container
var msg_container = jQuery('<div>', {
'class': 'rsm_modal_error_container',
'style': 'margin-top:20px;'
});
msg_container.append('<div class="alert alert-danger
rsmemgrid-alert"><strong>'+Joomla.JText._('COM_RSMEMBERSHIP_THERE_WAS_AN_ERROR')+'</strong><ol><li>'
+ msg.join('</li><li>') +
'</li></ol></div>');
// Add it to the modal
jQuery('#rsmembershipModal').empty().append(msg_container);
// Force the modal to not be wider
jQuery('#rsmembershipModal').width(msg_container.outerWidth());
// Open the modal
try {
RSMembership.utils.magnificModal('#rsmembershipModal');
} catch(err) {
alert(msg.join("\n"));
}
return false;
}
return true;
},
numeric: function(form, msg, field_id, msg_set) {
var regex = /^([0-9]{1,3}(?:,?[0-9]{3})*(?:\.[0-9]+?)?)$/;
var value = form.find('#'+field_id).val();
value = value.replace(/(?:\r\n|\r|\n)/g, '');
if (!regex.test(value)) {
msg.push(msg_set);
form.find('#'+field_id).addClass('rsm_field_error');
}
},
alpha: function(form, msg, field_id, msg_set) {
var regex = /([^a-zA-Z ])/;
var value = form.find('#'+field_id).val();
value = value.replace(/(?:\r\n|\r|\n)/g, '');
if (regex.test(value)) {
msg.push(msg_set);
form.find('#'+field_id).addClass('rsm_field_error');
}
},
alphanumeric: function(form, msg, field_id, msg_set) {
var regex = /([^a-zA-Z0-9 ])/;
var value = form.find('#'+field_id).val();
value = value.replace(/(?:\r\n|\r|\n)/g, '');
if (regex.test(value)) {
msg.push(msg_set);
form.find('#'+field_id).addClass('rsm_field_error');
}
},
email: function(form, msg, field_id, msg_set) {
var regex=/.*@.*/;
if (!regex.test(form.find('#'+field_id).val())) {
msg.push(msg_set);
form.find('#'+field_id).addClass('rsm_field_error');
}
},
website: function(form, msg, field_id, msg_set) {
var regex = /^(http|https):\/\/([\w-]+\.)+[\w-]+(\/[\w-
./?%&=]*)?$/;
if (!regex.test(form.find('#'+field_id).val())) {
msg.push(msg_set);
form.find('#'+field_id).addClass('rsm_field_error');
}
},
membershipterms: function(form, msg) {
if (!form.find('#rsm_checkbox_agree').is(':checked')
)
{
msg.push(Joomla.JText._('COM_RSMEMBERSHIP_PLEASE_AGREE_MEMBERSHIP'));
}
},
username: function (form, msg) {
if
(!RSMembership.subscribe.validate_username(form.find('#rsm_username').val()))
{
msg.push(Joomla.JText._('COM_RSMEMBERSHIP_PLEASE_TYPE_USERNAME'));
form.find('#rsm_username').addClass('rsm_field_error');
}
if (form.find('#rsm_username_message').attr('class')
== 'rsm_error')
{
msg.push(Joomla.JText._('COM_RSMEMBERSHIP_USERNAME_NOT_OK'));
form.find('#rsm_username').addClass('rsm_field_error');
}
},
password: function (form, msg) {
if (form.find('#rsm_password').val().length == 0)
{
msg.push(Joomla.JText._('COM_RSMEMBERSHIP_PLEASE_TYPE_PASSWORD'));
form.find('#rsm_password').addClass('rsm_field_error');
}
else if (form.find('#rsm_password').val() !=
form.find('#rsm_password2').val())
{
msg.push(Joomla.JText._('COM_RSMEMBERSHIP_PLEASE_CONFIRM_PASSWORD'));
form.find('#rsm_password2').addClass('rsm_field_error');
}
},
name: function(form, msg) {
if (form.find('#name').val().length == 0) {
msg.push(Joomla.JText._('COM_RSMEMBERSHIP_PLEASE_TYPE_NAME'));
form.find('#name').addClass('rsm_field_error');
}
var regex=/.*@.*/;
if (form.find('#email').val().length == 0 ||
!regex.test(form.find('#email').val()))
{
msg.push(Joomla.JText._('COM_RSMEMBERSHIP_PLEASE_TYPE_EMAIL'));
form.find('#email').addClass('rsm_field_error');
}
}
};
RSMembership.removeData = function(button) {
jQuery(button).fadeOut({
complete: function() {
jQuery('#rsmembership_remove_data_and_close_account').fadeIn();
}
});
};
RSMembership.requestRemoveData = function(button) {
jQuery(button).prop('disabled',
true).addClass('disabled');
var container =
jQuery('#rsmembership_remove_data_and_close_account');
var url = Joomla.getOptions('system.paths').root +
'/index.php';
var token = Joomla.getOptions('csrf.token');
var data = {
'option': 'com_rsmembership',
'task': 'removedata.request'
};
data[token] = 1;
jQuery.post(url, data, function(response){
container.fadeOut({
complete: function() {
container.find('.alert-warning').removeClass('alert-warning').addClass('alert-info');
container.find('.alert').text(response);
container.fadeIn();
}
})
});
};
RSMembership.buildTotal = {
format: '{price} {currency}',
show_free: false,
currency: '',
iscoupon: false,
delay_timer: null,
remake_total: function (isPressed) {
var total_field = jQuery('#rsm_grand_total');
// if no total field found do not run
if (total_field.length == 0) {
return;
}
var total_value = parseFloat(total_field.data('fixedvalue'));
// check if there is an extra value (this should be available only in one
page checkout)
var extras_total_value = 0;
// change the percentage for the payments if extras are present
var extras_present = false;
// get all selected extras
if (jQuery('.rsm_extra').length) {
jQuery('.rsm_extra').each(function () {
var element = jQuery(this);
if (typeof element[0].type !== 'undefined') {
switch (element[0].type) {
case 'select-one':
var price_value =
element.find('option:selected').data('pricevalue');
if (typeof price_value === 'undefined') {
price_value = 0;
}
extras_total_value += parseFloat(price_value);
break;
case 'radio':
case 'checkbox':
if (element.is(':checked')) {
extras_total_value +=
parseFloat(element.data('pricevalue'));
}
break;
}
}
});
if (extras_total_value > 0) {
total_value += extras_total_value;
}
extras_present = true;
}
var selected_tax = 0;
jQuery("input[id^='payment']").each(function(){
// this means the initial total has changed and the taxes should be
changed if percent is used
if (extras_present || RSMembership.buildTotal.iscoupon) {
var processor = jQuery(this).next().find('.rsm_tax_value');
if (typeof processor !== 'undefined' &&
processor.data('ispercent')) {
var percent_value =
parseFloat(jQuery(this).next().find('.rsm_percent_value').text());
// change the current rowvalue
var new_tax = (total_value * percent_value) / 100;
processor.data('rawvalue', new_tax);
// display the with defined format
var format_tax =
RSMembership.buildTotal.format.replace('{price}',
RSMembership.utils.number_format(new_tax));
format_tax = format_tax.replace('{currency}',
RSMembership.buildTotal.currency);
processor.html(format_tax);
} else if (typeof processor !== 'undefined' &&
!processor.data('ispercent') && processor.length) {
var rawvalue = processor.data('rawvalue');
var new_tax = 0;
if (total_value == 0) {
processor.data('initialvalue', rawvalue);
} else {
if (processor.data('initialvalue')) {
new_tax = processor.data('initialvalue');
} else {
new_tax = processor.data('rawvalue');
}
}
// change the current rowvalue
processor.data('rawvalue', new_tax);
// display the with defined format
var format_tax =
RSMembership.buildTotal.format.replace('{price}',
RSMembership.utils.number_format(new_tax));
format_tax = format_tax.replace('{currency}',
RSMembership.buildTotal.currency);
processor.html(format_tax);
}
}
if (jQuery(this).is(':checked')) {
selected_tax =
jQuery(this).next().find('.rsm_tax_value').data('rawvalue');
selected_tax = typeof selected_tax !== 'undefined' ?
parseFloat(selected_tax) : 0;
}
// bind the radios
if (typeof isPressed === 'undefined') {
jQuery(this).on('click', function(){
RSMembership.buildTotal.remake_total(true);
});
}
});
total_value = total_value + selected_tax;
if (total_value == 0 && RSMembership.buildTotal.show_free) {
total_field.html(Joomla.Text._('COM_RSMEMBERSHIP_FREE'));
} else {
var format = RSMembership.buildTotal.format.replace('{price}',
RSMembership.utils.number_format(total_value));
format = format.replace('{currency}',
RSMembership.buildTotal.currency);
total_field.html(format);
}
},
set_coupon: function(coupon, id) {
if (coupon.length == 0) {
return;
}
jQuery('#rsm_coupon_loading').show();
if (RSMembership.buildTotal.timeout) {
clearTimeout(RSMembership.buildTotal.timeout);
}
RSMembership.buildTotal.timeout = setTimeout(function() {
jQuery.ajax({
url: 'index.php?option=com_rsmembership&task=setcoupon',
type: 'post',
dataType: 'json',
data: {membership_id: id, coupon: coupon}
}).done(function( response ) {
jQuery('#rsm_coupon_loading').hide();
var coupon_input = jQuery('#coupon');
var discount = parseFloat(response.discount);
if (discount > 0) {
var total_field = jQuery('#rsm_grand_total');
var total_value =
parseFloat(total_field.data('fixedvalue'));
total_field.data('initialvalue', total_value);
total_value = total_value - discount;
if (total_value < 0) {
total_value = 0;
}
total_field.data('fixedvalue', total_value);
RSMembership.buildTotal.iscoupon = true;
RSMembership.buildTotal.remake_total();
var format =
RSMembership.buildTotal.format.replace('{price}',
RSMembership.utils.number_format(discount));
format = format.replace('{currency}',
RSMembership.buildTotal.currency);
jQuery('#rsm_discount_value').html(format);
jQuery('#rsm_discount_value_container').show();
jQuery('#rsm-coupon-ok').html(coupon_input.val());
jQuery('#rsm-coupon-clear').show();
coupon_input.hide();
} else {
coupon_input.addClass('rsm_coupon_error');
RSMembership.buildTotal.clear_coupon();
}
});
}, 1000);
},
clear_coupon: function(isPressed){
if (typeof isPressed !== 'undefined') {
jQuery('#rsm_coupon_loading').hide();
var coupon = jQuery('#coupon');
jQuery('#rsm-coupon-ok').html('');
jQuery('#rsm-coupon-clear').hide();
coupon.removeClass('rsm_coupon_error');
coupon.val('');
coupon.show();
}
jQuery('#rsm_discount_value').html('');
jQuery('#rsm_discount_value_container').hide();
jQuery('#rsm-set-coupon').prop('disabled', false);
var total_field = jQuery('#rsm_grand_total');
if (total_field.data('initialvalue')) {
var total_value_initial =
parseFloat(total_field.data('initialvalue'));
total_field.data('fixedvalue', total_value_initial);
RSMembership.buildTotal.remake_total();
}
RSMembership.buildTotal.iscoupon = false;
}
};tooltipster.bundle.min.js000064400000115735151167411240011542 0ustar00/*!
tooltipster v4.2.8 */!function(a,b){"function"==typeof
define&&define.amd?define(["jquery"],function(a){return
b(a)}):"object"==typeof
exports?module.exports=b(require("jquery")):b(jQuery)}(this,function(a){function
b(a){this.$container,this.constraints=null,this.__$tooltip,this.__init(a)}function
c(b,c){var d=!0;return a.each(b,function(a,e){return void
0===c[a]||b[a]!==c[a]?(d=!1,!1):void 0}),d}function d(b){var
c=b.attr("id"),d=c?h.window.document.getElementById(c):null;return
d?d===b[0]:a.contains(h.window.document.body,b[0])}function
e(){if(!g)return!1;var
a=g.document.body||g.document.documentElement,b=a.style,c="transition",d=["Moz","Webkit","Khtml","O","ms"];if("string"==typeof
b[c])return!0;c=c.charAt(0).toUpperCase()+c.substr(1);for(var
e=0;e<d.length;e++)if("string"==typeof
b[d[e]+c])return!0;return!1}var
f={animation:"fade",animationDuration:350,content:null,contentAsHTML:!1,contentCloning:!1,debug:!0,delay:300,delayTouch:[300,500],functionInit:null,functionBefore:null,functionReady:null,functionAfter:null,functionFormat:null,IEmin:6,interactive:!1,multiple:!1,parent:null,plugins:["sideTip"],repositionOnScroll:!1,restoration:"none",selfDestruction:!0,theme:[],timer:0,trackerInterval:500,trackOrigin:!1,trackTooltip:!1,trigger:"hover",triggerClose:{click:!1,mouseleave:!1,originClick:!1,scroll:!1,tap:!1,touchleave:!1},triggerOpen:{click:!1,mouseenter:!1,tap:!1,touchstart:!1},updateAnimation:"rotate",zIndex:9999999},g="undefined"!=typeof
window?window:null,h={hasTouchCapability:!(!g||!("ontouchstart"in
g||g.DocumentTouch&&g.document instanceof
g.DocumentTouch||g.navigator.maxTouchPoints)),hasTransitions:e(),IE:!1,semVer:"4.2.8",window:g},i=function(){this.__$emitterPrivate=a({}),this.__$emitterPublic=a({}),this.__instancesLatestArr=[],this.__plugins={},this._env=h};i.prototype={__bridge:function(b,c,d){if(!c[d]){var
e=function(){};e.prototype=b;var g=new
e;g.__init&&g.__init(c),a.each(b,function(a,b){0!=a.indexOf("__")&&(c[a]?f.debug&&console.log("The
"+a+" method of the "+d+" plugin conflicts with another
plugin or native methods"):(c[a]=function(){return
g[a].apply(g,Array.prototype.slice.apply(arguments))},c[a].bridged=g))}),c[d]=g}return
this},__setWindow:function(a){return
h.window=a,this},_getRuler:function(a){return new
b(a)},_off:function(){return
this.__$emitterPrivate.off.apply(this.__$emitterPrivate,Array.prototype.slice.apply(arguments)),this},_on:function(){return
this.__$emitterPrivate.on.apply(this.__$emitterPrivate,Array.prototype.slice.apply(arguments)),this},_one:function(){return
this.__$emitterPrivate.one.apply(this.__$emitterPrivate,Array.prototype.slice.apply(arguments)),this},_plugin:function(b){var
c=this;if("string"==typeof b){var d=b,e=null;return
d.indexOf(".")>0?e=c.__plugins[d]:a.each(c.__plugins,function(a,b){return
b.name.substring(b.name.length-d.length-1)=="."+d?(e=b,!1):void
0}),e}if(b.name.indexOf(".")<0)throw new Error("Plugins
must be namespaced");return
c.__plugins[b.name]=b,b.core&&c.__bridge(b.core,c,b.name),this},_trigger:function(){var
a=Array.prototype.slice.apply(arguments);return"string"==typeof
a[0]&&(a[0]={type:a[0]}),this.__$emitterPrivate.trigger.apply(this.__$emitterPrivate,a),this.__$emitterPublic.trigger.apply(this.__$emitterPublic,a),this},instances:function(b){var
c=[],d=b||".tooltipstered";return a(d).each(function(){var
b=a(this),d=b.data("tooltipster-ns");d&&a.each(d,function(a,d){c.push(b.data(d))})}),c},instancesLatest:function(){return
this.__instancesLatestArr},off:function(){return
this.__$emitterPublic.off.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},on:function(){return
this.__$emitterPublic.on.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},one:function(){return
this.__$emitterPublic.one.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},origins:function(b){var
c=b?b+" ":"";return
a(c+".tooltipstered").toArray()},setDefaults:function(b){return
a.extend(f,b),this},triggerHandler:function(){return
this.__$emitterPublic.triggerHandler.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this}},a.tooltipster=new
i,a.Tooltipster=function(b,c){this.__callbacks={close:[],open:[]},this.__closingTime,this.__Content,this.__contentBcr,this.__destroyed=!1,this.__$emitterPrivate=a({}),this.__$emitterPublic=a({}),this.__enabled=!0,this.__garbageCollector,this.__Geometry,this.__lastPosition,this.__namespace="tooltipster-"+Math.round(1e6*Math.random()),this.__options,this.__$originParents,this.__pointerIsOverOrigin=!1,this.__previousThemes=[],this.__state="closed",this.__timeouts={close:[],open:null},this.__touchEvents=[],this.__tracker=null,this._$origin,this._$tooltip,this.__init(b,c)},a.Tooltipster.prototype={__init:function(b,c){var
d=this;if(d._$origin=a(b),d.__options=a.extend(!0,{},f,c),d.__optionsFormat(),!h.IE||h.IE>=d.__options.IEmin){var
e=null;if(void
0===d._$origin.data("tooltipster-initialTitle")&&(e=d._$origin.attr("title"),void
0===e&&(e=null),d._$origin.data("tooltipster-initialTitle",e)),null!==d.__options.content)d.__contentSet(d.__options.content);else{var
g,i=d._$origin.attr("data-tooltip-content");i&&(g=a(i)),g&&g[0]?d.__contentSet(g.first()):d.__contentSet(e)}d._$origin.removeAttr("title").addClass("tooltipstered"),d.__prepareOrigin(),d.__prepareGC(),a.each(d.__options.plugins,function(a,b){d._plug(b)}),h.hasTouchCapability&&a(h.window.document.body).on("touchmove."+d.__namespace+"-triggerOpen",function(a){d._touchRecordEvent(a)}),d._on("created",function(){d.__prepareTooltip()})._on("repositioned",function(a){d.__lastPosition=a.position})}else
d.__options.disabled=!0},__contentInsert:function(){var
a=this,b=a._$tooltip.find(".tooltipster-content"),c=a.__Content,d=function(a){c=a};return
a._trigger({type:"format",content:a.__Content,format:d}),a.__options.functionFormat&&(c=a.__options.functionFormat.call(a,a,{origin:a._$origin[0]},a.__Content)),"string"!=typeof
c||a.__options.contentAsHTML?b.empty().append(c):b.text(c),a},__contentSet:function(b){return
b instanceof
a&&this.__options.contentCloning&&(b=b.clone(!0)),this.__Content=b,this._trigger({type:"updated",content:b}),this},__destroyError:function(){throw
new Error("This tooltip has been destroyed and cannot execute your
method call.")},__geometry:function(){var
b=this,c=b._$origin,d=b._$origin.is("area");if(d){var
e=b._$origin.parent().attr("name");c=a('img[usemap="#'+e+'"]')}var
f=c[0].getBoundingClientRect(),g=a(h.window.document),i=a(h.window),j=c,k={available:{document:null,window:null},document:{size:{height:g.height(),width:g.width()}},window:{scroll:{left:h.window.scrollX||h.window.document.documentElement.scrollLeft,top:h.window.scrollY||h.window.document.documentElement.scrollTop},size:{height:i.height(),width:i.width()}},origin:{fixedLineage:!1,offset:{},size:{height:f.bottom-f.top,width:f.right-f.left},usemapImage:d?c[0]:null,windowOffset:{bottom:f.bottom,left:f.left,right:f.right,top:f.top}}};if(d){var
l=b._$origin.attr("shape"),m=b._$origin.attr("coords");if(m&&(m=m.split(","),a.map(m,function(a,b){m[b]=parseInt(a)})),"default"!=l)switch(l){case"circle":var
n=m[0],o=m[1],p=m[2],q=o-p,r=n-p;k.origin.size.height=2*p,k.origin.size.width=k.origin.size.height,k.origin.windowOffset.left+=r,k.origin.windowOffset.top+=q;break;case"rect":var
s=m[0],t=m[1],u=m[2],v=m[3];k.origin.size.height=v-t,k.origin.size.width=u-s,k.origin.windowOffset.left+=s,k.origin.windowOffset.top+=t;break;case"poly":for(var
w=0,x=0,y=0,z=0,A="even",B=0;B<m.length;B++){var
C=m[B];"even"==A?(C>y&&(y=C,0===B&&(w=y)),w>C&&(w=C),A="odd"):(C>z&&(z=C,1==B&&(x=z)),x>C&&(x=C),A="even")}k.origin.size.height=z-x,k.origin.size.width=y-w,k.origin.windowOffset.left+=w,k.origin.windowOffset.top+=x}}var
D=function(a){k.origin.size.height=a.height,k.origin.windowOffset.left=a.left,k.origin.windowOffset.top=a.top,k.origin.size.width=a.width};for(b._trigger({type:"geometry",edit:D,geometry:{height:k.origin.size.height,left:k.origin.windowOffset.left,top:k.origin.windowOffset.top,width:k.origin.size.width}}),k.origin.windowOffset.right=k.origin.windowOffset.left+k.origin.size.width,k.origin.windowOffset.bottom=k.origin.windowOffset.top+k.origin.size.height,k.origin.offset.left=k.origin.windowOffset.left+k.window.scroll.left,k.origin.offset.top=k.origin.windowOffset.top+k.window.scroll.top,k.origin.offset.bottom=k.origin.offset.top+k.origin.size.height,k.origin.offset.right=k.origin.offset.left+k.origin.size.width,k.available.document={bottom:{height:k.document.size.height-k.origin.offset.bottom,width:k.document.size.width},left:{height:k.document.size.height,width:k.origin.offset.left},right:{height:k.document.size.height,width:k.document.size.width-k.origin.offset.right},top:{height:k.origin.offset.top,width:k.document.size.width}},k.available.window={bottom:{height:Math.max(k.window.size.height-Math.max(k.origin.windowOffset.bottom,0),0),width:k.window.size.width},left:{height:k.window.size.height,width:Math.max(k.origin.windowOffset.left,0)},right:{height:k.window.size.height,width:Math.max(k.window.size.width-Math.max(k.origin.windowOffset.right,0),0)},top:{height:Math.max(k.origin.windowOffset.top,0),width:k.window.size.width}};"html"!=j[0].tagName.toLowerCase();){if("fixed"==j.css("position")){k.origin.fixedLineage=!0;break}j=j.parent()}return
k},__optionsFormat:function(){return"number"==typeof
this.__options.animationDuration&&(this.__options.animationDuration=[this.__options.animationDuration,this.__options.animationDuration]),"number"==typeof
this.__options.delay&&(this.__options.delay=[this.__options.delay,this.__options.delay]),"number"==typeof
this.__options.delayTouch&&(this.__options.delayTouch=[this.__options.delayTouch,this.__options.delayTouch]),"string"==typeof
this.__options.theme&&(this.__options.theme=[this.__options.theme]),null===this.__options.parent?this.__options.parent=a(h.window.document.body):"string"==typeof
this.__options.parent&&(this.__options.parent=a(this.__options.parent)),"hover"==this.__options.trigger?(this.__options.triggerOpen={mouseenter:!0,touchstart:!0},this.__options.triggerClose={mouseleave:!0,originClick:!0,touchleave:!0}):"click"==this.__options.trigger&&(this.__options.triggerOpen={click:!0,tap:!0},this.__options.triggerClose={click:!0,tap:!0}),this._trigger("options"),this},__prepareGC:function(){var
b=this;return
b.__options.selfDestruction?b.__garbageCollector=setInterval(function(){var
c=(new
Date).getTime();b.__touchEvents=a.grep(b.__touchEvents,function(a,b){return
c-a.time>6e4}),d(b._$origin)||b.close(function(){b.destroy()})},2e4):clearInterval(b.__garbageCollector),b},__prepareOrigin:function(){var
a=this;if(a._$origin.off("."+a.__namespace+"-triggerOpen"),h.hasTouchCapability&&a._$origin.on("touchstart."+a.__namespace+"-triggerOpen
touchend."+a.__namespace+"-triggerOpen
touchcancel."+a.__namespace+"-triggerOpen",function(b){a._touchRecordEvent(b)}),a.__options.triggerOpen.click||a.__options.triggerOpen.tap&&h.hasTouchCapability){var
b="";a.__options.triggerOpen.click&&(b+="click."+a.__namespace+"-triggerOpen
"),a.__options.triggerOpen.tap&&h.hasTouchCapability&&(b+="touchend."+a.__namespace+"-triggerOpen"),a._$origin.on(b,function(b){a._touchIsMeaningfulEvent(b)&&a._open(b)})}if(a.__options.triggerOpen.mouseenter||a.__options.triggerOpen.touchstart&&h.hasTouchCapability){var
b="";a.__options.triggerOpen.mouseenter&&(b+="mouseenter."+a.__namespace+"-triggerOpen
"),a.__options.triggerOpen.touchstart&&h.hasTouchCapability&&(b+="touchstart."+a.__namespace+"-triggerOpen"),a._$origin.on(b,function(b){!a._touchIsTouchEvent(b)&&a._touchIsEmulatedEvent(b)||(a.__pointerIsOverOrigin=!0,a._openShortly(b))})}if(a.__options.triggerClose.mouseleave||a.__options.triggerClose.touchleave&&h.hasTouchCapability){var
b="";a.__options.triggerClose.mouseleave&&(b+="mouseleave."+a.__namespace+"-triggerOpen
"),a.__options.triggerClose.touchleave&&h.hasTouchCapability&&(b+="touchend."+a.__namespace+"-triggerOpen
touchcancel."+a.__namespace+"-triggerOpen"),a._$origin.on(b,function(b){a._touchIsMeaningfulEvent(b)&&(a.__pointerIsOverOrigin=!1)})}return
a},__prepareTooltip:function(){var
b=this,c=b.__options.interactive?"auto":"";return
b._$tooltip.attr("id",b.__namespace).css({"pointer-events":c,zIndex:b.__options.zIndex}),a.each(b.__previousThemes,function(a,c){b._$tooltip.removeClass(c)}),a.each(b.__options.theme,function(a,c){b._$tooltip.addClass(c)}),b.__previousThemes=a.merge([],b.__options.theme),b},__scrollHandler:function(b){var
c=this;if(c.__options.triggerClose.scroll)c._close(b);else
if(d(c._$origin)&&d(c._$tooltip)){var
e=null;if(b.target===h.window.document)c.__Geometry.origin.fixedLineage||c.__options.repositionOnScroll&&c.reposition(b);else{e=c.__geometry();var
f=!1;if("fixed"!=c._$origin.css("position")&&c.__$originParents.each(function(b,c){var
d=a(c),g=d.css("overflow-x"),h=d.css("overflow-y");if("visible"!=g||"visible"!=h){var
i=c.getBoundingClientRect();if("visible"!=g&&(e.origin.windowOffset.left<i.left||e.origin.windowOffset.right>i.right))return
f=!0,!1;if("visible"!=h&&(e.origin.windowOffset.top<i.top||e.origin.windowOffset.bottom>i.bottom))return
f=!0,!1}return"fixed"==d.css("position")?!1:void
0}),f)c._$tooltip.css("visibility","hidden");else
if(c._$tooltip.css("visibility","visible"),c.__options.repositionOnScroll)c.reposition(b);else{var
g=e.origin.offset.left-c.__Geometry.origin.offset.left,i=e.origin.offset.top-c.__Geometry.origin.offset.top;c._$tooltip.css({left:c.__lastPosition.coord.left+g,top:c.__lastPosition.coord.top+i})}}c._trigger({type:"scroll",event:b,geo:e})}return
c},__stateSet:function(a){return
this.__state=a,this._trigger({type:"state",state:a}),this},__timeoutsClear:function(){return
clearTimeout(this.__timeouts.open),this.__timeouts.open=null,a.each(this.__timeouts.close,function(a,b){clearTimeout(b)}),this.__timeouts.close=[],this},__trackerStart:function(){var
a=this,b=a._$tooltip.find(".tooltipster-content");return
a.__options.trackTooltip&&(a.__contentBcr=b[0].getBoundingClientRect()),a.__tracker=setInterval(function(){if(d(a._$origin)&&d(a._$tooltip)){if(a.__options.trackOrigin){var
e=a.__geometry(),f=!1;c(e.origin.size,a.__Geometry.origin.size)&&(a.__Geometry.origin.fixedLineage?c(e.origin.windowOffset,a.__Geometry.origin.windowOffset)&&(f=!0):c(e.origin.offset,a.__Geometry.origin.offset)&&(f=!0)),f||(a.__options.triggerClose.mouseleave?a._close():a.reposition())}if(a.__options.trackTooltip){var
g=b[0].getBoundingClientRect();g.height===a.__contentBcr.height&&g.width===a.__contentBcr.width||(a.reposition(),a.__contentBcr=g)}}else
a._close()},a.__options.trackerInterval),a},_close:function(b,c,d){var
e=this,f=!0;if(e._trigger({type:"close",event:b,stop:function(){f=!1}}),f||d){c&&e.__callbacks.close.push(c),e.__callbacks.open=[],e.__timeoutsClear();var
g=function(){a.each(e.__callbacks.close,function(a,c){c.call(e,e,{event:b,origin:e._$origin[0]})}),e.__callbacks.close=[]};if("closed"!=e.__state){var
i=!0,j=new
Date,k=j.getTime(),l=k+e.__options.animationDuration[1];if("disappearing"==e.__state&&l>e.__closingTime&&e.__options.animationDuration[1]>0&&(i=!1),i){e.__closingTime=l,"disappearing"!=e.__state&&e.__stateSet("disappearing");var
m=function(){clearInterval(e.__tracker),e._trigger({type:"closing",event:b}),e._$tooltip.off("."+e.__namespace+"-triggerClose").removeClass("tooltipster-dying"),a(h.window).off("."+e.__namespace+"-triggerClose"),e.__$originParents.each(function(b,c){a(c).off("scroll."+e.__namespace+"-triggerClose")}),e.__$originParents=null,a(h.window.document.body).off("."+e.__namespace+"-triggerClose"),e._$origin.off("."+e.__namespace+"-triggerClose"),e._off("dismissable"),e.__stateSet("closed"),e._trigger({type:"after",event:b}),e.__options.functionAfter&&e.__options.functionAfter.call(e,e,{event:b,origin:e._$origin[0]}),g()};h.hasTransitions?(e._$tooltip.css({"-moz-animation-duration":e.__options.animationDuration[1]+"ms","-ms-animation-duration":e.__options.animationDuration[1]+"ms","-o-animation-duration":e.__options.animationDuration[1]+"ms","-webkit-animation-duration":e.__options.animationDuration[1]+"ms","animation-duration":e.__options.animationDuration[1]+"ms","transition-duration":e.__options.animationDuration[1]+"ms"}),e._$tooltip.clearQueue().removeClass("tooltipster-show").addClass("tooltipster-dying"),e.__options.animationDuration[1]>0&&e._$tooltip.delay(e.__options.animationDuration[1]),e._$tooltip.queue(m)):e._$tooltip.stop().fadeOut(e.__options.animationDuration[1],m)}}else
g()}return e},_off:function(){return
this.__$emitterPrivate.off.apply(this.__$emitterPrivate,Array.prototype.slice.apply(arguments)),this},_on:function(){return
this.__$emitterPrivate.on.apply(this.__$emitterPrivate,Array.prototype.slice.apply(arguments)),this},_one:function(){return
this.__$emitterPrivate.one.apply(this.__$emitterPrivate,Array.prototype.slice.apply(arguments)),this},_open:function(b,c){var
e=this;if(!e.__destroying&&d(e._$origin)&&e.__enabled){var
f=!0;if("closed"==e.__state&&(e._trigger({type:"before",event:b,stop:function(){f=!1}}),f&&e.__options.functionBefore&&(f=e.__options.functionBefore.call(e,e,{event:b,origin:e._$origin[0]}))),f!==!1&&null!==e.__Content){c&&e.__callbacks.open.push(c),e.__callbacks.close=[],e.__timeoutsClear();var
g,i=function(){"stable"!=e.__state&&e.__stateSet("stable"),a.each(e.__callbacks.open,function(a,b){b.call(e,e,{origin:e._$origin[0],tooltip:e._$tooltip[0]})}),e.__callbacks.open=[]};if("closed"!==e.__state)g=0,"disappearing"===e.__state?(e.__stateSet("appearing"),h.hasTransitions?(e._$tooltip.clearQueue().removeClass("tooltipster-dying").addClass("tooltipster-show"),e.__options.animationDuration[0]>0&&e._$tooltip.delay(e.__options.animationDuration[0]),e._$tooltip.queue(i)):e._$tooltip.stop().fadeIn(i)):"stable"==e.__state&&i();else{if(e.__stateSet("appearing"),g=e.__options.animationDuration[0],e.__contentInsert(),e.reposition(b,!0),h.hasTransitions?(e._$tooltip.addClass("tooltipster-"+e.__options.animation).addClass("tooltipster-initial").css({"-moz-animation-duration":e.__options.animationDuration[0]+"ms","-ms-animation-duration":e.__options.animationDuration[0]+"ms","-o-animation-duration":e.__options.animationDuration[0]+"ms","-webkit-animation-duration":e.__options.animationDuration[0]+"ms","animation-duration":e.__options.animationDuration[0]+"ms","transition-duration":e.__options.animationDuration[0]+"ms"}),setTimeout(function(){"closed"!=e.__state&&(e._$tooltip.addClass("tooltipster-show").removeClass("tooltipster-initial"),e.__options.animationDuration[0]>0&&e._$tooltip.delay(e.__options.animationDuration[0]),e._$tooltip.queue(i))},0)):e._$tooltip.css("display","none").fadeIn(e.__options.animationDuration[0],i),e.__trackerStart(),a(h.window).on("resize."+e.__namespace+"-triggerClose",function(b){var
c=a(document.activeElement);(c.is("input")||c.is("textarea"))&&a.contains(e._$tooltip[0],c[0])||e.reposition(b)}).on("scroll."+e.__namespace+"-triggerClose",function(a){e.__scrollHandler(a)}),e.__$originParents=e._$origin.parents(),e.__$originParents.each(function(b,c){a(c).on("scroll."+e.__namespace+"-triggerClose",function(a){e.__scrollHandler(a)})}),e.__options.triggerClose.mouseleave||e.__options.triggerClose.touchleave&&h.hasTouchCapability){e._on("dismissable",function(a){a.dismissable?a.delay?(m=setTimeout(function(){e._close(a.event)},a.delay),e.__timeouts.close.push(m)):e._close(a):clearTimeout(m)});var
j=e._$origin,k="",l="",m=null;e.__options.interactive&&(j=j.add(e._$tooltip)),e.__options.triggerClose.mouseleave&&(k+="mouseenter."+e.__namespace+"-triggerClose
",l+="mouseleave."+e.__namespace+"-triggerClose
"),e.__options.triggerClose.touchleave&&h.hasTouchCapability&&(k+="touchstart."+e.__namespace+"-triggerClose",l+="touchend."+e.__namespace+"-triggerClose
touchcancel."+e.__namespace+"-triggerClose"),j.on(l,function(a){if(e._touchIsTouchEvent(a)||!e._touchIsEmulatedEvent(a)){var
b="mouseleave"==a.type?e.__options.delay:e.__options.delayTouch;e._trigger({delay:b[1],dismissable:!0,event:a,type:"dismissable"})}}).on(k,function(a){!e._touchIsTouchEvent(a)&&e._touchIsEmulatedEvent(a)||e._trigger({dismissable:!1,event:a,type:"dismissable"})})}e.__options.triggerClose.originClick&&e._$origin.on("click."+e.__namespace+"-triggerClose",function(a){e._touchIsTouchEvent(a)||e._touchIsEmulatedEvent(a)||e._close(a)}),(e.__options.triggerClose.click||e.__options.triggerClose.tap&&h.hasTouchCapability)&&setTimeout(function(){if("closed"!=e.__state){var
b="",c=a(h.window.document.body);e.__options.triggerClose.click&&(b+="click."+e.__namespace+"-triggerClose
"),e.__options.triggerClose.tap&&h.hasTouchCapability&&(b+="touchend."+e.__namespace+"-triggerClose"),c.on(b,function(b){e._touchIsMeaningfulEvent(b)&&(e._touchRecordEvent(b),e.__options.interactive&&a.contains(e._$tooltip[0],b.target)||e._close(b))}),e.__options.triggerClose.tap&&h.hasTouchCapability&&c.on("touchstart."+e.__namespace+"-triggerClose",function(a){e._touchRecordEvent(a)})}},0),e._trigger("ready"),e.__options.functionReady&&e.__options.functionReady.call(e,e,{origin:e._$origin[0],tooltip:e._$tooltip[0]})}if(e.__options.timer>0){var
m=setTimeout(function(){e._close()},e.__options.timer+g);e.__timeouts.close.push(m)}}}return
e},_openShortly:function(a){var
b=this,c=!0;if("stable"!=b.__state&&"appearing"!=b.__state&&!b.__timeouts.open&&(b._trigger({type:"start",event:a,stop:function(){c=!1}}),c)){var
d=0==a.type.indexOf("touch")?b.__options.delayTouch:b.__options.delay;d[0]?b.__timeouts.open=setTimeout(function(){b.__timeouts.open=null,b.__pointerIsOverOrigin&&b._touchIsMeaningfulEvent(a)?(b._trigger("startend"),b._open(a)):b._trigger("startcancel")},d[0]):(b._trigger("startend"),b._open(a))}return
b},_optionsExtract:function(b,c){var
d=this,e=a.extend(!0,{},c),f=d.__options[b];return
f||(f={},a.each(c,function(a,b){var c=d.__options[a];void
0!==c&&(f[a]=c)})),a.each(e,function(b,c){void
0!==f[b]&&("object"!=typeof c||c instanceof
Array||null==c||"object"!=typeof f[b]||f[b]instanceof
Array||null==f[b]?e[b]=f[b]:a.extend(e[b],f[b]))}),e},_plug:function(b){var
c=a.tooltipster._plugin(b);if(!c)throw new Error('The
"'+b+'" plugin is not defined');return
c.instance&&a.tooltipster.__bridge(c.instance,this,c.name),this},_touchIsEmulatedEvent:function(a){for(var
b=!1,c=(new Date).getTime(),d=this.__touchEvents.length-1;d>=0;d--){var
e=this.__touchEvents[d];if(!(c-e.time<500))break;e.target===a.target&&(b=!0)}return
b},_touchIsMeaningfulEvent:function(a){return
this._touchIsTouchEvent(a)&&!this._touchSwiped(a.target)||!this._touchIsTouchEvent(a)&&!this._touchIsEmulatedEvent(a)},_touchIsTouchEvent:function(a){return
0==a.type.indexOf("touch")},_touchRecordEvent:function(a){return
this._touchIsTouchEvent(a)&&(a.time=(new
Date).getTime(),this.__touchEvents.push(a)),this},_touchSwiped:function(a){for(var
b=!1,c=this.__touchEvents.length-1;c>=0;c--){var
d=this.__touchEvents[c];if("touchmove"==d.type){b=!0;break}if("touchstart"==d.type&&a===d.target)break}return
b},_trigger:function(){var
b=Array.prototype.slice.apply(arguments);return"string"==typeof
b[0]&&(b[0]={type:b[0]}),b[0].instance=this,b[0].origin=this._$origin?this._$origin[0]:null,b[0].tooltip=this._$tooltip?this._$tooltip[0]:null,this.__$emitterPrivate.trigger.apply(this.__$emitterPrivate,b),a.tooltipster._trigger.apply(a.tooltipster,b),this.__$emitterPublic.trigger.apply(this.__$emitterPublic,b),this},_unplug:function(b){var
c=this;if(c[b]){var
d=a.tooltipster._plugin(b);d.instance&&a.each(d.instance,function(a,d){c[a]&&c[a].bridged===c[b]&&delete
c[a]}),c[b].__destroy&&c[b].__destroy(),delete c[b]}return
c},close:function(a){return
this.__destroyed?this.__destroyError():this._close(null,a),this},content:function(a){var
b=this;if(void 0===a)return
b.__Content;if(b.__destroyed)b.__destroyError();else
if(b.__contentSet(a),null!==b.__Content){if("closed"!==b.__state&&(b.__contentInsert(),b.reposition(),b.__options.updateAnimation))if(h.hasTransitions){var
c=b.__options.updateAnimation;b._$tooltip.addClass("tooltipster-update-"+c),setTimeout(function(){"closed"!=b.__state&&b._$tooltip.removeClass("tooltipster-update-"+c)},1e3)}else
b._$tooltip.fadeTo(200,.5,function(){"closed"!=b.__state&&b._$tooltip.fadeTo(200,1)})}else
b._close();return b},destroy:function(){var
b=this;if(b.__destroyed)b.__destroyError();else{"closed"!=b.__state?b.option("animationDuration",0)._close(null,null,!0):b.__timeoutsClear(),b._trigger("destroy"),b.__destroyed=!0,b._$origin.removeData(b.__namespace).off("."+b.__namespace+"-triggerOpen"),a(h.window.document.body).off("."+b.__namespace+"-triggerOpen");var
c=b._$origin.data("tooltipster-ns");if(c)if(1===c.length){var
d=null;"previous"==b.__options.restoration?d=b._$origin.data("tooltipster-initialTitle"):"current"==b.__options.restoration&&(d="string"==typeof
b.__Content?b.__Content:a("<div></div>").append(b.__Content).html()),d&&b._$origin.attr("title",d),b._$origin.removeClass("tooltipstered"),b._$origin.removeData("tooltipster-ns").removeData("tooltipster-initialTitle")}else
c=a.grep(c,function(a,c){return
a!==b.__namespace}),b._$origin.data("tooltipster-ns",c);b._trigger("destroyed"),b._off(),b.off(),b.__Content=null,b.__$emitterPrivate=null,b.__$emitterPublic=null,b.__options.parent=null,b._$origin=null,b._$tooltip=null,a.tooltipster.__instancesLatestArr=a.grep(a.tooltipster.__instancesLatestArr,function(a,c){return
b!==a}),clearInterval(b.__garbageCollector)}return
b},disable:function(){return
this.__destroyed?(this.__destroyError(),this):(this._close(),this.__enabled=!1,this)},elementOrigin:function(){return
this.__destroyed?void
this.__destroyError():this._$origin[0]},elementTooltip:function(){return
this._$tooltip?this._$tooltip[0]:null},enable:function(){return
this.__enabled=!0,this},hide:function(a){return
this.close(a)},instance:function(){return this},off:function(){return
this.__destroyed||this.__$emitterPublic.off.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},on:function(){return
this.__destroyed?this.__destroyError():this.__$emitterPublic.on.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},one:function(){return
this.__destroyed?this.__destroyError():this.__$emitterPublic.one.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},open:function(a){return
this.__destroyed?this.__destroyError():this._open(null,a),this},option:function(b,c){return
void
0===c?this.__options[b]:(this.__destroyed?this.__destroyError():(this.__options[b]=c,this.__optionsFormat(),a.inArray(b,["trigger","triggerClose","triggerOpen"])>=0&&this.__prepareOrigin(),"selfDestruction"===b&&this.__prepareGC()),this)},reposition:function(a,b){var
c=this;return
c.__destroyed?c.__destroyError():"closed"!=c.__state&&d(c._$origin)&&(b||d(c._$tooltip))&&(b||c._$tooltip.detach(),c.__Geometry=c.__geometry(),c._trigger({type:"reposition",event:a,helper:{geo:c.__Geometry}})),c},show:function(a){return
this.open(a)},status:function(){return{destroyed:this.__destroyed,enabled:this.__enabled,open:"closed"!==this.__state,state:this.__state}},triggerHandler:function(){return
this.__destroyed?this.__destroyError():this.__$emitterPublic.triggerHandler.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this}},a.fn.tooltipster=function(){var
b=Array.prototype.slice.apply(arguments),c="You are using a single
HTML element as content for several tooltips. You probably want to set the
contentCloning option to TRUE.";if(0===this.length)return
this;if("string"==typeof b[0]){var d="#*$~&";return
this.each(function(){var
e=a(this).data("tooltipster-ns"),f=e?a(this).data(e[0]):null;if(!f)throw
new Error("You called Tooltipster's
\""+b[0]+'" method on an uninitialized
element');if("function"!=typeof f[b[0]])throw new
Error('Unknown method
"'+b[0]+'"');this.length>1&&"content"==b[0]&&(b[1]instanceof
a||"object"==typeof
b[1]&&null!=b[1]&&b[1].tagName)&&!f.__options.contentCloning&&f.__options.debug&&console.log(c);var
g=f[b[0]](b[1],b[2]);return
g!==f||"instance"===b[0]?(d=g,!1):void
0}),"#*$~&"!==d?d:this}a.tooltipster.__instancesLatestArr=[];var
e=b[0]&&void
0!==b[0].multiple,g=e&&b[0].multiple||!e&&f.multiple,h=b[0]&&void
0!==b[0].content,i=h&&b[0].content||!h&&f.content,j=b[0]&&void
0!==b[0].contentCloning,k=j&&b[0].contentCloning||!j&&f.contentCloning,l=b[0]&&void
0!==b[0].debug,m=l&&b[0].debug||!l&&f.debug;return
this.length>1&&(i instanceof a||"object"==typeof
i&&null!=i&&i.tagName)&&!k&&m&&console.log(c),this.each(function(){var
c=!1,d=a(this),e=d.data("tooltipster-ns"),f=null;e?g?c=!0:m&&(console.log("Tooltipster:
one or more tooltips are already attached to the element below.
Ignoring."),console.log(this)):c=!0,c&&(f=new
a.Tooltipster(this,b[0]),e||(e=[]),e.push(f.__namespace),d.data("tooltipster-ns",e),d.data(f.__namespace,f),f.__options.functionInit&&f.__options.functionInit.call(f,f,{origin:this}),f._trigger("init")),a.tooltipster.__instancesLatestArr.push(f)}),this},b.prototype={__init:function(b){this.__$tooltip=b,this.__$tooltip.css({left:0,overflow:"hidden",position:"absolute",top:0}).find(".tooltipster-content").css("overflow","auto"),this.$container=a('<div
class="tooltipster-ruler"></div>').append(this.__$tooltip).appendTo(h.window.document.body)},__forceRedraw:function(){var
a=this.__$tooltip.parent();this.__$tooltip.detach(),this.__$tooltip.appendTo(a)},constrain:function(a,b){return
this.constraints={width:a,height:b},this.__$tooltip.css({display:"block",height:"",overflow:"auto",width:a}),this},destroy:function(){this.__$tooltip.detach().find(".tooltipster-content").css({display:"",overflow:""}),this.$container.remove()},free:function(){return
this.constraints=null,this.__$tooltip.css({display:"",height:"",overflow:"visible",width:""}),this},measure:function(){this.__forceRedraw();var
a=this.__$tooltip[0].getBoundingClientRect(),b={size:{height:a.height||a.bottom-a.top,width:a.width||a.right-a.left}};if(this.constraints){var
c=this.__$tooltip.find(".tooltipster-content"),d=this.__$tooltip.outerHeight(),e=c[0].getBoundingClientRect(),f={height:d<=this.constraints.height,width:a.width<=this.constraints.width&&e.width>=c[0].scrollWidth-1};b.fits=f.height&&f.width}return
h.IE&&h.IE<=11&&b.size.width!==h.window.document.documentElement.clientWidth&&(b.size.width=Math.ceil(b.size.width)+1),b}};var
j=navigator.userAgent.toLowerCase();-1!=j.indexOf("msie")?h.IE=parseInt(j.split("msie")[1]):-1!==j.toLowerCase().indexOf("trident")&&-1!==j.indexOf("
rv:11")?h.IE=11:-1!=j.toLowerCase().indexOf("edge/")&&(h.IE=parseInt(j.toLowerCase().split("edge/")[1]));var
k="tooltipster.sideTip";return
a.tooltipster._plugin({name:k,instance:{__defaults:function(){return{arrow:!0,distance:6,functionPosition:null,maxWidth:null,minIntersection:16,minWidth:0,position:null,side:"top",viewportAware:!0}},__init:function(a){var
b=this;b.__instance=a,b.__namespace="tooltipster-sideTip-"+Math.round(1e6*Math.random()),b.__previousState="closed",b.__options,b.__optionsFormat(),b.__instance._on("state."+b.__namespace,function(a){"closed"==a.state?b.__close():"appearing"==a.state&&"closed"==b.__previousState&&b.__create(),b.__previousState=a.state}),b.__instance._on("options."+b.__namespace,function(){b.__optionsFormat()}),b.__instance._on("reposition."+b.__namespace,function(a){b.__reposition(a.event,a.helper)})},__close:function(){this.__instance.content()instanceof
a&&this.__instance.content().detach(),this.__instance._$tooltip.remove(),this.__instance._$tooltip=null},__create:function(){var
b=a('<div class="tooltipster-base
tooltipster-sidetip"><div
class="tooltipster-box"><div
class="tooltipster-content"></div></div><div
class="tooltipster-arrow"><div
class="tooltipster-arrow-uncropped"><div
class="tooltipster-arrow-border"></div><div
class="tooltipster-arrow-background"></div></div></div></div>');this.__options.arrow||b.find(".tooltipster-box").css("margin",0).end().find(".tooltipster-arrow").hide(),this.__options.minWidth&&b.css("min-width",this.__options.minWidth+"px"),this.__options.maxWidth&&b.css("max-width",this.__options.maxWidth+"px"),
this.__instance._$tooltip=b,this.__instance._trigger("created")},__destroy:function(){this.__instance._off("."+self.__namespace)},__optionsFormat:function(){var
b=this;if(b.__options=b.__instance._optionsExtract(k,b.__defaults()),b.__options.position&&(b.__options.side=b.__options.position),"object"!=typeof
b.__options.distance&&(b.__options.distance=[b.__options.distance]),b.__options.distance.length<4&&(void
0===b.__options.distance[1]&&(b.__options.distance[1]=b.__options.distance[0]),void
0===b.__options.distance[2]&&(b.__options.distance[2]=b.__options.distance[0]),void
0===b.__options.distance[3]&&(b.__options.distance[3]=b.__options.distance[1])),b.__options.distance={top:b.__options.distance[0],right:b.__options.distance[1],bottom:b.__options.distance[2],left:b.__options.distance[3]},"string"==typeof
b.__options.side){var
c={top:"bottom",right:"left",bottom:"top",left:"right"};b.__options.side=[b.__options.side,c[b.__options.side]],"left"==b.__options.side[0]||"right"==b.__options.side[0]?b.__options.side.push("top","bottom"):b.__options.side.push("right","left")}6===a.tooltipster._env.IE&&b.__options.arrow!==!0&&(b.__options.arrow=!1)},__reposition:function(b,c){var
d,e=this,f=e.__targetFind(c),g=[];e.__instance._$tooltip.detach();var
h=e.__instance._$tooltip.clone(),i=a.tooltipster._getRuler(h),j=!1,k=e.__instance.option("animation");switch(k&&h.removeClass("tooltipster-"+k),a.each(["window","document"],function(d,k){var
l=null;if(e.__instance._trigger({container:k,helper:c,satisfied:j,takeTest:function(a){l=a},results:g,type:"positionTest"}),1==l||0!=l&&0==j&&("window"!=k||e.__options.viewportAware))for(var
d=0;d<e.__options.side.length;d++){var
m={horizontal:0,vertical:0},n=e.__options.side[d];"top"==n||"bottom"==n?m.vertical=e.__options.distance[n]:m.horizontal=e.__options.distance[n],e.__sideChange(h,n),a.each(["natural","constrained"],function(a,d){if(l=null,e.__instance._trigger({container:k,event:b,helper:c,mode:d,results:g,satisfied:j,side:n,takeTest:function(a){l=a},type:"positionTest"}),1==l||0!=l&&0==j){var
h={container:k,distance:m,fits:null,mode:d,outerSize:null,side:n,size:null,target:f[n],whole:null},o="natural"==d?i.free():i.constrain(c.geo.available[k][n].width-m.horizontal,c.geo.available[k][n].height-m.vertical),p=o.measure();if(h.size=p.size,h.outerSize={height:p.size.height+m.vertical,width:p.size.width+m.horizontal},"natural"==d?c.geo.available[k][n].width>=h.outerSize.width&&c.geo.available[k][n].height>=h.outerSize.height?h.fits=!0:h.fits=!1:h.fits=p.fits,"window"==k&&(h.fits?"top"==n||"bottom"==n?h.whole=c.geo.origin.windowOffset.right>=e.__options.minIntersection&&c.geo.window.size.width-c.geo.origin.windowOffset.left>=e.__options.minIntersection:h.whole=c.geo.origin.windowOffset.bottom>=e.__options.minIntersection&&c.geo.window.size.height-c.geo.origin.windowOffset.top>=e.__options.minIntersection:h.whole=!1),g.push(h),h.whole)j=!0;else
if("natural"==h.mode&&(h.fits||h.size.width<=c.geo.available[k][n].width))return!1}})}}),e.__instance._trigger({edit:function(a){g=a},event:b,helper:c,results:g,type:"positionTested"}),g.sort(function(a,b){if(a.whole&&!b.whole)return-1;if(!a.whole&&b.whole)return
1;if(a.whole&&b.whole){var
c=e.__options.side.indexOf(a.side),d=e.__options.side.indexOf(b.side);return
d>c?-1:c>d?1:"natural"==a.mode?-1:1}if(a.fits&&!b.fits)return-1;if(!a.fits&&b.fits)return
1;if(a.fits&&b.fits){var
c=e.__options.side.indexOf(a.side),d=e.__options.side.indexOf(b.side);return
d>c?-1:c>d?1:"natural"==a.mode?-1:1}return"document"==a.container&&"bottom"==a.side&&"natural"==a.mode?-1:1}),d=g[0],d.coord={},d.side){case"left":case"right":d.coord.top=Math.floor(d.target-d.size.height/2);break;case"bottom":case"top":d.coord.left=Math.floor(d.target-d.size.width/2)}switch(d.side){case"left":d.coord.left=c.geo.origin.windowOffset.left-d.outerSize.width;break;case"right":d.coord.left=c.geo.origin.windowOffset.right+d.distance.horizontal;break;case"top":d.coord.top=c.geo.origin.windowOffset.top-d.outerSize.height;break;case"bottom":d.coord.top=c.geo.origin.windowOffset.bottom+d.distance.vertical}"window"==d.container?"top"==d.side||"bottom"==d.side?d.coord.left<0?c.geo.origin.windowOffset.right-this.__options.minIntersection>=0?d.coord.left=0:d.coord.left=c.geo.origin.windowOffset.right-this.__options.minIntersection-1:d.coord.left>c.geo.window.size.width-d.size.width&&(c.geo.origin.windowOffset.left+this.__options.minIntersection<=c.geo.window.size.width?d.coord.left=c.geo.window.size.width-d.size.width:d.coord.left=c.geo.origin.windowOffset.left+this.__options.minIntersection+1-d.size.width):d.coord.top<0?c.geo.origin.windowOffset.bottom-this.__options.minIntersection>=0?d.coord.top=0:d.coord.top=c.geo.origin.windowOffset.bottom-this.__options.minIntersection-1:d.coord.top>c.geo.window.size.height-d.size.height&&(c.geo.origin.windowOffset.top+this.__options.minIntersection<=c.geo.window.size.height?d.coord.top=c.geo.window.size.height-d.size.height:d.coord.top=c.geo.origin.windowOffset.top+this.__options.minIntersection+1-d.size.height):(d.coord.left>c.geo.window.size.width-d.size.width&&(d.coord.left=c.geo.window.size.width-d.size.width),d.coord.left<0&&(d.coord.left=0)),e.__sideChange(h,d.side),c.tooltipClone=h[0],c.tooltipParent=e.__instance.option("parent").parent[0],c.mode=d.mode,c.whole=d.whole,c.origin=e.__instance._$origin[0],c.tooltip=e.__instance._$tooltip[0],delete
d.container,delete d.fits,delete d.mode,delete d.outerSize,delete
d.whole,d.distance=d.distance.horizontal||d.distance.vertical;var
l=a.extend(!0,{},d);if(e.__instance._trigger({edit:function(a){d=a},event:b,helper:c,position:l,type:"position"}),e.__options.functionPosition){var
m=e.__options.functionPosition.call(e,e.__instance,c,l);m&&(d=m)}i.destroy();var
n,o;"top"==d.side||"bottom"==d.side?(n={prop:"left",val:d.target-d.coord.left},o=d.size.width-this.__options.minIntersection):(n={prop:"top",val:d.target-d.coord.top},o=d.size.height-this.__options.minIntersection),n.val<this.__options.minIntersection?n.val=this.__options.minIntersection:n.val>o&&(n.val=o);var
p;p=c.geo.origin.fixedLineage?c.geo.origin.windowOffset:{left:c.geo.origin.windowOffset.left+c.geo.window.scroll.left,top:c.geo.origin.windowOffset.top+c.geo.window.scroll.top},d.coord={left:p.left+(d.coord.left-c.geo.origin.windowOffset.left),top:p.top+(d.coord.top-c.geo.origin.windowOffset.top)},e.__sideChange(e.__instance._$tooltip,d.side),c.geo.origin.fixedLineage?e.__instance._$tooltip.css("position","fixed"):e.__instance._$tooltip.css("position",""),e.__instance._$tooltip.css({left:d.coord.left,top:d.coord.top,height:d.size.height,width:d.size.width}).find(".tooltipster-arrow").css({left:"",top:""}).css(n.prop,n.val),e.__instance._$tooltip.appendTo(e.__instance.option("parent")),e.__instance._trigger({type:"repositioned",event:b,position:d})},__sideChange:function(a,b){a.removeClass("tooltipster-bottom").removeClass("tooltipster-left").removeClass("tooltipster-right").removeClass("tooltipster-top").addClass("tooltipster-"+b)},__targetFind:function(a){var
b={},c=this.__instance._$origin[0].getClientRects();if(c.length>1){var
d=this.__instance._$origin.css("opacity");1==d&&(this.__instance._$origin.css("opacity",.99),c=this.__instance._$origin[0].getClientRects(),this.__instance._$origin.css("opacity",1))}if(c.length<2)b.top=Math.floor(a.geo.origin.windowOffset.left+a.geo.origin.size.width/2),b.bottom=b.top,b.left=Math.floor(a.geo.origin.windowOffset.top+a.geo.origin.size.height/2),b.right=b.left;else{var
e=c[0];b.top=Math.floor(e.left+(e.right-e.left)/2),e=c.length>2?c[Math.ceil(c.length/2)-1]:c[0],b.right=Math.floor(e.top+(e.bottom-e.top)/2),e=c[c.length-1],b.bottom=Math.floor(e.left+(e.right-e.left)/2),e=c.length>2?c[Math.ceil((c.length+1)/2)-1]:c[c.length-1],b.left=Math.floor(e.top+(e.bottom-e.top)/2)}return
b}}}),a});default.js000064400000001052151167412130006525 0ustar00function
extractionMethodHandler(target, prefix)
{
jQuery(function ($) {
$em = $(target);
displayStyle = ($em.val() === 'direct') ? 'none' :
'table-row';
document.getElementById(prefix + '_hostname').style.display =
displayStyle;
document.getElementById(prefix + '_port').style.display =
displayStyle;
document.getElementById(prefix + '_username').style.display =
displayStyle;
document.getElementById(prefix + '_password').style.display =
displayStyle;
document.getElementById(prefix + '_directory').style.display =
displayStyle;
});
}
default.min.js000064400000000701151167412130007307 0ustar00function
extractionMethodHandler(e,t){jQuery(function(l){$em=l(e),displayStyle="direct"===$em.val()?"none":"table-row",document.getElementById(t+"_hostname").style.display=displayStyle,document.getElementById(t+"_port").style.display=displayStyle,document.getElementById(t+"_username").style.display=displayStyle,document.getElementById(t+"_password").style.display=displayStyle,document.getElementById(t+"_directory").style.display=displayStyle})}
encryption.js000064400000046064151167412130007307 0ustar00/* - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - */
/* AES implementation in JavaScript (c) Chris Veness 2005-2010
*/
/* - see http://csrc.nist.gov/publications/PubsFIPS.html#197
*/
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - */
var Aes = {}; // Aes namespace
/**
* AES Cipher function: encrypt 'input' state with Rijndael
algorithm
* applies Nr rounds (10/12/14) using key schedule w for 'add round
key' stage
*
* @param {Number[]} input 16-byte (128-bit) input state array
* @param {Number[][]} w Key schedule as 2D byte-array (Nr+1 x Nb bytes)
* @returns {Number[]} Encrypted output state array
*/
Aes.Cipher = function(input, w) { // main Cipher function [§5.1]
var Nb = 4; // block size (in words): no of columns in
state (fixed at 4 for AES)
var Nr = w.length/Nb - 1; // no of rounds: 10/12/14 for 128/192/256-bit
keys
var state = [[],[],[],[]]; // initialise 4xNb byte-array
'state' with input [§3.4]
for (var i=0; i<4*Nb; i++) state[i%4][Math.floor(i/4)] = input[i];
state = Aes.AddRoundKey(state, w, 0, Nb);
for (var round=1; round<Nr; round++) {
state = Aes.SubBytes(state, Nb);
state = Aes.ShiftRows(state, Nb);
state = Aes.MixColumns(state, Nb);
state = Aes.AddRoundKey(state, w, round, Nb);
}
state = Aes.SubBytes(state, Nb);
state = Aes.ShiftRows(state, Nb);
state = Aes.AddRoundKey(state, w, Nr, Nb);
var output = new Array(4*Nb); // convert state to 1-d array before
returning [§3.4]
for (var i=0; i<4*Nb; i++) output[i] = state[i%4][Math.floor(i/4)];
return output;
}
/**
* Perform Key Expansion to generate a Key Schedule
*
* @param {Number[]} key Key as 16/24/32-byte array
* @returns {Number[][]} Expanded key schedule as 2D byte-array (Nr+1 x Nb
bytes)
*/
Aes.KeyExpansion = function(key) { // generate Key Schedule (byte-array
Nr+1 x Nb) from Key [§5.2]
var Nb = 4; // block size (in words): no of columns in state
(fixed at 4 for AES)
var Nk = key.length/4 // key length (in words): 4/6/8 for
128/192/256-bit keys
var Nr = Nk + 6; // no of rounds: 10/12/14 for 128/192/256-bit keys
var w = new Array(Nb*(Nr+1));
var temp = new Array(4);
for (var i=0; i<Nk; i++) {
var r = [key[4*i], key[4*i+1], key[4*i+2], key[4*i+3]];
w[i] = r;
}
for (var i=Nk; i<(Nb*(Nr+1)); i++) {
w[i] = new Array(4);
for (var t=0; t<4; t++) temp[t] = w[i-1][t];
if (i % Nk == 0) {
temp = Aes.SubWord(Aes.RotWord(temp));
for (var t=0; t<4; t++) temp[t] ^= Aes.Rcon[i/Nk][t];
} else if (Nk > 6 && i%Nk == 4) {
temp = Aes.SubWord(temp);
}
for (var t=0; t<4; t++) w[i][t] = w[i-Nk][t] ^ temp[t];
}
return w;
}
/*
* ---- remaining routines are private, not called externally ----
*/
Aes.SubBytes = function(s, Nb) { // apply SBox to state S [§5.1.1]
for (var r=0; r<4; r++) {
for (var c=0; c<Nb; c++) s[r][c] = Aes.Sbox[s[r][c]];
}
return s;
}
Aes.ShiftRows = function(s, Nb) { // shift row r of state S left by r
bytes [§5.1.2]
var t = new Array(4);
for (var r=1; r<4; r++) {
for (var c=0; c<4; c++) t[c] = s[r][(c+r)%Nb]; // shift into temp
copy
for (var c=0; c<4; c++) s[r][c] = t[c]; // and copy back
} // note that this will work for Nb=4,5,6, but not 7,8 (always
4 for AES):
return s; // see
asmaes.sourceforge.net/rijndael/rijndaelImplementation.pdf
}
Aes.MixColumns = function(s, Nb) { // combine bytes of each col of state
S [§5.1.3]
for (var c=0; c<4; c++) {
var a = new Array(4); // 'a' is a copy of the current column
from 's'
var b = new Array(4); // 'b' is a•{02} in GF(2^8)
for (var i=0; i<4; i++) {
a[i] = s[i][c];
b[i] = s[i][c]&0x80 ? s[i][c]<<1 ^ 0x011b :
s[i][c]<<1;
}
// a[n] ^ b[n] is a•{03} in GF(2^8)
s[0][c] = b[0] ^ a[1] ^ b[1] ^ a[2] ^ a[3]; // 2*a0 + 3*a1 + a2 + a3
s[1][c] = a[0] ^ b[1] ^ a[2] ^ b[2] ^ a[3]; // a0 * 2*a1 + 3*a2 + a3
s[2][c] = a[0] ^ a[1] ^ b[2] ^ a[3] ^ b[3]; // a0 + a1 + 2*a2 + 3*a3
s[3][c] = a[0] ^ b[0] ^ a[1] ^ a[2] ^ b[3]; // 3*a0 + a1 + a2 + 2*a3
}
return s;
}
Aes.AddRoundKey = function(state, w, rnd, Nb) { // xor Round Key into
state S [§5.1.4]
for (var r=0; r<4; r++) {
for (var c=0; c<Nb; c++) state[r][c] ^= w[rnd*4+c][r];
}
return state;
}
Aes.SubWord = function(w) { // apply SBox to 4-byte word w
for (var i=0; i<4; i++) w[i] = Aes.Sbox[w[i]];
return w;
}
Aes.RotWord = function(w) { // rotate 4-byte word w left by one byte
var tmp = w[0];
for (var i=0; i<3; i++) w[i] = w[i+1];
w[3] = tmp;
return w;
}
// Sbox is pre-computed multiplicative inverse in GF(2^8) used in SubBytes
and KeyExpansion [§5.1.1]
Aes.Sbox =
[0x63,0x7c,0x77,0x7b,0xf2,0x6b,0x6f,0xc5,0x30,0x01,0x67,0x2b,0xfe,0xd7,0xab,0x76,
0xca,0x82,0xc9,0x7d,0xfa,0x59,0x47,0xf0,0xad,0xd4,0xa2,0xaf,0x9c,0xa4,0x72,0xc0,
0xb7,0xfd,0x93,0x26,0x36,0x3f,0xf7,0xcc,0x34,0xa5,0xe5,0xf1,0x71,0xd8,0x31,0x15,
0x04,0xc7,0x23,0xc3,0x18,0x96,0x05,0x9a,0x07,0x12,0x80,0xe2,0xeb,0x27,0xb2,0x75,
0x09,0x83,0x2c,0x1a,0x1b,0x6e,0x5a,0xa0,0x52,0x3b,0xd6,0xb3,0x29,0xe3,0x2f,0x84,
0x53,0xd1,0x00,0xed,0x20,0xfc,0xb1,0x5b,0x6a,0xcb,0xbe,0x39,0x4a,0x4c,0x58,0xcf,
0xd0,0xef,0xaa,0xfb,0x43,0x4d,0x33,0x85,0x45,0xf9,0x02,0x7f,0x50,0x3c,0x9f,0xa8,
0x51,0xa3,0x40,0x8f,0x92,0x9d,0x38,0xf5,0xbc,0xb6,0xda,0x21,0x10,0xff,0xf3,0xd2,
0xcd,0x0c,0x13,0xec,0x5f,0x97,0x44,0x17,0xc4,0xa7,0x7e,0x3d,0x64,0x5d,0x19,0x73,
0x60,0x81,0x4f,0xdc,0x22,0x2a,0x90,0x88,0x46,0xee,0xb8,0x14,0xde,0x5e,0x0b,0xdb,
0xe0,0x32,0x3a,0x0a,0x49,0x06,0x24,0x5c,0xc2,0xd3,0xac,0x62,0x91,0x95,0xe4,0x79,
0xe7,0xc8,0x37,0x6d,0x8d,0xd5,0x4e,0xa9,0x6c,0x56,0xf4,0xea,0x65,0x7a,0xae,0x08,
0xba,0x78,0x25,0x2e,0x1c,0xa6,0xb4,0xc6,0xe8,0xdd,0x74,0x1f,0x4b,0xbd,0x8b,0x8a,
0x70,0x3e,0xb5,0x66,0x48,0x03,0xf6,0x0e,0x61,0x35,0x57,0xb9,0x86,0xc1,0x1d,0x9e,
0xe1,0xf8,0x98,0x11,0x69,0xd9,0x8e,0x94,0x9b,0x1e,0x87,0xe9,0xce,0x55,0x28,0xdf,
0x8c,0xa1,0x89,0x0d,0xbf,0xe6,0x42,0x68,0x41,0x99,0x2d,0x0f,0xb0,0x54,0xbb,0x16];
// Rcon is Round Constant used for the Key Expansion [1st col is 2^(r-1) in
GF(2^8)] [§5.2]
Aes.Rcon = [ [0x00, 0x00, 0x00, 0x00],
[0x01, 0x00, 0x00, 0x00],
[0x02, 0x00, 0x00, 0x00],
[0x04, 0x00, 0x00, 0x00],
[0x08, 0x00, 0x00, 0x00],
[0x10, 0x00, 0x00, 0x00],
[0x20, 0x00, 0x00, 0x00],
[0x40, 0x00, 0x00, 0x00],
[0x80, 0x00, 0x00, 0x00],
[0x1b, 0x00, 0x00, 0x00],
[0x36, 0x00, 0x00, 0x00] ];
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - */
/* AES Counter-mode implementation in JavaScript (c) Chris Veness
2005-2010 */
/* - see http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf
*/
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - */
var AesCtr = {}; // AesCtr namespace
/**
* Encrypt a text using AES encryption in Counter mode of operation
*
* Unicode multi-byte character safe
*
* @param {String} plaintext Source text to be encrypted
* @param {String} password The password to use to generate a key
* @param {Number} nBits Number of bits to be used in the key (128,
192, or 256)
* @returns {string} Encrypted text
*/
AesCtr.encrypt = function(plaintext, password, nBits) {
var blockSize = 16; // block size fixed at 16 bytes / 128 bits (Nb=4)
for AES
if (!(nBits==128 || nBits==192 || nBits==256)) return ''; //
standard allows 128/192/256 bit keys
plaintext = Utf8.encode(plaintext);
password = Utf8.encode(password);
//var t = new Date(); // timer
// use AES itself to encrypt password to get cipher key (using plain
password as source for key
// expansion) - gives us well encrypted key
var nBytes = nBits/8; // no bytes in key
var pwBytes = new Array(nBytes);
for (var i=0; i<nBytes; i++) {
pwBytes[i] = isNaN(password.charCodeAt(i)) ? 0 :
password.charCodeAt(i);
}
var key = Aes.Cipher(pwBytes, Aes.KeyExpansion(pwBytes)); // gives us
16-byte key
key = key.concat(key.slice(0, nBytes-16)); // expand key to 16/24/32
bytes long
// initialise counter block (NIST SP800-38A §B.2): millisecond
time-stamp for nonce in 1st 8 bytes,
// block counter in 2nd 8 bytes
var counterBlock = new Array(blockSize);
var nonce = (new Date()).getTime(); // timestamp: milliseconds since
1-Jan-1970
var nonceSec = Math.floor(nonce/1000);
var nonceMs = nonce%1000;
// encode nonce with seconds in 1st 4 bytes, and (repeated) ms part
filling 2nd 4 bytes
for (var i=0; i<4; i++) counterBlock[i] = (nonceSec >>> i*8)
& 0xff;
for (var i=0; i<4; i++) counterBlock[i+4] = nonceMs & 0xff;
// and convert it to a string to go on the front of the ciphertext
var ctrTxt = '';
for (var i=0; i<8; i++) ctrTxt +=
String.fromCharCode(counterBlock[i]);
// generate key schedule - an expansion of the key into distinct Key
Rounds for each round
var keySchedule = Aes.KeyExpansion(key);
var blockCount = Math.ceil(plaintext.length/blockSize);
var ciphertxt = new Array(blockCount); // ciphertext as array of strings
for (var b=0; b<blockCount; b++) {
// set counter (block #) in last 8 bytes of counter block (leaving
nonce in 1st 8 bytes)
// done in two stages for 32-bit ops: using two words allows us to go
past 2^32 blocks (68GB)
for (var c=0; c<4; c++) counterBlock[15-c] = (b >>> c*8)
& 0xff;
for (var c=0; c<4; c++) counterBlock[15-c-4] = (b/0x100000000
>>> c*8)
var cipherCntr = Aes.Cipher(counterBlock, keySchedule); // -- encrypt
counter block --
// block size is reduced on final block
var blockLength = b<blockCount-1 ? blockSize :
(plaintext.length-1)%blockSize+1;
var cipherChar = new Array(blockLength);
for (var i=0; i<blockLength; i++) { // -- xor plaintext with
ciphered counter char-by-char --
cipherChar[i] = cipherCntr[i] ^ plaintext.charCodeAt(b*blockSize+i);
cipherChar[i] = String.fromCharCode(cipherChar[i]);
}
ciphertxt[b] = cipherChar.join('');
}
// Array.join is more efficient than repeated string concatenation in IE
var ciphertext = ctrTxt + ciphertxt.join('');
ciphertext = Base64.encode(ciphertext); // encode in base64
//alert((new Date()) - t);
return ciphertext;
}
/**
* Decrypt a text encrypted by AES in counter mode of operation
*
* @param {String} ciphertext Source text to be encrypted
* @param {String} password The password to use to generate a key
* @param {Number} nBits Number of bits to be used in the key (128,
192, or 256)
* @returns {String} Decrypted text
*/
AesCtr.decrypt = function(ciphertext, password, nBits) {
var blockSize = 16; // block size fixed at 16 bytes / 128 bits (Nb=4)
for AES
if (!(nBits==128 || nBits==192 || nBits==256)) return ''; //
standard allows 128/192/256 bit keys
ciphertext = Base64.decode(ciphertext);
password = Utf8.encode(password);
//var t = new Date(); // timer
// use AES to encrypt password (mirroring encrypt routine)
var nBytes = nBits/8; // no bytes in key
var pwBytes = new Array(nBytes);
for (var i=0; i<nBytes; i++) {
pwBytes[i] = isNaN(password.charCodeAt(i)) ? 0 :
password.charCodeAt(i);
}
var key = Aes.Cipher(pwBytes, Aes.KeyExpansion(pwBytes));
key = key.concat(key.slice(0, nBytes-16)); // expand key to 16/24/32
bytes long
// recover nonce from 1st 8 bytes of ciphertext
var counterBlock = new Array(8);
ctrTxt = ciphertext.slice(0, 8);
for (var i=0; i<8; i++) counterBlock[i] = ctrTxt.charCodeAt(i);
// generate key schedule
var keySchedule = Aes.KeyExpansion(key);
// separate ciphertext into blocks (skipping past initial 8 bytes)
var nBlocks = Math.ceil((ciphertext.length-8) / blockSize);
var ct = new Array(nBlocks);
for (var b=0; b<nBlocks; b++) ct[b] = ciphertext.slice(8+b*blockSize,
8+b*blockSize+blockSize);
ciphertext = ct; // ciphertext is now array of block-length strings
// plaintext will get generated block-by-block into array of block-length
strings
var plaintxt = new Array(ciphertext.length);
for (var b=0; b<nBlocks; b++) {
// set counter (block #) in last 8 bytes of counter block (leaving
nonce in 1st 8 bytes)
for (var c=0; c<4; c++) counterBlock[15-c] = ((b) >>> c*8)
& 0xff;
for (var c=0; c<4; c++) counterBlock[15-c-4] =
(((b+1)/0x100000000-1) >>> c*8) & 0xff;
var cipherCntr = Aes.Cipher(counterBlock, keySchedule); // encrypt
counter block
var plaintxtByte = new Array(ciphertext[b].length);
for (var i=0; i<ciphertext[b].length; i++) {
// -- xor plaintxt with ciphered counter byte-by-byte --
plaintxtByte[i] = cipherCntr[i] ^ ciphertext[b].charCodeAt(i);
plaintxtByte[i] = String.fromCharCode(plaintxtByte[i]);
}
plaintxt[b] = plaintxtByte.join('');
}
// join array of blocks into single plaintext string
var plaintext = plaintxt.join('');
plaintext = Utf8.decode(plaintext); // decode from UTF8 back to Unicode
multi-byte chars
//alert((new Date()) - t);
return plaintext;
}
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - */
/* Base64 class: Base 64 encoding / decoding (c) Chris Veness 2002-2010
*/
/* note: depends on Utf8 class
*/
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - */
var Base64 = {}; // Base64 namespace
Base64.code =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
/**
* Encode string into Base64, as defined by RFC 4648
[http://tools.ietf.org/html/rfc4648]
* (instance method extending String object). As per RFC 4648, no newlines
are added.
*
* @param {String} str The string to be encoded as base-64
* @param {Boolean} [utf8encode=false] Flag to indicate whether str is
Unicode string to be encoded
* to UTF8 before conversion to base64; otherwise string is assumed to be
8-bit characters
* @returns {String} Base64-encoded string
*/
Base64.encode = function(str, utf8encode) { //
http://tools.ietf.org/html/rfc4648
utf8encode = (typeof utf8encode == 'undefined') ? false :
utf8encode;
var o1, o2, o3, bits, h1, h2, h3, h4, e=[], pad = '', c, plain,
coded;
var b64 = Base64.code;
plain = utf8encode ? str.encodeUTF8() : str;
c = plain.length % 3; // pad string to length of multiple of 3
if (c > 0) { while (c++ < 3) { pad += '='; plain +=
'\0'; } }
// note: doing padding here saves us doing special-case packing for
trailing 1 or 2 chars
for (c=0; c<plain.length; c+=3) { // pack three octets into four
hexets
o1 = plain.charCodeAt(c);
o2 = plain.charCodeAt(c+1);
o3 = plain.charCodeAt(c+2);
bits = o1<<16 | o2<<8 | o3;
h1 = bits>>18 & 0x3f;
h2 = bits>>12 & 0x3f;
h3 = bits>>6 & 0x3f;
h4 = bits & 0x3f;
// use hextets to index into code string
e[c/3] = b64.charAt(h1) + b64.charAt(h2) + b64.charAt(h3) +
b64.charAt(h4);
}
coded = e.join(''); // join() is far faster than repeated
string concatenation in IE
// replace 'A's from padded nulls with '='s
coded = coded.slice(0, coded.length-pad.length) + pad;
return coded;
}
/**
* Decode string from Base64, as defined by RFC 4648
[http://tools.ietf.org/html/rfc4648]
* (instance method extending String object). As per RFC 4648, newlines are
not catered for.
*
* @param {String} str The string to be decoded from base-64
* @param {Boolean} [utf8decode=false] Flag to indicate whether str is
Unicode string to be decoded
* from UTF8 after conversion from base64
* @returns {String} decoded string
*/
Base64.decode = function(str, utf8decode) {
utf8decode = (typeof utf8decode == 'undefined') ? false :
utf8decode;
var o1, o2, o3, h1, h2, h3, h4, bits, d=[], plain, coded;
var b64 = Base64.code;
coded = utf8decode ? str.decodeUTF8() : str;
for (var c=0; c<coded.length; c+=4) { // unpack four hexets into
three octets
h1 = b64.indexOf(coded.charAt(c));
h2 = b64.indexOf(coded.charAt(c+1));
h3 = b64.indexOf(coded.charAt(c+2));
h4 = b64.indexOf(coded.charAt(c+3));
bits = h1<<18 | h2<<12 | h3<<6 | h4;
o1 = bits>>>16 & 0xff;
o2 = bits>>>8 & 0xff;
o3 = bits & 0xff;
d[c/4] = String.fromCharCode(o1, o2, o3);
// check for padding
if (h4 == 0x40) d[c/4] = String.fromCharCode(o1, o2);
if (h3 == 0x40) d[c/4] = String.fromCharCode(o1);
}
plain = d.join(''); // join() is far faster than repeated
string concatenation in IE
return utf8decode ? plain.decodeUTF8() : plain;
}
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - */
/* Utf8 class: encode / decode between multi-byte Unicode characters and
UTF-8 multiple */
/* single-byte character encoding (c) Chris Veness 2002-2010
*/
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - */
var Utf8 = {}; // Utf8 namespace
/**
* Encode multi-byte Unicode string into utf-8 multiple single-byte
characters
* (BMP / basic multilingual plane only)
*
* Chars in range U+0080 - U+07FF are encoded in 2 chars, U+0800 - U+FFFF
in 3 chars
*
* @param {String} strUni Unicode string to be encoded as UTF-8
* @returns {String} encoded string
*/
Utf8.encode = function(strUni) {
// use regular expressions & String.replace callback function for
better efficiency
// than procedural approaches
var strUtf = strUni.replace(
/[\u0080-\u07ff]/g, // U+0080 - U+07FF => 2 bytes 110yyyyy,
10zzzzzz
function(c) {
var cc = c.charCodeAt(0);
return String.fromCharCode(0xc0 | cc>>6, 0x80 | cc&0x3f);
}
);
strUtf = strUtf.replace(
/[\u0800-\uffff]/g, // U+0800 - U+FFFF => 3 bytes 1110xxxx,
10yyyyyy, 10zzzzzz
function(c) {
var cc = c.charCodeAt(0);
return String.fromCharCode(0xe0 | cc>>12, 0x80 |
cc>>6&0x3F, 0x80 | cc&0x3f); }
);
return strUtf;
}
/**
* Decode utf-8 encoded string back into multi-byte Unicode characters
*
* @param {String} strUtf UTF-8 string to be decoded back to Unicode
* @returns {String} decoded string
*/
Utf8.decode = function(strUtf) {
var strUni = strUtf.replace(
/[\u00c0-\u00df][\u0080-\u00bf]/g, // 2-byte chars
function(c) { // (note parentheses for precence)
var cc = (c.charCodeAt(0)&0x1f)<<6 |
c.charCodeAt(1)&0x3f;
return String.fromCharCode(cc); }
);
strUni = strUni.replace(
/[\u00e0-\u00ef][\u0080-\u00bf][\u0080-\u00bf]/g, // 3-byte chars
function(c) { // (note parentheses for precence)
var cc = ((c.charCodeAt(0)&0x0f)<<12) |
((c.charCodeAt(1)&0x3f)<<6) | ( c.charCodeAt(2)&0x3f);
return String.fromCharCode(cc); }
);
return strUni;
}
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - -
*/encryption.min.js000064400000013464151167412130010067 0ustar00var
Aes={};Aes.Cipher=function(r,e){for(var
o=4,n=e.length/o-1,a=[[],[],[],[]],t=0;4*o>t;t++)a[t%4][Math.floor(t/4)]=r[t];a=Aes.AddRoundKey(a,e,0,o);for(var
f=1;n>f;f++)a=Aes.SubBytes(a,o),a=Aes.ShiftRows(a,o),a=Aes.MixColumns(a,o),a=Aes.AddRoundKey(a,e,f,o);a=Aes.SubBytes(a,o),a=Aes.ShiftRows(a,o),a=Aes.AddRoundKey(a,e,n,o);for(var
c=new Array(4*o),t=0;4*o>t;t++)c[t]=a[t%4][Math.floor(t/4)];return
c},Aes.KeyExpansion=function(r){for(var e=4,o=r.length/4,n=o+6,a=new
Array(e*(n+1)),t=new Array(4),f=0;o>f;f++){var
c=[r[4*f],r[4*f+1],r[4*f+2],r[4*f+3]];a[f]=c}for(var
f=o;e*(n+1)>f;f++){a[f]=new Array(4);for(var
A=0;4>A;A++)t[A]=a[f-1][A];if(f%o==0){t=Aes.SubWord(Aes.RotWord(t));for(var
A=0;4>A;A++)t[A]^=Aes.Rcon[f/o][A]}else
o>6&&f%o==4&&(t=Aes.SubWord(t));for(var
A=0;4>A;A++)a[f][A]=a[f-o][A]^t[A]}return
a},Aes.SubBytes=function(r,e){for(var o=0;4>o;o++)for(var
n=0;e>n;n++)r[o][n]=Aes.Sbox[r[o][n]];return
r},Aes.ShiftRows=function(r,e){for(var o=new
Array(4),n=1;4>n;n++){for(var a=0;4>a;a++)o[a]=r[n][(a+n)%e];for(var
a=0;4>a;a++)r[n][a]=o[a]}return r},Aes.MixColumns=function(r,e){for(var
o=0;4>o;o++){for(var n=new Array(4),a=new
Array(4),t=0;4>t;t++)n[t]=r[t][o],a[t]=128&r[t][o]?r[t][o]<<1^283:r[t][o]<<1;r[0][o]=a[0]^n[1]^a[1]^n[2]^n[3],r[1][o]=n[0]^a[1]^n[2]^a[2]^n[3],r[2][o]=n[0]^n[1]^a[2]^n[3]^a[3],r[3][o]=n[0]^a[0]^n[1]^n[2]^a[3]}return
r},Aes.AddRoundKey=function(r,e,o,n){for(var a=0;4>a;a++)for(var
t=0;n>t;t++)r[a][t]^=e[4*o+t][a];return
r},Aes.SubWord=function(r){for(var
e=0;4>e;e++)r[e]=Aes.Sbox[r[e]];return
r},Aes.RotWord=function(r){for(var e=r[0],o=0;3>o;o++)r[o]=r[o+1];return
r[3]=e,r},Aes.Sbox=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],Aes.Rcon=[[0,0,0,0],[1,0,0,0],[2,0,0,0],[4,0,0,0],[8,0,0,0],[16,0,0,0],[32,0,0,0],[64,0,0,0],[128,0,0,0],[27,0,0,0],[54,0,0,0]];var
AesCtr={};AesCtr.encrypt=function(r,e,o){var
n=16;if(128!=o&&192!=o&&256!=o)return"";r=Utf8.encode(r),e=Utf8.encode(e);for(var
a=o/8,t=new
Array(a),f=0;a>f;f++)t[f]=isNaN(e.charCodeAt(f))?0:e.charCodeAt(f);var
c=Aes.Cipher(t,Aes.KeyExpansion(t));c=c.concat(c.slice(0,a-16));for(var
A=new Array(n),d=(new
Date).getTime(),i=Math.floor(d/1e3),u=d%1e3,f=0;4>f;f++)A[f]=i>>>8*f&255;for(var
f=0;4>f;f++)A[f+4]=255&u;for(var
s="",f=0;8>f;f++)s+=String.fromCharCode(A[f]);for(var
h=Aes.KeyExpansion(c),v=Math.ceil(r.length/n),C=new
Array(v),y=0;v>y;y++){for(var
l=0;4>l;l++)A[15-l]=y>>>8*l&255;for(var
l=0;4>l;l++)A[15-l-4]=y/4294967296>>>8*l;for(var
g=Aes.Cipher(A,h),S=v-1>y?n:(r.length-1)%n+1,w=new
Array(S),f=0;S>f;f++)w[f]=g[f]^r.charCodeAt(y*n+f),w[f]=String.fromCharCode(w[f]);C[y]=w.join("")}var
p=s+C.join("");return
p=Base64.encode(p)},AesCtr.decrypt=function(r,e,o){var
n=16;if(128!=o&&192!=o&&256!=o)return"";r=Base64.decode(r),e=Utf8.encode(e);for(var
a=o/8,t=new
Array(a),f=0;a>f;f++)t[f]=isNaN(e.charCodeAt(f))?0:e.charCodeAt(f);var
c=Aes.Cipher(t,Aes.KeyExpansion(t));c=c.concat(c.slice(0,a-16));var A=new
Array(8);ctrTxt=r.slice(0,8);for(var
f=0;8>f;f++)A[f]=ctrTxt.charCodeAt(f);for(var
d=Aes.KeyExpansion(c),i=Math.ceil((r.length-8)/n),u=new
Array(i),s=0;i>s;s++)u[s]=r.slice(8+s*n,8+s*n+n);r=u;for(var h=new
Array(r.length),s=0;i>s;s++){for(var
v=0;4>v;v++)A[15-v]=s>>>8*v&255;for(var
v=0;4>v;v++)A[15-v-4]=(s+1)/4294967296-1>>>8*v&255;for(var
C=Aes.Cipher(A,d),y=new
Array(r[s].length),f=0;f<r[s].length;f++)y[f]=C[f]^r[s].charCodeAt(f),y[f]=String.fromCharCode(y[f]);h[s]=y.join("")}var
l=h.join("");return l=Utf8.decode(l)};var
Base64={};Base64.code="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",Base64.encode=function(r,e){e="undefined"==typeof
e?!1:e;var
o,n,a,t,f,c,A,d,i,u,s,h=[],v="",C=Base64.code;if(u=e?r.encodeUTF8():r,i=u.length%3,i>0)for(;i++<3;)v+="=",u+="\x00";for(i=0;i<u.length;i+=3)o=u.charCodeAt(i),n=u.charCodeAt(i+1),a=u.charCodeAt(i+2),t=o<<16|n<<8|a,f=t>>18&63,c=t>>12&63,A=t>>6&63,d=63&t,h[i/3]=C.charAt(f)+C.charAt(c)+C.charAt(A)+C.charAt(d);return
s=h.join(""),s=s.slice(0,s.length-v.length)+v},Base64.decode=function(r,e){e="undefined"==typeof
e?!1:e;var
o,n,a,t,f,c,A,d,i,u,s=[],h=Base64.code;u=e?r.decodeUTF8():r;for(var
v=0;v<u.length;v+=4)t=h.indexOf(u.charAt(v)),f=h.indexOf(u.charAt(v+1)),c=h.indexOf(u.charAt(v+2)),A=h.indexOf(u.charAt(v+3)),d=t<<18|f<<12|c<<6|A,o=d>>>16&255,n=d>>>8&255,a=255&d,s[v/4]=String.fromCharCode(o,n,a),64==A&&(s[v/4]=String.fromCharCode(o,n)),64==c&&(s[v/4]=String.fromCharCode(o));return
i=s.join(""),e?i.decodeUTF8():i};var
Utf8={};Utf8.encode=function(r){var
e=r.replace(/[\u0080-\u07ff]/g,function(r){var e=r.charCodeAt(0);return
String.fromCharCode(192|e>>6,128|63&e)});return
e=e.replace(/[\u0800-\uffff]/g,function(r){var e=r.charCodeAt(0);return
String.fromCharCode(224|e>>12,128|e>>6&63,128|63&e)})},Utf8.decode=function(r){var
e=r.replace(/[\u00c0-\u00df][\u0080-\u00bf]/g,function(r){var
e=(31&r.charCodeAt(0))<<6|63&r.charCodeAt(1);return
String.fromCharCode(e)});return
e=e.replace(/[\u00e0-\u00ef][\u0080-\u00bf][\u0080-\u00bf]/g,function(r){var
e=(15&r.charCodeAt(0))<<12|(63&r.charCodeAt(1))<<6|63&r.charCodeAt(2);return
String.fromCharCode(e)})};
json2.js000064400000006465151167412130006151 0ustar00/*
* json2.js
* 2014-02-04
* Public Domain.
* NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
* See http://www.JSON.org/js.html
*/
if(typeof JSON!=='object'){JSON={}}(function(){'use
strict';function f(n){return n<10?'0'+n:n}if(typeof
Date.prototype.toJSON!=='function'){Date.prototype.toJSON=function(){return
isFinite(this.valueOf())?this.getUTCFullYear()+'-'+f(this.getUTCMonth()+1)+'-'+f(this.getUTCDate())+'T'+f(this.getUTCHours())+':'+f(this.getUTCMinutes())+':'+f(this.getUTCSeconds())+'Z':null};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return
this.valueOf()}}var e,escapable,gap,indent,meta,rep;function
quote(b){escapable.lastIndex=0;return
escapable.test(b)?'"'+b.replace(escapable,function(a){var
c=meta[a];return typeof
c==='string'?c:'\\u'+('0000'+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+b+'"'}function
str(a,b){var
i,k,v,length,mind=gap,partial,value=b[a];if(value&&typeof
value==='object'&&typeof
value.toJSON==='function'){value=value.toJSON(a)}if(typeof
rep==='function'){value=rep.call(b,a,value)}switch(typeof
value){case'string':return
quote(value);case'number':return
isFinite(value)?String(value):'null';case'boolean':case'null':return
String(value);case'object':if(!value){return'null'}gap+=indent;partial=[];if(Object.prototype.toString.apply(value)==='[object
Array]'){length=value.length;for(i=0;i<length;i+=1){partial[i]=str(i,value)||'null'}v=partial.length===0?'[]':gap?'[\n'+gap+partial.join(',\n'+gap)+'\n'+mind+']':'['+partial.join(',')+']';gap=mind;return
v}if(rep&&typeof
rep==='object'){length=rep.length;for(i=0;i<length;i+=1){if(typeof
rep[i]==='string'){k=rep[i];v=str(k,value);if(v){partial.push(quote(k)+(gap?':
':':')+v)}}}}else{for(k in
value){if(Object.prototype.hasOwnProperty.call(value,k)){v=str(k,value);if(v){partial.push(quote(k)+(gap?':
':':')+v)}}}}v=partial.length===0?'{}':gap?'{\n'+gap+partial.join(',\n'+gap)+'\n'+mind+'}':'{'+partial.join(',')+'}';gap=mind;return
v}}if(typeof
JSON.stringify!=='function'){escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;meta={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\'};JSON.stringify=function(a,b,c){var
i;gap='';indent='';if(typeof
c==='number'){for(i=0;i<c;i+=1){indent+=' '}}else
if(typeof c==='string'){indent=c}rep=b;if(b&&typeof
b!=='function'&&(typeof b!=='object'||typeof
b.length!=='number')){throw new
Error('JSON.stringify');}return
str('',{'':a})}}if(typeof
JSON.parse!=='function'){e=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;JSON.parse=function(c,d){var
j;function walk(a,b){var k,v,value=a[b];if(value&&typeof
value==='object'){for(k in
value){if(Object.prototype.hasOwnProperty.call(value,k)){v=walk(value,k);if(v!==undefined){value[k]=v}else{delete
value[k]}}}}return
d.call(a,b,value)}c=String(c);e.lastIndex=0;if(e.test(c)){c=c.replace(e,function(a){return'\\u'+('0000'+a.charCodeAt(0).toString(16)).slice(-4)})}if(/^[\],:{}\s]*$/.test(c.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,'@').replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,']').replace(/(?:^|:|,)(?:\s*\[)+/g,''))){j=eval('('+c+')');return
typeof d==='function'?walk({'':j},''):j}throw
new SyntaxError('JSON.parse');}}}());
json2.min.js000064400000005562151167412130006730
0ustar00"object"!=typeof
JSON&&(JSON={}),function(){"use strict";function
f(t){return 10>t?"0"+t:t}function quote(t){return
escapable.lastIndex=0,escapable.test(t)?'"'+t.replace(escapable,function(t){var
e=meta[t];return"string"==typeof
e?e:"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+t+'"'}function
str(t,e){var
n,r,o,f,u,p=gap,a=e[t];switch(a&&"object"==typeof
a&&"function"==typeof
a.toJSON&&(a=a.toJSON(t)),"function"==typeof
rep&&(a=rep.call(e,t,a)),typeof a){case"string":return
quote(a);case"number":return
isFinite(a)?String(a):"null";case"boolean":case"null":return
String(a);case"object":if(!a)return"null";if(gap+=indent,u=[],"[object
Array]"===Object.prototype.toString.apply(a)){for(f=a.length,n=0;f>n;n+=1)u[n]=str(n,a)||"null";return
o=0===u.length?"[]":gap?"[\n"+gap+u.join(",\n"+gap)+"\n"+p+"]":"["+u.join(",")+"]",gap=p,o}if(rep&&"object"==typeof
rep)for(f=rep.length,n=0;f>n;n+=1)"string"==typeof
rep[n]&&(r=rep[n],o=str(r,a),o&&u.push(quote(r)+(gap?":
":":")+o));else for(r in
a)Object.prototype.hasOwnProperty.call(a,r)&&(o=str(r,a),o&&u.push(quote(r)+(gap?":
":":")+o));return
o=0===u.length?"{}":gap?"{\n"+gap+u.join(",\n"+gap)+"\n"+p+"}":"{"+u.join(",")+"}",gap=p,o}}"function"!=typeof
Date.prototype.toJSON&&(Date.prototype.toJSON=function(){return
isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return
this.valueOf()});var
e,escapable,gap,indent,meta,rep;"function"!=typeof
JSON.stringify&&(escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(t,e,n){var
r;if(gap="",indent="","number"==typeof
n)for(r=0;n>r;r+=1)indent+=" ";else"string"==typeof
n&&(indent=n);if(rep=e,e&&"function"!=typeof
e&&("object"!=typeof e||"number"!=typeof
e.length))throw new Error("JSON.stringify");return
str("",{"":t})}),"function"!=typeof
JSON.parse&&(e=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,JSON.parse=function(c,d){function
walk(t,e){var n,r,o=t[e];if(o&&"object"==typeof o)for(n
in o)Object.prototype.hasOwnProperty.call(o,n)&&(r=walk(o,n),void
0!==r?o[n]=r:delete o[n]);return d.call(t,e,o)}var
j;if(c=String(c),e.lastIndex=0,e.test(c)&&(c=c.replace(e,function(t){return"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)})),/^[\],:{}\s]*$/.test(c.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return
j=eval("("+c+")"),"function"==typeof
d?walk({"":j},""):j;throw new
SyntaxError("JSON.parse")})}();
update.js000064400000020234151167412130006366 0ustar00/**
* @package AkeebaCMSUpdate
* @copyright Copyright (c)2010-2014 Nicholas K. Dionysopoulos
* @license GNU General Public License version 3, or later
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see
<https://www.gnu.org/licenses/>.
*/
var stat_total = 0;
var stat_files = 0;
var stat_inbytes = 0;
var stat_outbytes = 0;
/**
* An extremely simple error handler, dumping error messages to screen
*
* @param error The error message string
*/
function error_callback(error)
{
alert("ERROR:\n"+error);
}
/**
* Performs an encrypted AJAX request and returns the parsed JSON output.
* The window.ajax_url is used as the AJAX proxy URL.
* If there is no errorCallback, the window.error_callback is used.
*
* @param object data An object with the query data, e.g.
a serialized form
* @param function successCallback A function accepting a single object
parameter, called on success
* @param function errorCallback A function accepting a single string
parameter, called on failure
*/
doEncryptedAjax = function(data, successCallback, errorCallback)
{
var json = JSON.stringify(data);
if( joomlaupdate_password.length > 0 )
{
json = AesCtr.encrypt( json, joomlaupdate_password, 128 );
}
var post_data = {
'json': json
};
var structure =
{
type: "POST",
url: joomlaupdate_ajax_url,
cache: false,
data: post_data,
timeout: 600000,
success: function(msg, responseXML)
{
// Initialize
var junk = null;
var message = "";
// Get rid of junk before the data
var valid_pos = msg.indexOf('###');
if( valid_pos == -1 )
{
// Valid data not found in the response
msg = 'Invalid AJAX data:\n' + msg;
if (errorCallback == null)
{
if(error_callback != null)
{
error_callback(msg);
}
}
else
{
errorCallback(msg);
}
return;
}
else if( valid_pos != 0 )
{
// Data is prefixed with junk
junk = msg.substr(0, valid_pos);
message = msg.substr(valid_pos);
}
else
{
message = msg;
}
message = message.substr(3); // Remove triple hash in the beginning
// Get of rid of junk after the data
var valid_pos = message.lastIndexOf('###');
message = message.substr(0, valid_pos); // Remove triple hash in the end
// Decrypt if required
var data = null;
if( joomlaupdate_password.length > 0 )
{
try
{
var data = JSON.parse(message);
}
catch(err)
{
message = AesCtr.decrypt(message, joomlaupdate_password, 128);
}
}
try
{
if (empty(data))
{
data = JSON.parse(message);
}
}
catch(err)
{
var msg = err.message + "\n<br/>\n<pre>\n" +
message + "\n</pre>";
if (errorCallback == null)
{
if (error_callback != null)
{
error_callback(msg);
}
}
else
{
errorCallback(msg);
}
return;
}
// Call the callback function
successCallback(data);
},
error: function(req)
{
var message = 'AJAX Loading Error: ' + req.statusText;
if(errorCallback == null)
{
if (error_callback != null)
{
error_callback(message);
}
}
else
{
errorCallback(message);
}
}
};
jQuery.ajax( structure );
};
/**
* Pings the update script (making sure its executable)
*/
pingExtract = function()
{
// Reset variables
this.stat_files = 0;
this.stat_inbytes = 0;
this.stat_outbytes = 0;
// Do AJAX post
var post = {task : 'ping'};
this.doEncryptedAjax(post,
function(data) {
startExtract(data);
});
};
startExtract = function()
{
// Reset variables
this.stat_files = 0;
this.stat_inbytes = 0;
this.stat_outbytes = 0;
var post = { task : 'startRestore' };
this.doEncryptedAjax(post, function(data){
stepExtract(data);
});
};
stepExtract = function(data)
{
if(data.status == false)
{
// handle failure
error_callback(data.message);
return;
}
if( !empty(data.Warnings) )
{
// @todo Handle warnings
/**
$.each(data.Warnings, function(i, item){
$('#warnings').append(
$(document.createElement('div'))
.html(item)
);
$('#warningsBox').show('fast');
});
/**/
}
if (!empty(data.factory))
{
extract_factory = data.factory;
}
if(data.done)
{
finalizeUpdate();
}
else
{
// Add data to variables
stat_inbytes += data.bytesIn;
stat_percent = (stat_inbytes * 100) / joomlaupdate_totalsize;
// Update GUI
stat_outbytes += data.bytesOut;
stat_files += data.files;
if (stat_percent < 100)
{
jQuery('#progress-bar').css('width', stat_percent +
'%').attr('aria-valuenow', stat_percent);
}
else if (stat_percent > 100)
{
stat_percent = 100;
jQuery('#progress-bar').css('width', stat_percent +
'%').attr('aria-valuenow', stat_percent);
}
else
{
jQuery('#progress-bar').removeClass('bar-success');
}
jQuery('#extpercent').text(stat_percent.toFixed(1) +
'%');
jQuery('#extbytesin').text(stat_inbytes);
jQuery('#extbytesout').text(stat_outbytes);
jQuery('#extfiles').text(stat_files);
// Do AJAX post
post = {
task: 'stepRestore',
factory: data.factory
};
doEncryptedAjax(post, function(data){
stepExtract(data);
});
}
};
finalizeUpdate = function ()
{
// Do AJAX post
var post = { task : 'finalizeRestore', factory: window.factory
};
doEncryptedAjax(post, function(data){
window.location = joomlaupdate_return_url;
});
};
/**
* Is a variable empty?
*
* Part of php.js
*
* @see http://phpjs.org/
*
* @param mixed mixed_var The variable
*
* @returns boolean True if empty
*/
function empty (mixed_var)
{
var key;
if (mixed_var === "" ||
mixed_var === 0 ||
mixed_var === "0" ||
mixed_var === null ||
mixed_var === false ||
typeof mixed_var === 'undefined'
){
return true;
}
if (typeof mixed_var == 'object')
{
for (key in mixed_var)
{
return false;
}
return true;
}
return false;
}
/**
* Is the variable an array?
*
* Part of php.js
*
* @see http://phpjs.org/
*
* @param mixed mixed_var The variable
*
* @returns boolean True if it is an array or an object
*/
function is_array (mixed_var)
{
var key = '';
var getFuncName = function (fn) {
var name = (/\W*function\s+([\w\$]+)\s*\(/).exec(fn);
if (!name) {
return '(Anonymous)';
}
return name[1];
};
if (!mixed_var)
{
return false;
}
// BEGIN REDUNDANT
this.php_js = this.php_js || {};
this.php_js.ini = this.php_js.ini || {};
// END REDUNDANT
if (typeof mixed_var === 'object')
{
if (this.php_js.ini['phpjs.objectsAsArrays'] && //
Strict checking for being a JavaScript array (only check this way if call
ini_set('phpjs.objectsAsArrays', 0) to disallow objects as
arrays)
(
(this.php_js.ini['phpjs.objectsAsArrays'].local_value.toLowerCase
&&
this.php_js.ini['phpjs.objectsAsArrays'].local_value.toLowerCase()
=== 'off') ||
parseInt(this.php_js.ini['phpjs.objectsAsArrays'].local_value,
10) === 0)
) {
return mixed_var.hasOwnProperty('length') && // Not
non-enumerable because of being on parent class
!mixed_var.propertyIsEnumerable('length') && // Since
is own property, if not enumerable, it must be a built-in function
getFuncName(mixed_var.constructor) !== 'String'; // exclude
String()
}
if (mixed_var.hasOwnProperty)
{
for (key in mixed_var) {
// Checks whether the object has the specified property
// if not, we figure it's not an object in the sense of a
php-associative-array.
if (false === mixed_var.hasOwnProperty(key)) {
return false;
}
}
}
// Read discussion at:
http://kevin.vanzonneveld.net/techblog/article/javascript_equivalent_for_phps_is_array/
return true;
}
return false;
}
update.min.js000064400000005765151167412130007164 0ustar00var
stat_total=0,stat_files=0,stat_inbytes=0,stat_outbytes=0;function
error_callback(t){alert("ERROR:\n"+t)}function empty(t){var
r;if(""===t||0===t||"0"===t||null===t||!1===t||void
0===t)return!0;if("object"==typeof t){for(r in
t)return!1;return!0}return!1}function is_array(t){var
r,e,s="";if(!t)return!1;if(this.php_js=this.php_js||{},this.php_js.ini=this.php_js.ini||{},"object"==typeof
t){if(this.php_js.ini["phpjs.objectsAsArrays"]&&(this.php_js.ini["phpjs.objectsAsArrays"].local_value.toLowerCase&&"off"===this.php_js.ini["phpjs.objectsAsArrays"].local_value.toLowerCase()||0===parseInt(this.php_js.ini["phpjs.objectsAsArrays"].local_value,10)))return
t.hasOwnProperty("length")&&!t.propertyIsEnumerable("length")&&"String"!==(r=t.constructor,(e=/\W*function\s+([\w\$]+)\s*\(/.exec(r))?e[1]:"(Anonymous)");if(t.hasOwnProperty)for(s
in
t)if(!1===t.hasOwnProperty(s))return!1;return!0}return!1}doEncryptedAjax=function(t,r,e){var
s=JSON.stringify(t);joomlaupdate_password.length>0&&(s=AesCtr.encrypt(s,joomlaupdate_password,128));var
a={type:"POST",url:joomlaupdate_ajax_url,cache:!1,data:{json:s},timeout:6e5,success:function(t,s){var
a="";if(-1==(n=t.indexOf("###")))return t="Invalid
AJAX
data:\n"+t,void(null==e?null!=error_callback&&error_callback(t):e(t));0!=n?(t.substr(0,n),a=t.substr(n)):a=t;var
n=(a=a.substr(3)).lastIndexOf("###");a=a.substr(0,n);var
o=null;if(joomlaupdate_password.length>0)try{o=JSON.parse(a)}catch(t){a=AesCtr.decrypt(a,joomlaupdate_password,128)}try{empty(o)&&(o=JSON.parse(a))}catch(r){t=r.message+"\n<br/>\n<pre>\n"+a+"\n</pre>";return
void(null==e?null!=error_callback&&error_callback(t):e(t))}r(o)},error:function(t){var
r="AJAX Loading Error:
"+t.statusText;null==e?null!=error_callback&&error_callback(r):e(r)}};jQuery.ajax(a)},pingExtract=function(){this.stat_files=0,this.stat_inbytes=0,this.stat_outbytes=0;this.doEncryptedAjax({task:"ping"},function(t){startExtract(t)})},startExtract=function(){this.stat_files=0,this.stat_inbytes=0,this.stat_outbytes=0;this.doEncryptedAjax({task:"startRestore"},function(t){stepExtract(t)})},stepExtract=function(t){0!=t.status?(empty(t.Warnings),empty(t.factory)||(extract_factory=t.factory),t.done?finalizeUpdate():(stat_inbytes+=t.bytesIn,stat_percent=100*stat_inbytes/joomlaupdate_totalsize,stat_outbytes+=t.bytesOut,stat_files+=t.files,stat_percent<100?jQuery("#progress-bar").css("width",stat_percent+"%").attr("aria-valuenow",stat_percent):stat_percent>100?(stat_percent=100,jQuery("#progress-bar").css("width",stat_percent+"%").attr("aria-valuenow",stat_percent)):jQuery("#progress-bar").removeClass("bar-success"),jQuery("#extpercent").text(stat_percent.toFixed(1)+"%"),jQuery("#extbytesin").text(stat_inbytes),jQuery("#extbytesout").text(stat_outbytes),jQuery("#extfiles").text(stat_files),post={task:"stepRestore",factory:t.factory},doEncryptedAjax(post,function(t){stepExtract(t)}))):error_callback(t.message)},finalizeUpdate=function(){var
t={task:"finalizeRestore",factory:window.factory};doEncryptedAjax(t,function(t){window.location=joomlaupdate_return_url})};
run-schedule.js000064400000002110151167612550007503 0ustar00/**
* @copyright (C) 2021 Open Source Matters, Inc.
<https://www.joomla.org>
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
/**
* Makes calls to com_ajax to trigger the Scheduler.
*
* Used for lazy scheduling of tasks.
*
* @package Joomla.Plugins
* @subpackage System.ScheduleRunner
*
* @since 4.1.0
*/
if (!window.Joomla) {
throw new Error('Joomla API was not properly initialised');
}
const initScheduler = () => {
const options = Joomla.getOptions('plg_system_schedulerunner');
const paths = Joomla.getOptions('system.paths');
const interval = (options && options.interval ?
parseInt(options.interval, 10) : 300) * 1000;
const uri = `${paths ? `${paths.root}/index.php` :
window.location.pathname}?option=com_ajax&format=raw&plugin=RunSchedulerLazy&group=system`;
setInterval(() => fetch(uri, {
method: 'GET'
}), interval);
// Run it at the beginning at least once
fetch(uri, {
method: 'GET'
});
};
(document => {
document.addEventListener('DOMContentLoaded', () => {
initScheduler();
});
})(document);
run-schedule.min.js.gz000064400000000713151167612550010713
0ustar00�uQ]��0|�_��*d�(|�4Њ"D���>��,�O�ײ7�W �U�v�aƻ3��Ї� ً�Y�
����
�r bF�CX�$�9�������蕨,TD.�u�
���m����
:U�K��� l�� ��d`�P�n
6���y������xWk�R}�$�j0X��9r"����e
��`��:��h�Y�B{L9M�x�]�cZ�b!��Fp|[e�[˚��-���x�r�
UƠdH��=����24��^�#m�Is��ǵa�GC9ye��!Ƈ�W��-rD��I���&�,
JT���Ub3��@�P�W���;�+�N�=[T�6�����F�]z����7�G^�
�6�#r��%rN�$X-����C5S���ʑJ��
o��"��}Z��#�b�]��B�F6R��T%�Ӈ��_+ݠrun-schedule.min.js000064400000001240151167612550010270
0ustar00/**
* @copyright (C) 2021 Open Source Matters, Inc.
<https://www.joomla.org>
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/if(!window.Joomla)throw new Error("Joomla API was not properly
initialised");const initScheduler=()=>{const
t=Joomla.getOptions("plg_system_schedulerunner"),o=Joomla.getOptions("system.paths"),n=(t&&t.interval?parseInt(t.interval,10):300)*1e3,e=`${o?`${o.root}/index.php`:window.location.pathname}?option=com_ajax&format=raw&plugin=RunSchedulerLazy&group=system`;setInterval(()=>fetch(e,{method:"GET"}),n),fetch(e,{method:"GET"})};(t=>{t.addEventListener("DOMContentLoaded",()=>{initScheduler()})})(document);
joomla-editor-codemirror.min.js000064400000004372151167745040012614
0ustar00import{JoomlaEditor as s,JoomlaEditorDecorator as
n}from"editor-api";import{keymap as c,createFromTextarea as
r,EditorState as l}from"codemirror";/**
* @copyright (C) 2018 Open Source Matters, Inc.
<https://www.joomla.org>
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/class a extends n{getValue(){return
this.instance.state.doc.toString()}setValue(e){const t=this.instance;return
t.dispatch({changes:{from:0,to:t.state.doc.length,insert:e}}),this}getSelection(){const{state:e}=this.instance;return
e.sliceDoc(e.selection.main.from,e.selection.main.to)}replaceSelection(e){const
t=this.instance.state.replaceSelection(e);return
this.instance.dispatch(t),this}disable(e){const t=this.instance;return
t.state.config.compartments.forEach((d,i)=>{i.$j_name==="readOnly"&&t.dispatch({effects:i.reconfigure(l.readOnly.of(!e))})}),this}}class
h extends
HTMLElement{constructor(){super(),this.toggleFullScreen=()=>{this.classList.contains("fullscreen")?this.closeFullScreen():(this.classList.add("fullscreen"),document.documentElement.scrollTop=0,document.documentElement.style.overflow="hidden")},this.closeFullScreen=()=>{this.classList.remove("fullscreen"),document.documentElement.style.overflow=""},this.interactionCallback=()=>{s.setActive(this.element.id)}}get
options(){return JSON.parse(this.getAttribute("options"))}get
fsCombo(){return this.getAttribute("fs-combo")}async
connectedCallback(){const{options:e}=this;this.fsCombo&&(e.customExtensions=e.customExtensions||[],e.customExtensions.push(()=>c.of([{key:this.fsCombo,run:this.toggleFullScreen},{key:"Escape",run:this.closeFullScreen}])),this.bsModals=this.querySelectorAll(".joomla-modal.modal"),this.bsModals.forEach(t=>{document.body.appendChild(t)})),this.element=this.querySelector("textarea"),this.instance=await
r(this.element,e),this.jEditor=new
a(this.instance,"codemirror",this.element.id),s.register(this.jEditor),this.addEventListener("click",this.interactionCallback)}disconnectedCallback(){this.instance&&(this.element.style.display="",this.instance.destroy()),s.unregister(this.element.id),this.removeEventListener("click",this.interactionCallback),this.bsModals&&this.bsModals.length&&this.bsModals.forEach(e=>{this.appendChild(e)})}}customElements.define("joomla-editor-codemirror",h);
codemirror.min.js.gz000064400000002335151167745040010465
0ustar00��Vmo�6��_��ASt������мp�}0���Nk�$ې��J���-�I��sϽ��$�K�B]�U�����jRp��(���(AZE+����J/�Ŕt��`��6��iO����*pQ���:*6t
;��.��:�$lZ:g���M2�m��cg�3�l�X]r4��]ȳ�C�{vn����Sh���L��?�IJ���4��W*�Yة���Ve�
��{Pܬ*�:9)���"����/߄v��HQ�\���I�=w%���d���c��6��A�\����(N�_~P��
e=�8.���s^+�.���5�;w�hrsn
�pe
\eܭ����;t�> [�\�!<!�㇏������ @�<�S��Z�P��f�a߬Պ3�V�JI�B�>��n���
}��J
t�i_��8,�uH�n�<��s2}�MY؆w��ZX��RL��<DŽ>bBW��5^�:�J-�X/>Ȃf)�;#��5�|Am:_�d��i�iUu|�C
�Ha.�}}YVV��m)����z_�$�g�B�t\��4M��(�
T��?���U��:���@��}
,
��ڃ�'�ziVO|�c����gXY��^rw]�5��G�@ȁ�����.�����G�y��ђ�ؼMr1,��AL?O�16
�Y
�6�in2�%}�Ԏ8�'�L
�1����^����Ą�V���e)ͪ������v��MKr>�=�E�ᙼ���N����5��yIj�=$��H�B0��9clKcjA�h逯G�9�M"���C�.5�A�Q�R�����������%�s�nƎ�x����L�8VY7q<�D�YQ�mώ/S��!i2�a:��=d���rp�����
��uB�B��G�^����G�/�M,��|�zzl1?�˘�
�U�uS.
,�)E�����ϕi��ԝG� �j�^���f��7K��W����|:>��_�8E�ү�j�q��=>IǁF�ʻH�-���l:�0�|�e@dAۆ�ά{�ꬍ]������H��=SB�J��8��xp�r�;�YM!��/ˤ/ߥ���f���OƳl�&�I�nlj��Z��ƴ�.�Ա���;N�� l#�xa���g#K;]�
��G-���{�6D�Z��~�m�8��\K#5W3UI�(�e����n9��lH�� codemirror.min.js000064400000004752151167745040010053
0ustar00import{highlightSpecialChars as f,drawSelection as g,lineNumbers as
p,EditorView as a,highlightActiveLineGutter as y,highlightActiveLine as
w,keymap as
c}from"@codemirror/view";export{EditorView,keymap}from"@codemirror/view";import{Compartment
as E,EditorState as
S}from"@codemirror/state";export{EditorState}from"@codemirror/state";import{syntaxHighlighting
as k,defaultHighlightStyle as b,foldGutter as
v}from"@codemirror/language";import{history as O,defaultKeymap as
C,historyKeymap as l,emacsStyleKeymap as
x}from"@codemirror/commands";import{highlightSelectionMatches as
L,searchKeymap as K}from"@codemirror/search";import{closeBrackets
as T}from"@codemirror/autocomplete";import{oneDark as
B}from"@codemirror/theme-one-dark";/**
* @copyright (C) 2023 Open Source Matters, Inc.
<https://www.joomla.org>
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/const u=()=>[f(),O(),g(),k(b,{fallback:!0})],d=async e=>{const
t=[],o=[];if(e.mode){const{mode:i}=e,h=e[i]||{};o.push(import(`@codemirror/lang-${e.mode}`).then(n=>{if(i==="php")return
import("@codemirror/lang-html").then(({html:m})=>{const
s=e.html||{selfClosingTags:!0};t.push(n.php({baseLanguage:m(s).language}))});i==="html"&&(h.selfClosingTags=!0),t.push(n[e.mode](h))}).catch(n=>{console.error(`Cannot
create an extension for "${e.mode}" syntax
mode.`,n)}))}switch(e.lineNumbers&&t.push(p()),e.lineWrapping&&t.push(a.lineWrapping),e.activeLine&&t.push(y(),w()),e.highlightSelection&&t.push(L()),e.autoCloseBrackets&&t.push(T()),e.foldGutter&&t.push(v()),e.keyMap){case"emacs":t.push(c.of([...x,...l]));break;default:t.push(c.of([...C,...K,...l]));break}const
r=new E;return
r.$j_name="readOnly",t.push(r.of(S.readOnly.of(!!e.readOnly))),("colorSchemeOs"in
document.documentElement.dataset&&window.matchMedia("(prefers-color-scheme:
dark)").matches||document.documentElement.dataset.colorScheme==="dark")&&t.push(B),e.customExtensions&&e.customExtensions.length&&e.customExtensions.forEach(i=>{if(i
instanceof
Function){t.push(i());return}const[h,n]=i;o.push(import(h).then(m=>{n.forEach(s=>{t.push(m[s]())})}))}),Promise.all(o).then(()=>t)};async
function G(e,t){const o=[u(),await d(t)],r=new
a({doc:e.value,root:t.root||null,extensions:o});return
e.parentNode.insertBefore(r.dom,e),e.style.display="none",e.form&&e.form.addEventListener("submit",()=>{e.value=r.state.doc.toString()}),t.width&&(r.dom.style.width=t.width),t.height&&(r.dom.style.height=t.height),r}export{G
as createFromTextarea,u as minimalSetup,d as optionsToExtensions};
joomla-editor-codemirror.js000064400000007276151167745040012040
0ustar00import { JoomlaEditor, JoomlaEditorDecorator } from
'editor-api';
import { keymap, createFromTextarea, EditorState } from
'codemirror';
/**
* @copyright (C) 2018 Open Source Matters, Inc.
<https://www.joomla.org>
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
/**
* Codemirror Decorator for JoomlaEditor
*/
// eslint-disable-next-line max-classes-per-file
class CodemirrorDecorator extends JoomlaEditorDecorator {
/**
* @returns {string}
*/
getValue() {
return this.instance.state.doc.toString();
}
/**
* @param {String} value
* @returns {CodemirrorDecorator}
*/
setValue(value) {
const editor = this.instance;
editor.dispatch({
changes: {
from: 0,
to: editor.state.doc.length,
insert: value
}
});
return this;
}
/**
* @returns {string}
*/
getSelection() {
const {
state
} = this.instance;
return state.sliceDoc(state.selection.main.from,
state.selection.main.to);
}
replaceSelection(value) {
const v = this.instance.state.replaceSelection(value);
this.instance.dispatch(v);
return this;
}
disable(enable) {
const editor = this.instance;
editor.state.config.compartments.forEach((facet, compartment) => {
if (compartment.$j_name === 'readOnly') {
editor.dispatch({
effects:
compartment.reconfigure(EditorState.readOnly.of(!enable))
});
}
});
return this;
}
}
class CodemirrorEditor extends HTMLElement {
constructor() {
super();
this.toggleFullScreen = () => {
if (!this.classList.contains('fullscreen')) {
this.classList.add('fullscreen');
document.documentElement.scrollTop = 0;
document.documentElement.style.overflow = 'hidden';
} else {
this.closeFullScreen();
}
};
this.closeFullScreen = () => {
this.classList.remove('fullscreen');
document.documentElement.style.overflow = '';
};
this.interactionCallback = () => {
JoomlaEditor.setActive(this.element.id);
};
}
get options() {
return JSON.parse(this.getAttribute('options'));
}
get fsCombo() {
return this.getAttribute('fs-combo');
}
async connectedCallback() {
const {
options
} = this;
// Configure full screen feature
if (this.fsCombo) {
options.customExtensions = options.customExtensions || [];
options.customExtensions.push(() => keymap.of([{
key: this.fsCombo,
run: this.toggleFullScreen
}, {
key: 'Escape',
run: this.closeFullScreen
}]));
// Relocate BS modals, to resolve z-index issue in full screen
this.bsModals =
this.querySelectorAll('.joomla-modal.modal');
this.bsModals.forEach(modal => {
document.body.appendChild(modal);
});
}
// Create and register the Editor
this.element = this.querySelector('textarea');
this.instance = await createFromTextarea(this.element, options);
this.jEditor = new CodemirrorDecorator(this.instance,
'codemirror', this.element.id);
JoomlaEditor.register(this.jEditor);
// Find out when editor is interacted
this.addEventListener('click', this.interactionCallback);
}
disconnectedCallback() {
if (this.instance) {
this.element.style.display = '';
this.instance.destroy();
}
// Remove from the Joomla API
JoomlaEditor.unregister(this.element.id);
this.removeEventListener('click', this.interactionCallback);
// Restore modals
if (this.bsModals && this.bsModals.length) {
this.bsModals.forEach(modal => {
this.appendChild(modal);
});
}
}
}
customElements.define('joomla-editor-codemirror',
CodemirrorEditor);
codemirror.js000064400000012332151167745040007262 0ustar00import {
highlightSpecialChars, drawSelection, lineNumbers, EditorView,
highlightActiveLineGutter, highlightActiveLine, keymap } from
'@codemirror/view';
export { EditorView, keymap } from '@codemirror/view';
import { Compartment, EditorState } from '@codemirror/state';
export { EditorState } from '@codemirror/state';
import { syntaxHighlighting, defaultHighlightStyle, foldGutter } from
'@codemirror/language';
import { history, defaultKeymap, historyKeymap, emacsStyleKeymap } from
'@codemirror/commands';
import { highlightSelectionMatches, searchKeymap } from
'@codemirror/search';
import { closeBrackets } from '@codemirror/autocomplete';
import { oneDark } from '@codemirror/theme-one-dark';
/**
* @copyright (C) 2023 Open Source Matters, Inc.
<https://www.joomla.org>
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
const minimalSetup = () => [highlightSpecialChars(), history(),
drawSelection(), syntaxHighlighting(defaultHighlightStyle, {
fallback: true
})];
/**
* Configure and return list of extensions for given options
*
* @param {Object} options
* @returns {Promise<[]>}
*/
const optionsToExtensions = async options => {
const extensions = [];
const q = [];
// Load the language for syntax mode
if (options.mode) {
const {
mode
} = options;
const modeOptions = options[mode] || {};
// eslint-disable-next-line consistent-return
q.push(import(`@codemirror/lang-${options.mode}`).then(modeMod => {
// For html and php we need to configure selfClosingTags, to make
code folding work correctly with <jdoc:include />
if (mode === 'php') {
return import('@codemirror/lang-html').then(({
html
}) => {
const htmlOptions = options.html || {
selfClosingTags: true
};
extensions.push(modeMod.php({
baseLanguage: html(htmlOptions).language
}));
});
}
if (mode === 'html') {
modeOptions.selfClosingTags = true;
}
extensions.push(modeMod[options.mode](modeOptions));
}).catch(error => {
// eslint-disable-next-line no-console
console.error(`Cannot create an extension for
"${options.mode}" syntax mode.`, error);
}));
}
if (options.lineNumbers) {
extensions.push(lineNumbers());
}
if (options.lineWrapping) {
extensions.push(EditorView.lineWrapping);
}
if (options.activeLine) {
extensions.push(highlightActiveLineGutter(), highlightActiveLine());
}
if (options.highlightSelection) {
extensions.push(highlightSelectionMatches());
}
if (options.autoCloseBrackets) {
extensions.push(closeBrackets());
}
if (options.foldGutter) {
extensions.push(foldGutter());
}
// Keymaps
switch (options.keyMap) {
case 'emacs':
extensions.push(keymap.of([...emacsStyleKeymap, ...historyKeymap]));
break;
default:
extensions.push(keymap.of([...defaultKeymap, ...searchKeymap,
...historyKeymap]));
break;
}
// Configurable read only
const readOnly = new Compartment();
// Set a custom name so later on we can retrieve this Compartment from
view.state.config.compartments
readOnly.$j_name = 'readOnly';
extensions.push(readOnly.of(EditorState.readOnly.of(!!options.readOnly)));
// Check for a skin that suits best for the active color scheme
// TODO: Use compartments to update on change of dark mode like:
https://discuss.codemirror.net/t/dynamic-light-mode-dark-mode-how/4709
if ('colorSchemeOs' in document.documentElement.dataset
&& window.matchMedia('(prefers-color-scheme:
dark)').matches || document.documentElement.dataset.colorScheme ===
'dark') {
extensions.push(oneDark);
}
// Check for custom extensions,
// in format [['module1 name or URL', ['init
method2']], ['module2 name or URL', ['init
method2']], () => <return extension>]
if (options.customExtensions && options.customExtensions.length)
{
options.customExtensions.forEach(extInfo => {
// Check whether we have a callable
if (extInfo instanceof Function) {
extensions.push(extInfo());
return;
}
// Import the module
const [module, methods] = extInfo;
q.push(import(module).then(modObject => {
// Call each method
methods.forEach(method => {
extensions.push(modObject[method]());
});
}));
});
}
return Promise.all(q).then(() => extensions);
};
/**
* Create an editor instance for given textarea
*
* @param {HTMLTextAreaElement} textarea
* @param {Object} options
* @returns {Promise<EditorView>}
*/
async function createFromTextarea(textarea, options) {
const extensions = [minimalSetup(), await optionsToExtensions(options)];
const view = new EditorView({
doc: textarea.value,
root: options.root || null,
extensions
});
textarea.parentNode.insertBefore(view.dom, textarea);
textarea.style.display = 'none';
if (textarea.form) {
textarea.form.addEventListener('submit', () => {
textarea.value = view.state.doc.toString();
});
}
// Set up sizing
if (options.width) {
view.dom.style.width = options.width;
}
if (options.height) {
view.dom.style.height = options.height;
}
return view;
}
export { createFromTextarea, minimalSetup, optionsToExtensions };
joomla-editor-codemirror.min.js.gz000064400000001753151167745040013233
0ustar00��V�o�6~�_� �A
��i��lA�v-�c����@Sg� Ej�S��>P�R�q���0�w�}���(]7���s���B��L"�l����2�n�]�@r"�����Z6�Geʃ$x�]}�$=�`���
IfS��Z{�|2;=>>b��7嚵�eE��˔�9��gvۀe�z�Z�nj}�J�_*����OOO��.�/�{(�X�{�'{�4�vi�bW��<jg��<3��������\�3��Se$"�� l��nJ���i���z˨�(�E�V��p[Q8%�-�k[��1ҍr�Q�6�D����*�Q��%�t�6=��Miހ-�ʴE�4��K�ٕ@0�H;�c�M6��pV���)�`QKmEH����K;��
�&���"����%|)�+��|O��L�ٕ.�ru#=�` ���T�E��|�ŏ�[YC��Y�Z�N&���j�p�������݅[�
M�t,~7�z��w�Ws��ݷ�����<���4�5f�<��y����W)\���ȓUk��I�k�r���)ߋ�E��N����D��w�ܹ&?�'Z��ʸ�<�tQ�.;D��<�����^�$fҖ��^R�Ҙ�TC6t�H?�P�H�H�0'�5!
������h��Q]y�l xݓ4�Wx�����!+<Q�)I;�k��rւ"(F�/3��)��h1�d�A����0m������Y4-V<E�~
�{�����N*��z�d�J6�|u�kp�9�Z^�+��aF�i����w���č}R/�&{�/�J���EKW��l��e�M�)�Ƥ��r��4f�F.��&�wđA�^����|'0�~ò}ie(<� "rD���(�`)L@x�x��V�7Ŝ��wH6;�&�]��v���<I��Hޭy�v��ez�0����nK'���u�;��b��m�=PDQ�J[�IU�R��O�Ύ��67�debug.min.js.gz000064400000000535151170236700007376
0ustar00�m��N1��}
+��ڦ� Qv��T~���&&�`��x)UŻ���7�x��t<�.l��R�;9Wprt|
���C���S�`���y�Ϧ��v�_c|'�c��!�z�!#���{���ð����O�Ĕ��b2�i��y{�j5��S�u��1d�X��~ҡq�DE�p����z����*�\7{��%|�W�����%��Ϭ�Rt�s���r-U�쟞u.��"��c��[!��.�dTJ����I_7{��s�'.����z�&*[��&aQ����RUA��vɜ���(I��3�'�v�[4���Y~��v(�l����debug.min.js000064400000000713151170236700006755
0ustar00/**
* @copyright (C) 2018 Open Source Matters, Inc.
<https://www.joomla.org>
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/(e=>{const
o=".dbg-header",l="data-debug-toggle",n=t=>{e.getElementById(t).classList.toggle("hidden")},s=()=>{[].slice.call(e.querySelectorAll(o)).forEach(g=>{g.addEventListener("click",c=>{c.preventDefault(),n(g.getAttribute(l))})})};e.addEventListener("DOMContentLoaded",()=>{s()})})(document);
debug.js000064400000001654151170236700006200 0ustar00/**
* @copyright (C) 2018 Open Source Matters, Inc.
<https://www.joomla.org>
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
(document => {
// Selectors used by this script
const debugSectionTogglerSelector = '.dbg-header';
const toggleTargetAttribute = 'data-debug-toggle';
/**
* Toggle an element by id
* @param id
*/
const toggle = id => {
document.getElementById(id).classList.toggle('hidden');
};
/**
* Register events
*/
const registerEvents = () => {
const sectionTogglers =
[].slice.call(document.querySelectorAll(debugSectionTogglerSelector));
sectionTogglers.forEach(toggler => {
toggler.addEventListener('click', event => {
event.preventDefault();
toggle(toggler.getAttribute(toggleTargetAttribute));
});
});
};
document.addEventListener('DOMContentLoaded', () => {
registerEvents();
});
})(document);
sampledata-process.js000064400000012551151170237350010701 0ustar00/**
* @copyright (C) 2018 Open Source Matters, Inc.
<https://www.joomla.org>
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
const SampleData = {
inProgress: false
};
const sampledataAjax = (type, steps, step) => {
// Get variables
const baseUrl =
`index.php?option=com_ajax&format=json&group=sampledata&${Joomla.getOptions('csrf.token')}=1`;
// Create list
const list = document.createElement('div');
list.classList.add(`sampledata-steps-${type}-${step}`);
list.setAttribute('role', 'region');
list.setAttribute('aria-live', 'polite');
// Create paragraph
const para = document.createElement('p');
para.classList.add('loader-image');
// Create image
const loaderEl = document.createElement('joomla-core-loader');
loaderEl.setAttribute('inline', true);
loaderEl.setAttribute('size', 60);
loaderEl.setAttribute('color', 'transparent');
// Append everything
para.appendChild(loaderEl);
list.appendChild(para);
document.querySelector(`.sampledata-progress-${type}`).appendChild(list);
Joomla.request({
url:
`${baseUrl}&type=${type}&plugin=SampledataApplyStep${step}&step=${step}`,
method: 'GET',
perform: true,
onSuccess: resp => {
// Remove loader image
const loader = list.querySelector('.loader-image');
loader.parentNode.removeChild(loader);
let response = {};
try {
response = JSON.parse(resp);
} catch (e) {
Joomla.renderMessages({
error:
[Joomla.Text._('MOD_SAMPLEDATA_INVALID_RESPONSE')]
}, `.sampledata-steps-${type}-${step}`);
SampleData.inProgress = false;
return;
}
let progressClass = '';
let success;
if (response.success && response.data &&
response.data.length > 0) {
const progress =
document.querySelector(`.sampledata-progress-${type} .progress-bar`);
// Display all messages that we got
response.data.forEach(value => {
if (value === null) {
return;
}
// eslint-disable-next-line prefer-destructuring
success = value.success;
progressClass = success ? 'bg-success' :
'bg-danger';
// Display success alert
if (success) {
Joomla.renderMessages({
message: [value.message]
}, `.sampledata-steps-${type}-${step}`, false, 3000);
} else {
Joomla.renderMessages({
error: [value.message]
}, `.sampledata-steps-${type}-${step}`, false);
}
});
// Update progress
progress.innerText = `${step}/${steps}`;
progress.style.width = `${step / steps * 100}%`;
progress.setAttribute('aria-valuemin', 0);
progress.setAttribute('aria-valuemax', 100);
progress.setAttribute('aria-valuenow', step / steps *
100);
progress.classList.add(progressClass);
// Move on next step
if (success && step <= steps) {
const stepNew = step + 1;
if (stepNew <= steps) {
sampledataAjax(type, steps, stepNew);
} else {
const bar =
document.querySelector(`.sampledata-progress-${type}`);
bar.parentNode.removeChild(bar);
Joomla.renderMessages({
message:
[Joomla.Text._('MOD_SAMPLEDATA_COMPLETED')]
});
window.scroll({
top: 0,
left: 0,
behavior: 'smooth'
});
SampleData.inProgress = false;
}
}
} else {
// Display error alert
Joomla.renderMessages({
error:
[Joomla.Text._('MOD_SAMPLEDATA_INVALID_RESPONSE')]
});
window.scroll({
top: 0,
left: 0,
behavior: 'smooth'
});
SampleData.inProgress = false;
}
},
onError: () => {
Joomla.renderMessages({
error: [Joomla.Text._('MOD_SAMPLEDATA_ERROR_RESPONSE')]
});
window.scroll({
top: 0,
left: 0,
behavior: 'smooth'
});
SampleData.inProgress = false;
}
});
};
const sampledataApply = element => {
const type = element.getAttribute('data-type');
const steps = element.getAttribute('data-steps');
// Check whether the work in progress or we already processed with
current item
if (SampleData.inProgress) {
return;
}
if (element.getAttribute('data-processed')) {
alert(Joomla.Text._('MOD_SAMPLEDATA_ITEM_ALREADY_PROCESSED'));
SampleData.inProgress = false;
return;
}
// Make sure that use run this not by random clicking on the page links
// @todo use the CE Modal here
if
(!window.confirm(Joomla.Text._('MOD_SAMPLEDATA_CONFIRM_START')))
{
// eslint-disable-next-line consistent-return
return false;
}
// Turn on the progress container
document.querySelectorAll(`.sampledata-progress-${type}`).forEach(progressElement
=> {
progressElement.classList.remove('d-none');
});
element.setAttribute('data-processed', true);
SampleData.inProgress = true;
sampledataAjax(type, steps, 1);
// eslint-disable-next-line consistent-return
return false;
};
const sampleDataWrapper =
document.getElementById('sample-data-wrapper');
if (sampleDataWrapper) {
sampleDataWrapper.querySelectorAll('.apply-sample-data').forEach(link
=> {
link.addEventListener('click', ({
currentTarget
}) => sampledataApply(currentTarget));
});
}
sampledata-process.min.js000064400000005741151170237350011466 0ustar00/**
* @copyright (C) 2018 Open Source Matters, Inc.
<https://www.joomla.org>
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/const SampleData={inProgress:!1},sampledataAjax=(e,r,a)=>{const
i=`index.php?option=com_ajax&format=json&group=sampledata&${Joomla.getOptions("csrf.token")}=1`,o=document.createElement("div");o.classList.add(`sampledata-steps-${e}-${a}`),o.setAttribute("role","region"),o.setAttribute("aria-live","polite");const
c=document.createElement("p");c.classList.add("loader-image");const
n=document.createElement("joomla-core-loader");n.setAttribute("inline",!0),n.setAttribute("size",60),n.setAttribute("color","transparent"),c.appendChild(n),o.appendChild(c),document.querySelector(`.sampledata-progress-${e}`).appendChild(o),Joomla.request({url:`${i}&type=${e}&plugin=SampledataApplyStep${a}&step=${a}`,method:"GET",perform:!0,onSuccess:A=>{const
m=o.querySelector(".loader-image");m.parentNode.removeChild(m);let
l={};try{l=JSON.parse(A)}catch{Joomla.renderMessages({error:[Joomla.Text._("MOD_SAMPLEDATA_INVALID_RESPONSE")]},`.sampledata-steps-${e}-${a}`),SampleData.inProgress=!1;return}let
p="",d;if(l.success&&l.data&&l.data.length>0){const
s=document.querySelector(`.sampledata-progress-${e}
.progress-bar`);if(l.data.forEach(t=>{t!==null&&(d=t.success,p=d?"bg-success":"bg-danger",d?Joomla.renderMessages({message:[t.message]},`.sampledata-steps-${e}-${a}`,!1,3e3):Joomla.renderMessages({error:[t.message]},`.sampledata-steps-${e}-${a}`,!1))}),s.innerText=`${a}/${r}`,s.style.width=`${a/r*100}%`,s.setAttribute("aria-valuemin",0),s.setAttribute("aria-valuemax",100),s.setAttribute("aria-valuenow",a/r*100),s.classList.add(p),d&&a<=r){const
t=a+1;if(t<=r)sampledataAjax(e,r,t);else{const
u=document.querySelector(`.sampledata-progress-${e}`);u.parentNode.removeChild(u),Joomla.renderMessages({message:[Joomla.Text._("MOD_SAMPLEDATA_COMPLETED")]}),window.scroll({top:0,left:0,behavior:"smooth"}),SampleData.inProgress=!1}}}else
Joomla.renderMessages({error:[Joomla.Text._("MOD_SAMPLEDATA_INVALID_RESPONSE")]}),window.scroll({top:0,left:0,behavior:"smooth"}),SampleData.inProgress=!1},onError:()=>{Joomla.renderMessages({error:[Joomla.Text._("MOD_SAMPLEDATA_ERROR_RESPONSE")]}),window.scroll({top:0,left:0,behavior:"smooth"}),SampleData.inProgress=!1}})},sampledataApply=e=>{const
r=e.getAttribute("data-type"),a=e.getAttribute("data-steps");if(!SampleData.inProgress){if(e.getAttribute("data-processed")){alert(Joomla.Text._("MOD_SAMPLEDATA_ITEM_ALREADY_PROCESSED")),SampleData.inProgress=!1;return}return
window.confirm(Joomla.Text._("MOD_SAMPLEDATA_CONFIRM_START"))&&(document.querySelectorAll(`.sampledata-progress-${r}`).forEach(i=>{i.classList.remove("d-none")}),e.setAttribute("data-processed",!0),SampleData.inProgress=!0,sampledataAjax(r,a,1)),!1}},sampleDataWrapper=document.getElementById("sample-data-wrapper");sampleDataWrapper&&sampleDataWrapper.querySelectorAll(".apply-sample-data").forEach(e=>{e.addEventListener("click",({currentTarget:r})=>sampledataApply(r))});
sampledata-process.min.js.gz000064400000002317151170237350012101
0ustar00��Vao�6��_��!f�b��0�e:/Q�I�ކ�lF��L)R=Rv<A�}��Ɖ'��}��;���=����
�%1��t�
<���V�砟�����s��e��N���̹�v�EtcL�DdpzT�R2m!����o�ЀB�ŕ�Ip����4:x�p��g����0�ܭ{&F[E�+8N�R�K4Sk;{��ڔ
'z7▇�� ʏ��N�'R�p��ɝ4�'&�q۸6� �o�э)�"�h�����bSp�z�
Ib�:r�3hB+ޞ0�S�h%�A���B��9�]%JX{&��D���� M�
����~)� e&��zΡ�*����TM�J�Tr�r��B���';˽�VZD�6e&��zg����
4W[ ���VRa{-ʶmV�
���%1�
aġ�6�ʒH�9��x&Uj� ew�~)�CP�8��$��x���� }�P�&�Kօe��3�/e�p�����U1��7e��j9t�{�S^��2p3�vȇxDX諭��bF�$�ۻ+ӌ���I�EI���0)D���*�v�@��:\���/����G�D�dV��M���`���
K@4������E㐜�O����Y|��Ƨ���NOƃxxٿƄ�U��>.�M�F���{�.�+PW>��Ү�UdW�4*��o��詛��)˿��
�[^ ��Ձu�k��Hf��G���\J5a��ׄX��w�j�\�I�/R������v��:�\�~} 2��fo�
�<�Էģ���FRk@O-�x��~�Մ�Ⱥ��h!S7�-�x�n��j�c��U@&5a-����%��z�G�a���C1�)K
��W�?�=m�|(���;�ea�^�!�bW���a���q߿���8�-�N�"� ��ҙ��b
�]�Ů`&��`���7#��V���_:�ޭ�3dF�u��%��D�?��Ҭ�A�+:�;qF~�W�u���L<m�ۑ�Z��乴���[s4^i
%��B��G�w6�{'�/��x8���
�����k�Y�R5_�?�����`D(�z�d�����q��_�W�R��U�$mj��x�--���1v\��5#��kS�<�k����q7�1�x~]��!Y�6�+gB��4�>=ƅ��C-��b�
���ka<�<&~�I�dL
�R58���
ѫ��?��%�application.js000064400000000274151171056760007421
0ustar00$('.dropdown-toggle').dropdown()
$('.collapse').collapse('show')
$('#myModal').modal('hide')
$('.typeahead').typeahead()
$('.tabs').button()
$('.tip').tooltip()
$(".alert-message").alert()classes.js000064400000002164151171056760006553
0ustar00// Add classes
window.onload=function() {
var input = document.getElementsByTagName("input");
for (var i = 0; i < input.length; i++) {
if (input[i].className == 'button') {
input[i].className = 'btn btn-primary';
}
}
var button = document.getElementsByTagName("button");
for (var i = 0; i < input.length; i++) {
if (button[i].className == 'button') {
button[i].className = 'btn btn-primary';
}
}
var p = document.getElementsByTagName("p");
for (var i = 0; i < p.length; i++) {
if (p[i].className == 'readmore') {
p[i].className = 'btn';
}
}
var table = document.getElementsByTagName("table");
for (var i = 0; i < table.length; i++) {
if (table[i].className == 'category') {
table[i].className = 'table table-striped';
}
}
var ul = document.getElementsByTagName("ul");
for (var i = 0; i < ul.length; i++) {
if (ul[i].className == 'actions') {
ul[i].className = 'nav nav-pills';
}
}
var ul = document.getElementsByTagName("ul");
for (var i = 0; i < ul.length; i++) {
if (ul[i].className == 'pagenav') {
ul[i].className = 'pagination';
}
}
}admin-article-pagebreak.js000064400000002303151171360530011532 0ustar00/**
* @copyright (C) 2017 Open Source Matters, Inc.
<https://www.joomla.org>
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
(function() {
"use strict";
window.insertPagebreak = function(editor) {
/** Get the pagebreak title **/
var alt, tag, title = document.getElementById('title').value;
if (!window.parent.Joomla.getOptions('xtd-pagebreak')) {
// Something went wrong!
window.parent.jModalClose();
return false;
}
/** Get the pagebreak toc alias -- not inserting for now **/
/** don't know which attribute to use... **/
alt = document.getElementById('alt').value;
title = (title != '') ? 'title="' + title +
'"' : '';
alt = (alt != '') ? 'alt="' + alt +
'"' : '';
tag = '<hr class="system-pagebreak" ' + title +
' ' + alt + '/>';
/** Use the API, if editor supports it **/
if (window.parent.Joomla && window.parent.Joomla.editors
&& window.parent.Joomla.editors.instances &&
window.parent.Joomla.editors.instances.hasOwnProperty(editor)) {
window.parent.Joomla.editors.instances[editor].replaceSelection(tag)
} else {
window.parent.jInsertEditorText(tag, editor);
}
window.parent.jModalClose();
return false;
};
})();
admin-article-pagebreak.min.js000064400000001155151171360530012320
0ustar00!function(){"use
strict";window.insertPagebreak=function(a){var
b,c,d=document.getElementById("title").value;return
window.parent.Joomla.getOptions("xtd-pagebreak")?(b=document.getElementById("alt").value,d=""!=d?'title="'+d+'"':"",b=""!=b?'alt="'+b+'"':"",c='<hr
class="system-pagebreak" '+d+"
"+b+"/>",window.parent.Joomla&&window.parent.Joomla.editors&&window.parent.Joomla.editors.instances&&window.parent.Joomla.editors.instances.hasOwnProperty(a)?window.parent.Joomla.editors.instances[a].replaceSelection(c):window.parent.jInsertEditorText(c,a),window.parent.jModalClose(),!1):(window.parent.jModalClose(),!1)}}();admin-article-readmore.js000064400000002163151171360530011413
0ustar00/**
* @copyright (C) 2017 Open Source Matters, Inc.
<https://www.joomla.org>
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
window.insertReadmore = function(editor) {
"use strict";
if (!Joomla.getOptions('xtd-readmore')) {
// Something went wrong!
return false;
}
var content, options = window.Joomla.getOptions('xtd-readmore');
if (window.Joomla && window.Joomla.editors &&
window.Joomla.editors.instances &&
window.Joomla.editors.instances.hasOwnProperty(editor)) {
content = window.Joomla.editors.instances[editor].getValue();
} else {
content = (new Function('return ' + options.editor))();
}
if
(content.match(/<hr\s+id=("|')system-readmore("|')\s*\/*>/i))
{
alert(options.exists);
return false;
} else {
/** Use the API, if editor supports it **/
if (window.Joomla && window.Joomla.editors &&
window.Joomla.editors.instances &&
window.Joomla.editors.instances.hasOwnProperty(editor)) {
window.Joomla.editors.instances[editor].replaceSelection('<hr
id="system-readmore" />');
} else {
window.jInsertEditorText('<hr id="system-readmore"
/>', editor);
}
}
};
admin-article-readmore.min.js000064400000001265151171360530012177
0ustar00window.insertReadmore=function(a){"use
strict";if(!Joomla.getOptions("xtd-readmore"))return!1;var
b,c=window.Joomla.getOptions("xtd-readmore");if(b=window.Joomla&&window.Joomla.editors&&window.Joomla.editors.instances&&window.Joomla.editors.instances.hasOwnProperty(a)?window.Joomla.editors.instances[a].getValue():new
Function("return
"+c.editor)(),b.match(/<hr\s+id=("|')system-readmore("|')\s*\/*>/i))return
alert(c.exists),!1;window.Joomla&&window.Joomla.editors&&window.Joomla.editors.instances&&window.Joomla.editors.instances.hasOwnProperty(a)?window.Joomla.editors.instances[a].replaceSelection('<hr
id="system-readmore"
/>'):window.jInsertEditorText('<hr
id="system-readmore"
/>',a)};admin-articles-modal.js000064400000004244151171360530011076
0ustar00/**
* @copyright (C) 2017 Open Source Matters, Inc.
<https://www.joomla.org>
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
(function() {
"use strict";
/**
* Javascript to insert the link
* View element calls jSelectArticle when an article is clicked
* jSelectArticle creates the link tag, sends it to the editor,
* and closes the select frame.
**/
window.jSelectArticle = function (id, title, catid, object, link, lang) {
var hreflang = '', editor, tag;
if (!Joomla.getOptions('xtd-articles')) {
// Something went wrong!
window.parent.jModalClose();
return false;
}
editor = Joomla.getOptions('xtd-articles').editor;
if (lang !== '')
{
hreflang = ' hreflang="' + lang + '"';
}
tag = '<a' + hreflang + ' href="' + link +
'">' + title + '</a>';
/** Use the API, if editor supports it **/
if (window.parent.Joomla && window.parent.Joomla.editors
&& window.parent.Joomla.editors.instances &&
window.parent.Joomla.editors.instances.hasOwnProperty(editor)) {
window.parent.Joomla.editors.instances[editor].replaceSelection(tag)
} else {
window.parent.jInsertEditorText(tag, editor);
}
window.parent.jModalClose();
};
document.addEventListener('DOMContentLoaded', function(){
// Get the elements
var elements = document.querySelectorAll('.select-link');
for(var i = 0, l = elements.length; l>i; i++) {
// Listen for click event
elements[i].addEventListener('click', function (event) {
event.preventDefault();
var functionName =
event.target.getAttribute('data-function');
if (functionName === 'jSelectArticle') {
// Used in xtd_contacts
window[functionName](event.target.getAttribute('data-id'),
event.target.getAttribute('data-title'),
event.target.getAttribute('data-cat-id'), null,
event.target.getAttribute('data-uri'),
event.target.getAttribute('data-language'));
} else {
// Used in com_menus
window.parent[functionName](event.target.getAttribute('data-id'),
event.target.getAttribute('data-title'),
event.target.getAttribute('data-cat-id'), null,
event.target.getAttribute('data-uri'),
event.target.getAttribute('data-language'));
}
})
}
});
})();
admin-articles-modal.min.js000064400000002274151171360530011661
0ustar00!function(){"use
strict";window.jSelectArticle=function(a,b,c,d,e,f){var
h,i,g="";return
Joomla.getOptions("xtd-articles")?(h=Joomla.getOptions("xtd-articles").editor,""!==f&&(g='
hreflang="'+f+'"'),i="<a"+g+'
href="'+e+'">'+b+"</a>",window.parent.Joomla&&window.parent.Joomla.editors&&window.parent.Joomla.editors.instances&&window.parent.Joomla.editors.instances.hasOwnProperty(h)?window.parent.Joomla.editors.instances[h].replaceSelection(i):window.parent.jInsertEditorText(i,h),void
window.parent.jModalClose()):(window.parent.jModalClose(),!1)},document.addEventListener("DOMContentLoaded",function(){for(var
a=document.querySelectorAll(".select-link"),b=0,c=a.length;c>b;b++)a[b].addEventListener("click",function(a){a.preventDefault();var
b=a.target.getAttribute("data-function");"jSelectArticle"===b?window[b](a.target.getAttribute("data-id"),a.target.getAttribute("data-title"),a.target.getAttribute("data-cat-id"),null,a.target.getAttribute("data-uri"),a.target.getAttribute("data-language")):window.parent[b](a.target.getAttribute("data-id"),a.target.getAttribute("data-title"),a.target.getAttribute("data-cat-id"),null,a.target.getAttribute("data-uri"),a.target.getAttribute("data-language"))})})}();privacycheck.js000064400000003733151171557020007567
0ustar00/**
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
jQuery(document).ready(function() {
var variables = Joomla.getOptions('js-privacy-check'),
plg_quickicon_privacycheck_ajax_url =
variables.plg_quickicon_privacycheck_ajax_url,
plg_quickicon_privacycheck_url =
variables.plg_quickicon_privacycheck_url,
plg_quickicon_privacycheck_text =
variables.plg_quickicon_privacycheck_text;
var ajax_structure = {
success: function(data, textStatus, jqXHR) {
var link =
jQuery('#plg_quickicon_privacycheck').find('span.j-links-link');
try {
var requestList = jQuery.parseJSON(data);
} catch (e) {
// An error occurred
link.html(plg_quickicon_privacycheck_text.ERROR);
}
if (requestList.data.number_urgent_requests == 0) {
// No requests
link.html(plg_quickicon_privacycheck_text.NOREQUEST);
} else {
// Requests
var msgString = '<span class="label
label-important">'
+ requestList.data.number_urgent_requests +
'</span> '
+ plg_quickicon_privacycheck_text.REQUESTFOUND_MESSAGE;
jQuery('#system-message-container').prepend(
'<div class="alert alert-error
alert-joomlaupdate">'
+ msgString
+ ' <button class="btn btn-primary"
onclick="document.location=\'' +
plg_quickicon_privacycheck_url + '\'">'
+ plg_quickicon_privacycheck_text.REQUESTFOUND_BUTTON +
'</button>'
+ '</div>'
);
var msgString = plg_quickicon_privacycheck_text.REQUESTFOUND
+ ' <span class="label
label-important">'
+ requestList.data.number_urgent_requests + '</span>'
link.html(msgString);
}
},
error: function(jqXHR, textStatus, errorThrown) {
// An error occurred
jQuery('#plg_quickicon_privacycheck').find('span.j-links-link').html(plg_quickicon_privacycheck_text.ERROR);
},
url: plg_quickicon_privacycheck_ajax_url
};
ajax_object = new jQuery.ajax(ajax_structure);
});
admin-notifly.js000064400000001433151171634120007656 0ustar00/**
* @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All
rights reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
(function() {
"use strict";
window.updateTemplateStatus = function updateTemplateStatus(input){
jQuery.get("index.php?option=com_notifly&task=template.update",
function(data, status){
/*alert("Data: " + data + "\nStatus: " +
status);*/
return false;
});
};
window.convertFromMarkdown = function convertFromMarkdown(){
jQuery.each(jQuery('.event-message'), function(index, value){
var text = jQuery(this).html();
var converter = new showdown.Converter();
var renderedHtml = converter.makeHtml(text);
jQuery(this).html(renderedHtml);
});
}
})();
chart.min.js000064400000463347151171634120007007 0ustar00/*!
* Chart.js
* http://chartjs.org/
* Version: 2.7.0
*
* Copyright 2017 Nick Downie
* Released under the MIT license
* https://github.com/chartjs/Chart.js/blob/master/LICENSE.md
*/
!function(t){if("object"==typeof
exports&&"undefined"!=typeof
module)module.exports=t();else if("function"==typeof
define&&define.amd)define([],t);else{("undefined"!=typeof
window?window:"undefined"!=typeof
global?global:"undefined"!=typeof
self?self:this).Chart=t()}}(function(){return function t(e,n,i){function
a(r,l){if(!n[r]){if(!e[r]){var s="function"==typeof
require&&require;if(!l&&s)return s(r,!0);if(o)return
o(r,!0);var u=new Error("Cannot find module
'"+r+"'");throw
u.code="MODULE_NOT_FOUND",u}var
d=n[r]={exports:{}};e[r][0].call(d.exports,function(t){var
n=e[r][1][t];return a(n||t)},d,d.exports,t,e,n,i)}return
n[r].exports}for(var o="function"==typeof
require&&require,r=0;r<i.length;r++)a(i[r]);return
a}({1:[function(t,e,n){},{}],2:[function(t,e,n){function i(t){if(t){var
e=/^#([a-fA-F0-9]{3})$/i,n=/^#([a-fA-F0-9]{6})$/i,i=/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i,a=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i,o=/(\w+)/,r=[0,0,0],l=1,s=t.match(e);if(s){s=s[1];for(d=0;d<r.length;d++)r[d]=parseInt(s[d]+s[d],16)}else
if(s=t.match(n)){s=s[1];for(d=0;d<r.length;d++)r[d]=parseInt(s.slice(2*d,2*d+2),16)}else
if(s=t.match(i)){for(d=0;d<r.length;d++)r[d]=parseInt(s[d+1]);l=parseFloat(s[4])}else
if(s=t.match(a)){for(d=0;d<r.length;d++)r[d]=Math.round(2.55*parseFloat(s[d+1]));l=parseFloat(s[4])}else
if(s=t.match(o)){if("transparent"==s[1])return[0,0,0,0];if(!(r=c[s[1]]))return}for(var
d=0;d<r.length;d++)r[d]=u(r[d],0,255);return
l=l||0==l?u(l,0,1):1,r[3]=l,r}}function a(t){if(t){var
e=/^hsla?\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/,n=t.match(e);if(n){var
i=parseFloat(n[4]);return[u(parseInt(n[1]),0,360),u(parseFloat(n[2]),0,100),u(parseFloat(n[3]),0,100),u(isNaN(i)?1:i,0,1)]}}}function
o(t){if(t){var
e=/^hwb\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/,n=t.match(e);if(n){var
i=parseFloat(n[4]);return[u(parseInt(n[1]),0,360),u(parseFloat(n[2]),0,100),u(parseFloat(n[3]),0,100),u(isNaN(i)?1:i,0,1)]}}}function
r(t,e){return void 0===e&&(e=void
0!==t[3]?t[3]:1),"rgba("+t[0]+", "+t[1]+",
"+t[2]+", "+e+")"}function
l(t,e){return"rgba("+Math.round(t[0]/255*100)+"%,
"+Math.round(t[1]/255*100)+"%,
"+Math.round(t[2]/255*100)+"%,
"+(e||t[3]||1)+")"}function s(t,e){return void
0===e&&(e=void 0!==t[3]?t[3]:1),"hsla("+t[0]+",
"+t[1]+"%, "+t[2]+"%, "+e+")"}function
u(t,e,n){return Math.min(Math.max(e,t),n)}function d(t){var
e=t.toString(16).toUpperCase();return e.length<2?"0"+e:e}var
c=t(6);e.exports={getRgba:i,getHsla:a,getRgb:function(t){var e=i(t);return
e&&e.slice(0,3)},getHsl:function(t){var e=a(t);return
e&&e.slice(0,3)},getHwb:o,getAlpha:function(t){var e=i(t);return
e?e[3]:(e=a(t))?e[3]:(e=o(t))?e[3]:void
0},hexString:function(t){return"#"+d(t[0])+d(t[1])+d(t[2])},rgbString:function(t,e){return
e<1||t[3]&&t[3]<1?r(t,e):"rgb("+t[0]+",
"+t[1]+",
"+t[2]+")"},rgbaString:r,percentString:function(t,e){return
e<1||t[3]&&t[3]<1?l(t,e):"rgb("+Math.round(t[0]/255*100)+"%,
"+Math.round(t[1]/255*100)+"%,
"+Math.round(t[2]/255*100)+"%)"},percentaString:l,hslString:function(t,e){return
e<1||t[3]&&t[3]<1?s(t,e):"hsl("+t[0]+",
"+t[1]+"%,
"+t[2]+"%)"},hslaString:s,hwbString:function(t,e){return
void 0===e&&(e=void 0!==t[3]?t[3]:1),"hwb("+t[0]+",
"+t[1]+"%, "+t[2]+"%"+(void
0!==e&&1!==e?",
"+e:"")+")"},keyword:function(t){return
h[t.slice(0,3)]}};var h={};for(var f in
c)h[c[f]]=f},{6:6}],3:[function(t,e,n){var i=t(5),a=t(2),o=function(t){if(t
instanceof o)return t;if(!(this instanceof o))return new
o(t);this.valid=!1,this.values={rgb:[0,0,0],hsl:[0,0,0],hsv:[0,0,0],hwb:[0,0,0],cmyk:[0,0,0,0],alpha:1};var
e;"string"==typeof
t?(e=a.getRgba(t))?this.setValues("rgb",e):(e=a.getHsla(t))?this.setValues("hsl",e):(e=a.getHwb(t))&&this.setValues("hwb",e):"object"==typeof
t&&(void 0!==(e=t).r||void
0!==e.red?this.setValues("rgb",e):void 0!==e.l||void
0!==e.lightness?this.setValues("hsl",e):void 0!==e.v||void
0!==e.value?this.setValues("hsv",e):void 0!==e.w||void
0!==e.whiteness?this.setValues("hwb",e):void
0===e.c&&void
0===e.cyan||this.setValues("cmyk",e))};o.prototype={isValid:function(){return
this.valid},rgb:function(){return
this.setSpace("rgb",arguments)},hsl:function(){return
this.setSpace("hsl",arguments)},hsv:function(){return
this.setSpace("hsv",arguments)},hwb:function(){return
this.setSpace("hwb",arguments)},cmyk:function(){return
this.setSpace("cmyk",arguments)},rgbArray:function(){return
this.values.rgb},hslArray:function(){return
this.values.hsl},hsvArray:function(){return
this.values.hsv},hwbArray:function(){var t=this.values;return
1!==t.alpha?t.hwb.concat([t.alpha]):t.hwb},cmykArray:function(){return
this.values.cmyk},rgbaArray:function(){var t=this.values;return
t.rgb.concat([t.alpha])},hslaArray:function(){var t=this.values;return
t.hsl.concat([t.alpha])},alpha:function(t){return void
0===t?this.values.alpha:(this.setValues("alpha",t),this)},red:function(t){return
this.setChannel("rgb",0,t)},green:function(t){return
this.setChannel("rgb",1,t)},blue:function(t){return
this.setChannel("rgb",2,t)},hue:function(t){return
t&&(t=(t%=360)<0?360+t:t),this.setChannel("hsl",0,t)},saturation:function(t){return
this.setChannel("hsl",1,t)},lightness:function(t){return
this.setChannel("hsl",2,t)},saturationv:function(t){return
this.setChannel("hsv",1,t)},whiteness:function(t){return
this.setChannel("hwb",1,t)},blackness:function(t){return
this.setChannel("hwb",2,t)},value:function(t){return
this.setChannel("hsv",2,t)},cyan:function(t){return
this.setChannel("cmyk",0,t)},magenta:function(t){return
this.setChannel("cmyk",1,t)},yellow:function(t){return
this.setChannel("cmyk",2,t)},black:function(t){return
this.setChannel("cmyk",3,t)},hexString:function(){return
a.hexString(this.values.rgb)},rgbString:function(){return
a.rgbString(this.values.rgb,this.values.alpha)},rgbaString:function(){return
a.rgbaString(this.values.rgb,this.values.alpha)},percentString:function(){return
a.percentString(this.values.rgb,this.values.alpha)},hslString:function(){return
a.hslString(this.values.hsl,this.values.alpha)},hslaString:function(){return
a.hslaString(this.values.hsl,this.values.alpha)},hwbString:function(){return
a.hwbString(this.values.hwb,this.values.alpha)},keyword:function(){return
a.keyword(this.values.rgb,this.values.alpha)},rgbNumber:function(){var
t=this.values.rgb;return
t[0]<<16|t[1]<<8|t[2]},luminosity:function(){for(var
t=this.values.rgb,e=[],n=0;n<t.length;n++){var
i=t[n]/255;e[n]=i<=.03928?i/12.92:Math.pow((i+.055)/1.055,2.4)}return.2126*e[0]+.7152*e[1]+.0722*e[2]},contrast:function(t){var
e=this.luminosity(),n=t.luminosity();return
e>n?(e+.05)/(n+.05):(n+.05)/(e+.05)},level:function(t){var
e=this.contrast(t);return
e>=7.1?"AAA":e>=4.5?"AA":""},dark:function(){var
t=this.values.rgb;return(299*t[0]+587*t[1]+114*t[2])/1e3<128},light:function(){return!this.dark()},negate:function(){for(var
t=[],e=0;e<3;e++)t[e]=255-this.values.rgb[e];return
this.setValues("rgb",t),this},lighten:function(t){var
e=this.values.hsl;return
e[2]+=e[2]*t,this.setValues("hsl",e),this},darken:function(t){var
e=this.values.hsl;return
e[2]-=e[2]*t,this.setValues("hsl",e),this},saturate:function(t){var
e=this.values.hsl;return
e[1]+=e[1]*t,this.setValues("hsl",e),this},desaturate:function(t){var
e=this.values.hsl;return
e[1]-=e[1]*t,this.setValues("hsl",e),this},whiten:function(t){var
e=this.values.hwb;return
e[1]+=e[1]*t,this.setValues("hwb",e),this},blacken:function(t){var
e=this.values.hwb;return
e[2]+=e[2]*t,this.setValues("hwb",e),this},greyscale:function(){var
t=this.values.rgb,e=.3*t[0]+.59*t[1]+.11*t[2];return
this.setValues("rgb",[e,e,e]),this},clearer:function(t){var
e=this.values.alpha;return
this.setValues("alpha",e-e*t),this},opaquer:function(t){var
e=this.values.alpha;return
this.setValues("alpha",e+e*t),this},rotate:function(t){var
e=this.values.hsl,n=(e[0]+t)%360;return
e[0]=n<0?360+n:n,this.setValues("hsl",e),this},mix:function(t,e){var
n=this,i=t,a=void
0===e?.5:e,o=2*a-1,r=n.alpha()-i.alpha(),l=((o*r==-1?o:(o+r)/(1+o*r))+1)/2,s=1-l;return
this.rgb(l*n.red()+s*i.red(),l*n.green()+s*i.green(),l*n.blue()+s*i.blue()).alpha(n.alpha()*a+i.alpha()*(1-a))},toJSON:function(){return
this.rgb()},clone:function(){var t,e,n=new
o,i=this.values,a=n.values;for(var r in
i)i.hasOwnProperty(r)&&(t=i[r],"[object
Array]"===(e={}.toString.call(t))?a[r]=t.slice(0):"[object
Number]"===e?a[r]=t:console.error("unexpected color
value:",t));return
n}},o.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},o.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},o.prototype.getValues=function(t){for(var
e=this.values,n={},i=0;i<t.length;i++)n[t.charAt(i)]=e[t][i];return
1!==e.alpha&&(n.a=e.alpha),n},o.prototype.setValues=function(t,e){var
n,a=this.values,o=this.spaces,r=this.maxes,l=1;if(this.valid=!0,"alpha"===t)l=e;else
if(e.length)a[t]=e.slice(0,t.length),l=e[t.length];else if(void
0!==e[t.charAt(0)]){for(n=0;n<t.length;n++)a[t][n]=e[t.charAt(n)];l=e.a}else
if(void 0!==e[o[t][0]]){var
s=o[t];for(n=0;n<t.length;n++)a[t][n]=e[s[n]];l=e.alpha}if(a.alpha=Math.max(0,Math.min(1,void
0===l?a.alpha:l)),"alpha"===t)return!1;var
u;for(n=0;n<t.length;n++)u=Math.max(0,Math.min(r[t][n],a[t][n])),a[t][n]=Math.round(u);for(var
d in
o)d!==t&&(a[d]=i[t][d](a[t]));return!0},o.prototype.setSpace=function(t,e){var
n=e[0];return void 0===n?this.getValues(t):("number"==typeof
n&&(n=Array.prototype.slice.call(e)),this.setValues(t,n),this)},o.prototype.setChannel=function(t,e,n){var
i=this.values[t];return void
0===n?i[e]:n===i[e]?this:(i[e]=n,this.setValues(t,i),this)},"undefined"!=typeof
window&&(window.Color=o),e.exports=o},{2:2,5:5}],4:[function(t,e,n){function
i(t){var
e,n,i,a=t[0]/255,o=t[1]/255,r=t[2]/255,l=Math.min(a,o,r),s=Math.max(a,o,r),u=s-l;return
s==l?e=0:a==s?e=(o-r)/u:o==s?e=2+(r-a)/u:r==s&&(e=4+(a-o)/u),(e=Math.min(60*e,360))<0&&(e+=360),i=(l+s)/2,n=s==l?0:i<=.5?u/(s+l):u/(2-s-l),[e,100*n,100*i]}function
a(t){var
e,n,i,a=t[0],o=t[1],r=t[2],l=Math.min(a,o,r),s=Math.max(a,o,r),u=s-l;return
n=0==s?0:u/s*1e3/10,s==l?e=0:a==s?e=(o-r)/u:o==s?e=2+(r-a)/u:r==s&&(e=4+(a-o)/u),(e=Math.min(60*e,360))<0&&(e+=360),i=s/255*1e3/10,[e,n,i]}function
o(t){var
e=t[0],n=t[1],a=t[2];return[i(t)[0],100*(1/255*Math.min(e,Math.min(n,a))),100*(a=1-1/255*Math.max(e,Math.max(n,a)))]}function
l(t){var e,n,i,a,o=t[0]/255,r=t[1]/255,l=t[2]/255;return
a=Math.min(1-o,1-r,1-l),e=(1-o-a)/(1-a)||0,n=(1-r-a)/(1-a)||0,i=(1-l-a)/(1-a)||0,[100*e,100*n,100*i,100*a]}function
s(t){return C[JSON.stringify(t)]}function u(t){var
e=t[0]/255,n=t[1]/255,i=t[2]/255;return[100*(.4124*(e=e>.04045?Math.pow((e+.055)/1.055,2.4):e/12.92)+.3576*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)+.1805*(i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92)),100*(.2126*e+.7152*n+.0722*i),100*(.0193*e+.1192*n+.9505*i)]}function
d(t){var e,n,i,a=u(t),o=a[0],r=a[1],l=a[2];return
o/=95.047,r/=100,l/=108.883,o=o>.008856?Math.pow(o,1/3):7.787*o+16/116,r=r>.008856?Math.pow(r,1/3):7.787*r+16/116,l=l>.008856?Math.pow(l,1/3):7.787*l+16/116,e=116*r-16,n=500*(o-r),i=200*(r-l),[e,n,i]}function
c(t){var e,n,i,a,o,r=t[0]/360,l=t[1]/100,s=t[2]/100;if(0==l)return
o=255*s,[o,o,o];e=2*s-(n=s<.5?s*(1+l):s+l-s*l),a=[0,0,0];for(var
u=0;u<3;u++)(i=r+1/3*-(u-1))<0&&i++,i>1&&i--,o=6*i<1?e+6*(n-e)*i:2*i<1?n:3*i<2?e+(n-e)*(2/3-i)*6:e,a[u]=255*o;return
a}function h(t){var
e=t[0]/60,n=t[1]/100,i=t[2]/100,a=Math.floor(e)%6,o=e-Math.floor(e),r=255*i*(1-n),l=255*i*(1-n*o),s=255*i*(1-n*(1-o)),i=255*i;switch(a){case
0:return[i,s,r];case 1:return[l,i,r];case 2:return[r,i,s];case
3:return[r,l,i];case 4:return[s,r,i];case 5:return[i,r,l]}}function
f(t){var
e,n,i,a,o=t[0]/360,l=t[1]/100,s=t[2]/100,u=l+s;switch(u>1&&(l/=u,s/=u),e=Math.floor(6*o),n=1-s,i=6*o-e,0!=(1&e)&&(i=1-i),a=l+i*(n-l),e){default:case
6:case 0:r=n,g=a,b=l;break;case 1:r=a,g=n,b=l;break;case
2:r=l,g=n,b=a;break;case 3:r=l,g=a,b=n;break;case 4:r=a,g=l,b=n;break;case
5:r=n,g=l,b=a}return[255*r,255*g,255*b]}function p(t){var
e,n,i,a=t[0]/100,o=t[1]/100,r=t[2]/100,l=t[3]/100;return
e=1-Math.min(1,a*(1-l)+l),n=1-Math.min(1,o*(1-l)+l),i=1-Math.min(1,r*(1-l)+l),[255*e,255*n,255*i]}function
v(t){var e,n,i,a=t[0]/100,o=t[1]/100,r=t[2]/100;return
e=3.2406*a+-1.5372*o+-.4986*r,n=-.9689*a+1.8758*o+.0415*r,i=.0557*a+-.204*o+1.057*r,e=e>.0031308?1.055*Math.pow(e,1/2.4)-.055:e*=12.92,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:n*=12.92,i=i>.0031308?1.055*Math.pow(i,1/2.4)-.055:i*=12.92,e=Math.min(Math.max(0,e),1),n=Math.min(Math.max(0,n),1),i=Math.min(Math.max(0,i),1),[255*e,255*n,255*i]}function
m(t){var e,n,i,a=t[0],o=t[1],r=t[2];return
a/=95.047,o/=100,r/=108.883,a=a>.008856?Math.pow(a,1/3):7.787*a+16/116,o=o>.008856?Math.pow(o,1/3):7.787*o+16/116,r=r>.008856?Math.pow(r,1/3):7.787*r+16/116,e=116*o-16,n=500*(a-o),i=200*(o-r),[e,n,i]}function
x(t){var e,n,i,a,o=t[0],r=t[1],l=t[2];return
o<=8?a=(n=100*o/903.3)/100*7.787+16/116:(n=100*Math.pow((o+16)/116,3),a=Math.pow(n/100,1/3)),e=e/95.047<=.008856?e=95.047*(r/500+a-16/116)/7.787:95.047*Math.pow(r/500+a,3),i=i/108.883<=.008859?i=108.883*(a-l/200-16/116)/7.787:108.883*Math.pow(a-l/200,3),[e,n,i]}function
y(t){var e,n,i,a=t[0],o=t[1],r=t[2];return
e=Math.atan2(r,o),(n=360*e/2/Math.PI)<0&&(n+=360),i=Math.sqrt(o*o+r*r),[a,i,n]}function
k(t){return v(x(t))}function w(t){var e,n,i,a=t[0],o=t[1];return
i=t[2]/360*2*Math.PI,e=o*Math.cos(i),n=o*Math.sin(i),[a,e,n]}function
M(t){return
S[t]}e.exports={rgb2hsl:i,rgb2hsv:a,rgb2hwb:o,rgb2cmyk:l,rgb2keyword:s,rgb2xyz:u,rgb2lab:d,rgb2lch:function(t){return
y(d(t))},hsl2rgb:c,hsl2hsv:function(t){var
e,n,i=t[0],a=t[1]/100,o=t[2]/100;return
0===o?[0,0,0]:(o*=2,a*=o<=1?o:2-o,n=(o+a)/2,e=2*a/(o+a),[i,100*e,100*n])},hsl2hwb:function(t){return
o(c(t))},hsl2cmyk:function(t){return
l(c(t))},hsl2keyword:function(t){return
s(c(t))},hsv2rgb:h,hsv2hsl:function(t){var
e,n,i=t[0],a=t[1]/100,o=t[2]/100;return
n=(2-a)*o,e=a*o,e/=n<=1?n:2-n,e=e||0,n/=2,[i,100*e,100*n]},hsv2hwb:function(t){return
o(h(t))},hsv2cmyk:function(t){return
l(h(t))},hsv2keyword:function(t){return
s(h(t))},hwb2rgb:f,hwb2hsl:function(t){return
i(f(t))},hwb2hsv:function(t){return a(f(t))},hwb2cmyk:function(t){return
l(f(t))},hwb2keyword:function(t){return
s(f(t))},cmyk2rgb:p,cmyk2hsl:function(t){return
i(p(t))},cmyk2hsv:function(t){return a(p(t))},cmyk2hwb:function(t){return
o(p(t))},cmyk2keyword:function(t){return
s(p(t))},keyword2rgb:M,keyword2hsl:function(t){return
i(M(t))},keyword2hsv:function(t){return
a(M(t))},keyword2hwb:function(t){return
o(M(t))},keyword2cmyk:function(t){return
l(M(t))},keyword2lab:function(t){return
d(M(t))},keyword2xyz:function(t){return
u(M(t))},xyz2rgb:v,xyz2lab:m,xyz2lch:function(t){return
y(m(t))},lab2xyz:x,lab2rgb:k,lab2lch:y,lch2lab:w,lch2xyz:function(t){return
x(w(t))},lch2rgb:function(t){return k(w(t))}};var
S={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},C={};for(var
_ in S)C[JSON.stringify(S[_])]=_},{}],5:[function(t,e,n){var
i=t(4),a=function(){return new u};for(var o in
i){a[o+"Raw"]=function(t){return
function(e){return"number"==typeof
e&&(e=Array.prototype.slice.call(arguments)),i[t](e)}}(o);var
r=/(\w+)2(\w+)/.exec(o),l=r[1],s=r[2];(a[l]=a[l]||{})[s]=a[o]=function(t){return
function(e){"number"==typeof
e&&(e=Array.prototype.slice.call(arguments));var
n=i[t](e);if("string"==typeof n||void 0===n)return n;for(var
a=0;a<n.length;a++)n[a]=Math.round(n[a]);return n}}(o)}var
u=function(){this.convs={}};u.prototype.routeSpace=function(t,e){var
n=e[0];return void 0===n?this.getValues(t):("number"==typeof
n&&(n=Array.prototype.slice.call(e)),this.setValues(t,n))},u.prototype.setValues=function(t,e){return
this.space=t,this.convs={},this.convs[t]=e,this},u.prototype.getValues=function(t){var
e=this.convs[t];if(!e){var
n=this.space,i=this.convs[n];e=a[n][t](i),this.convs[t]=e}return
e},["rgb","hsl","hsv","cmyk","keyword"].forEach(function(t){u.prototype[t]=function(e){return
this.routeSpace(t,arguments)}}),e.exports=a},{4:4}],6:[function(t,e,n){"use
strict";e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},{}],7:[function(t,e,n){var
i=t(29)();i.helpers=t(45),t(27)(i),i.defaults=t(25),i.Element=t(26),i.elements=t(40),i.Interaction=t(28),i.platform=t(48),t(31)(i),t(22)(i),t(23)(i),t(24)(i),t(30)(i),t(33)(i),t(32)(i),t(35)(i),t(54)(i),t(52)(i),t(53)(i),t(55)(i),t(56)(i),t(57)(i),t(15)(i),t(16)(i),t(17)(i),t(18)(i),t(19)(i),t(20)(i),t(21)(i),t(8)(i),t(9)(i),t(10)(i),t(11)(i),t(12)(i),t(13)(i),t(14)(i);var
a=[];a.push(t(49)(i),t(50)(i),t(51)(i)),i.plugins.register(a),i.platform.initialize(),e.exports=i,"undefined"!=typeof
window&&(window.Chart=i),i.canvasHelpers=i.helpers.canvas},{10:10,11:11,12:12,13:13,14:14,15:15,16:16,17:17,18:18,19:19,20:20,21:21,22:22,23:23,24:24,25:25,26:26,27:27,28:28,29:29,30:30,31:31,32:32,33:33,35:35,40:40,45:45,48:48,49:49,50:50,51:51,52:52,53:53,54:54,55:55,56:56,57:57,8:8,9:9}],8:[function(t,e,n){"use
strict";e.exports=function(t){t.Bar=function(e,n){return
n.type="bar",new t(e,n)}}},{}],9:[function(t,e,n){"use
strict";e.exports=function(t){t.Bubble=function(e,n){return
n.type="bubble",new t(e,n)}}},{}],10:[function(t,e,n){"use
strict";e.exports=function(t){t.Doughnut=function(e,n){return
n.type="doughnut",new t(e,n)}}},{}],11:[function(t,e,n){"use
strict";e.exports=function(t){t.Line=function(e,n){return
n.type="line",new t(e,n)}}},{}],12:[function(t,e,n){"use
strict";e.exports=function(t){t.PolarArea=function(e,n){return
n.type="polarArea",new
t(e,n)}}},{}],13:[function(t,e,n){"use
strict";e.exports=function(t){t.Radar=function(e,n){return
n.type="radar",new t(e,n)}}},{}],14:[function(t,e,n){"use
strict";e.exports=function(t){t.Scatter=function(e,n){return
n.type="scatter",new t(e,n)}}},{}],15:[function(t,e,n){"use
strict";var
i=t(25),a=t(40),o=t(45);i._set("bar",{hover:{mode:"label"},scales:{xAxes:[{type:"category",categoryPercentage:.8,barPercentage:.9,offset:!0,gridLines:{offsetGridLines:!0}}],yAxes:[{type:"linear"}]}}),i._set("horizontalBar",{hover:{mode:"index",axis:"y"},scales:{xAxes:[{type:"linear",position:"bottom"}],yAxes:[{position:"left",type:"category",categoryPercentage:.8,barPercentage:.9,offset:!0,gridLines:{offsetGridLines:!0}}]},elements:{rectangle:{borderSkipped:"left"}},tooltips:{callbacks:{title:function(t,e){var
n="";return
t.length>0&&(t[0].yLabel?n=t[0].yLabel:e.labels.length>0&&t[0].index<e.labels.length&&(n=e.labels[t[0].index])),n},label:function(t,e){return(e.datasets[t.datasetIndex].label||"")+":
"+t.xLabel}},mode:"index",axis:"y"}}),e.exports=function(t){t.controllers.bar=t.DatasetController.extend({dataElementType:a.Rectangle,initialize:function(){var
e,n=this;t.DatasetController.prototype.initialize.apply(n,arguments),(e=n.getMeta()).stack=n.getDataset().stack,e.bar=!0},update:function(t){var
e,n,i=this,a=i.getMeta().data;for(i._ruler=i.getRuler(),e=0,n=a.length;e<n;++e)i.updateElement(a[e],e,t)},updateElement:function(t,e,n){var
i=this,a=i.chart,r=i.getMeta(),l=i.getDataset(),s=t.custom||{},u=a.options.elements.rectangle;t._xScale=i.getScaleForId(r.xAxisID),t._yScale=i.getScaleForId(r.yAxisID),t._datasetIndex=i.index,t._index=e,t._model={datasetLabel:l.label,label:a.data.labels[e],borderSkipped:s.borderSkipped?s.borderSkipped:u.borderSkipped,backgroundColor:s.backgroundColor?s.backgroundColor:o.valueAtIndexOrDefault(l.backgroundColor,e,u.backgroundColor),borderColor:s.borderColor?s.borderColor:o.valueAtIndexOrDefault(l.borderColor,e,u.borderColor),borderWidth:s.borderWidth?s.borderWidth:o.valueAtIndexOrDefault(l.borderWidth,e,u.borderWidth)},i.updateElementGeometry(t,e,n),t.pivot()},updateElementGeometry:function(t,e,n){var
i=this,a=t._model,o=i.getValueScale(),r=o.getBasePixel(),l=o.isHorizontal(),s=i._ruler||i.getRuler(),u=i.calculateBarValuePixels(i.index,e),d=i.calculateBarIndexPixels(i.index,e,s);a.horizontal=l,a.base=n?r:u.base,a.x=l?n?r:u.head:d.center,a.y=l?d.center:n?r:u.head,a.height=l?d.size:void
0,a.width=l?void 0:d.size},getValueScaleId:function(){return
this.getMeta().yAxisID},getIndexScaleId:function(){return
this.getMeta().xAxisID},getValueScale:function(){return
this.getScaleForId(this.getValueScaleId())},getIndexScale:function(){return
this.getScaleForId(this.getIndexScaleId())},getStackCount:function(t){var
e,n,i=this,a=i.chart,o=i.getIndexScale().options.stacked,r=void
0===t?a.data.datasets.length:t+1,l=[];for(e=0;e<r;++e)(n=a.getDatasetMeta(e)).bar&&a.isDatasetVisible(e)&&(!1===o||!0===o&&-1===l.indexOf(n.stack)||void
0===o&&(void
0===n.stack||-1===l.indexOf(n.stack)))&&l.push(n.stack);return
l.length},getStackIndex:function(t){return
this.getStackCount(t)-1},getRuler:function(){var
t,e,n=this,i=n.getIndexScale(),a=n.getStackCount(),o=n.index,r=[],l=i.isHorizontal(),s=l?i.left:i.top,u=s+(l?i.width:i.height);for(t=0,e=n.getMeta().data.length;t<e;++t)r.push(i.getPixelForValue(null,t,o));return{pixels:r,start:s,end:u,stackCount:a,scale:i}},calculateBarValuePixels:function(t,e){var
n,i,a,o,r,l,s=this,u=s.chart,d=s.getMeta(),c=s.getValueScale(),h=u.data.datasets,f=c.getRightValue(h[t].data[e]),g=c.options.stacked,p=d.stack,v=0;if(g||void
0===g&&void
0!==p)for(n=0;n<t;++n)(i=u.getDatasetMeta(n)).bar&&i.stack===p&&i.controller.getValueScaleId()===c.id&&u.isDatasetVisible(n)&&(a=c.getRightValue(h[n].data[e]),(f<0&&a<0||f>=0&&a>0)&&(v+=a));return
o=c.getPixelForValue(v),r=c.getPixelForValue(v+f),l=(r-o)/2,{size:l,base:o,head:r,center:r+l/2}},calculateBarIndexPixels:function(t,e,n){var
i,a,r,l,s,u,d=this,c=n.scale.options,h=d.getStackIndex(t),f=n.pixels,g=f[e],p=f.length,v=n.start,m=n.end;return
1===p?(i=g>v?g-v:m-g,a=g<m?m-g:g-v):(e>0&&(i=(g-f[e-1])/2,e===p-1&&(a=i)),e<p-1&&(a=(f[e+1]-g)/2,0===e&&(i=a))),r=i*c.categoryPercentage,l=a*c.categoryPercentage,s=(r+l)/n.stackCount,u=s*c.barPercentage,u=Math.min(o.valueOrDefault(c.barThickness,u),o.valueOrDefault(c.maxBarThickness,1/0)),g-=r,g+=s*h,g+=(s-u)/2,{size:u,base:g,head:g+u,center:g+u/2}},draw:function(){var
t=this,e=t.chart,n=t.getValueScale(),i=t.getMeta().data,a=t.getDataset(),r=i.length,l=0;for(o.canvas.clipArea(e.ctx,e.chartArea);l<r;++l)isNaN(n.getRightValue(a.data[l]))||i[l].draw();o.canvas.unclipArea(e.ctx)},setHoverStyle:function(t){var
e=this.chart.data.datasets[t._datasetIndex],n=t._index,i=t.custom||{},a=t._model;a.backgroundColor=i.hoverBackgroundColor?i.hoverBackgroundColor:o.valueAtIndexOrDefault(e.hoverBackgroundColor,n,o.getHoverColor(a.backgroundColor)),a.borderColor=i.hoverBorderColor?i.hoverBorderColor:o.valueAtIndexOrDefault(e.hoverBorderColor,n,o.getHoverColor(a.borderColor)),a.borderWidth=i.hoverBorderWidth?i.hoverBorderWidth:o.valueAtIndexOrDefault(e.hoverBorderWidth,n,a.borderWidth)},removeHoverStyle:function(t){var
e=this.chart.data.datasets[t._datasetIndex],n=t._index,i=t.custom||{},a=t._model,r=this.chart.options.elements.rectangle;a.backgroundColor=i.backgroundColor?i.backgroundColor:o.valueAtIndexOrDefault(e.backgroundColor,n,r.backgroundColor),a.borderColor=i.borderColor?i.borderColor:o.valueAtIndexOrDefault(e.borderColor,n,r.borderColor),a.borderWidth=i.borderWidth?i.borderWidth:o.valueAtIndexOrDefault(e.borderWidth,n,r.borderWidth)}}),t.controllers.horizontalBar=t.controllers.bar.extend({getValueScaleId:function(){return
this.getMeta().xAxisID},getIndexScaleId:function(){return
this.getMeta().yAxisID}})}},{25:25,40:40,45:45}],16:[function(t,e,n){"use
strict";var
i=t(25),a=t(40),o=t(45);i._set("bubble",{hover:{mode:"single"},scales:{xAxes:[{type:"linear",position:"bottom",id:"x-axis-0"}],yAxes:[{type:"linear",position:"left",id:"y-axis-0"}]},tooltips:{callbacks:{title:function(){return""},label:function(t,e){var
n=e.datasets[t.datasetIndex].label||"",i=e.datasets[t.datasetIndex].data[t.index];return
n+": ("+t.xLabel+", "+t.yLabel+",
"+i.r+")"}}}}),e.exports=function(t){t.controllers.bubble=t.DatasetController.extend({dataElementType:a.Point,update:function(t){var
e=this,n=e.getMeta().data;o.each(n,function(n,i){e.updateElement(n,i,t)})},updateElement:function(t,e,n){var
i=this,a=i.getMeta(),o=t.custom||{},r=i.getScaleForId(a.xAxisID),l=i.getScaleForId(a.yAxisID),s=i._resolveElementOptions(t,e),u=i.getDataset().data[e],d=i.index,c=n?r.getPixelForDecimal(.5):r.getPixelForValue("object"==typeof
u?u:NaN,e,d),h=n?l.getBasePixel():l.getPixelForValue(u,e,d);t._xScale=r,t._yScale=l,t._options=s,t._datasetIndex=d,t._index=e,t._model={backgroundColor:s.backgroundColor,borderColor:s.borderColor,borderWidth:s.borderWidth,hitRadius:s.hitRadius,pointStyle:s.pointStyle,radius:n?0:s.radius,skip:o.skip||isNaN(c)||isNaN(h),x:c,y:h},t.pivot()},setHoverStyle:function(t){var
e=t._model,n=t._options;e.backgroundColor=o.valueOrDefault(n.hoverBackgroundColor,o.getHoverColor(n.backgroundColor)),e.borderColor=o.valueOrDefault(n.hoverBorderColor,o.getHoverColor(n.borderColor)),e.borderWidth=o.valueOrDefault(n.hoverBorderWidth,n.borderWidth),e.radius=n.radius+n.hoverRadius},removeHoverStyle:function(t){var
e=t._model,n=t._options;e.backgroundColor=n.backgroundColor,e.borderColor=n.borderColor,e.borderWidth=n.borderWidth,e.radius=n.radius},_resolveElementOptions:function(t,e){var
n,i,a,r=this,l=r.chart,s=l.data.datasets[r.index],u=t.custom||{},d=l.options.elements.point,c=o.options.resolve,h=s.data[e],f={},g={chart:l,dataIndex:e,dataset:s,datasetIndex:r.index},p=["backgroundColor","borderColor","borderWidth","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth","hoverRadius","hitRadius","pointStyle"];for(n=0,i=p.length;n<i;++n)f[a=p[n]]=c([u[a],s[a],d[a]],g,e);return
f.radius=c([u.radius,h?h.r:void
0,s.radius,d.radius],g,e),f}})}},{25:25,40:40,45:45}],17:[function(t,e,n){"use
strict";var
i=t(25),a=t(40),o=t(45);i._set("doughnut",{animation:{animateRotate:!0,animateScale:!1},hover:{mode:"single"},legendCallback:function(t){var
e=[];e.push('<ul
class="'+t.id+'-legend">');var
n=t.data,i=n.datasets,a=n.labels;if(i.length)for(var
o=0;o<i[0].data.length;++o)e.push('<li><span
style="background-color:'+i[0].backgroundColor[o]+'"></span>'),a[o]&&e.push(a[o]),e.push("</li>");return
e.push("</ul>"),e.join("")},legend:{labels:{generateLabels:function(t){var
e=t.data;return
e.labels.length&&e.datasets.length?e.labels.map(function(n,i){var
a=t.getDatasetMeta(0),r=e.datasets[0],l=a.data[i],s=l&&l.custom||{},u=o.valueAtIndexOrDefault,d=t.options.elements.arc;return{text:n,fillStyle:s.backgroundColor?s.backgroundColor:u(r.backgroundColor,i,d.backgroundColor),strokeStyle:s.borderColor?s.borderColor:u(r.borderColor,i,d.borderColor),lineWidth:s.borderWidth?s.borderWidth:u(r.borderWidth,i,d.borderWidth),hidden:isNaN(r.data[i])||a.data[i].hidden,index:i}}):[]}},onClick:function(t,e){var
n,i,a,o=e.index,r=this.chart;for(n=0,i=(r.data.datasets||[]).length;n<i;++n)(a=r.getDatasetMeta(n)).data[o]&&(a.data[o].hidden=!a.data[o].hidden);r.update()}},cutoutPercentage:50,rotation:-.5*Math.PI,circumference:2*Math.PI,tooltips:{callbacks:{title:function(){return""},label:function(t,e){var
n=e.labels[t.index],i=":
"+e.datasets[t.datasetIndex].data[t.index];return
o.isArray(n)?(n=n.slice())[0]+=i:n+=i,n}}}}),i._set("pie",o.clone(i.doughnut)),i._set("pie",{cutoutPercentage:0}),e.exports=function(t){t.controllers.doughnut=t.controllers.pie=t.DatasetController.extend({dataElementType:a.Arc,linkScales:o.noop,getRingIndex:function(t){for(var
e=0,n=0;n<t;++n)this.chart.isDatasetVisible(n)&&++e;return
e},update:function(t){var
e=this,n=e.chart,i=n.chartArea,a=n.options,r=a.elements.arc,l=i.right-i.left-r.borderWidth,s=i.bottom-i.top-r.borderWidth,u=Math.min(l,s),d={x:0,y:0},c=e.getMeta(),h=a.cutoutPercentage,f=a.circumference;if(f<2*Math.PI){var
g=a.rotation%(2*Math.PI),p=(g+=2*Math.PI*(g>=Math.PI?-1:g<-Math.PI?1:0))+f,v={x:Math.cos(g),y:Math.sin(g)},m={x:Math.cos(p),y:Math.sin(p)},b=g<=0&&p>=0||g<=2*Math.PI&&2*Math.PI<=p,x=g<=.5*Math.PI&&.5*Math.PI<=p||g<=2.5*Math.PI&&2.5*Math.PI<=p,y=g<=-Math.PI&&-Math.PI<=p||g<=Math.PI&&Math.PI<=p,k=g<=.5*-Math.PI&&.5*-Math.PI<=p||g<=1.5*Math.PI&&1.5*Math.PI<=p,w=h/100,M={x:y?-1:Math.min(v.x*(v.x<0?1:w),m.x*(m.x<0?1:w)),y:k?-1:Math.min(v.y*(v.y<0?1:w),m.y*(m.y<0?1:w))},S={x:b?1:Math.max(v.x*(v.x>0?1:w),m.x*(m.x>0?1:w)),y:x?1:Math.max(v.y*(v.y>0?1:w),m.y*(m.y>0?1:w))},C={width:.5*(S.x-M.x),height:.5*(S.y-M.y)};u=Math.min(l/C.width,s/C.height),d={x:-.5*(S.x+M.x),y:-.5*(S.y+M.y)}}n.borderWidth=e.getMaxBorderWidth(c.data),n.outerRadius=Math.max((u-n.borderWidth)/2,0),n.innerRadius=Math.max(h?n.outerRadius/100*h:0,0),n.radiusLength=(n.outerRadius-n.innerRadius)/n.getVisibleDatasetCount(),n.offsetX=d.x*n.outerRadius,n.offsetY=d.y*n.outerRadius,c.total=e.calculateTotal(),e.outerRadius=n.outerRadius-n.radiusLength*e.getRingIndex(e.index),e.innerRadius=Math.max(e.outerRadius-n.radiusLength,0),o.each(c.data,function(n,i){e.updateElement(n,i,t)})},updateElement:function(t,e,n){var
i=this,a=i.chart,r=a.chartArea,l=a.options,s=l.animation,u=(r.left+r.right)/2,d=(r.top+r.bottom)/2,c=l.rotation,h=l.rotation,f=i.getDataset(),g=n&&s.animateRotate?0:t.hidden?0:i.calculateCircumference(f.data[e])*(l.circumference/(2*Math.PI)),p=n&&s.animateScale?0:i.innerRadius,v=n&&s.animateScale?0:i.outerRadius,m=o.valueAtIndexOrDefault;o.extend(t,{_datasetIndex:i.index,_index:e,_model:{x:u+a.offsetX,y:d+a.offsetY,startAngle:c,endAngle:h,circumference:g,outerRadius:v,innerRadius:p,label:m(f.label,e,a.data.labels[e])}});var
b=t._model;this.removeHoverStyle(t),n&&s.animateRotate||(b.startAngle=0===e?l.rotation:i.getMeta().data[e-1]._model.endAngle,b.endAngle=b.startAngle+b.circumference),t.pivot()},removeHoverStyle:function(e){t.DatasetController.prototype.removeHoverStyle.call(this,e,this.chart.options.elements.arc)},calculateTotal:function(){var
t,e=this.getDataset(),n=this.getMeta(),i=0;return
o.each(n.data,function(n,a){t=e.data[a],isNaN(t)||n.hidden||(i+=Math.abs(t))}),i},calculateCircumference:function(t){var
e=this.getMeta().total;return
e>0&&!isNaN(t)?2*Math.PI*(t/e):0},getMaxBorderWidth:function(t){for(var
e,n,i=0,a=this.index,o=t.length,r=0;r<o;r++)e=t[r]._model?t[r]._model.borderWidth:0,i=(n=t[r]._chart?t[r]._chart.config.data.datasets[a].hoverBorderWidth:0)>(i=e>i?e:i)?n:i;return
i}})}},{25:25,40:40,45:45}],18:[function(t,e,n){"use strict";var
i=t(25),a=t(40),o=t(45);i._set("line",{showLines:!0,spanGaps:!1,hover:{mode:"label"},scales:{xAxes:[{type:"category",id:"x-axis-0"}],yAxes:[{type:"linear",id:"y-axis-0"}]}}),e.exports=function(t){function
e(t,e){return
o.valueOrDefault(t.showLine,e.showLines)}t.controllers.line=t.DatasetController.extend({datasetElementType:a.Line,dataElementType:a.Point,update:function(t){var
n,i,a,r=this,l=r.getMeta(),s=l.dataset,u=l.data||[],d=r.chart.options,c=d.elements.line,h=r.getScaleForId(l.yAxisID),f=r.getDataset(),g=e(f,d);for(g&&(a=s.custom||{},void
0!==f.tension&&void
0===f.lineTension&&(f.lineTension=f.tension),s._scale=h,s._datasetIndex=r.index,s._children=u,s._model={spanGaps:f.spanGaps?f.spanGaps:d.spanGaps,tension:a.tension?a.tension:o.valueOrDefault(f.lineTension,c.tension),backgroundColor:a.backgroundColor?a.backgroundColor:f.backgroundColor||c.backgroundColor,borderWidth:a.borderWidth?a.borderWidth:f.borderWidth||c.borderWidth,borderColor:a.borderColor?a.borderColor:f.borderColor||c.borderColor,borderCapStyle:a.borderCapStyle?a.borderCapStyle:f.borderCapStyle||c.borderCapStyle,borderDash:a.borderDash?a.borderDash:f.borderDash||c.borderDash,borderDashOffset:a.borderDashOffset?a.borderDashOffset:f.borderDashOffset||c.borderDashOffset,borderJoinStyle:a.borderJoinStyle?a.borderJoinStyle:f.borderJoinStyle||c.borderJoinStyle,fill:a.fill?a.fill:void
0!==f.fill?f.fill:c.fill,steppedLine:a.steppedLine?a.steppedLine:o.valueOrDefault(f.steppedLine,c.stepped),cubicInterpolationMode:a.cubicInterpolationMode?a.cubicInterpolationMode:o.valueOrDefault(f.cubicInterpolationMode,c.cubicInterpolationMode)},s.pivot()),n=0,i=u.length;n<i;++n)r.updateElement(u[n],n,t);for(g&&0!==s._model.tension&&r.updateBezierControlPoints(),n=0,i=u.length;n<i;++n)u[n].pivot()},getPointBackgroundColor:function(t,e){var
n=this.chart.options.elements.point.backgroundColor,i=this.getDataset(),a=t.custom||{};return
a.backgroundColor?n=a.backgroundColor:i.pointBackgroundColor?n=o.valueAtIndexOrDefault(i.pointBackgroundColor,e,n):i.backgroundColor&&(n=i.backgroundColor),n},getPointBorderColor:function(t,e){var
n=this.chart.options.elements.point.borderColor,i=this.getDataset(),a=t.custom||{};return
a.borderColor?n=a.borderColor:i.pointBorderColor?n=o.valueAtIndexOrDefault(i.pointBorderColor,e,n):i.borderColor&&(n=i.borderColor),n},getPointBorderWidth:function(t,e){var
n=this.chart.options.elements.point.borderWidth,i=this.getDataset(),a=t.custom||{};return
isNaN(a.borderWidth)?!isNaN(i.pointBorderWidth)||o.isArray(i.pointBorderWidth)?n=o.valueAtIndexOrDefault(i.pointBorderWidth,e,n):isNaN(i.borderWidth)||(n=i.borderWidth):n=a.borderWidth,n},updateElement:function(t,e,n){var
i,a,r=this,l=r.getMeta(),s=t.custom||{},u=r.getDataset(),d=r.index,c=u.data[e],h=r.getScaleForId(l.yAxisID),f=r.getScaleForId(l.xAxisID),g=r.chart.options.elements.point;void
0!==u.radius&&void
0===u.pointRadius&&(u.pointRadius=u.radius),void
0!==u.hitRadius&&void
0===u.pointHitRadius&&(u.pointHitRadius=u.hitRadius),i=f.getPixelForValue("object"==typeof
c?c:NaN,e,d),a=n?h.getBasePixel():r.calculatePointY(c,e,d),t._xScale=f,t._yScale=h,t._datasetIndex=d,t._index=e,t._model={x:i,y:a,skip:s.skip||isNaN(i)||isNaN(a),radius:s.radius||o.valueAtIndexOrDefault(u.pointRadius,e,g.radius),pointStyle:s.pointStyle||o.valueAtIndexOrDefault(u.pointStyle,e,g.pointStyle),backgroundColor:r.getPointBackgroundColor(t,e),borderColor:r.getPointBorderColor(t,e),borderWidth:r.getPointBorderWidth(t,e),tension:l.dataset._model?l.dataset._model.tension:0,steppedLine:!!l.dataset._model&&l.dataset._model.steppedLine,hitRadius:s.hitRadius||o.valueAtIndexOrDefault(u.pointHitRadius,e,g.hitRadius)}},calculatePointY:function(t,e,n){var
i,a,o,r=this,l=r.chart,s=r.getMeta(),u=r.getScaleForId(s.yAxisID),d=0,c=0;if(u.options.stacked){for(i=0;i<n;i++)if(a=l.data.datasets[i],"line"===(o=l.getDatasetMeta(i)).type&&o.yAxisID===u.id&&l.isDatasetVisible(i)){var
h=Number(u.getRightValue(a.data[e]));h<0?c+=h||0:d+=h||0}var
f=Number(u.getRightValue(t));return
f<0?u.getPixelForValue(c+f):u.getPixelForValue(d+f)}return
u.getPixelForValue(t)},updateBezierControlPoints:function(){function
t(t,e,n){return Math.max(Math.min(t,n),e)}var
e,n,i,a,r=this,l=r.getMeta(),s=r.chart.chartArea,u=l.data||[];if(l.dataset._model.spanGaps&&(u=u.filter(function(t){return!t._model.skip})),"monotone"===l.dataset._model.cubicInterpolationMode)o.splineCurveMonotone(u);else
for(e=0,n=u.length;e<n;++e)i=u[e]._model,a=o.splineCurve(o.previousItem(u,e)._model,i,o.nextItem(u,e)._model,l.dataset._model.tension),i.controlPointPreviousX=a.previous.x,i.controlPointPreviousY=a.previous.y,i.controlPointNextX=a.next.x,i.controlPointNextY=a.next.y;if(r.chart.options.elements.line.capBezierPoints)for(e=0,n=u.length;e<n;++e)(i=u[e]._model).controlPointPreviousX=t(i.controlPointPreviousX,s.left,s.right),i.controlPointPreviousY=t(i.controlPointPreviousY,s.top,s.bottom),i.controlPointNextX=t(i.controlPointNextX,s.left,s.right),i.controlPointNextY=t(i.controlPointNextY,s.top,s.bottom)},draw:function(){var
t=this,n=t.chart,i=t.getMeta(),a=i.data||[],r=n.chartArea,l=a.length,s=0;for(o.canvas.clipArea(n.ctx,r),e(t.getDataset(),n.options)&&i.dataset.draw(),o.canvas.unclipArea(n.ctx);s<l;++s)a[s].draw(r)},setHoverStyle:function(t){var
e=this.chart.data.datasets[t._datasetIndex],n=t._index,i=t.custom||{},a=t._model;a.radius=i.hoverRadius||o.valueAtIndexOrDefault(e.pointHoverRadius,n,this.chart.options.elements.point.hoverRadius),a.backgroundColor=i.hoverBackgroundColor||o.valueAtIndexOrDefault(e.pointHoverBackgroundColor,n,o.getHoverColor(a.backgroundColor)),a.borderColor=i.hoverBorderColor||o.valueAtIndexOrDefault(e.pointHoverBorderColor,n,o.getHoverColor(a.borderColor)),a.borderWidth=i.hoverBorderWidth||o.valueAtIndexOrDefault(e.pointHoverBorderWidth,n,a.borderWidth)},removeHoverStyle:function(t){var
e=this,n=e.chart.data.datasets[t._datasetIndex],i=t._index,a=t.custom||{},r=t._model;void
0!==n.radius&&void
0===n.pointRadius&&(n.pointRadius=n.radius),r.radius=a.radius||o.valueAtIndexOrDefault(n.pointRadius,i,e.chart.options.elements.point.radius),r.backgroundColor=e.getPointBackgroundColor(t,i),r.borderColor=e.getPointBorderColor(t,i),r.borderWidth=e.getPointBorderWidth(t,i)}})}},{25:25,40:40,45:45}],19:[function(t,e,n){"use
strict";var
i=t(25),a=t(40),o=t(45);i._set("polarArea",{scale:{type:"radialLinear",angleLines:{display:!1},gridLines:{circular:!0},pointLabels:{display:!1},ticks:{beginAtZero:!0}},animation:{animateRotate:!0,animateScale:!0},startAngle:-.5*Math.PI,legendCallback:function(t){var
e=[];e.push('<ul
class="'+t.id+'-legend">');var
n=t.data,i=n.datasets,a=n.labels;if(i.length)for(var
o=0;o<i[0].data.length;++o)e.push('<li><span
style="background-color:'+i[0].backgroundColor[o]+'"></span>'),a[o]&&e.push(a[o]),e.push("</li>");return
e.push("</ul>"),e.join("")},legend:{labels:{generateLabels:function(t){var
e=t.data;return
e.labels.length&&e.datasets.length?e.labels.map(function(n,i){var
a=t.getDatasetMeta(0),r=e.datasets[0],l=a.data[i].custom||{},s=o.valueAtIndexOrDefault,u=t.options.elements.arc;return{text:n,fillStyle:l.backgroundColor?l.backgroundColor:s(r.backgroundColor,i,u.backgroundColor),strokeStyle:l.borderColor?l.borderColor:s(r.borderColor,i,u.borderColor),lineWidth:l.borderWidth?l.borderWidth:s(r.borderWidth,i,u.borderWidth),hidden:isNaN(r.data[i])||a.data[i].hidden,index:i}}):[]}},onClick:function(t,e){var
n,i,a,o=e.index,r=this.chart;for(n=0,i=(r.data.datasets||[]).length;n<i;++n)(a=r.getDatasetMeta(n)).data[o].hidden=!a.data[o].hidden;r.update()}},tooltips:{callbacks:{title:function(){return""},label:function(t,e){return
e.labels[t.index]+":
"+t.yLabel}}}}),e.exports=function(t){t.controllers.polarArea=t.DatasetController.extend({dataElementType:a.Arc,linkScales:o.noop,update:function(t){var
e=this,n=e.chart,i=n.chartArea,a=e.getMeta(),r=n.options,l=r.elements.arc,s=Math.min(i.right-i.left,i.bottom-i.top);n.outerRadius=Math.max((s-l.borderWidth/2)/2,0),n.innerRadius=Math.max(r.cutoutPercentage?n.outerRadius/100*r.cutoutPercentage:1,0),n.radiusLength=(n.outerRadius-n.innerRadius)/n.getVisibleDatasetCount(),e.outerRadius=n.outerRadius-n.radiusLength*e.index,e.innerRadius=e.outerRadius-n.radiusLength,a.count=e.countVisibleElements(),o.each(a.data,function(n,i){e.updateElement(n,i,t)})},updateElement:function(t,e,n){for(var
i=this,a=i.chart,r=i.getDataset(),l=a.options,s=l.animation,u=a.scale,d=a.data.labels,c=i.calculateCircumference(r.data[e]),h=u.xCenter,f=u.yCenter,g=0,p=i.getMeta(),v=0;v<e;++v)isNaN(r.data[v])||p.data[v].hidden||++g;var
m=l.startAngle,b=t.hidden?0:u.getDistanceFromCenterForValue(r.data[e]),x=m+c*g,y=x+(t.hidden?0:c),k=s.animateScale?0:u.getDistanceFromCenterForValue(r.data[e]);o.extend(t,{_datasetIndex:i.index,_index:e,_scale:u,_model:{x:h,y:f,innerRadius:0,outerRadius:n?k:b,startAngle:n&&s.animateRotate?m:x,endAngle:n&&s.animateRotate?m:y,label:o.valueAtIndexOrDefault(d,e,d[e])}}),i.removeHoverStyle(t),t.pivot()},removeHoverStyle:function(e){t.DatasetController.prototype.removeHoverStyle.call(this,e,this.chart.options.elements.arc)},countVisibleElements:function(){var
t=this.getDataset(),e=this.getMeta(),n=0;return
o.each(e.data,function(e,i){isNaN(t.data[i])||e.hidden||n++}),n},calculateCircumference:function(t){var
e=this.getMeta().count;return
e>0&&!isNaN(t)?2*Math.PI/e:0}})}},{25:25,40:40,45:45}],20:[function(t,e,n){"use
strict";var
i=t(25),a=t(40),o=t(45);i._set("radar",{scale:{type:"radialLinear"},elements:{line:{tension:0}}}),e.exports=function(t){t.controllers.radar=t.DatasetController.extend({datasetElementType:a.Line,dataElementType:a.Point,linkScales:o.noop,update:function(t){var
e=this,n=e.getMeta(),i=n.dataset,a=n.data,r=i.custom||{},l=e.getDataset(),s=e.chart.options.elements.line,u=e.chart.scale;void
0!==l.tension&&void
0===l.lineTension&&(l.lineTension=l.tension),o.extend(n.dataset,{_datasetIndex:e.index,_scale:u,_children:a,_loop:!0,_model:{tension:r.tension?r.tension:o.valueOrDefault(l.lineTension,s.tension),backgroundColor:r.backgroundColor?r.backgroundColor:l.backgroundColor||s.backgroundColor,borderWidth:r.borderWidth?r.borderWidth:l.borderWidth||s.borderWidth,borderColor:r.borderColor?r.borderColor:l.borderColor||s.borderColor,fill:r.fill?r.fill:void
0!==l.fill?l.fill:s.fill,borderCapStyle:r.borderCapStyle?r.borderCapStyle:l.borderCapStyle||s.borderCapStyle,borderDash:r.borderDash?r.borderDash:l.borderDash||s.borderDash,borderDashOffset:r.borderDashOffset?r.borderDashOffset:l.borderDashOffset||s.borderDashOffset,borderJoinStyle:r.borderJoinStyle?r.borderJoinStyle:l.borderJoinStyle||s.borderJoinStyle}}),n.dataset.pivot(),o.each(a,function(n,i){e.updateElement(n,i,t)},e),e.updateBezierControlPoints()},updateElement:function(t,e,n){var
i=this,a=t.custom||{},r=i.getDataset(),l=i.chart.scale,s=i.chart.options.elements.point,u=l.getPointPositionForValue(e,r.data[e]);void
0!==r.radius&&void
0===r.pointRadius&&(r.pointRadius=r.radius),void
0!==r.hitRadius&&void
0===r.pointHitRadius&&(r.pointHitRadius=r.hitRadius),o.extend(t,{_datasetIndex:i.index,_index:e,_scale:l,_model:{x:n?l.xCenter:u.x,y:n?l.yCenter:u.y,tension:a.tension?a.tension:o.valueOrDefault(r.lineTension,i.chart.options.elements.line.tension),radius:a.radius?a.radius:o.valueAtIndexOrDefault(r.pointRadius,e,s.radius),backgroundColor:a.backgroundColor?a.backgroundColor:o.valueAtIndexOrDefault(r.pointBackgroundColor,e,s.backgroundColor),borderColor:a.borderColor?a.borderColor:o.valueAtIndexOrDefault(r.pointBorderColor,e,s.borderColor),borderWidth:a.borderWidth?a.borderWidth:o.valueAtIndexOrDefault(r.pointBorderWidth,e,s.borderWidth),pointStyle:a.pointStyle?a.pointStyle:o.valueAtIndexOrDefault(r.pointStyle,e,s.pointStyle),hitRadius:a.hitRadius?a.hitRadius:o.valueAtIndexOrDefault(r.pointHitRadius,e,s.hitRadius)}}),t._model.skip=a.skip?a.skip:isNaN(t._model.x)||isNaN(t._model.y)},updateBezierControlPoints:function(){var
t=this.chart.chartArea,e=this.getMeta();o.each(e.data,function(n,i){var
a=n._model,r=o.splineCurve(o.previousItem(e.data,i,!0)._model,a,o.nextItem(e.data,i,!0)._model,a.tension);a.controlPointPreviousX=Math.max(Math.min(r.previous.x,t.right),t.left),a.controlPointPreviousY=Math.max(Math.min(r.previous.y,t.bottom),t.top),a.controlPointNextX=Math.max(Math.min(r.next.x,t.right),t.left),a.controlPointNextY=Math.max(Math.min(r.next.y,t.bottom),t.top),n.pivot()})},setHoverStyle:function(t){var
e=this.chart.data.datasets[t._datasetIndex],n=t.custom||{},i=t._index,a=t._model;a.radius=n.hoverRadius?n.hoverRadius:o.valueAtIndexOrDefault(e.pointHoverRadius,i,this.chart.options.elements.point.hoverRadius),a.backgroundColor=n.hoverBackgroundColor?n.hoverBackgroundColor:o.valueAtIndexOrDefault(e.pointHoverBackgroundColor,i,o.getHoverColor(a.backgroundColor)),a.borderColor=n.hoverBorderColor?n.hoverBorderColor:o.valueAtIndexOrDefault(e.pointHoverBorderColor,i,o.getHoverColor(a.borderColor)),a.borderWidth=n.hoverBorderWidth?n.hoverBorderWidth:o.valueAtIndexOrDefault(e.pointHoverBorderWidth,i,a.borderWidth)},removeHoverStyle:function(t){var
e=this.chart.data.datasets[t._datasetIndex],n=t.custom||{},i=t._index,a=t._model,r=this.chart.options.elements.point;a.radius=n.radius?n.radius:o.valueAtIndexOrDefault(e.pointRadius,i,r.radius),a.backgroundColor=n.backgroundColor?n.backgroundColor:o.valueAtIndexOrDefault(e.pointBackgroundColor,i,r.backgroundColor),a.borderColor=n.borderColor?n.borderColor:o.valueAtIndexOrDefault(e.pointBorderColor,i,r.borderColor),a.borderWidth=n.borderWidth?n.borderWidth:o.valueAtIndexOrDefault(e.pointBorderWidth,i,r.borderWidth)}})}},{25:25,40:40,45:45}],21:[function(t,e,n){"use
strict";t(25)._set("scatter",{hover:{mode:"single"},scales:{xAxes:[{id:"x-axis-1",type:"linear",position:"bottom"}],yAxes:[{id:"y-axis-1",type:"linear",position:"left"}]},showLines:!1,tooltips:{callbacks:{title:function(){return""},label:function(t){return"("+t.xLabel+",
"+t.yLabel+")"}}}}),e.exports=function(t){t.controllers.scatter=t.controllers.line}},{25:25}],22:[function(t,e,n){"use
strict";var
i=t(25),a=t(26),o=t(45);i._set("global",{animation:{duration:1e3,easing:"easeOutQuart",onProgress:o.noop,onComplete:o.noop}}),e.exports=function(t){t.Animation=a.extend({chart:null,currentStep:0,numSteps:60,easing:"",render:null,onAnimationProgress:null,onAnimationComplete:null}),t.animationService={frameDuration:17,animations:[],dropFrames:0,request:null,addAnimation:function(t,e,n,i){var
a,o,r=this.animations;for(e.chart=t,i||(t.animating=!0),a=0,o=r.length;a<o;++a)if(r[a].chart===t)return
void(r[a]=e);r.push(e),1===r.length&&this.requestAnimationFrame()},cancelAnimation:function(t){var
e=o.findIndex(this.animations,function(e){return
e.chart===t});-1!==e&&(this.animations.splice(e,1),t.animating=!1)},requestAnimationFrame:function(){var
t=this;null===t.request&&(t.request=o.requestAnimFrame.call(window,function(){t.request=null,t.startDigest()}))},startDigest:function(){var
t=this,e=Date.now(),n=0;t.dropFrames>1&&(n=Math.floor(t.dropFrames),t.dropFrames=t.dropFrames%1),t.advance(1+n);var
i=Date.now();t.dropFrames+=(i-e)/t.frameDuration,t.animations.length>0&&t.requestAnimationFrame()},advance:function(t){for(var
e,n,i=this.animations,a=0;a<i.length;)n=(e=i[a]).chart,e.currentStep=(e.currentStep||0)+t,e.currentStep=Math.min(e.currentStep,e.numSteps),o.callback(e.render,[n,e],n),o.callback(e.onAnimationProgress,[e],n),e.currentStep>=e.numSteps?(o.callback(e.onAnimationComplete,[e],n),n.animating=!1,i.splice(a,1)):++a}},Object.defineProperty(t.Animation.prototype,"animationObject",{get:function(){return
this}}),Object.defineProperty(t.Animation.prototype,"chartInstance",{get:function(){return
this.chart},set:function(t){this.chart=t}})}},{25:25,26:26,45:45}],23:[function(t,e,n){"use
strict";var
i=t(25),a=t(45),o=t(28),r=t(48);e.exports=function(t){function e(t){var
e=(t=t||{}).data=t.data||{};return
e.datasets=e.datasets||[],e.labels=e.labels||[],t.options=a.configMerge(i.global,i[t.type],t.options||{}),t}function
n(t){var
e=t.options;e.scale?t.scale.options=e.scale:e.scales&&e.scales.xAxes.concat(e.scales.yAxes).forEach(function(e){t.scales[e.id].options=e}),t.tooltip._options=e.tooltips}function
l(t){return"top"===t||"bottom"===t}var
s=t.plugins;t.types={},t.instances={},t.controllers={},a.extend(t.prototype,{construct:function(n,i){var
o=this;i=e(i);var
l=r.acquireContext(n,i),s=l&&l.canvas,u=s&&s.height,d=s&&s.width;o.id=a.uid(),o.ctx=l,o.canvas=s,o.config=i,o.width=d,o.height=u,o.aspectRatio=u?d/u:null,o.options=i.options,o._bufferedRender=!1,o.chart=o,o.controller=o,t.instances[o.id]=o,Object.defineProperty(o,"data",{get:function(){return
o.config.data},set:function(t){o.config.data=t}}),l&&s?(o.initialize(),o.update()):console.error("Failed
to create chart: can't acquire context from the given
item")},initialize:function(){var t=this;return
s.notify(t,"beforeInit"),a.retinaScale(t,t.options.devicePixelRatio),t.bindEvents(),t.options.responsive&&t.resize(!0),t.ensureScalesHaveIDs(),t.buildScales(),t.initToolTip(),s.notify(t,"afterInit"),t},clear:function(){return
a.canvas.clear(this),this},stop:function(){return
t.animationService.cancelAnimation(this),this},resize:function(t){var
e=this,n=e.options,i=e.canvas,o=n.maintainAspectRatio&&e.aspectRatio||null,r=Math.max(0,Math.floor(a.getMaximumWidth(i))),l=Math.max(0,Math.floor(o?r/o:a.getMaximumHeight(i)));if((e.width!==r||e.height!==l)&&(i.width=e.width=r,i.height=e.height=l,i.style.width=r+"px",i.style.height=l+"px",a.retinaScale(e,n.devicePixelRatio),!t)){var
u={width:r,height:l};s.notify(e,"resize",[u]),e.options.onResize&&e.options.onResize(e,u),e.stop(),e.update(e.options.responsiveAnimationDuration)}},ensureScalesHaveIDs:function(){var
t=this.options,e=t.scales||{},n=t.scale;a.each(e.xAxes,function(t,e){t.id=t.id||"x-axis-"+e}),a.each(e.yAxes,function(t,e){t.id=t.id||"y-axis-"+e}),n&&(n.id=n.id||"scale")},buildScales:function(){var
e=this,n=e.options,i=e.scales={},o=[];n.scales&&(o=o.concat((n.scales.xAxes||[]).map(function(t){return{options:t,dtype:"category",dposition:"bottom"}}),(n.scales.yAxes||[]).map(function(t){return{options:t,dtype:"linear",dposition:"left"}}))),n.scale&&o.push({options:n.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),a.each(o,function(n){var
o=n.options,r=a.valueOrDefault(o.type,n.dtype),s=t.scaleService.getScaleConstructor(r);if(s){l(o.position)!==l(n.dposition)&&(o.position=n.dposition);var
u=new
s({id:o.id,options:o,ctx:e.ctx,chart:e});i[u.id]=u,u.mergeTicksOptions(),n.isDefault&&(e.scale=u)}}),t.scaleService.addScalesToLayout(this)},buildOrUpdateControllers:function(){var
e=this,n=[],i=[];return a.each(e.data.datasets,function(a,o){var
r=e.getDatasetMeta(o),l=a.type||e.config.type;if(r.type&&r.type!==l&&(e.destroyDatasetMeta(o),r=e.getDatasetMeta(o)),r.type=l,n.push(r.type),r.controller)r.controller.updateIndex(o);else{var
s=t.controllers[r.type];if(void 0===s)throw new
Error('"'+r.type+'" is not a chart
type.');r.controller=new
s(e,o),i.push(r.controller)}},e),i},resetElements:function(){var
t=this;a.each(t.data.datasets,function(e,n){t.getDatasetMeta(n).controller.reset()},t)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(t){var
e=this;if(t&&"object"==typeof
t||(t={duration:t,lazy:arguments[1]}),n(e),!1!==s.notify(e,"beforeUpdate")){e.tooltip._data=e.data;var
i=e.buildOrUpdateControllers();a.each(e.data.datasets,function(t,n){e.getDatasetMeta(n).controller.buildOrUpdateElements()},e),e.updateLayout(),a.each(i,function(t){t.reset()}),e.updateDatasets(),s.notify(e,"afterUpdate"),e._bufferedRender?e._bufferedRequest={duration:t.duration,easing:t.easing,lazy:t.lazy}:e.render(t)}},updateLayout:function(){var
e=this;!1!==s.notify(e,"beforeLayout")&&(t.layoutService.update(this,this.width,this.height),s.notify(e,"afterScaleUpdate"),s.notify(e,"afterLayout"))},updateDatasets:function(){var
t=this;if(!1!==s.notify(t,"beforeDatasetsUpdate")){for(var
e=0,n=t.data.datasets.length;e<n;++e)t.updateDataset(e);s.notify(t,"afterDatasetsUpdate")}},updateDataset:function(t){var
e=this,n=e.getDatasetMeta(t),i={meta:n,index:t};!1!==s.notify(e,"beforeDatasetUpdate",[i])&&(n.controller.update(),s.notify(e,"afterDatasetUpdate",[i]))},render:function(e){var
n=this;e&&"object"==typeof
e||(e={duration:e,lazy:arguments[1]});var
i=e.duration,o=e.lazy;if(!1!==s.notify(n,"beforeRender")){var
r=n.options.animation,l=function(t){s.notify(n,"afterRender"),a.callback(r&&r.onComplete,[t],n)};if(r&&(void
0!==i&&0!==i||void 0===i&&0!==r.duration)){var u=new
t.Animation({numSteps:(i||r.duration)/16.66,easing:e.easing||r.easing,render:function(t,e){var
n=a.easing.effects[e.easing],i=e.currentStep,o=i/e.numSteps;t.draw(n(o),o,i)},onAnimationProgress:r.onProgress,onAnimationComplete:l});t.animationService.addAnimation(n,u,i,o)}else
n.draw(),l(new t.Animation({numSteps:0,chart:n}));return
n}},draw:function(t){var
e=this;e.clear(),a.isNullOrUndef(t)&&(t=1),e.transition(t),!1!==s.notify(e,"beforeDraw",[t])&&(a.each(e.boxes,function(t){t.draw(e.chartArea)},e),e.scale&&e.scale.draw(),e.drawDatasets(t),e.tooltip.draw(),s.notify(e,"afterDraw",[t]))},transition:function(t){for(var
e=this,n=0,i=(e.data.datasets||[]).length;n<i;++n)e.isDatasetVisible(n)&&e.getDatasetMeta(n).controller.transition(t);e.tooltip.transition(t)},drawDatasets:function(t){var
e=this;if(!1!==s.notify(e,"beforeDatasetsDraw",[t])){for(var
n=(e.data.datasets||[]).length-1;n>=0;--n)e.isDatasetVisible(n)&&e.drawDataset(n,t);s.notify(e,"afterDatasetsDraw",[t])}},drawDataset:function(t,e){var
n=this,i=n.getDatasetMeta(t),a={meta:i,index:t,easingValue:e};!1!==s.notify(n,"beforeDatasetDraw",[a])&&(i.controller.draw(e),s.notify(n,"afterDatasetDraw",[a]))},getElementAtEvent:function(t){return
o.modes.single(this,t)},getElementsAtEvent:function(t){return
o.modes.label(this,t,{intersect:!0})},getElementsAtXAxis:function(t){return
o.modes["x-axis"](this,t,{intersect:!0})},getElementsAtEventForMode:function(t,e,n){var
i=o.modes[e];return"function"==typeof
i?i(this,t,n):[]},getDatasetAtEvent:function(t){return
o.modes.dataset(this,t,{intersect:!0})},getDatasetMeta:function(t){var
e=this,n=e.data.datasets[t];n._meta||(n._meta={});var
i=n._meta[e.id];return
i||(i=n._meta[e.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null}),i},getVisibleDatasetCount:function(){for(var
t=0,e=0,n=this.data.datasets.length;e<n;++e)this.isDatasetVisible(e)&&t++;return
t},isDatasetVisible:function(t){var
e=this.getDatasetMeta(t);return"boolean"==typeof
e.hidden?!e.hidden:!this.data.datasets[t].hidden},generateLegend:function(){return
this.options.legendCallback(this)},destroyDatasetMeta:function(t){var
e=this.id,n=this.data.datasets[t],i=n._meta&&n._meta[e];i&&(i.controller.destroy(),delete
n._meta[e])},destroy:function(){var
e,n,i=this,o=i.canvas;for(i.stop(),e=0,n=i.data.datasets.length;e<n;++e)i.destroyDatasetMeta(e);o&&(i.unbindEvents(),a.canvas.clear(i),r.releaseContext(i.ctx),i.canvas=null,i.ctx=null),s.notify(i,"destroy"),delete
t.instances[i.id]},toBase64Image:function(){return
this.canvas.toDataURL.apply(this.canvas,arguments)},initToolTip:function(){var
e=this;e.tooltip=new
t.Tooltip({_chart:e,_chartInstance:e,_data:e.data,_options:e.options.tooltips},e)},bindEvents:function(){var
t=this,e=t._listeners={},n=function(){t.eventHandler.apply(t,arguments)};a.each(t.options.events,function(i){r.addEventListener(t,i,n),e[i]=n}),t.options.responsive&&(n=function(){t.resize()},r.addEventListener(t,"resize",n),e.resize=n)},unbindEvents:function(){var
t=this,e=t._listeners;e&&(delete
t._listeners,a.each(e,function(e,n){r.removeEventListener(t,n,e)}))},updateHoverStyle:function(t,e,n){var
i,a,o,r=n?"setHoverStyle":"removeHoverStyle";for(a=0,o=t.length;a<o;++a)(i=t[a])&&this.getDatasetMeta(i._datasetIndex).controller[r](i)},eventHandler:function(t){var
e=this,n=e.tooltip;if(!1!==s.notify(e,"beforeEvent",[t])){e._bufferedRender=!0,e._bufferedRequest=null;var
i=e.handleEvent(t);i|=n&&n.handleEvent(t),s.notify(e,"afterEvent",[t]);var
a=e._bufferedRequest;return
a?e.render(a):i&&!e.animating&&(e.stop(),e.render(e.options.hover.animationDuration,!0)),e._bufferedRender=!1,e._bufferedRequest=null,e}},handleEvent:function(t){var
e=this,n=e.options||{},i=n.hover,o=!1;return
e.lastActive=e.lastActive||[],"mouseout"===t.type?e.active=[]:e.active=e.getElementsAtEventForMode(t,i.mode,i),a.callback(n.onHover||n.hover.onHover,[t.native,e.active],e),"mouseup"!==t.type&&"click"!==t.type||n.onClick&&n.onClick.call(e,t.native,e.active),e.lastActive.length&&e.updateHoverStyle(e.lastActive,i.mode,!1),e.active.length&&i.mode&&e.updateHoverStyle(e.active,i.mode,!0),o=!a.arrayEquals(e.active,e.lastActive),e.lastActive=e.active,o}}),t.Controller=t}},{25:25,28:28,45:45,48:48}],24:[function(t,e,n){"use
strict";var i=t(45);e.exports=function(t){function
e(t,e){t._chartjs?t._chartjs.listeners.push(e):(Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),a.forEach(function(e){var
n="onData"+e.charAt(0).toUpperCase()+e.slice(1),a=t[e];Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:function(){var
e=Array.prototype.slice.call(arguments),o=a.apply(this,e);return
i.each(t._chartjs.listeners,function(t){"function"==typeof
t[n]&&t[n].apply(t,e)}),o}})}))}function n(t,e){var
n=t._chartjs;if(n){var
i=n.listeners,o=i.indexOf(e);-1!==o&&i.splice(o,1),i.length>0||(a.forEach(function(e){delete
t[e]}),delete t._chartjs)}}var
a=["push","pop","shift","splice","unshift"];t.DatasetController=function(t,e){this.initialize(t,e)},i.extend(t.DatasetController.prototype,{datasetElementType:null,dataElementType:null,initialize:function(t,e){var
n=this;n.chart=t,n.index=e,n.linkScales(),n.addElements()},updateIndex:function(t){this.index=t},linkScales:function(){var
t=this,e=t.getMeta(),n=t.getDataset();null===e.xAxisID&&(e.xAxisID=n.xAxisID||t.chart.options.scales.xAxes[0].id),null===e.yAxisID&&(e.yAxisID=n.yAxisID||t.chart.options.scales.yAxes[0].id)},getDataset:function(){return
this.chart.data.datasets[this.index]},getMeta:function(){return
this.chart.getDatasetMeta(this.index)},getScaleForId:function(t){return
this.chart.scales[t]},reset:function(){this.update(!0)},destroy:function(){this._data&&n(this._data,this)},createMetaDataset:function(){var
t=this,e=t.datasetElementType;return e&&new
e({_chart:t.chart,_datasetIndex:t.index})},createMetaData:function(t){var
e=this,n=e.dataElementType;return n&&new
n({_chart:e.chart,_datasetIndex:e.index,_index:t})},addElements:function(){var
t,e,n=this,i=n.getMeta(),a=n.getDataset().data||[],o=i.data;for(t=0,e=a.length;t<e;++t)o[t]=o[t]||n.createMetaData(t);i.dataset=i.dataset||n.createMetaDataset()},addElementAndReset:function(t){var
e=this.createMetaData(t);this.getMeta().data.splice(t,0,e),this.updateElement(e,t,!0)},buildOrUpdateElements:function(){var
t=this,i=t.getDataset(),a=i.data||(i.data=[]);t._data!==a&&(t._data&&n(t._data,t),e(a,t),t._data=a),t.resyncElements()},update:i.noop,transition:function(t){for(var
e=this.getMeta(),n=e.data||[],i=n.length,a=0;a<i;++a)n[a].transition(t);e.dataset&&e.dataset.transition(t)},draw:function(){var
t=this.getMeta(),e=t.data||[],n=e.length,i=0;for(t.dataset&&t.dataset.draw();i<n;++i)e[i].draw()},removeHoverStyle:function(t,e){var
n=this.chart.data.datasets[t._datasetIndex],a=t._index,o=t.custom||{},r=i.valueAtIndexOrDefault,l=t._model;l.backgroundColor=o.backgroundColor?o.backgroundColor:r(n.backgroundColor,a,e.backgroundColor),l.borderColor=o.borderColor?o.borderColor:r(n.borderColor,a,e.borderColor),l.borderWidth=o.borderWidth?o.borderWidth:r(n.borderWidth,a,e.borderWidth)},setHoverStyle:function(t){var
e=this.chart.data.datasets[t._datasetIndex],n=t._index,a=t.custom||{},o=i.valueAtIndexOrDefault,r=i.getHoverColor,l=t._model;l.backgroundColor=a.hoverBackgroundColor?a.hoverBackgroundColor:o(e.hoverBackgroundColor,n,r(l.backgroundColor)),l.borderColor=a.hoverBorderColor?a.hoverBorderColor:o(e.hoverBorderColor,n,r(l.borderColor)),l.borderWidth=a.hoverBorderWidth?a.hoverBorderWidth:o(e.hoverBorderWidth,n,l.borderWidth)},resyncElements:function(){var
t=this,e=t.getMeta(),n=t.getDataset().data,i=e.data.length,a=n.length;a<i?e.data.splice(a,i-a):a>i&&t.insertElements(i,a-i)},insertElements:function(t,e){for(var
n=0;n<e;++n)this.addElementAndReset(t+n)},onDataPush:function(){this.insertElements(this.getDataset().data.length-1,arguments.length)},onDataPop:function(){this.getMeta().data.pop()},onDataShift:function(){this.getMeta().data.shift()},onDataSplice:function(t,e){this.getMeta().data.splice(t,e),this.insertElements(t,arguments.length-2)},onDataUnshift:function(){this.insertElements(0,arguments.length)}}),t.DatasetController.extend=i.inherits}},{45:45}],25:[function(t,e,n){"use
strict";var i=t(45);e.exports={_set:function(t,e){return
i.merge(this[t]||(this[t]={}),e)}}},{45:45}],26:[function(t,e,n){"use
strict";function i(t,e,n,i){var
o,r,l,s,u,d,c,h,f,g=Object.keys(n);for(o=0,r=g.length;o<r;++o)if(l=g[o],d=n[l],e.hasOwnProperty(l)||(e[l]=d),(s=e[l])!==d&&"_"!==l[0]){if(t.hasOwnProperty(l)||(t[l]=s),u=t[l],(c=typeof
d)===typeof
u)if("string"===c){if((h=a(u)).valid&&(f=a(d)).valid){e[l]=f.mix(h,i).rgbString();continue}}else
if("number"===c&&isFinite(u)&&isFinite(d)){e[l]=u+(d-u)*i;continue}e[l]=d}}var
a=t(3),o=t(45),r=function(t){o.extend(this,t),this.initialize.apply(this,arguments)};o.extend(r.prototype,{initialize:function(){this.hidden=!1},pivot:function(){var
t=this;return
t._view||(t._view=o.clone(t._model)),t._start={},t},transition:function(t){var
e=this,n=e._model,a=e._start,o=e._view;return
n&&1!==t?(o||(o=e._view={}),a||(a=e._start={}),i(a,o,n,t),e):(e._view=n,e._start=null,e)},tooltipPosition:function(){return{x:this._model.x,y:this._model.y}},hasValue:function(){return
o.isNumber(this._model.x)&&o.isNumber(this._model.y)}}),r.extend=o.inherits,e.exports=r},{3:3,45:45}],27:[function(t,e,n){"use
strict";var i=t(3),a=t(25),o=t(45);e.exports=function(t){function
e(t,e,n){var i;return"string"==typeof
t?(i=parseInt(t,10),-1!==t.indexOf("%")&&(i=i/100*e.parentNode[n])):i=t,i}function
n(t){return void
0!==t&&null!==t&&"none"!==t}function r(t,i,a){var
o=document.defaultView,r=t.parentNode,l=o.getComputedStyle(t)[i],s=o.getComputedStyle(r)[i],u=n(l),d=n(s),c=Number.POSITIVE_INFINITY;return
u||d?Math.min(u?e(l,t,a):c,d?e(s,r,a):c):"none"}o.extend=function(t){for(var
e=1,n=arguments.length;e<n;e++)o.each(arguments[e],function(e,n){t[n]=e});return
t},o.configMerge=function(){return
o.merge(o.clone(arguments[0]),[].slice.call(arguments,1),{merger:function(e,n,i,a){var
r=n[e]||{},l=i[e];"scales"===e?n[e]=o.scaleMerge(r,l):"scale"===e?n[e]=o.merge(r,[t.scaleService.getScaleDefaults(l.type),l]):o._merger(e,n,i,a)}})},o.scaleMerge=function(){return
o.merge(o.clone(arguments[0]),[].slice.call(arguments,1),{merger:function(e,n,i,a){if("xAxes"===e||"yAxes"===e){var
r,l,s,u=i[e].length;for(n[e]||(n[e]=[]),r=0;r<u;++r)s=i[e][r],l=o.valueOrDefault(s.type,"xAxes"===e?"category":"linear"),r>=n[e].length&&n[e].push({}),!n[e][r].type||s.type&&s.type!==n[e][r].type?o.merge(n[e][r],[t.scaleService.getScaleDefaults(l),s]):o.merge(n[e][r],s)}else
o._merger(e,n,i,a)}})},o.where=function(t,e){if(o.isArray(t)&&Array.prototype.filter)return
t.filter(e);var n=[];return
o.each(t,function(t){e(t)&&n.push(t)}),n},o.findIndex=Array.prototype.findIndex?function(t,e,n){return
t.findIndex(e,n)}:function(t,e,n){n=void 0===n?t:n;for(var
i=0,a=t.length;i<a;++i)if(e.call(n,t[i],i,t))return
i;return-1},o.findNextWhere=function(t,e,n){o.isNullOrUndef(n)&&(n=-1);for(var
i=n+1;i<t.length;i++){var a=t[i];if(e(a))return
a}},o.findPreviousWhere=function(t,e,n){o.isNullOrUndef(n)&&(n=t.length);for(var
i=n-1;i>=0;i--){var a=t[i];if(e(a))return a}},o.inherits=function(t){var
e=this,n=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return
e.apply(this,arguments)},i=function(){this.constructor=n};return
i.prototype=e.prototype,n.prototype=new
i,n.extend=o.inherits,t&&o.extend(n.prototype,t),n.__super__=e.prototype,n},o.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},o.almostEquals=function(t,e,n){return
Math.abs(t-e)<n},o.almostWhole=function(t,e){var n=Math.round(t);return
n-e<t&&n+e>t},o.max=function(t){return
t.reduce(function(t,e){return
isNaN(e)?t:Math.max(t,e)},Number.NEGATIVE_INFINITY)},o.min=function(t){return
t.reduce(function(t,e){return
isNaN(e)?t:Math.min(t,e)},Number.POSITIVE_INFINITY)},o.sign=Math.sign?function(t){return
Math.sign(t)}:function(t){return
0==(t=+t)||isNaN(t)?t:t>0?1:-1},o.log10=Math.log10?function(t){return
Math.log10(t)}:function(t){return
Math.log(t)/Math.LN10},o.toRadians=function(t){return
t*(Math.PI/180)},o.toDegrees=function(t){return
t*(180/Math.PI)},o.getAngleFromPoint=function(t,e){var
n=e.x-t.x,i=e.y-t.y,a=Math.sqrt(n*n+i*i),o=Math.atan2(i,n);return
o<-.5*Math.PI&&(o+=2*Math.PI),{angle:o,distance:a}},o.distanceBetweenPoints=function(t,e){return
Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},o.aliasPixel=function(t){return
t%2==0?0:.5},o.splineCurve=function(t,e,n,i){var
a=t.skip?e:t,o=e,r=n.skip?e:n,l=Math.sqrt(Math.pow(o.x-a.x,2)+Math.pow(o.y-a.y,2)),s=Math.sqrt(Math.pow(r.x-o.x,2)+Math.pow(r.y-o.y,2)),u=l/(l+s),d=s/(l+s),c=i*(u=isNaN(u)?0:u),h=i*(d=isNaN(d)?0:d);return{previous:{x:o.x-c*(r.x-a.x),y:o.y-c*(r.y-a.y)},next:{x:o.x+h*(r.x-a.x),y:o.y+h*(r.y-a.y)}}},o.EPSILON=Number.EPSILON||1e-14,o.splineCurveMonotone=function(t){var
e,n,i,a,r=(t||[]).map(function(t){return{model:t._model,deltaK:0,mK:0}}),l=r.length;for(e=0;e<l;++e)if(!(i=r[e]).model.skip){if(n=e>0?r[e-1]:null,(a=e<l-1?r[e+1]:null)&&!a.model.skip){var
s=a.model.x-i.model.x;i.deltaK=0!==s?(a.model.y-i.model.y)/s:0}!n||n.model.skip?i.mK=i.deltaK:!a||a.model.skip?i.mK=n.deltaK:this.sign(n.deltaK)!==this.sign(i.deltaK)?i.mK=0:i.mK=(n.deltaK+i.deltaK)/2}var
u,d,c,h;for(e=0;e<l-1;++e)i=r[e],a=r[e+1],i.model.skip||a.model.skip||(o.almostEquals(i.deltaK,0,this.EPSILON)?i.mK=a.mK=0:(u=i.mK/i.deltaK,d=a.mK/i.deltaK,(h=Math.pow(u,2)+Math.pow(d,2))<=9||(c=3/Math.sqrt(h),i.mK=u*c*i.deltaK,a.mK=d*c*i.deltaK)));var
f;for(e=0;e<l;++e)(i=r[e]).model.skip||(n=e>0?r[e-1]:null,a=e<l-1?r[e+1]:null,n&&!n.model.skip&&(f=(i.model.x-n.model.x)/3,i.model.controlPointPreviousX=i.model.x-f,i.model.controlPointPreviousY=i.model.y-f*i.mK),a&&!a.model.skip&&(f=(a.model.x-i.model.x)/3,i.model.controlPointNextX=i.model.x+f,i.model.controlPointNextY=i.model.y+f*i.mK))},o.nextItem=function(t,e,n){return
n?e>=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},o.previousItem=function(t,e,n){return
n?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},o.niceNum=function(t,e){var
n=Math.floor(o.log10(t)),i=t/Math.pow(10,n);return(e?i<1.5?1:i<3?2:i<7?5:10:i<=1?1:i<=2?2:i<=5?5:10)*Math.pow(10,n)},o.requestAnimFrame="undefined"==typeof
window?function(t){t()}:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return
window.setTimeout(t,1e3/60)},o.getRelativePosition=function(t,e){var
n,i,a=t.originalEvent||t,r=t.currentTarget||t.srcElement,l=r.getBoundingClientRect(),s=a.touches;s&&s.length>0?(n=s[0].clientX,i=s[0].clientY):(n=a.clientX,i=a.clientY);var
u=parseFloat(o.getStyle(r,"padding-left")),d=parseFloat(o.getStyle(r,"padding-top")),c=parseFloat(o.getStyle(r,"padding-right")),h=parseFloat(o.getStyle(r,"padding-bottom")),f=l.right-l.left-u-c,g=l.bottom-l.top-d-h;return
n=Math.round((n-l.left-u)/f*r.width/e.currentDevicePixelRatio),i=Math.round((i-l.top-d)/g*r.height/e.currentDevicePixelRatio),{x:n,y:i}},o.getConstraintWidth=function(t){return
r(t,"max-width","clientWidth")},o.getConstraintHeight=function(t){return
r(t,"max-height","clientHeight")},o.getMaximumWidth=function(t){var
e=t.parentNode;if(!e)return t.clientWidth;var
n=parseInt(o.getStyle(e,"padding-left"),10),i=parseInt(o.getStyle(e,"padding-right"),10),a=e.clientWidth-n-i,r=o.getConstraintWidth(t);return
isNaN(r)?a:Math.min(a,r)},o.getMaximumHeight=function(t){var
e=t.parentNode;if(!e)return t.clientHeight;var
n=parseInt(o.getStyle(e,"padding-top"),10),i=parseInt(o.getStyle(e,"padding-bottom"),10),a=e.clientHeight-n-i,r=o.getConstraintHeight(t);return
isNaN(r)?a:Math.min(a,r)},o.getStyle=function(t,e){return
t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)},o.retinaScale=function(t,e){var
n=t.currentDevicePixelRatio=e||window.devicePixelRatio||1;if(1!==n){var
i=t.canvas,a=t.height,o=t.width;i.height=a*n,i.width=o*n,t.ctx.scale(n,n),i.style.height=a+"px",i.style.width=o+"px"}},o.fontString=function(t,e,n){return
e+" "+t+"px "+n},o.longestText=function(t,e,n,i){var
a=(i=i||{}).data=i.data||{},r=i.garbageCollect=i.garbageCollect||[];i.font!==e&&(a=i.data={},r=i.garbageCollect=[],i.font=e),t.font=e;var
l=0;o.each(n,function(e){void
0!==e&&null!==e&&!0!==o.isArray(e)?l=o.measureText(t,a,r,l,e):o.isArray(e)&&o.each(e,function(e){void
0===e||null===e||o.isArray(e)||(l=o.measureText(t,a,r,l,e))})});var
s=r.length/2;if(s>n.length){for(var u=0;u<s;u++)delete
a[r[u]];r.splice(0,s)}return l},o.measureText=function(t,e,n,i,a){var
o=e[a];return
o||(o=e[a]=t.measureText(a).width,n.push(a)),o>i&&(i=o),i},o.numberOfLabelLines=function(t){var
e=1;return
o.each(t,function(t){o.isArray(t)&&t.length>e&&(e=t.length)}),e},o.color=i?function(t){return
t instanceof
CanvasGradient&&(t=a.global.defaultColor),i(t)}:function(t){return
console.error("Color.js not
found!"),t},o.getHoverColor=function(t){return t instanceof
CanvasPattern?t:o.color(t).saturate(.5).darken(.1).rgbString()}}},{25:25,3:3,45:45}],28:[function(t,e,n){"use
strict";function i(t,e){return
t.native?{x:t.x,y:t.y}:u.getRelativePosition(t,e)}function a(t,e){var
n,i,a,o,r;for(i=0,o=t.data.datasets.length;i<o;++i)if(t.isDatasetVisible(i))for(a=0,r=(n=t.getDatasetMeta(i)).data.length;a<r;++a){var
l=n.data[a];l._view.skip||e(l)}}function o(t,e){var n=[];return
a(t,function(t){t.inRange(e.x,e.y)&&n.push(t)}),n}function
r(t,e,n,i){var o=Number.POSITIVE_INFINITY,r=[];return
a(t,function(t){if(!n||t.inRange(e.x,e.y)){var
a=t.getCenterPoint(),l=i(e,a);l<o?(r=[t],o=l):l===o&&r.push(t)}}),r}function
l(t){var
e=-1!==t.indexOf("x"),n=-1!==t.indexOf("y");return
function(t,i){var a=e?Math.abs(t.x-i.x):0,o=n?Math.abs(t.y-i.y):0;return
Math.sqrt(Math.pow(a,2)+Math.pow(o,2))}}function s(t,e,n){var
a=i(e,t);n.axis=n.axis||"x";var
s=l(n.axis),u=n.intersect?o(t,a):r(t,a,!1,s),d=[];return
u.length?(t.data.datasets.forEach(function(e,n){if(t.isDatasetVisible(n)){var
i=t.getDatasetMeta(n).data[u[0]._index];i&&!i._view.skip&&d.push(i)}}),d):[]}var
u=t(45);e.exports={modes:{single:function(t,e){var n=i(e,t),o=[];return
a(t,function(t){if(t.inRange(n.x,n.y))return
o.push(t),o}),o.slice(0,1)},label:s,index:s,dataset:function(t,e,n){var
a=i(e,t);n.axis=n.axis||"xy";var
s=l(n.axis),u=n.intersect?o(t,a):r(t,a,!1,s);return
u.length>0&&(u=t.getDatasetMeta(u[0]._datasetIndex).data),u},"x-axis":function(t,e){return
s(t,e,{intersect:!0})},point:function(t,e){return
o(t,i(e,t))},nearest:function(t,e,n){var
a=i(e,t);n.axis=n.axis||"xy";var
o=l(n.axis),s=r(t,a,n.intersect,o);return
s.length>1&&s.sort(function(t,e){var
n=t.getArea()-e.getArea();return
0===n&&(n=t._datasetIndex-e._datasetIndex),n}),s.slice(0,1)},x:function(t,e,n){var
o=i(e,t),r=[],l=!1;return
a(t,function(t){t.inXRange(o.x)&&r.push(t),t.inRange(o.x,o.y)&&(l=!0)}),n.intersect&&!l&&(r=[]),r},y:function(t,e,n){var
o=i(e,t),r=[],l=!1;return
a(t,function(t){t.inYRange(o.y)&&r.push(t),t.inRange(o.x,o.y)&&(l=!0)}),n.intersect&&!l&&(r=[]),r}}}},{45:45}],29:[function(t,e,n){"use
strict";t(25)._set("global",{responsive:!0,responsiveAnimationDuration:0,maintainAspectRatio:!0,events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"nearest",intersect:!0,animationDuration:400},onClick:null,defaultColor:"rgba(0,0,0,0.1)",defaultFontColor:"#666",defaultFontFamily:"'Helvetica
Neue', 'Helvetica', 'Arial',
sans-serif",defaultFontSize:12,defaultFontStyle:"normal",showLines:!0,elements:{},layout:{padding:{top:0,right:0,bottom:0,left:0}}}),e.exports=function(){var
t=function(t,e){return this.construct(t,e),this};return
t.Chart=t,t}},{25:25}],30:[function(t,e,n){"use strict";var
i=t(45);e.exports=function(t){function e(t,e){return
i.where(t,function(t){return t.position===e})}function
n(t,e){t.forEach(function(t,e){return
t._tmpIndex_=e,t}),t.sort(function(t,n){var i=e?n:t,a=e?t:n;return
i.weight===a.weight?i._tmpIndex_-a._tmpIndex_:i.weight-a.weight}),t.forEach(function(t){delete
t._tmpIndex_})}t.layoutService={defaults:{},addBox:function(t,e){t.boxes||(t.boxes=[]),e.fullWidth=e.fullWidth||!1,e.position=e.position||"top",e.weight=e.weight||0,t.boxes.push(e)},removeBox:function(t,e){var
n=t.boxes?t.boxes.indexOf(e):-1;-1!==n&&t.boxes.splice(n,1)},configure:function(t,e,n){for(var
i,a=["fullWidth","position","weight"],o=a.length,r=0;r<o;++r)i=a[r],n.hasOwnProperty(i)&&(e[i]=n[i])},update:function(t,a,o){function
r(t){var e=i.findNextWhere(_,function(e){return
e.box===t});if(e)if(t.isHorizontal()){var
n={left:Math.max(T,D),right:Math.max(F,I),top:0,bottom:0};t.update(t.fullWidth?x:S,y/2,n)}else
t.update(e.minSize.width,C)}function
l(t){t.isHorizontal()?(t.left=t.fullWidth?d:T,t.right=t.fullWidth?a-c:T+S,t.top=V,t.bottom=V+t.height,V=t.bottom):(t.left=N,t.right=N+t.width,t.top=O,t.bottom=O+C,N=t.right)}if(t){var
s=t.options.layout||{},u=i.options.toPadding(s.padding),d=u.left,c=u.right,h=u.top,f=u.bottom,g=e(t.boxes,"left"),p=e(t.boxes,"right"),v=e(t.boxes,"top"),m=e(t.boxes,"bottom"),b=e(t.boxes,"chartArea");n(g,!0),n(p,!1),n(v,!0),n(m,!1);var
x=a-d-c,y=o-h-f,k=y/2,w=(a-x/2)/(g.length+p.length),M=(o-k)/(v.length+m.length),S=x,C=y,_=[];i.each(g.concat(p,v,m),function(t){var
e,n=t.isHorizontal();n?(e=t.update(t.fullWidth?x:S,M),C-=e.height):(e=t.update(w,k),S-=e.width),_.push({horizontal:n,minSize:e,box:t})});var
D=0,I=0,P=0,A=0;i.each(v.concat(m),function(t){if(t.getPadding){var
e=t.getPadding();D=Math.max(D,e.left),I=Math.max(I,e.right)}}),i.each(g.concat(p),function(t){if(t.getPadding){var
e=t.getPadding();P=Math.max(P,e.top),A=Math.max(A,e.bottom)}});var
T=d,F=c,O=h,R=f;i.each(g.concat(p),r),i.each(g,function(t){T+=t.width}),i.each(p,function(t){F+=t.width}),i.each(v.concat(m),r),i.each(v,function(t){O+=t.height}),i.each(m,function(t){R+=t.height}),i.each(g.concat(p),function(t){var
e=i.findNextWhere(_,function(e){return
e.box===t}),n={left:0,right:0,top:O,bottom:R};e&&t.update(e.minSize.width,C,n)}),T=d,F=c,O=h,R=f,i.each(g,function(t){T+=t.width}),i.each(p,function(t){F+=t.width}),i.each(v,function(t){O+=t.height}),i.each(m,function(t){R+=t.height});var
L=Math.max(D-T,0);T+=L,F+=Math.max(I-F,0);var
z=Math.max(P-O,0);O+=z,R+=Math.max(A-R,0);var
B=o-O-R,W=a-T-F;W===S&&B===C||(i.each(g,function(t){t.height=B}),i.each(p,function(t){t.height=B}),i.each(v,function(t){t.fullWidth||(t.width=W)}),i.each(m,function(t){t.fullWidth||(t.width=W)}),C=B,S=W);var
N=d+L,V=h+z;i.each(g.concat(v),l),N+=S,V+=C,i.each(p,l),i.each(m,l),t.chartArea={left:T,top:O,right:T+S,bottom:O+C},i.each(b,function(e){e.left=t.chartArea.left,e.top=t.chartArea.top,e.right=t.chartArea.right,e.bottom=t.chartArea.bottom,e.update(S,C)})}}}}},{45:45}],31:[function(t,e,n){"use
strict";var
i=t(25),a=t(26),o=t(45);i._set("global",{plugins:{}}),e.exports=function(t){t.plugins={_plugins:[],_cacheId:0,register:function(t){var
e=this._plugins;[].concat(t).forEach(function(t){-1===e.indexOf(t)&&e.push(t)}),this._cacheId++},unregister:function(t){var
e=this._plugins;[].concat(t).forEach(function(t){var
n=e.indexOf(t);-1!==n&&e.splice(n,1)}),this._cacheId++},clear:function(){this._plugins=[],this._cacheId++},count:function(){return
this._plugins.length},getAll:function(){return
this._plugins},notify:function(t,e,n){var
i,a,o,r,l,s=this.descriptors(t),u=s.length;for(i=0;i<u;++i)if(a=s[i],o=a.plugin,"function"==typeof(l=o[e])&&((r=[t].concat(n||[])).push(a.options),!1===l.apply(o,r)))return!1;return!0},descriptors:function(t){var
e=t._plugins||(t._plugins={});if(e.id===this._cacheId)return
e.descriptors;var
n=[],a=[],r=t&&t.config||{},l=r.options&&r.options.plugins||{};return
this._plugins.concat(r.plugins||[]).forEach(function(t){if(-1===n.indexOf(t)){var
e=t.id,r=l[e];!1!==r&&(!0===r&&(r=o.clone(i.global.plugins[e])),n.push(t),a.push({plugin:t,options:r||{}}))}}),e.descriptors=a,e.id=this._cacheId,a}},t.pluginService=t.plugins,t.PluginBase=a.extend({})}},{25:25,26:26,45:45}],32:[function(t,e,n){"use
strict";function i(t){var
e,n,i=[];for(e=0,n=t.length;e<n;++e)i.push(t[e].label);return i}function
a(t,e,n){var i=t.getPixelForTick(e);return
n&&(i-=0===e?(t.getPixelForTick(1)-i)/2:(i-t.getPixelForTick(e-1))/2),i}var
o=t(25),r=t(26),l=t(45),s=t(34);o._set("scale",{display:!0,position:"left",offset:!1,gridLines:{display:!0,color:"rgba(0,
0, 0,
0.1)",lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickMarkLength:10,zeroLineWidth:1,zeroLineColor:"rgba(0,0,0,0.25)",zeroLineBorderDash:[],zeroLineBorderDashOffset:0,offsetGridLines:!1,borderDash:[],borderDashOffset:0},scaleLabel:{display:!1,labelString:"",lineHeight:1.2,padding:{top:4,bottom:4}},ticks:{beginAtZero:!1,minRotation:0,maxRotation:50,mirror:!1,padding:0,reverse:!1,display:!0,autoSkip:!0,autoSkipPadding:0,labelOffset:0,callback:s.formatters.values,minor:{},major:{}}}),e.exports=function(t){function
e(t,e,n){return
l.isArray(e)?l.longestText(t,n,e):t.measureText(e).width}function n(t){var
e=l.valueOrDefault,n=o.global,i=e(t.fontSize,n.defaultFontSize),a=e(t.fontStyle,n.defaultFontStyle),r=e(t.fontFamily,n.defaultFontFamily);return{size:i,style:a,family:r,font:l.fontString(i,a,r)}}function
s(t){return
l.options.toLineHeight(l.valueOrDefault(t.lineHeight,1.2),l.valueOrDefault(t.fontSize,o.global.defaultFontSize))}t.Scale=r.extend({getPadding:function(){var
t=this;return{left:t.paddingLeft||0,top:t.paddingTop||0,right:t.paddingRight||0,bottom:t.paddingBottom||0}},getTicks:function(){return
this._ticks},mergeTicksOptions:function(){var
t=this.options.ticks;!1===t.minor&&(t.minor={display:!1}),!1===t.major&&(t.major={display:!1});for(var
e in t)"major"!==e&&"minor"!==e&&(void
0===t.minor[e]&&(t.minor[e]=t[e]),void
0===t.major[e]&&(t.major[e]=t[e]))},beforeUpdate:function(){l.callback(this.options.beforeUpdate,[this])},update:function(t,e,n){var
i,a,o,r,s,u,d=this;for(d.beforeUpdate(),d.maxWidth=t,d.maxHeight=e,d.margins=l.extend({left:0,right:0,top:0,bottom:0},n),d.longestTextCache=d.longestTextCache||{},d.beforeSetDimensions(),d.setDimensions(),d.afterSetDimensions(),d.beforeDataLimits(),d.determineDataLimits(),d.afterDataLimits(),d.beforeBuildTicks(),s=d.buildTicks()||[],d.afterBuildTicks(),d.beforeTickToLabelConversion(),o=d.convertTicksToLabels(s)||d.ticks,d.afterTickToLabelConversion(),d.ticks=o,i=0,a=o.length;i<a;++i)r=o[i],(u=s[i])?u.label=r:s.push(u={label:r,major:!1});return
d._ticks=s,d.beforeCalculateTickRotation(),d.calculateTickRotation(),d.afterCalculateTickRotation(),d.beforeFit(),d.fit(),d.afterFit(),d.afterUpdate(),d.minSize},afterUpdate:function(){l.callback(this.options.afterUpdate,[this])},beforeSetDimensions:function(){l.callback(this.options.beforeSetDimensions,[this])},setDimensions:function(){var
t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0},afterSetDimensions:function(){l.callback(this.options.afterSetDimensions,[this])},beforeDataLimits:function(){l.callback(this.options.beforeDataLimits,[this])},determineDataLimits:l.noop,afterDataLimits:function(){l.callback(this.options.afterDataLimits,[this])},beforeBuildTicks:function(){l.callback(this.options.beforeBuildTicks,[this])},buildTicks:l.noop,afterBuildTicks:function(){l.callback(this.options.afterBuildTicks,[this])},beforeTickToLabelConversion:function(){l.callback(this.options.beforeTickToLabelConversion,[this])},convertTicksToLabels:function(){var
t=this,e=t.options.ticks;t.ticks=t.ticks.map(e.userCallback||e.callback,this)},afterTickToLabelConversion:function(){l.callback(this.options.afterTickToLabelConversion,[this])},beforeCalculateTickRotation:function(){l.callback(this.options.beforeCalculateTickRotation,[this])},calculateTickRotation:function(){var
t=this,e=t.ctx,a=t.options.ticks,o=i(t._ticks),r=n(a);e.font=r.font;var
s=a.minRotation||0;if(o.length&&t.options.display&&t.isHorizontal())for(var
u,d=l.longestText(e,r.font,o,t.longestTextCache),c=d,h=t.getPixelForTick(1)-t.getPixelForTick(0)-6;c>h&&s<a.maxRotation;){var
f=l.toRadians(s);if(u=Math.cos(f),Math.sin(f)*d>t.maxHeight){s--;break}s++,c=u*d}t.labelRotation=s},afterCalculateTickRotation:function(){l.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){l.callback(this.options.beforeFit,[this])},fit:function(){var
t=this,a=t.minSize={width:0,height:0},o=i(t._ticks),r=t.options,u=r.ticks,d=r.scaleLabel,c=r.gridLines,h=r.display,f=t.isHorizontal(),g=n(u),p=r.gridLines.tickMarkLength;if(a.width=f?t.isFullWidth()?t.maxWidth-t.margins.left-t.margins.right:t.maxWidth:h&&c.drawTicks?p:0,a.height=f?h&&c.drawTicks?p:0:t.maxHeight,d.display&&h){var
v=s(d)+l.options.toPadding(d.padding).height;f?a.height+=v:a.width+=v}if(u.display&&h){var
m=l.longestText(t.ctx,g.font,o,t.longestTextCache),b=l.numberOfLabelLines(o),x=.5*g.size,y=t.options.ticks.padding;if(f){t.longestLabelWidth=m;var
k=l.toRadians(t.labelRotation),w=Math.cos(k),M=Math.sin(k)*m+g.size*b+x*(b-1)+x;a.height=Math.min(t.maxHeight,a.height+M+y),t.ctx.font=g.font;var
S=e(t.ctx,o[0],g.font),C=e(t.ctx,o[o.length-1],g.font);0!==t.labelRotation?(t.paddingLeft="bottom"===r.position?w*S+3:w*x+3,t.paddingRight="bottom"===r.position?w*x+3:w*C+3):(t.paddingLeft=S/2+3,t.paddingRight=C/2+3)}else
u.mirror?m=0:m+=y+x,a.width=Math.min(t.maxWidth,a.width+m),t.paddingTop=g.size/2,t.paddingBottom=g.size/2}t.handleMargins(),t.width=a.width,t.height=a.height},handleMargins:function(){var
t=this;t.margins&&(t.paddingLeft=Math.max(t.paddingLeft-t.margins.left,0),t.paddingTop=Math.max(t.paddingTop-t.margins.top,0),t.paddingRight=Math.max(t.paddingRight-t.margins.right,0),t.paddingBottom=Math.max(t.paddingBottom-t.margins.bottom,0))},afterFit:function(){l.callback(this.options.afterFit,[this])},isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},isFullWidth:function(){return
this.options.fullWidth},getRightValue:function(t){if(l.isNullOrUndef(t))return
NaN;if("number"==typeof t&&!isFinite(t))return
NaN;if(t)if(this.isHorizontal()){if(void 0!==t.x)return
this.getRightValue(t.x)}else if(void 0!==t.y)return
this.getRightValue(t.y);return
t},getLabelForIndex:l.noop,getPixelForValue:l.noop,getValueForPixel:l.noop,getPixelForTick:function(t){var
e=this,n=e.options.offset;if(e.isHorizontal()){var
i=(e.width-(e.paddingLeft+e.paddingRight))/Math.max(e._ticks.length-(n?0:1),1),a=i*t+e.paddingLeft;n&&(a+=i/2);var
o=e.left+Math.round(a);return o+=e.isFullWidth()?e.margins.left:0}var
r=e.height-(e.paddingTop+e.paddingBottom);return
e.top+t*(r/(e._ticks.length-1))},getPixelForDecimal:function(t){var
e=this;if(e.isHorizontal()){var
n=(e.width-(e.paddingLeft+e.paddingRight))*t+e.paddingLeft,i=e.left+Math.round(n);return
i+=e.isFullWidth()?e.margins.left:0}return
e.top+t*e.height},getBasePixel:function(){return
this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var
t=this,e=t.min,n=t.max;return
t.beginAtZero?0:e<0&&n<0?n:e>0&&n>0?e:0},_autoSkip:function(t){var
e,n,i,a,o=this,r=o.isHorizontal(),s=o.options.ticks.minor,u=t.length,d=l.toRadians(o.labelRotation),c=Math.cos(d),h=o.longestLabelWidth*c,f=[];for(s.maxTicksLimit&&(a=s.maxTicksLimit),r&&(e=!1,(h+s.autoSkipPadding)*u>o.width-(o.paddingLeft+o.paddingRight)&&(e=1+Math.floor((h+s.autoSkipPadding)*u/(o.width-(o.paddingLeft+o.paddingRight)))),a&&u>a&&(e=Math.max(e,Math.floor(u/a)))),n=0;n<u;n++)i=t[n],((e>1&&n%e>0||n%e==0&&n+e>=u)&&n!==u-1||l.isNullOrUndef(i.label))&&delete
i.label,f.push(i);return f},draw:function(t){var
e=this,i=e.options;if(i.display){var
r=e.ctx,u=o.global,d=i.ticks.minor,c=i.ticks.major||d,h=i.gridLines,f=i.scaleLabel,g=0!==e.labelRotation,p=e.isHorizontal(),v=d.autoSkip?e._autoSkip(e.getTicks()):e.getTicks(),m=l.valueOrDefault(d.fontColor,u.defaultFontColor),b=n(d),x=l.valueOrDefault(c.fontColor,u.defaultFontColor),y=n(c),k=h.drawTicks?h.tickMarkLength:0,w=l.valueOrDefault(f.fontColor,u.defaultFontColor),M=n(f),S=l.options.toPadding(f.padding),C=l.toRadians(e.labelRotation),_=[],D="right"===i.position?e.left:e.right-k,I="right"===i.position?e.left+k:e.right,P="bottom"===i.position?e.top:e.bottom-k,A="bottom"===i.position?e.top+k:e.bottom;if(l.each(v,function(n,o){if(void
0!==n.label){var
r,s,c,f,m=n.label;o===e.zeroLineIndex&&i.offset===h.offsetGridLines?(r=h.zeroLineWidth,s=h.zeroLineColor,c=h.zeroLineBorderDash,f=h.zeroLineBorderDashOffset):(r=l.valueAtIndexOrDefault(h.lineWidth,o),s=l.valueAtIndexOrDefault(h.color,o),c=l.valueOrDefault(h.borderDash,u.borderDash),f=l.valueOrDefault(h.borderDashOffset,u.borderDashOffset));var
b,x,y,w,M,S,T,F,O,R,L="middle",z="middle",B=d.padding;if(p){var
W=k+B;"bottom"===i.position?(z=g?"middle":"top",L=g?"right":"center",R=e.top+W):(z=g?"middle":"bottom",L=g?"left":"center",R=e.bottom-W);var
N=a(e,o,h.offsetGridLines&&v.length>1);N<e.left&&(s="rgba(0,0,0,0)"),N+=l.aliasPixel(r),O=e.getPixelForTick(o)+d.labelOffset,b=y=M=T=N,x=P,w=A,S=t.top,F=t.bottom}else{var
V,E="left"===i.position;d.mirror?(L=E?"left":"right",V=B):(L=E?"right":"left",V=k+B),O=E?e.right-V:e.left+V;var
H=a(e,o,h.offsetGridLines&&v.length>1);H<e.top&&(s="rgba(0,0,0,0)"),H+=l.aliasPixel(r),R=e.getPixelForTick(o)+d.labelOffset,b=D,y=I,M=t.left,T=t.right,x=w=S=F=H}_.push({tx1:b,ty1:x,tx2:y,ty2:w,x1:M,y1:S,x2:T,y2:F,labelX:O,labelY:R,glWidth:r,glColor:s,glBorderDash:c,glBorderDashOffset:f,rotation:-1*C,label:m,major:n.major,textBaseline:z,textAlign:L})}}),l.each(_,function(t){if(h.display&&(r.save(),r.lineWidth=t.glWidth,r.strokeStyle=t.glColor,r.setLineDash&&(r.setLineDash(t.glBorderDash),r.lineDashOffset=t.glBorderDashOffset),r.beginPath(),h.drawTicks&&(r.moveTo(t.tx1,t.ty1),r.lineTo(t.tx2,t.ty2)),h.drawOnChartArea&&(r.moveTo(t.x1,t.y1),r.lineTo(t.x2,t.y2)),r.stroke(),r.restore()),d.display){r.save(),r.translate(t.labelX,t.labelY),r.rotate(t.rotation),r.font=t.major?y.font:b.font,r.fillStyle=t.major?x:m,r.textBaseline=t.textBaseline,r.textAlign=t.textAlign;var
e=t.label;if(l.isArray(e))for(var
n=0,i=0;n<e.length;++n)r.fillText(""+e[n],0,i),i+=1.5*b.size;else
r.fillText(e,0,0);r.restore()}}),f.display){var
T,F,O=0,R=s(f)/2;if(p)T=e.left+(e.right-e.left)/2,F="bottom"===i.position?e.bottom-R-S.bottom:e.top+R+S.top;else{var
L="left"===i.position;T=L?e.left+R+S.top:e.right-R-S.top,F=e.top+(e.bottom-e.top)/2,O=L?-.5*Math.PI:.5*Math.PI}r.save(),r.translate(T,F),r.rotate(O),r.textAlign="center",r.textBaseline="middle",r.fillStyle=w,r.font=M.font,r.fillText(f.labelString,0,0),r.restore()}if(h.drawBorder){r.lineWidth=l.valueAtIndexOrDefault(h.lineWidth,0),r.strokeStyle=l.valueAtIndexOrDefault(h.color,0);var
z=e.left,B=e.right,W=e.top,N=e.bottom,V=l.aliasPixel(r.lineWidth);p?(W=N="top"===i.position?e.bottom:e.top,W+=V,N+=V):(z=B="left"===i.position?e.right:e.left,z+=V,B+=V),r.beginPath(),r.moveTo(z,W),r.lineTo(B,N),r.stroke()}}}})}},{25:25,26:26,34:34,45:45}],33:[function(t,e,n){"use
strict";var
i=t(25),a=t(45);e.exports=function(t){t.scaleService={constructors:{},defaults:{},registerScaleType:function(t,e,n){this.constructors[t]=e,this.defaults[t]=a.clone(n)},getScaleConstructor:function(t){return
this.constructors.hasOwnProperty(t)?this.constructors[t]:void
0},getScaleDefaults:function(t){return
this.defaults.hasOwnProperty(t)?a.merge({},[i.scale,this.defaults[t]]):{}},updateScaleDefaults:function(t,e){var
n=this;n.defaults.hasOwnProperty(t)&&(n.defaults[t]=a.extend(n.defaults[t],e))},addScalesToLayout:function(e){a.each(e.scales,function(n){n.fullWidth=n.options.fullWidth,n.position=n.options.position,n.weight=n.options.weight,t.layoutService.addBox(e,n)})}}}},{25:25,45:45}],34:[function(t,e,n){"use
strict";var i=t(45);e.exports={generators:{linear:function(t,e){var
n,a=[];if(t.stepSize&&t.stepSize>0)n=t.stepSize;else{var
o=i.niceNum(e.max-e.min,!1);n=i.niceNum(o/(t.maxTicks-1),!0)}var
r=Math.floor(e.min/n)*n,l=Math.ceil(e.max/n)*n;t.min&&t.max&&t.stepSize&&i.almostWhole((t.max-t.min)/t.stepSize,n/1e3)&&(r=t.min,l=t.max);var
s=(l-r)/n;s=i.almostEquals(s,Math.round(s),n/1e3)?Math.round(s):Math.ceil(s),a.push(void
0!==t.min?t.min:r);for(var u=1;u<s;++u)a.push(r+u*n);return a.push(void
0!==t.max?t.max:l),a},logarithmic:function(t,e){var
n,a,o=[],r=i.valueOrDefault,l=r(t.min,Math.pow(10,Math.floor(i.log10(e.min)))),s=Math.floor(i.log10(e.max)),u=Math.ceil(e.max/Math.pow(10,s));0===l?(n=Math.floor(i.log10(e.minNotZero)),a=Math.floor(e.minNotZero/Math.pow(10,n)),o.push(l),l=a*Math.pow(10,n)):(n=Math.floor(i.log10(l)),a=Math.floor(l/Math.pow(10,n)));do{o.push(l),10===++a&&(a=1,++n),l=a*Math.pow(10,n)}while(n<s||n===s&&a<u);var
d=r(t.max,l);return o.push(d),o}},formatters:{values:function(t){return
i.isArray(t)?t:""+t},linear:function(t,e,n){var
a=n.length>3?n[2]-n[1]:n[1]-n[0];Math.abs(a)>1&&t!==Math.floor(t)&&(a=t-Math.floor(t));var
o=i.log10(Math.abs(a)),r="";if(0!==t){var
l=-1*Math.floor(o);l=Math.max(Math.min(l,20),0),r=t.toFixed(l)}else
r="0";return r},logarithmic:function(t,e,n){var
a=t/Math.pow(10,Math.floor(i.log10(t)));return
0===t?"0":1===a||2===a||5===a||0===e||e===n.length-1?t.toExponential():""}}}},{45:45}],35:[function(t,e,n){"use
strict";var
i=t(25),a=t(26),o=t(45);i._set("global",{tooltips:{enabled:!0,custom:null,mode:"nearest",position:"average",intersect:!0,backgroundColor:"rgba(0,0,0,0.8)",titleFontStyle:"bold",titleSpacing:2,titleMarginBottom:6,titleFontColor:"#fff",titleAlign:"left",bodySpacing:2,bodyFontColor:"#fff",bodyAlign:"left",footerFontStyle:"bold",footerSpacing:2,footerMarginTop:6,footerFontColor:"#fff",footerAlign:"left",yPadding:6,xPadding:6,caretPadding:2,caretSize:5,cornerRadius:6,multiKeyBackground:"#fff",displayColors:!0,borderColor:"rgba(0,0,0,0)",borderWidth:0,callbacks:{beforeTitle:o.noop,title:function(t,e){var
n="",i=e.labels,a=i?i.length:0;if(t.length>0){var
o=t[0];o.xLabel?n=o.xLabel:a>0&&o.index<a&&(n=i[o.index])}return
n},afterTitle:o.noop,beforeBody:o.noop,beforeLabel:o.noop,label:function(t,e){var
n=e.datasets[t.datasetIndex].label||"";return
n&&(n+=": "),n+=t.yLabel},labelColor:function(t,e){var
n=e.getDatasetMeta(t.datasetIndex).data[t.index]._view;return{borderColor:n.borderColor,backgroundColor:n.backgroundColor}},labelTextColor:function(){return
this._options.bodyFontColor},afterLabel:o.noop,afterBody:o.noop,beforeFooter:o.noop,footer:o.noop,afterFooter:o.noop}}}),e.exports=function(t){function
e(t,e){var n=o.color(t);return n.alpha(e*n.alpha()).rgbaString()}function
n(t,e){return
e&&(o.isArray(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function
r(t){var
e=t._xScale,n=t._yScale||t._scale,i=t._index,a=t._datasetIndex;return{xLabel:e?e.getLabelForIndex(i,a):"",yLabel:n?n.getLabelForIndex(i,a):"",index:i,datasetIndex:a,x:t._model.x,y:t._model.y}}function
l(t){var
e=i.global,n=o.valueOrDefault;return{xPadding:t.xPadding,yPadding:t.yPadding,xAlign:t.xAlign,yAlign:t.yAlign,bodyFontColor:t.bodyFontColor,_bodyFontFamily:n(t.bodyFontFamily,e.defaultFontFamily),_bodyFontStyle:n(t.bodyFontStyle,e.defaultFontStyle),_bodyAlign:t.bodyAlign,bodyFontSize:n(t.bodyFontSize,e.defaultFontSize),bodySpacing:t.bodySpacing,titleFontColor:t.titleFontColor,_titleFontFamily:n(t.titleFontFamily,e.defaultFontFamily),_titleFontStyle:n(t.titleFontStyle,e.defaultFontStyle),titleFontSize:n(t.titleFontSize,e.defaultFontSize),_titleAlign:t.titleAlign,titleSpacing:t.titleSpacing,titleMarginBottom:t.titleMarginBottom,footerFontColor:t.footerFontColor,_footerFontFamily:n(t.footerFontFamily,e.defaultFontFamily),_footerFontStyle:n(t.footerFontStyle,e.defaultFontStyle),footerFontSize:n(t.footerFontSize,e.defaultFontSize),_footerAlign:t.footerAlign,footerSpacing:t.footerSpacing,footerMarginTop:t.footerMarginTop,caretSize:t.caretSize,cornerRadius:t.cornerRadius,backgroundColor:t.backgroundColor,opacity:0,legendColorBackground:t.multiKeyBackground,displayColors:t.displayColors,borderColor:t.borderColor,borderWidth:t.borderWidth}}function
s(t,e){var
n=t._chart.ctx,i=2*e.yPadding,a=0,r=e.body,l=r.reduce(function(t,e){return
t+e.before.length+e.lines.length+e.after.length},0);l+=e.beforeBody.length+e.afterBody.length;var
s=e.title.length,u=e.footer.length,d=e.titleFontSize,c=e.bodyFontSize,h=e.footerFontSize;i+=s*d,i+=s?(s-1)*e.titleSpacing:0,i+=s?e.titleMarginBottom:0,i+=l*c,i+=l?(l-1)*e.bodySpacing:0,i+=u?e.footerMarginTop:0,i+=u*h,i+=u?(u-1)*e.footerSpacing:0;var
f=0,g=function(t){a=Math.max(a,n.measureText(t).width+f)};return
n.font=o.fontString(d,e._titleFontStyle,e._titleFontFamily),o.each(e.title,g),n.font=o.fontString(c,e._bodyFontStyle,e._bodyFontFamily),o.each(e.beforeBody.concat(e.afterBody),g),f=e.displayColors?c+2:0,o.each(r,function(t){o.each(t.before,g),o.each(t.lines,g),o.each(t.after,g)}),f=0,n.font=o.fontString(h,e._footerFontStyle,e._footerFontFamily),o.each(e.footer,g),a+=2*e.xPadding,{width:a,height:i}}function
u(t,e){var
n=t._model,i=t._chart,a=t._chart.chartArea,o="center",r="center";n.y<e.height?r="top":n.y>i.height-e.height&&(r="bottom");var
l,s,u,d,c,h=(a.left+a.right)/2,f=(a.top+a.bottom)/2;"center"===r?(l=function(t){return
t<=h},s=function(t){return t>h}):(l=function(t){return
t<=e.width/2},s=function(t){return
t>=i.width-e.width/2}),u=function(t){return
t+e.width>i.width},d=function(t){return
t-e.width<0},c=function(t){return
t<=f?"top":"bottom"},l(n.x)?(o="left",u(n.x)&&(o="center",r=c(n.y))):s(n.x)&&(o="right",d(n.x)&&(o="center",r=c(n.y)));var
g=t._options;return{xAlign:g.xAlign?g.xAlign:o,yAlign:g.yAlign?g.yAlign:r}}function
d(t,e,n){var
i=t.x,a=t.y,o=t.caretSize,r=t.caretPadding,l=t.cornerRadius,s=n.xAlign,u=n.yAlign,d=o+r,c=l+r;return"right"===s?i-=e.width:"center"===s&&(i-=e.width/2),"top"===u?a+=d:a-="bottom"===u?e.height+d:e.height/2,"center"===u?"left"===s?i+=d:"right"===s&&(i-=d):"left"===s?i-=c:"right"===s&&(i+=c),{x:i,y:a}}t.Tooltip=a.extend({initialize:function(){this._model=l(this._options)},getTitle:function(){var
t=this,e=t._options.callbacks,i=e.beforeTitle.apply(t,arguments),a=e.title.apply(t,arguments),o=e.afterTitle.apply(t,arguments),r=[];return
r=n(r,i),r=n(r,a),r=n(r,o)},getBeforeBody:function(){var
t=this._options.callbacks.beforeBody.apply(this,arguments);return
o.isArray(t)?t:void 0!==t?[t]:[]},getBody:function(t,e){var
i=this,a=i._options.callbacks,r=[];return o.each(t,function(t){var
o={before:[],lines:[],after:[]};n(o.before,a.beforeLabel.call(i,t,e)),n(o.lines,a.label.call(i,t,e)),n(o.after,a.afterLabel.call(i,t,e)),r.push(o)}),r},getAfterBody:function(){var
t=this._options.callbacks.afterBody.apply(this,arguments);return
o.isArray(t)?t:void 0!==t?[t]:[]},getFooter:function(){var
t=this,e=t._options.callbacks,i=e.beforeFooter.apply(t,arguments),a=e.footer.apply(t,arguments),o=e.afterFooter.apply(t,arguments),r=[];return
r=n(r,i),r=n(r,a),r=n(r,o)},update:function(e){var
n,i,a=this,c=a._options,h=a._model,f=a._model=l(c),g=a._active,p=a._data,v={xAlign:h.xAlign,yAlign:h.yAlign},m={x:h.x,y:h.y},b={width:h.width,height:h.height},x={x:h.caretX,y:h.caretY};if(g.length){f.opacity=1;var
y=[],k=[];x=t.Tooltip.positioners[c.position](g,a._eventPosition);var
w=[];for(n=0,i=g.length;n<i;++n)w.push(r(g[n]));c.filter&&(w=w.filter(function(t){return
c.filter(t,p)})),c.itemSort&&(w=w.sort(function(t,e){return
c.itemSort(t,e,p)})),o.each(w,function(t){y.push(c.callbacks.labelColor.call(a,t,a._chart)),k.push(c.callbacks.labelTextColor.call(a,t,a._chart))}),f.title=a.getTitle(w,p),f.beforeBody=a.getBeforeBody(w,p),f.body=a.getBody(w,p),f.afterBody=a.getAfterBody(w,p),f.footer=a.getFooter(w,p),f.x=Math.round(x.x),f.y=Math.round(x.y),f.caretPadding=c.caretPadding,f.labelColors=y,f.labelTextColors=k,f.dataPoints=w,m=d(f,b=s(this,f),v=u(this,b))}else
f.opacity=0;return
f.xAlign=v.xAlign,f.yAlign=v.yAlign,f.x=m.x,f.y=m.y,f.width=b.width,f.height=b.height,f.caretX=x.x,f.caretY=x.y,a._model=f,e&&c.custom&&c.custom.call(a,f),a},drawCaret:function(t,e){var
n=this._chart.ctx,i=this._view,a=this.getCaretPosition(t,e,i);n.lineTo(a.x1,a.y1),n.lineTo(a.x2,a.y2),n.lineTo(a.x3,a.y3)},getCaretPosition:function(t,e,n){var
i,a,o,r,l,s,u=n.caretSize,d=n.cornerRadius,c=n.xAlign,h=n.yAlign,f=t.x,g=t.y,p=e.width,v=e.height;if("center"===h)l=g+v/2,"left"===c?(a=(i=f)-u,o=i,r=l+u,s=l-u):(a=(i=f+p)+u,o=i,r=l-u,s=l+u);else
if("left"===c?(i=(a=f+d+u)-u,o=a+u):"right"===c?(i=(a=f+p-d-u)-u,o=a+u):(i=(a=f+p/2)-u,o=a+u),"top"===h)l=(r=g)-u,s=r;else{l=(r=g+v)+u,s=r;var
m=o;o=i,i=m}return{x1:i,x2:a,x3:o,y1:r,y2:l,y3:s}},drawTitle:function(t,n,i,a){var
r=n.title;if(r.length){i.textAlign=n._titleAlign,i.textBaseline="top";var
l=n.titleFontSize,s=n.titleSpacing;i.fillStyle=e(n.titleFontColor,a),i.font=o.fontString(l,n._titleFontStyle,n._titleFontFamily);var
u,d;for(u=0,d=r.length;u<d;++u)i.fillText(r[u],t.x,t.y),t.y+=l+s,u+1===r.length&&(t.y+=n.titleMarginBottom-s)}},drawBody:function(t,n,i,a){var
r=n.bodyFontSize,l=n.bodySpacing,s=n.body;i.textAlign=n._bodyAlign,i.textBaseline="top",i.font=o.fontString(r,n._bodyFontStyle,n._bodyFontFamily);var
u=0,d=function(e){i.fillText(e,t.x+u,t.y),t.y+=r+l};o.each(n.beforeBody,d);var
c=n.displayColors;u=c?r+2:0,o.each(s,function(l,s){o.each(l.before,d),o.each(l.lines,function(o){if(c){i.fillStyle=e(n.legendColorBackground,a),i.fillRect(t.x,t.y,r,r),i.lineWidth=1,i.strokeStyle=e(n.labelColors[s].borderColor,a),i.strokeRect(t.x,t.y,r,r),i.fillStyle=e(n.labelColors[s].backgroundColor,a),i.fillRect(t.x+1,t.y+1,r-2,r-2);var
l=e(n.labelTextColors[s],a);i.fillStyle=l}d(o)}),o.each(l.after,d)}),u=0,o.each(n.afterBody,d),t.y-=l},drawFooter:function(t,n,i,a){var
r=n.footer;r.length&&(t.y+=n.footerMarginTop,i.textAlign=n._footerAlign,i.textBaseline="top",i.fillStyle=e(n.footerFontColor,a),i.font=o.fontString(n.footerFontSize,n._footerFontStyle,n._footerFontFamily),o.each(r,function(e){i.fillText(e,t.x,t.y),t.y+=n.footerFontSize+n.footerSpacing}))},drawBackground:function(t,n,i,a,o){i.fillStyle=e(n.backgroundColor,o),i.strokeStyle=e(n.borderColor,o),i.lineWidth=n.borderWidth;var
r=n.xAlign,l=n.yAlign,s=t.x,u=t.y,d=a.width,c=a.height,h=n.cornerRadius;i.beginPath(),i.moveTo(s+h,u),"top"===l&&this.drawCaret(t,a),i.lineTo(s+d-h,u),i.quadraticCurveTo(s+d,u,s+d,u+h),"center"===l&&"right"===r&&this.drawCaret(t,a),i.lineTo(s+d,u+c-h),i.quadraticCurveTo(s+d,u+c,s+d-h,u+c),"bottom"===l&&this.drawCaret(t,a),i.lineTo(s+h,u+c),i.quadraticCurveTo(s,u+c,s,u+c-h),"center"===l&&"left"===r&&this.drawCaret(t,a),i.lineTo(s,u+h),i.quadraticCurveTo(s,u,s+h,u),i.closePath(),i.fill(),n.borderWidth>0&&i.stroke()},draw:function(){var
t=this._chart.ctx,e=this._view;if(0!==e.opacity){var
n={width:e.width,height:e.height},i={x:e.x,y:e.y},a=Math.abs(e.opacity<.001)?0:e.opacity,o=e.title.length||e.beforeBody.length||e.body.length||e.afterBody.length||e.footer.length;this._options.enabled&&o&&(this.drawBackground(i,e,t,n,a),i.x+=e.xPadding,i.y+=e.yPadding,this.drawTitle(i,e,t,a),this.drawBody(i,e,t,a),this.drawFooter(i,e,t,a))}},handleEvent:function(t){var
e=this,n=e._options,i=!1;if(e._lastActive=e._lastActive||[],"mouseout"===t.type?e._active=[]:e._active=e._chart.getElementsAtEventForMode(t,n.mode,n),!(i=!o.arrayEquals(e._active,e._lastActive)))return!1;if(e._lastActive=e._active,n.enabled||n.custom){e._eventPosition={x:t.x,y:t.y};var
a=e._model;e.update(!0),e.pivot(),i|=a.x!==e._model.x||a.y!==e._model.y}return
i}}),t.Tooltip.positioners={average:function(t){if(!t.length)return!1;var
e,n,i=0,a=0,o=0;for(e=0,n=t.length;e<n;++e){var
r=t[e];if(r&&r.hasValue()){var
l=r.tooltipPosition();i+=l.x,a+=l.y,++o}}return{x:Math.round(i/o),y:Math.round(a/o)}},nearest:function(t,e){var
n,i,a,r=e.x,l=e.y,s=Number.POSITIVE_INFINITY;for(n=0,i=t.length;n<i;++n){var
u=t[n];if(u&&u.hasValue()){var
d=u.getCenterPoint(),c=o.distanceBetweenPoints(e,d);c<s&&(s=c,a=u)}}if(a){var
h=a.tooltipPosition();r=h.x,l=h.y}return{x:r,y:l}}}}},{25:25,26:26,45:45}],36:[function(t,e,n){"use
strict";var
i=t(25),a=t(26),o=t(45);i._set("global",{elements:{arc:{backgroundColor:i.global.defaultColor,borderColor:"#fff",borderWidth:2}}}),e.exports=a.extend({inLabelRange:function(t){var
e=this._view;return!!e&&Math.pow(t-e.x,2)<Math.pow(e.radius+e.hoverRadius,2)},inRange:function(t,e){var
n=this._view;if(n){for(var
i=o.getAngleFromPoint(n,{x:t,y:e}),a=i.angle,r=i.distance,l=n.startAngle,s=n.endAngle;s<l;)s+=2*Math.PI;for(;a>s;)a-=2*Math.PI;for(;a<l;)a+=2*Math.PI;var
u=a>=l&&a<=s,d=r>=n.innerRadius&&r<=n.outerRadius;return
u&&d}return!1},getCenterPoint:function(){var
t=this._view,e=(t.startAngle+t.endAngle)/2,n=(t.innerRadius+t.outerRadius)/2;return{x:t.x+Math.cos(e)*n,y:t.y+Math.sin(e)*n}},getArea:function(){var
t=this._view;return
Math.PI*((t.endAngle-t.startAngle)/(2*Math.PI))*(Math.pow(t.outerRadius,2)-Math.pow(t.innerRadius,2))},tooltipPosition:function(){var
t=this._view,e=t.startAngle+(t.endAngle-t.startAngle)/2,n=(t.outerRadius-t.innerRadius)/2+t.innerRadius;return{x:t.x+Math.cos(e)*n,y:t.y+Math.sin(e)*n}},draw:function(){var
t=this._chart.ctx,e=this._view,n=e.startAngle,i=e.endAngle;t.beginPath(),t.arc(e.x,e.y,e.outerRadius,n,i),t.arc(e.x,e.y,e.innerRadius,i,n,!0),t.closePath(),t.strokeStyle=e.borderColor,t.lineWidth=e.borderWidth,t.fillStyle=e.backgroundColor,t.fill(),t.lineJoin="bevel",e.borderWidth&&t.stroke()}})},{25:25,26:26,45:45}],37:[function(t,e,n){"use
strict";var
i=t(25),a=t(26),o=t(45),r=i.global;i._set("global",{elements:{line:{tension:.4,backgroundColor:r.defaultColor,borderWidth:3,borderColor:r.defaultColor,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0}}}),e.exports=a.extend({draw:function(){var
t,e,n,i,a=this,l=a._view,s=a._chart.ctx,u=l.spanGaps,d=a._children.slice(),c=r.elements.line,h=-1;for(a._loop&&d.length&&d.push(d[0]),s.save(),s.lineCap=l.borderCapStyle||c.borderCapStyle,s.setLineDash&&s.setLineDash(l.borderDash||c.borderDash),s.lineDashOffset=l.borderDashOffset||c.borderDashOffset,s.lineJoin=l.borderJoinStyle||c.borderJoinStyle,s.lineWidth=l.borderWidth||c.borderWidth,s.strokeStyle=l.borderColor||r.defaultColor,s.beginPath(),h=-1,t=0;t<d.length;++t)e=d[t],n=o.previousItem(d,t),i=e._view,0===t?i.skip||(s.moveTo(i.x,i.y),h=t):(n=-1===h?n:d[h],i.skip||(h!==t-1&&!u||-1===h?s.moveTo(i.x,i.y):o.canvas.lineTo(s,n._view,e._view),h=t));s.stroke(),s.restore()}})},{25:25,26:26,45:45}],38:[function(t,e,n){"use
strict";function i(t){var
e=this._view;return!!e&&Math.pow(t-e.x,2)<Math.pow(e.radius+e.hitRadius,2)}var
a=t(25),o=t(26),r=t(45),l=a.global.defaultColor;a._set("global",{elements:{point:{radius:3,pointStyle:"circle",backgroundColor:l,borderColor:l,borderWidth:1,hitRadius:1,hoverRadius:4,hoverBorderWidth:1}}}),e.exports=o.extend({inRange:function(t,e){var
n=this._view;return!!n&&Math.pow(t-n.x,2)+Math.pow(e-n.y,2)<Math.pow(n.hitRadius+n.radius,2)},inLabelRange:i,inXRange:i,inYRange:function(t){var
e=this._view;return!!e&&Math.pow(t-e.y,2)<Math.pow(e.radius+e.hitRadius,2)},getCenterPoint:function(){var
t=this._view;return{x:t.x,y:t.y}},getArea:function(){return
Math.PI*Math.pow(this._view.radius,2)},tooltipPosition:function(){var
t=this._view;return{x:t.x,y:t.y,padding:t.radius+t.borderWidth}},draw:function(t){var
e=this._view,n=this._model,i=this._chart.ctx,o=e.pointStyle,s=e.radius,u=e.x,d=e.y,c=r.color,h=0;e.skip||(i.strokeStyle=e.borderColor||l,i.lineWidth=r.valueOrDefault(e.borderWidth,a.global.elements.point.borderWidth),i.fillStyle=e.backgroundColor||l,void
0!==t&&(n.x<t.left||1.01*t.right<n.x||n.y<t.top||1.01*t.bottom<n.y)&&(n.x<t.left?h=(u-n.x)/(t.left-n.x):1.01*t.right<n.x?h=(n.x-u)/(n.x-t.right):n.y<t.top?h=(d-n.y)/(t.top-n.y):1.01*t.bottom<n.y&&(h=(n.y-d)/(n.y-t.bottom)),h=Math.round(100*h)/100,i.strokeStyle=c(i.strokeStyle).alpha(h).rgbString(),i.fillStyle=c(i.fillStyle).alpha(h).rgbString()),r.canvas.drawPoint(i,o,s,u,d))}})},{25:25,26:26,45:45}],39:[function(t,e,n){"use
strict";function i(t){return void 0!==t._view.width}function a(t){var
e,n,a,o,r=t._view;if(i(t)){var
l=r.width/2;e=r.x-l,n=r.x+l,a=Math.min(r.y,r.base),o=Math.max(r.y,r.base)}else{var
s=r.height/2;e=Math.min(r.x,r.base),n=Math.max(r.x,r.base),a=r.y-s,o=r.y+s}return{left:e,top:a,right:n,bottom:o}}var
o=t(25),r=t(26);o._set("global",{elements:{rectangle:{backgroundColor:o.global.defaultColor,borderColor:o.global.defaultColor,borderSkipped:"bottom",borderWidth:0}}}),e.exports=r.extend({draw:function(){function
t(t){return m[(b+t)%4]}var
e,n,i,a,o,r,l,s=this._chart.ctx,u=this._view,d=u.borderWidth;if(u.horizontal?(e=u.base,n=u.x,i=u.y-u.height/2,a=u.y+u.height/2,o=n>e?1:-1,r=1,l=u.borderSkipped||"left"):(e=u.x-u.width/2,n=u.x+u.width/2,i=u.y,o=1,r=(a=u.base)>i?1:-1,l=u.borderSkipped||"bottom"),d){var
c=Math.min(Math.abs(e-n),Math.abs(i-a)),h=(d=d>c?c:d)/2,f=e+("left"!==l?h*o:0),g=n+("right"!==l?-h*o:0),p=i+("top"!==l?h*r:0),v=a+("bottom"!==l?-h*r:0);f!==g&&(i=p,a=v),p!==v&&(e=f,n=g)}s.beginPath(),s.fillStyle=u.backgroundColor,s.strokeStyle=u.borderColor,s.lineWidth=d;var
m=[[e,a],[e,i],[n,i],[n,a]],b=["bottom","left","top","right"].indexOf(l,0);-1===b&&(b=0);var
x=t(0);s.moveTo(x[0],x[1]);for(var
y=1;y<4;y++)x=t(y),s.lineTo(x[0],x[1]);s.fill(),d&&s.stroke()},height:function(){var
t=this._view;return t.base-t.y},inRange:function(t,e){var
n=!1;if(this._view){var
i=a(this);n=t>=i.left&&t<=i.right&&e>=i.top&&e<=i.bottom}return
n},inLabelRange:function(t,e){var n=this;if(!n._view)return!1;var
o=a(n);return
i(n)?t>=o.left&&t<=o.right:e>=o.top&&e<=o.bottom},inXRange:function(t){var
e=a(this);return
t>=e.left&&t<=e.right},inYRange:function(t){var
e=a(this);return
t>=e.top&&t<=e.bottom},getCenterPoint:function(){var
t,e,n=this._view;return
i(this)?(t=n.x,e=(n.y+n.base)/2):(t=(n.x+n.base)/2,e=n.y),{x:t,y:e}},getArea:function(){var
t=this._view;return
t.width*Math.abs(t.y-t.base)},tooltipPosition:function(){var
t=this._view;return{x:t.x,y:t.y}}})},{25:25,26:26}],40:[function(t,e,n){"use
strict";e.exports={},e.exports.Arc=t(36),e.exports.Line=t(37),e.exports.Point=t(38),e.exports.Rectangle=t(39)},{36:36,37:37,38:38,39:39}],41:[function(t,e,n){"use
strict";var
i=t(42),n=e.exports={clear:function(t){t.ctx.clearRect(0,0,t.width,t.height)},roundedRect:function(t,e,n,i,a,o){if(o){var
r=Math.min(o,i/2),l=Math.min(o,a/2);t.moveTo(e+r,n),t.lineTo(e+i-r,n),t.quadraticCurveTo(e+i,n,e+i,n+l),t.lineTo(e+i,n+a-l),t.quadraticCurveTo(e+i,n+a,e+i-r,n+a),t.lineTo(e+r,n+a),t.quadraticCurveTo(e,n+a,e,n+a-l),t.lineTo(e,n+l),t.quadraticCurveTo(e,n,e+r,n)}else
t.rect(e,n,i,a)},drawPoint:function(t,e,n,i,a){var
o,r,l,s,u,d;if("object"!=typeof e||"[object
HTMLImageElement]"!==(o=e.toString())&&"[object
HTMLCanvasElement]"!==o){if(!(isNaN(n)||n<=0)){switch(e){default:t.beginPath(),t.arc(i,a,n,0,2*Math.PI),t.closePath(),t.fill();break;case"triangle":t.beginPath(),u=(r=3*n/Math.sqrt(3))*Math.sqrt(3)/2,t.moveTo(i-r/2,a+u/3),t.lineTo(i+r/2,a+u/3),t.lineTo(i,a-2*u/3),t.closePath(),t.fill();break;case"rect":d=1/Math.SQRT2*n,t.beginPath(),t.fillRect(i-d,a-d,2*d,2*d),t.strokeRect(i-d,a-d,2*d,2*d);break;case"rectRounded":var
c=n/Math.SQRT2,h=i-c,f=a-c,g=Math.SQRT2*n;t.beginPath(),this.roundedRect(t,h,f,g,g,n/2),t.closePath(),t.fill();break;case"rectRot":d=1/Math.SQRT2*n,t.beginPath(),t.moveTo(i-d,a),t.lineTo(i,a+d),t.lineTo(i+d,a),t.lineTo(i,a-d),t.closePath(),t.fill();break;case"cross":t.beginPath(),t.moveTo(i,a+n),t.lineTo(i,a-n),t.moveTo(i-n,a),t.lineTo(i+n,a),t.closePath();break;case"crossRot":t.beginPath(),l=Math.cos(Math.PI/4)*n,s=Math.sin(Math.PI/4)*n,t.moveTo(i-l,a-s),t.lineTo(i+l,a+s),t.moveTo(i-l,a+s),t.lineTo(i+l,a-s),t.closePath();break;case"star":t.beginPath(),t.moveTo(i,a+n),t.lineTo(i,a-n),t.moveTo(i-n,a),t.lineTo(i+n,a),l=Math.cos(Math.PI/4)*n,s=Math.sin(Math.PI/4)*n,t.moveTo(i-l,a-s),t.lineTo(i+l,a+s),t.moveTo(i-l,a+s),t.lineTo(i+l,a-s),t.closePath();break;case"line":t.beginPath(),t.moveTo(i-n,a),t.lineTo(i+n,a),t.closePath();break;case"dash":t.beginPath(),t.moveTo(i,a),t.lineTo(i+n,a),t.closePath()}t.stroke()}}else
t.drawImage(e,i-e.width/2,a-e.height/2,e.width,e.height)},clipArea:function(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()},unclipArea:function(t){t.restore()},lineTo:function(t,e,n,i){if(n.steppedLine)return"after"===n.steppedLine&&!i||"after"!==n.steppedLine&&i?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y),void
t.lineTo(n.x,n.y);n.tension?t.bezierCurveTo(i?e.controlPointPreviousX:e.controlPointNextX,i?e.controlPointPreviousY:e.controlPointNextY,i?n.controlPointNextX:n.controlPointPreviousX,i?n.controlPointNextY:n.controlPointPreviousY,n.x,n.y):t.lineTo(n.x,n.y)}};i.clear=n.clear,i.drawRoundedRectangle=function(t){t.beginPath(),n.roundedRect.apply(n,arguments),t.closePath()}},{42:42}],42:[function(t,e,n){"use
strict";var i={noop:function(){},uid:function(){var t=0;return
function(){return t++}}(),isNullOrUndef:function(t){return null===t||void
0===t},isArray:Array.isArray?Array.isArray:function(t){return"[object
Array]"===Object.prototype.toString.call(t)},isObject:function(t){return
null!==t&&"[object
Object]"===Object.prototype.toString.call(t)},valueOrDefault:function(t,e){return
void 0===t?e:t},valueAtIndexOrDefault:function(t,e,n){return
i.valueOrDefault(i.isArray(t)?t[e]:t,n)},callback:function(t,e,n){if(t&&"function"==typeof
t.call)return t.apply(n,e)},each:function(t,e,n,a){var
o,r,l;if(i.isArray(t))if(r=t.length,a)for(o=r-1;o>=0;o--)e.call(n,t[o],o);else
for(o=0;o<r;o++)e.call(n,t[o],o);else
if(i.isObject(t))for(r=(l=Object.keys(t)).length,o=0;o<r;o++)e.call(n,t[l[o]],l[o])},arrayEquals:function(t,e){var
n,a,o,r;if(!t||!e||t.length!==e.length)return!1;for(n=0,a=t.length;n<a;++n)if(o=t[n],r=e[n],o
instanceof Array&&r instanceof
Array){if(!i.arrayEquals(o,r))return!1}else
if(o!==r)return!1;return!0},clone:function(t){if(i.isArray(t))return
t.map(i.clone);if(i.isObject(t)){for(var
e={},n=Object.keys(t),a=n.length,o=0;o<a;++o)e[n[o]]=i.clone(t[n[o]]);return
e}return t},_merger:function(t,e,n,a){var
o=e[t],r=n[t];i.isObject(o)&&i.isObject(r)?i.merge(o,r,a):e[t]=i.clone(r)},_mergerIf:function(t,e,n){var
a=e[t],o=n[t];i.isObject(a)&&i.isObject(o)?i.mergeIf(a,o):e.hasOwnProperty(t)||(e[t]=i.clone(o))},merge:function(t,e,n){var
a,o,r,l,s,u=i.isArray(e)?e:[e],d=u.length;if(!i.isObject(t))return
t;for(a=(n=n||{}).merger||i._merger,o=0;o<d;++o)if(e=u[o],i.isObject(e))for(s=0,l=(r=Object.keys(e)).length;s<l;++s)a(r[s],t,e,n);return
t},mergeIf:function(t,e){return
i.merge(t,e,{merger:i._mergerIf})}};e.exports=i,i.callCallback=i.callback,i.indexOf=function(t,e,n){return
Array.prototype.indexOf.call(t,e,n)},i.getValueOrDefault=i.valueOrDefault,i.getValueAtIndexOrDefault=i.valueAtIndexOrDefault},{}],43:[function(t,e,n){"use
strict";var i=t(42),a={linear:function(t){return
t},easeInQuad:function(t){return
t*t},easeOutQuad:function(t){return-t*(t-2)},easeInOutQuad:function(t){return(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1)},easeInCubic:function(t){return
t*t*t},easeOutCubic:function(t){return(t-=1)*t*t+1},easeInOutCubic:function(t){return(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},easeInQuart:function(t){return
t*t*t*t},easeOutQuart:function(t){return-((t-=1)*t*t*t-1)},easeInOutQuart:function(t){return(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},easeInQuint:function(t){return
t*t*t*t*t},easeOutQuint:function(t){return(t-=1)*t*t*t*t+1},easeInOutQuint:function(t){return(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},easeInSine:function(t){return
1-Math.cos(t*(Math.PI/2))},easeOutSine:function(t){return
Math.sin(t*(Math.PI/2))},easeInOutSine:function(t){return-.5*(Math.cos(Math.PI*t)-1)},easeInExpo:function(t){return
0===t?0:Math.pow(2,10*(t-1))},easeOutExpo:function(t){return
1===t?1:1-Math.pow(2,-10*t)},easeInOutExpo:function(t){return
0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*--t))},easeInCirc:function(t){return
t>=1?t:-(Math.sqrt(1-t*t)-1)},easeOutCirc:function(t){return
Math.sqrt(1-(t-=1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var
e=1.70158,n=0,i=1;return
0===t?0:1===t?1:(n||(n=.3),i<1?(i=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/i),-i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n))},easeOutElastic:function(t){var
e=1.70158,n=0,i=1;return
0===t?0:1===t?1:(n||(n=.3),i<1?(i=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/i),i*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/n)+1)},easeInOutElastic:function(t){var
e=1.70158,n=0,i=1;return
0===t?0:2==(t/=.5)?1:(n||(n=.45),i<1?(i=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/i),t<1?i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*-.5:i*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*.5+1)},easeInBack:function(t){var
e=1.70158;return t*t*((e+1)*t-e)},easeOutBack:function(t){var
e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack:function(t){var
e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:function(t){return
1-a.easeOutBounce(1-t)},easeOutBounce:function(t){return
t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:function(t){return
t<.5?.5*a.easeInBounce(2*t):.5*a.easeOutBounce(2*t-1)+.5}};e.exports={effects:a},i.easingEffects=a},{42:42}],44:[function(t,e,n){"use
strict";var i=t(42);e.exports={toLineHeight:function(t,e){var
n=(""+t).match(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/);if(!n||"normal"===n[1])return
1.2*e;switch(t=+n[2],n[3]){case"px":return
t;case"%":t/=100}return e*t},toPadding:function(t){var
e,n,a,o;return
i.isObject(t)?(e=+t.top||0,n=+t.right||0,a=+t.bottom||0,o=+t.left||0):e=n=a=o=+t||0,{top:e,right:n,bottom:a,left:o,height:e+a,width:o+n}},resolve:function(t,e,n){var
a,o,r;for(a=0,o=t.length;a<o;++a)if(void 0!==(r=t[a])&&(void
0!==e&&"function"==typeof r&&(r=r(e)),void
0!==n&&i.isArray(r)&&(r=r[n]),void 0!==r))return
r}}},{42:42}],45:[function(t,e,n){"use
strict";e.exports=t(42),e.exports.easing=t(43),e.exports.canvas=t(41),e.exports.options=t(44)},{41:41,42:42,43:43,44:44}],46:[function(t,e,n){e.exports={acquireContext:function(t){return
t&&t.canvas&&(t=t.canvas),t&&t.getContext("2d")||null}}},{}],47:[function(t,e,n){"use
strict";function i(t,e){var
n=v.getStyle(t,e),i=n&&n.match(/^(\d+)(\.\d+)?px$/);return
i?Number(i[1]):void 0}function a(t,e){var
n=t.style,a=t.getAttribute("height"),o=t.getAttribute("width");if(t[m]={initial:{height:a,width:o,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",null===o||""===o){var
r=i(t,"width");void
0!==r&&(t.width=r)}if(null===a||""===a)if(""===t.style.height)t.height=t.width/(e.options.aspectRatio||2);else{var
l=i(t,"height");void 0!==r&&(t.height=l)}return
t}function o(t,e,n){t.addEventListener(e,n,M)}function
r(t,e,n){t.removeEventListener(e,n,M)}function
l(t,e,n,i,a){return{type:t,chart:e,native:a||null,x:void
0!==n?n:null,y:void 0!==i?i:null}}function s(t,e){var
n=w[t.type]||t.type,i=v.getRelativePosition(t,e);return
l(n,e,i.x,i.y,t)}function u(t,e){var n=!1,i=[];return
function(){i=Array.prototype.slice.call(arguments),e=e||this,n||(n=!0,v.requestAnimFrame.call(window,function(){n=!1,t.apply(e,i)}))}}function
d(t){var
e=document.createElement("div"),n=b+"size-monitor",i="position:absolute;left:0;top:0;right:0;bottom:0;overflow:hidden;pointer-events:none;visibility:hidden;z-index:-1;";e.style.cssText=i,e.className=n,e.innerHTML='<div
class="'+n+'-expand"
style="'+i+'"><div
style="position:absolute;width:1000000px;height:1000000px;left:0;top:0"></div></div><div
class="'+n+'-shrink"
style="'+i+'"><div
style="position:absolute;width:200%;height:200%;left:0;
top:0"></div></div>';var
a=e.childNodes[0],r=e.childNodes[1];e._reset=function(){a.scrollLeft=1e6,a.scrollTop=1e6,r.scrollLeft=1e6,r.scrollTop=1e6};var
l=function(){e._reset(),t()};return
o(a,"scroll",l.bind(a,"expand")),o(r,"scroll",l.bind(r,"shrink")),e}function
c(t,e){var
n=(t[m]||(t[m]={})).renderProxy=function(t){t.animationName===y&&e()};v.each(k,function(e){o(t,e,n)}),t.classList.add(x)}function
h(t){var
e=t[m]||{},n=e.renderProxy;n&&(v.each(k,function(e){r(t,e,n)}),delete
e.renderProxy),t.classList.remove(x)}function f(t,e,n){var
i=t[m]||(t[m]={}),a=i.resizer=d(u(function(){if(i.resizer)return
e(l("resize",n))}));c(t,function(){if(i.resizer){var
e=t.parentNode;e&&e!==a.parentNode&&e.insertBefore(a,e.firstChild),a._reset()}})}function
g(t){var e=t[m]||{},n=e.resizer;delete
e.resizer,h(t),n&&n.parentNode&&n.parentNode.removeChild(n)}function
p(t,e){var
n=t._style||document.createElement("style");t._style||(t._style=n,e="/*
Chart.js
*/\n"+e,n.setAttribute("type","text/css"),document.getElementsByTagName("head")[0].appendChild(n)),n.appendChild(document.createTextNode(e))}var
v=t(45),m="$chartjs",b="chartjs-",x=b+"render-monitor",y=b+"render-animation",k=["animationstart","webkitAnimationStart"],w={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},M=!!function(){var
t=!1;try{var
e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("e",null,e)}catch(t){}return
t}()&&{passive:!0};e.exports={_enabled:"undefined"!=typeof
window&&"undefined"!=typeof
document,initialize:function(){var
t="from{opacity:0.99}to{opacity:1}";p(this,"@-webkit-keyframes
"+y+"{"+t+"}@keyframes
"+y+"{"+t+"}."+x+"{-webkit-animation:"+y+"
0.001s;animation:"+y+"
0.001s;}")},acquireContext:function(t,e){"string"==typeof
t?t=document.getElementById(t):t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas);var
n=t&&t.getContext&&t.getContext("2d");return
n&&n.canvas===t?(a(t,e),n):null},releaseContext:function(t){var
e=t.canvas;if(e[m]){var
n=e[m].initial;["height","width"].forEach(function(t){var
i=n[t];v.isNullOrUndef(i)?e.removeAttribute(t):e.setAttribute(t,i)}),v.each(n.style||{},function(t,n){e.style[n]=t}),e.width=e.width,delete
e[m]}},addEventListener:function(t,e,n){var
i=t.canvas;if("resize"!==e){var
a=n[m]||(n[m]={});o(i,e,(a.proxies||(a.proxies={}))[t.id+"_"+e]=function(e){n(s(e,t))})}else
f(i,n,t)},removeEventListener:function(t,e,n){var
i=t.canvas;if("resize"!==e){var
a=((n[m]||{}).proxies||{})[t.id+"_"+e];a&&r(i,e,a)}else
g(i)}},v.addEvent=o,v.removeEvent=r},{45:45}],48:[function(t,e,n){"use
strict";var
i=t(45),a=t(46),o=t(47),r=o._enabled?o:a;e.exports=i.extend({initialize:function(){},acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},r)},{45:45,46:46,47:47}],49:[function(t,e,n){"use
strict";var
i=t(25),a=t(40),o=t(45);i._set("global",{plugins:{filler:{propagate:!0}}}),e.exports=function(){function
t(t,e,n){var i,a=t._model||{},o=a.fill;if(void
0===o&&(o=!!a.backgroundColor),!1===o||null===o)return!1;if(!0===o)return"origin";if(i=parseFloat(o,10),isFinite(i)&&Math.floor(i)===i)return"-"!==o[0]&&"+"!==o[0]||(i=e+i),!(i===e||i<0||i>=n)&&i;switch(o){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return
o;default:return!1}}function e(t){var
e,n=t.el._model||{},i=t.el._scale||{},a=t.fill,o=null;if(isFinite(a))return
null;if("start"===a?o=void
0===n.scaleBottom?i.bottom:n.scaleBottom:"end"===a?o=void
0===n.scaleTop?i.top:n.scaleTop:void
0!==n.scaleZero?o=n.scaleZero:i.getBasePosition?o=i.getBasePosition():i.getBasePixel&&(o=i.getBasePixel()),void
0!==o&&null!==o){if(void 0!==o.x&&void 0!==o.y)return
o;if("number"==typeof o&&isFinite(o))return
e=i.isHorizontal(),{x:e?o:null,y:e?null:o}}return null}function
n(t,e,n){var i,a=t[e].fill,o=[e];if(!n)return
a;for(;!1!==a&&-1===o.indexOf(a);){if(!isFinite(a))return
a;if(!(i=t[a]))return!1;if(i.visible)return
a;o.push(a),a=i.fill}return!1}function r(t){var
e=t.fill,n="dataset";return!1===e?null:(isFinite(e)||(n="boundary"),d[n](t))}function
l(t){return t&&!t.skip}function s(t,e,n,i,a){var
r;if(i&&a){for(t.moveTo(e[0].x,e[0].y),r=1;r<i;++r)o.canvas.lineTo(t,e[r-1],e[r]);for(t.lineTo(n[a-1].x,n[a-1].y),r=a-1;r>0;--r)o.canvas.lineTo(t,n[r],n[r-1],!0)}}function
u(t,e,n,i,a,o){var
r,u,d,c,h,f,g,p=e.length,v=i.spanGaps,m=[],b=[],x=0,y=0;for(t.beginPath(),r=0,u=p+!!o;r<u;++r)h=n(c=e[d=r%p]._view,d,i),f=l(c),g=l(h),f&&g?(x=m.push(c),y=b.push(h)):x&&y&&(v?(f&&m.push(c),g&&b.push(h)):(s(t,m,b,x,y),x=y=0,m=[],b=[]));s(t,m,b,x,y),t.closePath(),t.fillStyle=a,t.fill()}var
d={dataset:function(t){var
e=t.fill,n=t.chart,i=n.getDatasetMeta(e),a=i&&n.isDatasetVisible(e)&&i.dataset._children||[],o=a.length||0;return
o?function(t,e){return
e<o&&a[e]._view||null}:null},boundary:function(t){var
e=t.boundary,n=e?e.x:null,i=e?e.y:null;return
function(t){return{x:null===n?t.x:n,y:null===i?t.y:i}}}};return{id:"filler",afterDatasetsUpdate:function(i,o){var
l,s,u,d,c=(i.data.datasets||[]).length,h=o.propagate,f=[];for(s=0;s<c;++s)d=null,(u=(l=i.getDatasetMeta(s)).dataset)&&u._model&&u
instanceof
a.Line&&(d={visible:i.isDatasetVisible(s),fill:t(u,s,c),chart:i,el:u}),l.$filler=d,f.push(d);for(s=0;s<c;++s)(d=f[s])&&(d.fill=n(f,s,h),d.boundary=e(d),d.mapper=r(d))},beforeDatasetDraw:function(t,e){var
n=e.meta.$filler;if(n){var
a=t.ctx,r=n.el,l=r._view,s=r._children||[],d=n.mapper,c=l.backgroundColor||i.global.defaultColor;d&&c&&s.length&&(o.canvas.clipArea(a,t.chartArea),u(a,s,d,l,c,r._loop),o.canvas.unclipArea(a))}}}}},{25:25,40:40,45:45}],50:[function(t,e,n){"use
strict";var
i=t(25),a=t(26),o=t(45);i._set("global",{legend:{display:!0,position:"top",fullWidth:!0,reverse:!1,weight:1e3,onClick:function(t,e){var
n=e.datasetIndex,i=this.chart,a=i.getDatasetMeta(n);a.hidden=null===a.hidden?!i.data.datasets[n].hidden:null,i.update()},onHover:null,labels:{boxWidth:40,padding:10,generateLabels:function(t){var
e=t.data;return
o.isArray(e.datasets)?e.datasets.map(function(e,n){return{text:e.label,fillStyle:o.isArray(e.backgroundColor)?e.backgroundColor[0]:e.backgroundColor,hidden:!t.isDatasetVisible(n),lineCap:e.borderCapStyle,lineDash:e.borderDash,lineDashOffset:e.borderDashOffset,lineJoin:e.borderJoinStyle,lineWidth:e.borderWidth,strokeStyle:e.borderColor,pointStyle:e.pointStyle,datasetIndex:n}},this):[]}}},legendCallback:function(t){var
e=[];e.push('<ul
class="'+t.id+'-legend">');for(var
n=0;n<t.data.datasets.length;n++)e.push('<li><span
style="background-color:'+t.data.datasets[n].backgroundColor+'"></span>'),t.data.datasets[n].label&&e.push(t.data.datasets[n].label),e.push("</li>");return
e.push("</ul>"),e.join("")}}),e.exports=function(t){function
e(t,e){return t.usePointStyle?e*Math.SQRT2:t.boxWidth}function n(e,n){var
i=new
t.Legend({ctx:e.ctx,options:n,chart:e});r.configure(e,i,n),r.addBox(e,i),e.legend=i}var
r=t.layoutService,l=o.noop;return
t.Legend=a.extend({initialize:function(t){o.extend(this,t),this.legendHitBoxes=[],this.doughnutMode=!1},beforeUpdate:l,update:function(t,e,n){var
i=this;return
i.beforeUpdate(),i.maxWidth=t,i.maxHeight=e,i.margins=n,i.beforeSetDimensions(),i.setDimensions(),i.afterSetDimensions(),i.beforeBuildLabels(),i.buildLabels(),i.afterBuildLabels(),i.beforeFit(),i.fit(),i.afterFit(),i.afterUpdate(),i.minSize},afterUpdate:l,beforeSetDimensions:l,setDimensions:function(){var
t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:l,beforeBuildLabels:l,buildLabels:function(){var
t=this,e=t.options.labels||{},n=o.callback(e.generateLabels,[t.chart],t)||[];e.filter&&(n=n.filter(function(n){return
e.filter(n,t.chart.data)})),t.options.reverse&&n.reverse(),t.legendItems=n},afterBuildLabels:l,beforeFit:l,fit:function(){var
t=this,n=t.options,a=n.labels,r=n.display,l=t.ctx,s=i.global,u=o.valueOrDefault,d=u(a.fontSize,s.defaultFontSize),c=u(a.fontStyle,s.defaultFontStyle),h=u(a.fontFamily,s.defaultFontFamily),f=o.fontString(d,c,h),g=t.legendHitBoxes=[],p=t.minSize,v=t.isHorizontal();if(v?(p.width=t.maxWidth,p.height=r?10:0):(p.width=r?10:0,p.height=t.maxHeight),r)if(l.font=f,v){var
m=t.lineWidths=[0],b=t.legendItems.length?d+a.padding:0;l.textAlign="left",l.textBaseline="top",o.each(t.legendItems,function(n,i){var
o=e(a,d)+d/2+l.measureText(n.text).width;m[m.length-1]+o+a.padding>=t.width&&(b+=d+a.padding,m[m.length]=t.left),g[i]={left:0,top:0,width:o,height:d},m[m.length-1]+=o+a.padding}),p.height+=b}else{var
x=a.padding,y=t.columnWidths=[],k=a.padding,w=0,M=0,S=d+x;o.each(t.legendItems,function(t,n){var
i=e(a,d)+d/2+l.measureText(t.text).width;M+S>p.height&&(k+=w+a.padding,y.push(w),w=0,M=0),w=Math.max(w,i),M+=S,g[n]={left:0,top:0,width:i,height:d}}),k+=w,y.push(w),p.width+=k}t.width=p.width,t.height=p.height},afterFit:l,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var
t=this,n=t.options,a=n.labels,r=i.global,l=r.elements.line,s=t.width,u=t.lineWidths;if(n.display){var
d,c=t.ctx,h=o.valueOrDefault,f=h(a.fontColor,r.defaultFontColor),g=h(a.fontSize,r.defaultFontSize),p=h(a.fontStyle,r.defaultFontStyle),v=h(a.fontFamily,r.defaultFontFamily),m=o.fontString(g,p,v);c.textAlign="left",c.textBaseline="middle",c.lineWidth=.5,c.strokeStyle=f,c.fillStyle=f,c.font=m;var
b=e(a,g),x=t.legendHitBoxes,y=function(t,e,i){if(!(isNaN(b)||b<=0)){c.save(),c.fillStyle=h(i.fillStyle,r.defaultColor),c.lineCap=h(i.lineCap,l.borderCapStyle),c.lineDashOffset=h(i.lineDashOffset,l.borderDashOffset),c.lineJoin=h(i.lineJoin,l.borderJoinStyle),c.lineWidth=h(i.lineWidth,l.borderWidth),c.strokeStyle=h(i.strokeStyle,r.defaultColor);var
a=0===h(i.lineWidth,l.borderWidth);if(c.setLineDash&&c.setLineDash(h(i.lineDash,l.borderDash)),n.labels&&n.labels.usePointStyle){var
s=g*Math.SQRT2/2,u=s/Math.SQRT2,d=t+u,f=e+u;o.canvas.drawPoint(c,i.pointStyle,s,d,f)}else
a||c.strokeRect(t,e,b,g),c.fillRect(t,e,b,g);c.restore()}},k=function(t,e,n,i){var
a=g/2,o=b+a+t,r=e+a;c.fillText(n.text,o,r),n.hidden&&(c.beginPath(),c.lineWidth=2,c.moveTo(o,r),c.lineTo(o+i,r),c.stroke())},w=t.isHorizontal();d=w?{x:t.left+(s-u[0])/2,y:t.top+a.padding,line:0}:{x:t.left+a.padding,y:t.top+a.padding,line:0};var
M=g+a.padding;o.each(t.legendItems,function(e,n){var
i=c.measureText(e.text).width,o=b+g/2+i,r=d.x,l=d.y;w?r+o>=s&&(l=d.y+=M,d.line++,r=d.x=t.left+(s-u[d.line])/2):l+M>t.bottom&&(r=d.x=r+t.columnWidths[d.line]+a.padding,l=d.y=t.top+a.padding,d.line++),y(r,l,e),x[n].left=r,x[n].top=l,k(r,l,e,i),w?d.x+=o+a.padding:d.y+=M})}},handleEvent:function(t){var
e=this,n=e.options,i="mouseup"===t.type?"click":t.type,a=!1;if("mousemove"===i){if(!n.onHover)return}else{if("click"!==i)return;if(!n.onClick)return}var
o=t.x,r=t.y;if(o>=e.left&&o<=e.right&&r>=e.top&&r<=e.bottom)for(var
l=e.legendHitBoxes,s=0;s<l.length;++s){var
u=l[s];if(o>=u.left&&o<=u.left+u.width&&r>=u.top&&r<=u.top+u.height){if("click"===i){n.onClick.call(e,t.native,e.legendItems[s]),a=!0;break}if("mousemove"===i){n.onHover.call(e,t.native,e.legendItems[s]),a=!0;break}}}return
a}}),{id:"legend",beforeInit:function(t){var
e=t.options.legend;e&&n(t,e)},beforeUpdate:function(t){var
e=t.options.legend,a=t.legend;e?(o.mergeIf(e,i.global.legend),a?(r.configure(t,a,e),a.options=e):n(t,e)):a&&(r.removeBox(t,a),delete
t.legend)},afterEvent:function(t,e){var
n=t.legend;n&&n.handleEvent(e)}}}},{25:25,26:26,45:45}],51:[function(t,e,n){"use
strict";var
i=t(25),a=t(26),o=t(45);i._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,lineHeight:1.2,padding:10,position:"top",text:"",weight:2e3}}),e.exports=function(t){function
e(e,i){var a=new
t.Title({ctx:e.ctx,options:i,chart:e});n.configure(e,a,i),n.addBox(e,a),e.titleBlock=a}var
n=t.layoutService,r=o.noop;return
t.Title=a.extend({initialize:function(t){var
e=this;o.extend(e,t),e.legendHitBoxes=[]},beforeUpdate:r,update:function(t,e,n){var
i=this;return
i.beforeUpdate(),i.maxWidth=t,i.maxHeight=e,i.margins=n,i.beforeSetDimensions(),i.setDimensions(),i.afterSetDimensions(),i.beforeBuildLabels(),i.buildLabels(),i.afterBuildLabels(),i.beforeFit(),i.fit(),i.afterFit(),i.afterUpdate(),i.minSize},afterUpdate:r,beforeSetDimensions:r,setDimensions:function(){var
t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:r,beforeBuildLabels:r,buildLabels:r,afterBuildLabels:r,beforeFit:r,fit:function(){var
t=this,e=o.valueOrDefault,n=t.options,a=n.display,r=e(n.fontSize,i.global.defaultFontSize),l=t.minSize,s=o.isArray(n.text)?n.text.length:1,u=o.options.toLineHeight(n.lineHeight,r),d=a?s*u+2*n.padding:0;t.isHorizontal()?(l.width=t.maxWidth,l.height=d):(l.width=d,l.height=t.maxHeight),t.width=l.width,t.height=l.height},afterFit:r,isHorizontal:function(){var
t=this.options.position;return"top"===t||"bottom"===t},draw:function(){var
t=this,e=t.ctx,n=o.valueOrDefault,a=t.options,r=i.global;if(a.display){var
l,s,u,d=n(a.fontSize,r.defaultFontSize),c=n(a.fontStyle,r.defaultFontStyle),h=n(a.fontFamily,r.defaultFontFamily),f=o.fontString(d,c,h),g=o.options.toLineHeight(a.lineHeight,d),p=g/2+a.padding,v=0,m=t.top,b=t.left,x=t.bottom,y=t.right;e.fillStyle=n(a.fontColor,r.defaultFontColor),e.font=f,t.isHorizontal()?(s=b+(y-b)/2,u=m+p,l=y-b):(s="left"===a.position?b+p:y-p,u=m+(x-m)/2,l=x-m,v=Math.PI*("left"===a.position?-.5:.5)),e.save(),e.translate(s,u),e.rotate(v),e.textAlign="center",e.textBaseline="middle";var
k=a.text;if(o.isArray(k))for(var
w=0,M=0;M<k.length;++M)e.fillText(k[M],0,w,l),w+=g;else
e.fillText(k,0,0,l);e.restore()}}}),{id:"title",beforeInit:function(t){var
n=t.options.title;n&&e(t,n)},beforeUpdate:function(a){var
r=a.options.title,l=a.titleBlock;r?(o.mergeIf(r,i.global.title),l?(n.configure(a,l,r),l.options=r):e(a,r)):l&&(t.layoutService.removeBox(a,l),delete
a.titleBlock)}}}},{25:25,26:26,45:45}],52:[function(t,e,n){"use
strict";e.exports=function(t){var
e={position:"bottom"},n=t.Scale.extend({getLabels:function(){var
t=this.chart.data;return
this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels},determineDataLimits:function(){var
t=this,e=t.getLabels();t.minIndex=0,t.maxIndex=e.length-1;var n;void
0!==t.options.ticks.min&&(n=e.indexOf(t.options.ticks.min),t.minIndex=-1!==n?n:t.minIndex),void
0!==t.options.ticks.max&&(n=e.indexOf(t.options.ticks.max),t.maxIndex=-1!==n?n:t.maxIndex),t.min=e[t.minIndex],t.max=e[t.maxIndex]},buildTicks:function(){var
t=this,e=t.getLabels();t.ticks=0===t.minIndex&&t.maxIndex===e.length-1?e:e.slice(t.minIndex,t.maxIndex+1)},getLabelForIndex:function(t,e){var
n=this,i=n.chart.data,a=n.isHorizontal();return
i.yLabels&&!a?n.getRightValue(i.datasets[e].data[t]):n.ticks[t-n.minIndex]},getPixelForValue:function(t,e){var
n,i=this,a=i.options.offset,o=Math.max(i.maxIndex+1-i.minIndex-(a?0:1),1);if(void
0!==t&&null!==t&&(n=i.isHorizontal()?t.x:t.y),void
0!==n||void 0!==t&&isNaN(e)){var r=i.getLabels();t=n||t;var
l=r.indexOf(t);e=-1!==l?l:e}if(i.isHorizontal()){var
s=i.width/o,u=s*(e-i.minIndex);return
a&&(u+=s/2),i.left+Math.round(u)}var
d=i.height/o,c=d*(e-i.minIndex);return
a&&(c+=d/2),i.top+Math.round(c)},getPixelForTick:function(t){return
this.getPixelForValue(this.ticks[t],t+this.minIndex,null)},getValueForPixel:function(t){var
e=this,n=e.options.offset,i=Math.max(e._ticks.length-(n?0:1),1),a=e.isHorizontal(),o=(a?e.width:e.height)/i;return
t-=a?e.left:e.top,n&&(t-=o/2),(t<=0?0:Math.round(t/o))+e.minIndex},getBasePixel:function(){return
this.bottom}});t.scaleService.registerScaleType("category",n,e)}},{}],53:[function(t,e,n){"use
strict";var i=t(25),a=t(45),o=t(34);e.exports=function(t){var
e={position:"left",ticks:{callback:o.formatters.linear}},n=t.LinearScaleBase.extend({determineDataLimits:function(){function
t(t){return r?t.xAxisID===e.id:t.yAxisID===e.id}var
e=this,n=e.options,i=e.chart,o=i.data.datasets,r=e.isHorizontal();e.min=null,e.max=null;var
l=n.stacked;if(void 0===l&&a.each(o,function(e,n){if(!l){var
a=i.getDatasetMeta(n);i.isDatasetVisible(n)&&t(a)&&void
0!==a.stack&&(l=!0)}}),n.stacked||l){var
s={};a.each(o,function(o,r){var l=i.getDatasetMeta(r),u=[l.type,void
0===n.stacked&&void
0===l.stack?r:"",l.stack].join(".");void
0===s[u]&&(s[u]={positiveValues:[],negativeValues:[]});var
d=s[u].positiveValues,c=s[u].negativeValues;i.isDatasetVisible(r)&&t(l)&&a.each(o.data,function(t,i){var
a=+e.getRightValue(t);isNaN(a)||l.data[i].hidden||(d[i]=d[i]||0,c[i]=c[i]||0,n.relativePoints?d[i]=100:a<0?c[i]+=a:d[i]+=a)})}),a.each(s,function(t){var
n=t.positiveValues.concat(t.negativeValues),i=a.min(n),o=a.max(n);e.min=null===e.min?i:Math.min(e.min,i),e.max=null===e.max?o:Math.max(e.max,o)})}else
a.each(o,function(n,o){var
r=i.getDatasetMeta(o);i.isDatasetVisible(o)&&t(r)&&a.each(n.data,function(t,n){var
i=+e.getRightValue(t);isNaN(i)||r.data[n].hidden||(null===e.min?e.min=i:i<e.min&&(e.min=i),null===e.max?e.max=i:i>e.max&&(e.max=i))})});e.min=isFinite(e.min)&&!isNaN(e.min)?e.min:0,e.max=isFinite(e.max)&&!isNaN(e.max)?e.max:1,this.handleTickRangeOptions()},getTickLimit:function(){var
t,e=this,n=e.options.ticks;if(e.isHorizontal())t=Math.min(n.maxTicksLimit?n.maxTicksLimit:11,Math.ceil(e.width/50));else{var
o=a.valueOrDefault(n.fontSize,i.global.defaultFontSize);t=Math.min(n.maxTicksLimit?n.maxTicksLimit:11,Math.ceil(e.height/(2*o)))}return
t},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},getPixelForValue:function(t){var
e,n=this,i=n.start,a=+n.getRightValue(t),o=n.end-i;return
n.isHorizontal()?(e=n.left+n.width/o*(a-i),Math.round(e)):(e=n.bottom-n.height/o*(a-i),Math.round(e))},getValueForPixel:function(t){var
e=this,n=e.isHorizontal(),i=n?e.width:e.height,a=(n?t-e.left:e.bottom-t)/i;return
e.start+(e.end-e.start)*a},getPixelForTick:function(t){return
this.getPixelForValue(this.ticksAsNumbers[t])}});t.scaleService.registerScaleType("linear",n,e)}},{25:25,34:34,45:45}],54:[function(t,e,n){"use
strict";var i=t(45),a=t(34);e.exports=function(t){var
e=i.noop;t.LinearScaleBase=t.Scale.extend({getRightValue:function(e){return"string"==typeof
e?+e:t.Scale.prototype.getRightValue.call(this,e)},handleTickRangeOptions:function(){var
t=this,e=t.options.ticks;if(e.beginAtZero){var
n=i.sign(t.min),a=i.sign(t.max);n<0&&a<0?t.max=0:n>0&&a>0&&(t.min=0)}var
o=void 0!==e.min||void 0!==e.suggestedMin,r=void 0!==e.max||void
0!==e.suggestedMax;void 0!==e.min?t.min=e.min:void
0!==e.suggestedMin&&(null===t.min?t.min=e.suggestedMin:t.min=Math.min(t.min,e.suggestedMin)),void
0!==e.max?t.max=e.max:void
0!==e.suggestedMax&&(null===t.max?t.max=e.suggestedMax:t.max=Math.max(t.max,e.suggestedMax)),o!==r&&t.min>=t.max&&(o?t.max=t.min+1:t.min=t.max-1),t.min===t.max&&(t.max++,e.beginAtZero||t.min--)},getTickLimit:e,handleDirectionalChanges:e,buildTicks:function(){var
t=this,e=t.options.ticks,n=t.getTickLimit(),o={maxTicks:n=Math.max(2,n),min:e.min,max:e.max,stepSize:i.valueOrDefault(e.fixedStepSize,e.stepSize)},r=t.ticks=a.generators.linear(o,t);t.handleDirectionalChanges(),t.max=i.max(r),t.min=i.min(r),e.reverse?(r.reverse(),t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max)},convertTicksToLabels:function(){var
e=this;e.ticksAsNumbers=e.ticks.slice(),e.zeroLineIndex=e.ticks.indexOf(0),t.Scale.prototype.convertTicksToLabels.call(e)}})}},{34:34,45:45}],55:[function(t,e,n){"use
strict";var i=t(45),a=t(34);e.exports=function(t){var
e={position:"left",ticks:{callback:a.formatters.logarithmic}},n=t.Scale.extend({determineDataLimits:function(){function
t(t){return s?t.xAxisID===e.id:t.yAxisID===e.id}var
e=this,n=e.options,a=n.ticks,o=e.chart,r=o.data.datasets,l=i.valueOrDefault,s=e.isHorizontal();e.min=null,e.max=null,e.minNotZero=null;var
u=n.stacked;if(void 0===u&&i.each(r,function(e,n){if(!u){var
i=o.getDatasetMeta(n);o.isDatasetVisible(n)&&t(i)&&void
0!==i.stack&&(u=!0)}}),n.stacked||u){var
d={};i.each(r,function(a,r){var l=o.getDatasetMeta(r),s=[l.type,void
0===n.stacked&&void
0===l.stack?r:"",l.stack].join(".");o.isDatasetVisible(r)&&t(l)&&(void
0===d[s]&&(d[s]=[]),i.each(a.data,function(t,i){var
a=d[s],o=+e.getRightValue(t);isNaN(o)||l.data[i].hidden||(a[i]=a[i]||0,n.relativePoints?a[i]=100:a[i]+=o)}))}),i.each(d,function(t){var
n=i.min(t),a=i.max(t);e.min=null===e.min?n:Math.min(e.min,n),e.max=null===e.max?a:Math.max(e.max,a)})}else
i.each(r,function(n,a){var
r=o.getDatasetMeta(a);o.isDatasetVisible(a)&&t(r)&&i.each(n.data,function(t,n){var
i=+e.getRightValue(t);isNaN(i)||r.data[n].hidden||(null===e.min?e.min=i:i<e.min&&(e.min=i),null===e.max?e.max=i:i>e.max&&(e.max=i),0!==i&&(null===e.minNotZero||i<e.minNotZero)&&(e.minNotZero=i))})});e.min=l(a.min,e.min),e.max=l(a.max,e.max),e.min===e.max&&(0!==e.min&&null!==e.min?(e.min=Math.pow(10,Math.floor(i.log10(e.min))-1),e.max=Math.pow(10,Math.floor(i.log10(e.max))+1)):(e.min=1,e.max=10))},buildTicks:function(){var
t=this,e=t.options.ticks,n={min:e.min,max:e.max},o=t.ticks=a.generators.logarithmic(n,t);t.isHorizontal()||o.reverse(),t.max=i.max(o),t.min=i.min(o),e.reverse?(o.reverse(),t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max)},convertTicksToLabels:function(){this.tickValues=this.ticks.slice(),t.Scale.prototype.convertTicksToLabels.call(this)},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},getPixelForTick:function(t){return
this.getPixelForValue(this.tickValues[t])},getPixelForValue:function(t){var
e,n,a,o=this,r=o.start,l=+o.getRightValue(t),s=o.options.ticks;return
o.isHorizontal()?(a=i.log10(o.end)-i.log10(r),0===l?n=o.left:(e=o.width,n=o.left+e/a*(i.log10(l)-i.log10(r)))):(e=o.height,0!==r||s.reverse?0===o.end&&s.reverse?(a=i.log10(o.start)-i.log10(o.minNotZero),n=l===o.end?o.top:l===o.minNotZero?o.top+.02*e:o.top+.02*e+.98*e/a*(i.log10(l)-i.log10(o.minNotZero))):0===l?n=s.reverse?o.top:o.bottom:(a=i.log10(o.end)-i.log10(r),e=o.height,n=o.bottom-e/a*(i.log10(l)-i.log10(r))):(a=i.log10(o.end)-i.log10(o.minNotZero),n=l===r?o.bottom:l===o.minNotZero?o.bottom-.02*e:o.bottom-.02*e-.98*e/a*(i.log10(l)-i.log10(o.minNotZero)))),n},getValueForPixel:function(t){var
e,n,a=this,o=i.log10(a.end)-i.log10(a.start);return
a.isHorizontal()?(n=a.width,e=a.start*Math.pow(10,(t-a.left)*o/n)):(n=a.height,e=Math.pow(10,(a.bottom-t)*o/n)/a.start),e}});t.scaleService.registerScaleType("logarithmic",n,e)}},{34:34,45:45}],56:[function(t,e,n){"use
strict";var i=t(25),a=t(45),o=t(34);e.exports=function(t){function
e(t){var e=t.options;return
e.angleLines.display||e.pointLabels.display?t.chart.data.labels.length:0}function
n(t){var
e=t.options.pointLabels,n=a.valueOrDefault(e.fontSize,v.defaultFontSize),i=a.valueOrDefault(e.fontStyle,v.defaultFontStyle),o=a.valueOrDefault(e.fontFamily,v.defaultFontFamily);return{size:n,style:i,family:o,font:a.fontString(n,i,o)}}function
r(t,e,n){return
a.isArray(n)?{w:a.longestText(t,t.font,n),h:n.length*e+1.5*(n.length-1)*e}:{w:t.measureText(n).width,h:e}}function
l(t,e,n,i,a){return
t===i||t===a?{start:e-n/2,end:e+n/2}:t<i||t>a?{start:e-n-5,end:e}:{start:e,end:e+n+5}}function
s(t){var
i,o,s,u=n(t),d=Math.min(t.height/2,t.width/2),c={r:t.width,l:0,t:t.height,b:0},h={};t.ctx.font=u.font,t._pointLabelSizes=[];var
f=e(t);for(i=0;i<f;i++){s=t.getPointPosition(i,d),o=r(t.ctx,u.size,t.pointLabels[i]||""),t._pointLabelSizes[i]=o;var
g=t.getIndexAngle(i),p=a.toDegrees(g)%360,v=l(p,s.x,o.w,0,180),m=l(p,s.y,o.h,90,270);v.start<c.l&&(c.l=v.start,h.l=g),v.end>c.r&&(c.r=v.end,h.r=g),m.start<c.t&&(c.t=m.start,h.t=g),m.end>c.b&&(c.b=m.end,h.b=g)}t.setReductions(d,c,h)}function
u(t){var
e=Math.min(t.height/2,t.width/2);t.drawingArea=Math.round(e),t.setCenterPoint(0,0,0,0)}function
d(t){return
0===t||180===t?"center":t<180?"left":"right"}function
c(t,e,n,i){if(a.isArray(e))for(var
o=n.y,r=1.5*i,l=0;l<e.length;++l)t.fillText(e[l],n.x,o),o+=r;else
t.fillText(e,n.x,n.y)}function
h(t,e,n){90===t||270===t?n.y-=e.h/2:(t>270||t<90)&&(n.y-=e.h)}function
f(t){var
i=t.ctx,o=a.valueOrDefault,r=t.options,l=r.angleLines,s=r.pointLabels;i.lineWidth=l.lineWidth,i.strokeStyle=l.color;var
u=t.getDistanceFromCenterForValue(r.ticks.reverse?t.min:t.max),f=n(t);i.textBaseline="top";for(var
g=e(t)-1;g>=0;g--){if(l.display){var
p=t.getPointPosition(g,u);i.beginPath(),i.moveTo(t.xCenter,t.yCenter),i.lineTo(p.x,p.y),i.stroke(),i.closePath()}if(s.display){var
m=t.getPointPosition(g,u+5),b=o(s.fontColor,v.defaultFontColor);i.font=f.font,i.fillStyle=b;var
x=t.getIndexAngle(g),y=a.toDegrees(x);i.textAlign=d(y),h(y,t._pointLabelSizes[g],m),c(i,t.pointLabels[g]||"",m,f.size)}}}function
g(t,n,i,o){var
r=t.ctx;if(r.strokeStyle=a.valueAtIndexOrDefault(n.color,o-1),r.lineWidth=a.valueAtIndexOrDefault(n.lineWidth,o-1),t.options.gridLines.circular)r.beginPath(),r.arc(t.xCenter,t.yCenter,i,0,2*Math.PI),r.closePath(),r.stroke();else{var
l=e(t);if(0===l)return;r.beginPath();var
s=t.getPointPosition(0,i);r.moveTo(s.x,s.y);for(var
u=1;u<l;u++)s=t.getPointPosition(u,i),r.lineTo(s.x,s.y);r.closePath(),r.stroke()}}function
p(t){return a.isNumber(t)?t:0}var
v=i.global,m={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,color:"rgba(0,
0, 0,
0.1)",lineWidth:1},gridLines:{circular:!1},ticks:{showLabelBackdrop:!0,backdropColor:"rgba(255,255,255,0.75)",backdropPaddingY:2,backdropPaddingX:2,callback:o.formatters.linear},pointLabels:{display:!0,fontSize:10,callback:function(t){return
t}}},b=t.LinearScaleBase.extend({setDimensions:function(){var
t=this,e=t.options,n=e.ticks;t.width=t.maxWidth,t.height=t.maxHeight,t.xCenter=Math.round(t.width/2),t.yCenter=Math.round(t.height/2);var
i=a.min([t.height,t.width]),o=a.valueOrDefault(n.fontSize,v.defaultFontSize);t.drawingArea=e.display?i/2-(o/2+n.backdropPaddingY):i/2},determineDataLimits:function(){var
t=this,e=t.chart,n=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;a.each(e.data.datasets,function(o,r){if(e.isDatasetVisible(r)){var
l=e.getDatasetMeta(r);a.each(o.data,function(e,a){var
o=+t.getRightValue(e);isNaN(o)||l.data[a].hidden||(n=Math.min(o,n),i=Math.max(o,i))})}}),t.min=n===Number.POSITIVE_INFINITY?0:n,t.max=i===Number.NEGATIVE_INFINITY?0:i,t.handleTickRangeOptions()},getTickLimit:function(){var
t=this.options.ticks,e=a.valueOrDefault(t.fontSize,v.defaultFontSize);return
Math.min(t.maxTicksLimit?t.maxTicksLimit:11,Math.ceil(this.drawingArea/(1.5*e)))},convertTicksToLabels:function(){var
e=this;t.LinearScaleBase.prototype.convertTicksToLabels.call(e),e.pointLabels=e.chart.data.labels.map(e.options.pointLabels.callback,e)},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},fit:function(){this.options.pointLabels.display?s(this):u(this)},setReductions:function(t,e,n){var
i=this,a=e.l/Math.sin(n.l),o=Math.max(e.r-i.width,0)/Math.sin(n.r),r=-e.t/Math.cos(n.t),l=-Math.max(e.b-i.height,0)/Math.cos(n.b);a=p(a),o=p(o),r=p(r),l=p(l),i.drawingArea=Math.min(Math.round(t-(a+o)/2),Math.round(t-(r+l)/2)),i.setCenterPoint(a,o,r,l)},setCenterPoint:function(t,e,n,i){var
a=this,o=a.width-e-a.drawingArea,r=t+a.drawingArea,l=n+a.drawingArea,s=a.height-i-a.drawingArea;a.xCenter=Math.round((r+o)/2+a.left),a.yCenter=Math.round((l+s)/2+a.top)},getIndexAngle:function(t){return
t*(2*Math.PI/e(this))+(this.chart.options&&this.chart.options.startAngle?this.chart.options.startAngle:0)*Math.PI*2/360},getDistanceFromCenterForValue:function(t){var
e=this;if(null===t)return 0;var n=e.drawingArea/(e.max-e.min);return
e.options.ticks.reverse?(e.max-t)*n:(t-e.min)*n},getPointPosition:function(t,e){var
n=this,i=n.getIndexAngle(t)-Math.PI/2;return{x:Math.round(Math.cos(i)*e)+n.xCenter,y:Math.round(Math.sin(i)*e)+n.yCenter}},getPointPositionForValue:function(t,e){return
this.getPointPosition(t,this.getDistanceFromCenterForValue(e))},getBasePosition:function(){var
t=this,e=t.min,n=t.max;return
t.getPointPositionForValue(0,t.beginAtZero?0:e<0&&n<0?n:e>0&&n>0?e:0)},draw:function(){var
t=this,e=t.options,n=e.gridLines,i=e.ticks,o=a.valueOrDefault;if(e.display){var
r=t.ctx,l=this.getIndexAngle(0),s=o(i.fontSize,v.defaultFontSize),u=o(i.fontStyle,v.defaultFontStyle),d=o(i.fontFamily,v.defaultFontFamily),c=a.fontString(s,u,d);a.each(t.ticks,function(e,a){if(a>0||i.reverse){var
u=t.getDistanceFromCenterForValue(t.ticksAsNumbers[a]);if(n.display&&0!==a&&g(t,n,u,a),i.display){var
d=o(i.fontColor,v.defaultFontColor);if(r.font=c,r.save(),r.translate(t.xCenter,t.yCenter),r.rotate(l),i.showLabelBackdrop){var
h=r.measureText(e).width;r.fillStyle=i.backdropColor,r.fillRect(-h/2-i.backdropPaddingX,-u-s/2-i.backdropPaddingY,h+2*i.backdropPaddingX,s+2*i.backdropPaddingY)}r.textAlign="center",r.textBaseline="middle",r.fillStyle=d,r.fillText(e,0,-u),r.restore()}}}),(e.angleLines.display||e.pointLabels.display)&&f(t)}}});t.scaleService.registerScaleType("radialLinear",b,m)}},{25:25,34:34,45:45}],57:[function(t,e,n){"use
strict";function i(t,e){return t-e}function a(t){var
e,n,i,a={},o=[];for(e=0,n=t.length;e<n;++e)a[i=t[e]]||(a[i]=!0,o.push(i));return
o}function
o(t,e,n,i){if("linear"===i||!t.length)return[{time:e,pos:0},{time:n,pos:1}];var
a,o,r,l,s,u=[],d=[e];for(a=0,o=t.length;a<o;++a)(l=t[a])>e&&l<n&&d.push(l);for(d.push(n),a=0,o=d.length;a<o;++a)s=d[a+1],r=d[a-1],l=d[a],void
0!==r&&void
0!==s&&Math.round((s+r)/2)===l||u.push({time:l,pos:a/(o-1)});return
u}function r(t,e,n){for(var
i,a,o,r=0,l=t.length-1;r>=0&&r<=l;){if(i=r+l>>1,a=t[i-1]||null,o=t[i],!a)return{lo:null,hi:o};if(o[e]<n)r=i+1;else{if(!(a[e]>n))return{lo:a,hi:o};l=i-1}}return{lo:o,hi:null}}function
l(t,e,n,i){var
a=r(t,e,n),o=a.lo?a.hi?a.lo:t[t.length-2]:t[0],l=a.lo?a.hi?a.hi:t[t.length-1]:t[1],s=l[e]-o[e],u=s?(n-o[e])/s:0,d=(l[i]-o[i])*u;return
o[i]+d}function s(t,e){var
n=e.parser,i=e.parser||e.format;return"function"==typeof
n?n(t):"string"==typeof t&&"string"==typeof
i?v(t,i):(t instanceof
v||(t=v(t)),t.isValid()?t:"function"==typeof i?i(t):t)}function
u(t,e){if(b.isNullOrUndef(t))return null;var
n=e.options.time,i=s(e.getRightValue(t),n);return
i.isValid()?(n.round&&i.startOf(n.round),i.valueOf()):null}function
d(t,e,n,i){var a,o,r,l=e-t,s=k[n],u=s.size,d=s.steps;if(!d)return
Math.ceil(l/((i||1)*u));for(a=0,o=d.length;a<o&&(r=d[a],!(Math.ceil(l/(u*r))<=i));++a);return
r}function c(t,e,n,i){var
a,o,r,l=w.length;for(a=w.indexOf(t);a<l-1;++a)if(o=k[w[a]],r=o.steps?o.steps[o.steps.length-1]:y,Math.ceil((n-e)/(r*o.size))<=i)return
w[a];return w[l-1]}function h(t){for(var
e=w.indexOf(t)+1,n=w.length;e<n;++e)if(k[w[e]].major)return
w[e]}function f(t,e,n,i,a,o){var
r,l=o.time,s=b.valueOrDefault(l.stepSize,l.unitStepSize),u="week"===n&&l.isoWeekday,c=o.ticks.major.enabled,h=k[n],f=v(t),g=v(e),p=[];for(s||(s=d(t,e,n,a)),u&&(f=f.isoWeekday(u),g=g.isoWeekday(u)),f=f.startOf(u?"day":n),(g=g.startOf(u?"day":n))<e&&g.add(1,n),r=v(f),c&&i&&!u&&!l.round&&(r.startOf(i),r.add(~~((f-r)/(h.size*s))*s,n));r<g;r.add(s,n))p.push(+r);return
p.push(+r),p}function g(t,e,n,i,a){var o,r,s=0,u=0;return
a.offset&&e.length&&(a.time.min||(o=e.length>1?e[1]:i,r=e[0],s=(l(t,"time",o,"pos")-l(t,"time",r,"pos"))/2),a.time.max||(o=e[e.length-1],r=e.length>1?e[e.length-2]:n,u=(l(t,"time",o,"pos")-l(t,"time",r,"pos"))/2)),{left:s,right:u}}function
p(t,e){var
n,i,a,o,r=[];for(n=0,i=t.length;n<i;++n)a=t[n],o=!!e&&a===+v(a).startOf(e),r.push({value:a,major:o});return
r}var v=t(1);v="function"==typeof v?v:window.moment;var
m=t(25),b=t(45),x=Number.MIN_SAFE_INTEGER||-9007199254740991,y=Number.MAX_SAFE_INTEGER||9007199254740991,k={millisecond:{major:!0,size:1,steps:[1,2,5,10,20,50,100,250,500]},second:{major:!0,size:1e3,steps:[1,2,5,10,30]},minute:{major:!0,size:6e4,steps:[1,2,5,10,30]},hour:{major:!0,size:36e5,steps:[1,2,3,6,12]},day:{major:!0,size:864e5,steps:[1,2,5]},week:{major:!1,size:6048e5,steps:[1,2,3,4]},month:{major:!0,size:2628e6,steps:[1,2,3]},quarter:{major:!1,size:7884e6,steps:[1,2,3,4]},year:{major:!0,size:3154e7}},w=Object.keys(k);e.exports=function(t){var
e={position:"bottom",distribution:"linear",bounds:"data",time:{parser:!1,format:!1,unit:!1,round:!1,displayFormat:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{millisecond:"h:mm:ss.SSS
a",second:"h:mm:ss a",minute:"h:mm
a",hour:"hA",day:"MMM
D",week:"ll",month:"MMM YYYY",quarter:"[Q]Q -
YYYY",year:"YYYY"}},ticks:{autoSkip:!1,source:"auto",major:{enabled:!1}}},n=t.Scale.extend({initialize:function(){if(!v)throw
new Error("Chart.js - Moment.js could not be found! You must include
it before Chart.js to use the time scale. Download at
https://momentjs.com");this.mergeTicksOptions(),t.Scale.prototype.initialize.call(this)},update:function(){var
e=this,n=e.options;return
n.time&&n.time.format&&console.warn("options.time.format
is deprecated and replaced by
options.time.parser."),t.Scale.prototype.update.apply(e,arguments)},getRightValue:function(e){return
e&&void
0!==e.t&&(e=e.t),t.Scale.prototype.getRightValue.call(this,e)},determineDataLimits:function(){var
t,e,n,o,r,l,s=this,d=s.chart,c=s.options.time,h=u(c.min,s)||y,f=u(c.max,s)||x,g=[],p=[],m=[];for(t=0,n=d.data.labels.length;t<n;++t)m.push(u(d.data.labels[t],s));for(t=0,n=(d.data.datasets||[]).length;t<n;++t)if(d.isDatasetVisible(t))if(r=d.data.datasets[t].data,b.isObject(r[0]))for(p[t]=[],e=0,o=r.length;e<o;++e)l=u(r[e],s),g.push(l),p[t][e]=l;else
g.push.apply(g,m),p[t]=m.slice(0);else
p[t]=[];m.length&&(m=a(m).sort(i),h=Math.min(h,m[0]),f=Math.max(f,m[m.length-1])),g.length&&(g=a(g).sort(i),h=Math.min(h,g[0]),f=Math.max(f,g[g.length-1])),h=h===y?+v().startOf("day"):h,f=f===x?+v().endOf("day")+1:f,s.min=Math.min(h,f),s.max=Math.max(h+1,f),s._horizontal=s.isHorizontal(),s._table=[],s._timestamps={data:g,datasets:p,labels:m}},buildTicks:function(){var
t,e,n,i=this,a=i.min,r=i.max,l=i.options,s=l.time,d=s.displayFormats,v=i.getLabelCapacity(a),m=s.unit||c(s.minUnit,a,r,v),b=h(m),x=[],y=[];switch(l.ticks.source){case"data":x=i._timestamps.data;break;case"labels":x=i._timestamps.labels;break;case"auto":default:x=f(a,r,m,b,v,l)}for("ticks"===l.bounds&&x.length&&(a=x[0],r=x[x.length-1]),a=u(s.min,i)||a,r=u(s.max,i)||r,t=0,e=x.length;t<e;++t)(n=x[t])>=a&&n<=r&&y.push(n);return
i.min=a,i.max=r,i._unit=m,i._majorUnit=b,i._minorFormat=d[m],i._majorFormat=d[b],i._table=o(i._timestamps.data,a,r,l.distribution),i._offsets=g(i._table,y,a,r,l),p(y,b)},getLabelForIndex:function(t,e){var
n=this,i=n.chart.data,a=n.options.time,o=i.labels&&t<i.labels.length?i.labels[t]:"",r=i.datasets[e].data[t];return
b.isObject(r)&&(o=n.getRightValue(r)),a.tooltipFormat&&(o=s(o,a).format(a.tooltipFormat)),o},tickFormatFunction:function(t,e,n){var
i=this,a=i.options,o=t.valueOf(),r=i._majorUnit,l=i._majorFormat,s=t.clone().startOf(i._majorUnit).valueOf(),u=a.ticks.major,d=u.enabled&&r&&l&&o===s,c=t.format(d?l:i._minorFormat),h=d?u:a.ticks.minor,f=b.valueOrDefault(h.callback,h.userCallback);return
f?f(c,e,n):c},convertTicksToLabels:function(t){var
e,n,i=[];for(e=0,n=t.length;e<n;++e)i.push(this.tickFormatFunction(v(t[e].value),e,t));return
i},getPixelForOffset:function(t){var
e=this,n=e._horizontal?e.width:e.height,i=e._horizontal?e.left:e.top,a=l(e._table,"time",t,"pos");return
i+n*(e._offsets.left+a)/(e._offsets.left+1+e._offsets.right)},getPixelForValue:function(t,e,n){var
i=this,a=null;if(void 0!==e&&void
0!==n&&(a=i._timestamps.datasets[n][e]),null===a&&(a=u(t,i)),null!==a)return
i.getPixelForOffset(a)},getPixelForTick:function(t){var
e=this.getTicks();return
t>=0&&t<e.length?this.getPixelForOffset(e[t].value):null},getValueForPixel:function(t){var
e=this,n=e._horizontal?e.width:e.height,i=e._horizontal?e.left:e.top,a=(n?(t-i)/n:0)*(e._offsets.left+1+e._offsets.left)-e._offsets.right,o=l(e._table,"pos",a,"time");return
v(o)},getLabelWidth:function(t){var
e=this,n=e.options.ticks,i=e.ctx.measureText(t).width,a=b.toRadians(n.maxRotation),o=Math.cos(a),r=Math.sin(a);return
i*o+b.valueOrDefault(n.fontSize,m.global.defaultFontSize)*r},getLabelCapacity:function(t){var
e=this;e._minorFormat=e.options.time.displayFormats.millisecond;var
n=e.tickFormatFunction(v(t),0,[]),i=e.getLabelWidth(n),a=e.isHorizontal()?e.width:e.height;return
Math.floor(a/i)}});t.scaleService.registerScaleType("time",n,e)}},{1:1,25:25,45:45}]},{},[7])(7)});cookies.min.js000064400000005252151171634130007326
0ustar00(function(d,f){"use strict";var
h=function(d){if("object"!==typeof d.document)throw
Error("Cookies.js requires a `window` with a `document`
object");var b=function(a,e,c){return
1===arguments.length?b.get(a):b.set(a,e,c)};b._document=d.document;b._cacheKeyPrefix="cookey.";b._maxExpireDate=new
Date("Fri, 31 Dec 9999 23:59:59
UTC");b.defaults={path:"/",secure:!1};b.get=function(a){b._cachedDocumentCookie!==b._document.cookie&&b._renewCache();a=b._cache[b._cacheKeyPrefix+a];return
a===f?f:decodeURIComponent(a)};
b.set=function(a,e,c){c=b._getExtendedOptions(c);c.expires=b._getExpiresDate(e===f?-1:c.expires);b._document.cookie=b._generateCookieString(a,e,c);return
b};b.expire=function(a,e){return
b.set(a,f,e)};b._getExtendedOptions=function(a){return{path:a&&a.path||b.defaults.path,domain:a&&a.domain||b.defaults.domain,expires:a&&a.expires||b.defaults.expires,secure:a&&a.secure!==f?a.secure:b.defaults.secure}};b._isValidDate=function(a){return"[object
Date]"===Object.prototype.toString.call(a)&&!isNaN(a.getTime())};
b._getExpiresDate=function(a,e){e=e||new Date;"number"===typeof
a?a=Infinity===a?b._maxExpireDate:new
Date(e.getTime()+1E3*a):"string"===typeof a&&(a=new
Date(a));if(a&&!b._isValidDate(a))throw Error("`expires`
parameter cannot be converted to a valid Date instance");return
a};b._generateCookieString=function(a,b,c){a=a.replace(/[^#$&+\^`|]/g,encodeURIComponent);a=a.replace(/\(/g,"%28").replace(/\)/g,"%29");b=(b+"").replace(/[^!#$&-+\--:<-\[\]-~]/g,encodeURIComponent);c=c||{};a=a+"="+b+(c.path?";path="+
c.path:"");a+=c.domain?";domain="+c.domain:"";a+=c.expires?";expires="+c.expires.toUTCString():"";return
a+=c.secure?";secure":""};b._getCacheFromString=function(a){var
e={};a=a?a.split("; "):[];for(var c=0;c<a.length;c++){var
d=b._getKeyValuePairFromCookieString(a[c]);e[b._cacheKeyPrefix+d.key]===f&&(e[b._cacheKeyPrefix+d.key]=d.value)}return
e};b._getKeyValuePairFromCookieString=function(a){var
b=a.indexOf("="),b=0>b?a.length:b,c=a.substr(0,b),d;try{d=decodeURIComponent(c)}catch(k){console&&"function"===
typeof console.error&&console.error('Could not decode cookie
with key
"'+c+'"',k)}return{key:d,value:a.substr(b+1)}};b._renewCache=function(){b._cache=b._getCacheFromString(b._document.cookie);b._cachedDocumentCookie=b._document.cookie};b._areEnabled=function(){var
a="1"===b.set("cookies.js",1).get("cookies.js");b.expire("cookies.js");return
a};b.enabled=b._areEnabled();return
b},g=d&&"object"===typeof
d.document?h(d):h;"function"===typeof
define&&define.amd?define(function(){return
g}):"object"===
typeof exports?("object"===typeof
module&&"object"===typeof
module.exports&&(exports=module.exports=g),exports.Cookies=g):d.Cookies=g})("undefined"===typeof
window?this:window);mustache.min.js000064400000022470151171634130007504
0ustar00(function defineMustache(global,factory){if(typeof
exports==="object"&&exports&&typeof
exports.nodeName!=="string"){factory(exports)}else if(typeof
define==="function"&&define.amd){define(["exports"],factory)}else{global.Mustache={};factory(global.Mustache)}})(this,function
mustacheFactory(mustache){var objectToString=Object.prototype.toString;var
isArray=Array.isArray||function isArrayPolyfill(object){return
objectToString.call(object)==="[object Array]"};function
isFunction(object){return typeof object==="function"}function
typeStr(obj){return isArray(obj)?"array":typeof obj}function
escapeRegExp(string){return
string.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function
hasProperty(obj,propName){return obj!=null&&typeof
obj==="object"&&propName in obj}var
regExpTest=RegExp.prototype.test;function testRegExp(re,string){return
regExpTest.call(re,string)}var nonSpaceRe=/\S/;function
isWhitespace(string){return!testRegExp(nonSpaceRe,string)}var
entityMap={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};function
escapeHtml(string){return
String(string).replace(/[&<>"'`=\/]/g,function
fromEntityMap(s){return entityMap[s]})}var whiteRe=/\s*/;var
spaceRe=/\s+/;var equalsRe=/\s*=/;var curlyRe=/\s*\}/;var
tagRe=/#|\^|\/|>|\{|&|=|!/;function
parseTemplate(template,tags){if(!template)return[];var sections=[];var
tokens=[];var spaces=[];var hasTag=false;var nonSpace=false;function
stripSpace(){if(hasTag&&!nonSpace){while(spaces.length)delete
tokens[spaces.pop()]}else{spaces=[]}hasTag=false;nonSpace=false}var
openingTagRe,closingTagRe,closingCurlyRe;function
compileTags(tagsToCompile){if(typeof
tagsToCompile==="string")tagsToCompile=tagsToCompile.split(spaceRe,2);if(!isArray(tagsToCompile)||tagsToCompile.length!==2)throw
new Error("Invalid tags: "+tagsToCompile);openingTagRe=new
RegExp(escapeRegExp(tagsToCompile[0])+"\\s*");closingTagRe=new
RegExp("\\s*"+escapeRegExp(tagsToCompile[1]));closingCurlyRe=new
RegExp("\\s*"+escapeRegExp("}"+tagsToCompile[1]))}compileTags(tags||mustache.tags);var
scanner=new Scanner(template);var
start,type,value,chr,token,openSection;while(!scanner.eos()){start=scanner.pos;value=scanner.scanUntil(openingTagRe);if(value){for(var
i=0,valueLength=value.length;i<valueLength;++i){chr=value.charAt(i);if(isWhitespace(chr)){spaces.push(tokens.length)}else{nonSpace=true}tokens.push(["text",chr,start,start+1]);start+=1;if(chr==="\n")stripSpace()}}if(!scanner.scan(openingTagRe))break;hasTag=true;type=scanner.scan(tagRe)||"name";scanner.scan(whiteRe);if(type==="="){value=scanner.scanUntil(equalsRe);scanner.scan(equalsRe);scanner.scanUntil(closingTagRe)}else
if(type==="{"){value=scanner.scanUntil(closingCurlyRe);scanner.scan(curlyRe);scanner.scanUntil(closingTagRe);type="&"}else{value=scanner.scanUntil(closingTagRe)}if(!scanner.scan(closingTagRe))throw
new Error("Unclosed tag at
"+scanner.pos);token=[type,value,start,scanner.pos];tokens.push(token);if(type==="#"||type==="^"){sections.push(token)}else
if(type==="/"){openSection=sections.pop();if(!openSection)throw
new Error('Unopened section "'+value+'" at
'+start);if(openSection[1]!==value)throw new Error('Unclosed
section "'+openSection[1]+'" at '+start)}else
if(type==="name"||type==="{"||type==="&"){nonSpace=true}else
if(type==="="){compileTags(value)}}openSection=sections.pop();if(openSection)throw
new Error('Unclosed section "'+openSection[1]+'"
at '+scanner.pos);return nestTokens(squashTokens(tokens))}function
squashTokens(tokens){var squashedTokens=[];var token,lastToken;for(var
i=0,numTokens=tokens.length;i<numTokens;++i){token=tokens[i];if(token){if(token[0]==="text"&&lastToken&&lastToken[0]==="text"){lastToken[1]+=token[1];lastToken[3]=token[3]}else{squashedTokens.push(token);lastToken=token}}}return
squashedTokens}function nestTokens(tokens){var nestedTokens=[];var
collector=nestedTokens;var sections=[];var token,section;for(var
i=0,numTokens=tokens.length;i<numTokens;++i){token=tokens[i];switch(token[0]){case"#":case"^":collector.push(token);sections.push(token);collector=token[4]=[];break;case"/":section=sections.pop();section[5]=token[2];collector=sections.length>0?sections[sections.length-1][4]:nestedTokens;break;default:collector.push(token)}}return
nestedTokens}function
Scanner(string){this.string=string;this.tail=string;this.pos=0}Scanner.prototype.eos=function
eos(){return this.tail===""};Scanner.prototype.scan=function
scan(re){var
match=this.tail.match(re);if(!match||match.index!==0)return"";var
string=match[0];this.tail=this.tail.substring(string.length);this.pos+=string.length;return
string};Scanner.prototype.scanUntil=function scanUntil(re){var
index=this.tail.search(re),match;switch(index){case-1:match=this.tail;this.tail="";break;case
0:match="";break;default:match=this.tail.substring(0,index);this.tail=this.tail.substring(index)}this.pos+=match.length;return
match};function
Context(view,parentContext){this.view=view;this.cache={".":this.view};this.parent=parentContext}Context.prototype.push=function
push(view){return new Context(view,this)};Context.prototype.lookup=function
lookup(name){var cache=this.cache;var
value;if(cache.hasOwnProperty(name)){value=cache[name]}else{var
context=this,names,index,lookupHit=false;while(context){if(name.indexOf(".")>0){value=context.view;names=name.split(".");index=0;while(value!=null&&index<names.length){if(index===names.length-1)lookupHit=hasProperty(value,names[index]);value=value[names[index++]]}}else{value=context.view[name];lookupHit=hasProperty(context.view,name)}if(lookupHit)break;context=context.parent}cache[name]=value}if(isFunction(value))value=value.call(this.view);return
value};function Writer(){this.cache={}}Writer.prototype.clearCache=function
clearCache(){this.cache={}};Writer.prototype.parse=function
parse(template,tags){var cache=this.cache;var
tokens=cache[template];if(tokens==null)tokens=cache[template]=parseTemplate(template,tags);return
tokens};Writer.prototype.render=function render(template,view,partials){var
tokens=this.parse(template);var context=view instanceof Context?view:new
Context(view);return
this.renderTokens(tokens,context,partials,template)};Writer.prototype.renderTokens=function
renderTokens(tokens,context,partials,originalTemplate){var
buffer="";var token,symbol,value;for(var
i=0,numTokens=tokens.length;i<numTokens;++i){value=undefined;token=tokens[i];symbol=token[0];if(symbol==="#")value=this.renderSection(token,context,partials,originalTemplate);else
if(symbol==="^")value=this.renderInverted(token,context,partials,originalTemplate);else
if(symbol===">")value=this.renderPartial(token,context,partials,originalTemplate);else
if(symbol==="&")value=this.unescapedValue(token,context);else
if(symbol==="name")value=this.escapedValue(token,context);else
if(symbol==="text")value=this.rawValue(token);if(value!==undefined)buffer+=value}return
buffer};Writer.prototype.renderSection=function
renderSection(token,context,partials,originalTemplate){var self=this;var
buffer="";var value=context.lookup(token[1]);function
subRender(template){return
self.render(template,context,partials)}if(!value)return;if(isArray(value)){for(var
j=0,valueLength=value.length;j<valueLength;++j){buffer+=this.renderTokens(token[4],context.push(value[j]),partials,originalTemplate)}}else
if(typeof value==="object"||typeof
value==="string"||typeof
value==="number"){buffer+=this.renderTokens(token[4],context.push(value),partials,originalTemplate)}else
if(isFunction(value)){if(typeof originalTemplate!=="string")throw
new Error("Cannot use higher-order sections without the original
template");value=value.call(context.view,originalTemplate.slice(token[3],token[5]),subRender);if(value!=null)buffer+=value}else{buffer+=this.renderTokens(token[4],context,partials,originalTemplate)}return
buffer};Writer.prototype.renderInverted=function
renderInverted(token,context,partials,originalTemplate){var
value=context.lookup(token[1]);if(!value||isArray(value)&&value.length===0)return
this.renderTokens(token[4],context,partials,originalTemplate)};Writer.prototype.renderPartial=function
renderPartial(token,context,partials){if(!partials)return;var
value=isFunction(partials)?partials(token[1]):partials[token[1]];if(value!=null)return
this.renderTokens(this.parse(value),context,partials,value)};Writer.prototype.unescapedValue=function
unescapedValue(token,context){var
value=context.lookup(token[1]);if(value!=null)return
value};Writer.prototype.escapedValue=function
escapedValue(token,context){var
value=context.lookup(token[1]);if(value!=null)return
mustache.escape(value)};Writer.prototype.rawValue=function
rawValue(token){return
token[1]};mustache.name="mustache.js";mustache.version="2.3.0";mustache.tags=["{{","}}"];var
defaultWriter=new Writer;mustache.clearCache=function clearCache(){return
defaultWriter.clearCache()};mustache.parse=function
parse(template,tags){return
defaultWriter.parse(template,tags)};mustache.render=function
render(template,view,partials){if(typeof
template!=="string"){throw new TypeError('Invalid template!
Template should be a "string" '+'but
"'+typeStr(template)+'" was given as the first
'+"argument for mustache#render(template, view,
partials)")}return
defaultWriter.render(template,view,partials)};mustache.to_html=function
to_html(template,view,partials,send){var
result=mustache.render(template,view,partials);if(isFunction(send)){send(result)}else{return
result}};mustache.escape=escapeHtml;mustache.Scanner=Scanner;mustache.Context=Context;mustache.Writer=Writer;return
mustache});
notifly-core.js000064400000025263151171634130007526 0ustar00/*!
* notifly-core.js
* https://www.themexpert.com/
* Version: 1.0.0
*
* Copyright ThemeXpert
* Released under the MIT license
* https://www.themexpert.com/notifly
*/
;
(function($, scope) {
"use strict";
var NotiflyTimeout;
var Notifly = scope.Notifly = {
/**
* Basic setup
*
* @return void
*/
initialize: function() {
/*console.log(Joomla.getOptions('notifly').params);*/
/*Get the cookie value*/
if (Cookies.get('notifly_hide_message') ===
'true') {
return;
}
/*get the list first*/
this.items = this.getList();
if(!this.items.length){
console.warn('Notifly:', 'Events are empty!
Please configure your integrations.');
return;
}
this.makeWrapper();
this.checked = false;
this.time = 0;
this.totalShown = 0;
this.max_bypage =
parseInt(Joomla.getOptions('notifly').params.max_bypage);
this.initial_delay =
parseInt(Joomla.getOptions('notifly').params.initial_delay) *
1000;
this.display_time =
parseInt(Joomla.getOptions('notifly').params.display_time) *
1000;
this.delay_time =
parseInt(Joomla.getOptions('notifly').params.delay_time) * 1000;
/*
notify_max per user per session
if(Joomla.getOptions('notifly').params.notify_max ==
'1'){
$.session.set("notifly", "value");
}
$.session.set("myVar", "value");
*/
this.showList(this.items);
$('#notifly-wrapper #text,#notifly-wrapper
#image').on('click', function() {
/*console.warn('Clicked');*/
Notifly.updateClickLog();
});
$('#notifly-wrapper #close').on('click',
function() {
/*console.warn('Clicked');*/
Notifly.hideMessage();
});
if (!this.checked) {
if ($(window).width() < 768) { /*if width is less than
768px*/
this.mobileFunctions(); /*execute mobile function*/
} else { /*if width is more than 768px*/
this.desktopFunctions(); /*execute desktop function*/
}
this.checked = true;
}
},
/**
* Called from outside. Only ever called with task
'folder.delete'
*
* @param string task [description]
*
* @return void
*/
makeWrapper: function() {
var wrapperWidth =
Joomla.getOptions('notifly').params.wrapper_width;
var show_branding =
parseInt(Joomla.getOptions('notifly').params.show_branding);
var htmlNotifly = '<div id="notifly-wrapper"
style="width:' + wrapperWidth + ';"
class="out"><div class="card-small"><div
class="row flex flex--align-vertical">';
htmlNotifly = htmlNotifly + '<div id="image"
class="col-nano-3"><img src=""
/></div>';
htmlNotifly = htmlNotifly + '<div id="text"
class="col-nano-9"></div>';
if(show_branding){
htmlNotifly = htmlNotifly + '<div
class="poweredBy"><i class="svg"><svg
width="7" height="13" viewBox="0 0 7 13"
xmlns="http://www.w3.org/2000/svg"><g fill="none"
fill-rule="evenodd"><path d="M4.127.496C4.51-.12
5.37.356 5.16 1.07L3.89 5.14H6.22c.483 0 .757.616.464 1.044l-4.338
6.34c-.407.595-1.244.082-1.01-.618L2.72 7.656H.778c-.47
0-.748-.59-.48-1.02L4.13.495z" fill="#F6A623
"></path><path fill="#FEF79E "
d="M4.606.867L.778 7.007h2.807l-1.7 5.126
4.337-6.34H3.16"></path></g></svg></i>
<span>by</span> <a target="_blank"
href="https://www.themexpert.com/notifly?utm_campaign=notifly&utm_medium=powerd_by&utm_source='
+ window.location.protocol + '//' + window.location.hostname +
Joomla.getOptions('notifly').baseurl +
'">Notifly</a></div>';
}
htmlNotifly = htmlNotifly + '</div>';
if (Joomla.getOptions('notifly').params.allow_close
== 1) {
htmlNotifly = htmlNotifly + '<div
id="close"><span>x</span></div>';
}
htmlNotifly = htmlNotifly +
'</div></div>';
$('body').append(htmlNotifly);
},
/**
* Called from outside. Only ever called with task
'folder.delete'
*
* @param string task [description]
*
* @return void
*/
getList: function() {
/*console.warn('getList');*/
return Joomla.getOptions('notifly').items;
},
/**
* Called from outside. Only ever called with task
'folder.delete'
*
* @param string task [description]
*
* @return void
*/
showList: function(items) {
this.initial_delay =
parseInt(Joomla.getOptions('notifly').params.initial_delay) *
1000;
this.display_time =
parseInt(Joomla.getOptions('notifly').params.display_time) *
1000;
this.delay_time =
parseInt(Joomla.getOptions('notifly').params.delay_time) * 1000;
/*set initial delay time*/
this.time = this.initial_delay;
$.each(items, function(index, item) {
/*max per page has crossed!*/
if (Notifly.totalShown > Notifly.max_bypage) {
return;
}
var explode = function() {
var converter = new showdown.Converter();
var renderedHtml = converter.makeHtml(item.message);
Notifly.showMessage(index, renderedHtml, item.image);
};
setTimeout(explode, Notifly.time);
Notifly.time = Notifly.time + Notifly.display_time +
Notifly.delay_time;
Notifly.totalShown++;
});
/*after all times over, wait and repeat if allowed*/
if (Joomla.getOptions('notifly').params.notifly_loop
== '1') {
setTimeout(
function() {
if (Notifly.totalShown > Notifly.max_bypage) {
return;
}
Notifly.destroy();
Notifly.initialize();
},
Notifly.time + Notifly.initial_delay
);
}
},
showMessage: function(index, text, image) {
/*Get the cookie value*/
if (Cookies.get('notifly_hide_message') ===
'true') {
return;
}
/*console.warn('showMessage');*/
$('#notifly-wrapper #text').html(text);
$('#notifly-wrapper #image
img').attr('src', image);
/*$( '#notifly-wrapper'
).fadeIn('slow').delay(Notifly.display_time).fadeOut('fast');*/
$('#notifly-wrapper').show().removeClass('out').addClass('active');
setTimeout(function() {
$('#notifly-wrapper').removeClass('active').addClass('out').fadeOut('fast');
}, Notifly.display_time);
this.updateViewLog();
},
hideMessage: function() {
$('#notifly-wrapper').removeClass('active').addClass('out').fadeOut('fast');
/*set cookie*/
var expire_cookie =
Joomla.getOptions('notifly').params.expire_cookie;
expire_cookie = (expire_cookie * 60 * 60); /*60*60 = 1 hour
1*60 = 1 min*/
Cookies.set('notifly_hide_message', 'true',
{
expires: expire_cookie
});
/*console.log('notifly disabled for ' +
Joomla.getOptions('notifly').params.expire_cookie +
'hours');*/
},
updateViewLog: function() {
/*
console.warn(Joomla.getOptions('notifly').baseurl);
console.warn('updateViewLog');
call ajax api
index.php?option=com_ajax&plugin=notifly&format=json&action=click
Joomla.getOptions('notifly').baseurl +
console.log(Joomla.getOptions('notifly').baseurl +
"/index.php?option=com_ajax&plugin=notifly&format=json");
*/
if
(Joomla.getOptions('notifly').params.enable_hitcounter ==
'0') return;
var updateViewLogInfo =
jQuery.get(Joomla.getOptions('notifly').baseurl +
"/index.php?option=com_ajax&plugin=notifly&format=json",
function(data, status) {
if (status = !'success') {
console.error('failed to update notifly
hitlog!');
}
/*console.warn('update view log');*/
});
},
updateClickLog: function() {
/*
console.warn(Joomla.getOptions('notifly').baseurl);
console.warn('updateClickLog');
call ajax api
index.php?option=com_ajax&plugin=notifly&format=json&action=click
*/
if
(Joomla.getOptions('notifly').params.enable_hitcounter ==
'0') return;
var updateClickLogInfo =
jQuery.get(Joomla.getOptions('notifly').baseurl +
"/index.php?option=com_ajax&plugin=notifly&action=click&format=json",
function(data, status) {
if (status = !'success') {
console.error('failed to update notifly
clicklog!');
}
/*console.warn('updated click');*/
});
},
mobileFunctions: function() {
/*console.warn('mobileFunctions');*/
if (Joomla.getOptions('notifly').params.hide_mobile
== '1') {
this.destroy();
} else if (!$('#notifly-wrapper').length) {
this.initialize();
}
},
desktopFunctions: function() {
/*
console.warn('desktopFunctions');
console.warn(Joomla.getOptions('notifly').params.hide_desktop);
*/
if (Joomla.getOptions('notifly').params.hide_desktop
== '1') {
this.destroy();
} else if (!$('#notifly-wrapper').length) {
this.initialize();
}
},
destroy: function() {
/*console.warn('destroy');*/
$('#notifly-wrapper').remove();
},
resize: function() {
/*console.warn('resize');*/
if ($(window).width() < 768) { /*if width is less than
768px*/
this.mobileFunctions(); /*execute mobile function*/
} else { /*if width is more than 768px*/
this.desktopFunctions(); /*execute desktop function*/
}
}
};
$(function() {
/*Added to populate data on iframe load*/
Notifly.initialize();
$(window).resize(function() {
Notifly.resize();
});
});
}(jQuery, window));notifly-core.min.js000064400000012247151171634130010306
0ustar00/*!
* notifly-core.js
* https://www.themexpert.com/
* Version: 1.0.0
*
* Copyright ThemeXpert
* Released under the MIT license
* https://www.themexpert.com/notifly
*/
!(function($,scope){"use strict";var NotiflyTimeout;var
Notifly=scope.Notifly={initialize:function(){console.log(Joomla.getOptions('notifly').params);if(Cookies.get('notifly_hide_message')==='true'){return}this.makeWrapper(this.items);this.checked=!1;this.items=this.getList();this.time=0;this.totalShown=0;this.max_bypage=parseInt(Joomla.getOptions('notifly').params.max_bypage);this.initial_delay=parseInt(Joomla.getOptions('notifly').params.initial_delay)*1000;this.display_time=parseInt(Joomla.getOptions('notifly').params.display_time)*1000;this.delay_time=parseInt(Joomla.getOptions('notifly').params.delay_time)*1000;this.showList(this.items);$('#notifly-wrapper
#text,#notifly-wrapper
#image').on('click',function(){Notifly.updateClickLog()});$('#notifly-wrapper
#close').on('click',function(){Notifly.hideMessage()});if(!this.checked){if($(window).width()<768){this.mobileFunctions()}else{this.desktopFunctions()}this.checked=!0}},makeWrapper:function(){var
wrapperWidth=Joomla.getOptions('notifly').params.wrapper_width;var
htmlNotifly='<div id="notifly-wrapper"
style="width:'+wrapperWidth+';"
class="out"><div class="card-small"><div
class="row flex
flex--align-vertical">';htmlNotifly=htmlNotifly+'<div
id="image" class="col-nano-3"><img
src=""
/></div>';htmlNotifly=htmlNotifly+'<div
id="text"
class="col-nano-9"></div>';htmlNotifly=htmlNotifly+'<div
class="poweredBy"><i class="svg"><svg
width="7" height="13" viewBox="0 0 7 13"
xmlns="http://www.w3.org/2000/svg"><g fill="none"
fill-rule="evenodd"><path d="M4.127.496C4.51-.12
5.37.356 5.16 1.07L3.89 5.14H6.22c.483 0 .757.616.464 1.044l-4.338
6.34c-.407.595-1.244.082-1.01-.618L2.72 7.656H.778c-.47
0-.748-.59-.48-1.02L4.13.495z" fill="#F6A623
"></path><path fill="#FEF79E "
d="M4.606.867L.778 7.007h2.807l-1.7 5.126
4.337-6.34H3.16"></path></g></svg></i>
<span>by</span> <a target="_blank"
href="https://www.themexpert.com/notifly?utm_campaign=notifly&utm_medium=powerd_by&utm_source='+window.location.protocol+'//'+window.location.hostname+Joomla.getOptions('notifly').baseurl+'">Notifly</a></div>';htmlNotifly=htmlNotifly+'</div>';if(Joomla.getOptions('notifly').params.allow_close==1){htmlNotifly=htmlNotifly+'<div
id="close"><span>x</span></div>'}htmlNotifly=htmlNotifly+'</div></div>';$('body').append(htmlNotifly)},getList:function(){return
Joomla.getOptions('notifly').items},showList:function(items){this.initial_delay=parseInt(Joomla.getOptions('notifly').params.initial_delay)*1000;this.display_time=parseInt(Joomla.getOptions('notifly').params.display_time)*1000;this.delay_time=parseInt(Joomla.getOptions('notifly').params.delay_time)*1000;this.time=this.initial_delay;$.each(items,function(index,item){if(Notifly.totalShown>Notifly.max_bypage){return}var
explode=function(){var converter=new showdown.Converter();var
renderedHtml=converter.makeHtml(item.message);Notifly.showMessage(index,renderedHtml,item.image)};setTimeout(explode,Notifly.time);Notifly.time=Notifly.time+Notifly.display_time+Notifly.delay_time;Notifly.totalShown++});if(Joomla.getOptions('notifly').params.notifly_loop=='1'){setTimeout(function(){if(Notifly.totalShown>Notifly.max_bypage){return}Notifly.destroy();Notifly.initialize()},Notifly.time+Notifly.initial_delay)}},showMessage:function(index,text,image){if(Cookies.get('notifly_hide_message')==='true'){return}$('#notifly-wrapper
#text').html(text);$('#notifly-wrapper #image
img').attr('src',image);$('#notifly-wrapper').show().removeClass('out').addClass('active');setTimeout(function(){$('#notifly-wrapper').removeClass('active').addClass('out').fadeOut('fast')},Notifly.display_time);this.updateViewLog()},hideMessage:function(){$('#notifly-wrapper').removeClass('active').addClass('out').fadeOut('fast');var
expire_cookie=Joomla.getOptions('notifly').params.expire_cookie;expire_cookie=(expire_cookie*60*60);Cookies.set('notifly_hide_message','true',{expires:expire_cookie})},updateViewLog:function(){if(Joomla.getOptions('notifly').params.enable_hitcounter=='0')return;var
updateViewLogInfo=jQuery.get(Joomla.getOptions('notifly').baseurl+"/index.php?option=com_ajax&plugin=notifly&format=json",function(data,status){if(status=!'success'){console.error('failed
to update notifly
hitlog!')}})},updateClickLog:function(){if(Joomla.getOptions('notifly').params.enable_hitcounter=='0')return;var
updateClickLogInfo=jQuery.get(Joomla.getOptions('notifly').baseurl+"/index.php?option=com_ajax&plugin=notifly&action=click&format=json",function(data,status){if(status=!'success'){console.error('failed
to update notifly
clicklog!')}})},mobileFunctions:function(){if(Joomla.getOptions('notifly').params.hide_mobile=='1'){this.destroy()}else
if(!$('#notifly-wrapper').length){this.initialize()}},desktopFunctions:function(){if(Joomla.getOptions('notifly').params.hide_desktop=='1'){this.destroy()}else
if(!$('#notifly-wrapper').length){this.initialize()}},destroy:function(){$('#notifly-wrapper').remove()},resize:function(){if($(window).width()<768){this.mobileFunctions()}else{this.desktopFunctions()}}};$(function(){Notifly.initialize();$(window).resize(function(){Notifly.resize()})})}(jQuery,window));showdown.min.js000064400000274434151171634130007554
0ustar00/*! showdown v 1.8.1 - 01-11-2017 */
(function(){function g(g){"use strict";var
A={omitExtraWLInCodeBlocks:{defaultValue:!1,describe:"Omit the default
extra whiteline added to code
blocks",type:"boolean"},noHeaderId:{defaultValue:!1,describe:"Turn
on/off generated header
id",type:"boolean"},prefixHeaderId:{defaultValue:!1,describe:"Add
a prefix to the generated header ids. Passing a string will prefix that
string to the header id. Setting to true will add a generic
'section-'
prefix",type:"string"},rawPrefixHeaderId:{defaultValue:!1,describe:'Setting
this option to true will prevent showdown from modifying the prefix. This
might result in malformed IDs (if, for instance, the " char is used in
the
prefix)',type:"boolean"},ghCompatibleHeaderId:{defaultValue:!1,describe:"Generate
header ids compatible with github style (spaces are replaced with dashes, a
bunch of non alphanumeric chars are
removed)",type:"boolean"},rawHeaderId:{defaultValue:!1,describe:"Remove
only spaces, ' and \" from generated header ids (including
prefixes), replacing them with dashes (-). WARNING: This might result in
malformed
ids",type:"boolean"},headerLevelStart:{defaultValue:!1,describe:"The
header blocks level
start",type:"integer"},parseImgDimensions:{defaultValue:!1,describe:"Turn
on/off image dimension
parsing",type:"boolean"},simplifiedAutoLink:{defaultValue:!1,describe:"Turn
on/off GFM autolink
style",type:"boolean"},excludeTrailingPunctuationFromURLs:{defaultValue:!1,describe:"Excludes
trailing punctuation from links generated with
autoLinking",type:"boolean"},literalMidWordUnderscores:{defaultValue:!1,describe:"Parse
midword underscores as literal
underscores",type:"boolean"},literalMidWordAsterisks:{defaultValue:!1,describe:"Parse
midword asterisks as literal
asterisks",type:"boolean"},strikethrough:{defaultValue:!1,describe:"Turn
on/off strikethrough
support",type:"boolean"},tables:{defaultValue:!1,describe:"Turn
on/off tables
support",type:"boolean"},tablesHeaderId:{defaultValue:!1,describe:"Add
an id to table
headers",type:"boolean"},ghCodeBlocks:{defaultValue:!0,describe:"Turn
on/off GFM fenced code blocks
support",type:"boolean"},tasklists:{defaultValue:!1,describe:"Turn
on/off GFM tasklist
support",type:"boolean"},smoothLivePreview:{defaultValue:!1,describe:"Prevents
weird effects in live previews due to incomplete
input",type:"boolean"},smartIndentationFix:{defaultValue:!1,description:"Tries
to smartly fix indentation in es6
strings",type:"boolean"},disableForced4SpacesIndentedSublists:{defaultValue:!1,description:"Disables
the requirement of indenting nested sublists by 4
spaces",type:"boolean"},simpleLineBreaks:{defaultValue:!1,description:"Parses
simple line breaks as <br> (GFM
Style)",type:"boolean"},requireSpaceBeforeHeadingText:{defaultValue:!1,description:"Makes
adding a space between `#` and the header text mandatory (GFM
Style)",type:"boolean"},ghMentions:{defaultValue:!1,description:"Enables
github
@mentions",type:"boolean"},ghMentionsLink:{defaultValue:"https://github.com/{u}",description:"Changes
the link generated by @mentions. Only applies if ghMentions option is
enabled.",type:"string"},encodeEmails:{defaultValue:!0,description:"Encode
e-mail addresses through the use of Character Entities, transforming ASCII
e-mail addresses into its equivalent decimal
entities",type:"boolean"},openLinksInNewWindow:{defaultValue:!1,description:"Open
all links in new
windows",type:"boolean"},backslashEscapesHTMLTags:{defaultValue:!1,description:"Support
for HTML Tag escaping. ex:
<div>foo</div>",type:"boolean"},emoji:{defaultValue:!1,description:"Enable
emoji support. Ex: `this is a :smile:
emoji`",type:"boolean"},underline:{defaultValue:!1,description:"Enable
support for underline. Syntax is double or triple underscores: `__underline
word__`. With this option enabled, underscores no longer parses into
`<em>` and
`<strong>`",type:"boolean"}};if(!1===g)return
JSON.parse(JSON.stringify(A));var C={};for(var I in
A)A.hasOwnProperty(I)&&(C[I]=A[I].defaultValue);return C}function
A(g,A){"use strict";var C=A?"Error in "+A+"
extension->":"Error in unnamed
extension",e={valid:!0,error:""};I.helper.isArray(g)||(g=[g]);for(var
r=0;r<g.length;++r){var t=C+" sub-extension "+r+":
",a=g[r];if("object"!=typeof a)return
e.valid=!1,e.error=t+"must be an object, but "+typeof a+"
given",e;if(!I.helper.isString(a.type))return
e.valid=!1,e.error=t+'property "type" must be a string, but
'+typeof a.type+" given",e;var
n=a.type=a.type.toLowerCase();if("language"===n&&(n=a.type="lang"),"html"===n&&(n=a.type="output"),"lang"!==n&&"output"!==n&&"listener"!==n)return
e.valid=!1,e.error=t+"type "+n+' is not recognized. Valid
values: "lang/language", "output/html" or
"listener"',e;if("listener"===n){if(I.helper.isUndefined(a.listeners))return
e.valid=!1,e.error=t+'. Extensions of type "listener" must
have a property called "listeners"',e}else
if(I.helper.isUndefined(a.filter)&&I.helper.isUndefined(a.regex))return
e.valid=!1,e.error=t+n+' extensions must define either a
"regex" property or a "filter"
method',e;if(a.listeners){if("object"!=typeof
a.listeners)return e.valid=!1,e.error=t+'"listeners"
property must be an object but '+typeof a.listeners+"
given",e;for(var o in
a.listeners)if(a.listeners.hasOwnProperty(o)&&"function"!=typeof
a.listeners[o])return e.valid=!1,e.error=t+'"listeners"
property must be an hash of [event name]: [callback].
listeners.'+o+" must be a function but "+typeof
a.listeners[o]+"
given",e}if(a.filter){if("function"!=typeof a.filter)return
e.valid=!1,e.error=t+'"filter" must be a function, but
'+typeof a.filter+" given",e}else
if(a.regex){if(I.helper.isString(a.regex)&&(a.regex=new
RegExp(a.regex,"g")),!(a.regex instanceof RegExp))return
e.valid=!1,e.error=t+'"regex" property must either be a
string or a RegExp object, but '+typeof a.regex+"
given",e;if(I.helper.isUndefined(a.replace))return
e.valid=!1,e.error=t+'"regex" extensions must implement a
replace string or function',e}}return e}function C(g,A){"use
strict";return"¨E"+A.charCodeAt(0)+"E"}var
I={},e={},r={},t=g(!0),a="vanilla",n={github:{omitExtraWLInCodeBlocks:!0,simplifiedAutoLink:!0,excludeTrailingPunctuationFromURLs:!0,literalMidWordUnderscores:!0,strikethrough:!0,tables:!0,tablesHeaderId:!0,ghCodeBlocks:!0,tasklists:!0,disableForced4SpacesIndentedSublists:!0,simpleLineBreaks:!0,requireSpaceBeforeHeadingText:!0,ghCompatibleHeaderId:!0,ghMentions:!0,backslashEscapesHTMLTags:!0,emoji:!0},original:{noHeaderId:!0,ghCodeBlocks:!1},ghost:{omitExtraWLInCodeBlocks:!0,parseImgDimensions:!0,simplifiedAutoLink:!0,excludeTrailingPunctuationFromURLs:!0,literalMidWordUnderscores:!0,strikethrough:!0,tables:!0,tablesHeaderId:!0,ghCodeBlocks:!0,tasklists:!0,smoothLivePreview:!0,simpleLineBreaks:!0,requireSpaceBeforeHeadingText:!0,ghMentions:!1,encodeEmails:!0},vanilla:g(!0),allOn:function(){"use
strict";var A=g(!0),C={};for(var I in
A)A.hasOwnProperty(I)&&(C[I]=!0);return
C}()};I.helper={},I.extensions={},I.setOption=function(g,A){"use
strict";return t[g]=A,this},I.getOption=function(g){"use
strict";return t[g]},I.getOptions=function(){"use
strict";return t},I.resetOptions=function(){"use
strict";t=g(!0)},I.setFlavor=function(g){"use
strict";if(!n.hasOwnProperty(g))throw Error(g+" flavor was not
found");I.resetOptions();var A=n[g];a=g;for(var C in
A)A.hasOwnProperty(C)&&(t[C]=A[C])},I.getFlavor=function(){"use
strict";return a},I.getFlavorOptions=function(g){"use
strict";if(n.hasOwnProperty(g))return
n[g]},I.getDefaultOptions=function(A){"use strict";return
g(A)},I.subParser=function(g,A){"use
strict";if(I.helper.isString(g)){if(void
0===A){if(e.hasOwnProperty(g))return e[g];throw Error("SubParser named
"+g+" not
registered!")}e[g]=A}},I.extension=function(g,C){"use
strict";if(!I.helper.isString(g))throw Error("Extension
'name' must be a
string");if(g=I.helper.stdExtName(g),I.helper.isUndefined(C)){if(!r.hasOwnProperty(g))throw
Error("Extension named "+g+" is not
registered!");return r[g]}"function"==typeof
C&&(C=C()),I.helper.isArray(C)||(C=[C]);var
e=A(C,g);if(!e.valid)throw
Error(e.error);r[g]=C},I.getAllExtensions=function(){"use
strict";return r},I.removeExtension=function(g){"use
strict";delete r[g]},I.resetExtensions=function(){"use
strict";r={}},I.validateExtension=function(g){"use
strict";var
C=A(g,null);return!!C.valid||(console.warn(C.error),!1)},I.hasOwnProperty("helper")||(I.helper={}),I.helper.isString=function(g){"use
strict";return"string"==typeof g||g instanceof
String},I.helper.isFunction=function(g){"use strict";var
A={};return g&&"[object
Function]"===A.toString.call(g)},I.helper.isArray=function(g){"use
strict";return
Array.isArray(g)},I.helper.isUndefined=function(g){"use
strict";return void 0===g},I.helper.forEach=function(g,A){"use
strict";if(I.helper.isUndefined(g))throw new Error("obj param is
required");if(I.helper.isUndefined(A))throw new Error("callback
param is required");if(!I.helper.isFunction(A))throw new
Error("callback param must be a
function/closure");if("function"==typeof
g.forEach)g.forEach(A);else if(I.helper.isArray(g))for(var
C=0;C<g.length;C++)A(g[C],C,g);else{if("object"!=typeof
g)throw new Error("obj does not seem to be an array or an iterable
object");for(var e in
g)g.hasOwnProperty(e)&&A(g[e],e,g)}},I.helper.stdExtName=function(g){"use
strict";return
g.replace(/[_?*+\/\\.^-]/g,"").replace(/\s/g,"").toLowerCase()},I.helper.escapeCharactersCallback=C,I.helper.escapeCharacters=function(g,A,I){"use
strict";var
e="(["+A.replace(/([\[\]\\])/g,"\\$1")+"])";I&&(e="\\\\"+e);var
r=new RegExp(e,"g");return g=g.replace(r,C)};var
o=function(g,A,C,I){"use strict";var
e,r,t,a,n,o=I||"",s=o.indexOf("g")>-1,i=new
RegExp(A+"|"+C,"g"+o.replace(/g/g,"")),l=new
RegExp(A,o.replace(/g/g,"")),c=[];do{for(e=0;t=i.exec(g);)if(l.test(t[0]))e++||(a=(r=i.lastIndex)-t[0].length);else
if(e&&!--e){n=t.index+t[0].length;var
u={left:{start:a,end:r},match:{start:r,end:t.index},right:{start:t.index,end:n},wholeMatch:{start:a,end:n}};if(c.push(u),!s)return
c}}while(e&&(i.lastIndex=r));return
c};I.helper.matchRecursiveRegExp=function(g,A,C,I){"use
strict";for(var
e=o(g,A,C,I),r=[],t=0;t<e.length;++t)r.push([g.slice(e[t].wholeMatch.start,e[t].wholeMatch.end),g.slice(e[t].match.start,e[t].match.end),g.slice(e[t].left.start,e[t].left.end),g.slice(e[t].right.start,e[t].right.end)]);return
r},I.helper.replaceRecursiveRegExp=function(g,A,C,e,r){"use
strict";if(!I.helper.isFunction(A)){var t=A;A=function(){return t}}var
a=o(g,C,e,r),n=g,s=a.length;if(s>0){var
i=[];0!==a[0].wholeMatch.start&&i.push(g.slice(0,a[0].wholeMatch.start));for(var
l=0;l<s;++l)i.push(A(g.slice(a[l].wholeMatch.start,a[l].wholeMatch.end),g.slice(a[l].match.start,a[l].match.end),g.slice(a[l].left.start,a[l].left.end),g.slice(a[l].right.start,a[l].right.end))),l<s-1&&i.push(g.slice(a[l].wholeMatch.end,a[l+1].wholeMatch.start));a[s-1].wholeMatch.end<g.length&&i.push(g.slice(a[s-1].wholeMatch.end)),n=i.join("")}return
n},I.helper.regexIndexOf=function(g,A,C){"use
strict";if(!I.helper.isString(g))throw"InvalidArgumentError:
first parameter of showdown.helper.regexIndexOf function must be a
string";if(A instanceof RegExp==!1)throw"InvalidArgumentError:
second parameter of showdown.helper.regexIndexOf function must be an
instance of RegExp";var e=g.substring(C||0).search(A);return
e>=0?e+(C||0):e},I.helper.splitAtIndex=function(g,A){"use
strict";if(!I.helper.isString(g))throw"InvalidArgumentError:
first parameter of showdown.helper.regexIndexOf function must be a
string";return[g.substring(0,A),g.substring(A)]},I.helper.encodeEmailAddress=function(g){"use
strict";var
A=[function(g){return"&#"+g.charCodeAt(0)+";"},function(g){return"&#x"+g.charCodeAt(0).toString(16)+";"},function(g){return
g}];return
g=g.replace(/./g,function(g){if("@"===g)g=A[Math.floor(2*Math.random())](g);else{var
C=Math.random();g=C>.9?A[2](g):C>.45?A[1](g):A[0](g)}return
g})},"undefined"==typeof
console&&(console={warn:function(g){"use
strict";alert(g)},log:function(g){"use
strict";alert(g)},error:function(g){"use strict";throw
g}}),I.helper.regexes={asteriskDashAndColon:/([*_:~])/g},I.helper.emojis={"+1":"👍","-1":"👎",100:"💯",1234:"🔢","1st_place_medal":"🥇","2nd_place_medal":"🥈","3rd_place_medal":"🥉","8ball":"🎱",a:"🅰️",ab:"🆎",abc:"🔤",abcd:"🔡",accept:"🉑",aerial_tramway:"🚡",airplane:"✈️",alarm_clock:"⏰",alembic:"⚗️",alien:"👽",ambulance:"🚑",amphora:"🏺",anchor:"⚓️",angel:"👼",anger:"💢",angry:"😠",anguished:"😧",ant:"🐜",apple:"🍎",aquarius:"♒️",aries:"♈️",arrow_backward:"◀️",arrow_double_down:"⏬",arrow_double_up:"⏫",arrow_down:"⬇️",arrow_down_small:"🔽",arrow_forward:"▶️",arrow_heading_down:"⤵️",arrow_heading_up:"⤴️",arrow_left:"⬅️",arrow_lower_left:"↙️",arrow_lower_right:"↘️",arrow_right:"➡️",arrow_right_hook:"↪️",arrow_up:"⬆️",arrow_up_down:"↕️",arrow_up_small:"🔼",arrow_upper_left:"↖️",arrow_upper_right:"↗️",arrows_clockwise:"🔃",arrows_counterclockwise:"🔄",art:"🎨",articulated_lorry:"🚛",artificial_satellite:"🛰",astonished:"😲",athletic_shoe:"👟",atm:"🏧",atom_symbol:"⚛️",avocado:"🥑",b:"🅱️",baby:"👶",baby_bottle:"🍼",baby_chick:"🐤",baby_symbol:"🚼",back:"🔙",bacon:"🥓",badminton:"🏸",baggage_claim:"🛄",baguette_bread:"🥖",balance_scale:"⚖️",balloon:"🎈",ballot_box:"🗳",ballot_box_with_check:"☑️",bamboo:"🎍",banana:"🍌",bangbang:"‼️",bank:"🏦",bar_chart:"📊",barber:"💈",baseball:"⚾️",basketball:"🏀",basketball_man:"⛹️",basketball_woman:"⛹️‍♀️",bat:"🦇",bath:"🛀",bathtub:"🛁",battery:"🔋",beach_umbrella:"🏖",bear:"🐻",bed:"🛏",bee:"🐝",beer:"🍺",beers:"🍻",beetle:"🐞",beginner:"🔰",bell:"🔔",bellhop_bell:"🛎",bento:"🍱",biking_man:"🚴",bike:"🚲",biking_woman:"🚴‍♀️",bikini:"👙",biohazard:"☣️",bird:"🐦",birthday:"🎂",black_circle:"⚫️",black_flag:"🏴",black_heart:"🖤",black_joker:"🃏",black_large_square:"⬛️",black_medium_small_square:"◾️",black_medium_square:"◼️",black_nib:"✒️",black_small_square:"▪️",black_square_button:"🔲",blonde_man:"👱",blonde_woman:"👱‍♀️",blossom:"🌼",blowfish:"🐡",blue_book:"📘",blue_car:"🚙",blue_heart:"💙",blush:"😊",boar:"🐗",boat:"⛵️",bomb:"💣",book:"📖",bookmark:"🔖",bookmark_tabs:"📑",books:"📚",boom:"💥",boot:"👢",bouquet:"💐",bowing_man:"🙇",bow_and_arrow:"🏹",bowing_woman:"🙇‍♀️",bowling:"🎳",boxing_glove:"🥊",boy:"👦",bread:"🍞",bride_with_veil:"👰",bridge_at_night:"🌉",briefcase:"💼",broken_heart:"💔",bug:"🐛",building_construction:"🏗",bulb:"💡",bullettrain_front:"🚅",bullettrain_side:"🚄",burrito:"🌯",bus:"🚌",business_suit_levitating:"🕴",busstop:"🚏",bust_in_silhouette:"👤",busts_in_silhouette:"👥",butterfly:"🦋",cactus:"🌵",cake:"🍰",calendar:"📆",call_me_hand:"🤙",calling:"📲",camel:"🐫",camera:"📷",camera_flash:"📸",camping:"🏕",cancer:"♋️",candle:"🕯",candy:"🍬",canoe:"🛶",capital_abcd:"🔠",capricorn:"♑️",car:"🚗",card_file_box:"🗃",card_index:"📇",card_index_dividers:"🗂",carousel_horse:"🎠",carrot:"🥕",cat:"🐱",cat2:"🐈",cd:"💿",chains:"⛓",champagne:"🍾",chart:"💹",chart_with_downwards_trend:"📉",chart_with_upwards_trend:"📈",checkered_flag:"🏁",cheese:"🧀",cherries:"🍒",cherry_blossom:"🌸",chestnut:"🌰",chicken:"🐔",children_crossing:"🚸",chipmunk:"🐿",chocolate_bar:"🍫",christmas_tree:"🎄",church:"⛪️",cinema:"🎦",circus_tent:"🎪",city_sunrise:"🌇",city_sunset:"🌆",cityscape:"🏙",cl:"🆑",clamp:"🗜",clap:"👏",clapper:"🎬",classical_building:"🏛",clinking_glasses:"🥂",clipboard:"📋",clock1:"🕐",clock10:"🕙",clock1030:"🕥",clock11:"🕚",clock1130:"🕦",clock12:"🕛",clock1230:"🕧",clock130:"🕜",clock2:"🕑",clock230:"🕝",clock3:"🕒",clock330:"🕞",clock4:"🕓",clock430:"🕟",clock5:"🕔",clock530:"🕠",clock6:"🕕",clock630:"🕡",clock7:"🕖",clock730:"🕢",clock8:"🕗",clock830:"🕣",clock9:"🕘",clock930:"🕤",closed_book:"📕",closed_lock_with_key:"🔐",closed_umbrella:"🌂",cloud:"☁️",cloud_with_lightning:"🌩",cloud_with_lightning_and_rain:"⛈",cloud_with_rain:"🌧",cloud_with_snow:"🌨",clown_face:"🤡",clubs:"♣️",cocktail:"🍸",coffee:"☕️",coffin:"⚰️",cold_sweat:"😰",comet:"☄️",computer:"💻",computer_mouse:"🖱",confetti_ball:"🎊",confounded:"😖",confused:"😕",congratulations:"㊗️",construction:"🚧",construction_worker_man:"👷",construction_worker_woman:"👷‍♀️",control_knobs:"🎛",convenience_store:"🏪",cookie:"🍪",cool:"🆒",policeman:"👮",copyright:"©️",corn:"🌽",couch_and_lamp:"🛋",couple:"👫",couple_with_heart_woman_man:"💑",couple_with_heart_man_man:"👨‍❤️‍👨",couple_with_heart_woman_woman:"👩‍❤️‍👩",couplekiss_man_man:"👨‍❤️‍💋‍👨",couplekiss_man_woman:"💏",couplekiss_woman_woman:"👩‍❤️‍💋‍👩",cow:"🐮",cow2:"🐄",cowboy_hat_face:"🤠",crab:"🦀",crayon:"🖍",credit_card:"💳",crescent_moon:"🌙",cricket:"🏏",crocodile:"🐊",croissant:"🥐",crossed_fingers:"🤞",crossed_flags:"🎌",crossed_swords:"⚔️",crown:"👑",cry:"😢",crying_cat_face:"😿",crystal_ball:"🔮",cucumber:"🥒",cupid:"💘",curly_loop:"➰",currency_exchange:"💱",curry:"🍛",custard:"🍮",customs:"🛃",cyclone:"🌀",dagger:"🗡",dancer:"💃",dancing_women:"👯",dancing_men:"👯‍♂️",dango:"🍡",dark_sunglasses:"🕶",dart:"🎯",dash:"💨",date:"📅",deciduous_tree:"🌳",deer:"🦌",department_store:"🏬",derelict_house:"🏚",desert:"🏜",desert_island:"🏝",desktop_computer:"🖥",male_detective:"🕵️",diamond_shape_with_a_dot_inside:"💠",diamonds:"♦️",disappointed:"😞",disappointed_relieved:"😥",dizzy:"💫",dizzy_face:"😵",do_not_litter:"🚯",dog:"🐶",dog2:"🐕",dollar:"💵",dolls:"🎎",dolphin:"🐬",door:"🚪",doughnut:"🍩",dove:"🕊",dragon:"🐉",dragon_face:"🐲",dress:"👗",dromedary_camel:"🐪",drooling_face:"🤤",droplet:"💧",drum:"🥁",duck:"🦆",dvd:"📀","e-mail":"📧",eagle:"🦅",ear:"👂",ear_of_rice:"🌾",earth_africa:"🌍",earth_americas:"🌎",earth_asia:"🌏",egg:"🥚",eggplant:"🍆",eight_pointed_black_star:"✴️",eight_spoked_asterisk:"✳️",electric_plug:"🔌",elephant:"🐘",email:"✉️",end:"🔚",envelope_with_arrow:"📩",euro:"💶",european_castle:"🏰",european_post_office:"🏤",evergreen_tree:"🌲",exclamation:"❗️",expressionless:"😑",eye:"👁",eye_speech_bubble:"👁‍🗨",eyeglasses:"👓",eyes:"👀",face_with_head_bandage:"🤕",face_with_thermometer:"🤒",fist_oncoming:"👊",factory:"🏭",fallen_leaf:"🍂",family_man_woman_boy:"👪",family_man_boy:"👨‍👦",family_man_boy_boy:"👨‍👦‍👦",family_man_girl:"👨‍👧",family_man_girl_boy:"👨‍👧‍👦",family_man_girl_girl:"👨‍👧‍👧",family_man_man_boy:"👨‍👨‍👦",family_man_man_boy_boy:"👨‍👨‍👦‍👦",family_man_man_girl:"👨‍👨‍👧",family_man_man_girl_boy:"👨‍👨‍👧‍👦",family_man_man_girl_girl:"👨‍👨‍👧‍👧",family_man_woman_boy_boy:"👨‍👩‍👦‍👦",family_man_woman_girl:"👨‍👩‍👧",family_man_woman_girl_boy:"👨‍👩‍👧‍👦",family_man_woman_girl_girl:"👨‍👩‍👧‍👧",family_woman_boy:"👩‍👦",family_woman_boy_boy:"👩‍👦‍👦",family_woman_girl:"👩‍👧",family_woman_girl_boy:"👩‍👧‍👦",family_woman_girl_girl:"👩‍👧‍👧",family_woman_woman_boy:"👩‍👩‍👦",family_woman_woman_boy_boy:"👩‍👩‍👦‍👦",family_woman_woman_girl:"👩‍👩‍👧",family_woman_woman_girl_boy:"👩‍👩‍👧‍👦",family_woman_woman_girl_girl:"👩‍👩‍👧‍👧",fast_forward:"⏩",fax:"📠",fearful:"😨",feet:"🐾",female_detective:"🕵️‍♀️",ferris_wheel:"🎡",ferry:"⛴",field_hockey:"🏑",file_cabinet:"🗄",file_folder:"📁",film_projector:"📽",film_strip:"🎞",fire:"🔥",fire_engine:"🚒",fireworks:"🎆",first_quarter_moon:"🌓",first_quarter_moon_with_face:"🌛",fish:"🐟",fish_cake:"🍥",fishing_pole_and_fish:"🎣",fist_raised:"✊",fist_left:"🤛",fist_right:"🤜",flags:"🎏",flashlight:"🔦",fleur_de_lis:"⚜️",flight_arrival:"🛬",flight_departure:"🛫",floppy_disk:"💾",flower_playing_cards:"🎴",flushed:"😳",fog:"🌫",foggy:"🌁",football:"🏈",footprints:"👣",fork_and_knife:"🍴",fountain:"⛲️",fountain_pen:"🖋",four_leaf_clover:"🍀",fox_face:"🦊",framed_picture:"🖼",free:"🆓",fried_egg:"🍳",fried_shrimp:"🍤",fries:"🍟",frog:"🐸",frowning:"😦",frowning_face:"☹️",frowning_man:"🙍‍♂️",frowning_woman:"🙍",middle_finger:"🖕",fuelpump:"⛽️",full_moon:"🌕",full_moon_with_face:"🌝",funeral_urn:"⚱️",game_die:"🎲",gear:"⚙️",gem:"💎",gemini:"♊️",ghost:"👻",gift:"🎁",gift_heart:"💝",girl:"👧",globe_with_meridians:"🌐",goal_net:"🥅",goat:"🐐",golf:"⛳️",golfing_man:"🏌️",golfing_woman:"🏌️‍♀️",gorilla:"🦍",grapes:"🍇",green_apple:"🍏",green_book:"📗",green_heart:"💚",green_salad:"🥗",grey_exclamation:"❕",grey_question:"❔",grimacing:"😬",grin:"😁",grinning:"😀",guardsman:"💂",guardswoman:"💂‍♀️",guitar:"🎸",gun:"🔫",haircut_woman:"💇",haircut_man:"💇‍♂️",hamburger:"🍔",hammer:"🔨",hammer_and_pick:"⚒",hammer_and_wrench:"🛠",hamster:"🐹",hand:"✋",handbag:"👜",handshake:"🤝",hankey:"💩",hatched_chick:"🐥",hatching_chick:"🐣",headphones:"🎧",hear_no_evil:"🙉",heart:"❤️",heart_decoration:"💟",heart_eyes:"😍",heart_eyes_cat:"😻",heartbeat:"💓",heartpulse:"💗",hearts:"♥️",heavy_check_mark:"✔️",heavy_division_sign:"➗",heavy_dollar_sign:"💲",heavy_heart_exclamation:"❣️",heavy_minus_sign:"➖",heavy_multiplication_x:"✖️",heavy_plus_sign:"➕",helicopter:"🚁",herb:"🌿",hibiscus:"🌺",high_brightness:"🔆",high_heel:"👠",hocho:"🔪",hole:"🕳",honey_pot:"🍯",horse:"🐴",horse_racing:"🏇",hospital:"🏥",hot_pepper:"🌶",hotdog:"🌭",hotel:"🏨",hotsprings:"♨️",hourglass:"⌛️",hourglass_flowing_sand:"⏳",house:"🏠",house_with_garden:"🏡",houses:"🏘",hugs:"🤗",hushed:"😯",ice_cream:"🍨",ice_hockey:"🏒",ice_skate:"⛸",icecream:"🍦",id:"🆔",ideograph_advantage:"🉐",imp:"👿",inbox_tray:"📥",incoming_envelope:"📨",tipping_hand_woman:"💁",information_source:"ℹ️",innocent:"😇",interrobang:"⁉️",iphone:"📱",izakaya_lantern:"🏮",jack_o_lantern:"🎃",japan:"🗾",japanese_castle:"🏯",japanese_goblin:"👺",japanese_ogre:"👹",jeans:"👖",joy:"😂",joy_cat:"😹",joystick:"🕹",kaaba:"🕋",key:"🔑",keyboard:"⌨️",keycap_ten:"🔟",kick_scooter:"🛴",kimono:"👘",kiss:"💋",kissing:"😗",kissing_cat:"😽",kissing_closed_eyes:"😚",kissing_heart:"😘",kissing_smiling_eyes:"😙",kiwi_fruit:"🥝",koala:"🐨",koko:"🈁",label:"🏷",large_blue_circle:"🔵",large_blue_diamond:"🔷",large_orange_diamond:"🔶",last_quarter_moon:"🌗",last_quarter_moon_with_face:"🌜",latin_cross:"✝️",laughing:"😆",leaves:"🍃",ledger:"📒",left_luggage:"🛅",left_right_arrow:"↔️",leftwards_arrow_with_hook:"↩️",lemon:"🍋",leo:"♌️",leopard:"🐆",level_slider:"🎚",libra:"♎️",light_rail:"🚈",link:"🔗",lion:"🦁",lips:"👄",lipstick:"💄",lizard:"🦎",lock:"🔒",lock_with_ink_pen:"🔏",lollipop:"🍭",loop:"➿",loud_sound:"🔊",loudspeaker:"📢",love_hotel:"🏩",love_letter:"💌",low_brightness:"🔅",lying_face:"🤥",m:"Ⓜ️",mag:"🔍",mag_right:"🔎",mahjong:"🀄️",mailbox:"📫",mailbox_closed:"📪",mailbox_with_mail:"📬",mailbox_with_no_mail:"📭",man:"👨",man_artist:"👨‍🎨",man_astronaut:"👨‍🚀",man_cartwheeling:"🤸‍♂️",man_cook:"👨‍🍳",man_dancing:"🕺",man_facepalming:"🤦‍♂️",man_factory_worker:"👨‍🏭",man_farmer:"👨‍🌾",man_firefighter:"👨‍🚒",man_health_worker:"👨‍⚕️",man_in_tuxedo:"🤵",man_judge:"👨‍⚖️",man_juggling:"🤹‍♂️",man_mechanic:"👨‍🔧",man_office_worker:"👨‍💼",man_pilot:"👨‍✈️",man_playing_handball:"🤾‍♂️",man_playing_water_polo:"🤽‍♂️",man_scientist:"👨‍🔬",man_shrugging:"🤷‍♂️",man_singer:"👨‍🎤",man_student:"👨‍🎓",man_teacher:"👨‍🏫",man_technologist:"👨‍💻",man_with_gua_pi_mao:"👲",man_with_turban:"👳",tangerine:"🍊",mans_shoe:"👞",mantelpiece_clock:"🕰",maple_leaf:"🍁",martial_arts_uniform:"🥋",mask:"😷",massage_woman:"💆",massage_man:"💆‍♂️",meat_on_bone:"🍖",medal_military:"🎖",medal_sports:"🏅",mega:"📣",melon:"🍈",memo:"📝",men_wrestling:"🤼‍♂️",menorah:"🕎",mens:"🚹",metal:"🤘",metro:"🚇",microphone:"🎤",microscope:"🔬",milk_glass:"🥛",milky_way:"🌌",minibus:"🚐",minidisc:"💽",mobile_phone_off:"📴",money_mouth_face:"🤑",money_with_wings:"💸",moneybag:"💰",monkey:"🐒",monkey_face:"🐵",monorail:"🚝",moon:"🌔",mortar_board:"🎓",mosque:"🕌",motor_boat:"🛥",motor_scooter:"🛵",motorcycle:"🏍",motorway:"🛣",mount_fuji:"🗻",mountain:"⛰",mountain_biking_man:"🚵",mountain_biking_woman:"🚵‍♀️",mountain_cableway:"🚠",mountain_railway:"🚞",mountain_snow:"🏔",mouse:"🐭",mouse2:"🐁",movie_camera:"🎥",moyai:"🗿",mrs_claus:"🤶",muscle:"💪",mushroom:"🍄",musical_keyboard:"🎹",musical_note:"🎵",musical_score:"🎼",mute:"🔇",nail_care:"💅",name_badge:"📛",national_park:"🏞",nauseated_face:"🤢",necktie:"👔",negative_squared_cross_mark:"❎",nerd_face:"🤓",neutral_face:"😐",new:"🆕",new_moon:"🌑",new_moon_with_face:"🌚",newspaper:"📰",newspaper_roll:"🗞",next_track_button:"⏭",ng:"🆖",no_good_man:"🙅‍♂️",no_good_woman:"🙅",night_with_stars:"🌃",no_bell:"🔕",no_bicycles:"🚳",no_entry:"⛔️",no_entry_sign:"🚫",no_mobile_phones:"📵",no_mouth:"😶",no_pedestrians:"🚷",no_smoking:"🚭","non-potable_water":"🚱",nose:"👃",notebook:"📓",notebook_with_decorative_cover:"📔",notes:"🎶",nut_and_bolt:"🔩",o:"⭕️",o2:"🅾️",ocean:"🌊",octopus:"🐙",oden:"🍢",office:"🏢",oil_drum:"🛢",ok:"🆗",ok_hand:"👌",ok_man:"🙆‍♂️",ok_woman:"🙆",old_key:"🗝",older_man:"👴",older_woman:"👵",om:"🕉",on:"🔛",oncoming_automobile:"🚘",oncoming_bus:"🚍",oncoming_police_car:"🚔",oncoming_taxi:"🚖",open_file_folder:"📂",open_hands:"👐",open_mouth:"😮",open_umbrella:"☂️",ophiuchus:"⛎",orange_book:"📙",orthodox_cross:"☦️",outbox_tray:"📤",owl:"🦉",ox:"🐂",package:"📦",page_facing_up:"📄",page_with_curl:"📃",pager:"📟",paintbrush:"🖌",palm_tree:"🌴",pancakes:"🥞",panda_face:"🐼",paperclip:"📎",paperclips:"🖇",parasol_on_ground:"⛱",parking:"🅿️",part_alternation_mark:"〽️",partly_sunny:"⛅️",passenger_ship:"🛳",passport_control:"🛂",pause_button:"⏸",peace_symbol:"☮️",peach:"🍑",peanuts:"🥜",pear:"🍐",pen:"🖊",pencil2:"✏️",penguin:"🐧",pensive:"😔",performing_arts:"🎭",persevere:"😣",person_fencing:"🤺",pouting_woman:"🙎",phone:"☎️",pick:"⛏",pig:"🐷",pig2:"🐖",pig_nose:"🐽",pill:"💊",pineapple:"🍍",ping_pong:"🏓",pisces:"♓️",pizza:"🍕",place_of_worship:"🛐",plate_with_cutlery:"🍽",play_or_pause_button:"⏯",point_down:"👇",point_left:"👈",point_right:"👉",point_up:"☝️",point_up_2:"👆",police_car:"🚓",policewoman:"👮‍♀️",poodle:"🐩",popcorn:"🍿",post_office:"🏣",postal_horn:"📯",postbox:"📮",potable_water:"🚰",potato:"🥔",pouch:"👝",poultry_leg:"🍗",pound:"💷",rage:"😡",pouting_cat:"😾",pouting_man:"🙎‍♂️",pray:"🙏",prayer_beads:"📿",pregnant_woman:"🤰",previous_track_button:"⏮",prince:"🤴",princess:"👸",printer:"🖨",purple_heart:"💜",purse:"👛",pushpin:"📌",put_litter_in_its_place:"🚮",question:"❓",rabbit:"🐰",rabbit2:"🐇",racehorse:"🐎",racing_car:"🏎",radio:"📻",radio_button:"🔘",radioactive:"☢️",railway_car:"🚃",railway_track:"🛤",rainbow:"🌈",rainbow_flag:"🏳️‍🌈",raised_back_of_hand:"🤚",raised_hand_with_fingers_splayed:"🖐",raised_hands:"🙌",raising_hand_woman:"🙋",raising_hand_man:"🙋‍♂️",ram:"🐏",ramen:"🍜",rat:"🐀",record_button:"⏺",recycle:"♻️",red_circle:"🔴",registered:"®️",relaxed:"☺️",relieved:"😌",reminder_ribbon:"🎗",repeat:"🔁",repeat_one:"🔂",rescue_worker_helmet:"⛑",restroom:"🚻",revolving_hearts:"💞",rewind:"⏪",rhinoceros:"🦏",ribbon:"🎀",rice:"🍚",rice_ball:"🍙",rice_cracker:"🍘",rice_scene:"🎑",right_anger_bubble:"🗯",ring:"💍",robot:"🤖",rocket:"🚀",rofl:"🤣",roll_eyes:"🙄",roller_coaster:"🎢",rooster:"🐓",rose:"🌹",rosette:"🏵",rotating_light:"🚨",round_pushpin:"📍",rowing_man:"🚣",rowing_woman:"🚣‍♀️",rugby_football:"🏉",running_man:"🏃",running_shirt_with_sash:"🎽",running_woman:"🏃‍♀️",sa:"🈂️",sagittarius:"♐️",sake:"🍶",sandal:"👡",santa:"🎅",satellite:"📡",saxophone:"🎷",school:"🏫",school_satchel:"🎒",scissors:"✂️",scorpion:"🦂",scorpius:"♏️",scream:"😱",scream_cat:"🙀",scroll:"📜",seat:"💺",secret:"㊙️",see_no_evil:"🙈",seedling:"🌱",selfie:"🤳",shallow_pan_of_food:"🥘",shamrock:"☘️",shark:"🦈",shaved_ice:"🍧",sheep:"🐑",shell:"🐚",shield:"🛡",shinto_shrine:"⛩",ship:"🚢",shirt:"👕",shopping:"🛍",shopping_cart:"🛒",shower:"🚿",shrimp:"🦐",signal_strength:"📶",six_pointed_star:"🔯",ski:"🎿",skier:"⛷",skull:"💀",skull_and_crossbones:"☠️",sleeping:"😴",sleeping_bed:"🛌",sleepy:"😪",slightly_frowning_face:"🙁",slightly_smiling_face:"🙂",slot_machine:"🎰",small_airplane:"🛩",small_blue_diamond:"🔹",small_orange_diamond:"🔸",small_red_triangle:"🔺",small_red_triangle_down:"🔻",smile:"😄",smile_cat:"😸",smiley:"😃",smiley_cat:"😺",smiling_imp:"😈",smirk:"😏",smirk_cat:"😼",smoking:"🚬",snail:"🐌",snake:"🐍",sneezing_face:"🤧",snowboarder:"🏂",snowflake:"❄️",snowman:"⛄️",snowman_with_snow:"☃️",sob:"😭",soccer:"⚽️",soon:"🔜",sos:"🆘",sound:"🔉",space_invader:"👾",spades:"♠️",spaghetti:"🍝",sparkle:"❇️",sparkler:"🎇",sparkles:"✨",sparkling_heart:"💖",speak_no_evil:"🙊",speaker:"🔈",speaking_head:"🗣",speech_balloon:"💬",speedboat:"🚤",spider:"🕷",spider_web:"🕸",spiral_calendar:"🗓",spiral_notepad:"🗒",spoon:"🥄",squid:"🦑",stadium:"🏟",star:"⭐️",star2:"🌟",star_and_crescent:"☪️",star_of_david:"✡️",stars:"🌠",station:"🚉",statue_of_liberty:"🗽",steam_locomotive:"🚂",stew:"🍲",stop_button:"⏹",stop_sign:"🛑",stopwatch:"⏱",straight_ruler:"📏",strawberry:"🍓",stuck_out_tongue:"😛",stuck_out_tongue_closed_eyes:"😝",stuck_out_tongue_winking_eye:"😜",studio_microphone:"🎙",stuffed_flatbread:"🥙",sun_behind_large_cloud:"🌥",sun_behind_rain_cloud:"🌦",sun_behind_small_cloud:"🌤",sun_with_face:"🌞",sunflower:"🌻",sunglasses:"😎",sunny:"☀️",sunrise:"🌅",sunrise_over_mountains:"🌄",surfing_man:"🏄",surfing_woman:"🏄‍♀️",sushi:"🍣",suspension_railway:"🚟",sweat:"😓",sweat_drops:"💦",sweat_smile:"😅",sweet_potato:"🍠",swimming_man:"🏊",swimming_woman:"🏊‍♀️",symbols:"🔣",synagogue:"🕍",syringe:"💉",taco:"🌮",tada:"🎉",tanabata_tree:"🎋",taurus:"♉️",taxi:"🚕",tea:"🍵",telephone_receiver:"📞",telescope:"🔭",tennis:"🎾",tent:"⛺️",thermometer:"🌡",thinking:"🤔",thought_balloon:"💭",ticket:"🎫",tickets:"🎟",tiger:"🐯",tiger2:"🐅",timer_clock:"⏲",tipping_hand_man:"💁‍♂️",tired_face:"😫",tm:"™️",toilet:"🚽",tokyo_tower:"🗼",tomato:"🍅",tongue:"👅",top:"🔝",tophat:"🎩",tornado:"🌪",trackball:"🖲",tractor:"🚜",traffic_light:"🚥",train:"🚋",train2:"🚆",tram:"🚊",triangular_flag_on_post:"🚩",triangular_ruler:"📐",trident:"🔱",triumph:"😤",trolleybus:"🚎",trophy:"🏆",tropical_drink:"🍹",tropical_fish:"🐠",truck:"🚚",trumpet:"🎺",tulip:"🌷",tumbler_glass:"🥃",turkey:"🦃",turtle:"🐢",tv:"📺",twisted_rightwards_arrows:"🔀",two_hearts:"💕",two_men_holding_hands:"👬",two_women_holding_hands:"👭",u5272:"🈹",u5408:"🈴",u55b6:"🈺",u6307:"🈯️",u6708:"🈷️",u6709:"🈶",u6e80:"🈵",u7121:"🈚️",u7533:"🈸",u7981:"🈲",u7a7a:"🈳",umbrella:"☔️",unamused:"😒",underage:"🔞",unicorn:"🦄",unlock:"🔓",up:"🆙",upside_down_face:"🙃",v:"✌️",vertical_traffic_light:"🚦",vhs:"📼",vibration_mode:"📳",video_camera:"📹",video_game:"🎮",violin:"🎻",virgo:"♍️",volcano:"🌋",volleyball:"🏐",vs:"🆚",vulcan_salute:"🖖",walking_man:"🚶",walking_woman:"🚶‍♀️",waning_crescent_moon:"🌘",waning_gibbous_moon:"🌖",warning:"⚠️",wastebasket:"🗑",watch:"⌚️",water_buffalo:"🐃",watermelon:"🍉",wave:"👋",wavy_dash:"〰️",waxing_crescent_moon:"🌒",wc:"🚾",weary:"😩",wedding:"💒",weight_lifting_man:"🏋️",weight_lifting_woman:"🏋️‍♀️",whale:"🐳",whale2:"🐋",wheel_of_dharma:"☸️",wheelchair:"♿️",white_check_mark:"✅",white_circle:"⚪️",white_flag:"🏳️",white_flower:"💮",white_large_square:"⬜️",white_medium_small_square:"◽️",white_medium_square:"◻️",white_small_square:"▫️",white_square_button:"🔳",wilted_flower:"🥀",wind_chime:"🎐",wind_face:"🌬",wine_glass:"🍷",wink:"😉",wolf:"🐺",woman:"👩",woman_artist:"👩‍🎨",woman_astronaut:"👩‍🚀",woman_cartwheeling:"🤸‍♀️",woman_cook:"👩‍🍳",woman_facepalming:"🤦‍♀️",woman_factory_worker:"👩‍🏭",woman_farmer:"👩‍🌾",woman_firefighter:"👩‍🚒",woman_health_worker:"👩‍⚕️",woman_judge:"👩‍⚖️",woman_juggling:"🤹‍♀️",woman_mechanic:"👩‍🔧",woman_office_worker:"👩‍💼",woman_pilot:"👩‍✈️",woman_playing_handball:"🤾‍♀️",woman_playing_water_polo:"🤽‍♀️",woman_scientist:"👩‍🔬",woman_shrugging:"🤷‍♀️",woman_singer:"👩‍🎤",woman_student:"👩‍🎓",woman_teacher:"👩‍🏫",woman_technologist:"👩‍💻",woman_with_turban:"👳‍♀️",womans_clothes:"👚",womans_hat:"👒",women_wrestling:"🤼‍♀️",womens:"🚺",world_map:"🗺",worried:"😟",wrench:"🔧",writing_hand:"✍️",x:"❌",yellow_heart:"💛",yen:"💴",yin_yang:"☯️",yum:"😋",zap:"⚡️",zipper_mouth_face:"🤐",zzz:"💤",octocat:'<img
width="20" height="20" align="absmiddle"
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAOwUlEQVR42uVbCVyO6RbPmn0sw9gZS0aZO4y5GTEUE2ObxjZjrbHEJVy3sWS5pkaWxjLEkCVDSbSgFLdESaWSLIVUSIi4kvb9f895vi/zbbR+yZ339/tbnu99n/ec/3Oe85xznufV0CjDBaAdwZqwnzCJ0FXjHV70/i8J5oQDhCFV8cJdq1atwqxZs+Ds7Iz4+HhqwgXCLELNKlK6G2Ej4e6lS5ewZcsWzJgxA+fOnWNZFqvzxT1v3boF/qcsBg0ahP3796OwsJAFWKYuIqjfPoS9cXFxWL58Obp06SInh5aWFr//jjoJWLlu3TolAorRuXNn7Ny5k4W4Spgj81xrgj5hLmED4RDhlNRygglBhADCSakpWxFMCHoETUJTwrYHDx7A1NT0je9nPHz4kN/fXl0EeI0aNeqtAjB69+4NPz8/FsSdlXvy5An8/f1hZ2cHCwsLGBsbY/To0cJy9PT0MGDAAAwePBhGRkbClNesWYODBw8iODgYOTk53M/d9evXo27duiW++8iRI3z/ZHURENOjR48ShSjGuHHjhHJ16tQp9TOKaNWqlZKpvw1MHluQOpSvk5eXh5YtW5ZbmarAvHnzmIBd6iCgXnZ2Npo1a1atCWAfwY5SHQTUKCoqQocOHao1AebmHBJgi7p8QBDP6epMwKFDvMDAWF0ELLS1ta3WBNy9e5cJMFIXAdvt7e2rNQHDhw9nAv5D+KKylV9y8+bNCi1pVYWZM2cyCfaVTcDdsqzH7xpBQRxcwqyylLdi5/K+KM/Q0dFhAqIri4Bn1T0AUgVpdmhYUeVHnD59+r1TnjF27Fgm4HhFCThoYmLyXhLQoEGD4mRKsyIE3OrZs+d7SQCDCyZcNSqv8k1evXoFTU3NUr+wzUcfYqRBf8yb/C2WzfoBFoTF08fBdMIITDD8CsP1+kL30x7Q6dYZH7drjfZ0f4fWLdG1Q1t81qMLBvTRwejB/TBl1BDMnzQGS2dMxKo5k7Fs9iSY/jAaBvR8Pc26pZaH02quLZSXgO6xsbGlelGnli1wZKcVMqN8gKcRwItrf+K/VB95doXaLwOJIVSzOU/+2Re5kV7IuuyJrIhTyLt6mmztLBBPNZLHoUAy9fE8UvJ8ikxfj8PwJPQErJeYlkquTZs2MQFLykuANgc/Jb2kn3Z3ZMaQUrmxwO1zyAo7gfRAJ6RfOIyMEFdkXj5F8BTK5lzxQv610yi8QcFatI8gQoCIK7x+hojwRnaE5H4JTiEj9Pjr/rJDqcZyn9b4ovu45LYbdWvXeqtsXMHiSlZ5CegRExPz1hd83PYj5POo0QinXyLFg48hnZTOiQ1Dzr1IZEaeQRoJn0HKZIR7lA2kfHrQUerXHTlx4ZL+rnjjFRGRGeYB5MUj2GnbW+XbuJFrp1heXgI6JCYmvvUFN1x3Aek3SWkapRAXMeJFGS8ge2Xfuog0toaykED3Mpk8+shOk+sv68Y50V9WuKewBKt5094o39atW/mRf5WXgIYZGRlo3Lixys4nj6A6Z1YMcqRCpwU4ouDlUyHk/QA/hNttR25Wlvh/ZthJUsil9ATQ/axkYbqEzDgfL0Ts/x35+aLyTES7IY36Q6w/+Q4/tP6wuUoZ9+7dy7ebVmQZjO/atavKzn32rAdeXkd6KCkXdAxZ13yFcLFnvPD73zrDVrsdTs6eggKSuSjjORHkUGoC0i86Iyc6QPQX7eqMnTodYNuzHU4vnosiaitMSUSavwMy6d3IvEUrzViVMrq5uXEX4ytCgL++vr5Sx7Vr1cIDX0dKkQJfj37Rs3jw1sBxkwlwGD4Ax3+ciN1faCHW76xQRFgAOcjSEMBkIe0x8nLzcez7kTg8Rh/uxuOxR/cTJISFSfq7eATpZCk8CAfXLVFJwIULXHnHoIoQYLtw4UKljps2aogXQcQuef/XAiMDKY+S4DhyEFwpDnCj9f+Afl8EbbWRTANaAdihlYoAMn8aZzyNuYODX/eD29TvRH/7v+qN8H27JdOAyWQfQQ74xPafVRLAPox9WUlK6hIGEgx4f00Kg2JcvHhRqeP6FIwknXemyen/2gLIIeC/CYk49M0AuE4xgtu0sThg8AUCN62TEuBdRgJo2Y+Kxh9D/k59SQiwH9QHobt3SAk4KSGA4oWjm1YqyVi8U6Soj4yOrHM/jTAyKVby/PnzIoNi8L+L4eXlpXoFcLcTgc1rAlISkJeXDxeK2A6P1hdTwI6mQPTJE+WbAlnJyE7PhNO3Q3BkrKGYWtxfHMkkmQLO0ilwA7+vXqAkn66urtBLUZ9iHfm30NBQaPAf165dA0d9vP2UlJSEp0+f4vHjx3j06JH4e+rUqUovcNmyGkiNEkLwklXsBG+ecMUOnfbYod1emG5uboFKJ8jPFVD0l0dBUHqoPDHpQeQEb0qc4FUHe3KAbYUT9JgzDbwOFL5MfN0fXkXhJ5PxSvLt2LFD1Ah5u4z1YJ14l4qnBe8v3rhxAzz4PAVG8nLHivIP0dHRiIiIQGRkpEgmrl69ClW1QBMjQ7LDW8hmU+RRI69ckJIkhL7jfRJBm62R+TJVYq6h0jhBRslsivqenT2MF/7OyI70VmkFhWnPJaS6OyPkt43IycqR9EfWlH7JDQUUTuNhCHR7Ke9YcRp/5coVoQPrcvnyZURFRYmBZlLS0kR8MVLD29sbnp6e8PHxQUBAgCgn8YO8E3z79m3BGKeVc+bMkXuBZt06SA12F/F5Go0gR4C8HBalPZMPXKL8lQKhPAqF+f97KXFyNx6HQsoPsshJ/kmAp2TKkJLISpXvjyxNhMYcDVLOEO+lPDi8B5mamipkZx1YF9YpJCRErAy+vr5CZ9ZdWABhDGEYYTBhAOFz3g4nfMJelNCbkNCpUye5F034mvxIPi1/FM+zQCw0k5B9O0iEr5kRXkqhMJOVf9NXIHjtT7hmaymSoBzKETimkAuFpaF1dkwI9RcmIYaXv3BJXoGCuyIgk5WpefPmKCgoYK46SmX/RKoL69Sfl0WuFEl1HlmWJXE5z6WmTZvKJxxmxkIQ3AuU5APk6NICj4hRT6eITTEEzqWk55HHPjz3cxJhNF5cxeNT9kj2cRDTQjEkzpDtjyyCic5l5fEA7uSHFEefR5pPsahrb2B9QkICFHeJ51HunkdLIg0VLY0BFKdLwllVHp4dHyvst3QuEiiju21vA/+VZkiluIKt4I3RIfWXQ4QgKUxkni47LJWUP3PmjHo2RxVI+CebmKJP6EiFDVurxUgmExe5PHlnPAkn8w4QqW62NCVmYopozid5H0CI9RKE21ggJeAYEeMnfitOnRn5XCfgeJ+VTosWQU8MOc6ZE0cqnUm4fv165SrPBVHCfMI4TowUfmOfsIcdJh92kBWmUcP6GDt8EDZbzIffH5tx3/ewSFjw5LKk0MEFEkZenDBjgew7Yiog5brkt+QrknvJmhIp4Apw/A1bVpjhG/0v5d7Vrl07bNu2TelUSqUoz8uI3Z49OEtBAy+TdP1CqKtwHzvQUxxgTJs2TeX5gdq1a0ObSmCjh+jB+NuvRamL1+3ls77HCip1rTSdJP5eNnMizKndjMLoH42G4bthX+FzHS3UVVEC69evH3799VeKMXJZrlWKclUGAZ5jxoxB02ZNsNlxH74aagBHZyex986HlVTczyGmI58h4CjL2toa48ePFxsUPEotWrQoc0GT0/C2bduiY8eO4ISMcxLeoOFYhS6qm2EpoZG65jmbv+dPSyRZlt5QfVjvtX19AOFNL+aDFNI4m0eFc9Ho5ORkaGtrl5kAVp6DMOk88efEjLe++ZhclZwHTJHEHbs4YOCmLj2645fdvwnTK42zoXtaEHwNDQ3LXdZm5yad3/2r+gQmDsRnIF5KAldX6zdsgG/GG8F44Vzcu3eP2y1K6GPr2rVrK1zbnz59Or/LoaoJCPZ4kCZsjw9GECL79OmDj9q2wb+320C3/5fgPQO6Vrzh+fpcDqxXr16lbHBwgkZXm6okYJr0ECMrX5vraiJ1lArEjrEnzWuOqemiYj9spGd2ee478XkiPsJakmJ83qA05/8qXNurJFLiunXrhpo1a6LxB02wyHIFZpovgOHwYfjZ0hK2lH5u2rwZ5suWYv5ycyUlmjRpgl69eimlrFy3kwuoyOvXr19frm3RokVMwPZ3TYC57E6xVq+e6KzVDSaL/oEp82Zh8IhhWLjGAp/p9oX5ujVKBNjY2MDV1VWuzd3dXaTesm2biUQuZ8u28elSPmKr8a4vdog8GnJpcT1N1KHUuBbt0jSgWuGbzJh3mVhh2TYHBwdxjFa2jVcZnvPVlQBOLXdZWlqW2ZFxNYYVlm07fPgwAgMD5dr4OD5HeHLFFxM+O42DGtXhIkFaMQlcUjIzM0P37t1Ro0YNpZPjPJcVK7SOjo5ybU5OTqIAo0gAh97VlgAZIj4l8Pn4WFaO64ocuXG6zJtDbMqySnC7IgF8uptLVrJtq1evFuWqak+A4j4i4TNpltiJ8LPiNFFFwNGjRyWFyfedAFUny/joekkEuLi4KK0CfykCeFnkiu1flgBeFtl3/D8SsMbKykpOifv37ysRcPz4cVHKUiSA8wwNdR9/VTMBSh9Y8S4Nf2qnSICiBbDzVCRg9uzZTMC+94kAv6FDh8opwRsVHPjItnl4eEDxHNLKlStFXV+2javQ/M1SpZe+1KA4L4G7WDG57fSm/OUbXiqG0ewAFYOeYcN4fwZhvLkp2y4tftrxcltdlf/w+fPn4qNGxTCYU2m6nrRu3VqunT/EoiuZvw6TTZHpyuNNmEaNGsndP3fu3OJAq1N1JOAHDmyKheVtNP4OkE2crULRAW7fvl20EyyLy24a8p+/7WISFixYIMLt4t82bNhQYjXqXREgPq3j74mlX3AmSL8E1eOPIBXnuVT5OsVZpuLnOMeOHeN7vifwiYhYzhC5IpwlOXj1QXWdBmy/XWU/X+UqMZfKBw4cKAobHPlJlZe9h6tOu+7cuSN2dg0MDMSSyZUpmXvaSD+crq/xvl0k9BTCRa7qEPq+5T4t6ffF52WVV+f1P6zyLG30bsU4AAAAAElFTkSuQmCC">',showdown:'<img
width="20" height="20" align="absmiddle"
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAECtaVRYdFhNTDpjb20uYWRvYmUueG1wAAAAAAA8P3hwYWNrZXQgYmVnaW49Iu+7vyIgaWQ9Ilc1TTBNcENlaGlIenJlU3pOVGN6a2M5ZCI/Pgo8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJBZG9iZSBYTVAgQ29yZSA1LjYtYzA2NyA3OS4xNTc3NDcsIDIwMTUvMDMvMzAtMjM6NDA6NDIgICAgICAgICI+CiAgIDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOnhtcD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLyIKICAgICAgICAgICAgeG1sbnM6cGhvdG9zaG9wPSJodHRwOi8vbnMuYWRvYmUuY29tL3Bob3Rvc2hvcC8xLjAvIgogICAgICAgICAgICB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iCiAgICAgICAgICAgIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIgogICAgICAgICAgICB4bWxuczpzdEV2dD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlRXZlbnQjIgogICAgICAgICAgICB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIKICAgICAgICAgICAgeG1sbnM6dGlmZj0iaHR0cDovL25zLmFkb2JlLmNvbS90aWZmLzEuMC8iCiAgICAgICAgICAgIHhtbG5zOmV4aWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20vZXhpZi8xLjAvIj4KICAgICAgICAgPHhtcDpDcmVhdG9yVG9vbD5BZG9iZSBQaG90b3Nob3AgQ0MgMjAxNSAoV2luZG93cyk8L3htcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhtcDpDcmVhdGVEYXRlPjIwMTUtMDEtMTVUMjE6MDE6MTlaPC94bXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhtcDpNZXRhZGF0YURhdGU+MjAxNy0xMC0yNFQxMzozMTozMCswMTowMDwveG1wOk1ldGFkYXRhRGF0ZT4KICAgICAgICAgPHhtcDpNb2RpZnlEYXRlPjIwMTctMTAtMjRUMTM6MzE6MzArMDE6MDA8L3htcDpNb2RpZnlEYXRlPgogICAgICAgICA8cGhvdG9zaG9wOkNvbG9yTW9kZT4zPC9waG90b3Nob3A6Q29sb3JNb2RlPgogICAgICAgICA8cGhvdG9zaG9wOklDQ1Byb2ZpbGU+c1JHQiBJRUM2MTk2Ni0yLjE8L3Bob3Rvc2hvcDpJQ0NQcm9maWxlPgogICAgICAgICA8cGhvdG9zaG9wOlRleHRMYXllcnM+CiAgICAgICAgICAgIDxyZGY6QmFnPgogICAgICAgICAgICAgICA8cmRmOmxpIHJkZjpwYXJzZVR5cGU9IlJlc291cmNlIj4KICAgICAgICAgICAgICAgICAgPHBob3Rvc2hvcDpMYXllck5hbWU+UyAtPC9waG90b3Nob3A6TGF5ZXJOYW1lPgogICAgICAgICAgICAgICAgICA8cGhvdG9zaG9wOkxheWVyVGV4dD5TIC08L3Bob3Rvc2hvcDpMYXllclRleHQ+CiAgICAgICAgICAgICAgIDwvcmRmOmxpPgogICAgICAgICAgICA8L3JkZjpCYWc+CiAgICAgICAgIDwvcGhvdG9zaG9wOlRleHRMYXllcnM+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgICAgIDx4bXBNTTpJbnN0YW5jZUlEPnhtcC5paWQ6N2NkMzQxNzctOWYyZi0yNDRiLWEyYjQtMzU1MzJkY2Y1MWJiPC94bXBNTTpJbnN0YW5jZUlEPgogICAgICAgICA8eG1wTU06RG9jdW1lbnRJRD5hZG9iZTpkb2NpZDpwaG90b3Nob3A6M2E1YzgxYmYtYjhiNy0xMWU3LTk0NDktYTQ2MzdlZjJkNjMzPC94bXBNTTpEb2N1bWVudElEPgogICAgICAgICA8eG1wTU06T3JpZ2luYWxEb2N1bWVudElEPnhtcC5kaWQ6NjBDNUFFNjVGNjlDRTQxMTk0NUE4NTVFM0JDQTdFRUI8L3htcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD4KICAgICAgICAgPHhtcE1NOkhpc3Rvcnk+CiAgICAgICAgICAgIDxyZGY6U2VxPgogICAgICAgICAgICAgICA8cmRmOmxpIHJkZjpwYXJzZVR5cGU9IlJlc291cmNlIj4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OmFjdGlvbj5jcmVhdGVkPC9zdEV2dDphY3Rpb24+CiAgICAgICAgICAgICAgICAgIDxzdEV2dDppbnN0YW5jZUlEPnhtcC5paWQ6NjBDNUFFNjVGNjlDRTQxMTk0NUE4NTVFM0JDQTdFRUI8L3N0RXZ0Omluc3RhbmNlSUQ+CiAgICAgICAgICAgICAgICAgIDxzdEV2dDp3aGVuPjIwMTUtMDEtMTVUMjE6MDE6MTlaPC9zdEV2dDp3aGVuPgogICAgICAgICAgICAgICAgICA8c3RFdnQ6c29mdHdhcmVBZ2VudD5BZG9iZSBQaG90b3Nob3AgQ1M2IChXaW5kb3dzKTwvc3RFdnQ6c29mdHdhcmVBZ2VudD4KICAgICAgICAgICAgICAgPC9yZGY6bGk+CiAgICAgICAgICAgICAgIDxyZGY6bGkgcmRmOnBhcnNlVHlwZT0iUmVzb3VyY2UiPgogICAgICAgICAgICAgICAgICA8c3RFdnQ6YWN0aW9uPnNhdmVkPC9zdEV2dDphY3Rpb24+CiAgICAgICAgICAgICAgICAgIDxzdEV2dDppbnN0YW5jZUlEPnhtcC5paWQ6ODZjNjBkMGQtOGY0Yy01ZTRlLWEwMjQtODI4ZWQyNTIwZDc3PC9zdEV2dDppbnN0YW5jZUlEPgogICAgICAgICAgICAgICAgICA8c3RFdnQ6d2hlbj4yMDE3LTEwLTI0VDEzOjMxOjMwKzAxOjAwPC9zdEV2dDp3aGVuPgogICAgICAgICAgICAgICAgICA8c3RFdnQ6c29mdHdhcmVBZ2VudD5BZG9iZSBQaG90b3Nob3AgQ0MgMjAxNSAoV2luZG93cyk8L3N0RXZ0OnNvZnR3YXJlQWdlbnQ+CiAgICAgICAgICAgICAgICAgIDxzdEV2dDpjaGFuZ2VkPi88L3N0RXZ0OmNoYW5nZWQ+CiAgICAgICAgICAgICAgIDwvcmRmOmxpPgogICAgICAgICAgICAgICA8cmRmOmxpIHJkZjpwYXJzZVR5cGU9IlJlc291cmNlIj4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OmFjdGlvbj5jb252ZXJ0ZWQ8L3N0RXZ0OmFjdGlvbj4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OnBhcmFtZXRlcnM+ZnJvbSBhcHBsaWNhdGlvbi92bmQuYWRvYmUucGhvdG9zaG9wIHRvIGltYWdlL3BuZzwvc3RFdnQ6cGFyYW1ldGVycz4KICAgICAgICAgICAgICAgPC9yZGY6bGk+CiAgICAgICAgICAgICAgIDxyZGY6bGkgcmRmOnBhcnNlVHlwZT0iUmVzb3VyY2UiPgogICAgICAgICAgICAgICAgICA8c3RFdnQ6YWN0aW9uPmRlcml2ZWQ8L3N0RXZ0OmFjdGlvbj4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OnBhcmFtZXRlcnM+Y29udmVydGVkIGZyb20gYXBwbGljYXRpb24vdm5kLmFkb2JlLnBob3Rvc2hvcCB0byBpbWFnZS9wbmc8L3N0RXZ0OnBhcmFtZXRlcnM+CiAgICAgICAgICAgICAgIDwvcmRmOmxpPgogICAgICAgICAgICAgICA8cmRmOmxpIHJkZjpwYXJzZVR5cGU9IlJlc291cmNlIj4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OmFjdGlvbj5zYXZlZDwvc3RFdnQ6YWN0aW9uPgogICAgICAgICAgICAgICAgICA8c3RFdnQ6aW5zdGFuY2VJRD54bXAuaWlkOjdjZDM0MTc3LTlmMmYtMjQ0Yi1hMmI0LTM1NTMyZGNmNTFiYjwvc3RFdnQ6aW5zdGFuY2VJRD4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OndoZW4+MjAxNy0xMC0yNFQxMzozMTozMCswMTowMDwvc3RFdnQ6d2hlbj4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OnNvZnR3YXJlQWdlbnQ+QWRvYmUgUGhvdG9zaG9wIENDIDIwMTUgKFdpbmRvd3MpPC9zdEV2dDpzb2Z0d2FyZUFnZW50PgogICAgICAgICAgICAgICAgICA8c3RFdnQ6Y2hhbmdlZD4vPC9zdEV2dDpjaGFuZ2VkPgogICAgICAgICAgICAgICA8L3JkZjpsaT4KICAgICAgICAgICAgPC9yZGY6U2VxPgogICAgICAgICA8L3htcE1NOkhpc3Rvcnk+CiAgICAgICAgIDx4bXBNTTpEZXJpdmVkRnJvbSByZGY6cGFyc2VUeXBlPSJSZXNvdXJjZSI+CiAgICAgICAgICAgIDxzdFJlZjppbnN0YW5jZUlEPnhtcC5paWQ6ODZjNjBkMGQtOGY0Yy01ZTRlLWEwMjQtODI4ZWQyNTIwZDc3PC9zdFJlZjppbnN0YW5jZUlEPgogICAgICAgICAgICA8c3RSZWY6ZG9jdW1lbnRJRD54bXAuZGlkOjYwQzVBRTY1RjY5Q0U0MTE5NDVBODU1RTNCQ0E3RUVCPC9zdFJlZjpkb2N1bWVudElEPgogICAgICAgICAgICA8c3RSZWY6b3JpZ2luYWxEb2N1bWVudElEPnhtcC5kaWQ6NjBDNUFFNjVGNjlDRTQxMTk0NUE4NTVFM0JDQTdFRUI8L3N0UmVmOm9yaWdpbmFsRG9jdW1lbnRJRD4KICAgICAgICAgPC94bXBNTTpEZXJpdmVkRnJvbT4KICAgICAgICAgPHRpZmY6T3JpZW50YXRpb24+MTwvdGlmZjpPcmllbnRhdGlvbj4KICAgICAgICAgPHRpZmY6WFJlc29sdXRpb24+NzIwMDAwLzEwMDAwPC90aWZmOlhSZXNvbHV0aW9uPgogICAgICAgICA8dGlmZjpZUmVzb2x1dGlvbj43MjAwMDAvMTAwMDA8L3RpZmY6WVJlc29sdXRpb24+CiAgICAgICAgIDx0aWZmOlJlc29sdXRpb25Vbml0PjI8L3RpZmY6UmVzb2x1dGlvblVuaXQ+CiAgICAgICAgIDxleGlmOkNvbG9yU3BhY2U+MTwvZXhpZjpDb2xvclNwYWNlPgogICAgICAgICA8ZXhpZjpQaXhlbFhEaW1lbnNpb24+NjQ8L2V4aWY6UGl4ZWxYRGltZW5zaW9uPgogICAgICAgICA8ZXhpZjpQaXhlbFlEaW1lbnNpb24+NjQ8L2V4aWY6UGl4ZWxZRGltZW5zaW9uPgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAKPD94cGFja2V0IGVuZD0idyI/Pse7bzcAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAA1JJREFUeNrsm1+OmlAUhz+aeS9dwZggJn1AnRUMO6jpBgZXULuC2hWUWUGZBTSxKyiuoA4mfUBMnB04K5g+9DihRBHlyh/lJLwIXLgf99xzzu9etZeXFy7Z3nDh1gBoAFy4XeVtQNO0zNcapmUDfUBPnFoBfhQGq6IBaHmjwD4Ahmk5wAD4kKG5J8CNwsAFaHe6DvA9cc0wCgOv8gDka3vA9RHNPgo0D7hNnJtGYWBXxgV2dH4MfMnRRA+Y1WIO2NJ5F/ikoKm3tYsChmkNFHW+fmHQMC1dfHaXPQP3wM1yMdc2B/AOGALTWobBmI1Shu0UGCwX83XyRBQGawHntTtdG5gUNfxVu4CTNqNv6/wWGL7kCc+1AmCYVisl3I2ydD4GYZUCs7IjoLXrxHIx9w9tLAqDCfBwDrXAY457x+cAoCfuwRGjYFUnAGk+PsjR7s8Dn1VeLWCYVlpDw+VivjVHSHt+u9PVJbzGzZXQWTkAkz0V31fATUaEsjVJlQBs4FeGcteLgzgbAALBA+4y3voAeJL8nA0AHfClnM1qm1HhnYUidCSE+KzvSSJUTwAxCOMcpfETMFYpfRUKIAbCFhC3OTJJJwqDWS0BxED0JZ4Pjix1P2+E0loCSMBwyK4S/xc1ojBwag8gMU84cvTKGgmlAYhngu1O9xAXuVE5J1QCQCz3bwHuHvdQui5QKQAxEO6eEKpsFCgTRSXkvdoxSlBMCxhJJbgrrbZRtHCiShN0pRB6PeQ3ckBw2K0oKXMBVYJIP+Nvh9qulFivGoBt1lLQxowT2ykBXCfnhZIglgYACWmqXQv+baioBYCeiCQHm+QEg1O7RhF7hO4OhSAhcJKSFU7qBGADwZeqMMuXn6TUBw8qlaMrirNb4LdhWlP+SWD+cjFfxTpuS2GUpik+o3jFSEkqbJiWn0P0OMSGqlWiOu0TvD+FRHZKAE+oW+cfRmEwqlsesJJEJs8y91QqP+9UL6lqEtz2gpuNEY5sm9sIHln2DRa2aFKGJtiXkZEMiWtgVvRKUSUFkSKt2S7fAGgAXLYpmQQXf36MUChTZdUa2u8/rkvPA6Tz30r4eH3ybcBS5gJ6SaNXb+aABkA1AMxKenclBZLW/He4cYEGwEXb3wEASelexk6LIIIAAAAASUVORK5CYII=">'},I.Converter=function(g){"use
strict";function
C(g,C){if(C=C||null,I.helper.isString(g)){if(g=I.helper.stdExtName(g),C=g,I.extensions[g])return
console.warn("DEPRECATION WARNING: "+g+" is an old extension
that uses a deprecated loading method.Please inform the developer that the
extension should be updated!"),void
e(I.extensions[g],g);if(I.helper.isUndefined(r[g]))throw
Error('Extension "'+g+'" could not be loaded. It
was either not found or is not a valid
extension.');g=r[g]}"function"==typeof
g&&(g=g()),I.helper.isArray(g)||(g=[g]);var
t=A(g,C);if(!t.valid)throw Error(t.error);for(var
a=0;a<g.length;++a){switch(g[a].type){case"lang":l.push(g[a]);break;case"output":c.push(g[a])}if(g[a].hasOwnProperty("listeners"))for(var
n in
g[a].listeners)g[a].listeners.hasOwnProperty(n)&&o(n,g[a].listeners[n])}}function
e(g,C){"function"==typeof g&&(g=g(new
I.Converter)),I.helper.isArray(g)||(g=[g]);var e=A(g,C);if(!e.valid)throw
Error(e.error);for(var
r=0;r<g.length;++r)switch(g[r].type){case"lang":l.push(g[r]);break;case"output":c.push(g[r]);break;default:throw
Error("Extension loader error: Type unrecognized!!!")}}function
o(g,A){if(!I.helper.isString(g))throw Error("Invalid argument in
converter.listen() method: name must be a string, but "+typeof
g+" given");if("function"!=typeof A)throw
Error("Invalid argument in converter.listen() method: callback must be
a function, but "+typeof A+"
given");u.hasOwnProperty(g)||(u[g]=[]),u[g].push(A)}function s(g){var
A=g.match(/^\s*/)[0].length,C=new
RegExp("^\\s{0,"+A+"}","gm");return
g.replace(C,"")}var
i={},l=[],c=[],u={},p=a;!function(){g=g||{};for(var A in
t)t.hasOwnProperty(A)&&(i[A]=t[A]);if("object"!=typeof
g)throw Error("Converter expects the passed parameter to be an object,
but "+typeof g+" was passed instead.");for(var e in
g)g.hasOwnProperty(e)&&(i[e]=g[e]);i.extensions&&I.helper.forEach(i.extensions,C)}(),this._dispatch=function(g,A,C,I){if(u.hasOwnProperty(g))for(var
e=0;e<u[g].length;++e){var r=u[g][e](g,A,this,C,I);r&&void
0!==r&&(A=r)}return A},this.listen=function(g,A){return
o(g,A),this},this.makeHtml=function(g){if(!g)return g;var
A={gHtmlBlocks:[],gHtmlMdBlocks:[],gHtmlSpans:[],gUrls:{},gTitles:{},gDimensions:{},gListLevel:0,hashLinkCounts:{},langExtensions:l,outputModifiers:c,converter:this,ghCodeBlocks:[]};return
g=g.replace(/¨/g,"¨T"),g=g.replace(/\$/g,"¨D"),g=g.replace(/\r\n/g,"\n"),g=g.replace(/\r/g,"\n"),g=g.replace(/\u00A0/g,"
"),i.smartIndentationFix&&(g=s(g)),g="\n\n"+g+"\n\n",g=I.subParser("detab")(g,i,A),g=g.replace(/^[
\t]+$/gm,""),I.helper.forEach(l,function(C){g=I.subParser("runExtension")(C,g,i,A)}),g=I.subParser("hashPreCodeTags")(g,i,A),g=I.subParser("githubCodeBlocks")(g,i,A),g=I.subParser("hashHTMLBlocks")(g,i,A),g=I.subParser("hashCodeTags")(g,i,A),g=I.subParser("stripLinkDefinitions")(g,i,A),g=I.subParser("blockGamut")(g,i,A),g=I.subParser("unhashHTMLSpans")(g,i,A),g=I.subParser("unescapeSpecialChars")(g,i,A),g=g.replace(/¨D/g,"$$"),g=g.replace(/¨T/g,"¨"),I.helper.forEach(c,function(C){g=I.subParser("runExtension")(C,g,i,A)}),g},this.setOption=function(g,A){i[g]=A},this.getOption=function(g){return
i[g]},this.getOptions=function(){return
i},this.addExtension=function(g,A){C(g,A=A||null)},this.useExtension=function(g){C(g)},this.setFlavor=function(g){if(!n.hasOwnProperty(g))throw
Error(g+" flavor was not found");var A=n[g];p=g;for(var C in
A)A.hasOwnProperty(C)&&(i[C]=A[C])},this.getFlavor=function(){return
p},this.removeExtension=function(g){I.helper.isArray(g)||(g=[g]);for(var
A=0;A<g.length;++A){for(var
C=g[A],e=0;e<l.length;++e)l[e]===C&&l[e].splice(e,1);for(;0<c.length;++e)c[0]===C&&c[0].splice(e,1)}},this.getAllExtensions=function(){return{language:l,output:c}}},I.subParser("anchors",function(g,A,C){"use
strict";var
e=function(g,e,r,t,a,n,o){if(I.helper.isUndefined(o)&&(o=""),r=r.toLowerCase(),g.search(/\(<?\s*>?
?(['"].*['"])?\)$/m)>-1)t="";else
if(!t){if(r||(r=e.toLowerCase().replace(/ ?\n/g,"
")),t="#"+r,I.helper.isUndefined(C.gUrls[r]))return
g;t=C.gUrls[r],I.helper.isUndefined(C.gTitles[r])||(o=C.gTitles[r])}var
s='<a
href="'+(t=t.replace(I.helper.regexes.asteriskDashAndColon,I.helper.escapeCharactersCallback))+'"';return""!==o&&null!==o&&(s+='
title="'+(o=(o=o.replace(/"/g,""")).replace(I.helper.regexes.asteriskDashAndColon,I.helper.escapeCharactersCallback))+'"'),A.openLinksInNewWindow&&(s+='
target="¨E95Eblank"'),s+=">"+e+"</a>"};return
g=(g=C.converter._dispatch("anchors.before",g,A,C)).replace(/\[((?:\[[^\]]*]|[^\[\]])*)]
?(?:\n *)?\[(.*?)]()()()()/g,e),g=g.replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[
\t]*\([ \t]?<([^>]*)>(?:[ \t]*((["'])([^"]*?)\5))?[
\t]?\)/g,e),g=g.replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([
\t]?<?([\S]+?(?:\([\S]*?\)[\S]*?)?)>?(?:[
\t]*((["'])([^"]*?)\5))?[
\t]?\)/g,e),g=g.replace(/\[([^\[\]]+)]()()()()()/g,e),A.ghMentions&&(g=g.replace(/(^|\s)(\\)?(@([a-z\d\-]+))(?=[.!?;,[\]()]|\s|$)/gim,function(g,C,e,r,t){if("\\"===e)return
C+r;if(!I.helper.isString(A.ghMentionsLink))throw new
Error("ghMentionsLink option must be a string");var
a=A.ghMentionsLink.replace(/\{u}/g,t),n="";return
A.openLinksInNewWindow&&(n='
target="¨E95Eblank"'),C+'<a
href="'+a+'"'+n+">"+r+"</a>"})),g=C.converter._dispatch("anchors.after",g,A,C)});var
s=/([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+?\.[^'">\s]+?)()(\1)?(?=\s|$)(?!["<>])/gi,i=/([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+\.[^'">\s]+?)([.!?,()\[\]])?(\1)?(?=\s|$)(?!["<>])/gi,l=/()<(((https?|ftp|dict):\/\/|www\.)[^'">\s]+)()>()/gi,c=/(^|\s)(?:mailto:)?([A-Za-z0-9!#$%&'*+-/=?^_`{|}~.]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)(?=$|\s)/gim,u=/<()(?:mailto:)?([-.\w]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)>/gi,p=function(g){"use
strict";return function(A,C,e,r,t,a,n){var
o=e=e.replace(I.helper.regexes.asteriskDashAndColon,I.helper.escapeCharactersCallback),s="",i="",l=C||"",c=n||"";return/^www\./i.test(e)&&(e=e.replace(/^www\./i,"http://www.")),g.excludeTrailingPunctuationFromURLs&&a&&(s=a),g.openLinksInNewWindow&&(i='
target="¨E95Eblank"'),l+'<a
href="'+e+'"'+i+">"+o+"</a>"+s+c}},d=function(g,A){"use
strict";return function(C,e,r){var t="mailto:";return
e=e||"",r=I.subParser("unescapeSpecialChars")(r,g,A),g.encodeEmails?(t=I.helper.encodeEmailAddress(t+r),r=I.helper.encodeEmailAddress(r)):t+=r,e+'<a
href="'+t+'">'+r+"</a>"}};I.subParser("autoLinks",function(g,A,C){"use
strict";return
g=C.converter._dispatch("autoLinks.before",g,A,C),g=g.replace(l,p(A)),g=g.replace(u,d(A,C)),g=C.converter._dispatch("autoLinks.after",g,A,C)}),I.subParser("simplifiedAutoLinks",function(g,A,C){"use
strict";return
A.simplifiedAutoLink?(g=C.converter._dispatch("simplifiedAutoLinks.before",g,A,C),g=A.excludeTrailingPunctuationFromURLs?g.replace(i,p(A)):g.replace(s,p(A)),g=g.replace(c,d(A,C)),g=C.converter._dispatch("simplifiedAutoLinks.after",g,A,C)):g}),I.subParser("blockGamut",function(g,A,C){"use
strict";return
g=C.converter._dispatch("blockGamut.before",g,A,C),g=I.subParser("blockQuotes")(g,A,C),g=I.subParser("headers")(g,A,C),g=I.subParser("horizontalRule")(g,A,C),g=I.subParser("lists")(g,A,C),g=I.subParser("codeBlocks")(g,A,C),g=I.subParser("tables")(g,A,C),g=I.subParser("hashHTMLBlocks")(g,A,C),g=I.subParser("paragraphs")(g,A,C),g=C.converter._dispatch("blockGamut.after",g,A,C)}),I.subParser("blockQuotes",function(g,A,C){"use
strict";return
g=C.converter._dispatch("blockQuotes.before",g,A,C),g=g.replace(/((^
{0,3}>[ \t]?.+\n(.+\n)*\n*)+)/gm,function(g,e){var r=e;return
r=r.replace(/^[ \t]*>[
\t]?/gm,"¨0"),r=r.replace(/¨0/g,""),r=r.replace(/^[
\t]+$/gm,""),r=I.subParser("githubCodeBlocks")(r,A,C),r=I.subParser("blockGamut")(r,A,C),r=r.replace(/(^|\n)/g,"$1
"),r=r.replace(/(\s*<pre>[^\r]+?<\/pre>)/gm,function(g,A){var
C=A;return C=C.replace(/^
/gm,"¨0"),C=C.replace(/¨0/g,"")}),I.subParser("hashBlock")("<blockquote>\n"+r+"\n</blockquote>",A,C)}),g=C.converter._dispatch("blockQuotes.after",g,A,C)}),I.subParser("codeBlocks",function(g,A,C){"use
strict";g=C.converter._dispatch("codeBlocks.before",g,A,C);var
e=/(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^
\t\n]|(?=¨0))/g;return
g=(g+="¨0").replace(e,function(g,e,r){var
t=e,a=r,n="\n";return
t=I.subParser("outdent")(t,A,C),t=I.subParser("encodeCode")(t,A,C),t=I.subParser("detab")(t,A,C),t=t.replace(/^\n+/g,""),t=t.replace(/\n+$/g,""),A.omitExtraWLInCodeBlocks&&(n=""),t="<pre><code>"+t+n+"</code></pre>",I.subParser("hashBlock")(t,A,C)+a}),g=g.replace(/¨0/,""),g=C.converter._dispatch("codeBlocks.after",g,A,C)}),I.subParser("codeSpans",function(g,A,C){"use
strict";return void
0===(g=C.converter._dispatch("codeSpans.before",g,A,C))&&(g=""),g=g.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,function(g,e,r,t){var
a=t;return a=a.replace(/^([ \t]*)/g,""),a=a.replace(/[
\t]*$/g,""),a=I.subParser("encodeCode")(a,A,C),e+"<code>"+a+"</code>"}),g=C.converter._dispatch("codeSpans.after",g,A,C)}),I.subParser("detab",function(g,A,C){"use
strict";return
g=C.converter._dispatch("detab.before",g,A,C),g=g.replace(/\t(?=\t)/g,"
"),g=g.replace(/\t/g,"¨A¨B"),g=g.replace(/¨B(.+?)¨A/g,function(g,A){for(var
C=A,I=4-C.length%4,e=0;e<I;e++)C+=" ";return
C}),g=g.replace(/¨A/g,"
"),g=g.replace(/¨B/g,""),g=C.converter._dispatch("detab.after",g,A,C)}),I.subParser("ellipsis",function(g,A,C){"use
strict";return
g=C.converter._dispatch("ellipsis.before",g,A,C),g=g.replace(/\.\.\./g,"…"),g=C.converter._dispatch("ellipsis.after",g,A,C)}),I.subParser("emoji",function(g,A,C){"use
strict";if(!A.emoji)return g;var e=/:([\S]+?):/g;return
g=(g=C.converter._dispatch("emoji.before",g,A,C)).replace(e,function(g,A){return
I.helper.emojis.hasOwnProperty(A)?I.helper.emojis[A]:g}),g=C.converter._dispatch("emoji.after",g,A,C)}),I.subParser("encodeAmpsAndAngles",function(g,A,C){"use
strict";return
g=C.converter._dispatch("encodeAmpsAndAngles.before",g,A,C),g=g.replace(/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/g,"&"),g=g.replace(/<(?![a-z\/?$!])/gi,"<"),g=g.replace(/</g,"<"),g=g.replace(/>/g,">"),g=C.converter._dispatch("encodeAmpsAndAngles.after",g,A,C)}),I.subParser("encodeBackslashEscapes",function(g,A,C){"use
strict";return
g=C.converter._dispatch("encodeBackslashEscapes.before",g,A,C),g=g.replace(/\\(\\)/g,I.helper.escapeCharactersCallback),g=g.replace(/\\([`*_{}\[\]()>#+.!~=|-])/g,I.helper.escapeCharactersCallback),g=C.converter._dispatch("encodeBackslashEscapes.after",g,A,C)}),I.subParser("encodeCode",function(g,A,C){"use
strict";return
g=C.converter._dispatch("encodeCode.before",g,A,C),g=g.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/([*_{}\[\]\\=~-])/g,I.helper.escapeCharactersCallback),g=C.converter._dispatch("encodeCode.after",g,A,C)}),I.subParser("escapeSpecialCharsWithinTagAttributes",function(g,A,C){"use
strict";var
e=/<\/?[a-z\d_:-]+(?:[\s]+[\s\S]+?)?>/gi,r=/<!(--(?:(?:[^>-]|-[^>])(?:[^-]|-[^-])*)--)>/gi;return
g=(g=C.converter._dispatch("escapeSpecialCharsWithinTagAttributes.before",g,A,C)).replace(e,function(g){return
g.replace(/(.)<\/?code>(?=.)/g,"$1`").replace(/([\\`*_~=|])/g,I.helper.escapeCharactersCallback)}),g=g.replace(r,function(g){return
g.replace(/([\\`*_~=|])/g,I.helper.escapeCharactersCallback)}),g=C.converter._dispatch("escapeSpecialCharsWithinTagAttributes.after",g,A,C)}),I.subParser("githubCodeBlocks",function(g,A,C){"use
strict";return
A.ghCodeBlocks?(g=C.converter._dispatch("githubCodeBlocks.before",g,A,C),g+="¨0",g=g.replace(/(?:^|\n)```(.*)\n([\s\S]*?)\n```/g,function(g,e,r){var
t=A.omitExtraWLInCodeBlocks?"":"\n";return
r=I.subParser("encodeCode")(r,A,C),r=I.subParser("detab")(r,A,C),r=r.replace(/^\n+/g,""),r=r.replace(/\n+$/g,""),r="<pre><code"+(e?'
class="'+e+"
language-"+e+'"':"")+">"+r+t+"</code></pre>",r=I.subParser("hashBlock")(r,A,C),"\n\n¨G"+(C.ghCodeBlocks.push({text:g,codeblock:r})-1)+"G\n\n"}),g=g.replace(/¨0/,""),C.converter._dispatch("githubCodeBlocks.after",g,A,C)):g}),I.subParser("hashBlock",function(g,A,C){"use
strict";return
g=C.converter._dispatch("hashBlock.before",g,A,C),g=g.replace(/(^\n+|\n+$)/g,""),g="\n\n¨K"+(C.gHtmlBlocks.push(g)-1)+"K\n\n",g=C.converter._dispatch("hashBlock.after",g,A,C)}),I.subParser("hashCodeTags",function(g,A,C){"use
strict";g=C.converter._dispatch("hashCodeTags.before",g,A,C);return
g=I.helper.replaceRecursiveRegExp(g,function(g,e,r,t){var
a=r+I.subParser("encodeCode")(e,A,C)+t;return"¨C"+(C.gHtmlSpans.push(a)-1)+"C"},"<code\\b[^>]*>","</code>","gim"),g=C.converter._dispatch("hashCodeTags.after",g,A,C)}),I.subParser("hashElement",function(g,A,C){"use
strict";return function(g,A){var I=A;return
I=I.replace(/\n\n/g,"\n"),I=I.replace(/^\n/,""),I=I.replace(/\n+$/g,""),I="\n\n¨K"+(C.gHtmlBlocks.push(I)-1)+"K\n\n"}}),I.subParser("hashHTMLBlocks",function(g,A,C){"use
strict";g=C.converter._dispatch("hashHTMLBlocks.before",g,A,C);var
e=["pre","div","h1","h2","h3","h4","h5","h6","blockquote","table","dl","ol","ul","script","noscript","form","fieldset","iframe","math","style","section","header","footer","nav","article","aside","address","audio","canvas","figure","hgroup","output","video","p"];A.backslashEscapesHTMLTags&&(g=g.replace(/\\<(\/?[^>]+?)>/g,function(g,A){return"<"+A+">"}));for(var
r=0;r<e.length;++r)for(var t,a=new RegExp("^
{0,3}(<"+e[r]+"\\b[^>]*>)","im"),n="<"+e[r]+"\\b[^>]*>",o="</"+e[r]+">";-1!==(t=I.helper.regexIndexOf(g,a));){var
s=I.helper.splitAtIndex(g,t),i=I.helper.replaceRecursiveRegExp(s[1],function(g,A,I,e){var
r=g;return-1!==I.search(/\bmarkdown\b/)&&(r=I+C.converter.makeHtml(A)+e),"\n\n¨K"+(C.gHtmlBlocks.push(r)-1)+"K\n\n"},n,o,"im");if(i===s[1])break;g=s[0].concat(i)}return
g=g.replace(/(\n {0,3}(<(hr)\b([^<>])*?\/?>)[
\t]*(?=\n{2,}))/g,I.subParser("hashElement")(g,A,C)),g=I.helper.replaceRecursiveRegExp(g,function(g){return"\n\n¨K"+(C.gHtmlBlocks.push(g)-1)+"K\n\n"},"^
{0,3}\x3c!--","--\x3e","gm"),g=g.replace(/(?:\n\n)(
{0,3}(?:<([?%])[^\r]*?\2>)[
\t]*(?=\n{2,}))/g,I.subParser("hashElement")(g,A,C)),g=C.converter._dispatch("hashHTMLBlocks.after",g,A,C)}),I.subParser("hashHTMLSpans",function(g,A,C){"use
strict";function
I(g){return"¨C"+(C.gHtmlSpans.push(g)-1)+"C"}return
g=C.converter._dispatch("hashHTMLSpans.before",g,A,C),g=g.replace(/<[^>]+?\/>/gi,function(g){return
I(g)}),g=g.replace(/<([^>]+?)>[\s\S]*?<\/\1>/g,function(g){return
I(g)}),g=g.replace(/<([^>]+?)\s[^>]+?>[\s\S]*?<\/\1>/g,function(g){return
I(g)}),g=g.replace(/<[^>]+?>/gi,function(g){return
I(g)}),g=C.converter._dispatch("hashHTMLSpans.after",g,A,C)}),I.subParser("unhashHTMLSpans",function(g,A,C){"use
strict";g=C.converter._dispatch("unhashHTMLSpans.before",g,A,C);for(var
I=0;I<C.gHtmlSpans.length;++I){for(var
e=C.gHtmlSpans[I],r=0;/¨C(\d+)C/.test(e);){var
t=RegExp.$1;if(e=e.replace("¨C"+t+"C",C.gHtmlSpans[t]),10===r)break;++r}g=g.replace("¨C"+I+"C",e)}return
g=C.converter._dispatch("unhashHTMLSpans.after",g,A,C)}),I.subParser("hashPreCodeTags",function(g,A,C){"use
strict";g=C.converter._dispatch("hashPreCodeTags.before",g,A,C);return
g=I.helper.replaceRecursiveRegExp(g,function(g,e,r,t){var
a=r+I.subParser("encodeCode")(e,A,C)+t;return"\n\n¨G"+(C.ghCodeBlocks.push({text:g,codeblock:a})-1)+"G\n\n"},"^
{0,3}<pre\\b[^>]*>\\s*<code\\b[^>]*>","^
{0,3}</code>\\s*</pre>","gim"),g=C.converter._dispatch("hashPreCodeTags.after",g,A,C)}),I.subParser("headers",function(g,A,C){"use
strict";function e(g){var e,r;if(A.customizedHeaderId){var
t=g.match(/\{([^{]+?)}\s*$/);t&&t[1]&&(g=t[1])}return
e=g,r=I.helper.isString(A.prefixHeaderId)?A.prefixHeaderId:!0===A.prefixHeaderId?"section-":"",A.rawPrefixHeaderId||(e=r+e),e=A.ghCompatibleHeaderId?e.replace(/
/g,"-").replace(/&/g,"").replace(/¨T/g,"").replace(/¨D/g,"").replace(/[&+$,\/:;=?@"#{}|^¨~\[\]`\\*)(%.!'<>]/g,"").toLowerCase():A.rawHeaderId?e.replace(/
/g,"-").replace(/&/g,"&").replace(/¨T/g,"¨").replace(/¨D/g,"$").replace(/["']/g,"-").toLowerCase():e.replace(/[^\w]/g,"").toLowerCase(),A.rawPrefixHeaderId&&(e=r+e),C.hashLinkCounts[e]?e=e+"-"+C.hashLinkCounts[e]++:C.hashLinkCounts[e]=1,e}g=C.converter._dispatch("headers.before",g,A,C);var
r=isNaN(parseInt(A.headerLevelStart))?1:parseInt(A.headerLevelStart),t=A.smoothLivePreview?/^(.+)[
\t]*\n={2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n=+[
\t]*\n+/gm,a=A.smoothLivePreview?/^(.+)[ \t]*\n-{2,}[ \t]*\n+/gm:/^(.+)[
\t]*\n-+[ \t]*\n+/gm;g=(g=g.replace(t,function(g,t){var
a=I.subParser("spanGamut")(t,A,C),n=A.noHeaderId?"":'
id="'+e(t)+'"',o=r,s="<h"+o+n+">"+a+"</h"+o+">";return
I.subParser("hashBlock")(s,A,C)})).replace(a,function(g,t){var
a=I.subParser("spanGamut")(t,A,C),n=A.noHeaderId?"":'
id="'+e(t)+'"',o=r+1,s="<h"+o+n+">"+a+"</h"+o+">";return
I.subParser("hashBlock")(s,A,C)});var
n=A.requireSpaceBeforeHeadingText?/^(#{1,6})[ \t]+(.+?)[
\t]*#*\n+/gm:/^(#{1,6})[ \t]*(.+?)[ \t]*#*\n+/gm;return
g=g.replace(n,function(g,t,a){var
n=a;A.customizedHeaderId&&(n=a.replace(/\s?\{([^{]+?)}\s*$/,""));var
o=I.subParser("spanGamut")(n,A,C),s=A.noHeaderId?"":'
id="'+e(a)+'"',i=r-1+t.length,l="<h"+i+s+">"+o+"</h"+i+">";return
I.subParser("hashBlock")(l,A,C)}),g=C.converter._dispatch("headers.after",g,A,C)}),I.subParser("horizontalRule",function(g,A,C){"use
strict";g=C.converter._dispatch("horizontalRule.before",g,A,C);var
e=I.subParser("hashBlock")("<hr />",A,C);return
g=g.replace(/^ {0,2}( ?-){3,}[ \t]*$/gm,e),g=g.replace(/^ {0,2}( ?\*){3,}[
\t]*$/gm,e),g=g.replace(/^ {0,2}( ?_){3,}[
\t]*$/gm,e),g=C.converter._dispatch("horizontalRule.after",g,A,C)}),I.subParser("images",function(g,A,C){"use
strict";function e(g,A,e,r,t,a,n,o){var
s=C.gUrls,i=C.gTitles,l=C.gDimensions;if(e=e.toLowerCase(),o||(o=""),g.search(/\(<?\s*>?
?(['"].*['"])?\)$/m)>-1)r="";else
if(""===r||null===r){if(""!==e&&null!==e||(e=A.toLowerCase().replace(/
?\n/g," ")),r="#"+e,I.helper.isUndefined(s[e]))return
g;r=s[e],I.helper.isUndefined(i[e])||(o=i[e]),I.helper.isUndefined(l[e])||(t=l[e].width,a=l[e].height)}A=A.replace(/"/g,""").replace(I.helper.regexes.asteriskDashAndColon,I.helper.escapeCharactersCallback);var
c='<img
src="'+(r=r.replace(I.helper.regexes.asteriskDashAndColon,I.helper.escapeCharactersCallback))+'"
alt="'+A+'"';return o&&(c+='
title="'+(o=o.replace(/"/g,""").replace(I.helper.regexes.asteriskDashAndColon,I.helper.escapeCharactersCallback))+'"'),t&&a&&(c+='
width="'+(t="*"===t?"auto":t)+'"',c+='
height="'+(a="*"===a?"auto":a)+'"'),c+="
/>"}var r=/!\[([^\]]*?)][ \t]*()\([
\t]?<?([\S]+?(?:\([\S]*?\)[\S]*?)?)>?(?:
=([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[
\t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g,t=/!\[([^\]]*?)][
\t]*()\([ \t]?<([^>]*)>(?:
=([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[
\t]*(?:(?:(["'])([^"]*?)\6))?[ \t]?\)/g,a=/!\[([^\]]*?)][
\t]*()\([ \t]?<?(data:.+?\/.+?;base64,[A-Za-z0-9+/=\n]+?)>?(?:
=([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[
\t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g,n=/!\[([^\]]*?)] ?(?:\n
*)?\[([\s\S]*?)]()()()()()/g,o=/!\[([^\[\]]+)]()()()()()/g;return
g=(g=C.converter._dispatch("images.before",g,A,C)).replace(n,e),g=g.replace(a,function(g,A,C,I,r,t,a,n){return
I=I.replace(/\s/g,""),e(g,A,C,I,r,t,0,n)}),g=g.replace(t,e),g=g.replace(r,e),g=g.replace(o,e),g=C.converter._dispatch("images.after",g,A,C)}),I.subParser("italicsAndBold",function(g,A,C){"use
strict";function I(g,A,C){return A+g+C}return
g=C.converter._dispatch("italicsAndBold.before",g,A,C),g=A.literalMidWordUnderscores?(g=(g=g.replace(/\b___(\S[\s\S]*)___\b/g,function(g,A){return
I(A,"<strong><em>","</em></strong>")})).replace(/\b__(\S[\s\S]*)__\b/g,function(g,A){return
I(A,"<strong>","</strong>")})).replace(/\b_(\S[\s\S]*?)_\b/g,function(g,A){return
I(A,"<em>","</em>")}):(g=(g=g.replace(/___(\S[\s\S]*?)___/g,function(g,A){return/\S$/.test(A)?I(A,"<strong><em>","</em></strong>"):g})).replace(/__(\S[\s\S]*?)__/g,function(g,A){return/\S$/.test(A)?I(A,"<strong>","</strong>"):g})).replace(/_([^\s_][\s\S]*?)_/g,function(g,A){return/\S$/.test(A)?I(A,"<em>","</em>"):g}),g=A.literalMidWordAsterisks?(g=(g=g.trim().replace(/(^|
)\*{3}(\S[\s\S]*?)\*{3}([ ,;!?.]|$)/g,function(g,A,C,e){return
I(C,A+"<strong><em>","</em></strong>"+e)})).trim().replace(/(^|
)\*{2}(\S[\s\S]*?)\*{2}([ ,;!?.]|$)/g,function(g,A,C,e){return
I(C,A+"<strong>","</strong>"+e)})).trim().replace(/(^|
)\*(\S[\s\S]*?)\*([ ,;!?.]|$)/g,function(g,A,C,e){return
I(C,A+"<em>","</em>"+e)}):(g=(g=g.replace(/\*\*\*(\S[\s\S]*?)\*\*\*/g,function(g,A){return/\S$/.test(A)?I(A,"<strong><em>","</em></strong>"):g})).replace(/\*\*(\S[\s\S]*?)\*\*/g,function(g,A){return/\S$/.test(A)?I(A,"<strong>","</strong>"):g})).replace(/\*([^\s*][\s\S]*?)\*/g,function(g,A){return/\S$/.test(A)?I(A,"<em>","</em>"):g}),g=C.converter._dispatch("italicsAndBold.after",g,A,C)}),I.subParser("lists",function(g,A,C){"use
strict";function
e(g,e){C.gListLevel++,g=g.replace(/\n{2,}$/,"\n"),g+="¨0";var
r=/(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[
\t]*[^\r]+?(\n{1,2}))(?=\n*(¨0| {0,3}([*+-]|\d+[.])[ \t]+))/gm,t=/\n[
\t]*\n(?!¨0)/.test(g);return
A.disableForced4SpacesIndentedSublists&&(r=/(\n)?(^
{0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[
\t]*[^\r]+?(\n{1,2}))(?=\n*(¨0|\2([*+-]|\d+[.])[
\t]+))/gm),g=g.replace(r,function(g,e,r,a,n,o,s){s=s&&""!==s.trim();var
i=I.subParser("outdent")(n,A,C),l="";return
o&&A.tasklists&&(l=' class="task-list-item"
style="list-style-type: none;"',i=i.replace(/^[ \t]*\[(x|X|
)?]/m,function(){var g='<input type="checkbox" disabled
style="margin: 0px 0.35em 0.25em -1.6em; vertical-align:
middle;"';return s&&(g+="
checked"),g+=">"})),i=i.replace(/^([-*+]|\d\.)[ \t]+[\S\n
]*/g,function(g){return"¨A"+g}),e||i.search(/\n{2,}/)>-1?(i=I.subParser("githubCodeBlocks")(i,A,C),i=I.subParser("blockGamut")(i,A,C)):(i=(i=I.subParser("lists")(i,A,C)).replace(/\n$/,""),i=(i=I.subParser("hashHTMLBlocks")(i,A,C)).replace(/\n\n+/g,"\n\n"),i=t?I.subParser("paragraphs")(i,A,C):I.subParser("spanGamut")(i,A,C)),i=i.replace("¨A",""),i="<li"+l+">"+i+"</li>\n"}),g=g.replace(/¨0/g,""),C.gListLevel--,e&&(g=g.replace(/\s+$/,"")),g}function
r(g,A){if("ol"===A){var C=g.match(/^
*(\d+)\./);if(C&&"1"!==C[1])return'
start="'+C[1]+'"'}return""}function
t(g,C,I){var t=A.disableForced4SpacesIndentedSublists?/^ ?\d+\.[ \t]/gm:/^
{0,3}\d+\.[ \t]/gm,a=A.disableForced4SpacesIndentedSublists?/^ ?[*+-][
\t]/gm:/^ {0,3}[*+-][
\t]/gm,n="ul"===C?t:a,o="";if(-1!==g.search(n))!function
A(s){var
i=s.search(n),l=r(g,C);-1!==i?(o+="\n<"+C+l+">\n"+e(s.slice(0,i),!!I)+"</"+C+">\n",n="ul"===(C="ul"===C?"ol":"ul")?t:a,A(s.slice(i))):o+="\n<"+C+l+">\n"+e(s,!!I)+"</"+C+">\n"}(g);else{var
s=r(g,C);o="\n<"+C+s+">\n"+e(g,!!I)+"</"+C+">\n"}return
o}return
g=C.converter._dispatch("lists.before",g,A,C),g+="¨0",g=C.gListLevel?g.replace(/^((
{0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(¨0|\n{2,}(?=\S)(?![
\t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,function(g,A,C){return
t(A,C.search(/[*+-]/g)>-1?"ul":"ol",!0)}):g.replace(/(\n\n|^\n?)((
{0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(¨0|\n{2,}(?=\S)(?![
\t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,function(g,A,C,I){return
t(C,I.search(/[*+-]/g)>-1?"ul":"ol",!1)}),g=g.replace(/¨0/,""),g=C.converter._dispatch("lists.after",g,A,C)}),I.subParser("outdent",function(g,A,C){"use
strict";return
g=C.converter._dispatch("outdent.before",g,A,C),g=g.replace(/^(\t|[
]{1,4})/gm,"¨0"),g=g.replace(/¨0/g,""),g=C.converter._dispatch("outdent.after",g,A,C)}),I.subParser("paragraphs",function(g,A,C){"use
strict";for(var
e=(g=(g=(g=C.converter._dispatch("paragraphs.before",g,A,C)).replace(/^\n+/g,"")).replace(/\n+$/g,"")).split(/\n{2,}/g),r=[],t=e.length,a=0;a<t;a++){var
n=e[a];n.search(/¨(K|G)(\d+)\1/g)>=0?r.push(n):n.search(/\S/)>=0&&(n=(n=I.subParser("spanGamut")(n,A,C)).replace(/^([
\t]*)/g,"<p>"),n+="</p>",r.push(n))}for(t=r.length,a=0;a<t;a++){for(var
o="",s=r[a],i=!1;/¨(K|G)(\d+)\1/.test(s);){var
l=RegExp.$1,c=RegExp.$2;o=(o="K"===l?C.gHtmlBlocks[c]:i?I.subParser("encodeCode")(C.ghCodeBlocks[c].text,A,C):C.ghCodeBlocks[c].codeblock).replace(/\$/g,"$$$$"),s=s.replace(/(\n\n)?¨(K|G)\d+\2(\n\n)?/,o),/^<pre\b[^>]*>\s*<code\b[^>]*>/.test(s)&&(i=!0)}r[a]=s}return
g=r.join("\n"),g=g.replace(/^\n+/g,""),g=g.replace(/\n+$/g,""),C.converter._dispatch("paragraphs.after",g,A,C)}),I.subParser("runExtension",function(g,A,C,I){"use
strict";if(g.filter)A=g.filter(A,I.converter,C);else if(g.regex){var
e=g.regex;e instanceof RegExp||(e=new
RegExp(e,"g")),A=A.replace(e,g.replace)}return
A}),I.subParser("spanGamut",function(g,A,C){"use
strict";return
g=C.converter._dispatch("spanGamut.before",g,A,C),g=I.subParser("codeSpans")(g,A,C),g=I.subParser("escapeSpecialCharsWithinTagAttributes")(g,A,C),g=I.subParser("encodeBackslashEscapes")(g,A,C),g=I.subParser("images")(g,A,C),g=I.subParser("anchors")(g,A,C),g=I.subParser("autoLinks")(g,A,C),g=I.subParser("simplifiedAutoLinks")(g,A,C),g=I.subParser("emoji")(g,A,C),g=I.subParser("underline")(g,A,C),g=I.subParser("italicsAndBold")(g,A,C),g=I.subParser("strikethrough")(g,A,C),g=I.subParser("ellipsis")(g,A,C),g=I.subParser("hashHTMLSpans")(g,A,C),g=I.subParser("encodeAmpsAndAngles")(g,A,C),A.simpleLineBreaks?/\n\n¨K/.test(g)||(g=g.replace(/\n+/g,"<br
/>\n")):g=g.replace(/ +\n/g,"<br
/>\n"),g=C.converter._dispatch("spanGamut.after",g,A,C)}),I.subParser("strikethrough",function(g,A,C){"use
strict";function e(g){return
A.simplifiedAutoLink&&(g=I.subParser("simplifiedAutoLinks")(g,A,C)),"<del>"+g+"</del>"}return
A.strikethrough&&(g=(g=C.converter._dispatch("strikethrough.before",g,A,C)).replace(/(?:~){2}([\s\S]+?)(?:~){2}/g,function(g,A){return
e(A)}),g=C.converter._dispatch("strikethrough.after",g,A,C)),g}),I.subParser("stripLinkDefinitions",function(g,A,C){"use
strict";var e=/^ {0,3}\[(.+)]:[ \t]*\n?[ \t]*<?([^>\s]+)>?(?:
=([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[
\t]*(?:(\n*)["|'(](.+?)["|')][
\t]*)?(?:\n+|(?=¨0))/gm,r=/^ {0,3}\[(.+)]:[ \t]*\n?[
\t]*<?(data:.+?\/.+?;base64,[A-Za-z0-9+/=\n]+?)>?(?:
=([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[
\t]*(?:(\n*)["|'(](.+?)["|')][
\t]*)?(?:\n\n|(?=¨0)|(?=\n\[))/gm,t=function(g,e,r,t,a,n,o){return
e=e.toLowerCase(),r.match(/^data:.+?\/.+?;base64,/)?C.gUrls[e]=r.replace(/\s/g,""):C.gUrls[e]=I.subParser("encodeAmpsAndAngles")(r,A,C),n?n+o:(o&&(C.gTitles[e]=o.replace(/"|'/g,""")),A.parseImgDimensions&&t&&a&&(C.gDimensions[e]={width:t,height:a}),"")};return
g=(g+="¨0").replace(r,t),g=g.replace(e,t),g=g.replace(/¨0/,"")}),I.subParser("tables",function(g,A,C){"use
strict";function e(g){return/^:[ \t]*--*$/.test(g)?'
style="text-align:left;"':/^--*[ \t]*:[
\t]*$/.test(g)?' style="text-align:right;"':/^:[
\t]*--*[ \t]*:$/.test(g)?'
style="text-align:center;"':""}function r(g,e){var
r="";return
g=g.trim(),(A.tablesHeaderId||A.tableHeaderId)&&(r='
id="'+g.replace(/
/g,"_").toLowerCase()+'"'),g=I.subParser("spanGamut")(g,A,C),"<th"+r+e+">"+g+"</th>\n"}function
t(g,e){return"<td"+e+">"+I.subParser("spanGamut")(g,A,C)+"</td>\n"}function
a(g,A){for(var
C="<table>\n<thead>\n<tr>\n",I=g.length,e=0;e<I;++e)C+=g[e];for(C+="</tr>\n</thead>\n<tbody>\n",e=0;e<A.length;++e){C+="<tr>\n";for(var
r=0;r<I;++r)C+=A[e][r];C+="</tr>\n"}return
C+="</tbody>\n</table>\n"}function n(g){var
A,C=g.split("\n");for(A=0;A<C.length;++A)/^
{0,3}\|/.test(C[A])&&(C[A]=C[A].replace(/^
{0,3}\|/,"")),/\|[
\t]*$/.test(C[A])&&(C[A]=C[A].replace(/\|[
\t]*$/,""));var
n=C[0].split("|").map(function(g){return
g.trim()}),o=C[1].split("|").map(function(g){return
g.trim()}),s=[],i=[],l=[],c=[];for(C.shift(),C.shift(),A=0;A<C.length;++A)""!==C[A].trim()&&s.push(C[A].split("|").map(function(g){return
g.trim()}));if(n.length<o.length)return
g;for(A=0;A<o.length;++A)l.push(e(o[A]));for(A=0;A<n.length;++A)I.helper.isUndefined(l[A])&&(l[A]=""),i.push(r(n[A],l[A]));for(A=0;A<s.length;++A){for(var
u=[],p=0;p<i.length;++p)I.helper.isUndefined(s[A][p]),u.push(t(s[A][p],l[p]));c.push(u)}return
a(i,c)}function o(g){var
A=g.slice(-3);return"<ol"!==A&&"<ul"!==A||(g=g.slice(0,-3)+"\n\n"+g.slice(-3)),g}if(!A.tables)return
g;var s=/^ {0,3}\|?.+\|.+\n {0,3}\|?[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[
\t]*\|[ \t]*:?[ \t]*(?:[-=]){2,}[\s\S]+?(?:\n\n|<ol|<ul|¨0)/gm,i=/^
{0,3}\|.+\|[ \t]*\n {0,3}\|[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[
\t]*\n( {0,3}\|.+\|[ \t]*\n)*(?:\n|<ol|<ul|¨0)/gm;return
g=C.converter._dispatch("tables.before",g,A,C),g=g.replace(/\\(\|)/g,I.helper.escapeCharactersCallback),g=g.replace(s,o),g=g.replace(i,o),g=g.replace(s,n),g=g.replace(i,n),g=C.converter._dispatch("tables.after",g,A,C)}),I.subParser("underline",function(g,A,C){"use
strict";return
A.underline?(g=C.converter._dispatch("underline.before",g,A,C),g=A.literalMidWordUnderscores?g.replace(/\b_?__(\S[\s\S]*)___?\b/g,function(g,A){return"<u>"+A+"</u>"}):g.replace(/_?__(\S[\s\S]*?)___?/g,function(g,A){return/\S$/.test(A)?"<u>"+A+"</u>":g}),g=g.replace(/(_)/g,I.helper.escapeCharactersCallback),g=C.converter._dispatch("underline.after",g,A,C)):g}),I.subParser("unescapeSpecialChars",function(g,A,C){"use
strict";return
g=C.converter._dispatch("unescapeSpecialChars.before",g,A,C),g=g.replace(/¨E(\d+)E/g,function(g,A){var
C=parseInt(A);return
String.fromCharCode(C)}),g=C.converter._dispatch("unescapeSpecialChars.after",g,A,C)});var
h=this;"function"==typeof
define&&define.amd?define(function(){"use strict";return
I}):"undefined"!=typeof
module&&module.exports?module.exports=I:h.showdown=I}).call(this);
//# sourceMappingURL=showdown.min.js.map
component_router.js000064400000004513151171726620010517 0ustar00/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder
<https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights
reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
document.addEventListener('DOMContentLoaded', function() {
// check and load all the customcode edit buttons
setTimeout(getEditCustomCodeButtons, 300);
});
function getEditCustomCodeButtons_server(id) {
var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod);
let requestParams = '';
if (token.length > 0 && id > 0) {
requestParams =
token+'=1&id='+id+'&return_here='+return_here;
}
// Construct URL with parameters for GET request
const urlWithParams = getUrl + '&' + requestParams;
// Using the Fetch API for the GET request
return fetch(urlWithParams, {
method: 'GET',
headers: {
'Content-Type': 'application/json'
}
}).then(response => {
if (!response.ok) {
throw new Error('Network response was not ok');
}
return response.json();
});
}
function getEditCustomCodeButtons() {
// Get the id using pure JavaScript
const id = document.querySelector("#jform_id").value;
getEditCustomCodeButtons_server(id).then(function(result) {
if (typeof result === 'object') {
Object.entries(result).forEach(([field, buttons]) => {
// Creating the div element for buttons
const div = document.createElement('div');
div.className = 'control-group';
div.innerHTML = '<div
class="control-label"><label>Add/Edit
Customcode</label></div><div class="controls
control-customcode-buttons-'+field+'"></div>';
// Insert the div before .control-wrapper-{field}
const insertBeforeElement =
document.querySelector(".control-wrapper-"+field);
insertBeforeElement.parentNode.insertBefore(div, insertBeforeElement);
// Adding buttons to the div
Object.entries(buttons).forEach(([name, button]) => {
const controlsDiv =
document.querySelector(".control-customcode-buttons-"+field);
controlsDiv.innerHTML += button;
});
});
}
}).catch(error => {
console.error('Error:', error);
});
}
joomla_power.js000064400000000606151171726620007611 0ustar00/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder
<https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights
reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
power.js000064400000043353151171726620006256 0ustar00/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder
<https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights
reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
// Initial Script
document.addEventListener('DOMContentLoaded', function()
{
var add_head_vvvvvxa = jQuery("#jform_add_head
input[type='radio']:checked").val();
vvvvvxa(add_head_vvvvvxa);
});
// the vvvvvxa function
function vvvvvxa(add_head_vvvvvxa)
{
// set the function logic
if (add_head_vvvvvxa == 1)
{
jQuery('#jform_head-lbl').closest('.control-group').show();
}
else
{
jQuery('#jform_head-lbl').closest('.control-group').hide();
}
}
// the isSet function
function isSet(val)
{
if ((val != undefined) && (val != null) && 0 !==
val.length){
return true;
}
return false;
}
document.addEventListener('DOMContentLoaded', function() {
// get the linked details
getLinked();
// load the active array values
buildSelectionMemory('property');
buildSelectionMemory('method');
// load the active selection array values
getClassCodeIds('property', 'jform_id', false);
getClassCodeIds('method', 'jform_id', false);
// check and load all the customcode edit buttons
setTimeout(getEditCustomCodeButtons, 300);
// trigger the row watcher
rowWatcher();
});
function getCodeFrom_server(id, type, type_name, callingName) {
var url = "index.php?option=com_componentbuilder&task=ajax."
+ callingName +
"&format=json&raw=true&vdm="+vastDevMod;
if (token.length > 0 && id > 0 && type.length >
0) {
url += '&' + token + '=1&' + type_name +
'=' + type + '&id=' + id;
}
var getUrl = JRouter(url);
return fetch(getUrl, {
method: 'GET',
headers: {
'Content-Type': 'application/json'
}
}).then(function(response) {
if (response.ok) {
return response.json();
} else {
throw new Error('Network response was not ok');
}
}).then(function(data) {
return data;
}).catch(function(error) {
console.error('There was a problem with the fetch operation:',
error);
});
}
// set selection the options
selectionMemory = {'property':{},'method':{}};
selectionActiveArray = {'property':{},'method':{}};
selectedIdRemoved =
{'property':'not','method':'not'};
function buildSelectionMemory(type) {
var i;
for (i = 0; i < 70; i++) {
// build ID
var id_check =
'jform_'+type+'_selection'+'__'+type+'_selection'+i+'__'+type;
// set memory
if (jQuery("#"+id_check).length) {
selectionMemory[type][id_check] = jQuery("#"+id_check+"
option:selected").val();
}
}
}
function getClassHeaderCode(){
// now get the values
var value = jQuery("#jform_class_extends
option:selected").val();
var add_value = jQuery("#jform_add_head
input[type='radio']:checked").val();
if (add_value == 1 && value > 0){
// we first check local memory
var _result = jQuery.jStorage.get('extends_header_'+value,
null);
if (_result) {
// now set the code
addCodeToEditor(_result, "jform_head", false, null);
} else {
// now get the code
getCodeFrom_server(value, 'extends', 'type',
'getClassHeaderCode').then(function(result) {
if(result){
// now set the code
addCodeToEditor(result, "jform_head", false, null);
// add result to local memory
jQuery.jStorage.set('extends_header_'+value, result, {TTL:
expire});
}
});
}
}
}
function getClassCodeIds(type, target_field, reset_all){
// now get the value
var value = jQuery('#'+target_field).val();
// now get the code
getCodeFrom_server(value, type, 'type',
'getClassCodeIds').then(function(result) {
if(result){
// reset the selection
selectionActiveArray[type] = {};
// update the active array
jQuery.each(result, function(i, prop) {
selectionActiveArray[type][prop] = selectionArray[type][prop];
});
// update the active field selection
updateActiveFieldSelection(type, reset_all);
}
});
}
function updateActiveFieldSelection(type, reset_all){
// update the selection options
if ('joomla_plugin_group' === type) {
// get value if not going to reset all
if (!reset_all){
// get the active values
var activeValue = jQuery("#jform_"+type+"
option:selected").val();
var activeText = jQuery("#jform_"+type+"
option:selected").text();
// clear the options out
jQuery("#jform_"+type).find('option').remove().end();
// add the active selection back (must be what is available)
jQuery("#jform_"+type).append('<option
value="'+activeValue+'">'+activeText+'</option>');
// now add the lists back
jQuery.each( selectionActiveArray[type], function(aValue, aText ) {
if (activeValue !== aValue) {
jQuery("#jform_"+type).append('<option
value="'+aValue+'">'+aText+'</option>');
}
});
jQuery("#jform_"+type).val(activeValue);
} else {
// clear the options out
jQuery("#jform_"+type).find('option').remove().end();
// now add the lists back
jQuery.each( selectionActiveArray[type], function(aValue, aText ) {
jQuery("#jform_"+type).append('<option
value="'+aValue+'">'+aText+'</option>');
});
jQuery("#jform_"+type).val('');
}
jQuery("#jform_"+type).trigger('liszt:updated');
// reset all when global update is made
if (reset_all) {
resetAll('method');
resetAll('property');
}
} else {
selectionDynamicUpdate(type);
// reset all when global update is made
if (reset_all) {
resetAll(type);
}
}
}
function resetAll(type) {
var i;
for (i = 0; i < 10; i++) {
// build ID
var id_check =
'jform_'+type+'_selection'+'__'+type+'_selection'+i+'__'+type;
// first check if Id is on page as that not the same as the one currently
calling
if (jQuery("#"+id_check).length) {
if (i == 0) {
jQuery('#'+id_check).val('');
jQuery('#'+id_check).trigger('liszt:updated');
} else {
// remove the row
jQuery('#'+id_check).closest('tr').remove();
}
}
}
Joomla.editors.instances['jform_main_class_code'].setValue('');
selectionMemory = {'property':{},'method':{}};
}
function getClassCode(field, type){
// get the ID
var id = jQuery(field).attr('id');
// now get the value
var value = jQuery('#' + id).val();
// check if we have a memory for this field, if true remove code of old
selection and clear memory
if (selectionMemory[type].hasOwnProperty(id) &&
selectionMemory[type][id] > 0) {
// the old id to remove
var old_value = selectionMemory[type][id];
// remove the code // we first check local memory
var _result =
jQuery.jStorage.get('code_4_'+type+'_'+old_value,
null);
if (_result) {
// now remove the code
if (removeCodeFromEditor(_result, 'jform_main_class_code')) {
selectionMemory[type][id] = 0;
}
} else {
// now get the code
getCodeFrom_server(old_value, type, 'type',
'getClassCode').then(function(result) {
if(result){
// now remove the code
if (removeCodeFromEditor(result, 'jform_main_class_code'))
{
selectionMemory[type][id] = 0;
}
// add result to local memory
jQuery.jStorage.set('code_4_'+type+'_'+old_value,
result, {TTL: expire});
}
});
}
}
if (propertyIsSet(value, id, type)) {
// reset the selection
jQuery('#'+id).val('');
jQuery('#'+id).trigger("liszt:updated");
// give out a notice
jQuery.UIkit.notify({message:
Joomla.JText._('COM_COMPONENTBUILDER_ALREADY_SELECTED_TRY_ANOTHER'),
timeout: 5000, status: 'warning', pos: 'top-center'});
} else {
// set the active removed value
selectedIdRemoved[type] = id;
// do a dynamic update (to remove what was already used)
selectionDynamicUpdate(type);
// set the add action
if (type === 'property') {
var _action_add = 'prepend';
} else {
var _action_add = 'append';
}
// we first check local memory
var _result =
jQuery.jStorage.get('code_4_'+type+'_'+value, null);
if (_result) {
// now set the code
if (addCodeToEditor(_result, "jform_main_class_code", true,
_action_add)) {
selectionMemory[type][id] = value;
}
} else {
// now get the code
getCodeFrom_server(value, type, 'type',
'getClassCode').then(function(result) {
if(result){
// now set the code
if (addCodeToEditor(result, "jform_main_class_code", true,
_action_add)) {
selectionMemory[type][id] = value;
}
// add result to local memory
jQuery.jStorage.set('code_4_'+type+'_'+value,
result, {TTL: expire});
}
});
}
}
}
function selectionDynamicUpdate(type) {
selectionAvailable = {};
selectionSelectedArray = {};
selectionTrackerArray = {};
var i;
for (i = 0; i < 70; i++) { // for now this is the number of field we
should check
// build ID
var id_check =
'jform_'+type+'_selection'+'__'+type+'_selection'+i+'__'+type;
// first check if Id is on page as that not the same as the one currently
calling
if (jQuery("#"+id_check).length &&
selectedIdRemoved[type] !== id_check) {
// build the selected array
var key = jQuery("#"+id_check+"
option:selected").val();
var text = jQuery("#"+id_check+"
option:selected").text();
selectionSelectedArray[key] = text;
// keep track of the value set
selectionTrackerArray[id_check] = key;
// clear the options out
jQuery("#"+id_check).find('option').remove().end();
}
}
// now build the list to keep
jQuery.each( selectionActiveArray[type], function( prop, name ) {
if (!selectionSelectedArray.hasOwnProperty(prop)) {
selectionAvailable[prop] = name;
}
});
// now add the lists back
jQuery.each( selectionTrackerArray, function( tId, tKey ) {
if (jQuery('#'+tId).length) {
jQuery('#'+tId).append('<option
value="'+tKey+'">'+selectionSelectedArray[tKey]+'</option>');
jQuery.each( selectionAvailable, function( aKey, aValue ) {
jQuery('#'+tId).append('<option
value="'+aKey+'">'+aValue+'</option>');
});
jQuery('#'+tId).val(tKey);
jQuery('#'+tId).trigger('liszt:updated');
}
});
}
function rowWatcher() {
jQuery(document).on('subform-row-remove', function(event, row){
// we first chck if this is a method call
var valid_call =
jQuery(row.innerHTML).find('.method_selection_list').attr('id');
var type_call = 'method';
if (!isSet(valid_call)){
// now lets see if this is a property call
var valid_call =
jQuery(row.innerHTML).find('.property_selection_list').attr('id');
var type_call = 'property';
}
// so lets update selection if call valid
if (isSet(valid_call)){
selectedIdRemoved[type_call] = valid_call;
selectionDynamicUpdate(type_call);
// also remove from code
var valid_value = jQuery(row.innerHTML).find('#' + valid_call
+ ' option:selected').val();
if (valid_value === '') {
valid_value = selectionMemory[type_call][valid_call];
}
// remove the code // we first check local memory
var _result =
jQuery.jStorage.get('code_4_'+type_call+'_'+valid_value,
null);
if (_result) {
// now remove the code
if (removeCodeFromEditor(_result, 'jform_main_class_code'))
{
selectionMemory[type_call][valid_call] = 0;
}
} else {
// now get the code
getCodeFrom_server(valid_value, type_call, 'type',
'getClassCode').then(function(result) {
if(result){
if (removeCodeFromEditor(result, 'jform_main_class_code'))
{
selectionMemory[type_call][valid_call] = 0;;
}
// add result to local memory
jQuery.jStorage.set('code_4_'+type_call+'_'+valid_value,
result, {TTL: expire});
}
});
}
}
});
jQuery(document).on('subform-row-add', function(event, row){
// we first chck if this is a method call
var valid_call =
jQuery(row.innerHTML).find('.method_selection_list').attr('id');
var type_call = 'method';
if (!isSet(valid_call)){
// now lets see if this is a property call
var valid_call =
jQuery(row.innerHTML).find('.property_selection_list').attr('id');
var type_call = 'property';
}
// so lets update selection if call valid
if (isSet(valid_call)){
selectedIdRemoved[type_call] = 'not';
selectionDynamicUpdate(type_call);
}
});
}
function propertyIsSet(prop, id, type) {
var i;
for (i = 0; i < 70; i++) { // for now this is the number of field we
should check
// build ID
var id_check =
'jform_'+type+'_selection'+'__'+type+'_selection'+i+'__'+type;
// first check if Id is on page as that not the same as the one currently
calling
if (jQuery("#"+id_check).length && id_check != id) {
// get the property value
var tmp = jQuery("#"+id_check+"
option:selected").val();
// now validate
if (tmp === prop) {
return true;
}
}
}
return false;
}
function addCodeToEditor(code_string, editor_id, merge, merge_target){
if (Joomla.editors.instances.hasOwnProperty(editor_id)) {
var old_code_string = Joomla.editors.instances[editor_id].getValue();
if (merge && old_code_string.length > 0) {
// make sure not to load the same string twice
if (old_code_string.indexOf(code_string) == -1) {
if ('prepend' === merge_target) {
var _string = code_string + "\n\n" + old_code_string;
} else if (merge_target && 'append' !== merge_target)
{
var old_code_array = old_code_string.split(merge_target);
if (old_code_array.length > 1) {
var _string = old_code_array.shift() + "\n\n" + code_string
+ "\n\n" + merge_target + old_code_array.join(merge_target);
} else {
var _string = code_string + "\n\n" + merge_target +
old_code_array.join('');
}
} else {
var _string = old_code_string + "\n\n" + code_string;
}
Joomla.editors.instances[editor_id].setValue(_string.trim());
return true;
}
} else {
Joomla.editors.instances[editor_id].setValue(code_string.trim());
return true;
}
} else {
var old_code_string = jQuery('textarea#'+editor_id).val();
if (merge && old_code_string.length > 0) {
// make sure not to load the same string twice
if (old_code_string.indexOf(code_string) == -1) {
if ('prepend' === merge_target) {
var _string = code_string + "\n\n" + old_code_string;
} else if (merge_target && 'append' !== merge_target)
{
var old_code_array = old_code_string.split(merge_target);
if (old_code_array.length > 1) {
var _string = old_code_array.shift() + "\n\n" + code_string
+ "\n\n" + merge_target + old_code_array.join(merge_target);
} else {
var _string = code_string + "\n\n" + merge_target +
old_code_array.join('');
}
} else {
var _string = old_code_string + "\n\n" + code_string;
}
jQuery('textarea#'+editor_id).val(_string.trim());
return true;
}
} else {
jQuery('textarea#'+editor_id).val(code_string.trim());
return true;
}
}
return false;
}
function removeCodeFromEditor(code_string, editor_id){
if (Joomla.editors.instances.hasOwnProperty(editor_id)) {
var old_code_string = Joomla.editors.instances[editor_id].getValue();
if (old_code_string.length > 0) {
// make sure string is found
if (old_code_string.indexOf(code_string) !== -1) {
// remove the code
Joomla.editors.instances[editor_id].setValue(old_code_string.replace(code_string+"\n\n",'').replace("\n\n"+code_string,'').replace(code_string,''));
return true;
}
}
} else {
var old_code_string = jQuery('textarea#'+editor_id).val();
if (old_code_string.length > 0) {
// make sure string is found
if (old_code_string.indexOf(code_string) !== -1) {
// remove the code
jQuery('textarea#'+editor_id).val(old_code_string.replace(code_string+"\n\n",'').replace("\n\n"+code_string,'').replace(code_string,''));
return true;
}
}
}
return false;
}
function getLinked() {
getCodeFrom_server(1, 'type', 'type',
'getLinked').then(function(result) {
if (result.error) {
console.error(result.error);
} else if (result) {
document.getElementById('display_linked_to').innerHTML =
result;
}
});
}
function getEditCustomCodeButtons_server(id) {
var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod);
let requestParams = '';
if (token.length > 0 && id > 0) {
requestParams =
token+'=1&id='+id+'&return_here='+return_here;
}
// Construct URL with parameters for GET request
const urlWithParams = getUrl + '&' + requestParams;
// Using the Fetch API for the GET request
return fetch(urlWithParams, {
method: 'GET',
headers: {
'Content-Type': 'application/json'
}
}).then(response => {
if (!response.ok) {
throw new Error('Network response was not ok');
}
return response.json();
});
}
function getEditCustomCodeButtons() {
// Get the id using pure JavaScript
const id = document.querySelector("#jform_id").value;
getEditCustomCodeButtons_server(id).then(function(result) {
if (typeof result === 'object') {
Object.entries(result).forEach(([field, buttons]) => {
// Creating the div element for buttons
const div = document.createElement('div');
div.className = 'control-group';
div.innerHTML = '<div
class="control-label"><label>Add/Edit
Customcode</label></div><div class="controls
control-customcode-buttons-'+field+'"></div>';
// Insert the div before .control-wrapper-{field}
const insertBeforeElement =
document.querySelector(".control-wrapper-"+field);
insertBeforeElement.parentNode.insertBefore(div, insertBeforeElement);
// Adding buttons to the div
Object.entries(buttons).forEach(([name, button]) => {
const controlsDiv =
document.querySelector(".control-customcode-buttons-"+field);
controlsDiv.innerHTML += button;
});
});
}
}).catch(error => {
console.error('Error:', error);
});
}
repository.js000064400000000606151171726620007333 0ustar00/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder
<https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights
reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
autocompleter.js000064400000037617151171733310010005 0ustar00//@deprecated
3.4
var Observer = new Class({
Implements: [Options, Events],
options: {
periodical: false,
delay: 1000
},
initialize: function (el, onFired, options) {
this.element = document.id(el) || $document.id(el);
this.addEvent('onFired', onFired);
this.setOptions(options);
this.bound = this.changed.bind(this);
this.resume();
},
changed: function () {
var value = this.element.get('value');
if ($equals(this.value, value)) return;
this.clear();
this.value = value;
this.timeout = this.onFired.delay(this.options.delay, this);
},
setValue: function (value) {
this.value = value;
this.element.set('value', value);
return this.clear();
},
onFired: function () {
this.fireEvent('onFired', [this.value, this.element]);
},
clear: function () {
clearTimeout(this.timeout || null);
return this;
},
pause: function () {
if (this.timer) clearTimeout(this.timer);
else this.element.removeEvent('keyup', this.bound);
return this.clear();
},
resume: function () {
this.value = this.element.get('value');
if (this.options.periodical) this.timer =
this.changed.periodical(this.options.periodical, this);
else this.element.addEvent('keyup', this.bound);
return this;
}
});
var $equals = function (obj1, obj2) {
return (obj1 == obj2 || JSON.encode(obj1) == JSON.encode(obj2));
};
var Autocompleter = new Class({
Implements: [Options, Events],
options: {
minLength: 1,
markQuery: true,
width: 'inherit',
maxChoices: 10,
injectChoice: null,
customChoices: null,
emptyChoices: null,
visibleChoices: true,
className: 'autocompleter-choices',
zIndex: 1000,
delay: 400,
observerOptions: {},
fxOptions: {},
autoSubmit: false,
overflow: false,
overflowMargin: 25,
selectFirst: false,
filter: null,
filterCase: false,
filterSubset: false,
forceSelect: false,
selectMode: true,
choicesMatch: null,
multiple: false,
separator: ', ',
separatorSplit: /\s*[,;]\s*/,
autoTrim: false,
allowDupes: false,
cache: true,
relative: false
},
initialize: function (element, options) {
this.element = document.id(element);
this.setOptions(options);
this.build();
this.observer = new Observer(this.element, this.prefetch.bind(this),
Object.merge({}, {
'delay': this.options.delay
}, this.options.observerOptions));
this.queryValue = null;
if (this.options.filter) this.filter = this.options.filter.bind(this);
var mode = this.options.selectMode;
this.typeAhead = (mode == 'type-ahead');
this.selectMode = (mode === true) ? 'selection' : mode;
this.cached = [];
},
build: function () {
if (document.id(this.options.customChoices)) {
this.choices = this.options.customChoices;
} else {
this.choices = new Element('ul', {
'class': this.options.className,
'styles': {
'zIndex': this.options.zIndex
}
}).inject(document.body);
this.relative = false;
if (this.options.relative) {
this.choices.inject(this.element, 'after');
this.relative = this.element.getOffsetParent();
}
this.fix = new OverlayFix(this.choices);
}
if (!this.options.separator.test(this.options.separatorSplit)) {
this.options.separatorSplit = this.options.separator;
}
this.fx = (!this.options.fxOptions) ? null : new Fx.Tween(this.choices,
Object.merge({}, {
'property': 'opacity',
'link': 'cancel',
'duration': 200
}, this.options.fxOptions)).addEvent('onStart',
Chain.prototype.clearChain).set(0);
this.element.setProperty('autocomplete',
'off').addEvent((Browser.ie || Browser.safari || Browser.chrome)
? 'keydown' : 'keypress',
this.onCommand.bind(this)).addEvent('click',
this.onCommand.bind(this, [false])).addEvent('focus',
this.toggleFocus.pass({
bind: this,
arguments: true,
delay: 100
})).addEvent('blur', this.toggleFocus.pass({
bind: this,
arguments: false,
delay: 100
}));
},
destroy: function () {
if (this.fix) this.fix.destroy();
this.choices = this.selected = this.choices.destroy();
},
toggleFocus: function (state) {
this.focussed = state;
if (!state) this.hideChoices(true);
this.fireEvent((state) ? 'onFocus' : 'onBlur',
[this.element]);
},
onCommand: function (e) {
if (!e && this.focussed) return this.prefetch();
if (e && e.key && !e.shift) {
switch (e.key) {
case 'enter':
if (this.element.value != this.opted) return true;
if (this.selected && this.visible) {
this.choiceSelect(this.selected);
return !!(this.options.autoSubmit);
}
break;
case 'up':
case 'down':
if (!this.prefetch() && this.queryValue !== null) {
var up = (e.key == 'up');
this.choiceOver((this.selected || this.choices)[(this.selected) ?
((up) ? 'getPrevious' : 'getNext') : ((up) ?
'getLast' : 'getFirst')](this.options.choicesMatch),
true);
}
return false;
case 'esc':
case 'tab':
this.hideChoices(true);
break;
}
}
return true;
},
setSelection: function (finish) {
var input = this.selected.inputValue,
value = input;
var start = this.queryValue.length,
end = input.length;
if (input.substr(0, start).toLowerCase() !=
this.queryValue.toLowerCase()) start = 0;
if (this.options.multiple) {
var split = this.options.separatorSplit;
value = this.element.value;
start += this.queryIndex;
end += this.queryIndex;
var old = value.substr(this.queryIndex).split(split, 1)[0];
value = value.substr(0, this.queryIndex) + input +
value.substr(this.queryIndex + old.length);
if (finish) {
var tokens = value.split(this.options.separatorSplit).filter(function
(entry) {
return this.test(entry);
}, /[^\s,]+/);
if (!this.options.allowDupes) tokens = [].combine(tokens);
var sep = this.options.separator;
value = tokens.join(sep) + sep;
end = value.length;
}
}
this.observer.setValue(value);
this.opted = value;
if (finish || this.selectMode == 'pick') start = end;
this.element.selectRange(start, end);
this.fireEvent('onSelection', [this.element, this.selected,
value, input]);
},
showChoices: function () {
var match = this.options.choicesMatch,
first = this.choices.getFirst(match);
this.selected = this.selectedValue = null;
if (this.fix) {
var pos = this.element.getCoordinates(this.relative),
width = this.options.width || 'auto';
this.choices.setStyles({
'left': pos.left,
'top': pos.bottom,
'width': (width === true || width == 'inherit') ?
pos.width : width
});
}
if (!first) return;
if (!this.visible) {
this.visible = true;
this.choices.setStyle('display', '');
if (this.fx) this.fx.start(1);
this.fireEvent('onShow', [this.element, this.choices]);
}
if (this.options.selectFirst || this.typeAhead || first.inputValue ==
this.queryValue) this.choiceOver(first, this.typeAhead);
var items = this.choices.getChildren(match),
max = this.options.maxChoices;
var styles = {
'overflowY': 'hidden',
'height': ''
};
this.overflown = false;
if (items.length > max) {
var item = items[max - 1];
styles.overflowY = 'scroll';
styles.height = item.getCoordinates(this.choices).bottom;
this.overflown = true;
};
this.choices.setStyles(styles);
this.fix.show();
if (this.options.visibleChoices) {
var scroll = document.getScroll(),
size = document.getSize(),
coords = this.choices.getCoordinates();
if (coords.right > scroll.x + size.x) scroll.x = coords.right -
size.x;
if (coords.bottom > scroll.y + size.y) scroll.y = coords.bottom -
size.y;
window.scrollTo(Math.min(scroll.x, coords.left), Math.min(scroll.y,
coords.top));
}
},
// TODO: No $arguments in MT 1.3
hideChoices: function (clear) {
if (clear) {
var value = this.element.value;
if (this.options.forceSelect) value = this.opted;
if (this.options.autoTrim) {
value =
value.split(this.options.separatorSplit).filter($arguments(0)).join(this.options.separator);
}
this.observer.setValue(value);
}
if (!this.visible) return;
this.visible = false;
if (this.selected)
this.selected.removeClass('autocompleter-selected');
this.observer.clear();
var hide = function () {
this.choices.setStyle('display', 'none');
this.fix.hide();
}.bind(this);
if (this.fx) this.fx.start(0).chain(hide);
else hide();
this.fireEvent('onHide', [this.element, this.choices]);
},
prefetch: function () {
var value = this.element.value,
query = value;
if (this.options.multiple) {
var split = this.options.separatorSplit;
var values = value.split(split);
var index = this.element.getSelectedRange().start;
var toIndex = value.substr(0, index).split(split);
var last = toIndex.length - 1;
index -= toIndex[last].length;
query = values[last];
}
if (query.length < this.options.minLength) {
this.hideChoices();
} else {
if (query === this.queryValue || (this.visible && query ==
this.selectedValue)) {
if (this.visible) return false;
this.showChoices();
} else {
this.queryValue = query;
this.queryIndex = index;
if (!this.fetchCached()) this.query();
}
}
return true;
},
fetchCached: function () {
return false;
if (!this.options.cache || !this.cached || !this.cached.length ||
this.cached.length >= this.options.maxChoices || this.queryValue) return
false;
this.update(this.filter(this.cached));
return true;
},
update: function (tokens) {
this.choices.empty();
this.cached = tokens;
var type = tokens && typeOf(tokens);
if (!type || (type == 'array' && !tokens.length) ||
(type == 'hash' && !tokens.getLength())) {
(this.options.emptyChoices || this.hideChoices).call(this);
} else {
if (this.options.maxChoices < tokens.length &&
!this.options.overflow) tokens.length = this.options.maxChoices;
tokens.each(this.options.injectChoice ||
function (token) {
var choice = new Element('li', {
'html': this.markQueryValue(token)
});
choice.inputValue = token;
this.addChoiceEvents(choice).inject(this.choices);
}, this);
this.showChoices();
}
},
choiceOver: function (choice, selection) {
if (!choice || choice == this.selected) return;
if (this.selected)
this.selected.removeClass('autocompleter-selected');
this.selected = choice.addClass('autocompleter-selected');
this.fireEvent('onSelect', [this.element, this.selected,
selection]);
if (!this.selectMode) this.opted = this.element.value;
if (!selection) return;
this.selectedValue = this.selected.inputValue;
if (this.overflown) {
var coords = this.selected.getCoordinates(this.choices),
margin = this.options.overflowMargin,
top = this.choices.scrollTop,
height = this.choices.offsetHeight,
bottom = top + height;
if (coords.top - margin < top && top) this.choices.scrollTop
= Math.max(coords.top - margin, 0);
else if (coords.bottom + margin > bottom) this.choices.scrollTop =
Math.min(coords.bottom - height + margin, bottom);
}
if (this.selectMode) this.setSelection();
},
choiceSelect: function (choice) {
if (choice) this.choiceOver(choice);
this.setSelection(true);
this.queryValue = false;
this.hideChoices();
},
filter: function (tokens) {
return (tokens || this.tokens).filter(function (token) {
return this.test(token);
}, new RegExp(((this.options.filterSubset) ? '' :
'^') + this.queryValue.escapeRegExp(), (this.options.filterCase)
? '' : 'i'));
},
markQueryValue: function (str) {
return (!this.options.markQuery || !this.queryValue) ? str :
str.replace(new RegExp('(' + ((this.options.filterSubset) ?
'' : '^') + this.queryValue.escapeRegExp() +
')', (this.options.filterCase) ? '' : 'i'),
'<span
class="autocompleter-queried">$1</span>');
},
addChoiceEvents: function (el) {
return el.addEvents({
'mouseover': this.choiceOver.bind(this, el),
'click': this.choiceSelect.bind(this, el)
});
}
});
var OverlayFix = new Class({
initialize: function (el) {
if (Browser.ie) {
this.element = document.id(el);
this.relative = this.element.getOffsetParent();
this.fix = new Element('iframe', {
'frameborder': '0',
'scrolling': 'no',
'src': 'javascript:false;',
'styles': {
'position': 'absolute',
'border': 'none',
'display': 'none',
'filter':
'progid:DXImageTransform.Microsoft.Alpha(opacity=0)'
}
}).inject(this.element, 'after');
}
},
show: function () {
if (this.fix) {
var coords = this.element.getCoordinates(this.relative);
delete coords.right;
delete coords.bottom;
this.fix.setStyles(Object.append(coords, {
'display': '',
'zIndex': (this.element.getStyle('zIndex') || 1) -
1
}));
}
return this;
},
hide: function () {
if (this.fix) this.fix.setStyle('display', 'none');
return this;
},
destroy: function () {
if (this.fix) this.fix = this.fix.destroy();
}
});
Element.implement({
getSelectedRange: function () {
if (!Browser.ie) return {
start: this.selectionStart,
end: this.selectionEnd
};
var pos = {
start: 0,
end: 0
};
var range = this.getDocument().selection.createRange();
if (!range || range.parentElement() != this) return pos;
var dup = range.duplicate();
if (this.type == 'text') {
pos.start = 0 - dup.moveStart('character', -100000);
pos.end = pos.start + range.text.length;
} else {
var value = this.value;
var offset = value.length - value.match(/[\n\r]*$/)[0].length;
dup.moveToElementText(this);
dup.setEndPoint('StartToEnd', range);
pos.end = offset - dup.text.length;
dup.setEndPoint('StartToStart', range);
pos.start = offset - dup.text.length;
}
return pos;
},
selectRange: function (start, end) {
if (Browser.ie) {
var diff = this.value.substr(start, end - start).replace(/\r/g,
'').length;
start = this.value.substr(0, start).replace(/\r/g, '').length;
var range = this.createTextRange();
range.collapse(true);
range.moveEnd('character', start + diff);
range.moveStart('character', start);
range.select();
} else {
this.focus();
this.setSelectionRange(start, end);
}
return this;
}
});
Autocompleter.Base = Autocompleter;
Autocompleter.Request = new Class({
Extends: Autocompleter,
options: {
postData: {},
ajaxOptions: {},
postVar: 'value'
},
query: function () {
var data = this.options.postData.unlink || {};
data[this.options.postVar] = this.queryValue;
var indicator = document.id(this.options.indicator);
if (indicator) indicator.setStyle('display', '');
var cls = this.options.indicatorClass;
if (cls) this.element.addClass(cls);
this.fireEvent('onRequest', [this.element, this.request, data,
this.queryValue]);
this.request.send({
'data': data
});
},
queryResponse: function () {
var indicator = document.id(this.options.indicator);
if (indicator) indicator.setStyle('display', 'none');
var cls = this.options.indicatorClass;
if (cls) this.element.removeClass(cls);
return this.fireEvent('onComplete', [this.element,
this.request]);
}
});
Autocompleter.Request.JSON = new Class({
Extends: Autocompleter.Request,
initialize: function (el, url, options) {
this.parent(el, options);
this.request = new Request.JSON(Object.merge({}, {
'url': url,
'link': 'cancel'
}, this.options.ajaxOptions)).addEvent('onComplete',
this.queryResponse.bind(this));
},
queryResponse: function (response) {
this.parent();
this.update(response);
}
});
Autocompleter.Request.HTML = new Class({
Extends: Autocompleter.Request,
initialize: function (el, url, options) {
this.parent(el, options);
this.request = new Request.HTML(Object.merge({}, {
'url': url,
'link': 'cancel',
'update': this.choices
}, this.options.ajaxOptions)).addEvent('onComplete',
this.queryResponse.bind(this));
},
queryResponse: function (tree, elements) {
this.parent();
if (!elements || !elements.length) {
this.hideChoices();
} else {
this.choices.getChildren(this.options.choicesMatch).each(this.options.injectChoice
||
function (choice) {
var value = choice.innerHTML;
choice.inputValue = value;
this.addChoiceEvents(choice.set('html',
this.markQueryValue(value)));
}, this);
this.showChoices();
}
}
});
Autocompleter.Ajax = {
Base: Autocompleter.Request,
Json: Autocompleter.Request.JSON,
Xhtml: Autocompleter.Request.HTML
};
indexer.js000064400000006161151171733310006546 0ustar00var FinderIndexer =
function(){
var totalItems= null;
var batchSize= null;
var offset= null;
var progress= null;
var optimized= false;
var path =
'index.php?option=com_finder&tmpl=component&format=json';
var initialize = function () {
offset = 0;
progress = 0;
path = path + '&' +
jQuery('#finder-indexer-token').attr('name') +
'=1';
getRequest('indexer.start');
};
var getRequest= function (task) {
jQuery.ajax({
type : "GET",
url : path,
data : 'task=' + task,
dataType : 'json',
success : handleResponse,
error : handleFailure
});
};
var handleResponse = function (json, resp) {
try {
if (json === null) {
throw resp;
}
if (json.error) {
throw json;
}
if (json.start) {
totalItems = json.totalItems;
}
offset += json.batchOffset;
updateProgress(json.header, json.message);
if (offset < totalItems) {
getRequest('indexer.batch');
} else if (!optimized) {
optimized = true;
getRequest('indexer.optimize');
}
} catch (error) {
jQuery('#progress').remove();
try {
if (json.error) {
jQuery('#finder-progress-header').text(json.header).addClass('finder-error');
jQuery('#finder-progress-message').html(json.message).addClass('finder-error');
}
} catch (ignore) {
if (error === '') {
error = Joomla.JText._('COM_FINDER_NO_ERROR_RETURNED');
}
jQuery('#finder-progress-header').text(Joomla.JText._('COM_FINDER_AN_ERROR_HAS_OCCURRED')).addClass('finder-error');
jQuery('#finder-progress-message').html(error).addClass('finder-error');
}
}
return true;
};
var handleFailure= function (xhr) {
json = (typeof xhr == 'object' && xhr.responseText) ?
xhr.responseText : null;
json = json ? jQuery.parseJSON(json) : null;
jQuery('#progress').remove();
if (json) {
json = json.responseText != null ? Json.evaluate(json.responseText,
true) : json;
}
var header = json ? json.header :
Joomla.JText._('COM_FINDER_AN_ERROR_HAS_OCCURRED');
var message = json ? json.message :
Joomla.JText._('COM_FINDER_MESSAGE_RETURNED') + ' <br
/>' + json;
jQuery('#finder-progress-header').text(header).addClass('finder-error');
jQuery('#finder-progress-message').html(message).addClass('finder-error');
};
var updateProgress = function (header, message) {
progress = (offset / totalItems) * 100;
jQuery('#finder-progress-header').text(header);
jQuery('#finder-progress-message').html(message);
if (progress < 100) {
jQuery('#progress-bar').css('width', progress +
'%').attr('aria-valuenow', progress);
}
else {
jQuery('#progress-bar').removeClass('bar-success').addClass('bar-warning').attr('aria-valuemin',
100).attr('aria-valuemax', 200);
jQuery('#progress-bar').css('width', progress +
'%').attr('aria-valuenow', progress);
}
if (message == msg) {
jQuery('#progress').remove();
window.parent.jQuery('#modal-archive',
parent.document).modal('hide');
}
};
initialize();
};
jQuery(function () {
Indexer = new FinderIndexer();
if (typeof window.parent.SqueezeBox == 'object') {
jQuery(window.parent.SqueezeBox).on('close', function () {
window.parent.location.reload(true);
});
}
});
admin-modules-modal.js000064400000003561151175143700010743 0ustar00/**
* @copyright (C) 2017 Open Source Matters, Inc.
<https://www.joomla.org>
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
document.addEventListener('DOMContentLoaded', function() {
"use strict";
/** Get the elements **/
var modulesLinks =
document.querySelectorAll('.js-module-insert'), i,
positionsLinks =
document.querySelectorAll('.js-position-insert');
/** Assign listener for click event (for single module id insertion) **/
for (i= 0; modulesLinks.length > i; i++) {
modulesLinks[i].addEventListener('click', function(event) {
event.preventDefault();
var modid = event.target.getAttribute('data-module'),
editor = event.target.getAttribute('data-editor');
/** Use the API, if editor supports it **/
if (window.parent.Joomla && window.parent.Joomla.editors
&& window.parent.Joomla.editors.instances &&
window.parent.Joomla.editors.instances.hasOwnProperty(editor)) {
window.parent.Joomla.editors.instances[editor].replaceSelection("{loadmoduleid
" + modid + "}")
} else {
window.parent.jInsertEditorText("{loadmoduleid " + modid +
"}", editor);
}
window.parent.jModalClose();
});
}
/** Assign listener for click event (for position insertion) **/
for (i= 0; positionsLinks.length > i; i++) {
positionsLinks[i].addEventListener('click', function(event) {
event.preventDefault();
var position = event.target.getAttribute('data-position'),
editor = event.target.getAttribute('data-editor');
/** Use the API, if editor supports it **/
if (window.Joomla && window.Joomla.editors &&
Joomla.editors.instances &&
Joomla.editors.instances.hasOwnProperty(editor)) {
Joomla.editors.instances[editor].replaceSelection("{loadposition
" + position + "}")
} else {
window.parent.jInsertEditorText("{loadposition " + position +
"}", editor);
}
window.parent.jModalClose();
});
}
});
admin-modules-modal.min.js000064400000002110151175143700011512
0ustar00document.addEventListener('DOMContentLoaded',function(){'use
strict';var
b,a=document.querySelectorAll('.js-module-insert'),c=document.querySelectorAll('.js-position-insert');for(b=0;a.length>b;b++)a[b].addEventListener('click',function(d){d.preventDefault();var
e=d.target.getAttribute('data-module'),f=d.target.getAttribute('data-editor');window.parent.Joomla&&window.parent.Joomla.editors&&window.parent.Joomla.editors.instances&&window.parent.Joomla.editors.instances.hasOwnProperty(f)?window.parent.Joomla.editors.instances[f].replaceSelection('{loadmoduleid
'+e+'}'):window.parent.jInsertEditorText('{loadmoduleid
'+e+'}',f),window.parent.jModalClose()});for(b=0;c.length>b;b++)c[b].addEventListener('click',function(d){d.preventDefault();var
e=d.target.getAttribute('data-position'),f=d.target.getAttribute('data-editor');window.Joomla&&window.Joomla.editors&&Joomla.editors.instances&&Joomla.editors.instances.hasOwnProperty(f)?Joomla.editors.instances[f].replaceSelection('{loadposition
'+e+'}'):window.parent.jInsertEditorText('{loadposition
'+e+'}',f),window.parent.jModalClose()})});
administrator/admin-phocaitems-modal.js000064400000004635151175232450014313
0ustar00/**
* PLEASE DO NOT MODIFY THIS FILE. WORK ON THE ES6 VERSION.
* OTHERWISE YOUR CHANGES WILL BE REPLACED ON THE NEXT BUILD.
**/
/**
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All
rights reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
(function () {
"use strict";
/**
* Javascript to insert the link
* View element calls jSelectPhocacartitems when a product is clicked
* jSelectPhoca creates the link tag, sends it to the editor,
* and closes the select frame.
*/
window.jSelectPhocacartitem = function (id, title, catid, object, link,
lang) {
var hreflang = '',
tag,
editor;
if (!Joomla.getOptions('xtd-phocacartitems')) {
// Something went wrong!
window.parent.jModalClose();
return false;
}
editor = Joomla.getOptions('xtd-phocacartitems').editor;
if (lang !== '') {
hreflang = ' hreflang = "' + lang +
'"';
}
tag = '<a' + hreflang + ' href="' + link +
'">' + title + '</a>';
/** Use the API, if editor supports it **/
if (window.parent.Joomla && window.parent.Joomla.editors
&& window.parent.Joomla.editors.instances &&
window.parent.Joomla.editors.instances.hasOwnProperty(editor)) {
window.parent.Joomla.editors.instances[editor].replaceSelection(tag);
} else {
window.parent.jInsertEditorText(tag, editor);
}
window.parent.jModalClose();
};
document.addEventListener('DOMContentLoaded', function () {
// Get the elements
var elements = document.querySelectorAll('.select-link');
for (var i = 0, l = elements.length; l > i; i++) {
// Listen for click event
elements[i].addEventListener('click', function (event) {
event.preventDefault();
var functionName =
event.target.getAttribute('data-function');
if (functionName === 'jSelectPhocacartitem') {
// Used in xtd_phocacartitems
window[functionName](event.target.getAttribute('data-id'),
event.target.getAttribute('data-title'), null, null,
event.target.getAttribute('data-uri'),
event.target.getAttribute('data-language'), null);
} else {
// Used in com_menus
window.parent[functionName](event.target.getAttribute('data-id'),
event.target.getAttribute('data-title'), null, null,
event.target.getAttribute('data-uri'),
event.target.getAttribute('data-language'), null);
}
});
}
});
})();administrator/admin-phocaitems-modal.min.js000064400000002244151175232450015067
0ustar00(function(){"use
strict";window.jSelectPhocacartitem=function(a,b,c,d,e,f){var
g,h,i="";return
Joomla.getOptions("xtd-phocacartitems")?void(h=Joomla.getOptions("xtd-phocacartitems").editor,""!==f&&(i="
hreflang =
\""+f+"\""),g="<a"+i+"
href=\""+e+"\">"+b+"</a>",window.parent.Joomla&&window.parent.Joomla.editors&&window.parent.Joomla.editors.instances&&window.parent.Joomla.editors.instances.hasOwnProperty(h)?window.parent.Joomla.editors.instances[h].replaceSelection(g):window.parent.jInsertEditorText(g,h),window.parent.jModalClose()):(window.parent.jModalClose(),!1)},document.addEventListener("DOMContentLoaded",function(){for(var
a=document.querySelectorAll(".select-link"),b=0,c=a.length;c>b;b++)a[b].addEventListener("click",function(a){a.preventDefault();var
b=a.target.getAttribute("data-function");"jSelectPhocacartitem"===b?window[b](a.target.getAttribute("data-id"),a.target.getAttribute("data-title"),null,null,a.target.getAttribute("data-uri"),a.target.getAttribute("data-language"),null):window.parent[b](a.target.getAttribute("data-id"),a.target.getAttribute("data-title"),null,null,a.target.getAttribute("data-uri"),a.target.getAttribute("data-language"),null)})})})();administrator/bootstrap.typeahead.js000064400000020172151175232450013751
0ustar00/* =============================================================
* bootstrap-typeahead.js v2.3.2
* http://getbootstrap.com/2.3.2/javascript.html#typeahead
* =============================================================
* Copyright 2013 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the
"License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS"
BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ============================================================ */
!function($){
"use strict"; // jshint ;_;
/* TYPEAHEAD PUBLIC CLASS DEFINITION
* ================================= */
var Typeahead = function (element, options) {
this.$element = $(element)
this.options = $.extend({}, $.fn.typeahead.defaults, options)
this.matcher = this.options.matcher || this.matcher
this.sorter = this.options.sorter || this.sorter
this.highlighter = this.options.highlighter || this.highlighter
this.updater = this.options.updater || this.updater
this.source = this.options.source
this.$menu = $(this.options.menu)
this.shown = false
this.listen()
}
Typeahead.prototype = {
constructor: Typeahead
, select: function () {
var val =
this.$menu.find('.active').attr('data-value')
this.$element
.val(this.updater(val))
.change()
return this.hide()
}
, updater: function (item) {
return item
}
, show: function () {
var pos = $.extend({}, this.$element.position(), {
height: this.$element[0].offsetHeight
})
this.$menu
.insertAfter(this.$element)
.css({
top: pos.top + pos.height
, left: pos.left
})
.show()
this.shown = true
return this
}
, hide: function () {
this.$menu.hide()
this.shown = false
return this
}
, lookup: function (event) {
var items
this.query = this.$element.val()
if (!this.query || this.query.length < this.options.minLength) {
return this.shown ? this.hide() : this
}
items = $.isFunction(this.source) ? this.source(this.query,
$.proxy(this.process, this)) : this.source
return items ? this.process(items) : this
}
, process: function (items) {
var that = this
items = $.grep(items, function (item) {
return that.matcher(item)
})
items = this.sorter(items)
if (!items.length) {
return this.shown ? this.hide() : this
}
return this.render(items.slice(0, this.options.items)).show()
}
, matcher: function (item) {
return ~item.toLowerCase().indexOf(this.query.toLowerCase())
}
, sorter: function (items) {
var beginswith = []
, caseSensitive = []
, caseInsensitive = []
, item
while (item = items.shift()) {
if (!item.toLowerCase().indexOf(this.query.toLowerCase()))
beginswith.push(item)
else if (~item.indexOf(this.query)) caseSensitive.push(item)
else caseInsensitive.push(item)
}
return beginswith.concat(caseSensitive, caseInsensitive)
}
, highlighter: function (item) {
var query = this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,
'\\$&')
return item.replace(new RegExp('(' + query + ')',
'ig'), function ($1, match) {
return '<strong>' + match +
'</strong>'
})
}
, render: function (items) {
var that = this
items = $(items).map(function (i, item) {
i = $(that.options.item).attr('data-value', item)
i.find('a').html(that.highlighter(item))
return i[0]
})
items.first().addClass('active')
this.$menu.html(items)
return this
}
, next: function (event) {
var active =
this.$menu.find('.active').removeClass('active')
, next = active.next()
if (!next.length) {
next = $(this.$menu.find('li')[0])
}
next.addClass('active')
}
, prev: function (event) {
var active =
this.$menu.find('.active').removeClass('active')
, prev = active.prev()
if (!prev.length) {
prev = this.$menu.find('li').last()
}
prev.addClass('active')
}
, listen: function () {
this.$element
.on('focus', $.proxy(this.focus, this))
.on('blur', $.proxy(this.blur, this))
.on('keypress', $.proxy(this.keypress, this))
.on('keyup', $.proxy(this.keyup, this))
if (this.eventSupported('keydown')) {
this.$element.on('keydown', $.proxy(this.keydown, this))
}
this.$menu
.on('click', $.proxy(this.click, this))
.on('mouseenter', 'li',
$.proxy(this.mouseenter, this))
.on('mouseleave', 'li',
$.proxy(this.mouseleave, this))
}
, eventSupported: function(eventName) {
var isSupported = eventName in this.$element
if (!isSupported) {
this.$element.setAttribute(eventName, 'return;')
isSupported = typeof this.$element[eventName] ===
'function'
}
return isSupported
}
, move: function (e) {
if (!this.shown) return
switch(e.keyCode) {
case 9: // tab
case 13: // enter
case 27: // escape
e.preventDefault()
break
case 38: // up arrow
e.preventDefault()
this.prev()
break
case 40: // down arrow
e.preventDefault()
this.next()
break
}
e.stopPropagation()
}
, keydown: function (e) {
this.suppressKeyPressRepeat = ~$.inArray(e.keyCode, [40,38,9,13,27])
this.move(e)
}
, keypress: function (e) {
if (this.suppressKeyPressRepeat) return
this.move(e)
}
, keyup: function (e) {
switch(e.keyCode) {
case 40: // down arrow
case 38: // up arrow
case 16: // shift
case 17: // ctrl
case 18: // alt
break
case 9: // tab
case 13: // enter
if (!this.shown) return
this.select()
break
case 27: // escape
if (!this.shown) return
this.hide()
break
default:
this.lookup()
}
e.stopPropagation()
e.preventDefault()
}
, focus: function (e) {
this.focused = true
}
, blur: function (e) {
this.focused = false
if (!this.mousedover && this.shown) this.hide()
}
, click: function (e) {
e.stopPropagation()
e.preventDefault()
this.select()
this.$element.focus()
}
, mouseenter: function (e) {
this.mousedover = true
this.$menu.find('.active').removeClass('active')
$(e.currentTarget).addClass('active')
}
, mouseleave: function (e) {
this.mousedover = false
if (!this.focused && this.shown) this.hide()
}
}
/* TYPEAHEAD PLUGIN DEFINITION
* =========================== */
var old = $.fn.typeahead
$.fn.typeahead = function (option) {
return this.each(function () {
var $this = $(this)
, data = $this.data('typeahead')
, options = typeof option == 'object' && option
if (!data) $this.data('typeahead', (data = new
Typeahead(this, options)))
if (typeof option == 'string') data[option]()
})
}
$.fn.typeahead.defaults = {
source: []
, items: 8
, menu: '<ul class="typeahead
dropdown-menu"></ul>'
, item: '<li><a
href="#"></a></li>'
, minLength: 1
}
$.fn.typeahead.Constructor = Typeahead
/* TYPEAHEAD NO CONFLICT
* =================== */
$.fn.typeahead.noConflict = function () {
$.fn.typeahead = old
return this
}
/* TYPEAHEAD DATA-API
* ================== */
$(document).on('focus.typeahead.data-api',
'[data-provide="typeahead"]', function (e) {
var $this = $(this)
if ($this.data('typeahead')) return
$this.typeahead($this.data())
})
}(window.jQuery);
administrator/coordinates.js000064400000004001151175232450012274
0ustar00function setPMGPSLongitude(inputValue) {
longitudeValue = convertPMGPS(inputValue, 'longitude');
window.top.document.forms.adminForm.elements.gpslongitude.value =
longitudeValue;
}
function setPMGPSLatitude(inputValue) {
latitudeValue = convertPMGPS(inputValue, 'latitude');
window.top.document.forms.adminForm.elements.gpslatitude.value =
latitudeValue;
}
function setPMGPSLongitudeJForm(inputValue) {
longitudeValue = convertPMGPS(inputValue, 'longitude');
if (window.parent)
window.parent.phocaSelectMap_jform_gpslongitude(longitudeValue);
}
function setPMGPSLatitudeJForm(inputValue) {
latitudeValue = convertPMGPS(inputValue, 'latitude');
if (window.parent)
window.parent.phocaSelectMap_jform_gpslatitude(latitudeValue);
}
function convertPMGPS(inputValue, type) {
var status = 1;
var cAbs = 0;
var vAbs = 1000000000;
var degree = 0;
var minute = 0;
var second = 0;
var gpsValue = '';
var degrees = 180;
var potc = '';
var ms = 60;
if (type == 'longitude') {
degrees = 180;
}
if (type == 'latitude') {
degrees = 90;
}
if(isNaN(inputValue)) {
return '';
}
if(inputValue < 0) {
status = -1;
}
cAbs = Math.abs(Math.round(vAbs * inputValue));
if(cAbs > (vAbs * degrees)) {
return '';
}
degree = status * Math.floor(cAbs/vAbs);
minute = Math.floor(ms * ((cAbs/vAbs) - Math.floor(cAbs/vAbs)));
second = ms * Math.floor(vAbs * ((ms * ((cAbs/vAbs) -
Math.floor(cAbs/vAbs))) - Math.floor(ms * ((cAbs/vAbs) -
Math.floor(cAbs/vAbs)))) ) / vAbs;
second = Math.round(second * 1000)/1000;
if (degree < 0) {
if (type == 'longitude') {
potc = 'W';
}
if (type == 'latitude') {
potc = 'S';
}
}
if (degree > 0) {
if (type == 'longitude') {
potc = 'E';
}
if (type == 'latitude') {
potc = 'N';
}
}
gpsValue = Math.abs(degree) + '\u00b0' + '\u0020' +
minute + '\u0027' + '\u0020' + second +
'\u0022' + potc;
//status = 1;
return gpsValue;
}
/* utf-8 test ěščřžýáíé
*/administrator/geoxml3.js000064400000035263151175232450011356 0ustar00/*
geoXML3.js
Renders KML on the Google Maps JavaScript API Version 3
http://code.google.com/p/geoxml3/
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see
<http://www.gnu.org/licenses/>.
*/
// Extend the global String with a method to remove leading and trailing
whitespace
if (!String.prototype.trim) {
String.prototype.trim = function () {
return this.replace(/^\s+|\s+$/g, '');
};
}
// Declare namespace
geoXML3 = window.geoXML3 || {};
// Constructor for the root KML parser object
geoXML3.parser = function (options) {
// Private variables
var parserOptions = geoXML3.combineOptions(options, {
singleInfoWindow: false,
processStyles: true,
zoom: true
});
var docs = []; // Individual KML documents
var lastMarker;
// Private methods
var parse = function (urls) {
// Process one or more KML documents
if (typeof urls === 'string') {
// Single KML document
urls = [urls];
}
// Internal values for the set of documents as a whole
var internals = {
docSet: [],
remaining: urls.length,
parserOnly: !parserOptions.afterParse
};
var thisDoc;
for (var i = 0; i < urls.length; i++) {
thisDoc = {
url: urls[i],
internals: internals
};
internals.docSet.push(thisDoc);
geoXML3.fetchXML(thisDoc.url, function (responseXML)
{render(responseXML, thisDoc);});
}
};
var hideDocument = function (doc) {
// Hide the map objects associated with a document
var i;
for (i = 0; i < doc.markers.length; i++) {
this.markers[i].set_visible(false);
}
for (i = 0; i < doc.overlays.length; i++) {
doc.overlays[i].setOpacity(0);
}
};
var showDocument = function (doc) {
// Show the map objects associated with a document
var i;
for (i = 0; i < doc.markers.length; i++) {
doc.markers[i].set_visible(true);
}
for (i = 0; i < doc.overlays.length; i++) {
doc.overlays[i].setOpacity(doc.overlays[i].percentOpacity_);
}
};
var render = function (responseXML, doc) {
// Callback for retrieving a KML document: parse the KML and display it
on the map
if (!responseXML) {
// Error retrieving the data
geoXML3.log('Unable to retrieve ' + doc.url);
if (parserOptions.failedParse) {
parserOptions.failedParse(doc);
}
} else if (!doc) {
throw 'geoXML3 internal error: render called with null
document';
} else {
doc.styles = {};
doc.placemarks = [];
doc.groundOverlays = [];
if (parserOptions.zoom && !!parserOptions.map)
doc.bounds = new google.maps.LatLngBounds();
// Parse styles
var styleID, iconNodes, i;
var styleNodes = responseXML.getElementsByTagName('Style');
for (i = 0; i < styleNodes.length; i++) {
styleID = styleNodes[i].getAttribute('id');
iconNodes = styleNodes[i].getElementsByTagName('Icon');
if (!!iconNodes.length) {
doc.styles['#' + styleID] = {
href:
geoXML3.nodeValue(iconNodes[0].getElementsByTagName('href')[0])
};
}
}
if (!!parserOptions.processStyles || !parserOptions.createMarker) {
// Convert parsed styles into GMaps equivalents
processStyles(doc);
}
// Parse placemarks
var placemark, node, coords, path;
var placemarkNodes =
responseXML.getElementsByTagName('Placemark');
for (i = 0; i < placemarkNodes.length; i++) {
// Init the placemark object
node = placemarkNodes[i];
placemark = {
name:
geoXML3.nodeValue(node.getElementsByTagName('name')[0]),
description:
geoXML3.nodeValue(node.getElementsByTagName('description')[0]),
styleUrl:
geoXML3.nodeValue(node.getElementsByTagName('styleUrl')[0])
};
placemark.style = doc.styles[placemark.styleUrl] || {};
if (/^https?:\/\//.test(placemark.description)) {
placemark.description = '<a href="' +
placemark.description + '">' + placemark.description +
'</a>';
}
// Extract the coordinates
coords =
geoXML3.nodeValue(node.getElementsByTagName('coordinates')[0]).trim();
coords = coords.replace(/\s+/g, ' ').replace(/, /g,
',');
path = coords.split(' ');
// What sort of placemark?
if (path.length === 1) {
// Polygons/lines not supported in v3, so only plot markers
coords = path[0].split(',');
placemark.point = {
lat: parseFloat(coords[1]),
lng: parseFloat(coords[0]),
alt: parseFloat(coords[2])
};
if (!!doc.bounds) {
doc.bounds.extend(new google.maps.LatLng(placemark.point.lat,
placemark.point.lng));
}
// Call the appropriate function to create the marker
if (!!parserOptions.createMarker) {
parserOptions.createMarker(placemark, doc);
} else {
createMarker(placemark, doc);
}
}
}
// Parse ground overlays
var groundOverlay, color, transparency;
var groundNodes =
responseXML.getElementsByTagName('GroundOverlay');
for (i = 0; i < groundNodes.length; i++) {
node = groundNodes[i];
// Init the ground overlay object
groundOverlay = {
name:
geoXML3.nodeValue(node.getElementsByTagName('name')[0]),
description:
geoXML3.nodeValue(node.getElementsByTagName('description')[0]),
icon: {href:
geoXML3.nodeValue(node.getElementsByTagName('href')[0])},
latLonBox: {
north:
parseFloat(geoXML3.nodeValue(node.getElementsByTagName('north')[0])),
east:
parseFloat(geoXML3.nodeValue(node.getElementsByTagName('east')[0])),
south:
parseFloat(geoXML3.nodeValue(node.getElementsByTagName('south')[0])),
west:
parseFloat(geoXML3.nodeValue(node.getElementsByTagName('west')[0]))
}
};
if (!!doc.bounds) {
doc.bounds.union(new google.maps.LatLngBounds(
new google.maps.LatLng(groundOverlay.latLonBox.south,
groundOverlay.latLonBox.west),
new google.maps.LatLng(groundOverlay.latLonBox.north,
groundOverlay.latLonBox.east)
));
}
// Opacity is encoded in the color node
color =
geoXML3.nodeValue(node.getElementsByTagName('color')[0]);
if ((color !== '') && (color.length == 8)) {
transparency = parseInt(color.substring(0, 2), 16);
groundOverlay.opacity = Math.round((255 - transparency) / 2.55);
} else {
groundOverlay.opacity = 100;
}
// Call the appropriate function to create the overlay
if (!!parserOptions.createOverlay) {
parserOptions.createOverlay(groundOverlay, doc);
} else {
createOverlay(groundOverlay, doc);
}
}
if (!!doc.bounds) {
doc.internals.bounds = doc.internals.bounds || new
google.maps.LatLngBounds();
doc.internals.bounds.union(doc.bounds);
}
if (!!doc.styles || !!doc.markers || !!doc.overlays) {
doc.internals.parserOnly = false;
}
doc.internals.remaining -= 1;
if (doc.internals.remaining === 0) {
// We're done processing this set of KML documents
// Options that get invoked after parsing completes
if (!!doc.internals.bounds) {
parserOptions.map.fitBounds(doc.internals.bounds);
}
if (parserOptions.afterParse) {
parserOptions.afterParse(doc.internals.docSet);
}
if (!doc.internals.parserOnly) {
// geoXML3 is not being used only as a real-time parser, so keep
the parsed documents around
docs.concat(doc.internals.docSet);
}
}
}
};
var processStyles = function (doc) {
var stdRegEx =
/\/(red|blue|green|yellow|lightblue|purple|pink|orange)(-dot)?\.png/;
for (var styleID in doc.styles) {
if (!!doc.styles[styleID].href) {
// Init the style object with a standard KML icon
doc.styles[styleID].icon = new google.maps.MarkerImage(
doc.styles[styleID].href,
new google.maps.Size(32, 32),
new google.maps.Point(0, 0),
new google.maps.Point(16, 12)
);
// Look for a predictable shadow
if (stdRegEx.test(doc.styles[styleID].href)) {
// A standard GMap-style marker icon
doc.styles[styleID].shadow = new google.maps.MarkerImage(
'http://maps.google.com/mapfiles/ms/micons/msmarker.shadow.png',
new google.maps.Size(59, 32),
new google.maps.Point(0, 0),
new google.maps.Point(16, 12));
} else if
(doc.styles[styleID].href.indexOf('-pushpin.png') > -1) {
// Pushpin marker icon
doc.styles[styleID].shadow = new google.maps.MarkerImage(
'http://maps.google.com/mapfiles/ms/micons/pushpin_shadow.png',
new google.maps.Size(59, 32),
new google.maps.Point(0, 0),
new google.maps.Point(16, 12));
} else {
// Other MyMaps KML standard icon
doc.styles[styleID].shadow = new google.maps.MarkerImage(
doc.styles[styleID].href.replace('.png',
'.shadow.png'),
new google.maps.Size(59, 32),
new google.maps.Point(0, 0),
new google.maps.Point(16, 12));
}
}
}
};
var createMarker = function (placemark, doc) {
// create a Marker to the map from a placemark KML object
// Load basic marker properties
var markerOptions = geoXML3.combineOptions(parserOptions.markerOptions,
{
map: parserOptions.map,
position: new google.maps.LatLng(placemark.point.lat,
placemark.point.lng),
title: placemark.name,
zIndex: Math.round(-placemark.point.lat * 100000),
icon: placemark.style.icon,
shadow: placemark.style.shadow
});
// Create the marker on the map
var marker = new google.maps.Marker(markerOptions);
// Set up and create the infowindow
var infoWindowOptions =
geoXML3.combineOptions(parserOptions.infoWindowOptions, {
content: '<div
class="infowindow"><h3>' + placemark.name +
'</h3><div>' + placemark.description +
'</div></div>',
pixelOffset: new google.maps.Size(0, 2)
});
marker.infoWindow = new google.maps.InfoWindow(infoWindowOptions);
// Infowindow-opening event handler
google.maps.event.addListener(marker, 'click', function() {
if (!!parserOptions.singleInfoWindow) {
if (!!lastMarker && !!lastMarker.infoWindow) {
lastMarker.infoWindow.close();
}
lastMarker = this;
}
this.infoWindow.open(this.map, this);
});
if (!!doc) {
doc.markers = doc.markers || [];
doc.markers.push(marker);
}
return marker;
};
var createOverlay = function (groundOverlay, doc) {
// Add a ProjectedOverlay to the map from a groundOverlay KML object
if (!window.ProjectedOverlay) {
throw 'geoXML3 error: ProjectedOverlay not found while rendering
GroundOverlay from KML';
}
var bounds = new google.maps.LatLngBounds(
new google.maps.LatLng(groundOverlay.latLonBox.south,
groundOverlay.latLonBox.west),
new google.maps.LatLng(groundOverlay.latLonBox.north,
groundOverlay.latLonBox.east)
);
var overlayOptions =
geoXML3.combineOptions(parserOptions.overlayOptions, {percentOpacity:
groundOverlay.opacity});
var overlay = new ProjectedOverlay(parserOptions.map,
groundOverlay.icon.href, bounds, overlayOptions);
if (!!doc) {
doc.overlays = doc.overlays || [];
doc.overlays.push(overlay);
}
return
};
return {
// Expose some properties and methods
options: parserOptions,
docs: docs,
parse: parse,
hideDocument: hideDocument,
showDocument: showDocument,
processStyles: processStyles,
createMarker: createMarker,
createOverlay: createOverlay
};
};
// End of KML Parser
// Helper objects and functions
// Log a message to the debugging console, if one exists
geoXML3.log = function(msg) {
if (!!window.console) {
console.log(msg);
}
};
// Combine two options objects, a set of default values and a set of
override values
geoXML3.combineOptions = function (overrides, defaults) {
var result = {};
if (!!overrides) {
for (var prop in overrides) {
if (overrides.hasOwnProperty(prop)) {
result[prop] = overrides[prop];
}
}
}
if (!!defaults) {
for (prop in defaults) {
if (defaults.hasOwnProperty(prop) && (result[prop] ===
undefined)) {
result[prop] = defaults[prop];
}
}
}
return result;
};
// Retrieve a text document from url and pass it to callback as a string
geoXML3.fetchers = [];
geoXML3.fetchXML = function (url, callback) {
function timeoutHandler() {
callback();
};
var xhrFetcher;
if (!!geoXML3.fetchers.length) {
xhrFetcher = geoXML3.fetchers.pop();
} else {
if (!!window.XMLHttpRequest) {
xhrFetcher = new window.XMLHttpRequest(); // Most browsers
} else if (!!window.ActiveXObject) {
xhrFetcher = new window.ActiveXObject('Microsoft.XMLHTTP');
// Some IE
}
}
if (!xhrFetcher) {
geoXML3.log('Unable to create XHR object');
callback(null);
} else {
xhrFetcher.open('GET', url, true);
xhrFetcher.onreadystatechange = function () {
if (xhrFetcher.readyState === 4) {
// Retrieval complete
if (!!xhrFetcher.timeout)
clearTimeout(xhrFetcher.timeout);
if (xhrFetcher.status >= 400) {
geoXML3.log('HTTP error ' + xhrFetcher.status + '
retrieving ' + url);
callback();
} else {
// Returned successfully
callback(xhrFetcher.responseXML);
}
// We're done with this fetcher object
geoXML3.fetchers.push(xhrFetcher);
}
};
xhrFetcher.timeout = setTimeout(timeoutHandler, 60000);
xhrFetcher.send(null);
}
};
//nodeValue: Extract the text value of a DOM node, with leading and
trailing whitespace trimmed
geoXML3.nodeValue = function(node) {
if (!node) {
return '';
} else {
return (node.innerText || node.text || node.textContent).trim();
}
};
administrator/geoxml3.min.js000064400000014446151175232450012140
0ustar00String.prototype.trim||(String.prototype.trim=function(){return
this.replace(/^\s+|\s+$/g,"")}),geoXML3=window.geoXML3||{},geoXML3.parser=function(e){var
s,y=geoXML3.combineOptions(e,{singleInfoWindow:!1,processStyles:!0,zoom:!0}),w=[],a=function(e,o){if(e){if(!o)throw"geoXML3
internal error: render called with null document";var
n,t,a;o.styles={},o.placemarks=[],o.groundOverlays=[],y.zoom&&y.map&&(o.bounds=new
google.maps.LatLngBounds);var
s,r,l,i,g=e.getElementsByTagName("Style");for(a=0;a<g.length;a++)n=g[a].getAttribute("id"),(t=g[a].getElementsByTagName("Icon")).length&&(o.styles["#"+n]={href:geoXML3.nodeValue(t[0].getElementsByTagName("href")[0])});!y.processStyles&&y.createMarker||h(o);var
p,m,c,d=e.getElementsByTagName("Placemark");for(a=0;a<d.length;a++)r=d[a],(s={name:geoXML3.nodeValue(r.getElementsByTagName("name")[0]),description:geoXML3.nodeValue(r.getElementsByTagName("description")[0]),styleUrl:geoXML3.nodeValue(r.getElementsByTagName("styleUrl")[0])}).style=o.styles[s.styleUrl]||{},/^https?:\/\//.test(s.description)&&(s.description='<a
href="'+s.description+'">'+s.description+"</a>"),1===(i=(l=(l=geoXML3.nodeValue(r.getElementsByTagName("coordinates")[0]).trim()).replace(/\s+/g,"
").replace(/, /g,",")).split("
")).length&&(l=i[0].split(","),s.point={lat:parseFloat(l[1]),lng:parseFloat(l[0]),alt:parseFloat(l[2])},o.bounds&&o.bounds.extend(new
google.maps.LatLng(s.point.lat,s.point.lng)),y.createMarker?y.createMarker(s,o):f(s,o));var
u=e.getElementsByTagName("GroundOverlay");for(a=0;a<u.length;a++)r=u[a],p={name:geoXML3.nodeValue(r.getElementsByTagName("name")[0]),description:geoXML3.nodeValue(r.getElementsByTagName("description")[0]),icon:{href:geoXML3.nodeValue(r.getElementsByTagName("href")[0])},latLonBox:{north:parseFloat(geoXML3.nodeValue(r.getElementsByTagName("north")[0])),east:parseFloat(geoXML3.nodeValue(r.getElementsByTagName("east")[0])),south:parseFloat(geoXML3.nodeValue(r.getElementsByTagName("south")[0])),west:parseFloat(geoXML3.nodeValue(r.getElementsByTagName("west")[0]))}},o.bounds&&o.bounds.union(new
google.maps.LatLngBounds(new
google.maps.LatLng(p.latLonBox.south,p.latLonBox.west),new
google.maps.LatLng(p.latLonBox.north,p.latLonBox.east))),""!==(m=geoXML3.nodeValue(r.getElementsByTagName("color")[0]))&&8==m.length?(c=parseInt(m.substring(0,2),16),p.opacity=Math.round((255-c)/2.55)):p.opacity=100,y.createOverlay?y.createOverlay(p,o):L(p,o);o.bounds&&(o.internals.bounds=o.internals.bounds||new
google.maps.LatLngBounds,o.internals.bounds.union(o.bounds)),(o.styles||o.markers||o.overlays)&&(o.internals.parserOnly=!1),--o.internals.remaining,0===o.internals.remaining&&(o.internals.bounds&&y.map.fitBounds(o.internals.bounds),y.afterParse&&y.afterParse(o.internals.docSet),o.internals.parserOnly||w.concat(o.internals.docSet))}else
geoXML3.log("Unable to retrieve
"+o.url),y.failedParse&&y.failedParse(o)},h=function(e){var
o=/\/(red|blue|green|yellow|lightblue|purple|pink|orange)(-dot)?\.png/;for(var
n in e.styles)e.styles[n].href&&(e.styles[n].icon=new
google.maps.MarkerImage(e.styles[n].href,new google.maps.Size(32,32),new
google.maps.Point(0,0),new
google.maps.Point(16,12)),o.test(e.styles[n].href)?e.styles[n].shadow=new
google.maps.MarkerImage("http://maps.google.com/mapfiles/ms/micons/msmarker.shadow.png",new
google.maps.Size(59,32),new google.maps.Point(0,0),new
google.maps.Point(16,12)):-1<e.styles[n].href.indexOf("-pushpin.png")?e.styles[n].shadow=new
google.maps.MarkerImage("http://maps.google.com/mapfiles/ms/micons/pushpin_shadow.png",new
google.maps.Size(59,32),new google.maps.Point(0,0),new
google.maps.Point(16,12)):e.styles[n].shadow=new
google.maps.MarkerImage(e.styles[n].href.replace(".png",".shadow.png"),new
google.maps.Size(59,32),new google.maps.Point(0,0),new
google.maps.Point(16,12)))},f=function(e,o){var
n=geoXML3.combineOptions(y.markerOptions,{map:y.map,position:new
google.maps.LatLng(e.point.lat,e.point.lng),title:e.name,zIndex:Math.round(1e5*-e.point.lat),icon:e.style.icon,shadow:e.style.shadow}),t=new
google.maps.Marker(n),a=geoXML3.combineOptions(y.infoWindowOptions,{content:'<div
class="infowindow"><h3>'+e.name+"</h3><div>"+e.description+"</div></div>",pixelOffset:new
google.maps.Size(0,2)});return t.infoWindow=new
google.maps.InfoWindow(a),google.maps.event.addListener(t,"click",function(){y.singleInfoWindow&&(s&&s.infoWindow&&s.infoWindow.close(),s=this),this.infoWindow.open(this.map,this)}),o&&(o.markers=o.markers||[],o.markers.push(t)),t},L=function(e,o){if(!window.ProjectedOverlay)throw"geoXML3
error: ProjectedOverlay not found while rendering GroundOverlay from
KML";var n=new google.maps.LatLngBounds(new
google.maps.LatLng(e.latLonBox.south,e.latLonBox.west),new
google.maps.LatLng(e.latLonBox.north,e.latLonBox.east)),t=geoXML3.combineOptions(y.overlayOptions,{percentOpacity:e.opacity}),a=new
ProjectedOverlay(y.map,e.icon.href,n,t);o&&(o.overlays=o.overlays||[],o.overlays.push(a))};return{options:y,docs:w,parse:function(e){"string"==typeof
e&&(e=[e]);for(var
o,n={docSet:[],remaining:e.length,parserOnly:!y.afterParse},t=0;t<e.length;t++)o={url:e[t],internals:n},n.docSet.push(o),geoXML3.fetchXML(o.url,function(e){a(e,o)})},hideDocument:function(e){var
o;for(o=0;o<e.markers.length;o++)this.markers[o].set_visible(!1);for(o=0;o<e.overlays.length;o++)e.overlays[o].setOpacity(0)},showDocument:function(e){var
o;for(o=0;o<e.markers.length;o++)e.markers[o].set_visible(!0);for(o=0;o<e.overlays.length;o++)e.overlays[o].setOpacity(e.overlays[o].percentOpacity_)},processStyles:h,createMarker:f,createOverlay:L}},geoXML3.log=function(e){window.console&&console.log(e)},geoXML3.combineOptions=function(e,o){var
n={};if(e)for(var t in
e)e.hasOwnProperty(t)&&(n[t]=e[t]);if(o)for(t in
o)o.hasOwnProperty(t)&&void 0===n[t]&&(n[t]=o[t]);return
n},geoXML3.fetchers=[],geoXML3.fetchXML=function(e,o){var
n;geoXML3.fetchers.length?n=geoXML3.fetchers.pop():window.XMLHttpRequest?n=new
window.XMLHttpRequest:window.ActiveXObject&&(n=new
window.ActiveXObject("Microsoft.XMLHTTP")),n?(n.open("GET",e,!0),n.onreadystatechange=function(){4===n.readyState&&(n.timeout&&clearTimeout(n.timeout),400<=n.status?(geoXML3.log("HTTP
error "+n.status+" retrieving
"+e),o()):o(n.responseXML),geoXML3.fetchers.push(n))},n.timeout=setTimeout(function(){o()},6e4),n.send(null)):(geoXML3.log("Unable
to create XHR object"),o(null))},geoXML3.nodeValue=function(e){return
e?(e.innerText||e.text||e.textContent).trim():""};administrator/index.html000064400000000054151175232450011425
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>administrator/jquery.equalheights.min.js000064400000000723151175232450014554
0ustar00/*!
* Simple jQuery Equal Heights
*
* Copyright (c) 2013 Matt Banks
* Dual licensed under the MIT and GPL licenses.
* Uses the same license as jQuery, see:
* http://docs.jquery.com/License
*
* @version 1.5.1
*/
!function(a){a.fn.equalHeights=function(){var b=0,c=a(this);return
c.each(function(){var
c=a(this).innerHeight();c>b&&(b=c)}),c.css("height",b)},a("[data-equal]").each(function(){var
b=a(this),c=b.data("equal");b.find(c).equalHeights()})}(jQuery);administrator/phocacart.js000064400000025544151175232450011745
0ustar00/*
* @package Phoca Cart
* @author Jan Pavelka - https://www.phoca.cz
* @copyright Copyright (C) Jan Pavelka https://www.phoca.cz
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 and later
* @cms Joomla
* @copyright Copyright (C) Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
*/
function phGetMsg(msg, defaultMsg) {
if (defaultMsg == 1) {
return '<div id="ph-ajaxtop-message">'
+ '<div id="ph-ajaxtop-close">x</div>'
+ '<div class="ph-result-txt ph-info-txt">' +
msg + '</div>'
+ '<div
class="ph-progressbar-bottom"></div>'
+ '</div>';
} else {
return '<div
id="ph-ajaxtop-close">x</div>' + msg +
'<div
class="ph-progressbar-bottom"></div>';
}
}
function phCloseMsgBoxSuccess() {
setTimeout(function(){
jQuery("#ph-ajaxtop").hide();
jQuery(".ph-result-txt").remove();
}, 2500);
jQuery(".ph-progressbar-bottom").animate({
width: "0%"
}, 2500 );
}
function phCloseMsgBoxError() {
setTimeout(function(){
jQuery("#ph-ajaxtop").hide();
jQuery(".ph-result-txt").remove();
}, 3500);
jQuery(".ph-progressbar-bottom").animate({
width: "0%"
}, 3500 );
}
/* Event - close ajax message on click */
jQuery(document).ready(function() {
jQuery("#ph-ajaxtop").on("click",
"#ph-ajaxtop-close", function() {
jQuery("#ph-ajaxtop").hide();
})
})
function phAddRowOptionParent(newRow, newHeader, attrid, url) {
var phCountRowOption = jQuery('.ph-row-option-attrid' +
attrid).length;
if(phCountRowOption == 0) {
jQuery('#phrowboxoptionjs' + attrid).append(newHeader);
}
jQuery('#phrowboxoptionjs' + attrid).append(newRow);
var phMiniColorsId = '#jform_optioncolor' + attrid +
phRowCountOption;// Reload minicolors
jQuery(phMiniColorsId).minicolors({
control: 'hex',
format: 'hex',
position: 'default',
theme: 'bootstrap'
});
/* Get and set the download token and download folder by ajax*/
data = {};
data['task'] = 'gettoken';
phRowCountOptionBeforeAjax = phRowCountOption;/* AJAX returns the values
after the phRowCountOption will be phRowCountOption++ in next rows*/
phRequestActiveToken = jQuery.ajax({
url: url,
type: 'POST',
data: data,
dataType: 'JSON',
success:function(response){
if ( response.status == 1 ){
var idFolder = '#jform_optiondownload_folder' + attrid +
phRowCountOptionBeforeAjax;
var idToken = '#jform_optiondownload_token' + attrid +
phRowCountOptionBeforeAjax;
jQuery(idFolder).val(response.folder);
jQuery(idToken).val(response.token);
phRequestActiveToken = null;
} else {
jQuery("#ph-ajaxtop").html(phGetMsg(' ',
1));
jQuery("#ph-ajaxtop").show();
jQuery("#ph-ajaxtop-message").html(phGetMsg(response.error,
0));
phRequestActiveToken = null;
phCloseMsgBoxError();
}
}
});
phRowCountOption++;
jQuery('select').chosen({disable_search_threshold :
10,allow_single_deselect : true});
}
function phRemoveOptionFolder(data, url) {
phRequestActiveToken = jQuery.ajax({
url: url,
type: 'POST',
data: data,
dataType: 'JSON',
success:function(response){
if ( response.status == 1 ){
jQuery("#ph-ajaxtop").html(phGetMsg(' ',
1));
jQuery("#ph-ajaxtop").show();
jQuery("#ph-ajaxtop-message").html(phGetMsg(response.message,
0));
phRequestActiveToken = null;
phCloseMsgBoxSuccess();
} else if (response.status == 2) {
/* no folder exists - nothing deleted - no need any message */
phRequestActiveToken = null;
} else {
jQuery("#ph-ajaxtop").html(phGetMsg(' ',
1));
jQuery("#ph-ajaxtop").show();
jQuery("#ph-ajaxtop-message").html(phGetMsg(response.error,
0));
phRequestActiveToken = null;
phCloseMsgBoxError();
}
}
});
}
function phRemoveRowOptionParent(id, attrid, url) {
/* Remove download folder for deleted attribute option */
var idDownloadFolder = '#jform_optiondownload_folder' + attrid +
id;
var downloadFolder = jQuery(idDownloadFolder).val();
data = {};
data['task'] = 'removefolder';
data['folder'] = {0: downloadFolder};
phRemoveOptionFolder(data, url);
jQuery('#phOptionBox' + attrid + id).remove();
var phCountRowOption = jQuery('.ph-row-option-attrid' +
attrid).length;
if (phCountRowOption == 0) {
jQuery('#phrowboxoptionjs' + attrid).empty();/* clean header of
option added by js */
jQuery('#phrowboxoption' + attrid).empty();/* clean header of
option loaded by php */
}
/* phRowCountOption--;//DON'T SUBTRACT, it is not COUNT, but ID,
every row should be unique ID*/
}
function phAddRowAttributeParent(newRow) {
jQuery('#phrowboxattribute').append(newRow);
phRowCountAttribute++;
jQuery('select').chosen({disable_search_threshold :
10,allow_single_deselect : true});
}
function phRemoveRowAttributeParent(id, url) {
/* Remove all attribute option folders */
var attrOptions = jQuery("#phAttributeBox" +
id).find("[data-attribute-id=\'" + id +
"\']");
var foldersToDelete = [];
for(var i = 0; i < attrOptions.length; i++){
foldersToDelete.push(attrOptions[i].value);
}
if (foldersToDelete.length !== 0) {
data = {};
data['task'] = 'removefolder';
data['folder'] = foldersToDelete;
phRemoveOptionFolder(data, url);
}
jQuery('#phAttributeBox' + id).remove();
var phCountRowAttribute = jQuery('.ph-row-attribute').length;
if (phCountRowAttribute == 0) {
jQuery('#phrowboxattribute').empty();
}
/* phRowCountAttribute--; DON'T SUBTRACT, it is not COUNT, but ID,
every row should be unique ID */
}
function phAddRowSpecificationParent(newRow, newHeader) {
var phCountRowSpecification =
jQuery('.ph-row-specification').length;
if(phCountRowSpecification == 0) {
jQuery('#phrowboxspecification').append(newHeader);
}
jQuery('#phrowboxspecification').append(newRow);
var phMiniColorsId = '#jform_speccolor' +
phRowCountSpecification;// Reload minicolors
jQuery(phMiniColorsId).minicolors({
control: 'hex',
format: 'hex',
position: 'default',
theme: 'bootstrap'
});
phRowCountSpecification++;
jQuery('select').chosen({disable_search_threshold :
10,allow_single_deselect : true});
}
function phRemoveRowSpecification(id) {
jQuery('#phSpecificationBox' + id).remove();
var phCountRowSpecification =
jQuery('.ph-row-specification').length;
if (phCountRowSpecification == 0) {
jQuery('#phrowboxspecification').empty();
jQuery('#phrowboxspecificationheader').empty();
}
}
function phAddRowImageParent(newRow) {
jQuery('#phrowboximage').append(newRow);
phRowCountImage++;
jQuery('select').chosen({disable_search_threshold :
10,allow_single_deselect : true});
}
function phRemoveRowImage(id) {
jQuery('#phrowimage' + id).remove();
var phCountRowImage = jQuery('.ph-row-image').length;
if (phCountRowImage == 0) {
jQuery('#phrowboximage').empty();
}
/* phRowCountImage--;';// DON'T SUBTRACT, it is not COUNT, but
ID, every row should be unique ID*/
}
function phAddRowDiscountParent(newRow, newHeader, isCompatible) {
var phCountRowDiscount = jQuery('.ph-row-discount').length;
if(phCountRowDiscount == 0) {
jQuery('#phrowboxdiscount').append(newHeader);
}
jQuery('#phrowboxdiscount').append(newRow);
phRowCountDiscount++;
jQuery('select').chosen({disable_search_threshold :
10,allow_single_deselect : true});
if(isCompatible) {
var elements = document.querySelectorAll(".field-calendar");
for (i = 0; i < elements.length; i++) {
JoomlaCalendar.init(elements[i]);
}
}
/*
jQuery(\'select\').trigger("chosen:updated");//Reload
Chosen
CALENDAR IS RELOADED DIRECTLY BELOW THE NEW ROW
administrator\components\com_phocacart\libraries\phocacart\render\adminview.php*/
}
function phRemoveRowDiscount(id) {
jQuery('#phDiscountBox' + id).remove();
var phCountRowDiscount = jQuery('.ph-row-discount').length;
if (phCountRowDiscount == 0) {
jQuery('#phrowboxdiscount').empty();
jQuery('#phrowboxdiscountheader').empty();
}
}
function phAddRowPricehistoryParent(newRow, isCompatible) {
jQuery('#phrowboxpricehistory').append(newRow);
phRowCountPricehistory++;
jQuery('select').chosen({disable_search_threshold :
10,allow_single_deselect : true});
if(isCompatible) {
var elements = document.querySelectorAll(".field-calendar");
for (i = 0; i < elements.length; i++) {
JoomlaCalendar.init(elements[i]);
}
}
/*
jQuery(\'select\').trigger("chosen:updated");';//Reload
Chosen
// CALENDAR IS RELOADED DIRECTLY BELOW THE NEW ROW
administrator\components\com_phocacart\libraries\phocacart\render\adminview.php*/
}
function phRemoveRowPricehistory(id) {
jQuery('#phPricehistoryBox' + id).remove();
var phRowCountPricehistory =
jQuery('.ph-row-pricehistory').length;
if (phRowCountPricehistory == 0) {
jQuery('#phrowboxpricehistory').empty();
}
}
/* WIZARD */
function phDoRequestWizardParent(url, s) {
var dataPost = {};
phRequestActive = jQuery.ajax({
url: url,
type:'POST',
data:dataPost,
dataType:'JSON',
success:function(data){
if ( data.status == 1 ){
/* Category */
var phOutput = s["phFalse"];
if (data.category == 1) { phOutput = s["phTrue"];} else
{s["phTrueAll"] = 0;}
jQuery("#phResultWizardCategory").html(phOutput);
/* Tax */
var phOutput = s["phFalse"];
if (data.tax == 1) { phOutput = s["phTrue"];} else
{s["phTrueAll"] = 0;}
jQuery("#phResultWizardTax").html(phOutput);
/* Product */
var phOutput = s["phFalse"];
if (data.product == 1) { phOutput = s["phTrue"];} else
{s["phTrueAll"] = 0;}
jQuery("#phResultWizardProduct").html(phOutput);
/* Shipping */
var phOutput = s["phFalse"];
if (data.shipping == 1) { phOutput = s["phTrue"];} else
{s["phTrueAll"] = 0;}
jQuery("#phResultWizardShipping").html(phOutput);
/* Payment */
var phOutput = s["phFalse"];
if (data.payment == 1) { phOutput = s["phTrue"];} else
{s["phTrueAll"] = 0;}
jQuery("#phResultWizardPayment").html(phOutput);
/* Country */
var phOutput = s["phFalseAdd"];
if (data.country == 1) { phOutput = s["phTrueAdd"];} else
{s["phTrueAll"] = 0;}
jQuery("#phResultWizardCountry").html(phOutput);
/* Region */
var phOutput = s["phFalseAdd"];
if (data.region == 1) { phOutput = s["phTrueAdd"];} else
{s["phTrueAll"] = 0;}
jQuery("#phResultWizardRegion").html(phOutput);
/* Menu */
var phOutput = s["phFalse"];
if (data.menu == 1) { phOutput = s["phTrue"];} else
{s["phTrueAll"] = 0;}
jQuery("#phResultWizardMenu").html(phOutput);
/* Module */
var phOutput = s["phFalseAdd"];
if (data.module == 1) { phOutput = s["phTrueAdd"];} else
{s["phTrueAll"] = 0;}
jQuery("#phResultWizardModule").html(phOutput);
/* Options */
var phOutput = s["phFalseEdit"];
if (data.option == 1) { phOutput = s["phTrueEdit"];} else
{s["phTrueAll"] = 0;}
jQuery("#phResultWizardOption").html(phOutput);
if(s["phTrueAll"] == 1) {
jQuery("#phResultWizardAll").css("display",
"block")
}
phRequestActive = null;
} else {
/* No Displaying of error
jQuery("#phResultWizardCategory").html(data.error);*/
phRequestActive = null;
}
}
});
}
administrator/phocacartbulkprice.js000064400000004322151175232450013635
0ustar00/*
* @package Phoca Cart
* @author Jan Pavelka - https://www.phoca.cz
* @copyright Copyright (C) Jan Pavelka https://www.phoca.cz
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 and later
* @cms Joomla
* @copyright Copyright (C) Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see
LICENSE.php
*/
function phBulkPrice(dataUrl) {
var phVars = Joomla.getOptions('phVars');
var phLang = Joomla.getOptions('phLang');
var phItemCount = 1;
var phOutputBoxId = '#phBulkPriceOutputBox';
// Clear Output box
jQuery(phOutputBoxId).html('');
function phGetNextItem() {
jQuery.ajax({
url: phVars['urlbulkprice'] +'&p=' +
phItemCount + '&' + dataUrl,
method: 'GET',
async: true,
success: function(data) {
if (data.status == 1) {
++phItemCount;
var currentOutput = jQuery(phOutputBoxId).html();
var newOutput = data.output + currentOutput;
jQuery(phOutputBoxId).html(newOutput);
if (data.continue == 1) {
phGetNextItem();
}
} else {
var currentOutput = jQuery(phOutputBoxId).html();
var newOutput = data.output + currentOutput;
jQuery(phOutputBoxId).html(newOutput);
}
},// end success
error: function (xhr, ajaxOptions, thrownError) {
var currentOutput = jQuery(phOutputBoxId).html();
var newOutput = xhr.status + ' ' + thrownError;
jQuery(phOutputBoxId).html(newOutput);
}
});// end ajax
}
phGetNextItem();
}
jQuery(document).ready(function(){
jQuery('#phBulkPriceRun').on('submit', function(e){
e.stopPropagation();
e.preventDefault();
var data = jQuery(this).serialize();
phBulkPrice(data);
})
jQuery('#phBulkPriceRevert').on('submit',
function(e){
e.stopPropagation();
e.preventDefault();
var data = jQuery(this).serialize();
phBulkPrice(data);
})
})administrator/phocacartform.js000064400000040650151175232450012624
0ustar00/*
* @package Phoca Cart
* @author Jan Pavelka - https://www.phoca.cz
* @copyright Copyright (C) Jan Pavelka https://www.phoca.cz
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 and later
* @cms Joomla
* @copyright Copyright (C) Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see
LICENSE.php
*/
/* VARIABLES */
/* FUNCTIONS */
function phRenderModalWindow(id, title) {
var phLang = Joomla.getOptions('phLang');
o = ''
+ '<div id="'+ id +'"
tabindex="-1" class="modal hide fade
jviewport-width80">'
+ ' <div class="modal-header">'
+ ' <button type="button" class="close
novalidate" data-dismiss="modal" aria-label="'+
phLang['COM_PHOCACART_CLOSE'] + '" <span
aria-hidden="true">×</span></button>'
+ ' <h3>'+ title +'</h3>'
+ ' </div>'
+ ' <div class="modal-body
jviewport-height70"><iframe
frameborder="0"></iframe></div>'
+ ' <div class="modal-footer"><button
type="button" class="btn"
data-dismiss="modal" aria-hidden="true">'+
phLang['COM_PHOCACART_CLOSE'] +
'</button></div>'
+ '</div>';
jQuery(".modal-backdrop").remove();// Remove not correctly
hidden modal-backdrop
jQuery("#phModalContainer").remove();// Remove previously
created container
var phModalContainer = jQuery('<div
id="phModalContainer"></div>');
phModalContainer.appendTo(document.body);
jQuery("#phModalContainer").html(o);
jQuery("#" + id).modal();
}
/* Function phDoRequest (create thumbnails) */
function phDoRequest(url, data, msg) {
jQuery("#ph-ajaxtop").html(phGetMsg(msg, 1));
jQuery("#ph-ajaxtop").show();
phRequestActive = jQuery.ajax({
url: url,
type:'POST',
data:data,
dataType:'JSON',
success:function(response){
if ( response.status == 2) {
// No message
jQuery("#ph-ajaxtop").hide();
jQuery(".ph-result-txt").remove();
phRequestActive = null;
} else if ( response.status == 1 ){
jQuery("#ph-ajaxtop-message").html(phGetMsg(response.message,
0));
phRequestActive = null;
phCloseMsgBoxSuccess();
} else {
jQuery("#ph-ajaxtop-message").html(phGetMsg(response.error,
0));
phRequestActive = null;
phCloseMsgBoxError();
}
}
});
}
/* ProductFile, PublicFile */
function phAddValueFile(id, title) {
document.getElementById(id).value = title;
jQuery(".modal").modal("hide");
}
/* Image */
function phAddValueImage(id, title, params) {
document.getElementById(id).value = title;
jQuery(".modal").modal("hide");
if (params["request"] == 1) {
var data = {};
data["filename"] = encodeURIComponent(title);
data["manager"] = params['manager'];
/* Change image preview */
var image = "";
if (title.trim() != "") {
image = params["pathimage"] + title;
}
phChangePreviewImage(id, image);
phDoRequest(params["requesturl"], data,
params["requestmsg"]);
}
}
/* Image preview - product/category - change image for preview in admin in
tooltip */
function phChangePreviewImage(id, image) {
if (image != '') {
var phOutput = '<img src="' + image + '"
alt="" />';
} else {
var phOutput = '<span class="glyphicon glyphicon-ban-circle
ban-circle"></span>';
}
// Dynamically added form fields do not set right ID for other tags
except input
//var idItem = '#phTooltipImagePreview_' + id;
// var idItem =
jQuery(this).prev(".phTooltipImagePreview").attr("id");
var idItem =
jQuery("#"+id).prev("span").children(".phTooltipImagePreview");
jQuery(idItem).html(phOutput);
return true;
}
/* EVENTS */
jQuery(document).ready(function() {
/* ProductFile */
jQuery(document).on("click",
"a.phProductFileModalButton", function (e) {
var src = jQuery(this).attr("data-src");
var title = jQuery(this).attr("data-title");
var id =
jQuery(this).prev("input").attr("id");// data-id does
not work by dynamically added form fields
var idModal = "phProductFileModalName" + id;
var idIframe = idModal + " iframe";
src = src.replace("{ph-field-id}", id);
// Select right download folder
var idFolder = id;
// 1) Download File - form field added manually
idFolder = idFolder.replace("jform_download_file",
"jform_download_folder");
// 2) Download File - form field added dynamically
// 2a) Files in download options have only one download folder - in
this case == undefined (if undefined use the 1) )
// 2b) Files in attribute options have download folder for each
file - in this case == true
idFolder = idFolder.replace("__download_file",
"__download_folder");
if(typeof jQuery("#" + idFolder).val() !==
"undefined") {
// attribute options + download options (statically added
download file form field)
var phDownloadFolder = jQuery("#" + idFolder).val();
} else {
// download options (dynamically added download file form
fields)
var phDownloadFolder =
jQuery("#jform_download_folder").val();
}
src = src + "&folder=" + phDownloadFolder +
"&downloadfolder=" + phDownloadFolder;
var phModalWidth = 700;
//var phModalHeight = 400;
var width = jQuery(this).attr("data-width") ||
phModalWidth;
//var height = jQuery(this).attr("data-height") ||
phModalHeight;
var height = jQuery(window).height() - 200;
phRenderModalWindow(idModal, title);// Render Modal Window
jQuery("#" + idIframe).attr({"src": src,
"height": height, "width": width});// Set iframe url
for rendered modal window
});
/* PublicFile */
jQuery(document).on("click",
"a.phPublicFileModalButton", function (e) {
var src = jQuery(this).attr("data-src");
var title = jQuery(this).attr("data-title");
var id =
jQuery(this).prev("input").attr("id");// data-id does
not work by dynamically added form fields
var idModal = "phPublicFileModalName" + id;
var idIframe = idModal + " iframe";
src = src.replace("{ph-field-id}", id);
//var phDownloadFolder =
jQuery("#jform_download_folder").val();
src = src + "&folder=&downloadfolder=";
var phModalWidth = 700;
var width = jQuery(this).attr("data-width") ||
phModalWidth;
var height = jQuery(window).height() - 200;
phRenderModalWindow(idModal, title);// Render Modal Window
jQuery("#" + idIframe).attr({"src": src,
"height": height, "width": width});// Set iframe url
for rendered modal window
});
/* Image */
jQuery(document).on("click",
"a.phImageFileModalButton", function (e) {
var src = jQuery(this).attr("data-src");
var title = jQuery(this).attr("data-title");
// data-id does not work by dynamically added form fields
// only input tag has right ID - all other parts NOT
var id =
jQuery(this).prev("input").attr("id");
var idModal = "phImageFileModalName" + id;
var idIframe = idModal + " iframe";
src = src.replace("{ph-field-id}", id);
//src = src + "&folder=&downloadfolder=";
var phModalWidth = 700;
var width = jQuery(this).attr("data-width") ||
phModalWidth;
var height = jQuery(window).height() - 200;
phRenderModalWindow(idModal, title);// Render Modal Window
jQuery("#" + idIframe).attr({"src": src,
"height": height, "width": width});// Set iframe url
for rendered modal window
});
/* Event Create Thumbnails */
jQuery(document).on("change", ".imageCreateThumbs",
function() {
var data = {};
data["filename"] = encodeURIComponent(jQuery(this).val());
data["manager"] = jQuery(this).attr("data-manager");
// Change Preview Image
var image = "";
if (jQuery(this).val().trim() != "") {
var image = jQuery(this).attr("data-pathimage") +
jQuery(this).val();
}
phChangePreviewImage(jQuery(this).attr("id"), image);
phDoRequest(jQuery(this).attr("data-requesturl"), data,
jQuery(this).attr("data-requestmsg"));
})
/* Color */
jQuery(document).on("click",
"a.phColorTextPickerButton", function (e) {
var id =
jQuery(this).prev("input").attr("id");// data-id does
not work by dynamically added form fields
openPicker(id);
});
/* Event - adding new row of options (in attributes)
* Add and create download token and download folder for attribute
download files
*/
jQuery(document).on('subform-row-add', function(event, row){
/*
* Get "download_token" and "download_folder for
"options"
* Get only "download_token" for "additional download
files"
*/
if (jQuery(row).attr("data-base-name") ==
"options" || jQuery(row).attr("data-base-name") ==
"additional_download_files") {
var phVars = Joomla.getOptions('phVars');
var data = {};
data["task"] = "gettoken";
var optionId =
jQuery(row).find('input').first().attr('id');// Get the
option form field ID name of added option row
var idFolder = optionId.replace("__id",
"__download_folder");
var idToken = optionId.replace("__id",
"__download_token");
var url =
'index.php?option=com_phocacart&view=phocacartattributea&format=json&tmpl=component&'
+ phVars['token'] + '=1';
phRequestActiveToken = jQuery.ajax({
url: url,
type: 'POST',
data: data,
dataType: 'JSON',
success:function(response){
if ( response.status == 1 ){
if (jQuery(row).attr("data-base-name") ==
"options") {
// folder is not set for additional files
jQuery("#" +
idFolder).val(response.folder);
}
jQuery("#" +
idToken).val(response.token);
phRequestActiveToken = null;
} else {
jQuery("#ph-ajaxtop").html(phGetMsg(' ',
1));
jQuery("#ph-ajaxtop").show();
jQuery("#ph-ajaxtop-message").html(phGetMsg(response.error, 0));
phRequestActiveToken = null;
phCloseMsgBoxError();
}
}
});
}
})
/* Event - remove row of options (in attributes)
* Remove download folder and its files
*/
jQuery(document).on('subform-row-remove', function(event,
row){
/* Possible warning but unfortunately the event cannot be stopped
*if(confirm("COM_PHOCACART_WARNING_REMOVING_ATTRIBUTE_OPTION_DELETES_DOWNLOAD_FOLDER_DOWNLOAD_FILE")){}
*/
if (jQuery(row).attr("data-base-name") ==
"options") {
var phVars = Joomla.getOptions('phVars');
data = {};
data['task'] = 'removefolder';
var optionId =
jQuery(row).find('input').first().attr('id');// Get the
option form field ID name of added option row
var idFolder = optionId.replace("__id",
"__download_folder");
// var idToken = optionId.replace("__id",
"__download_token");
var folder = jQuery("#" + idFolder).val();
data['folder'] = {0: folder};
var url =
'index.php?option=com_phocacart&view=phocacartattributea&format=json&tmpl=component&'
+ phVars['token'] + '=1';
phRequestActiveToken = jQuery.ajax({
url: url,
type: 'POST',
data: data,
dataType: 'JSON',
success:function(response){
if ( response.status == 1 ){
jQuery("#ph-ajaxtop").html(phGetMsg(' ',
1));
jQuery("#ph-ajaxtop").show();
jQuery("#ph-ajaxtop-message").html(phGetMsg(response.message,
0));
phRequestActiveToken = null;
phCloseMsgBoxSuccess();
} else if (response.status == 2) {
/* no folder exists - nothing deleted - no need any
message */
phRequestActiveToken = null;
} else {
jQuery("#ph-ajaxtop").html(phGetMsg(' ',
1));
jQuery("#ph-ajaxtop").show();
jQuery("#ph-ajaxtop-message").html(phGetMsg(response.error, 0));
phRequestActiveToken = null;
phCloseMsgBoxError();
}
}
});
}
})
jQuery(document).on('paste',
'.imageCreateThumbs',function() {
var element = jQuery(this);
var id = element.attr("id");
var path = element.attr("data-pathimage");
var manager = element.attr("data-manager");
var requestUrl = element.attr("data-requesturl");
var requestMsg = element.attr("data-requestmsg");
var phVars = Joomla.getOptions('phVars');
var phLang = Joomla.getOptions('phLang');
var url =
'index.php?option=com_phocacart&view=phocacartimagea&format=json&tmpl=component&'
+ phVars['token'] + '=1';
// use event.originalEvent.clipboard for newer chrome versions
var items = (event.clipboardData ||
event.originalEvent.clipboardData).items;
//console . log(JSON.stringify(items)); // will give you the mime
types
// find pasted image among pasted items
var blob = null;
for (var i = 0; i < items.length; i++) {
if (items[i].type.indexOf("image") === 0) {
blob = items[i].getAsFile();
}
}
// load image if there is a pasted image
if (blob !== null) {
var reader = new FileReader();
reader.onload = function(event) {
var imgFormat =
event.target.result.split(',')[0];
var imgData = event.target.result.split(',')[1];
var title = jQuery('#jform_title').val();
if (title == '') {
jQuery("#ph-ajaxtop").html(phGetMsg('
', 1));
jQuery("#ph-ajaxtop").show();
jQuery("#ph-ajaxtop-message").html(phGetMsg('<span
class="ph-result-txt ph-error-txt">'+
phLang['COM_PHOCACART_ERROR_TITLE_NOT_SET'] +
'</span>', 0));
phCloseMsgBoxSuccess();
return false;
}
jQuery.ajax({
url: url,
type:'post',
dataType: 'JSON',
data:{'image':imgData,
'imagetitle': title, 'imageformat': imgFormat},
success: function(response) {
if ( response.status == 1 ){
jQuery("#ph-ajaxtop").html(phGetMsg(' ',
1));
jQuery("#ph-ajaxtop").show();
jQuery("#ph-ajaxtop-message").html(phGetMsg(response.message,
0));
phCloseMsgBoxSuccess();
if ( response.file != '' ){
element.val(response.file);
var image = path + response.file;
phChangePreviewImage(id, image);
var dataCreateThumbs = {};
dataCreateThumbs["filename"] =
encodeURIComponent(response.file);
dataCreateThumbs["manager"] =
manager;
phDoRequest(requestUrl, dataCreateThumbs,
requestMsg);
}
} else {
jQuery("#ph-ajaxtop").html(phGetMsg(' ',
1));
jQuery("#ph-ajaxtop").show();
jQuery("#ph-ajaxtop-message").html(phGetMsg(response.error, 0));
phCloseMsgBoxError();
}
}
});
}
reader.readAsDataURL(blob);
}
return true;
})
})
administrator/select2/index.html000064400000000054151175232450012766
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>administrator/select2/LICENSE000064400000001652151175232450012003
0ustar00Copyright 2012 Igor Vaynberg
Version: @@ver@@ Timestamp: @@timestamp@@
This software is licensed under the Apache License, Version 2.0 (the
"Apache License") or the GNU
General Public License version 2 (the "GPL License"). You may
choose either license to govern your
use of this software only upon the condition that you accept all of the
terms of either the Apache
License or the GPL License.
You may obtain a copy of the Apache License and the GPL License at:
http://www.apache.org/licenses/LICENSE-2.0
http://www.gnu.org/licenses/gpl-2.0.html
Unless required by applicable law or agreed to in writing, software
distributed under the Apache License
or the GPL Licesnse is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND,
either express or implied. See the Apache License and the GPL License for
the specific language governing
permissions and limitations under the Apache License and the GPL
License.administrator/select2/select2-spinner.gif000064400000003471151175232450014503
0ustar00GIF89a����������FFFzzzXXX$$$���������666hhh!�NETSCAPE2.0!�Created
with ajaxload.info!�
,w !�DB�A��H���¬��a��D���@
^�A�X��P�@�"U���Q# ��B�\;���1�o�:2$v@
$|,3
�_#
d�53�"s5e!!�
,v i@e9�DA�A�����/�`ph$�Ca%@
���pH���x�F��uS��x#�
�.�݄�Yf�L_"
p
3B�W��]|L
\6�{|z�8�7[7!!�
,x
�e9�DE"������2r,��qP���j��`�8��@8bH,
*��0-�
�mFW��9�LP�E3+
(�B"
f�{�*BW_/�
@_$��~Kr�7Ar7!!�
,v
�4e9��!H�"�*��Q�/@���-�4�ép4�R+��-��p�ȧ`�P(�6��U/�
*,�)(+/]"lO�/�*Ak���K���]A~66�6!!�
,l
ie9�"���*���-�80H���=N;���T�E�����q��e��UoK2_WZ�V��1jgWe@tuH//w`?��f~#���6��#!!�
,~ �,e9��"���*
�;pR�%��#0��`�
�'�c�(��J@@���/1�i4��`�V��B�V
u}�"caNi/]))�-Lel mi}
me[+!!�
,y
Ie9��"M�6�*¨"7E͖��@G((L&�pqj@Z�����
��%@�w�Z) �pl(
���ԭ�q�u*R&c `))(s_J��>_\'Gm7�$+!!�
,w Ie9�*,� (�*�(�B5[1�
�Z��Iah!G��exz��J0�e�6��@V|U��4��Dm��%$͛�p
\Gx
}@+|=+
1�- Ea5l)+!!�
,y
)�䨞'A�K����ڍ,�����E\(l���&;5
��5D���0��3�a�0-���-�����ÃpH4V %
i
p[R"| ��#
� 6iZwcw*!!�
,y
)�䨞,K�*�����0�a�;аY8�b`4�n�¨Bb�b�x�,������������( Ƚ�
%
>
2*�i* /:�+$v*!!�
,u )�䨞l[�$�
�Jq[��q3�`Q[�5��:���IX!0�rAD8Cv����HPfi��iQ���AP@pC
%D
PQ46�
iciNj0w
�)#!!�
,y )��.q��
,G�Jr(�J�8�C��*���B�,����&<
�����h�W~-��`�, ����,�>;
8RN<,�<1T]
�c��'
qk$
@)#!;administrator/select2/select2.css000064400000042475151175232450013061
0ustar00/*
Version: 3.4.3 Timestamp: Tue Sep 17 06:47:14 PDT 2013
*/
.select2-container {
margin: 0;
position: relative;
display: inline-block;
/* inline-block for ie7 */
zoom: 1;
*display: inline;
vertical-align: middle;
}
.select2-container,
.select2-drop,
.select2-search,
.select2-search input {
/*
Force border-box so that % widths fit the parent
container without overlap because of margin/padding.
More Info : http://www.quirksmode.org/css/box.html
*/
-webkit-box-sizing: border-box; /* webkit */
-moz-box-sizing: border-box; /* firefox */
box-sizing: border-box; /* css3 */
}
.select2-container .select2-choice {
display: block;
height: 26px;
padding: 0 0 0 8px;
overflow: hidden;
position: relative;
border: 1px solid #aaa;
white-space: nowrap;
line-height: 26px;
color: #444;
text-decoration: none;
border-radius: 4px;
background-clip: padding-box;
-webkit-touch-callout: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
background-color: #fff;
background-image: -webkit-gradient(linear, left bottom, left top,
color-stop(0, #eee), color-stop(0.5, #fff));
background-image: -webkit-linear-gradient(center bottom, #eee 0%, #fff
50%);
background-image: -moz-linear-gradient(center bottom, #eee 0%, #fff
50%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr =
'#ffffff', endColorstr = '#eeeeee', GradientType = 0);
background-image: linear-gradient(top, #fff 0%, #eee 50%);
}
.select2-container.select2-drop-above .select2-choice {
border-bottom-color: #aaa;
border-radius: 0 0 4px 4px;
background-image: -webkit-gradient(linear, left bottom, left top,
color-stop(0, #eee), color-stop(0.9, #fff));
background-image: -webkit-linear-gradient(center bottom, #eee 0%, #fff
90%);
background-image: -moz-linear-gradient(center bottom, #eee 0%, #fff
90%);
filter:
progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff',
endColorstr='#eeeeee', GradientType=0);
background-image: linear-gradient(top, #eee 0%, #fff 90%);
}
.select2-container.select2-allowclear .select2-choice .select2-chosen {
margin-right: 42px;
}
.select2-container .select2-choice > .select2-chosen {
margin-right: 26px;
display: block;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.select2-container .select2-choice abbr {
display: none;
width: 12px;
height: 12px;
position: absolute;
right: 24px;
top: 8px;
font-size: 1px;
text-decoration: none;
border: 0;
background: url('select2.png') right top no-repeat;
cursor: pointer;
outline: 0;
}
.select2-container.select2-allowclear .select2-choice abbr {
display: inline-block;
}
.select2-container .select2-choice abbr:hover {
background-position: right -11px;
cursor: pointer;
}
.select2-drop-mask {
border: 0;
margin: 0;
padding: 0;
position: fixed;
left: 0;
top: 0;
min-height: 100%;
min-width: 100%;
height: auto;
width: auto;
opacity: 0;
z-index: 9998;
/* styles required for IE to work */
background-color: #fff;
filter: alpha(opacity=0);
}
.select2-drop {
width: 100%;
margin-top: -1px;
position: absolute;
z-index: 9999;
top: 100%;
background: #fff;
color: #000;
border: 1px solid #aaa;
border-top: 0;
border-radius: 0 0 4px 4px;
-webkit-box-shadow: 0 4px 5px rgba(0, 0, 0, .15);
box-shadow: 0 4px 5px rgba(0, 0, 0, .15);
}
.select2-drop-auto-width {
border-top: 1px solid #aaa;
width: auto;
}
.select2-drop-auto-width .select2-search {
padding-top: 4px;
}
.select2-drop.select2-drop-above {
margin-top: 1px;
border-top: 1px solid #aaa;
border-bottom: 0;
border-radius: 4px 4px 0 0;
-webkit-box-shadow: 0 -4px 5px rgba(0, 0, 0, .15);
box-shadow: 0 -4px 5px rgba(0, 0, 0, .15);
}
.select2-drop-active {
border: 1px solid #5897fb;
border-top: none;
}
.select2-drop.select2-drop-above.select2-drop-active {
border-top: 1px solid #5897fb;
}
.select2-container .select2-choice .select2-arrow {
display: inline-block;
width: 18px;
height: 100%;
position: absolute;
right: 0;
top: 0;
border-left: 1px solid #aaa;
border-radius: 0 4px 4px 0;
background-clip: padding-box;
background: #ccc;
background-image: -webkit-gradient(linear, left bottom, left top,
color-stop(0, #ccc), color-stop(0.6, #eee));
background-image: -webkit-linear-gradient(center bottom, #ccc 0%, #eee
60%);
background-image: -moz-linear-gradient(center bottom, #ccc 0%, #eee
60%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr =
'#eeeeee', endColorstr = '#cccccc', GradientType = 0);
background-image: linear-gradient(top, #ccc 0%, #eee 60%);
}
.select2-container .select2-choice .select2-arrow b {
display: block;
width: 100%;
height: 100%;
background: url('select2.png') no-repeat 0 1px;
}
.select2-search {
display: inline-block;
width: 100%;
min-height: 26px;
margin: 0;
padding-left: 4px;
padding-right: 4px;
position: relative;
z-index: 10000;
white-space: nowrap;
}
.select2-search input {
width: 100%;
height: auto !important;
min-height: 26px;
padding: 4px 20px 4px 5px;
margin: 0;
outline: 0;
font-family: sans-serif;
font-size: 1em;
border: 1px solid #aaa;
border-radius: 0;
-webkit-box-shadow: none;
box-shadow: none;
background: #fff url('select2.png') no-repeat 100% -22px;
background: url('select2.png') no-repeat 100% -22px,
-webkit-gradient(linear, left bottom, left top, color-stop(0.85, #fff),
color-stop(0.99, #eee));
background: url('select2.png') no-repeat 100% -22px,
-webkit-linear-gradient(center bottom, #fff 85%, #eee 99%);
background: url('select2.png') no-repeat 100% -22px,
-moz-linear-gradient(center bottom, #fff 85%, #eee 99%);
background: url('select2.png') no-repeat 100% -22px,
linear-gradient(top, #fff 85%, #eee 99%);
}
.select2-drop.select2-drop-above .select2-search input {
margin-top: 4px;
}
.select2-search input.select2-active {
background: #fff url('select2-spinner.gif') no-repeat 100%;
background: url('select2-spinner.gif') no-repeat 100%,
-webkit-gradient(linear, left bottom, left top, color-stop(0.85, #fff),
color-stop(0.99, #eee));
background: url('select2-spinner.gif') no-repeat 100%,
-webkit-linear-gradient(center bottom, #fff 85%, #eee 99%);
background: url('select2-spinner.gif') no-repeat 100%,
-moz-linear-gradient(center bottom, #fff 85%, #eee 99%);
background: url('select2-spinner.gif') no-repeat 100%,
linear-gradient(top, #fff 85%, #eee 99%);
}
.select2-container-active .select2-choice,
.select2-container-active .select2-choices {
border: 1px solid #5897fb;
outline: none;
-webkit-box-shadow: 0 0 5px rgba(0, 0, 0, .3);
box-shadow: 0 0 5px rgba(0, 0, 0, .3);
}
.select2-dropdown-open .select2-choice {
border-bottom-color: transparent;
-webkit-box-shadow: 0 1px 0 #fff inset;
box-shadow: 0 1px 0 #fff inset;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
background-color: #eee;
background-image: -webkit-gradient(linear, left bottom, left top,
color-stop(0, #fff), color-stop(0.5, #eee));
background-image: -webkit-linear-gradient(center bottom, #fff 0%, #eee
50%);
background-image: -moz-linear-gradient(center bottom, #fff 0%, #eee
50%);
filter:
progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee',
endColorstr='#ffffff', GradientType=0);
background-image: linear-gradient(top, #fff 0%, #eee 50%);
}
.select2-dropdown-open.select2-drop-above .select2-choice,
.select2-dropdown-open.select2-drop-above .select2-choices {
border: 1px solid #5897fb;
border-top-color: transparent;
background-image: -webkit-gradient(linear, left top, left bottom,
color-stop(0, #fff), color-stop(0.5, #eee));
background-image: -webkit-linear-gradient(center top, #fff 0%, #eee
50%);
background-image: -moz-linear-gradient(center top, #fff 0%, #eee 50%);
filter:
progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee',
endColorstr='#ffffff', GradientType=0);
background-image: linear-gradient(bottom, #fff 0%, #eee 50%);
}
.select2-dropdown-open .select2-choice .select2-arrow {
background: transparent;
border-left: none;
filter: none;
}
.select2-dropdown-open .select2-choice .select2-arrow b {
background-position: -18px 1px;
}
/* results */
.select2-results {
max-height: 200px;
padding: 0 0 0 4px;
margin: 4px 4px 4px 0;
position: relative;
overflow-x: hidden;
overflow-y: auto;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
.select2-results ul.select2-result-sub {
margin: 0;
padding-left: 0;
}
.select2-results ul.select2-result-sub > li .select2-result-label {
padding-left: 20px }
.select2-results ul.select2-result-sub ul.select2-result-sub > li
.select2-result-label { padding-left: 40px }
.select2-results ul.select2-result-sub ul.select2-result-sub
ul.select2-result-sub > li .select2-result-label { padding-left: 60px }
.select2-results ul.select2-result-sub ul.select2-result-sub
ul.select2-result-sub ul.select2-result-sub > li .select2-result-label {
padding-left: 80px }
.select2-results ul.select2-result-sub ul.select2-result-sub
ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub > li
.select2-result-label { padding-left: 100px }
.select2-results ul.select2-result-sub ul.select2-result-sub
ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub
ul.select2-result-sub > li .select2-result-label { padding-left: 110px }
.select2-results ul.select2-result-sub ul.select2-result-sub
ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub
ul.select2-result-sub ul.select2-result-sub > li .select2-result-label {
padding-left: 120px }
.select2-results li {
list-style: none;
display: list-item;
background-image: none;
}
.select2-results li.select2-result-with-children > .select2-result-label
{
font-weight: bold;
}
.select2-results .select2-result-label {
padding: 3px 7px 4px;
margin: 0;
cursor: pointer;
min-height: 1em;
-webkit-touch-callout: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.select2-results .select2-highlighted {
background: #3875d7;
color: #fff;
}
.select2-results li em {
background: #feffde;
font-style: normal;
}
.select2-results .select2-highlighted em {
background: transparent;
}
.select2-results .select2-highlighted ul {
background: #fff;
color: #000;
}
.select2-results .select2-no-results,
.select2-results .select2-searching,
.select2-results .select2-selection-limit {
background: #f4f4f4;
display: list-item;
}
/*
disabled look for disabled choices in the results dropdown
*/
.select2-results .select2-disabled.select2-highlighted {
color: #666;
background: #f4f4f4;
display: list-item;
cursor: default;
}
.select2-results .select2-disabled {
background: #f4f4f4;
display: list-item;
cursor: default;
}
.select2-results .select2-selected {
display: none;
}
.select2-more-results.select2-active {
background: #f4f4f4 url('select2-spinner.gif') no-repeat
100%;
}
.select2-more-results {
background: #f4f4f4;
display: list-item;
}
/* disabled styles */
.select2-container.select2-container-disabled .select2-choice {
background-color: #f4f4f4;
background-image: none;
border: 1px solid #ddd;
cursor: default;
}
.select2-container.select2-container-disabled .select2-choice
.select2-arrow {
background-color: #f4f4f4;
background-image: none;
border-left: 0;
}
.select2-container.select2-container-disabled .select2-choice abbr {
display: none;
}
/* multiselect */
.select2-container-multi .select2-choices {
height: auto !important;
height: 1%;
margin: 0;
padding: 0;
position: relative;
border: 1px solid #aaa;
cursor: text;
overflow: hidden;
background-color: #fff;
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%,
color-stop(1%, #eee), color-stop(15%, #fff));
background-image: -webkit-linear-gradient(top, #eee 1%, #fff 15%);
background-image: -moz-linear-gradient(top, #eee 1%, #fff 15%);
background-image: linear-gradient(top, #eee 1%, #fff 15%);
}
.select2-locked {
padding: 3px 5px 3px 5px !important;
}
.select2-container-multi .select2-choices {
min-height: 26px;
}
.select2-container-multi.select2-container-active .select2-choices {
border: 1px solid #5897fb;
outline: none;
-webkit-box-shadow: 0 0 5px rgba(0, 0, 0, .3);
box-shadow: 0 0 5px rgba(0, 0, 0, .3);
}
.select2-container-multi .select2-choices li {
float: left;
list-style: none;
}
.select2-container-multi .select2-choices .select2-search-field {
margin: 0;
padding: 0;
white-space: nowrap;
}
.select2-container-multi .select2-choices .select2-search-field input {
padding: 5px;
margin: 1px 0;
font-family: sans-serif;
font-size: 100%;
color: #666;
outline: 0;
border: 0;
-webkit-box-shadow: none;
box-shadow: none;
background: transparent !important;
}
.select2-container-multi .select2-choices .select2-search-field
input.select2-active {
background: #fff url('select2-spinner.gif') no-repeat 100%
!important;
}
.select2-default {
color: #999 !important;
}
.select2-container-multi .select2-choices .select2-search-choice {
padding: 3px 5px 3px 18px;
margin: 3px 0 3px 5px;
position: relative;
line-height: 13px;
color: #333;
cursor: default;
border: 1px solid #aaaaaa;
border-radius: 3px;
-webkit-box-shadow: 0 0 2px #fff inset, 0 1px 0 rgba(0, 0, 0, 0.05);
box-shadow: 0 0 2px #fff inset, 0 1px 0 rgba(0, 0, 0, 0.05);
background-clip: padding-box;
-webkit-touch-callout: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
background-color: #e4e4e4;
filter:
progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee',
endColorstr='#f4f4f4', GradientType=0);
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%,
color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%,
#e8e8e8), color-stop(100%, #eee));
background-image: -webkit-linear-gradient(top, #f4f4f4 20%, #f0f0f0
50%, #e8e8e8 52%, #eee 100%);
background-image: -moz-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%,
#e8e8e8 52%, #eee 100%);
background-image: linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%,
#e8e8e8 52%, #eee 100%);
}
.select2-container-multi .select2-choices .select2-search-choice
.select2-chosen {
cursor: default;
}
.select2-container-multi .select2-choices .select2-search-choice-focus {
background: #d4d4d4;
}
.select2-search-choice-close {
display: block;
width: 12px;
height: 12px;
position: absolute;
right: 3px;
top: 4px;
font-size: 1px;
outline: none;
background: url('select2.png') right top no-repeat;
background: url('select2.png') right top no-repeat;
}
.select2-container-multi .select2-search-choice-close {
left: 3px;
}
.select2-container-multi .select2-choices .select2-search-choice
.select2-search-choice-close:hover {
background-position: right -11px;
}
.select2-container-multi .select2-choices .select2-search-choice-focus
.select2-search-choice-close {
background-position: right -11px;
}
/* disabled styles */
.select2-container-multi.select2-container-disabled .select2-choices {
background-color: #f4f4f4;
background-image: none;
border: 1px solid #ddd;
cursor: default;
}
.select2-container-multi.select2-container-disabled .select2-choices
.select2-search-choice {
padding: 3px 5px 3px 5px;
border: 1px solid #ddd;
background-image: none;
background-color: #f4f4f4;
}
.select2-container-multi.select2-container-disabled .select2-choices
.select2-search-choice .select2-search-choice-close { display: none;
background: none;
}
/* end multiselect */
.select2-result-selectable .select2-match,
.select2-result-unselectable .select2-match {
text-decoration: underline;
}
.select2-offscreen, .select2-offscreen:focus {
clip: rect(0 0 0 0) !important;
width: 1px !important;
height: 1px !important;
border: 0 !important;
margin: 0 !important;
padding: 0 !important;
overflow: hidden !important;
position: absolute !important;
outline: 0 !important;
left: 0px !important;
top: 0px !important;
}
.select2-display-none {
display: none;
}
.select2-measure-scrollbar {
position: absolute;
top: -10000px;
left: -10000px;
width: 100px;
height: 100px;
overflow: scroll;
}
/* Retina-ize icons */
@media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen
and (min-resolution: 144dpi) {
.select2-search input, .select2-search-choice-close, .select2-container
.select2-choice abbr, .select2-container .select2-choice .select2-arrow b {
background-image: url('select2x2.png') !important;
background-repeat: no-repeat !important;
background-size: 60px 40px !important;
}
.select2-search input {
background-position: 100% -21px !important;
}
}
administrator/select2/select2.js000064400000405171151175232450012701
0ustar00/*
Copyright 2012 Igor Vaynberg
Version: 3.4.3 Timestamp: Tue Sep 17 06:47:14 PDT 2013
This software is licensed under the Apache License, Version 2.0 (the
"Apache License") or the GNU
General Public License version 2 (the "GPL License"). You may
choose either license to govern your
use of this software only upon the condition that you accept all of the
terms of either the Apache
License or the GPL License.
You may obtain a copy of the Apache License and the GPL License at:
http://www.apache.org/licenses/LICENSE-2.0
http://www.gnu.org/licenses/gpl-2.0.html
Unless required by applicable law or agreed to in writing, software
distributed under the
Apache License or the GPL Licesnse is distributed on an "AS IS"
BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied. See the Apache License
and the GPL License for
the specific language governing permissions and limitations under the
Apache License and the GPL License.
*/
(function ($) {
if(typeof $.fn.each2 == "undefined") {
$.extend($.fn, {
/*
* 4-10 times faster .each replacement
* use it carefully, as it overrides jQuery context of element
on each iteration
*/
each2 : function (c) {
var j = $([0]), i = -1, l = this.length;
while (
++i < l
&& (j.context = j[0] = this[i])
&& c.call(j[0], i, j) !== false
//"this"=DOM, i=index, j=jQuery object
);
return this;
}
});
}
})(jQuery);
(function ($, undefined) {
"use strict";
/*global document, window, jQuery, console */
if (window.Select2 !== undefined) {
return;
}
var KEY, AbstractSelect2, SingleSelect2, MultiSelect2, nextUid, sizer,
lastMousePosition={x:0,y:0}, $document, scrollBarDimensions,
KEY = {
TAB: 9,
ENTER: 13,
ESC: 27,
SPACE: 32,
LEFT: 37,
UP: 38,
RIGHT: 39,
DOWN: 40,
SHIFT: 16,
CTRL: 17,
ALT: 18,
PAGE_UP: 33,
PAGE_DOWN: 34,
HOME: 36,
END: 35,
BACKSPACE: 8,
DELETE: 46,
isArrow: function (k) {
k = k.which ? k.which : k;
switch (k) {
case KEY.LEFT:
case KEY.RIGHT:
case KEY.UP:
case KEY.DOWN:
return true;
}
return false;
},
isControl: function (e) {
var k = e.which;
switch (k) {
case KEY.SHIFT:
case KEY.CTRL:
case KEY.ALT:
return true;
}
if (e.metaKey) return true;
return false;
},
isFunctionKey: function (k) {
k = k.which ? k.which : k;
return k >= 112 && k <= 123;
}
},
MEASURE_SCROLLBAR_TEMPLATE = "<div
class='select2-measure-scrollbar'></div>",
DIACRITICS =
{"\u24B6":"A","\uFF21":"A","\u00C0":"A","\u00C1":"A","\u00C2":"A","\u1EA6":"A","\u1EA4":"A","\u1EAA":"A","\u1EA8":"A","\u00C3":"A","\u0100":"A","\u0102":"A","\u1EB0":"A","\u1EAE":"A","\u1EB4":"A","\u1EB2":"A","\u0226":"A","\u01E0":"A","\u00C4":"A","\u01DE":"A","\u1EA2":"A","\u00C5":"A","\u01FA":"A","\u01CD":"A","\u0200":"A","\u0202":"A","\u1EA0":"A","\u1EAC":"A","\u1EB6":"A","\u1E00":"A","\u0104":"A","\u023A":"A","\u2C6F":"A","\uA732":"AA","\u00C6":"AE","\u01FC":"AE","\u01E2":"AE","\uA734":"AO","\uA736":"AU","\uA738":"AV","\uA73A":"AV","\uA73C":"AY","\u24B7":"B","\uFF22":"B","\u1E02":"B","\u1E04":"B","\u1E06":"B","\u0243":"B","\u0182":"B","\u0181":"B","\u24B8":"C","\uFF23":"C","\u0106":"C","\u0108":"C","\u010A":"C","\u010C":"C","\u00C7":"C","\u1E08":"C","\u0187":"C","\u023B":"C","\uA73E":"C","\u24B9":"D","\uFF24":"D","\u1E0A":"D","\u010E":"D","\u1E0C":"D","\u1E10":"D","\u1E12":"D","\u1E0E":"D","\u0110":"D","\u018B":"D","\u018A":"D","\u0189":"D","\uA779":"D","\u01F1":"DZ","\u01C4":"DZ","\u01F2":"Dz","\u01C5":"Dz","\u24BA":"E","\uFF25":"E","\u00C8":"E","\u00C9":"E","\u00CA":"E","\u1EC0":"E","\u1EBE":"E","\u1EC4":"E","\u1EC2":"E","\u1EBC":"E","\u0112":"E","\u1E14":"E","\u1E16":"E","\u0114":"E","\u0116":"E","\u00CB":"E","\u1EBA":"E","\u011A":"E","\u0204":"E","\u0206":"E","\u1EB8":"E","\u1EC6":"E","\u0228":"E","\u1E1C":"E","\u0118":"E","\u1E18":"E","\u1E1A":"E","\u0190":"E","\u018E":"E","\u24BB":"F","\uFF26":"F","\u1E1E":"F","\u0191":"F","\uA77B":"F","\u24BC":"G","\uFF27":"G","\u01F4":"G","\u011C":"G","\u1E20":"G","\u011E":"G","\u0120":"G","\u01E6":"G","\u0122":"G","\u01E4":"G","\u0193":"G","\uA7A0":"G","\uA77D":"G","\uA77E":"G","\u24BD":"H","\uFF28":"H","\u0124":"H","\u1E22":"H","\u1E26":"H","\u021E":"H","\u1E24":"H","\u1E28":"H","\u1E2A":"H","\u0126":"H","\u2C67":"H","\u2C75":"H","\uA78D":"H","\u24BE":"I","\uFF29":"I","\u00CC":"I","\u00CD":"I","\u00CE":"I","\u0128":"I","\u012A":"I","\u012C":"I","\u0130":"I","\u00CF":"I","\u1E2E":"I","\u1EC8":"I","\u01CF":"I","\u0208":"I","\u020A":"I","\u1ECA":"I","\u012E":"I","\u1E2C":"I","\u0197":"I","\u24BF":"J","\uFF2A":"J","\u0134":"J","\u0248":"J","\u24C0":"K","\uFF2B":"K","\u1E30":"K","\u01E8":"K","\u1E32":"K","\u0136":"K","\u1E34":"K","\u0198":"K","\u2C69":"K","\uA740":"K","\uA742":"K","\uA744":"K","\uA7A2":"K","\u24C1":"L","\uFF2C":"L","\u013F":"L","\u0139":"L","\u013D":"L","\u1E36":"L","\u1E38":"L","\u013B":"L","\u1E3C":"L","\u1E3A":"L","\u0141":"L","\u023D":"L","\u2C62":"L","\u2C60":"L","\uA748":"L","\uA746":"L","\uA780":"L","\u01C7":"LJ","\u01C8":"Lj","\u24C2":"M","\uFF2D":"M","\u1E3E":"M","\u1E40":"M","\u1E42":"M","\u2C6E":"M","\u019C":"M","\u24C3":"N","\uFF2E":"N","\u01F8":"N","\u0143":"N","\u00D1":"N","\u1E44":"N","\u0147":"N","\u1E46":"N","\u0145":"N","\u1E4A":"N","\u1E48":"N","\u0220":"N","\u019D":"N","\uA790":"N","\uA7A4":"N","\u01CA":"NJ","\u01CB":"Nj","\u24C4":"O","\uFF2F":"O","\u00D2":"O","\u00D3":"O","\u00D4":"O","\u1ED2":"O","\u1ED0":"O","\u1ED6":"O","\u1ED4":"O","\u00D5":"O","\u1E4C":"O","\u022C":"O","\u1E4E":"O","\u014C":"O","\u1E50":"O","\u1E52":"O","\u014E":"O","\u022E":"O","\u0230":"O","\u00D6":"O","\u022A":"O","\u1ECE":"O","\u0150":"O","\u01D1":"O","\u020C":"O","\u020E":"O","\u01A0":"O","\u1EDC":"O","\u1EDA":"O","\u1EE0":"O","\u1EDE":"O","\u1EE2":"O","\u1ECC":"O","\u1ED8":"O","\u01EA":"O","\u01EC":"O","\u00D8":"O","\u01FE":"O","\u0186":"O","\u019F":"O","\uA74A":"O","\uA74C":"O","\u01A2":"OI","\uA74E":"OO","\u0222":"OU","\u24C5":"P","\uFF30":"P","\u1E54":"P","\u1E56":"P","\u01A4":"P","\u2C63":"P","\uA750":"P","\uA752":"P","\uA754":"P","\u24C6":"Q","\uFF31":"Q","\uA756":"Q","\uA758":"Q","\u024A":"Q","\u24C7":"R","\uFF32":"R","\u0154":"R","\u1E58":"R","\u0158":"R","\u0210":"R","\u0212":"R","\u1E5A":"R","\u1E5C":"R","\u0156":"R","\u1E5E":"R","\u024C":"R","\u2C64":"R","\uA75A":"R","\uA7A6":"R","\uA782":"R","\u24C8":"S","\uFF33":"S","\u1E9E":"S","\u015A":"S","\u1E64":"S","\u015C":"S","\u1E60":"S","\u0160":"S","\u1E66":"S","\u1E62":"S","\u1E68":"S","\u0218":"S","\u015E":"S","\u2C7E":"S","\uA7A8":"S","\uA784":"S","\u24C9":"T","\uFF34":"T","\u1E6A":"T","\u0164":"T","\u1E6C":"T","\u021A":"T","\u0162":"T","\u1E70":"T","\u1E6E":"T","\u0166":"T","\u01AC":"T","\u01AE":"T","\u023E":"T","\uA786":"T","\uA728":"TZ","\u24CA":"U","\uFF35":"U","\u00D9":"U","\u00DA":"U","\u00DB":"U","\u0168":"U","\u1E78":"U","\u016A":"U","\u1E7A":"U","\u016C":"U","\u00DC":"U","\u01DB":"U","\u01D7":"U","\u01D5":"U","\u01D9":"U","\u1EE6":"U","\u016E":"U","\u0170":"U","\u01D3":"U","\u0214":"U","\u0216":"U","\u01AF":"U","\u1EEA":"U","\u1EE8":"U","\u1EEE":"U","\u1EEC":"U","\u1EF0":"U","\u1EE4":"U","\u1E72":"U","\u0172":"U","\u1E76":"U","\u1E74":"U","\u0244":"U","\u24CB":"V","\uFF36":"V","\u1E7C":"V","\u1E7E":"V","\u01B2":"V","\uA75E":"V","\u0245":"V","\uA760":"VY","\u24CC":"W","\uFF37":"W","\u1E80":"W","\u1E82":"W","\u0174":"W","\u1E86":"W","\u1E84":"W","\u1E88":"W","\u2C72":"W","\u24CD":"X","\uFF38":"X","\u1E8A":"X","\u1E8C":"X","\u24CE":"Y","\uFF39":"Y","\u1EF2":"Y","\u00DD":"Y","\u0176":"Y","\u1EF8":"Y","\u0232":"Y","\u1E8E":"Y","\u0178":"Y","\u1EF6":"Y","\u1EF4":"Y","\u01B3":"Y","\u024E":"Y","\u1EFE":"Y","\u24CF":"Z","\uFF3A":"Z","\u0179":"Z","\u1E90":"Z","\u017B":"Z","\u017D":"Z","\u1E92":"Z","\u1E94":"Z","\u01B5":"Z","\u0224":"Z","\u2C7F":"Z","\u2C6B":"Z","\uA762":"Z","\u24D0":"a","\uFF41":"a","\u1E9A":"a","\u00E0":"a","\u00E1":"a","\u00E2":"a","\u1EA7":"a","\u1EA5":"a","\u1EAB":"a","\u1EA9":"a","\u00E3":"a","\u0101":"a","\u0103":"a","\u1EB1":"a","\u1EAF":"a","\u1EB5":"a","\u1EB3":"a","\u0227":"a","\u01E1":"a","\u00E4":"a","\u01DF":"a","\u1EA3":"a","\u00E5":"a","\u01FB":"a","\u01CE":"a","\u0201":"a","\u0203":"a","\u1EA1":"a","\u1EAD":"a","\u1EB7":"a","\u1E01":"a","\u0105":"a","\u2C65":"a","\u0250":"a","\uA733":"aa","\u00E6":"ae","\u01FD":"ae","\u01E3":"ae","\uA735":"ao","\uA737":"au","\uA739":"av","\uA73B":"av","\uA73D":"ay","\u24D1":"b","\uFF42":"b","\u1E03":"b","\u1E05":"b","\u1E07":"b","\u0180":"b","\u0183":"b","\u0253":"b","\u24D2":"c","\uFF43":"c","\u0107":"c","\u0109":"c","\u010B":"c","\u010D":"c","\u00E7":"c","\u1E09":"c","\u0188":"c","\u023C":"c","\uA73F":"c","\u2184":"c","\u24D3":"d","\uFF44":"d","\u1E0B":"d","\u010F":"d","\u1E0D":"d","\u1E11":"d","\u1E13":"d","\u1E0F":"d","\u0111":"d","\u018C":"d","\u0256":"d","\u0257":"d","\uA77A":"d","\u01F3":"dz","\u01C6":"dz","\u24D4":"e","\uFF45":"e","\u00E8":"e","\u00E9":"e","\u00EA":"e","\u1EC1":"e","\u1EBF":"e","\u1EC5":"e","\u1EC3":"e","\u1EBD":"e","\u0113":"e","\u1E15":"e","\u1E17":"e","\u0115":"e","\u0117":"e","\u00EB":"e","\u1EBB":"e","\u011B":"e","\u0205":"e","\u0207":"e","\u1EB9":"e","\u1EC7":"e","\u0229":"e","\u1E1D":"e","\u0119":"e","\u1E19":"e","\u1E1B":"e","\u0247":"e","\u025B":"e","\u01DD":"e","\u24D5":"f","\uFF46":"f","\u1E1F":"f","\u0192":"f","\uA77C":"f","\u24D6":"g","\uFF47":"g","\u01F5":"g","\u011D":"g","\u1E21":"g","\u011F":"g","\u0121":"g","\u01E7":"g","\u0123":"g","\u01E5":"g","\u0260":"g","\uA7A1":"g","\u1D79":"g","\uA77F":"g","\u24D7":"h","\uFF48":"h","\u0125":"h","\u1E23":"h","\u1E27":"h","\u021F":"h","\u1E25":"h","\u1E29":"h","\u1E2B":"h","\u1E96":"h","\u0127":"h","\u2C68":"h","\u2C76":"h","\u0265":"h","\u0195":"hv","\u24D8":"i","\uFF49":"i","\u00EC":"i","\u00ED":"i","\u00EE":"i","\u0129":"i","\u012B":"i","\u012D":"i","\u00EF":"i","\u1E2F":"i","\u1EC9":"i","\u01D0":"i","\u0209":"i","\u020B":"i","\u1ECB":"i","\u012F":"i","\u1E2D":"i","\u0268":"i","\u0131":"i","\u24D9":"j","\uFF4A":"j","\u0135":"j","\u01F0":"j","\u0249":"j","\u24DA":"k","\uFF4B":"k","\u1E31":"k","\u01E9":"k","\u1E33":"k","\u0137":"k","\u1E35":"k","\u0199":"k","\u2C6A":"k","\uA741":"k","\uA743":"k","\uA745":"k","\uA7A3":"k","\u24DB":"l","\uFF4C":"l","\u0140":"l","\u013A":"l","\u013E":"l","\u1E37":"l","\u1E39":"l","\u013C":"l","\u1E3D":"l","\u1E3B":"l","\u017F":"l","\u0142":"l","\u019A":"l","\u026B":"l","\u2C61":"l","\uA749":"l","\uA781":"l","\uA747":"l","\u01C9":"lj","\u24DC":"m","\uFF4D":"m","\u1E3F":"m","\u1E41":"m","\u1E43":"m","\u0271":"m","\u026F":"m","\u24DD":"n","\uFF4E":"n","\u01F9":"n","\u0144":"n","\u00F1":"n","\u1E45":"n","\u0148":"n","\u1E47":"n","\u0146":"n","\u1E4B":"n","\u1E49":"n","\u019E":"n","\u0272":"n","\u0149":"n","\uA791":"n","\uA7A5":"n","\u01CC":"nj","\u24DE":"o","\uFF4F":"o","\u00F2":"o","\u00F3":"o","\u00F4":"o","\u1ED3":"o","\u1ED1":"o","\u1ED7":"o","\u1ED5":"o","\u00F5":"o","\u1E4D":"o","\u022D":"o","\u1E4F":"o","\u014D":"o","\u1E51":"o","\u1E53":"o","\u014F":"o","\u022F":"o","\u0231":"o","\u00F6":"o","\u022B":"o","\u1ECF":"o","\u0151":"o","\u01D2":"o","\u020D":"o","\u020F":"o","\u01A1":"o","\u1EDD":"o","\u1EDB":"o","\u1EE1":"o","\u1EDF":"o","\u1EE3":"o","\u1ECD":"o","\u1ED9":"o","\u01EB":"o","\u01ED":"o","\u00F8":"o","\u01FF":"o","\u0254":"o","\uA74B":"o","\uA74D":"o","\u0275":"o","\u01A3":"oi","\u0223":"ou","\uA74F":"oo","\u24DF":"p","\uFF50":"p","\u1E55":"p","\u1E57":"p","\u01A5":"p","\u1D7D":"p","\uA751":"p","\uA753":"p","\uA755":"p","\u24E0":"q","\uFF51":"q","\u024B":"q","\uA757":"q","\uA759":"q","\u24E1":"r","\uFF52":"r","\u0155":"r","\u1E59":"r","\u0159":"r","\u0211":"r","\u0213":"r","\u1E5B":"r","\u1E5D":"r","\u0157":"r","\u1E5F":"r","\u024D":"r","\u027D":"r","\uA75B":"r","\uA7A7":"r","\uA783":"r","\u24E2":"s","\uFF53":"s","\u00DF":"s","\u015B":"s","\u1E65":"s","\u015D":"s","\u1E61":"s","\u0161":"s","\u1E67":"s","\u1E63":"s","\u1E69":"s","\u0219":"s","\u015F":"s","\u023F":"s","\uA7A9":"s","\uA785":"s","\u1E9B":"s","\u24E3":"t","\uFF54":"t","\u1E6B":"t","\u1E97":"t","\u0165":"t","\u1E6D":"t","\u021B":"t","\u0163":"t","\u1E71":"t","\u1E6F":"t","\u0167":"t","\u01AD":"t","\u0288":"t","\u2C66":"t","\uA787":"t","\uA729":"tz","\u24E4":"u","\uFF55":"u","\u00F9":"u","\u00FA":"u","\u00FB":"u","\u0169":"u","\u1E79":"u","\u016B":"u","\u1E7B":"u","\u016D":"u","\u00FC":"u","\u01DC":"u","\u01D8":"u","\u01D6":"u","\u01DA":"u","\u1EE7":"u","\u016F":"u","\u0171":"u","\u01D4":"u","\u0215":"u","\u0217":"u","\u01B0":"u","\u1EEB":"u","\u1EE9":"u","\u1EEF":"u","\u1EED":"u","\u1EF1":"u","\u1EE5":"u","\u1E73":"u","\u0173":"u","\u1E77":"u","\u1E75":"u","\u0289":"u","\u24E5":"v","\uFF56":"v","\u1E7D":"v","\u1E7F":"v","\u028B":"v","\uA75F":"v","\u028C":"v","\uA761":"vy","\u24E6":"w","\uFF57":"w","\u1E81":"w","\u1E83":"w","\u0175":"w","\u1E87":"w","\u1E85":"w","\u1E98":"w","\u1E89":"w","\u2C73":"w","\u24E7":"x","\uFF58":"x","\u1E8B":"x","\u1E8D":"x","\u24E8":"y","\uFF59":"y","\u1EF3":"y","\u00FD":"y","\u0177":"y","\u1EF9":"y","\u0233":"y","\u1E8F":"y","\u00FF":"y","\u1EF7":"y","\u1E99":"y","\u1EF5":"y","\u01B4":"y","\u024F":"y","\u1EFF":"y","\u24E9":"z","\uFF5A":"z","\u017A":"z","\u1E91":"z","\u017C":"z","\u017E":"z","\u1E93":"z","\u1E95":"z","\u01B6":"z","\u0225":"z","\u0240":"z","\u2C6C":"z","\uA763":"z"};
$document = $(document);
nextUid=(function() { var counter=1; return function() { return
counter++; }; }());
function stripDiacritics(str) {
var ret, i, l, c;
if (!str || str.length < 1) return str;
ret = "";
for (i = 0, l = str.length; i < l; i++) {
c = str.charAt(i);
ret += DIACRITICS[c] || c;
}
return ret;
}
function indexOf(value, array) {
var i = 0, l = array.length;
for (; i < l; i = i + 1) {
if (equal(value, array[i])) return i;
}
return -1;
}
function measureScrollbar () {
var $template = $( MEASURE_SCROLLBAR_TEMPLATE );
$template.appendTo('body');
var dim = {
width: $template.width() - $template[0].clientWidth,
height: $template.height() - $template[0].clientHeight
};
$template.remove();
return dim;
}
/**
* Compares equality of a and b
* @param a
* @param b
*/
function equal(a, b) {
if (a === b) return true;
if (a === undefined || b === undefined) return false;
if (a === null || b === null) return false;
// Check whether 'a' or 'b' is a string
(primitive or object).
// The concatenation of an empty string (+'') converts
its argument to a string's primitive.
if (a.constructor === String) return a+'' ===
b+''; // a+'' - in case 'a' is a String
object
if (b.constructor === String) return b+'' ===
a+''; // b+'' - in case 'b' is a String
object
return false;
}
/**
* Splits the string into an array of values, trimming each value. An
empty array is returned for nulls or empty
* strings
* @param string
* @param separator
*/
function splitVal(string, separator) {
var val, i, l;
if (string === null || string.length < 1) return [];
val = string.split(separator);
for (i = 0, l = val.length; i < l; i = i + 1) val[i] =
$.trim(val[i]);
return val;
}
function getSideBorderPadding(element) {
return element.outerWidth(false) - element.width();
}
function installKeyUpChangeEvent(element) {
var key="keyup-change-value";
element.on("keydown", function () {
if ($.data(element, key) === undefined) {
$.data(element, key, element.val());
}
});
element.on("keyup", function () {
var val= $.data(element, key);
if (val !== undefined && element.val() !== val) {
$.removeData(element, key);
element.trigger("keyup-change");
}
});
}
$document.on("mousemove", function (e) {
lastMousePosition.x = e.pageX;
lastMousePosition.y = e.pageY;
});
/**
* filters mouse events so an event is fired only if the mouse moved.
*
* filters out mouse events that occur when mouse is stationary but
* the elements under the pointer are scrolled.
*/
function installFilteredMouseMove(element) {
element.on("mousemove", function (e) {
var lastpos = lastMousePosition;
if (lastpos === undefined || lastpos.x !== e.pageX || lastpos.y
!== e.pageY) {
$(e.target).trigger("mousemove-filtered", e);
}
});
}
/**
* Debounces a function. Returns a function that calls the original fn
function only if no invocations have been made
* within the last quietMillis milliseconds.
*
* @param quietMillis number of milliseconds to wait before invoking fn
* @param fn function to be debounced
* @param ctx object to be used as this reference within fn
* @return debounced version of fn
*/
function debounce(quietMillis, fn, ctx) {
ctx = ctx || undefined;
var timeout;
return function () {
var args = arguments;
window.clearTimeout(timeout);
timeout = window.setTimeout(function() {
fn.apply(ctx, args);
}, quietMillis);
};
}
/**
* A simple implementation of a thunk
* @param formula function used to lazily initialize the thunk
* @return {Function}
*/
function thunk(formula) {
var evaluated = false,
value;
return function() {
if (evaluated === false) { value = formula(); evaluated = true;
}
return value;
};
};
function installDebouncedScroll(threshold, element) {
var notify = debounce(threshold, function (e) {
element.trigger("scroll-debounced", e);});
element.on("scroll", function (e) {
if (indexOf(e.target, element.get()) >= 0) notify(e);
});
}
function focus($el) {
if ($el[0] === document.activeElement) return;
/* set the focus in a 0 timeout - that way the focus is set after
the processing
of the current event has finished - which seems like the only
reliable way
to set focus */
window.setTimeout(function() {
var el=$el[0], pos=$el.val().length, range;
$el.focus();
/* make sure el received focus so we do not error out when
trying to manipulate the caret.
sometimes modals or others listeners may steal it after its
set */
if ($el.is(":visible") && el ===
document.activeElement) {
/* after the focus is set move the caret to the end,
necessary when we val()
just before setting focus */
if(el.setSelectionRange)
{
el.setSelectionRange(pos, pos);
}
else if (el.createTextRange) {
range = el.createTextRange();
range.collapse(false);
range.select();
}
}
}, 0);
}
function getCursorInfo(el) {
el = $(el)[0];
var offset = 0;
var length = 0;
if ('selectionStart' in el) {
offset = el.selectionStart;
length = el.selectionEnd - offset;
} else if ('selection' in document) {
el.focus();
var sel = document.selection.createRange();
length = document.selection.createRange().text.length;
sel.moveStart('character', -el.value.length);
offset = sel.text.length - length;
}
return { offset: offset, length: length };
}
function killEvent(event) {
event.preventDefault();
event.stopPropagation();
}
function killEventImmediately(event) {
event.preventDefault();
event.stopImmediatePropagation();
}
function measureTextWidth(e) {
if (!sizer){
var style = e[0].currentStyle || window.getComputedStyle(e[0],
null);
sizer = $(document.createElement("div")).css({
position: "absolute",
left: "-10000px",
top: "-10000px",
display: "none",
fontSize: style.fontSize,
fontFamily: style.fontFamily,
fontStyle: style.fontStyle,
fontWeight: style.fontWeight,
letterSpacing: style.letterSpacing,
textTransform: style.textTransform,
whiteSpace: "nowrap"
});
sizer.attr("class","select2-sizer");
$("body").append(sizer);
}
sizer.text(e.val());
return sizer.width();
}
function syncCssClasses(dest, src, adapter) {
var classes, replacements = [], adapted;
classes = dest.attr("class");
if (classes) {
classes = '' + classes; // for IE which returns
object
$(classes.split(" ")).each2(function() {
if (this.indexOf("select2-") === 0) {
replacements.push(this);
}
});
}
classes = src.attr("class");
if (classes) {
classes = '' + classes; // for IE which returns
object
$(classes.split(" ")).each2(function() {
if (this.indexOf("select2-") !== 0) {
adapted = adapter(this);
if (adapted) {
replacements.push(this);
}
}
});
}
dest.attr("class", replacements.join(" "));
}
function markMatch(text, term, markup, escapeMarkup) {
var
match=stripDiacritics(text.toUpperCase()).indexOf(stripDiacritics(term.toUpperCase())),
tl=term.length;
if (match<0) {
markup.push(escapeMarkup(text));
return;
}
markup.push(escapeMarkup(text.substring(0, match)));
markup.push("<span
class='select2-match'>");
markup.push(escapeMarkup(text.substring(match, match + tl)));
markup.push("</span>");
markup.push(escapeMarkup(text.substring(match + tl, text.length)));
}
function defaultEscapeMarkup(markup) {
var replace_map = {
'\\': '\',
'&': '&',
'<': '<',
'>': '>',
'"': '"',
"'": ''',
"/": '/'
};
return String(markup).replace(/[&<>"'\/\\]/g,
function (match) {
return replace_map[match];
});
}
/**
* Produces an ajax-based query function
*
* @param options object containing configuration paramters
* @param options.params parameter map for the transport ajax call, can
contain such options as cache, jsonpCallback, etc. see $.ajax
* @param options.transport function that will be used to execute the
ajax request. must be compatible with parameters supported by $.ajax
* @param options.url url for the data
* @param options.data a function(searchTerm, pageNumber, context) that
should return an object containing query string parameters for the above
url.
* @param options.dataType request data type: ajax, jsonp, other
datatatypes supported by jQuery's $.ajax function or the transport
function if specified
* @param options.quietMillis (optional) milliseconds to wait before
making the ajaxRequest, helps debounce the ajax function if invoked too
often
* @param options.results a function(remoteData, pageNumber) that
converts data returned form the remote request to the format expected by
Select2.
* The expected format is an object containing the following keys:
* results array of objects that will be used as choices
* more (optional) boolean indicating whether there are more
results available
* Example: {results:[{id:1, text:'Red'},{id:2,
text:'Blue'}], more:true}
*/
function ajax(options) {
var timeout, // current scheduled but not yet executed request
handler = null,
quietMillis = options.quietMillis || 100,
ajaxUrl = options.url,
self = this;
return function (query) {
window.clearTimeout(timeout);
timeout = window.setTimeout(function () {
var data = options.data, // ajax data function
url = ajaxUrl, // ajax url string or function
transport = options.transport ||
$.fn.select2.ajaxDefaults.transport,
// deprecated - to be removed in 4.0 - use params
instead
deprecated = {
type: options.type || 'GET', // set type
of request (GET or POST)
cache: options.cache || false,
jsonpCallback: options.jsonpCallback||undefined,
dataType: options.dataType||"json"
},
params = $.extend({}, $.fn.select2.ajaxDefaults.params,
deprecated);
data = data ? data.call(self, query.term, query.page,
query.context) : null;
url = (typeof url === 'function') ?
url.call(self, query.term, query.page, query.context) : url;
if (handler) { handler.abort(); }
if (options.params) {
if ($.isFunction(options.params)) {
$.extend(params, options.params.call(self));
} else {
$.extend(params, options.params);
}
}
$.extend(params, {
url: url,
dataType: options.dataType,
data: data,
success: function (data) {
// TO DO - replace query.page with query so users
have access to term, page, etc.
var results = options.results(data, query.page);
query.callback(results);
}
});
handler = transport.call(self, params);
}, quietMillis);
};
}
/**
* Produces a query function that works with a local array
*
* @param options object containing configuration parameters. The
options parameter can either be an array or an
* object.
*
* If the array form is used it is assumed that it contains objects
with 'id' and 'text' keys.
*
* If the object form is used ti is assumed that it contains
'data' and 'text' keys. The 'data' key should
contain
* an array of objects that will be used as choices. These objects must
contain at least an 'id' key. The 'text'
* key can either be a String in which case it is expected that each
element in the 'data' array has a key with the
* value of 'text' which will be used to match choices.
Alternatively, text can be a function(item) that can extract
* the text.
*/
function local(options) {
var data = options, // data elements
dataText,
tmp,
text = function (item) { return ""+item.text; }; //
function used to retrieve the text portion of a data item that is matched
against the search
if ($.isArray(data)) {
tmp = data;
data = { results: tmp };
}
if ($.isFunction(data) === false) {
tmp = data;
data = function() { return tmp; };
}
var dataItem = data();
if (dataItem.text) {
text = dataItem.text;
// if text is not a function we assume it to be a key name
if (!$.isFunction(text)) {
dataText = dataItem.text; // we need to store this in a
separate variable because in the next step data gets reset and data.text is
no longer available
text = function (item) { return item[dataText]; };
}
}
return function (query) {
var t = query.term, filtered = { results: [] }, process;
if (t === "") {
query.callback(data());
return;
}
process = function(datum, collection) {
var group, attr;
datum = datum[0];
if (datum.children) {
group = {};
for (attr in datum) {
if (datum.hasOwnProperty(attr))
group[attr]=datum[attr];
}
group.children=[];
$(datum.children).each2(function(i, childDatum) {
process(childDatum, group.children); });
if (group.children.length || query.matcher(t,
text(group), datum)) {
collection.push(group);
}
} else {
if (query.matcher(t, text(datum), datum)) {
collection.push(datum);
}
}
};
$(data().results).each2(function(i, datum) { process(datum,
filtered.results); });
query.callback(filtered);
};
}
// TO DO javadoc
function tags(data) {
var isFunc = $.isFunction(data);
return function (query) {
var t = query.term, filtered = {results: []};
$(isFunc ? data() : data).each(function () {
var isObject = this.text !== undefined,
text = isObject ? this.text : this;
if (t === "" || query.matcher(t, text)) {
filtered.results.push(isObject ? this : {id: this,
text: this});
}
});
query.callback(filtered);
};
}
/**
* Checks if the formatter function should be used.
*
* Throws an error if it is not a function. Returns true if it should
be used,
* false if no formatting should be performed.
*
* @param formatter
*/
function checkFormatter(formatter, formatterName) {
if ($.isFunction(formatter)) return true;
if (!formatter) return false;
throw new Error(formatterName +" must be a function or a falsy
value");
}
function evaluate(val) {
return $.isFunction(val) ? val() : val;
}
function countResults(results) {
var count = 0;
$.each(results, function(i, item) {
if (item.children) {
count += countResults(item.children);
} else {
count++;
}
});
return count;
}
/**
* Default tokenizer. This function uses breaks the input on substring
match of any string from the
* opts.tokenSeparators array and uses opts.createSearchChoice to
create the choice object. Both of those
* two options have to be defined in order for the tokenizer to work.
*
* @param input text user has typed so far or pasted into the search
field
* @param selection currently selected choices
* @param selectCallback function(choice) callback tho add the choice
to selection
* @param opts select2's opts
* @return undefined/null to leave the current input unchanged, or a
string to change the input to the returned value
*/
function defaultTokenizer(input, selection, selectCallback, opts) {
var original = input, // store the original so we can compare and
know if we need to tell the search to update its text
dupe = false, // check for whether a token we extracted
represents a duplicate selected choice
token, // token
index, // position at which the separator was found
i, l, // looping variables
separator; // the matched separator
if (!opts.createSearchChoice || !opts.tokenSeparators ||
opts.tokenSeparators.length < 1) return undefined;
while (true) {
index = -1;
for (i = 0, l = opts.tokenSeparators.length; i < l; i++) {
separator = opts.tokenSeparators[i];
index = input.indexOf(separator);
if (index >= 0) break;
}
if (index < 0) break; // did not find any token separator in
the input string, bail
token = input.substring(0, index);
input = input.substring(index + separator.length);
if (token.length > 0) {
token = opts.createSearchChoice.call(this, token,
selection);
if (token !== undefined && token !== null
&& opts.id(token) !== undefined && opts.id(token) !== null)
{
dupe = false;
for (i = 0, l = selection.length; i < l; i++) {
if (equal(opts.id(token), opts.id(selection[i]))) {
dupe = true; break;
}
}
if (!dupe) selectCallback(token);
}
}
}
if (original!==input) return input;
}
/**
* Creates a new class
*
* @param superClass
* @param methods
*/
function clazz(SuperClass, methods) {
var constructor = function () {};
constructor.prototype = new SuperClass;
constructor.prototype.constructor = constructor;
constructor.prototype.parent = SuperClass.prototype;
constructor.prototype = $.extend(constructor.prototype, methods);
return constructor;
}
AbstractSelect2 = clazz(Object, {
// abstract
bind: function (func) {
var self = this;
return function () {
func.apply(self, arguments);
};
},
// abstract
init: function (opts) {
var results, search, resultsSelector =
".select2-results", disabled, readonly;
// prepare options
this.opts = opts = this.prepareOpts(opts);
this.id=opts.id;
// destroy if called on an existing component
if (opts.element.data("select2") !== undefined
&&
opts.element.data("select2") !== null) {
opts.element.data("select2").destroy();
}
this.container = this.createContainer();
this.containerId="s2id_"+(opts.element.attr("id") ||
"autogen"+nextUid());
this.containerSelector="#"+this.containerId.replace(/([;&,\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g,
'\\$1');
this.container.attr("id", this.containerId);
// cache the body so future lookups are cheap
this.body = thunk(function() { return
opts.element.closest("body"); });
syncCssClasses(this.container, this.opts.element,
this.opts.adaptContainerCssClass);
this.container.attr("style",
opts.element.attr("style"));
this.container.css(evaluate(opts.containerCss));
this.container.addClass(evaluate(opts.containerCssClass));
this.elementTabIndex =
this.opts.element.attr("tabindex");
// swap container for the element
this.opts.element
.data("select2", this)
.attr("tabindex", "-1")
.before(this.container)
.on("click.select2", killEvent); // do not leak
click events
this.container.data("select2", this);
this.dropdown = this.container.find(".select2-drop");
syncCssClasses(this.dropdown, this.opts.element,
this.opts.adaptDropdownCssClass);
this.dropdown.addClass(evaluate(opts.dropdownCssClass));
this.dropdown.data("select2", this);
this.dropdown.on("click", killEvent);
this.results = results = this.container.find(resultsSelector);
this.search = search =
this.container.find("input.select2-input");
this.queryCount = 0;
this.resultsPage = 0;
this.context = null;
// initialize the container
this.initContainer();
this.container.on("click", killEvent);
installFilteredMouseMove(this.results);
this.dropdown.on("mousemove-filtered touchstart touchmove
touchend", resultsSelector, this.bind(this.highlightUnderEvent));
installDebouncedScroll(80, this.results);
this.dropdown.on("scroll-debounced", resultsSelector,
this.bind(this.loadMoreIfNeeded));
// do not propagate change event from the search field out of
the component
$(this.container).on("change",
".select2-input", function(e) {e.stopPropagation();});
$(this.dropdown).on("change",
".select2-input", function(e) {e.stopPropagation();});
// if jquery.mousewheel plugin is installed we can prevent
out-of-bounds scrolling of results via mousewheel
if ($.fn.mousewheel) {
results.mousewheel(function (e, delta, deltaX, deltaY) {
var top = results.scrollTop(), height;
if (deltaY > 0 && top - deltaY <= 0) {
results.scrollTop(0);
killEvent(e);
} else if (deltaY < 0 &&
results.get(0).scrollHeight - results.scrollTop() + deltaY <=
results.height()) {
results.scrollTop(results.get(0).scrollHeight -
results.height());
killEvent(e);
}
});
}
installKeyUpChangeEvent(search);
search.on("keyup-change input paste",
this.bind(this.updateResults));
search.on("focus", function () {
search.addClass("select2-focused"); });
search.on("blur", function () {
search.removeClass("select2-focused");});
this.dropdown.on("mouseup", resultsSelector,
this.bind(function (e) {
if
($(e.target).closest(".select2-result-selectable").length > 0)
{
this.highlightUnderEvent(e);
this.selectHighlighted(e);
}
}));
// trap all mouse events from leaving the dropdown. sometimes
there may be a modal that is listening
// for mouse events outside of itself so it can close itself.
since the dropdown is now outside the select2's
// dom it will trigger the popup close, which is not what we
want
this.dropdown.on("click mouseup mousedown", function
(e) { e.stopPropagation(); });
if ($.isFunction(this.opts.initSelection)) {
// initialize selection based on the current value of the
source element
this.initSelection();
// if the user has provided a function that can set
selection based on the value of the source element
// we monitor the change event on the element and trigger
it, allowing for two way synchronization
this.monitorSource();
}
if (opts.maximumInputLength !== null) {
this.search.attr("maxlength",
opts.maximumInputLength);
}
var disabled = opts.element.prop("disabled");
if (disabled === undefined) disabled = false;
this.enable(!disabled);
var readonly = opts.element.prop("readonly");
if (readonly === undefined) readonly = false;
this.readonly(readonly);
// Calculate size of scrollbar
scrollBarDimensions = scrollBarDimensions ||
measureScrollbar();
this.autofocus = opts.element.prop("autofocus");
opts.element.prop("autofocus", false);
if (this.autofocus) this.focus();
this.nextSearchTerm = undefined;
},
// abstract
destroy: function () {
var element=this.opts.element, select2 =
element.data("select2");
this.close();
if (this.propertyObserver) { delete this.propertyObserver;
this.propertyObserver = null; }
if (select2 !== undefined) {
select2.container.remove();
select2.dropdown.remove();
element
.removeClass("select2-offscreen")
.removeData("select2")
.off(".select2")
.prop("autofocus", this.autofocus || false);
if (this.elementTabIndex) {
element.attr({tabindex: this.elementTabIndex});
} else {
element.removeAttr("tabindex");
}
element.show();
}
},
// abstract
optionToData: function(element) {
if (element.is("option")) {
return {
id:element.prop("value"),
text:element.text(),
element: element.get(),
css: element.attr("class"),
disabled: element.prop("disabled"),
locked: equal(element.attr("locked"),
"locked") || equal(element.data("locked"), true)
};
} else if (element.is("optgroup")) {
return {
text:element.attr("label"),
children:[],
element: element.get(),
css: element.attr("class")
};
}
},
// abstract
prepareOpts: function (opts) {
var element, select, idKey, ajaxUrl, self = this;
element = opts.element;
if (element.get(0).tagName.toLowerCase() ===
"select") {
this.select = select = opts.element;
}
if (select) {
// these options are not allowed when attached to a select
because they are picked up off the element itself
$.each(["id", "multiple",
"ajax", "query", "createSearchChoice",
"initSelection", "data", "tags"], function ()
{
if (this in opts) {
throw new Error("Option '" + this +
"' is not allowed for Select2 when attached to a <select>
element.");
}
});
}
opts = $.extend({}, {
populateResults: function(container, results, query) {
var populate, data, result, children, id=this.opts.id;
populate=function(results, container, depth) {
var i, l, result, selectable, disabled, compound,
node, label, innerContainer, formatted;
results = opts.sortResults(results, container,
query);
for (i = 0, l = results.length; i < l; i = i +
1) {
result=results[i];
disabled = (result.disabled === true);
selectable = (!disabled) && (id(result)
!== undefined);
compound=result.children &&
result.children.length > 0;
node=$("<li></li>");
node.addClass("select2-results-dept-"+depth);
node.addClass("select2-result");
node.addClass(selectable ?
"select2-result-selectable" :
"select2-result-unselectable");
if (disabled) {
node.addClass("select2-disabled"); }
if (compound) {
node.addClass("select2-result-with-children"); }
node.addClass(self.opts.formatResultCssClass(result));
label=$(document.createElement("div"));
label.addClass("select2-result-label");
formatted=opts.formatResult(result, label,
query, self.opts.escapeMarkup);
if (formatted!==undefined) {
label.html(formatted);
}
node.append(label);
if (compound) {
innerContainer=$("<ul></ul>");
innerContainer.addClass("select2-result-sub");
populate(result.children, innerContainer,
depth+1);
node.append(innerContainer);
}
node.data("select2-data", result);
container.append(node);
}
};
populate(results, container, 0);
}
}, $.fn.select2.defaults, opts);
if (typeof(opts.id) !== "function") {
idKey = opts.id;
opts.id = function (e) { return e[idKey]; };
}
if ($.isArray(opts.element.data("select2Tags"))) {
if ("tags" in opts) {
throw "tags specified as both an attribute
'data-select2-tags' and in options of Select2 " +
opts.element.attr("id");
}
opts.tags=opts.element.data("select2Tags");
}
if (select) {
opts.query = this.bind(function (query) {
var data = { results: [], more: false },
term = query.term,
children, placeholderOption, process;
process=function(element, collection) {
var group;
if (element.is("option")) {
if (query.matcher(term, element.text(),
element)) {
collection.push(self.optionToData(element));
}
} else if (element.is("optgroup")) {
group=self.optionToData(element);
element.children().each2(function(i, elm) {
process(elm, group.children); });
if (group.children.length>0) {
collection.push(group);
}
}
};
children=element.children();
// ignore the placeholder option if there is one
if (this.getPlaceholder() !== undefined &&
children.length > 0) {
placeholderOption = this.getPlaceholderOption();
if (placeholderOption) {
children=children.not(placeholderOption);
}
}
children.each2(function(i, elm) { process(elm,
data.results); });
query.callback(data);
});
// this is needed because inside val() we construct choices
from options and there id is hardcoded
opts.id=function(e) { return e.id; };
opts.formatResultCssClass = function(data) { return
data.css; };
} else {
if (!("query" in opts)) {
if ("ajax" in opts) {
ajaxUrl = opts.element.data("ajax-url");
if (ajaxUrl && ajaxUrl.length > 0) {
opts.ajax.url = ajaxUrl;
}
opts.query = ajax.call(opts.element, opts.ajax);
} else if ("data" in opts) {
opts.query = local(opts.data);
} else if ("tags" in opts) {
opts.query = tags(opts.tags);
if (opts.createSearchChoice === undefined) {
opts.createSearchChoice = function (term) {
return {id: $.trim(term), text: $.trim(term)}; };
}
if (opts.initSelection === undefined) {
opts.initSelection = function (element,
callback) {
var data = [];
$(splitVal(element.val(),
opts.separator)).each(function () {
var obj = { id: this, text: this },
tags = opts.tags;
if ($.isFunction(tags)) tags=tags();
$(tags).each(function() { if
(equal(this.id, obj.id)) { obj = this; return false; } });
data.push(obj);
});
callback(data);
};
}
}
}
}
if (typeof(opts.query) !== "function") {
throw "query function not defined for Select2 " +
opts.element.attr("id");
}
return opts;
},
/**
* Monitor the original element for changes and update select2
accordingly
*/
// abstract
monitorSource: function () {
var el = this.opts.element, sync;
el.on("change.select2", this.bind(function (e) {
if
(this.opts.element.data("select2-change-triggered") !== true) {
this.initSelection();
}
}));
sync = this.bind(function () {
var enabled, readonly, self = this;
// sync enabled state
var disabled = el.prop("disabled");
if (disabled === undefined) disabled = false;
this.enable(!disabled);
var readonly = el.prop("readonly");
if (readonly === undefined) readonly = false;
this.readonly(readonly);
syncCssClasses(this.container, this.opts.element,
this.opts.adaptContainerCssClass);
this.container.addClass(evaluate(this.opts.containerCssClass));
syncCssClasses(this.dropdown, this.opts.element,
this.opts.adaptDropdownCssClass);
this.dropdown.addClass(evaluate(this.opts.dropdownCssClass));
});
// mozilla and IE
el.on("propertychange.select2
DOMAttrModified.select2", sync);
// hold onto a reference of the callback to work around a
chromium bug
if (this.mutationCallback === undefined) {
this.mutationCallback = function (mutations) {
mutations.forEach(sync);
}
}
// safari and chrome
if (typeof WebKitMutationObserver !== "undefined") {
if (this.propertyObserver) { delete this.propertyObserver;
this.propertyObserver = null; }
this.propertyObserver = new
WebKitMutationObserver(this.mutationCallback);
this.propertyObserver.observe(el.get(0), { attributes:true,
subtree:false });
}
},
// abstract
triggerSelect: function(data) {
var evt = $.Event("select2-selecting", { val:
this.id(data), object: data });
this.opts.element.trigger(evt);
return !evt.isDefaultPrevented();
},
/**
* Triggers the change event on the source element
*/
// abstract
triggerChange: function (details) {
details = details || {};
details= $.extend({}, details, { type: "change", val:
this.val() });
// prevents recursive triggering
this.opts.element.data("select2-change-triggered",
true);
this.opts.element.trigger(details);
this.opts.element.data("select2-change-triggered",
false);
// some validation frameworks ignore the change event and
listen instead to keyup, click for selects
// so here we trigger the click event manually
this.opts.element.click();
// ValidationEngine ignorea the change event and listens
instead to blur
// so here we trigger the blur event manually if so desired
if (this.opts.blurOnChange)
this.opts.element.blur();
},
//abstract
isInterfaceEnabled: function()
{
return this.enabledInterface === true;
},
// abstract
enableInterface: function() {
var enabled = this._enabled && !this._readonly,
disabled = !enabled;
if (enabled === this.enabledInterface) return false;
this.container.toggleClass("select2-container-disabled",
disabled);
this.close();
this.enabledInterface = enabled;
return true;
},
// abstract
enable: function(enabled) {
if (enabled === undefined) enabled = true;
if (this._enabled === enabled) return;
this._enabled = enabled;
this.opts.element.prop("disabled", !enabled);
this.enableInterface();
},
// abstract
disable: function() {
this.enable(false);
},
// abstract
readonly: function(enabled) {
if (enabled === undefined) enabled = false;
if (this._readonly === enabled) return false;
this._readonly = enabled;
this.opts.element.prop("readonly", enabled);
this.enableInterface();
return true;
},
// abstract
opened: function () {
return
this.container.hasClass("select2-dropdown-open");
},
// abstract
positionDropdown: function() {
var $dropdown = this.dropdown,
offset = this.container.offset(),
height = this.container.outerHeight(false),
width = this.container.outerWidth(false),
dropHeight = $dropdown.outerHeight(false),
viewPortRight = $(window).scrollLeft() + $(window).width(),
viewportBottom = $(window).scrollTop() +
$(window).height(),
dropTop = offset.top + height,
dropLeft = offset.left,
enoughRoomBelow = dropTop + dropHeight <=
viewportBottom,
enoughRoomAbove = (offset.top - dropHeight) >=
this.body().scrollTop(),
dropWidth = $dropdown.outerWidth(false),
enoughRoomOnRight = dropLeft + dropWidth <=
viewPortRight,
aboveNow =
$dropdown.hasClass("select2-drop-above"),
bodyOffset,
above,
css,
resultsListNode;
if (this.opts.dropdownAutoWidth) {
resultsListNode = $('.select2-results',
$dropdown)[0];
$dropdown.addClass('select2-drop-auto-width');
$dropdown.css('width', '');
// Add scrollbar width to dropdown if vertical scrollbar is
present
dropWidth = $dropdown.outerWidth(false) +
(resultsListNode.scrollHeight === resultsListNode.clientHeight ? 0 :
scrollBarDimensions.width);
dropWidth > width ? width = dropWidth : dropWidth =
width;
enoughRoomOnRight = dropLeft + dropWidth <=
viewPortRight;
}
else {
this.container.removeClass('select2-drop-auto-width');
}
// fix positioning when body has an offset and is not position:
static
if (this.body().css('position') !==
'static') {
bodyOffset = this.body().offset();
dropTop -= bodyOffset.top;
dropLeft -= bodyOffset.left;
}
// always prefer the current above/below alignment, unless
there is not enough room
if (aboveNow) {
above = true;
if (!enoughRoomAbove && enoughRoomBelow) above =
false;
} else {
above = false;
if (!enoughRoomBelow && enoughRoomAbove) above =
true;
}
if (!enoughRoomOnRight) {
dropLeft = offset.left + width - dropWidth;
}
if (above) {
dropTop = offset.top - dropHeight;
this.container.addClass("select2-drop-above");
$dropdown.addClass("select2-drop-above");
}
else {
this.container.removeClass("select2-drop-above");
$dropdown.removeClass("select2-drop-above");
}
css = $.extend({
top: dropTop,
left: dropLeft,
width: width
}, evaluate(this.opts.dropdownCss));
$dropdown.css(css);
},
// abstract
shouldOpen: function() {
var event;
if (this.opened()) return false;
if (this._enabled === false || this._readonly === true) return
false;
event = $.Event("select2-opening");
this.opts.element.trigger(event);
return !event.isDefaultPrevented();
},
// abstract
clearDropdownAlignmentPreference: function() {
// clear the classes used to figure out the preference of where
the dropdown should be opened
this.container.removeClass("select2-drop-above");
this.dropdown.removeClass("select2-drop-above");
},
/**
* Opens the dropdown
*
* @return {Boolean} whether or not dropdown was opened. This
method will return false if, for example,
* the dropdown is already open, or if the 'open' event
listener on the element called preventDefault().
*/
// abstract
open: function () {
if (!this.shouldOpen()) return false;
this.opening();
return true;
},
/**
* Performs the opening of the dropdown
*/
// abstract
opening: function() {
var cid = this.containerId,
scroll = "scroll." + cid,
resize = "resize."+cid,
orient = "orientationchange."+cid,
mask, maskCss;
this.container.addClass("select2-dropdown-open").addClass("select2-container-active");
this.clearDropdownAlignmentPreference();
if(this.dropdown[0] !== this.body().children().last()[0]) {
this.dropdown.detach().appendTo(this.body());
}
// create the dropdown mask if doesnt already exist
mask = $("#select2-drop-mask");
if (mask.length == 0) {
mask = $(document.createElement("div"));
mask.attr("id","select2-drop-mask").attr("class","select2-drop-mask");
mask.hide();
mask.appendTo(this.body());
mask.on("mousedown touchstart click", function
(e) {
var dropdown = $("#select2-drop"), self;
if (dropdown.length > 0) {
self=dropdown.data("select2");
if (self.opts.selectOnBlur) {
self.selectHighlighted({noFocus: true});
}
self.close({focus:false});
e.preventDefault();
e.stopPropagation();
}
});
}
// ensure the mask is always right before the dropdown
if (this.dropdown.prev()[0] !== mask[0]) {
this.dropdown.before(mask);
}
// move the global id to the correct dropdown
$("#select2-drop").removeAttr("id");
this.dropdown.attr("id", "select2-drop");
// show the elements
mask.show();
this.positionDropdown();
this.dropdown.show();
this.positionDropdown();
this.dropdown.addClass("select2-drop-active");
// attach listeners to events that can change the position of
the container and thus require
// the position of the dropdown to be updated as well so it
does not come unglued from the container
var that = this;
this.container.parents().add(window).each(function () {
$(this).on(resize+" "+scroll+"
"+orient, function (e) {
that.positionDropdown();
});
});
},
// abstract
close: function () {
if (!this.opened()) return;
var cid = this.containerId,
scroll = "scroll." + cid,
resize = "resize."+cid,
orient = "orientationchange."+cid;
// unbind event listeners
this.container.parents().add(window).each(function () {
$(this).off(scroll).off(resize).off(orient); });
this.clearDropdownAlignmentPreference();
$("#select2-drop-mask").hide();
this.dropdown.removeAttr("id"); // only the active
dropdown has the select2-drop id
this.dropdown.hide();
this.container.removeClass("select2-dropdown-open").removeClass("select2-container-active");
this.results.empty();
this.clearSearch();
this.search.removeClass("select2-active");
this.opts.element.trigger($.Event("select2-close"));
},
/**
* Opens control, sets input value, and updates results.
*/
// abstract
externalSearch: function (term) {
this.open();
this.search.val(term);
this.updateResults(false);
},
// abstract
clearSearch: function () {
},
//abstract
getMaximumSelectionSize: function() {
return evaluate(this.opts.maximumSelectionSize);
},
// abstract
ensureHighlightVisible: function () {
var results = this.results, children, index, child, hb, rb, y,
more;
index = this.highlight();
if (index < 0) return;
if (index == 0) {
// if the first element is highlighted scroll all the way
to the top,
// that way any unselectable headers above it will also be
scrolled
// into view
results.scrollTop(0);
return;
}
children =
this.findHighlightableChoices().find('.select2-result-label');
child = $(children[index]);
hb = child.offset().top + child.outerHeight(true);
// if this is the last child lets also make sure
select2-more-results is visible
if (index === children.length - 1) {
more = results.find("li.select2-more-results");
if (more.length > 0) {
hb = more.offset().top + more.outerHeight(true);
}
}
rb = results.offset().top + results.outerHeight(true);
if (hb > rb) {
results.scrollTop(results.scrollTop() + (hb - rb));
}
y = child.offset().top - results.offset().top;
// make sure the top of the element is visible
if (y < 0 && child.css('display') !=
'none' ) {
results.scrollTop(results.scrollTop() + y); // y is
negative
}
},
// abstract
findHighlightableChoices: function() {
return
this.results.find(".select2-result-selectable:not(.select2-disabled)");
},
// abstract
moveHighlight: function (delta) {
var choices = this.findHighlightableChoices(),
index = this.highlight();
while (index > -1 && index < choices.length) {
index += delta;
var choice = $(choices[index]);
if (choice.hasClass("select2-result-selectable")
&& !choice.hasClass("select2-disabled") &&
!choice.hasClass("select2-selected")) {
this.highlight(index);
break;
}
}
},
// abstract
highlight: function (index) {
var choices = this.findHighlightableChoices(),
choice,
data;
if (arguments.length === 0) {
return
indexOf(choices.filter(".select2-highlighted")[0],
choices.get());
}
if (index >= choices.length) index = choices.length - 1;
if (index < 0) index = 0;
this.removeHighlight();
choice = $(choices[index]);
choice.addClass("select2-highlighted");
this.ensureHighlightVisible();
data = choice.data("select2-data");
if (data) {
this.opts.element.trigger({ type:
"select2-highlight", val: this.id(data), choice: data });
}
},
removeHighlight: function() {
this.results.find(".select2-highlighted").removeClass("select2-highlighted");
},
// abstract
countSelectableResults: function() {
return this.findHighlightableChoices().length;
},
// abstract
highlightUnderEvent: function (event) {
var el =
$(event.target).closest(".select2-result-selectable");
if (el.length > 0 &&
!el.is(".select2-highlighted")) {
var choices = this.findHighlightableChoices();
this.highlight(choices.index(el));
} else if (el.length == 0) {
// if we are over an unselectable item remove all
highlights
this.removeHighlight();
}
},
// abstract
loadMoreIfNeeded: function () {
var results = this.results,
more = results.find("li.select2-more-results"),
below, // pixels the element is below the scroll fold,
below==0 is when the element is starting to be visible
offset = -1, // index of first element without data
page = this.resultsPage + 1,
self=this,
term=this.search.val(),
context=this.context;
if (more.length === 0) return;
below = more.offset().top - results.offset().top -
results.height();
if (below <= this.opts.loadMorePadding) {
more.addClass("select2-active");
this.opts.query({
element: this.opts.element,
term: term,
page: page,
context: context,
matcher: this.opts.matcher,
callback: this.bind(function (data) {
// ignore a response if the select2 has been closed
before it was received
if (!self.opened()) return;
self.opts.populateResults.call(this, results,
data.results, {term: term, page: page, context:context});
self.postprocessResults(data, false, false);
if (data.more===true) {
more.detach().appendTo(results).text(self.opts.formatLoadMore(page+1));
window.setTimeout(function() {
self.loadMoreIfNeeded(); }, 10);
} else {
more.remove();
}
self.positionDropdown();
self.resultsPage = page;
self.context = data.context;
this.opts.element.trigger({ type:
"select2-loaded", items: data });
})});
}
},
/**
* Default tokenizer function which does nothing
*/
tokenize: function() {
},
/**
* @param initial whether or not this is the call to this method
right after the dropdown has been opened
*/
// abstract
updateResults: function (initial) {
var search = this.search,
results = this.results,
opts = this.opts,
data,
self = this,
input,
term = search.val(),
lastTerm = $.data(this.container,
"select2-last-term"),
// sequence number used to drop out-of-order responses
queryNumber;
// prevent duplicate queries against the same term
if (initial !== true && lastTerm && equal(term,
lastTerm)) return;
$.data(this.container, "select2-last-term", term);
// if the search is currently hidden we do not alter the
results
if (initial !== true && (this.showSearchInput === false
|| !this.opened())) {
return;
}
function postRender() {
search.removeClass("select2-active");
self.positionDropdown();
}
function render(html) {
results.html(html);
postRender();
}
queryNumber = ++this.queryCount;
var maxSelSize = this.getMaximumSelectionSize();
if (maxSelSize >=1) {
data = this.data();
if ($.isArray(data) && data.length >= maxSelSize
&& checkFormatter(opts.formatSelectionTooBig,
"formatSelectionTooBig")) {
render("<li
class='select2-selection-limit'>" +
opts.formatSelectionTooBig(maxSelSize) + "</li>");
return;
}
}
if (search.val().length < opts.minimumInputLength) {
if (checkFormatter(opts.formatInputTooShort,
"formatInputTooShort")) {
render("<li
class='select2-no-results'>" +
opts.formatInputTooShort(search.val(), opts.minimumInputLength) +
"</li>");
} else {
render("");
}
if (initial && this.showSearch)
this.showSearch(true);
return;
}
if (opts.maximumInputLength && search.val().length >
opts.maximumInputLength) {
if (checkFormatter(opts.formatInputTooLong,
"formatInputTooLong")) {
render("<li
class='select2-no-results'>" +
opts.formatInputTooLong(search.val(), opts.maximumInputLength) +
"</li>");
} else {
render("");
}
return;
}
if (opts.formatSearching &&
this.findHighlightableChoices().length === 0) {
render("<li
class='select2-searching'>" + opts.formatSearching() +
"</li>");
}
search.addClass("select2-active");
this.removeHighlight();
// give the tokenizer a chance to pre-process the input
input = this.tokenize();
if (input != undefined && input != null) {
search.val(input);
}
this.resultsPage = 1;
opts.query({
element: opts.element,
term: search.val(),
page: this.resultsPage,
context: null,
matcher: opts.matcher,
callback: this.bind(function (data) {
var def; // default choice
// ignore old responses
if (queryNumber != this.queryCount) {
return;
}
// ignore a response if the select2 has been closed before
it was received
if (!this.opened()) {
this.search.removeClass("select2-active");
return;
}
// save context, if any
this.context = (data.context===undefined) ? null :
data.context;
// create a default choice and prepend it to the list
if (this.opts.createSearchChoice && search.val()
!== "") {
def = this.opts.createSearchChoice.call(self,
search.val(), data.results);
if (def !== undefined && def !== null
&& self.id(def) !== undefined && self.id(def) !== null) {
if ($(data.results).filter(
function () {
return equal(self.id(this), self.id(def));
}).length === 0) {
data.results.unshift(def);
}
}
}
if (data.results.length === 0 &&
checkFormatter(opts.formatNoMatches, "formatNoMatches")) {
render("<li
class='select2-no-results'>" +
opts.formatNoMatches(search.val()) + "</li>");
return;
}
results.empty();
self.opts.populateResults.call(this, results, data.results,
{term: search.val(), page: this.resultsPage, context:null});
if (data.more === true &&
checkFormatter(opts.formatLoadMore, "formatLoadMore")) {
results.append("<li
class='select2-more-results'>" +
self.opts.escapeMarkup(opts.formatLoadMore(this.resultsPage)) +
"</li>");
window.setTimeout(function() { self.loadMoreIfNeeded();
}, 10);
}
this.postprocessResults(data, initial);
postRender();
this.opts.element.trigger({ type:
"select2-loaded", items: data });
})});
},
// abstract
cancel: function () {
this.close();
},
// abstract
blur: function () {
// if selectOnBlur == true, select the currently highlighted
option
if (this.opts.selectOnBlur)
this.selectHighlighted({noFocus: true});
this.close();
this.container.removeClass("select2-container-active");
// synonymous to .is(':focus'), which is available in
jquery >= 1.6
if (this.search[0] === document.activeElement) {
this.search.blur(); }
this.clearSearch();
this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus");
},
// abstract
focusSearch: function () {
focus(this.search);
},
// abstract
selectHighlighted: function (options) {
var index=this.highlight(),
highlighted=this.results.find(".select2-highlighted"),
data =
highlighted.closest('.select2-result').data("select2-data");
if (data) {
this.highlight(index);
this.onSelect(data, options);
} else if (options && options.noFocus) {
this.close();
}
},
// abstract
getPlaceholder: function () {
var placeholderOption;
return this.opts.element.attr("placeholder") ||
this.opts.element.attr("data-placeholder") || //
jquery 1.4 compat
this.opts.element.data("placeholder") ||
this.opts.placeholder ||
((placeholderOption = this.getPlaceholderOption()) !==
undefined ? placeholderOption.text() : undefined);
},
// abstract
getPlaceholderOption: function() {
if (this.select) {
var firstOption = this.select.children().first();
if (this.opts.placeholderOption !== undefined ) {
//Determine the placeholder option based on the
specified placeholderOption setting
return (this.opts.placeholderOption ===
"first" && firstOption) ||
(typeof this.opts.placeholderOption ===
"function" && this.opts.placeholderOption(this.select));
} else if (firstOption.text() === "" &&
firstOption.val() === "") {
//No explicit placeholder option specified, use the
first if it's blank
return firstOption;
}
}
},
/**
* Get the desired width for the container element. This is
* derived first from option `width` passed to select2, then
* the inline 'style' on the original element, and
finally
* falls back to the jQuery calculated element width.
*/
// abstract
initContainerWidth: function () {
function resolveContainerWidth() {
var style, attrs, matches, i, l;
if (this.opts.width === "off") {
return null;
} else if (this.opts.width === "element"){
return this.opts.element.outerWidth(false) === 0 ?
'auto' : this.opts.element.outerWidth(false) + 'px';
} else if (this.opts.width === "copy" ||
this.opts.width === "resolve") {
// check if there is inline style on the element that
contains width
style = this.opts.element.attr('style');
if (style !== undefined) {
attrs = style.split(';');
for (i = 0, l = attrs.length; i < l; i = i + 1)
{
matches = attrs[i].replace(/\s/g, '')
.match(/[^-]width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i);
if (matches !== null && matches.length
>= 1)
return matches[1];
}
}
if (this.opts.width === "resolve") {
// next check if css('width') can resolve
a width that is percent based, this is sometimes possible
// when attached to input type=hidden or elements
hidden via css
style = this.opts.element.css('width');
if (style.indexOf("%") > 0) return
style;
// finally, fallback on the calculated width of the
element
return (this.opts.element.outerWidth(false) === 0 ?
'auto' : this.opts.element.outerWidth(false) + 'px');
}
return null;
} else if ($.isFunction(this.opts.width)) {
return this.opts.width();
} else {
return this.opts.width;
}
};
var width = resolveContainerWidth.call(this);
if (width !== null) {
this.container.css("width", width);
}
}
});
SingleSelect2 = clazz(AbstractSelect2, {
// single
createContainer: function () {
var container =
$(document.createElement("div")).attr({
"class": "select2-container"
}).html([
"<a href='javascript:void(0)'
onclick='return false;' class='select2-choice'
tabindex='-1'>",
" <span
class='select2-chosen'> </span><abbr
class='select2-search-choice-close'></abbr>",
" <span
class='select2-arrow'><b></b></span>",
"</a>",
"<input class='select2-focusser
select2-offscreen' type='text'/>",
"<div class='select2-drop
select2-display-none'>",
" <div
class='select2-search'>",
" <input type='text'
autocomplete='off' autocorrect='off'
autocapitalize='off' spellcheck='false'
class='select2-input'/>",
" </div>",
" <ul
class='select2-results'>",
" </ul>",
"</div>"].join(""));
return container;
},
// single
enableInterface: function() {
if (this.parent.enableInterface.apply(this, arguments)) {
this.focusser.prop("disabled",
!this.isInterfaceEnabled());
}
},
// single
opening: function () {
var el, range, len;
if (this.opts.minimumResultsForSearch >= 0) {
this.showSearch(true);
}
this.parent.opening.apply(this, arguments);
if (this.showSearchInput !== false) {
// IE appends focusser.val() at the end of field :/ so we
manually insert it at the beginning using a range
// all other browsers handle this just fine
this.search.val(this.focusser.val());
}
this.search.focus();
// move the cursor to the end after focussing, otherwise it
will be at the beginning and
// new text will appear *before* focusser.val()
el = this.search.get(0);
if (el.createTextRange) {
range = el.createTextRange();
range.collapse(false);
range.select();
} else if (el.setSelectionRange) {
len = this.search.val().length;
el.setSelectionRange(len, len);
}
// initializes search's value with nextSearchTerm (if
defined by user)
// ignore nextSearchTerm if the dropdown is opened by the user
pressing a letter
if(this.search.val() === "") {
if(this.nextSearchTerm != undefined){
this.search.val(this.nextSearchTerm);
this.search.select();
}
}
this.focusser.prop("disabled",
true).val("");
this.updateResults(true);
this.opts.element.trigger($.Event("select2-open"));
},
// single
close: function (params) {
if (!this.opened()) return;
this.parent.close.apply(this, arguments);
params = params || {focus: true};
this.focusser.removeAttr("disabled");
if (params.focus) {
this.focusser.focus();
}
},
// single
focus: function () {
if (this.opened()) {
this.close();
} else {
this.focusser.removeAttr("disabled");
this.focusser.focus();
}
},
// single
isFocused: function () {
return
this.container.hasClass("select2-container-active");
},
// single
cancel: function () {
this.parent.cancel.apply(this, arguments);
this.focusser.removeAttr("disabled");
this.focusser.focus();
},
// single
destroy: function() {
$("label[for='" +
this.focusser.attr('id') + "']")
.attr('for',
this.opts.element.attr("id"));
this.parent.destroy.apply(this, arguments);
},
// single
initContainer: function () {
var selection,
container = this.container,
dropdown = this.dropdown;
if (this.opts.minimumResultsForSearch < 0) {
this.showSearch(false);
} else {
this.showSearch(true);
}
this.selection = selection =
container.find(".select2-choice");
this.focusser = container.find(".select2-focusser");
// rewrite labels from original element to focusser
this.focusser.attr("id",
"s2id_autogen"+nextUid());
$("label[for='" +
this.opts.element.attr("id") + "']")
.attr('for', this.focusser.attr('id'));
this.focusser.attr("tabindex", this.elementTabIndex);
this.search.on("keydown", this.bind(function (e) {
if (!this.isInterfaceEnabled()) return;
if (e.which === KEY.PAGE_UP || e.which === KEY.PAGE_DOWN) {
// prevent the page from scrolling
killEvent(e);
return;
}
switch (e.which) {
case KEY.UP:
case KEY.DOWN:
this.moveHighlight((e.which === KEY.UP) ? -1 : 1);
killEvent(e);
return;
case KEY.ENTER:
this.selectHighlighted();
killEvent(e);
return;
case KEY.TAB:
this.selectHighlighted({noFocus: true});
return;
case KEY.ESC:
this.cancel(e);
killEvent(e);
return;
}
}));
this.search.on("blur", this.bind(function(e) {
// a workaround for chrome to keep the search field
focussed when the scroll bar is used to scroll the dropdown.
// without this the search field loses focus which is
annoying
if (document.activeElement === this.body().get(0)) {
window.setTimeout(this.bind(function() {
this.search.focus();
}), 0);
}
}));
this.focusser.on("keydown", this.bind(function (e) {
if (!this.isInterfaceEnabled()) return;
if (e.which === KEY.TAB || KEY.isControl(e) ||
KEY.isFunctionKey(e) || e.which === KEY.ESC) {
return;
}
if (this.opts.openOnEnter === false && e.which ===
KEY.ENTER) {
killEvent(e);
return;
}
if (e.which == KEY.DOWN || e.which == KEY.UP
|| (e.which == KEY.ENTER &&
this.opts.openOnEnter)) {
if (e.altKey || e.ctrlKey || e.shiftKey || e.metaKey)
return;
this.open();
killEvent(e);
return;
}
if (e.which == KEY.DELETE || e.which == KEY.BACKSPACE) {
if (this.opts.allowClear) {
this.clear();
}
killEvent(e);
return;
}
}));
installKeyUpChangeEvent(this.focusser);
this.focusser.on("keyup-change input",
this.bind(function(e) {
if (this.opts.minimumResultsForSearch >= 0) {
e.stopPropagation();
if (this.opened()) return;
this.open();
}
}));
selection.on("mousedown", "abbr",
this.bind(function (e) {
if (!this.isInterfaceEnabled()) return;
this.clear();
killEventImmediately(e);
this.close();
this.selection.focus();
}));
selection.on("mousedown", this.bind(function (e) {
if
(!this.container.hasClass("select2-container-active")) {
this.opts.element.trigger($.Event("select2-focus"));
}
if (this.opened()) {
this.close();
} else if (this.isInterfaceEnabled()) {
this.open();
}
killEvent(e);
}));
dropdown.on("mousedown", this.bind(function() {
this.search.focus(); }));
selection.on("focus", this.bind(function(e) {
killEvent(e);
}));
this.focusser.on("focus", this.bind(function(){
if
(!this.container.hasClass("select2-container-active")) {
this.opts.element.trigger($.Event("select2-focus"));
}
this.container.addClass("select2-container-active");
})).on("blur", this.bind(function() {
if (!this.opened()) {
this.container.removeClass("select2-container-active");
this.opts.element.trigger($.Event("select2-blur"));
}
}));
this.search.on("focus", this.bind(function(){
if
(!this.container.hasClass("select2-container-active")) {
this.opts.element.trigger($.Event("select2-focus"));
}
this.container.addClass("select2-container-active");
}));
this.initContainerWidth();
this.opts.element.addClass("select2-offscreen");
this.setPlaceholder();
},
// single
clear: function(triggerChange) {
var data=this.selection.data("select2-data");
if (data) { // guard against queued quick consecutive clicks
var evt = $.Event("select2-clearing");
this.opts.element.trigger(evt);
if (evt.isDefaultPrevented()) {
return;
}
var placeholderOption = this.getPlaceholderOption();
this.opts.element.val(placeholderOption ?
placeholderOption.val() : "");
this.selection.find(".select2-chosen").empty();
this.selection.removeData("select2-data");
this.setPlaceholder();
if (triggerChange !== false){
this.opts.element.trigger({ type:
"select2-removed", val: this.id(data), choice: data });
this.triggerChange({removed:data});
}
}
},
/**
* Sets selection based on source element's value
*/
// single
initSelection: function () {
var selected;
if (this.isPlaceholderOptionSelected()) {
this.updateSelection(null);
this.close();
this.setPlaceholder();
} else {
var self = this;
this.opts.initSelection.call(null, this.opts.element,
function(selected){
if (selected !== undefined && selected !==
null) {
self.updateSelection(selected);
self.close();
self.setPlaceholder();
}
});
}
},
isPlaceholderOptionSelected: function() {
var placeholderOption;
if (!this.getPlaceholder()) return false; // no placeholder
specified so no option should be considered
return ((placeholderOption = this.getPlaceholderOption()) !==
undefined && placeholderOption.is(':selected'))
|| (this.opts.element.val() === "")
|| (this.opts.element.val() === undefined)
|| (this.opts.element.val() === null);
},
// single
prepareOpts: function () {
var opts = this.parent.prepareOpts.apply(this, arguments),
self=this;
if (opts.element.get(0).tagName.toLowerCase() ===
"select") {
// install the selection initializer
opts.initSelection = function (element, callback) {
var selected = element.find(":selected");
// a single select box always has a value, no need to
null check 'selected'
callback(self.optionToData(selected));
};
} else if ("data" in opts) {
// install default initSelection when applied to hidden
input and data is local
opts.initSelection = opts.initSelection || function
(element, callback) {
var id = element.val();
//search in data by id, storing the actual matching
item
var match = null;
opts.query({
matcher: function(term, text, el){
var is_match = equal(id, opts.id(el));
if (is_match) {
match = el;
}
return is_match;
},
callback: !$.isFunction(callback) ? $.noop :
function() {
callback(match);
}
});
};
}
return opts;
},
// single
getPlaceholder: function() {
// if a placeholder is specified on a single select without a
valid placeholder option ignore it
if (this.select) {
if (this.getPlaceholderOption() === undefined) {
return undefined;
}
}
return this.parent.getPlaceholder.apply(this, arguments);
},
// single
setPlaceholder: function () {
var placeholder = this.getPlaceholder();
if (this.isPlaceholderOptionSelected() && placeholder
!== undefined) {
// check for a placeholder option if attached to a select
if (this.select && this.getPlaceholderOption() ===
undefined) return;
this.selection.find(".select2-chosen").html(this.opts.escapeMarkup(placeholder));
this.selection.addClass("select2-default");
this.container.removeClass("select2-allowclear");
}
},
// single
postprocessResults: function (data, initial, noHighlightUpdate) {
var selected = 0, self = this, showSearchInput = true;
// find the selected element in the result list
this.findHighlightableChoices().each2(function (i, elm) {
if (equal(self.id(elm.data("select2-data")),
self.opts.element.val())) {
selected = i;
return false;
}
});
// and highlight it
if (noHighlightUpdate !== false) {
if (initial === true && selected >= 0) {
this.highlight(selected);
} else {
this.highlight(0);
}
}
// hide the search box if this is the first we got the results
and there are enough of them for search
if (initial === true) {
var min = this.opts.minimumResultsForSearch;
if (min >= 0) {
this.showSearch(countResults(data.results) >= min);
}
}
},
// single
showSearch: function(showSearchInput) {
if (this.showSearchInput === showSearchInput) return;
this.showSearchInput = showSearchInput;
this.dropdown.find(".select2-search").toggleClass("select2-search-hidden",
!showSearchInput);
this.dropdown.find(".select2-search").toggleClass("select2-offscreen",
!showSearchInput);
//add "select2-with-searchbox" to the container if
search box is shown
$(this.dropdown,
this.container).toggleClass("select2-with-searchbox",
showSearchInput);
},
// single
onSelect: function (data, options) {
if (!this.triggerSelect(data)) { return; }
var old = this.opts.element.val(),
oldData = this.data();
this.opts.element.val(this.id(data));
this.updateSelection(data);
this.opts.element.trigger({ type: "select2-selected",
val: this.id(data), choice: data });
this.nextSearchTerm = this.opts.nextSearchTerm(data,
this.search.val());
this.close();
if (!options || !options.noFocus)
this.focusser.focus();
if (!equal(old, this.id(data))) {
this.triggerChange({added:data,removed:oldData}); }
},
// single
updateSelection: function (data) {
var container=this.selection.find(".select2-chosen"),
formatted, cssClass;
this.selection.data("select2-data", data);
container.empty();
if (data !== null) {
formatted=this.opts.formatSelection(data, container,
this.opts.escapeMarkup);
}
if (formatted !== undefined) {
container.append(formatted);
}
cssClass=this.opts.formatSelectionCssClass(data, container);
if (cssClass !== undefined) {
container.addClass(cssClass);
}
this.selection.removeClass("select2-default");
if (this.opts.allowClear && this.getPlaceholder() !==
undefined) {
this.container.addClass("select2-allowclear");
}
},
// single
val: function () {
var val,
triggerChange = false,
data = null,
self = this,
oldData = this.data();
if (arguments.length === 0) {
return this.opts.element.val();
}
val = arguments[0];
if (arguments.length > 1) {
triggerChange = arguments[1];
}
if (this.select) {
this.select
.val(val)
.find(":selected").each2(function (i, elm) {
data = self.optionToData(elm);
return false;
});
this.updateSelection(data);
this.setPlaceholder();
if (triggerChange) {
this.triggerChange({added: data, removed:oldData});
}
} else {
// val is an id. !val is true for
[undefined,null,'',0] - 0 is legal
if (!val && val !== 0) {
this.clear(triggerChange);
return;
}
if (this.opts.initSelection === undefined) {
throw new Error("cannot call val() if
initSelection() is not defined");
}
this.opts.element.val(val);
this.opts.initSelection(this.opts.element, function(data){
self.opts.element.val(!data ? "" :
self.id(data));
self.updateSelection(data);
self.setPlaceholder();
if (triggerChange) {
self.triggerChange({added: data, removed:oldData});
}
});
}
},
// single
clearSearch: function () {
this.search.val("");
this.focusser.val("");
},
// single
data: function(value) {
var data,
triggerChange = false;
if (arguments.length === 0) {
data = this.selection.data("select2-data");
if (data == undefined) data = null;
return data;
} else {
if (arguments.length > 1) {
triggerChange = arguments[1];
}
if (!value) {
this.clear(triggerChange);
} else {
data = this.data();
this.opts.element.val(!value ? "" :
this.id(value));
this.updateSelection(value);
if (triggerChange) {
this.triggerChange({added: value, removed:data});
}
}
}
}
});
MultiSelect2 = clazz(AbstractSelect2, {
// multi
createContainer: function () {
var container =
$(document.createElement("div")).attr({
"class": "select2-container
select2-container-multi"
}).html([
"<ul class='select2-choices'>",
" <li
class='select2-search-field'>",
" <input type='text'
autocomplete='off' autocorrect='off'
autocapitalize='off' spellcheck='false'
class='select2-input'>",
" </li>",
"</ul>",
"<div class='select2-drop select2-drop-multi
select2-display-none'>",
" <ul
class='select2-results'>",
" </ul>",
"</div>"].join(""));
return container;
},
// multi
prepareOpts: function () {
var opts = this.parent.prepareOpts.apply(this, arguments),
self=this;
// TO DO validate placeholder is a string if specified
if (opts.element.get(0).tagName.toLowerCase() ===
"select") {
// install sthe selection initializer
opts.initSelection = function (element, callback) {
var data = [];
element.find(":selected").each2(function (i,
elm) {
data.push(self.optionToData(elm));
});
callback(data);
};
} else if ("data" in opts) {
// install default initSelection when applied to hidden
input and data is local
opts.initSelection = opts.initSelection || function
(element, callback) {
var ids = splitVal(element.val(), opts.separator);
//search in data by array of ids, storing matching
items in a list
var matches = [];
opts.query({
matcher: function(term, text, el){
var is_match = $.grep(ids, function(id) {
return equal(id, opts.id(el));
}).length;
if (is_match) {
matches.push(el);
}
return is_match;
},
callback: !$.isFunction(callback) ? $.noop :
function() {
// reorder matches based on the order they
appear in the ids array because right now
// they are in the order in which they appear
in data array
var ordered = [];
for (var i = 0; i < ids.length; i++) {
var id = ids[i];
for (var j = 0; j < matches.length; j++)
{
var match = matches[j];
if (equal(id, opts.id(match))) {
ordered.push(match);
matches.splice(j, 1);
break;
}
}
}
callback(ordered);
}
});
};
}
return opts;
},
selectChoice: function (choice) {
var selected =
this.container.find(".select2-search-choice-focus");
if (selected.length && choice && choice[0] ==
selected[0]) {
} else {
if (selected.length) {
this.opts.element.trigger("choice-deselected", selected);
}
selected.removeClass("select2-search-choice-focus");
if (choice && choice.length) {
this.close();
choice.addClass("select2-search-choice-focus");
this.opts.element.trigger("choice-selected",
choice);
}
}
},
// multi
destroy: function() {
$("label[for='" +
this.search.attr('id') + "']")
.attr('for',
this.opts.element.attr("id"));
this.parent.destroy.apply(this, arguments);
},
// multi
initContainer: function () {
var selector = ".select2-choices", selection;
this.searchContainer =
this.container.find(".select2-search-field");
this.selection = selection = this.container.find(selector);
var _this = this;
this.selection.on("click",
".select2-search-choice:not(.select2-locked)", function (e) {
//killEvent(e);
_this.search[0].focus();
_this.selectChoice($(this));
});
// rewrite labels from original element to focusser
this.search.attr("id",
"s2id_autogen"+nextUid());
$("label[for='" +
this.opts.element.attr("id") + "']")
.attr('for', this.search.attr('id'));
this.search.on("input paste", this.bind(function() {
if (!this.isInterfaceEnabled()) return;
if (!this.opened()) {
this.open();
}
}));
this.search.attr("tabindex", this.elementTabIndex);
this.keydowns = 0;
this.search.on("keydown", this.bind(function (e) {
if (!this.isInterfaceEnabled()) return;
++this.keydowns;
var selected =
selection.find(".select2-search-choice-focus");
var prev =
selected.prev(".select2-search-choice:not(.select2-locked)");
var next =
selected.next(".select2-search-choice:not(.select2-locked)");
var pos = getCursorInfo(this.search);
if (selected.length &&
(e.which == KEY.LEFT || e.which == KEY.RIGHT || e.which
== KEY.BACKSPACE || e.which == KEY.DELETE || e.which == KEY.ENTER)) {
var selectedChoice = selected;
if (e.which == KEY.LEFT && prev.length) {
selectedChoice = prev;
}
else if (e.which == KEY.RIGHT) {
selectedChoice = next.length ? next : null;
}
else if (e.which === KEY.BACKSPACE) {
this.unselect(selected.first());
this.search.width(10);
selectedChoice = prev.length ? prev : next;
} else if (e.which == KEY.DELETE) {
this.unselect(selected.first());
this.search.width(10);
selectedChoice = next.length ? next : null;
} else if (e.which == KEY.ENTER) {
selectedChoice = null;
}
this.selectChoice(selectedChoice);
killEvent(e);
if (!selectedChoice || !selectedChoice.length) {
this.open();
}
return;
} else if (((e.which === KEY.BACKSPACE &&
this.keydowns == 1)
|| e.which == KEY.LEFT) && (pos.offset == 0
&& !pos.length)) {
this.selectChoice(selection.find(".select2-search-choice:not(.select2-locked)").last());
killEvent(e);
return;
} else {
this.selectChoice(null);
}
if (this.opened()) {
switch (e.which) {
case KEY.UP:
case KEY.DOWN:
this.moveHighlight((e.which === KEY.UP) ? -1 : 1);
killEvent(e);
return;
case KEY.ENTER:
this.selectHighlighted();
killEvent(e);
return;
case KEY.TAB:
this.selectHighlighted({noFocus:true});
this.close();
return;
case KEY.ESC:
this.cancel(e);
killEvent(e);
return;
}
}
if (e.which === KEY.TAB || KEY.isControl(e) ||
KEY.isFunctionKey(e)
|| e.which === KEY.BACKSPACE || e.which === KEY.ESC) {
return;
}
if (e.which === KEY.ENTER) {
if (this.opts.openOnEnter === false) {
return;
} else if (e.altKey || e.ctrlKey || e.shiftKey ||
e.metaKey) {
return;
}
}
this.open();
if (e.which === KEY.PAGE_UP || e.which === KEY.PAGE_DOWN) {
// prevent the page from scrolling
killEvent(e);
}
if (e.which === KEY.ENTER) {
// prevent form from being submitted
killEvent(e);
}
}));
this.search.on("keyup", this.bind(function (e) {
this.keydowns = 0;
this.resizeSearch();
})
);
this.search.on("blur", this.bind(function(e) {
this.container.removeClass("select2-container-active");
this.search.removeClass("select2-focused");
this.selectChoice(null);
if (!this.opened()) this.clearSearch();
e.stopImmediatePropagation();
this.opts.element.trigger($.Event("select2-blur"));
}));
this.container.on("click", selector,
this.bind(function (e) {
if (!this.isInterfaceEnabled()) return;
if
($(e.target).closest(".select2-search-choice").length > 0) {
// clicked inside a select2 search choice, do not open
return;
}
this.selectChoice(null);
this.clearPlaceholder();
if
(!this.container.hasClass("select2-container-active")) {
this.opts.element.trigger($.Event("select2-focus"));
}
this.open();
this.focusSearch();
e.preventDefault();
}));
this.container.on("focus", selector,
this.bind(function () {
if (!this.isInterfaceEnabled()) return;
if
(!this.container.hasClass("select2-container-active")) {
this.opts.element.trigger($.Event("select2-focus"));
}
this.container.addClass("select2-container-active");
this.dropdown.addClass("select2-drop-active");
this.clearPlaceholder();
}));
this.initContainerWidth();
this.opts.element.addClass("select2-offscreen");
// set the placeholder if necessary
this.clearSearch();
},
// multi
enableInterface: function() {
if (this.parent.enableInterface.apply(this, arguments)) {
this.search.prop("disabled",
!this.isInterfaceEnabled());
}
},
// multi
initSelection: function () {
var data;
if (this.opts.element.val() === "" &&
this.opts.element.text() === "") {
this.updateSelection([]);
this.close();
// set the placeholder if necessary
this.clearSearch();
}
if (this.select || this.opts.element.val() !== "") {
var self = this;
this.opts.initSelection.call(null, this.opts.element,
function(data){
if (data !== undefined && data !== null) {
self.updateSelection(data);
self.close();
// set the placeholder if necessary
self.clearSearch();
}
});
}
},
// multi
clearSearch: function () {
var placeholder = this.getPlaceholder(),
maxWidth = this.getMaxSearchWidth();
if (placeholder !== undefined && this.getVal().length
=== 0 && this.search.hasClass("select2-focused") ===
false) {
this.search.val(placeholder).addClass("select2-default");
// stretch the search box to full width of the container so
as much of the placeholder is visible as possible
// we could call this.resizeSearch(), but we do not because
that requires a sizer and we do not want to create one so early because of
a firefox bug, see #944
this.search.width(maxWidth > 0 ? maxWidth :
this.container.css("width"));
} else {
this.search.val("").width(10);
}
},
// multi
clearPlaceholder: function () {
if (this.search.hasClass("select2-default")) {
this.search.val("").removeClass("select2-default");
}
},
// multi
opening: function () {
this.clearPlaceholder(); // should be done before super so
placeholder is not used to search
this.resizeSearch();
this.parent.opening.apply(this, arguments);
this.focusSearch();
this.updateResults(true);
this.search.focus();
this.opts.element.trigger($.Event("select2-open"));
},
// multi
close: function () {
if (!this.opened()) return;
this.parent.close.apply(this, arguments);
},
// multi
focus: function () {
this.close();
this.search.focus();
},
// multi
isFocused: function () {
return this.search.hasClass("select2-focused");
},
// multi
updateSelection: function (data) {
var ids = [], filtered = [], self = this;
// filter out duplicates
$(data).each(function () {
if (indexOf(self.id(this), ids) < 0) {
ids.push(self.id(this));
filtered.push(this);
}
});
data = filtered;
this.selection.find(".select2-search-choice").remove();
$(data).each(function () {
self.addSelectedChoice(this);
});
self.postprocessResults();
},
// multi
tokenize: function() {
var input = this.search.val();
input = this.opts.tokenizer.call(this, input, this.data(),
this.bind(this.onSelect), this.opts);
if (input != null && input != undefined) {
this.search.val(input);
if (input.length > 0) {
this.open();
}
}
},
// multi
onSelect: function (data, options) {
if (!this.triggerSelect(data)) { return; }
this.addSelectedChoice(data);
this.opts.element.trigger({ type: "selected", val:
this.id(data), choice: data });
if (this.select || !this.opts.closeOnSelect)
this.postprocessResults(data, false, this.opts.closeOnSelect===true);
if (this.opts.closeOnSelect) {
this.close();
this.search.width(10);
} else {
if (this.countSelectableResults()>0) {
this.search.width(10);
this.resizeSearch();
if (this.getMaximumSelectionSize() > 0 &&
this.val().length >= this.getMaximumSelectionSize()) {
// if we reached max selection size repaint the
results so choices
// are replaced with the max selection reached
message
this.updateResults(true);
}
this.positionDropdown();
} else {
// if nothing left to select close
this.close();
this.search.width(10);
}
}
// since its not possible to select an element that has already
been
// added we do not need to check if this is a new element
before firing change
this.triggerChange({ added: data });
if (!options || !options.noFocus)
this.focusSearch();
},
// multi
cancel: function () {
this.close();
this.focusSearch();
},
addSelectedChoice: function (data) {
var enableChoice = !data.locked,
enabledItem = $(
"<li
class='select2-search-choice'>" +
" <div></div>" +
" <a href='#' onclick='return
false;' class='select2-search-choice-close'
tabindex='-1'></a>" +
"</li>"),
disabledItem = $(
"<li class='select2-search-choice
select2-locked'>" +
"<div></div>" +
"</li>");
var choice = enableChoice ? enabledItem : disabledItem,
id = this.id(data),
val = this.getVal(),
formatted,
cssClass;
formatted=this.opts.formatSelection(data,
choice.find("div"), this.opts.escapeMarkup);
if (formatted != undefined) {
choice.find("div").replaceWith("<div>"+formatted+"</div>");
}
cssClass=this.opts.formatSelectionCssClass(data,
choice.find("div"));
if (cssClass != undefined) {
choice.addClass(cssClass);
}
if(enableChoice){
choice.find(".select2-search-choice-close")
.on("mousedown", killEvent)
.on("click dblclick", this.bind(function (e) {
if (!this.isInterfaceEnabled()) return;
$(e.target).closest(".select2-search-choice").fadeOut('fast',
this.bind(function(){
this.unselect($(e.target));
this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus");
this.close();
this.focusSearch();
})).dequeue();
killEvent(e);
})).on("focus", this.bind(function () {
if (!this.isInterfaceEnabled()) return;
this.container.addClass("select2-container-active");
this.dropdown.addClass("select2-drop-active");
}));
}
choice.data("select2-data", data);
choice.insertBefore(this.searchContainer);
val.push(id);
this.setVal(val);
},
// multi
unselect: function (selected) {
var val = this.getVal(),
data,
index;
selected =
selected.closest(".select2-search-choice");
if (selected.length === 0) {
throw "Invalid argument: " + selected + ".
Must be .select2-search-choice";
}
data = selected.data("select2-data");
if (!data) {
// prevent a race condition when the 'x' is
clicked really fast repeatedly the event can be queued
// and invoked on an element already removed
return;
}
while((index = indexOf(this.id(data), val)) >= 0) {
val.splice(index, 1);
this.setVal(val);
if (this.select) this.postprocessResults();
}
selected.remove();
this.opts.element.trigger({ type: "removed", val:
this.id(data), choice: data });
this.triggerChange({ removed: data });
},
// multi
postprocessResults: function (data, initial, noHighlightUpdate) {
var val = this.getVal(),
choices = this.results.find(".select2-result"),
compound =
this.results.find(".select2-result-with-children"),
self = this;
choices.each2(function (i, choice) {
var id = self.id(choice.data("select2-data"));
if (indexOf(id, val) >= 0) {
choice.addClass("select2-selected");
// mark all children of the selected parent as selected
choice.find(".select2-result-selectable").addClass("select2-selected");
}
});
compound.each2(function(i, choice) {
// hide an optgroup if it doesnt have any selectable
children
if (!choice.is('.select2-result-selectable')
&&
choice.find(".select2-result-selectable:not(.select2-selected)").length
=== 0) {
choice.addClass("select2-selected");
}
});
if (this.highlight() == -1 && noHighlightUpdate !==
false){
self.highlight(0);
}
//If all results are chosen render formatNoMAtches
if(!this.opts.createSearchChoice &&
!choices.filter('.select2-result:not(.select2-selected)').length
> 0){
if(!data || data && !data.more &&
this.results.find(".select2-no-results").length === 0) {
if (checkFormatter(self.opts.formatNoMatches,
"formatNoMatches")) {
this.results.append("<li
class='select2-no-results'>" +
self.opts.formatNoMatches(self.search.val()) + "</li>");
}
}
}
},
// multi
getMaxSearchWidth: function() {
return this.selection.width() -
getSideBorderPadding(this.search);
},
// multi
resizeSearch: function () {
var minimumWidth, left, maxWidth, containerLeft, searchWidth,
sideBorderPadding = getSideBorderPadding(this.search);
minimumWidth = measureTextWidth(this.search) + 10;
left = this.search.offset().left;
maxWidth = this.selection.width();
containerLeft = this.selection.offset().left;
searchWidth = maxWidth - (left - containerLeft) -
sideBorderPadding;
if (searchWidth < minimumWidth) {
searchWidth = maxWidth - sideBorderPadding;
}
if (searchWidth < 40) {
searchWidth = maxWidth - sideBorderPadding;
}
if (searchWidth <= 0) {
searchWidth = minimumWidth;
}
this.search.width(Math.floor(searchWidth));
},
// multi
getVal: function () {
var val;
if (this.select) {
val = this.select.val();
return val === null ? [] : val;
} else {
val = this.opts.element.val();
return splitVal(val, this.opts.separator);
}
},
// multi
setVal: function (val) {
var unique;
if (this.select) {
this.select.val(val);
} else {
unique = [];
// filter out duplicates
$(val).each(function () {
if (indexOf(this, unique) < 0) unique.push(this);
});
this.opts.element.val(unique.length === 0 ? "" :
unique.join(this.opts.separator));
}
},
// multi
buildChangeDetails: function (old, current) {
var current = current.slice(0),
old = old.slice(0);
// remove intersection from each array
for (var i = 0; i < current.length; i++) {
for (var j = 0; j < old.length; j++) {
if (equal(this.opts.id(current[i]),
this.opts.id(old[j]))) {
current.splice(i, 1);
i--;
old.splice(j, 1);
j--;
}
}
}
return {added: current, removed: old};
},
// multi
val: function (val, triggerChange) {
var oldData, self=this, changeDetails;
if (arguments.length === 0) {
return this.getVal();
}
oldData=this.data();
if (!oldData.length) oldData=[];
// val is an id. !val is true for
[undefined,null,'',0] - 0 is legal
if (!val && val !== 0) {
this.opts.element.val("");
this.updateSelection([]);
this.clearSearch();
if (triggerChange) {
this.triggerChange({added: this.data(), removed:
oldData});
}
return;
}
// val is a list of ids
this.setVal(val);
if (this.select) {
this.opts.initSelection(this.select,
this.bind(this.updateSelection));
if (triggerChange) {
this.triggerChange(this.buildChangeDetails(oldData,
this.data()));
}
} else {
if (this.opts.initSelection === undefined) {
throw new Error("val() cannot be called if
initSelection() is not defined");
}
this.opts.initSelection(this.opts.element, function(data){
var ids=$.map(data, self.id);
self.setVal(ids);
self.updateSelection(data);
self.clearSearch();
if (triggerChange) {
self.triggerChange(self.buildChangeDetails(oldData,
this.data()));
}
});
}
this.clearSearch();
},
// multi
onSortStart: function() {
if (this.select) {
throw new Error("Sorting of elements is not supported
when attached to <select>. Attach to <input
type='hidden'/> instead.");
}
// collapse search field into 0 width so its container can be
collapsed as well
this.search.width(0);
// hide the container
this.searchContainer.hide();
},
// multi
onSortEnd:function() {
var val=[], self=this;
// show search and move it to the end of the list
this.searchContainer.show();
// make sure the search container is the last item in the list
this.searchContainer.appendTo(this.searchContainer.parent());
// since we collapsed the width in dragStarted, we resize it
here
this.resizeSearch();
// update selection
this.selection.find(".select2-search-choice").each(function() {
val.push(self.opts.id($(this).data("select2-data")));
});
this.setVal(val);
this.triggerChange();
},
// multi
data: function(values, triggerChange) {
var self=this, ids, old;
if (arguments.length === 0) {
return this.selection
.find(".select2-search-choice")
.map(function() { return
$(this).data("select2-data"); })
.get();
} else {
old = this.data();
if (!values) { values = []; }
ids = $.map(values, function(e) { return self.opts.id(e);
});
this.setVal(ids);
this.updateSelection(values);
this.clearSearch();
if (triggerChange) {
this.triggerChange(this.buildChangeDetails(old,
this.data()));
}
}
}
});
$.fn.select2 = function () {
var args = Array.prototype.slice.call(arguments, 0),
opts,
select2,
method, value, multiple,
allowedMethods = ["val", "destroy",
"opened", "open", "close", "focus",
"isFocused", "container", "dropdown",
"onSortStart", "onSortEnd", "enable",
"disable", "readonly", "positionDropdown",
"data", "search"],
valueMethods = ["opened", "isFocused",
"container", "dropdown"],
propertyMethods = ["val", "data"],
methodsMap = { search: "externalSearch" };
this.each(function () {
if (args.length === 0 || typeof(args[0]) ===
"object") {
opts = args.length === 0 ? {} : $.extend({}, args[0]);
opts.element = $(this);
if (opts.element.get(0).tagName.toLowerCase() ===
"select") {
multiple = opts.element.prop("multiple");
} else {
multiple = opts.multiple || false;
if ("tags" in opts) {opts.multiple = multiple
= true;}
}
select2 = multiple ? new MultiSelect2() : new
SingleSelect2();
select2.init(opts);
} else if (typeof(args[0]) === "string") {
if (indexOf(args[0], allowedMethods) < 0) {
throw "Unknown method: " + args[0];
}
value = undefined;
select2 = $(this).data("select2");
if (select2 === undefined) return;
method=args[0];
if (method === "container") {
value = select2.container;
} else if (method === "dropdown") {
value = select2.dropdown;
} else {
if (methodsMap[method]) method = methodsMap[method];
value = select2[method].apply(select2, args.slice(1));
}
if (indexOf(args[0], valueMethods) >= 0
|| (indexOf(args[0], propertyMethods) &&
args.length == 1)) {
return false; // abort the iteration, ready to return
first matched value
}
} else {
throw "Invalid arguments to select2 plugin: " +
args;
}
});
return (value === undefined) ? this : value;
};
// plugin defaults, accessible to users
$.fn.select2.defaults = {
width: "copy",
loadMorePadding: 0,
closeOnSelect: true,
openOnEnter: true,
containerCss: {},
dropdownCss: {},
containerCssClass: "",
dropdownCssClass: "",
formatResult: function(result, container, query, escapeMarkup) {
var markup=[];
markMatch(result.text, query.term, markup, escapeMarkup);
return markup.join("");
},
formatSelection: function (data, container, escapeMarkup) {
return data ? escapeMarkup(data.text) : undefined;
},
sortResults: function (results, container, query) {
return results;
},
formatResultCssClass: function(data) {return undefined;},
formatSelectionCssClass: function(data, container) {return
undefined;},
formatNoMatches: function () { return "No matches found";
},
formatInputTooShort: function (input, min) { var n = min -
input.length; return "Please enter " + n + " more
character" + (n == 1? "" : "s"); },
formatInputTooLong: function (input, max) { var n = input.length -
max; return "Please delete " + n + " character" + (n ==
1? "" : "s"); },
formatSelectionTooBig: function (limit) { return "You can only
select " + limit + " item" + (limit == 1 ? "" :
"s"); },
formatLoadMore: function (pageNumber) { return "Loading more
results..."; },
formatSearching: function () { return "Searching..."; },
minimumResultsForSearch: 0,
minimumInputLength: 0,
maximumInputLength: null,
maximumSelectionSize: 0,
id: function (e) { return e.id; },
matcher: function(term, text) {
return
stripDiacritics(''+text).toUpperCase().indexOf(stripDiacritics(''+term).toUpperCase())
>= 0;
},
separator: ",",
tokenSeparators: [],
tokenizer: defaultTokenizer,
escapeMarkup: defaultEscapeMarkup,
blurOnChange: false,
selectOnBlur: false,
adaptContainerCssClass: function(c) { return c; },
adaptDropdownCssClass: function(c) { return null; },
nextSearchTerm: function(selectedObject, currentSearchTerm) {
return undefined; }
};
$.fn.select2.ajaxDefaults = {
transport: $.ajax,
params: {
type: "GET",
cache: false,
dataType: "json"
}
};
// exports
window.Select2 = {
query: {
ajax: ajax,
local: local,
tags: tags
}, util: {
debounce: debounce,
markMatch: markMatch,
escapeMarkup: defaultEscapeMarkup,
stripDiacritics: stripDiacritics
}, "class": {
"abstract": AbstractSelect2,
"single": SingleSelect2,
"multi": MultiSelect2
}
};
}(jQuery));
administrator/select2/select2.png000064400000001145151175232450013042
0ustar00�PNG
IHDR<(����,IDATx����Ka��J���.b]*(Ɉv�d�
�<��P��!Rq�T�СH#�Gy�Rد�����Ht0L�>����9�,m)��y�u�م}�;���)I�J�,���Q(��X��V�&��Oh�F!{n�{���,���%]�אGc��5x>@�3��&���2���%�C��,b�Eu�9=T6�7��)��E��
��"��lo�y[�e��C�Ú
&�� D���m�#����
��QȼŪj
ބ�v@
Te�M���ܽ�;���G9���b��}�1�̟�ǾT��:
�hCf
<t�;LT�A������N+���^@���no-�ۏ/��F�e0aG�3XƏ����1�(����J�B��[�lgp�ْ.?��$8 N����Z4����5�����d^��e0aw!��2nA渫`�r�"�ߍo�F���A�غ�kW
�<�`�.R��~���~�J<���Sp�)�پ:tB���*}2E|�L�����`W�W�1��{!s���-�sZ�[��ضP�o|�}q��IEND�B`�administrator/select2/select2x2.png000064400000001515151175232450013315
0ustar00�PNG
IHDRxPқ��IDATx�흱nA@#A �C�%�\P�'���
��
Q!Au�t����D�+-n\�$����4Z�f�8n�w�+�])������r✃��o���`h��5���='�K�A��8� %7�A��������)�\%!q��&D�O�\
�,{��H.)��^���S��7�=Ȣ�:�du"ր��i�}%E�>ts��"|�ג��P?s�B��Q�5c!�����y�s��g8�"�e-dn���61�~,�Y�Tp�6zCub�
Gp��}�y:�J�@p7���kԣ� �JR
�{Y2��w/�,����u���O�˓Sw�5Z����%}kphhqɱ96�)�\%!q�>�F���8<�aLp�<�e��%,�T%+��@
�@':�� ��&o����`@��s�7��`@0
�C2a"T�j�ҏej�y%a��G�u�~ �
��u
�Z��\7�>G��+W����w��Xx$�V�.�E(<`���Q¶�{�a~(|�sj�F�<\�%k'�K����A�T+y���
^����pO��I>.��
�%�{'�cJ�k�x!x��'?�lK�S�o��Z�_��-� J���.�t��p7�A�L���=[/�A�ደUrwB��!x��J�~�~o�g���S�\E�`�
�AC���5P"��qa���b�l��
��c�P�$#��]�`�Ӓl]pZr�`ӂӒl\p(��I��+%x�`@�1�1&(mW���IEND�B`�barrating/img/index.html000064400000000054151175232450011272
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>barrating/img/star.png000064400000001204151175232450010752
0ustar00�PNG
IHDR0���sBIT|d� pHYs��~�tEXtSoftwareAdobe
Fireworks
CS6輲��IDATX��q�0E�=�'��3.��5����W�ր�݁�]���@��D0�h�qf�g4��w `��v��p��O��Hf�P��d��ԉ>��B%�
�����$W�ZA�8v�@$���*�b��9w|r`J�nG=��<���m�ɮ��o�R�l�'���_�H:D��@u."�[P
�NDL�~��/D���E~`�$���B"��F8:~����X��:h����h̔@>C
3%��!�9��ԍv{����SB̸�\,�
X�H)"%]�UJl�
'U���ià����\% ��x��6�G";)z,�c.}��1Eݘcb>�/�g@vL�
�H���H�IUD�AQ7�|��j싾��Y�O�"���D��j���-括V�0�E~`_��# Df��C��_�~���eR+�Ui�*��E��$_d�2V��Y�Z�b��b�(��8�j�����ߛ�nJ���ӵ�'�E�T�^ޗ�IEND�B`�barrating/img/star.svg000064400000001377151175232450011000
0ustar00<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN'
'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'>
<svg width="24" height="48"
clip-rule="evenodd" fill-rule="evenodd"
image-rendering="optimizeQuality"
shape-rendering="geometricPrecision"
text-rendering="geometricPrecision" version="1.1"
viewBox="0 0 203 406" xml:space="preserve"
xmlns="http://www.w3.org/2000/svg">
<defs>
<style type="text/css">
<![CDATA[
.fil1 {fill:#E3E3E3}
.fil0 {fill:#45A7D4}
]]>
</style>
</defs>
<polygon class="fil0" points="102 203 130 275 203 281
147 331 164 406 102 366 39 406 56 331 0 281 74 275"/>
<polygon class="fil1" points="102 2 129 72 202 78 146
127 163 202 102 161 40 202 57 127 2 78 74 72"/>
</svg>
barrating/img/star@2x.png000064400000002200151175232450011321
0ustar00�PNG
IHDR0`[��psBIT|d� pHYs��~�tEXtSoftwareAdobe
Fireworks
CS6輲��IDATx��1R�H�?��/�*�X�r��
���7�#ho�
�uH�d�l�s��O�j�0��#��VY%J�L�7�{�����P(�2�"T�o�V�,B���f��J�@0|d�{�"�����������.�%�5�T!D�?�z�_�{|W
�4�oٯ�
>+��/ʲL�e��L��
_�4�����>`�wU����eYF@�W@������
���x�'��Oʲ�R��d�d�h�үGy�\����q\�C��^w��<T��.���82�!X�Hq �g�1�X���mT_�6��d��Ѽ$����eyC���vHfl�DD�/�|�逄ӪD+y�$>1�䡧�8��aG/td;Ƀ��;�y0v�a&�.�
$��J�^-�n���#�� ���SW���0�u
�;�K"g&�a�uVgp�_�0�
U�[�ZD2ɀk܄�c�\lY>u�z���DD.,�LtW��g���Ƚ%����/��z�tG�������
)h��� ֿ��Ş��6"W�M�Ƚ�DTW:�;b��*
���q�N�H�R�9��
X\^�oC4֕e�y:U�݁� ��:�/�Y��_���0Y��/ԆF�k����FK�k���j�'�5�Wa��0d���*L~!��r����9{c�i&��|T�|��/�����2����r=
��*�?�B��k� �_h�����X�Ҹ��P�B9l��b~��<�l����B�4�逄ӪD+y�$>1�䡧�8��aG/td;Ƀ��;�y0v�a&�.�
$��J��z}�v�����S��������6�E=�k�u��^�q�J�S�͗k�_���Ӟ�/�Jc~!�v��Vi|o �����Y�������R��_h��g����P!���#糐혭�
H�/��L�
��F$��g��o�M���_hD��g��{Ms~IEND�B`�barrating/img/star@2x.svg000064400000001377151175232450011352
0ustar00<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN'
'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'>
<svg width="48" height="96"
clip-rule="evenodd" fill-rule="evenodd"
image-rendering="optimizeQuality"
shape-rendering="geometricPrecision"
text-rendering="geometricPrecision" version="1.1"
viewBox="0 0 203 406" xml:space="preserve"
xmlns="http://www.w3.org/2000/svg">
<defs>
<style type="text/css">
<![CDATA[
.fil1 {fill:#E3E3E3}
.fil0 {fill:#45A7D4}
]]>
</style>
</defs>
<polygon class="fil0" points="102 203 130 275 203 281
147 331 164 406 102 366 39 406 56 331 0 281 74 275"/>
<polygon class="fil1" points="102 2 129 72 202 78 146
127 163 202 102 161 40 202 57 127 2 78 74 72"/>
</svg>
barrating/index.html000064400000000054151175232450010516
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>barrating/jquery.barrating.js000064400000046474151175232450012366
0ustar00/**
* jQuery Bar Rating Plugin v1.2.2
*
* http://github.com/antennaio/jquery-bar-rating
*
* Copyright (c) 2012-2016 Kazik Pietruszewski
*
* This plugin is available under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
*/
(function (factory) {
if (typeof define === 'function' && define.amd) {
// AMD
define(['jquery'], factory);
} else if (typeof module === 'object' &&
module.exports) {
// Node/CommonJS
module.exports = factory(require('jquery'));
} else {
// browser globals
factory(jQuery);
}
}(function ($) {
var BarRating = (function() {
function BarRating() {
var self = this;
// wrap element in a wrapper div
var wrapElement = function() {
var classes = ['br-wrapper'];
if (self.options.theme !== '') {
classes.push('br-theme-' +
self.options.theme);
}
self.$elem.wrap($('<div />', {
'class': classes.join(' ')
}));
};
// unwrap element
var unwrapElement = function() {
self.$elem.unwrap();
};
// find option by value
var findOption = function(value) {
if ($.isNumeric(value)) {
value = Math.floor(value);
}
return $('option[value="' + value +
'"]', self.$elem);
};
// get initial option
var getInitialOption = function() {
var initialRating = self.options.initialRating;
if (!initialRating) {
return $('option:selected', self.$elem);
}
return findOption(initialRating);
};
// get empty option
var getEmptyOption = function() {
var $emptyOpt =
self.$elem.find('option[value="' + self.options.emptyValue +
'"]');
if (!$emptyOpt.length && self.options.allowEmpty) {
$emptyOpt = $('<option />', {
'value': self.options.emptyValue });
return $emptyOpt.prependTo(self.$elem);
}
return $emptyOpt;
};
// get data
var getData = function(key) {
var data = self.$elem.data('barrating');
if (typeof key !== 'undefined') {
return data[key];
}
return data;
};
// set data
var setData = function(key, value) {
if (value !== null && typeof value ===
'object') {
self.$elem.data('barrating', value);
} else {
self.$elem.data('barrating')[key] = value;
}
};
// save data on element
var saveDataOnElement = function() {
var $opt = getInitialOption();
var $emptyOpt = getEmptyOption();
var value = $opt.val();
var text = $opt.data('html') ?
$opt.data('html') : $opt.text();
// if the allowEmpty option is not set let's check if
empty option exists in the select field
var allowEmpty = (self.options.allowEmpty !== null) ?
self.options.allowEmpty :
!!$emptyOpt.length;
var emptyValue = ($emptyOpt.length) ? $emptyOpt.val() :
null;
var emptyText = ($emptyOpt.length) ? $emptyOpt.text() :
null;
setData(null, {
userOptions: self.options,
// initial rating based on the OPTION value
ratingValue: value,
ratingText: text,
// rating will be restored by calling clear method
originalRatingValue: value,
originalRatingText: text,
// allow empty ratings?
allowEmpty: allowEmpty,
// rating value and text of the empty OPTION
emptyRatingValue: emptyValue,
emptyRatingText: emptyText,
// read-only state
readOnly: self.options.readonly,
// did the user already select a rating?
ratingMade: false
});
};
// remove data on element
var removeDataOnElement = function() {
self.$elem.removeData('barrating');
};
// return current rating text
var ratingText = function() {
return getData('ratingText');
};
// return current rating value
var ratingValue = function() {
return getData('ratingValue');
};
// build widget and return jQuery element
var buildWidget = function() {
var $w = $('<div />', { 'class':
'br-widget' });
// create A elements that will replace OPTIONs
self.$elem.find('option').each(function() {
var val, text, html, $a;
val = $(this).val();
// create ratings - but only if val is not defined as
empty
if (val !== getData('emptyRatingValue')) {
text = $(this).text();
html = $(this).data('html');
if (html) { text = html; }
$a = $('<a />', {
'href': '#',
'data-rating-value': val,
'data-rating-text': text,
'html': (self.options.showValues) ?
text : ''
});
$w.append($a);
}
});
// append .br-current-rating div to the widget
if (self.options.showSelectedRating) {
$w.append($('<div />', {
'text': '', 'class':
'br-current-rating' }));
}
// additional classes for the widget
if (self.options.reverse) {
$w.addClass('br-reverse');
}
if (self.options.readonly) {
$w.addClass('br-readonly');
}
return $w;
};
// return a jQuery function name depending on the
'reverse' setting
var nextAllorPreviousAll = function() {
if (getData('userOptions').reverse) {
return 'nextAll';
} else {
return 'prevAll';
}
};
// set the value of the select field
var setSelectFieldValue = function(value) {
// change selected option
findOption(value).prop('selected', true);
self.$elem.change();
};
// reset select field
var resetSelectField = function() {
$('option',
self.$elem).prop('selected', function() {
return this.defaultSelected;
});
self.$elem.change();
};
// display the currently selected rating
var showSelectedRating = function(text) {
// text undefined?
text = text ? text : ratingText();
// special case when the selected rating is defined as
empty
if (text == getData('emptyRatingText')) {
text = '';
}
// update .br-current-rating div
if (self.options.showSelectedRating) {
self.$elem.parent().find('.br-current-rating').text(text);
}
};
// return rounded fraction of a value (14.4 -> 40, 0.99
-> 90)
var fraction = function(value) {
return Math.round(((Math.floor(value * 10) / 10) % 1) *
100);
};
// remove all classes from elements
var resetStyle = function() {
// remove all classes starting with br-*
self.$widget.find('a').removeClass(function(index, classes) {
return (classes.match(/(^|\s)br-\S+/g) ||
[]).join(' ');
});
};
// apply style by setting classes on elements
var applyStyle = function() {
var $a =
self.$widget.find('a[data-rating-value="' + ratingValue() +
'"]');
var initialRating =
getData('userOptions').initialRating;
var baseValue = $.isNumeric(ratingValue()) ? ratingValue()
: 0;
var f = fraction(initialRating);
var $all, $fractional;
resetStyle();
// add classes
$a.addClass('br-selected
br-current')[nextAllorPreviousAll()]()
.addClass('br-selected');
if (!getData('ratingMade') &&
$.isNumeric(initialRating)) {
if ((initialRating <= baseValue) || !f) {
return;
}
$all = self.$widget.find('a');
$fractional = ($a.length) ?
$a[(getData('userOptions').reverse) ?
'prev' : 'next']() :
$all[(getData('userOptions').reverse) ?
'last' : 'first']();
$fractional.addClass('br-fractional');
$fractional.addClass('br-fractional-' + f);
}
};
// check if the element is deselectable?
var isDeselectable = function($element) {
if (!getData('allowEmpty') ||
!getData('userOptions').deselectable) {
return false;
}
return (ratingValue() ==
$element.attr('data-rating-value'));
};
// handle click events
var attachClickHandler = function($elements) {
$elements.on('click.barrating', function(event) {
var $a = $(this),
options = getData('userOptions'),
value,
text;
event.preventDefault();
value = $a.attr('data-rating-value');
text = $a.attr('data-rating-text');
// is current and deselectable?
if (isDeselectable($a)) {
value = getData('emptyRatingValue');
text = getData('emptyRatingText');
}
// remember selected rating
setData('ratingValue', value);
setData('ratingText', text);
setData('ratingMade', true);
setSelectFieldValue(value);
showSelectedRating(text);
applyStyle();
// onSelect callback
options.onSelect.call(
self,
ratingValue(),
ratingText(),
event
);
return false;
});
};
// handle mouseenter events
var attachMouseEnterHandler = function($elements) {
$elements.on('mouseenter.barrating', function() {
var $a = $(this);
resetStyle();
$a.addClass('br-active')[nextAllorPreviousAll()]()
.addClass('br-active');
showSelectedRating($a.attr('data-rating-text'));
});
};
// handle mouseleave events
var attachMouseLeaveHandler = function($elements) {
self.$widget.on('mouseleave.barrating
blur.barrating', function() {
showSelectedRating();
applyStyle();
});
};
// somewhat primitive way to remove 300ms click delay on touch
devices
// for a more advanced solution consider setting `fastClicks`
option to false
// and using a library such as fastclick
(https://github.com/ftlabs/fastclick)
var fastClicks = function($elements) {
$elements.on('touchstart.barrating',
function(event) {
event.preventDefault();
event.stopPropagation();
$(this).click();
});
};
// disable clicks
var disableClicks = function($elements) {
$elements.on('click.barrating', function(event) {
event.preventDefault();
});
};
var attachHandlers = function($elements) {
// attach click event handler
attachClickHandler($elements);
if (self.options.hoverState) {
// attach mouseenter event handler
attachMouseEnterHandler($elements);
// attach mouseleave event handler
attachMouseLeaveHandler($elements);
}
};
var detachHandlers = function($elements) {
// remove event handlers in the ".barrating"
namespace
$elements.off('.barrating');
};
var setupHandlers = function(readonly) {
var $elements = self.$widget.find('a');
if (fastClicks) {
fastClicks($elements);
}
if (readonly) {
detachHandlers($elements);
disableClicks($elements);
} else {
attachHandlers($elements);
}
};
this.show = function() {
// run only once
if (getData()) return;
// wrap element
wrapElement();
// save data
saveDataOnElement();
// build & append widget to the DOM
self.$widget = buildWidget();
self.$widget.insertAfter(self.$elem);
applyStyle();
showSelectedRating();
setupHandlers(self.options.readonly);
// hide the select field
self.$elem.hide();
};
this.readonly = function(state) {
if (typeof state !== 'boolean' ||
getData('readOnly') == state) return;
setupHandlers(state);
setData('readOnly', state);
self.$widget.toggleClass('br-readonly');
};
this.set = function(value) {
var options = getData('userOptions');
if (self.$elem.find('option[value="' + value
+ '"]').length === 0) return;
// set data
setData('ratingValue', value);
setData('ratingText',
self.$elem.find('option[value="' + value +
'"]').text());
setData('ratingMade', true);
setSelectFieldValue(ratingValue());
showSelectedRating(ratingText());
applyStyle();
// onSelect callback
if (!options.silent) {
options.onSelect.call(
this,
ratingValue(),
ratingText()
);
}
};
this.clear = function() {
var options = getData('userOptions');
// restore original data
setData('ratingValue',
getData('originalRatingValue'));
setData('ratingText',
getData('originalRatingText'));
setData('ratingMade', false);
resetSelectField();
showSelectedRating(ratingText());
applyStyle();
// onClear callback
options.onClear.call(
this,
ratingValue(),
ratingText()
);
};
this.destroy = function() {
var value = ratingValue();
var text = ratingText();
var options = getData('userOptions');
// detach handlers
detachHandlers(self.$widget.find('a'));
// remove widget
self.$widget.remove();
// remove data
removeDataOnElement();
// unwrap the element
unwrapElement();
// show the element
self.$elem.show();
// onDestroy callback
options.onDestroy.call(
this,
value,
text
);
};
}
BarRating.prototype.init = function (options, elem) {
this.$elem = $(elem);
this.options = $.extend({}, $.fn.barrating.defaults, options);
return this.options;
};
return BarRating;
})();
$.fn.barrating = function (method, options) {
return this.each(function () {
var plugin = new BarRating();
// plugin works with select fields
if (!$(this).is('select')) {
$.error('Sorry, this plugin only works with select
fields.');
}
// method supplied
if (plugin.hasOwnProperty(method)) {
plugin.init(options, this);
if (method === 'show') {
return plugin.show(options);
} else {
// plugin exists?
if (plugin.$elem.data('barrating')) {
plugin.$widget =
$(this).next('.br-widget');
return plugin[method](options);
}
}
// no method supplied or only options supplied
} else if (typeof method === 'object' || !method) {
options = method;
plugin.init(options, this);
return plugin.show();
} else {
$.error('Method ' + method + ' does not
exist on jQuery.barrating');
}
});
};
$.fn.barrating.defaults = {
theme:'',
initialRating:null, // initial rating
allowEmpty:null, // allow empty ratings?
emptyValue:'', // this is the expected value of the empty
rating
showValues:false, // display rating values on the bars?
showSelectedRating:true, // append a div with a rating to the
widget?
deselectable:true, // allow to deselect ratings?
reverse:false, // reverse the rating?
readonly:false, // make the rating ready-only?
fastClicks:true, // remove 300ms click delay on touch devices?
hoverState:true, // change state on hover?
silent:false, // supress callbacks when controlling ratings
programatically
onSelect:function (value, text, event) {
}, // callback fired when a rating is selected
onClear:function (value, text) {
}, // callback fired when a rating is cleared
onDestroy:function (value, text) {
} // callback fired when a widget is destroyed
};
$.fn.barrating.BarRating = BarRating;
}));
barrating/jquery.barrating.min.js000064400000013046151175232450013135
0ustar00!function(t){"function"==typeof
define&&define.amd?define(["jquery"],t):"object"==typeof
module&&module.exports?module.exports=t(require("jquery")):t(jQuery)}(function(t){var
e=function(){function e(){var e=this,n=function(){var
n=["br-wrapper"];""!==e.options.theme&&n.push("br-theme-"+e.options.theme),e.$elem.wrap(t("<div
/>",{"class":n.join("
")}))},i=function(){e.$elem.unwrap()},a=function(n){return
t.isNumeric(n)&&(n=Math.floor(n)),t('option[value="'+n+'"]',e.$elem)},r=function(){var
n=e.options.initialRating;return
n?a(n):t("option:selected",e.$elem)},o=function(){var
n=e.$elem.find('option[value="'+e.options.emptyValue+'"]');return!n.length&&e.options.allowEmpty?(n=t("<option
/>",{value:e.options.emptyValue}),n.prependTo(e.$elem)):n},l=function(t){var
n=e.$elem.data("barrating");return"undefined"!=typeof
t?n[t]:n},s=function(t,n){null!==n&&"object"==typeof
n?e.$elem.data("barrating",n):e.$elem.data("barrating")[t]=n},u=function(){var
t=r(),n=o(),i=t.val(),a=t.data("html")?t.data("html"):t.text(),l=null!==e.options.allowEmpty?e.options.allowEmpty:!!n.length,u=n.length?n.val():null,d=n.length?n.text():null;s(null,{userOptions:e.options,ratingValue:i,ratingText:a,originalRatingValue:i,originalRatingText:a,allowEmpty:l,emptyRatingValue:u,emptyRatingText:d,readOnly:e.options.readonly,ratingMade:!1})},d=function(){e.$elem.removeData("barrating")},c=function(){return
l("ratingText")},f=function(){return
l("ratingValue")},g=function(){var n=t("<div
/>",{"class":"br-widget"});return
e.$elem.find("option").each(function(){var
i,a,r,o;i=t(this).val(),i!==l("emptyRatingValue")&&(a=t(this).text(),r=t(this).data("html"),r&&(a=r),o=t("<a
/>",{href:"#","data-rating-value":i,"data-rating-text":a,html:e.options.showValues?a:""}),n.append(o))}),e.options.showSelectedRating&&n.append(t("<div
/>",{text:"","class":"br-current-rating"})),e.options.reverse&&n.addClass("br-reverse"),e.options.readonly&&n.addClass("br-readonly"),n},p=function(){return
l("userOptions").reverse?"nextAll":"prevAll"},h=function(t){a(t).prop("selected",!0),e.$elem.change()},m=function(){t("option",e.$elem).prop("selected",function(){return
this.defaultSelected}),e.$elem.change()},v=function(t){t=t?t:c(),t==l("emptyRatingText")&&(t=""),e.options.showSelectedRating&&e.$elem.parent().find(".br-current-rating").text(t)},y=function(t){return
Math.round(Math.floor(10*t)/10%1*100)},b=function(){e.$widget.find("a").removeClass(function(t,e){return(e.match(/(^|\s)br-\S+/g)||[]).join("
")})},w=function(){var
n,i,a=e.$widget.find('a[data-rating-value="'+f()+'"]'),r=l("userOptions").initialRating,o=t.isNumeric(f())?f():0,s=y(r);if(b(),a.addClass("br-selected
br-current")[p()]().addClass("br-selected"),!l("ratingMade")&&t.isNumeric(r)){if(o>=r||!s)return;n=e.$widget.find("a"),i=a.length?a[l("userOptions").reverse?"prev":"next"]():n[l("userOptions").reverse?"last":"first"](),i.addClass("br-fractional"),i.addClass("br-fractional-"+s)}},$=function(t){return
l("allowEmpty")&&l("userOptions").deselectable?f()==t.attr("data-rating-value"):!1},x=function(n){n.on("click.barrating",function(n){var
i,a,r=t(this),o=l("userOptions");return
n.preventDefault(),i=r.attr("data-rating-value"),a=r.attr("data-rating-text"),$(r)&&(i=l("emptyRatingValue"),a=l("emptyRatingText")),s("ratingValue",i),s("ratingText",a),s("ratingMade",!0),h(i),v(a),w(),o.onSelect.call(e,f(),c(),n),!1})},R=function(e){e.on("mouseenter.barrating",function(){var
e=t(this);b(),e.addClass("br-active")[p()]().addClass("br-active"),v(e.attr("data-rating-text"))})},V=function(t){e.$widget.on("mouseleave.barrating
blur.barrating",function(){v(),w()})},O=function(e){e.on("touchstart.barrating",function(e){e.preventDefault(),e.stopPropagation(),t(this).click()})},C=function(t){t.on("click.barrating",function(t){t.preventDefault()})},S=function(t){x(t),e.options.hoverState&&(R(t),V(t))},T=function(t){t.off(".barrating")},j=function(t){var
n=e.$widget.find("a");O&&O(n),t?(T(n),C(n)):S(n)};this.show=function(){l()||(n(),u(),e.$widget=g(),e.$widget.insertAfter(e.$elem),w(),v(),j(e.options.readonly),e.$elem.hide())},this.readonly=function(t){"boolean"==typeof
t&&l("readOnly")!=t&&(j(t),s("readOnly",t),e.$widget.toggleClass("br-readonly"))},this.set=function(t){var
n=l("userOptions");0!==e.$elem.find('option[value="'+t+'"]').length&&(s("ratingValue",t),s("ratingText",e.$elem.find('option[value="'+t+'"]').text()),s("ratingMade",!0),h(f()),v(c()),w(),n.silent||n.onSelect.call(this,f(),c()))},this.clear=function(){var
t=l("userOptions");s("ratingValue",l("originalRatingValue")),s("ratingText",l("originalRatingText")),s("ratingMade",!1),m(),v(c()),w(),t.onClear.call(this,f(),c())},this.destroy=function(){var
t=f(),n=c(),a=l("userOptions");T(e.$widget.find("a")),e.$widget.remove(),d(),i(),e.$elem.show(),a.onDestroy.call(this,t,n)}}return
e.prototype.init=function(e,n){return
this.$elem=t(n),this.options=t.extend({},t.fn.barrating.defaults,e),this.options},e}();t.fn.barrating=function(n,i){return
this.each(function(){var a=new
e;if(t(this).is("select")||t.error("Sorry, this plugin only
works with select
fields."),a.hasOwnProperty(n)){if(a.init(i,this),"show"===n)return
a.show(i);if(a.$elem.data("barrating"))return
a.$widget=t(this).next(".br-widget"),a[n](i)}else{if("object"==typeof
n||!n)return i=n,a.init(i,this),a.show();t.error("Method
"+n+" does not exist on
jQuery.barrating")}})},t.fn.barrating.defaults={theme:"",initialRating:null,allowEmpty:null,emptyValue:"",showValues:!1,showSelectedRating:!0,deselectable:!0,reverse:!1,readonly:!1,fastClicks:!0,hoverState:!0,silent:!1,onSelect:function(t,e,n){},onClear:function(t,e){},onDestroy:function(t,e){}},t.fn.barrating.BarRating=e});barrating/themes/css-stars.css000064400000003043151175232450012443
0ustar00/*.br-theme-css-stars .br-widget {
height: 40px;
white-space: nowrap;
margin-top: -15px;
}
.br-theme-css-stars .br-widget a {
text-decoration: none;
height: 30px;
width: 30px;
float: left;
font-size: 35px;
margin-right: 0px;
}
.br-theme-css-stars .br-widget a:after {
content: "\2605";
color: #d2d2d2;
}
.br-theme-css-stars .br-widget a.br-active:after {
color: #45A7D4;
}
.br-theme-css-stars .br-widget a.br-selected:after {
color: #45A7D4;
}
.br-theme-css-stars .br-widget .br-current-rating {
display: none;
}
.br-theme-css-stars .br-readonly a {
cursor: default;
}
@media print {
.br-theme-css-stars .br-widget a:after {
content: "\2606";
color: black;
}
.br-theme-css-stars .br-widget a.br-active:after,
.br-theme-css-stars .br-widget a.br-selected:after {
content: "\2605";
color: black;
}
}*/
/* Backward compatibility with templates*/
.ph-rating .br-widget {
height: 24px;
}
.ph-rating .br-widget a {
/*background: url('../img/star.png');*/
background: url(../img/star.svg);
width: 24px;
height: 24px;
display: block;
float: left;
}
.ph-rating .br-widget a:hover,
.ph-rating .br-widget a.br-active,
.ph-rating .br-widget a.br-selected {
background-position: 0 24px;
}
@media
only screen and (-webkit-min-device-pixel-ratio: 1.5),
only screen and (min-device-pixel-ratio : 1.5),
(min-resolution: 192dpi) {
.ph-rating .br-widget a {
/*background: url('../img/star@2x.png');*/
background: url('../img/star@2x.svg');
background-size: 24px 48px;
}
}
barrating/themes/index.html000064400000000054151175232450012003
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>base64/base64.js000064400000005671151175232450007270
0ustar00/**
*
* Base64 encode / decode
* http://www.webtoolkit.info/
*
**/
var Base64 = {
// private property
_keyStr :
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
// public method for encoding
encode : function (input) {
var output = "";
var chr1, chr2, chr3, enc1, enc2, enc3, enc4;
var i = 0;
input = Base64._utf8_encode(input);
while (i < input.length) {
chr1 = input.charCodeAt(i++);
chr2 = input.charCodeAt(i++);
chr3 = input.charCodeAt(i++);
enc1 = chr1 >> 2;
enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
enc4 = chr3 & 63;
if (isNaN(chr2)) {
enc3 = enc4 = 64;
} else if (isNaN(chr3)) {
enc4 = 64;
}
output = output +
this._keyStr.charAt(enc1) + this._keyStr.charAt(enc2) +
this._keyStr.charAt(enc3) + this._keyStr.charAt(enc4);
}
return output;
},
// public method for decoding
decode : function (input) {
var output = "";
var chr1, chr2, chr3;
var enc1, enc2, enc3, enc4;
var i = 0;
input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
while (i < input.length) {
enc1 = this._keyStr.indexOf(input.charAt(i++));
enc2 = this._keyStr.indexOf(input.charAt(i++));
enc3 = this._keyStr.indexOf(input.charAt(i++));
enc4 = this._keyStr.indexOf(input.charAt(i++));
chr1 = (enc1 << 2) | (enc2 >> 4);
chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
chr3 = ((enc3 & 3) << 6) | enc4;
output = output + String.fromCharCode(chr1);
if (enc3 != 64) {
output = output + String.fromCharCode(chr2);
}
if (enc4 != 64) {
output = output + String.fromCharCode(chr3);
}
}
output = Base64._utf8_decode(output);
return output;
},
// private method for UTF-8 encoding
_utf8_encode : function (string) {
string = string.replace(/\r\n/g,"\n");
var utftext = "";
for (var n = 0; n < string.length; n++) {
var c = string.charCodeAt(n);
if (c < 128) {
utftext += String.fromCharCode(c);
}
else if((c > 127) && (c < 2048)) {
utftext += String.fromCharCode((c >> 6) | 192);
utftext += String.fromCharCode((c & 63) | 128);
}
else {
utftext += String.fromCharCode((c >> 12) | 224);
utftext += String.fromCharCode(((c >> 6) & 63) | 128);
utftext += String.fromCharCode((c & 63) | 128);
}
}
return utftext;
},
// private method for UTF-8 decoding
_utf8_decode : function (utftext) {
var string = "";
var i = 0;
var c = c1 = c2 = 0;
while ( i < utftext.length ) {
c = utftext.charCodeAt(i);
if (c < 128) {
string += String.fromCharCode(c);
i++;
}
else if((c > 191) && (c < 224)) {
c2 = utftext.charCodeAt(i+1);
string += String.fromCharCode(((c & 31) << 6) | (c2 &
63));
i += 2;
}
else {
c2 = utftext.charCodeAt(i+1);
c3 = utftext.charCodeAt(i+2);
string += String.fromCharCode(((c & 15) << 12) | ((c2 &
63) << 6) | (c3 & 63));
i += 3;
}
}
return string;
}
}base64/base64.min.js000064400000002655151175232450010051 0ustar00var
Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(r){var
t,e,o,a,h,c,n,d="",C=0;for(r=Base64._utf8_encode(r);C<r.length;)a=(t=r.charCodeAt(C++))>>2,h=(3&t)<<4|(e=r.charCodeAt(C++))>>4,c=(15&e)<<2|(o=r.charCodeAt(C++))>>6,n=63&o,isNaN(e)?c=n=64:isNaN(o)&&(n=64),d=d+this._keyStr.charAt(a)+this._keyStr.charAt(h)+this._keyStr.charAt(c)+this._keyStr.charAt(n);return
d},decode:function(r){var
t,e,o,a,h,c,n="",d=0;for(r=r.replace(/[^A-Za-z0-9\+\/\=]/g,"");d<r.length;)t=this._keyStr.indexOf(r.charAt(d++))<<2|(a=this._keyStr.indexOf(r.charAt(d++)))>>4,e=(15&a)<<4|(h=this._keyStr.indexOf(r.charAt(d++)))>>2,o=(3&h)<<6|(c=this._keyStr.indexOf(r.charAt(d++))),n+=String.fromCharCode(t),64!=h&&(n+=String.fromCharCode(e)),64!=c&&(n+=String.fromCharCode(o));return
n=Base64._utf8_decode(n)},_utf8_encode:function(r){r=r.replace(/\r\n/g,"\n");for(var
t="",e=0;e<r.length;e++){var
o=r.charCodeAt(e);o<128?t+=String.fromCharCode(o):(127<o&&o<2048?t+=String.fromCharCode(o>>6|192):(t+=String.fromCharCode(o>>12|224),t+=String.fromCharCode(o>>6&63|128)),t+=String.fromCharCode(63&o|128))}return
t},_utf8_decode:function(r){for(var
t="",e=0,o=c1=c2=0;e<r.length;)(o=r.charCodeAt(e))<128?(t+=String.fromCharCode(o),e++):191<o&&o<224?(c2=r.charCodeAt(e+1),t+=String.fromCharCode((31&o)<<6|63&c2),e+=2):(c2=r.charCodeAt(e+1),c3=r.charCodeAt(e+2),t+=String.fromCharCode((15&o)<<12|(63&c2)<<6|63&c3),e+=3);return
t}};base64/index.html000064400000000054151175232450007631
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>chartjs/Chart.min.js000064400000557675151175232450010421
0ustar00!function(a){if("object"==typeof
exports&&"undefined"!=typeof
module)module.exports=a();else if("function"==typeof
define&&define.amd)define([],a);else{var
b;b="undefined"!=typeof
window?window:"undefined"!=typeof
global?global:"undefined"!=typeof
self?self:this,b.Chart=a()}}(function(){var a;return function
a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var
i="function"==typeof
require&&require;if(!h&&i)return i(g,!0);if(f)return
f(g,!0);var j=new Error("Cannot find module
'"+g+"'");throw
j.code="MODULE_NOT_FOUND",j}var
k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var
c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return
c[g].exports}for(var f="function"==typeof
require&&require,g=0;g<d.length;g++)e(d[g]);return
e}({1:[function(a,b,c){function e(a){if(a){var
b=/^#([a-fA-F0-9]{3})$/,c=/^#([a-fA-F0-9]{6})$/,e=/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/,f=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/,g=/(\w+)/,h=[0,0,0],i=1,j=a.match(b);if(j){j=j[1];for(var
k=0;k<h.length;k++)h[k]=parseInt(j[k]+j[k],16)}else
if(j=a.match(c)){j=j[1];for(var
k=0;k<h.length;k++)h[k]=parseInt(j.slice(2*k,2*k+2),16)}else
if(j=a.match(e)){for(var
k=0;k<h.length;k++)h[k]=parseInt(j[k+1]);i=parseFloat(j[4])}else
if(j=a.match(f)){for(var
k=0;k<h.length;k++)h[k]=Math.round(2.55*parseFloat(j[k+1]));i=parseFloat(j[4])}else
if(j=a.match(g)){if("transparent"==j[1])return[0,0,0,0];if(h=d[j[1]],!h)return}for(var
k=0;k<h.length;k++)h[k]=t(h[k],0,255);return
i=i||0==i?t(i,0,1):1,h[3]=i,h}}function f(a){if(a){var
b=/^hsla?\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/,c=a.match(b);if(c){var
d=parseFloat(c[4]),e=t(parseInt(c[1]),0,360),f=t(parseFloat(c[2]),0,100),g=t(parseFloat(c[3]),0,100),h=t(isNaN(d)?1:d,0,1);return[e,f,g,h]}}}function
g(a){if(a){var
b=/^hwb\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/,c=a.match(b);if(c){var
d=parseFloat(c[4]),e=t(parseInt(c[1]),0,360),f=t(parseFloat(c[2]),0,100),g=t(parseFloat(c[3]),0,100),h=t(isNaN(d)?1:d,0,1);return[e,f,g,h]}}}function
h(a){var b=e(a);return b&&b.slice(0,3)}function i(a){var
b=f(a);return b&&b.slice(0,3)}function j(a){var b=e(a);return
b?b[3]:(b=f(a))?b[3]:(b=g(a))?b[3]:void 0}function
k(a){return"#"+u(a[0])+u(a[1])+u(a[2])}function l(a,b){return
b<1||a[3]&&a[3]<1?m(a,b):"rgb("+a[0]+",
"+a[1]+", "+a[2]+")"}function m(a,b){return void
0===b&&(b=void 0!==a[3]?a[3]:1),"rgba("+a[0]+",
"+a[1]+", "+a[2]+", "+b+")"}function
n(a,b){if(b<1||a[3]&&a[3]<1)return o(a,b);var
c=Math.round(a[0]/255*100),d=Math.round(a[1]/255*100),e=Math.round(a[2]/255*100);return"rgb("+c+"%,
"+d+"%, "+e+"%)"}function o(a,b){var
c=Math.round(a[0]/255*100),d=Math.round(a[1]/255*100),e=Math.round(a[2]/255*100);return"rgba("+c+"%,
"+d+"%, "+e+"%,
"+(b||a[3]||1)+")"}function p(a,b){return
b<1||a[3]&&a[3]<1?q(a,b):"hsl("+a[0]+",
"+a[1]+"%, "+a[2]+"%)"}function q(a,b){return void
0===b&&(b=void 0!==a[3]?a[3]:1),"hsla("+a[0]+",
"+a[1]+"%, "+a[2]+"%, "+b+")"}function
r(a,b){return void 0===b&&(b=void
0!==a[3]?a[3]:1),"hwb("+a[0]+", "+a[1]+"%,
"+a[2]+"%"+(void 0!==b&&1!==b?",
"+b:"")+")"}function s(a){return
v[a.slice(0,3)]}function t(a,b,c){return Math.min(Math.max(b,a),c)}function
u(a){var b=a.toString(16).toUpperCase();return
b.length<2?"0"+b:b}var
d=a(5);b.exports={getRgba:e,getHsla:f,getRgb:h,getHsl:i,getHwb:g,getAlpha:j,hexString:k,rgbString:l,rgbaString:m,percentString:n,percentaString:o,hslString:p,hslaString:q,hwbString:r,keyword:s};var
v={};for(var w in d)v[d[w]]=w},{5:5}],2:[function(a,b,c){var
d=a(4),e=a(1),f=function(a){if(a instanceof f)return a;if(!(this instanceof
f))return new
f(a);this.values={rgb:[0,0,0],hsl:[0,0,0],hsv:[0,0,0],hwb:[0,0,0],cmyk:[0,0,0,0],alpha:1};var
b;if("string"==typeof
a)if(b=e.getRgba(a))this.setValues("rgb",b);else
if(b=e.getHsla(a))this.setValues("hsl",b);else{if(!(b=e.getHwb(a)))throw
new Error('Unable to parse color from string
"'+a+'"');this.setValues("hwb",b)}else
if("object"==typeof a)if(b=a,void 0!==b.r||void
0!==b.red)this.setValues("rgb",b);else if(void 0!==b.l||void
0!==b.lightness)this.setValues("hsl",b);else if(void
0!==b.v||void 0!==b.value)this.setValues("hsv",b);else if(void
0!==b.w||void
0!==b.whiteness)this.setValues("hwb",b);else{if(void
0===b.c&&void 0===b.cyan)throw new Error("Unable to parse
color from object
"+JSON.stringify(a));this.setValues("cmyk",b)}};f.prototype={rgb:function(){return
this.setSpace("rgb",arguments)},hsl:function(){return
this.setSpace("hsl",arguments)},hsv:function(){return
this.setSpace("hsv",arguments)},hwb:function(){return
this.setSpace("hwb",arguments)},cmyk:function(){return
this.setSpace("cmyk",arguments)},rgbArray:function(){return
this.values.rgb},hslArray:function(){return
this.values.hsl},hsvArray:function(){return
this.values.hsv},hwbArray:function(){var a=this.values;return
1!==a.alpha?a.hwb.concat([a.alpha]):a.hwb},cmykArray:function(){return
this.values.cmyk},rgbaArray:function(){var a=this.values;return
a.rgb.concat([a.alpha])},hslaArray:function(){var a=this.values;return
a.hsl.concat([a.alpha])},alpha:function(a){return void
0===a?this.values.alpha:(this.setValues("alpha",a),this)},red:function(a){return
this.setChannel("rgb",0,a)},green:function(a){return
this.setChannel("rgb",1,a)},blue:function(a){return
this.setChannel("rgb",2,a)},hue:function(a){return
a&&(a%=360,a=a<0?360+a:a),this.setChannel("hsl",0,a)},saturation:function(a){return
this.setChannel("hsl",1,a)},lightness:function(a){return
this.setChannel("hsl",2,a)},saturationv:function(a){return
this.setChannel("hsv",1,a)},whiteness:function(a){return
this.setChannel("hwb",1,a)},blackness:function(a){return
this.setChannel("hwb",2,a)},value:function(a){return
this.setChannel("hsv",2,a)},cyan:function(a){return
this.setChannel("cmyk",0,a)},magenta:function(a){return
this.setChannel("cmyk",1,a)},yellow:function(a){return
this.setChannel("cmyk",2,a)},black:function(a){return
this.setChannel("cmyk",3,a)},hexString:function(){return
e.hexString(this.values.rgb)},rgbString:function(){return
e.rgbString(this.values.rgb,this.values.alpha)},rgbaString:function(){return
e.rgbaString(this.values.rgb,this.values.alpha)},percentString:function(){return
e.percentString(this.values.rgb,this.values.alpha)},hslString:function(){return
e.hslString(this.values.hsl,this.values.alpha)},hslaString:function(){return
e.hslaString(this.values.hsl,this.values.alpha)},hwbString:function(){return
e.hwbString(this.values.hwb,this.values.alpha)},keyword:function(){return
e.keyword(this.values.rgb,this.values.alpha)},rgbNumber:function(){var
a=this.values.rgb;return
a[0]<<16|a[1]<<8|a[2]},luminosity:function(){for(var
a=this.values.rgb,b=[],c=0;c<a.length;c++){var
d=a[c]/255;b[c]=d<=.03928?d/12.92:Math.pow((d+.055)/1.055,2.4)}return.2126*b[0]+.7152*b[1]+.0722*b[2]},contrast:function(a){var
b=this.luminosity(),c=a.luminosity();return
b>c?(b+.05)/(c+.05):(c+.05)/(b+.05)},level:function(a){var
b=this.contrast(a);return
b>=7.1?"AAA":b>=4.5?"AA":""},dark:function(){var
a=this.values.rgb,b=(299*a[0]+587*a[1]+114*a[2])/1e3;return
b<128},light:function(){return!this.dark()},negate:function(){for(var
a=[],b=0;b<3;b++)a[b]=255-this.values.rgb[b];return
this.setValues("rgb",a),this},lighten:function(a){var
b=this.values.hsl;return
b[2]+=b[2]*a,this.setValues("hsl",b),this},darken:function(a){var
b=this.values.hsl;return
b[2]-=b[2]*a,this.setValues("hsl",b),this},saturate:function(a){var
b=this.values.hsl;return
b[1]+=b[1]*a,this.setValues("hsl",b),this},desaturate:function(a){var
b=this.values.hsl;return
b[1]-=b[1]*a,this.setValues("hsl",b),this},whiten:function(a){var
b=this.values.hwb;return
b[1]+=b[1]*a,this.setValues("hwb",b),this},blacken:function(a){var
b=this.values.hwb;return
b[2]+=b[2]*a,this.setValues("hwb",b),this},greyscale:function(){var
a=this.values.rgb,b=.3*a[0]+.59*a[1]+.11*a[2];return
this.setValues("rgb",[b,b,b]),this},clearer:function(a){var
b=this.values.alpha;return
this.setValues("alpha",b-b*a),this},opaquer:function(a){var
b=this.values.alpha;return
this.setValues("alpha",b+b*a),this},rotate:function(a){var
b=this.values.hsl,c=(b[0]+a)%360;return
b[0]=c<0?360+c:c,this.setValues("hsl",b),this},mix:function(a,b){var
c=this,d=a,e=void
0===b?.5:b,f=2*e-1,g=c.alpha()-d.alpha(),h=((f*g===-1?f:(f+g)/(1+f*g))+1)/2,i=1-h;return
this.rgb(h*c.red()+i*d.red(),h*c.green()+i*d.green(),h*c.blue()+i*d.blue()).alpha(c.alpha()*e+d.alpha()*(1-e))},toJSON:function(){return
this.rgb()},clone:function(){var d,e,a=new
f,b=this.values,c=a.values;for(var g in
b)b.hasOwnProperty(g)&&(d=b[g],e={}.toString.call(d),"[object
Array]"===e?c[g]=d.slice(0):"[object
Number]"===e?c[g]=d:console.error("unexpected color
value:",d));return
a}},f.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},f.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},f.prototype.getValues=function(a){for(var
b=this.values,c={},d=0;d<a.length;d++)c[a.charAt(d)]=b[a][d];return
1!==b.alpha&&(c.a=b.alpha),c},f.prototype.setValues=function(a,b){var
h,c=this.values,e=this.spaces,f=this.maxes,g=1;if("alpha"===a)g=b;else
if(b.length)c[a]=b.slice(0,a.length),g=b[a.length];else if(void
0!==b[a.charAt(0)]){for(h=0;h<a.length;h++)c[a][h]=b[a.charAt(h)];g=b.a}else
if(void 0!==b[e[a][0]]){var
i=e[a];for(h=0;h<a.length;h++)c[a][h]=b[i[h]];g=b.alpha}if(c.alpha=Math.max(0,Math.min(1,void
0===g?c.alpha:g)),"alpha"===a)return!1;var
j;for(h=0;h<a.length;h++)j=Math.max(0,Math.min(f[a][h],c[a][h])),c[a][h]=Math.round(j);for(var
k in
e)k!==a&&(c[k]=d[a][k](c[a]));return!0},f.prototype.setSpace=function(a,b){var
c=b[0];return void 0===c?this.getValues(a):("number"==typeof
c&&(c=Array.prototype.slice.call(b)),this.setValues(a,c),this)},f.prototype.setChannel=function(a,b,c){var
d=this.values[a];return void
0===c?d[b]:c===d[b]?this:(d[b]=c,this.setValues(a,d),this)},"undefined"!=typeof
window&&(window.Color=f),b.exports=f},{1:1,4:4}],3:[function(a,c,d){function
e(a){var
h,i,j,b=a[0]/255,c=a[1]/255,d=a[2]/255,e=Math.min(b,c,d),f=Math.max(b,c,d),g=f-e;return
f==e?h=0:b==f?h=(c-d)/g:c==f?h=2+(d-b)/g:d==f&&(h=4+(b-c)/g),h=Math.min(60*h,360),h<0&&(h+=360),j=(e+f)/2,i=f==e?0:j<=.5?g/(f+e):g/(2-f-e),[h,100*i,100*j]}function
f(a){var
h,i,j,b=a[0],c=a[1],d=a[2],e=Math.min(b,c,d),f=Math.max(b,c,d),g=f-e;return
i=0==f?0:g/f*1e3/10,f==e?h=0:b==f?h=(c-d)/g:c==f?h=2+(d-b)/g:d==f&&(h=4+(b-c)/g),h=Math.min(60*h,360),h<0&&(h+=360),j=f/255*1e3/10,[h,i,j]}function
h(a){var
b=a[0],c=a[1],d=a[2],f=e(a)[0],g=1/255*Math.min(b,Math.min(c,d)),d=1-1/255*Math.max(b,Math.max(c,d));return[f,100*g,100*d]}function
i(a){var e,f,g,h,b=a[0]/255,c=a[1]/255,d=a[2]/255;return
h=Math.min(1-b,1-c,1-d),e=(1-b-h)/(1-h)||0,f=(1-c-h)/(1-h)||0,g=(1-d-h)/(1-h)||0,[100*e,100*f,100*g,100*h]}function
j(a){return Z[JSON.stringify(a)]}function k(a){var
b=a[0]/255,c=a[1]/255,d=a[2]/255;b=b>.04045?Math.pow((b+.055)/1.055,2.4):b/12.92,c=c>.04045?Math.pow((c+.055)/1.055,2.4):c/12.92,d=d>.04045?Math.pow((d+.055)/1.055,2.4):d/12.92;var
e=.4124*b+.3576*c+.1805*d,f=.2126*b+.7152*c+.0722*d,g=.0193*b+.1192*c+.9505*d;return[100*e,100*f,100*g]}function
l(a){var f,g,h,b=k(a),c=b[0],d=b[1],e=b[2];return
c/=95.047,d/=100,e/=108.883,c=c>.008856?Math.pow(c,1/3):7.787*c+16/116,d=d>.008856?Math.pow(d,1/3):7.787*d+16/116,e=e>.008856?Math.pow(e,1/3):7.787*e+16/116,f=116*d-16,g=500*(c-d),h=200*(d-e),[f,g,h]}function
m(a){return M(l(a))}function n(a){var
e,f,g,h,i,b=a[0]/360,c=a[1]/100,d=a[2]/100;if(0==c)return
i=255*d,[i,i,i];f=d<.5?d*(1+c):d+c-d*c,e=2*d-f,h=[0,0,0];for(var
j=0;j<3;j++)g=b+1/3*-(j-1),g<0&&g++,g>1&&g--,i=6*g<1?e+6*(f-e)*g:2*g<1?f:3*g<2?e+(f-e)*(2/3-g)*6:e,h[j]=255*i;return
h}function o(a){var e,f,b=a[0],c=a[1]/100,d=a[2]/100;return
0===d?[0,0,0]:(d*=2,c*=d<=1?d:2-d,f=(d+c)/2,e=2*c/(d+c),[b,100*e,100*f])}function
p(a){return h(n(a))}function q(a){return i(n(a))}function s(a){return
j(n(a))}function t(a){var
b=a[0]/60,c=a[1]/100,d=a[2]/100,e=Math.floor(b)%6,f=b-Math.floor(b),g=255*d*(1-c),h=255*d*(1-c*f),i=255*d*(1-c*(1-f)),d=255*d;switch(e){case
0:return[d,i,g];case 1:return[h,d,g];case 2:return[g,d,i];case
3:return[g,h,d];case 4:return[i,g,d];case 5:return[d,g,h]}}function
u(a){var e,f,b=a[0],c=a[1]/100,d=a[2]/100;return
f=(2-c)*d,e=c*d,e/=f<=1?f:2-f,e=e||0,f/=2,[b,100*e,100*f]}function
v(a){return h(t(a))}function w(a){return i(t(a))}function x(a){return
j(t(a))}function y(a){var
h,i,j,k,c=a[0]/360,d=a[1]/100,e=a[2]/100,f=d+e;switch(f>1&&(d/=f,e/=f),h=Math.floor(6*c),i=1-e,j=6*c-h,0!=(1&h)&&(j=1-j),k=d+j*(i-d),h){default:case
6:case 0:r=i,g=k,b=d;break;case 1:r=k,g=i,b=d;break;case
2:r=d,g=i,b=k;break;case 3:r=d,g=k,b=i;break;case 4:r=k,g=d,b=i;break;case
5:r=i,g=d,b=k}return[255*r,255*g,255*b]}function z(a){return
e(y(a))}function A(a){return f(y(a))}function B(a){return i(y(a))}function
C(a){return j(y(a))}function D(a){var
f,g,h,b=a[0]/100,c=a[1]/100,d=a[2]/100,e=a[3]/100;return
f=1-Math.min(1,b*(1-e)+e),g=1-Math.min(1,c*(1-e)+e),h=1-Math.min(1,d*(1-e)+e),[255*f,255*g,255*h]}function
E(a){return e(D(a))}function F(a){return f(D(a))}function G(a){return
h(D(a))}function H(a){return j(D(a))}function I(a){var
e,f,g,b=a[0]/100,c=a[1]/100,d=a[2]/100;return
e=3.2406*b+c*-1.5372+d*-.4986,f=b*-.9689+1.8758*c+.0415*d,g=.0557*b+c*-.204+1.057*d,e=e>.0031308?1.055*Math.pow(e,1/2.4)-.055:e=12.92*e,f=f>.0031308?1.055*Math.pow(f,1/2.4)-.055:f=12.92*f,g=g>.0031308?1.055*Math.pow(g,1/2.4)-.055:g=12.92*g,e=Math.min(Math.max(0,e),1),f=Math.min(Math.max(0,f),1),g=Math.min(Math.max(0,g),1),[255*e,255*f,255*g]}function
J(a){var e,f,g,b=a[0],c=a[1],d=a[2];return
b/=95.047,c/=100,d/=108.883,b=b>.008856?Math.pow(b,1/3):7.787*b+16/116,c=c>.008856?Math.pow(c,1/3):7.787*c+16/116,d=d>.008856?Math.pow(d,1/3):7.787*d+16/116,e=116*c-16,f=500*(b-c),g=200*(c-d),[e,f,g]}function
K(a){return M(J(a))}function L(a){var e,f,g,h,b=a[0],c=a[1],d=a[2];return
b<=8?(f=100*b/903.3,h=7.787*(f/100)+16/116):(f=100*Math.pow((b+16)/116,3),h=Math.pow(f/100,1/3)),e=e/95.047<=.008856?e=95.047*(c/500+h-16/116)/7.787:95.047*Math.pow(c/500+h,3),g=g/108.883<=.008859?g=108.883*(h-d/200-16/116)/7.787:108.883*Math.pow(h-d/200,3),[e,f,g]}function
M(a){var e,f,g,b=a[0],c=a[1],d=a[2];return
e=Math.atan2(d,c),f=360*e/2/Math.PI,f<0&&(f+=360),g=Math.sqrt(c*c+d*d),[b,g,f]}function
N(a){return I(L(a))}function O(a){var e,f,g,b=a[0],c=a[1],d=a[2];return
g=d/360*2*Math.PI,e=c*Math.cos(g),f=c*Math.sin(g),[b,e,f]}function
P(a){return L(O(a))}function Q(a){return N(O(a))}function R(a){return
Y[a]}function S(a){return e(R(a))}function T(a){return f(R(a))}function
U(a){return h(R(a))}function V(a){return i(R(a))}function W(a){return
l(R(a))}function X(a){return
k(R(a))}c.exports={rgb2hsl:e,rgb2hsv:f,rgb2hwb:h,rgb2cmyk:i,rgb2keyword:j,rgb2xyz:k,rgb2lab:l,rgb2lch:m,hsl2rgb:n,hsl2hsv:o,hsl2hwb:p,hsl2cmyk:q,hsl2keyword:s,hsv2rgb:t,hsv2hsl:u,hsv2hwb:v,hsv2cmyk:w,hsv2keyword:x,hwb2rgb:y,hwb2hsl:z,hwb2hsv:A,hwb2cmyk:B,hwb2keyword:C,cmyk2rgb:D,cmyk2hsl:E,cmyk2hsv:F,cmyk2hwb:G,cmyk2keyword:H,keyword2rgb:R,keyword2hsl:S,keyword2hsv:T,keyword2hwb:U,keyword2cmyk:V,keyword2lab:W,keyword2xyz:X,xyz2rgb:I,xyz2lab:J,xyz2lch:K,lab2xyz:L,lab2rgb:N,lab2lch:M,lch2lab:O,lch2xyz:P,lch2rgb:Q};var
Y={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},Z={};for(var
$ in Y)Z[JSON.stringify(Y[$])]=$},{}],4:[function(a,b,c){var
d=a(3),e=function(){return new j};for(var f in
d){e[f+"Raw"]=function(a){return
function(b){return"number"==typeof
b&&(b=Array.prototype.slice.call(arguments)),d[a](b)}}(f);var
g=/(\w+)2(\w+)/.exec(f),h=g[1],i=g[2];e[h]=e[h]||{},e[h][i]=e[f]=function(a){return
function(b){"number"==typeof
b&&(b=Array.prototype.slice.call(arguments));var
c=d[a](b);if("string"==typeof c||void 0===c)return c;for(var
e=0;e<c.length;e++)c[e]=Math.round(c[e]);return c}}(f)}var
j=function(){this.convs={}};j.prototype.routeSpace=function(a,b){var
c=b[0];return void 0===c?this.getValues(a):("number"==typeof
c&&(c=Array.prototype.slice.call(b)),this.setValues(a,c))},j.prototype.setValues=function(a,b){return
this.space=a,this.convs={},this.convs[a]=b,this},j.prototype.getValues=function(a){var
b=this.convs[a];if(!b){var
c=this.space,d=this.convs[c];b=e[c][a](d),this.convs[a]=b}return
b},["rgb","hsl","hsv","cmyk","keyword"].forEach(function(a){j.prototype[a]=function(b){return
this.routeSpace(a,arguments)}}),b.exports=e},{3:3}],5:[function(a,b,c){b.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},{}],6:[function(b,c,d){!function(b,e){"object"==typeof
d&&"undefined"!=typeof
c?c.exports=e():"function"==typeof
a&&a.amd?a(e):b.moment=e()}(this,function(){"use
strict";function d(){return a.apply(null,arguments)}function
e(b){a=b}function f(a){return a instanceof Array||"[object
Array]"===Object.prototype.toString.call(a)}function
g(a){return"[object
Object]"===Object.prototype.toString.call(a)}function h(a){var b;for(b
in a)return!1;return!0}function i(a){return a instanceof
Date||"[object
Date]"===Object.prototype.toString.call(a)}function j(a,b){var
d,c=[];for(d=0;d<a.length;++d)c.push(b(a[d],d));return c}function
k(a,b){return Object.prototype.hasOwnProperty.call(a,b)}function
l(a,b){for(var c in b)k(b,c)&&(a[c]=b[c]);return
k(b,"toString")&&(a.toString=b.toString),k(b,"valueOf")&&(a.valueOf=b.valueOf),a}function
m(a,b,c,d){return Jc(a,b,c,d,!0).utc()}function
n(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null}}function
o(a){return null==a._pf&&(a._pf=n()),a._pf}function
q(a){if(null==a._isValid){var
b=o(a),c=p.call(b.parsedDateParts,function(a){return
null!=a});a._isValid=!isNaN(a._d.getTime())&&b.overflow<0&&!b.empty&&!b.invalidMonth&&!b.invalidWeekday&&!b.nullInput&&!b.invalidFormat&&!b.userInvalidated&&(!b.meridiem||b.meridiem&&c),a._strict&&(a._isValid=a._isValid&&0===b.charsLeftOver&&0===b.unusedTokens.length&&void
0===b.bigHour)}return a._isValid}function r(a){var b=m(NaN);return
null!=a?l(o(b),a):o(b).userInvalidated=!0,b}function s(a){return void
0===a}function u(a,b){var
c,d,e;if(s(b._isAMomentObject)||(a._isAMomentObject=b._isAMomentObject),s(b._i)||(a._i=b._i),s(b._f)||(a._f=b._f),s(b._l)||(a._l=b._l),s(b._strict)||(a._strict=b._strict),s(b._tzm)||(a._tzm=b._tzm),s(b._isUTC)||(a._isUTC=b._isUTC),s(b._offset)||(a._offset=b._offset),s(b._pf)||(a._pf=o(b)),s(b._locale)||(a._locale=b._locale),t.length>0)for(c
in t)d=t[c],e=b[d],s(e)||(a[d]=e);return a}function
w(a){u(this,a),this._d=new
Date(null!=a._d?a._d.getTime():NaN),v===!1&&(v=!0,d.updateOffset(this),v=!1)}function
x(a){return a instanceof
w||null!=a&&null!=a._isAMomentObject}function y(a){return
a<0?Math.ceil(a)||0:Math.floor(a)}function z(a){var b=+a,c=0;return
0!==b&&isFinite(b)&&(c=y(b)),c}function A(a,b,c){var
g,d=Math.min(a.length,b.length),e=Math.abs(a.length-b.length),f=0;for(g=0;g<d;g++)(c&&a[g]!==b[g]||!c&&z(a[g])!==z(b[g]))&&f++;return
f+e}function
B(a){d.suppressDeprecationWarnings===!1&&"undefined"!=typeof
console&&console.warn&&console.warn("Deprecation
warning: "+a)}function C(a,b){var c=!0;return l(function(){return
null!=d.deprecationHandler&&d.deprecationHandler(null,a),c&&(B(a+"\nArguments:
"+Array.prototype.slice.call(arguments).join(",
")+"\n"+(new
Error).stack),c=!1),b.apply(this,arguments)},b)}function
E(a,b){null!=d.deprecationHandler&&d.deprecationHandler(a,b),D[a]||(B(b),D[a]=!0)}function
F(a){return a instanceof Function||"[object
Function]"===Object.prototype.toString.call(a)}function G(a){var
b,c;for(c in
a)b=a[c],F(b)?this[c]=b:this["_"+c]=b;this._config=a,this._ordinalParseLenient=new
RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)}function
H(a,b){var d,c=l({},a);for(d in
b)k(b,d)&&(g(a[d])&&g(b[d])?(c[d]={},l(c[d],a[d]),l(c[d],b[d])):null!=b[d]?c[d]=b[d]:delete
c[d]);for(d in
a)k(a,d)&&!k(b,d)&&g(a[d])&&(c[d]=l({},c[d]));return
c}function I(a){null!=a&&this.set(a)}function L(a,b,c){var
d=this._calendar[a]||this._calendar.sameElse;return
F(d)?d.call(b,c):d}function N(a){var
b=this._longDateFormat[a],c=this._longDateFormat[a.toUpperCase()];return
b||!c?b:(this._longDateFormat[a]=c.replace(/MMMM|MM|DD|dddd/g,function(a){return
a.slice(1)}),this._longDateFormat[a])}function P(){return
this._invalidDate}function S(a){return
this._ordinal.replace("%d",a)}function U(a,b,c,d){var
e=this._relativeTime[c];return F(e)?e(a,b,c,d):e.replace(/%d/i,a)}function
V(a,b){var
c=this._relativeTime[a>0?"future":"past"];return
F(c)?c(b):c.replace(/%s/i,b)}function X(a,b){var
c=a.toLowerCase();W[c]=W[c+"s"]=W[b]=a}function
Y(a){return"string"==typeof a?W[a]||W[a.toLowerCase()]:void
0}function Z(a){var c,d,b={};for(d in
a)k(a,d)&&(c=Y(d),c&&(b[c]=a[d]));return b}function
_(a,b){$[a]=b}function aa(a){var b=[];for(var c in
a)b.push({unit:c,priority:$[c]});return b.sort(function(a,b){return
a.priority-b.priority}),b}function ba(a,b){return function(c){return
null!=c?(da(this,a,c),d.updateOffset(this,b),this):ca(this,a)}}function
ca(a,b){return
a.isValid()?a._d["get"+(a._isUTC?"UTC":"")+b]():NaN}function
da(a,b,c){a.isValid()&&a._d["set"+(a._isUTC?"UTC":"")+b](c)}function
ea(a){return a=Y(a),F(this[a])?this[a]():this}function
fa(a,b){if("object"==typeof a){a=Z(a);for(var
c=aa(a),d=0;d<c.length;d++)this[c[d].unit](a[c[d].unit])}else
if(a=Y(a),F(this[a]))return this[a](b);return this}function ga(a,b,c){var
d=""+Math.abs(a),e=b-d.length,f=a>=0;return(f?c?"+":"":"-")+Math.pow(10,Math.max(0,e)).toString().substr(1)+d}function
la(a,b,c,d){var e=d;"string"==typeof
d&&(e=function(){return
this[d]()}),a&&(ka[a]=e),b&&(ka[b[0]]=function(){return
ga(e.apply(this,arguments),b[1],b[2])}),c&&(ka[c]=function(){return
this.localeData().ordinal(e.apply(this,arguments),a)})}function
ma(a){return
a.match(/\[[\s\S]/)?a.replace(/^\[|\]$/g,""):a.replace(/\\/g,"")}function
na(a){var
c,d,b=a.match(ha);for(c=0,d=b.length;c<d;c++)ka[b[c]]?b[c]=ka[b[c]]:b[c]=ma(b[c]);return
function(c){var f,e="";for(f=0;f<d;f++)e+=b[f]instanceof
Function?b[f].call(c,a):b[f];return e}}function oa(a,b){return
a.isValid()?(b=pa(b,a.localeData()),ja[b]=ja[b]||na(b),ja[b](a)):a.localeData().invalidDate()}function
pa(a,b){function d(a){return b.longDateFormat(a)||a}var
c=5;for(ia.lastIndex=0;c>=0&&ia.test(a);)a=a.replace(ia,d),ia.lastIndex=0,c-=1;return
a}function Ia(a,b,c){Ha[a]=F(b)?b:function(a,d){return
a&&c?c:b}}function Ja(a,b){return
k(Ha,a)?Ha[a](b._strict,b._locale):new RegExp(Ka(a))}function Ka(a){return
La(a.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(a,b,c,d,e){return
b||c||d||e}))}function La(a){return
a.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function
Na(a,b){var c,d=b;for("string"==typeof
a&&(a=[a]),"number"==typeof
b&&(d=function(a,c){c[b]=z(a)}),c=0;c<a.length;c++)Ma[a[c]]=d}function
Oa(a,b){Na(a,function(a,c,d,e){d._w=d._w||{},b(a,d._w,d,e)})}function
Pa(a,b,c){null!=b&&k(Ma,a)&&Ma[a](b,c._a,c,a)}function
$a(a,b){return new Date(Date.UTC(a,b+1,0)).getUTCDate()}function
bb(a,b){return
f(this._months)?this._months[a.month()]:this._months[(this._months.isFormat||_a).test(b)?"format":"standalone"][a.month()]}function
db(a,b){return
f(this._monthsShort)?this._monthsShort[a.month()]:this._monthsShort[_a.test(b)?"format":"standalone"][a.month()]}function
eb(a,b,c){var
d,e,f,g=a.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],d=0;d<12;++d)f=m([2e3,d]),this._shortMonthsParse[d]=this.monthsShort(f,"").toLocaleLowerCase(),this._longMonthsParse[d]=this.months(f,"").toLocaleLowerCase();return
c?"MMM"===b?(e=Za.call(this._shortMonthsParse,g),e!==-1?e:null):(e=Za.call(this._longMonthsParse,g),e!==-1?e:null):"MMM"===b?(e=Za.call(this._shortMonthsParse,g),e!==-1?e:(e=Za.call(this._longMonthsParse,g),e!==-1?e:null)):(e=Za.call(this._longMonthsParse,g),e!==-1?e:(e=Za.call(this._shortMonthsParse,g),e!==-1?e:null))}function
fb(a,b,c){var d,e,f;if(this._monthsParseExact)return
eb.call(this,a,b,c);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),d=0;d<12;d++){if(e=m([2e3,d]),c&&!this._longMonthsParse[d]&&(this._longMonthsParse[d]=new
RegExp("^"+this.months(e,"").replace(".","")+"$","i"),this._shortMonthsParse[d]=new
RegExp("^"+this.monthsShort(e,"").replace(".","")+"$","i")),c||this._monthsParse[d]||(f="^"+this.months(e,"")+"|^"+this.monthsShort(e,""),this._monthsParse[d]=new
RegExp(f.replace(".",""),"i")),c&&"MMMM"===b&&this._longMonthsParse[d].test(a))return
d;if(c&&"MMM"===b&&this._shortMonthsParse[d].test(a))return
d;if(!c&&this._monthsParse[d].test(a))return d}}function
gb(a,b){var c;if(!a.isValid())return a;if("string"==typeof
b)if(/^\d+$/.test(b))b=z(b);else
if(b=a.localeData().monthsParse(b),"number"!=typeof b)return
a;return
c=Math.min(a.date(),$a(a.year(),b)),a._d["set"+(a._isUTC?"UTC":"")+"Month"](b,c),a}function
hb(a){return
null!=a?(gb(this,a),d.updateOffset(this,!0),this):ca(this,"Month")}function
ib(){return $a(this.year(),this.month())}function kb(a){return
this._monthsParseExact?(k(this,"_monthsRegex")||nb.call(this),a?this._monthsShortStrictRegex:this._monthsShortRegex):(k(this,"_monthsShortRegex")||(this._monthsShortRegex=jb),
this._monthsShortStrictRegex&&a?this._monthsShortStrictRegex:this._monthsShortRegex)}function
mb(a){return
this._monthsParseExact?(k(this,"_monthsRegex")||nb.call(this),a?this._monthsStrictRegex:this._monthsRegex):(k(this,"_monthsRegex")||(this._monthsRegex=lb),this._monthsStrictRegex&&a?this._monthsStrictRegex:this._monthsRegex)}function
nb(){function a(a,b){return b.length-a.length}var
e,f,b=[],c=[],d=[];for(e=0;e<12;e++)f=m([2e3,e]),b.push(this.monthsShort(f,"")),c.push(this.months(f,"")),d.push(this.months(f,"")),d.push(this.monthsShort(f,""));for(b.sort(a),c.sort(a),d.sort(a),e=0;e<12;e++)b[e]=La(b[e]),c[e]=La(c[e]);for(e=0;e<24;e++)d[e]=La(d[e]);this._monthsRegex=new
RegExp("^("+d.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new
RegExp("^("+c.join("|")+")","i"),this._monthsShortStrictRegex=new
RegExp("^("+b.join("|")+")","i")}function
ob(a){return pb(a)?366:365}function pb(a){return
a%4===0&&a%100!==0||a%400===0}function rb(){return
pb(this.year())}function sb(a,b,c,d,e,f,g){var h=new
Date(a,b,c,d,e,f,g);return
a<100&&a>=0&&isFinite(h.getFullYear())&&h.setFullYear(a),h}function
tb(a){var b=new Date(Date.UTC.apply(null,arguments));return
a<100&&a>=0&&isFinite(b.getUTCFullYear())&&b.setUTCFullYear(a),b}function
ub(a,b,c){var d=7+b-c,e=(7+tb(a,0,d).getUTCDay()-b)%7;return-e+d-1}function
vb(a,b,c,d,e){var i,j,f=(7+c-d)%7,g=ub(a,d,e),h=1+7*(b-1)+f+g;return
h<=0?(i=a-1,j=ob(i)+h):h>ob(a)?(i=a+1,j=h-ob(a)):(i=a,j=h),{year:i,dayOfYear:j}}function
wb(a,b,c){var
f,g,d=ub(a.year(),b,c),e=Math.floor((a.dayOfYear()-d-1)/7)+1;return
e<1?(g=a.year()-1,f=e+xb(g,b,c)):e>xb(a.year(),b,c)?(f=e-xb(a.year(),b,c),g=a.year()+1):(g=a.year(),f=e),{week:f,year:g}}function
xb(a,b,c){var d=ub(a,b,c),e=ub(a+1,b,c);return(ob(a)-d+e)/7}function
yb(a){return wb(a,this._week.dow,this._week.doy).week}function Ab(){return
this._week.dow}function Bb(){return this._week.doy}function Cb(a){var
b=this.localeData().week(this);return
null==a?b:this.add(7*(a-b),"d")}function Db(a){var
b=wb(this,1,4).week;return
null==a?b:this.add(7*(a-b),"d")}function
Eb(a,b){return"string"!=typeof
a?a:isNaN(a)?(a=b.weekdaysParse(a),"number"==typeof
a?a:null):parseInt(a,10)}function Fb(a,b){return"string"==typeof
a?b.weekdaysParse(a)%7||7:isNaN(a)?null:a}function Hb(a,b){return
f(this._weekdays)?this._weekdays[a.day()]:this._weekdays[this._weekdays.isFormat.test(b)?"format":"standalone"][a.day()]}function
Jb(a){return this._weekdaysShort[a.day()]}function Lb(a){return
this._weekdaysMin[a.day()]}function Mb(a,b,c){var
d,e,f,g=a.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],d=0;d<7;++d)f=m([2e3,1]).day(d),this._minWeekdaysParse[d]=this.weekdaysMin(f,"").toLocaleLowerCase(),this._shortWeekdaysParse[d]=this.weekdaysShort(f,"").toLocaleLowerCase(),this._weekdaysParse[d]=this.weekdays(f,"").toLocaleLowerCase();return
c?"dddd"===b?(e=Za.call(this._weekdaysParse,g),e!==-1?e:null):"ddd"===b?(e=Za.call(this._shortWeekdaysParse,g),e!==-1?e:null):(e=Za.call(this._minWeekdaysParse,g),e!==-1?e:null):"dddd"===b?(e=Za.call(this._weekdaysParse,g),e!==-1?e:(e=Za.call(this._shortWeekdaysParse,g),e!==-1?e:(e=Za.call(this._minWeekdaysParse,g),e!==-1?e:null))):"ddd"===b?(e=Za.call(this._shortWeekdaysParse,g),e!==-1?e:(e=Za.call(this._weekdaysParse,g),e!==-1?e:(e=Za.call(this._minWeekdaysParse,g),e!==-1?e:null))):(e=Za.call(this._minWeekdaysParse,g),e!==-1?e:(e=Za.call(this._weekdaysParse,g),e!==-1?e:(e=Za.call(this._shortWeekdaysParse,g),e!==-1?e:null)))}function
Nb(a,b,c){var d,e,f;if(this._weekdaysParseExact)return
Mb.call(this,a,b,c);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),d=0;d<7;d++){if(e=m([2e3,1]).day(d),c&&!this._fullWeekdaysParse[d]&&(this._fullWeekdaysParse[d]=new
RegExp("^"+this.weekdays(e,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[d]=new
RegExp("^"+this.weekdaysShort(e,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[d]=new
RegExp("^"+this.weekdaysMin(e,"").replace(".",".?")+"$","i")),this._weekdaysParse[d]||(f="^"+this.weekdays(e,"")+"|^"+this.weekdaysShort(e,"")+"|^"+this.weekdaysMin(e,""),this._weekdaysParse[d]=new
RegExp(f.replace(".",""),"i")),c&&"dddd"===b&&this._fullWeekdaysParse[d].test(a))return
d;if(c&&"ddd"===b&&this._shortWeekdaysParse[d].test(a))return
d;if(c&&"dd"===b&&this._minWeekdaysParse[d].test(a))return
d;if(!c&&this._weekdaysParse[d].test(a))return d}}function
Ob(a){if(!this.isValid())return null!=a?this:NaN;var
b=this._isUTC?this._d.getUTCDay():this._d.getDay();return
null!=a?(a=Eb(a,this.localeData()),this.add(a-b,"d")):b}function
Pb(a){if(!this.isValid())return null!=a?this:NaN;var
b=(this.day()+7-this.localeData()._week.dow)%7;return
null==a?b:this.add(a-b,"d")}function
Qb(a){if(!this.isValid())return null!=a?this:NaN;if(null!=a){var
b=Fb(a,this.localeData());return this.day(this.day()%7?b:b-7)}return
this.day()||7}function Sb(a){return
this._weekdaysParseExact?(k(this,"_weekdaysRegex")||Xb.call(this),a?this._weekdaysStrictRegex:this._weekdaysRegex):(k(this,"_weekdaysRegex")||(this._weekdaysRegex=Rb),this._weekdaysStrictRegex&&a?this._weekdaysStrictRegex:this._weekdaysRegex)}function
Ub(a){return
this._weekdaysParseExact?(k(this,"_weekdaysRegex")||Xb.call(this),a?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(k(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Tb),this._weekdaysShortStrictRegex&&a?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function
Wb(a){return
this._weekdaysParseExact?(k(this,"_weekdaysRegex")||Xb.call(this),a?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(k(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Vb),this._weekdaysMinStrictRegex&&a?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function
Xb(){function a(a,b){return b.length-a.length}var
f,g,h,i,j,b=[],c=[],d=[],e=[];for(f=0;f<7;f++)g=m([2e3,1]).day(f),h=this.weekdaysMin(g,""),i=this.weekdaysShort(g,""),j=this.weekdays(g,""),b.push(h),c.push(i),d.push(j),e.push(h),e.push(i),e.push(j);for(b.sort(a),c.sort(a),d.sort(a),e.sort(a),f=0;f<7;f++)c[f]=La(c[f]),d[f]=La(d[f]),e[f]=La(e[f]);this._weekdaysRegex=new
RegExp("^("+e.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new
RegExp("^("+d.join("|")+")","i"),this._weekdaysShortStrictRegex=new
RegExp("^("+c.join("|")+")","i"),this._weekdaysMinStrictRegex=new
RegExp("^("+b.join("|")+")","i")}function
Yb(){return this.hours()%12||12}function Zb(){return
this.hours()||24}function $b(a,b){la(a,0,0,function(){return
this.localeData().meridiem(this.hours(),this.minutes(),b)})}function
_b(a,b){return b._meridiemParse}function
ac(a){return"p"===(a+"").toLowerCase().charAt(0)}function
cc(a,b,c){return
a>11?c?"pm":"PM":c?"am":"AM"}function
hc(a){return
a?a.toLowerCase().replace("_","-"):a}function
ic(a){for(var
c,d,e,f,b=0;b<a.length;){for(f=hc(a[b]).split("-"),c=f.length,d=hc(a[b+1]),d=d?d.split("-"):null;c>0;){if(e=jc(f.slice(0,c).join("-")))return
e;if(d&&d.length>=c&&A(f,d,!0)>=c-1)break;c--}b++}return
null}function jc(a){var
d=null;if(!fc[a]&&"undefined"!=typeof
c&&c&&c.exports)try{d=gc._abbr,b("./locale/"+a),kc(d)}catch(a){}return
fc[a]}function kc(a,b){var c;return
a&&(c=s(b)?nc(a):lc(a,b),c&&(gc=c)),gc._abbr}function
lc(a,b){if(null!==b){var c=ec;return
b.abbr=a,null!=fc[a]?(E("defineLocaleOverride","use
moment.updateLocale(localeName, config) to change an existing locale.
moment.defineLocale(localeName, config) should only be used for creating a
new locale See http://momentjs.com/guides/#/warnings/define-locale/ for
more
info."),c=fc[a]._config):null!=b.parentLocale&&(null!=fc[b.parentLocale]?c=fc[b.parentLocale]._config:E("parentLocaleUndefined","specified
parentLocale is not defined yet. See
http://momentjs.com/guides/#/warnings/parent-locale/")),fc[a]=new
I(H(c,b)),kc(a),fc[a]}return delete fc[a],null}function
mc(a,b){if(null!=b){var
c,d=ec;null!=fc[a]&&(d=fc[a]._config),b=H(d,b),c=new
I(b),c.parentLocale=fc[a],fc[a]=c,kc(a)}else
null!=fc[a]&&(null!=fc[a].parentLocale?fc[a]=fc[a].parentLocale:null!=fc[a]&&delete
fc[a]);return fc[a]}function nc(a){var
b;if(a&&a._locale&&a._locale._abbr&&(a=a._locale._abbr),!a)return
gc;if(!f(a)){if(b=jc(a))return b;a=[a]}return ic(a)}function oc(){return
J(fc)}function pc(a){var b,c=a._a;return
c&&o(a).overflow===-2&&(b=c[Ra]<0||c[Ra]>11?Ra:c[Sa]<1||c[Sa]>$a(c[Qa],c[Ra])?Sa:c[Ta]<0||c[Ta]>24||24===c[Ta]&&(0!==c[Ua]||0!==c[Va]||0!==c[Wa])?Ta:c[Ua]<0||c[Ua]>59?Ua:c[Va]<0||c[Va]>59?Va:c[Wa]<0||c[Wa]>999?Wa:-1,o(a)._overflowDayOfYear&&(b<Qa||b>Sa)&&(b=Sa),o(a)._overflowWeeks&&b===-1&&(b=Xa),o(a)._overflowWeekday&&b===-1&&(b=Ya),o(a).overflow=b),a}function
wc(a){var
b,c,f,g,h,i,d=a._i,e=qc.exec(d)||rc.exec(d);if(e){for(o(a).iso=!0,b=0,c=tc.length;b<c;b++)if(tc[b][1].exec(e[1])){g=tc[b][0],f=tc[b][2]!==!1;break}if(null==g)return
void(a._isValid=!1);if(e[3]){for(b=0,c=uc.length;b<c;b++)if(uc[b][1].exec(e[3])){h=(e[2]||"
")+uc[b][0];break}if(null==h)return
void(a._isValid=!1)}if(!f&&null!=h)return
void(a._isValid=!1);if(e[4]){if(!sc.exec(e[4]))return
void(a._isValid=!1);i="Z"}a._f=g+(h||"")+(i||""),Cc(a)}else
a._isValid=!1}function xc(a){var b=vc.exec(a._i);return
null!==b?void(a._d=new
Date(+b[1])):(wc(a),void(a._isValid===!1&&(delete
a._isValid,d.createFromInputFallback(a))))}function yc(a,b,c){return
null!=a?a:null!=b?b:c}function zc(a){var b=new Date(d.now());return
a._useUTC?[b.getUTCFullYear(),b.getUTCMonth(),b.getUTCDate()]:[b.getFullYear(),b.getMonth(),b.getDate()]}function
Ac(a){var
b,c,e,f,d=[];if(!a._d){for(e=zc(a),a._w&&null==a._a[Sa]&&null==a._a[Ra]&&Bc(a),a._dayOfYear&&(f=yc(a._a[Qa],e[Qa]),a._dayOfYear>ob(f)&&(o(a)._overflowDayOfYear=!0),c=tb(f,0,a._dayOfYear),a._a[Ra]=c.getUTCMonth(),a._a[Sa]=c.getUTCDate()),b=0;b<3&&null==a._a[b];++b)a._a[b]=d[b]=e[b];for(;b<7;b++)a._a[b]=d[b]=null==a._a[b]?2===b?1:0:a._a[b];24===a._a[Ta]&&0===a._a[Ua]&&0===a._a[Va]&&0===a._a[Wa]&&(a._nextDay=!0,a._a[Ta]=0),a._d=(a._useUTC?tb:sb).apply(null,d),null!=a._tzm&&a._d.setUTCMinutes(a._d.getUTCMinutes()-a._tzm),a._nextDay&&(a._a[Ta]=24)}}function
Bc(a){var
b,c,d,e,f,g,h,i;b=a._w,null!=b.GG||null!=b.W||null!=b.E?(f=1,g=4,c=yc(b.GG,a._a[Qa],wb(Kc(),1,4).year),d=yc(b.W,1),e=yc(b.E,1),(e<1||e>7)&&(i=!0)):(f=a._locale._week.dow,g=a._locale._week.doy,c=yc(b.gg,a._a[Qa],wb(Kc(),f,g).year),d=yc(b.w,1),null!=b.d?(e=b.d,(e<0||e>6)&&(i=!0)):null!=b.e?(e=b.e+f,(b.e<0||b.e>6)&&(i=!0)):e=f),d<1||d>xb(c,f,g)?o(a)._overflowWeeks=!0:null!=i?o(a)._overflowWeekday=!0:(h=vb(c,d,e,f,g),a._a[Qa]=h.year,a._dayOfYear=h.dayOfYear)}function
Cc(a){if(a._f===d.ISO_8601)return void wc(a);a._a=[],o(a).empty=!0;var
c,e,f,g,h,b=""+a._i,i=b.length,j=0;for(f=pa(a._f,a._locale).match(ha)||[],c=0;c<f.length;c++)g=f[c],e=(b.match(Ja(g,a))||[])[0],e&&(h=b.substr(0,b.indexOf(e)),h.length>0&&o(a).unusedInput.push(h),b=b.slice(b.indexOf(e)+e.length),j+=e.length),ka[g]?(e?o(a).empty=!1:o(a).unusedTokens.push(g),Pa(g,e,a)):a._strict&&!e&&o(a).unusedTokens.push(g);o(a).charsLeftOver=i-j,b.length>0&&o(a).unusedInput.push(b),a._a[Ta]<=12&&o(a).bigHour===!0&&a._a[Ta]>0&&(o(a).bigHour=void
0),o(a).parsedDateParts=a._a.slice(0),o(a).meridiem=a._meridiem,a._a[Ta]=Dc(a._locale,a._a[Ta],a._meridiem),Ac(a),pc(a)}function
Dc(a,b,c){var d;return
null==c?b:null!=a.meridiemHour?a.meridiemHour(b,c):null!=a.isPM?(d=a.isPM(c),d&&b<12&&(b+=12),d||12!==b||(b=0),b):b}function
Ec(a){var b,c,d,e,f;if(0===a._f.length)return
o(a).invalidFormat=!0,void(a._d=new
Date(NaN));for(e=0;e<a._f.length;e++)f=0,b=u({},a),null!=a._useUTC&&(b._useUTC=a._useUTC),b._f=a._f[e],Cc(b),q(b)&&(f+=o(b).charsLeftOver,f+=10*o(b).unusedTokens.length,o(b).score=f,(null==d||f<d)&&(d=f,c=b));l(a,c||b)}function
Fc(a){if(!a._d){var
b=Z(a._i);a._a=j([b.year,b.month,b.day||b.date,b.hour,b.minute,b.second,b.millisecond],function(a){return
a&&parseInt(a,10)}),Ac(a)}}function Gc(a){var b=new
w(pc(Hc(a)));return
b._nextDay&&(b.add(1,"d"),b._nextDay=void 0),b}function
Hc(a){var b=a._i,c=a._f;return a._locale=a._locale||nc(a._l),null===b||void
0===c&&""===b?r({nullInput:!0}):("string"==typeof
b&&(a._i=b=a._locale.preparse(b)),x(b)?new
w(pc(b)):(f(c)?Ec(a):i(b)?a._d=b:c?Cc(a):Ic(a),q(a)||(a._d=null),a))}function
Ic(a){var b=a._i;void 0===b?a._d=new Date(d.now()):i(b)?a._d=new
Date(b.valueOf()):"string"==typeof
b?xc(a):f(b)?(a._a=j(b.slice(0),function(a){return
parseInt(a,10)}),Ac(a)):"object"==typeof
b?Fc(a):"number"==typeof b?a._d=new
Date(b):d.createFromInputFallback(a)}function Jc(a,b,c,d,e){var
i={};return"boolean"==typeof c&&(d=c,c=void
0),(g(a)&&h(a)||f(a)&&0===a.length)&&(a=void
0),i._isAMomentObject=!0,i._useUTC=i._isUTC=e,i._l=c,i._i=a,i._f=b,i._strict=d,Gc(i)}function
Kc(a,b,c,d){return Jc(a,b,c,d,!1)}function Nc(a,b){var
c,d;if(1===b.length&&f(b[0])&&(b=b[0]),!b.length)return
Kc();for(c=b[0],d=1;d<b.length;++d)b[d].isValid()&&!b[d][a](c)||(c=b[d]);return
c}function Oc(){var a=[].slice.call(arguments,0);return
Nc("isBefore",a)}function Pc(){var
a=[].slice.call(arguments,0);return Nc("isAfter",a)}function
Rc(a){var
b=Z(a),c=b.year||0,d=b.quarter||0,e=b.month||0,f=b.week||0,g=b.day||0,h=b.hour||0,i=b.minute||0,j=b.second||0,k=b.millisecond||0;this._milliseconds=+k+1e3*j+6e4*i+1e3*h*60*60,this._days=+g+7*f,this._months=+e+3*d+12*c,this._data={},this._locale=nc(),this._bubble()}function
Sc(a){return a instanceof Rc}function Tc(a,b){la(a,0,0,function(){var
a=this.utcOffset(),c="+";return
a<0&&(a=-a,c="-"),c+ga(~~(a/60),2)+b+ga(~~a%60,2)})}function
Vc(a,b){var
c=(b||"").match(a)||[],d=c[c.length-1]||[],e=(d+"").match(Uc)||["-",0,0],f=+(60*e[1])+z(e[2]);return"+"===e[0]?f:-f}function
Wc(a,b){var c,e;return
b._isUTC?(c=b.clone(),e=(x(a)||i(a)?a.valueOf():Kc(a).valueOf())-c.valueOf(),c._d.setTime(c._d.valueOf()+e),d.updateOffset(c,!1),c):Kc(a).local()}function
Xc(a){return 15*-Math.round(a._d.getTimezoneOffset()/15)}function
Yc(a,b){var e,c=this._offset||0;return
this.isValid()?null!=a?("string"==typeof
a?a=Vc(Ea,a):Math.abs(a)<16&&(a=60*a),!this._isUTC&&b&&(e=Xc(this)),this._offset=a,this._isUTC=!0,null!=e&&this.add(e,"m"),c!==a&&(!b||this._changeInProgress?pd(this,jd(a-c,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,d.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?c:Xc(this):null!=a?this:NaN}function
Zc(a,b){return null!=a?("string"!=typeof
a&&(a=-a),this.utcOffset(a,b),this):-this.utcOffset()}function
$c(a){return this.utcOffset(0,a)}function _c(a){return
this._isUTC&&(this.utcOffset(0,a),this._isUTC=!1,a&&this.subtract(Xc(this),"m")),this}function
ad(){return this._tzm?this.utcOffset(this._tzm):"string"==typeof
this._i&&this.utcOffset(Vc(Da,this._i)),this}function
bd(a){return!!this.isValid()&&(a=a?Kc(a).utcOffset():0,(this.utcOffset()-a)%60===0)}function
cd(){return
this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function
dd(){if(!s(this._isDSTShifted))return this._isDSTShifted;var
a={};if(u(a,this),a=Hc(a),a._a){var
b=a._isUTC?m(a._a):Kc(a._a);this._isDSTShifted=this.isValid()&&A(a._a,b.toArray())>0}else
this._isDSTShifted=!1;return this._isDSTShifted}function
ed(){return!!this.isValid()&&!this._isUTC}function
fd(){return!!this.isValid()&&this._isUTC}function
gd(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}function
jd(a,b){var e,f,g,c=a,d=null;return
Sc(a)?c={ms:a._milliseconds,d:a._days,M:a._months}:"number"==typeof
a?(c={},b?c[b]=a:c.milliseconds=a):(d=hd.exec(a))?(e="-"===d[1]?-1:1,c={y:0,d:z(d[Sa])*e,h:z(d[Ta])*e,m:z(d[Ua])*e,s:z(d[Va])*e,ms:z(d[Wa])*e}):(d=id.exec(a))?(e="-"===d[1]?-1:1,c={y:kd(d[2],e),M:kd(d[3],e),w:kd(d[4],e),d:kd(d[5],e),h:kd(d[6],e),m:kd(d[7],e),s:kd(d[8],e)}):null==c?c={}:"object"==typeof
c&&("from"in c||"to"in
c)&&(g=md(Kc(c.from),Kc(c.to)),c={},c.ms=g.milliseconds,c.M=g.months),f=new
Rc(c),Sc(a)&&k(a,"_locale")&&(f._locale=a._locale),f}function
kd(a,b){var
c=a&&parseFloat(a.replace(",","."));return(isNaN(c)?0:c)*b}function
ld(a,b){var c={milliseconds:0,months:0};return
c.months=b.month()-a.month()+12*(b.year()-a.year()),a.clone().add(c.months,"M").isAfter(b)&&--c.months,c.milliseconds=+b-+a.clone().add(c.months,"M"),c}function
md(a,b){var c;return
a.isValid()&&b.isValid()?(b=Wc(b,a),a.isBefore(b)?c=ld(a,b):(c=ld(b,a),c.milliseconds=-c.milliseconds,c.months=-c.months),c):{milliseconds:0,months:0}}function
nd(a){return a<0?Math.round(-1*a)*-1:Math.round(a)}function
od(a,b){return function(c,d){var e,f;return
null===d||isNaN(+d)||(E(b,"moment()."+b+"(period, number) is
deprecated. Please use moment()."+b+"(number, period). See
http://momentjs.com/guides/#/warnings/add-inverted-param/ for more
info."),f=c,c=d,d=f),c="string"==typeof
c?+c:c,e=jd(c,d),pd(this,e,a),this}}function pd(a,b,c,e){var
f=b._milliseconds,g=nd(b._days),h=nd(b._months);a.isValid()&&(e=null==e||e,f&&a._d.setTime(a._d.valueOf()+f*c),g&&da(a,"Date",ca(a,"Date")+g*c),h&&gb(a,ca(a,"Month")+h*c),e&&d.updateOffset(a,g||h))}function
sd(a,b){var c=a.diff(b,"days",!0);return
c<-6?"sameElse":c<-1?"lastWeek":c<0?"lastDay":c<1?"sameDay":c<2?"nextDay":c<7?"nextWeek":"sameElse"}function
td(a,b){var
c=a||Kc(),e=Wc(c,this).startOf("day"),f=d.calendarFormat(this,e)||"sameElse",g=b&&(F(b[f])?b[f].call(this,c):b[f]);return
this.format(g||this.localeData().calendar(f,this,Kc(c)))}function
ud(){return new w(this)}function vd(a,b){var
c=x(a)?a:Kc(a);return!(!this.isValid()||!c.isValid())&&(b=Y(s(b)?"millisecond":b),"millisecond"===b?this.valueOf()>c.valueOf():c.valueOf()<this.clone().startOf(b).valueOf())}function
wd(a,b){var
c=x(a)?a:Kc(a);return!(!this.isValid()||!c.isValid())&&(b=Y(s(b)?"millisecond":b),"millisecond"===b?this.valueOf()<c.valueOf():this.clone().endOf(b).valueOf()<c.valueOf())}function
xd(a,b,c,d){return
d=d||"()",("("===d[0]?this.isAfter(a,c):!this.isBefore(a,c))&&(")"===d[1]?this.isBefore(b,c):!this.isAfter(b,c))}function
yd(a,b){var
d,c=x(a)?a:Kc(a);return!(!this.isValid()||!c.isValid())&&(b=Y(b||"millisecond"),"millisecond"===b?this.valueOf()===c.valueOf():(d=c.valueOf(),this.clone().startOf(b).valueOf()<=d&&d<=this.clone().endOf(b).valueOf()))}function
zd(a,b){return this.isSame(a,b)||this.isAfter(a,b)}function Ad(a,b){return
this.isSame(a,b)||this.isBefore(a,b)}function Bd(a,b,c){var d,e,f,g;return
this.isValid()?(d=Wc(a,this),d.isValid()?(e=6e4*(d.utcOffset()-this.utcOffset()),b=Y(b),"year"===b||"month"===b||"quarter"===b?(g=Cd(this,d),"quarter"===b?g/=3:"year"===b&&(g/=12)):(f=this-d,g="second"===b?f/1e3:"minute"===b?f/6e4:"hour"===b?f/36e5:"day"===b?(f-e)/864e5:"week"===b?(f-e)/6048e5:f),c?g:y(g)):NaN):NaN}function
Cd(a,b){var
e,f,c=12*(b.year()-a.year())+(b.month()-a.month()),d=a.clone().add(c,"months");return
b-d<0?(e=a.clone().add(c-1,"months"),f=(b-d)/(d-e)):(e=a.clone().add(c+1,"months"),f=(b-d)/(e-d)),-(c+f)||0}function
Dd(){return this.clone().locale("en").format("ddd MMM DD
YYYY HH:mm:ss [GMT]ZZ")}function Ed(){var a=this.clone().utc();return
0<a.year()&&a.year()<=9999?F(Date.prototype.toISOString)?this.toDate().toISOString():oa(a,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):oa(a,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")}function
Fd(a){a||(a=this.isUtc()?d.defaultFormatUtc:d.defaultFormat);var
b=oa(this,a);return this.localeData().postformat(b)}function Gd(a,b){return
this.isValid()&&(x(a)&&a.isValid()||Kc(a).isValid())?jd({to:this,from:a}).locale(this.locale()).humanize(!b):this.localeData().invalidDate()}function
Hd(a){return this.from(Kc(),a)}function Id(a,b){return
this.isValid()&&(x(a)&&a.isValid()||Kc(a).isValid())?jd({from:this,to:a}).locale(this.locale()).humanize(!b):this.localeData().invalidDate()}function
Jd(a){return this.to(Kc(),a)}function Kd(a){var b;return void
0===a?this._locale._abbr:(b=nc(a),null!=b&&(this._locale=b),this)}function
Md(){return this._locale}function
Nd(a){switch(a=Y(a)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":case"date":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===a&&this.weekday(0),"isoWeek"===a&&this.isoWeekday(1),"quarter"===a&&this.month(3*Math.floor(this.month()/3)),this}function
Od(a){return a=Y(a),void
0===a||"millisecond"===a?this:("date"===a&&(a="day"),this.startOf(a).add(1,"isoWeek"===a?"week":a).subtract(1,"ms"))}function
Pd(){return this._d.valueOf()-6e4*(this._offset||0)}function Qd(){return
Math.floor(this.valueOf()/1e3)}function Rd(){return new
Date(this.valueOf())}function Sd(){var
a=this;return[a.year(),a.month(),a.date(),a.hour(),a.minute(),a.second(),a.millisecond()]}function
Td(){var
a=this;return{years:a.year(),months:a.month(),date:a.date(),hours:a.hours(),minutes:a.minutes(),seconds:a.seconds(),milliseconds:a.milliseconds()}}function
Ud(){return this.isValid()?this.toISOString():null}function Vd(){return
q(this)}function Wd(){return l({},o(this))}function Xd(){return
o(this).overflow}function
Yd(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function
Zd(a,b){la(0,[a,a.length],0,b)}function $d(a){return
ce.call(this,a,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function
_d(a){return ce.call(this,a,this.isoWeek(),this.isoWeekday(),1,4)}function
ae(){return xb(this.year(),1,4)}function be(){var
a=this.localeData()._week;return xb(this.year(),a.dow,a.doy)}function
ce(a,b,c,d,e){var f;return
null==a?wb(this,d,e).year:(f=xb(a,d,e),b>f&&(b=f),de.call(this,a,b,c,d,e))}function
de(a,b,c,d,e){var f=vb(a,b,c,d,e),g=tb(f.year,0,f.dayOfYear);return
this.year(g.getUTCFullYear()),this.month(g.getUTCMonth()),this.date(g.getUTCDate()),this}function
ee(a){return
null==a?Math.ceil((this.month()+1)/3):this.month(3*(a-1)+this.month()%3)}function
ge(a){var
b=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return
null==a?b:this.add(a-b,"d")}function
ke(a,b){b[Wa]=z(1e3*("0."+a))}function me(){return
this._isUTC?"UTC":""}function ne(){return
this._isUTC?"Coordinated Universal Time":""}function
qe(a){return Kc(1e3*a)}function re(){return
Kc.apply(null,arguments).parseZone()}function se(a){return a}function
ue(a,b,c,d){var e=nc(),f=m().set(d,b);return e[c](f,a)}function
ve(a,b,c){if("number"==typeof a&&(b=a,a=void
0),a=a||"",null!=b)return ue(a,b,c,"month");var
d,e=[];for(d=0;d<12;d++)e[d]=ue(a,d,c,"month");return
e}function we(a,b,c,d){"boolean"==typeof
a?("number"==typeof b&&(c=b,b=void
0),b=b||""):(b=a,c=b,a=!1,"number"==typeof
b&&(c=b,b=void 0),b=b||"");var
e=nc(),f=a?e._week.dow:0;if(null!=c)return
ue(b,(c+f)%7,d,"day");var
g,h=[];for(g=0;g<7;g++)h[g]=ue(b,(g+f)%7,d,"day");return
h}function xe(a,b){return ve(a,b,"months")}function
ye(a,b){return ve(a,b,"monthsShort")}function ze(a,b,c){return
we(a,b,c,"weekdays")}function Ae(a,b,c){return
we(a,b,c,"weekdaysShort")}function Be(a,b,c){return
we(a,b,c,"weekdaysMin")}function De(){var a=this._data;return
this._milliseconds=Ce(this._milliseconds),this._days=Ce(this._days),this._months=Ce(this._months),a.milliseconds=Ce(a.milliseconds),a.seconds=Ce(a.seconds),a.minutes=Ce(a.minutes),a.hours=Ce(a.hours),a.months=Ce(a.months),a.years=Ce(a.years),this}function
Ee(a,b,c,d){var e=jd(b,c);return
a._milliseconds+=d*e._milliseconds,a._days+=d*e._days,a._months+=d*e._months,a._bubble()}function
Fe(a,b){return Ee(this,a,b,1)}function Ge(a,b){return
Ee(this,a,b,-1)}function He(a){return
a<0?Math.floor(a):Math.ceil(a)}function Ie(){var
e,f,g,h,i,a=this._milliseconds,b=this._days,c=this._months,d=this._data;return
a>=0&&b>=0&&c>=0||a<=0&&b<=0&&c<=0||(a+=864e5*He(Ke(c)+b),b=0,c=0),d.milliseconds=a%1e3,e=y(a/1e3),d.seconds=e%60,f=y(e/60),d.minutes=f%60,g=y(f/60),d.hours=g%24,b+=y(g/24),i=y(Je(b)),c+=i,b-=He(Ke(i)),h=y(c/12),c%=12,d.days=b,d.months=c,d.years=h,this}function
Je(a){return 4800*a/146097}function Ke(a){return 146097*a/4800}function
Le(a){var
b,c,d=this._milliseconds;if(a=Y(a),"month"===a||"year"===a)return
b=this._days+d/864e5,c=this._months+Je(b),"month"===a?c:c/12;switch(b=this._days+Math.round(Ke(this._months)),a){case"week":return
b/7+d/6048e5;case"day":return
b+d/864e5;case"hour":return
24*b+d/36e5;case"minute":return
1440*b+d/6e4;case"second":return
86400*b+d/1e3;case"millisecond":return
Math.floor(864e5*b)+d;default:throw new Error("Unknown unit
"+a)}}function Me(){return
this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*z(this._months/12)}function
Ne(a){return function(){return this.as(a)}}function We(a){return
a=Y(a),this[a+"s"]()}function Xe(a){return function(){return
this._data[a]}}function df(){return y(this.days()/7)}function
gf(a,b,c,d,e){return e.relativeTime(b||1,!!c,a,d)}function hf(a,b,c){var
d=jd(a).abs(),e=ef(d.as("s")),f=ef(d.as("m")),g=ef(d.as("h")),h=ef(d.as("d")),i=ef(d.as("M")),j=ef(d.as("y")),k=e<ff.s&&["s",e]||f<=1&&["m"]||f<ff.m&&["mm",f]||g<=1&&["h"]||g<ff.h&&["hh",g]||h<=1&&["d"]||h<ff.d&&["dd",h]||i<=1&&["M"]||i<ff.M&&["MM",i]||j<=1&&["y"]||["yy",j];return
k[2]=b,k[3]=+a>0,k[4]=c,gf.apply(null,k)}function jf(a){return void
0===a?ef:"function"==typeof a&&(ef=a,!0)}function
kf(a,b){return void 0!==ff[a]&&(void
0===b?ff[a]:(ff[a]=b,!0))}function lf(a){var
b=this.localeData(),c=hf(this,!a,b);return
a&&(c=b.pastFuture(+this,c)),b.postformat(c)}function nf(){var
d,e,f,a=mf(this._milliseconds)/1e3,b=mf(this._days),c=mf(this._months);d=y(a/60),e=y(d/60),a%=60,d%=60,f=y(c/12),c%=12;var
g=f,h=c,i=b,j=e,k=d,l=a,m=this.asSeconds();return
m?(m<0?"-":"")+"P"+(g?g+"Y":"")+(h?h+"M":"")+(i?i+"D":"")+(j||k||l?"T":"")+(j?j+"H":"")+(k?k+"M":"")+(l?l+"S":""):"P0D"}var
a,p;p=Array.prototype.some?Array.prototype.some:function(a){for(var
b=Object(this),c=b.length>>>0,d=0;d<c;d++)if(d in
b&&a.call(this,b[d],d,b))return!0;return!1};var
t=d.momentProperties=[],v=!1,D={};d.suppressDeprecationWarnings=!1,d.deprecationHandler=null;var
J;J=Object.keys?Object.keys:function(a){var b,c=[];for(b in
a)k(a,b)&&c.push(b);return c};var Za,K={sameDay:"[Today at]
LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at]
LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd
[at] LT",sameElse:"L"},M={LTS:"h:mm:ss
A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D,
YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D,
YYYY h:mm A"},O="Invalid
date",Q="%d",R=/\d{1,2}/,T={future:"in
%s",past:"%s ago",s:"a few seconds",m:"a
minute",mm:"%d minutes",h:"an hour",hh:"%d
hours",d:"a day",dd:"%d days",M:"a
month",MM:"%d months",y:"a year",yy:"%d
years"},W={},$={},ha=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,ia=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,ja={},ka={},qa=/\d/,ra=/\d\d/,sa=/\d{3}/,ta=/\d{4}/,ua=/[+-]?\d{6}/,va=/\d\d?/,wa=/\d\d\d\d?/,xa=/\d\d\d\d\d\d?/,ya=/\d{1,3}/,za=/\d{1,4}/,Aa=/[+-]?\d{1,6}/,Ba=/\d+/,Ca=/[+-]?\d+/,Da=/Z|[+-]\d\d:?\d\d/gi,Ea=/Z|[+-]\d\d(?::?\d\d)?/gi,Fa=/[+-]?\d+(\.\d{1,3})?/,Ga=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,Ha={},Ma={},Qa=0,Ra=1,Sa=2,Ta=3,Ua=4,Va=5,Wa=6,Xa=7,Ya=8;Za=Array.prototype.indexOf?Array.prototype.indexOf:function(a){var
b;for(b=0;b<this.length;++b)if(this[b]===a)return
b;return-1},la("M",["MM",2],"Mo",function(){return
this.month()+1}),la("MMM",0,0,function(a){return
this.localeData().monthsShort(this,a)}),la("MMMM",0,0,function(a){return
this.localeData().months(this,a)}),X("month","M"),_("month",8),Ia("M",va),Ia("MM",va,ra),Ia("MMM",function(a,b){return
b.monthsShortRegex(a)}),Ia("MMMM",function(a,b){return
b.monthsRegex(a)}),Na(["M","MM"],function(a,b){b[Ra]=z(a)-1}),Na(["MMM","MMMM"],function(a,b,c,d){var
e=c._locale.monthsParse(a,d,c._strict);null!=e?b[Ra]=e:o(c).invalidMonth=a});var
_a=/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/,ab="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),cb="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),jb=Ga,lb=Ga;la("Y",0,0,function(){var
a=this.year();return
a<=9999?""+a:"+"+a}),la(0,["YY",2],0,function(){return
this.year()%100}),la(0,["YYYY",4],0,"year"),la(0,["YYYYY",5],0,"year"),la(0,["YYYYYY",6,!0],0,"year"),X("year","y"),_("year",1),Ia("Y",Ca),Ia("YY",va,ra),Ia("YYYY",za,ta),Ia("YYYYY",Aa,ua),Ia("YYYYYY",Aa,ua),Na(["YYYYY","YYYYYY"],Qa),Na("YYYY",function(a,b){b[Qa]=2===a.length?d.parseTwoDigitYear(a):z(a)}),Na("YY",function(a,b){b[Qa]=d.parseTwoDigitYear(a)}),Na("Y",function(a,b){b[Qa]=parseInt(a,10)}),d.parseTwoDigitYear=function(a){return
z(a)+(z(a)>68?1900:2e3)};var
qb=ba("FullYear",!0);la("w",["ww",2],"wo","week"),la("W",["WW",2],"Wo","isoWeek"),X("week","w"),X("isoWeek","W"),_("week",5),_("isoWeek",5),Ia("w",va),Ia("ww",va,ra),Ia("W",va),Ia("WW",va,ra),Oa(["w","ww","W","WW"],function(a,b,c,d){b[d.substr(0,1)]=z(a)});var
zb={dow:0,doy:6};la("d",0,"do","day"),la("dd",0,0,function(a){return
this.localeData().weekdaysMin(this,a)}),la("ddd",0,0,function(a){return
this.localeData().weekdaysShort(this,a)}),la("dddd",0,0,function(a){return
this.localeData().weekdays(this,a)}),la("e",0,0,"weekday"),la("E",0,0,"isoWeekday"),X("day","d"),X("weekday","e"),X("isoWeekday","E"),_("day",11),_("weekday",11),_("isoWeekday",11),Ia("d",va),Ia("e",va),Ia("E",va),Ia("dd",function(a,b){return
b.weekdaysMinRegex(a)}),Ia("ddd",function(a,b){return
b.weekdaysShortRegex(a)}),Ia("dddd",function(a,b){return
b.weekdaysRegex(a)}),Oa(["dd","ddd","dddd"],function(a,b,c,d){var
e=c._locale.weekdaysParse(a,d,c._strict);null!=e?b.d=e:o(c).invalidWeekday=a}),Oa(["d","e","E"],function(a,b,c,d){b[d]=z(a)});var
Gb="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Ib="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Kb="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Rb=Ga,Tb=Ga,Vb=Ga;la("H",["HH",2],0,"hour"),la("h",["hh",2],0,Yb),la("k",["kk",2],0,Zb),la("hmm",0,0,function(){return""+Yb.apply(this)+ga(this.minutes(),2)}),la("hmmss",0,0,function(){return""+Yb.apply(this)+ga(this.minutes(),2)+ga(this.seconds(),2)}),la("Hmm",0,0,function(){return""+this.hours()+ga(this.minutes(),2)}),la("Hmmss",0,0,function(){return""+this.hours()+ga(this.minutes(),2)+ga(this.seconds(),2)}),$b("a",!0),$b("A",!1),X("hour","h"),_("hour",13),Ia("a",_b),Ia("A",_b),Ia("H",va),Ia("h",va),Ia("HH",va,ra),Ia("hh",va,ra),Ia("hmm",wa),Ia("hmmss",xa),Ia("Hmm",wa),Ia("Hmmss",xa),Na(["H","HH"],Ta),Na(["a","A"],function(a,b,c){c._isPm=c._locale.isPM(a),c._meridiem=a}),Na(["h","hh"],function(a,b,c){b[Ta]=z(a),o(c).bigHour=!0}),Na("hmm",function(a,b,c){var
d=a.length-2;b[Ta]=z(a.substr(0,d)),b[Ua]=z(a.substr(d)),o(c).bigHour=!0}),Na("hmmss",function(a,b,c){var
d=a.length-4,e=a.length-2;b[Ta]=z(a.substr(0,d)),b[Ua]=z(a.substr(d,2)),b[Va]=z(a.substr(e)),o(c).bigHour=!0}),Na("Hmm",function(a,b,c){var
d=a.length-2;b[Ta]=z(a.substr(0,d)),b[Ua]=z(a.substr(d))}),Na("Hmmss",function(a,b,c){var
d=a.length-4,e=a.length-2;b[Ta]=z(a.substr(0,d)),b[Ua]=z(a.substr(d,2)),b[Va]=z(a.substr(e))});var
gc,bc=/[ap]\.?m?\.?/i,dc=ba("Hours",!0),ec={calendar:K,longDateFormat:M,invalidDate:O,ordinal:Q,ordinalParse:R,relativeTime:T,months:ab,monthsShort:cb,week:zb,weekdays:Gb,weekdaysMin:Kb,weekdaysShort:Ib,meridiemParse:bc},fc={},qc=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T|
)(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/,rc=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T|
)(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/,sc=/Z|[+-]\d\d(?::?\d\d)?/,tc=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],uc=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],vc=/^\/?Date\((\-?\d+)/i;
d.createFromInputFallback=C("moment construction falls back to js
Date. This is discouraged and will be removed in upcoming major release.
Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more
info.",function(a){a._d=new Date(a._i+(a._useUTC?"
UTC":""))}),d.ISO_8601=function(){};var
Lc=C("moment().min is deprecated, use moment.max instead.
http://momentjs.com/guides/#/warnings/min-max/",function(){var
a=Kc.apply(null,arguments);return
this.isValid()&&a.isValid()?a<this?this:a:r()}),Mc=C("moment().max
is deprecated, use moment.min instead.
http://momentjs.com/guides/#/warnings/min-max/",function(){var
a=Kc.apply(null,arguments);return
this.isValid()&&a.isValid()?a>this?this:a:r()}),Qc=function(){return
Date.now?Date.now():+new
Date};Tc("Z",":"),Tc("ZZ",""),Ia("Z",Ea),Ia("ZZ",Ea),Na(["Z","ZZ"],function(a,b,c){c._useUTC=!0,c._tzm=Vc(Ea,a)});var
Uc=/([\+\-]|\d\d)/gi;d.updateOffset=function(){};var hd=/^(\-)?(?:(\d*)[.
])?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?\d*)?$/,id=/^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/;jd.fn=Rc.prototype;var
qd=od(1,"add"),rd=od(-1,"subtract");d.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",d.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var
Ld=C("moment().lang() is deprecated. Instead, use
moment().localeData() to get the language configuration. Use
moment().locale() to change languages.",function(a){return void
0===a?this.localeData():this.locale(a)});la(0,["gg",2],0,function(){return
this.weekYear()%100}),la(0,["GG",2],0,function(){return
this.isoWeekYear()%100}),Zd("gggg","weekYear"),Zd("ggggg","weekYear"),Zd("GGGG","isoWeekYear"),Zd("GGGGG","isoWeekYear"),X("weekYear","gg"),X("isoWeekYear","GG"),_("weekYear",1),_("isoWeekYear",1),Ia("G",Ca),Ia("g",Ca),Ia("GG",va,ra),Ia("gg",va,ra),Ia("GGGG",za,ta),Ia("gggg",za,ta),Ia("GGGGG",Aa,ua),Ia("ggggg",Aa,ua),Oa(["gggg","ggggg","GGGG","GGGGG"],function(a,b,c,d){b[d.substr(0,2)]=z(a)}),Oa(["gg","GG"],function(a,b,c,e){b[e]=d.parseTwoDigitYear(a)}),la("Q",0,"Qo","quarter"),X("quarter","Q"),_("quarter",7),Ia("Q",qa),Na("Q",function(a,b){b[Ra]=3*(z(a)-1)}),la("D",["DD",2],"Do","date"),X("date","D"),_("date",9),Ia("D",va),Ia("DD",va,ra),Ia("Do",function(a,b){return
a?b._ordinalParse:b._ordinalParseLenient}),Na(["D","DD"],Sa),Na("Do",function(a,b){b[Sa]=z(a.match(va)[0],10)});var
fe=ba("Date",!0);la("DDD",["DDDD",3],"DDDo","dayOfYear"),X("dayOfYear","DDD"),_("dayOfYear",4),Ia("DDD",ya),Ia("DDDD",sa),Na(["DDD","DDDD"],function(a,b,c){c._dayOfYear=z(a)}),la("m",["mm",2],0,"minute"),X("minute","m"),_("minute",14),Ia("m",va),Ia("mm",va,ra),Na(["m","mm"],Ua);var
he=ba("Minutes",!1);la("s",["ss",2],0,"second"),X("second","s"),_("second",15),Ia("s",va),Ia("ss",va,ra),Na(["s","ss"],Va);var
ie=ba("Seconds",!1);la("S",0,0,function(){return~~(this.millisecond()/100)}),la(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),la(0,["SSS",3],0,"millisecond"),la(0,["SSSS",4],0,function(){return
10*this.millisecond()}),la(0,["SSSSS",5],0,function(){return
100*this.millisecond()}),la(0,["SSSSSS",6],0,function(){return
1e3*this.millisecond()}),la(0,["SSSSSSS",7],0,function(){return
1e4*this.millisecond()}),la(0,["SSSSSSSS",8],0,function(){return
1e5*this.millisecond()}),la(0,["SSSSSSSSS",9],0,function(){return
1e6*this.millisecond()}),X("millisecond","ms"),_("millisecond",16),Ia("S",ya,qa),Ia("SS",ya,ra),Ia("SSS",ya,sa);var
je;for(je="SSSS";je.length<=9;je+="S")Ia(je,Ba);for(je="S";je.length<=9;je+="S")Na(je,ke);var
le=ba("Milliseconds",!1);la("z",0,0,"zoneAbbr"),la("zz",0,0,"zoneName");var
oe=w.prototype;oe.add=qd,oe.calendar=td,oe.clone=ud,oe.diff=Bd,oe.endOf=Od,oe.format=Fd,oe.from=Gd,oe.fromNow=Hd,oe.to=Id,oe.toNow=Jd,oe.get=ea,oe.invalidAt=Xd,oe.isAfter=vd,oe.isBefore=wd,oe.isBetween=xd,oe.isSame=yd,oe.isSameOrAfter=zd,oe.isSameOrBefore=Ad,oe.isValid=Vd,oe.lang=Ld,oe.locale=Kd,oe.localeData=Md,oe.max=Mc,oe.min=Lc,oe.parsingFlags=Wd,oe.set=fa,oe.startOf=Nd,oe.subtract=rd,oe.toArray=Sd,oe.toObject=Td,oe.toDate=Rd,oe.toISOString=Ed,oe.toJSON=Ud,oe.toString=Dd,oe.unix=Qd,oe.valueOf=Pd,oe.creationData=Yd,oe.year=qb,oe.isLeapYear=rb,oe.weekYear=$d,oe.isoWeekYear=_d,oe.quarter=oe.quarters=ee,oe.month=hb,oe.daysInMonth=ib,oe.week=oe.weeks=Cb,oe.isoWeek=oe.isoWeeks=Db,oe.weeksInYear=be,oe.isoWeeksInYear=ae,oe.date=fe,oe.day=oe.days=Ob,oe.weekday=Pb,oe.isoWeekday=Qb,oe.dayOfYear=ge,oe.hour=oe.hours=dc,oe.minute=oe.minutes=he,oe.second=oe.seconds=ie,oe.millisecond=oe.milliseconds=le,oe.utcOffset=Yc,oe.utc=$c,oe.local=_c,oe.parseZone=ad,oe.hasAlignedHourOffset=bd,oe.isDST=cd,oe.isLocal=ed,oe.isUtcOffset=fd,oe.isUtc=gd,oe.isUTC=gd,oe.zoneAbbr=me,oe.zoneName=ne,oe.dates=C("dates
accessor is deprecated. Use date
instead.",fe),oe.months=C("months accessor is deprecated. Use
month instead",hb),oe.years=C("years accessor is deprecated. Use
year instead",qb),oe.zone=C("moment().zone is deprecated, use
moment().utcOffset instead.
http://momentjs.com/guides/#/warnings/zone/",Zc),oe.isDSTShifted=C("isDSTShifted
is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for
more information",dd);var
pe=oe,te=I.prototype;te.calendar=L,te.longDateFormat=N,te.invalidDate=P,te.ordinal=S,te.preparse=se,te.postformat=se,te.relativeTime=U,te.pastFuture=V,te.set=G,te.months=bb,te.monthsShort=db,te.monthsParse=fb,te.monthsRegex=mb,te.monthsShortRegex=kb,te.week=yb,te.firstDayOfYear=Bb,te.firstDayOfWeek=Ab,te.weekdays=Hb,te.weekdaysMin=Lb,te.weekdaysShort=Jb,te.weekdaysParse=Nb,te.weekdaysRegex=Sb,te.weekdaysShortRegex=Ub,te.weekdaysMinRegex=Wb,te.isPM=ac,te.meridiem=cc,kc("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(a){var
b=a%10,c=1===z(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th";return
a+c}}),d.lang=C("moment.lang is deprecated. Use moment.locale
instead.",kc),d.langData=C("moment.langData is deprecated. Use
moment.localeData instead.",nc);var
Ce=Math.abs,Oe=Ne("ms"),Pe=Ne("s"),Qe=Ne("m"),Re=Ne("h"),Se=Ne("d"),Te=Ne("w"),Ue=Ne("M"),Ve=Ne("y"),Ye=Xe("milliseconds"),Ze=Xe("seconds"),$e=Xe("minutes"),_e=Xe("hours"),af=Xe("days"),bf=Xe("months"),cf=Xe("years"),ef=Math.round,ff={s:45,m:45,h:22,d:26,M:11},mf=Math.abs,of=Rc.prototype;of.abs=De,of.add=Fe,of.subtract=Ge,of.as=Le,of.asMilliseconds=Oe,of.asSeconds=Pe,of.asMinutes=Qe,of.asHours=Re,of.asDays=Se,of.asWeeks=Te,of.asMonths=Ue,of.asYears=Ve,of.valueOf=Me,of._bubble=Ie,of.get=We,of.milliseconds=Ye,of.seconds=Ze,of.minutes=$e,of.hours=_e,of.days=af,of.weeks=df,of.months=bf,of.years=cf,of.humanize=lf,of.toISOString=nf,of.toString=nf,of.toJSON=nf,of.locale=Kd,of.localeData=Md,of.toIsoString=C("toIsoString()
is deprecated. Please use toISOString() instead (notice the
capitals)",nf),of.lang=Ld,la("X",0,0,"unix"),la("x",0,0,"valueOf"),Ia("x",Ca),Ia("X",Fa),Na("X",function(a,b,c){c._d=new
Date(1e3*parseFloat(a,10))}),Na("x",function(a,b,c){c._d=new
Date(z(a))}),d.version="2.14.1",e(Kc),d.fn=pe,d.min=Oc,d.max=Pc,d.now=Qc,d.utc=m,d.unix=qe,d.months=xe,d.isDate=i,d.locale=kc,d.invalid=r,d.duration=jd,d.isMoment=x,d.weekdays=ze,d.parseZone=re,d.localeData=nc,d.isDuration=Sc,d.monthsShort=ye,d.weekdaysMin=Be,d.defineLocale=lc,d.updateLocale=mc,d.locales=oc,d.weekdaysShort=Ae,d.normalizeUnits=Y,d.relativeTimeRounding=jf,d.relativeTimeThreshold=kf,d.calendarFormat=sd,d.prototype=pe;var
pf=d;return pf})},{}],7:[function(a,b,c){var
d=a(27)();a(26)(d),a(22)(d),a(25)(d),a(21)(d),a(23)(d),a(24)(d),a(28)(d),a(32)(d),a(30)(d),a(31)(d),a(33)(d),a(29)(d),a(34)(d),a(35)(d),a(36)(d),a(37)(d),a(38)(d),a(41)(d),a(39)(d),a(40)(d),a(42)(d),a(43)(d),a(44)(d),a(15)(d),a(16)(d),a(17)(d),a(18)(d),a(19)(d),a(20)(d),a(8)(d),a(9)(d),a(10)(d),a(11)(d),a(12)(d),a(13)(d),a(14)(d),window.Chart=b.exports=d},{10:10,11:11,12:12,13:13,14:14,15:15,16:16,17:17,18:18,19:19,20:20,21:21,22:22,23:23,24:24,25:25,26:26,27:27,28:28,29:29,30:30,31:31,32:32,33:33,34:34,35:35,36:36,37:37,38:38,39:39,40:40,41:41,42:42,43:43,44:44,8:8,9:9}],8:[function(a,b,c){"use
strict";b.exports=function(a){a.Bar=function(b,c){return
c.type="bar",new a(b,c)}}},{}],9:[function(a,b,c){"use
strict";b.exports=function(a){a.Bubble=function(b,c){return
c.type="bubble",new a(b,c)}}},{}],10:[function(a,b,c){"use
strict";b.exports=function(a){a.Doughnut=function(b,c){return
c.type="doughnut",new a(b,c)}}},{}],11:[function(a,b,c){"use
strict";b.exports=function(a){a.Line=function(b,c){return
c.type="line",new a(b,c)}}},{}],12:[function(a,b,c){"use
strict";b.exports=function(a){a.PolarArea=function(b,c){return
c.type="polarArea",new
a(b,c)}}},{}],13:[function(a,b,c){"use
strict";b.exports=function(a){a.Radar=function(b,c){return
c.options=a.helpers.configMerge({aspectRatio:1},c.options),c.type="radar",new
a(b,c)}}},{}],14:[function(a,b,c){"use
strict";b.exports=function(a){var
b={hover:{mode:"single"},scales:{xAxes:[{type:"linear",position:"bottom",id:"x-axis-1"}],yAxes:[{type:"linear",position:"left",id:"y-axis-1"}]},tooltips:{callbacks:{title:function(){return""},label:function(a){return"("+a.xLabel+",
"+a.yLabel+")"}}}};a.defaults.scatter=b,a.controllers.scatter=a.controllers.line,a.Scatter=function(b,c){return
c.type="scatter",new a(b,c)}}},{}],15:[function(a,b,c){"use
strict";b.exports=function(a){var
b=a.helpers;a.defaults.bar={hover:{mode:"label"},scales:{xAxes:[{type:"category",categoryPercentage:.8,barPercentage:.9,gridLines:{offsetGridLines:!0}}],yAxes:[{type:"linear"}]}},a.controllers.bar=a.DatasetController.extend({dataElementType:a.elements.Rectangle,initialize:function(b,c){a.DatasetController.prototype.initialize.call(this,b,c),this.getMeta().bar=!0},getBarCount:function(){var
a=this,c=0;return b.each(a.chart.data.datasets,function(b,d){var
e=a.chart.getDatasetMeta(d);e.bar&&a.chart.isDatasetVisible(d)&&++c},a),c},update:function(a){var
c=this;b.each(c.getMeta().data,function(b,d){c.updateElement(b,d,a)},c)},updateElement:function(a,c,d){var
e=this,f=e.getMeta(),g=e.getScaleForId(f.xAxisID),h=e.getScaleForId(f.yAxisID),i=h.getBasePixel(),j=e.chart.options.elements.rectangle,k=a.custom||{},l=e.getDataset();b.extend(a,{_xScale:g,_yScale:h,_datasetIndex:e.index,_index:c,_model:{x:e.calculateBarX(c,e.index),y:d?i:e.calculateBarY(c,e.index),label:e.chart.data.labels[c],datasetLabel:l.label,base:d?i:e.calculateBarBase(e.index,c),width:e.calculateBarWidth(c),backgroundColor:k.backgroundColor?k.backgroundColor:b.getValueAtIndexOrDefault(l.backgroundColor,c,j.backgroundColor),borderSkipped:k.borderSkipped?k.borderSkipped:j.borderSkipped,borderColor:k.borderColor?k.borderColor:b.getValueAtIndexOrDefault(l.borderColor,c,j.borderColor),borderWidth:k.borderWidth?k.borderWidth:b.getValueAtIndexOrDefault(l.borderWidth,c,j.borderWidth)}}),a.pivot()},calculateBarBase:function(a,b){var
c=this,d=c.getMeta(),e=c.getScaleForId(d.yAxisID),f=0;if(e.options.stacked){for(var
g=c.chart,h=g.data.datasets,i=Number(h[a].data[b]),j=0;j<a;j++){var
k=h[j],l=g.getDatasetMeta(j);if(l.bar&&l.yAxisID===e.id&&g.isDatasetVisible(j)){var
m=Number(k.data[b]);f+=i<0?Math.min(m,0):Math.max(m,0)}}return
e.getPixelForValue(f)}return e.getBasePixel()},getRuler:function(a){var
f,b=this,c=b.getMeta(),d=b.getScaleForId(c.xAxisID),e=b.getBarCount();f="category"===d.options.type?d.getPixelForTick(a+1)-d.getPixelForTick(a):d.width/d.ticks.length;var
g=f*d.options.categoryPercentage,h=(f-f*d.options.categoryPercentage)/2,i=g/e;if(d.ticks.length!==b.chart.data.labels.length){var
j=d.ticks.length/b.chart.data.labels.length;i*=j}var
k=i*d.options.barPercentage,l=i-i*d.options.barPercentage;return{datasetCount:e,tickWidth:f,categoryWidth:g,categorySpacing:h,fullBarWidth:i,barWidth:k,barSpacing:l}},calculateBarWidth:function(a){var
b=this.getScaleForId(this.getMeta().xAxisID);if(b.options.barThickness)return
b.options.barThickness;var c=this.getRuler(a);return
b.options.stacked?c.categoryWidth:c.barWidth},getBarIndex:function(a){var
c,d,b=0;for(d=0;d<a;++d)c=this.chart.getDatasetMeta(d),c.bar&&this.chart.isDatasetVisible(d)&&++b;return
b},calculateBarX:function(a,b){var
c=this,d=c.getMeta(),e=c.getScaleForId(d.xAxisID),f=c.getBarIndex(b),g=c.getRuler(a),h=e.getPixelForValue(null,a,b,c.chart.isCombo);return
h-=c.chart.isCombo?g.tickWidth/2:0,e.options.stacked?h+g.categoryWidth/2+g.categorySpacing:h+g.barWidth/2+g.categorySpacing+g.barWidth*f+g.barSpacing/2+g.barSpacing*f},calculateBarY:function(a,b){var
c=this,d=c.getMeta(),e=c.getScaleForId(d.yAxisID),f=Number(c.getDataset().data[a]);if(e.options.stacked){for(var
g=0,h=0,i=0;i<b;i++){var
j=c.chart.data.datasets[i],k=c.chart.getDatasetMeta(i);if(k.bar&&k.yAxisID===e.id&&c.chart.isDatasetVisible(i)){var
l=Number(j.data[a]);l<0?h+=l||0:g+=l||0}}return
f<0?e.getPixelForValue(h+f):e.getPixelForValue(g+f)}return
e.getPixelForValue(f)},draw:function(a){var
c=this,d=a||1;b.each(c.getMeta().data,function(a,b){var
e=c.getDataset().data[b];null===e||void
0===e||isNaN(e)||a.transition(d).draw()},c)},setHoverStyle:function(a){var
c=this.chart.data.datasets[a._datasetIndex],d=a._index,e=a.custom||{},f=a._model;f.backgroundColor=e.hoverBackgroundColor?e.hoverBackgroundColor:b.getValueAtIndexOrDefault(c.hoverBackgroundColor,d,b.getHoverColor(f.backgroundColor)),f.borderColor=e.hoverBorderColor?e.hoverBorderColor:b.getValueAtIndexOrDefault(c.hoverBorderColor,d,b.getHoverColor(f.borderColor)),f.borderWidth=e.hoverBorderWidth?e.hoverBorderWidth:b.getValueAtIndexOrDefault(c.hoverBorderWidth,d,f.borderWidth)},removeHoverStyle:function(a){var
c=this.chart.data.datasets[a._datasetIndex],d=a._index,e=a.custom||{},f=a._model,g=this.chart.options.elements.rectangle;f.backgroundColor=e.backgroundColor?e.backgroundColor:b.getValueAtIndexOrDefault(c.backgroundColor,d,g.backgroundColor),f.borderColor=e.borderColor?e.borderColor:b.getValueAtIndexOrDefault(c.borderColor,d,g.borderColor),f.borderWidth=e.borderWidth?e.borderWidth:b.getValueAtIndexOrDefault(c.borderWidth,d,g.borderWidth)}}),a.defaults.horizontalBar={hover:{mode:"label"},scales:{xAxes:[{type:"linear",position:"bottom"}],yAxes:[{position:"left",type:"category",categoryPercentage:.8,barPercentage:.9,gridLines:{offsetGridLines:!0}}]},elements:{rectangle:{borderSkipped:"left"}},tooltips:{callbacks:{title:function(a,b){var
c="";return
a.length>0&&(a[0].yLabel?c=a[0].yLabel:b.labels.length>0&&a[0].index<b.labels.length&&(c=b.labels[a[0].index])),c},label:function(a,b){var
c=b.datasets[a.datasetIndex].label||"";return c+":
"+a.xLabel}}}},a.controllers.horizontalBar=a.controllers.bar.extend({updateElement:function(a,c,d){var
e=this,f=e.getMeta(),g=e.getScaleForId(f.xAxisID),h=e.getScaleForId(f.yAxisID),i=g.getBasePixel(),j=a.custom||{},k=e.getDataset(),l=e.chart.options.elements.rectangle;b.extend(a,{_xScale:g,_yScale:h,_datasetIndex:e.index,_index:c,_model:{x:d?i:e.calculateBarX(c,e.index),y:e.calculateBarY(c,e.index),label:e.chart.data.labels[c],datasetLabel:k.label,base:d?i:e.calculateBarBase(e.index,c),height:e.calculateBarHeight(c),backgroundColor:j.backgroundColor?j.backgroundColor:b.getValueAtIndexOrDefault(k.backgroundColor,c,l.backgroundColor),borderSkipped:j.borderSkipped?j.borderSkipped:l.borderSkipped,borderColor:j.borderColor?j.borderColor:b.getValueAtIndexOrDefault(k.borderColor,c,l.borderColor),borderWidth:j.borderWidth?j.borderWidth:b.getValueAtIndexOrDefault(k.borderWidth,c,l.borderWidth)},draw:function(){function
k(a){return h[(j+a)%4]}var
a=this._chart.ctx,b=this._view,c=b.height/2,d=b.y-c,e=b.y+c,f=b.base-(b.base-b.x),g=b.borderWidth/2;b.borderWidth&&(d+=g,e-=g,f+=g),a.beginPath(),a.fillStyle=b.backgroundColor,a.strokeStyle=b.borderColor,a.lineWidth=b.borderWidth;var
h=[[b.base,e],[b.base,d],[f,d],[f,e]],i=["bottom","left","top","right"],j=i.indexOf(b.borderSkipped,0);j===-1&&(j=0),a.moveTo.apply(a,k(0));for(var
l=1;l<4;l++)a.lineTo.apply(a,k(l));a.fill(),b.borderWidth&&a.stroke()},inRange:function(a,b){var
c=this._view,d=!1;return
c&&(d=c.x<c.base?b>=c.y-c.height/2&&b<=c.y+c.height/2&&a>=c.x&&a<=c.base:b>=c.y-c.height/2&&b<=c.y+c.height/2&&a>=c.base&&a<=c.x),d}}),a.pivot()},calculateBarBase:function(a,b){var
c=this,d=c.getMeta(),e=c.getScaleForId(d.xAxisID),f=0;if(e.options.stacked){for(var
g=c.chart,h=g.data.datasets,i=Number(h[a].data[b]),j=0;j<a;j++){var
k=h[j],l=g.getDatasetMeta(j);if(l.bar&&l.xAxisID===e.id&&g.isDatasetVisible(j)){var
m=Number(k.data[b]);f+=i<0?Math.min(m,0):Math.max(m,0)}}return
e.getPixelForValue(f)}return e.getBasePixel()},getRuler:function(a){var
f,b=this,c=b.getMeta(),d=b.getScaleForId(c.yAxisID),e=b.getBarCount();f="category"===d.options.type?d.getPixelForTick(a+1)-d.getPixelForTick(a):d.width/d.ticks.length;var
g=f*d.options.categoryPercentage,h=(f-f*d.options.categoryPercentage)/2,i=g/e;if(d.ticks.length!==b.chart.data.labels.length){var
j=d.ticks.length/b.chart.data.labels.length;i*=j}var
k=i*d.options.barPercentage,l=i-i*d.options.barPercentage;return{datasetCount:e,tickHeight:f,categoryHeight:g,categorySpacing:h,fullBarHeight:i,barHeight:k,barSpacing:l}},calculateBarHeight:function(a){var
b=this,c=b.getScaleForId(b.getMeta().yAxisID);if(c.options.barThickness)return
c.options.barThickness;var d=b.getRuler(a);return
c.options.stacked?d.categoryHeight:d.barHeight},calculateBarX:function(a,b){var
c=this,d=c.getMeta(),e=c.getScaleForId(d.xAxisID),f=Number(c.getDataset().data[a]);if(e.options.stacked){for(var
g=0,h=0,i=0;i<b;i++){var
j=c.chart.data.datasets[i],k=c.chart.getDatasetMeta(i);if(k.bar&&k.xAxisID===e.id&&c.chart.isDatasetVisible(i)){var
l=Number(j.data[a]);l<0?h+=l||0:g+=l||0}}return
f<0?e.getPixelForValue(h+f):e.getPixelForValue(g+f)}return
e.getPixelForValue(f)},calculateBarY:function(a,b){var
c=this,d=c.getMeta(),e=c.getScaleForId(d.yAxisID),f=c.getBarIndex(b),g=c.getRuler(a),h=e.getPixelForValue(null,a,b,c.chart.isCombo);return
h-=c.chart.isCombo?g.tickHeight/2:0,e.options.stacked?h+g.categoryHeight/2+g.categorySpacing:h+g.barHeight/2+g.categorySpacing+g.barHeight*f+g.barSpacing/2+g.barSpacing*f}})}},{}],16:[function(a,b,c){"use
strict";b.exports=function(a){var
b=a.helpers;a.defaults.bubble={hover:{mode:"single"},scales:{xAxes:[{type:"linear",position:"bottom",id:"x-axis-0"}],yAxes:[{type:"linear",position:"left",id:"y-axis-0"}]},tooltips:{callbacks:{title:function(){return""},label:function(a,b){var
c=b.datasets[a.datasetIndex].label||"",d=b.datasets[a.datasetIndex].data[a.index];return
c+": ("+d.x+", "+d.y+",
"+d.r+")"}}}},a.controllers.bubble=a.DatasetController.extend({dataElementType:a.elements.Point,update:function(a){var
c=this,d=c.getMeta(),e=d.data;b.each(e,function(b,d){c.updateElement(b,d,a)})},updateElement:function(c,d,e){var
f=this,g=f.getMeta(),h=f.getScaleForId(g.xAxisID),i=f.getScaleForId(g.yAxisID),j=c.custom||{},k=f.getDataset(),l=k.data[d],m=f.chart.options.elements.point,n=f.index;b.extend(c,{_xScale:h,_yScale:i,_datasetIndex:n,_index:d,_model:{x:e?h.getPixelForDecimal(.5):h.getPixelForValue("object"==typeof
l?l:NaN,d,n,f.chart.isCombo),y:e?i.getBasePixel():i.getPixelForValue(l,d,n),radius:e?0:j.radius?j.radius:f.getRadius(l),hitRadius:j.hitRadius?j.hitRadius:b.getValueAtIndexOrDefault(k.hitRadius,d,m.hitRadius)}}),a.DatasetController.prototype.removeHoverStyle.call(f,c,m);var
o=c._model;o.skip=j.skip?j.skip:isNaN(o.x)||isNaN(o.y),c.pivot()},getRadius:function(a){return
a.r||this.chart.options.elements.point.radius},setHoverStyle:function(c){var
d=this;a.DatasetController.prototype.setHoverStyle.call(d,c);var
e=d.chart.data.datasets[c._datasetIndex],f=c._index,g=c.custom||{},h=c._model;h.radius=g.hoverRadius?g.hoverRadius:b.getValueAtIndexOrDefault(e.hoverRadius,f,d.chart.options.elements.point.hoverRadius)+d.getRadius(e.data[f])},removeHoverStyle:function(b){var
c=this;a.DatasetController.prototype.removeHoverStyle.call(c,b,c.chart.options.elements.point);var
d=c.chart.data.datasets[b._datasetIndex].data[b._index],e=b.custom||{},f=b._model;f.radius=e.radius?e.radius:c.getRadius(d)}})}},{}],17:[function(a,b,c){"use
strict";b.exports=function(a){var
b=a.helpers,c=a.defaults;c.doughnut={animation:{animateRotate:!0,animateScale:!1},aspectRatio:1,hover:{mode:"single"},legendCallback:function(a){var
b=[];b.push('<ul
class="'+a.id+'-legend">');var
c=a.data,d=c.datasets,e=c.labels;if(d.length)for(var
f=0;f<d[0].data.length;++f)b.push('<li><span
style="background-color:'+d[0].backgroundColor[f]+'"></span>'),e[f]&&b.push(e[f]),b.push("</li>");return
b.push("</ul>"),b.join("")},legend:{labels:{generateLabels:function(a){var
c=a.data;return
c.labels.length&&c.datasets.length?c.labels.map(function(d,e){var
f=a.getDatasetMeta(0),g=c.datasets[0],h=f.data[e],i=h&&h.custom||{},j=b.getValueAtIndexOrDefault,k=a.options.elements.arc,l=i.backgroundColor?i.backgroundColor:j(g.backgroundColor,e,k.backgroundColor),m=i.borderColor?i.borderColor:j(g.borderColor,e,k.borderColor),n=i.borderWidth?i.borderWidth:j(g.borderWidth,e,k.borderWidth);return{text:d,fillStyle:l,strokeStyle:m,lineWidth:n,hidden:isNaN(g.data[e])||f.data[e].hidden,index:e}}):[]}},onClick:function(a,b){var
e,f,g,c=b.index,d=this.chart;for(e=0,f=(d.data.datasets||[]).length;e<f;++e)g=d.getDatasetMeta(e),g.data[c].hidden=!g.data[c].hidden;d.update()}},cutoutPercentage:50,rotation:Math.PI*-.5,circumference:2*Math.PI,tooltips:{callbacks:{title:function(){return""},label:function(a,b){return
b.labels[a.index]+":
"+b.datasets[a.datasetIndex].data[a.index]}}}},c.pie=b.clone(c.doughnut),b.extend(c.pie,{cutoutPercentage:0}),a.controllers.doughnut=a.controllers.pie=a.DatasetController.extend({dataElementType:a.elements.Arc,linkScales:b.noop,getRingIndex:function(a){for(var
b=0,c=0;c<a;++c)this.chart.isDatasetVisible(c)&&++b;return
b},update:function(a){var
c=this,d=c.chart,e=d.chartArea,f=d.options,g=f.elements.arc,h=e.right-e.left-g.borderWidth,i=e.bottom-e.top-g.borderWidth,j=Math.min(h,i),k={x:0,y:0},l=c.getMeta(),m=f.cutoutPercentage,n=f.circumference;if(n<2*Math.PI){var
o=f.rotation%(2*Math.PI);o+=2*Math.PI*(o>=Math.PI?-1:o<-Math.PI?1:0);var
p=o+n,q={x:Math.cos(o),y:Math.sin(o)},r={x:Math.cos(p),y:Math.sin(p)},s=o<=0&&0<=p||o<=2*Math.PI&&2*Math.PI<=p,t=o<=.5*Math.PI&&.5*Math.PI<=p||o<=2.5*Math.PI&&2.5*Math.PI<=p,u=o<=-Math.PI&&-Math.PI<=p||o<=Math.PI&&Math.PI<=p,v=o<=.5*-Math.PI&&.5*-Math.PI<=p||o<=1.5*Math.PI&&1.5*Math.PI<=p,w=m/100,x={x:u?-1:Math.min(q.x*(q.x<0?1:w),r.x*(r.x<0?1:w)),y:v?-1:Math.min(q.y*(q.y<0?1:w),r.y*(r.y<0?1:w))},y={x:s?1:Math.max(q.x*(q.x>0?1:w),r.x*(r.x>0?1:w)),y:t?1:Math.max(q.y*(q.y>0?1:w),r.y*(r.y>0?1:w))},z={width:.5*(y.x-x.x),height:.5*(y.y-x.y)};j=Math.min(h/z.width,i/z.height),k={x:(y.x+x.x)*-.5,y:(y.y+x.y)*-.5}}d.borderWidth=c.getMaxBorderWidth(l.data),d.outerRadius=Math.max((j-d.borderWidth)/2,0),d.innerRadius=Math.max(m?d.outerRadius/100*m:1,0),d.radiusLength=(d.outerRadius-d.innerRadius)/d.getVisibleDatasetCount(),d.offsetX=k.x*d.outerRadius,d.offsetY=k.y*d.outerRadius,l.total=c.calculateTotal(),c.outerRadius=d.outerRadius-d.radiusLength*c.getRingIndex(c.index),c.innerRadius=c.outerRadius-d.radiusLength,b.each(l.data,function(b,d){c.updateElement(b,d,a)})},updateElement:function(a,c,d){var
e=this,f=e.chart,g=f.chartArea,h=f.options,i=h.animation,j=(g.left+g.right)/2,k=(g.top+g.bottom)/2,l=h.rotation,m=h.rotation,n=e.getDataset(),o=d&&i.animateRotate?0:a.hidden?0:e.calculateCircumference(n.data[c])*(h.circumference/(2*Math.PI)),p=d&&i.animateScale?0:e.innerRadius,q=d&&i.animateScale?0:e.outerRadius,r=b.getValueAtIndexOrDefault;b.extend(a,{_datasetIndex:e.index,_index:c,_model:{x:j+f.offsetX,y:k+f.offsetY,startAngle:l,endAngle:m,circumference:o,outerRadius:q,innerRadius:p,label:r(n.label,c,f.data.labels[c])}});var
s=a._model;this.removeHoverStyle(a),d&&i.animateRotate||(0===c?s.startAngle=h.rotation:s.startAngle=e.getMeta().data[c-1]._model.endAngle,s.endAngle=s.startAngle+s.circumference),a.pivot()},removeHoverStyle:function(b){a.DatasetController.prototype.removeHoverStyle.call(this,b,this.chart.options.elements.arc)},calculateTotal:function(){var
e,a=this.getDataset(),c=this.getMeta(),d=0;return
b.each(c.data,function(b,c){e=a.data[c],isNaN(e)||b.hidden||(d+=Math.abs(e))}),d},calculateCircumference:function(a){var
b=this.getMeta().total;return
b>0&&!isNaN(a)?2*Math.PI*(a/b):0},getMaxBorderWidth:function(a){for(var
e,f,b=0,c=this.index,d=a.length,g=0;g<d;g++)e=a[g]._model?a[g]._model.borderWidth:0,f=a[g]._chart?a[g]._chart.config.data.datasets[c].hoverBorderWidth:0,b=e>b?e:b,b=f>b?f:b;return
b}})}},{}],18:[function(a,b,c){"use
strict";b.exports=function(a){function c(a,c){return
b.getValueOrDefault(a.showLine,c.showLines)}var
b=a.helpers;a.defaults.line={showLines:!0,spanGaps:!1,hover:{mode:"label"},scales:{xAxes:[{type:"category",id:"x-axis-0"}],yAxes:[{type:"linear",id:"y-axis-0"}]}},a.controllers.line=a.DatasetController.extend({datasetElementType:a.elements.Line,dataElementType:a.elements.Point,addElementAndReset:function(b){var
d=this,e=d.chart.options,f=d.getMeta();a.DatasetController.prototype.addElementAndReset.call(d,b),c(d.getDataset(),e)&&0!==f.dataset._model.tension&&d.updateBezierControlPoints()},update:function(a){var
k,l,m,d=this,e=d.getMeta(),f=e.dataset,g=e.data||[],h=d.chart.options,i=h.elements.line,j=d.getScaleForId(e.yAxisID),n=d.getDataset(),o=c(n,h);for(o&&(m=f.custom||{},void
0!==n.tension&&void
0===n.lineTension&&(n.lineTension=n.tension),f._scale=j,f._datasetIndex=d.index,f._children=g,f._model={spanGaps:n.spanGaps?n.spanGaps:h.spanGaps,tension:m.tension?m.tension:b.getValueOrDefault(n.lineTension,i.tension),backgroundColor:m.backgroundColor?m.backgroundColor:n.backgroundColor||i.backgroundColor,borderWidth:m.borderWidth?m.borderWidth:n.borderWidth||i.borderWidth,borderColor:m.borderColor?m.borderColor:n.borderColor||i.borderColor,borderCapStyle:m.borderCapStyle?m.borderCapStyle:n.borderCapStyle||i.borderCapStyle,borderDash:m.borderDash?m.borderDash:n.borderDash||i.borderDash,borderDashOffset:m.borderDashOffset?m.borderDashOffset:n.borderDashOffset||i.borderDashOffset,borderJoinStyle:m.borderJoinStyle?m.borderJoinStyle:n.borderJoinStyle||i.borderJoinStyle,fill:m.fill?m.fill:void
0!==n.fill?n.fill:i.fill,steppedLine:m.steppedLine?m.steppedLine:b.getValueOrDefault(n.steppedLine,i.stepped),scaleTop:j.top,scaleBottom:j.bottom,scaleZero:j.getBasePixel()},f.pivot()),k=0,l=g.length;k<l;++k)d.updateElement(g[k],k,a);for(o&&0!==f._model.tension&&d.updateBezierControlPoints(),k=0,l=g.length;k<l;++k)g[k].pivot()},getPointBackgroundColor:function(a,c){var
d=this.chart.options.elements.point.backgroundColor,e=this.getDataset(),f=a.custom||{};return
f.backgroundColor?d=f.backgroundColor:e.pointBackgroundColor?d=b.getValueAtIndexOrDefault(e.pointBackgroundColor,c,d):e.backgroundColor&&(d=e.backgroundColor),d},getPointBorderColor:function(a,c){var
d=this.chart.options.elements.point.borderColor,e=this.getDataset(),f=a.custom||{};return
f.borderColor?d=f.borderColor:e.pointBorderColor?d=b.getValueAtIndexOrDefault(e.pointBorderColor,c,d):e.borderColor&&(d=e.borderColor),d},getPointBorderWidth:function(a,c){var
d=this.chart.options.elements.point.borderWidth,e=this.getDataset(),f=a.custom||{};return
f.borderWidth?d=f.borderWidth:e.pointBorderWidth?d=b.getValueAtIndexOrDefault(e.pointBorderWidth,c,d):e.borderWidth&&(d=e.borderWidth),d},updateElement:function(a,c,d){var
n,o,e=this,f=e.getMeta(),g=a.custom||{},h=e.getDataset(),i=e.index,j=h.data[c],k=e.getScaleForId(f.yAxisID),l=e.getScaleForId(f.xAxisID),m=e.chart.options.elements.point;void
0!==h.radius&&void
0===h.pointRadius&&(h.pointRadius=h.radius),void
0!==h.hitRadius&&void
0===h.pointHitRadius&&(h.pointHitRadius=h.hitRadius),n=l.getPixelForValue("object"==typeof
j?j:NaN,c,i,e.chart.isCombo),o=d?k.getBasePixel():e.calculatePointY(j,c,i),a._xScale=l,a._yScale=k,a._datasetIndex=i,a._index=c,a._model={x:n,y:o,skip:g.skip||isNaN(n)||isNaN(o),radius:g.radius||b.getValueAtIndexOrDefault(h.pointRadius,c,m.radius),pointStyle:g.pointStyle||b.getValueAtIndexOrDefault(h.pointStyle,c,m.pointStyle),backgroundColor:e.getPointBackgroundColor(a,c),borderColor:e.getPointBorderColor(a,c),borderWidth:e.getPointBorderWidth(a,c),tension:f.dataset._model?f.dataset._model.tension:0,steppedLine:!!f.dataset._model&&f.dataset._model.steppedLine,hitRadius:g.hitRadius||b.getValueAtIndexOrDefault(h.pointHitRadius,c,m.hitRadius)}},calculatePointY:function(a,b,c){var
j,k,l,d=this,e=d.chart,f=d.getMeta(),g=d.getScaleForId(f.yAxisID),h=0,i=0;if(g.options.stacked){for(j=0;j<c;j++)if(k=e.data.datasets[j],l=e.getDatasetMeta(j),"line"===l.type&&l.yAxisID===g.id&&e.isDatasetVisible(j)){var
m=Number(g.getRightValue(k.data[b]));m<0?i+=m||0:h+=m||0}var
n=Number(g.getRightValue(a));return
n<0?g.getPixelForValue(i+n):g.getPixelForValue(h+n)}return
g.getPixelForValue(a)},updateBezierControlPoints:function(){function
l(a,b,c){return k?Math.max(Math.min(a,c),b):a}var
f,g,h,i,j,a=this,c=a.getMeta(),d=a.chart.chartArea,e=(c.data||[]).filter(function(a){return!a._model.skip}),k=a.chart.options.elements.line.capBezierPoints;for(f=0,g=e.length;f<g;++f)h=e[f],i=h._model,j=b.splineCurve(b.previousItem(e,f)._model,i,b.nextItem(e,f)._model,c.dataset._model.tension),i.controlPointPreviousX=l(j.previous.x,d.left,d.right),i.controlPointPreviousY=l(j.previous.y,d.top,d.bottom),i.controlPointNextX=l(j.next.x,d.left,d.right),i.controlPointNextY=l(j.next.y,d.top,d.bottom)},draw:function(a){var
g,h,b=this,d=b.getMeta(),e=d.data||[],f=a||1;for(g=0,h=e.length;g<h;++g)e[g].transition(f);for(c(b.getDataset(),b.chart.options)&&d.dataset.transition(f).draw(),g=0,h=e.length;g<h;++g)e[g].draw()},setHoverStyle:function(a){var
c=this.chart.data.datasets[a._datasetIndex],d=a._index,e=a.custom||{},f=a._model;f.radius=e.hoverRadius||b.getValueAtIndexOrDefault(c.pointHoverRadius,d,this.chart.options.elements.point.hoverRadius),f.backgroundColor=e.hoverBackgroundColor||b.getValueAtIndexOrDefault(c.pointHoverBackgroundColor,d,b.getHoverColor(f.backgroundColor)),f.borderColor=e.hoverBorderColor||b.getValueAtIndexOrDefault(c.pointHoverBorderColor,d,b.getHoverColor(f.borderColor)),f.borderWidth=e.hoverBorderWidth||b.getValueAtIndexOrDefault(c.pointHoverBorderWidth,d,f.borderWidth)},removeHoverStyle:function(a){var
c=this,d=c.chart.data.datasets[a._datasetIndex],e=a._index,f=a.custom||{},g=a._model;void
0!==d.radius&&void
0===d.pointRadius&&(d.pointRadius=d.radius),g.radius=f.radius||b.getValueAtIndexOrDefault(d.pointRadius,e,c.chart.options.elements.point.radius),g.backgroundColor=c.getPointBackgroundColor(a,e),g.borderColor=c.getPointBorderColor(a,e),g.borderWidth=c.getPointBorderWidth(a,e)}})}},{}],19:[function(a,b,c){"use
strict";b.exports=function(a){var
b=a.helpers;a.defaults.polarArea={scale:{type:"radialLinear",lineArc:!0,ticks:{beginAtZero:!0}},animation:{animateRotate:!0,animateScale:!0},startAngle:-.5*Math.PI,aspectRatio:1,legendCallback:function(a){var
b=[];b.push('<ul
class="'+a.id+'-legend">');var
c=a.data,d=c.datasets,e=c.labels;if(d.length)for(var
f=0;f<d[0].data.length;++f)b.push('<li><span
style="background-color:'+d[0].backgroundColor[f]+'">'),e[f]&&b.push(e[f]),b.push("</span></li>");return
b.push("</ul>"),b.join("")},legend:{labels:{generateLabels:function(a){var
c=a.data;return
c.labels.length&&c.datasets.length?c.labels.map(function(d,e){var
f=a.getDatasetMeta(0),g=c.datasets[0],h=f.data[e],i=h.custom||{},j=b.getValueAtIndexOrDefault,k=a.options.elements.arc,l=i.backgroundColor?i.backgroundColor:j(g.backgroundColor,e,k.backgroundColor),m=i.borderColor?i.borderColor:j(g.borderColor,e,k.borderColor),n=i.borderWidth?i.borderWidth:j(g.borderWidth,e,k.borderWidth);return{text:d,fillStyle:l,strokeStyle:m,lineWidth:n,hidden:isNaN(g.data[e])||f.data[e].hidden,index:e}}):[]}},onClick:function(a,b){var
e,f,g,c=b.index,d=this.chart;for(e=0,f=(d.data.datasets||[]).length;e<f;++e)g=d.getDatasetMeta(e),g.data[c].hidden=!g.data[c].hidden;d.update()}},tooltips:{callbacks:{title:function(){return""},label:function(a,b){return
b.labels[a.index]+":
"+a.yLabel}}}},a.controllers.polarArea=a.DatasetController.extend({dataElementType:a.elements.Arc,linkScales:b.noop,update:function(a){var
c=this,d=c.chart,e=d.chartArea,f=c.getMeta(),g=d.options,h=g.elements.arc,i=Math.min(e.right-e.left,e.bottom-e.top);
d.outerRadius=Math.max((i-h.borderWidth/2)/2,0),d.innerRadius=Math.max(g.cutoutPercentage?d.outerRadius/100*g.cutoutPercentage:1,0),d.radiusLength=(d.outerRadius-d.innerRadius)/d.getVisibleDatasetCount(),c.outerRadius=d.outerRadius-d.radiusLength*c.index,c.innerRadius=c.outerRadius-d.radiusLength,f.count=c.countVisibleElements(),b.each(f.data,function(b,d){c.updateElement(b,d,a)})},updateElement:function(a,c,d){for(var
e=this,f=e.chart,g=e.getDataset(),h=f.options,i=h.animation,j=f.scale,k=b.getValueAtIndexOrDefault,l=f.data.labels,m=e.calculateCircumference(g.data[c]),n=j.xCenter,o=j.yCenter,p=0,q=e.getMeta(),r=0;r<c;++r)isNaN(g.data[r])||q.data[r].hidden||++p;var
s=h.startAngle,t=a.hidden?0:j.getDistanceFromCenterForValue(g.data[c]),u=s+m*p,v=u+(a.hidden?0:m),w=i.animateScale?0:j.getDistanceFromCenterForValue(g.data[c]);b.extend(a,{_datasetIndex:e.index,_index:c,_scale:j,_model:{x:n,y:o,innerRadius:0,outerRadius:d?w:t,startAngle:d&&i.animateRotate?s:u,endAngle:d&&i.animateRotate?s:v,label:k(l,c,l[c])}}),e.removeHoverStyle(a),a.pivot()},removeHoverStyle:function(b){a.DatasetController.prototype.removeHoverStyle.call(this,b,this.chart.options.elements.arc)},countVisibleElements:function(){var
a=this.getDataset(),c=this.getMeta(),d=0;return
b.each(c.data,function(b,c){isNaN(a.data[c])||b.hidden||d++}),d},calculateCircumference:function(a){var
b=this.getMeta().count;return
b>0&&!isNaN(a)?2*Math.PI/b:0}})}},{}],20:[function(a,b,c){"use
strict";b.exports=function(a){var
b=a.helpers;a.defaults.radar={scale:{type:"radialLinear"},elements:{line:{tension:0}}},a.controllers.radar=a.DatasetController.extend({datasetElementType:a.elements.Line,dataElementType:a.elements.Point,linkScales:b.noop,addElementAndReset:function(b){a.DatasetController.prototype.addElementAndReset.call(this,b),this.updateBezierControlPoints()},update:function(a){var
c=this,d=c.getMeta(),e=d.dataset,f=d.data,g=e.custom||{},h=c.getDataset(),i=c.chart.options.elements.line,j=c.chart.scale;void
0!==h.tension&&void
0===h.lineTension&&(h.lineTension=h.tension),b.extend(d.dataset,{_datasetIndex:c.index,_children:f,_loop:!0,_model:{tension:g.tension?g.tension:b.getValueOrDefault(h.lineTension,i.tension),backgroundColor:g.backgroundColor?g.backgroundColor:h.backgroundColor||i.backgroundColor,borderWidth:g.borderWidth?g.borderWidth:h.borderWidth||i.borderWidth,borderColor:g.borderColor?g.borderColor:h.borderColor||i.borderColor,fill:g.fill?g.fill:void
0!==h.fill?h.fill:i.fill,borderCapStyle:g.borderCapStyle?g.borderCapStyle:h.borderCapStyle||i.borderCapStyle,borderDash:g.borderDash?g.borderDash:h.borderDash||i.borderDash,borderDashOffset:g.borderDashOffset?g.borderDashOffset:h.borderDashOffset||i.borderDashOffset,borderJoinStyle:g.borderJoinStyle?g.borderJoinStyle:h.borderJoinStyle||i.borderJoinStyle,scaleTop:j.top,scaleBottom:j.bottom,scaleZero:j.getBasePosition()}}),d.dataset.pivot(),b.each(f,function(b,d){c.updateElement(b,d,a)},c),c.updateBezierControlPoints()},updateElement:function(a,c,d){var
e=this,f=a.custom||{},g=e.getDataset(),h=e.chart.scale,i=e.chart.options.elements.point,j=h.getPointPositionForValue(c,g.data[c]);b.extend(a,{_datasetIndex:e.index,_index:c,_scale:h,_model:{x:d?h.xCenter:j.x,y:d?h.yCenter:j.y,tension:f.tension?f.tension:b.getValueOrDefault(g.tension,e.chart.options.elements.line.tension),radius:f.radius?f.radius:b.getValueAtIndexOrDefault(g.pointRadius,c,i.radius),backgroundColor:f.backgroundColor?f.backgroundColor:b.getValueAtIndexOrDefault(g.pointBackgroundColor,c,i.backgroundColor),borderColor:f.borderColor?f.borderColor:b.getValueAtIndexOrDefault(g.pointBorderColor,c,i.borderColor),borderWidth:f.borderWidth?f.borderWidth:b.getValueAtIndexOrDefault(g.pointBorderWidth,c,i.borderWidth),pointStyle:f.pointStyle?f.pointStyle:b.getValueAtIndexOrDefault(g.pointStyle,c,i.pointStyle),hitRadius:f.hitRadius?f.hitRadius:b.getValueAtIndexOrDefault(g.hitRadius,c,i.hitRadius)}}),a._model.skip=f.skip?f.skip:isNaN(a._model.x)||isNaN(a._model.y)},updateBezierControlPoints:function(){var
a=this.chart.chartArea,c=this.getMeta();b.each(c.data,function(d,e){var
f=d._model,g=b.splineCurve(b.previousItem(c.data,e,!0)._model,f,b.nextItem(c.data,e,!0)._model,f.tension);f.controlPointPreviousX=Math.max(Math.min(g.previous.x,a.right),a.left),f.controlPointPreviousY=Math.max(Math.min(g.previous.y,a.bottom),a.top),f.controlPointNextX=Math.max(Math.min(g.next.x,a.right),a.left),f.controlPointNextY=Math.max(Math.min(g.next.y,a.bottom),a.top),d.pivot()})},draw:function(a){var
c=this.getMeta(),d=a||1;b.each(c.data,function(a){a.transition(d)}),c.dataset.transition(d).draw(),b.each(c.data,function(a){a.draw()})},setHoverStyle:function(a){var
c=this.chart.data.datasets[a._datasetIndex],d=a.custom||{},e=a._index,f=a._model;f.radius=d.hoverRadius?d.hoverRadius:b.getValueAtIndexOrDefault(c.pointHoverRadius,e,this.chart.options.elements.point.hoverRadius),f.backgroundColor=d.hoverBackgroundColor?d.hoverBackgroundColor:b.getValueAtIndexOrDefault(c.pointHoverBackgroundColor,e,b.getHoverColor(f.backgroundColor)),f.borderColor=d.hoverBorderColor?d.hoverBorderColor:b.getValueAtIndexOrDefault(c.pointHoverBorderColor,e,b.getHoverColor(f.borderColor)),f.borderWidth=d.hoverBorderWidth?d.hoverBorderWidth:b.getValueAtIndexOrDefault(c.pointHoverBorderWidth,e,f.borderWidth)},removeHoverStyle:function(a){var
c=this.chart.data.datasets[a._datasetIndex],d=a.custom||{},e=a._index,f=a._model,g=this.chart.options.elements.point;f.radius=d.radius?d.radius:b.getValueAtIndexOrDefault(c.radius,e,g.radius),f.backgroundColor=d.backgroundColor?d.backgroundColor:b.getValueAtIndexOrDefault(c.pointBackgroundColor,e,g.backgroundColor),f.borderColor=d.borderColor?d.borderColor:b.getValueAtIndexOrDefault(c.pointBorderColor,e,g.borderColor),f.borderWidth=d.borderWidth?d.borderWidth:b.getValueAtIndexOrDefault(c.pointBorderWidth,e,g.borderWidth)}})}},{}],21:[function(a,b,c){"use
strict";b.exports=function(a){var
b=a.helpers;a.defaults.global.animation={duration:1e3,easing:"easeOutQuart",onProgress:b.noop,onComplete:b.noop},a.Animation=a.Element.extend({currentStep:null,numSteps:60,easing:"",render:null,onAnimationProgress:null,onAnimationComplete:null}),a.animationService={frameDuration:17,animations:[],dropFrames:0,request:null,addAnimation:function(a,b,c,d){var
e=this;d||(a.animating=!0);for(var
f=0;f<e.animations.length;++f)if(e.animations[f].chartInstance===a)return
void(e.animations[f].animationObject=b);e.animations.push({chartInstance:a,animationObject:b}),1===e.animations.length&&e.requestAnimationFrame()},cancelAnimation:function(a){var
c=b.findIndex(this.animations,function(b){return
b.chartInstance===a});c!==-1&&(this.animations.splice(c,1),a.animating=!1)},requestAnimationFrame:function(){var
a=this;null===a.request&&(a.request=b.requestAnimFrame.call(window,function(){a.request=null,a.startDigest()}))},startDigest:function(){var
a=this,b=Date.now(),c=0;a.dropFrames>1&&(c=Math.floor(a.dropFrames),a.dropFrames=a.dropFrames%1);for(var
d=0;d<a.animations.length;)null===a.animations[d].animationObject.currentStep&&(a.animations[d].animationObject.currentStep=0),a.animations[d].animationObject.currentStep+=1+c,a.animations[d].animationObject.currentStep>a.animations[d].animationObject.numSteps&&(a.animations[d].animationObject.currentStep=a.animations[d].animationObject.numSteps),a.animations[d].animationObject.render(a.animations[d].chartInstance,a.animations[d].animationObject),a.animations[d].animationObject.onAnimationProgress&&a.animations[d].animationObject.onAnimationProgress.call&&a.animations[d].animationObject.onAnimationProgress.call(a.animations[d].chartInstance,a.animations[d]),a.animations[d].animationObject.currentStep===a.animations[d].animationObject.numSteps?(a.animations[d].animationObject.onAnimationComplete&&a.animations[d].animationObject.onAnimationComplete.call&&a.animations[d].animationObject.onAnimationComplete.call(a.animations[d].chartInstance,a.animations[d]),a.animations[d].chartInstance.animating=!1,a.animations.splice(d,1)):++d;var
e=Date.now(),f=(e-b)/a.frameDuration;a.dropFrames+=f,a.animations.length>0&&a.requestAnimationFrame()}}}},{}],22:[function(a,b,c){"use
strict";b.exports=function(a){var
b=a.canvasHelpers={};b.drawPoint=function(a,b,c,d,e){var
f,g,h,i,j,k;if("object"==typeof
b&&(f=b.toString(),"[object
HTMLImageElement]"===f||"[object
HTMLCanvasElement]"===f))return void
a.drawImage(b,d-b.width/2,e-b.height/2);if(!(isNaN(c)||c<=0)){switch(b){default:a.beginPath(),a.arc(d,e,c,0,2*Math.PI),a.closePath(),a.fill();break;case"triangle":a.beginPath(),g=3*c/Math.sqrt(3),j=g*Math.sqrt(3)/2,a.moveTo(d-g/2,e+j/3),a.lineTo(d+g/2,e+j/3),a.lineTo(d,e-2*j/3),a.closePath(),a.fill();break;case"rect":k=1/Math.SQRT2*c,a.beginPath(),a.fillRect(d-k,e-k,2*k,2*k),a.strokeRect(d-k,e-k,2*k,2*k);break;case"rectRot":k=1/Math.SQRT2*c,a.beginPath(),a.moveTo(d-k,e),a.lineTo(d,e+k),a.lineTo(d+k,e),a.lineTo(d,e-k),a.closePath(),a.fill();break;case"cross":a.beginPath(),a.moveTo(d,e+c),a.lineTo(d,e-c),a.moveTo(d-c,e),a.lineTo(d+c,e),a.closePath();break;case"crossRot":a.beginPath(),h=Math.cos(Math.PI/4)*c,i=Math.sin(Math.PI/4)*c,a.moveTo(d-h,e-i),a.lineTo(d+h,e+i),a.moveTo(d-h,e+i),a.lineTo(d+h,e-i),a.closePath();break;case"star":a.beginPath(),a.moveTo(d,e+c),a.lineTo(d,e-c),a.moveTo(d-c,e),a.lineTo(d+c,e),h=Math.cos(Math.PI/4)*c,i=Math.sin(Math.PI/4)*c,a.moveTo(d-h,e-i),a.lineTo(d+h,e+i),a.moveTo(d-h,e+i),a.lineTo(d+h,e-i),a.closePath();break;case"line":a.beginPath(),a.moveTo(d-c,e),a.lineTo(d+c,e),a.closePath();break;case"dash":a.beginPath(),a.moveTo(d,e),a.lineTo(d+c,e),a.closePath()}a.stroke()}}}},{}],23:[function(a,b,c){"use
strict";b.exports=function(a){var
b=a.helpers;a.types={},a.instances={},a.controllers={},a.Controller=function(c){return
this.chart=c,this.config=c.config,this.options=this.config.options=b.configMerge(a.defaults.global,a.defaults[this.config.type],this.config.options||{}),this.id=b.uid(),Object.defineProperty(this,"data",{get:function(){return
this.config.data}}),a.instances[this.id]=this,this.options.responsive&&this.resize(!0),this.initialize(),this},b.extend(a.Controller.prototype,{initialize:function(){var
b=this;return
a.plugins.notify("beforeInit",[b]),b.bindEvents(),b.ensureScalesHaveIDs(),b.buildOrUpdateControllers(),b.buildScales(),b.updateLayout(),b.resetElements(),b.initToolTip(),b.update(),a.plugins.notify("afterInit",[b]),b},clear:function(){return
b.clear(this.chart),this},stop:function(){return
a.animationService.cancelAnimation(this),this},resize:function(d){var
e=this,f=e.chart,g=f.canvas,h=b.getMaximumWidth(g),i=f.aspectRatio,j=e.options.maintainAspectRatio&&isNaN(i)===!1&&isFinite(i)&&0!==i?h/i:b.getMaximumHeight(g),k=f.width!==h||f.height!==j;if(!k)return
e;g.width=f.width=h,g.height=f.height=j,b.retinaScale(f);var
l={width:h,height:j};return
a.plugins.notify("resize",[e,l]),e.options.onResize&&e.options.onResize(e,l),d||(e.stop(),e.update(e.options.responsiveAnimationDuration)),e},ensureScalesHaveIDs:function(){var
a=this.options,c=a.scales||{},d=a.scale;b.each(c.xAxes,function(a,b){a.id=a.id||"x-axis-"+b}),b.each(c.yAxes,function(a,b){a.id=a.id||"y-axis-"+b}),d&&(d.id=d.id||"scale")},buildScales:function(){var
c=this,d=c.options,e=c.scales={},f=[];d.scales&&(f=f.concat((d.scales.xAxes||[]).map(function(a){return{options:a,dtype:"category"}}),(d.scales.yAxes||[]).map(function(a){return{options:a,dtype:"linear"}}))),d.scale&&f.push({options:d.scale,dtype:"radialLinear",isDefault:!0}),b.each(f,function(d){var
f=d.options,g=b.getValueOrDefault(f.type,d.dtype),h=a.scaleService.getScaleConstructor(g);if(h){var
i=new
h({id:f.id,options:f,ctx:c.chart.ctx,chart:c});e[i.id]=i,d.isDefault&&(c.scale=i)}}),a.scaleService.addScalesToLayout(this)},updateLayout:function(){a.layoutService.update(this,this.chart.width,this.chart.height)},buildOrUpdateControllers:function(){var
c=this,d=[],e=[];if(b.each(c.data.datasets,function(b,f){var
g=c.getDatasetMeta(f);g.type||(g.type=b.type||c.config.type),d.push(g.type),g.controller?g.controller.updateIndex(f):(g.controller=new
a.controllers[g.type](c,f),e.push(g.controller))},c),d.length>1)for(var
f=1;f<d.length;f++)if(d[f]!==d[f-1]){c.isCombo=!0;break}return
e},resetElements:function(){var
a=this;b.each(a.data.datasets,function(b,c){a.getDatasetMeta(c).controller.reset()},a)},update:function(d,e){var
f=this;a.plugins.notify("beforeUpdate",[f]),f.tooltip._data=f.data;var
g=f.buildOrUpdateControllers();b.each(f.data.datasets,function(a,b){f.getDatasetMeta(b).controller.buildOrUpdateElements()},f),a.layoutService.update(f,f.chart.width,f.chart.height),a.plugins.notify("afterScaleUpdate",[f]),b.each(g,function(a){a.reset()}),f.updateDatasets(),a.plugins.notify("afterUpdate",[f]),f.render(d,e)},updateDatasets:function(){var
c,d,b=this;if(a.plugins.notify("beforeDatasetsUpdate",[b])){for(c=0,d=b.data.datasets.length;c<d;++c)b.getDatasetMeta(c).controller.update();a.plugins.notify("afterDatasetsUpdate",[b])}},render:function(d,e){var
f=this;a.plugins.notify("beforeRender",[f]);var
g=f.options.animation;if(g&&("undefined"!=typeof
d&&0!==d||"undefined"==typeof
d&&0!==g.duration)){var h=new
a.Animation;h.numSteps=(d||g.duration)/16.66,h.easing=g.easing,h.render=function(a,c){var
d=b.easingEffects[c.easing],e=c.currentStep/c.numSteps,f=d(e);a.draw(f,e,c.currentStep)},h.onAnimationProgress=g.onProgress,h.onAnimationComplete=g.onComplete,a.animationService.addAnimation(f,h,d,e)}else
f.draw(),g&&g.onComplete&&g.onComplete.call&&g.onComplete.call(f);return
f},draw:function(c){var
d=this,e=c||1;d.clear(),a.plugins.notify("beforeDraw",[d,e]),b.each(d.boxes,function(a){a.draw(d.chartArea)},d),d.scale&&d.scale.draw(),a.plugins.notify("beforeDatasetsDraw",[d,e]),b.each(d.data.datasets,function(a,b){d.isDatasetVisible(b)&&d.getDatasetMeta(b).controller.draw(c)},d,!0),a.plugins.notify("afterDatasetsDraw",[d,e]),d.tooltip.transition(e).draw(),a.plugins.notify("afterDraw",[d,e])},getElementAtEvent:function(a){var
c=this,d=b.getRelativePosition(a,c.chart),e=[];return
b.each(c.data.datasets,function(a,f){if(c.isDatasetVisible(f)){var
g=c.getDatasetMeta(f);b.each(g.data,function(a){if(a.inRange(d.x,d.y))return
e.push(a),e})}}),e.slice(0,1)},getElementsAtEvent:function(a){var
c=this,d=b.getRelativePosition(a,c.chart),e=[],f=function(){if(c.data.datasets)for(var
a=0;a<c.data.datasets.length;a++){var
b=c.getDatasetMeta(a);if(c.isDatasetVisible(a))for(var
e=0;e<b.data.length;e++)if(b.data[e].inRange(d.x,d.y))return
b.data[e]}}.call(c);return
f?(b.each(c.data.datasets,function(a,b){if(c.isDatasetVisible(b)){var
d=c.getDatasetMeta(b),g=d.data[f._index];g&&!g._view.skip&&e.push(g)}},c),e):e},getElementsAtXAxis:function(a){var
c=this,d=b.getRelativePosition(a,c.chart),e=[],f=function(){if(c.data.datasets)for(var
a=0;a<c.data.datasets.length;a++){var
b=c.getDatasetMeta(a);if(c.isDatasetVisible(a))for(var
e=0;e<b.data.length;e++)if(b.data[e].inLabelRange(d.x,d.y))return
b.data[e]}}.call(c);return
f?(b.each(c.data.datasets,function(a,d){if(c.isDatasetVisible(d)){var
g=c.getDatasetMeta(d),h=b.findIndex(g.data,function(a){return
f._model.x===a._model.x});h===-1||g.data[h]._view.skip||e.push(g.data[h])}},c),e):e},getElementsAtEventForMode:function(a,b){var
c=this;switch(b){case"single":return
c.getElementAtEvent(a);case"label":return
c.getElementsAtEvent(a);case"dataset":return
c.getDatasetAtEvent(a);case"x-axis":return
c.getElementsAtXAxis(a);default:return
a}},getDatasetAtEvent:function(a){var b=this.getElementAtEvent(a);return
b.length>0&&(b=this.getDatasetMeta(b[0]._datasetIndex).data),b},getDatasetMeta:function(a){var
b=this,c=b.data.datasets[a];c._meta||(c._meta={});var
d=c._meta[b.id];return
d||(d=c._meta[b.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null}),d},getVisibleDatasetCount:function(){for(var
a=0,b=0,c=this.data.datasets.length;b<c;++b)this.isDatasetVisible(b)&&a++;return
a},isDatasetVisible:function(a){var
b=this.getDatasetMeta(a);return"boolean"==typeof
b.hidden?!b.hidden:!this.data.datasets[a].hidden},generateLegend:function(){return
this.options.legendCallback(this)},destroy:function(){var
c=this;c.stop(),c.clear(),b.unbindEvents(c,c.events),b.removeResizeListener(c.chart.canvas.parentNode);var
d=c.chart.canvas;d.width=c.chart.width,d.height=c.chart.height,void
0!==c.chart.originalDevicePixelRatio&&c.chart.ctx.scale(1/c.chart.originalDevicePixelRatio,1/c.chart.originalDevicePixelRatio),d.style.width=c.chart.originalCanvasStyleWidth,d.style.height=c.chart.originalCanvasStyleHeight,a.plugins.notify("destroy",[c]),delete
a.instances[c.id]},toBase64Image:function(){return
this.chart.canvas.toDataURL.apply(this.chart.canvas,arguments)},initToolTip:function(){var
b=this;b.tooltip=new
a.Tooltip({_chart:b.chart,_chartInstance:b,_data:b.data,_options:b.options.tooltips},b)},bindEvents:function(){var
a=this;b.bindEvents(a,a.options.events,function(b){a.eventHandler(b)})},updateHoverStyle:function(a,b,c){var
e,f,g,d=c?"setHoverStyle":"removeHoverStyle";switch(b){case"single":a=[a[0]];break;case"label":case"dataset":case"x-axis":break;default:return}for(f=0,g=a.length;f<g;++f)e=a[f],e&&this.getDatasetMeta(e._datasetIndex).controller[d](e)},eventHandler:function(c){var
d=this,e=d.tooltip,f=d.options||{},g=f.hover,h=f.tooltips;return
d.lastActive=d.lastActive||[],d.lastTooltipActive=d.lastTooltipActive||[],"mouseout"===c.type?(d.active=[],d.tooltipActive=[]):(d.active=d.getElementsAtEventForMode(c,g.mode),d.tooltipActive=d.getElementsAtEventForMode(c,h.mode)),g.onHover&&g.onHover.call(d,d.active),"mouseup"!==c.type&&"click"!==c.type||(f.onClick&&f.onClick.call(d,c,d.active),d.legend&&d.legend.handleEvent&&d.legend.handleEvent(c)),d.lastActive.length&&d.updateHoverStyle(d.lastActive,g.mode,!1),d.active.length&&g.mode&&d.updateHoverStyle(d.active,g.mode,!0),(h.enabled||h.custom)&&(e.initialize(),e._active=d.tooltipActive,e.update(!0)),e.pivot(),d.animating||b.arrayEquals(d.active,d.lastActive)&&b.arrayEquals(d.tooltipActive,d.lastTooltipActive)||(d.stop(),(h.enabled||h.custom)&&e.update(!0),d.render(g.animationDuration,!0)),d.lastActive=d.active,d.lastTooltipActive=d.tooltipActive,d}})}},{}],24:[function(a,b,c){"use
strict";b.exports=function(a){var
b=a.helpers,c=b.noop;a.DatasetController=function(a,b){this.initialize.call(this,a,b)},b.extend(a.DatasetController.prototype,{datasetElementType:null,dataElementType:null,initialize:function(a,b){var
c=this;c.chart=a,c.index=b,c.linkScales(),c.addElements()},updateIndex:function(a){this.index=a},linkScales:function(){var
a=this,b=a.getMeta(),c=a.getDataset();null===b.xAxisID&&(b.xAxisID=c.xAxisID||a.chart.options.scales.xAxes[0].id),null===b.yAxisID&&(b.yAxisID=c.yAxisID||a.chart.options.scales.yAxes[0].id)},getDataset:function(){return
this.chart.data.datasets[this.index]},getMeta:function(){return
this.chart.getDatasetMeta(this.index)},getScaleForId:function(a){return
this.chart.scales[a]},reset:function(){this.update(!0)},createMetaDataset:function(){var
a=this,b=a.datasetElementType;return b&&new
b({_chart:a.chart.chart,_datasetIndex:a.index})},createMetaData:function(a){var
b=this,c=b.dataElementType;return c&&new
c({_chart:b.chart.chart,_datasetIndex:b.index,_index:a})},addElements:function(){var
e,f,a=this,b=a.getMeta(),c=a.getDataset().data||[],d=b.data;for(e=0,f=c.length;e<f;++e)d[e]=d[e]||a.createMetaData(b,e);b.dataset=b.dataset||a.createMetaDataset()},addElementAndReset:function(a){var
b=this,c=b.createMetaData(a);b.getMeta().data.splice(a,0,c),b.updateElement(c,a,!0)},buildOrUpdateElements:function(){var
a=this.getMeta(),b=a.data,c=this.getDataset().data.length,d=b.length;if(c<d)b.splice(c,d-c);else
if(c>d)for(var
e=d;e<c;++e)this.addElementAndReset(e)},update:c,draw:function(a){var
c=a||1;b.each(this.getMeta().data,function(a){a.transition(c).draw()})},removeHoverStyle:function(a,c){var
d=this.chart.data.datasets[a._datasetIndex],e=a._index,f=a.custom||{},g=b.getValueAtIndexOrDefault,h=a._model;h.backgroundColor=f.backgroundColor?f.backgroundColor:g(d.backgroundColor,e,c.backgroundColor),h.borderColor=f.borderColor?f.borderColor:g(d.borderColor,e,c.borderColor),h.borderWidth=f.borderWidth?f.borderWidth:g(d.borderWidth,e,c.borderWidth)},setHoverStyle:function(a){var
c=this.chart.data.datasets[a._datasetIndex],d=a._index,e=a.custom||{},f=b.getValueAtIndexOrDefault,g=b.getHoverColor,h=a._model;h.backgroundColor=e.hoverBackgroundColor?e.hoverBackgroundColor:f(c.hoverBackgroundColor,d,g(h.backgroundColor)),h.borderColor=e.hoverBorderColor?e.hoverBorderColor:f(c.hoverBorderColor,d,g(h.borderColor)),h.borderWidth=e.hoverBorderWidth?e.hoverBorderWidth:f(c.hoverBorderWidth,d,h.borderWidth)}}),a.DatasetController.extend=b.inherits}},{}],25:[function(a,b,c){"use
strict";b.exports=function(a){var
b=a.helpers;a.elements={},a.Element=function(a){b.extend(this,a),this.initialize.apply(this,arguments)},b.extend(a.Element.prototype,{initialize:function(){this.hidden=!1},pivot:function(){var
a=this;return
a._view||(a._view=b.clone(a._model)),a._start=b.clone(a._view),a},transition:function(a){var
c=this;return
c._view||(c._view=b.clone(c._model)),1===a?(c._view=c._model,c._start=null,c):(c._start||c.pivot(),b.each(c._model,function(d,e){if("_"===e[0]);else
if(c._view.hasOwnProperty(e))if(d===c._view[e]);else
if("string"==typeof d)try{var
f=b.color(c._model[e]).mix(b.color(c._start[e]),a);c._view[e]=f.rgbString()}catch(a){c._view[e]=d}else
if("number"==typeof d){var g=void
0!==c._start[e]&&isNaN(c._start[e])===!1?c._start[e]:0;c._view[e]=(c._model[e]-g)*a+g}else
c._view[e]=d;else"number"!=typeof
d||isNaN(c._view[e])?c._view[e]=d:c._view[e]=d*a},c),c)},tooltipPosition:function(){return{x:this._model.x,y:this._model.y}},hasValue:function(){return
b.isNumber(this._model.x)&&b.isNumber(this._model.y)}}),a.Element.extend=b.inherits}},{}],26:[function(a,b,c){"use
strict";var d=a(2);b.exports=function(a){function e(a,b,c){var
d;return"string"==typeof
a?(d=parseInt(a,10),a.indexOf("%")!=-1&&(d=d/100*b.parentNode[c])):d=a,d}function
f(a){return void
0!==a&&null!==a&&"none"!==a}function g(a,b,c){var
d=document.defaultView,g=a.parentNode,h=d.getComputedStyle(a)[b],i=d.getComputedStyle(g)[b],j=f(h),k=f(i),l=Number.POSITIVE_INFINITY;return
j||k?Math.min(j?e(h,a,c):l,k?e(i,g,c):l):"none"}var
b=a.helpers={};b.each=function(a,c,d,e){var
f,g;if(b.isArray(a))if(g=a.length,e)for(f=g-1;f>=0;f--)c.call(d,a[f],f);else
for(f=0;f<g;f++)c.call(d,a[f],f);else if("object"==typeof
a){var
h=Object.keys(a);for(g=h.length,f=0;f<g;f++)c.call(d,a[h[f]],h[f])}},b.clone=function(a){var
c={};return
b.each(a,function(a,d){b.isArray(a)?c[d]=a.slice(0):"object"==typeof
a&&null!==a?c[d]=b.clone(a):c[d]=a}),c},b.extend=function(a){for(var
c=function(b,c){a[c]=b},d=1,e=arguments.length;d<e;d++)b.each(arguments[d],c);return
a},b.configMerge=function(c){var d=b.clone(c);return
b.each(Array.prototype.slice.call(arguments,1),function(c){b.each(c,function(c,e){if("scales"===e)d[e]=b.scaleMerge(d.hasOwnProperty(e)?d[e]:{},c);else
if("scale"===e)d[e]=b.configMerge(d.hasOwnProperty(e)?d[e]:{},a.scaleService.getScaleDefaults(c.type),c);else
if(d.hasOwnProperty(e)&&b.isArray(d[e])&&b.isArray(c)){var
f=d[e];b.each(c,function(a,c){c<f.length?"object"==typeof
f[c]&&null!==f[c]&&"object"==typeof
a&&null!==a?f[c]=b.configMerge(f[c],a):f[c]=a:f.push(a)})}else
d.hasOwnProperty(e)&&"object"==typeof
d[e]&&null!==d[e]&&"object"==typeof
c?d[e]=b.configMerge(d[e],c):d[e]=c})}),d},b.scaleMerge=function(c,d){var
e=b.clone(c);return
b.each(d,function(c,d){"xAxes"===d||"yAxes"===d?e.hasOwnProperty(d)?b.each(c,function(c,f){var
g=b.getValueOrDefault(c.type,"xAxes"===d?"category":"linear"),h=a.scaleService.getScaleDefaults(g);f>=e[d].length||!e[d][f].type?e[d].push(b.configMerge(h,c)):c.type&&c.type!==e[d][f].type?e[d][f]=b.configMerge(e[d][f],h,c):e[d][f]=b.configMerge(e[d][f],c)}):(e[d]=[],b.each(c,function(c){var
f=b.getValueOrDefault(c.type,"xAxes"===d?"category":"linear");e[d].push(b.configMerge(a.scaleService.getScaleDefaults(f),c))})):e.hasOwnProperty(d)&&"object"==typeof
e[d]&&null!==e[d]&&"object"==typeof
c?e[d]=b.configMerge(e[d],c):e[d]=c}),e},b.getValueAtIndexOrDefault=function(a,c,d){return
void
0===a||null===a?d:b.isArray(a)?c<a.length?a[c]:d:a},b.getValueOrDefault=function(a,b){return
void 0===a?b:a},b.indexOf=Array.prototype.indexOf?function(a,b){return
a.indexOf(b)}:function(a,b){for(var
c=0,d=a.length;c<d;++c)if(a[c]===b)return
c;return-1},b.where=function(a,c){if(b.isArray(a)&&Array.prototype.filter)return
a.filter(c);var d=[];return
b.each(a,function(a){c(a)&&d.push(a)}),d},b.findIndex=Array.prototype.findIndex?function(a,b,c){return
a.findIndex(b,c)}:function(a,b,c){c=void 0===c?a:c;for(var
d=0,e=a.length;d<e;++d)if(b.call(c,a[d],d,a))return
d;return-1},b.findNextWhere=function(a,b,c){void
0!==c&&null!==c||(c=-1);for(var d=c+1;d<a.length;d++){var
e=a[d];if(b(e))return e}},b.findPreviousWhere=function(a,b,c){void
0!==c&&null!==c||(c=a.length);for(var d=c-1;d>=0;d--){var
e=a[d];if(b(e))return e}},b.inherits=function(a){var
c=this,d=a&&a.hasOwnProperty("constructor")?a.constructor:function(){return
c.apply(this,arguments)},e=function(){this.constructor=d};return
e.prototype=c.prototype,d.prototype=new
e,d.extend=b.inherits,a&&b.extend(d.prototype,a),d.__super__=c.prototype,d},b.noop=function(){},b.uid=function(){var
a=0;return function(){return
a++}}(),b.isNumber=function(a){return!isNaN(parseFloat(a))&&isFinite(a)},b.almostEquals=function(a,b,c){return
Math.abs(a-b)<c},b.max=function(a){return a.reduce(function(a,b){return
isNaN(b)?a:Math.max(a,b)},Number.NEGATIVE_INFINITY)},b.min=function(a){return
a.reduce(function(a,b){return
isNaN(b)?a:Math.min(a,b)},Number.POSITIVE_INFINITY)},b.sign=Math.sign?function(a){return
Math.sign(a)}:function(a){return
a=+a,0===a||isNaN(a)?a:a>0?1:-1},b.log10=Math.log10?function(a){return
Math.log10(a)}:function(a){return
Math.log(a)/Math.LN10},b.toRadians=function(a){return
a*(Math.PI/180)},b.toDegrees=function(a){return
a*(180/Math.PI)},b.getAngleFromPoint=function(a,b){var
c=b.x-a.x,d=b.y-a.y,e=Math.sqrt(c*c+d*d),f=Math.atan2(d,c);return
f<-.5*Math.PI&&(f+=2*Math.PI),{angle:f,distance:e}},b.aliasPixel=function(a){return
a%2===0?0:.5},b.splineCurve=function(a,b,c,d){var
e=a.skip?b:a,f=b,g=c.skip?b:c,h=Math.sqrt(Math.pow(f.x-e.x,2)+Math.pow(f.y-e.y,2)),i=Math.sqrt(Math.pow(g.x-f.x,2)+Math.pow(g.y-f.y,2)),j=h/(h+i),k=i/(h+i);j=isNaN(j)?0:j,k=isNaN(k)?0:k;var
l=d*j,m=d*k;return{previous:{x:f.x-l*(g.x-e.x),y:f.y-l*(g.y-e.y)},next:{x:f.x+m*(g.x-e.x),y:f.y+m*(g.y-e.y)}}},b.nextItem=function(a,b,c){return
c?b>=a.length-1?a[0]:a[b+1]:b>=a.length-1?a[a.length-1]:a[b+1]},b.previousItem=function(a,b,c){return
c?b<=0?a[a.length-1]:a[b-1]:b<=0?a[0]:a[b-1]},b.niceNum=function(a,c){var
f,d=Math.floor(b.log10(a)),e=a/Math.pow(10,d);return
f=c?e<1.5?1:e<3?2:e<7?5:10:e<=1?1:e<=2?2:e<=5?5:10,f*Math.pow(10,d)};var
c=b.easingEffects={linear:function(a){return
a},easeInQuad:function(a){return
a*a},easeOutQuad:function(a){return-1*a*(a-2)},easeInOutQuad:function(a){return(a/=.5)<1?.5*a*a:-.5*(--a*(a-2)-1)},easeInCubic:function(a){return
a*a*a},easeOutCubic:function(a){return
1*((a=a/1-1)*a*a+1)},easeInOutCubic:function(a){return(a/=.5)<1?.5*a*a*a:.5*((a-=2)*a*a+2)},easeInQuart:function(a){return
a*a*a*a},easeOutQuart:function(a){return-1*((a=a/1-1)*a*a*a-1)},easeInOutQuart:function(a){return(a/=.5)<1?.5*a*a*a*a:-.5*((a-=2)*a*a*a-2)},easeInQuint:function(a){return
1*(a/=1)*a*a*a*a},easeOutQuint:function(a){return
1*((a=a/1-1)*a*a*a*a+1)},easeInOutQuint:function(a){return(a/=.5)<1?.5*a*a*a*a*a:.5*((a-=2)*a*a*a*a+2)},easeInSine:function(a){return-1*Math.cos(a/1*(Math.PI/2))+1},easeOutSine:function(a){return
1*Math.sin(a/1*(Math.PI/2))},easeInOutSine:function(a){return-.5*(Math.cos(Math.PI*a/1)-1)},easeInExpo:function(a){return
0===a?1:1*Math.pow(2,10*(a/1-1))},easeOutExpo:function(a){return
1===a?1:1*(-Math.pow(2,-10*a/1)+1)},easeInOutExpo:function(a){return
0===a?0:1===a?1:(a/=.5)<1?.5*Math.pow(2,10*(a-1)):.5*(-Math.pow(2,-10*--a)+2)},easeInCirc:function(a){return
a>=1?a:-1*(Math.sqrt(1-(a/=1)*a)-1)},easeOutCirc:function(a){return
1*Math.sqrt(1-(a=a/1-1)*a)},easeInOutCirc:function(a){return(a/=.5)<1?-.5*(Math.sqrt(1-a*a)-1):.5*(Math.sqrt(1-(a-=2)*a)+1)},easeInElastic:function(a){var
b=1.70158,c=0,d=1;return
0===a?0:1===(a/=1)?1:(c||(c=.3),d<Math.abs(1)?(d=1,b=c/4):b=c/(2*Math.PI)*Math.asin(1/d),-(d*Math.pow(2,10*(a-=1))*Math.sin((1*a-b)*(2*Math.PI)/c)))},easeOutElastic:function(a){var
b=1.70158,c=0,d=1;return
0===a?0:1===(a/=1)?1:(c||(c=.3),d<Math.abs(1)?(d=1,b=c/4):b=c/(2*Math.PI)*Math.asin(1/d),d*Math.pow(2,-10*a)*Math.sin((1*a-b)*(2*Math.PI)/c)+1)},easeInOutElastic:function(a){var
b=1.70158,c=0,d=1;return
0===a?0:2===(a/=.5)?1:(c||(c=1*(.3*1.5)),d<Math.abs(1)?(d=1,b=c/4):b=c/(2*Math.PI)*Math.asin(1/d),a<1?-.5*(d*Math.pow(2,10*(a-=1))*Math.sin((1*a-b)*(2*Math.PI)/c)):d*Math.pow(2,-10*(a-=1))*Math.sin((1*a-b)*(2*Math.PI)/c)*.5+1)},easeInBack:function(a){var
b=1.70158;return 1*(a/=1)*a*((b+1)*a-b)},easeOutBack:function(a){var
b=1.70158;return
1*((a=a/1-1)*a*((b+1)*a+b)+1)},easeInOutBack:function(a){var
b=1.70158;return(a/=.5)<1?.5*(a*a*(((b*=1.525)+1)*a-b)):.5*((a-=2)*a*(((b*=1.525)+1)*a+b)+2)},easeInBounce:function(a){return
1-c.easeOutBounce(1-a)},easeOutBounce:function(a){return(a/=1)<1/2.75?1*(7.5625*a*a):a<2/2.75?1*(7.5625*(a-=1.5/2.75)*a+.75):a<2.5/2.75?1*(7.5625*(a-=2.25/2.75)*a+.9375):1*(7.5625*(a-=2.625/2.75)*a+.984375)},easeInOutBounce:function(a){return
a<.5?.5*c.easeInBounce(2*a):.5*c.easeOutBounce(2*a-1)+.5}};b.requestAnimFrame=function(){return
window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){return
window.setTimeout(a,1e3/60)}}(),b.cancelAnimFrame=function(){return
window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.oCancelAnimationFrame||window.msCancelAnimationFrame||function(a){return
window.clearTimeout(a,1e3/60)}}(),b.getRelativePosition=function(a,c){var
d,e,f=a.originalEvent||a,g=a.currentTarget||a.srcElement,h=g.getBoundingClientRect(),i=f.touches;i&&i.length>0?(d=i[0].clientX,e=i[0].clientY):(d=f.clientX,e=f.clientY);var
j=parseFloat(b.getStyle(g,"padding-left")),k=parseFloat(b.getStyle(g,"padding-top")),l=parseFloat(b.getStyle(g,"padding-right")),m=parseFloat(b.getStyle(g,"padding-bottom")),n=h.right-h.left-j-l,o=h.bottom-h.top-k-m;return
d=Math.round((d-h.left-j)/n*g.width/c.currentDevicePixelRatio),e=Math.round((e-h.top-k)/o*g.height/c.currentDevicePixelRatio),{x:d,y:e}},b.addEvent=function(a,b,c){a.addEventListener?a.addEventListener(b,c):a.attachEvent?a.attachEvent("on"+b,c):a["on"+b]=c},b.removeEvent=function(a,c,d){a.removeEventListener?a.removeEventListener(c,d,!1):a.detachEvent?a.detachEvent("on"+c,d):a["on"+c]=b.noop},b.bindEvents=function(a,c,d){var
e=a.events=a.events||{};b.each(c,function(c){e[c]=function(){d.apply(a,arguments)},b.addEvent(a.chart.canvas,c,e[c])})},b.unbindEvents=function(a,c){var
d=a.chart.canvas;b.each(c,function(a,c){b.removeEvent(d,c,a)})},b.getConstraintWidth=function(a){return
g(a,"max-width","clientWidth")},b.getConstraintHeight=function(a){return
g(a,"max-height","clientHeight")},b.getMaximumWidth=function(a){var
c=a.parentNode,d=parseInt(b.getStyle(c,"padding-left"))+parseInt(b.getStyle(c,"padding-right")),e=c.clientWidth-d,f=b.getConstraintWidth(a);return
isNaN(f)?e:Math.min(e,f)},b.getMaximumHeight=function(a){var
c=a.parentNode,d=parseInt(b.getStyle(c,"padding-top"))+parseInt(b.getStyle(c,"padding-bottom")),e=c.clientHeight-d,f=b.getConstraintHeight(a);return
isNaN(f)?e:Math.min(e,f)},b.getStyle=function(a,b){return
a.currentStyle?a.currentStyle[b]:document.defaultView.getComputedStyle(a,null).getPropertyValue(b)},b.retinaScale=function(a){var
b=a.ctx,c=a.canvas,d=c.width,e=c.height,f=a.currentDevicePixelRatio=window.devicePixelRatio||1;1!==f&&(c.height=e*f,c.width=d*f,b.scale(f,f),a.originalDevicePixelRatio=a.originalDevicePixelRatio||f),c.style.width=d+"px",
c.style.height=e+"px"},b.clear=function(a){a.ctx.clearRect(0,0,a.width,a.height)},b.fontString=function(a,b,c){return
b+" "+a+"px
"+c},b.longestText=function(a,c,d,e){e=e||{};var
f=e.data=e.data||{},g=e.garbageCollect=e.garbageCollect||[];e.font!==c&&(f=e.data={},g=e.garbageCollect=[],e.font=c),a.font=c;var
h=0;b.each(d,function(c){void
0!==c&&null!==c&&b.isArray(c)!==!0?h=b.measureText(a,f,g,h,c):b.isArray(c)&&b.each(c,function(c){void
0===c||null===c||b.isArray(c)||(h=b.measureText(a,f,g,h,c))})});var
i=g.length/2;if(i>d.length){for(var j=0;j<i;j++)delete
f[g[j]];g.splice(0,i)}return h},b.measureText=function(a,b,c,d,e){var
f=b[e];return
f||(f=b[e]=a.measureText(e).width,c.push(e)),f>d&&(d=f),d},b.numberOfLabelLines=function(a){var
c=1;return
b.each(a,function(a){b.isArray(a)&&a.length>c&&(c=a.length)}),c},b.drawRoundedRectangle=function(a,b,c,d,e,f){a.beginPath(),a.moveTo(b+f,c),a.lineTo(b+d-f,c),a.quadraticCurveTo(b+d,c,b+d,c+f),a.lineTo(b+d,c+e-f),a.quadraticCurveTo(b+d,c+e,b+d-f,c+e),a.lineTo(b+f,c+e),a.quadraticCurveTo(b,c+e,b,c+e-f),a.lineTo(b,c+f),a.quadraticCurveTo(b,c,b+f,c),a.closePath()},b.color=function(b){return
d?d(b instanceof
CanvasGradient?a.defaults.global.defaultColor:b):(console.log("Color.js
not found!"),b)},b.addResizeListener=function(a,b){var
c=document.createElement("iframe"),d="chartjs-hidden-iframe";c.classlist?c.classlist.add(d):c.setAttribute("class",d);var
e=c.style;e.width="100%",e.display="block",e.border=0,e.height=0,e.margin=0,e.position="absolute",e.left=0,e.right=0,e.top=0,e.bottom=0,a.insertBefore(c,a.firstChild),(c.contentWindow||c).onresize=function(){b&&b()}},b.removeResizeListener=function(a){var
b=a.querySelector(".chartjs-hidden-iframe");b&&b.parentNode.removeChild(b)},b.isArray=Array.isArray?function(a){return
Array.isArray(a)}:function(a){return"[object
Array]"===Object.prototype.toString.call(a)},b.arrayEquals=function(a,c){var
d,e,f,g;if(!a||!c||a.length!=c.length)return!1;for(d=0,e=a.length;d<e;++d)if(f=a[d],g=c[d],f
instanceof Array&&g instanceof
Array){if(!b.arrayEquals(f,g))return!1}else
if(f!=g)return!1;return!0},b.callCallback=function(a,b,c){a&&"function"==typeof
a.call&&a.apply(c,b)},b.getHoverColor=function(a){return a
instanceof
CanvasPattern?a:b.color(a).saturate(.5).darken(.1).rgbString()}}},{2:2}],27:[function(a,b,c){"use
strict";b.exports=function(){var a=function(b,c){var
d=this,e=a.helpers;return
d.config=c||{data:{datasets:[]}},b.length&&b[0].getContext&&(b=b[0]),b.getContext&&(b=b.getContext("2d")),d.ctx=b,d.canvas=b.canvas,b.canvas.style.display=b.canvas.style.display||"block",d.width=b.canvas.width||parseInt(e.getStyle(b.canvas,"width"),10)||e.getMaximumWidth(b.canvas),d.height=b.canvas.height||parseInt(e.getStyle(b.canvas,"height"),10)||e.getMaximumHeight(b.canvas),d.aspectRatio=d.width/d.height,(isNaN(d.aspectRatio)||isFinite(d.aspectRatio)===!1)&&(d.aspectRatio=void
0!==c.aspectRatio?c.aspectRatio:2),d.originalCanvasStyleWidth=b.canvas.style.width,d.originalCanvasStyleHeight=b.canvas.style.height,e.retinaScale(d),d.controller=new
a.Controller(d),e.addResizeListener(b.canvas.parentNode,function(){d.controller&&d.controller.config.options.responsive&&d.controller.resize()}),d.controller?d.controller:d};return
a.defaults={global:{responsive:!0,responsiveAnimationDuration:0,maintainAspectRatio:!0,events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"single",animationDuration:400},onClick:null,defaultColor:"rgba(0,0,0,0.1)",defaultFontColor:"#666",defaultFontFamily:"'Helvetica
Neue', 'Helvetica', 'Arial',
sans-serif",defaultFontSize:12,defaultFontStyle:"normal",showLines:!0,elements:{},legendCallback:function(a){var
b=[];b.push('<ul
class="'+a.id+'-legend">');for(var
c=0;c<a.data.datasets.length;c++)b.push('<li><span
style="background-color:'+a.data.datasets[c].backgroundColor+'"></span>'),a.data.datasets[c].label&&b.push(a.data.datasets[c].label),b.push("</li>");return
b.push("</ul>"),b.join("")}}},a.Chart=a,a}},{}],28:[function(a,b,c){"use
strict";b.exports=function(a){var
b=a.helpers;a.layoutService={defaults:{},addBox:function(a,b){a.boxes||(a.boxes=[]),a.boxes.push(b)},removeBox:function(a,b){a.boxes&&a.boxes.splice(a.boxes.indexOf(b),1)},update:function(a,c,d){function
u(a){var
b,c=a.isHorizontal();c?(b=a.update(a.options.fullWidth?l:r,q),s-=b.height):(b=a.update(p,o),r-=b.width),t.push({horizontal:c,minSize:b,box:a})}function
z(a){var c=b.findNextWhere(t,function(b){return
b.box===a});if(c)if(a.isHorizontal()){var
d={left:v,right:w,top:0,bottom:0};a.update(a.options.fullWidth?l:r,m/2,d)}else
a.update(c.minSize.width,s)}function A(a){var
c=b.findNextWhere(t,function(b){return
b.box===a}),d={left:0,right:0,top:x,bottom:y};c&&a.update(c.minSize.width,s,d)}function
F(a){a.isHorizontal()?(a.left=a.options.fullWidth?e:v,a.right=a.options.fullWidth?c-e:v+r,a.top=E,a.bottom=E+a.height,E=a.bottom):(a.left=D,a.right=D+a.width,a.top=x,a.bottom=x+s,D=a.right)}if(a){var
e=0,f=0,g=b.where(a.boxes,function(a){return"left"===a.options.position}),h=b.where(a.boxes,function(a){return"right"===a.options.position}),i=b.where(a.boxes,function(a){return"top"===a.options.position}),j=b.where(a.boxes,function(a){return"bottom"===a.options.position}),k=b.where(a.boxes,function(a){return"chartArea"===a.options.position});i.sort(function(a,b){return(b.options.fullWidth?1:0)-(a.options.fullWidth?1:0)}),j.sort(function(a,b){return(a.options.fullWidth?1:0)-(b.options.fullWidth?1:0)});var
l=c-2*e,m=d-2*f,n=l/2,o=m/2,p=(c-n)/(g.length+h.length),q=(d-o)/(i.length+j.length),r=l,s=m,t=[];b.each(g.concat(h,i,j),u);var
v=e,w=e,x=f,y=f;b.each(g.concat(h),z),b.each(g,function(a){v+=a.width}),b.each(h,function(a){w+=a.width}),b.each(i.concat(j),z),b.each(i,function(a){x+=a.height}),b.each(j,function(a){y+=a.height}),b.each(g.concat(h),A),v=e,w=e,x=f,y=f,b.each(g,function(a){v+=a.width}),b.each(h,function(a){w+=a.width}),b.each(i,function(a){x+=a.height}),b.each(j,function(a){y+=a.height});var
B=d-x-y,C=c-v-w;C===r&&B===s||(b.each(g,function(a){a.height=B}),b.each(h,function(a){a.height=B}),b.each(i,function(a){a.options.fullWidth||(a.width=C)}),b.each(j,function(a){a.options.fullWidth||(a.width=C)}),s=B,r=C);var
D=e,E=f;b.each(g.concat(i),F),D+=r,E+=s,b.each(h,F),b.each(j,F),a.chartArea={left:v,top:x,right:v+r,bottom:x+s},b.each(k,function(b){b.left=a.chartArea.left,b.top=a.chartArea.top,b.right=a.chartArea.right,b.bottom=a.chartArea.bottom,b.update(r,s)})}}}}},{}],29:[function(a,b,c){"use
strict";b.exports=function(a){var
b=a.helpers,c=b.noop;a.defaults.global.legend={display:!0,position:"top",fullWidth:!0,reverse:!1,onClick:function(a,b){var
c=b.datasetIndex,d=this.chart,e=d.getDatasetMeta(c);e.hidden=null===e.hidden?!d.data.datasets[c].hidden:null,d.update()},labels:{boxWidth:40,padding:10,generateLabels:function(a){var
c=a.data;return
b.isArray(c.datasets)?c.datasets.map(function(c,d){return{text:c.label,fillStyle:b.isArray(c.backgroundColor)?c.backgroundColor[0]:c.backgroundColor,hidden:!a.isDatasetVisible(d),lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:c.borderWidth,strokeStyle:c.borderColor,pointStyle:c.pointStyle,datasetIndex:d}},this):[]}}},a.Legend=a.Element.extend({initialize:function(a){b.extend(this,a),this.legendHitBoxes=[],this.doughnutMode=!1},beforeUpdate:c,update:function(a,b,c){var
d=this;return
d.beforeUpdate(),d.maxWidth=a,d.maxHeight=b,d.margins=c,d.beforeSetDimensions(),d.setDimensions(),d.afterSetDimensions(),d.beforeBuildLabels(),d.buildLabels(),d.afterBuildLabels(),d.beforeFit(),d.fit(),d.afterFit(),d.afterUpdate(),d.minSize},afterUpdate:c,beforeSetDimensions:c,setDimensions:function(){var
a=this;a.isHorizontal()?(a.width=a.maxWidth,a.left=0,a.right=a.width):(a.height=a.maxHeight,a.top=0,a.bottom=a.height),a.paddingLeft=0,a.paddingTop=0,a.paddingRight=0,a.paddingBottom=0,a.minSize={width:0,height:0}},afterSetDimensions:c,beforeBuildLabels:c,buildLabels:function(){var
a=this;a.legendItems=a.options.labels.generateLabels.call(a,a.chart),a.options.reverse&&a.legendItems.reverse()},afterBuildLabels:c,beforeFit:c,fit:function(){var
c=this,d=c.options,e=d.labels,f=d.display,g=c.ctx,h=a.defaults.global,i=b.getValueOrDefault,j=i(e.fontSize,h.defaultFontSize),k=i(e.fontStyle,h.defaultFontStyle),l=i(e.fontFamily,h.defaultFontFamily),m=b.fontString(j,k,l),n=c.legendHitBoxes=[],o=c.minSize,p=c.isHorizontal();if(p?(o.width=c.maxWidth,o.height=f?10:0):(o.width=f?10:0,o.height=c.maxHeight),f)if(g.font=m,p){var
q=c.lineWidths=[0],r=c.legendItems.length?j+e.padding:0;g.textAlign="left",g.textBaseline="top",b.each(c.legendItems,function(a,b){var
d=e.usePointStyle?j*Math.sqrt(2):e.boxWidth,f=d+j/2+g.measureText(a.text).width;q[q.length-1]+f+e.padding>=c.width&&(r+=j+e.padding,q[q.length]=c.left),n[b]={left:0,top:0,width:f,height:j},q[q.length-1]+=f+e.padding}),o.height+=r}else{var
s=e.padding,t=c.columnWidths=[],u=e.padding,v=0,w=0,x=j+s;b.each(c.legendItems,function(a,b){var
c=e.usePointStyle?2*e.boxWidth:e.boxWidth,d=c+j/2+g.measureText(a.text).width;w+x>o.height&&(u+=v+e.padding,t.push(v),v=0,w=0),v=Math.max(v,d),w+=x,n[b]={left:0,top:0,width:d,height:j}}),u+=v,t.push(v),o.width+=u}c.width=o.width,c.height=o.height},afterFit:c,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var
c=this,d=c.options,e=d.labels,f=a.defaults.global,g=f.elements.line,h=c.width,i=c.lineWidths;if(d.display){var
k,j=c.ctx,l=b.getValueOrDefault,m=l(e.fontColor,f.defaultFontColor),n=l(e.fontSize,f.defaultFontSize),o=l(e.fontStyle,f.defaultFontStyle),p=l(e.fontFamily,f.defaultFontFamily),q=b.fontString(n,o,p);j.textAlign="left",j.textBaseline="top",j.lineWidth=.5,j.strokeStyle=m,j.fillStyle=m,j.font=q;var
r=e.boxWidth,s=c.legendHitBoxes,t=function(b,c,e){if(!(isNaN(r)||r<=0)){if(j.save(),j.fillStyle=l(e.fillStyle,f.defaultColor),j.lineCap=l(e.lineCap,g.borderCapStyle),j.lineDashOffset=l(e.lineDashOffset,g.borderDashOffset),j.lineJoin=l(e.lineJoin,g.borderJoinStyle),j.lineWidth=l(e.lineWidth,g.borderWidth),j.strokeStyle=l(e.strokeStyle,f.defaultColor),j.setLineDash&&j.setLineDash(l(e.lineDash,g.borderDash)),d.labels&&d.labels.usePointStyle){var
h=n*Math.SQRT2/2,i=h/Math.SQRT2,k=b+i,m=c+i;a.canvasHelpers.drawPoint(j,e.pointStyle,h,k,m)}else
j.strokeRect(b,c,r,n),j.fillRect(b,c,r,n);j.restore()}},u=function(a,b,c,d){j.fillText(c.text,r+n/2+a,b),c.hidden&&(j.beginPath(),j.lineWidth=2,j.moveTo(r+n/2+a,b+n/2),j.lineTo(r+n/2+a+d,b+n/2),j.stroke())},v=c.isHorizontal();k=v?{x:c.left+(h-i[0])/2,y:c.top+e.padding,line:0}:{x:c.left+e.padding,y:c.top+e.padding,line:0};var
w=n+e.padding;b.each(c.legendItems,function(a,b){var
d=j.measureText(a.text).width,f=e.usePointStyle?n+n/2+d:r+n/2+d,g=k.x,l=k.y;v?g+f>=h&&(l=k.y+=w,k.line++,g=k.x=c.left+(h-i[k.line])/2):l+w>c.bottom&&(g=k.x=g+c.columnWidths[k.line]+e.padding,l=k.y=c.top,k.line++),t(g,l,a),s[b].left=g,s[b].top=l,u(g,l,a,d),v?k.x+=f+e.padding:k.y+=w})}},handleEvent:function(a){var
c=this,d=b.getRelativePosition(a,c.chart.chart),e=d.x,f=d.y,g=c.options;if(e>=c.left&&e<=c.right&&f>=c.top&&f<=c.bottom)for(var
h=c.legendHitBoxes,i=0;i<h.length;++i){var
j=h[i];if(e>=j.left&&e<=j.left+j.width&&f>=j.top&&f<=j.top+j.height){g.onClick&&g.onClick.call(c,a,c.legendItems[i]);break}}}}),a.plugins.register({beforeInit:function(b){var
c=b.options,d=c.legend;d&&(b.legend=new
a.Legend({ctx:b.chart.ctx,options:d,chart:b}),a.layoutService.addBox(b,b.legend))}})}},{}],30:[function(a,b,c){"use
strict";b.exports=function(a){var
b=a.helpers.noop;a.plugins={_plugins:[],register:function(a){var
b=this._plugins;[].concat(a).forEach(function(a){b.indexOf(a)===-1&&b.push(a)})},unregister:function(a){var
b=this._plugins;[].concat(a).forEach(function(a){var
c=b.indexOf(a);c!==-1&&b.splice(c,1)})},clear:function(){this._plugins=[]},count:function(){return
this._plugins.length},getAll:function(){return
this._plugins},notify:function(a,b){var
e,f,c=this._plugins,d=c.length;for(e=0;e<d;++e)if(f=c[e],"function"==typeof
f[a]&&f[a].apply(f,b||[])===!1)return!1;return!0}},a.PluginBase=a.Element.extend({beforeInit:b,afterInit:b,beforeUpdate:b,afterUpdate:b,beforeDraw:b,afterDraw:b,destroy:b}),a.pluginService=a.plugins}},{}],31:[function(a,b,c){"use
strict";b.exports=function(a){var
b=a.helpers;a.defaults.scale={display:!0,position:"left",gridLines:{display:!0,color:"rgba(0,
0, 0,
0.1)",lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickMarkLength:10,zeroLineWidth:1,zeroLineColor:"rgba(0,0,0,0.25)",offsetGridLines:!1},scaleLabel:{labelString:"",display:!1},ticks:{beginAtZero:!1,minRotation:0,maxRotation:50,mirror:!1,padding:10,reverse:!1,display:!0,autoSkip:!0,autoSkipPadding:0,labelOffset:0,callback:function(a){return
b.isArray(a)?a:""+a}}},a.Scale=a.Element.extend({beforeUpdate:function(){b.callCallback(this.options.beforeUpdate,[this])},update:function(a,c,d){var
e=this;return
e.beforeUpdate(),e.maxWidth=a,e.maxHeight=c,e.margins=b.extend({left:0,right:0,top:0,bottom:0},d),e.beforeSetDimensions(),e.setDimensions(),e.afterSetDimensions(),e.beforeDataLimits(),e.determineDataLimits(),e.afterDataLimits(),e.beforeBuildTicks(),e.buildTicks(),e.afterBuildTicks(),e.beforeTickToLabelConversion(),e.convertTicksToLabels(),e.afterTickToLabelConversion(),e.beforeCalculateTickRotation(),e.calculateTickRotation(),e.afterCalculateTickRotation(),e.beforeFit(),e.fit(),e.afterFit(),e.afterUpdate(),e.minSize},afterUpdate:function(){b.callCallback(this.options.afterUpdate,[this])},beforeSetDimensions:function(){b.callCallback(this.options.beforeSetDimensions,[this])},setDimensions:function(){var
a=this;a.isHorizontal()?(a.width=a.maxWidth,a.left=0,a.right=a.width):(a.height=a.maxHeight,a.top=0,a.bottom=a.height),a.paddingLeft=0,a.paddingTop=0,a.paddingRight=0,a.paddingBottom=0},afterSetDimensions:function(){b.callCallback(this.options.afterSetDimensions,[this])},beforeDataLimits:function(){b.callCallback(this.options.beforeDataLimits,[this])},determineDataLimits:b.noop,afterDataLimits:function(){b.callCallback(this.options.afterDataLimits,[this])},beforeBuildTicks:function(){b.callCallback(this.options.beforeBuildTicks,[this])},buildTicks:b.noop,afterBuildTicks:function(){b.callCallback(this.options.afterBuildTicks,[this])},beforeTickToLabelConversion:function(){b.callCallback(this.options.beforeTickToLabelConversion,[this])},convertTicksToLabels:function(){var
a=this;a.ticks=a.ticks.map(function(b,c,d){return
a.options.ticks.userCallback?a.options.ticks.userCallback(b,c,d):a.options.ticks.callback(b,c,d)},a)},afterTickToLabelConversion:function(){b.callCallback(this.options.afterTickToLabelConversion,[this])},beforeCalculateTickRotation:function(){b.callCallback(this.options.beforeCalculateTickRotation,[this])},calculateTickRotation:function(){var
c=this,d=c.ctx,e=a.defaults.global,f=c.options.ticks,g=b.getValueOrDefault(f.fontSize,e.defaultFontSize),h=b.getValueOrDefault(f.fontStyle,e.defaultFontStyle),i=b.getValueOrDefault(f.fontFamily,e.defaultFontFamily),j=b.fontString(g,h,i);d.font=j;var
m,k=d.measureText(c.ticks[0]).width,l=d.measureText(c.ticks[c.ticks.length-1]).width;if(c.labelRotation=f.minRotation||0,c.paddingRight=0,c.paddingLeft=0,c.options.display&&c.isHorizontal()){c.paddingRight=l/2+3,c.paddingLeft=k/2+3,c.longestTextCache||(c.longestTextCache={});for(var
p,q,n=b.longestText(d,j,c.ticks,c.longestTextCache),o=n,r=c.getPixelForTick(1)-c.getPixelForTick(0)-6;o>r&&c.labelRotation<f.maxRotation;){if(p=Math.cos(b.toRadians(c.labelRotation)),q=Math.sin(b.toRadians(c.labelRotation)),m=p*k,m+g/2>c.yLabelWidth&&(c.paddingLeft=m+g/2),c.paddingRight=g/2,q*n>c.maxHeight){c.labelRotation--;break}c.labelRotation++,o=p*n}}c.margins&&(c.paddingLeft=Math.max(c.paddingLeft-c.margins.left,0),c.paddingRight=Math.max(c.paddingRight-c.margins.right,0))},afterCalculateTickRotation:function(){b.callCallback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){b.callCallback(this.options.beforeFit,[this])},fit:function(){var
c=this,d=c.minSize={width:0,height:0},e=c.options,f=a.defaults.global,g=e.ticks,h=e.scaleLabel,i=e.display,j=c.isHorizontal(),k=b.getValueOrDefault(g.fontSize,f.defaultFontSize),l=b.getValueOrDefault(g.fontStyle,f.defaultFontStyle),m=b.getValueOrDefault(g.fontFamily,f.defaultFontFamily),n=b.fontString(k,l,m),o=b.getValueOrDefault(h.fontSize,f.defaultFontSize),p=e.gridLines.tickMarkLength;if(j?d.width=c.isFullWidth()?c.maxWidth-c.margins.left-c.margins.right:c.maxWidth:d.width=i?p:0,j?d.height=i?p:0:d.height=c.maxHeight,h.display&&i&&(j?d.height+=1.5*o:d.width+=1.5*o),g.display&&i){c.longestTextCache||(c.longestTextCache={});var
q=b.longestText(c.ctx,n,c.ticks,c.longestTextCache),r=b.numberOfLabelLines(c.ticks),s=.5*k;if(j){c.longestLabelWidth=q;var
t=Math.sin(b.toRadians(c.labelRotation))*c.longestLabelWidth+k*r+s*r;d.height=Math.min(c.maxHeight,d.height+t),c.ctx.font=n;var
u=c.ctx.measureText(c.ticks[0]).width,v=c.ctx.measureText(c.ticks[c.ticks.length-1]).width,w=Math.cos(b.toRadians(c.labelRotation)),x=Math.sin(b.toRadians(c.labelRotation));c.paddingLeft=0!==c.labelRotation?w*u+3:u/2+3,c.paddingRight=0!==c.labelRotation?x*(k/2)+3:v/2+3}else{var
y=c.maxWidth-d.width,z=g.mirror;z?q=0:q+=c.options.ticks.padding,q<y?d.width+=q:d.width=c.maxWidth,c.paddingTop=k/2,c.paddingBottom=k/2}}c.margins&&(c.paddingLeft=Math.max(c.paddingLeft-c.margins.left,0),c.paddingTop=Math.max(c.paddingTop-c.margins.top,0),c.paddingRight=Math.max(c.paddingRight-c.margins.right,0),c.paddingBottom=Math.max(c.paddingBottom-c.margins.bottom,0)),c.width=d.width,c.height=d.height},afterFit:function(){b.callCallback(this.options.afterFit,[this])},isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},isFullWidth:function(){return
this.options.fullWidth},getRightValue:function(a){return
null===a||"undefined"==typeof a?NaN:"number"==typeof
a&&isNaN(a)?NaN:"object"==typeof a?a instanceof
Date||a.isValid?a:this.getRightValue(this.isHorizontal()?a.x:a.y):a},getLabelForIndex:b.noop,getPixelForValue:b.noop,getValueForPixel:b.noop,getPixelForTick:function(a,b){var
c=this;if(c.isHorizontal()){var
d=c.width-(c.paddingLeft+c.paddingRight),e=d/Math.max(c.ticks.length-(c.options.gridLines.offsetGridLines?0:1),1),f=e*a+c.paddingLeft;b&&(f+=e/2);var
g=c.left+Math.round(f);return g+=c.isFullWidth()?c.margins.left:0}var
h=c.height-(c.paddingTop+c.paddingBottom);return
c.top+a*(h/(c.ticks.length-1))},getPixelForDecimal:function(a){var
b=this;if(b.isHorizontal()){var
c=b.width-(b.paddingLeft+b.paddingRight),d=c*a+b.paddingLeft,e=b.left+Math.round(d);return
e+=b.isFullWidth()?b.margins.left:0}return
b.top+a*b.height},getBasePixel:function(){var a=this,b=a.min,c=a.max;return
a.getPixelForValue(a.beginAtZero?0:b<0&&c<0?c:b>0&&c>0?b:0)},draw:function(c){var
d=this,e=d.options;if(e.display){var
l,o,f=d.ctx,g=a.defaults.global,h=e.ticks,i=e.gridLines,j=e.scaleLabel,k=0!==d.labelRotation,m=h.autoSkip,n=d.isHorizontal();h.maxTicksLimit&&(o=h.maxTicksLimit);var
p=b.getValueOrDefault(h.fontColor,g.defaultFontColor),q=b.getValueOrDefault(h.fontSize,g.defaultFontSize),r=b.getValueOrDefault(h.fontStyle,g.defaultFontStyle),s=b.getValueOrDefault(h.fontFamily,g.defaultFontFamily),t=b.fontString(q,r,s),u=i.tickMarkLength,v=b.getValueOrDefault(j.fontColor,g.defaultFontColor),w=b.getValueOrDefault(j.fontSize,g.defaultFontSize),x=b.getValueOrDefault(j.fontStyle,g.defaultFontStyle),y=b.getValueOrDefault(j.fontFamily,g.defaultFontFamily),z=b.fontString(w,x,y),A=b.toRadians(d.labelRotation),B=Math.cos(A),C=d.longestLabelWidth*B;f.fillStyle=p;var
D=[];if(n){if(l=!1,k&&(C/=2),(C+h.autoSkipPadding)*d.ticks.length>d.width-(d.paddingLeft+d.paddingRight)&&(l=1+Math.floor((C+h.autoSkipPadding)*d.ticks.length/(d.width-(d.paddingLeft+d.paddingRight)))),o&&d.ticks.length>o)for(;!l||d.ticks.length/(l||1)>o;)l||(l=1),l+=1;m||(l=!1)}var
E="right"===e.position?d.left:d.right-u,F="right"===e.position?d.left+u:d.right,G="bottom"===e.position?d.top:d.bottom-u,H="bottom"===e.position?d.top+u:d.bottom;if(b.each(d.ticks,function(a,f){if(void
0!==a&&null!==a){var
g=d.ticks.length===f+1,j=l>1&&f%l>0||f%l===0&&f+l>=d.ticks.length;if((!j||g)&&void
0!==a&&null!==a){var m,o;f===("undefined"!=typeof
d.zeroLineIndex?d.zeroLineIndex:0)?(m=i.zeroLineWidth,o=i.zeroLineColor):(m=b.getValueAtIndexOrDefault(i.lineWidth,f),o=b.getValueAtIndexOrDefault(i.color,f));var
p,q,r,s,t,v,w,x,y,z,B,C="middle";if(n){k||(C="top"===e.position?"bottom":"top"),B=k?"right":"center";var
I=d.getPixelForTick(f)+b.aliasPixel(m);y=d.getPixelForTick(f,i.offsetGridLines)+h.labelOffset,z=k?d.top+12:"top"===e.position?d.bottom-u:d.top+u,p=r=t=w=I,q=G,s=H,v=c.top,x=c.bottom}else{"left"===e.position?h.mirror?(y=d.right+h.padding,B="left"):(y=d.right-h.padding,B="right"):h.mirror?(y=d.left-h.padding,B="right"):(y=d.left+h.padding,B="left");var
J=d.getPixelForTick(f);J+=b.aliasPixel(m),z=d.getPixelForTick(f,i.offsetGridLines),p=E,r=F,t=c.left,w=c.right,q=s=v=x=J}D.push({tx1:p,ty1:q,tx2:r,ty2:s,x1:t,y1:v,x2:w,y2:x,labelX:y,labelY:z,glWidth:m,glColor:o,rotation:-1*A,label:a,textBaseline:C,textAlign:B})}}}),b.each(D,function(a){if(i.display&&(f.lineWidth=a.glWidth,f.strokeStyle=a.glColor,f.beginPath(),i.drawTicks&&(f.moveTo(a.tx1,a.ty1),f.lineTo(a.tx2,a.ty2)),i.drawOnChartArea&&(f.moveTo(a.x1,a.y1),f.lineTo(a.x2,a.y2)),f.stroke()),h.display){f.save(),f.translate(a.labelX,a.labelY),f.rotate(a.rotation),f.font=t,f.textBaseline=a.textBaseline,f.textAlign=a.textAlign;var
c=a.label;if(b.isArray(c))for(var
d=0,e=0;d<c.length;++d)f.fillText(""+c[d],0,e),e+=1.5*q;else
f.fillText(c,0,0);f.restore()}}),j.display){var
I,J,K=0;if(n)I=d.left+(d.right-d.left)/2,J="bottom"===e.position?d.bottom-w/2:d.top+w/2;else{var
L="left"===e.position;I=L?d.left+w/2:d.right-w/2,J=d.top+(d.bottom-d.top)/2,K=L?-.5*Math.PI:.5*Math.PI}f.save(),f.translate(I,J),f.rotate(K),f.textAlign="center",f.textBaseline="middle",f.fillStyle=v,f.font=z,f.fillText(j.labelString,0,0),f.restore()}if(i.drawBorder){f.lineWidth=b.getValueAtIndexOrDefault(i.lineWidth,0),f.strokeStyle=b.getValueAtIndexOrDefault(i.color,0);var
M=d.left,N=d.right,O=d.top,P=d.bottom,Q=b.aliasPixel(f.lineWidth);n?(O=P="top"===e.position?d.bottom:d.top,O+=Q,P+=Q):(M=N="left"===e.position?d.right:d.left,M+=Q,N+=Q),f.beginPath(),f.moveTo(M,O),f.lineTo(N,P),f.stroke()}}}})}},{}],32:[function(a,b,c){"use
strict";b.exports=function(a){var
b=a.helpers;a.scaleService={constructors:{},defaults:{},registerScaleType:function(a,c,d){this.constructors[a]=c,this.defaults[a]=b.clone(d)},getScaleConstructor:function(a){return
this.constructors.hasOwnProperty(a)?this.constructors[a]:void
0},getScaleDefaults:function(c){return
this.defaults.hasOwnProperty(c)?b.scaleMerge(a.defaults.scale,this.defaults[c]):{}},updateScaleDefaults:function(a,c){var
d=this.defaults;d.hasOwnProperty(a)&&(d[a]=b.extend(d[a],c))},addScalesToLayout:function(c){b.each(c.scales,function(b){a.layoutService.addBox(c,b)})}}}},{}],33:[function(a,b,c){"use
strict";b.exports=function(a){var
b=a.helpers;a.defaults.global.title={display:!1,position:"top",fullWidth:!0,fontStyle:"bold",padding:10,text:""};var
c=b.noop;a.Title=a.Element.extend({initialize:function(c){var
d=this;b.extend(d,c),d.options=b.configMerge(a.defaults.global.title,c.options),d.legendHitBoxes=[]},beforeUpdate:function(){var
c=this.chart.options;c&&c.title&&(this.options=b.configMerge(a.defaults.global.title,c.title))},update:function(a,b,c){var
d=this;return
d.beforeUpdate(),d.maxWidth=a,d.maxHeight=b,d.margins=c,d.beforeSetDimensions(),d.setDimensions(),d.afterSetDimensions(),d.beforeBuildLabels(),d.buildLabels(),d.afterBuildLabels(),d.beforeFit(),d.fit(),d.afterFit(),d.afterUpdate(),d.minSize},afterUpdate:c,beforeSetDimensions:c,setDimensions:function(){var
a=this;a.isHorizontal()?(a.width=a.maxWidth,a.left=0,a.right=a.width):(a.height=a.maxHeight,a.top=0,a.bottom=a.height),a.paddingLeft=0,a.paddingTop=0,a.paddingRight=0,a.paddingBottom=0,a.minSize={width:0,height:0}},afterSetDimensions:c,beforeBuildLabels:c,buildLabels:c,afterBuildLabels:c,beforeFit:c,fit:function(){var
c=this,d=b.getValueOrDefault,e=c.options,f=a.defaults.global,g=e.display,h=d(e.fontSize,f.defaultFontSize),i=c.minSize;c.isHorizontal()?(i.width=c.maxWidth,i.height=g?h+2*e.padding:0):(i.width=g?h+2*e.padding:0,i.height=c.maxHeight),c.width=i.width,c.height=i.height},afterFit:c,isHorizontal:function(){var
a=this.options.position;return"top"===a||"bottom"===a},draw:function(){var
c=this,d=c.ctx,e=b.getValueOrDefault,f=c.options,g=a.defaults.global;if(f.display){var
m,n,h=e(f.fontSize,g.defaultFontSize),i=e(f.fontStyle,g.defaultFontStyle),j=e(f.fontFamily,g.defaultFontFamily),k=b.fontString(h,i,j),l=0,o=c.top,p=c.left,q=c.bottom,r=c.right;d.fillStyle=e(f.fontColor,g.defaultFontColor),d.font=k,c.isHorizontal()?(m=p+(r-p)/2,n=o+(q-o)/2):(m="left"===f.position?p+h/2:r-h/2,n=o+(q-o)/2,l=Math.PI*("left"===f.position?-.5:.5)),d.save(),d.translate(m,n),d.rotate(l),d.textAlign="center",d.textBaseline="middle",d.fillText(f.text,0,0),d.restore()}}}),a.plugins.register({beforeInit:function(b){var
c=b.options,d=c.title;d&&(b.titleBlock=new
a.Title({ctx:b.chart.ctx,options:d,chart:b}),a.layoutService.addBox(b,b.titleBlock))}})}},{}],34:[function(a,b,c){"use
strict";b.exports=function(a){function c(a,c){return
c&&(b.isArray(c)?Array.prototype.push.apply(a,c):a.push(c)),a}function
d(a){if(!a.length)return!1;var
b,c,d=[],e=[];for(b=0,c=a.length;b<c;++b){var
f=a[b];if(f&&f.hasValue()){var
g=f.tooltipPosition();d.push(g.x),e.push(g.y)}}var
h=0,i=0;for(b=0;b<d.length;++b)d[b]&&(h+=d[b],i+=e[b]);return{x:Math.round(h/d.length),y:Math.round(i/d.length)}}function
e(a){var
b=a._xScale,c=a._yScale||a._scale,d=a._index,e=a._datasetIndex;return{xLabel:b?b.getLabelForIndex(d,e):"",yLabel:c?c.getLabelForIndex(d,e):"",index:d,datasetIndex:e}}var
b=a.helpers;a.defaults.global.tooltips={enabled:!0,custom:null,mode:"single",backgroundColor:"rgba(0,0,0,0.8)",titleFontStyle:"bold",titleSpacing:2,titleMarginBottom:6,titleFontColor:"#fff",titleAlign:"left",bodySpacing:2,bodyFontColor:"#fff",bodyAlign:"left",footerFontStyle:"bold",footerSpacing:2,footerMarginTop:6,footerFontColor:"#fff",footerAlign:"left",yPadding:6,xPadding:6,yAlign:"center",xAlign:"center",caretSize:5,cornerRadius:6,multiKeyBackground:"#fff",callbacks:{beforeTitle:b.noop,title:function(a,b){var
c="",d=b.labels,e=d?d.length:0;if(a.length>0){var
f=a[0];f.xLabel?c=f.xLabel:e>0&&f.index<e&&(c=d[f.index])}return
c},afterTitle:b.noop,beforeBody:b.noop,beforeLabel:b.noop,label:function(a,b){var
c=b.datasets[a.datasetIndex].label||"";return c+":
"+a.yLabel},labelColor:function(a,b){var
c=b.getDatasetMeta(a.datasetIndex),d=c.data[a.index],e=d._view;return{borderColor:e.borderColor,backgroundColor:e.backgroundColor}},afterLabel:b.noop,afterBody:b.noop,beforeFooter:b.noop,footer:b.noop,afterFooter:b.noop}},a.Tooltip=a.Element.extend({initialize:function(){var
c=this,d=a.defaults.global,e=c._options,f=b.getValueOrDefault;b.extend(c,{_model:{xPadding:e.xPadding,yPadding:e.yPadding,xAlign:e.xAlign,yAlign:e.yAlign,bodyFontColor:e.bodyFontColor,_bodyFontFamily:f(e.bodyFontFamily,d.defaultFontFamily),_bodyFontStyle:f(e.bodyFontStyle,d.defaultFontStyle),_bodyAlign:e.bodyAlign,bodyFontSize:f(e.bodyFontSize,d.defaultFontSize),bodySpacing:e.bodySpacing,titleFontColor:e.titleFontColor,_titleFontFamily:f(e.titleFontFamily,d.defaultFontFamily),_titleFontStyle:f(e.titleFontStyle,d.defaultFontStyle),titleFontSize:f(e.titleFontSize,d.defaultFontSize),_titleAlign:e.titleAlign,titleSpacing:e.titleSpacing,titleMarginBottom:e.titleMarginBottom,footerFontColor:e.footerFontColor,_footerFontFamily:f(e.footerFontFamily,d.defaultFontFamily),_footerFontStyle:f(e.footerFontStyle,d.defaultFontStyle),footerFontSize:f(e.footerFontSize,d.defaultFontSize),_footerAlign:e.footerAlign,footerSpacing:e.footerSpacing,footerMarginTop:e.footerMarginTop,caretSize:e.caretSize,cornerRadius:e.cornerRadius,backgroundColor:e.backgroundColor,opacity:0,legendColorBackground:e.multiKeyBackground}})},getTitle:function(){var
a=this,b=a._options,d=b.callbacks,e=d.beforeTitle.apply(a,arguments),f=d.title.apply(a,arguments),g=d.afterTitle.apply(a,arguments),h=[];return
h=c(h,e),h=c(h,f),h=c(h,g)},getBeforeBody:function(){var
a=this._options.callbacks.beforeBody.apply(this,arguments);return
b.isArray(a)?a:void 0!==a?[a]:[]},getBody:function(a,d){var
e=this,f=e._options.callbacks,g=[];return b.each(a,function(a){var
b={before:[],lines:[],after:[]};c(b.before,f.beforeLabel.call(e,a,d)),c(b.lines,f.label.call(e,a,d)),c(b.after,f.afterLabel.call(e,a,d)),g.push(b)}),g},getAfterBody:function(){var
a=this._options.callbacks.afterBody.apply(this,arguments);return
b.isArray(a)?a:void 0!==a?[a]:[]},getFooter:function(){var
a=this,b=a._options.callbacks,d=b.beforeFooter.apply(a,arguments),e=b.footer.apply(a,arguments),f=b.afterFooter.apply(a,arguments),g=[];return
g=c(g,d),g=c(g,e),g=c(g,f)},update:function(a){var
k,l,c=this,f=c._options,g=c._model,h=c._active,i=c._data,j=c._chartInstance;if(h.length){g.opacity=1;var
m=[],n=d(h),o=[];for(k=0,l=h.length;k<l;++k)o.push(e(h[k]));f.itemSort&&(o=o.sort(f.itemSort)),h.length>1&&b.each(o,function(a){m.push(f.callbacks.labelColor.call(c,a,j))}),b.extend(g,{title:c.getTitle(o,i),beforeBody:c.getBeforeBody(o,i),body:c.getBody(o,i),afterBody:c.getAfterBody(o,i),footer:c.getFooter(o,i),x:Math.round(n.x),y:Math.round(n.y),caretPadding:b.getValueOrDefault(n.padding,2),labelColors:m});var
p=c.getTooltipSize(g);c.determineAlignment(p),b.extend(g,c.getBackgroundPoint(g,p))}else
c._model.opacity=0;return
a&&f.custom&&f.custom.call(c,g),c},getTooltipSize:function(a){var
c=this._chart.ctx,d={height:2*a.yPadding,width:0},e=a.body,f=e.reduce(function(a,b){return
a+b.before.length+b.lines.length+b.after.length},0);f+=a.beforeBody.length+a.afterBody.length;var
g=a.title.length,h=a.footer.length,i=a.titleFontSize,j=a.bodyFontSize,k=a.footerFontSize;d.height+=g*i,d.height+=(g-1)*a.titleSpacing,d.height+=g?a.titleMarginBottom:0,d.height+=f*j,d.height+=f?(f-1)*a.bodySpacing:0,d.height+=h?a.footerMarginTop:0,d.height+=h*k,d.height+=h?(h-1)*a.footerSpacing:0;var
l=0,m=function(a){d.width=Math.max(d.width,c.measureText(a).width+l)};return
c.font=b.fontString(i,a._titleFontStyle,a._titleFontFamily),b.each(a.title,m),c.font=b.fontString(j,a._bodyFontStyle,a._bodyFontFamily),b.each(a.beforeBody.concat(a.afterBody),m),l=e.length>1?j+2:0,b.each(e,function(a){b.each(a.before,m),b.each(a.lines,m),b.each(a.after,m)}),l=0,c.font=b.fontString(k,a._footerFontStyle,a._footerFontFamily),b.each(a.footer,m),d.width+=2*a.xPadding,d},determineAlignment:function(a){var
b=this,c=b._model,d=b._chart,e=b._chartInstance.chartArea;c.y<a.height?c.yAlign="top":c.y>d.height-a.height&&(c.yAlign="bottom");var
f,g,h,i,j,k=(e.left+e.right)/2,l=(e.top+e.bottom)/2;"center"===c.yAlign?(f=function(a){return
a<=k},g=function(a){return a>k}):(f=function(b){return
b<=a.width/2},g=function(b){return
b>=d.width-a.width/2}),h=function(b){return
b+a.width>d.width},i=function(b){return
b-a.width<0},j=function(a){return
a<=l?"top":"bottom"},f(c.x)?(c.xAlign="left",h(c.x)&&(c.xAlign="center",c.yAlign=j(c.y))):g(c.x)&&(c.xAlign="right",i(c.x)&&(c.xAlign="center",c.yAlign=j(c.y)))},getBackgroundPoint:function(a,b){var
c={x:a.x,y:a.y},d=a.caretSize,e=a.caretPadding,f=a.cornerRadius,g=a.xAlign,h=a.yAlign,i=d+e,j=f+e;return"right"===g?c.x-=b.width:"center"===g&&(c.x-=b.width/2),"top"===h?c.y+=i:"bottom"===h?c.y-=b.height+i:c.y-=b.height/2,"center"===h?"left"===g?c.x+=i:"right"===g&&(c.x-=i):"left"===g?c.x-=j:"right"===g&&(c.x+=j),c},drawCaret:function(a,c,d){var
g,h,i,j,k,l,e=this._view,f=this._chart.ctx,m=e.caretSize,n=e.cornerRadius,o=e.xAlign,p=e.yAlign,q=a.x,r=a.y,s=c.width,t=c.height;"center"===p?("left"===o?(g=q,h=g-m,i=g):(g=q+s,h=g+m,i=g),k=r+t/2,j=k-m,l=k+m):("left"===o?(g=q+n,h=g+m,i=h+m):"right"===o?(g=q+s-n,h=g-m,i=h-m):(h=q+s/2,g=h-m,i=h+m),"top"===p?(j=r,k=j-m,l=j):(j=r+t,k=j+m,l=j));var
u=b.color(e.backgroundColor);f.fillStyle=u.alpha(d*u.alpha()).rgbString(),
f.beginPath(),f.moveTo(g,j),f.lineTo(h,k),f.lineTo(i,l),f.closePath(),f.fill()},drawTitle:function(a,c,d,e){var
f=c.title;if(f.length){d.textAlign=c._titleAlign,d.textBaseline="top";var
g=c.titleFontSize,h=c.titleSpacing,i=b.color(c.titleFontColor);d.fillStyle=i.alpha(e*i.alpha()).rgbString(),d.font=b.fontString(g,c._titleFontStyle,c._titleFontFamily);var
j,k;for(j=0,k=f.length;j<k;++j)d.fillText(f[j],a.x,a.y),a.y+=g+h,j+1===f.length&&(a.y+=c.titleMarginBottom-h)}},drawBody:function(a,c,d,e){var
f=c.bodyFontSize,g=c.bodySpacing,h=c.body;d.textAlign=c._bodyAlign,d.textBaseline="top";var
i=b.color(c.bodyFontColor),j=i.alpha(e*i.alpha()).rgbString();d.fillStyle=j,d.font=b.fontString(f,c._bodyFontStyle,c._bodyFontFamily);var
k=0,l=function(b){d.fillText(b,a.x+k,a.y),a.y+=f+g};b.each(c.beforeBody,l);var
m=h.length>1;k=m?f+2:0,b.each(h,function(g,h){b.each(g.before,l),b.each(g.lines,function(g){m&&(d.fillStyle=b.color(c.legendColorBackground).alpha(e).rgbaString(),d.fillRect(a.x,a.y,f,f),d.strokeStyle=b.color(c.labelColors[h].borderColor).alpha(e).rgbaString(),d.strokeRect(a.x,a.y,f,f),d.fillStyle=b.color(c.labelColors[h].backgroundColor).alpha(e).rgbaString(),d.fillRect(a.x+1,a.y+1,f-2,f-2),d.fillStyle=j),l(g)}),b.each(g.after,l)}),k=0,b.each(c.afterBody,l),a.y-=g},drawFooter:function(a,c,d,e){var
f=c.footer;if(f.length){a.y+=c.footerMarginTop,d.textAlign=c._footerAlign,d.textBaseline="top";var
g=b.color(c.footerFontColor);d.fillStyle=g.alpha(e*g.alpha()).rgbString(),d.font=b.fontString(c.footerFontSize,c._footerFontStyle,c._footerFontFamily),b.each(f,function(b){d.fillText(b,a.x,a.y),a.y+=c.footerFontSize+c.footerSpacing})}},draw:function(){var
a=this._chart.ctx,c=this._view;if(0!==c.opacity){var
d=this.getTooltipSize(c),e={x:c.x,y:c.y},f=Math.abs(c.opacity<.001)?0:c.opacity;if(this._options.enabled){var
g=b.color(c.backgroundColor);a.fillStyle=g.alpha(f*g.alpha()).rgbString(),b.drawRoundedRectangle(a,e.x,e.y,d.width,d.height,c.cornerRadius),a.fill(),this.drawCaret(e,d,f),e.x+=c.xPadding,e.y+=c.yPadding,this.drawTitle(e,c,a,f),this.drawBody(e,c,a,f),this.drawFooter(e,c,a,f)}}}})}},{}],35:[function(a,b,c){"use
strict";b.exports=function(a){var
b=a.helpers,c=a.defaults.global;c.elements.arc={backgroundColor:c.defaultColor,borderColor:"#fff",borderWidth:2},a.elements.Arc=a.Element.extend({inLabelRange:function(a){var
b=this._view;return!!b&&Math.pow(a-b.x,2)<Math.pow(b.radius+b.hoverRadius,2)},inRange:function(a,c){var
d=this._view;if(d){for(var
e=b.getAngleFromPoint(d,{x:a,y:c}),f=e.angle,g=e.distance,h=d.startAngle,i=d.endAngle;i<h;)i+=2*Math.PI;for(;f>i;)f-=2*Math.PI;for(;f<h;)f+=2*Math.PI;var
j=f>=h&&f<=i,k=g>=d.innerRadius&&g<=d.outerRadius;return
j&&k}return!1},tooltipPosition:function(){var
a=this._view,b=a.startAngle+(a.endAngle-a.startAngle)/2,c=(a.outerRadius-a.innerRadius)/2+a.innerRadius;return{x:a.x+Math.cos(b)*c,y:a.y+Math.sin(b)*c}},draw:function(){var
a=this._chart.ctx,b=this._view,c=b.startAngle,d=b.endAngle;a.beginPath(),a.arc(b.x,b.y,b.outerRadius,c,d),a.arc(b.x,b.y,b.innerRadius,d,c,!0),a.closePath(),a.strokeStyle=b.borderColor,a.lineWidth=b.borderWidth,a.fillStyle=b.backgroundColor,a.fill(),a.lineJoin="bevel",b.borderWidth&&a.stroke()}})}},{}],36:[function(a,b,c){"use
strict";b.exports=function(a){var
b=a.helpers,c=a.defaults.global;a.defaults.global.elements.line={tension:.4,backgroundColor:c.defaultColor,borderWidth:3,borderColor:c.defaultColor,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0},a.elements.Line=a.Element.extend({draw:function(){function
i(a,b){var
c=b._view;b._view.steppedLine===!0?(h.lineTo(b._view.x,a._view.y),h.lineTo(b._view.x,b._view.y)):0===b._view.tension?h.lineTo(c.x,c.y):h.bezierCurveTo(a._view.controlPointNextX,a._view.controlPointNextY,c.controlPointPreviousX,c.controlPointPreviousY,c.x,c.y)}var
a=this,d=a._view,e=d.spanGaps,f=d.scaleZero,g=a._loop,h=a._chart.ctx;h.save();var
j=a._children.slice(),k=-1;g&&j.length&&j.push(j[0]);var
l,m,n,o;if(j.length&&d.fill){for(h.beginPath(),l=0;l<j.length;++l)m=j[l],n=b.previousItem(j,l),o=m._view,0===l?(g?h.moveTo(f.x,f.y):h.moveTo(o.x,f),o.skip||(k=l,h.lineTo(o.x,o.y))):(n=k===-1?n:j[k],o.skip?e||k!==l-1||(g?h.lineTo(f.x,f.y):h.lineTo(n._view.x,f)):(k!==l-1?e&&k!==-1?i(n,m):g?h.lineTo(o.x,o.y):(h.lineTo(o.x,f),h.lineTo(o.x,o.y)):i(n,m),k=l));g||h.lineTo(j[k]._view.x,f),h.fillStyle=d.backgroundColor||c.defaultColor,h.closePath(),h.fill()}var
p=c.elements.line;for(h.lineCap=d.borderCapStyle||p.borderCapStyle,h.setLineDash&&h.setLineDash(d.borderDash||p.borderDash),h.lineDashOffset=d.borderDashOffset||p.borderDashOffset,h.lineJoin=d.borderJoinStyle||p.borderJoinStyle,h.lineWidth=d.borderWidth||p.borderWidth,h.strokeStyle=d.borderColor||c.defaultColor,h.beginPath(),k=-1,l=0;l<j.length;++l)m=j[l],n=b.previousItem(j,l),o=m._view,0===l?o.skip||(h.moveTo(o.x,o.y),k=l):(n=k===-1?n:j[k],o.skip||(k!==l-1&&!e||k===-1?h.moveTo(o.x,o.y):i(n,m),k=l));h.stroke(),h.restore()}})}},{}],37:[function(a,b,c){"use
strict";b.exports=function(a){var
b=a.helpers,c=a.defaults.global,d=c.defaultColor;c.elements.point={radius:3,pointStyle:"circle",backgroundColor:d,borderWidth:1,borderColor:d,hitRadius:1,hoverRadius:4,hoverBorderWidth:1},a.elements.Point=a.Element.extend({inRange:function(a,b){var
c=this._view;return!!c&&Math.pow(a-c.x,2)+Math.pow(b-c.y,2)<Math.pow(c.hitRadius+c.radius,2)},inLabelRange:function(a){var
b=this._view;return!!b&&Math.pow(a-b.x,2)<Math.pow(b.radius+b.hitRadius,2)},tooltipPosition:function(){var
a=this._view;return{x:a.x,y:a.y,padding:a.radius+a.borderWidth}},draw:function(){var
e=this._view,f=this._chart.ctx,g=e.pointStyle,h=e.radius,i=e.x,j=e.y;e.skip||(f.strokeStyle=e.borderColor||d,f.lineWidth=b.getValueOrDefault(e.borderWidth,c.elements.point.borderWidth),f.fillStyle=e.backgroundColor||d,a.canvasHelpers.drawPoint(f,g,h,i,j))}})}},{}],38:[function(a,b,c){"use
strict";b.exports=function(a){var
b=a.defaults.global;b.elements.rectangle={backgroundColor:b.defaultColor,borderWidth:0,borderColor:b.defaultColor,borderSkipped:"bottom"},a.elements.Rectangle=a.Element.extend({draw:function(){function
k(a){return h[(j+a)%4]}var
a=this._chart.ctx,b=this._view,c=b.width/2,d=b.x-c,e=b.x+c,f=b.base-(b.base-b.y),g=b.borderWidth/2;b.borderWidth&&(d+=g,e-=g,f+=g),a.beginPath(),a.fillStyle=b.backgroundColor,a.strokeStyle=b.borderColor,a.lineWidth=b.borderWidth;var
h=[[d,b.base],[d,f],[e,f],[e,b.base]],i=["bottom","left","top","right"],j=i.indexOf(b.borderSkipped,0);j===-1&&(j=0),a.moveTo.apply(a,k(0));for(var
l=1;l<4;l++)a.lineTo.apply(a,k(l));a.fill(),b.borderWidth&&a.stroke()},height:function(){var
a=this._view;return a.base-a.y},inRange:function(a,b){var
c=this._view;return!!c&&(c.y<c.base?a>=c.x-c.width/2&&a<=c.x+c.width/2&&b>=c.y&&b<=c.base:a>=c.x-c.width/2&&a<=c.x+c.width/2&&b>=c.base&&b<=c.y)},inLabelRange:function(a){var
b=this._view;return!!b&&(a>=b.x-b.width/2&&a<=b.x+b.width/2)},tooltipPosition:function(){var
a=this._view;return{x:a.x,y:a.y}}})}},{}],39:[function(a,b,c){"use
strict";b.exports=function(a){var
b=a.helpers,c={position:"bottom"},d=a.Scale.extend({getLabels:function(){var
a=this.chart.data;return(this.isHorizontal()?a.xLabels:a.yLabels)||a.labels},determineDataLimits:function(){var
a=this,c=a.getLabels();a.minIndex=0,a.maxIndex=c.length-1;var d;void
0!==a.options.ticks.min&&(d=b.indexOf(c,a.options.ticks.min),a.minIndex=d!==-1?d:a.minIndex),void
0!==a.options.ticks.max&&(d=b.indexOf(c,a.options.ticks.max),a.maxIndex=d!==-1?d:a.maxIndex),a.min=c[a.minIndex],a.max=c[a.maxIndex]},buildTicks:function(){var
a=this,b=a.getLabels();a.ticks=0===a.minIndex&&a.maxIndex===b.length-1?b:b.slice(a.minIndex,a.maxIndex+1)},getLabelForIndex:function(a){return
this.ticks[a]},getPixelForValue:function(a,b,c,d){var
e=this,f=Math.max(e.maxIndex+1-e.minIndex-(e.options.gridLines.offsetGridLines?0:1),1);if(void
0!==a){var
g=e.getLabels(),h=g.indexOf(a);b=h!==-1?h:b}if(e.isHorizontal()){var
i=e.width-(e.paddingLeft+e.paddingRight),j=i/f,k=j*(b-e.minIndex)+e.paddingLeft;return
e.options.gridLines.offsetGridLines&&d&&(k+=j/2),e.left+Math.round(k)}var
l=e.height-(e.paddingTop+e.paddingBottom),m=l/f,n=m*(b-e.minIndex)+e.paddingTop;return
e.options.gridLines.offsetGridLines&&d&&(n+=m/2),e.top+Math.round(n)},getPixelForTick:function(a,b){return
this.getPixelForValue(this.ticks[a],a+this.minIndex,null,b)},getValueForPixel:function(a){var
c,b=this,d=Math.max(b.ticks.length-(b.options.gridLines.offsetGridLines?0:1),1),e=b.isHorizontal(),f=e?b.width-(b.paddingLeft+b.paddingRight):b.height-(b.paddingTop+b.paddingBottom),g=f/d;return
a-=e?b.left:b.top,b.options.gridLines.offsetGridLines&&(a-=g/2),a-=e?b.paddingLeft:b.paddingTop,c=a<=0?0:Math.round(a/g)},getBasePixel:function(){return
this.bottom}});a.scaleService.registerScaleType("category",d,c)}},{}],40:[function(a,b,c){"use
strict";b.exports=function(a){var
b=a.helpers,c={position:"left",ticks:{callback:function(a,c,d){var
e=d.length>3?d[2]-d[1]:d[1]-d[0];Math.abs(e)>1&&a!==Math.floor(a)&&(e=a-Math.floor(a));var
f=b.log10(Math.abs(e)),g="";if(0!==a){var
h=-1*Math.floor(f);h=Math.max(Math.min(h,20),0),g=a.toFixed(h)}else
g="0";return
g}}},d=a.LinearScaleBase.extend({determineDataLimits:function(){function
h(b){return g?b.xAxisID===a.id:b.yAxisID===a.id}var
a=this,c=a.options,d=a.chart,e=d.data,f=e.datasets,g=a.isHorizontal();if(a.min=null,a.max=null,c.stacked){var
i={},j=!1,k=!1;b.each(f,function(e,f){var g=d.getDatasetMeta(f);void
0===i[g.type]&&(i[g.type]={positiveValues:[],negativeValues:[]});var
l=i[g.type].positiveValues,m=i[g.type].negativeValues;d.isDatasetVisible(f)&&h(g)&&b.each(e.data,function(b,d){var
e=+a.getRightValue(b);isNaN(e)||g.data[d].hidden||(l[d]=l[d]||0,m[d]=m[d]||0,c.relativePoints?l[d]=100:e<0?(k=!0,m[d]+=e):(j=!0,l[d]+=e))})}),b.each(i,function(c){var
d=c.positiveValues.concat(c.negativeValues),e=b.min(d),f=b.max(d);a.min=null===a.min?e:Math.min(a.min,e),a.max=null===a.max?f:Math.max(a.max,f)})}else
b.each(f,function(c,e){var
f=d.getDatasetMeta(e);d.isDatasetVisible(e)&&h(f)&&b.each(c.data,function(b,c){var
d=+a.getRightValue(b);isNaN(d)||f.data[c].hidden||(null===a.min?a.min=d:d<a.min&&(a.min=d),null===a.max?a.max=d:d>a.max&&(a.max=d))})});this.handleTickRangeOptions()},getTickLimit:function(){var
c,d=this,e=d.options.ticks;if(d.isHorizontal())c=Math.min(e.maxTicksLimit?e.maxTicksLimit:11,Math.ceil(d.width/50));else{var
f=b.getValueOrDefault(e.fontSize,a.defaults.global.defaultFontSize);c=Math.min(e.maxTicksLimit?e.maxTicksLimit:11,Math.ceil(d.height/(2*f)))}return
c},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getLabelForIndex:function(a,b){return+this.getRightValue(this.chart.data.datasets[b].data[a])},getPixelForValue:function(a){var
g,h,b=this,c=b.paddingLeft,d=b.paddingBottom,e=b.start,f=+b.getRightValue(a),i=b.end-e;return
b.isHorizontal()?(h=b.width-(c+b.paddingRight),g=b.left+h/i*(f-e),Math.round(g+c)):(h=b.height-(b.paddingTop+d),g=b.bottom-d-h/i*(f-e),Math.round(g))},getValueForPixel:function(a){var
b=this,c=b.isHorizontal(),d=b.paddingLeft,e=b.paddingBottom,f=c?b.width-(d+b.paddingRight):b.height-(b.paddingTop+e),g=(c?a-b.left-d:b.bottom-e-a)/f;return
b.start+(b.end-b.start)*g},getPixelForTick:function(a){return
this.getPixelForValue(this.ticksAsNumbers[a])}});a.scaleService.registerScaleType("linear",d,c)}},{}],41:[function(a,b,c){"use
strict";b.exports=function(a){var
b=a.helpers,c=b.noop;a.LinearScaleBase=a.Scale.extend({handleTickRangeOptions:function(){var
a=this,c=a.options,d=c.ticks;if(d.beginAtZero){var
e=b.sign(a.min),f=b.sign(a.max);e<0&&f<0?a.max=0:e>0&&f>0&&(a.min=0)}void
0!==d.min?a.min=d.min:void
0!==d.suggestedMin&&(a.min=Math.min(a.min,d.suggestedMin)),void
0!==d.max?a.max=d.max:void
0!==d.suggestedMax&&(a.max=Math.max(a.max,d.suggestedMax)),a.min===a.max&&(a.max++,d.beginAtZero||a.min--)},getTickLimit:c,handleDirectionalChanges:c,buildTicks:function(){var
a=this,c=a.options,d=a.ticks=[],e=c.ticks,f=b.getValueOrDefault,g=a.getTickLimit();g=Math.max(2,g);var
h,i=e.fixedStepSize&&e.fixedStepSize>0||e.stepSize&&e.stepSize>0;if(i)h=f(e.fixedStepSize,e.stepSize);else{var
j=b.niceNum(a.max-a.min,!1);h=b.niceNum(j/(g-1),!0)}var
k=Math.floor(a.min/h)*h,l=Math.ceil(a.max/h)*h,m=(l-k)/h;m=b.almostEquals(m,Math.round(m),h/1e3)?Math.round(m):Math.ceil(m),d.push(void
0!==e.min?e.min:k);for(var n=1;n<m;++n)d.push(k+n*h);d.push(void
0!==e.max?e.max:l),a.handleDirectionalChanges(),a.max=b.max(d),a.min=b.min(d),e.reverse?(d.reverse(),a.start=a.max,a.end=a.min):(a.start=a.min,a.end=a.max)},convertTicksToLabels:function(){var
b=this;b.ticksAsNumbers=b.ticks.slice(),b.zeroLineIndex=b.ticks.indexOf(0),a.Scale.prototype.convertTicksToLabels.call(b)}})}},{}],42:[function(a,b,c){"use
strict";b.exports=function(a){var
b=a.helpers,c={position:"left",ticks:{callback:function(a,c,d){var
e=a/Math.pow(10,Math.floor(b.log10(a)));return
1===e||2===e||5===e||0===c||c===d.length-1?a.toExponential():""}}},d=a.Scale.extend({determineDataLimits:function(){function
j(b){return i?b.xAxisID===a.id:b.yAxisID===a.id}var
a=this,c=a.options,d=c.ticks,e=a.chart,f=e.data,g=f.datasets,h=b.getValueOrDefault,i=a.isHorizontal();if(a.min=null,a.max=null,c.stacked){var
k={};b.each(g,function(d,f){var
g=e.getDatasetMeta(f);e.isDatasetVisible(f)&&j(g)&&(void
0===k[g.type]&&(k[g.type]=[]),b.each(d.data,function(b,d){var
e=k[g.type],f=+a.getRightValue(b);isNaN(f)||g.data[d].hidden||(e[d]=e[d]||0,c.relativePoints?e[d]=100:e[d]+=f)}))}),b.each(k,function(c){var
d=b.min(c),e=b.max(c);a.min=null===a.min?d:Math.min(a.min,d),a.max=null===a.max?e:Math.max(a.max,e)})}else
b.each(g,function(c,d){var
f=e.getDatasetMeta(d);e.isDatasetVisible(d)&&j(f)&&b.each(c.data,function(b,c){var
d=+a.getRightValue(b);isNaN(d)||f.data[c].hidden||(null===a.min?a.min=d:d<a.min&&(a.min=d),null===a.max?a.max=d:d>a.max&&(a.max=d))})});a.min=h(d.min,a.min),a.max=h(d.max,a.max),a.min===a.max&&(0!==a.min&&null!==a.min?(a.min=Math.pow(10,Math.floor(b.log10(a.min))-1),a.max=Math.pow(10,Math.floor(b.log10(a.max))+1)):(a.min=1,a.max=10))},buildTicks:function(){for(var
a=this,c=a.options,d=c.ticks,e=b.getValueOrDefault,f=a.ticks=[],g=e(d.min,Math.pow(10,Math.floor(b.log10(a.min))));g<a.max;){f.push(g);var
h=Math.floor(b.log10(g)),i=Math.floor(g/Math.pow(10,h))+1;10===i&&(i=1,++h),g=i*Math.pow(10,h)}var
j=e(d.max,g);f.push(j),a.isHorizontal()||f.reverse(),a.max=b.max(f),a.min=b.min(f),d.reverse?(f.reverse(),a.start=a.max,a.end=a.min):(a.start=a.min,a.end=a.max)},convertTicksToLabels:function(){this.tickValues=this.ticks.slice(),a.Scale.prototype.convertTicksToLabels.call(this)},getLabelForIndex:function(a,b){return+this.getRightValue(this.chart.data.datasets[b].data[a])},getPixelForTick:function(a){return
this.getPixelForValue(this.tickValues[a])},getPixelForValue:function(a){var
d,e,c=this,f=c.start,g=+c.getRightValue(a),h=b.log10(c.end)-b.log10(f),i=c.paddingTop,j=c.paddingBottom,k=c.paddingLeft;return
c.isHorizontal()?0===g?e=c.left+k:(d=c.width-(k+c.paddingRight),e=c.left+d/h*(b.log10(g)-b.log10(f)),e+=k):0===g?e=c.top+i:(d=c.height-(i+j),e=c.bottom-j-d/h*(b.log10(g)-b.log10(f))),e},getValueForPixel:function(a){var
e,f,c=this,d=b.log10(c.end)-b.log10(c.start);return
c.isHorizontal()?(f=c.width-(c.paddingLeft+c.paddingRight),e=c.start*Math.pow(10,(a-c.left-c.paddingLeft)*d/f)):(f=c.height-(c.paddingTop+c.paddingBottom),e=Math.pow(10,(c.bottom-c.paddingBottom-a)*d/f)/c.start),e}});a.scaleService.registerScaleType("logarithmic",d,c)}},{}],43:[function(a,b,c){"use
strict";b.exports=function(a){var
b=a.helpers,c=a.defaults.global,d={display:!0,animate:!0,lineArc:!1,position:"chartArea",angleLines:{display:!0,color:"rgba(0,
0, 0,
0.1)",lineWidth:1},ticks:{showLabelBackdrop:!0,backdropColor:"rgba(255,255,255,0.75)",backdropPaddingY:2,backdropPaddingX:2},pointLabels:{fontSize:10,callback:function(a){return
a}}},e=a.LinearScaleBase.extend({getValueCount:function(){return
this.chart.data.labels.length},setDimensions:function(){var
a=this,d=a.options,e=d.ticks;a.width=a.maxWidth,a.height=a.maxHeight,a.xCenter=Math.round(a.width/2),a.yCenter=Math.round(a.height/2);var
f=b.min([a.height,a.width]),g=b.getValueOrDefault(e.fontSize,c.defaultFontSize);a.drawingArea=d.display?f/2-(g/2+e.backdropPaddingY):f/2},determineDataLimits:function(){var
a=this,c=a.chart;a.min=null,a.max=null,b.each(c.data.datasets,function(d,e){if(c.isDatasetVisible(e)){var
f=c.getDatasetMeta(e);b.each(d.data,function(b,c){var
d=+a.getRightValue(b);isNaN(d)||f.data[c].hidden||(null===a.min?a.min=d:d<a.min&&(a.min=d),null===a.max?a.max=d:d>a.max&&(a.max=d))})}}),a.handleTickRangeOptions()},getTickLimit:function(){var
a=this.options.ticks,d=b.getValueOrDefault(a.fontSize,c.defaultFontSize);return
Math.min(a.maxTicksLimit?a.maxTicksLimit:11,Math.ceil(this.drawingArea/(1.5*d)))},convertTicksToLabels:function(){var
b=this;a.LinearScaleBase.prototype.convertTicksToLabels.call(b),b.pointLabels=b.chart.data.labels.map(b.options.pointLabels.callback,b)},getLabelForIndex:function(a,b){return+this.getRightValue(this.chart.data.datasets[b].data[a])},fit:function(){var
i,j,k,l,n,o,q,r,s,t,u,v,a=this.options.pointLabels,d=b.getValueOrDefault(a.fontSize,c.defaultFontSize),e=b.getValueOrDefault(a.fontStyle,c.defaultFontStyle),f=b.getValueOrDefault(a.fontFamily,c.defaultFontFamily),g=b.fontString(d,e,f),h=b.min([this.height/2-d-5,this.width/2]),m=this.width,p=0;for(this.ctx.font=g,j=0;j<this.getValueCount();j++){i=this.getPointPosition(j,h),k=this.ctx.measureText(this.pointLabels[j]?this.pointLabels[j]:"").width+5;var
w=this.getIndexAngle(j)+Math.PI/2,x=360*w/(2*Math.PI)%360;0===x||180===x?(l=k/2,i.x+l>m&&(m=i.x+l,n=j),i.x-l<p&&(p=i.x-l,q=j)):x<180?i.x+k>m&&(m=i.x+k,n=j):i.x-k<p&&(p=i.x-k,q=j)}s=p,t=Math.ceil(m-this.width),o=this.getIndexAngle(n),r=this.getIndexAngle(q),u=t/Math.sin(o+Math.PI/2),v=s/Math.sin(r+Math.PI/2),u=b.isNumber(u)?u:0,v=b.isNumber(v)?v:0,this.drawingArea=Math.round(h-(v+u)/2),this.setCenterPoint(v,u)},setCenterPoint:function(a,b){var
c=this,d=c.width-b-c.drawingArea,e=a+c.drawingArea;c.xCenter=Math.round((e+d)/2+c.left),c.yCenter=Math.round(c.height/2+c.top)},getIndexAngle:function(a){var
b=2*Math.PI/this.getValueCount(),c=this.chart.options&&this.chart.options.startAngle?this.chart.options.startAngle:0,d=c*Math.PI*2/360;return
a*b-Math.PI/2+d},getDistanceFromCenterForValue:function(a){var
b=this;if(null===a)return 0;var c=b.drawingArea/(b.max-b.min);return
b.options.reverse?(b.max-a)*c:(a-b.min)*c},getPointPosition:function(a,b){var
c=this,d=c.getIndexAngle(a);return{x:Math.round(Math.cos(d)*b)+c.xCenter,y:Math.round(Math.sin(d)*b)+c.yCenter}},getPointPositionForValue:function(a,b){return
this.getPointPosition(a,this.getDistanceFromCenterForValue(b))},getBasePosition:function(){var
a=this,b=a.min,c=a.max;return
a.getPointPositionForValue(0,a.beginAtZero?0:b<0&&c<0?c:b>0&&c>0?b:0)},draw:function(){var
a=this,d=a.options,e=d.gridLines,f=d.ticks,g=d.angleLines,h=d.pointLabels,i=b.getValueOrDefault;if(d.display){var
j=a.ctx,k=i(f.fontSize,c.defaultFontSize),l=i(f.fontStyle,c.defaultFontStyle),m=i(f.fontFamily,c.defaultFontFamily),n=b.fontString(k,l,m);if(b.each(a.ticks,function(g,h){if(h>0||d.reverse){var
l=a.getDistanceFromCenterForValue(a.ticksAsNumbers[h]),m=a.yCenter-l;if(e.display&&0!==h)if(j.strokeStyle=b.getValueAtIndexOrDefault(e.color,h-1),j.lineWidth=b.getValueAtIndexOrDefault(e.lineWidth,h-1),d.lineArc)j.beginPath(),j.arc(a.xCenter,a.yCenter,l,0,2*Math.PI),j.closePath(),j.stroke();else{j.beginPath();for(var
o=0;o<a.getValueCount();o++){var
p=a.getPointPosition(o,l);0===o?j.moveTo(p.x,p.y):j.lineTo(p.x,p.y)}j.closePath(),j.stroke()}if(f.display){var
q=i(f.fontColor,c.defaultFontColor);if(j.font=n,f.showLabelBackdrop){var
r=j.measureText(g).width;j.fillStyle=f.backdropColor,j.fillRect(a.xCenter-r/2-f.backdropPaddingX,m-k/2-f.backdropPaddingY,r+2*f.backdropPaddingX,k+2*f.backdropPaddingY)}j.textAlign="center",j.textBaseline="middle",j.fillStyle=q,j.fillText(g,a.xCenter,m)}}}),!d.lineArc){j.lineWidth=g.lineWidth,j.strokeStyle=g.color;for(var
o=a.getDistanceFromCenterForValue(d.reverse?a.min:a.max),p=i(h.fontSize,c.defaultFontSize),q=i(h.fontStyle,c.defaultFontStyle),r=i(h.fontFamily,c.defaultFontFamily),s=b.fontString(p,q,r),t=a.getValueCount()-1;t>=0;t--){if(g.display){var
u=a.getPointPosition(t,o);j.beginPath(),j.moveTo(a.xCenter,a.yCenter),j.lineTo(u.x,u.y),j.stroke(),j.closePath()}var
v=a.getPointPosition(t,o+5),w=i(h.fontColor,c.defaultFontColor);j.font=s,j.fillStyle=w;var
x=a.pointLabels,y=this.getIndexAngle(t)+Math.PI/2,z=360*y/(2*Math.PI)%360;0===z||180===z?j.textAlign="center":z<180?j.textAlign="left":j.textAlign="right",90===z||270===z?j.textBaseline="middle":z>270||z<90?j.textBaseline="bottom":j.textBaseline="top",j.fillText(x[t]?x[t]:"",v.x,v.y)}}}}});a.scaleService.registerScaleType("radialLinear",e,d)}},{}],44:[function(a,b,c){"use
strict";var d=a(6);d="function"==typeof
d?d:window.moment,b.exports=function(a){var
b=a.helpers,c={units:[{name:"millisecond",steps:[1,2,5,10,20,50,100,250,500]},{name:"second",steps:[1,2,5,10,30]},{name:"minute",steps:[1,2,5,10,30]},{name:"hour",steps:[1,2,3,6,12]},{name:"day",steps:[1,2,5]},{name:"week",maxStep:4},{name:"month",maxStep:3},{name:"quarter",maxStep:4},{name:"year",maxStep:!1}]},e={position:"bottom",time:{parser:!1,format:!1,unit:!1,round:!1,displayFormat:!1,isoWeekday:!1,displayFormats:{millisecond:"h:mm:ss.SSS
a",second:"h:mm:ss a",minute:"h:mm:ss
a",hour:"MMM D,
hA",day:"ll",week:"ll",month:"MMM
YYYY",quarter:"[Q]Q -
YYYY",year:"YYYY"}},ticks:{autoSkip:!1}},f=a.Scale.extend({initialize:function(){if(!d)throw
new Error("Chart.js - Moment.js could not be found! You must include
it before Chart.js to use the time scale. Download at
https://momentjs.com");a.Scale.prototype.initialize.call(this)},getLabelMoment:function(a,b){return"undefined"!=typeof
this.labelMoments[a]?this.labelMoments[a][b]:null},getMomentStartOf:function(a){var
b=this;return"week"===b.options.time.unit&&b.options.time.isoWeekday!==!1?a.clone().startOf("isoWeek").isoWeekday(b.options.time.isoWeekday):a.clone().startOf(b.tickUnit)},determineDataLimits:function(){var
a=this;a.labelMoments=[];var
c=[];a.chart.data.labels&&a.chart.data.labels.length>0?(b.each(a.chart.data.labels,function(b){var
d=a.parseTime(b);d.isValid()&&(a.options.time.round&&d.startOf(a.options.time.round),c.push(d))},a),a.firstTick=d.min.call(a,c),a.lastTick=d.max.call(a,c)):(a.firstTick=null,a.lastTick=null),b.each(a.chart.data.datasets,function(e,f){var
g=[],h=a.chart.isDatasetVisible(f);"object"==typeof
e.data[0]&&null!==e.data[0]?b.each(e.data,function(b){var
c=a.parseTime(a.getRightValue(b));c.isValid()&&(a.options.time.round&&c.startOf(a.options.time.round),g.push(c),h&&(a.firstTick=null!==a.firstTick?d.min(a.firstTick,c):c,a.lastTick=null!==a.lastTick?d.max(a.lastTick,c):c))},a):g=c,a.labelMoments.push(g)},a),a.options.time.min&&(a.firstTick=a.parseTime(a.options.time.min)),a.options.time.max&&(a.lastTick=a.parseTime(a.options.time.max)),a.firstTick=(a.firstTick||d()).clone(),a.lastTick=(a.lastTick||d()).clone()},buildTicks:function(){var
d=this;d.ctx.save();var
e=b.getValueOrDefault(d.options.ticks.fontSize,a.defaults.global.defaultFontSize),f=b.getValueOrDefault(d.options.ticks.fontStyle,a.defaults.global.defaultFontStyle),g=b.getValueOrDefault(d.options.ticks.fontFamily,a.defaults.global.defaultFontFamily),h=b.fontString(e,f,g);if(d.ctx.font=h,d.ticks=[],d.unitScale=1,d.scaleSizeInUnits=0,d.options.time.unit)d.tickUnit=d.options.time.unit||"day",d.displayFormat=d.options.time.displayFormats[d.tickUnit],d.scaleSizeInUnits=d.lastTick.diff(d.firstTick,d.tickUnit,!0),d.unitScale=b.getValueOrDefault(d.options.time.unitStepSize,1);else{var
i=d.isHorizontal()?d.width-(d.paddingLeft+d.paddingRight):d.height-(d.paddingTop+d.paddingBottom),j=d.tickFormatFunction(d.firstTick,0,[]),k=d.ctx.measureText(j).width,l=Math.cos(b.toRadians(d.options.ticks.maxRotation)),m=Math.sin(b.toRadians(d.options.ticks.maxRotation));k=k*l+e*m;var
n=i/k;d.tickUnit="millisecond",d.scaleSizeInUnits=d.lastTick.diff(d.firstTick,d.tickUnit,!0),d.displayFormat=d.options.time.displayFormats[d.tickUnit];for(var
o=0,p=c.units[o];o<c.units.length;){if(d.unitScale=1,b.isArray(p.steps)&&Math.ceil(d.scaleSizeInUnits/n)<b.max(p.steps)){for(var
q=0;q<p.steps.length;++q)if(p.steps[q]>=Math.ceil(d.scaleSizeInUnits/n)){d.unitScale=b.getValueOrDefault(d.options.time.unitStepSize,p.steps[q]);break}break}if(p.maxStep===!1||Math.ceil(d.scaleSizeInUnits/n)<p.maxStep){d.unitScale=b.getValueOrDefault(d.options.time.unitStepSize,Math.ceil(d.scaleSizeInUnits/n));break}++o,p=c.units[o],d.tickUnit=p.name;var
r=d.firstTick.diff(d.getMomentStartOf(d.firstTick),d.tickUnit,!0),s=d.getMomentStartOf(d.lastTick.clone().add(1,d.tickUnit)).diff(d.lastTick,d.tickUnit,!0);d.scaleSizeInUnits=d.lastTick.diff(d.firstTick,d.tickUnit,!0)+r+s,d.displayFormat=d.options.time.displayFormats[p.name]}}var
t;if(d.options.time.min?t=d.getMomentStartOf(d.firstTick):(d.firstTick=d.getMomentStartOf(d.firstTick),t=d.firstTick),!d.options.time.max){var
u=d.getMomentStartOf(d.lastTick),v=u.diff(d.lastTick,d.tickUnit,!0);v<0?d.lastTick=d.getMomentStartOf(d.lastTick.add(1,d.tickUnit)):v>=0&&(d.lastTick=u),d.scaleSizeInUnits=d.lastTick.diff(d.firstTick,d.tickUnit,!0)}d.smallestLabelSeparation=d.width,b.each(d.chart.data.datasets,function(a,b){for(var
c=1;c<d.labelMoments[b].length;c++)d.smallestLabelSeparation=Math.min(d.smallestLabelSeparation,d.labelMoments[b][c].diff(d.labelMoments[b][c-1],d.tickUnit,!0))},d),d.options.time.displayFormat&&(d.displayFormat=d.options.time.displayFormat),d.ticks.push(d.firstTick.clone());for(var
w=1;w<=d.scaleSizeInUnits;++w){var
x=t.clone().add(w,d.tickUnit);if(d.options.time.max&&x.diff(d.lastTick,d.tickUnit,!0)>=0)break;w%d.unitScale===0&&d.ticks.push(x)}var
y=d.ticks[d.ticks.length-1].diff(d.lastTick,d.tickUnit);0===y&&0!==d.scaleSizeInUnits||(d.options.time.max?(d.ticks.push(d.lastTick.clone()),d.scaleSizeInUnits=d.lastTick.diff(d.ticks[0],d.tickUnit,!0)):(d.ticks.push(d.lastTick.clone()),d.scaleSizeInUnits=d.lastTick.diff(d.firstTick,d.tickUnit,!0))),d.ctx.restore()},getLabelForIndex:function(a,b){var
c=this,d=c.chart.data.labels&&a<c.chart.data.labels.length?c.chart.data.labels[a]:"";return"object"==typeof
c.chart.data.datasets[b].data[0]&&(d=c.getRightValue(c.chart.data.datasets[b].data[a])),c.options.time.tooltipFormat&&(d=c.parseTime(d).format(c.options.time.tooltipFormat)),d},tickFormatFunction:function(a,c,d){var
e=a.format(this.displayFormat),f=this.options.ticks,g=b.getValueOrDefault(f.callback,f.userCallback);return
g?g(e,c,d):e},convertTicksToLabels:function(){var
a=this;a.tickMoments=a.ticks,a.ticks=a.ticks.map(a.tickFormatFunction,a)},getPixelForValue:function(a,b,c){var
e=this;a&&a.isValid||(a=d(e.getRightValue(a)));var
f=a&&a.isValid&&a.isValid()?a:e.getLabelMoment(c,b);if(f){var
g=f.diff(e.firstTick,e.tickUnit,!0),h=0!==g?g/e.scaleSizeInUnits:g;if(e.isHorizontal()){var
i=e.width-(e.paddingLeft+e.paddingRight),j=i*h+e.paddingLeft;return
e.left+Math.round(j)}var
k=e.height-(e.paddingTop+e.paddingBottom),l=k*h+e.paddingTop;return
e.top+Math.round(l)}},getPixelForTick:function(a){return
this.getPixelForValue(this.tickMoments[a],null,null)},getValueForPixel:function(a){var
b=this,c=b.isHorizontal()?b.width-(b.paddingLeft+b.paddingRight):b.height-(b.paddingTop+b.paddingBottom),e=(a-(b.isHorizontal()?b.left+b.paddingLeft:b.top+b.paddingTop))/c;return
e*=b.scaleSizeInUnits,b.firstTick.clone().add(d.duration(e,b.tickUnit).asSeconds(),"seconds")},parseTime:function(a){var
b=this;return"string"==typeof
b.options.time.parser?d(a,b.options.time.parser):"function"==typeof
b.options.time.parser?b.options.time.parser(a):"function"==typeof
a.getMonth||"number"==typeof
a?d(a):a.isValid&&a.isValid()?a:"string"!=typeof
b.options.time.format&&b.options.time.format.call?(console.warn("options.time.format
is deprecated and replaced by options.time.parser. See
http://nnnick.github.io/Chart.js/docs-v2/#scales-time-scale"),b.options.time.format(a)):d(a,b.options.time.format)}});a.scaleService.registerScaleType("time",f,e)}},{6:6}]},{},[7])(7)});chartjs/index.html000064400000000054151175232460010204
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>chartjs/LICENSE.md000064400000002044151175232460007614
0ustar00Copyright (c) 2013-2015 Nick Downie
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to the
following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
USE OR OTHER DEALINGS IN THE SOFTWARE.
chosen/chosen-bootstrap.css000064400000011002151175232460012027
0ustar00select.form-control + .chosen-container.chosen-container-single
.chosen-single {
display: block;
width: 100%;
height: 34px;
padding: 6px 12px;
font-size: 14px;
line-height: 1.428571429;
color: #555;
vertical-align: middle;
background-color: #fff;
border: 1px solid #ccc;
border-radius: 4px;
-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,0.075);
box-shadow: inset 0 1px 1px rgba(0,0,0,0.075);
-webkit-transition: border-color ease-in-out .15s,box-shadow
ease-in-out .15s;
transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
background-image:none;
}
select.form-control + .chosen-container.chosen-container-single
.chosen-single div {
top:4px;
color:#000;
}
select.form-control + .chosen-container .chosen-drop {
background-color: #FFF;
border: 1px solid #CCC;
border: 1px solid rgba(0, 0, 0, 0.15);
border-radius: 4px;
-webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
background-clip: padding-box;
margin: 2px 0 0;
}
select.form-control + .chosen-container .chosen-search input[type=text] {
display: block;
width: 100%;
height: 34px;
padding: 6px 12px;
font-size: 14px;
line-height: 1.428571429;
color: #555;
vertical-align: middle;
background-color: #FFF;
border: 1px solid #CCC;
border-radius: 4px;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
-webkit-transition: border-color ease-in-out 0.15s, box-shadow
ease-in-out 0.15s;
transition: border-color ease-in-out 0.15s, box-shadow ease-in-out
0.15s;
background-image:none;
}
select.form-control + .chosen-container .chosen-results {
margin: 2px 0 0;
padding: 5px 0;
font-size: 14px;
list-style: none;
background-color: #fff;
margin-bottom: 5px;
}
select.form-control + .chosen-container .chosen-results li ,
select.form-control + .chosen-container .chosen-results li.active-result {
display: block;
padding: 3px 20px;
clear: both;
font-weight: normal;
line-height: 1.428571429;
color: #333;
white-space: nowrap;
background-image:none;
}
select.form-control + .chosen-container .chosen-results li:hover,
select.form-control + .chosen-container .chosen-results
li.active-result:hover,
select.form-control + .chosen-container .chosen-results li.highlighted
{
color: #FFF;
text-decoration: none;
background-color: #428BCA;
background-image:none;
}
select.form-control + .chosen-container-multi .chosen-choices {
display: block;
width: 100%;
min-height: 34px;
padding: 6px;
font-size: 14px;
line-height: 1.428571429;
color: #555;
vertical-align: middle;
background-color: #FFF;
border: 1px solid #CCC;
border-radius: 4px;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
-webkit-transition: border-color ease-in-out 0.15s, box-shadow
ease-in-out 0.15s;
transition: border-color ease-in-out 0.15s, box-shadow ease-in-out
0.15s;
background-image:none;
}
select.form-control + .chosen-container-multi .chosen-choices
li.search-field input[type="text"] {
height:auto;
padding:5px 0;
}
select.form-control + .chosen-container-multi .chosen-choices
li.search-choice {
background-image: none;
padding: 3px 24px 3px 5px;
margin: 0 6px 0 0;
font-size: 14px;
font-weight: normal;
line-height: 1.428571429;
text-align: center;
white-space: nowrap;
vertical-align: middle;
cursor: pointer;
border: 1px solid #ccc;
border-radius: 4px;
color: #333;
background-color: #FFF;
border-color: #CCC;
}
select.form-control + .chosen-container-multi .chosen-choices
li.search-choice .search-choice-close {
top:8px;
right:6px;
}
select.form-control + .chosen-container-multi.chosen-container-active
.chosen-choices,
select.form-control +
.chosen-container.chosen-container-single.chosen-container-active
.chosen-single,
select.form-control + .chosen-container .chosen-search
input[type=text]:focus{
border-color: #66AFE9;
outline: 0;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 8px
rgba(102, 175, 233, 0.6);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 8px rgba(102, 175,
233, 0.6);
}
select.form-control + .chosen-container-multi .chosen-results
li.result-selected{
display: list-item;
color: #ccc;
cursor: default;
background-color: white;
}
chosen/chosen-sprite-white.png000064400000001731151175232460012442
0ustar00�PNG
IHDR4%
���sBIT|d� pHYs��~�tEXtSoftwareAdobe
Fireworks CS6輲�SIDATX�ݘ?�U�WSYY�Rv��'�ŽJ
!dq��X�E� )>!j �2(�b�(�ȍ� �
.>��Fc����c1��7y;���7�˝{g����?g&H��pw�lX^t���}3�8�m*6���3���<p8�u��I�7`��ԓ�G�}
X�!w_�$��zXt�~���%�Y@@�����`S,��`fu��(��8��-��F�
m��
��̿�L�:p,�s�E3��*=��DE�w�H�������m����2#2��~�̾�
9�^Vh�~,�&�L��wo6|�
K��d2�<Z>��
����=
|P
p���tT3;
�͇��)w?א���:�.7~�<p�r���s�}w??��f6G�N���Ic5����U��?�j{�f)�ޣ
c�RZ��F�h}��S�h2��/�
s���0�RZ�1n������*�hJf��N�d�R:�F��.����:�t�B��u!��=�c��>1�>��r]@^3�2"�3)�t�P&��'���!ƬO��
��I�����'�x
�GC�ӹ]�]S��Ph����>�@ax-i7�'7��nV�S5�Z��$��˥/ii��(9�3*pE��Nk�c;�}�DJ塜�%I{JI�+隤_%�#Ԧ)7��B�y�B���a8P�M��0�_V�"�w�i�+���{�S���6J�Π�#�I�H:,)H�-鄤?%�
�ܧMb|�[�_K��[q��Pk���`�tp��ޣ0/�G�!��g���2e�����JJ��4�)�R�I�=�:\�M�\-B�P|������bK�-IEND�B`�chosen/chosen-sprite.png000064400000001032151175232460011316
0ustar00�PNG
IHDR4%��^�IDATH�헱kSQƯ
.-����=�$�b�o�$((T�Hw��*����"nupA�@
P�Apq�J$p!P��M1��.�����;���=��\D�.Y�n0��@}�DMF���>Fb��1���
�c� !6�1r��b�%G���I��J(v��fFy�O����H4B
c�1�}��^��4��5Fo��G�X�ٝv�U�n�(�R�s�p����v��*��8sP���*�c�O�TQWŬ���j1Q�H}����T��+���}��֕d�/���L�Lc�F�6�˔�7��,9ʼ1IkJ�(�dJj��Lc�^��z*"Hu�j)����,?<��._1�a�������°x� /b�}�T!�����i?O�u� oc\������eN��c:�99�\@�s�
uZ���q��|yp�k�a�����6��B|���1��G����gq�u����p�+���[�*y���IEND�B`�chosen/chosen-sprite@2x.png000064400000001342151175232460011674
0ustar00�PNG
IHDRhJ�q��IDATh�횿o�@�#�P �
�����?!d�ԅ�sft⇿'R�J0�#[���Ɉ��+��������P����{R�W%����ދ��1�e,�J4�h��'�Y�2�Ny�H%?��/�4��
L�j�[�� -�85H�q���H�����qȱ�s���6�C+�%0��`QW�X����O�5��
�]:ڿ��h���Ig���7�oi����
1n�
���f���Hn�'
�!-��
hjh؝l�n��zH���A��oj��Q�FEæ�����hH
'��wԲt�c �8�H۪�/�4��
L�j��`$�8�� q�iD�S %N��9
�J�1Sp̶�;X�k}\kN[�[�t���������k�%��s�F<Uk��}dvǢ�W���b��?�O/n&�
�0p)/��Pyf'��~�|��|+a�C�˒�bKq��SB>��p��3�K�X��R~����C�gY�Ƭ��,�9���A%w;8Q�h�H�,�]n�p��Y��>�$�c
��)�ƒ�K�hw~��S�ʼn�q��P�*�w�Ҷ�����X�y{$���u�%�&�Z����'������(�8���֜�b��ҍ၊�5R6�emP�0�<�F�-F��
i��#� ��z�H�|��Y��JZ�\N��IEND�B`�chosen/chosen.css000064400000027634151175232460010036
0ustar00/*!
Chosen, a Select Box Enhancer for jQuery and Prototype
by Patrick Filler for Harvest, http://getharvest.com
Version 1.8.7
Full source at https://github.com/harvesthq/chosen
Copyright (c) 2011-2018 Harvest http://getharvest.com
MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
This file is generated by `grunt build`, do not edit it by hand.
*/
/* @group Base */
.chosen-container {
position: relative;
display: inline-block;
vertical-align: middle;
font-size: 13px;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.chosen-container * {
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
.chosen-container .chosen-drop {
position: absolute;
top: 100%;
z-index: 1010;
width: 100%;
border: 1px solid #aaa;
border-top: 0;
background: #fff;
-webkit-box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15);
box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15);
clip: rect(0, 0, 0, 0);
-webkit-clip-path: inset(100% 100%);
clip-path: inset(100% 100%);
}
.chosen-container.chosen-with-drop .chosen-drop {
clip: auto;
-webkit-clip-path: none;
clip-path: none;
}
.chosen-container a {
cursor: pointer;
}
.chosen-container .search-choice .group-name, .chosen-container
.chosen-single .group-name {
margin-right: 4px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
font-weight: normal;
color: #999999;
}
.chosen-container .search-choice .group-name:after, .chosen-container
.chosen-single .group-name:after {
content: ":";
padding-left: 2px;
vertical-align: top;
}
/* @end */
/* @group Single Chosen */
.chosen-container-single .chosen-single {
position: relative;
display: block;
overflow: hidden;
padding: 0 0 0 8px;
height: 25px;
border: 1px solid #aaa;
border-radius: 5px;
background-color: #fff;
background: -webkit-gradient(linear, left top, left bottom,
color-stop(20%, #fff), color-stop(50%, #f6f6f6), color-stop(52%, #eee),
to(#f4f4f4));
background: linear-gradient(#fff 20%, #f6f6f6 50%, #eee 52%, #f4f4f4
100%);
background-clip: padding-box;
-webkit-box-shadow: 0 0 3px #fff inset, 0 1px 1px rgba(0, 0, 0, 0.1);
box-shadow: 0 0 3px #fff inset, 0 1px 1px rgba(0, 0, 0, 0.1);
color: #444;
text-decoration: none;
white-space: nowrap;
line-height: 24px;
}
.chosen-container-single .chosen-default {
color: #999;
}
.chosen-container-single .chosen-single span {
display: block;
overflow: hidden;
margin-right: 26px;
text-overflow: ellipsis;
white-space: nowrap;
}
.chosen-container-single .chosen-single-with-deselect span {
margin-right: 38px;
}
.chosen-container-single .chosen-single abbr {
position: absolute;
top: 6px;
right: 26px;
display: block;
width: 12px;
height: 12px;
background: url("chosen-sprite.png") -42px 1px no-repeat;
font-size: 1px;
}
.chosen-container-single .chosen-single abbr:hover {
background-position: -42px -10px;
}
.chosen-container-single.chosen-disabled .chosen-single abbr:hover {
background-position: -42px -10px;
}
.chosen-container-single .chosen-single div {
position: absolute;
top: 0;
right: 0;
display: block;
width: 18px;
height: 100%;
}
.chosen-container-single .chosen-single div b {
display: block;
width: 100%;
height: 100%;
background: url("chosen-sprite.png") no-repeat 0px 2px;
}
.chosen-container-single .chosen-search {
position: relative;
z-index: 1010;
margin: 0;
padding: 3px 4px;
white-space: nowrap;
}
.chosen-container-single .chosen-search input[type="text"] {
margin: 1px 0;
padding: 4px 20px 4px 5px;
width: 100%;
height: auto;
outline: 0;
border: 1px solid #aaa;
background: url("chosen-sprite.png") no-repeat 100% -20px;
font-size: 1em;
font-family: sans-serif;
line-height: normal;
border-radius: 0;
}
.chosen-container-single .chosen-drop {
margin-top: -1px;
border-radius: 0 0 4px 4px;
background-clip: padding-box;
}
.chosen-container-single.chosen-container-single-nosearch .chosen-search {
position: absolute;
clip: rect(0, 0, 0, 0);
-webkit-clip-path: inset(100% 100%);
clip-path: inset(100% 100%);
}
/* @end */
/* @group Results */
.chosen-container .chosen-results {
color: #444;
position: relative;
overflow-x: hidden;
overflow-y: auto;
margin: 0 4px 4px 0;
padding: 0 0 0 4px;
max-height: 240px;
-webkit-overflow-scrolling: touch;
}
.chosen-container .chosen-results li {
display: none;
margin: 0;
padding: 5px 6px;
list-style: none;
line-height: 15px;
word-wrap: break-word;
-webkit-touch-callout: none;
}
.chosen-container .chosen-results li.active-result {
display: list-item;
cursor: pointer;
}
.chosen-container .chosen-results li.disabled-result {
display: list-item;
color: #ccc;
cursor: default;
}
.chosen-container .chosen-results li.highlighted {
background-color: #3875d7;
background-image: -webkit-gradient(linear, left top, left bottom,
color-stop(20%, #3875d7), color-stop(90%, #2a62bc));
background-image: linear-gradient(#3875d7 20%, #2a62bc 90%);
color: #fff;
}
.chosen-container .chosen-results li.no-results {
color: #777;
display: list-item;
background: #f4f4f4;
}
.chosen-container .chosen-results li.group-result {
display: list-item;
font-weight: bold;
cursor: default;
}
.chosen-container .chosen-results li.group-option {
padding-left: 15px;
}
.chosen-container .chosen-results li em {
font-style: normal;
text-decoration: underline;
}
/* @end */
/* @group Multi Chosen */
.chosen-container-multi .chosen-choices {
position: relative;
overflow: hidden;
margin: 0;
padding: 0 5px;
width: 100%;
height: auto;
border: 1px solid #aaa;
background-color: #fff;
background-image: -webkit-gradient(linear, left top, left bottom,
color-stop(1%, #eee), color-stop(15%, #fff));
background-image: linear-gradient(#eee 1%, #fff 15%);
cursor: text;
}
.chosen-container-multi .chosen-choices li {
float: left;
list-style: none;
}
.chosen-container-multi .chosen-choices li.search-field {
margin: 0;
padding: 0;
white-space: nowrap;
}
.chosen-container-multi .chosen-choices li.search-field
input[type="text"] {
margin: 1px 0;
padding: 0;
height: 25px;
outline: 0;
border: 0 !important;
background: transparent !important;
-webkit-box-shadow: none;
box-shadow: none;
color: #999;
font-size: 100%;
font-family: sans-serif;
line-height: normal;
border-radius: 0;
width: 25px;
}
.chosen-container-multi .chosen-choices li.search-choice {
position: relative;
margin: 3px 5px 3px 0;
padding: 3px 20px 3px 5px;
border: 1px solid #aaa;
max-width: 100%;
border-radius: 3px;
background-color: #eeeeee;
background-image: -webkit-gradient(linear, left top, left bottom,
color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%,
#e8e8e8), to(#eee));
background-image: linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%,
#eee 100%);
background-size: 100% 19px;
background-repeat: repeat-x;
background-clip: padding-box;
-webkit-box-shadow: 0 0 2px #fff inset, 0 1px 0 rgba(0, 0, 0, 0.05);
box-shadow: 0 0 2px #fff inset, 0 1px 0 rgba(0, 0, 0, 0.05);
color: #333;
line-height: 13px;
cursor: default;
}
.chosen-container-multi .chosen-choices li.search-choice span {
word-wrap: break-word;
}
.chosen-container-multi .chosen-choices li.search-choice
.search-choice-close {
position: absolute;
top: 4px;
right: 3px;
display: block;
width: 12px;
height: 12px;
background: url("chosen-sprite.png") -42px 1px no-repeat;
font-size: 1px;
}
.chosen-container-multi .chosen-choices li.search-choice
.search-choice-close:hover {
background-position: -42px -10px;
}
.chosen-container-multi .chosen-choices li.search-choice-disabled {
padding-right: 5px;
border: 1px solid #ccc;
background-color: #e4e4e4;
background-image: -webkit-gradient(linear, left top, left bottom,
color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%,
#e8e8e8), to(#eee));
background-image: linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%,
#eee 100%);
color: #666;
}
.chosen-container-multi .chosen-choices li.search-choice-focus {
background: #d4d4d4;
}
.chosen-container-multi .chosen-choices li.search-choice-focus
.search-choice-close {
background-position: -42px -10px;
}
.chosen-container-multi .chosen-results {
margin: 0;
padding: 0;
}
.chosen-container-multi .chosen-drop .result-selected {
display: list-item;
color: #ccc;
cursor: default;
}
/* @end */
/* @group Active */
.chosen-container-active .chosen-single {
border: 1px solid #5897fb;
-webkit-box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}
.chosen-container-active.chosen-with-drop .chosen-single {
border: 1px solid #aaa;
border-bottom-right-radius: 0;
border-bottom-left-radius: 0;
background-image: -webkit-gradient(linear, left top, left bottom,
color-stop(20%, #eee), color-stop(80%, #fff));
background-image: linear-gradient(#eee 20%, #fff 80%);
-webkit-box-shadow: 0 1px 0 #fff inset;
box-shadow: 0 1px 0 #fff inset;
}
.chosen-container-active.chosen-with-drop .chosen-single div {
border-left: none;
background: transparent;
}
.chosen-container-active.chosen-with-drop .chosen-single div b {
background-position: -18px 2px;
}
.chosen-container-active .chosen-choices {
border: 1px solid #5897fb;
-webkit-box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}
.chosen-container-active .chosen-choices li.search-field
input[type="text"] {
color: #222 !important;
}
/* @end */
/* @group Disabled Support */
.chosen-disabled {
opacity: 0.5 !important;
cursor: default;
}
.chosen-disabled .chosen-single {
cursor: default;
}
.chosen-disabled .chosen-choices .search-choice .search-choice-close {
cursor: default;
}
/* @end */
/* @group Right to Left */
.chosen-rtl {
text-align: right;
}
.chosen-rtl .chosen-single {
overflow: visible;
padding: 0 8px 0 0;
}
.chosen-rtl .chosen-single span {
margin-right: 0;
margin-left: 26px;
direction: rtl;
}
.chosen-rtl .chosen-single-with-deselect span {
margin-left: 38px;
}
.chosen-rtl .chosen-single div {
right: auto;
left: 3px;
}
.chosen-rtl .chosen-single abbr {
right: auto;
left: 26px;
}
.chosen-rtl .chosen-choices li {
float: right;
}
.chosen-rtl .chosen-choices li.search-field input[type="text"] {
direction: rtl;
}
.chosen-rtl .chosen-choices li.search-choice {
margin: 3px 5px 3px 0;
padding: 3px 5px 3px 19px;
}
.chosen-rtl .chosen-choices li.search-choice .search-choice-close {
right: auto;
left: 4px;
}
.chosen-rtl.chosen-container-single .chosen-results {
margin: 0 0 4px 4px;
padding: 0 4px 0 0;
}
.chosen-rtl .chosen-results li.group-option {
padding-right: 15px;
padding-left: 0;
}
.chosen-rtl.chosen-container-active.chosen-with-drop .chosen-single div {
border-right: none;
}
.chosen-rtl .chosen-search input[type="text"] {
padding: 4px 5px 4px 20px;
background: url("chosen-sprite.png") no-repeat -30px -20px;
direction: rtl;
}
.chosen-rtl.chosen-container-single .chosen-single div b {
background-position: 6px 2px;
}
.chosen-rtl.chosen-container-single.chosen-with-drop .chosen-single div b {
background-position: -12px 2px;
}
/* @end */
/* @group Retina compatibility */
@media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen
and (min-resolution: 144dpi), only screen and (min-resolution: 1.5dppx) {
.chosen-rtl .chosen-search input[type="text"],
.chosen-container-single .chosen-single abbr,
.chosen-container-single .chosen-single div b,
.chosen-container-single .chosen-search input[type="text"],
.chosen-container-multi .chosen-choices .search-choice
.search-choice-close,
.chosen-container .chosen-results-scroll-down span,
.chosen-container .chosen-results-scroll-up span {
background-image: url("chosen-sprite@2x.png") !important;
background-size: 52px 37px !important;
background-repeat: no-repeat !important;
}
}
/* @end */
chosen/chosen.jquery.min.js000064400000070701151175232460011753 0ustar00/*
Chosen v1.8.7 | (c) 2011-2018 by Harvest | MIT License,
https://github.com/harvesthq/chosen/blob/master/LICENSE.md */
(function(){var t,e,s,i,n=function(t,e){return function(){return
t.apply(e,arguments)}},r=function(t,e){function
s(){this.constructor=t}for(var i in
e)o.call(e,i)&&(t[i]=e[i]);return
s.prototype=e.prototype,t.prototype=new
s,t.__super__=e.prototype,t},o={}.hasOwnProperty;(i=function(){function
t(){this.options_index=0,this.parsed=[]}return
t.prototype.add_node=function(t){return"OPTGROUP"===t.nodeName.toUpperCase()?this.add_group(t):this.add_option(t)},t.prototype.add_group=function(t){var
e,s,i,n,r,o;for(e=this.parsed.length,this.parsed.push({array_index:e,group:!0,label:t.label,title:t.title?t.title:void
0,children:0,disabled:t.disabled,classes:t.className}),o=[],s=0,i=(r=t.childNodes).length;s<i;s++)n=r[s],o.push(this.add_option(n,e,t.disabled));return
o},t.prototype.add_option=function(t,e,s){if("OPTION"===t.nodeName.toUpperCase())return""!==t.text?(null!=e&&(this.parsed[e].children+=1),this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:t.value,text:t.text,html:t.innerHTML,title:t.title?t.title:void
0,selected:t.selected,disabled:!0===s?s:t.disabled,group_array_index:e,group_label:null!=e?this.parsed[e].label:null,classes:t.className,style:t.style.cssText})):this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:!0}),this.options_index+=1},t}()).select_to_array=function(t){var
e,s,n,r,o;for(r=new
i,s=0,n=(o=t.childNodes).length;s<n;s++)e=o[s],r.add_node(e);return
r.parsed},e=function(){function
t(e,s){this.form_field=e,this.options=null!=s?s:{},this.label_click_handler=n(this.label_click_handler,this),t.browser_is_supported()&&(this.is_multiple=this.form_field.multiple,this.set_default_text(),this.set_default_values(),this.setup(),this.set_up_html(),this.register_observers(),this.on_ready())}return
t.prototype.set_default_values=function(){return
this.click_test_action=function(t){return function(e){return
t.test_active_click(e)}}(this),this.activate_action=function(t){return
function(e){return
t.activate_field(e)}}(this),this.active_field=!1,this.mouse_on_container=!1,this.results_showing=!1,this.result_highlighted=null,this.is_rtl=this.options.rtl||/\bchosen-rtl\b/.test(this.form_field.className),this.allow_single_deselect=null!=this.options.allow_single_deselect&&null!=this.form_field.options[0]&&""===this.form_field.options[0].text&&this.options.allow_single_deselect,this.disable_search_threshold=this.options.disable_search_threshold||0,this.disable_search=this.options.disable_search||!1,this.enable_split_word_search=null==this.options.enable_split_word_search||this.options.enable_split_word_search,this.group_search=null==this.options.group_search||this.options.group_search,this.search_contains=this.options.search_contains||!1,this.single_backstroke_delete=null==this.options.single_backstroke_delete||this.options.single_backstroke_delete,this.max_selected_options=this.options.max_selected_options||Infinity,this.inherit_select_classes=this.options.inherit_select_classes||!1,this.display_selected_options=null==this.options.display_selected_options||this.options.display_selected_options,this.display_disabled_options=null==this.options.display_disabled_options||this.options.display_disabled_options,this.include_group_label_in_selected=this.options.include_group_label_in_selected||!1,this.max_shown_results=this.options.max_shown_results||Number.POSITIVE_INFINITY,this.case_sensitive_search=this.options.case_sensitive_search||!1,this.hide_results_on_select=null==this.options.hide_results_on_select||this.options.hide_results_on_select},t.prototype.set_default_text=function(){return
this.form_field.getAttribute("data-placeholder")?this.default_text=this.form_field.getAttribute("data-placeholder"):this.is_multiple?this.default_text=this.options.placeholder_text_multiple||this.options.placeholder_text||t.default_multiple_text:this.default_text=this.options.placeholder_text_single||this.options.placeholder_text||t.default_single_text,this.default_text=this.escape_html(this.default_text),this.results_none_found=this.form_field.getAttribute("data-no_results_text")||this.options.no_results_text||t.default_no_result_text},t.prototype.choice_label=function(t){return
this.include_group_label_in_selected&&null!=t.group_label?"<b
class='group-name'>"+this.escape_html(t.group_label)+"</b>"+t.html:t.html},t.prototype.mouse_enter=function(){return
this.mouse_on_container=!0},t.prototype.mouse_leave=function(){return
this.mouse_on_container=!1},t.prototype.input_focus=function(t){if(this.is_multiple){if(!this.active_field)return
setTimeout(function(t){return function(){return
t.container_mousedown()}}(this),50)}else if(!this.active_field)return
this.activate_field()},t.prototype.input_blur=function(t){if(!this.mouse_on_container)return
this.active_field=!1,setTimeout(function(t){return function(){return
t.blur_test()}}(this),100)},t.prototype.label_click_handler=function(t){return
this.is_multiple?this.container_mousedown(t):this.activate_field()},t.prototype.results_option_build=function(t){var
e,s,i,n,r,o,h;for(e="",h=0,n=0,r=(o=this.results_data).length;n<r&&(s=o[n],i="",""!==(i=s.group?this.result_add_group(s):this.result_add_option(s))&&(h++,e+=i),(null!=t?t.first:void
0)&&(s.selected&&this.is_multiple?this.choice_build(s):s.selected&&!this.is_multiple&&this.single_set_selected_text(this.choice_label(s))),!(h>=this.max_shown_results));n++);return
e},t.prototype.result_add_option=function(t){var e,s;return
t.search_match&&this.include_option_in_results(t)?(e=[],t.disabled||t.selected&&this.is_multiple||e.push("active-result"),!t.disabled||t.selected&&this.is_multiple||e.push("disabled-result"),t.selected&&e.push("result-selected"),null!=t.group_array_index&&e.push("group-option"),""!==t.classes&&e.push(t.classes),s=document.createElement("li"),s.className=e.join("
"),t.style&&(s.style.cssText=t.style),s.setAttribute("data-option-array-index",t.array_index),s.innerHTML=t.highlighted_html||t.html,t.title&&(s.title=t.title),this.outerHTML(s)):""},t.prototype.result_add_group=function(t){var
e,s;return(t.search_match||t.group_match)&&t.active_options>0?((e=[]).push("group-result"),t.classes&&e.push(t.classes),s=document.createElement("li"),s.className=e.join("
"),s.innerHTML=t.highlighted_html||this.escape_html(t.label),t.title&&(s.title=t.title),this.outerHTML(s)):""},t.prototype.results_update_field=function(){if(this.set_default_text(),this.is_multiple||this.results_reset_cleanup(),this.result_clear_highlight(),this.results_build(),this.results_showing)return
this.winnow_results()},t.prototype.reset_single_select_options=function(){var
t,e,s,i,n;for(n=[],t=0,e=(s=this.results_data).length;t<e;t++)(i=s[t]).selected?n.push(i.selected=!1):n.push(void
0);return n},t.prototype.results_toggle=function(){return
this.results_showing?this.results_hide():this.results_show()},t.prototype.results_search=function(t){return
this.results_showing?this.winnow_results():this.results_show()},t.prototype.winnow_results=function(t){var
e,s,i,n,r,o,h,l,c,_,a,u,d,p,f;for(this.no_results_clear(),_=0,e=(h=this.get_search_text()).replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),c=this.get_search_regex(e),i=0,n=(l=this.results_data).length;i<n;i++)(r=l[i]).search_match=!1,a=null,u=null,r.highlighted_html="",this.include_option_in_results(r)&&(r.group&&(r.group_match=!1,r.active_options=0),null!=r.group_array_index&&this.results_data[r.group_array_index]&&(0===(a=this.results_data[r.group_array_index]).active_options&&a.search_match&&(_+=1),a.active_options+=1),f=r.group?r.label:r.text,r.group&&!this.group_search||(u=this.search_string_match(f,c),r.search_match=null!=u,r.search_match&&!r.group&&(_+=1),r.search_match?(h.length&&(d=u.index,o=f.slice(0,d),s=f.slice(d,d+h.length),p=f.slice(d+h.length),r.highlighted_html=this.escape_html(o)+"<em>"+this.escape_html(s)+"</em>"+this.escape_html(p)),null!=a&&(a.group_match=!0)):null!=r.group_array_index&&this.results_data[r.group_array_index].search_match&&(r.search_match=!0)));return
this.result_clear_highlight(),_<1&&h.length?(this.update_results_content(""),this.no_results(h)):(this.update_results_content(this.results_option_build()),(null!=t?t.skip_highlight:void
0)?void
0:this.winnow_results_set_highlight())},t.prototype.get_search_regex=function(t){var
e,s;return
s=this.search_contains?t:"(^|\\s|\\b)"+t+"[^\\s]*",this.enable_split_word_search||this.search_contains||(s="^"+s),e=this.case_sensitive_search?"":"i",new
RegExp(s,e)},t.prototype.search_string_match=function(t,e){var s;return
s=e.exec(t),!this.search_contains&&(null!=s?s[1]:void
0)&&(s.index+=1),s},t.prototype.choices_count=function(){var
t,e,s;if(null!=this.selected_option_count)return
this.selected_option_count;for(this.selected_option_count=0,t=0,e=(s=this.form_field.options).length;t<e;t++)s[t].selected&&(this.selected_option_count+=1);return
this.selected_option_count},t.prototype.choices_click=function(t){if(t.preventDefault(),this.activate_field(),!this.results_showing&&!this.is_disabled)return
this.results_show()},t.prototype.keydown_checker=function(t){var
e,s;switch(s=null!=(e=t.which)?e:t.keyCode,this.search_field_scale(),8!==s&&this.pending_backstroke&&this.clear_backstroke(),s){case
8:this.backstroke_length=this.get_search_field_value().length;break;case
9:this.results_showing&&!this.is_multiple&&this.result_select(t),this.mouse_on_container=!1;break;case
13:case 27:this.results_showing&&t.preventDefault();break;case
32:this.disable_search&&t.preventDefault();break;case
38:t.preventDefault(),this.keyup_arrow();break;case
40:t.preventDefault(),this.keydown_arrow()}},t.prototype.keyup_checker=function(t){var
e,s;switch(s=null!=(e=t.which)?e:t.keyCode,this.search_field_scale(),s){case
8:this.is_multiple&&this.backstroke_length<1&&this.choices_count()>0?this.keydown_backstroke():this.pending_backstroke||(this.result_clear_highlight(),this.results_search());break;case
13:t.preventDefault(),this.results_showing&&this.result_select(t);break;case
27:this.results_showing&&this.results_hide();break;case 9:case
16:case 17:case 18:case 38:case 40:case
91:break;default:this.results_search()}},t.prototype.clipboard_event_checker=function(t){if(!this.is_disabled)return
setTimeout(function(t){return function(){return
t.results_search()}}(this),50)},t.prototype.container_width=function(){return
null!=this.options.width?this.options.width:this.form_field.offsetWidth+"px"},t.prototype.include_option_in_results=function(t){return!(this.is_multiple&&!this.display_selected_options&&t.selected)&&(!(!this.display_disabled_options&&t.disabled)&&!t.empty)},t.prototype.search_results_touchstart=function(t){return
this.touch_started=!0,this.search_results_mouseover(t)},t.prototype.search_results_touchmove=function(t){return
this.touch_started=!1,this.search_results_mouseout(t)},t.prototype.search_results_touchend=function(t){if(this.touch_started)return
this.search_results_mouseup(t)},t.prototype.outerHTML=function(t){var
e;return
t.outerHTML?t.outerHTML:((e=document.createElement("div")).appendChild(t),e.innerHTML)},t.prototype.get_single_html=function(){return'<a
class="chosen-single chosen-default">\n
<span>'+this.default_text+'</span>\n
<div><b></b></div>\n</a>\n<div
class="chosen-drop">\n <div
class="chosen-search">\n <input
class="chosen-search-input" type="text"
autocomplete="off" />\n </div>\n <ul
class="chosen-results"></ul>\n</div>'},t.prototype.get_multi_html=function(){return'<ul
class="chosen-choices">\n <li
class="search-field">\n <input
class="chosen-search-input" type="text"
autocomplete="off"
value="'+this.default_text+'" />\n
</li>\n</ul>\n<div class="chosen-drop">\n
<ul
class="chosen-results"></ul>\n</div>'},t.prototype.get_no_results_html=function(t){return'<li
class="no-results">\n '+this.results_none_found+"
<span>"+this.escape_html(t)+"</span>\n</li>"},t.browser_is_supported=function(){return"Microsoft
Internet
Explorer"===window.navigator.appName?document.documentMode>=8:!(/iP(od|hone)/i.test(window.navigator.userAgent)||/IEMobile/i.test(window.navigator.userAgent)||/Windows
Phone/i.test(window.navigator.userAgent)||/BlackBerry/i.test(window.navigator.userAgent)||/BB10/i.test(window.navigator.userAgent)||/Android.*Mobile/i.test(window.navigator.userAgent))},t.default_multiple_text="Select
Some Options",t.default_single_text="Select an
Option",t.default_no_result_text="No results
match",t}(),(t=jQuery).fn.extend({chosen:function(i){return
e.browser_is_supported()?this.each(function(e){var
n,r;r=(n=t(this)).data("chosen"),"destroy"!==i?r
instanceof s||n.data("chosen",new s(this,i)):r instanceof
s&&r.destroy()}):this}}),s=function(s){function n(){return
n.__super__.constructor.apply(this,arguments)}return
r(n,e),n.prototype.setup=function(){return
this.form_field_jq=t(this.form_field),this.current_selectedIndex=this.form_field.selectedIndex},n.prototype.set_up_html=function(){var
e,s;return(e=["chosen-container"]).push("chosen-container-"+(this.is_multiple?"multi":"single")),this.inherit_select_classes&&this.form_field.className&&e.push(this.form_field.className),this.is_rtl&&e.push("chosen-rtl"),s={"class":e.join("
"),title:this.form_field.title},this.form_field.id.length&&(s.id=this.form_field.id.replace(/[^\w]/g,"_")+"_chosen"),this.container=t("<div
/>",s),this.container.width(this.container_width()),this.is_multiple?this.container.html(this.get_multi_html()):this.container.html(this.get_single_html()),this.form_field_jq.hide().after(this.container),this.dropdown=this.container.find("div.chosen-drop").first(),this.search_field=this.container.find("input").first(),this.search_results=this.container.find("ul.chosen-results").first(),this.search_field_scale(),this.search_no_results=this.container.find("li.no-results").first(),this.is_multiple?(this.search_choices=this.container.find("ul.chosen-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chosen-search").first(),this.selected_item=this.container.find(".chosen-single").first()),this.results_build(),this.set_tab_index(),this.set_label_behavior()},n.prototype.on_ready=function(){return
this.form_field_jq.trigger("chosen:ready",{chosen:this})},n.prototype.register_observers=function(){return
this.container.on("touchstart.chosen",function(t){return
function(e){t.container_mousedown(e)}}(this)),this.container.on("touchend.chosen",function(t){return
function(e){t.container_mouseup(e)}}(this)),this.container.on("mousedown.chosen",function(t){return
function(e){t.container_mousedown(e)}}(this)),this.container.on("mouseup.chosen",function(t){return
function(e){t.container_mouseup(e)}}(this)),this.container.on("mouseenter.chosen",function(t){return
function(e){t.mouse_enter(e)}}(this)),this.container.on("mouseleave.chosen",function(t){return
function(e){t.mouse_leave(e)}}(this)),this.search_results.on("mouseup.chosen",function(t){return
function(e){t.search_results_mouseup(e)}}(this)),this.search_results.on("mouseover.chosen",function(t){return
function(e){t.search_results_mouseover(e)}}(this)),this.search_results.on("mouseout.chosen",function(t){return
function(e){t.search_results_mouseout(e)}}(this)),this.search_results.on("mousewheel.chosen
DOMMouseScroll.chosen",function(t){return
function(e){t.search_results_mousewheel(e)}}(this)),this.search_results.on("touchstart.chosen",function(t){return
function(e){t.search_results_touchstart(e)}}(this)),this.search_results.on("touchmove.chosen",function(t){return
function(e){t.search_results_touchmove(e)}}(this)),this.search_results.on("touchend.chosen",function(t){return
function(e){t.search_results_touchend(e)}}(this)),this.form_field_jq.on("chosen:updated.chosen",function(t){return
function(e){t.results_update_field(e)}}(this)),this.form_field_jq.on("chosen:activate.chosen",function(t){return
function(e){t.activate_field(e)}}(this)),this.form_field_jq.on("chosen:open.chosen",function(t){return
function(e){t.container_mousedown(e)}}(this)),this.form_field_jq.on("chosen:close.chosen",function(t){return
function(e){t.close_field(e)}}(this)),this.search_field.on("blur.chosen",function(t){return
function(e){t.input_blur(e)}}(this)),this.search_field.on("keyup.chosen",function(t){return
function(e){t.keyup_checker(e)}}(this)),this.search_field.on("keydown.chosen",function(t){return
function(e){t.keydown_checker(e)}}(this)),this.search_field.on("focus.chosen",function(t){return
function(e){t.input_focus(e)}}(this)),this.search_field.on("cut.chosen",function(t){return
function(e){t.clipboard_event_checker(e)}}(this)),this.search_field.on("paste.chosen",function(t){return
function(e){t.clipboard_event_checker(e)}}(this)),this.is_multiple?this.search_choices.on("click.chosen",function(t){return
function(e){t.choices_click(e)}}(this)):this.container.on("click.chosen",function(t){t.preventDefault()})},n.prototype.destroy=function(){return
t(this.container[0].ownerDocument).off("click.chosen",this.click_test_action),this.form_field_label.length>0&&this.form_field_label.off("click.chosen"),this.search_field[0].tabIndex&&(this.form_field_jq[0].tabIndex=this.search_field[0].tabIndex),this.container.remove(),this.form_field_jq.removeData("chosen"),this.form_field_jq.show()},n.prototype.search_field_disabled=function(){return
this.is_disabled=this.form_field.disabled||this.form_field_jq.parents("fieldset").is(":disabled"),this.container.toggleClass("chosen-disabled",this.is_disabled),this.search_field[0].disabled=this.is_disabled,this.is_multiple||this.selected_item.off("focus.chosen",this.activate_field),this.is_disabled?this.close_field():this.is_multiple?void
0:this.selected_item.on("focus.chosen",this.activate_field)},n.prototype.container_mousedown=function(e){var
s;if(!this.is_disabled)return!e||"mousedown"!==(s=e.type)&&"touchstart"!==s||this.results_showing||e.preventDefault(),null!=e&&t(e.target).hasClass("search-choice-close")?void
0:(this.active_field?this.is_multiple||!e||t(e.target)[0]!==this.selected_item[0]&&!t(e.target).parents("a.chosen-single").length||(e.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),t(this.container[0].ownerDocument).on("click.chosen",this.click_test_action),this.results_show()),this.activate_field())},n.prototype.container_mouseup=function(t){if("ABBR"===t.target.nodeName&&!this.is_disabled)return
this.results_reset(t)},n.prototype.search_results_mousewheel=function(t){var
e;if(t.originalEvent&&(e=t.originalEvent.deltaY||-t.originalEvent.wheelDelta||t.originalEvent.detail),null!=e)return
t.preventDefault(),"DOMMouseScroll"===t.type&&(e*=40),this.search_results.scrollTop(e+this.search_results.scrollTop())},n.prototype.blur_test=function(t){if(!this.active_field&&this.container.hasClass("chosen-container-active"))return
this.close_field()},n.prototype.close_field=function(){return
t(this.container[0].ownerDocument).off("click.chosen",this.click_test_action),this.active_field=!1,this.results_hide(),this.container.removeClass("chosen-container-active"),this.clear_backstroke(),this.show_search_field_default(),this.search_field_scale(),this.search_field.blur()},n.prototype.activate_field=function(){if(!this.is_disabled)return
this.container.addClass("chosen-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val()),this.search_field.focus()},n.prototype.test_active_click=function(e){var
s;return(s=t(e.target).closest(".chosen-container")).length&&this.container[0]===s[0]?this.active_field=!0:this.close_field()},n.prototype.results_build=function(){return
this.parsing=!0,this.selected_option_count=null,this.results_data=i.select_to_array(this.form_field),this.is_multiple?this.search_choices.find("li.search-choice").remove():(this.single_set_selected_text(),this.disable_search||this.form_field.options.length<=this.disable_search_threshold?(this.search_field[0].readOnly=!0,this.container.addClass("chosen-container-single-nosearch")):(this.search_field[0].readOnly=!1,this.container.removeClass("chosen-container-single-nosearch"))),this.update_results_content(this.results_option_build({first:!0})),this.search_field_disabled(),this.show_search_field_default(),this.search_field_scale(),this.parsing=!1},n.prototype.result_do_highlight=function(t){var
e,s,i,n,r;if(t.length){if(this.result_clear_highlight(),this.result_highlight=t,this.result_highlight.addClass("highlighted"),i=parseInt(this.search_results.css("maxHeight"),10),r=this.search_results.scrollTop(),n=i+r,s=this.result_highlight.position().top+this.search_results.scrollTop(),(e=s+this.result_highlight.outerHeight())>=n)return
this.search_results.scrollTop(e-i>0?e-i:0);if(s<r)return
this.search_results.scrollTop(s)}},n.prototype.result_clear_highlight=function(){return
this.result_highlight&&this.result_highlight.removeClass("highlighted"),this.result_highlight=null},n.prototype.results_show=function(){return
this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.container.addClass("chosen-with-drop"),this.results_showing=!0,this.search_field.focus(),this.search_field.val(this.get_search_field_value()),this.winnow_results(),this.form_field_jq.trigger("chosen:showing_dropdown",{chosen:this}))},n.prototype.update_results_content=function(t){return
this.search_results.html(t)},n.prototype.results_hide=function(){return
this.results_showing&&(this.result_clear_highlight(),this.container.removeClass("chosen-with-drop"),this.form_field_jq.trigger("chosen:hiding_dropdown",{chosen:this})),this.results_showing=!1},n.prototype.set_tab_index=function(t){var
e;if(this.form_field.tabIndex)return
e=this.form_field.tabIndex,this.form_field.tabIndex=-1,this.search_field[0].tabIndex=e},n.prototype.set_label_behavior=function(){if(this.form_field_label=this.form_field_jq.parents("label"),!this.form_field_label.length&&this.form_field.id.length&&(this.form_field_label=t("label[for='"+this.form_field.id+"']")),this.form_field_label.length>0)return
this.form_field_label.on("click.chosen",this.label_click_handler)},n.prototype.show_search_field_default=function(){return
this.is_multiple&&this.choices_count()<1&&!this.active_field?(this.search_field.val(this.default_text),this.search_field.addClass("default")):(this.search_field.val(""),this.search_field.removeClass("default"))},n.prototype.search_results_mouseup=function(e){var
s;if((s=t(e.target).hasClass("active-result")?t(e.target):t(e.target).parents(".active-result").first()).length)return
this.result_highlight=s,this.result_select(e),this.search_field.focus()},n.prototype.search_results_mouseover=function(e){var
s;if(s=t(e.target).hasClass("active-result")?t(e.target):t(e.target).parents(".active-result").first())return
this.result_do_highlight(s)},n.prototype.search_results_mouseout=function(e){if(t(e.target).hasClass("active-result")||t(e.target).parents(".active-result").first())return
this.result_clear_highlight()},n.prototype.choice_build=function(e){var
s,i;return s=t("<li
/>",{"class":"search-choice"}).html("<span>"+this.choice_label(e)+"</span>"),e.disabled?s.addClass("search-choice-disabled"):((i=t("<a
/>",{"class":"search-choice-close","data-option-array-index":e.array_index})).on("click.chosen",function(t){return
function(e){return
t.choice_destroy_link_click(e)}}(this)),s.append(i)),this.search_container.before(s)},n.prototype.choice_destroy_link_click=function(e){if(e.preventDefault(),e.stopPropagation(),!this.is_disabled)return
this.choice_destroy(t(e.target))},n.prototype.choice_destroy=function(t){if(this.result_deselect(t[0].getAttribute("data-option-array-index")))return
this.active_field?this.search_field.focus():this.show_search_field_default(),this.is_multiple&&this.choices_count()>0&&this.get_search_field_value().length<1&&this.results_hide(),t.parents("li").first().remove(),this.search_field_scale()},n.prototype.results_reset=function(){if(this.reset_single_select_options(),this.form_field.options[0].selected=!0,this.single_set_selected_text(),this.show_search_field_default(),this.results_reset_cleanup(),this.trigger_form_field_change(),this.active_field)return
this.results_hide()},n.prototype.results_reset_cleanup=function(){return
this.current_selectedIndex=this.form_field.selectedIndex,this.selected_item.find("abbr").remove()},n.prototype.result_select=function(t){var
e,s;if(this.result_highlight)return
e=this.result_highlight,this.result_clear_highlight(),this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.is_multiple?e.removeClass("active-result"):this.reset_single_select_options(),e.addClass("result-selected"),s=this.results_data[e[0].getAttribute("data-option-array-index")],s.selected=!0,this.form_field.options[s.options_index].selected=!0,this.selected_option_count=null,this.is_multiple?this.choice_build(s):this.single_set_selected_text(this.choice_label(s)),this.is_multiple&&(!this.hide_results_on_select||t.metaKey||t.ctrlKey)?t.metaKey||t.ctrlKey?this.winnow_results({skip_highlight:!0}):(this.search_field.val(""),this.winnow_results()):(this.results_hide(),this.show_search_field_default()),(this.is_multiple||this.form_field.selectedIndex!==this.current_selectedIndex)&&this.trigger_form_field_change({selected:this.form_field.options[s.options_index].value}),this.current_selectedIndex=this.form_field.selectedIndex,t.preventDefault(),this.search_field_scale())},n.prototype.single_set_selected_text=function(t){return
null==t&&(t=this.default_text),t===this.default_text?this.selected_item.addClass("chosen-default"):(this.single_deselect_control_build(),this.selected_item.removeClass("chosen-default")),this.selected_item.find("span").html(t)},n.prototype.result_deselect=function(t){var
e;return
e=this.results_data[t],!this.form_field.options[e.options_index].disabled&&(e.selected=!1,this.form_field.options[e.options_index].selected=!1,this.selected_option_count=null,this.result_clear_highlight(),this.results_showing&&this.winnow_results(),this.trigger_form_field_change({deselected:this.form_field.options[e.options_index].value}),this.search_field_scale(),!0)},n.prototype.single_deselect_control_build=function(){if(this.allow_single_deselect)return
this.selected_item.find("abbr").length||this.selected_item.find("span").first().after('<abbr
class="search-choice-close"></abbr>'),this.selected_item.addClass("chosen-single-with-deselect")},n.prototype.get_search_field_value=function(){return
this.search_field.val()},n.prototype.get_search_text=function(){return
t.trim(this.get_search_field_value())},n.prototype.escape_html=function(e){return
t("<div/>").text(e).html()},n.prototype.winnow_results_set_highlight=function(){var
t,e;if(e=this.is_multiple?[]:this.search_results.find(".result-selected.active-result"),null!=(t=e.length?e.first():this.search_results.find(".active-result").first()))return
this.result_do_highlight(t)},n.prototype.no_results=function(t){var
e;return
e=this.get_no_results_html(t),this.search_results.append(e),this.form_field_jq.trigger("chosen:no_results",{chosen:this})},n.prototype.no_results_clear=function(){return
this.search_results.find(".no-results").remove()},n.prototype.keydown_arrow=function(){var
t;return
this.results_showing&&this.result_highlight?(t=this.result_highlight.nextAll("li.active-result").first())?this.result_do_highlight(t):void
0:this.results_show()},n.prototype.keyup_arrow=function(){var t;return
this.results_showing||this.is_multiple?this.result_highlight?(t=this.result_highlight.prevAll("li.active-result")).length?this.result_do_highlight(t.first()):(this.choices_count()>0&&this.results_hide(),this.result_clear_highlight()):void
0:this.results_show()},n.prototype.keydown_backstroke=function(){var
t;return
this.pending_backstroke?(this.choice_destroy(this.pending_backstroke.find("a").first()),this.clear_backstroke()):(t=this.search_container.siblings("li.search-choice").last()).length&&!t.hasClass("search-choice-disabled")?(this.pending_backstroke=t,this.single_backstroke_delete?this.keydown_backstroke():this.pending_backstroke.addClass("search-choice-focus")):void
0},n.prototype.clear_backstroke=function(){return
this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus"),this.pending_backstroke=null},n.prototype.search_field_scale=function(){var
e,s,i,n,r,o,h;if(this.is_multiple){for(r={position:"absolute",left:"-1000px",top:"-1000px",display:"none",whiteSpace:"pre"},s=0,i=(o=["fontSize","fontStyle","fontWeight","fontFamily","lineHeight","textTransform","letterSpacing"]).length;s<i;s++)r[n=o[s]]=this.search_field.css(n);return(e=t("<div
/>").css(r)).text(this.get_search_field_value()),t("body").append(e),h=e.width()+25,e.remove(),this.container.is(":visible")&&(h=Math.min(this.container.outerWidth()-10,h)),this.search_field.width(h)}},n.prototype.trigger_form_field_change=function(t){return
this.form_field_jq.trigger("input",t),this.form_field_jq.trigger("change",t)},n}()}).call(this);chosen/chosen.required.js000064400000002012151175232460011460
0ustar00jQuery.fn.oldChosen = jQuery.fn.chosen
jQuery.fn.chosen = function(options) {
var select = jQuery(this)
, is_creating_chosen = !!options
var style = 'display:visible; position:absolute;
clip:rect(0,0,0,0);';
if (is_creating_chosen && select.css('position') ===
'absolute' && select.attr('style') != style) {
// if we are creating a chosen and the select already has the appropriate
styles added
// we remove those (so that the select hasn't got a crazy width),
then create the chosen
// then we re-add them later
select.removeAttr('style');
}
var ret = select.oldChosen(options)
// only act if the select has display: none, otherwise chosen is
unsupported (iPhone, etc)
if (is_creating_chosen && select.css('display') ===
'none') {
// https://github.com/harvesthq/chosen/issues/515#issuecomment-33214050
// only do this if we are initializing chosen (no params, or object
params) not calling a method
select.attr('style', style);
select.attr('tabindex', -1);
}
return ret
}chosen/index.html000064400000000054151175232460010025
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>chosen/LICENSE.md000064400000002277151175232460007445
0ustar00#### Chosen
- by Patrick Filler for [Harvest](http://getharvest.com)
- Copyright (c) 2011-2016 by Harvest
Available for use under the [MIT
License](http://en.wikipedia.org/wiki/MIT_License)
Permission is hereby granted, free of charge, to any person obtaining a
copy
of this software and associated documentation files (the
"Software"), to deal
in the Software without restriction, including without limitation the
rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
filter/index.html000064400000000054151175232460010033
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>filter/jquery.ba-bbq.min.js000064400000007220151175232460011622
0ustar00/*!
* jQuery BBQ: Back Button & Query Library - v1.2.1 - 2/17/2010
* http://benalman.com/projects/jquery-bbq-plugin/
*
* Copyright (c) 2010 "Cowboy" Ben Alman
* Dual licensed under the MIT and GPL licenses.
* http://benalman.com/about/license/
*/
!function(e,n){"$:nomunge";var
t,r,o,a,i,c,u,f,s=Array.prototype.slice,l=decodeURIComponent,p=e.param,h=e.bbq=e.bbq||{},d=e.event.special,m="hashchange",g="querystring",v="fragment",y="elemUrlAttr",$="location",b="href",x="src",j=/^.*\?|#.*$/g,A=/^.*\#/,N={};function
w(e){return"string"==typeof e}function S(e){var
n=s.call(arguments,1);return function(){return
e.apply(this,n.concat(s.call(arguments)))}}function q(r,a,i,c,u){var
s,h,d,m,y;return
c!==t?(y=(d=i.match(r?/^([^#]*)\#?(.*)$/:/^([^#?]*)\??([^#]*)(#?.*)/))[3]||"",2===u&&w(c)?h=c.replace(r?A:j,""):(m=o(d[2]),c=w(c)?o[r?v:g](c):c,h=2===u?c:1===u?e.extend({},c,m):e.extend({},m,c),h=p(h),r&&(h=h.replace(f,l))),s=d[1]+(r?"#":h||!d[1]?"?":"")+h+y):s=a(i!==t?i:n[$][b]),s}function
C(e,n,r){return n===t||"boolean"==typeof
n?(r=n,n=p[e?v:g]()):n=w(n)?n.replace(e?A:j,""):n,o(n,r)}function
E(n,r,o,a){return w(o)||"object"==typeof
o||(a=o,o=r,r=t),this.each(function(){var
t=e(this),i=r||u()[(this.nodeName||"").toLowerCase()]||"",c=i&&t.attr(i)||"";t.attr(i,p[n](c,o,a))})}p[g]=S(q,0,function(e){return
e.replace(/(?:^[^?#]*\?([^#]*).*$)?.*/,"$1")}),p[v]=r=S(q,1,function(e){return
e.replace(/^[^#]*#?(.*)$/,"$1")}),r.noEscape=function(n){n=n||"";var
t=e.map(n.split(""),encodeURIComponent);f=new
RegExp(t.join("|"),"g")},r.noEscape(",/"),e.deparam=o=function(n,r){var
o={},a={true:!0,false:!1,null:null};return e.each(n.replace(/\+/g,"
").split("&"),function(n,i){var
c,u=i.split("="),f=l(u[0]),s=o,p=0,h=f.split("]["),d=h.length-1;if(/\[/.test(h[0])&&/\]$/.test(h[d])?(h[d]=h[d].replace(/\]$/,""),d=(h=h.shift().split("[").concat(h)).length-1):d=0,2===u.length)if(c=l(u[1]),r&&(c=c&&!isNaN(c)?+c:"undefined"===c?t:a[c]!==t?a[c]:c),d)for(;p<=d;p++)s=s[f=""===h[p]?s.length:h[p]]=p<d?s[f]||(h[p+1]&&isNaN(h[p+1])?{}:[]):c;else
e.isArray(o[f])?o[f].push(c):o[f]!==t?o[f]=[o[f],c]:o[f]=c;else
f&&(o[f]=r?t:"")}),o},o[g]=S(C,0),o[v]=a=S(C,1),e[y]||(e[y]=function(n){return
e.extend(N,n)})({a:b,base:b,iframe:x,img:x,input:x,form:"action",link:b,script:x}),u=e[y],e.fn[g]=S(E,g),e.fn[v]=S(E,v),h.pushState=i=function(e,o){w(e)&&/^#/.test(e)&&o===t&&(o=2);var
a=e!==t,i=r(n[$][b],a?e:{},a?o:2);n[$][b]=i+(/#/.test(i)?"":"#")},h.getState=c=function(e,n){return
e===t||"boolean"==typeof
e?a(e):a(n)[e]},h.removeState=function(n){var
r={};n!==t&&(r=c(),e.each(e.isArray(n)?n:arguments,function(e,n){delete
r[n]})),i(r,2)},d[m]=e.extend(d[m],{add:function(n){var a;function i(e){var
n=e[v]=r();e.getState=function(e,r){return
e===t||"boolean"==typeof
e?o(n,e):o(n,r)[e]},a.apply(this,arguments)}if(e.isFunction(n))return
a=n,i;a=n.handler,n.handler=i}})}(jQuery,this),function(e,n,t){"$:nomunge";var
r,o=e.event.special,a="location",i="hashchange",c="href",u=(document.documentMode,!1),f="on"+i
in n&&!u;function
s(e){return(e=e||n[a][c]).replace(/^[^#]*#?(.*)$/,"$1")}e[i+"Delay"]=100,o[i]=e.extend(o[i],{setup:function(){if(f)return!1;e(r.start)},teardown:function(){if(f)return!1;e(r.stop)}}),r=function(){var
t,r,o,f,l={};return l.start=function(){if(!t){var
l=s();o||(o=f=function(e){return e},u&&(r=e('<iframe
src="javascript:0"/>').hide().insertAfter("body")[0].contentWindow,f=function(){return
s(r.document[a][c])},(o=function(e,n){if(e!==n){var
t=r.document;t.open().close(),t[a].hash="#"+e}})(s()))),function
r(){var
u=s(),p=f(l);u!==l?(o(l=u,p),e(n).trigger(i)):p!==l&&(n[a][c]=n[a][c].replace(/#.*/,"")+"#"+p),t=setTimeout(r,e[i+"Delay"])}()}},l.stop=function(){r||(t&&clearTimeout(t),t=0)},l}()}(jQuery,this);filter/jquery.ba-bbq.min.short.js000064400000002735151175232460012766
0ustar00!function(s,u){var
h,p,n=Array.prototype.slice,g=decodeURIComponent,f=s.param,d=(s.bbq=s.bbq||{},s.event.special,"querystring"),y="fragment",$=/^.*\?|#.*$/g,v=/^.*\#/;function
b(e){return"string"==typeof e}function e(e){var
t=n.call(arguments,1);return function(){return
e.apply(this,t.concat(n.call(arguments)))}}function t(e,t,n,r,a){var
l,c,i,o;return
r!==h?(o=(c=n.match(e?/^([^#]*)\#?(.*)$/:/^([^#?]*)\??([^#]*)(#?.*)/))[3]||"",2===a&&b(r)?l=r.replace(e?v:$,""):(i=p(c[2]),r=b(r)?p[e?y:d](r):r,l=2===a?r:1===a?s.extend({},r,i):s.extend({},i,r),l=f(l),e&&(l=l.replace(void
0,g))),c[1]+(e?"#":l||!c[1]?"?":"")+l+o):t(n!==h?n:u.location.href)}function
r(e,t,n){return t=t===h||"boolean"==typeof
t?(n=t,f[e?y:d]()):b(t)?t.replace(e?v:$,""):t,p(t,n)}f[d]=e(t,0,function(e){return
e.replace(/(?:^[^?#]*\?([^#]*).*$)?.*/,"$1")}),f[y]=e(t,1,function(e){return
e.replace(/^[^#]*#?(.*)$/,"$1")}),s.deparam=p=function(e,u){var
p={},f={true:!0,false:!1,null:null};return s.each(e.replace(/\+/g,"
").split("&"),function(e,t){var
n,r=t.split("="),a=g(r[0]),l=p,c=0,i=a.split("]["),o=i.length-1;if(o=/\[/.test(i[0])&&/\]$/.test(i[o])?(i[o]=i[o].replace(/\]$/,""),(i=i.shift().split("[").concat(i)).length-1):0,2===r.length)if(n=g(r[1]),u&&(n=n&&!isNaN(n)?+n:"undefined"===n?h:f[n]!==h?f[n]:n),o)for(;c<=o;c++)l=l[a=""===i[c]?l.length:i[c]]=c<o?l[a]||(i[c+1]&&isNaN(i[c+1])?{}:[]):n;else
s.isArray(p[a])?p[a].push(n):p[a]!==h?p[a]=[p[a],n]:p[a]=n;else
a&&(p[a]=u?h:"")}),p},p[d]=e(r,0),p[y]=e(r,1)}(jQuery,this);jcp/defaultcolor.jpg000064400000001214151175232460010511
0ustar00���JFIFdd��DuckyU��Adobed����
�����#!3CD%5e��(Hh
A!1��4�aq��"2�#���?^ҍ(�W�Ie�Re&\����4��_<�:��uV�q���V��o�ʰ���C��ō�0�0C��$���N+,����`,u]�X��l�m��d]�`eedF
P(Ij�d �ɗ���٦̥��qZU6�bsO�&���A���8)��65<s�3��]/��ç���w�ZԶb�����7�*�}rj��ޘ=�����b�SJ�Gu�N�dBxn��H�
l\��"�Q��Փ=����}�uKe��^�~f����>��@fZ����k�dž�Y����-��1O��jcp/index.html000064400000000054151175232460007322
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>jcp/license.txt000064400000042515151175232460007520
0ustar00The GNU General Public License (GPL)
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your freedom to
share and change it. By contrast, the GNU General Public License is
intended to guarantee your freedom to share and change free software--to
make sure the software is free for all its users. This General Public
License applies to most of the Free Software Foundation's software and
to any other program whose authors commit to using it. (Some other Free
Software Foundation software is covered by the GNU Library General Public
License instead.) You can apply it to your programs, too.
When we speak of free software, we are referring to freedom, not price. Our
General Public Licenses are designed to make sure that you have the freedom
to distribute copies of free software (and charge for this service if you
wish), that you receive source code or can get it if you want it, that you
can change the software or use pieces of it in new free programs; and that
you know you can do these things.
To protect your rights, we need to make restrictions that forbid anyone to
deny you these rights or to ask you to surrender the rights. These
restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether gratis or
for a fee, you must give the recipients all the rights that you have. You
must make sure that they, too, receive or can get the source code. And you
must show them these terms so they know their rights.
We protect your rights with two steps: (1) copyright the software, and (2)
offer you this license which gives you legal permission to copy, distribute
and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free software.
If the software is modified by someone else and passed on, we want its
recipients to know that what they have is not the original, so that any
problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software patents. We
wish to avoid the danger that redistributors of a free program will
individually obtain patent licenses, in effect making the program
proprietary. To prevent this, we have made it clear that any patent must be
licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and modification
follow.
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains a
notice placed by the copyright holder saying it may be distributed under
the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the
Program" means either the Program or any derivative work under
copyright law: that is to say, a work containing the Program or a portion
of it, either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in the
term "modification".) Each licensee is addressed as
"you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of running the
Program is not restricted, and the output from the Program is covered only
if its contents constitute a work based on the Program (independent of
having been made by running the Program). Whether that is true depends on
what the Program does.
1. You may copy and distribute verbatim copies of the Program's source
code as you receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice and
disclaimer of warranty; keep intact all the notices that refer to this
License and to the absence of any warranty; and give any other recipients
of the Program a copy of this License along with the Program.
You may charge a fee for the physical act of transferring a copy, and you
may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion of it,
thus forming a work based on the Program, and copy and distribute such
modifications or work under the terms of Section 1 above, provided that you
also meet all of these conditions:
a) You must cause the modified files to carry prominent notices stating
that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in whole or
in part contains or is derived from the Program or any part thereof, to be
licensed as a whole at no charge to all third parties under the terms of
this License.
c) If the modified program normally reads commands interactively when run,
you must cause it, when started running for such interactive use in the
most ordinary way, to print or display an announcement including an
appropriate copyright notice and a notice that there is no warranty (or
else, saying that you provide a warranty) and that users may redistribute
the program under these conditions, and telling the user how to view a copy
of this License. (Exception: if the Program itself is interactive but does
not normally print such an announcement, your work based on the Program is
not required to print an announcement.)
These requirements apply to the modified work as a whole. If identifiable
sections of that work are not derived from the Program, and can be
reasonably considered independent and separate works in themselves, then
this License, and its terms, do not apply to those sections when you
distribute them as separate works. But when you distribute the same
sections as part of a whole which is a work based on the Program, the
distribution of the whole must be on the terms of this License, whose
permissions for other licensees extend to the entire whole, and thus to
each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest your
rights to work written entirely by you; rather, the intent is to exercise
the right to control the distribution of derivative or collective works
based on the Program.
In addition, mere aggregation of another work not based on the Program with
the Program (or with a work based on the Program) on a volume of a storage
or distribution medium does not bring the other work under the scope of
this License.
3. You may copy and distribute the Program (or a work based on it, under
Section 2) in object code or executable form under the terms of Sections 1
and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable source
code, which must be distributed under the terms of Sections 1 and 2 above
on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three years, to
give any third party, for a charge no more than your cost of physically
performing source distribution, a complete machine-readable copy of the
corresponding source code, to be distributed under the terms of Sections 1
and 2 above on a medium customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer to
distribute corresponding source code. (This alternative is allowed only for
noncommercial distribution and only if you received the program in object
code or executable form with such an offer, in accord with Subsection b
above.)
The source code for a work means the preferred form of the work for making
modifications to it. For an executable work, complete source code means all
the source code for all modules it contains, plus any associated interface
definition files, plus the scripts used to control compilation and
installation of the executable. However, as a special exception, the source
code distributed need not include anything that is normally distributed (in
either source or binary form) with the major components (compiler, kernel,
and so on) of the operating system on which the executable runs, unless
that component itself accompanies the executable.
If distribution of executable or object code is made by offering access to
copy from a designated place, then offering equivalent access to copy the
source code from the same place counts as distribution of the source code,
even though third parties are not compelled to copy the source along with
the object code.
4. You may not copy, modify, sublicense, or distribute the Program except
as expressly provided under this License. Any attempt otherwise to copy,
modify, sublicense or distribute the Program is void, and will
automatically terminate your rights under this License. However, parties
who have received copies, or rights, from you under this License will not
have their licenses terminated so long as such parties remain in full
compliance.
5. You are not required to accept this License, since you have not signed
it. However, nothing else grants you permission to modify or distribute the
Program or its derivative works. These actions are prohibited by law if you
do not accept this License. Therefore, by modifying or distributing the
Program (or any work based on the Program), you indicate your acceptance of
this License to do so, and all its terms and conditions for copying,
distributing or modifying the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the original
licensor to copy, distribute or modify the Program subject to these terms
and conditions. You may not impose any further restrictions on the
recipients' exercise of the rights granted herein. You are not
responsible for enforcing compliance by third parties to this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot distribute so
as to satisfy simultaneously your obligations under this License and any
other pertinent obligations, then as a consequence you may not distribute
the Program at all. For example, if a patent license would not permit
royalty-free redistribution of the Program by all those who receive copies
directly or indirectly through you, then the only way you could satisfy
both it and this License would be to refrain entirely from distribution of
the Program.
If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply
and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any patents
or other property right claims or to contest validity of any such claims;
this section has the sole purpose of protecting the integrity of the free
software distribution system, which is implemented by public license
practices. Many people have made generous contributions to the wide range
of software distributed through that system in reliance on consistent
application of that system; it is up to the author/donor to decide if he or
she is willing to distribute software through any other system and a
licensee cannot impose that choice.
This section is intended to make thoroughly clear what is believed to be a
consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in certain
countries either by patents or by copyrighted interfaces, the original
copyright holder who places the Program under this License may add an
explicit geographical distribution limitation excluding those countries, so
that distribution is permitted only in or among countries not thus
excluded. In such case, this License incorporates the limitation as if
written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions of
the General Public License from time to time. Such new versions will be
similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms
and conditions either of that version or of any later version published by
the Free Software Foundation. If the Program does not specify a version
number of this License, you may choose any version ever published by the
Free Software Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals of
preserving the free status of all derivatives of our free software and of
promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it free
software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest to
attach them to the start of each source file to most effectively convey the
exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is
found.
One line to give the program's name and a brief idea of what it does.
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2 of the License, or (at your option)
any later version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this when
it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author Gnomovision comes
with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free
software, and you are welcome to redistribute it under certain conditions;
type `show c' for details.
The hypothetical commands `show w' and `show c' should show the
appropriate parts of the General Public License. Of course, the commands
you use may be called something other than `show w' and `show c';
they could even be mouse-clicks or menu items--whatever suits your
program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program,
if necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James
Hacker.
signature of Ty Coon, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General Public
License instead of this License.
jcp/picker.css000064400000001547151175232460007324 0ustar00.picker_layer {
text-decoration: none;
background-color: #fff;
border: 1px solid #fff;
box-shadow: 0 0 5px 5px rgba(0,0,0,0.1);
border-radius: 3px;
padding: 10px;
overflow: visible;
height: auto !important;
width: auto !important;
}
.picker_buttons {
background-color:#d4d0c8;
border-style:solid;
border-color:#666666;
border-width:1px;
padding:1px;
cursor:pointer;
color:#000000;
}
.cell_color {
cursor:pointer;
width:15px;
height:15px;
border: 1px solid #fff;
border-collapse: unset !important;
border-spacing: inherit !important;
}
.color_table {
text-decoration: none;
}
.choosed_color_cell{
border-style:solid; border-color:#fff; border-width:1px;
}
.Default_color_btn{
width:17px; height:17px; background-image:url(Defaultcolor.jpg);
background-repeat:no-repeat; background-position:center;
}jcp/picker.js000064400000013535151175232460007150 0ustar00/*
* Gchats color picker by Majid Khosravi
* Copyright (c) 2006 - 2008 Gchat Design Studio
* URL: http://www.gchats.com
* Date: April 24 2008
* Gchats color picker is freely distributable under the terms of GPL
license.
* Please visit: http://www.gchats.com for updates
* @Version 1.1
*--------------------------------------------------------------------------*/
// JavaScript Document
var layerWidth = 218;
var layerHeight = 144;
var currentId = "";
var orgColor ="";
function openPicker(id){
currentId = id;
removeLayer("picker");
Obj = document.getElementById(id);
orgColor = Obj.value;
createLayer("picker",findPosX(Obj)+Obj.offsetWidth+20,findPosY(Obj));
}
function createLayer(id,left,top){
var width = layerWidth;
var height = layerHeight;
var zindex = 1000;
var bgcolor = "#d4d0c8";
var txtcolor = "#000000";
var msg = getPickerContent();
if (document.layers) {
if (document.layers[id]) {
return;
}
var layer=document.layers[id]=new Layer(width);
layer.className = "picker_layer";
layer.name = id;
layer.left=left;
layer.top=top;
layer.clip.height=height;
layer.visibility = 'show';
layer.zIndex=zindex;
layer.bgColor=bgcolor;
layer.innerHTML = msg;
}else if (document.all) {
if (document.all[id]) {
return
}
var layer= '\n<DIV class="picker_layer"
id='+id+' style="position:absolute'
+'; left:'+left+"px"
+'; top:'+top+"px"
+'; width:'+width
+'; height:'+height
+'; visibility:visible'
+'; z-index:'+zindex
+';text-align:left">'
+ msg
+'</DIV>';
document.body.insertAdjacentHTML("BeforeEnd",layer);
}else if(document.getElementById){
var layer = document.createElement ('div');
layer.setAttribute ('id', id);
document.body.appendChild (layer);
var ly = document.getElementById(id);
ly.className = "picker_layer";
ly.style.position= "absolute";
ly.style.left= left+"px";
ly.style.top= top+ "px";
ly.style.width= width+ "px";
ly.style.height= height+ "px";
ly.style.textAlign= "left";
ly.innerHTML = msg;
}
}
function showClr(color){
Obj = document.getElementById(currentId);
Obj.value = color;
Obj.style.backgroundColor=color;
Obj = document.getElementById("gcpicker_colorSample");
Obj.style.backgroundColor=color;
Obj = document.getElementById("gcpicker_colorCode");
Obj.innerHTML = color;
}
function setClr(color){
Obj = document.getElementById(currentId);
Obj.value = color;
Obj.style.backgroundColor=color;
currentId = "";
removeLayer("picker");
}
function cancel(){
Obj = document.getElementById(currentId);
Obj.value = '';
Obj.style.backgroundColor='';
removeLayer("picker");
}
function removeLayer(id){
if(document.getElementById(id) ==null){
return;
}
if (document.layers && document.layers[id]) {
document.layers[id].visibility='COM_PHOCAGALLERY_HIDE'
delete document.layers[id]
}
if (document.all && document.all[id]) {
document.all[id].innerHTML=''
document.all[id].outerHTML=''
}else if(document.getElementById){
var b = document.body;
var layer = document.getElementById(id);
b.removeChild(layer);
}
}
function getPickerContent(){
var content = '<table width="222" border="0"
cellpadding="0"
cellspacing="1"><tr><td>';
content += '<table width="100%" border="0"
cellpadding="0" cellspacing="1"
class="color_table"><tr><td
bgcolor="#CCCCCC" id="gcpicker_colorSample"
width="40px"
class="choosed_color_cell"> </td><td
align="center"><div
id="gcpicker_colorCode">#CCCCCC</div></td><td
width="60px" align="center"><input
type="submit" value="" onclick="cancel()"
class="Default_color_btn"
/></td></tr></table>';
content += '</td></tr><tr><td>';
content += colorTable()+'</td></tr></table>';
return content;
}
function colorTable(){
var clrfix =
Array("#000000","#333333","#666666","#999999","#cccccc","#ffffff","#ff0000","#00ff00","#0000ff","#ffff00","#00ffff","#ff00ff");
var table ='<table border="0" cellpadding="0"
cellspacing="0" bgcolor="#000000"><tr>';
table += '';
for(var j=0;j<3;j++){
table += '<td width="11"><table
bgcolor="#000000" border="0"
cellpadding="0" cellspacing="1"
class="color_table">';
for(var i=0;i<12;i++){
var clr ='#000000';
if(j==1){
clr = clrfix[i];
}
table += '<tr><td bgcolor="'+clr+'"
class="cell_color"
onmouseover="showClr('+"'"+clr+"'"+')"
onclick="setClr('+"'"+clr+"'"+')"></td></tr>';
}
table += '</table></td>';
}
table +='<td><table border="0"
cellpadding="0" cellspacing="0">';
for (var c = 0; c<6; c++) {
if(c==0 || c==3){
table +="<tr>";
}
table += "<td>"
table = table+'<table border="0"
cellpadding="0" cellspacing="1"
class="color_table"> ';
for (var j = 0; j<6; j++) {
table +="<tr>";
for (var i = 0; i<6; i++) {
var clrhex = rgb2hex(j*255/5,i*255/5,c*255/5);
table += '<td bgcolor="'+clrhex+'"
class="cell_color"
onmouseover="showClr('+"'"+clrhex+"'"+')"
onclick="setClr('+"'"+clrhex+"'"+')"></td>';
}
table +="</tr>";
}
table +="</table>";
table += "</td>"
if(c==2 || c==5){
table +="</tr>";
}
}
table +='</table></td></tr></table>';
return table;
}
function findPosX(obj){
var curleft = 0;
if(obj.offsetParent)
while(1){
curleft += obj.offsetLeft;
if(!obj.offsetParent)
break;
obj = obj.offsetParent;
}
else if(obj.x)
curleft += obj.x;
return curleft;
}
function findPosY(obj){
var curtop = 0;
if(obj.offsetParent){
while(1){
curtop += obj.offsetTop;
if(!obj.offsetParent){
break;
}
obj = obj.offsetParent;
}
}else if(obj.y){
curtop += obj.y;
}
return curtop;
}
function rgb2hex(red, green, blue)
{
var decColor = red + 256 * green + 65536 * blue;
var clr = decColor.toString(16);
for(var i =clr.length;i<6;i++){
clr = "0"+clr;
}
return "#"+clr;
}
jeditable/index.html000064400000000054151175232460010471
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>jeditable/jquery.autogrowtextarea.js000064400000005706151175232460013766
0ustar00/*!
*
----------------------------------------------------------------------------
* "THE BEER-WARE LICENSE" (Revision 42):
* <jevin9@gmail.com> wrote this file. As long as you retain this
notice you
* can do whatever you want with this stuff. If we meet some day, and you
think
* this stuff is worth it, you can buy me a beer in return. Jevin O.
Sewaruth
*
----------------------------------------------------------------------------
*
* Autogrow Textarea Plugin Version v3.0
* http://www.technoreply.com/autogrow-textarea-plugin-3-0
*
* THIS PLUGIN IS DELIVERD ON A PAY WHAT YOU WHANT BASIS. IF THE PLUGIN WAS
USEFUL TO YOU, PLEASE CONSIDER BUYING THE PLUGIN HERE :
* https://sites.fastspring.com/technoreply/instant/autogrowtextareaplugin
*
* Date: October 15, 2012
*/
jQuery.fn.autoGrow = function(options) {
return this.each(function() {
var settings = jQuery.extend({
extraLine: true,
}, options);
var mirror;
var createMirror = function(textarea) {
jQuery(textarea).after('<div
class="autogrow-textarea-mirror"></div>');
return jQuery(textarea).next('.autogrow-textarea-mirror')[0];
};
var sendContentToMirror = function (textarea) {
mirror.innerHTML = String(textarea.value)
.replace(/&/g, '&')
.replace(/"/g, '"')
.replace(/'/g, ''')
.replace(/</g, '<')
.replace(/>/g, '>')
.replace(/\n/g, '<br />') +
(settings.extraLine? '.<br/>.' : '')
;
if (jQuery(textarea).height() !== jQuery(mirror).height())
jQuery(textarea).height(jQuery(mirror).height());
};
var growTextarea = function() {
sendContentToMirror(this);
};
// Create a mirror
mirror = createMirror(this);
// Style the mirror
mirror.style.display = 'none';
mirror.style.wordWrap = 'break-word';
mirror.style.whiteSpace = 'pre-wrap';
mirror.style.padding = jQuery(this).css('paddingTop') + '
' +
jQuery(this).css('paddingRight') + ' ' +
jQuery(this).css('paddingBottom') + ' ' +
jQuery(this).css('paddingLeft');
mirror.style.borderStyle = jQuery(this).css('borderTopStyle') +
' ' +
jQuery(this).css('borderRightStyle') + ' ' +
jQuery(this).css('borderBottomStyle') + ' ' +
jQuery(this).css('borderLeftStyle');
mirror.style.borderWidth = jQuery(this).css('borderTopWidth') +
' ' +
jQuery(this).css('borderRightWidth') + ' ' +
jQuery(this).css('borderBottomWidth') + ' ' +
jQuery(this).css('borderLeftWidth');
mirror.style.width = jQuery(this).css('width');
mirror.style.fontFamily = jQuery(this).css('font-family');
mirror.style.fontSize = jQuery(this).css('font-size');
mirror.style.lineHeight = jQuery(this).css('line-height');
mirror.style.letterSpacing =
jQuery(this).css('letter-spacing');
// Style the textarea
this.style.overflow = 'hidden';
this.style.minHeight = this.rows+'em';
// Bind the textarea's event
this.onkeyup = growTextarea;
this.onfocus = growTextarea;
// Fire the event for text already present
sendContentToMirror(this);
});
};
jeditable/jquery.jeditable.autogrow.min.js000064400000000755151175232460014733
0ustar00/*! jquery-jeditable
https://github.com/NicolasCARPi/jquery_jeditable#readme */
"use
strict";!function($){$.editable.addInputType("autogrow",{element:function(settings,original){var
textarea=$("<textarea />");return
settings.rows?textarea.attr("rows",settings.rows):textarea.height(settings.height),settings.cols?textarea.attr("cols",settings.cols):textarea.width(settings.width),$(this).append(textarea),textarea},plugin:function(settings,original){$("textarea",this).autoGrow()}})}(jQuery);jeditable/jquery.jeditable.masked.min.js000064400000001236151175232460014323
0ustar00/*! jquery-jeditable
https://github.com/NicolasCARPi/jquery_jeditable#readme */
"use
strict";!function($){$.editable.addInputType("masked",{element:function(settings,original){var
input=$("<input
/>").attr({autocomplete:"off",list:settings.list,maxlength:settings.maxlength,pattern:settings.pattern,placeholder:settings.placeholder,tooltip:settings.tooltip,type:"text"}).mask(settings.mask);return"none"!==settings.width&&input.css("width",settings.width),"none"!==settings.height&&input.css("height",settings.height),settings.size&&input.attr("size",settings.size),settings.maxlength&&input.attr("maxlength",settings.maxlength),$(this).append(input),input}})}(jQuery);jeditable/jquery.jeditable.min.js000064400000027037151175232460013067
0ustar00/*! jquery-jeditable
https://github.com/NicolasCARPi/jquery_jeditable#readme */
!function($){"use strict";$.fn.editableAriaShim=function(){return
this.attr({role:"button",tabindex:0}),this},$.fn.editable=function(target,options){if("disable"!==target)if("enable"!==target){if("destroy"!==target){var
settings=$.extend({},$.fn.editable.defaults,{target:target},options),plugin=$.editable.types[settings.type].plugin||function(){},submit=$.editable.types[settings.type].submit||function(){},buttons=$.editable.types[settings.type].buttons||$.editable.types.defaults.buttons,content=$.editable.types[settings.type].content||$.editable.types.defaults.content,element=$.editable.types[settings.type].element||$.editable.types.defaults.element,reset=$.editable.types[settings.type].reset||$.editable.types.defaults.reset,destroy=$.editable.types[settings.type].destroy||$.editable.types.defaults.destroy,callback=settings.callback||function(){},intercept=settings.intercept||function(s){return
s},onedit=settings.onedit||function(){},onsubmit=settings.onsubmit||function(){},onreset=settings.onreset||function(){},onerror=settings.onerror||reset;settings.before;return
settings.tooltip&&$(this).attr("title",settings.tooltip),this.each(function(){var
self=this;$(this).data("event.editable",settings.event),$.trim($(this).html())||$(this).html(settings.placeholder),"destroy"!==target?($(this).on(settings.event,function(e){if(!0!==$(this).data("disabled.editable")&&9!==e.which&&!self.editing&&!1!==onedit.apply(this,[settings,self,e])){if(settings.before&&jQuery.isFunction(settings.before))settings.before(e);else
if(settings.before&&!jQuery.isFunction(settings.before))throw"The
'before' option needs to be provided as a
function!";e.preventDefault(),e.stopPropagation(),settings.tooltip&&$(self).removeAttr("title"),$(this).html().toLowerCase().replace(/(;|"|\/)/g,"")===settings.placeholder.toLowerCase().replace(/(;|"|\/)/g,"")&&$(this).html(""),self.editing=!0,self.revert=$(self).text(),$(self).html("");var
form=$("<form
/>");settings.cssclass&&("inherit"===settings.cssclass?form.attr("class",$(self).attr("class")):form.attr("class",settings.cssclass)),settings.style&&("inherit"===settings.style?(form.attr("style",$(self).attr("style")),form.css("display",$(self).css("display"))):form.attr("style",settings.style)),settings.label&&form.append("<label>"+settings.label+"</label>"),settings.formid&&form.attr("id",settings.formid);var
input_content,t,input=element.apply(form,[settings,self]);settings.inputcssclass&&("inherit"===settings.inputcssclass?input.attr("class",$(self).attr("class")):input.attr("class",settings.inputcssclass));var
isSubmitting=!1;if(settings.loadurl){t=self.setTimeout(function(){input.disabled=!0},100),$(self).html(settings.loadtext);var
loaddata={};loaddata[settings.id]=self.id,$.isFunction(settings.loaddata)?$.extend(loaddata,settings.loaddata.apply(self,[self.revert,settings])):$.extend(loaddata,settings.loaddata),$.ajax({type:settings.loadtype,url:settings.loadurl,data:loaddata,async:!1,cache:!1,success:function(result){self.clearTimeout(t),input_content=result,input.disabled=!1}})}else
settings.data?(input_content=settings.data,$.isFunction(settings.data)&&(input_content=settings.data.apply(self,[self.revert,settings]))):input_content=self.revert;if(content.apply(form,[input_content,settings,self]),input.attr("name",settings.name),"none"!==settings.width){var
adj_width=settings.width-(input.outerWidth(!0)-settings.width);input.width(adj_width)}buttons.apply(form,[settings,self]),settings.showfn&&$.isFunction(settings.showfn)&&form.hide(),$(self).html(""),$(self).append(form),settings.showfn&&$.isFunction(settings.showfn)&&settings.showfn(form),plugin.apply(form,[settings,self]),form.find(":input:visible:enabled:first").trigger("focus"),settings.select&&input.select(),$(this).on("keydown",function(e){27===e.which?(e.preventDefault(),reset.apply(form,[settings,self])):13==e.which&&e.shiftKey&&(e.preventDefault(),form.trigger("submit"))}),"cancel"===settings.onblur?input.on("blur",function(e){t=self.setTimeout(function(){reset.apply(form,[settings,self])},500)}):"submit"===settings.onblur?input.on("blur",function(e){t=self.setTimeout(function(){form.trigger("submit")},200)}):$.isFunction(settings.onblur)&&input.on("blur",function(e){!1===settings.onblur.apply(self,[input.val(),settings,form])&&reset.apply(form,[settings,self])}),form.on("submit",function(e){if(e.preventDefault(),e.stopPropagation(),isSubmitting)return!1;if(isSubmitting=!0,t&&self.clearTimeout(t),(isSubmitting=!1!==onsubmit.apply(form,[settings,self]))&&(isSubmitting=!1!==submit.apply(form,[settings,self])))if($.isFunction(settings.target)){var
responseHandler=function(value,complete){isSubmitting=!1,!1!==complete&&($(self).html(value),self.editing=!1,callback.apply(self,[self.innerText,settings]),$.trim($(self).html())||$(self).html(settings.placeholder))},userTarget=settings.target.apply(self,[input.val(),settings,responseHandler]);!1!==userTarget&&void
0!==userTarget&&responseHandler(userTarget,userTarget)}else{var
submitdata={};submitdata[settings.name]=input.val(),submitdata[settings.id]=self.id,$.isFunction(settings.submitdata)?$.extend(submitdata,settings.submitdata.apply(self,[self.revert,settings,submitdata])):$.extend(submitdata,settings.submitdata),"PUT"===settings.method&&(submitdata._method="put"),$(self).html(settings.indicator);var
ajaxoptions={type:"POST",complete:function(xhr,status){isSubmitting=!1},data:submitdata,dataType:"html",url:settings.target,success:function(result,status){result=intercept.apply(self,[result,status]),"html"===ajaxoptions.dataType&&$(self).html(result),self.editing=!1,callback.apply(self,[result,settings,submitdata]),$.trim($(self).html())||$(self).html(settings.placeholder)},error:function(xhr,status,error){onerror.apply(form,[settings,self,xhr])}};$.extend(ajaxoptions,settings.ajaxoptions),$.ajax(ajaxoptions)}return
$(self).attr("title",settings.tooltip),!1})}}),self.reset=function(form){self.editing&&!1!==onreset.apply(form,[settings,self])&&($(self).text(self.revert),self.editing=!1,$.trim($(self).html())||$(self).html(settings.placeholder),settings.tooltip&&$(self).attr("title",settings.tooltip))},self.destroy=function(form){$(self).off($(self).data("event.editable")).removeData("disabled.editable").removeData("event.editable"),self.clearTimeouts(),self.editing&&reset.apply(form,[settings,self])},self.clearTimeout=function(t){var
timeouts=$(self).data("timeouts");if(clearTimeout(t),timeouts){var
i=timeouts.indexOf(t);i>-1?(timeouts.splice(i,1),timeouts.length<=0&&$(self).removeData("timeouts")):console.warn("jeditable
clearTimeout could not find timeout
"+t)}},self.clearTimeouts=function(){var
timeouts=$(self).data("timeouts");if(timeouts){for(var
i=0,n=timeouts.length;i<n;++i)clearTimeout(timeouts[i]);timeouts.length=0,$(self).removeData("timeouts")}},self.setTimeout=function(callback,time){var
timeouts=$(self).data("timeouts"),t=setTimeout(function(){callback(),self.clearTimeout(t)},time);return
timeouts||(timeouts=[],$(self).data("timeouts",timeouts)),timeouts.push(t),t}):destroy.apply($(this).find("form"),[settings,self])})}$(this).off($(this).data("event.editable")).removeData("disabled.editable").removeData("event.editable")}else
$(this).data("disabled.editable",!1);else
$(this).data("disabled.editable",!0)};var
_supportInType=function(type){var
i=document.createElement("input");return
i.setAttribute("type",type),"text"!==i.type?type:"text"};$.editable={types:{defaults:{element:function(settings,original){var
input=$('<input
type="hidden"></input>');return
$(this).append(input),input},content:function(string,settings,original){$(this).find(":input:first").val(string)},reset:function(settings,original){original.reset(this)},destroy:function(settings,original){original.destroy(this)},buttons:function(settings,original){var
submit,cancel,form=this;(settings.submit&&(settings.submit.match(/>$/)?submit=$(settings.submit).on("click",function(){"submit"!==submit.attr("type")&&form.trigger("submit")}):((submit=$('<button
type="submit"
/>')).html(settings.submit),settings.submitcssclass&&submit.addClass(settings.submitcssclass)),$(this).append(submit)),settings.cancel)&&(settings.cancel.match(/>$/)?cancel=$(settings.cancel):((cancel=$('<button
type="cancel"
/>')).html(settings.cancel),settings.cancelcssclass&&cancel.addClass(settings.cancelcssclass)),$(this).append(cancel),$(cancel).on("click",function(event){return($.isFunction($.editable.types[settings.type].reset)?$.editable.types[settings.type].reset:$.editable.types.defaults.reset).apply(form,[settings,original]),!1}))}},text:{element:function(settings,original){var
input=$("<input
/>").attr({autocomplete:"off",list:settings.list,maxlength:settings.maxlength,pattern:settings.pattern,placeholder:settings.placeholder,tooltip:settings.tooltip,type:"text"});return"none"!==settings.width&&input.css("width",settings.width),"none"!==settings.height&&input.css("height",settings.height),settings.size&&input.attr("size",settings.size),settings.maxlength&&input.attr("maxlength",settings.maxlength),$(this).append(input),input}},textarea:{element:function(settings,original){var
textarea=$("<textarea></textarea>");return
settings.rows?textarea.attr("rows",settings.rows):"none"!==settings.height&&textarea.height(settings.height),settings.cols?textarea.attr("cols",settings.cols):"none"!==settings.width&&textarea.width(settings.width),settings.maxlength&&textarea.attr("maxlength",settings.maxlength),$(this).append(textarea),textarea}},select:{element:function(settings,original){var
select=$("<select />");return
settings.multiple&&select.attr("multiple","multiple"),$(this).append(select),select},content:function(data,settings,original){var
json;json=String===data.constructor?JSON.parse(data):data;var
key,option,tuples=[];if(Array.isArray(json)&&json.every(Array.isArray))tuples=json,json={},tuples.forEach(function(e){json[e[0]]=e[1]});else
for(key in
json)tuples.push([key,json[key]]);settings.sortselectoptions&&tuples.sort(function(a,b){return(a=a[1])<(b=b[1])?-1:a>b?1:0});for(var
i=0;i<tuples.length;i++){key=tuples[i][0];var
value=tuples[i][1];json.hasOwnProperty(key)&&("selected"!==key&&(option=$("<option
/>").val(key).append(value),json.selected!==key&&key!==$.trim(original.revert)||$(option).prop("selected","selected"),$(this).find("select").append(option)))}if(!settings.submit){var
form=this;$(this).find("select").change(function(){form.trigger("submit")})}}},number:{element:function(settings,original){var
input=$("<input
/>").attr({maxlength:settings.maxlength,placeholder:settings.placeholder,min:settings.min,max:settings.max,step:settings.step,tooltip:settings.tooltip,type:_supportInType("number")});return"none"!==settings.width&&input.css("width",settings.width),$(this).append(input),input}},email:{element:function(settings,original){var
input=$("<input
/>").attr({maxlength:settings.maxlength,placeholder:settings.placeholder,tooltip:settings.tooltip,type:_supportInType("email")});return"none"!==settings.width&&input.css("width",settings.width),$(this).append(input),input}},url:{element:function(settings,original){var
input=$("<input
/>").attr({maxlength:settings.maxlength,pattern:settings.pattern,placeholder:settings.placeholder,tooltip:settings.tooltip,type:_supportInType("url")});return"none"!==settings.width&&input.css("width",settings.width),$(this).append(input),input}}},addInputType:function(name,input){$.editable.types[name]=input}},$.fn.editable.defaults={name:"value",id:"id",type:"text",width:"auto",height:"auto",event:"click.editable
keydown.editable",onblur:"cancel",tooltip:"Click to
edit",loadtype:"GET",loadtext:"Loading...",placeholder:"Click
to
edit",sortselectoptions:!1,loaddata:{},submitdata:{},ajaxoptions:{}}}(jQuery);jeditable/jquery.maskedinput.min.js000064400000010344151175232460013461
0ustar00/*
jQuery Masked Input Plugin
Copyright (c) 2007 - 2015 Josh Bush (digitalbush.com)
Licensed under the MIT license
(http://digitalbush.com/projects/masked-input-plugin/#license)
Version: 1.4.1
*/
!function(a){"function"==typeof
define&&define.amd?define(["jquery"],a):a("object"==typeof
exports?require("jquery"):jQuery)}(function(a){var
b,c=navigator.userAgent,d=/iphone/i.test(c),e=/chrome/i.test(c),f=/android/i.test(c);a.mask={definitions:{9:"[0-9]",a:"[A-Za-z]","*":"[A-Za-z0-9]"},autoclear:!0,dataName:"rawMaskFn",placeholder:"_"},a.fn.extend({caret:function(a,b){var
c;if(0!==this.length&&!this.is(":hidden"))return"number"==typeof
a?(b="number"==typeof
b?b:a,this.each(function(){this.setSelectionRange?this.setSelectionRange(a,b):this.createTextRange&&(c=this.createTextRange(),c.collapse(!0),c.moveEnd("character",b),c.moveStart("character",a),c.select())})):(this[0].setSelectionRange?(a=this[0].selectionStart,b=this[0].selectionEnd):document.selection&&document.selection.createRange&&(c=document.selection.createRange(),a=0-c.duplicate().moveStart("character",-1e5),b=a+c.text.length),{begin:a,end:b})},unmask:function(){return
this.trigger("unmask")},mask:function(c,g){var
h,i,j,k,l,m,n,o;if(!c&&this.length>0){h=a(this[0]);var
p=h.data(a.mask.dataName);return p?p():void 0}return
g=a.extend({autoclear:a.mask.autoclear,placeholder:a.mask.placeholder,completed:null},g),i=a.mask.definitions,j=[],k=n=c.length,l=null,a.each(c.split(""),function(a,b){"?"==b?(n--,k=a):i[b]?(j.push(new
RegExp(i[b])),null===l&&(l=j.length-1),k>a&&(m=j.length-1)):j.push(null)}),this.trigger("unmask").each(function(){function
h(){if(g.completed){for(var
a=l;m>=a;a++)if(j[a]&&C[a]===p(a))return;g.completed.call(B)}}function
p(a){return g.placeholder.charAt(a<g.placeholder.length?a:0)}function
q(a){for(;++a<n&&!j[a];);return a}function
r(a){for(;--a>=0&&!j[a];);return a}function s(a,b){var
c,d;if(!(0>a)){for(c=a,d=q(b);n>c;c++)if(j[c]){if(!(n>d&&j[c].test(C[d])))break;C[c]=C[d],C[d]=p(d),d=q(d)}z(),B.caret(Math.max(l,a))}}function
t(a){var
b,c,d,e;for(b=a,c=p(a);n>b;b++)if(j[b]){if(d=q(b),e=C[b],C[b]=c,!(n>d&&j[d].test(e)))break;c=e}}function
u(){var
a=B.val(),b=B.caret();if(o&&o.length&&o.length>a.length){for(A(!0);b.begin>0&&!j[b.begin-1];)b.begin--;if(0===b.begin)for(;b.begin<l&&!j[b.begin];)b.begin++;B.caret(b.begin,b.begin)}else{for(A(!0);b.begin<n&&!j[b.begin];)b.begin++;B.caret(b.begin,b.begin)}h()}function
v(){A(),B.val()!=E&&B.change()}function
w(a){if(!B.prop("readonly")){var
b,c,e,f=a.which||a.keyCode;o=B.val(),8===f||46===f||d&&127===f?(b=B.caret(),c=b.begin,e=b.end,e-c===0&&(c=46!==f?r(c):e=q(c-1),e=46===f?q(e):e),y(c,e),s(c,e-1),a.preventDefault()):13===f?v.call(this,a):27===f&&(B.val(E),B.caret(0,A()),a.preventDefault())}}function
x(b){if(!B.prop("readonly")){var
c,d,e,g=b.which||b.keyCode,i=B.caret();if(!(b.ctrlKey||b.altKey||b.metaKey||32>g)&&g&&13!==g){if(i.end-i.begin!==0&&(y(i.begin,i.end),s(i.begin,i.end-1)),c=q(i.begin-1),n>c&&(d=String.fromCharCode(g),j[c].test(d))){if(t(c),C[c]=d,z(),e=q(c),f){var
k=function(){a.proxy(a.fn.caret,B,e)()};setTimeout(k,0)}else
B.caret(e);i.begin<=m&&h()}b.preventDefault()}}}function
y(a,b){var
c;for(c=a;b>c&&n>c;c++)j[c]&&(C[c]=p(c))}function
z(){B.val(C.join(""))}function A(a){var
b,c,d,e=B.val(),f=-1;for(b=0,d=0;n>b;b++)if(j[b]){for(C[b]=p(b);d++<e.length;)if(c=e.charAt(d-1),j[b].test(c)){C[b]=c,f=b;break}if(d>e.length){y(b+1,n);break}}else
C[b]===e.charAt(d)&&d++,k>b&&(f=b);return
a?z():k>f+1?g.autoclear||C.join("")===D?(B.val()&&B.val(""),y(0,n)):z():(z(),B.val(B.val().substring(0,f+1))),k?b:l}var
B=a(this),C=a.map(c.split(""),function(a,b){return"?"!=a?i[a]?p(b):a:void
0}),D=C.join(""),E=B.val();B.data(a.mask.dataName,function(){return
a.map(C,function(a,b){return
j[b]&&a!=p(b)?a:null}).join("")}),B.one("unmask",function(){B.off(".mask").removeData(a.mask.dataName)}).on("focus.mask",function(){if(!B.prop("readonly")){clearTimeout(b);var
a;E=B.val(),a=A(),b=setTimeout(function(){B.get(0)===document.activeElement&&(z(),a==c.replace("?","").length?B.caret(0,a):B.caret(a))},10)}}).on("blur.mask",v).on("keydown.mask",w).on("keypress.mask",x).on("input.mask
paste.mask",function(){B.prop("readonly")||setTimeout(function(){var
a=A(!0);B.caret(a),h()},0)}),e&&f&&B.off("input.mask").on("input.mask",u),A()})}})});jeditable/jquery.phocajeditable.js000064400000016667151175232460013327
0ustar00/*
* @package Phoca Component
* @author Jan Pavelka - https://www.phoca.cz
* @copyright Copyright (C) Jan Pavelka https://www.phoca.cz
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 and later
* @cms Joomla
* @copyright Copyright (C) Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
*/
/*
function phGetMsg(msg, defaultMsg) {
if (defaultMsg == 1) {
return '<div id="ph-ajaxtop-message">'
+ '<div id="ph-ajaxtop-close">x</div>'
+ '<div class="ph-result-txt ph-info-txt">' +
msg + '</div>'
+ '<div
class="ph-progressbar-bottom"></div>'
+ '</div>';
} else {
return '<div
id="ph-ajaxtop-close">x</div>' + msg +
'<div
class="ph-progressbar-bottom"></div>';
}
}
function phCloseMsgBoxSuccess() {
setTimeout(function(){
jQuery("#ph-ajaxtop").hide();
jQuery(".ph-result-txt").remove();
}, 2500);
jQuery(".ph-progressbar-bottom").animate({
width: "0%"
}, 2500 );
}
function phCloseMsgBoxError() {
setTimeout(function(){
jQuery("#ph-ajaxtop").hide();
jQuery(".ph-result-txt").remove();
}, 3500);
jQuery(".ph-progressbar-bottom").animate({
width: "0%"
}, 3500 );
}
*/
/* -------------------- */
function phChangeBackground(element, seconds, color) {
var originalColor = jQuery(element).css("background");
jQuery(element).css("background", color);
setTimeout(function(){
jQuery(element).css("background", originalColor);
}, seconds);
}
function phEscapeColon(element) {
return element.replace(/:/g, '\\:');
}
function phEditInPlaceMsg(msg, type) {
jQuery("#ph-ajaxtop").html(phGetMsg( ' ',
1));
jQuery("#ph-ajaxtop").show();
jQuery("#ph-ajaxtop-message").html(phGetMsg(msg, 0));
if (type == 0) {
phCloseMsgBoxError();
} else {
phCloseMsgBoxSuccess();
}
}
function phEditInPlacePasteAndMark(element, json) {
/* combined input means title and alias (both editable) or date and
dateformat (only date editable) */
if (json.idcombined && json.resultcombined) {
var combinedElement = "#" +
phEscapeColon(json.idcombined);
jQuery(combinedElement).html(json.resultcombined);
phChangeBackground(combinedElement, 700, "#D4E9E6");
}
var currentElement = "#" + phEscapeColon(element);
phChangeBackground(currentElement, 700, "#D4E9E6" );
}
jQuery(document).ready(function() {
var phVars = Joomla.getOptions('phVars');
var phLang = Joomla.getOptions('phLang');
jQuery(".ph-editinplace-text.ph-eip-text").editable(phVars['urleditinplace'],
{
tooltip : phLang['PHOCA_CLICK_TO_EDIT'],
select : true,
type : "text",
cancel : phLang['PHOCA_CANCEL'],
submit : phLang['PHOCA_SUBMIT'],
cssclass : 'ph-edit-in-place-class',
cancelcssclass : 'btn btn-danger',
submitcssclass : 'btn btn-success',
submitdata : {type: "text"},
before : function(e) {
/* set height to not jump - e.g. description, if 5 row
description changes in popup form to 3 row */
var height = jQuery(e.currentTarget).height();// e.target //
outerHeight()
jQuery(e.currentTarget).height(height);
//var height = e.currentTarget.offsetHeight;
//e.currentTarget.setAttribute("style","height:" +
height + "px");
},
//DEBUG
//onblur : function() { ... },
intercept : function(jsondata) {
json = JSON.parse(jsondata);
/* return back from fixed height */
jQuery(this).css("height", "");
if (json.status == 0){
phEditInPlaceMsg(json.error, 0)
this.reset();
} else {
var id = jQuery(this).attr("id");
phEditInPlacePasteAndMark(id, json);
return json.result;
}
},
placeholder: "",
// Possible information for parts on the site which will be not
changed by chaning the value (for example currency view - currency rate)
callback: function() {
var chEIP = ".phChangeEditInPlace" +
jQuery(this).attr("data-id");
jQuery(chEIP).html(phLang['PHOCA_PLEASE_RELOAD_PAGE_TO_SEE_UPDATED_INFORMATION'])
},
})
jQuery(".ph-editinplace-text.ph-eip-autogrow").editable(phVars['urleditinplace'],
{
tooltip : phLang['PHOCA_CLICK_TO_EDIT'],
//select : true,
type : "autogrow",
cancel : phLang['PHOCA_CANCEL'],
submit : phLang['PHOCA_SUBMIT'],
cssclass : 'ph-edit-in-place-class',
cancelcssclass : 'btn btn-danger',
submitcssclass : 'btn btn-success',
submitdata : {type: "autogrow"},
before : function(e) {
/* set height to not jump */
var height = jQuery(e.target).height();//outerHeight()
jQuery(e.target).height(height);
},
// DEBUG
//onblur : function() { ... },
intercept : function(jsondata) {
json = JSON.parse(jsondata);
/* return back from fixed height */
jQuery(this).css("height", "");
if (json.status == 0){
phEditInPlaceMsg(json.error, 0)
this.reset();
} else {
var id = jQuery(this).attr("id");
phEditInPlacePasteAndMark(id, json);
return json.result;
}
},
placeholder: "",
// Possible information for parts on the site which will be not
changed by chaning the value (for example currency view - currency rate)
callback: function() {
var chEIP = ".phChangeEditInPlace" +
jQuery(this).attr("data-id");
jQuery(chEIP).html(phLang['PHOCA_PLEASE_RELOAD_PAGE_TO_SEE_UPDATED_INFORMATION'])
},
})
jQuery(".ph-editinplace-text.ph-eip-date").editable(phVars['urleditinplace'],
{
tooltip : phLang['PHOCA_CLICK_TO_EDIT'],
select : true,
type : "masked",
mask : "9999-99-99",
cancel : phLang['PHOCA_CANCEL'],
submit : phLang['PHOCA_SUBMIT'],
cssclass : 'ph-edit-in-place-class',
cancelcssclass : 'btn btn-danger',
submitcssclass : 'btn btn-success',
submitdata : {type: "date", dateformat :
phVars['dateformat']},
before : function(e) {
/* set height to not jump */
var height = jQuery(e.currentTarget).height();// e.target //
outerHeight()
jQuery(e.currentTarget).height(height);
},
//DEBUG
//onblur : function() { ... },
intercept : function(jsondata) {
json = JSON.parse(jsondata);
/* return back from fixed height */
jQuery(this).css("height", "");
if (json.status == 0){
phEditInPlaceMsg(json.error, 0)
this.reset();
} else {
var id = jQuery(this).attr("id");
phEditInPlacePasteAndMark(id, json);
return json.result;
}
},
placeholder: "",
// Possible information for parts on the site which will be not
changed by chaning the value (for example currency view - currency rate)
callback: function() {
var chEIP = ".phChangeEditInPlace" +
jQuery(this).attr("data-id");
jQuery(chEIP).html(phLang['PHOCA_PLEASE_RELOAD_PAGE_TO_SEE_UPDATED_INFORMATION'])
},
})
})
jeditable/phocajeditable.css000064400000006243151175232460012152
0ustar00/* Edit in place */
.ph-editinplace-text {
display: block;
min-height: 36px; /* em will jump because of different converting to px */
/*font-size: 96% !important;*/
}
.ph-editinplace-text.ph-eip-alias {
margin-top: 2px;
}
.ph-editinplace-text {
min-width: 3em;
}
.ph-editinplace-text.ph-eip-title,
.ph-editinplace-text.ph-eip-alias {
min-width: 6em;
margin-top: 2px;
}
.ph-editinplace-text.ph-eip-description {
min-width: 7em;
}
.ph-editinplace-text {
background: #f5f5f5;
position: relative;
padding: 0.5em;
}
.ph-editinplace-text form {
background-color: #fff;
border: 1px solid #f0f0f0;
box-shadow: 2px 2px 0px 0px #d0d0d0;
width: max-content;
height: auto;
padding: 0.7em;
z-index: 1000;
position: absolute;
left: -5em;
right: 0;
margin:0;
}
.ph-editinplace-text form button {
margin: 0 0 0 0.5em;
}
.ph-editinplace-text form input {
width: 8em !important;
margin: -1px 0 0 0.5em !important;
}
.ph-editinplace-text.ph-eip-title form input {
width: 25em !important;
}
.ph-editinplace-text.ph-eip-price_original form input
.ph-editinplace-text.ph-eip-price form input {}
.ph-editinplace-text.ph-eip-sku form input {}
/* Ajax Top Message */
@-webkit-keyframes load8 {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
@keyframes load8 {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
#ph-ajaxtop-message {
position: fixed;
top: 0.3em;
left: 0;
right: 0;
width: 50%;
background: #fdd043;
background-image: linear-gradient(to right, #fdd043 0%, #fcc311 100%);
border-radius: 2px;
padding: 0;
margin: 0 auto;
text-align: center;
z-index: 9999;
color: #fff;
font-weight: bold;
}
#ph-ajaxtop-close {
float: right;
font-weight: bold;
color: #fff;
padding: 0.2em 0.5em;
cursor: pointer;
border-radius: 2px;
background: rgba(255, 255, 255, 0.5);
}
.ph-progressbar-bottom {
background: #fff;
background: linear-gradient(to right, rgb(255, 255, 255, 0.3), rgb(255,
255, 255, 0.5));
height: 5px;
width: 100%;
padding: 0;
border-radius: 0 0 2px 2px;
margin: 0.7em 0 0 0;
}
#ph-ajaxtop {
display: none;
}
#ph-ajaxtop-message .ph-result-txt {
margin-top: 1em;
color: #fff;
font-weight: bold;
font-size: 1.2em;
display: block;
}
#ph-ajaxtop-message .ph-info-txt {}
#ph-ajaxtop-message .ph-info-txt:before {
font-family: "Glyphicons Halflings";
content: "\e086";
color: #3bafda;
margin-right: 0.5em;
font-weight: bold;
position: absolute;
font-size: 2em;
left: 0.4em;
/*margin-top: -0.3em;*/
}
#ph-ajaxtop-message .ph-success-txt {}
#ph-ajaxtop-message .ph-success-txt:before {
font-family: "Glyphicons Halflings";
content: "\e086";
color: #00b19d;
margin-right: 0.5em;
font-weight: bold;
position: absolute;
font-size: 2em;
left: 0.4em;
/*margin-top: -0.3em;*/
}
#ph-ajaxtop-message .ph-error-txt {}
#ph-ajaxtop-message .ph-error-txt:before {
font-family: "Glyphicons Halflings";
content: "\e086";
color: #f76397;
margin-right: 0.5em;
font-weight: bold;
position: absolute;
font-size: 2em;
left: 0.4em;
/*margin-top: -0.3em;*/
}jstree/index.html000064400000000054151175232460010042
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>jstree/jstree.min.js000064400000215377151175232460010501
0ustar00/*! jsTree - v3.3.9 - 2015-05-04 - (MIT) */
!function(e){"use strict";"function"==typeof
define&&define.amd?define(["jquery"],e):"undefined"!=typeof
module&&module.exports?module.exports=e(require("jquery")):e(jQuery)}(function(e,t){"use
strict";if(!e.jstree){var
i=0,r=!1,s=!1,n=!1,a=[],d=e("script:last").attr("src"),o=window.document,l=window.setImmediate,c=window.Promise;!l&&c&&(l=function(e,t){c.resolve(t).then(e)}),e.jstree={version:"{{VERSION}}",defaults:{plugins:[]},plugins:{},path:d&&-1!==d.indexOf("/")?d.replace(/\/[^\/]+$/,""):"",idregex:/[\\:&!^|()\[\]<>@*'+~#";.,=\-
\/${}%?`]/g,root:"#"},e.jstree.create=function(t,r){var s=new
e.jstree.core(++i),n=r;return
r=e.extend(!0,{},e.jstree.defaults,r),n&&n.plugins&&(r.plugins=n.plugins),e.each(r.plugins,function(e,t){"core"!==e&&(s=s.plugin(t,r[t]))}),e(t).data("jstree",s),s.init(t,r),s},e.jstree.destroy=function(){e(".jstree:jstree").jstree("destroy"),e(o).off(".jstree")},e.jstree.core=function(e){this._id=e,this._cnt=0,this._wrk=null,this._data={core:{themes:{name:!1,dots:!1,icons:!1,ellipsis:!1},selected:[],last_error:{},working:!1,worker_queue:[],focused:null}}},e.jstree.reference=function(t){var
i=null,r=null;if(!t||!t.id||t.tagName&&t.nodeType||(t=t.id),!r||!r.length)try{r=e(t)}catch(e){}if(!r||!r.length)try{r=e("#"+t.replace(e.jstree.idregex,"\\$&"))}catch(e){}return
r&&r.length&&(r=r.closest(".jstree")).length&&(r=r.data("jstree"))?i=r:e(".jstree").each(function(){var
r=e(this).data("jstree");if(r&&r._model.data[t])return
i=r,!1}),i},e.fn.jstree=function(i){var r="string"==typeof
i,s=Array.prototype.slice.call(arguments,1),n=null;return!(!0===i&&!this.length)&&(this.each(function(){var
a=e.jstree.reference(this),d=r&&a?a[i]:null;if(n=r&&d?d.apply(a,s):null,a||r||i!==t&&!e.isPlainObject(i)||e.jstree.create(this,i),(a&&!r||!0===i)&&(n=a||!1),null!==n&&n!==t)return!1}),null!==n&&n!==t?n:this)},e.expr.pseudos.jstree=e.expr.createPseudo(function(i){return
function(i){return
e(i).hasClass("jstree")&&e(i).data("jstree")!==t}}),e.jstree.defaults.core={data:!1,strings:!1,check_callback:!1,error:e.noop,animation:200,multiple:!0,themes:{name:!1,url:!1,dir:!1,dots:!0,icons:!0,ellipsis:!1,stripes:!1,variant:!1,responsive:!1},expand_selected_onload:!0,worker:!0,force_text:!1,dblclick_toggle:!0,loaded_state:!1,restore_focus:!0,keyboard:{"ctrl-space":function(t){t.type="click",e(t.currentTarget).trigger(t)},enter:function(t){t.type="click",e(t.currentTarget).trigger(t)},left:function(t){if(t.preventDefault(),this.is_open(t.currentTarget))this.close_node(t.currentTarget);else{var
i=this.get_parent(t.currentTarget);i&&i.id!==e.jstree.root&&this.get_node(i,!0).children(".jstree-anchor").focus()}},up:function(e){e.preventDefault();var
t=this.get_prev_dom(e.currentTarget);t&&t.length&&t.children(".jstree-anchor").focus()},right:function(t){if(t.preventDefault(),this.is_closed(t.currentTarget))this.open_node(t.currentTarget,function(e){this.get_node(e,!0).children(".jstree-anchor").focus()});else
if(this.is_open(t.currentTarget)){var
i=this.get_node(t.currentTarget,!0).children(".jstree-children")[0];i&&e(this._firstChild(i)).children(".jstree-anchor").focus()}},down:function(e){e.preventDefault();var
t=this.get_next_dom(e.currentTarget);t&&t.length&&t.children(".jstree-anchor").focus()},"*":function(e){this.open_all()},home:function(t){t.preventDefault();var
i=this._firstChild(this.get_container_ul()[0]);i&&e(i).children(".jstree-anchor").filter(":visible").focus()},end:function(e){e.preventDefault(),this.element.find(".jstree-anchor").filter(":visible").last().focus()},f2:function(e){e.preventDefault(),this.edit(e.currentTarget)}}},e.jstree.core.prototype={plugin:function(t,i){var
r=e.jstree.plugins[t];return r?(this._data[t]={},r.prototype=this,new
r(i,this)):this},init:function(t,i){this._model={data:{},changed:[],force_full_redraw:!1,redraw_timeout:!1,default_state:{loaded:!0,opened:!1,selected:!1,disabled:!1}},this._model.data[e.jstree.root]={id:e.jstree.root,parent:null,parents:[],children:[],children_d:[],state:{loaded:!1}},this.element=e(t).addClass("jstree
jstree-"+this._id),this.settings=i,this._data.core.ready=!1,this._data.core.loaded=!1,this._data.core.rtl="rtl"===this.element.css("direction"),this.element[this._data.core.rtl?"addClass":"removeClass"]("jstree-rtl"),this.element.attr("role","tree"),this.settings.core.multiple&&this.element.attr("aria-multiselectable",!0),this.element.attr("tabindex")||this.element.attr("tabindex","0"),this.bind(),this.trigger("init"),this._data.core.original_container_html=this.element.find("
> ul >
li").clone(!0),this._data.core.original_container_html.find("li").addBack().contents().filter(function(){return
3===this.nodeType&&(!this.nodeValue||/^\s+$/.test(this.nodeValue))}).remove(),this.element.html("<ul
class='jstree-container-ul jstree-children'
role='group'><li
id='j"+this._id+"_loading'
class='jstree-initial-node jstree-loading jstree-leaf
jstree-last' role='treeitem'><i
class='jstree-icon jstree-ocl'></i><a
class='jstree-anchor' href='#'><i
class='jstree-icon
jstree-themeicon-hidden'></i>"+this.get_string("Loading
...")+"</a></li></ul>"),this.element.attr("aria-activedescendant","j"+this._id+"_loading"),this._data.core.li_height=this.get_container_ul().children("li").first().outerHeight()||24,this._data.core.node=this._create_prototype_node(),this.trigger("loading"),this.load_node(e.jstree.root)},destroy:function(e){if(this.trigger("destroy"),this._wrk)try{window.URL.revokeObjectURL(this._wrk),this._wrk=null}catch(e){}e||this.element.empty(),this.teardown()},_create_prototype_node:function(){var
e,t,i=o.createElement("LI");return
i.setAttribute("role","treeitem"),(e=o.createElement("I")).className="jstree-icon
jstree-ocl",e.setAttribute("role","presentation"),i.appendChild(e),(e=o.createElement("A")).className="jstree-anchor",e.setAttribute("href","#"),e.setAttribute("tabindex","-1"),(t=o.createElement("I")).className="jstree-icon
jstree-themeicon",t.setAttribute("role","presentation"),e.appendChild(t),i.appendChild(e),e=t=null,i},_kbevent_to_func:function(e){var
t=[];if(e.ctrlKey&&t.push("ctrl"),e.altKey&&t.push("alt"),e.shiftKey&&t.push("shift"),t.push({8:"Backspace",9:"Tab",13:"Enter",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9","-13":"NumpadEnter",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Numlock",145:"Scrolllock",16:"Shift",17:"Ctrl",18:"Alt",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*",173:"-"}[e.which]||e.which),"shift-shift"===(t=t.sort().join("-").toLowerCase())||"ctrl-ctrl"===t||"alt-alt"===t)return
null;var i,r,s=this.settings.core.keyboard;for(i in
s)if(s.hasOwnProperty(i)&&("-"!==(r=i)&&"+"!==r&&(r=(r=r.replace("--","-MINUS").replace("+-","-MINUS").replace("++","-PLUS").replace("-+","-PLUS")).split(/-|\+/).sort().join("-").replace("MINUS","-").replace("PLUS","+").toLowerCase()),r===t))return
s[i];return
null},teardown:function(){this.unbind(),this.element.removeClass("jstree").removeData("jstree").find("[class^='jstree']").addBack().attr("class",function(){return
this.className.replace(/jstree[^
]*|$/gi,"")}),this.element=null},bind:function(){var
t="",i=null,r=0;this.element.on("dblclick.jstree",function(e){if(e.target.tagName&&"input"===e.target.tagName.toLowerCase())return!0;if(o.selection&&o.selection.empty)o.selection.empty();else
if(window.getSelection){var
t=window.getSelection();try{t.removeAllRanges(),t.collapse()}catch(e){}}}).on("mousedown.jstree",e.proxy(function(e){e.target===this.element[0]&&(e.preventDefault(),r=+new
Date)},this)).on("mousedown.jstree",".jstree-ocl",function(e){e.preventDefault()}).on("click.jstree",".jstree-ocl",e.proxy(function(e){this.toggle_node(e.target)},this)).on("dblclick.jstree",".jstree-anchor",e.proxy(function(e){if(e.target.tagName&&"input"===e.target.tagName.toLowerCase())return!0;this.settings.core.dblclick_toggle&&this.toggle_node(e.target)},this)).on("click.jstree",".jstree-anchor",e.proxy(function(t){t.preventDefault(),t.currentTarget!==o.activeElement&&e(t.currentTarget).focus(),this.activate_node(t.currentTarget,t)},this)).on("keydown.jstree",".jstree-anchor",e.proxy(function(e){if(e.target.tagName&&"input"===e.target.tagName.toLowerCase())return!0;this._data.core.rtl&&(37===e.which?e.which=39:39===e.which&&(e.which=37));var
t=this._kbevent_to_func(e);if(t){var
i=t.call(this,e);if(!1===i||!0===i)return
i}},this)).on("load_node.jstree",e.proxy(function(t,i){i.status&&(i.node.id!==e.jstree.root||this._data.core.loaded||(this._data.core.loaded=!0,this._firstChild(this.get_container_ul()[0])&&this.element.attr("aria-activedescendant",this._firstChild(this.get_container_ul()[0]).id),this.trigger("loaded")),this._data.core.ready||setTimeout(e.proxy(function(){if(this.element&&!this.get_container_ul().find(".jstree-loading").length){if(this._data.core.ready=!0,this._data.core.selected.length){if(this.settings.core.expand_selected_onload){var
t,i,r=[];for(t=0,i=this._data.core.selected.length;t<i;t++)r=r.concat(this._model.data[this._data.core.selected[t]].parents);for(t=0,i=(r=e.vakata.array_unique(r)).length;t<i;t++)this.open_node(r[t],!1,0)}this.trigger("changed",{action:"ready",selected:this._data.core.selected})}this.trigger("ready")}},this),0))},this)).on("keypress.jstree",e.proxy(function(r){if(r.target.tagName&&"input"===r.target.tagName.toLowerCase())return!0;i&&clearTimeout(i),i=setTimeout(function(){t=""},500);var
s=String.fromCharCode(r.which).toLowerCase(),n=this.element.find(".jstree-anchor").filter(":visible"),a=n.index(o.activeElement)||0,d=!1;if((t+=s).length>1){if(n.slice(a).each(e.proxy(function(i,r){if(0===e(r).text().toLowerCase().indexOf(t))return
e(r).focus(),d=!0,!1},this)),d)return;if(n.slice(0,a).each(e.proxy(function(i,r){if(0===e(r).text().toLowerCase().indexOf(t))return
e(r).focus(),d=!0,!1},this)),d)return}if(new
RegExp("^"+s.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")+"+$").test(t)){if(n.slice(a+1).each(e.proxy(function(t,i){if(e(i).text().toLowerCase().charAt(0)===s)return
e(i).focus(),d=!0,!1},this)),d)return;if(n.slice(0,a+1).each(e.proxy(function(t,i){if(e(i).text().toLowerCase().charAt(0)===s)return
e(i).focus(),d=!0,!1},this)),d)return}},this)).on("init.jstree",e.proxy(function(){var
e=this.settings.core.themes;this._data.core.themes.dots=e.dots,this._data.core.themes.stripes=e.stripes,this._data.core.themes.icons=e.icons,this._data.core.themes.ellipsis=e.ellipsis,this.set_theme(e.name||"default",e.url),this.set_theme_variant(e.variant)},this)).on("loading.jstree",e.proxy(function(){this[this._data.core.themes.dots?"show_dots":"hide_dots"](),this[this._data.core.themes.icons?"show_icons":"hide_icons"](),this[this._data.core.themes.stripes?"show_stripes":"hide_stripes"](),this[this._data.core.themes.ellipsis?"show_ellipsis":"hide_ellipsis"]()},this)).on("blur.jstree",".jstree-anchor",e.proxy(function(t){this._data.core.focused=null,e(t.currentTarget).filter(".jstree-hovered").trigger("mouseleave"),this.element.attr("tabindex","0")},this)).on("focus.jstree",".jstree-anchor",e.proxy(function(t){var
i=this.get_node(t.currentTarget);i&&i.id&&(this._data.core.focused=i.id),this.element.find(".jstree-hovered").not(t.currentTarget).trigger("mouseleave"),e(t.currentTarget).trigger("mouseenter"),this.element.attr("tabindex","-1")},this)).on("focus.jstree",e.proxy(function(){if(+new
Date-r>500&&!this._data.core.focused&&this.settings.core.restore_focus){r=0;var
e=this.get_node(this.element.attr("aria-activedescendant"),!0);e&&e.find(">
.jstree-anchor").focus()}},this)).on("mouseenter.jstree",".jstree-anchor",e.proxy(function(e){this.hover_node(e.currentTarget)},this)).on("mouseleave.jstree",".jstree-anchor",e.proxy(function(e){this.dehover_node(e.currentTarget)},this))},unbind:function(){this.element.off(".jstree"),e(o).off(".jstree-"+this._id)},trigger:function(e,t){t||(t={}),t.instance=this,this.element.triggerHandler(e.replace(".jstree","")+".jstree",t)},get_container:function(){return
this.element},get_container_ul:function(){return
this.element.children(".jstree-children").first()},get_string:function(t){var
i=this.settings.core.strings;return
e.isFunction(i)?i.call(this,t):i&&i[t]?i[t]:t},_firstChild:function(e){for(e=e?e.firstChild:null;null!==e&&1!==e.nodeType;)e=e.nextSibling;return
e},_nextSibling:function(e){for(e=e?e.nextSibling:null;null!==e&&1!==e.nodeType;)e=e.nextSibling;return
e},_previousSibling:function(e){for(e=e?e.previousSibling:null;null!==e&&1!==e.nodeType;)e=e.previousSibling;return
e},get_node:function(t,i){var r;t&&t.id&&(t=t.id),t
instanceof
e&&t.length&&t[0].id&&(t=t[0].id);try{if(this._model.data[t])t=this._model.data[t];else
if("string"==typeof
t&&this._model.data[t.replace(/^#/,"")])t=this._model.data[t.replace(/^#/,"")];else
if("string"==typeof
t&&(r=e("#"+t.replace(e.jstree.idregex,"\\$&"),this.element)).length&&this._model.data[r.closest(".jstree-node").attr("id")])t=this._model.data[r.closest(".jstree-node").attr("id")];else
if((r=this.element.find(t)).length&&this._model.data[r.closest(".jstree-node").attr("id")])t=this._model.data[r.closest(".jstree-node").attr("id")];else{if(!(r=this.element.find(t)).length||!r.hasClass("jstree"))return!1;t=this._model.data[e.jstree.root]}return
i&&(t=t.id===e.jstree.root?this.element:e("#"+t.id.replace(e.jstree.idregex,"\\$&"),this.element)),t}catch(e){return!1}},get_path:function(t,i,r){if(!(t=t.parents?t:this.get_node(t))||t.id===e.jstree.root||!t.parents)return!1;var
s,n,a=[];for(a.push(r?t.id:t.text),s=0,n=t.parents.length;s<n;s++)a.push(r?t.parents[s]:this.get_text(t.parents[s]));return
a=a.reverse().slice(1),i?a.join(i):a},get_next_dom:function(t,i){var
r;if((t=this.get_node(t,!0))[0]===this.element[0]){for(r=this._firstChild(this.get_container_ul()[0]);r&&0===r.offsetHeight;)r=this._nextSibling(r);return!!r&&e(r)}if(!t||!t.length)return!1;if(i){r=t[0];do{r=this._nextSibling(r)}while(r&&0===r.offsetHeight);return!!r&&e(r)}if(t.hasClass("jstree-open")){for(r=this._firstChild(t.children(".jstree-children")[0]);r&&0===r.offsetHeight;)r=this._nextSibling(r);if(null!==r)return
e(r)}r=t[0];do{r=this._nextSibling(r)}while(r&&0===r.offsetHeight);return
null!==r?e(r):t.parentsUntil(".jstree",".jstree-node").nextAll(".jstree-node:visible").first()},get_prev_dom:function(t,i){var
r;if((t=this.get_node(t,!0))[0]===this.element[0]){for(r=this.get_container_ul()[0].lastChild;r&&0===r.offsetHeight;)r=this._previousSibling(r);return!!r&&e(r)}if(!t||!t.length)return!1;if(i){r=t[0];do{r=this._previousSibling(r)}while(r&&0===r.offsetHeight);return!!r&&e(r)}r=t[0];do{r=this._previousSibling(r)}while(r&&0===r.offsetHeight);if(null!==r){for(t=e(r);t.hasClass("jstree-open");)t=t.children(".jstree-children").first().children(".jstree-node:visible:last");return
t}return!(!(r=t[0].parentNode.parentNode)||!r.className||-1===r.className.indexOf("jstree-node"))&&e(r)},get_parent:function(t){return!(!(t=this.get_node(t))||t.id===e.jstree.root)&&t.parent},get_children_dom:function(e){return(e=this.get_node(e,!0))[0]===this.element[0]?this.get_container_ul().children(".jstree-node"):!(!e||!e.length)&&e.children(".jstree-children").children(".jstree-node")},is_parent:function(e){return(e=this.get_node(e))&&(!1===e.state.loaded||e.children.length>0)},is_loaded:function(e){return(e=this.get_node(e))&&e.state.loaded},is_loading:function(e){return(e=this.get_node(e))&&e.state&&e.state.loading},is_open:function(e){return(e=this.get_node(e))&&e.state.opened},is_closed:function(e){return(e=this.get_node(e))&&this.is_parent(e)&&!e.state.opened},is_leaf:function(e){return!this.is_parent(e)},load_node:function(t,i){var
r,s,n,a,d;if(e.isArray(t))return
this._load_nodes(t.slice(),i),!0;if(!(t=this.get_node(t)))return
i&&i.call(this,t,!1),!1;if(t.state.loaded){for(t.state.loaded=!1,n=0,a=t.parents.length;n<a;n++)this._model.data[t.parents[n]].children_d=e.vakata.array_filter(this._model.data[t.parents[n]].children_d,function(i){return-1===e.inArray(i,t.children_d)});for(r=0,s=t.children_d.length;r<s;r++)this._model.data[t.children_d[r]].state.selected&&(d=!0),delete
this._model.data[t.children_d[r]];d&&(this._data.core.selected=e.vakata.array_filter(this._data.core.selected,function(i){return-1===e.inArray(i,t.children_d)})),t.children=[],t.children_d=[],d&&this.trigger("changed",{action:"load_node",node:t,selected:this._data.core.selected})}return
t.state.failed=!1,t.state.loading=!0,this.get_node(t,!0).addClass("jstree-loading").attr("aria-busy",!0),this._load_node(t,e.proxy(function(e){(t=this._model.data[t.id]).state.loading=!1,t.state.loaded=e,t.state.failed=!t.state.loaded;var
r,s=this.get_node(t,!0),n=0,a=this._model.data,d=!1;for(n=0,r=t.children.length;n<r;n++)if(a[t.children[n]]&&!a[t.children[n]].state.hidden){d=!0;break}t.state.loaded&&s&&s.length&&(s.removeClass("jstree-closed
jstree-open
jstree-leaf"),d?"#"!==t.id&&s.addClass(t.state.opened?"jstree-open":"jstree-closed"):s.addClass("jstree-leaf")),s.removeClass("jstree-loading").attr("aria-busy",!1),this.trigger("load_node",{node:t,status:e}),i&&i.call(this,t,e)},this)),!0},_load_nodes:function(e,t,i,r){var
s,n,a=!0,d=function(){this._load_nodes(e,t,!0)},o=this._model.data,l=[];for(s=0,n=e.length;s<n;s++)o[e[s]]&&(!o[e[s]].state.loaded&&!o[e[s]].state.failed||!i&&r)&&(this.is_loading(e[s])||this.load_node(e[s],d),a=!1);if(a){for(s=0,n=e.length;s<n;s++)o[e[s]]&&o[e[s]].state.loaded&&l.push(e[s]);t&&!t.done&&(t.call(this,l),t.done=!0)}},load_all:function(t,i){if(t||(t=e.jstree.root),!(t=this.get_node(t)))return!1;var
r,s,n=[],a=this._model.data,d=a[t.id].children_d;for(t.state&&!t.state.loaded&&n.push(t.id),r=0,s=d.length;r<s;r++)a[d[r]]&&a[d[r]].state&&!a[d[r]].state.loaded&&n.push(d[r]);n.length?this._load_nodes(n,function(){this.load_all(t,i)}):(i&&i.call(this,t),this.trigger("load_all",{node:t}))},_load_node:function(t,i){var
r,s=this.settings.core.data,n=function(){return
3!==this.nodeType&&8!==this.nodeType};return
s?e.isFunction(s)?s.call(this,t,e.proxy(function(r){!1===r?i.call(this,!1):this["string"==typeof
r?"_append_html_data":"_append_json_data"](t,"string"==typeof
r?e(e.parseHTML(r)).filter(n):r,function(e){i.call(this,e)})},this)):"object"==typeof
s?s.url?(s=e.extend(!0,{},s),e.isFunction(s.url)&&(s.url=s.url.call(this,t)),e.isFunction(s.data)&&(s.data=s.data.call(this,t)),e.ajax(s).done(e.proxy(function(r,s,a){var
d=a.getResponseHeader("Content-Type");return
d&&-1!==d.indexOf("json")||"object"==typeof
r?this._append_json_data(t,r,function(e){i.call(this,e)}):d&&-1!==d.indexOf("html")||"string"==typeof
r?this._append_html_data(t,e(e.parseHTML(r)).filter(n),function(e){i.call(this,e)}):(this._data.core.last_error={error:"ajax",plugin:"core",id:"core_04",reason:"Could
not load
node",data:JSON.stringify({id:t.id,xhr:a})},this.settings.core.error.call(this,this._data.core.last_error),i.call(this,!1))},this)).fail(e.proxy(function(e){this._data.core.last_error={error:"ajax",plugin:"core",id:"core_04",reason:"Could
not load
node",data:JSON.stringify({id:t.id,xhr:e})},i.call(this,!1),this.settings.core.error.call(this,this._data.core.last_error)},this))):(r=e.isArray(s)?e.extend(!0,[],s):e.isPlainObject(s)?e.extend(!0,{},s):s,t.id===e.jstree.root?this._append_json_data(t,r,function(e){i.call(this,e)}):(this._data.core.last_error={error:"nodata",plugin:"core",id:"core_05",reason:"Could
not load
node",data:JSON.stringify({id:t.id})},this.settings.core.error.call(this,this._data.core.last_error),i.call(this,!1))):"string"==typeof
s?t.id===e.jstree.root?this._append_html_data(t,e(e.parseHTML(s)).filter(n),function(e){i.call(this,e)}):(this._data.core.last_error={error:"nodata",plugin:"core",id:"core_06",reason:"Could
not load
node",data:JSON.stringify({id:t.id})},this.settings.core.error.call(this,this._data.core.last_error),i.call(this,!1)):i.call(this,!1):t.id===e.jstree.root?this._append_html_data(t,this._data.core.original_container_html.clone(!0),function(e){i.call(this,e)}):i.call(this,!1)},_node_changed:function(t){(t=this.get_node(t))&&-1===e.inArray(t.id,this._model.changed)&&this._model.changed.push(t.id)},_append_html_data:function(t,i,r){(t=this.get_node(t)).children=[],t.children_d=[];var
s,n,a,d=i.is("ul")?i.children():i,o=t.id,l=[],c=[],h=this._model.data,_=h[o],f=this._data.core.selected.length;for(d.each(e.proxy(function(t,i){(s=this._parse_model_from_html(e(i),o,_.parents.concat()))&&(l.push(s),c.push(s),h[s].children_d.length&&(c=c.concat(h[s].children_d)))},this)),_.children=l,_.children_d=c,n=0,a=_.parents.length;n<a;n++)h[_.parents[n]].children_d=h[_.parents[n]].children_d.concat(c);this.trigger("model",{nodes:c,parent:o}),o!==e.jstree.root?(this._node_changed(o),this.redraw()):(this.get_container_ul().children(".jstree-initial-node").remove(),this.redraw(!0)),this._data.core.selected.length!==f&&this.trigger("changed",{action:"model",selected:this._data.core.selected}),r.call(this,!0)},_append_json_data:function(t,i,r,s){if(null!==this.element){(t=this.get_node(t)).children=[],t.children_d=[],i.d&&"string"==typeof(i=i.d)&&(i=JSON.parse(i)),e.isArray(i)||(i=[i]);var
n=null,a={df:this._model.default_state,dat:i,par:t.id,m:this._model.data,t_id:this._id,t_cnt:this._cnt,sel:this._data.core.selected},d=this,o=function(e,t){e.data&&(e=e.data);var
i,r,s,n,a=e.dat,o=e.par,l=[],c=[],h=[],_=e.df,f=e.t_id,u=e.t_cnt,g=e.m,p=g[o],m=e.sel,j=function(e,i,r){r=r?r.concat():[],i&&r.unshift(i);var
s,n,a,d,o=e.id.toString(),l={id:o,text:e.text||"",icon:e.icon===t||e.icon,parent:i,parents:r,children:e.children||[],children_d:e.children_d||[],data:e.data,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1};for(s
in
_)_.hasOwnProperty(s)&&(l.state[s]=_[s]);if(e&&e.data&&e.data.jstree&&e.data.jstree.icon&&(l.icon=e.data.jstree.icon),l.icon!==t&&null!==l.icon&&""!==l.icon||(l.icon=!0),e&&e.data&&(l.data=e.data,e.data.jstree))for(s
in
e.data.jstree)e.data.jstree.hasOwnProperty(s)&&(l.state[s]=e.data.jstree[s]);if(e&&"object"==typeof
e.state)for(s in
e.state)e.state.hasOwnProperty(s)&&(l.state[s]=e.state[s]);if(e&&"object"==typeof
e.li_attr)for(s in
e.li_attr)e.li_attr.hasOwnProperty(s)&&(l.li_attr[s]=e.li_attr[s]);if(l.li_attr.id||(l.li_attr.id=o),e&&"object"==typeof
e.a_attr)for(s in
e.a_attr)e.a_attr.hasOwnProperty(s)&&(l.a_attr[s]=e.a_attr[s]);for(e&&e.children&&!0===e.children&&(l.state.loaded=!1,l.children=[],l.children_d=[]),g[l.id]=l,s=0,n=l.children.length;s<n;s++)a=j(g[l.children[s]],l.id,r),d=g[a],l.children_d.push(a),d.children_d.length&&(l.children_d=l.children_d.concat(d.children_d));return
delete e.data,delete
e.children,g[l.id].original=e,l.state.selected&&h.push(l.id),l.id},y=function(e,i,r){r=r?r.concat():[],i&&r.unshift(i);var
s,n,a,d,o,l=!1;do{l="j"+f+"_"+ ++u}while(g[l]);for(s in
o={id:!1,text:"string"==typeof
e?e:"",icon:"object"!=typeof
e||e.icon===t||e.icon,parent:i,parents:r,children:[],children_d:[],data:null,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1},_)_.hasOwnProperty(s)&&(o.state[s]=_[s]);if(e&&e.id&&(o.id=e.id.toString()),e&&e.text&&(o.text=e.text),e&&e.data&&e.data.jstree&&e.data.jstree.icon&&(o.icon=e.data.jstree.icon),o.icon!==t&&null!==o.icon&&""!==o.icon||(o.icon=!0),e&&e.data&&(o.data=e.data,e.data.jstree))for(s
in
e.data.jstree)e.data.jstree.hasOwnProperty(s)&&(o.state[s]=e.data.jstree[s]);if(e&&"object"==typeof
e.state)for(s in
e.state)e.state.hasOwnProperty(s)&&(o.state[s]=e.state[s]);if(e&&"object"==typeof
e.li_attr)for(s in
e.li_attr)e.li_attr.hasOwnProperty(s)&&(o.li_attr[s]=e.li_attr[s]);if(o.li_attr.id&&!o.id&&(o.id=o.li_attr.id.toString()),o.id||(o.id=l),o.li_attr.id||(o.li_attr.id=o.id),e&&"object"==typeof
e.a_attr)for(s in
e.a_attr)e.a_attr.hasOwnProperty(s)&&(o.a_attr[s]=e.a_attr[s]);if(e&&e.children&&e.children.length){for(s=0,n=e.children.length;s<n;s++)a=y(e.children[s],o.id,r),d=g[a],o.children.push(a),d.children_d.length&&(o.children_d=o.children_d.concat(d.children_d));o.children_d=o.children_d.concat(o.children)}return
e&&e.children&&!0===e.children&&(o.state.loaded=!1,o.children=[],o.children_d=[]),delete
e.data,delete
e.children,o.original=e,g[o.id]=o,o.state.selected&&h.push(o.id),o.id};if(a.length&&a[0].id!==t&&a[0].parent!==t){for(r=0,s=a.length;r<s;r++)a[r].children||(a[r].children=[]),a[r].state||(a[r].state={}),g[a[r].id.toString()]=a[r];for(r=0,s=a.length;r<s;r++)g[a[r].parent.toString()]?(g[a[r].parent.toString()].children.push(a[r].id.toString()),p.children_d.push(a[r].id.toString())):void
0!==d&&(d._data.core.last_error={error:"parse",plugin:"core",id:"core_07",reason:"Node
with invalid
parent",data:JSON.stringify({id:a[r].id.toString(),parent:a[r].parent.toString()})},d.settings.core.error.call(d,d._data.core.last_error));for(r=0,s=p.children.length;r<s;r++)i=j(g[p.children[r]],o,p.parents.concat()),c.push(i),g[i].children_d.length&&(c=c.concat(g[i].children_d));for(r=0,s=p.parents.length;r<s;r++)g[p.parents[r]].children_d=g[p.parents[r]].children_d.concat(c);n={cnt:u,mod:g,sel:m,par:o,dpc:c,add:h}}else{for(r=0,s=a.length;r<s;r++)(i=y(a[r],o,p.parents.concat()))&&(l.push(i),c.push(i),g[i].children_d.length&&(c=c.concat(g[i].children_d)));for(p.children=l,p.children_d=c,r=0,s=p.parents.length;r<s;r++)g[p.parents[r]].children_d=g[p.parents[r]].children_d.concat(c);n={cnt:u,mod:g,sel:m,par:o,dpc:c,add:h}}if("undefined"!=typeof
window&&void 0!==window.document)return
n;postMessage(n)},c=function(t,i){if(null!==this.element){this._cnt=t.cnt;var
s,n=this._model.data;for(s in
n)n.hasOwnProperty(s)&&n[s].state&&n[s].state.loading&&t.mod[s]&&(t.mod[s].state.loading=!0);if(this._model.data=t.mod,i){var
a,o=t.add,c=t.sel,h=this._data.core.selected.slice();if(n=this._model.data,c.length!==h.length||e.vakata.array_unique(c.concat(h)).length!==c.length){for(s=0,a=c.length;s<a;s++)-1===e.inArray(c[s],o)&&-1===e.inArray(c[s],h)&&(n[c[s]].state.selected=!1);for(s=0,a=h.length;s<a;s++)-1===e.inArray(h[s],c)&&(n[h[s]].state.selected=!0)}}t.add.length&&(this._data.core.selected=this._data.core.selected.concat(t.add)),this.trigger("model",{nodes:t.dpc,parent:t.par}),t.par!==e.jstree.root?(this._node_changed(t.par),this.redraw()):this.redraw(!0),t.add.length&&this.trigger("changed",{action:"model",selected:this._data.core.selected}),!i&&l?l(function(){r.call(d,!0)}):r.call(d,!0)}};if(this.settings.core.worker&&window.Blob&&window.URL&&window.Worker)try{null===this._wrk&&(this._wrk=window.URL.createObjectURL(new
window.Blob(["self.onmessage =
"+o.toString()],{type:"text/javascript"}))),!this._data.core.working||s?(this._data.core.working=!0,(n=new
window.Worker(this._wrk)).onmessage=e.proxy(function(e){c.call(this,e.data,!0);try{n.terminate(),n=null}catch(e){}this._data.core.worker_queue.length?this._append_json_data.apply(this,this._data.core.worker_queue.shift()):this._data.core.working=!1},this),a.par?n.postMessage(a):this._data.core.worker_queue.length?this._append_json_data.apply(this,this._data.core.worker_queue.shift()):this._data.core.working=!1):this._data.core.worker_queue.push([t,i,r,!0])}catch(e){c.call(this,o(a),!1),this._data.core.worker_queue.length?this._append_json_data.apply(this,this._data.core.worker_queue.shift()):this._data.core.working=!1}else
c.call(this,o(a),!1)}},_parse_model_from_html:function(i,r,s){s=s?[].concat(s):[],r&&s.unshift(r);var
n,a,d,o,l,c=this._model.data,h={id:!1,text:!1,icon:!0,parent:r,parents:s,children:[],children_d:[],data:null,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1};for(d
in
this._model.default_state)this._model.default_state.hasOwnProperty(d)&&(h.state[d]=this._model.default_state[d]);if(o=e.vakata.attributes(i,!0),e.each(o,function(t,i){if(!(i=e.trim(i)).length)return!0;h.li_attr[t]=i,"id"===t&&(h.id=i.toString())}),(o=i.children("a").first()).length&&(o=e.vakata.attributes(o,!0),e.each(o,function(t,i){(i=e.trim(i)).length&&(h.a_attr[t]=i)})),(o=i.children("a").first().length?i.children("a").first().clone():i.clone()).children("ins,
i, ul").remove(),o=o.html(),o=e("<div
/>").html(o),h.text=this.settings.core.force_text?o.text():o.html(),o=i.data(),h.data=o?e.extend(!0,{},o):null,h.state.opened=i.hasClass("jstree-open"),h.state.selected=i.children("a").hasClass("jstree-clicked"),h.state.disabled=i.children("a").hasClass("jstree-disabled"),h.data&&h.data.jstree)for(d
in
h.data.jstree)h.data.jstree.hasOwnProperty(d)&&(h.state[d]=h.data.jstree[d]);(o=i.children("a").children(".jstree-themeicon")).length&&(h.icon=!o.hasClass("jstree-themeicon-hidden")&&o.attr("rel")),h.state.icon!==t&&(h.icon=h.state.icon),h.icon!==t&&null!==h.icon&&""!==h.icon||(h.icon=!0),o=i.children("ul").children("li");do{l="j"+this._id+"_"+
++this._cnt}while(c[l]);return
h.id=h.li_attr.id?h.li_attr.id.toString():l,o.length?(o.each(e.proxy(function(t,i){n=this._parse_model_from_html(e(i),h.id,s),a=this._model.data[n],h.children.push(n),a.children_d.length&&(h.children_d=h.children_d.concat(a.children_d))},this)),h.children_d=h.children_d.concat(h.children)):i.hasClass("jstree-closed")&&(h.state.loaded=!1),h.li_attr.class&&(h.li_attr.class=h.li_attr.class.replace("jstree-closed","").replace("jstree-open","")),h.a_attr.class&&(h.a_attr.class=h.a_attr.class.replace("jstree-clicked","").replace("jstree-disabled","")),c[h.id]=h,h.state.selected&&this._data.core.selected.push(h.id),h.id},_parse_model_from_flat_json:function(e,i,r){r=r?r.concat():[],i&&r.unshift(i);var
s,n,a,d,o=e.id.toString(),l=this._model.data,c=this._model.default_state,h={id:o,text:e.text||"",icon:e.icon===t||e.icon,parent:i,parents:r,children:e.children||[],children_d:e.children_d||[],data:e.data,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1};for(s
in
c)c.hasOwnProperty(s)&&(h.state[s]=c[s]);if(e&&e.data&&e.data.jstree&&e.data.jstree.icon&&(h.icon=e.data.jstree.icon),h.icon!==t&&null!==h.icon&&""!==h.icon||(h.icon=!0),e&&e.data&&(h.data=e.data,e.data.jstree))for(s
in
e.data.jstree)e.data.jstree.hasOwnProperty(s)&&(h.state[s]=e.data.jstree[s]);if(e&&"object"==typeof
e.state)for(s in
e.state)e.state.hasOwnProperty(s)&&(h.state[s]=e.state[s]);if(e&&"object"==typeof
e.li_attr)for(s in
e.li_attr)e.li_attr.hasOwnProperty(s)&&(h.li_attr[s]=e.li_attr[s]);if(h.li_attr.id||(h.li_attr.id=o),e&&"object"==typeof
e.a_attr)for(s in
e.a_attr)e.a_attr.hasOwnProperty(s)&&(h.a_attr[s]=e.a_attr[s]);for(e&&e.children&&!0===e.children&&(h.state.loaded=!1,h.children=[],h.children_d=[]),l[h.id]=h,s=0,n=h.children.length;s<n;s++)d=l[a=this._parse_model_from_flat_json(l[h.children[s]],h.id,r)],h.children_d.push(a),d.children_d.length&&(h.children_d=h.children_d.concat(d.children_d));return
delete e.data,delete
e.children,l[h.id].original=e,h.state.selected&&this._data.core.selected.push(h.id),h.id},_parse_model_from_json:function(e,i,r){r=r?r.concat():[],i&&r.unshift(i);var
s,n,a,d,o,l=!1,c=this._model.data,h=this._model.default_state;do{l="j"+this._id+"_"+
++this._cnt}while(c[l]);for(s in o={id:!1,text:"string"==typeof
e?e:"",icon:"object"!=typeof
e||e.icon===t||e.icon,parent:i,parents:r,children:[],children_d:[],data:null,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1},h)h.hasOwnProperty(s)&&(o.state[s]=h[s]);if(e&&e.id&&(o.id=e.id.toString()),e&&e.text&&(o.text=e.text),e&&e.data&&e.data.jstree&&e.data.jstree.icon&&(o.icon=e.data.jstree.icon),o.icon!==t&&null!==o.icon&&""!==o.icon||(o.icon=!0),e&&e.data&&(o.data=e.data,e.data.jstree))for(s
in
e.data.jstree)e.data.jstree.hasOwnProperty(s)&&(o.state[s]=e.data.jstree[s]);if(e&&"object"==typeof
e.state)for(s in
e.state)e.state.hasOwnProperty(s)&&(o.state[s]=e.state[s]);if(e&&"object"==typeof
e.li_attr)for(s in
e.li_attr)e.li_attr.hasOwnProperty(s)&&(o.li_attr[s]=e.li_attr[s]);if(o.li_attr.id&&!o.id&&(o.id=o.li_attr.id.toString()),o.id||(o.id=l),o.li_attr.id||(o.li_attr.id=o.id),e&&"object"==typeof
e.a_attr)for(s in
e.a_attr)e.a_attr.hasOwnProperty(s)&&(o.a_attr[s]=e.a_attr[s]);if(e&&e.children&&e.children.length){for(s=0,n=e.children.length;s<n;s++)d=c[a=this._parse_model_from_json(e.children[s],o.id,r)],o.children.push(a),d.children_d.length&&(o.children_d=o.children_d.concat(d.children_d));o.children_d=o.children.concat(o.children_d)}return
e&&e.children&&!0===e.children&&(o.state.loaded=!1,o.children=[],o.children_d=[]),delete
e.data,delete
e.children,o.original=e,c[o.id]=o,o.state.selected&&this._data.core.selected.push(o.id),o.id},_redraw:function(){var
t,i,r,s=this._model.force_full_redraw?this._model.data[e.jstree.root].children.concat([]):this._model.changed.concat([]),n=o.createElement("UL"),a=this._data.core.focused;for(i=0,r=s.length;i<r;i++)(t=this.redraw_node(s[i],!0,this._model.force_full_redraw))&&this._model.force_full_redraw&&n.appendChild(t);this._model.force_full_redraw&&(n.className=this.get_container_ul()[0].className,n.setAttribute("role","group"),this.element.empty().append(n)),null!==a&&this.settings.core.restore_focus&&((t=this.get_node(a,!0))&&t.length&&t.children(".jstree-anchor")[0]!==o.activeElement?t.children(".jstree-anchor").focus():this._data.core.focused=null),this._model.force_full_redraw=!1,this._model.changed=[],this.trigger("redraw",{nodes:s})},redraw:function(e){e&&(this._model.force_full_redraw=!0),this._redraw()},draw_children:function(t){var
i=this.get_node(t),r=!1,s=!1,n=!1,a=o;if(!i)return!1;if(i.id===e.jstree.root)return
this.redraw(!0);if(!(t=this.get_node(t,!0))||!t.length)return!1;if(t.children(".jstree-children").remove(),t=t[0],i.children.length&&i.state.loaded){for((n=a.createElement("UL")).setAttribute("role","group"),n.className="jstree-children",r=0,s=i.children.length;r<s;r++)n.appendChild(this.redraw_node(i.children[r],!0,!0));t.appendChild(n)}},redraw_node:function(t,i,r,s){var
n=this.get_node(t),a=!1,d=!1,l=!1,c=!1,h=!1,_=!1,f="",u=o,g=this._model.data,p=!1,m=null,j=0,y=0,v=!1,w=!1;if(!n)return!1;if(n.id===e.jstree.root)return
this.redraw(!0);if(i=i||0===n.children.length,t=o.querySelector?this.element[0].querySelector("#"+(-1!=="0123456789".indexOf(n.id[0])?"\\3"+n.id[0]+"
"+n.id.substr(1).replace(e.jstree.idregex,"\\$&"):n.id.replace(e.jstree.idregex,"\\$&"))):o.getElementById(n.id))t=e(t),r||((a=t.parent().parent()[0])===this.element[0]&&(a=null),d=t.index()),i||!n.children.length||t.children(".jstree-children").length||(i=!0),i||(l=t.children(".jstree-children")[0]),p=t.children(".jstree-anchor")[0]===o.activeElement,t.remove();else
if(i=!0,!r){if(!(null===(a=n.parent!==e.jstree.root?e("#"+n.parent.replace(e.jstree.idregex,"\\$&"),this.element)[0]:null)||a&&g[n.parent].state.opened))return!1;d=e.inArray(n.id,null===a?g[e.jstree.root].children:g[n.parent].children)}for(c
in t=this._data.core.node.cloneNode(!0),f="jstree-node
",n.li_attr)if(n.li_attr.hasOwnProperty(c)){if("id"===c)continue;"class"!==c?t.setAttribute(c,n.li_attr[c]):f+=n.li_attr[c]}for(n.a_attr.id||(n.a_attr.id=n.id+"_anchor"),t.setAttribute("aria-selected",!!n.state.selected),t.setAttribute("aria-level",n.parents.length),t.setAttribute("aria-labelledby",n.a_attr.id),n.state.disabled&&t.setAttribute("aria-disabled",!0),c=0,h=n.children.length;c<h;c++)if(!g[n.children[c]].state.hidden){v=!0;break}if(null!==n.parent&&g[n.parent]&&!n.state.hidden&&(c=e.inArray(n.id,g[n.parent].children),w=n.id,-1!==c))for(c++,h=g[n.parent].children.length;c<h&&(g[g[n.parent].children[c]].state.hidden||(w=g[n.parent].children[c]),w===n.id);c++);for(h
in n.state.hidden&&(f+="
jstree-hidden"),n.state.loading&&(f+="
jstree-loading"),n.state.loaded&&!v?f+="
jstree-leaf":(f+=n.state.opened&&n.state.loaded?"
jstree-open":"
jstree-closed",t.setAttribute("aria-expanded",n.state.opened&&n.state.loaded)),w===n.id&&(f+="
jstree-last"),t.id=n.id,t.className=f,f=(n.state.selected?"
jstree-clicked":"")+(n.state.disabled?"
jstree-disabled":""),n.a_attr)if(n.a_attr.hasOwnProperty(h)){if("href"===h&&"#"===n.a_attr[h])continue;"class"!==h?t.childNodes[1].setAttribute(h,n.a_attr[h]):f+="
"+n.a_attr[h]}if(f.length&&(t.childNodes[1].className="jstree-anchor
"+f),(n.icon&&!0!==n.icon||!1===n.icon)&&(!1===n.icon?t.childNodes[1].childNodes[0].className+="
jstree-themeicon-hidden":-1===n.icon.indexOf("/")&&-1===n.icon.indexOf(".")?t.childNodes[1].childNodes[0].className+="
"+n.icon+"
jstree-themeicon-custom":(t.childNodes[1].childNodes[0].style.backgroundImage='url("'+n.icon+'")',t.childNodes[1].childNodes[0].style.backgroundPosition="center
center",t.childNodes[1].childNodes[0].style.backgroundSize="auto",t.childNodes[1].childNodes[0].className+="
jstree-themeicon-custom")),this.settings.core.force_text?t.childNodes[1].appendChild(u.createTextNode(n.text)):t.childNodes[1].innerHTML+=n.text,i&&n.children.length&&(n.state.opened||s)&&n.state.loaded){for((_=u.createElement("UL")).setAttribute("role","group"),_.className="jstree-children",c=0,h=n.children.length;c<h;c++)_.appendChild(this.redraw_node(n.children[c],i,!0));t.appendChild(_)}if(l&&t.appendChild(l),!r){for(a||(a=this.element[0]),c=0,h=a.childNodes.length;c<h;c++)if(a.childNodes[c]&&a.childNodes[c].className&&-1!==a.childNodes[c].className.indexOf("jstree-children")){m=a.childNodes[c];break}m||((m=u.createElement("UL")).setAttribute("role","group"),m.className="jstree-children",a.appendChild(m)),d<(a=m).childNodes.length?a.insertBefore(t,a.childNodes[d]):a.appendChild(t),p&&(j=this.element[0].scrollTop,y=this.element[0].scrollLeft,t.childNodes[1].focus(),this.element[0].scrollTop=j,this.element[0].scrollLeft=y)}return
n.state.opened&&!n.state.loaded&&(n.state.opened=!1,setTimeout(e.proxy(function(){this.open_node(n.id,!1,0)},this),0)),t},open_node:function(i,r,s){var
n,a,d,o;if(e.isArray(i)){for(n=0,a=(i=i.slice()).length;n<a;n++)this.open_node(i[n],r,s);return!0}return!(!(i=this.get_node(i))||i.id===e.jstree.root)&&(s=s===t?this.settings.core.animation:s,this.is_closed(i)?this.is_loaded(i)?(d=this.get_node(i,!0),o=this,d.length&&(s&&d.children(".jstree-children").length&&d.children(".jstree-children").stop(!0,!0),i.children.length&&!this._firstChild(d.children(".jstree-children")[0])&&this.draw_children(i),s?(this.trigger("before_open",{node:i}),d.children(".jstree-children").css("display","none").end().removeClass("jstree-closed").addClass("jstree-open").attr("aria-expanded",!0).children(".jstree-children").stop(!0,!0).slideDown(s,function(){this.style.display="",o.element&&o.trigger("after_open",{node:i})})):(this.trigger("before_open",{node:i}),d[0].className=d[0].className.replace("jstree-closed","jstree-open"),d[0].setAttribute("aria-expanded",!0))),i.state.opened=!0,r&&r.call(this,i,!0),d.length||this.trigger("before_open",{node:i}),this.trigger("open_node",{node:i}),s&&d.length||this.trigger("after_open",{node:i}),!0):this.is_loading(i)?setTimeout(e.proxy(function(){this.open_node(i,r,s)},this),500):void
this.load_node(i,function(e,t){return
t?this.open_node(e,r,s):!!r&&r.call(this,e,!1)}):(r&&r.call(this,i,!1),!1))},_open_to:function(t){if(!(t=this.get_node(t))||t.id===e.jstree.root)return!1;var
i,r,s=t.parents;for(i=0,r=s.length;i<r;i+=1)i!==e.jstree.root&&this.open_node(s[i],!1,0);return
e("#"+t.id.replace(e.jstree.idregex,"\\$&"),this.element)},close_node:function(i,r){var
s,n,a,d;if(e.isArray(i)){for(s=0,n=(i=i.slice()).length;s<n;s++)this.close_node(i[s],r);return!0}return!(!(i=this.get_node(i))||i.id===e.jstree.root)&&(!this.is_closed(i)&&(r=r===t?this.settings.core.animation:r,a=this,d=this.get_node(i,!0),i.state.opened=!1,this.trigger("close_node",{node:i}),void(d.length?r?d.children(".jstree-children").attr("style","display:block
!important").end().removeClass("jstree-open").addClass("jstree-closed").attr("aria-expanded",!1).children(".jstree-children").stop(!0,!0).slideUp(r,function(){this.style.display="",d.children(".jstree-children").remove(),a.element&&a.trigger("after_close",{node:i})}):(d[0].className=d[0].className.replace("jstree-open","jstree-closed"),d.attr("aria-expanded",!1).children(".jstree-children").remove(),this.trigger("after_close",{node:i})):this.trigger("after_close",{node:i}))))},toggle_node:function(t){var
i,r;if(e.isArray(t)){for(i=0,r=(t=t.slice()).length;i<r;i++)this.toggle_node(t[i]);return!0}return
this.is_closed(t)?this.open_node(t):this.is_open(t)?this.close_node(t):void
0},open_all:function(t,i,r){if(t||(t=e.jstree.root),!(t=this.get_node(t)))return!1;var
s,n,a,d=t.id===e.jstree.root?this.get_container_ul():this.get_node(t,!0);if(!d.length){for(s=0,n=t.children_d.length;s<n;s++)this.is_closed(this._model.data[t.children_d[s]])&&(this._model.data[t.children_d[s]].state.opened=!0);return
this.trigger("open_all",{node:t})}r=r||d,a=this,(d=this.is_closed(t)?d.find(".jstree-closed").addBack():d.find(".jstree-closed")).each(function(){a.open_node(this,function(e,t){t&&this.is_parent(e)&&this.open_all(e,i,r)},i||0)}),0===r.find(".jstree-closed").length&&this.trigger("open_all",{node:this.get_node(r)})},close_all:function(t,i){if(t||(t=e.jstree.root),!(t=this.get_node(t)))return!1;var
r,s,n=t.id===e.jstree.root?this.get_container_ul():this.get_node(t,!0),a=this;for(n.length&&(n=this.is_open(t)?n.find(".jstree-open").addBack():n.find(".jstree-open"),e(n.get().reverse()).each(function(){a.close_node(this,i||0)})),r=0,s=t.children_d.length;r<s;r++)this._model.data[t.children_d[r]].state.opened=!1;this.trigger("close_all",{node:t})},is_disabled:function(e){return(e=this.get_node(e))&&e.state&&e.state.disabled},enable_node:function(t){var
i,r;if(e.isArray(t)){for(i=0,r=(t=t.slice()).length;i<r;i++)this.enable_node(t[i]);return!0}if(!(t=this.get_node(t))||t.id===e.jstree.root)return!1;t.state.disabled=!1,this.get_node(t,!0).children(".jstree-anchor").removeClass("jstree-disabled").attr("aria-disabled",!1),this.trigger("enable_node",{node:t})},disable_node:function(t){var
i,r;if(e.isArray(t)){for(i=0,r=(t=t.slice()).length;i<r;i++)this.disable_node(t[i]);return!0}if(!(t=this.get_node(t))||t.id===e.jstree.root)return!1;t.state.disabled=!0,this.get_node(t,!0).children(".jstree-anchor").addClass("jstree-disabled").attr("aria-disabled",!0),this.trigger("disable_node",{node:t})},is_hidden:function(e){return!0===(e=this.get_node(e)).state.hidden},hide_node:function(t,i){var
r,s;if(e.isArray(t)){for(r=0,s=(t=t.slice()).length;r<s;r++)this.hide_node(t[r],!0);return
i||this.redraw(),!0}if(!(t=this.get_node(t))||t.id===e.jstree.root)return!1;t.state.hidden||(t.state.hidden=!0,this._node_changed(t.parent),i||this.redraw(),this.trigger("hide_node",{node:t}))},show_node:function(t,i){var
r,s;if(e.isArray(t)){for(r=0,s=(t=t.slice()).length;r<s;r++)this.show_node(t[r],!0);return
i||this.redraw(),!0}if(!(t=this.get_node(t))||t.id===e.jstree.root)return!1;t.state.hidden&&(t.state.hidden=!1,this._node_changed(t.parent),i||this.redraw(),this.trigger("show_node",{node:t}))},hide_all:function(t){var
i,r=this._model.data,s=[];for(i in
r)r.hasOwnProperty(i)&&i!==e.jstree.root&&!r[i].state.hidden&&(r[i].state.hidden=!0,s.push(i));return
this._model.force_full_redraw=!0,t||this.redraw(),this.trigger("hide_all",{nodes:s}),s},show_all:function(t){var
i,r=this._model.data,s=[];for(i in
r)r.hasOwnProperty(i)&&i!==e.jstree.root&&r[i].state.hidden&&(r[i].state.hidden=!1,s.push(i));return
this._model.force_full_redraw=!0,t||this.redraw(),this.trigger("show_all",{nodes:s}),s},activate_node:function(e,i){if(this.is_disabled(e))return!1;if(i&&"object"==typeof
i||(i={}),this._data.core.last_clicked=this._data.core.last_clicked&&this._data.core.last_clicked.id!==t?this.get_node(this._data.core.last_clicked.id):null,this._data.core.last_clicked&&!this._data.core.last_clicked.state.selected&&(this._data.core.last_clicked=null),!this._data.core.last_clicked&&this._data.core.selected.length&&(this._data.core.last_clicked=this.get_node(this._data.core.selected[this._data.core.selected.length-1])),this.settings.core.multiple&&(i.metaKey||i.ctrlKey||i.shiftKey)&&(!i.shiftKey||this._data.core.last_clicked&&this.get_parent(e)&&this.get_parent(e)===this._data.core.last_clicked.parent))if(i.shiftKey){var
r,s,n=this.get_node(e).id,a=this._data.core.last_clicked.id,d=this.get_node(this._data.core.last_clicked.parent).children,o=!1;for(r=0,s=d.length;r<s;r+=1)d[r]===n&&(o=!o),d[r]===a&&(o=!o),this.is_disabled(d[r])||!o&&d[r]!==n&&d[r]!==a?this.deselect_node(d[r],!0,i):this.is_hidden(d[r])||this.select_node(d[r],!0,!1,i);this.trigger("changed",{action:"select_node",node:this.get_node(e),selected:this._data.core.selected,event:i})}else
this.is_selected(e)?this.deselect_node(e,!1,i):this.select_node(e,!1,!1,i);else!this.settings.core.multiple&&(i.metaKey||i.ctrlKey||i.shiftKey)&&this.is_selected(e)?this.deselect_node(e,!1,i):(this.deselect_all(!0),this.select_node(e,!1,!1,i),this._data.core.last_clicked=this.get_node(e));this.trigger("activate_node",{node:this.get_node(e),event:i})},hover_node:function(e){if(!(e=this.get_node(e,!0))||!e.length||e.children(".jstree-hovered").length)return!1;var
t=this.element.find(".jstree-hovered"),i=this.element;t&&t.length&&this.dehover_node(t),e.children(".jstree-anchor").addClass("jstree-hovered"),this.trigger("hover_node",{node:this.get_node(e)}),setTimeout(function(){i.attr("aria-activedescendant",e[0].id)},0)},dehover_node:function(e){if(!(e=this.get_node(e,!0))||!e.length||!e.children(".jstree-hovered").length)return!1;e.children(".jstree-anchor").removeClass("jstree-hovered"),this.trigger("dehover_node",{node:this.get_node(e)})},select_node:function(t,i,r,s){var
n,a,d;if(e.isArray(t)){for(a=0,d=(t=t.slice()).length;a<d;a++)this.select_node(t[a],i,r,s);return!0}if(!(t=this.get_node(t))||t.id===e.jstree.root)return!1;n=this.get_node(t,!0),t.state.selected||(t.state.selected=!0,this._data.core.selected.push(t.id),r||(n=this._open_to(t)),n&&n.length&&n.attr("aria-selected",!0).children(".jstree-anchor").addClass("jstree-clicked"),this.trigger("select_node",{node:t,selected:this._data.core.selected,event:s}),i||this.trigger("changed",{action:"select_node",node:t,selected:this._data.core.selected,event:s}))},deselect_node:function(t,i,r){var
s,n,a;if(e.isArray(t)){for(s=0,n=(t=t.slice()).length;s<n;s++)this.deselect_node(t[s],i,r);return!0}if(!(t=this.get_node(t))||t.id===e.jstree.root)return!1;a=this.get_node(t,!0),t.state.selected&&(t.state.selected=!1,this._data.core.selected=e.vakata.array_remove_item(this._data.core.selected,t.id),a.length&&a.attr("aria-selected",!1).children(".jstree-anchor").removeClass("jstree-clicked"),this.trigger("deselect_node",{node:t,selected:this._data.core.selected,event:r}),i||this.trigger("changed",{action:"deselect_node",node:t,selected:this._data.core.selected,event:r}))},select_all:function(t){var
i,r,s=this._data.core.selected.concat([]);for(this._data.core.selected=this._model.data[e.jstree.root].children_d.concat(),i=0,r=this._data.core.selected.length;i<r;i++)this._model.data[this._data.core.selected[i]]&&(this._model.data[this._data.core.selected[i]].state.selected=!0);this.redraw(!0),this.trigger("select_all",{selected:this._data.core.selected}),t||this.trigger("changed",{action:"select_all",selected:this._data.core.selected,old_selection:s})},deselect_all:function(e){var
t,i,r=this._data.core.selected.concat([]);for(t=0,i=this._data.core.selected.length;t<i;t++)this._model.data[this._data.core.selected[t]]&&(this._model.data[this._data.core.selected[t]].state.selected=!1);this._data.core.selected=[],this.element.find(".jstree-clicked").removeClass("jstree-clicked").parent().attr("aria-selected",!1),this.trigger("deselect_all",{selected:this._data.core.selected,node:r}),e||this.trigger("changed",{action:"deselect_all",selected:this._data.core.selected,old_selection:r})},is_selected:function(t){return!(!(t=this.get_node(t))||t.id===e.jstree.root)&&t.state.selected},get_selected:function(t){return
t?e.map(this._data.core.selected,e.proxy(function(e){return
this.get_node(e)},this)):this._data.core.selected.slice()},get_top_selected:function(t){var
i,r,s,n,a=this.get_selected(!0),d={};for(i=0,r=a.length;i<r;i++)d[a[i].id]=a[i];for(i=0,r=a.length;i<r;i++)for(s=0,n=a[i].children_d.length;s<n;s++)d[a[i].children_d[s]]&&delete
d[a[i].children_d[s]];for(i in
a=[],d)d.hasOwnProperty(i)&&a.push(i);return
t?e.map(a,e.proxy(function(e){return
this.get_node(e)},this)):a},get_bottom_selected:function(t){var
i,r,s=this.get_selected(!0),n=[];for(i=0,r=s.length;i<r;i++)s[i].children.length||n.push(s[i].id);return
t?e.map(n,e.proxy(function(e){return
this.get_node(e)},this)):n},get_state:function(){var
t,i={core:{open:[],loaded:[],scroll:{left:this.element.scrollLeft(),top:this.element.scrollTop()},selected:[]}};for(t
in
this._model.data)this._model.data.hasOwnProperty(t)&&t!==e.jstree.root&&(this._model.data[t].state.loaded&&this.settings.core.loaded_state&&i.core.loaded.push(t),this._model.data[t].state.opened&&i.core.open.push(t),this._model.data[t].state.selected&&i.core.selected.push(t));return
i},set_state:function(i,r){if(i){if(i.core&&i.core.selected&&i.core.initial_selection===t&&(i.core.initial_selection=this._data.core.selected.concat([]).sort().join(",")),i.core){var
s,n;if(i.core.loaded)return
this.settings.core.loaded_state&&e.isArray(i.core.loaded)&&i.core.loaded.length?this._load_nodes(i.core.loaded,function(e){delete
i.core.loaded,this.set_state(i,r)}):(delete
i.core.loaded,this.set_state(i,r)),!1;if(i.core.open)return
e.isArray(i.core.open)&&i.core.open.length?this._load_nodes(i.core.open,function(e){this.open_node(e,!1,0),delete
i.core.open,this.set_state(i,r)}):(delete
i.core.open,this.set_state(i,r)),!1;if(i.core.scroll)return
i.core.scroll&&i.core.scroll.left!==t&&this.element.scrollLeft(i.core.scroll.left),i.core.scroll&&i.core.scroll.top!==t&&this.element.scrollTop(i.core.scroll.top),delete
i.core.scroll,this.set_state(i,r),!1;if(i.core.selected)return
s=this,i.core.initial_selection!==t&&i.core.initial_selection!==this._data.core.selected.concat([]).sort().join(",")||(this.deselect_all(),e.each(i.core.selected,function(e,t){s.select_node(t,!1,!0)})),delete
i.core.initial_selection,delete
i.core.selected,this.set_state(i,r),!1;for(n in
i)i.hasOwnProperty(n)&&"core"!==n&&-1===e.inArray(n,this.settings.plugins)&&delete
i[n];if(e.isEmptyObject(i.core))return delete
i.core,this.set_state(i,r),!1}return!e.isEmptyObject(i)||(i=null,r&&r.call(this),this.trigger("set_state"),!1)}return!1},refresh:function(t,i){this._data.core.state=!0===i?{}:this.get_state(),i&&e.isFunction(i)&&(this._data.core.state=i.call(this,this._data.core.state)),this._cnt=0,this._model.data={},this._model.data[e.jstree.root]={id:e.jstree.root,parent:null,parents:[],children:[],children_d:[],state:{loaded:!1}},this._data.core.selected=[],this._data.core.last_clicked=null,this._data.core.focused=null;var
r=this.get_container_ul()[0].className;t||(this.element.html("<ul
class='"+r+"' role='group'><li
class='jstree-initial-node jstree-loading jstree-leaf
jstree-last' role='treeitem'
id='j"+this._id+"_loading'><i
class='jstree-icon jstree-ocl'></i><a
class='jstree-anchor' href='#'><i
class='jstree-icon
jstree-themeicon-hidden'></i>"+this.get_string("Loading
...")+"</a></li></ul>"),this.element.attr("aria-activedescendant","j"+this._id+"_loading")),this.load_node(e.jstree.root,function(t,i){i&&(this.get_container_ul()[0].className=r,this._firstChild(this.get_container_ul()[0])&&this.element.attr("aria-activedescendant",this._firstChild(this.get_container_ul()[0]).id),this.set_state(e.extend(!0,{},this._data.core.state),function(){this.trigger("refresh")})),this._data.core.state=null})},refresh_node:function(t){if(!(t=this.get_node(t))||t.id===e.jstree.root)return!1;var
i=[],r=[],s=this._data.core.selected.concat([]);r.push(t.id),!0===t.state.opened&&i.push(t.id),this.get_node(t,!0).find(".jstree-open").each(function(){r.push(this.id),i.push(this.id)}),this._load_nodes(r,e.proxy(function(e){this.open_node(i,!1,0),this.select_node(s),this.trigger("refresh_node",{node:t,nodes:e})},this),!1,!0)},set_id:function(t,i){if(!(t=this.get_node(t))||t.id===e.jstree.root)return!1;var
r,s,n=this._model.data,a=t.id;for(i=i.toString(),n[t.parent].children[e.inArray(t.id,n[t.parent].children)]=i,r=0,s=t.parents.length;r<s;r++)n[t.parents[r]].children_d[e.inArray(t.id,n[t.parents[r]].children_d)]=i;for(r=0,s=t.children.length;r<s;r++)n[t.children[r]].parent=i;for(r=0,s=t.children_d.length;r<s;r++)n[t.children_d[r]].parents[e.inArray(t.id,n[t.children_d[r]].parents)]=i;return-1!==(r=e.inArray(t.id,this._data.core.selected))&&(this._data.core.selected[r]=i),(r=this.get_node(t.id,!0))&&(r.attr("id",i),this.element.attr("aria-activedescendant")===t.id&&this.element.attr("aria-activedescendant",i)),delete
n[t.id],t.id=i,t.li_attr.id=i,n[i]=t,this.trigger("set_id",{node:t,new:t.id,old:a}),!0},get_text:function(t){return!(!(t=this.get_node(t))||t.id===e.jstree.root)&&t.text},set_text:function(t,i){var
r,s;if(e.isArray(t)){for(r=0,s=(t=t.slice()).length;r<s;r++)this.set_text(t[r],i);return!0}return!(!(t=this.get_node(t))||t.id===e.jstree.root)&&(t.text=i,this.get_node(t,!0).length&&this.redraw_node(t.id),this.trigger("set_text",{obj:t,text:i}),!0)},get_json:function(t,i,r){if(!(t=this.get_node(t||e.jstree.root)))return!1;i&&i.flat&&!r&&(r=[]);var
s,n,a={id:t.id,text:t.text,icon:this.get_icon(t),li_attr:e.extend(!0,{},t.li_attr),a_attr:e.extend(!0,{},t.a_attr),state:{},data:(!i||!i.no_data)&&e.extend(!0,e.isArray(t.data)?[]:{},t.data)};if(i&&i.flat?a.parent=t.parent:a.children=[],i&&i.no_state)delete
a.state;else for(s in
t.state)t.state.hasOwnProperty(s)&&(a.state[s]=t.state[s]);if(i&&i.no_li_attr&&delete
a.li_attr,i&&i.no_a_attr&&delete
a.a_attr,i&&i.no_id&&(delete
a.id,a.li_attr&&a.li_attr.id&&delete
a.li_attr.id,a.a_attr&&a.a_attr.id&&delete
a.a_attr.id),i&&i.flat&&t.id!==e.jstree.root&&r.push(a),!i||!i.no_children)for(s=0,n=t.children.length;s<n;s++)i&&i.flat?this.get_json(t.children[s],i,r):a.children.push(this.get_json(t.children[s],i));return
i&&i.flat?r:t.id===e.jstree.root?a.children:a},create_node:function(i,r,s,n,a){if(null===i&&(i=e.jstree.root),!(i=this.get_node(i)))return!1;if(!(s=s===t?"last":s).toString().match(/^(before|after)$/)&&!a&&!this.is_loaded(i))return
this.load_node(i,function(){this.create_node(i,r,s,n,!0)});var
d,o,l,c;switch(r||(r={text:this.get_string("New
node")}),(r="string"==typeof
r?{text:r}:e.extend(!0,{},r)).text===t&&(r.text=this.get_string("New
node")),i.id===e.jstree.root&&("before"===s&&(s="first"),"after"===s&&(s="last")),s){case"before":d=this.get_node(i.parent),s=e.inArray(i.id,d.children),i=d;break;case"after":d=this.get_node(i.parent),s=e.inArray(i.id,d.children)+1,i=d;break;case"inside":case"first":s=0;break;case"last":s=i.children.length;break;default:s||(s=0)}if(s>i.children.length&&(s=i.children.length),r.id||(r.id=!0),!this.check("create_node",r,i,s))return
this.settings.core.error.call(this,this._data.core.last_error),!1;if(!0===r.id&&delete
r.id,!(r=this._parse_model_from_json(r,i.id,i.parents.concat())))return!1;for(d=this.get_node(r),(o=[]).push(r),o=o.concat(d.children_d),this.trigger("model",{nodes:o,parent:i.id}),i.children_d=i.children_d.concat(o),l=0,c=i.parents.length;l<c;l++)this._model.data[i.parents[l]].children_d=this._model.data[i.parents[l]].children_d.concat(o);for(r=d,d=[],l=0,c=i.children.length;l<c;l++)d[l>=s?l+1:l]=i.children[l];return
d[s]=r.id,i.children=d,this.redraw_node(i,!0),this.trigger("create_node",{node:this.get_node(r),parent:i.id,position:s}),n&&n.call(this,this.get_node(r)),r.id},rename_node:function(t,i){var
r,s,n;if(e.isArray(t)){for(r=0,s=(t=t.slice()).length;r<s;r++)this.rename_node(t[r],i);return!0}return!(!(t=this.get_node(t))||t.id===e.jstree.root)&&(n=t.text,this.check("rename_node",t,this.get_parent(t),i)?(this.set_text(t,i),this.trigger("rename_node",{node:t,text:i,old:n}),!0):(this.settings.core.error.call(this,this._data.core.last_error),!1))},delete_node:function(t){var
i,r,s,n,a,d,o,l,c,h,_,f;if(e.isArray(t)){for(i=0,r=(t=t.slice()).length;i<r;i++)this.delete_node(t[i]);return!0}if(!(t=this.get_node(t))||t.id===e.jstree.root)return!1;if(s=this.get_node(t.parent),n=e.inArray(t.id,s.children),h=!1,!this.check("delete_node",t,s,n))return
this.settings.core.error.call(this,this._data.core.last_error),!1;for(-1!==n&&(s.children=e.vakata.array_remove(s.children,n)),(a=t.children_d.concat([])).push(t.id),d=0,o=t.parents.length;d<o;d++)this._model.data[t.parents[d]].children_d=e.vakata.array_filter(this._model.data[t.parents[d]].children_d,function(t){return-1===e.inArray(t,a)});for(l=0,c=a.length;l<c;l++)if(this._model.data[a[l]].state.selected){h=!0;break}for(h&&(this._data.core.selected=e.vakata.array_filter(this._data.core.selected,function(t){return-1===e.inArray(t,a)})),this.trigger("delete_node",{node:t,parent:s.id}),h&&this.trigger("changed",{action:"delete_node",node:t,selected:this._data.core.selected,parent:s.id}),l=0,c=a.length;l<c;l++)delete
this._model.data[a[l]];return-1!==e.inArray(this._data.core.focused,a)&&(this._data.core.focused=null,_=this.element[0].scrollTop,f=this.element[0].scrollLeft,s.id===e.jstree.root?this._model.data[e.jstree.root].children[0]&&this.get_node(this._model.data[e.jstree.root].children[0],!0).children(".jstree-anchor").focus():this.get_node(s,!0).children(".jstree-anchor").focus(),this.element[0].scrollTop=_,this.element[0].scrollLeft=f),this.redraw_node(s,!0),!0},check:function(t,i,r,s,n){i=i&&i.id?i:this.get_node(i),r=r&&r.id?r:this.get_node(r);var
a=t.match(/^move_node|copy_node|create_node$/i)?r:i,d=this.settings.core.check_callback;if("move_node"===t||"copy_node"===t){if(!(n&&n.is_multi||"move_node"!==t||e.inArray(i.id,r.children)!==s))return
this._data.core.last_error={error:"check",plugin:"core",id:"core_08",reason:"Moving
node to its current
position",data:JSON.stringify({chk:t,pos:s,obj:!(!i||!i.id)&&i.id,par:!(!r||!r.id)&&r.id})},!1;if(!(n&&n.is_multi||i.id!==r.id&&("move_node"!==t||e.inArray(i.id,r.children)!==s)&&-1===e.inArray(r.id,i.children_d)))return
this._data.core.last_error={error:"check",plugin:"core",id:"core_01",reason:"Moving
parent inside
child",data:JSON.stringify({chk:t,pos:s,obj:!(!i||!i.id)&&i.id,par:!(!r||!r.id)&&r.id})},!1}return
a&&a.data&&(a=a.data),a&&a.functions&&(!1===a.functions[t]||!0===a.functions[t])?(!1===a.functions[t]&&(this._data.core.last_error={error:"check",plugin:"core",id:"core_02",reason:"Node
data prevents function:
"+t,data:JSON.stringify({chk:t,pos:s,obj:!(!i||!i.id)&&i.id,par:!(!r||!r.id)&&r.id})}),a.functions[t]):!(!1===d||e.isFunction(d)&&!1===d.call(this,t,i,r,s,n)||d&&!1===d[t])||(this._data.core.last_error={error:"check",plugin:"core",id:"core_03",reason:"User
config for core.check_callback prevents function:
"+t,data:JSON.stringify({chk:t,pos:s,obj:!(!i||!i.id)&&i.id,par:!(!r||!r.id)&&r.id})},!1)},last_error:function(){return
this._data.core.last_error},move_node:function(i,r,s,n,a,d,o){var
l,c,h,_,f,u,g,p,m,j,y,v,w,b;if(r=this.get_node(r),s=s===t?0:s,!r)return!1;if(!s.toString().match(/^(before|after)$/)&&!a&&!this.is_loaded(r))return
this.load_node(r,function(){this.move_node(i,r,s,n,!0,!1,o)});if(e.isArray(i)){if(1!==i.length){for(l=0,c=i.length;l<c;l++)(m=this.move_node(i[l],r,s,n,a,!1,o))&&(r=m,s="after");return
this.redraw(),!0}i=i[0]}if(!(i=i&&i.id?i:this.get_node(i))||i.id===e.jstree.root)return!1;if(h=(i.parent||e.jstree.root).toString(),f=s.toString().match(/^(before|after)$/)&&r.id!==e.jstree.root?this.get_node(r.parent):r,g=!(u=o||(this._model.data[i.id]?this:e.jstree.reference(i.id)))||!u._id||this._id!==u._id,_=u&&u._id&&h&&u._model.data[h]&&u._model.data[h].children?e.inArray(i.id,u._model.data[h].children):-1,u&&u._id&&(i=u._model.data[i.id]),g)return!!(m=this.copy_node(i,r,s,n,a,!1,o))&&(u&&u.delete_node(i),m);switch(r.id===e.jstree.root&&("before"===s&&(s="first"),"after"===s&&(s="last")),s){case"before":s=e.inArray(r.id,f.children);break;case"after":s=e.inArray(r.id,f.children)+1;break;case"inside":case"first":s=0;break;case"last":s=f.children.length;break;default:s||(s=0)}if(s>f.children.length&&(s=f.children.length),!this.check("move_node",i,f,s,{core:!0,origin:o,is_multi:u&&u._id&&u._id!==this._id,is_foreign:!u||!u._id}))return
this.settings.core.error.call(this,this._data.core.last_error),!1;if(i.parent===f.id){for(p=f.children.concat(),-1!==(m=e.inArray(i.id,p))&&(p=e.vakata.array_remove(p,m),s>m&&s--),m=[],j=0,y=p.length;j<y;j++)m[j>=s?j+1:j]=p[j];m[s]=i.id,f.children=m,this._node_changed(f.id),this.redraw(f.id===e.jstree.root)}else{for((m=i.children_d.concat()).push(i.id),j=0,y=i.parents.length;j<y;j++){for(p=[],v=0,w=(b=u._model.data[i.parents[j]].children_d).length;v<w;v++)-1===e.inArray(b[v],m)&&p.push(b[v]);u._model.data[i.parents[j]].children_d=p}for(u._model.data[h].children=e.vakata.array_remove_item(u._model.data[h].children,i.id),j=0,y=f.parents.length;j<y;j++)this._model.data[f.parents[j]].children_d=this._model.data[f.parents[j]].children_d.concat(m);for(p=[],j=0,y=f.children.length;j<y;j++)p[j>=s?j+1:j]=f.children[j];for(p[s]=i.id,f.children=p,f.children_d.push(i.id),f.children_d=f.children_d.concat(i.children_d),i.parent=f.id,(m=f.parents.concat()).unshift(f.id),b=i.parents.length,i.parents=m,m=m.concat(),j=0,y=i.children_d.length;j<y;j++)this._model.data[i.children_d[j]].parents=this._model.data[i.children_d[j]].parents.slice(0,-1*b),Array.prototype.push.apply(this._model.data[i.children_d[j]].parents,m);h!==e.jstree.root&&f.id!==e.jstree.root||(this._model.force_full_redraw=!0),this._model.force_full_redraw||(this._node_changed(h),this._node_changed(f.id)),d||this.redraw()}return
n&&n.call(this,i,f,s),this.trigger("move_node",{node:i,parent:f.id,position:s,old_parent:h,old_position:_,is_multi:u&&u._id&&u._id!==this._id,is_foreign:!u||!u._id,old_instance:u,new_instance:this}),i.id},copy_node:function(i,r,s,n,a,d,o){var
l,c,h,_,f,u,g,p,m,j;if(r=this.get_node(r),s=s===t?0:s,!r)return!1;if(!s.toString().match(/^(before|after)$/)&&!a&&!this.is_loaded(r))return
this.load_node(r,function(){this.copy_node(i,r,s,n,!0,!1,o)});if(e.isArray(i)){if(1!==i.length){for(l=0,c=i.length;l<c;l++)(_=this.copy_node(i[l],r,s,n,a,!0,o))&&(r=_,s="after");return
this.redraw(),!0}i=i[0]}if(!(i=i&&i.id?i:this.get_node(i))||i.id===e.jstree.root)return!1;switch(p=(i.parent||e.jstree.root).toString(),m=s.toString().match(/^(before|after)$/)&&r.id!==e.jstree.root?this.get_node(r.parent):r,!(j=o||(this._model.data[i.id]?this:e.jstree.reference(i.id)))||!j._id||this._id!==j._id,j&&j._id&&(i=j._model.data[i.id]),r.id===e.jstree.root&&("before"===s&&(s="first"),"after"===s&&(s="last")),s){case"before":s=e.inArray(r.id,m.children);break;case"after":s=e.inArray(r.id,m.children)+1;break;case"inside":case"first":s=0;break;case"last":s=m.children.length;break;default:s||(s=0)}if(s>m.children.length&&(s=m.children.length),!this.check("copy_node",i,m,s,{core:!0,origin:o,is_multi:j&&j._id&&j._id!==this._id,is_foreign:!j||!j._id}))return
this.settings.core.error.call(this,this._data.core.last_error),!1;if(!(g=j?j.get_json(i,{no_id:!0,no_data:!0,no_state:!0}):i))return!1;if(!0===g.id&&delete
g.id,!(g=this._parse_model_from_json(g,m.id,m.parents.concat())))return!1;for(_=this.get_node(g),i&&i.state&&!1===i.state.loaded&&(_.state.loaded=!1),(h=[]).push(g),h=h.concat(_.children_d),this.trigger("model",{nodes:h,parent:m.id}),f=0,u=m.parents.length;f<u;f++)this._model.data[m.parents[f]].children_d=this._model.data[m.parents[f]].children_d.concat(h);for(h=[],f=0,u=m.children.length;f<u;f++)h[f>=s?f+1:f]=m.children[f];return
h[s]=_.id,m.children=h,m.children_d.push(_.id),m.children_d=m.children_d.concat(_.children_d),m.id===e.jstree.root&&(this._model.force_full_redraw=!0),this._model.force_full_redraw||this._node_changed(m.id),d||this.redraw(m.id===e.jstree.root),n&&n.call(this,_,m,s),this.trigger("copy_node",{node:_,original:i,parent:m.id,position:s,old_parent:p,old_position:j&&j._id&&p&&j._model.data[p]&&j._model.data[p].children?e.inArray(i.id,j._model.data[p].children):-1,is_multi:j&&j._id&&j._id!==this._id,is_foreign:!j||!j._id,old_instance:j,new_instance:this}),_.id},cut:function(t){if(t||(t=this._data.core.selected.concat()),e.isArray(t)||(t=[t]),!t.length)return!1;var
i,a,d,o=[];for(a=0,d=t.length;a<d;a++)(i=this.get_node(t[a]))&&i.id&&i.id!==e.jstree.root&&o.push(i);if(!o.length)return!1;r=o,n=this,s="move_node",this.trigger("cut",{node:t})},copy:function(t){if(t||(t=this._data.core.selected.concat()),e.isArray(t)||(t=[t]),!t.length)return!1;var
i,a,d,o=[];for(a=0,d=t.length;a<d;a++)(i=this.get_node(t[a]))&&i.id&&i.id!==e.jstree.root&&o.push(i);if(!o.length)return!1;r=o,n=this,s="copy_node",this.trigger("copy",{node:t})},get_buffer:function(){return{mode:s,node:r,inst:n}},can_paste:function(){return!1!==s&&!1!==r},paste:function(e,t){if(!((e=this.get_node(e))&&s&&s.match(/^(copy_node|move_node)$/)&&r))return!1;this[s](r,e,t,!1,!1,!1,n)&&this.trigger("paste",{parent:e.id,node:r,mode:s}),r=!1,s=!1,n=!1},clear_buffer:function(){r=!1,s=!1,n=!1,this.trigger("clear_buffer")},edit:function(t,i,r){var
s,n,a,d,l,c,h,_,f,u=!1;return!!(t=this.get_node(t))&&(this.check("edit",t,this.get_parent(t))?(f=t,i="string"==typeof
i?i:t.text,this.set_text(t,""),t=this._open_to(t),f.text=i,s=this._data.core.rtl,n=this.element.width(),this._data.core.focused=f.id,a=t.children(".jstree-anchor").focus(),d=e("<span>"),l=i,c=e("<div
/>",{css:{position:"absolute",top:"-200px",left:s?"0px":"-1000px",visibility:"hidden"}}).appendTo(o.body),h=e("<input
/>",{value:l,class:"jstree-rename-input",css:{padding:"0",border:"1px
solid
silver","box-sizing":"border-box",display:"inline-block",height:this._data.core.li_height+"px",lineHeight:this._data.core.li_height+"px",width:"150px"},blur:e.proxy(function(i){i.stopImmediatePropagation(),i.preventDefault();var
s,n=d.children(".jstree-rename-input").val(),o=this.settings.core.force_text;""===n&&(n=l),c.remove(),d.replaceWith(a),d.remove(),l=o?l:e("<div></div>").append(e.parseHTML(l)).html(),t=this.get_node(t),this.set_text(t,l),(s=!!this.rename_node(t,o?e("<div></div>").text(n).text():e("<div></div>").append(e.parseHTML(n)).html()))||this.set_text(t,l),this._data.core.focused=f.id,setTimeout(e.proxy(function(){var
e=this.get_node(f.id,!0);e.length&&(this._data.core.focused=f.id,e.children(".jstree-anchor").focus())},this),0),r&&r.call(this,f,s,u),h=null},this),keydown:function(e){var
t=e.which;27===t&&(u=!0,this.value=l),27!==t&&13!==t&&37!==t&&38!==t&&39!==t&&40!==t&&32!==t||e.stopImmediatePropagation(),27!==t&&13!==t||(e.preventDefault(),this.blur())},click:function(e){e.stopImmediatePropagation()},mousedown:function(e){e.stopImmediatePropagation()},keyup:function(e){h.width(Math.min(c.text("pW"+this.value).width(),n))},keypress:function(e){if(13===e.which)return!1}}),_={fontFamily:a.css("fontFamily")||"",fontSize:a.css("fontSize")||"",fontWeight:a.css("fontWeight")||"",fontStyle:a.css("fontStyle")||"",fontStretch:a.css("fontStretch")||"",fontVariant:a.css("fontVariant")||"",letterSpacing:a.css("letterSpacing")||"",wordSpacing:a.css("wordSpacing")||""},d.attr("class",a.attr("class")).append(a.contents().clone()).append(h),a.replaceWith(d),c.css(_),h.css(_).width(Math.min(c.text("pW"+h[0].value).width(),n))[0].select(),void
e(o).one("mousedown.jstree touchstart.jstree
dnd_start.vakata",function(t){h&&t.target!==h&&e(h).blur()})):(this.settings.core.error.call(this,this._data.core.last_error),!1))},set_theme:function(t,i){if(!t)return!1;if(!0===i){var
r=this.settings.core.themes.dir;r||(r=e.jstree.path+"/themes"),i=r+"/"+t+"/style.css"}i&&-1===e.inArray(i,a)&&(e("head").append('<link
rel="stylesheet" href="'+i+'"
type="text/css"
/>'),a.push(i)),this._data.core.themes.name&&this.element.removeClass("jstree-"+this._data.core.themes.name),this._data.core.themes.name=t,this.element.addClass("jstree-"+t),this.element[this.settings.core.themes.responsive?"addClass":"removeClass"]("jstree-"+t+"-responsive"),this.trigger("set_theme",{theme:t})},get_theme:function(){return
this._data.core.themes.name},set_theme_variant:function(e){this._data.core.themes.variant&&this.element.removeClass("jstree-"+this._data.core.themes.name+"-"+this._data.core.themes.variant),this._data.core.themes.variant=e,e&&this.element.addClass("jstree-"+this._data.core.themes.name+"-"+this._data.core.themes.variant)},get_theme_variant:function(){return
this._data.core.themes.variant},show_stripes:function(){this._data.core.themes.stripes=!0,this.get_container_ul().addClass("jstree-striped"),this.trigger("show_stripes")},hide_stripes:function(){this._data.core.themes.stripes=!1,this.get_container_ul().removeClass("jstree-striped"),this.trigger("hide_stripes")},toggle_stripes:function(){this._data.core.themes.stripes?this.hide_stripes():this.show_stripes()},show_dots:function(){this._data.core.themes.dots=!0,this.get_container_ul().removeClass("jstree-no-dots"),this.trigger("show_dots")},hide_dots:function(){this._data.core.themes.dots=!1,this.get_container_ul().addClass("jstree-no-dots"),this.trigger("hide_dots")},toggle_dots:function(){this._data.core.themes.dots?this.hide_dots():this.show_dots()},show_icons:function(){this._data.core.themes.icons=!0,this.get_container_ul().removeClass("jstree-no-icons"),this.trigger("show_icons")},hide_icons:function(){this._data.core.themes.icons=!1,this.get_container_ul().addClass("jstree-no-icons"),this.trigger("hide_icons")},toggle_icons:function(){this._data.core.themes.icons?this.hide_icons():this.show_icons()},show_ellipsis:function(){this._data.core.themes.ellipsis=!0,this.get_container_ul().addClass("jstree-ellipsis"),this.trigger("show_ellipsis")},hide_ellipsis:function(){this._data.core.themes.ellipsis=!1,this.get_container_ul().removeClass("jstree-ellipsis"),this.trigger("hide_ellipsis")},toggle_ellipsis:function(){this._data.core.themes.ellipsis?this.hide_ellipsis():this.show_ellipsis()},set_icon:function(i,r){var
s,n,a,d;if(e.isArray(i)){for(s=0,n=(i=i.slice()).length;s<n;s++)this.set_icon(i[s],r);return!0}return!(!(i=this.get_node(i))||i.id===e.jstree.root)&&(d=i.icon,i.icon=!0===r||null===r||r===t||""===r||r,a=this.get_node(i,!0).children(".jstree-anchor").children(".jstree-themeicon"),!1===r?(a.removeClass("jstree-themeicon-custom
"+d).css("background","").removeAttr("rel"),this.hide_icon(i)):!0===r||null===r||r===t||""===r?(a.removeClass("jstree-themeicon-custom
"+d).css("background","").removeAttr("rel"),!1===d&&this.show_icon(i)):-1===r.indexOf("/")&&-1===r.indexOf(".")?(a.removeClass(d).css("background",""),a.addClass(r+"
jstree-themeicon-custom").attr("rel",r),!1===d&&this.show_icon(i)):(a.removeClass(d).css("background",""),a.addClass("jstree-themeicon-custom").css("background","url('"+r+"')
center center
no-repeat").attr("rel",r),!1===d&&this.show_icon(i)),!0)},get_icon:function(t){return!(!(t=this.get_node(t))||t.id===e.jstree.root)&&t.icon},hide_icon:function(t){var
i,r;if(e.isArray(t)){for(i=0,r=(t=t.slice()).length;i<r;i++)this.hide_icon(t[i]);return!0}return!(!(t=this.get_node(t))||t===e.jstree.root)&&(t.icon=!1,this.get_node(t,!0).children(".jstree-anchor").children(".jstree-themeicon").addClass("jstree-themeicon-hidden"),!0)},show_icon:function(t){var
i,r,s;if(e.isArray(t)){for(i=0,r=(t=t.slice()).length;i<r;i++)this.show_icon(t[i]);return!0}return!(!(t=this.get_node(t))||t===e.jstree.root)&&(s=this.get_node(t,!0),t.icon=!s.length||s.children(".jstree-anchor").children(".jstree-themeicon").attr("rel"),t.icon||(t.icon=!0),s.children(".jstree-anchor").children(".jstree-themeicon").removeClass("jstree-themeicon-hidden"),!0)}},e.vakata={},e.vakata.attributes=function(t,i){t=e(t)[0];var
r=i?{}:[];return
t&&t.attributes&&e.each(t.attributes,function(t,s){-1===e.inArray(s.name.toLowerCase(),["style","contenteditable","hasfocus","tabindex"])&&null!==s.value&&""!==e.trim(s.value)&&(i?r[s.name]=s.value:r.push(s.name))}),r},e.vakata.array_unique=function(e){var
i,r,s=[],n={};for(i=0,r=e.length;i<r;i++)n[e[i]]===t&&(s.push(e[i]),n[e[i]]=!0);return
s},e.vakata.array_remove=function(e,t){return
e.splice(t,1),e},e.vakata.array_remove_item=function(t,i){var
r=e.inArray(i,t);return-1!==r?e.vakata.array_remove(t,r):t},e.vakata.array_filter=function(e,t,i,r,s){if(e.filter)return
e.filter(t,i);for(s in
r=[],e)~~s+""==s+""&&s>=0&&t.call(i,e[s],+s,e)&&r.push(e[s]);return
r}}});jstree/themes/index.html000064400000000054151175232460011327
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>jstree/themes/proton/30px.png000064400000014427151175232460012164
0ustar00�PNG
IHDRh��JbPLTE���������ffffff�����������������֙��������fff�����������������������������������fff������ffffff�����������������������fff������������fff���������������fffffffff������ffffff����ffffff������������������������������������������������������mmm��������������������������������www���������������������������������������������������������������봴��������������������������˼�������������������������������������������������������������������������������������������������������������������������������۬�������������̷��������fff�����賳���٠�������������������Ž����㣣���ϝ�������⸸�������������������ppp��ޟ�����������������������yyy�����������������������֧����������ʲ����ܬ����������˰����ڴ�������ǵ�������������ꄟL_�tRNS�`Ͽ@�0��@�����
�ľ��0`����P�⣪��p�
�����ϯ��P��p���������������ޱ������ڧ���㞪����ȼ���������ߵ�埨�����v�������պ���������-�ۡ���������������>�OmP���䞒��� IDATx��y\W���n醞�ϬC"Fɂ�EH͘Y�d��1��}��>&�ιs�={����
���"`p�U�V���$��MBS�]�UU7����"]����z���
�pP�����咪rE���:�e6�{pT���٣H�0V��&q����2E�2�vd��ƮH�1�ܶ�߃�Y�A�A�y��d�i�M�hŘ��uvK���*�R���5�rZ�����f�Z�.w-�k��Ī�Ͷ���u�l%�Ena�����d�ѱ�+ȩh)��E��}��0�\��*ZF��۰�09����2��
r����N.���A�{�2����~�B6-Z��FG��GtfE7@�٢��
�
�O�-B�ᢛ�hD#шF4��hD#шF4��E�kNɀ�F_�@䧧F���E4,��2Y�q
�0lq�~-�U��ݬ���
��hD��7����C���o�^��ev?�y����1����!#CD#шF4��hD#шF4��hDg\td;c�=,f���}��3D�=��w��C�Wل-d
��
�3,���%���lbER�B��j_t[���@#!��e��������%g1���l�f͜�Z��{��ש{X�=4���ȴ@����f2C��Le�%�f��+�!9�J��D�֙t�3�i�B�$_Ư:3[��۸Z�>W�\ҩ$��C�@*7��М��r�ٙg)�e�i���.�]��X0����Ҏ9I�KDn!x�<�q8��+i�2����*7��q�$-�bR�̢�n[�s��H}ޒ�l�9�#�s��D�6�Vj�r����Z��
R;K�Y�`,����blZ����1F�1�'y��"?pq��`sey�h>էMo�H���Q����Z�����BU����j_�%�y�ZA��}�N�w�J��w���o��%a>�i��zo�QK}e���QIf�v+ʉ�s?ڼ���#̿��n�K���j�l�=HWt�F�3�߹c����f��VT[��ݡ*�k��I�%�LQx���q�ٰ~�J�h��v������q�Y���c�6\���q�Y����]�}��2(��ң7���Ӷ���/�[4;��D��k�>���K��S�Ds"Z@�_����:����w0�F_kh�X�h}5ڻ���u��̙s-j�����ξ�V��D�om���ޯʶm����3�{�7
>�D��xS��]�z���n��O��iH�!Z�ho�������'��������Oh���D����~C��Ft*��
뽫�l�����g������D���kX�1�hݢ����DtzD+�F4���L���
��w�c�F���}�fd�hD#шF4��hD#шF4�=�9�����m�h��ȼ��RY��Q�/�M�y�l���m��F)ѻ�߲���K}�U&+���߿�!�A��4S[[4sE�O~�eY��>a�~]�
�B:t�m+���,��ʊi3��ð�zۘew��&��+�]QN�v�0�ar���45-��Xw�=��C�b�],���Qz
�JOn7�Ӧ:�
=��5MSߧ�Mox�[g���Y/BIlA�p�v�ƒ*�I�O�w5���h�����w�w���o�W���ӣ/K������o�=5|q�k����w.�6U[�s^�M�g���2��Z2��w���TK~���~���-�B��^U(�˺�i\����!-FA�\|&]�x�O�!O�\��������YS�2/��x�$�F�[8�Ҡ��[v�O�IK+��9��'�lC4/� S��ªg]+^^.;��'õS��y�D��E������]v�O����ċj[��_3T)G��H��|�,���J��h\���~3���[*��>l���.+�?�Op`�֣A��{��oy���f�J?̕�f��e���$]�h��z��E
�%v�����Y��a3?R������'��S,Z�{D�mX�p��*\�w�>9��G�Y�(a[{�<�ttf�g���o-�_�\�#\���۵AO�:9>!u�^�%cG��o�}�G3E8`}TJ�IK����a�>�.Wx^�=R�ñ#?'D�y�q!Z�s�,D-Z�gD��3��a|X�gDk��ψN�gD�ؿ��lψ����]�zF��H2���Y�m��3�j�U=��9���L�L���ƛ6�s����8ִ��s\�8��M�9�E�sy2~�ݰu,�-Ze��T�ܕ�h�jt̴��[W!ڠ3��y�DK�:v��V��E��~�5�j��xm��0�"G/�
��H�9$zq~%���ޥ�=��[�h��6��5w�X>��Ԧ����}��':������#:��g�ѺE'6}�3�����(ψ6D���ўm�h5�c<#�
��wxm��W�/km��8��
�(�cL�_�h�D�2��p �Ɖ��V[
�hEGL�.yD����;�w�>ܫ��T����R�{e3Wd�)#w�+^�=c��}�[�D���p����
�Z��X2�B(�D�ٰ\
�k�o��t�oKM$��IqϑMa�ˌ�Pҕ��.R�>ج4�r��h����z�;/:�"=��6/ϪU�w�Gߣ�[����F��>�^�|�N�������c���eutv2<J%��/�\���Ey�D"cf�>�m�*�T}�-�u��_w�̳d�Ԥ#�I��5�{U�T4~,��gq�-]6I#��gx�)��Y:�2�`f�OҞбtҲ�(�A4�`(��R��"�%�Y��wʦ��i3����DΟA����'c���f�9�ўn���8�@�DO5h=�Ǫ�Gd�ea_��D��J�p��y(Av��"���.Gؖ�YJޝ�<,C��ک㼻eH���h��ݢ�V!ш6C�#'w$�dK�
�+�j�;�
�:D�ߙz���ѺE��2�Գ�:E�6i@�Nч5N�"Z��Z硷#Z���ZE�
шF4��hD#шF4��hD#шF4��hD#шF4��hD#шF�颏
Z��]ZEw!Z�hmˣ}�V���G
D#Z\tol�@��l�fJ���]'5x��-�Z�7�q��O��'n{�l$j"��`ǘGZ�=n+�o5��'�G"�Eb!
�QYv�gEB��D�)(�Ҿ
?��oi��nTh�'q�;�ڃ�|>�R����紎EYH��,*�LC��'i&6�L���S8Ou V�Y��P�Č���*7n���Jʩ�F�Q��Ϸ�8<|1B�O���*�;��������}���?!����~�?X� �lϟ��K����'�P__<���o=j�c�����W�6�=7���g�j
���1�`���QSwBS�S݁��c�����4m�碚�{�m��K�l��"N��͇ڃ?r�R]�7ѿ�su�q���
�VcsaNJ��E/_��%�d���+k�:�r����]�@k�R3n4BtQq�=���{o�:�ڛ��G�y��zg6���y�k�q�5_:���v�!�;my��/��c�m}���3F�Ə�+V����N���6LtBn�����Bw�l��o��x��"���
���=}���+��4M�����FSS�ֹ?�1�-z��g�h�w<8w<���C�������'ze���{���~��<��#��?��':o�qq���?����������w�87m�����5kx.~�q`ZDt��}�=4 �mM����:���1�'$z��g�
V��co�M�kQ�9���Q@t�/z�8��/]�dɒ�4�dɦM��K,�&�#!�W,x���D�³_[�0yetAMr�Wz�k>��B��\�W��]���旧
�~͏hm��Vzk�n~nPQ�.|��!��-�4��E��v8�lUZ��e1���?��c��z�O%���ӽ��|�X�_w���-KJ��A�mk|5���-�6=�_�`�~�+u3�*t�CO�f��6�g߹�'
/�8�������ł3�v,4����Z�����J�[7_Y/�y���;2`g��m�����`�n�}r�XCXT��M���Fѽ����ӷ��T+��=ZsJZ�胝��Հr�D�Wꊄ��[�9��-͢[[��OQ:��S�B����=NC(
z��3�U,n��~hj��PHt�/��(�#O�թ0�}��/�7�HlY���2j���}5����φ�����D���57~����P��P�h��Uk�7$\3���f��?}�=�"���
����9��\�q��+Sr�ڍ�~�;ݧ;hE( �:
]TE3|05*�K����QZ
f��pz�4���C��ra�e���p�ECW��a*
���9�$����ty�t�<c:]�1�.��vW�8{�YP��]�F�v�Γ�U'�.[�����\�v�ݶT��E���8�Ү~���0ωM��\0mOt|�mԇ�jg��`��Uϊ��V94��ȥ��=�p�~�8�q��ܴݬ�:�p��q���t��]��ܪ
�(*r�s��Ov(�M�z��Co�y�y�}��՝Գ�f!=�%8�5҉�H�Ϣ��E��W���N�Cq����
H�M۳�\�H��ܝIϪU��x�X�s���='1�e���N�gQ����tZ<'i���ٜ��B�}��?PՖ6��M[ݳ�8w�<k5m}�*��~M�W`K��roWʴ�K������-���9�i�-��
0Y�M+��<��r뽕u�����0�)2���A!C��<lJ��=S�ߌy�gO�.U������i:鐯
S�]�5�!8��>ϩ��<�b:Þs�t�=�i3='�@[�;m���0=A<g�i3=�B��ÝŦM�l�H�rfMgij�n�5�f�Ė8'��6n��d�Q-K��%4]�����}P��-���>�&D��ۛ�,3e�D4]���{D�C��6{X�1�;�Uw*{28�>�{�Iuw�=���[��Ϟ�j�Ax
��y{4ִ=Uo�Ҟ�M��-�h�T�*�{V3������ذ;�֖lS��M���$�\����e�L�ݷ;�'Y���cSY� �CV����szL��l����`��C���~k���8�IEND�B`�jstree/themes/proton/32px.png000064400000006405151175232460012163
0ustar00�PNG
IHDR����"T5PLTEfff������fff������������������������fff��������ܙ�����������fff���ffffff���fffffffffffffffffffff���fff��������������fff��������姧������������������������������������ŵ����������ß��������������������������fff��������ж�������������܌��������������������ppp�����������������������Ͻ��������yyy��ʩ������h�sEtRNS@ϟ���@0`�
���pP��0�
`��P�������p���W���������������s��
:IDATx���i{ڸ`'Ԁ��-I�5]g���̜}?ǯLI K��Yڞ���X�m,g, d;y�/亚7��]�62�T�͛l���d��@@@@D@@@@DL��,犜J��f��i6�f�j����>Q���Q��5hQt*�7��u��O?e�| �5@��_�#���Qa�U�^�Wn��}y�X�@��?|�i�W�w�j��g���OT[y}�h�/���n4o��Y�r��w
��3`?�= *���HQ�{wG��,�/A
��w
��G��v�����}w7b��8(�3Xb��-��5�+�@��_�����H��}�芙@v��,=��;�h���[�~{}%�"�����콠zB�=@�/����eL��Kx�8�I�c�ۭ��� z��Y���Kȹ��p<�3e��ޥ|`&��`;�c��o~:2� ������ID���������1 �h�|#�_�d�y��H@{�;���
U���!T8l�t����Ի���*��/\l~��t���^o��Y����w���/
g��5ԧd�O�yD�@I��)�o��P��[,��u$~'�nF�&��\���lL�
${�O
����?�[@�}'������;�Z��e`�z���%<�;��k��/������/ `7�+u?`���ژ�u�-����+&����D5n}7�wc�oFn�ż�/y��G�ڭ�(�����I��
��C�S���[Q��)����_j8y�����z�$�|v<�oq2��'�P��C�|��{��D�j��g���H?�;������j>��
r�ϔ
�M��nAY@�Z.,�a�W='�|������',�e!��i*��0|�X" ���Vo��py'I4�
��""� � �
����������������������������
"����{�oq����~��'�G�f\��D�ю����Oؿ=���kp͉�
�O��}z��~����8w��Z�a���%o���C��Xy����qW���{c�Zʿ��\q!���z�]�6�͞�N_se=��
_D�3�u��+��p���˿�Ӵ���~���Nr��Uw���J��Q�ݨ��z����[�Q�G�D��~�E�:%]���P�o���>�m��௬�����/v�3X":jq���k�W݅�o�\7����u��/���˥"@�߶�)�f�X��N���Ȃ�J���`
8WP�{`��%�.��J���=����Ov�j9�mw�}oGD���oix�����R��x�d�+���3��=�-��I@���'�>S�_�"8��h�M�ہ3����d�O����Q��\�\�'��FW�L�� �o��;�6�����7v�z?�8l�t��8�I��+��\�8�� ��x���ux%��z7Ì���^��г�1���v�Ư_ �N`���S8
>p8�;k�#�
�� <��?p2��ba��u$pR�f��h��!���������g�@����-���H���0����
j�8����\�ԟ�P+�����l�Ro�a���ưl< �;����/����8��<<�����Rvֽ��|�ľ�X�^1�ɴ�b��o�T��p��Q��ݸ�g�>��,f����t�[X%�[�4ի�6����#�j�Ȱ|�|*���ע�?^8�W�{�D��M7t�+�����zv�t���j�?�ʗO�s'�9$2E���e}��)�U����މ�f���wDU<��
���Q-�0u�+�l,n�\�U��(
�Wz�7���<�^��5�.���b�d��'k���py'I4�
��""� � � ��""� � �
��""� � � ��""� �
�r]ZxC������" d���:��D�؋}T4f�.�HH�(W�1@���5��b��|��Q@���sN��N�l�I.�e�f�mվ�����\r�:;�c��YqE
�t-�&�{b$;K&�`�<�U��+f�]��&P�R�N/��'�ҵL1�4�f�?��g�@ן�ڷj���`��܅r&���08�"��'P�_p�nѵ^}oS��Y��������g��������u�+�$�����a�����?w
�^
����@{ok��D����;m����<��<�&X���]xY
��@�;K(}
d+�T:��
��Y�]�_�_^VX��`�a��'%pI�0��y�zR���`��*���4�|��x��.�T\��8���sb�qJ}7��E'�t�g����@9��7#L>%�zι�F�5�^�>�2S��yw&pS���X�����C�g�F
��J}t0�4�������
�c��"�%b(Lx�%�g%?�2����W����3�����c'`ܞ�����Z��gU��G��[��/y����$
�Y���^������O�
��p��@{��1
��?���0�!up=�o��@��CI�;RP��\�ǯ� @DA@@DDA@@D���?�]粯&IEND�B`�jstree/themes/proton/index.html000064400000000054151175232460012650
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>jstree/themes/proton/style.min.css000064400000063411151175232460013315
0ustar00.jstree-node,.jstree-children,.jstree-container-ul{display:block;margin:0;padding:0;list-style-type:none;list-style-image:none}.jstree-node{white-space:nowrap}.jstree-anchor{display:inline-block;color:#333;white-space:nowrap;padding:0
4px 0
1px;margin:0;vertical-align:top}.jstree-anchor:focus{outline:0}.jstree-anchor,.jstree-anchor:link,.jstree-anchor:visited,.jstree-anchor:hover,.jstree-anchor:active{text-decoration:none;color:inherit}.jstree-icon{display:inline-block;text-decoration:none;margin:0;padding:0;vertical-align:top;text-align:center}.jstree-icon:empty{display:inline-block;text-decoration:none;margin:0;padding:0;vertical-align:top;text-align:center}.jstree-ocl{cursor:pointer}.jstree-leaf>.jstree-ocl{cursor:default}.jstree
.jstree-open>.jstree-children{display:block}.jstree
.jstree-closed>.jstree-children,.jstree
.jstree-leaf>.jstree-children{display:none}.jstree-anchor>.jstree-themeicon{margin-right:2px}.jstree-no-icons
.jstree-themeicon,.jstree-anchor>.jstree-themeicon-hidden{display:none}.jstree-rtl
.jstree-anchor{padding:0 1px 0 4px}.jstree-rtl
.jstree-anchor>.jstree-themeicon{margin-left:2px;margin-right:0}.jstree-rtl
.jstree-node{margin-left:0}.jstree-rtl
.jstree-container-ul>.jstree-node{margin-right:0}.jstree-wholerow-ul{position:relative;display:inline-block;min-width:100%}.jstree-wholerow-ul
.jstree-leaf>.jstree-ocl{cursor:pointer}.jstree-wholerow-ul
.jstree-anchor,.jstree-wholerow-ul
.jstree-icon{position:relative}.jstree-wholerow-ul
.jstree-wholerow{width:100%;cursor:pointer;position:absolute;left:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.vakata-context{display:none}.vakata-context,.vakata-context
ul{margin:0;padding:2px;position:absolute;background:#f5f5f5;border:1px
solid #979797;-moz-box-shadow:5px 5px 4px -4px #666;-webkit-box-shadow:2px
2px 2px #999;box-shadow:2px 2px 2px #999}.vakata-context
ul{list-style:none;left:100%;margin-top:-2.7em;margin-left:-4px}.vakata-context
.vakata-context-right
ul{left:auto;right:100%;margin-left:auto;margin-right:-4px}.vakata-context
li{list-style:none;display:inline}.vakata-context
li>a{display:block;padding:0
2em;text-decoration:none;width:auto;color:#000;white-space:nowrap;line-height:2.4em;-moz-text-shadow:1px
1px 0 #fff;-webkit-text-shadow:1px 1px 0 #fff;text-shadow:1px 1px 0
#fff;-moz-border-radius:1px;-webkit-border-radius:1px;border-radius:1px}.vakata-context
li>a:hover{position:relative;background-color:#e8eff7;-moz-box-shadow:0
0 2px #0a6aa1;-webkit-box-shadow:0 0 2px #0a6aa1;box-shadow:0 0 2px
#0a6aa1}.vakata-context
li>a.vakata-context-parent{background-image:url(data:image/gif;base64,R0lGODlhCwAHAIAAACgoKP///yH5BAEAAAEALAAAAAALAAcAAAIORI4JlrqN1oMSnmmZDQUAOw==);background-position:right
center;background-repeat:no-repeat}.vakata-context
li>a:focus{outline:0}.vakata-context
.vakata-context-hover>a{position:relative;background-color:#e8eff7;-moz-box-shadow:0
0 2px #0a6aa1;-webkit-box-shadow:0 0 2px #0a6aa1;box-shadow:0 0 2px
#0a6aa1}.vakata-context .vakata-context-separator>a,.vakata-context
.vakata-context-separator>a:hover{background:#fff;border:0;border-top:1px
solid #e2e3e3;height:1px;min-height:1px;max-height:1px;padding:0;margin:0 0
0 2.4em;border-left:1px solid #e0e0e0;-moz-text-shadow:0 0 0
transparent;-webkit-text-shadow:0 0 0 transparent;text-shadow:0 0 0
transparent;-moz-box-shadow:0 0 0 transparent;-webkit-box-shadow:0 0 0
transparent;box-shadow:0 0 0
transparent;-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.vakata-context
.vakata-contextmenu-disabled a,.vakata-context .vakata-contextmenu-disabled
a:hover{color:silver;background-color:transparent;border:0;box-shadow:0 0
0}.vakata-context
li>a>i{text-decoration:none;display:inline-block;width:2.4em;height:2.4em;background:0
0;margin:0 0 0
-2em;vertical-align:top;text-align:center;line-height:2.4em}.vakata-context
li>a>i:empty{width:2.4em;line-height:2.4em}.vakata-context li>a
.vakata-contextmenu-sep{display:inline-block;width:1px;height:2.4em;background:#fff;margin:0
.5em 0 0;border-left:1px solid #e2e3e3}.vakata-context
.vakata-contextmenu-shortcut{font-size:.8em;color:silver;opacity:.5;display:none}.vakata-context-rtl
ul{left:auto;right:100%;margin-left:auto;margin-right:-4px}.vakata-context-rtl
li>a.vakata-context-parent{background-image:url(data:image/gif;base64,R0lGODlhCwAHAIAAACgoKP///yH5BAEAAAEALAAAAAALAAcAAAINjI+AC7rWHIsPtmoxLAA7);background-position:left
center;background-repeat:no-repeat}.vakata-context-rtl
.vakata-context-separator>a{margin:0 2.4em 0
0;border-left:0;border-right:1px solid #e2e3e3}.vakata-context-rtl
.vakata-context-left
ul{right:auto;left:100%;margin-left:-4px;margin-right:auto}.vakata-context-rtl
li>a>i{margin:0 -2em 0 0}.vakata-context-rtl li>a
.vakata-contextmenu-sep{margin:0 0 0
.5em;border-left-color:#fff;background:#e2e3e3}#jstree-marker{position:absolute;top:0;left:0;margin:-5px
0 0 0;padding:0;border-right:0;border-top:5px solid
transparent;border-bottom:5px solid transparent;border-left:5px
solid;width:0;height:0;font-size:0;line-height:0}#jstree-dnd{line-height:16px;margin:0;padding:4px}#jstree-dnd
.jstree-icon,#jstree-dnd
.jstree-copy{display:inline-block;text-decoration:none;margin:0 2px 0
0;padding:0;width:16px;height:16px}#jstree-dnd
.jstree-ok{background:green}#jstree-dnd
.jstree-er{background:red}#jstree-dnd .jstree-copy{margin:0
2px}.jstree-proton .jstree-node,.jstree-proton
.jstree-icon{background-repeat:no-repeat;background-color:transparent}.jstree-proton
.jstree-anchor,.jstree-proton .jstree-wholerow{transition:background-color
.15s,box-shadow .15s,color .15s}.jstree-proton
.jstree-hovered{background:#76b6ec;color:#fff;border-radius:3px;box-shadow:inset
0 0 1px #76b6ec}.jstree-proton
.jstree-clicked{background:#3392e3;color:#fff;border-radius:3px;box-shadow:inset
0 0 1px #3392e3}.jstree-proton .jstree-no-icons
.jstree-anchor>.jstree-themeicon{display:none}.jstree-proton
.jstree-disabled{background:0 0;color:#666}.jstree-proton
.jstree-disabled.jstree-hovered{background:0
0;box-shadow:none}.jstree-proton
.jstree-disabled.jstree-clicked{background:#efefef}.jstree-proton
.jstree-disabled>.jstree-icon{opacity:.8;filter:url("data:image/svg+xml;utf8,<svg
xmlns=\'http://www.w3.org/2000/svg\'><filter
id=\'jstree-grayscale\'><feColorMatrix
type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333
0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1
0\'/></filter></svg>#jstree-grayscale");-webkit-filter:grayscale(100%)}.jstree-proton
.jstree-search{font-style:italic;color:#8b0000;font-weight:700}.jstree-proton
.jstree-no-checkboxes
.jstree-checkbox{display:none!important}.jstree-proton.jstree-checkbox-no-clicked
.jstree-clicked{background:0
0;color:inherit;box-shadow:none}.jstree-proton.jstree-checkbox-no-clicked
.jstree-clicked.jstree-hovered{background:#76b6ec;color:#fff}.jstree-proton.jstree-checkbox-no-clicked>.jstree-wholerow-ul
.jstree-wholerow-clicked{background:0
0;color:inherit}.jstree-proton.jstree-checkbox-no-clicked>.jstree-wholerow-ul
.jstree-wholerow-clicked.jstree-wholerow-hovered{background:#76b6ec;color:#fff}.jstree-proton>.jstree-striped{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAkCAMAAAB/qqA+AAAABlBMVEUAAAAAAAClZ7nPAAAAAnRSTlMNAMM9s3UAAAAXSURBVHjajcEBAQAAAIKg/H/aCQZ70AUBjAATb6YPDgAAAABJRU5ErkJggg==)
left top repeat}.jstree-proton>.jstree-wholerow-ul
.jstree-hovered,.jstree-proton>.jstree-wholerow-ul
.jstree-clicked{background:0
0;box-shadow:none;border-radius:0}.jstree-proton
.jstree-wholerow{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.jstree-proton
.jstree-wholerow-hovered{background:#76b6ec}.jstree-proton
.jstree-wholerow-clicked{background:#3392e3;background:-moz-linear-gradient(top,#3392e3
0,#3392e3 100%);background:-webkit-gradient(linear,left top,left
bottom,color-stop(0,#3392e3),color-stop(100%,#3392e3));background:-webkit-linear-gradient(top,#3392e3
0,#3392e3 100%);background:-o-linear-gradient(top,#3392e3 0,#3392e3
100%);background:-ms-linear-gradient(top,#3392e3 0,#3392e3
100%);background:linear-gradient(to bottom,#3392e3 0,#3392e3
100%)}.jstree-proton
.jstree-node{min-height:22px;line-height:22px;margin-left:22px;min-width:22px}.jstree-proton
.jstree-anchor{line-height:22px;margin:1px 0 2px;height:22px}.jstree-proton
.jstree-icon{width:22px;height:22px;line-height:22px}.jstree-proton
.jstree-icon:empty{width:22px;height:22px;line-height:22px}.jstree-proton.jstree-rtl
.jstree-node{margin-right:22px}.jstree-proton
.jstree-wholerow{height:22px}.jstree-proton .jstree-node,.jstree-proton
.jstree-icon{background-size:320px
96px;background-image:url(32px.png)}.jstree-proton
.jstree-node{background-position:-293px
-5px;background-repeat:repeat-y}.jstree-proton .jstree-last{background:0
0}.jstree-proton .jstree-open>.jstree-ocl{background-position:-133px
-5px}.jstree-proton
.jstree-closed>.jstree-ocl{background-position:-101px
-5px}.jstree-proton .jstree-leaf>.jstree-ocl{background-position:-69px
-5px}.jstree-proton .jstree-themeicon{background-position:-261px
-7px}.jstree-proton>.jstree-no-dots
.jstree-node,.jstree-proton>.jstree-no-dots
.jstree-leaf>.jstree-ocl{background:0
0}.jstree-proton>.jstree-no-dots
.jstree-open>.jstree-ocl{background-position:-37px
-5px}.jstree-proton>.jstree-no-dots
.jstree-closed>.jstree-ocl{background-position:-5px -5px}.jstree-proton
.jstree-disabled{background:0 0}.jstree-proton
.jstree-disabled.jstree-hovered{background:0 0}.jstree-proton
.jstree-disabled.jstree-clicked{background:#efefef}.jstree-proton
.jstree-checkbox{background-position:-165px -5px}.jstree-proton
.jstree-checkbox:hover{background-position:-165px
-37px}.jstree-proton.jstree-checkbox-selection
.jstree-clicked>.jstree-checkbox,.jstree-proton
.jstree-checked>.jstree-checkbox{background-position:-229px
-5px}.jstree-proton.jstree-checkbox-selection
.jstree-clicked>.jstree-checkbox:hover,.jstree-proton
.jstree-checked>.jstree-checkbox:hover{background-position:-229px
-37px}.jstree-proton
.jstree-anchor>.jstree-undetermined{background-position:-197px
-5px}.jstree-proton
.jstree-anchor>.jstree-undetermined:hover{background-position:-197px
-37px}.jstree-proton>.jstree-striped{background-size:auto
44px}.jstree-proton.jstree-rtl .jstree-node{background-size:320px
96px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==);background-position:100%
1px;background-repeat:repeat-y}.jstree-proton.jstree-rtl
.jstree-last{background:0 0}.jstree-proton.jstree-rtl
.jstree-open>.jstree-ocl{background-position:-133px
-37px}.jstree-proton.jstree-rtl
.jstree-closed>.jstree-ocl{background-position:-101px
-37px}.jstree-proton.jstree-rtl
.jstree-leaf>.jstree-ocl{background-position:-69px
-37px}.jstree-proton.jstree-rtl>.jstree-no-dots
.jstree-node,.jstree-proton.jstree-rtl>.jstree-no-dots
.jstree-leaf>.jstree-ocl{background:0
0}.jstree-proton.jstree-rtl>.jstree-no-dots
.jstree-open>.jstree-ocl{background-position:-37px
-37px}.jstree-proton.jstree-rtl>.jstree-no-dots
.jstree-closed>.jstree-ocl{background-position:-5px -37px}.jstree-proton
.jstree-themeicon-custom{background-color:transparent;background-size:320px
96px;background-image:none;background-position:0
0}.jstree-proton>.jstree-container-ul
.jstree-loading>.jstree-ocl{background:url(throbber.gif) center center
no-repeat}.jstree-proton .jstree-file{background:url(32px.png) -101px -69px
no-repeat}.jstree-proton .jstree-folder{background:url(32px.png) -261px
-5px
no-repeat}.jstree-proton>.jstree-container-ul>.jstree-node{margin-left:0;margin-right:0}#jstree-dnd.jstree-proton{line-height:22px;padding:0
4px}#jstree-dnd.jstree-proton .jstree-ok,#jstree-dnd.jstree-proton
.jstree-er{background-size:320px
96px;background-image:url(32px.png);background-repeat:no-repeat;background-color:transparent}#jstree-dnd.jstree-proton
i{background:0
0;width:22px;height:22px;line-height:22px}#jstree-dnd.jstree-proton
.jstree-ok{background-position:-5px -69px}#jstree-dnd.jstree-proton
.jstree-er{background-position:-37px -69px}.jstree-proton.jstree-rtl
.jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==)}.jstree-proton.jstree-rtl
.jstree-last{background:0 0}.jstree-proton-small
.jstree-node{min-height:18px;line-height:18px;margin-left:18px;min-width:18px}.jstree-proton-small
.jstree-anchor{line-height:18px;margin:1px 0
2px;height:18px}.jstree-proton-small
.jstree-icon{width:18px;height:18px;line-height:18px}.jstree-proton-small
.jstree-icon:empty{width:18px;height:18px;line-height:18px}.jstree-proton-small.jstree-rtl
.jstree-node{margin-right:18px}.jstree-proton-small
.jstree-wholerow{height:18px}.jstree-proton-small
.jstree-node,.jstree-proton-small .jstree-icon{background-size:320px
96px;background-image:url(32px.png)}.jstree-proton-small
.jstree-node{background-position:-295px
-7px;background-repeat:repeat-y}.jstree-proton-small
.jstree-last{background:0 0}.jstree-proton-small
.jstree-open>.jstree-ocl{background-position:-135px
-7px}.jstree-proton-small
.jstree-closed>.jstree-ocl{background-position:-103px
-7px}.jstree-proton-small
.jstree-leaf>.jstree-ocl{background-position:-71px
-7px}.jstree-proton-small .jstree-themeicon{background-position:-263px
-9px}.jstree-proton-small>.jstree-no-dots
.jstree-node,.jstree-proton-small>.jstree-no-dots
.jstree-leaf>.jstree-ocl{background:0
0}.jstree-proton-small>.jstree-no-dots
.jstree-open>.jstree-ocl{background-position:-39px
-7px}.jstree-proton-small>.jstree-no-dots
.jstree-closed>.jstree-ocl{background-position:-7px
-7px}.jstree-proton-small .jstree-disabled{background:0
0}.jstree-proton-small .jstree-disabled.jstree-hovered{background:0
0}.jstree-proton-small
.jstree-disabled.jstree-clicked{background:#efefef}.jstree-proton-small
.jstree-checkbox{background-position:-167px -7px}.jstree-proton-small
.jstree-checkbox:hover{background-position:-167px
-39px}.jstree-proton-small.jstree-checkbox-selection
.jstree-clicked>.jstree-checkbox,.jstree-proton-small
.jstree-checked>.jstree-checkbox{background-position:-231px
-7px}.jstree-proton-small.jstree-checkbox-selection
.jstree-clicked>.jstree-checkbox:hover,.jstree-proton-small
.jstree-checked>.jstree-checkbox:hover{background-position:-231px
-39px}.jstree-proton-small
.jstree-anchor>.jstree-undetermined{background-position:-199px
-7px}.jstree-proton-small
.jstree-anchor>.jstree-undetermined:hover{background-position:-199px
-39px}.jstree-proton-small>.jstree-striped{background-size:auto
36px}.jstree-proton-small.jstree-rtl .jstree-node{background-size:320px
96px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==);background-position:100%
1px;background-repeat:repeat-y}.jstree-proton-small.jstree-rtl
.jstree-last{background:0 0}.jstree-proton-small.jstree-rtl
.jstree-open>.jstree-ocl{background-position:-135px
-39px}.jstree-proton-small.jstree-rtl
.jstree-closed>.jstree-ocl{background-position:-103px
-39px}.jstree-proton-small.jstree-rtl
.jstree-leaf>.jstree-ocl{background-position:-71px
-39px}.jstree-proton-small.jstree-rtl>.jstree-no-dots
.jstree-node,.jstree-proton-small.jstree-rtl>.jstree-no-dots
.jstree-leaf>.jstree-ocl{background:0
0}.jstree-proton-small.jstree-rtl>.jstree-no-dots
.jstree-open>.jstree-ocl{background-position:-39px
-39px}.jstree-proton-small.jstree-rtl>.jstree-no-dots
.jstree-closed>.jstree-ocl{background-position:-7px
-39px}.jstree-proton-small
.jstree-themeicon-custom{background-color:transparent;background-size:320px
96px;background-image:none;background-position:0
0}.jstree-proton-small>.jstree-container-ul
.jstree-loading>.jstree-ocl{background:url(throbber.gif) center center
no-repeat}.jstree-proton-small .jstree-file{background:url(32px.png) -103px
-71px no-repeat}.jstree-proton-small
.jstree-folder{background:url(32px.png) -263px -7px
no-repeat}.jstree-proton-small>.jstree-container-ul>.jstree-node{margin-left:0;margin-right:0}#jstree-dnd.jstree-proton-small{line-height:18px;padding:0
4px}#jstree-dnd.jstree-proton-small
.jstree-ok,#jstree-dnd.jstree-proton-small .jstree-er{background-size:320px
96px;background-image:url(32px.png);background-repeat:no-repeat;background-color:transparent}#jstree-dnd.jstree-proton-small
i{background:0
0;width:18px;height:18px;line-height:18px}#jstree-dnd.jstree-proton-small
.jstree-ok{background-position:-7px -71px}#jstree-dnd.jstree-proton-small
.jstree-er{background-position:-39px -71px}.jstree-proton-small.jstree-rtl
.jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAACAQMAAABv1h6PAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMHBgAAiABBI4gz9AAAAABJRU5ErkJggg==)}.jstree-proton-small.jstree-rtl
.jstree-last{background:0 0}.jstree-proton-large
.jstree-node{min-height:32px;line-height:32px;margin-left:32px;min-width:32px}.jstree-proton-large
.jstree-anchor{line-height:32px;margin:1px 0
2px;height:32px}.jstree-proton-large
.jstree-icon{width:32px;height:32px;line-height:32px}.jstree-proton-large
.jstree-icon:empty{width:32px;height:32px;line-height:32px}.jstree-proton-large.jstree-rtl
.jstree-node{margin-right:32px}.jstree-proton-large
.jstree-wholerow{height:32px}.jstree-proton-large
.jstree-node,.jstree-proton-large .jstree-icon{background-size:320px
96px;background-image:url(32px.png)}.jstree-proton-large
.jstree-node{background-position:-288px
0;background-repeat:repeat-y}.jstree-proton-large .jstree-last{background:0
0}.jstree-proton-large
.jstree-open>.jstree-ocl{background-position:-128px
0}.jstree-proton-large
.jstree-closed>.jstree-ocl{background-position:-96px
0}.jstree-proton-large
.jstree-leaf>.jstree-ocl{background-position:-64px
0}.jstree-proton-large .jstree-themeicon{background-position:-256px
-2px}.jstree-proton-large>.jstree-no-dots
.jstree-node,.jstree-proton-large>.jstree-no-dots
.jstree-leaf>.jstree-ocl{background:0
0}.jstree-proton-large>.jstree-no-dots
.jstree-open>.jstree-ocl{background-position:-32px
0}.jstree-proton-large>.jstree-no-dots
.jstree-closed>.jstree-ocl{background-position:0 0}.jstree-proton-large
.jstree-disabled{background:0 0}.jstree-proton-large
.jstree-disabled.jstree-hovered{background:0 0}.jstree-proton-large
.jstree-disabled.jstree-clicked{background:#efefef}.jstree-proton-large
.jstree-checkbox{background-position:-160px 0}.jstree-proton-large
.jstree-checkbox:hover{background-position:-160px
-32px}.jstree-proton-large.jstree-checkbox-selection
.jstree-clicked>.jstree-checkbox,.jstree-proton-large
.jstree-checked>.jstree-checkbox{background-position:-224px
0}.jstree-proton-large.jstree-checkbox-selection
.jstree-clicked>.jstree-checkbox:hover,.jstree-proton-large
.jstree-checked>.jstree-checkbox:hover{background-position:-224px
-32px}.jstree-proton-large
.jstree-anchor>.jstree-undetermined{background-position:-192px
0}.jstree-proton-large
.jstree-anchor>.jstree-undetermined:hover{background-position:-192px
-32px}.jstree-proton-large>.jstree-striped{background-size:auto
64px}.jstree-proton-large.jstree-rtl .jstree-node{background-size:320px
96px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==);background-position:100%
1px;background-repeat:repeat-y}.jstree-proton-large.jstree-rtl
.jstree-last{background:0 0}.jstree-proton-large.jstree-rtl
.jstree-open>.jstree-ocl{background-position:-128px
-32px}.jstree-proton-large.jstree-rtl
.jstree-closed>.jstree-ocl{background-position:-96px
-32px}.jstree-proton-large.jstree-rtl
.jstree-leaf>.jstree-ocl{background-position:-64px
-32px}.jstree-proton-large.jstree-rtl>.jstree-no-dots
.jstree-node,.jstree-proton-large.jstree-rtl>.jstree-no-dots
.jstree-leaf>.jstree-ocl{background:0
0}.jstree-proton-large.jstree-rtl>.jstree-no-dots
.jstree-open>.jstree-ocl{background-position:-32px
-32px}.jstree-proton-large.jstree-rtl>.jstree-no-dots
.jstree-closed>.jstree-ocl{background-position:0
-32px}.jstree-proton-large
.jstree-themeicon-custom{background-color:transparent;background-size:320px
96px;background-image:none;background-position:0
0}.jstree-proton-large>.jstree-container-ul
.jstree-loading>.jstree-ocl{background:url(throbber.gif) center center
no-repeat}.jstree-proton-large .jstree-file{background:url(32px.png) -96px
-64px no-repeat}.jstree-proton-large
.jstree-folder{background:url(32px.png) -256px 0
no-repeat}.jstree-proton-large>.jstree-container-ul>.jstree-node{margin-left:0;margin-right:0}#jstree-dnd.jstree-proton-large{line-height:32px;padding:0
4px}#jstree-dnd.jstree-proton-large
.jstree-ok,#jstree-dnd.jstree-proton-large .jstree-er{background-size:320px
96px;background-image:url(32px.png);background-repeat:no-repeat;background-color:transparent}#jstree-dnd.jstree-proton-large
i{background:0
0;width:32px;height:32px;line-height:32px}#jstree-dnd.jstree-proton-large
.jstree-ok{background-position:0 -64px}#jstree-dnd.jstree-proton-large
.jstree-er{background-position:-32px -64px}.jstree-proton-large.jstree-rtl
.jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAACAQMAAAAD0EyKAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjgIIGBgABCgCBvVLXcAAAAABJRU5ErkJggg==)}.jstree-proton-large.jstree-rtl
.jstree-last{background:0 0}@media
(max-width:768px){#jstree-dnd.jstree-dnd-responsive{line-height:30px;font-weight:700;font-size:1.1em;text-shadow:1px
1px #fff}#jstree-dnd.jstree-dnd-responsive>i{background:0
0;width:30px;height:30px}#jstree-dnd.jstree-dnd-responsive>.jstree-ok{background-image:url(30px.png);background-position:0
-150px;background-size:90px
180px}#jstree-dnd.jstree-dnd-responsive>.jstree-er{background-image:url(30px.png);background-position:-30px
-150px;background-size:90px
180px}#jstree-marker.jstree-dnd-responsive{border-left-width:10px;border-top-width:10px;border-bottom-width:10px;margin-top:-10px}}@media
(max-width:768px){.jstree-proton-responsive
.jstree-container-ul{overflow:hidden}.jstree-proton-responsive
.jstree-icon{background-image:url(30px.png);background-size:90px
180px}.jstree-proton-responsive .jstree-node,.jstree-proton-responsive
.jstree-leaf>.jstree-ocl{background:0 0}.jstree-proton-responsive
.jstree-node{min-height:30px;line-height:30px;margin-left:30px;min-width:30px;white-space:nowrap}.jstree-proton-responsive
.jstree-anchor{line-height:38px;height:38px;margin:0}.jstree-proton-responsive
.jstree-icon,.jstree-proton-responsive
.jstree-icon:empty{margin-top:4px;width:30px;height:30px;line-height:30px}.jstree-proton-responsive>.jstree-container-ul>.jstree-node{margin-left:0}.jstree-proton-responsive.jstree-rtl
.jstree-node{margin-left:0;margin-right:30px}.jstree-proton-responsive.jstree-rtl
.jstree-container-ul>.jstree-node{margin-right:0}.jstree-proton-responsive
.jstree-ocl,.jstree-proton-responsive
.jstree-themeicon,.jstree-proton-responsive
.jstree-checkbox{background-size:90px 180px}.jstree-proton-responsive
.jstree-leaf>.jstree-ocl{background:0 0}.jstree-proton-responsive
.jstree-open>.jstree-ocl{background-position:0
0!important}.jstree-proton-responsive
.jstree-closed>.jstree-ocl{background-position:0
-30px!important}.jstree-proton-responsive.jstree-rtl
.jstree-closed>.jstree-ocl{background-position:-30px
0!important}.jstree-proton-responsive
.jstree-themeicon{background-position:-30px -30px}.jstree-proton-responsive
.jstree-checkbox,.jstree-proton-responsive
.jstree-checkbox:hover{background-position:-30px
-60px}.jstree-proton-responsive.jstree-checkbox-selection
.jstree-clicked>.jstree-checkbox,.jstree-proton-responsive.jstree-checkbox-selection
.jstree-clicked>.jstree-checkbox:hover,.jstree-proton-responsive
.jstree-checked>.jstree-checkbox,.jstree-proton-responsive
.jstree-checked>.jstree-checkbox:hover{background-position:0
-60px}.jstree-proton-responsive
.jstree-anchor>.jstree-undetermined,.jstree-proton-responsive
.jstree-anchor>.jstree-undetermined:hover{background-position:0
-90px}.jstree-proton-responsive>.jstree-striped{background:0
0}.jstree-proton-responsive .jstree-wholerow-ul
li{position:relative}.jstree-proton-responsive .jstree-wholerow-ul
.jstree-wholerow{position:absolute;top:0;left:-1000px;right:-1000px;width:auto;height:100%}.jstree-proton-responsive
.jstree-wholerow{border-top:1px solid
rgba(0,0,0,.05);background:rgba(0,0,0,.02);height:30px}.jstree-proton-responsive
.jstree-wholerow-hovered{background:#76b6ec}.jstree-proton-responsive
.jstree-wholerow-clicked{background:#3392e3}.jstree-proton-responsive
.jstree-children
.jstree-open+.jstree-open{box-shadow:none}.jstree-proton-responsive
.jstree-node,.jstree-proton-responsive
.jstree-icon,.jstree-proton-responsive
.jstree-node>.jstree-ocl,.jstree-proton-responsive
.jstree-themeicon,.jstree-proton-responsive
.jstree-checkbox{background-image:url(30px.png);background-size:90px
180px}.jstree-proton-responsive .jstree-node{background-position:-60px
0;background-repeat:repeat-y}.jstree-proton-responsive
.jstree-last{background:0 0}.jstree-proton-responsive
.jstree-leaf>.jstree-ocl{background-position:-30px
-90px}.jstree-proton-responsive
.jstree-last>.jstree-ocl{background-position:-30px
-120px}.jstree-proton-responsive
.jstree-themeicon-custom{background-color:transparent;background-image:none;background-position:0
0}.jstree-proton-responsive .jstree-file{background:url(30px.png) 0 -120px
no-repeat;background-size:90px 180px}.jstree-proton-responsive
.jstree-folder{background:url(30px.png) -30px -30px
no-repeat;background-size:90px
180px}.jstree-proton-responsive>.jstree-container-ul>.jstree-node{margin-left:0;margin-right:0}}
/* Helix */
#sp-left .sp-module .ph-category-module-box ul > li,
#sp-right .sp-module .ph-category-module-box ul > li {
border-bottom: 0;
}
#sp-left .sp-module .ph-category-module-box ul > li > a,
#sp-right .sp-module .ph-category-module-box ul > li > a {
display: inline-block;
padding: 0px 4px 0px 1px;
line-height: 22px;
}
/* Long names */
.jstree-proton a {
white-space:normal !important; height: auto;
}
.jstree-anchor {
height: auto !important;
}
.jstree-proton li > ins {
vertical-align:top;
}
.jstree-leaf {
height: auto;
}
.jstree-leaf a{
height: auto !important;
}jstree/themes/proton/throbber.gif000064400000003270151175232460013154
0ustar00GIF89a����������FFFzzzXXX$$$���������666hhh!�NETSCAPE2.0!�Created
with ajaxload.info!�
,qH�;uj0��1P�4HЈ��
�`+�I1��q|��@�P�p@\
�8�4��Q��Q�Z�^���-� g�8)
fl���9��C�`�OTp%#�
c%
U!�
,pHhy��9��1K�I���*��,�Al����`�h���|&�@�s�H�Bv�D���~��U�M^�)��H6?�
xMl<L&�klj�(�'K'!�
,rH(��9�N�ICs��a(�0F&pP�$�@�0��8(ZF (��
�(��iDN��1�:Hd%�M
��2 �����x2GOyo0Oyrn;bq'1b'!�
,pH(c��9J��&
��QN�,J�5P�3�
`0�J'�;)���l�_@�H$v��b�
]�M+�
g@��ͧ)��v1[�o�z
;�|zM1n&&�&!�
,fHh)��9N���&
��}@A���Pu,
�\+��I
4E��|�
�qɱ�]
�MkI�7J�ي�H�!�8���e��s���yVn�y�&��!�
,xH�R��RB��&�'
Rr���T(�2��c�
d�&08��� �g0�`��l��Aa~6�ܦK�!��~M}<U\o
]Ym]UK!�
,sH���T�1�&�X"2D�U���X6+�t����9
����l�s��$��lj$G��,Ni�s���2-<����`coO:�x.OL
7]'|!�
,qH���pPJ$�&}�=%W
!8<
�u�u%Ew7��SpZ��&
%�&��@M<5���y�4e��
���`��p��
�ml- !�5Q%\!�
,sHh�t�{ǸJ�Q_�(a�� �eq���Bj���<��3 i�`
hޒ�Aa��(�
��$�Հ�T
�c`@0��0����H��Bl|
� �&YJgSg!�
,sHh�t����u�JX0^�`Y��
� sh������(>B�Ab�p�$��S��I��J������Ǚ��C��p �A�H�4zY
*�f!�
,oHh�t��{����6aWb�a�(���5��U����@
�NA;4�Br���$P�(��E�HTC!@80�Y�Q���c��LzYSY>Z
gt!�
,sHh�tj���(�6�a$_��!�_^5�FB��X
��8���ZX�U�(�I@ѫ
���(�.A�QX%(���Q�,!DM �S��a[ 0;lazyload/index.html000064400000000054151175232460010365
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>lazyload/lazyload.min.js000064400000014375151175232460011342
0ustar00function _toConsumableArray(t){return
_arrayWithoutHoles(t)||_iterableToArray(t)||_nonIterableSpread()}function
_nonIterableSpread(){throw new TypeError("Invalid attempt to spread
non-iterable instance")}function
_iterableToArray(t){if(Symbol.iterator in Object(t)||"[object
Arguments]"===Object.prototype.toString.call(t))return
Array.from(t)}function _arrayWithoutHoles(t){if(Array.isArray(t)){for(var
e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}function
_extends(){return(_extends=Object.assign||function(t){for(var
e=1;e<arguments.length;e++){var n=arguments[e];for(var r in
n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return
t}).apply(this,arguments)}function
_typeof(t){return(_typeof="function"==typeof
Symbol&&"symbol"==typeof
Symbol.iterator?function(t){return typeof t}:function(t){return
t&&"function"==typeof
Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof
t})(t)}!function(t,e){"object"===("undefined"==typeof
exports?"undefined":_typeof(exports))&&"undefined"!=typeof
module?module.exports=e():"function"==typeof
define&&define.amd?define(e):t.LazyLoad=e()}(this,function(){"use
strict";var t="undefined"!=typeof
window,e=t&&!("onscroll"in
window)||"undefined"!=typeof
navigator&&/(gle|ing|ro)bot|crawl|spider/i.test(navigator.userAgent),n=t&&"IntersectionObserver"in
window,r=t&&"classList"in
document.createElement("p"),o={elements_selector:"img",container:e||t?document:null,threshold:300,thresholds:null,data_src:"src",data_srcset:"srcset",data_sizes:"sizes",data_bg:"bg",data_poster:"poster",class_loading:"loading",class_loaded:"loaded",class_error:"error",load_delay:0,auto_unobserve:!0,callback_enter:null,callback_exit:null,callback_reveal:null,callback_loaded:null,callback_error:null,callback_finish:null,use_native:!1},a=function(t,e){var
n,r=new t(e);try{n=new
CustomEvent("LazyLoad::Initialized",{detail:{instance:r}})}catch(t){(n=document.createEvent("CustomEvent")).initCustomEvent("LazyLoad::Initialized",!1,!1,{instance:r})}window.dispatchEvent(n)};var
i=function(t,e){return
t.getAttribute("data-"+e)},s=function(t,e,n){var
r="data-"+e;null!==n?t.setAttribute(r,n):t.removeAttribute(r)},c=function(t){return"true"===i(t,"was-processed")},l=function(t,e){return
s(t,"ll-timeout",e)},u=function(t){return
i(t,"ll-timeout")},d=function(t,e,n,r){t&&(void
0===r?void
0===n?t(e):t(e,n):t(e,n,r))},f=function(t,e){t._loadingCount+=e,0===t._elements.length&&0===t._loadingCount&&d(t._settings.callback_finish,t)},_=function(t){for(var
e,n=[],r=0;e=t.children[r];r+=1)"SOURCE"===e.tagName&&n.push(e);return
n},v=function(t,e,n){n&&t.setAttribute(e,n)},b=function(t,e){v(t,"sizes",i(t,e.data_sizes)),v(t,"srcset",i(t,e.data_srcset)),v(t,"src",i(t,e.data_src))},m={IMG:function(t,e){var
n=t.parentNode;n&&"PICTURE"===n.tagName&&_(n).forEach(function(t){b(t,e)});b(t,e)},IFRAME:function(t,e){v(t,"src",i(t,e.data_src))},VIDEO:function(t,e){_(t).forEach(function(t){v(t,"src",i(t,e.data_src))}),v(t,"poster",i(t,e.data_poster)),v(t,"src",i(t,e.data_src)),t.load()}},p=function(t,e){var
n,r,o=e._settings,a=t.tagName,s=m[a];if(s)return
s(t,o),f(e,1),void(e._elements=(n=e._elements,r=t,n.filter(function(t){return
t!==r})));!function(t,e){var
n=i(t,e.data_src),r=i(t,e.data_bg);n&&(t.style.backgroundImage='url("'.concat(n,'")')),r&&(t.style.backgroundImage=r)}(t,o)},g=function(t,e){r?t.classList.add(e):t.className+=(t.className?"
":"")+e},y=function(t,e){r?t.classList.remove(e):t.className=t.className.replace(new
RegExp("(^|\\s+)"+e+"(\\s+|$)"),"
").replace(/^\s+/,"").replace(/\s+$/,"")},h=function(t,e,n){t.addEventListener(e,n)},E=function(t,e,n){t.removeEventListener(e,n)},w=function(t,e,n){E(t,"load",e),E(t,"loadeddata",e),E(t,"error",n)},A=function(t,e,n){var
r=n._settings,o=e?r.class_loaded:r.class_error,a=e?r.callback_loaded:r.callback_error,i=t.target;y(i,r.class_loading),g(i,o),d(a,i,n),f(n,-1)},I=function(t,e){var
n=function n(o){A(o,!0,e),w(t,n,r)},r=function
r(o){A(o,!1,e),w(t,n,r)};!function(t,e,n){h(t,"load",e),h(t,"loadeddata",e),h(t,"error",n)}(t,n,r)},k=["IMG","IFRAME","VIDEO"],L=function(t,e){var
n=e._observer;S(t,e),n&&e._settings.auto_unobserve&&n.unobserve(t)},O=function(t){var
e=u(t);e&&(clearTimeout(e),l(t,null))},x=function(t,e){var
n=e._settings.load_delay,r=u(t);r||(r=setTimeout(function(){L(t,e),O(t)},n),l(t,r))},S=function(t,e,n){var
r=e._settings;!n&&c(t)||(k.indexOf(t.tagName)>-1&&(I(t,e),g(t,r.class_loading)),p(t,e),function(t){s(t,"was-processed","true")}(t),d(r.callback_reveal,t,e),d(r.callback_set,t,e))},z=function(t){return!!n&&(t._observer=new
IntersectionObserver(function(e){e.forEach(function(e){return
function(t){return
t.isIntersecting||t.intersectionRatio>0}(e)?function(t,e,n){var
r=n._settings;d(r.callback_enter,t,e,n),r.load_delay?x(t,n):L(t,n)}(e.target,e,t):function(t,e,n){var
r=n._settings;d(r.callback_exit,t,e,n),r.load_delay&&O(t)}(e.target,e,t)})},{root:(e=t._settings).container===document?null:e.container,rootMargin:e.thresholds||e.threshold+"px"}),!0);var
e},C=["IMG","IFRAME"],N=function(t,e){return
function(t){return
t.filter(function(t){return!c(t)})}((n=t||function(t){return
t.container.querySelectorAll(t.elements_selector)}(e),Array.prototype.slice.call(n)));var
n},M=function(t){var
e=t._settings;_toConsumableArray(e.container.querySelectorAll("."+e.class_error)).forEach(function(t){y(t,e.class_error),function(t){s(t,"was-processed",null)}(t)}),t.update()},R=function(e,n){var
r;this._settings=function(t){return
_extends({},o,t)}(e),this._loadingCount=0,z(this),this.update(n),r=this,t&&window.addEventListener("online",function(t){M(r)})};return
R.prototype={update:function(t){var
n,r=this,o=this._settings;(this._elements=N(t,o),!e&&this._observer)?(function(t){return
t.use_native&&"loading"in
HTMLImageElement.prototype}(o)&&((n=this)._elements.forEach(function(t){-1!==C.indexOf(t.tagName)&&(t.setAttribute("loading","lazy"),S(t,n))}),this._elements=N(t,o)),this._elements.forEach(function(t){r._observer.observe(t)})):this.loadAll()},destroy:function(){var
t=this;this._observer&&(this._elements.forEach(function(e){t._observer.unobserve(e)}),this._observer=null),this._elements=null,this._settings=null},load:function(t,e){S(t,this,e)},loadAll:function(){var
t=this;this._elements.forEach(function(e){L(e,t)})}},t&&function(t,e){if(e)if(e.length)for(var
n,r=0;n=e[r];r+=1)a(t,n);else a(t,e)}(R,window.lazyLoadOptions),R});
magnific/index.html000064400000000054151175232460010323
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>magnific/jquery.magnific-popup.min.js000064400000047370151175232460013716
0ustar00/*! Magnific Popup - v1.1.0 - 2016-02-20
* http://dimsemenov.com/plugins/magnific-popup/
* Copyright (c) 2016 Dmitry Semenov; */
!function(a){"function"==typeof
define&&define.amd?define(["jquery"],a):a("object"==typeof
exports?require("jquery"):window.jQuery||window.Zepto)}(function(a){var
b,c,d,e,f,g,h="Close",i="BeforeClose",j="AfterClose",k="BeforeAppend",l="MarkupParse",m="Open",n="Change",o="mfp",p="."+o,q="mfp-ready",r="mfp-removing",s="mfp-prevent-close",t=function(){},u=!!window.jQuery,v=a(window),w=function(a,c){b.ev.on(o+a+p,c)},x=function(b,c,d,e){var
f=document.createElement("div");return
f.className="mfp-"+b,d&&(f.innerHTML=d),e?c&&c.appendChild(f):(f=a(f),c&&f.appendTo(c)),f},y=function(c,d){b.ev.triggerHandler(o+c,d),b.st.callbacks&&(c=c.charAt(0).toLowerCase()+c.slice(1),b.st.callbacks[c]&&b.st.callbacks[c].apply(b,a.isArray(d)?d:[d]))},z=function(c){return
c===g&&b.currTemplate.closeBtn||(b.currTemplate.closeBtn=a(b.st.closeMarkup.replace("%title%",b.st.tClose)),g=c),b.currTemplate.closeBtn},A=function(){a.magnificPopup.instance||(b=new
t,b.init(),a.magnificPopup.instance=b)},B=function(){var
a=document.createElement("p").style,b=["ms","O","Moz","Webkit"];if(void
0!==a.transition)return!0;for(;b.length;)if(b.pop()+"Transition"in
a)return!0;return!1};t.prototype={constructor:t,init:function(){var
c=navigator.appVersion;b.isLowIE=b.isIE8=document.all&&!document.addEventListener,b.isAndroid=/android/gi.test(c),b.isIOS=/iphone|ipad|ipod/gi.test(c),b.supportsTransition=B(),b.probablyMobile=b.isAndroid||b.isIOS||/(Opera
Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows
Phone)|IEMobile/i.test(navigator.userAgent),d=a(document),b.popupsCache={}},open:function(c){var
e;if(c.isObj===!1){b.items=c.items.toArray(),b.index=0;var
g,h=c.items;for(e=0;e<h.length;e++)if(g=h[e],g.parsed&&(g=g.el[0]),g===c.el[0]){b.index=e;break}}else
b.items=a.isArray(c.items)?c.items:[c.items],b.index=c.index||0;if(b.isOpen)return
void
b.updateItemHTML();b.types=[],f="",c.mainEl&&c.mainEl.length?b.ev=c.mainEl.eq(0):b.ev=d,c.key?(b.popupsCache[c.key]||(b.popupsCache[c.key]={}),b.currTemplate=b.popupsCache[c.key]):b.currTemplate={},b.st=a.extend(!0,{},a.magnificPopup.defaults,c),b.fixedContentPos="auto"===b.st.fixedContentPos?!b.probablyMobile:b.st.fixedContentPos,b.st.modal&&(b.st.closeOnContentClick=!1,b.st.closeOnBgClick=!1,b.st.showCloseBtn=!1,b.st.enableEscapeKey=!1),b.bgOverlay||(b.bgOverlay=x("bg").on("click"+p,function(){b.close()}),b.wrap=x("wrap").attr("tabindex",-1).on("click"+p,function(a){b._checkIfClose(a.target)&&b.close()}),b.container=x("container",b.wrap)),b.contentContainer=x("content"),b.st.preloader&&(b.preloader=x("preloader",b.container,b.st.tLoading));var
i=a.magnificPopup.modules;for(e=0;e<i.length;e++){var
j=i[e];j=j.charAt(0).toUpperCase()+j.slice(1),b["init"+j].call(b)}y("BeforeOpen"),b.st.showCloseBtn&&(b.st.closeBtnInside?(w(l,function(a,b,c,d){c.close_replaceWith=z(d.type)}),f+="
mfp-close-btn-in"):b.wrap.append(z())),b.st.alignTop&&(f+="
mfp-align-top"),b.fixedContentPos?b.wrap.css({overflow:b.st.overflowY,overflowX:"hidden",overflowY:b.st.overflowY}):b.wrap.css({top:v.scrollTop(),position:"absolute"}),(b.st.fixedBgPos===!1||"auto"===b.st.fixedBgPos&&!b.fixedContentPos)&&b.bgOverlay.css({height:d.height(),position:"absolute"}),b.st.enableEscapeKey&&d.on("keyup"+p,function(a){27===a.keyCode&&b.close()}),v.on("resize"+p,function(){b.updateSize()}),b.st.closeOnContentClick||(f+="
mfp-auto-cursor"),f&&b.wrap.addClass(f);var
k=b.wH=v.height(),n={};if(b.fixedContentPos&&b._hasScrollBar(k)){var
o=b._getScrollbarSize();o&&(n.marginRight=o)}b.fixedContentPos&&(b.isIE7?a("body,
html").css("overflow","hidden"):n.overflow="hidden");var
r=b.st.mainClass;return b.isIE7&&(r+="
mfp-ie7"),r&&b._addClassToMFP(r),b.updateItemHTML(),y("BuildControls"),a("html").css(n),b.bgOverlay.add(b.wrap).prependTo(b.st.prependTo||a(document.body)),b._lastFocusedEl=document.activeElement,setTimeout(function(){b.content?(b._addClassToMFP(q),b._setFocus()):b.bgOverlay.addClass(q),d.on("focusin"+p,b._onFocusIn)},16),b.isOpen=!0,b.updateSize(k),y(m),c},close:function(){b.isOpen&&(y(i),b.isOpen=!1,b.st.removalDelay&&!b.isLowIE&&b.supportsTransition?(b._addClassToMFP(r),setTimeout(function(){b._close()},b.st.removalDelay)):b._close())},_close:function(){y(h);var
c=r+" "+q+"
";if(b.bgOverlay.detach(),b.wrap.detach(),b.container.empty(),b.st.mainClass&&(c+=b.st.mainClass+"
"),b._removeClassFromMFP(c),b.fixedContentPos){var
e={marginRight:""};b.isIE7?a("body,
html").css("overflow",""):e.overflow="",a("html").css(e)}d.off("keyup"+p+"
focusin"+p),b.ev.off(p),b.wrap.attr("class","mfp-wrap").removeAttr("style"),b.bgOverlay.attr("class","mfp-bg"),b.container.attr("class","mfp-container"),!b.st.showCloseBtn||b.st.closeBtnInside&&b.currTemplate[b.currItem.type]!==!0||b.currTemplate.closeBtn&&b.currTemplate.closeBtn.detach(),b.st.autoFocusLast&&b._lastFocusedEl&&a(b._lastFocusedEl).focus(),b.currItem=null,b.content=null,b.currTemplate=null,b.prevHeight=0,y(j)},updateSize:function(a){if(b.isIOS){var
c=document.documentElement.clientWidth/window.innerWidth,d=window.innerHeight*c;b.wrap.css("height",d),b.wH=d}else
b.wH=a||v.height();b.fixedContentPos||b.wrap.css("height",b.wH),y("Resize")},updateItemHTML:function(){var
c=b.items[b.index];b.contentContainer.detach(),b.content&&b.content.detach(),c.parsed||(c=b.parseEl(b.index));var
d=c.type;if(y("BeforeChange",[b.currItem?b.currItem.type:"",d]),b.currItem=c,!b.currTemplate[d]){var
f=b.st[d]?b.st[d].markup:!1;y("FirstMarkupParse",f),f?b.currTemplate[d]=a(f):b.currTemplate[d]=!0}e&&e!==c.type&&b.container.removeClass("mfp-"+e+"-holder");var
g=b["get"+d.charAt(0).toUpperCase()+d.slice(1)](c,b.currTemplate[d]);b.appendContent(g,d),c.preloaded=!0,y(n,c),e=c.type,b.container.prepend(b.contentContainer),y("AfterChange")},appendContent:function(a,c){b.content=a,a?b.st.showCloseBtn&&b.st.closeBtnInside&&b.currTemplate[c]===!0?b.content.find(".mfp-close").length||b.content.append(z()):b.content=a:b.content="",y(k),b.container.addClass("mfp-"+c+"-holder"),b.contentContainer.append(b.content)},parseEl:function(c){var
d,e=b.items[c];if(e.tagName?e={el:a(e)}:(d=e.type,e={data:e,src:e.src}),e.el){for(var
f=b.types,g=0;g<f.length;g++)if(e.el.hasClass("mfp-"+f[g])){d=f[g];break}e.src=e.el.attr("data-mfp-src"),e.src||(e.src=e.el.attr("href"))}return
e.type=d||b.st.type||"inline",e.index=c,e.parsed=!0,b.items[c]=e,y("ElementParse",e),b.items[c]},addGroup:function(a,c){var
d=function(d){d.mfpEl=this,b._openClick(d,a,c)};c||(c={});var
e="click.magnificPopup";c.mainEl=a,c.items?(c.isObj=!0,a.off(e).on(e,d)):(c.isObj=!1,c.delegate?a.off(e).on(e,c.delegate,d):(c.items=a,a.off(e).on(e,d)))},_openClick:function(c,d,e){var
f=void
0!==e.midClick?e.midClick:a.magnificPopup.defaults.midClick;if(f||!(2===c.which||c.ctrlKey||c.metaKey||c.altKey||c.shiftKey)){var
g=void
0!==e.disableOn?e.disableOn:a.magnificPopup.defaults.disableOn;if(g)if(a.isFunction(g)){if(!g.call(b))return!0}else
if(v.width()<g)return!0;c.type&&(c.preventDefault(),b.isOpen&&c.stopPropagation()),e.el=a(c.mfpEl),e.delegate&&(e.items=d.find(e.delegate)),b.open(e)}},updateStatus:function(a,d){if(b.preloader){c!==a&&b.container.removeClass("mfp-s-"+c),d||"loading"!==a||(d=b.st.tLoading);var
e={status:a,text:d};y("UpdateStatus",e),a=e.status,d=e.text,b.preloader.html(d),b.preloader.find("a").on("click",function(a){a.stopImmediatePropagation()}),b.container.addClass("mfp-s-"+a),c=a}},_checkIfClose:function(c){if(!a(c).hasClass(s)){var
d=b.st.closeOnContentClick,e=b.st.closeOnBgClick;if(d&&e)return!0;if(!b.content||a(c).hasClass("mfp-close")||b.preloader&&c===b.preloader[0])return!0;if(c===b.content[0]||a.contains(b.content[0],c)){if(d)return!0}else
if(e&&a.contains(document,c))return!0;return!1}},_addClassToMFP:function(a){b.bgOverlay.addClass(a),b.wrap.addClass(a)},_removeClassFromMFP:function(a){this.bgOverlay.removeClass(a),b.wrap.removeClass(a)},_hasScrollBar:function(a){return(b.isIE7?d.height():document.body.scrollHeight)>(a||v.height())},_setFocus:function(){(b.st.focus?b.content.find(b.st.focus).eq(0):b.wrap).focus()},_onFocusIn:function(c){return
c.target===b.wrap[0]||a.contains(b.wrap[0],c.target)?void
0:(b._setFocus(),!1)},_parseMarkup:function(b,c,d){var
e;d.data&&(c=a.extend(d.data,c)),y(l,[b,c,d]),a.each(c,function(c,d){if(void
0===d||d===!1)return!0;if(e=c.split("_"),e.length>1){var
f=b.find(p+"-"+e[0]);if(f.length>0){var
g=e[1];"replaceWith"===g?f[0]!==d[0]&&f.replaceWith(d):"img"===g?f.is("img")?f.attr("src",d):f.replaceWith(a("<img>").attr("src",d).attr("class",f.attr("class"))):f.attr(e[1],d)}}else
b.find(p+"-"+c).html(d)})},_getScrollbarSize:function(){if(void
0===b.scrollbarSize){var
a=document.createElement("div");a.style.cssText="width:
99px; height: 99px; overflow: scroll; position: absolute; top:
-9999px;",document.body.appendChild(a),b.scrollbarSize=a.offsetWidth-a.clientWidth,document.body.removeChild(a)}return
b.scrollbarSize}},a.magnificPopup={instance:null,proto:t.prototype,modules:[],open:function(b,c){return
A(),b=b?a.extend(!0,{},b):{},b.isObj=!0,b.index=c||0,this.instance.open(b)},close:function(){return
a.magnificPopup.instance&&a.magnificPopup.instance.close()},registerModule:function(b,c){c.options&&(a.magnificPopup.defaults[b]=c.options),a.extend(this.proto,c.proto),this.modules.push(b)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'<button
title="%title%" type="button"
class="mfp-close">×</button>',tClose:"Close
(Esc)",tLoading:"Loading...",autoFocusLast:!0}},a.fn.magnificPopup=function(c){A();var
d=a(this);if("string"==typeof c)if("open"===c){var
e,f=u?d.data("magnificPopup"):d[0].magnificPopup,g=parseInt(arguments[1],10)||0;f.items?e=f.items[g]:(e=d,f.delegate&&(e=e.find(f.delegate)),e=e.eq(g)),b._openClick({mfpEl:e},d,f)}else
b.isOpen&&b[c].apply(b,Array.prototype.slice.call(arguments,1));else
c=a.extend(!0,{},c),u?d.data("magnificPopup",c):d[0].magnificPopup=c,b.addGroup(d,c);return
d};var
C,D,E,F="inline",G=function(){E&&(D.after(E.addClass(C)).detach(),E=null)};a.magnificPopup.registerModule(F,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content
not
found"},proto:{initInline:function(){b.types.push(F),w(h+"."+F,function(){G()})},getInline:function(c,d){if(G(),c.src){var
e=b.st.inline,f=a(c.src);if(f.length){var
g=f[0].parentNode;g&&g.tagName&&(D||(C=e.hiddenClass,D=x(C),C="mfp-"+C),E=f.after(D).detach().removeClass(C)),b.updateStatus("ready")}else
b.updateStatus("error",e.tNotFound),f=a("<div>");return
c.inlineElement=f,f}return
b.updateStatus("ready"),b._parseMarkup(d,{},c),d}}});var
H,I="ajax",J=function(){H&&a(document.body).removeClass(H)},K=function(){J(),b.req&&b.req.abort()};a.magnificPopup.registerModule(I,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'<a
href="%url%">The content</a> could not be
loaded.'},proto:{initAjax:function(){b.types.push(I),H=b.st.ajax.cursor,w(h+"."+I,K),w("BeforeChange."+I,K)},getAjax:function(c){H&&a(document.body).addClass(H),b.updateStatus("loading");var
d=a.extend({url:c.src,success:function(d,e,f){var
g={data:d,xhr:f};y("ParseAjax",g),b.appendContent(a(g.data),I),c.finished=!0,J(),b._setFocus(),setTimeout(function(){b.wrap.addClass(q)},16),b.updateStatus("ready"),y("AjaxContentAdded")},error:function(){J(),c.finished=c.loadError=!0,b.updateStatus("error",b.st.ajax.tError.replace("%url%",c.src))}},b.st.ajax.settings);return
b.req=a.ajax(d),""}}});var
L,M=function(c){if(c.data&&void 0!==c.data.title)return
c.data.title;var d=b.st.image.titleSrc;if(d){if(a.isFunction(d))return
d.call(b,c);if(c.el)return
c.el.attr(d)||""}return""};a.magnificPopup.registerModule("image",{options:{markup:'<div
class="mfp-figure"><div
class="mfp-close"></div><figure><div
class="mfp-img"></div><figcaption><div
class="mfp-bottom-bar"><div
class="mfp-title"></div><div
class="mfp-counter"></div></div></figcaption></figure></div>',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'<a
href="%url%">The image</a> could not be
loaded.'},proto:{initImage:function(){var
c=b.st.image,d=".image";b.types.push("image"),w(m+d,function(){"image"===b.currItem.type&&c.cursor&&a(document.body).addClass(c.cursor)}),w(h+d,function(){c.cursor&&a(document.body).removeClass(c.cursor),v.off("resize"+p)}),w("Resize"+d,b.resizeImage),b.isLowIE&&w("AfterChange",b.resizeImage)},resizeImage:function(){var
a=b.currItem;if(a&&a.img&&b.st.image.verticalFit){var
c=0;b.isLowIE&&(c=parseInt(a.img.css("padding-top"),10)+parseInt(a.img.css("padding-bottom"),10)),a.img.css("max-height",b.wH-c)}},_onImageHasSize:function(a){a.img&&(a.hasSize=!0,L&&clearInterval(L),a.isCheckingImgSize=!1,y("ImageHasSize",a),a.imgHidden&&(b.content&&b.content.removeClass("mfp-loading"),a.imgHidden=!1))},findImageSize:function(a){var
c=0,d=a.img[0],e=function(f){L&&clearInterval(L),L=setInterval(function(){return
d.naturalWidth>0?void
b._onImageHasSize(a):(c>200&&clearInterval(L),c++,void(3===c?e(10):40===c?e(50):100===c&&e(500)))},f)};e(1)},getImage:function(c,d){var
e=0,f=function(){c&&(c.img[0].complete?(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("ready")),c.hasSize=!0,c.loaded=!0,y("ImageLoadComplete")):(e++,200>e?setTimeout(f,100):g()))},g=function(){c&&(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("error",h.tError.replace("%url%",c.src))),c.hasSize=!0,c.loaded=!0,c.loadError=!0)},h=b.st.image,i=d.find(".mfp-img");if(i.length){var
j=document.createElement("img");j.className="mfp-img",c.el&&c.el.find("img").length&&(j.alt=c.el.find("img").attr("alt")),c.img=a(j).on("load.mfploader",f).on("error.mfploader",g),j.src=c.src,i.is("img")&&(c.img=c.img.clone()),j=c.img[0],j.naturalWidth>0?c.hasSize=!0:j.width||(c.hasSize=!1)}return
b._parseMarkup(d,{title:M(c),img_replaceWith:c.img},c),b.resizeImage(),c.hasSize?(L&&clearInterval(L),c.loadError?(d.addClass("mfp-loading"),b.updateStatus("error",h.tError.replace("%url%",c.src))):(d.removeClass("mfp-loading"),b.updateStatus("ready")),d):(b.updateStatus("loading"),c.loading=!0,c.hasSize||(c.imgHidden=!0,d.addClass("mfp-loading"),b.findImageSize(c)),d)}}});var
N,O=function(){return void 0===N&&(N=void
0!==document.createElement("p").style.MozTransform),N};a.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(a){return
a.is("img")?a:a.find("img")}},proto:{initZoom:function(){var
a,c=b.st.zoom,d=".zoom";if(c.enabled&&b.supportsTransition){var
e,f,g=c.duration,j=function(a){var
b=a.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),d="all
"+c.duration/1e3+"s
"+c.easing,e={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},f="transition";return
e["-webkit-"+f]=e["-moz-"+f]=e["-o-"+f]=e[f]=d,b.css(e),b},k=function(){b.content.css("visibility","visible")};w("BuildControls"+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.content.css("visibility","hidden"),a=b._getItemToZoom(),!a)return
void
k();f=j(a),f.css(b._getOffset()),b.wrap.append(f),e=setTimeout(function(){f.css(b._getOffset(!0)),e=setTimeout(function(){k(),setTimeout(function(){f.remove(),a=f=null,y("ZoomAnimationEnded")},16)},g)},16)}}),w(i+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.st.removalDelay=g,!a){if(a=b._getItemToZoom(),!a)return;f=j(a)}f.css(b._getOffset(!0)),b.wrap.append(f),b.content.css("visibility","hidden"),setTimeout(function(){f.css(b._getOffset())},16)}}),w(h+d,function(){b._allowZoom()&&(k(),f&&f.remove(),a=null)})}},_allowZoom:function(){return"image"===b.currItem.type},_getItemToZoom:function(){return
b.currItem.hasSize?b.currItem.img:!1},_getOffset:function(c){var
d;d=c?b.currItem.img:b.st.zoom.opener(b.currItem.el||b.currItem);var
e=d.offset(),f=parseInt(d.css("padding-top"),10),g=parseInt(d.css("padding-bottom"),10);e.top-=a(window).scrollTop()-f;var
h={width:d.width(),height:(u?d.innerHeight():d[0].offsetHeight)-g-f};return
O()?h["-moz-transform"]=h.transform="translate("+e.left+"px,"+e.top+"px)":(h.left=e.left,h.top=e.top),h}}});var
P="iframe",Q="//about:blank",R=function(a){if(b.currTemplate[P]){var
c=b.currTemplate[P].find("iframe");c.length&&(a||(c[0].src=Q),b.isIE8&&c.css("display",a?"block":"none"))}};a.magnificPopup.registerModule(P,{options:{markup:'<div
class="mfp-iframe-scaler"><div
class="mfp-close"></div><iframe
class="mfp-iframe" src="//about:blank"
frameborder="0"
allowfullscreen></iframe></div>',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){b.types.push(P),w("BeforeChange",function(a,b,c){b!==c&&(b===P?R():c===P&&R(!0))}),w(h+"."+P,function(){R()})},getIframe:function(c,d){var
e=c.src,f=b.st.iframe;a.each(f.patterns,function(){return
e.indexOf(this.index)>-1?(this.id&&(e="string"==typeof
this.id?e.substr(e.lastIndexOf(this.id)+this.id.length,e.length):this.id.call(this,e)),e=this.src.replace("%id%",e),!1):void
0});var g={};return
f.srcAction&&(g[f.srcAction]=e),b._parseMarkup(d,g,c),b.updateStatus("ready"),d}}});var
S=function(a){var c=b.items.length;return
a>c-1?a-c:0>a?c+a:a},T=function(a,b,c){return
a.replace(/%curr%/gi,b+1).replace(/%total%/gi,c)};a.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'<button
title="%title%" type="button" class="mfp-arrow
mfp-arrow-%dir%"></button>',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous
(Left arrow key)",tNext:"Next (Right arrow
key)",tCounter:"%curr% of
%total%"},proto:{initGallery:function(){var
c=b.st.gallery,e=".mfp-gallery";return
b.direction=!0,c&&c.enabled?(f+="
mfp-gallery",w(m+e,function(){c.navigateByImgClick&&b.wrap.on("click"+e,".mfp-img",function(){return
b.items.length>1?(b.next(),!1):void
0}),d.on("keydown"+e,function(a){37===a.keyCode?b.prev():39===a.keyCode&&b.next()})}),w("UpdateStatus"+e,function(a,c){c.text&&(c.text=T(c.text,b.currItem.index,b.items.length))}),w(l+e,function(a,d,e,f){var
g=b.items.length;e.counter=g>1?T(c.tCounter,f.index,g):""}),w("BuildControls"+e,function(){if(b.items.length>1&&c.arrows&&!b.arrowLeft){var
d=c.arrowMarkup,e=b.arrowLeft=a(d.replace(/%title%/gi,c.tPrev).replace(/%dir%/gi,"left")).addClass(s),f=b.arrowRight=a(d.replace(/%title%/gi,c.tNext).replace(/%dir%/gi,"right")).addClass(s);e.click(function(){b.prev()}),f.click(function(){b.next()}),b.container.append(e.add(f))}}),w(n+e,function(){b._preloadTimeout&&clearTimeout(b._preloadTimeout),b._preloadTimeout=setTimeout(function(){b.preloadNearbyImages(),b._preloadTimeout=null},16)}),void
w(h+e,function(){d.off(e),b.wrap.off("click"+e),b.arrowRight=b.arrowLeft=null})):!1},next:function(){b.direction=!0,b.index=S(b.index+1),b.updateItemHTML()},prev:function(){b.direction=!1,b.index=S(b.index-1),b.updateItemHTML()},goTo:function(a){b.direction=a>=b.index,b.index=a,b.updateItemHTML()},preloadNearbyImages:function(){var
a,c=b.st.gallery.preload,d=Math.min(c[0],b.items.length),e=Math.min(c[1],b.items.length);for(a=1;a<=(b.direction?e:d);a++)b._preloadItem(b.index+a);for(a=1;a<=(b.direction?d:e);a++)b._preloadItem(b.index-a)},_preloadItem:function(c){if(c=S(c),!b.items[c].preloaded){var
d=b.items[c];d.parsed||(d=b.parseEl(c)),y("LazyLoad",d),"image"===d.type&&(d.img=a('<img
class="mfp-img"
/>').on("load.mfploader",function(){d.hasSize=!0}).on("error.mfploader",function(){d.hasSize=!0,d.loadError=!0,y("LazyLoadError",d)}).attr("src",d.src)),d.preloaded=!0}}}});var
U="retina";a.magnificPopup.registerModule(U,{options:{replaceSrc:function(a){return
a.src.replace(/\.\w+$/,function(a){return"@2x"+a})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var
a=b.st.retina,c=a.ratio;c=isNaN(c)?c():c,c>1&&(w("ImageHasSize."+U,function(a,b){b.img.css({"max-width":b.img[0].naturalWidth/c,width:"100%"})}),w("ElementParse."+U,function(b,d){d.src=a.replaceSrc(d,c)}))}}}}),A()});magnific/magnific-popup.css000064400000015447151175232460011772
0ustar00/* Magnific Popup CSS */
.mfp-bg {
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 1042;
overflow: hidden;
position: fixed;
background: #0b0b0b;
opacity: 0.8; }
.mfp-wrap {
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 1043;
position: fixed;
outline: none !important;
-webkit-backface-visibility: hidden; }
.mfp-container {
text-align: center;
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
padding: 0 8px;
box-sizing: border-box; }
.mfp-container:before {
content: '';
display: inline-block;
height: 100%;
vertical-align: middle; }
.mfp-align-top .mfp-container:before {
display: none; }
.mfp-content {
position: relative;
display: inline-block;
vertical-align: middle;
margin: 0 auto;
text-align: left;
z-index: 1045; }
.mfp-inline-holder .mfp-content,
.mfp-ajax-holder .mfp-content {
width: 100%;
cursor: auto; }
.mfp-ajax-cur {
cursor: progress; }
.mfp-zoom-out-cur, .mfp-zoom-out-cur .mfp-image-holder .mfp-close {
cursor: -moz-zoom-out;
cursor: -webkit-zoom-out;
cursor: zoom-out; }
.mfp-zoom {
cursor: pointer;
cursor: -webkit-zoom-in;
cursor: -moz-zoom-in;
cursor: zoom-in; }
.mfp-auto-cursor .mfp-content {
cursor: auto; }
.mfp-close,
.mfp-arrow,
.mfp-preloader,
.mfp-counter {
-webkit-user-select: none;
-moz-user-select: none;
user-select: none; }
.mfp-loading.mfp-figure {
display: none; }
.mfp-hide {
display: none !important; }
.mfp-preloader {
color: #CCC;
position: absolute;
top: 50%;
width: auto;
text-align: center;
margin-top: -0.8em;
left: 8px;
right: 8px;
z-index: 1044; }
.mfp-preloader a {
color: #CCC; }
.mfp-preloader a:hover {
color: #FFF; }
.mfp-s-ready .mfp-preloader {
display: none; }
.mfp-s-error .mfp-content {
display: none; }
button.mfp-close,
button.mfp-arrow {
overflow: visible;
cursor: pointer;
background: transparent;
border: 0;
-webkit-appearance: none;
display: block;
outline: none;
padding: 0;
z-index: 1046;
box-shadow: none;
touch-action: manipulation; }
button::-moz-focus-inner {
padding: 0;
border: 0; }
.mfp-close {
width: 44px;
height: 44px;
line-height: 44px;
position: absolute;
right: 0;
top: 0;
text-decoration: none;
text-align: center;
opacity: 0.65;
padding: 0 0 18px 10px;
color: #FFF;
font-style: normal;
font-size: 28px;
font-family: Arial, Baskerville, monospace; }
.mfp-close:hover,
.mfp-close:focus {
opacity: 1; }
.mfp-close:active {
top: 1px; }
.mfp-close-btn-in .mfp-close {
color: #333; }
.mfp-image-holder .mfp-close,
.mfp-iframe-holder .mfp-close {
color: #FFF;
right: -6px;
text-align: right;
padding-right: 6px;
width: 100%; }
.mfp-counter {
position: absolute;
top: 0;
right: 0;
color: #CCC;
font-size: 12px;
line-height: 18px;
white-space: nowrap; }
.mfp-arrow {
position: absolute;
opacity: 0.65;
margin: 0;
top: 50%;
margin-top: -55px;
padding: 0;
width: 90px;
height: 110px;
-webkit-tap-highlight-color: transparent; }
.mfp-arrow:active {
margin-top: -54px; }
.mfp-arrow:hover,
.mfp-arrow:focus {
opacity: 1; }
.mfp-arrow:before,
.mfp-arrow:after {
content: '';
display: block;
width: 0;
height: 0;
position: absolute;
left: 0;
top: 0;
margin-top: 35px;
margin-left: 35px;
border: medium inset transparent; }
.mfp-arrow:after {
border-top-width: 13px;
border-bottom-width: 13px;
top: 8px; }
.mfp-arrow:before {
border-top-width: 21px;
border-bottom-width: 21px;
opacity: 0.7; }
.mfp-arrow-left {
left: 0; }
.mfp-arrow-left:after {
border-right: 17px solid #FFF;
margin-left: 31px; }
.mfp-arrow-left:before {
margin-left: 25px;
border-right: 27px solid #3F3F3F; }
.mfp-arrow-right {
right: 0; }
.mfp-arrow-right:after {
border-left: 17px solid #FFF;
margin-left: 39px; }
.mfp-arrow-right:before {
border-left: 27px solid #3F3F3F; }
.mfp-iframe-holder {
padding-top: 40px;
padding-bottom: 40px; }
.mfp-iframe-holder .mfp-content {
line-height: 0;
width: 100%;
max-width: 900px; }
.mfp-iframe-holder .mfp-close {
top: -40px; }
.mfp-iframe-scaler {
width: 100%;
height: 0;
overflow: hidden;
padding-top: 56.25%; }
.mfp-iframe-scaler iframe {
position: absolute;
display: block;
top: 0;
left: 0;
width: 100%;
height: 100%;
box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
background: #000; }
/* Main image in popup */
img.mfp-img {
width: auto;
max-width: 100%;
height: auto;
display: block;
line-height: 0;
box-sizing: border-box;
padding: 40px 0 40px;
margin: 0 auto; }
/* The shadow behind the image */
.mfp-figure {
line-height: 0; }
.mfp-figure:after {
content: '';
position: absolute;
left: 0;
top: 40px;
bottom: 40px;
display: block;
right: 0;
width: auto;
height: auto;
z-index: -1;
box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
background: #444; }
.mfp-figure small {
color: #BDBDBD;
display: block;
font-size: 12px;
line-height: 14px; }
.mfp-figure figure {
margin: 0; }
.mfp-bottom-bar {
margin-top: -36px;
position: absolute;
top: 100%;
left: 0;
width: 100%;
cursor: auto; }
.mfp-title {
text-align: left;
line-height: 18px;
color: #F3F3F3;
word-wrap: break-word;
padding-right: 36px; }
.mfp-image-holder .mfp-content {
max-width: 100%; }
.mfp-gallery .mfp-image-holder .mfp-figure {
cursor: pointer; }
@media screen and (max-width: 800px) and (orientation: landscape), screen
and (max-height: 300px) {
/**
* Remove all paddings around the image on small screen
*/
.mfp-img-mobile .mfp-image-holder {
padding-left: 0;
padding-right: 0; }
.mfp-img-mobile img.mfp-img {
padding: 0; }
.mfp-img-mobile .mfp-figure:after {
top: 0;
bottom: 0; }
.mfp-img-mobile .mfp-figure small {
display: inline;
margin-left: 5px; }
.mfp-img-mobile .mfp-bottom-bar {
background: rgba(0, 0, 0, 0.6);
bottom: 0;
margin: 0;
top: auto;
padding: 3px 5px;
position: fixed;
box-sizing: border-box; }
.mfp-img-mobile .mfp-bottom-bar:empty {
padding: 0; }
.mfp-img-mobile .mfp-counter {
right: 5px;
top: 3px; }
.mfp-img-mobile .mfp-close {
top: 0;
right: 0;
width: 35px;
height: 35px;
line-height: 35px;
background: rgba(0, 0, 0, 0.6);
position: fixed;
text-align: center;
padding: 0; } }
@media all and (max-width: 900px) {
.mfp-arrow {
-webkit-transform: scale(0.75);
transform: scale(0.75); }
.mfp-arrow-left {
-webkit-transform-origin: 0;
transform-origin: 0; }
.mfp-arrow-right {
-webkit-transform-origin: 100%;
transform-origin: 100%; }
.mfp-container {
padding-left: 6px;
padding-right: 6px; } }
phoca/index.html000064400000000054151175232470007641
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>phoca/jquery.phocaattribute.js000064400000036421151175232470012545
0ustar00/*
* jQuery Phoca Attribute
* https://www.phoca.cz
*
* Copyright (C) 2016 Jan Pavelka www.phoca.cz
*
* Licensed under the MIT license
*/
/* SELECT BOXES */
/* Changes Selects to color or image attributes*/
function phChangeAttributeType(typeView) {
typeView = typeof typeView !== 'undefined' ? '.phj' +
typeView : '';
var phProductAttribute = typeView + '.phjProductAttribute';//
Find all select boxes which should be transformed to color or image
var phCleanAttribute = typeView + '.phjCleanAttribute';// Clean
previously transformed select boxes in case of ajax reload
jQuery(phCleanAttribute).remove();
jQuery(phProductAttribute).each(function() {
var phClass = '';
var phClassId = '';
var phSelectNameId = '#phItemAttribute' +
jQuery(this).data('attribute-id-name');
var phSelectNameIdT = '#phItemHiddenAttribute' +
jQuery(this).data('attribute-id-name');
var phSelectNameIdB = '#phItemBoxAttribute' +
jQuery(this).data('attribute-id-name');
var phType = jQuery(this).data('attribute-type');// Type of
attribute
var phTypeView = jQuery(this).data('type-view');// Type of
view, e.g. ItemQuickView is reloaded by ajax
var phTypeIcon = jQuery(this).data('type-icon');// Type of
used icon library
var phRequired = jQuery(this).data('required');// Type of
used icon library
if (phType == 3) {
phClass = 'phSelectBoxImage';// Image
} else if (phType == 2) {
phClass = 'phSelectBoxButton';// Color
}
// Transform only attributes which are select box image - 3 or select box
color - 2
if (phClass != '') {
phClassId = phSelectNameIdT + ' .' + phClass;
var phSelectName = jQuery(phSelectNameId).attr('name');
var phHiddenEl = jQuery('<input type="hidden"
name="'+ phSelectName +'">');
phHiddenEl.val(jQuery(phSelectNameId).val());
phHiddenEl.insertAfter(jQuery(phSelectNameId));
// ON START DISPLAY OR HIDE
// jQuery(phSelectNameId).hide();
// jQuery(phSelectNameIdB).hide();
// Cannot be hidden because of html5 required field and its message
// Hide select box even its chosen alternative
jQuery(phSelectNameIdT).css( "display", "block");
jQuery(phSelectNameIdB).css( {"display": "visible",
'position': 'absolute', 'clip':
'rect(0,0,0,0)' });
jQuery(phSelectNameIdB).addClass('phj' + phTypeView + '
phjCleanAttribute');
// ON START TRANSFORM
jQuery(phSelectNameId + ' option').each(function() {
/* Do not display default value (empty value), can be set by clicking
back from other value */
if (jQuery(this).val() != '') {
if (phType == 3) {
// Image
var phSBtn = jQuery('<div class="'+ phClass +'
'+ phTypeIcon +'" data-value="'+
jQuery(this).val() +'" data-value-alias="'+
jQuery(this).data('value-alias') +'"
title="'+ jQuery(this).text() +'"><img
src="'+ jQuery(this).data('image') +'"
alt="'+ jQuery(this).text() +'"
/></div>');
} else if (phType == 2) {
// Color
var phSBtn = jQuery('<div class="'+ phClass +'
'+ phTypeIcon +'" style="background-color:' +
jQuery(this).data('color') +'" data-value="'+
jQuery(this).val() +'" data-value-alias="'+
jQuery(this).data('value-alias') +'"
title="'+ jQuery(this).text() +'">'+
' ' +'</div>');
}
if(jQuery(this).is(':selected')) {
phSBtn.addClass('on');
}
jQuery(phSelectNameIdT).append(phSBtn);
}
});
// Change on Click event
jQuery(phClassId).on('click', function(e) {
e.preventDefault();// Bootstrap modal (close and open again duplicates
events)
var isActive = jQuery(this).hasClass('on');
if (isActive) {
if (phRequired == 1) {
e.preventDefault();// Active item cannot be unselected when the
select box is required
return false;
}
jQuery(this).removeClass('on');
jQuery('input[name="'+ phSelectName
+'"]').val('');
jQuery(phSelectNameId).val('').change();// Because of
required field
} else {
jQuery(phClassId).removeClass('on');//Remove when multiple
jQuery(this).addClass('on');
jQuery('input[name="'+ phSelectName
+'"]').val(jQuery(this).data('value'));
jQuery(phSelectNameId).val(jQuery(this).data('value')).change();//
Because of required field
}
})
}
})
}
function phAjaxChangeAttributeData(phProductId, phTypeView, phDataA1,
phDataA2){
var phParams = Joomla.getOptions('phParamsPC');
var phVars = Joomla.getOptions('phVarsPC');
var phUrl = phVars['urlCheckoutChangeData'];
var phOptions = [];
phOptions["id"] = phProductId;
phOptions["id_item_price"] = "#phItemPriceBox" +
phTypeView + phProductId;
phOptions["id_item_price_gift"] =
"#phItemPriceGiftBox" + phTypeView + phProductId;
phOptions["id_item_stock"] = "#phItemStockBox" +
phTypeView + phProductId;
phOptions["id_item_id"] = "#phItemIdBox" + phTypeView
+ phProductId;
phOptions["id_item_name"] = "V" + phTypeView +
'P' + phProductId;
phOptions["product_add_to_cart_item"] =
".phProductAddToCart" + phTypeView + phProductId;// display or
hide add to cart button
phOptions["product_add_to_cart_item_icon"] =
".phProductAddToCartIcon" + phTypeView + phProductId;// display
or hide add to cart icon
phOptions["view"] = phTypeView;
phOptions["method_price"] =
phParams['dynamicChangePrice'];
phOptions["method_stock"] =
phParams['dynamicChangeStock'];
phOptions["method_id"] = phParams['dynamicChangeId'];
phOptions["method_image"] =
phParams['dynamicChangeImage'];
phOptions["task"] = "change";
phOptions["type"] = "changedata";
if (phTypeView == 'ItemQuick' || phTypeView == 'Pos'
|| phTypeView == 'Item') {
phOptions["class"] ='ph-item-data-box';
} else {
phOptions["class"] ='ph-category-data-box';//
Category, Items
}
var phData = 'id='+ phOptions["id"]
+'&'+ phDataA1 +'&'+ phDataA2
+'&'+'class='+ phOptions["class"]
+'&'+'typeview='+ phOptions["view"];
phDoRequestMethods(phUrl, phData, phOptions);
}
function phSetAttributeUrl(phSetValueByUser) {
var phParams = Joomla.getOptions('phParamsPC');
var phVars = Joomla.getOptions('phVarsPC');
if (phParams['dynamicChangeUrlAttributes'] != 1) {
return false;
}
if(phVars['view'] != 'item') {
return false;
}
var phHash = jQuery(location).attr('hash');
phHash = phReplaceAll('#', '', phHash)
var phHashParams = jQuery.deparam(phHash);
var phProductAttribute = '.phjProductAttribute';
var phHashNew = '';
var phTypeView = '';
var phProductId = '';
// Change base64 return url - add attribute suffix to the URL so when
products will be added to cart without running ajax
// then it will be redirected back to the site with selected attribute
var attributeForm =
jQuery(phProductAttribute).closest("form");
var attributeFormReturn =
attributeForm.find("input[name=return]");
var attributeFormReturnValue = Base64.decode(attributeFormReturn.val());
// Find all attributes in Item View
jQuery(phProductAttribute).each(function() {
if (phHashNew != '') {
phHashNew = phHashNew + '&';
}
var attributeId = this.id;
var attributeAlias = jQuery(this).data('alias');
var valueAlias = '';// One value for selectbox
var valuesAlias = '';// One or more values for checkbox
var phSelectNameIdT = '#phItemHiddenAttribute' +
jQuery(this).data('attribute-id-name');
if (phSetValueByUser == 1) {
// 1) Set by user
// SELECTBOX
if
(jQuery(this).find(':selected').data('value-alias') !==
undefined) {
valueAlias =
jQuery(this).find(':selected').data('value-alias');
phHashNew = phHashNew + 'a[' +
jQuery(this).data('alias') + ']=' + valueAlias;
}
// CHECKBOX
if
(jQuery(this).find(':input:checked').data('value-alias')
!== undefined) {
jQuery.each(jQuery(this).find(':input:checked'), function(){
if (valuesAlias != '') {
valuesAlias = valuesAlias + ',';
}
valuesAlias = valuesAlias +
jQuery(this).data('value-alias');
});
if (valuesAlias != '') {
phHashNew = phHashNew + 'a[' +
jQuery(this).data('alias') + ']=' + valuesAlias;
}
}
} else {
// 2) Set on document load
if (phHashParams.a !== undefined && attributeAlias !== undefined
&& phHashParams.a[attributeAlias] !== undefined) {
// 2a) Set by the URL parameters - e.g. direct link - attributes will
be set on the site by the URL
phHashNew = phHashNew + 'a[' +
jQuery(this).data('alias') + ']=' +
phHashParams.a[attributeAlias];
var arrayValues = phHashParams.a[attributeAlias].split(",");
if (arrayValues !== undefined || arrayValues.length != 0) {
// clea all selected values first
jQuery("#" + attributeId + "
option").removeAttr("selected");// Select box
jQuery(phSelectNameIdT + "
div").removeClass('on'); // Select Color or Image
jQuery("#" + attributeId + "
input").removeAttr("checked");// Check box
jQuery(arrayValues).each(function() {
jQuery("#" + attributeId + "
option[data-value-alias='" + this +
"']").attr("selected","selected");//
Select box
jQuery(phSelectNameIdT + " div[data-value-alias='" +
this + "']").addClass('on'); // Select Color or
Image
jQuery("#" + attributeId + "
input[data-value-alias='" + this +
"']").attr("checked","checked");// Check
box
})
}
} else {
// 2b) Attribute not found in URL so change the URL be values set as
default (default value for attribute)
// SELECT BOX
if
(jQuery(this).find(':selected').data('value-alias') !==
undefined) {
valueAlias =
jQuery(this).find(':selected').data('value-alias');
phHashNew = phHashNew + 'a[' +
jQuery(this).data('alias') + ']=' + valueAlias;
}
// CHECKBOX
if
(jQuery(this).find(':input:checked').data('value-alias')
!== undefined) {
jQuery.each(jQuery(this).find(':input:checked'), function(){
if (valuesAlias != '') {
valuesAlias = valuesAlias + ',';
}
valuesAlias = valuesAlias +
jQuery(this).data('value-alias');
});
if (valuesAlias != '') {
phHashNew = phHashNew + 'a[' +
jQuery(this).data('alias') + ']=' + valuesAlias;
}
}
}
// Accessible in each parameter - will be used for ajax if set in
parameters
phTypeView = jQuery(this).data('type-view');
phProductId = jQuery(this).data('product-id');
}
})
// URL parameter (hash) can change the setting of attributes, if changed
then ajax which changes stock, price and ID (EAN, SKU), image needs to be
run
if (phParams['dynamicChangePrice'] == 0 &&
phParams['dynamicChangeStock'] == 0 &&
phParams['dynamicChangeId'] == 0 &&
(phParams['dynamicChangeImage'] == 0 ||
phParams['dynamicChangeImage'] == 1)) {
//Interactive change is disabled
} else {
var phProductGroup = '.phjAddToCartV' + phTypeView +
'P' + phProductId;
var phDataA1 =
jQuery(phProductGroup).find('select').serialize();// All Selects
var phDataA2 =
jQuery(phProductGroup).find(':checkbox').serialize();// All
Checkboxes
phAjaxChangeAttributeData(phProductId, phTypeView, phDataA1, phDataA2);
}
// Last character &
if (phHashNew.lastIndexOf('&') == (phHashNew.length - 1)) {
phHashNew = phHashNew.slice(0, -1);
}
// Update URL after #
if (phSetValueByUser == 0 && phHashNew != '') {
phHashNew = '#' + phHashNew;
// Update even form return value to be returned back with selected
attribute
if(attributeFormReturnValue != '') {
attributeFormReturn.val(Base64.encode(attributeFormReturnValue +
phHashNew));
}
window.history.pushState({},"", phHashNew);
} else if (phSetValueByUser == 1) {
phHashNew = '#' + phHashNew;
// Update even form return value to be returned back with selected
attribute
if(attributeFormReturnValue != '') {
attributeFormReturn.val(Base64.encode(attributeFormReturnValue +
phHashNew));
}
window.history.pushState({},"", phHashNew);
}
}
jQuery(document).ready(function() {
phChangeAttributeType();// Change select to color or image, change
checkbox to color or image
phSetAttributeUrl(0);// Change URL (# attributes) or change attributes by
URL at start
/* Interactive change - price, stock, ID (EAN, SKU, ...) */
var phSelectboxA = "select.phjProductAttribute";
var phSelectboxASelected = phSelectboxA + ":selected";
// Select box
jQuery(document).on('change', phSelectboxA, function(e){
var phParams = Joomla.getOptions('phParamsPC');
if (phParams['dynamicChangePrice'] == 0 &&
phParams['dynamicChangeStock'] == 0 &&
phParams['dynamicChangeId'] == 0 &&
(phParams['dynamicChangeImage'] == 0 ||
phParams['dynamicChangeImage'] == 1)) {
return false;// Interactive Change is disabled
}
//jQuery(this).off("change");';
var phTypeView = jQuery(this).data('type-view');
var phProductId = jQuery(this).data('product-id');
var phProductGroup = '.phjAddToCartV' + phTypeView +
'P' + phProductId;
var phDataA1 =
jQuery(phProductGroup).find('select').serialize();// All Selects
var phDataA2 =
jQuery(phProductGroup).find(':checkbox').serialize();// All
Checkboxes
phAjaxChangeAttributeData(phProductId, phTypeView, phDataA1, phDataA2);
phSetAttributeUrl(1);
})
var phCheckboxA =
".ph-checkbox-attribute.phjProductAttribute";
// var phCheckboxAInputChecked = phCheckboxA + "
input:checked";
// Checkbox
jQuery(document).on('click', phCheckboxA, function(e){
var phParams = Joomla.getOptions('phParamsPC');
if (phParams['dynamicChangePrice'] == 0 &&
phParams['dynamicChangeStock'] == 0 &&
phParams['dynamicChangeId'] == 0 &&
(phParams['dynamicChangeImage'] == 0 ||
phParams['dynamicChangeImage'] == 1)) {
return;// Interactive Change is disabled
}
if (e.target.tagName.toUpperCase() === "LABEL") { return;}//
Prevent from twice running
if (phParams['theme'] == 'bs4') {
if (e.target.tagName.toUpperCase() === "SPAN" ||
e.target.tagName.toUpperCase() === "IMG") { return;}// Prevent
from twice running
}
var phProductId = jQuery(this).data('product-id');
var phTypeView = jQuery(this).data('type-view');
var phProductGroup = '.phjAddToCartV' + phTypeView +
'P' + phProductId;
var phDataA1 =
jQuery(phProductGroup).find('select').serialize();// All Selects
var phDataA2 =
jQuery(phProductGroup).find(':checkbox').serialize();// All
Checkboxes
// If REQUIRED, don't allow to untick all checkboxes
var phRequired = jQuery(this).data("required");
var phCheckboxAInputChecked = "#" +
jQuery(this).attr("id") + " input:checked";
var phACheckedLength = jQuery(phCheckboxAInputChecked).length;
if (phACheckedLength == 0) {
var phThisLabel = jQuery(e.target).parent();// Bootstrap
checkboxes - colors, images
phThisLabel.addClass("active");// Bootstrap
checkboxes - colors, images
e.preventDefault();
return false;
}
phAjaxChangeAttributeData(phProductId, phTypeView, phDataA1, phDataA2);
phSetAttributeUrl(1);
})
// Gift coupon
jQuery('.phAOGift').on('input', function() {
var phAOType = '.' + jQuery(this).data('type');
if (phAOType == '.phAOGiftType') {
var title = jQuery(this).data('title');
jQuery('.phAOGiftTitle').text(title);
var image = jQuery(this).data('image');
jQuery('.phAOGiftImage').attr('src', image);
var date = jQuery(this).data('date');
jQuery('.phAOGiftDate').text(date);
var description = jQuery(this).data('description');
description = Base64.decode(description);
jQuery('.phAOGiftDescription').html(description);
var className = jQuery(this).data('class-name');
jQuery(phAOType).attr('class', 'phAOGiftType
ph-gift-voucher-box ' + className);
} else {
jQuery(phAOType).text(jQuery(this).val());
}
});
})
phoca/jquery.phocaattribute.min.js000064400000015345151175232470013331
0ustar00function phChangeAttributeType(e){var t=(e=void
0!==e?".phj"+e:"")+".phjProductAttribute";jQuery(e+".phjCleanAttribute").remove(),jQuery(t).each(function(){var
t,a,e,i="",r="#phItemAttribute"+jQuery(this).data("attribute-id-name"),u="#phItemHiddenAttribute"+jQuery(this).data("attribute-id-name"),d="#phItemBoxAttribute"+jQuery(this).data("attribute-id-name"),s=jQuery(this).data("attribute-type"),h=jQuery(this).data("type-view"),n=jQuery(this).data("type-icon"),c=jQuery(this).data("required");3==s?i="phSelectBoxImage":2==s&&(i="phSelectBoxButton"),""!=i&&(t=u+"
."+i,a=jQuery(r).attr("name"),(e=jQuery('<input
type="hidden"
name="'+a+'">')).val(jQuery(r).val()),e.insertAfter(jQuery(r)),jQuery(u).css("display","block"),jQuery(d).css({display:"visible",position:"absolute",clip:"rect(0,0,0,0)"}),jQuery(d).addClass("phj"+h+"
phjCleanAttribute"),jQuery(r+" option").each(function(){var
e;""!=jQuery(this).val()&&(3==s?e=jQuery('<div
class="'+i+" "+n+'"
data-value="'+jQuery(this).val()+'"
data-value-alias="'+jQuery(this).data("value-alias")+'"
title="'+jQuery(this).text()+'"><img
src="'+jQuery(this).data("image")+'"
alt="'+jQuery(this).text()+'"
/></div>'):2==s&&(e=jQuery('<div
class="'+i+" "+n+'"
style="background-color:'+jQuery(this).data("color")+'"
data-value="'+jQuery(this).val()+'"
data-value-alias="'+jQuery(this).data("value-alias")+'"
title="'+jQuery(this).text()+'"> </div>')),jQuery(this).is(":selected")&&e.addClass("on"),jQuery(u).append(e))}),jQuery(t).on("click",function(e){if(e.preventDefault(),jQuery(this).hasClass("on")){if(1==c)return
e.preventDefault(),!1;jQuery(this).removeClass("on"),jQuery('input[name="'+a+'"]').val(""),jQuery(r).val("").change()}else
jQuery(t).removeClass("on"),jQuery(this).addClass("on"),jQuery('input[name="'+a+'"]').val(jQuery(this).data("value")),jQuery(r).val(jQuery(this).data("value")).change()}))})}function
phAjaxChangeAttributeData(e,t,a,i){var
r=Joomla.getOptions("phParamsPC"),u=Joomla.getOptions("phVarsPC").urlCheckoutChangeData,d=[];d.id=e,d.id_item_price="#phItemPriceBox"+t+e,d.id_item_price_gift="#phItemPriceGiftBox"+t+e,d.id_item_stock="#phItemStockBox"+t+e,d.id_item_id="#phItemIdBox"+t+e,d.id_item_name="V"+t+"P"+e,d.product_add_to_cart_item=".phProductAddToCart"+t+e,d.product_add_to_cart_item_icon=".phProductAddToCartIcon"+t+e,d.view=t,d.method_price=r.dynamicChangePrice,d.method_stock=r.dynamicChangeStock,d.method_id=r.dynamicChangeId,d.method_image=r.dynamicChangeImage,d.task="change",d.type="changedata",d.class="ItemQuick"==t||"Pos"==t||"Item"==t?"ph-item-data-box":"ph-category-data-box";i="id="+d.id+"&"+a+"&"+i+"&class="+d.class+"&typeview="+d.view;phDoRequestMethods(u,i,d)}function
phSetAttributeUrl(u){var
e=Joomla.getOptions("phParamsPC"),t=Joomla.getOptions("phVarsPC");if(1!=e.dynamicChangeUrlAttributes)return!1;if("item"!=t.view)return!1;var
a=jQuery(location).attr("hash"),a=phReplaceAll("#","",a),d=jQuery.deparam(a),i=".phjProductAttribute",s="",h="",n="",t=jQuery(i).closest("form").find("input[name=return]"),a=Base64.decode(t.val());jQuery(i).each(function(){""!=s&&(s+="&");var
e=this.id,t=jQuery(this).data("alias"),a="",i="",r="#phItemHiddenAttribute"+jQuery(this).data("attribute-id-name");1==u?(void
0!==jQuery(this).find(":selected").data("value-alias")&&(a=jQuery(this).find(":selected").data("value-alias"),s=s+"a["+jQuery(this).data("alias")+"]="+a),void
0!==jQuery(this).find(":input:checked").data("value-alias")&&(jQuery.each(jQuery(this).find(":input:checked"),function(){""!=i&&(i+=","),i+=jQuery(this).data("value-alias")}),""!=i&&(s=s+"a["+jQuery(this).data("alias")+"]="+i))):(void
0!==d.a&&void 0!==t&&void
0!==d.a[t]?(s=s+"a["+jQuery(this).data("alias")+"]="+d.a[t],void
0===(t=d.a[t].split(","))&&0==t.length||(jQuery("#"+e+"
option").removeAttr("selected"),jQuery(r+"
div").removeClass("on"),jQuery("#"+e+"
input").removeAttr("checked"),jQuery(t).each(function(){jQuery("#"+e+"
option[data-value-alias='"+this+"']").attr("selected","selected"),jQuery(r+"
div[data-value-alias='"+this+"']").addClass("on"),jQuery("#"+e+"
input[data-value-alias='"+this+"']").attr("checked","checked")}))):(void
0!==jQuery(this).find(":selected").data("value-alias")&&(a=jQuery(this).find(":selected").data("value-alias"),s=s+"a["+jQuery(this).data("alias")+"]="+a),void
0!==jQuery(this).find(":input:checked").data("value-alias")&&(jQuery.each(jQuery(this).find(":input:checked"),function(){""!=i&&(i+=","),i+=jQuery(this).data("value-alias")}),""!=i&&(s=s+"a["+jQuery(this).data("alias")+"]="+i))),h=jQuery(this).data("type-view"),n=jQuery(this).data("product-id"))}),(0!=e.dynamicChangePrice||0!=e.dynamicChangeStock||0!=e.dynamicChangeId||0!=e.dynamicChangeImage&&1!=e.dynamicChangeImage)&&(i=".phjAddToCartV"+h+"P"+n,e=jQuery(i).find("select").serialize(),i=jQuery(i).find(":checkbox").serialize(),phAjaxChangeAttributeData(n,h,e,i)),s.lastIndexOf("&")==s.length-1&&(s=s.slice(0,-1)),(0==u&&""!=s||1==u)&&(s="#"+s,""!=a&&t.val(Base64.encode(a+s)),window.history.pushState({},"",s))}jQuery(document).ready(function(){phChangeAttributeType(),phSetAttributeUrl(0);var
e="select.phjProductAttribute";jQuery(document).on("change",e,function(e){var
t=Joomla.getOptions("phParamsPC");if(0==t.dynamicChangePrice&&0==t.dynamicChangeStock&&0==t.dynamicChangeId&&(0==t.dynamicChangeImage||1==t.dynamicChangeImage))return!1;var
a=jQuery(this).data("type-view"),i=jQuery(this).data("product-id"),t=".phjAddToCartV"+a+"P"+i;phAjaxChangeAttributeData(i,a,jQuery(t).find("select").serialize(),jQuery(t).find(":checkbox").serialize()),phSetAttributeUrl(1)});jQuery(document).on("click",".ph-checkbox-attribute.phjProductAttribute",function(e){var
t=Joomla.getOptions("phParamsPC");if((0!=t.dynamicChangePrice||0!=t.dynamicChangeStock||0!=t.dynamicChangeId||0!=t.dynamicChangeImage&&1!=t.dynamicChangeImage)&&"LABEL"!==e.target.tagName.toUpperCase()&&("bs4"!=t.theme||"SPAN"!==e.target.tagName.toUpperCase()&&"IMG"!==e.target.tagName.toUpperCase())){var
a=jQuery(this).data("product-id"),i=jQuery(this).data("type-view"),r=".phjAddToCartV"+i+"P"+a,u=jQuery(r).find("select").serialize(),t=jQuery(r).find(":checkbox").serialize(),r=(jQuery(this).data("required"),"#"+jQuery(this).attr("id")+"
input:checked"),r=jQuery(r).length;if(0==r)return
jQuery(e.target).parent().addClass("active"),e.preventDefault(),!1;phAjaxChangeAttributeData(a,i,u,t),phSetAttributeUrl(1)}}),jQuery(".phAOGift").on("input",function(){var
e,t="."+jQuery(this).data("type");".phAOGiftType"==t?(e=jQuery(this).data("title"),jQuery(".phAOGiftTitle").text(e),e=jQuery(this).data("image"),jQuery(".phAOGiftImage").attr("src",e),e=jQuery(this).data("date"),jQuery(".phAOGiftDate").text(e),e=jQuery(this).data("description"),e=Base64.decode(e),jQuery(".phAOGiftDescription").html(e),e=jQuery(this).data("class-name"),jQuery(t).attr("class","phAOGiftType
ph-gift-voucher-box
"+e)):jQuery(t).text(jQuery(this).val())})});phoca/jquery.phocaattributerequired.js000064400000006553151175232470014311
0ustar00/*
* jQuery Phoca Attribute Required
* https://www.phoca.cz
*
* Copyright (C) 2016 Jan Pavelka www.phoca.cz
*
* Licensed under the MIT license
*/
/* CHECKBOXES */
/* Check if attribute is required (non standard attribute: not select but
image checkboxes)
* Image checkboxes cannot be checked by HTML5
* The check must be done manually per javascript
* There are different functions for different views because views can be
in conflict - itemquick loaded in category
*/
jQuery(document).ready(function(){
jQuery(document).on('click', '.phjAddToCart.phjItem
button[type="submit"]', function() {
jQuery(this).closest("form").find('
.checkbox-group.required input:checkbox').each(function() {// 1
var phAttributeGroup =
jQuery(this).closest(".checkbox-group").attr('id');// 2
var phAttributeGroupItems = jQuery('.phjAddToCart.phjItem #' +
phAttributeGroup + ' input:checkbox');// 3
phAttributeGroupItems.prop('required', true);
if(phAttributeGroupItems.is(":checked")){
phAttributeGroupItems.prop('required', false);
}
})
});
})
jQuery(document).ready(function(){
jQuery(document).on('click', '.phjAddToCart.phjCategory
button[type="submit"]', function() {
jQuery(this).closest("form").find('
.checkbox-group.required input:checkbox').each(function() {// 1
var phAttributeGroup =
jQuery(this).closest(".checkbox-group").attr('id');// 2
var phAttributeGroupItems = jQuery('.phjAddToCart.phjCategory
#' + phAttributeGroup + ' input:checkbox');// 3
phAttributeGroupItems.prop('required', true);
if(phAttributeGroupItems.is(":checked")){
phAttributeGroupItems.prop('required', false);
}
})
});
})
jQuery(document).ready(function(){
jQuery(document).on('click', '.phjAddToCart.phjItems
button[type="submit"]', function() {
jQuery(this).closest("form").find('
.checkbox-group.required input:checkbox').each(function() {// 1
var phAttributeGroup =
jQuery(this).closest(".checkbox-group").attr('id');// 2
var phAttributeGroupItems = jQuery('.phjAddToCart.phjItems #'
+ phAttributeGroup + ' input:checkbox');// 3
phAttributeGroupItems.prop('required', true);
if(phAttributeGroupItems.is(":checked")){
phAttributeGroupItems.prop('required', false);
}
})
});
})
jQuery(document).ready(function(){
jQuery(document).on('click', '.phjAddToCart.phjItemQuick
button[type="submit"]', function() {
jQuery(this).closest("form").find('
.checkbox-group.required input:checkbox').each(function() {// 1
var phAttributeGroup =
jQuery(this).closest(".checkbox-group").attr('id');// 2
var phAttributeGroupItems = jQuery('.phjAddToCart.phjItemQuick
#' + phAttributeGroup + ' input:checkbox');// 3
phAttributeGroupItems.prop('required', true);
if(phAttributeGroupItems.is(":checked")){
phAttributeGroupItems.prop('required', false);
}
})
});
})
jQuery(document).ready(function(){
jQuery(document).on('click', '.phjAddToCart.phjPos
button[type="submit"]', function() {
jQuery(this).closest("form").find('
.checkbox-group.required input:checkbox').each(function() {// 1
var phAttributeGroup =
jQuery(this).closest(".checkbox-group").attr('id');// 2
var phAttributeGroupItems = jQuery('.phjAddToCart.phjPos #' +
phAttributeGroup + ' input:checkbox');// 3
phAttributeGroupItems.prop('required', true);
if(phAttributeGroupItems.is(":checked")){
phAttributeGroupItems.prop('required', false);
}
})
});
})
phoca/jquery.phocaattributerequired.min.js000064400000003704151175232470015066
0ustar00jQuery(document).ready(function(){jQuery(document).on("click",'.phjAddToCart.phjItem
button[type="submit"]',function(){jQuery(this).closest("form").find("
.checkbox-group.required input:checkbox").each(function(){var
e=jQuery(this).closest(".checkbox-group").attr("id"),e=jQuery(".phjAddToCart.phjItem
#"+e+"
input:checkbox");e.prop("required",!0),e.is(":checked")&&e.prop("required",!1)})})}),jQuery(document).ready(function(){jQuery(document).on("click",'.phjAddToCart.phjCategory
button[type="submit"]',function(){jQuery(this).closest("form").find("
.checkbox-group.required input:checkbox").each(function(){var
e=jQuery(this).closest(".checkbox-group").attr("id"),e=jQuery(".phjAddToCart.phjCategory
#"+e+"
input:checkbox");e.prop("required",!0),e.is(":checked")&&e.prop("required",!1)})})}),jQuery(document).ready(function(){jQuery(document).on("click",'.phjAddToCart.phjItems
button[type="submit"]',function(){jQuery(this).closest("form").find("
.checkbox-group.required input:checkbox").each(function(){var
e=jQuery(this).closest(".checkbox-group").attr("id"),e=jQuery(".phjAddToCart.phjItems
#"+e+"
input:checkbox");e.prop("required",!0),e.is(":checked")&&e.prop("required",!1)})})}),jQuery(document).ready(function(){jQuery(document).on("click",'.phjAddToCart.phjItemQuick
button[type="submit"]',function(){jQuery(this).closest("form").find("
.checkbox-group.required input:checkbox").each(function(){var
e=jQuery(this).closest(".checkbox-group").attr("id"),e=jQuery(".phjAddToCart.phjItemQuick
#"+e+"
input:checkbox");e.prop("required",!0),e.is(":checked")&&e.prop("required",!1)})})}),jQuery(document).ready(function(){jQuery(document).on("click",'.phjAddToCart.phjPos
button[type="submit"]',function(){jQuery(this).closest("form").find("
.checkbox-group.required input:checkbox").each(function(){var
e=jQuery(this).closest(".checkbox-group").attr("id"),e=jQuery(".phjAddToCart.phjPos
#"+e+"
input:checkbox");e.prop("required",!0),e.is(":checked")&&e.prop("required",!1)})})});phoca/jquery.phocaswapimage.js000064400000004331151175232470012512
0ustar00/*
* jQuery Phoca SwapImage
* https://www.phoca.cz
*
* Copyright (C) 2016 Jan Pavelka www.phoca.cz
*
* Licensed under the MIT license
*/
jQuery(document).ready(function() {
jQuery(document).on('change', '.phjProductAttribute',
function(){
var phProductIdName = jQuery(this).data('product-id-name');
var phProductImg = '.phjProductImage' + phProductIdName;
var phProductSource = '.phjProductSource' + phProductIdName;//
Webp source
var phProductHref = '.phjProductHref' + phProductIdName;
var phDefaultSrc = jQuery(phProductImg).data('image');// image
includes data-image attribute
var phDefaultHref = jQuery(phProductHref).data('href');//
image includes data-image attribute
var phNewSrc =
jQuery(this).find(':selected,:checked').data('image-option');//
Set image from current selectbox (selectbox which was changed)
var phSelectedSrc = false; // Find selected image from all attributes of
all select boxes in the form
/* jQuery(this).each(function( index ) {
var phFoundSrc =
jQuery(this).find(':selected,:checked').data('image-option');
if(phFoundSrc) {
phSelectedSrc = phFoundSrc;
}
}); */
jQuery(this).closest("form").find('.phjProductAttribute').each(function()
{
var phFoundSrc =
jQuery(this).find(':selected,:checked').data('image-option');
if(phFoundSrc) {
phSelectedSrc = phFoundSrc;
}
})
var phNewHref = phNewSrc;
var phSelectedHref = phSelectedSrc;
if (phNewSrc) {
// New image found - change to new image
jQuery(phProductHref).attr('href', phNewHref);
jQuery(phProductImg).attr('src', phNewSrc);
jQuery(phProductSource).attr('srcset', phNewSrc);//webp
} else if (!phNewSrc && phSelectedSrc) {
// New image not found but there is some selected image yet (e.g.
selected previously in other select box)
jQuery(phProductHref).attr('href', phSelectedHref);
jQuery(phProductImg).attr('src', phSelectedSrc);
jQuery(phProductSource).attr('srcset', phSelectedSrc);//webp
} else {
// Return back to default image (no new image, no selected image by
other select box)
jQuery(phProductHref).attr('href', phDefaultHref);
jQuery(phProductImg).attr('src', phDefaultSrc);
jQuery(phProductSource).attr('srcset', phDefaultSrc);//webp
}
})
})
phoca/jquery.phocaswapimage.min.js000064400000001342151175232470013273
0ustar00jQuery(document).ready(function(){jQuery(document).on("change",".phjProductAttribute",function(){var
t=jQuery(this).data("product-id-name"),r=".phjProductImage"+t,e=".phjProductSource"+t,u=".phjProductHref"+t,a=jQuery(r).data("image"),c=jQuery(u).data("href"),d=jQuery(this).find(":selected,:checked").data("image-option"),j=!1;jQuery(this).closest("form").find(".phjProductAttribute").each(function(){var
t=jQuery(this).find(":selected,:checked").data("image-option");t&&(j=t)});var
o=d,t=j;d?(jQuery(u).attr("href",o),jQuery(r).attr("src",d),jQuery(e).attr("srcset",d)):!d&&j?(jQuery(u).attr("href",t),jQuery(r).attr("src",j),jQuery(e).attr("srcset",j)):(jQuery(u).attr("href",c),jQuery(r).attr("src",a),jQuery(e).attr("srcset",a))})});phoca/jquery.phocawindowpopup.js000064400000000742151175232470013132
0ustar00/*
* jQuery Phoca WindowPopup
* https://www.phoca.cz
*
* Copyright (C) 2016 Jan Pavelka www.phoca.cz
*
* Licensed under the MIT license
*/
function phWindowPopup(url, name, rW, rH) {
var w = screen.width / rW;
var h = screen.height / rH;
var params = 'width='+w+', height='+h+',
resizable=yes, scrollbars=yes, menubar=no, status=no, location=no,
toolbar=no';
phWindow = window.open(url, name, params);
if(window.focus) {
phWindow.focus();
}
return false;
}
phoca/jquery.phocawindowpopup.min.js000064400000000355151175232470013714
0ustar00function
phWindowPopup(o,n,e,i){i="width="+screen.width/e+",
height="+screen.height/i+", resizable=yes, scrollbars=yes,
menubar=no, status=no, location=no, toolbar=no";return
phWindow=window.open(o,n,i),window.focus&&phWindow.focus(),!1}phoca/phocacart.js000064400000025014151175232470010151
0ustar00/*
* @package Phoca Cart
* @author Jan Pavelka - https://www.phoca.cz
* @copyright Copyright (C) Jan Pavelka https://www.phoca.cz
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 and later
* @cms Joomla
* @copyright Copyright (C) Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
*/
function phRemoveUrlParameter(param, url) {
var rtn = url.split("?")[0],
param,
params_arr = [],
queryString = (url.indexOf("?") !== -1) ?
url.split("?")[1] : "";
if (queryString !== "") {
params_arr = queryString.split("&");
for (var i = params_arr.length - 1; i >= 0; i -= 1) {
paramV = params_arr[i].split("=")[0];
if (paramV === param) {
params_arr.splice(i, 1);
}
}
rtn = rtn + "?" + params_arr.join("&");
}
return rtn;
}
function startOverlay(outputDiv) {
var phOverlay = jQuery('<div
id="phOverlayDiv"><div id="phLoaderFull">
</div></div>');
phOverlay.appendTo(outputDiv);
jQuery("#phOverlayDiv").fadeIn().css("display","block");
}
function startFullOverlay(phA) {
if (phA == 2) {
} else {
var phOverlay = jQuery('<div id="phOverlay"><div
id="phLoaderFull"> </div></div>');
phOverlay.appendTo(document.body);
jQuery("#phOverlay").fadeIn().css("display","block");
}
}
function stopOverlay() {
jQuery("#phOverlay").fadeIn().css("display","none");
}
function phRemoveParamFromUrl(key, sourceURL) {
var rtn = sourceURL.split("?")[0],
param,
params_arr = [],
queryString = (sourceURL.indexOf("?") !== -1) ?
sourceURL.split("?")[1] : "";
if (queryString !== "") {
params_arr = queryString.split("&");
for (var i = params_arr.length - 1; i >= 0; i -= 1) {
param = params_arr[i].split("=")[0];
if (param === key) {
params_arr.splice(i, 1);
}
}
rtn = rtn + "?" + params_arr.join("&");
}
return rtn;
}
function phUpdatePageAndParts(url, source) {
var phVars = Joomla.getOptions('phVarsPC');
var phParamsS =
Joomla.getOptions('phParamsModPhocacartSearch');
var ds = '/';
if (phVars['basePath'] == 'undefined' ||
phVars['basePath'] == '') {
ds = '';
}
// Firefox problem
// FROM:
//window.history.pushState({},"", url);// update URL
// TO:
if (url == '') {
window.history.pushState({},"", location.pathname);// update
URL
} else {
window.history.pushState({},"", url);// update URL
}
if (url != '') {
// Remove format and set the raw
var urlMain = phRemoveParamFromUrl('format', url);
urlMain = url + '&format=raw';
} else {
var urlMain = '?format=raw';
}
// Remove possible conflict params in URL
var urlModule = phRemoveParamFromUrl('option', urlMain);
urlModule = phRemoveParamFromUrl('view', urlModule);
urlModule = phRemoveParamFromUrl('module', urlModule);
urlModule = urlModule.substring(urlModule.indexOf('?') + 1);
var urlSearchModule = phVars['basePath'] + ds +
'index.php?option=com_ajax&module=phocacart_search';
var urlFilterModule = phVars['basePath'] + ds +
'index.php?option=com_ajax&module=phocacart_filter';
if (urlModule.indexOf("?") == 0) {
urlSearchModule = urlSearchModule + '&'
+urlModule.substr(1);
urlFilterModule = urlFilterModule + '&'
+urlModule.substr(1);
} else if (urlModule.indexOf("&") == 0) {
urlSearchModule = urlSearchModule + urlModule;
urlFilterModule = urlFilterModule + urlModule;
} else {
urlSearchModule = urlSearchModule + '&' + urlModule;
urlFilterModule = urlFilterModule + '&' + urlModule;
}
if (typeof phParamsS != 'undefined' &&
phVars['mod_phocacart_search'] == 1 &&
phParamsS['displayActiveParameters'] == 1) {
// Update filter only when
phRenderPagePart({}, 'phSearchActiveTags', urlSearchModule);//
AJAX update search module
}
if (typeof phVars != 'undefined' &&
phVars['mod_phocacart_filter'] == 1 && source == 2) {
// Update filter only when source comes from search filter
phRenderPagePart({}, 'phFilterBox', urlFilterModule);// AJAX
update filter module
}
phRenderPage({},urlMain );// AJAX update main page
}
function phRenderPage(sFormData, phUrlJs) {
var phVars = Joomla.getOptions('phVarsPC');
var phParams = Joomla.getOptions('phParamsPC');
var outputDiv = '#' + phVars['renderPageOutput'];
var phUrl = phVars['renderPageUrl'];
var isPOS = phVars['isPOS'];
var loadChosen = phParams['loadChosen'];
startOverlay(outputDiv);
phUrl = typeof phUrlJs !== "undefined" ? phUrlJs : phUrl;
phRequest = jQuery.ajax({
type: "POST",
url: phUrl,
async: true,
cache: "false",
data: sFormData,
dataType:"HTML",
success: function(data){
jQuery(outputDiv).html(data);
if (isPOS == 1) {
phPosManagePage();
}
if (loadChosen == 1) {
jQuery('select').chosen('destroy').chosen({disable_search_threshold
: 10,allow_single_deselect : true});
}
if (typeof phChangeAttributeType === "function") {
phChangeAttributeType();// Recreate the select attribute (color, image)
after AJAX
}
if(typeof phLazyLoadInstance !== "undefined" &&
phLazyLoadInstance) {
phLazyLoadInstance.update();// Lazy load - reload if enabled
}
stopOverlay();
}
})
return false;
}
function phRenderPagePart(sFormData, outputDiv, phUrl) {
phRequest = jQuery.ajax({
type: "POST",
url: phUrl,
async: true,
cache: "false",
data: sFormData,
dataType:"HTML",
success: function(data){
outputDiv = '#'+ outputDiv;
jQuery(outputDiv).html(data);
}
})
}
function phDisableRequirement() {
var phParams = Joomla.getOptions('phParamsPC');
var loadChosen = phParams['loadChosen'];
var selectC = jQuery("#jform_country_phs");
var selectR = jQuery("#jform_region_phs");
var checked =
jQuery('#phCheckoutBillingSameAsShipping').prop('checked');
if (checked) {
jQuery(".phShippingFormFields").prop("readonly",
true);
selectC.attr("disabled", "disabled");
selectR.attr("disabled", "disabled");
jQuery(".phShippingFormFieldsRequired").removeAttr('aria-required');
jQuery(".phShippingFormFieldsRequired").removeAttr('required');
if (loadChosen > 0) {
jQuery(".phShippingFormFieldsRequired").trigger("chosen:updated");
jQuery(".phShippingFormFields").trigger("chosen:updated");
}
} else {
jQuery(".phShippingFormFieldsRequired").prop('aria-required',
'true');
jQuery(".phShippingFormFieldsRequired").prop('required',
'true');
jQuery(".phShippingFormFields").removeAttr('readonly');
selectC.removeAttr("disabled");
selectR.removeAttr("disabled");
if (loadChosen > 0) {
jQuery(".phShippingFormFieldsRequired").trigger("chosen:updated");
jQuery(".phShippingFormFields").trigger("chosen:updated");
}
}
}
function phRenderBillingAndShippingSame() {
phDisableRequirement();
jQuery("#phCheckoutBillingSameAsShipping").on('click',
function() {
phDisableRequirement();
})
}
// Events
function phEventChangeFormPagination(sForm, sItem) {
var phVars = Joomla.getOptions('phVarsPC');
var phParams = Joomla.getOptions('phParamsPC');
var phA = 1;// Full Overlay Yes
// If pagination changes on top (ordering or display num then the bottom
pagination is reloaded by ajax
// But if bottom pagination changes, the top pagination is not reloaded
// so we need to copy the bottom values from ordering and display num
selectbox
// and set it to top
// top id: itemorderingtop, limittop
// bottom id: itemordering, limit
var phSelectBoxVal = jQuery(sItem).val();
var phSelectBoxId = "#" + jQuery(sItem).attr("id") +
"top";
jQuery(phSelectBoxId).val(phSelectBoxVal);
var formName = jQuery(sForm).attr("name");
if (phParams['ajaxPaginationCategory'] == 1 ||
phVars['isPOS'] == 1) {
// Everything is AJAX - pagination top even pagination bottom
var phUrl = window.location.href;
phRenderPage(jQuery(sForm).serialize(), phUrl);
} else {
// Only top pagination is ajax, bottom pagination is not ajax start prev
1 2 3 next end
if (formName == "phitemstopboxform") {// AJAX - Top pagination
always ajax
var phUrl = window.location.href;
phRenderPage(jQuery(sForm).serialize(), phUrl);
} else {
sForm.submit();// STANDARD
startFullOverlay(phA);
}
}
}
function phNumberFormat (number, decimals, decPoint, thousandsSep) {
number = (number + '').replace(/[^0-9+\-Ee.]/g, '')
var n = !isFinite(+number) ? 0 : +number
var prec = !isFinite(+decimals) ? 0 : Math.abs(decimals)
var sep = (typeof thousandsSep === 'undefined') ? ','
: thousandsSep
var dec = (typeof decPoint === 'undefined') ? '.' :
decPoint
var s = ''
var toFixedFix = function (n, prec) {
var k = Math.pow(10, prec)
return '' + (Math.round(n * k) / k)
.toFixed(prec)
}
// @to do: for IE parseFloat(0.55).toFixed(0) = 0;
s = (prec ? toFixedFix(n, prec) : '' +
Math.round(n)).split('.')
if (s[0].length > 3) {
s[0] = s[0].replace(/\B(?=(?:\d{3})+(?!\d))/g, sep)
}
if ((s[1] || '').length < prec) {
s[1] = s[1] || ''
s[1] += new Array(prec - s[1].length + 1).join('0')
}
return s.join(dec)
}
// ------
// Events
// ------
jQuery(document).ready(function(){
// ::EVENT (CLICK) Change Layout Type Clicking on Grid, Gridlist, List
jQuery(".phItemSwitchLayoutType").on('click', function
(e) {
var phDataL = jQuery(this).data("layouttype");// Get the right
button (list, grid, gridlist)
var sForm = jQuery(this).closest("form");// Find in which form
the right button was clicked
var sFormData = sForm.serialize() + "&layouttype=" +
phDataL;
jQuery(".phItemSwitchLayoutType").removeClass("active");
jQuery(".phItemSwitchLayoutType." +
phDataL).addClass("active");
var phUrl = window.location.href;
phRenderPage(sFormData, phUrl);
})
// ::EVENT (CLICK) Pagination - Clicking on Start Prev 1 2 3 Next End
jQuery(document).on('click', ".phPaginationBox .pagination
li a", function (e) {
var phVars = Joomla.getOptions('phVarsPC');
var phParams = Joomla.getOptions('phParamsPC');
if (phParams['ajaxPaginationCategory'] == 1 ||
phVars['isPOS'] == 1) {
var phUrl = jQuery(this).attr("href");
var sForm = jQuery(this).closest("form");// Find in which form
the right button was clicked
var sFormData = sForm.serialize();
phRenderPage(sFormData, phUrl);
// Don't set format for url bar (e.g. pagination uses ajax with raw
- such cannot be set in url bar)
// we use ajax and pagination for different views inside one view
(customers, products, orders) so we cannot set this parameter in url,
because of ajax
//if (phVars['isPOS'] == 1) {
phUrl = phRemoveUrlParameter("format", phUrl);
phUrl = phRemoveUrlParameter("start", phUrl);
//}
window.history.pushState("", "", phUrl);// change
url bar
e.preventDefault();
}
})
phRenderBillingAndShippingSame();
})phoca/phocacart.min.js000064400000012051151175232470010730
0ustar00function phRemoveUrlParameter(e,a){var
r=a.split("?")[0],t=[],a=-1!==a.indexOf("?")?a.split("?")[1]:"";if(""!==a){for(var
i=(t=a.split("&")).length-1;0<=i;--i)paramV=t[i].split("=")[0],paramV===e&&t.splice(i,1);r=r+"?"+t.join("&")}return
r}function startOverlay(e){jQuery('<div
id="phOverlayDiv"><div id="phLoaderFull">
</div></div>').appendTo(e),jQuery("#phOverlayDiv").fadeIn().css("display","block")}function
startFullOverlay(e){2==e||(jQuery('<div
id="phOverlay"><div id="phLoaderFull">
</div></div>').appendTo(document.body),jQuery("#phOverlay").fadeIn().css("display","block"))}function
stopOverlay(){jQuery("#phOverlay").fadeIn().css("display","none")}function
phRemoveParamFromUrl(e,a){var
r=a.split("?")[0],t=[],a=-1!==a.indexOf("?")?a.split("?")[1]:"";if(""!==a){for(var
i=(t=a.split("&")).length-1;0<=i;--i)t[i].split("=")[0]===e&&t.splice(i,1);r=r+"?"+t.join("&")}return
r}function phUpdatePageAndParts(e,a){var
r,t=Joomla.getOptions("phVarsPC"),i=Joomla.getOptions("phParamsModPhocacartSearch"),o="/";"undefined"!=t.basePath&&""!=t.basePath||(o=""),""==e?window.history.pushState({},"",location.pathname):window.history.pushState({},"",e),r=""!=e?(r=phRemoveParamFromUrl("format",e),e+"&format=raw"):"?format=raw";var
n=phRemoveParamFromUrl("option",r),n=phRemoveParamFromUrl("view",n);n=(n=phRemoveParamFromUrl("module",n)).substring(n.indexOf("?")+1);e=t.basePath+o+"index.php?option=com_ajax&module=phocacart_search",o=t.basePath+o+"index.php?option=com_ajax&module=phocacart_filter";0==n.indexOf("?")?(e=e+"&"+n.substr(1),o=o+"&"+n.substr(1)):0==n.indexOf("&")?(e+=n,o+=n):(e=e+"&"+n,o=o+"&"+n),void
0!==i&&1==t.mod_phocacart_search&&1==i.displayActiveParameters&&phRenderPagePart({},"phSearchActiveTags",e),void
0!==t&&1==t.mod_phocacart_filter&&2==a&&phRenderPagePart({},"phFilterBox",o),phRenderPage({},r)}function
phRenderPage(e,a){var
r=Joomla.getOptions("phVarsPC"),t=Joomla.getOptions("phParamsPC"),i="#"+r.renderPageOutput,o=r.renderPageUrl,n=r.isPOS,p=t.loadChosen;return
startOverlay(i),o=void
0!==a?a:o,phRequest=jQuery.ajax({type:"POST",url:o,async:!0,cache:"false",data:e,dataType:"HTML",success:function(e){jQuery(i).html(e),1==n&&phPosManagePage(),1==p&&jQuery("select").chosen("destroy").chosen({disable_search_threshold:10,allow_single_deselect:!0}),"function"==typeof
phChangeAttributeType&&phChangeAttributeType(),"undefined"!=typeof
phLazyLoadInstance&&phLazyLoadInstance&&phLazyLoadInstance.update(),stopOverlay()}}),!1}function
phRenderPagePart(e,a,r){phRequest=jQuery.ajax({type:"POST",url:r,async:!0,cache:"false",data:e,dataType:"HTML",success:function(e){a="#"+a,jQuery(a).html(e)}})}function
phDisableRequirement(){var
e=Joomla.getOptions("phParamsPC").loadChosen,a=jQuery("#jform_country_phs"),r=jQuery("#jform_region_phs");jQuery("#phCheckoutBillingSameAsShipping").prop("checked")?(jQuery(".phShippingFormFields").prop("readonly",!0),a.attr("disabled","disabled"),r.attr("disabled","disabled"),jQuery(".phShippingFormFieldsRequired").removeAttr("aria-required"),jQuery(".phShippingFormFieldsRequired").removeAttr("required")):(jQuery(".phShippingFormFieldsRequired").prop("aria-required","true"),jQuery(".phShippingFormFieldsRequired").prop("required","true"),jQuery(".phShippingFormFields").removeAttr("readonly"),a.removeAttr("disabled"),r.removeAttr("disabled")),0<e&&(jQuery(".phShippingFormFieldsRequired").trigger("chosen:updated"),jQuery(".phShippingFormFields").trigger("chosen:updated"))}function
phRenderBillingAndShippingSame(){phDisableRequirement(),jQuery("#phCheckoutBillingSameAsShipping").on("click",function(){phDisableRequirement()})}function
phEventChangeFormPagination(e,a){var
r=Joomla.getOptions("phVarsPC"),t=Joomla.getOptions("phParamsPC"),i=jQuery(a).val(),a="#"+jQuery(a).attr("id")+"top";jQuery(a).val(i);i=jQuery(e).attr("name");1==t.ajaxPaginationCategory||1==r.isPOS||"phitemstopboxform"==i?(i=window.location.href,phRenderPage(jQuery(e).serialize(),i)):(e.submit(),startFullOverlay(1))}function
phNumberFormat(e,a,r,t){e=(e+"").replace(/[^0-9+\-Ee.]/g,"");var
i,o,n,p=isFinite(+e)?+e:0,e=isFinite(+a)?Math.abs(a):0,a=void
0===t?",":t,t=void 0===r?".":r,r="";return
3<(r=(e?(i=p,o=e,n=Math.pow(10,o),""+(Math.round(i*n)/n).toFixed(o)):""+Math.round(p)).split("."))[0].length&&(r[0]=r[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,a)),(r[1]||"").length<e&&(r[1]=r[1]||"",r[1]+=new
Array(e-r[1].length+1).join("0")),r.join(t)}jQuery(document).ready(function(){jQuery(".phItemSwitchLayoutType").on("click",function(e){var
a=jQuery(this).data("layouttype"),r=jQuery(this).closest("form").serialize()+"&layouttype="+a;jQuery(".phItemSwitchLayoutType").removeClass("active"),jQuery(".phItemSwitchLayoutType."+a).addClass("active"),phRenderPage(r,window.location.href)}),jQuery(document).on("click",".phPaginationBox
.pagination li a",function(e){var
a=Joomla.getOptions("phVarsPC");1!=Joomla.getOptions("phParamsPC").ajaxPaginationCategory&&1!=a.isPOS||(a=jQuery(this).attr("href"),phRenderPage(jQuery(this).closest("form").serialize(),a),a=phRemoveUrlParameter("format",a),a=phRemoveUrlParameter("start",a),window.history.pushState("","",a),e.preventDefault())}),phRenderBillingAndShippingSame()});phoca/phocafilter.js000064400000043215151175232470010510
0ustar00/* @package Joomla
* @copyright Copyright (C) Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
* @extension Phoca Extension
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
*/
var phFilterNewUrlSet = '';
var phFilterNewUrlRemove = '';
var phFilterNewUrlSetPreviousParamWaiting = 0;
var phFilterNewUrlRemovePreviousParamWaiting = 0;
function phReplaceAll(find, replace, str) {
return str.replace(new RegExp(find, 'gi'), replace);
}
function phEscapeRegExp(string) {
return string.replace(/([.*+?^=!:${}()|\[\]\/\\])/g,
"\\$1");
}
function phReplaceAll(find, replace, string) {
return string.replace(new RegExp(phEscapeRegExp(find), 'g'),
replace);
}
function phEncode(string) {
var s;
s = encodeURIComponent(string);
s = phReplaceAll('%5B', '[', s);
s = phReplaceAll('%5D', ']', s);
s = phReplaceAll('%2C', ',', s);
s = phReplaceAll('%3A', ':', s);
return s;
}
function phArrayToString(a) {
var s;
s = phReplaceAll('[', '(', a);
s = phReplaceAll(']', ')', s);
//s = phReplaceAll('%5B', '(', s);
//s = phReplaceAll('%5D', ')', s);
return s;
}
function phStringToArray(a) {
var s;
s = phReplaceAll('(', '[', a);
s = phReplaceAll(')', ']', s);
return s;
}
function phCleanArray(actual){
//var newArray = new Array();
var newArray = [];
for(var i = 0; i <actual.length; i++){
if (actual[i]){
newArray.push(actual[i]);
}
}
return newArray;
}
function phCleanEmptyParams(url) {
return url.replace(/&?[^&?]+=(?=(?:&|$))/g, '');
}
function phCleanAloneQuestionMark(url) {
if (url == '?&') {
url = '?';
}
if (url == '?') {
url = '';
}
return url;
}
function phFilterValue(value) {
var v;
v = phReplaceAll('<', '', value);
v = phReplaceAll('>', '', v);
return v;
}
/*
function phSetUrl(url) {
var urlItemsView= url;
var urlPathName = location.pathname;
var urlSearch = location.search;
var urlPage = urlPathName + urlSearch;
}
*/
function phRemoveFilter(param, value, isItemsView, urlItemsView,
filteredProductsOnly, uniqueValue, wait, source) {
var phParams = Joomla.getOptions('phParamsPC');
/*
* If there is empty phFilterNewUrlRemove, this means:
* a) there were no previous parameter which is waiting or
* b) there were previous parameter which is waiting but previous
parameter deleted the url
* so it looks like the previous parameter does not exists (but it
exists)
*/
/* Array -> String */
param = phArrayToString(param);
var queryString = jQuery.param.querystring();
queryString = phArrayToString(queryString);
var paramsAll;
if (phFilterNewUrlRemove !== '' ||
phFilterNewUrlRemovePreviousParamWaiting == 1) {
paramsAll = jQuery.deparam.querystring(phFilterNewUrlRemove);
} else {
paramsAll = jQuery.deparam.querystring(queryString);
}
var paramsTypeStringNew = {};
var mergeMode = 0;
/* Handle pagination - when changing filter, set pagination to zero - to
start */
if (typeof paramsAll['start'] !== 'undefined') {
paramsTypeStringNew['start'] = 0;
}
if (typeof paramsAll['limitstart'] !== 'undefined') {
paramsTypeStringNew['limitstart'] = 0;
}
if (uniqueValue == 1) {
delete paramsAll[param];
paramsTypeStringNew = paramsAll;
mergeMode = 2;
} else if (typeof paramsAll[param] !== 'undefined') {
var paramsTypeString = paramsAll[param];
var paramsTypeArray = paramsTypeString.split(',');
paramsTypeArray = phCleanArray(paramsTypeArray);
var findVal = paramsTypeArray.indexOf(value);
if ( findVal === -1 ){
// Value to remove is not there
} else {
// Value to remove is there
var index = paramsTypeArray.indexOf(value);
if (index > -1) {
paramsTypeArray.splice(index, 1);
}
paramsTypeString = paramsTypeArray.join();
if (paramsTypeString) {
paramsTypeStringNew[param] = paramsTypeString;
} else {
delete paramsAll[param];
paramsTypeStringNew = paramsAll;
mergeMode = 2;
}
}
} else {
delete paramsAll[param];
paramsTypeStringNew = paramsAll;
mergeMode = 2;
}
/*var url;
if (filteredProductsOnly == 1) {
url = location.search;
} else {
url = urlItemsView;// It is possible to deselect category in
category/item view
document.location = url;
return 1;
//return 2; // Not possible to deselect in other than items view
//return false;
}*/
/*
if ((isItemsView == 1 && filteredProductsOnly != 1) || isItemsView
!= 1) {
url = urlItemsView;// skip all parameters (a) search all products in
items view or b) no items view
} else {
url = location.search;// complete url with selected parameters
}*/
var url;
if ((isItemsView == 1 && filteredProductsOnly != 1) || isItemsView
!= 1) {
url = urlItemsView;// skip all parameters (a) search all products in
items view or b) no items view
document.location = url;
return 1;
} else {
url = location.search;// complete url with selected parameters
}
// Set new url or take the one from previous parameter
if (phFilterNewUrlRemove !== '' ||
phFilterNewUrlRemovePreviousParamWaiting == 1) {
url = phFilterNewUrlRemove;
}
/* Array -> String */
url = phArrayToString(url);
phFilterNewUrlRemove = jQuery.param.querystring( url,
paramsTypeStringNew, mergeMode);// one parameter only
phFilterNewUrlRemove = phReplaceAll('%2C', ',',
phFilterNewUrlRemove);
phFilterNewUrlRemove = phReplaceAll('%5B', '[',
phFilterNewUrlRemove);
phFilterNewUrlRemove = phReplaceAll('%5D', ']',
phFilterNewUrlRemove);
phFilterNewUrlRemove = phReplaceAll('%3A', ':',
phFilterNewUrlRemove);
/* String -> Array */
phFilterNewUrlRemove = phStringToArray(phFilterNewUrlRemove);
phFilterNewUrlRemove = phCleanAloneQuestionMark(phFilterNewUrlRemove);
// Wait for next parameter
if (wait == 1) {
// Don't reload, wait for other parameter
phFilterNewUrlRemovePreviousParamWaiting = 1;
if (isItemsView == 1 &&
phParams['ajaxSearchingFilteringItems'] == 1) {// and ajax
return 2;// don't run overlay
}
} else {
if (isItemsView == 1 &&
phParams['ajaxSearchingFilteringItems'] == 1) {
phUpdatePageAndParts(phFilterNewUrlRemove, source);// Update Main,
Search, Filter
phFilterNewUrlRemove = '';
phFilterNewUrlRemovePreviousParamWaiting = 0;
return 2;
} else {
//document.location = phFilterNewUrlSet;
document.location = phFilterNewUrlRemove;
}
phFilterNewUrlRemove = '';
}
return 1;
}
/*
* param: parameter name
* value: parameter value
* isItemsView: comes the request from itemsView (Ajax possible) or not
* urlItemsView: urlItemsView differently set by different parameters
* filteredProductsOnly: when searching - a) all products can be searched
or - b) only filtered products can be searched
a) c=1-category&search=search - c=1-category will be removed
from url to search all parameters
b) c=1-category&search=search - nothing will be removed from url
to search filtered parameters
* uniqueValue: c=1-category,c=2category is not unique value,
price_from=100 is unique value
* wait: wait for next parameter before reload and end the action (e.g.
price with two values)
* source: where the request comes, values: 1 filter, 2 search, 3 itemview
(specific case)
*/
function phSetFilter(param, value, isItemsView, urlItemsView,
filteredProductsOnly, uniqueValue, wait, source) {
var phParams = Joomla.getOptions('phParamsPC');
/*
* We need to differentiate:
* a) there is no parameter in the URL
* b) there is no parameter in the URL but it was here but we have removed
it previously
* as there is a wait function which handles e.g. two parameters at
once and if
* the first parameter will be removed we need to differentiate
between:
* a) url which was empty (no parameters) at the beginning
* b) url which had parameters but they were removed while working with
this function and waiting
*/
value = phFilterValue(value);
/* Array -> String */
param = phArrayToString(param);
var queryString = jQuery.param.querystring();
queryString = phArrayToString(queryString);
var paramsAll;
if (phFilterNewUrlSet !== '' ||
phFilterNewUrlSetPreviousParamWaiting == 1) {
phFilterNewUrlSet = phArrayToString(phFilterNewUrlSet);// wait back from
() to [] so it can be read by querystring
paramsAll = jQuery.deparam.querystring(phFilterNewUrlSet);
} else {
paramsAll = jQuery.deparam.querystring(queryString);
}
var paramsTypeStringNew = {};
var mergeMode = 0;
/* Handle pagination - when changing filter, set pagination to zero - to
start */
if (typeof paramsAll['start'] !== 'undefined') {
paramsTypeStringNew['start'] = 0;
}
if (typeof paramsAll['limitstart'] !== 'undefined') {
paramsTypeStringNew['limitstart'] = 0;
}
if (uniqueValue == 1) {
paramsTypeStringNew[param] = value;// { param:value};// unique value -
always overwrite old value
} else if (value === '') {
} else if (typeof paramsAll[param] !== 'undefined') {
var paramsTypeString = paramsAll[param];
var paramsTypeArray = paramsTypeString.split(',');
paramsTypeArray = phCleanArray(paramsTypeArray);
var findVal = paramsTypeArray.indexOf(value);
if ( findVal === -1 ){
// New value is not there - add it
paramsTypeArray.push(value);
paramsTypeString = paramsTypeArray.join();
paramsTypeStringNew[param] = paramsTypeString;//{
param:paramsTypeString};// Changed
} else {
// New value is there - don't change it
paramsTypeStringNew[param] = paramsTypeString;//{
param:paramsTypeString};// Unchanged
}
} else {
paramsTypeStringNew[param] = value;//{ param:value};
}
var url;
if ((isItemsView == 1 && filteredProductsOnly != 1) || isItemsView
!= 1) {
url = urlItemsView;// skip all parameters (a) search all products in
items view or b) no items view
} else {
url = location.search;// complete url with selected parameters
}
// Set new url or take the one from previous parameter
if (phFilterNewUrlSet !== '' ||
phFilterNewUrlSetPreviousParamWaiting == 1) {
url = phFilterNewUrlSet;
}
/* Array -> String */
url = phArrayToString(url);
phFilterNewUrlSet = jQuery.param.querystring( url, paramsTypeStringNew,
mergeMode);// one parameter only
phFilterNewUrlSet = phReplaceAll('%2C', ',',
phFilterNewUrlSet);
phFilterNewUrlSet = phReplaceAll('%2C', ',',
phFilterNewUrlSet);
phFilterNewUrlSet = phReplaceAll('%5B', '[',
phFilterNewUrlSet);
phFilterNewUrlSet = phReplaceAll('%5D', ']',
phFilterNewUrlSet);
phFilterNewUrlSet = phReplaceAll('%3A', ':',
phFilterNewUrlSet);
/* String -> Array */
phFilterNewUrlSet = phStringToArray(phFilterNewUrlSet);
phFilterNewUrlSet = phCleanEmptyParams(phFilterNewUrlSet);
phFilterNewUrlSet = phCleanAloneQuestionMark(phFilterNewUrlSet);
// Wait for next parameter
if (wait == 1) {
// Don't reload, wait for other parameter
phFilterNewUrlSetPreviousParamWaiting = 1;
if (isItemsView == 1 &&
phParams['ajaxSearchingFilteringItems'] == 1) {
return 2;// don't run overlay
}
} else {
if (isItemsView == 1 &&
phParams['ajaxSearchingFilteringItems'] == 1) {
phUpdatePageAndParts(phFilterNewUrlSet, source);// Update Main, Search,
Filter
phFilterNewUrlSet = '';
phFilterNewUrlSetPreviousParamWaiting = 0;
return 2;
} else {
document.location = phFilterNewUrlSet;
}
phFilterNewUrlSet = '';
}
return 1;
}
/* Function phChangeFilter */
function phChangeFilter(param, value, formAction, formType, uniqueValue,
wait, source) {
var phVars = Joomla.getOptions('phVarsModPhocacartFilter');
var phParams =
Joomla.getOptions('phParamsModPhocacartFilter');
var isItemsView = phVars['isItemsView'];
var isSef = phVars['isSef'];
var urlItemsView = phVars['urlItemsView'];
var urlItemsViewWithoutParams =
phVars['urlItemsViewWithoutParams'];
var phA = 1;
if (formType == 'itemview'){
// Specific case for item view (no filtering but setting unique url for
product with attributes)
if(value === undefined) {
value = '';
}
phA = phSetFilter(param, value, 1, 0, 1, uniqueValue, wait, source);
} else if (formType == "text") {
//value = phEncode(value);
if (formAction == 1) {
phA = phSetFilter(param, value, isItemsView, urlItemsView, 1,
uniqueValue, wait, source);
} else {
phA = phRemoveFilter(param, value, isItemsView, urlItemsView, 1,
uniqueValue, wait, source);
}
} else if (formType == "category") {
urlItemsView = urlItemsViewWithoutParams;
if (phParams['removeParametersCat'] == 1) {
document.location = urlItemsView;
} else {
var currentUrlParams = jQuery.param.querystring();
if (isItemsView == 1) {
if (isSef == 1) {
document.location = jQuery.param.querystring(urlItemsView,
currentUrlParams, 2);
} else {
phRemoveFilter(param, value, isItemsView, urlItemsView, 1,
uniqueValue, wait, source);
}
} else {
document.location = urlItemsView;
}
}
} else {
if (formAction.checked) {
phA = phSetFilter(param, value, isItemsView, urlItemsView, 1,
uniqueValue, wait, source);
} else {
phA = phRemoveFilter(param, value, isItemsView, urlItemsView, 1,
uniqueValue, wait, source);
}
}
startFullOverlay(phA);
}
/* Function phChangeSearch*/
function phChangeSearch(param, value, formAction) {
var phVars = Joomla.getOptions('phVarsModPhocacartSearch');
var phParams =
Joomla.getOptions('phParamsModPhocacartSearch');
var phVarsPC = Joomla.getOptions('phParamsPC');
var isItemsView = phVars['isItemsView'];
var urlItemsView = phVars['urlItemsView'];
var urlItemsViewWithoutParams =
phVars['urlItemsViewWithoutParams'];
var phA = 1;
var filteredProductsOnly = isItemsView;
if (formAction == 1) {
if (phParams['searchOptions'] == 1) {
//jQuery("#phSearchBoxSearchAllProducts:checked").val();
//jQuery("#phSearchBoxSearchAllProducts").attr("checked");
if(jQuery("#phSearchBoxSearchAllProducts:checked").length
> 0) {
urlItemsView = urlItemsViewWithoutParams;
filteredProductsOnly = 0; // When options are enabled and searching
is set to all - we search without filtering
}
} else {
filteredProductsOnly = 0;// When options are disabled we always search
without filtering
}
phA = phSetFilter(param, value, isItemsView, urlItemsView,
filteredProductsOnly, 1, 0, 2);
} else {
phA = phRemoveFilter(param, value, isItemsView, urlItemsView,
filteredProductsOnly, 1, 0, 2);
}
startFullOverlay(phA);
}
function phPriceFilterRange() {
var phVars = Joomla.getOptions('phParamsPC');
var phLang = Joomla.getOptions('phLangPC');
// Filter Range
if (typeof jQuery("#phPriceFilterRange").slider ===
"function") {
jQuery("#phPriceFilterRange").slider({
range: true,
min: phVars['filterPriceMin'],
max: phVars['filterPriceMax'],
values: [phVars['filterPriceFrom'],
phVars['filterPriceTo']],
slide: function( event, ui ) {
jQuery("#phPriceFromTopricefrom").val(ui.values[0]);
jQuery("#phPriceFromTopriceto").val(ui.values[1]);
jQuery("#phPriceFilterPrice").html("" +
phLang['COM_PHOCACART_PRICE'] + ": " +
phGetPriceFormat(ui.values[0]) + " - " +
phGetPriceFormat(ui.values[1]));
}
});
}
jQuery("#phPriceFilterPrice").html("" +
phLang['COM_PHOCACART_PRICE'] + ": " +
phGetPriceFormat(phVars['filterPriceFrom']) + " - " +
phGetPriceFormat(phVars['filterPriceTo']));
jQuery("#phPriceFromTopricefrom").on("change",
function (e) {
var from = jQuery("#phPriceFromTopricefrom").val();
var to = jQuery("#phPriceFromTopriceto").val();
if (to == '') { to = phVars['filterPriceMax'];}
if (from == '') { from = phVars['filterPriceMin'];}
if (Number(to) < Number(from)) {to =
from;jQuery("#phPriceFromTopriceto").val(to);}
if (typeof jQuery("#phPriceFilterRange").slider ===
"function") {
jQuery( "#phPriceFilterRange" ).slider({values: [from,to]});
}
jQuery("#phPriceFilterPrice").html("" +
phLang['COM_PHOCACART_PRICE'] + ": " +
phGetPriceFormat(from) + " - " + phGetPriceFormat(to));
})
jQuery("#phPriceFromTopriceto").on("change", function
(e) {
var from = jQuery("#phPriceFromTopricefrom").val();
var to = jQuery("#phPriceFromTopriceto").val();
if (to == '') { to = phVars['filterPriceMax'];}
if (from == '') { from = phVars['filterPriceMin'];}
if (Number(to) < Number(from)) {to =
from;jQuery("#phPriceFromTopriceto").val(to);}
if (typeof jQuery("#phPriceFilterRange").slider ===
"function") {
jQuery( "#phPriceFilterRange" ).slider({values: [from,to]});
}
jQuery("#phPriceFilterPrice").html("" +
phLang['COM_PHOCACART_PRICE'] + ": " +
phGetPriceFormat(from) + " - " + phGetPriceFormat(to));
})
}
function phClearField(field) {
jQuery(field).val('');
}
// ------
// Events
// ------
jQuery(document).ready(function () {
jQuery('.collapse')
.on('shown.bs.collapse', function() {
jQuery(this).parent().find(".glyphicon-triangle-right").removeClass("glyphicon-triangle-right").addClass("glyphicon-triangle-bottom");
jQuery(this).parent().find(".fa-caret-right").removeClass("fa-caret-right").addClass("fa-caret-down");
})
.on('hidden.bs.collapse', function() {
jQuery(this).parent().find(".glyphicon-triangle-bottom").removeClass("glyphicon-triangle-bottom").addClass("glyphicon-triangle-right");
jQuery(this).parent().find(".fa-caret-down").removeClass("fa-caret-down").addClass("fa-caret-right");
});
phPriceFilterRange ();
});
phoca/phocafilter.min.js000064400000016351151175232470011273 0ustar00var
phFilterNewUrlSet="",phFilterNewUrlRemove="",phFilterNewUrlSetPreviousParamWaiting=0,phFilterNewUrlRemovePreviousParamWaiting=0;function
phReplaceAll(e,r,t){return t.replace(new
RegExp(e,"gi"),r)}function phEscapeRegExp(e){return
e.replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1")}function
phReplaceAll(e,r,t){return t.replace(new
RegExp(phEscapeRegExp(e),"g"),r)}function
phEncode(e){e=encodeURIComponent(e);return
e=phReplaceAll("%5B","[",e),e=phReplaceAll("%5D","]",e),e=phReplaceAll("%2C",",",e),e=phReplaceAll("%3A",":",e)}function
phArrayToString(e){e=phReplaceAll("[","(",e);return
e=phReplaceAll("]",")",e)}function
phStringToArray(e){e=phReplaceAll("(","[",e);return
e=phReplaceAll(")","]",e)}function
phCleanArray(e){for(var
r=[],t=0;t<e.length;t++)e[t]&&r.push(e[t]);return r}function
phCleanEmptyParams(e){return
e.replace(/&?[^&?]+=(?=(?:&|$))/g,"")}function
phCleanAloneQuestionMark(e){return"?&"==e&&(e="?"),"?"==e&&(e=""),e}function
phFilterValue(e){e=phReplaceAll("<","",e);return
e=phReplaceAll(">","",e)}function
phRemoveFilter(e,r,t,i,l,a,p,o){var
n=Joomla.getOptions("phParamsPC");e=phArrayToString(e);var
h,c=phArrayToString(c=jQuery.param.querystring()),m=""!==phFilterNewUrlRemove||1==phFilterNewUrlRemovePreviousParamWaiting?jQuery.deparam.querystring(phFilterNewUrlRemove):jQuery.deparam.querystring(c),u={},s=0;if(void
0!==m.start&&(u.start=0),void
0!==m.limitstart&&(u.limitstart=0),1!=a&&void
0!==m[e]?-1===(a=phCleanArray(a=(c=m[e]).split(","))).indexOf(r)||(-1<(r=a.indexOf(r))&&a.splice(r,1),(c=a.join())?u[e]=c:(delete
m[e],u=m,s=2)):(delete m[e],u=m,s=2),1==t&&1!=l||1!=t)return
h=i,document.location=h,1;if(h=location.search,""===phFilterNewUrlRemove&&1!=phFilterNewUrlRemovePreviousParamWaiting||(h=phFilterNewUrlRemove),h=phArrayToString(h),phFilterNewUrlRemove=jQuery.param.querystring(h,u,s),phFilterNewUrlRemove=phReplaceAll("%2C",",",phFilterNewUrlRemove),phFilterNewUrlRemove=phReplaceAll("%5B","[",phFilterNewUrlRemove),phFilterNewUrlRemove=phReplaceAll("%5D","]",phFilterNewUrlRemove),phFilterNewUrlRemove=phCleanAloneQuestionMark(phFilterNewUrlRemove=phStringToArray(phFilterNewUrlRemove=phReplaceAll("%3A",":",phFilterNewUrlRemove))),1==p){if((phFilterNewUrlRemovePreviousParamWaiting=1)==t&&1==n.ajaxSearchingFilteringItems)return
2}else{if(1==t&&1==n.ajaxSearchingFilteringItems)return
phUpdatePageAndParts(phFilterNewUrlRemove,o),phFilterNewUrlRemove="",phFilterNewUrlRemovePreviousParamWaiting=0,2;document.location=phFilterNewUrlRemove,phFilterNewUrlRemove=""}return
1}function phSetFilter(e,r,t,i,l,a,p,o){var
n=Joomla.getOptions("phParamsPC");r=phFilterValue(r),e=phArrayToString(e);var
h=phArrayToString(h=jQuery.param.querystring()),c=""!==phFilterNewUrlSet||1==phFilterNewUrlSetPreviousParamWaiting?(phFilterNewUrlSet=phArrayToString(phFilterNewUrlSet),jQuery.deparam.querystring(phFilterNewUrlSet)):jQuery.deparam.querystring(h),h={};if(void
0!==c.start&&(h.start=0),void
0!==c.limitstart&&(h.limitstart=0),1==a?h[e]=r:""===r||(void
0!==c[e]?(-1===(c=phCleanArray(c=(a=c[e]).split(","))).indexOf(r)&&(c.push(r),a=c.join()),h[e]=a):h[e]=r),i=1==t&&1!=l||1!=t?i:location.search,""===phFilterNewUrlSet&&1!=phFilterNewUrlSetPreviousParamWaiting||(i=phFilterNewUrlSet),i=phArrayToString(i),phFilterNewUrlSet=jQuery.param.querystring(i,h,0),phFilterNewUrlSet=phReplaceAll("%2C",",",phFilterNewUrlSet),phFilterNewUrlSet=phReplaceAll("%2C",",",phFilterNewUrlSet),phFilterNewUrlSet=phReplaceAll("%5B","[",phFilterNewUrlSet),phFilterNewUrlSet=phReplaceAll("%5D","]",phFilterNewUrlSet),phFilterNewUrlSet=phCleanAloneQuestionMark(phFilterNewUrlSet=phCleanEmptyParams(phFilterNewUrlSet=phStringToArray(phFilterNewUrlSet=phReplaceAll("%3A",":",phFilterNewUrlSet)))),1==p){if((phFilterNewUrlSetPreviousParamWaiting=1)==t&&1==n.ajaxSearchingFilteringItems)return
2}else{if(1==t&&1==n.ajaxSearchingFilteringItems)return
phUpdatePageAndParts(phFilterNewUrlSet,o),phFilterNewUrlSet="",phFilterNewUrlSetPreviousParamWaiting=0,2;document.location=phFilterNewUrlSet,phFilterNewUrlSet=""}return
1}function phChangeFilter(e,r,t,i,l,a,p){var
o=Joomla.getOptions("phVarsModPhocacartFilter"),n=Joomla.getOptions("phParamsModPhocacartFilter"),h=o.isItemsView,c=o.isSef,m=o.urlItemsView,u=o.urlItemsViewWithoutParams,o=1;"itemview"==i?(void
0===r&&(r=""),o=phSetFilter(e,r,1,0,1,l,a,p)):"text"==i?o=(1==t?phSetFilter:phRemoveFilter)(e,r,h,m,1,l,a,p):"category"==i?(m=u,1==n.removeParametersCat?document.location=m:(n=jQuery.param.querystring(),1==h?1==c?document.location=jQuery.param.querystring(m,n,2):phRemoveFilter(e,r,h,m,1,l,a,p):document.location=m)):o=(t.checked?phSetFilter:phRemoveFilter)(e,r,h,m,1,l,a,p),startFullOverlay(o)}function
phChangeSearch(e,r,t){var
i=Joomla.getOptions("phVarsModPhocacartSearch"),l=Joomla.getOptions("phParamsModPhocacartSearch"),a=(Joomla.getOptions("phParamsPC"),i.isItemsView),p=i.urlItemsView,o=i.urlItemsViewWithoutParams,n=1,i=a,n=1==t?(1==l.searchOptions?0<jQuery("#phSearchBoxSearchAllProducts:checked").length&&(p=o,i=0):i=0,phSetFilter(e,r,a,p,i,1,0,2)):phRemoveFilter(e,r,a,p,i,1,0,2);startFullOverlay(n)}function
phPriceFilterRange(){var
i=Joomla.getOptions("phParamsPC"),l=Joomla.getOptions("phLangPC");"function"==typeof
jQuery("#phPriceFilterRange").slider&&jQuery("#phPriceFilterRange").slider({range:!0,min:i.filterPriceMin,max:i.filterPriceMax,values:[i.filterPriceFrom,i.filterPriceTo],slide:function(e,r){jQuery("#phPriceFromTopricefrom").val(r.values[0]),jQuery("#phPriceFromTopriceto").val(r.values[1]),jQuery("#phPriceFilterPrice").html(l.COM_PHOCACART_PRICE+":
"+phGetPriceFormat(r.values[0])+" -
"+phGetPriceFormat(r.values[1]))}}),jQuery("#phPriceFilterPrice").html(l.COM_PHOCACART_PRICE+":
"+phGetPriceFormat(i.filterPriceFrom)+" -
"+phGetPriceFormat(i.filterPriceTo)),jQuery("#phPriceFromTopricefrom").on("change",function(e){var
r=jQuery("#phPriceFromTopricefrom").val(),t=jQuery("#phPriceFromTopriceto").val();""==t&&(t=i.filterPriceMax),""==r&&(r=i.filterPriceMin),Number(t)<Number(r)&&(t=r,jQuery("#phPriceFromTopriceto").val(t)),"function"==typeof
jQuery("#phPriceFilterRange").slider&&jQuery("#phPriceFilterRange").slider({values:[r,t]}),jQuery("#phPriceFilterPrice").html(l.COM_PHOCACART_PRICE+":
"+phGetPriceFormat(r)+" -
"+phGetPriceFormat(t))}),jQuery("#phPriceFromTopriceto").on("change",function(e){var
r=jQuery("#phPriceFromTopricefrom").val(),t=jQuery("#phPriceFromTopriceto").val();""==t&&(t=i.filterPriceMax),""==r&&(r=i.filterPriceMin),Number(t)<Number(r)&&(t=r,jQuery("#phPriceFromTopriceto").val(t)),"function"==typeof
jQuery("#phPriceFilterRange").slider&&jQuery("#phPriceFilterRange").slider({values:[r,t]}),jQuery("#phPriceFilterPrice").html(l.COM_PHOCACART_PRICE+":
"+phGetPriceFormat(r)+" - "+phGetPriceFormat(t))})}function
phClearField(e){jQuery(e).val("")}jQuery(document).ready(function(){jQuery(".collapse").on("shown.bs.collapse",function(){jQuery(this).parent().find(".glyphicon-triangle-right").removeClass("glyphicon-triangle-right").addClass("glyphicon-triangle-bottom"),jQuery(this).parent().find(".fa-caret-right").removeClass("fa-caret-right").addClass("fa-caret-down")}).on("hidden.bs.collapse",function(){jQuery(this).parent().find(".glyphicon-triangle-bottom").removeClass("glyphicon-triangle-bottom").addClass("glyphicon-triangle-right"),jQuery(this).parent().find(".fa-caret-down").removeClass("fa-caret-down").addClass("fa-caret-right")}),phPriceFilterRange()});phoca/phocapos.js000064400000047057151175232470010034
0ustar00/*
* @package Phoca Cart
* @author Jan Pavelka - https://www.phoca.cz
* @copyright Copyright (C) Jan Pavelka https://www.phoca.cz
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 and later
* @cms Joomla
* @copyright Copyright (C) Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
*/
/* Update parameter */
function phUpdateUrlParameter(param, value, urlChange) {
if (typeof urlChange !== "undefined") {
var url = urlChange;
var urlA = url.split("#");
var hash = ""
if(urlA.length > 1) { hash = urlA[1];}
} else {
var url = window.location.href;
var hash = location.hash;
}
url = url.replace(hash, '');
if (url.indexOf(param + "=") >= 0) {
var prefix = url.substring(0, url.indexOf(param));
var suffix = url.substring(url.indexOf(param));
suffix = suffix.substring(suffix.indexOf("=") + 1);
suffix = (suffix.indexOf("&") >= 0) ?
suffix.substring(suffix.indexOf("&")) : "";
url = prefix + param + "=" + value + suffix;
} else {
if (url.indexOf("?") < 0) {
url += "?" + param + "=" + value;
} else {
url += "&" + param + "=" + value;
}
}
url =
url.replace(/[^=&]+=(&|$)/g,"").replace(/&$/,"");//
remove all parameters with empty values
if (typeof urlChange !== "undefined") {
return (url + hash);
} else {
window.history.pushState(null, null, url + hash);
}
}
/* Update input box after change */
function phDoSubmitFormUpdateInputBox(sFormData, phUrlAjax) {
phRequest = jQuery.ajax({
type: "POST",
url: phUrlAjax,
async: true,
cache: "false",
data: sFormData,
dataType:"HTML",
success: function(data){
jQuery("#phPosInputBox").html(data);
}
})
return false;
}
/* Update categories box after change (users can have different access
rights for different categories, so when selecting user, categories must be
changed) */
function phDoSubmitFormUpdateCategoriesBox(sFormData, phUrlAjax) {
// Change categories only when customer changed
var page = jQuery("#phPosPaginationBox
input[name=page]").val();
if (page != "main.content.customers") {
return false;
}
phRequest = jQuery.ajax({
type: "POST",
url: phUrlAjax,
async: true,
cache: "false",
data: sFormData,
dataType:"HTML",
success: function(data){
jQuery("#phPosCategoriesBox").html(data);
}
})
return false;
}
/* Main content box can be variable: products/customers/payment/shippment
* Get info about current ticket id and page (page: products, customers,
payment, shipping)
*/
function phPosCurrentData(forcepage, format, id) {
var phVars = Joomla.getOptions('phVarsPC');
var phToken = phVars['token'];
if (typeof forcepage !== "undefined") {
var page = forcepage;
} else {
var page = jQuery("#phPosPaginationBox
input[name=page]").val();
}
if (typeof format !== "undefined") {
var formatSuffix = format;
} else {
var formatSuffix = "raw";
}
if (typeof id !== "undefined") {
var idSuffix = "&id="+id;
} else {
var idSuffix = "";
}
var ticketid = jQuery("#phPosPaginationBox
input[name=ticketid]").val();
var unitid = jQuery("#phPosPaginationBox
input[name=unitid]").val();
var sectionid = jQuery("#phPosPaginationBox
input[name=sectionid]").val();
var phData = "format=" + formatSuffix +
"&tmpl=component&page=" + page + idSuffix
+"&ticketid=" + ticketid + "&unitid=" + unitid
+ "§ionid=" + sectionid + "&" + phToken +
"=1";
return phData;
}
/*
* When chaning main page, clear all filters (e.g. going from product list
to customer list)
* Category - remove url parameters in url bar, then empty all checkboxes
* Search - remove url parameters in url bar, then empty search input field
*/
function phPosClearFilter() {
phUpdateUrlParameter("category", "");
jQuery("input.phPosCategoryCheckbox:checkbox:checked").prop("checked",
false);
jQuery("label.phCheckBoxCategory").removeClass("active");
phUpdateUrlParameter("search", "");
jQuery("#phPosSearch").val("");
}
/* Focus on form input if asked (sku, loyalty card, coupon, tendered
amount) */
function phPosManagePageFocus(page) {
var phParams = Joomla.getOptions('phParamsPC');
var posFocusInputFields = phParams['posFocusInputFields'];
if (posFocusInputFields == 1) {
if (page == "main.content.products") {
var hasFocusSearch =
jQuery("#phPosSearch").is(":focus");
if (!hasFocusSearch) {
jQuery("#phPosSku").focus();
}
} else if (page == "main.content.customers") {
var hasFocusSearch =
jQuery("#phPosSearch").is(":focus");
if (!hasFocusSearch) {
jQuery("#phPosCard").focus();
}
} else if (page == "main.content.paymentmethods") {
var hasFocusSearch =
jQuery("#phPosSearch").is(":focus");
if (!hasFocusSearch) {
jQuery("#phcoupon").focus();
}
} else if (page == "main.content.payment") {
jQuery("#phAmountTendered").focus();
}
} else {
return true;
}
}
/*
* Manage view after ajax request (hide or display different parts on site)
* 1) Hide categories for another views than products
* we use ajax and start parameter can be used for more items (products,
customers, orders) so we cannot leave it in url
* because if there are 100 products and 10 customers - switching to
customers per ajax will leave e.g. 50 which is will display zero results
* START IS SET ONLY WHEN CLICKING ON PAGINATION LINKS (see:
renderSubmitPaginationTopFor, it is removed directly by click)
*/
function phPosManagePage() {
var page = jQuery("#phPosPaginationBox input[name=page]").val();
if (page == "main.content.products") { // PRODUCTS
jQuery(".ph-pos-checkbox-box").show();
jQuery(".ph-pos-sku-product-box").show();
jQuery(".ph-pos-card-user-box").hide();
jQuery(".ph-pos-search-box").show();
jQuery(".ph-pos-date-order-box").hide();
phPosManagePageFocus(page);// Focus on start
} else if (page == "main.content.customers") { // CUSTOMERS
jQuery(".ph-pos-checkbox-box").hide();//categories
jQuery(".ph-pos-search-box").show();
jQuery(".ph-pos-card-user-box").show();
jQuery(".ph-pos-sku-product-box").hide();
jQuery(".ph-pos-date-order-box").hide();
phPosManagePageFocus(page);// Focus on start
} else if (page == "main.content.order") {// ORDER
jQuery(".ph-pos-checkbox-box").hide();//categories
jQuery(".ph-pos-search-box").hide();
jQuery(".ph-pos-card-user-box").hide();
jQuery(".ph-pos-sku-product-box").hide();
jQuery(".ph-pos-date-order-box").hide();
} else if (page == "main.content.orders") { // ORDERS
jQuery(".ph-pos-checkbox-box").hide();//categories
jQuery(".ph-pos-search-box").hide();
jQuery(".ph-pos-card-user-box").hide();
jQuery(".ph-pos-sku-product-box").hide();
jQuery(".ph-pos-date-order-box").show();
} else if (page == "main.content.paymentmethods") { // PAYMENT
METHODS
jQuery(".ph-pos-checkbox-box").hide();//categories
jQuery(".ph-pos-search-box").hide();
jQuery(".ph-pos-card-user-box").hide();
jQuery(".ph-pos-sku-product-box").hide();
jQuery(".ph-pos-date-order-box").hide();
phPosManagePageFocus(page);// Focus on start
} else if (page == "main.content.payment") { // PAYMENT
jQuery(".ph-pos-checkbox-box").hide();//categories
jQuery(".ph-pos-search-box").hide();
jQuery(".ph-pos-card-user-box").hide();
jQuery(".ph-pos-sku-product-box").hide();
jQuery(".ph-pos-date-order-box").hide();
phPosManagePageFocus(page);// Focus on start
} else {
jQuery(".ph-pos-checkbox-box").hide();//categories
jQuery(".ph-pos-search-box").hide();
jQuery(".ph-pos-card-user-box").hide();
jQuery(".ph-pos-sku-product-box").hide();
jQuery(".ph-pos-date-order-box").hide();
}
}
/* When adding new parameter to url bar, check if ? is there to set ? or
& */
function phAddSuffixToUrl(action, suffix) {
return action + (action.indexOf('?') != -1 ? '&' :
'?') + suffix;
}
/* Edit something in main view and then reload cart, main page, input page
*/
function phAjaxEditPos(sFormData, phUrlAjax, forcepageSuccess,
forcepageError) {
var phUrl = phAddSuffixToUrl(window.location.href,
'format=raw');
var phDataInput = phPosCurrentData("main.input");
var phDataCats = phPosCurrentData("main.categories");
var phDataCart = phPosCurrentData("main.cart",
"json");
phRequest = jQuery.ajax({
type: "POST",
url: phUrlAjax,
async: true,
cache: "false",
data: sFormData,
dataType:"JSON",
success: function(data){
if (data.status == 1){
if (data.id !== "undefined") {
var id = data.id;
} else {
var id = "";
}
var phDataMain = phPosCurrentData(forcepageSuccess, "raw",
id);
phDoSubmitFormUpdateCategoriesBox(phDataCats, phUrl);// refresh
categories box (when chaning users, users can have different access to
categories)
phRenderPage(phDataMain, phUrl);// reload main box to default (list of
products)
phDoSubmitFormUpdateInputBox(phDataInput, phUrl);// refresh input box
phDoSubmitFormUpdateCart(phDataCart);// reload updated cart
jQuery(".ph-pos-message-box").html(data.message);
} else if (data.status == 0){
var phDataMain = phPosCurrentData(forcepageError);
phRenderPage(phDataMain, phUrl);// reload main box to default (list of
products)
phDoSubmitFormUpdateInputBox(phDataInput, phUrl);// refresh input box
phDoSubmitFormUpdateCart(phDataCart);// reload updated cart
jQuery(".ph-pos-message-box").html(data.error);
}
}
})
return false;
}
/*
* Search by key type - typing of charcters into the search field FIND
MEMBER FUNCTION
*
* Must be loaded:
* renderSubmitPaginationTopForm()
* changeUrlParameter()
* editPos()
*/
function phFindMember(typeValue) {
var phData = "search=" + typeValue + "&" +
phPosCurrentData();
phUpdateUrlParameter("search", typeValue);
var phUrl = phAddSuffixToUrl(window.location.href,
'format=raw');//get the url after update
phRenderPage(phData, phUrl);
jQuery(".ph-pos-message-box").html("");// clear
message box
}
/* POS Scroll cart */
function phScrollPosCart(phPosCart) {
if (jQuery("#ph-msg-ns").length > 0){
phPosCart.animate({scrollTop: 0}, 1500 );
} else {
var phPosCartHeight = phPosCart[0].scrollHeight;
phPosCart.animate({scrollTop: phPosCartHeight}, 1500 );
}
}
function phConfirm(submitForm, dataPost, txt) {
//var phLang = Joomla.getOptions('phLangPC');
//var phLangOk = phLang['COM_PHOCACART_OK'];
//var phLangCancel = phLang['COM_PHOCACART_CANCEL'];
jQuery("#phDialogConfirm .modal-body" ).html( txt );
jQuery('#phDialogConfirm').modal();
jQuery('#phDialogConfirm').modal({ keyboard: false });
jQuery('#phDialogConfirm').modal('show') ;
jQuery("#phDialogConfirmSave").on("click",
function(e){
phPosCloseTicketFormConfirmed = true;
if (submitForm != "") {
jQuery(submitForm).submit();
} else if (typeof dataPost !== "undefined" && dataPost
!= "") {
//phDoRequest(dataPost);
}
return true;
});
return false;
}
// ------
// Events
// ------
jQuery(document).ready(function(){
/* Declare it on start (event associated to phPosManagePage function) */
phPosManagePage();
/*
* Clear form input after submit - for example, if vendor add products per
* bar scanner, after scanning the field must be empty for new product scan
* PRODUCTS, LOYALTY CARD
*/
jQuery(document).on("submit","#phPosSkuProductForm",function(){
setTimeout(function(){
jQuery("#phPosSku").val("");
}, 100);
});
jQuery(document).on("submit","#phPosCardUserForm",function(){
setTimeout(function(){
jQuery("#phPosCard").val("");
}, 100);
});
/* Test Bootstrap JS libraries */
var phLang = Joomla.getOptions('phLangPC');
var phScriptsLoaded = document.getElementsByTagName("script");
var bMinJs = "bootstrap.min.js";
var bJs = "bootstrap.js";
var bJsCount = 0;
jQuery.each(phScriptsLoaded, function (k, v) {
var s = v.src;
var n = s.indexOf("?")
s = s.substring(0, n != -1 ? n : s.length);
var filename =
s.split('\\\\').pop().split('/').pop();
if (filename == bMinJs || filename == bJs) {
bJsCount++;
}
})
if (bJsCount > 1){
jQuery("#phPosWarningMsgBox").text(phLang['COM_PHOCACART_WARNING_BOOTSTRAP_JS_LOADED_MORE_THAN_ONCE']);
jQuery("#phPosWarningMsgBox").show();
}
/* Load main content by links - e.g. in input box we call list of
customers, payment methods or shipping methods */
jQuery(document).on("click", ".loadMainContent",
function (e) {
phPosClearFilter();
var phUrl = phAddSuffixToUrl(window.location.href,
'format=raw');
var sForm = jQuery(this).closest("form");// Find in which
form the right button was clicked
var sFormData = sForm.serialize();
phRenderPage(sFormData, phUrl);
jQuery(".ph-pos-message-box").html("");// clean
message box
e.preventDefault();
});
/* Edit something in content area (e.g. customer list is loaded in main
content and we change it) */
jQuery(document).on("click", ".editMainContent",
function (e) {
phPosClearFilter();
var phUrl = phAddSuffixToUrl(window.location.href,
'format=json');
var sForm = jQuery(this).closest("form");// Find in which
form the right button was clicked
var sFormData = sForm.serialize();
var phRedirectSuccess =
sForm.find('input[name="redirectsuccess"]').val();
var phRedirectError =
sForm.find('input[name="redirecterror"]').val();
phAjaxEditPos(sFormData, phUrl, phRedirectSuccess, phRedirectError);
jQuery(".ph-pos-message-box").html("");// clean
message box
e.preventDefault();
});
/*
* Unfortunately we have form without buttons so we need to run the form
without click too
* to not submit more forms at once we will use ID :-(
*/
jQuery(document).on("submit", "#phPosCardUserForm",
function (e) {
phPosClearFilter();
var phUrl = phAddSuffixToUrl(window.location.href,
'format=json');
var sForm = jQuery("#phPosCardUserForm");
var sFormData = sForm.serialize();
phAjaxEditPos(sFormData, phUrl, "main.content.products",
"main.content.products");
jQuery(".ph-pos-message-box").html("");// clean
message box
e.preventDefault();
});
jQuery(document).on("submit", "#phPosDateOrdersForm",
function (e) {
phPosClearFilter();
var phUrl = phAddSuffixToUrl(window.location.href,
'format=raw');
var sForm = jQuery("#phPosDateOrdersForm");
var sFormData = sForm.serialize();
phRenderPage(sFormData, phUrl);// reload main box to default (list of
products)
jQuery(".ph-pos-message-box").html("");// clean
message box
e.preventDefault();
});
/* Display warning when closing a ticket */
phPosCloseTicketFormConfirmed = false;
jQuery(document).on("submit", "#phPosCloseTicketForm",
function (e) {
var txt = jQuery(this).data("txt");
if(!phPosCloseTicketFormConfirmed) {
phConfirm("#phPosCloseTicketForm", "", txt);
e.preventDefault();
return false;
} else {
phPosCloseTicketFormConfirmed = false;// set back the variable
return true;
}
});
/*
* Get all checkboxes of categories which are active and add them to url
bar and filter the categories
*
* Must be loaded:
* renderSubmitPaginationTopForm()
* changeUrlParameter()
* editPos()
*
* Test checkbox
* components\com_phocacart\views\pos\tmpl\default_main_categories.php
* data-toggle="buttons" - changes the standard checkbox to
graphical checkbox
*
*/
jQuery(document).on("change", "#phPosCategoriesBox
.phPosCategoryCheckbox", function() {
var phParams = Joomla.getOptions('phParamsPC');
var posFilterCategory = phParams['posFilterCategory'];
if (posFilterCategory == 2) {
// Multiple categories can be displayed - can be active
var phA = [];
jQuery("input.phPosCategoryCheckbox:checkbox:checked").each(function
() {
phA.push(jQuery(this).val());
})
var cValue = phA.join(",");
} else {
// Only one category can be displayed
// Deselect all checkboxed except the one selected - can be active
var cValue = jQuery(this).val();
jQuery("input.phPosCategoryCheckbox:checkbox:checked").each(function
() {
if (cValue != jQuery(this).val() ) {
jQuery(this).prop("checked", false);
jQuery("label.phCheckBoxCategory").removeClass("active");
}
})
// Current checkbox was deselected
if (jQuery(this).prop("checked") == false) {
cValue = "";
};
}
var phData = "category=" + cValue + "&" +
phPosCurrentData();
phUpdateUrlParameter("category", cValue);// update URL bar
var phUrl = phAddSuffixToUrl(window.location.href,
'format=raw');// get the link after update of url bar
phRenderPage(phData, phUrl);
jQuery(".ph-pos-message-box").html("");// clear
message box
});
/*
* Search by key type - typing of charcters into the search field FIND
MEMBER KEYUP
*
* Must be loaded:
* renderSubmitPaginationTopForm()
* changeUrlParameter()
* editPos()
*/
var phThread = null;
jQuery('#phPosSearch').keyup(function() {
clearTimeout(phThread);
var $this = jQuery(this);
phThread = setTimeout(function(){phFindMember($this.val())}, 800);
});
/* Print to POS printer */
jQuery("#phPosContentBox").on("click",
".phOrderPrintBtn", function (e) {
var phVars = Joomla.getOptions('phVarsPC');
var phParams = Joomla.getOptions('phParamsPC');
var posServerPrint = phParams['posServerPrint'];
var phUrlAjax = phVars['urlOrder'];
var phOrder = jQuery(this).data("order");
var phType = jQuery(this).data("type");
var phOrderCurrent =
jQuery("#phPosOrderPrintBox").attr("data-order");//
data("order"); not working
var phTypeCurrent =
jQuery("#phPosOrderPrintBox").attr("data-type");//
data("type"); not working
// PC PRINT
if (phType == "-1") {// -1 type is print (1 order, 2 invoice, 3
delivery note, 4 receipt)
if (posServerPrint == 2 || posServerPrint == 3) {
// - 1 AND 4 PC PRINT FOR ALL DOCUMENTS EXCEPT 4 (Receipt) - Receipt
will be printend by SERVER PRINT
if (phTypeCurrent == "4") {
var phUrlAjaxPrint = phAddSuffixToUrl(phUrlAjax, "id=" +
phOrder + "&type=" + phTypeCurrent +
"&pos=1&printserver=1");
phRequestPrint = jQuery.ajax({
type: "GET",
url: phUrlAjaxPrint,
async: true,
cache: "false",
dataType:"HTML",
success: function(data){
jQuery(".ph-pos-message-box").html('<div>'
+ data + '</div>');
// jQuery("#phPosOrderPrintBox").attr("class",
phClass);// Add class to box of document - to differentiate documents
loaded by ajax
//
jQuery("#phPosOrderPrintBox").attr("data-type",
phType);// Add data type to box of document - so it can be read by print
function
// jQuery("#phPosOrderPrintBox").html(data);// Add the
document itself to the site
}
})
e.preventDefault();
return false;
// -1 PC PRINT
} else {
window.print(); return false;// print with javascript for all
documents except receipt (receipt is ready for server POS printers)
}
} else {
window.print(); return false;// print with javascript for all document
(including receipt)
}
}
var phClass = "phType" + phType;
var phUrlAjax = phAddSuffixToUrl(phUrlAjax, "id=" + phOrder +
"&type=" + phType + "&pos=1");
phRequest = jQuery.ajax({
type: "GET",
url: phUrlAjax,
async: true,
cache: "false",
dataType:"HTML",
success: function(data){
jQuery("#phPosOrderPrintBox").attr("class",
phClass);// Add class to box of document - to differentiate documents
loaded by ajax
jQuery("#phPosOrderPrintBox").attr("data-type",
phType);// Add data type to box of document - so it can be read by print
function
jQuery("#phPosOrderPrintBox").html(data);// Add the document
itself to the site
}
})
e.preventDefault();
})
/* EVENT - POS Scroll cart */
var phPosCart = jQuery('#phPosCart');
phScrollPosCart(phPosCart);// On start
phPosCart.on("DOMSubtreeModified", function(){// On modified
if (phPosCart.text() != '') {// this event runs twice - first
when jquery empty the object, second when it fills it again
phScrollPosCart(phPosCart);// run only on second when it fills the
object
}
});
})
phoca/phocapos.min.js000064400000022000151175232470010573 0ustar00function
phUpdateUrlParameter(e,o,r){var t,a,n;if(void
0!==r?(a="",1<(n=(t=r).split("#")).length&&(a=n[1])):(t=window.location.href,a=location.hash),0<=(t=t.replace(a,"")).indexOf(e+"=")?t=t.substring(0,t.indexOf(e))+e+"="+o+(n=0<=(n=(n=t.substring(t.indexOf(e))).substring(n.indexOf("=")+1)).indexOf("&")?n.substring(n.indexOf("&")):""):t.indexOf("?")<0?t+="?"+e+"="+o:t+="&"+e+"="+o,t=t.replace(/[^=&]+=(&|$)/g,"").replace(/&$/,""),void
0!==r)return t+a;window.history.pushState(null,null,t+a)}function
phDoSubmitFormUpdateInputBox(e,o){return
phRequest=jQuery.ajax({type:"POST",url:o,async:!0,cache:"false",data:e,dataType:"HTML",success:function(e){jQuery("#phPosInputBox").html(e)}}),!1}function
phDoSubmitFormUpdateCategoriesBox(e,o){return"main.content.customers"!=jQuery("#phPosPaginationBox
input[name=page]").val()||(phRequest=jQuery.ajax({type:"POST",url:o,async:!0,cache:"false",data:e,dataType:"HTML",success:function(e){jQuery("#phPosCategoriesBox").html(e)}})),!1}function
phPosCurrentData(e,o,r){var
t=Joomla.getOptions("phVarsPC").token;return"format="+(void
0!==o?o:"raw")+"&tmpl=component&page="+(void
0!==e?e:jQuery("#phPosPaginationBox
input[name=page]").val())+(void
0!==r?"&id="+r:"")+"&ticketid="+jQuery("#phPosPaginationBox
input[name=ticketid]").val()+"&unitid="+jQuery("#phPosPaginationBox
input[name=unitid]").val()+"§ionid="+jQuery("#phPosPaginationBox
input[name=sectionid]").val()+"&"+t+"=1"}function
phPosClearFilter(){phUpdateUrlParameter("category",""),jQuery("input.phPosCategoryCheckbox:checkbox:checked").prop("checked",!1),jQuery("label.phCheckBoxCategory").removeClass("active"),phUpdateUrlParameter("search",""),jQuery("#phPosSearch").val("")}function
phPosManagePageFocus(e){if(1!=Joomla.getOptions("phParamsPC").posFocusInputFields)return!0;"main.content.products"==e?jQuery("#phPosSearch").is(":focus")||jQuery("#phPosSku").focus():"main.content.customers"==e?jQuery("#phPosSearch").is(":focus")||jQuery("#phPosCard").focus():"main.content.paymentmethods"==e?jQuery("#phPosSearch").is(":focus")||jQuery("#phcoupon").focus():"main.content.payment"==e&&jQuery("#phAmountTendered").focus()}function
phPosManagePage(){var e=jQuery("#phPosPaginationBox
input[name=page]").val();"main.content.products"==e?(jQuery(".ph-pos-checkbox-box").show(),jQuery(".ph-pos-sku-product-box").show(),jQuery(".ph-pos-card-user-box").hide(),jQuery(".ph-pos-search-box").show(),jQuery(".ph-pos-date-order-box").hide(),phPosManagePageFocus(e)):"main.content.customers"==e?(jQuery(".ph-pos-checkbox-box").hide(),jQuery(".ph-pos-search-box").show(),jQuery(".ph-pos-card-user-box").show(),jQuery(".ph-pos-sku-product-box").hide(),jQuery(".ph-pos-date-order-box").hide(),phPosManagePageFocus(e)):"main.content.order"==e?(jQuery(".ph-pos-checkbox-box").hide(),jQuery(".ph-pos-search-box").hide(),jQuery(".ph-pos-card-user-box").hide(),jQuery(".ph-pos-sku-product-box").hide(),jQuery(".ph-pos-date-order-box").hide()):"main.content.orders"==e?(jQuery(".ph-pos-checkbox-box").hide(),jQuery(".ph-pos-search-box").hide(),jQuery(".ph-pos-card-user-box").hide(),jQuery(".ph-pos-sku-product-box").hide(),jQuery(".ph-pos-date-order-box").show()):"main.content.paymentmethods"==e||"main.content.payment"==e?(jQuery(".ph-pos-checkbox-box").hide(),jQuery(".ph-pos-search-box").hide(),jQuery(".ph-pos-card-user-box").hide(),jQuery(".ph-pos-sku-product-box").hide(),jQuery(".ph-pos-date-order-box").hide(),phPosManagePageFocus(e)):(jQuery(".ph-pos-checkbox-box").hide(),jQuery(".ph-pos-search-box").hide(),jQuery(".ph-pos-card-user-box").hide(),jQuery(".ph-pos-sku-product-box").hide(),jQuery(".ph-pos-date-order-box").hide())}function
phAddSuffixToUrl(e,o){return
e+(-1!=e.indexOf("?")?"&":"?")+o}function
phAjaxEditPos(e,o,r,t){var
a=phAddSuffixToUrl(window.location.href,"format=raw"),n=phPosCurrentData("main.input"),s=phPosCurrentData("main.categories"),p=phPosCurrentData("main.cart","json");return
phRequest=jQuery.ajax({type:"POST",url:o,async:!0,cache:"false",data:e,dataType:"JSON",success:function(e){var
o;1==e.status?(o="undefined"!==e.id?e.id:"",o=phPosCurrentData(r,"raw",o),phDoSubmitFormUpdateCategoriesBox(s,a),phRenderPage(o,a),phDoSubmitFormUpdateInputBox(n,a),phDoSubmitFormUpdateCart(p),jQuery(".ph-pos-message-box").html(e.message)):0==e.status&&(o=phPosCurrentData(t),phRenderPage(o,a),phDoSubmitFormUpdateInputBox(n,a),phDoSubmitFormUpdateCart(p),jQuery(".ph-pos-message-box").html(e.error))}}),!1}function
phFindMember(e){var
o="search="+e+"&"+phPosCurrentData();phUpdateUrlParameter("search",e);e=phAddSuffixToUrl(window.location.href,"format=raw");phRenderPage(o,e),jQuery(".ph-pos-message-box").html("")}function
phScrollPosCart(e){var
o;0<jQuery("#ph-msg-ns").length?e.animate({scrollTop:0},1500):(o=e[0].scrollHeight,e.animate({scrollTop:o},1500))}function
phConfirm(o,e,r){return jQuery("#phDialogConfirm
.modal-body").html(r),jQuery("#phDialogConfirm").modal(),jQuery("#phDialogConfirm").modal({keyboard:!1}),jQuery("#phDialogConfirm").modal("show"),jQuery("#phDialogConfirmSave").on("click",function(e){return
phPosCloseTicketFormConfirmed=!0,""!=o&&jQuery(o).submit(),!0}),!1}jQuery(document).ready(function(){phPosManagePage(),jQuery(document).on("submit","#phPosSkuProductForm",function(){setTimeout(function(){jQuery("#phPosSku").val("")},100)}),jQuery(document).on("submit","#phPosCardUserForm",function(){setTimeout(function(){jQuery("#phPosCard").val("")},100)});var
e=Joomla.getOptions("phLangPC"),o=document.getElementsByTagName("script"),t=0;jQuery.each(o,function(e,o){var
r=o.src,o=r.indexOf("?"),r=(r=r.substring(0,-1!=o?o:r.length)).split("\\\\").pop().split("/").pop();"bootstrap.min.js"!=r&&"bootstrap.js"!=r||t++}),1<t&&(jQuery("#phPosWarningMsgBox").text(e.COM_PHOCACART_WARNING_BOOTSTRAP_JS_LOADED_MORE_THAN_ONCE),jQuery("#phPosWarningMsgBox").show()),jQuery(document).on("click",".loadMainContent",function(e){phPosClearFilter();var
o=phAddSuffixToUrl(window.location.href,"format=raw"),r=jQuery(this).closest("form").serialize();phRenderPage(r,o),jQuery(".ph-pos-message-box").html(""),e.preventDefault()}),jQuery(document).on("click",".editMainContent",function(e){phPosClearFilter();var
o=phAddSuffixToUrl(window.location.href,"format=json"),r=jQuery(this).closest("form");phAjaxEditPos(r.serialize(),o,r.find('input[name="redirectsuccess"]').val(),r.find('input[name="redirecterror"]').val()),jQuery(".ph-pos-message-box").html(""),e.preventDefault()}),jQuery(document).on("submit","#phPosCardUserForm",function(e){phPosClearFilter();var
o=phAddSuffixToUrl(window.location.href,"format=json");phAjaxEditPos(jQuery("#phPosCardUserForm").serialize(),o,"main.content.products","main.content.products"),jQuery(".ph-pos-message-box").html(""),e.preventDefault()}),jQuery(document).on("submit","#phPosDateOrdersForm",function(e){phPosClearFilter();var
o=phAddSuffixToUrl(window.location.href,"format=raw"),r=jQuery("#phPosDateOrdersForm").serialize();phRenderPage(r,o),jQuery(".ph-pos-message-box").html(""),e.preventDefault()}),phPosCloseTicketFormConfirmed=!1,jQuery(document).on("submit","#phPosCloseTicketForm",function(e){var
o=jQuery(this).data("txt");return
phPosCloseTicketFormConfirmed?!(phPosCloseTicketFormConfirmed=!1):(phConfirm("#phPosCloseTicketForm","",o),e.preventDefault(),!1)}),jQuery(document).on("change","#phPosCategoriesBox
.phPosCategoryCheckbox",function(){var
e,o;2==Joomla.getOptions("phParamsPC").posFilterCategory?(e=[],jQuery("input.phPosCategoryCheckbox:checkbox:checked").each(function(){e.push(jQuery(this).val())}),o=e.join(",")):(o=jQuery(this).val(),jQuery("input.phPosCategoryCheckbox:checkbox:checked").each(function(){o!=jQuery(this).val()&&(jQuery(this).prop("checked",!1),jQuery("label.phCheckBoxCategory").removeClass("active"))}),0==jQuery(this).prop("checked")&&(o=""));var
r="category="+o+"&"+phPosCurrentData();phUpdateUrlParameter("category",o);var
t=phAddSuffixToUrl(window.location.href,"format=raw");phRenderPage(r,t),jQuery(".ph-pos-message-box").html("")});var
r=null;jQuery("#phPosSearch").keyup(function(){clearTimeout(r);var
e=jQuery(this);r=setTimeout(function(){phFindMember(e.val())},800)}),jQuery("#phPosContentBox").on("click",".phOrderPrintBtn",function(e){var
o=Joomla.getOptions("phVarsPC"),r=Joomla.getOptions("phParamsPC").posServerPrint,t=o.urlOrder,a=jQuery(this).data("order"),n=jQuery(this).data("type"),o=(jQuery("#phPosOrderPrintBox").attr("data-order"),jQuery("#phPosOrderPrintBox").attr("data-type"));if("-1"==n){if(2!=r&&3!=r)return
window.print(),!1;if("4"!=o)return
window.print(),!1;o=phAddSuffixToUrl(t,"id="+a+"&type="+o+"&pos=1&printserver=1");return
phRequestPrint=jQuery.ajax({type:"GET",url:o,async:!0,cache:"false",dataType:"HTML",success:function(e){jQuery(".ph-pos-message-box").html("<div>"+e+"</div>")}}),e.preventDefault(),!1}var
s="phType"+n,t=phAddSuffixToUrl(t,"id="+a+"&type="+n+"&pos=1");phRequest=jQuery.ajax({type:"GET",url:t,async:!0,cache:"false",dataType:"HTML",success:function(e){jQuery("#phPosOrderPrintBox").attr("class",s),jQuery("#phPosOrderPrintBox").attr("data-type",n),jQuery("#phPosOrderPrintBox").html(e)}}),e.preventDefault()});var
a=jQuery("#phPosCart");phScrollPosCart(a),a.on("DOMSubtreeModified",function(){""!=a.text()&&phScrollPosCart(a)})});phoca/phocarequest.js000064400000022320151175232470010705
0ustar00/*
* @package Phoca Cart
* @author Jan Pavelka - https://www.phoca.cz
* @copyright Copyright (C) Jan Pavelka https://www.phoca.cz
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 and later
* @cms Joomla
* @copyright Copyright (C) Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
*/
function phAppendContainerRequest() {
if (jQuery('#phContainerRequest').length === 0) {
jQuery("body").append('<div
id="phContainerRequest"></div>');
}
else {
// phContainerRequest exists
}
}
/* All popups can share one the same container but Quick View can be
displayed together with another popup
* so it must have own container
*/
function phAppendContainerRequestQickView() {
if (jQuery('#phContainerRequestQuickView').length === 0) {
jQuery("body").append('<div
id="phContainerRequestQuickView"></div>');
}
else {
// phContainerRequest exists
}
}
function phDoRequestSuccess(data, options) {
if (options['type'] == 'cart') {
/* Add to cart, update cart */
jQuery(options['class']).html(data.item);
jQuery(options['class'] + "Count").html(data.count);
jQuery(options['class'] + "Total").html(data.total);
if (options['pos'] == 1) {
var phUrlPos = phAddSuffixToUrl(window.location.href,
'format=raw');
var phDataInput = phPosCurrentData("main.input");
phDoSubmitFormUpdateInputBox(phDataInput, phUrlPos);// refresh input box
jQuery(".ph-pos-message-box").html(data.message);// clear
message box
phPosManagePage();
}
if (options['method'] == 2) {
phAppendContainerRequest();
jQuery("#phContainerRequest").html(data.popup);
jQuery("#phAddToCartPopup").modal();
}
if (options['method'] == 1) {
// If no popup is displayed we can reload the page when we are in
specific view. If popup, this will be done when clicking continue
if (options['view'] == 1) {
startFullOverlay(1);
setTimeout(function() {location.reload();}, 1);
}
}
} else if (options['type'] == 'compare') {
/* Comparison Add, Remove */
jQuery(".phItemCompareBox").html(data.item);
jQuery(".phItemCompareBoxCount").html(data.count);
if (options['method'] == 2) {
phAppendContainerRequest();
jQuery("#phContainerRequest").html(data.popup);
if (options['task'] == "add") {
jQuery("#phAddToComparePopup").modal();
} else if (options['task'] == "remove") {
jQuery("#phRemoveFromComparePopup").modal();
}
}
if (options['method'] == 1) {
// If no popup is displayed we can reload the page when we are in
specific view. If popup, this will be done when clicking continue
if (options['view'] == 1) {
startFullOverlay(1);
setTimeout(function() {location.reload();}, 1);
}
}
} else if (options['type'] == 'wishlist') {
/* Wishlist Add, Remove */
jQuery(".phItemWishListBox").html(data.item);
jQuery(".phItemWishListBoxCount").html(data.count);
if (options['method'] == 2) {
phAppendContainerRequest();
jQuery("#phContainerRequest").html(data.popup);
if (options['task'] == "add") {
jQuery("#phAddToWishListPopup").modal();
} else if (options['task'] == "remove") {
jQuery("#phRemoveFromWishListPopup").modal();
}
}
if (options['method'] == 1) {
// If no popup is displayed we can reload the page when we are in
specific view. If popup, this will be done when clicking continue
if (options['view'] == 1) {
startFullOverlay(1);
setTimeout(function() {location.reload();}, 1);
}
}
} else if (options['type'] == 'quickview') {
/* Quick View */
jQuery(".phjItemQuick.phjProductAttribute").remove();// Clear
attributes from dom when ajax reload
//jQuery("body").append(jQuery("#phContainer"));
phAppendContainerRequestQickView();
jQuery("#phContainerRequestQuickView").html(data.popup);
//jQuery("#phContainer").html(data.popup);
//jQuery("body").append(jQuery("#phQuickViewPopup"));
jQuery("#phQuickViewPopup").modal();
if (options['load_chosen'] > 0) {
jQuery('select').chosen('destroy').chosen({disable_search_threshold
: 10,allow_single_deselect : true});
}
phChangeAttributeType('ItemQuick');
if (options['quantity_input_spinner'] > 0) {
jQuery("input[name='quantity']:visible").TouchSpin({
verticalbuttons: true,
verticalup: options["icon_spinner_verticalup"],
verticaldown: options["icon_spinner_verticaldown"]
})
}
} else if (options['type'] == 'changedata') {
/* Change Image */
if( data.item.image !== undefined && data.item.image !==
'' ) {
if (options['method_image'] == 2) {
var phProductImg = '.phjProductImage' +
options["id_item_name"];
var phProductSource = '.phjProductSource' +
options["id_item_name"];// Webp source
var phProductHref = '.phjProductHref' +
options["id_item_name"];
// New image found - change to new image
jQuery(phProductHref).attr('href', data.item.image);
jQuery(phProductImg).attr('src', data.item.image);
jQuery(phProductSource).attr('srcset',
data.item.image);//webp
}
}
/* Change Price */
if( data.item.price !== undefined ) {
jQuery(options["id_item_price"]).html(data.item.price);
// Change also Gift voucher if displayed
jQuery(options["id_item_price_gift"]).html(data.item.priceitems.bruttoformat);
}
/* Change ID (SKU, EAN, ...) */
if( data.item.id !== undefined ) {
jQuery(options["id_item_id"]).html(data.item.id);
}
if( data.item.stock !== undefined ) {
if (options['method_stock'] == 1) {
//if (data.item.stockvalue < 1) {
if (data.item.hideaddtocart == 1) {
//jQuery(phProductAddToCart).hide();';
jQuery(options["product_add_to_cart_item"]).css('visibility',
'hidden');
jQuery(options["product_add_to_cart_item_icon"]).css('display',
'none');
} else {
//jQuery(phProductAddToCart).show();';
jQuery(options["product_add_to_cart_item"]).css('visibility',
'visible');
jQuery(options["product_add_to_cart_item_icon"]).css('display',
'block');
}
}
jQuery(options["id_item_stock"]).html(data.item.stock);
}
} /*else if (options['type'] == 'changeprice') {
/* Change Price *//*
jQuery(options["id_item"]).html(data.item);
} else if (options['type'] == 'changeid') {
/* Change ID (SKU, EAN, ...) *//*
jQuery(options["id_item"]).html(data.item);
} else if (options['type'] == 'changestock') {
/* Change Stock *//*
if (options['method'] == 1) {
if (data.stock < 1) {
//jQuery(phProductAddToCart).hide();';
jQuery(options["product_add_to_cart_item"]).css('visibility',
'hidden');
jQuery(options["product_add_to_cart_item_icon"]).css('display',
'none');
} else {
//jQuery(phProductAddToCart).show();';
jQuery(options["product_add_to_cart_item"]).css('visibility',
'visible');
jQuery(options["product_add_to_cart_item_icon"]).css('display',
'block');
}
}
jQuery(options["id_item"]).html(data.item);
}*/
}
function phDoRequestError(data, options) {
if (options['type'] == 'cart') {
/* Add to cart, update cart */
if (options['pos'] == 1) {
jQuery(".ph-pos-message-box").html(data.error);// clear
message box
phPosManagePage();
}
if (options['method'] != 2) {
jQuery(".phItemCartBox").html(data.error);
}
if (options['method'] == 2) {
phAppendContainerRequest();
jQuery("#phContainerRequest").html(data.popup);
jQuery("#phAddToCartPopup").modal();
}
if (options['method'] == 1) {
// If no popup is displayed we can reload the page when we are in
specific view. If popup, this will be done when clicking continue
if (options['view'] == 1) {
startFullOverlay(1);
setTimeout(function() {location.reload();}, 1);
}
}
}
}
/*
* type ... compare
* view ... is compare view or not
* task ... add/remove
* method ... popup method: no ajax, ajax without popup, ajax with popup
* url ... ajax url
* data ... ajax data
*/
function phDoRequestMethods(url, data, options) {
phRequest = jQuery.ajax({
type: "POST",
url: url,
async: "false",
cache: "false",
data: data,
dataType:"JSON",
success: function(data){
if (data.status == 1){
phDoRequestSuccess(data, options);
} else if (data.status == 0){
phDoRequestError(data, options);
} else {
// No change
}
}
})
return false;
}
// ------
// Events
// ------
jQuery(document).ready(function(){
/* Add to cart, update cart */
// :: EVENT (SUBMIT) Item View
//jQuery(".phItemCartBoxForm").on(\'submit\', function
(e) {// Not working when form is added by ajax
jQuery(document).on("submit",
"form.phItemCartBoxForm", function (e) { // Works with forms
added by ajax
if (typeof phDoSubmitFormAddToCart === "function") {
e.preventDefault();
var sFormData = jQuery(this).serialize();
phDoSubmitFormAddToCart(sFormData);
}
})
/* Update cart only in POS */
// ::EVENT (CLICK) Change Layout Type Clicking on Grid, Gridlist, List
jQuery(document).on("click", "#ph-pc-pos-site
form.phItemCartUpdateBoxForm button", function (e) {
if (typeof phDoSubmitFormAddToCart === "function") {
e.preventDefault();
var sForm = jQuery(this).closest("form");// Find in which
form the right button was clicked
var phAction= jQuery(this).val();
var sFormData = sForm.serialize() + "&action=" + phAction;
phDoSubmitFormUpdateCart(sFormData);
}
})
})
phoca/phocarequest.min.js000064400000010134151175232470011467
0ustar00function
phAppendContainerRequest(){0===jQuery("#phContainerRequest").length&&jQuery("body").append('<div
id="phContainerRequest"></div>')}function
phAppendContainerRequestQickView(){0===jQuery("#phContainerRequestQuickView").length&&jQuery("body").append('<div
id="phContainerRequestQuickView"></div>')}function
phDoRequestSuccess(e,t){var
o,i,r;"cart"==t.type?(jQuery(t.class).html(e.item),jQuery(t.class+"Count").html(e.count),jQuery(t.class+"Total").html(e.total),1==t.pos&&(r=phAddSuffixToUrl(window.location.href,"format=raw"),i=phPosCurrentData("main.input"),phDoSubmitFormUpdateInputBox(i,r),jQuery(".ph-pos-message-box").html(e.message),phPosManagePage()),2==t.method&&(phAppendContainerRequest(),jQuery("#phContainerRequest").html(e.popup),jQuery("#phAddToCartPopup").modal()),1==t.method&&1==t.view&&(startFullOverlay(1),setTimeout(function(){location.reload()},1))):"compare"==t.type?(jQuery(".phItemCompareBox").html(e.item),jQuery(".phItemCompareBoxCount").html(e.count),2==t.method&&(phAppendContainerRequest(),jQuery("#phContainerRequest").html(e.popup),"add"==t.task?jQuery("#phAddToComparePopup").modal():"remove"==t.task&&jQuery("#phRemoveFromComparePopup").modal()),1==t.method&&1==t.view&&(startFullOverlay(1),setTimeout(function(){location.reload()},1))):"wishlist"==t.type?(jQuery(".phItemWishListBox").html(e.item),jQuery(".phItemWishListBoxCount").html(e.count),2==t.method&&(phAppendContainerRequest(),jQuery("#phContainerRequest").html(e.popup),"add"==t.task?jQuery("#phAddToWishListPopup").modal():"remove"==t.task&&jQuery("#phRemoveFromWishListPopup").modal()),1==t.method&&1==t.view&&(startFullOverlay(1),setTimeout(function(){location.reload()},1))):"quickview"==t.type?(jQuery(".phjItemQuick.phjProductAttribute").remove(),phAppendContainerRequestQickView(),jQuery("#phContainerRequestQuickView").html(e.popup),jQuery("#phQuickViewPopup").modal(),0<t.load_chosen&&jQuery("select").chosen("destroy").chosen({disable_search_threshold:10,allow_single_deselect:!0}),phChangeAttributeType("ItemQuick"),0<t.quantity_input_spinner&&jQuery("input[name='quantity']:visible").TouchSpin({verticalbuttons:!0,verticalup:t.icon_spinner_verticalup,verticaldown:t.icon_spinner_verticaldown})):"changedata"==t.type&&(void
0!==e.item.image&&""!==e.item.image&&2==t.method_image&&(o=".phjProductImage"+t.id_item_name,i=".phjProductSource"+t.id_item_name,r=".phjProductHref"+t.id_item_name,jQuery(r).attr("href",e.item.image),jQuery(o).attr("src",e.item.image),jQuery(i).attr("srcset",e.item.image)),void
0!==e.item.price&&(jQuery(t.id_item_price).html(e.item.price),jQuery(t.id_item_price_gift).html(e.item.priceitems.bruttoformat)),void
0!==e.item.id&&jQuery(t.id_item_id).html(e.item.id),void
0!==e.item.stock&&(1==t.method_stock&&(1==e.item.hideaddtocart?(jQuery(t.product_add_to_cart_item).css("visibility","hidden"),jQuery(t.product_add_to_cart_item_icon).css("display","none")):(jQuery(t.product_add_to_cart_item).css("visibility","visible"),jQuery(t.product_add_to_cart_item_icon).css("display","block"))),jQuery(t.id_item_stock).html(e.item.stock)))}function
phDoRequestError(e,t){"cart"==t.type&&(1==t.pos&&(jQuery(".ph-pos-message-box").html(e.error),phPosManagePage()),2!=t.method&&jQuery(".phItemCartBox").html(e.error),2==t.method&&(phAppendContainerRequest(),jQuery("#phContainerRequest").html(e.popup),jQuery("#phAddToCartPopup").modal()),1==t.method&&1==t.view&&(startFullOverlay(1),setTimeout(function(){location.reload()},1)))}function
phDoRequestMethods(e,t,o){return
phRequest=jQuery.ajax({type:"POST",url:e,async:"false",cache:"false",data:t,dataType:"JSON",success:function(e){1==e.status?phDoRequestSuccess(e,o):0==e.status&&phDoRequestError(e,o)}}),!1}jQuery(document).ready(function(){jQuery(document).on("submit","form.phItemCartBoxForm",function(e){"function"==typeof
phDoSubmitFormAddToCart&&(e.preventDefault(),e=jQuery(this).serialize(),phDoSubmitFormAddToCart(e))}),jQuery(document).on("click","#ph-pc-pos-site
form.phItemCartUpdateBoxForm button",function(e){var
t;"function"==typeof
phDoSubmitFormAddToCart&&(e.preventDefault(),t=jQuery(this).closest("form"),e=jQuery(this).val(),e=t.serialize()+"&action="+e,phDoSubmitFormUpdateCart(e))})});plupload/i18n/cs.js000064400000001114151175232470010112
0ustar00// .po file like language pack
plupload.addI18n({
'Select files' : 'Vyberte soubory',
'Add files to the upload queue and click the start button.' :
'Přidejte soubory do fronty a pak spusťte nahrávání.',
'Filename' : 'Název souboru',
'Status' : 'Status',
'Size' : 'Velikost',
'Add Files' : 'Přidat soubory',
'Stop current upload' : 'Zastavit nahrávání',
'Start uploading queue' : 'Spustit frontu
nahrávání',
'Drag files here.' : 'Sem přetáhněte soubory.',
'Start Upload': 'Spustit nahrávání',
'Uploaded %d/%d files': 'Nahráno %d/%d souborů'
});plupload/i18n/da.js000064400000000647151175232470010103 0ustar00// .po
file like language pack
plupload.addI18n({
'Select files' : 'Vælg filer',
'Add files to the upload queue and click the start button.' :
'Tilføj filer til køen, og tryk på start.',
'Filename' : 'Filnavn',
'Status' : 'Status',
'Size' : 'Størrelse',
'Add files' : 'Tilføj filer',
'Stop current upload' : 'Stop upload',
'Start uploading queue' : 'Start upload',
'Drag files here.' : 'Træk filer her.'
});plupload/i18n/de.js000064400000002057151175232470010104 0ustar00//
German
plupload.addI18n({
'Select files' : 'Dateien hochladen',
'Add files to the upload queue and click the start button.' :
'Dateien hinzufügen und auf \'Hochladen\'
klicken.',
'Filename' : 'Dateiname',
'Status' : 'Status',
'Size' : 'Größe',
'Add files' : 'Dateien', //
hinzufügen',
'Stop current upload' : 'Aktuelles Hochladen
stoppen',
'Start uploading queue' : 'Hochladen starten',
'Uploaded %d/%d files': '%d/%d Dateien sind
hochgeladen',
'N/A' : 'Nicht verfügbar',
'Drag files here.' : 'Ziehen Sie die Dateien hier
hin',
'File extension error.': 'Fehler bei Dateiendung',
'File size error.': 'Fehler bei
Dateigröße',
'Init error.': 'Initialisierungsfehler',
'HTTP Error.': 'HTTP-Fehler',
'Security error.': 'Sicherheitsfehler',
'Generic error.': 'Typischer Fehler',
'IO error.': 'Ein/Ausgabe-Fehler',
'Stop Upload': 'Hochladen stoppen',
'Start upload': 'Hochladen',
'%d files queued': '%d Dateien in der
Warteschlange'
});plupload/i18n/el.js000064400000001430151175232470010106 0ustar00//
Greek
plupload.addI18n({
'Select files' : 'Επιλέξτε Αρχεία',
'Add files to the upload queue and click the start button.' :
'Προσθήκη αρχείων στην ουρά
μεταφόρτωσης',
'Filename' : 'Όνομα αρχείου',
'Status' : 'Κατάσταση',
'Size' : 'Μέγεθος',
'Add Files' : 'Προσθέστε αρχεία',
'Stop current upload' : 'Διακοπή
τρέχουσας μεταφόρτωσης',
'Start uploading queue' : 'Εκκίνηση
μεταφόρτωσης ουράς αρχείων',
'Drag files here.' : 'Σύρετε αρχεία
εδώ',
'Start Upload': 'Εκκίνηση
μεταφόρτωσης',
'Uploaded %d/%d files': 'Ανέβηκαν %d/%d
αρχεία'
});plupload/i18n/es.js000064400000002066151175232470010123 0ustar00//
Spanish
plupload.addI18n({
'Select files' : 'Elija archivos:',
'Add files to the upload queue and click the start button.' :
'Agregue archivos a la cola de subida y haga click en el boton de
iniciar.',
'Filename' : 'Nombre de archivo',
'Status' : 'Estado',
'Size' : 'Tamaño',
'Add files' : 'Agregue archivos',
'Stop current upload' : 'Detener subida actual',
'Start uploading queue' : 'Iniciar subida de cola',
'Uploaded %d/%d files': 'Subidos %d/%d archivos',
'N/A' : 'No disponible',
'Drag files here.' : 'Arrastre archivos
aquí',
'File extension error.': 'Error de extensión de
archivo.',
'File size error.': 'Error de tamaño de
archivo.',
'Init error.': 'Error de inicialización.',
'HTTP Error.': 'Error de HTTP.',
'Security error.': 'Error de seguridad.',
'Generic error.': 'Error genérico.',
'IO error.': 'Error de entrada/salida.',
'Stop Upload': 'Detener Subida.',
'Add Files': 'Agregar Archivos',
'Start Upload': 'Comenzar Subida.',
'%d files queued': '%d archivos en cola.'
});plupload/i18n/et.js000064400000003223151175232470010120 0ustar00//
Estonian translation, et.js
plupload.addI18n({
'Select files' : 'Vali faile',
'Add files to the upload queue and click the start button.' :
'Lisa failid üleslaadimise järjekorda ja klõpsa alustamise
nupule.',
'Filename' : 'Failinimi',
'Status' : 'Olek',
'Size' : 'Suurus',
'Add files' : 'Lisa faile',
'Stop current upload' : 'Praeguse üleslaadimise
peatamine',
'Start uploading queue' : 'Järjekorras ootavate failide
üleslaadimise alustamine',
'Drag files here.' : 'Lohista failid siia.',
'Start upload' : 'Alusta üleslaadimist',
'Uploaded %d/%d files': 'Üles laaditud %d/%d',
'Stop upload': 'Peata üleslaadimine',
'Start upload': 'Alusta üleslaadimist',
'%d files queued': 'Järjekorras on %d faili',
'File: %s': 'Fail: %s',
'Close': 'Sulge',
'Using runtime: ': 'Kasutatakse varianti: ',
'File: %f, size: %s, max file size: %m': 'Fail: %f, suurus:
%s, suurim failisuurus: %m',
'Upload element accepts only %d file(s) at a time. Extra files were
stripped.': 'Üleslaadimise element saab vastu võtta ainult %d
faili ühe korraga. Ülejäänud failid jäetakse laadimata.',
'Upload URL might be wrong or doesn\'t exist':
'Üleslaadimise URL võib olla vale või seda pole',
'Error: File too large: ': 'Viga: fail on liiga suur:
',
'Error: Invalid file extension: ': 'Viga: sobimatu
faililaiend: ',
'File extension error.': 'Faililaiendi viga.',
'File size error.': 'Failisuuruse viga.',
'File count error.': 'Failide arvu viga.',
'Init error.': 'Lähtestamise viga.',
'HTTP Error.': 'HTTP ühenduse viga.',
'Security error.': 'Turvaviga.',
'Generic error.': 'Üldine viga.',
'IO error.': 'S/V (I/O) viga.'
});plupload/i18n/fa.js000064400000004117151175232470010101 0ustar00//
Persian
plupload.addI18n({
'Select files' : 'انتخاب فایل',
'Add files to the upload queue and click the start button.' :
'اضافه کنید فایل ها را به صف آپلود و
دکمه شروع را کلیک کنید.',
'Filename' : 'نام فایل',
'Status' : 'وضعیت',
'Size' : 'سایز',
'Add Files' : 'افزودن فایل',
'Stop Upload' : 'توقف انتقال',
'Start Upload' : 'شروع انتقال',
'Add files' : 'افزودن فایل',
'Add files.' : 'افزودن فایل',
'Stop current upload' : 'توقف انتقال
جاری',
'Start uploading queue' : 'شروع صف
انتقال',
'Stop upload' : 'توقف انتقال',
'Start upload' : 'شروع انتقال',
'Uploaded %d/%d files': 'منتقل شد %d/%d از
فایلها',
'N/A' : 'N/A',
'Drag files here.' : 'بکشید فایل ها رو به
اینجا',
'File extension error.': 'خطا پیشوند
فایل',
'File size error.': 'خطای سایز فایل',
'File count error.': 'خطای تعداد فایل',
'Init error.': 'خطا در استارت
اسکریپت',
'HTTP Error.': 'HTTP خطای',
'Security error.': 'خطای امنیتی',
'Generic error.': 'خطای عمومی',
'IO error.': 'IO خطای',
'File: %s': ' فایل ها : %s',
'Close': 'بستن',
'%d files queued': '%d فایل در صف',
'Using runtime: ': 'استفاده میکنید از :
',
'File: %f, size: %s, max file size: %m': 'فایل: %f,
سایز: %s, بزرگترین سایز فایل: %m',
'Upload element accepts only %d file(s) at a time. Extra files were
stripped.': 'عنصر بارگذار فقط %d فایل رو در
یک زمان می پذیرد. سایر فایل ها مجرد از این
موضوع هستند.',
'Upload URL might be wrong or doesn\'t exist':
'آدرس آپلود اشتباه می باشد یا وجود
ندارد',
'Error: File too large: ': 'خطا: فایل حجیم
است :: ',
'Error: Invalid file extension: ': 'خطا پسوند
فایل معتبر نمی باشد : '
});
plupload/i18n/fi.js000064400000003143151175232470010107 0ustar00// .fi file
like language pack
plupload.addI18n({
'Select files' : 'Valitse tiedostoja',
'Add files to the upload queue and click the start button.' :
'Lisää tiedostoja latausjonoon ja klikkaa aloita-nappia.',
'Filename' : 'Tiedostonimi',
'Status' : 'Tila',
'Size' : 'Koko',
'Add files' : 'Lisää tiedostoja',
'Stop current upload' : 'Pysäytä nykyinen lataus',
'Start uploading queue' : 'Aloita jonon lataus',
'Drag files here.' : 'Raahaa tiedostot tänne.',
'Start upload' : 'Aloita lataus',
'Uploaded %d/%d files': 'Ladattu %d/%d tiedostoa',
'Stop upload': 'Pysäytä lataus',
'Start upload': 'Aloita lataus',
'%d files queued': '%d tiedostoa jonossa',
'File: %s': 'Tiedosto: %s',
'Close': 'Sulje',
'Using runtime: ': 'Käytetään ajonaikaista: ',
'File: %f, size: %s, max file size: %m': 'Tiedosto: %f,
koko: %s, maksimi tiedostokoko: %m',
'Upload element accepts only %d file(s) at a time. Extra files were
stripped.': 'Latauselementti sallii ladata vain %d tiedosto(a)
kerrallaan. Ylimääräiset tiedostot ohitettiin.',
'Upload URL might be wrong or doesn\'t exist': 'Lataus
URL saattaa olla väärin tai ei ole olemassa',
'Error: File too large: ': 'Virhe: Tiedosto liian suuri:
',
'Error: Invalid file extension: ': 'Virhe: Kelpaamaton
tiedostopääte: ',
'File extension error.': 'Tiedostopäätevirhe.',
'File size error.': 'Tiedostokokovirhe.',
'File count error.': 'Tiedostolaskentavirhe.',
'Init error.': 'Init virhe.',
'HTTP Error.': 'HTTP virhe.',
'Security error.': 'Tietoturvavirhe.',
'Generic error.': 'Yleinen virhe.',
'IO error.': 'I/O virhe.'
});plupload/i18n/fr-ca.js000064400000003524151175232470010504 0ustar00//
French-Canadian
plupload.addI18n({
'Select files' : 'Sélectionnez les fichiers',
'Add files to the upload queue and click the start button.' :
'Ajoutez des fichiers à la file d\'attente et appuyez sur le
bouton démarrer.',
'Filename' : 'Nom du fichier',
'Status' : 'Statut',
'Size' : 'Taille',
'Add files' : 'Ajouter Fichiers',
'Stop current upload' : 'Arrêter le téléversement
actuel',
'Start uploading queue' : 'Démarrer le
téléversement',
'Uploaded %d/%d files': '%d/%d fichiers envoyés',
'N/A' : 'Non applicable',
'Drag files here.' : 'Glisser-déposer les fichiers
ici',
'File extension error.': 'Erreur d\'extension de
fichier',
'File size error.': 'Erreur de taille de fichier',
'Init error.': 'Erreur d\'initialisation',
'HTTP Error.': 'Erreur HTTP',
'Security error.': 'Erreur de sécurité',
'Generic error.': 'Erreur commune',
'IO error.': 'Erreur E/S',
'Stop Upload': 'Arrêter le téléversement',
'Add Files': 'Ajouter des fichiers',
'Start upload': 'Démarrer le téléversement',
'%d files queued': '%d fichiers en attente',
'File: %s':'Fichier: %s',
'Close':'Fermer',
'Using runtime:':'Moteur logiciel:',
'File: %f, size: %s, max file size: %m':'Fichier: %f,
poids: %s, poids maximal: %m',
'Upload element accepts only %d file(s) at a time. Extra files
were stripped.':'La file accepte %d fichier(s) à la fois. Les
fichiers en trop sont ignorés',
'Upload URL might be wrong or doesn\'t
exist':'L\'URL de téléversement est erroné ou
inexistant',
'Error: File to large: ':'Fichier trop volumineux:
',
'Error: Invalid file extension: ':'Extension de fichier
invalide: ',
'File size error.':'Erreur de taile de fichier',
'File count error.':'Erreur de décompte des
fichiers'
});plupload/i18n/fr.js000064400000002124151175232470010116 0ustar00//
French
plupload.addI18n({
'Select files' : 'Sélectionnez les fichiers',
'Add files to the upload queue and click the start button.' :
'Ajoutez des fichiers à la file et appuyez sur le bouton
démarrer.',
'Filename' : 'Nom de fichier',
'Status' : 'Status',
'Size' : 'Taille',
'Add files' : 'Ajouter Fichiers',
'Stop current upload' : 'Arrêter l\'envoi en
cours',
'Start uploading queue' : 'Démarrer
l\'envoi',
'Uploaded %d/%d files': '%d/%d fichiers envoyés',
'N/A' : 'Non applicable',
'Drag files here.' : 'Déposer les fichiers ici.',
'File extension error.': 'Erreur extension
fichier',
'File size error.': 'Erreur taille fichier.',
'Init error.': 'Erreur d\'initialisation.',
'HTTP Error.': 'Erreur HTTP.',
'Security error.': 'Erreur de sécurité.',
'Generic error.': 'Erreur générique.',
'IO error.': 'Erreur E/S.',
'Stop Upload': 'Arrêter les envois.',
'Add Files': 'Ajouter des fichiers',
'Start Upload': 'Démarrer les envois.',
'%d files queued': '%d fichiers en attente.'
});plupload/i18n/hr.js000064400000002024151175232470010117 0ustar00//
Croatian
plupload.addI18n({
'Select files': 'Izaberite datoteke:',
'Add files to the upload queue and click the start button.':
'Dodajte datoteke u listu i kliknite Upload.',
'Filename': 'Ime datoteke',
'Status': 'Status',
'Size': 'Veličina',
'Add files': 'Dodajte datoteke',
'Stop current upload': 'Zaustavi trenutan upload',
'Start uploading queue': 'Pokreni Upload',
'Uploaded %d/%d files': 'Uploadano %d/%d
datoteka',
'N/A': 'N/A',
'Drag files here.': 'Dovucite datoteke ovdje',
'File extension error.': 'Greška ekstenzije
datoteke.',
'File size error.': 'Greška veličine datoteke.',
'Init error.': 'Greška inicijalizacije.',
'HTTP Error.': 'HTTP greška.',
'Security error.': 'Sigurnosna greška.',
'Generic error.': 'Generička greška.',
'IO error.': 'I/O greška.',
'Stop Upload': 'Zaustavi upload.',
'Add Files': 'Dodaj datoteke',
'Start Upload': 'Pokreni upload.',
'%d files queued': '%d datoteka na čekanju.'
});plupload/i18n/hu.js000064400000003312151175232470010123 0ustar00//
Hungarian
plupload.addI18n({
'Select files' : 'Fájlok kiválasztása',
'Add files to the upload queue and click the start button.' :
'Válaszd ki a fájlokat, majd kattints az Indítás gombra.',
'Filename' : 'Fájlnév',
'Status' : 'Állapot',
'Size' : 'Méret',
'Add files' : 'Hozzáadás',
'Stop current upload' : 'Jelenlegi feltöltés
megszakítása',
'Start uploading queue' : 'Várakozási sor
feltöltésének indítása',
'Uploaded %d/%d files': 'Feltöltött fájlok:
%d/%d',
'N/A': 'Nem elérhető',
'Drag files here.' : 'Húzd ide a fájlokat.',
'Stop upload': 'Feltöltés megszakítása',
'Start upload': 'Indítás',
'%d files queued': '%d fájl sorbaállítva',
'File: %s': 'Fájl: %s',
'Close': 'Bezárás',
'Using runtime: ': 'Használt runtime: ',
'File: %f, size: %s, max file size: %m': 'Fájl: %f,
méret: %s, maximális fájlméret: %m',
'Upload element accepts only %d file(s) at a time. Extra files
were stripped.': 'A feltöltés egyszerre csak %d fájlt fogad
el, a többi fájl nem lesz feltöltve.',
'Upload URL might be wrong or doesn\'t exist': 'A
megadott URL hibás vagy nem létezik',
'Error: File too large: ': 'Hiba: A fájl túl nagy:
',
'Error: Invalid file extension: ': 'Hiba: Érvénytelen
fájlkiterjesztés: ',
'File extension error.': 'Hibás
fájlkiterjesztés.',
'File size error.': 'Hibás fájlméret.',
'File count error.': 'A fájlok számával kapcsolatos
hiba.',
'Init error.': 'Init hiba.',
'HTTP Error.': 'HTTP hiba.',
'Security error.': 'Biztonsági hiba.',
'Generic error.': 'Általános hiba.',
'IO error.': 'I/O hiba.'
});
plupload/i18n/index.html000064400000000054151175232500011140
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>plupload/i18n/it.js000064400000001744151175232500010124
0ustar00// Italian
plupload.addI18n({
'Select files' : 'Seleziona i files',
'Add files to the upload queue and click the start button.' :
'Aggiungi i file alla coda di caricamento e clicca il pulsante di
avvio.',
'Filename' : 'Nome file',
'Status' : 'Stato',
'Size' : 'Dimensione',
'Add Files' : 'Aggiungi file',
'Stop current upload' : 'Interrompi il
caricamento',
'Start uploading queue' : 'Avvia il caricamento',
'Uploaded %d/%d files': 'Caricati %d/%d file',
'N/A' : 'N/D',
'Drag files here.' : 'Trascina i file qui.',
'File extension error.': 'Errore estensione
file.',
'File size error.': 'Errore dimensione file.',
'Init error.': 'Errore inizializzazione.',
'HTTP Error.': 'Errore HTTP.',
'Security error.': 'Errore sicurezza.',
'Generic error.': 'Errore generico.',
'IO error.': 'Errore IO.',
'Stop Upload': 'Ferma Upload',
'Start Upload': 'Inizia Upload',
'%d files queued': '%d file in lista'
});plupload/i18n/ja.js000064400000003772151175232500010105 0ustar00//
Japanese
plupload.addI18n({
'Select files' : 'ファイル選択',
'Add files to the upload queue and click the start button.' :
'ファイルをアップロードキューに追加してスタートボタンをクリックしてください',
'Filename' : 'ファイル名',
'Status' : 'ステータス',
'Size' : 'サイズ',
'Add Files' : 'ファイルを追加',
'Stop Upload' : 'アップロード停止',
'Start Upload' : 'アップロード',
'Add files' : 'ファイルを追加',
'Add files.' : 'ファイルを追加',
'Stop current upload' :
'現在のアップロードを停止',
'Start uploading queue' : 'アップロード',
'Stop upload' : 'アップロード停止',
'Start upload' : 'アップロード',
'Uploaded %d/%d files': 'アップロード中 %d/%d
ファイル',
'N/A' : 'N/A',
'Drag files here.' :
'ここにファイルをドラッグ',
'File extension error.':
'ファイル拡張子エラー',
'File size error.':
'ファイルサイズエラー',
'File count error.': 'ファイル数エラー',
'Init error.': 'イニシャライズエラー',
'HTTP Error.': 'HTTP エラー',
'Security error.': 'セキュリティエラー',
'Generic error.': 'エラー',
'IO error.': 'IO エラー',
'File: %s': 'ファイル: %s',
'Close': '閉じる',
'%d files queued': '%d
ファイルが追加されました',
'Using runtime: ': 'モード: ',
'File: %f, size: %s, max file size: %m': 'ファイル:
%f, サイズ: %s, 最大ファイルサイズ: %m',
'Upload element accepts only %d file(s) at a time. Extra files were
stripped.': 'アップロード可能なファイル数は %d
です。余分なファイルは削除されました',
'Upload URL might be wrong or doesn\'t exist':
'アップロード先の URL が存在しません',
'Error: File too large: ': 'エラー:
サイズが大きすぎます: ',
'Error: Invalid file extension: ': 'エラー:
拡張子が許可されていません: '
});
plupload/i18n/ko.js000064400000003403151175232500010113 0ustar00// Republic
of Korea
plupload.addI18n({
'Select files' : '파일 선택',
'Add files to the upload queue and click the start button.' :
'파일을 업로드 큐에 추가하여 시작 버튼을
클릭하십시오.',
'Filename' : '파일 이름',
'Status' : '상태',
'Size' : '크기',
'Add Files' : '파일 추가',
'Stop Upload': '업로드 중지',
'Start Upload': '업로드',
'Add files': '파일 추가',
'Stop current upload': '현재 업로드를
정지',
'Start uploading queue': '업로드',
'Stop upload': '업로드 중지',
'Start upload': '업로드',
'Uploaded % d / % d files': '업로드 중 % d / % d
파일',
'N / A': 'N / A',
'Drag files here': '여기에 파일을 드래그',
'File extension error': '파일 확장자 오류',
'File size error': '파일 크기 오류',
'File count error': '이미지 : 오류',
'Init error': '초기화 오류',
'HTTP Error': 'HTTP 오류',
'Security error': '보안 오류',
'Generic error': '오류',
'IO error': 'IO 오류',
'File : % s': '파일 % s',
'Close': '닫기',
'% d files queued': '% d 파일이
추가되었습니다',
'Using runtime :': '모드',
'File : % f, size : % s, max file size : % m': '파일 :
% f, 크기 : % s, 최대 파일 크기 : % m',
'Upload element accepts only % d file (s) at a time. Extra files
were stripped': '업로드 가능한 파일의 수는 %
d입니다. 불필요한 파일은 삭제되었습니다 ',
'Upload URL might be wrong or doesn \'t exist
':'업로드할 URL이 존재하지 않습니다 ',
'Error : File too large :': '오류 : 크기가 너무
큽니다',
'Error : Invalid file extension :': '오류 :
확장자가 허용되지 않습니다 :'
});plupload/i18n/lv.js000064400000003471151175232500010130 0ustar00// .lv
file like language pack
plupload.addI18n({
'Select files' : 'Izvēlieties failus',
'Add files to the upload queue and click the start button.' :
'Pieveinojiet failus rindai un klikšķiniet uz "Sākt
augšupielādi" pogas.',
'Filename' : 'Faila nosaukums',
'Status' : 'Statuss',
'Size' : 'Izmērs',
'Add files' : 'Pievienot failus',
'Stop current upload' : 'Apturēt pašreizējo
augšupielādi',
'Start uploading queue' : 'Sākt augšupielādi',
'Drag files here.' : 'Ievelciet failus šeit',
'Start upload' : 'Sākt augšupielādi',
'Uploaded %d/%d files': 'Augšupielādēti %d/%d
faili',
'Stop upload': 'Pārtraukt augšupielādi',
'Start upload': 'Sākt augšupielādi',
'%d files queued': '%d faili pievienoti rindai',
'File: %s': 'Fails: %s',
'Close': 'Aizvērt',
'Using runtime: ': 'Lieto saskarni: ',
'File: %f, size: %s, max file size: %m': 'Fails: %f,
izmērs: %s, maksimālais faila izmērs: %m',
'Upload element accepts only %d file(s) at a time. Extra files
were stripped.': 'Iespējams ielādēt tikai %d failus vienā
reizē. Atlikušie faili netika pievienoti',
'Upload URL might be wrong or doesn\'t exist':
'Augšupielādes URL varētu būt nepareizs vai neeksistē',
'Error: File too large: ': 'Kļūda: Fails pārāk
liels: ',
'Error: Invalid file extension: ': 'Kļūda: Nekorekts
faila paplašinājums:',
'File extension error.': 'Faila paplašinājuma
kļūda.',
'File size error.': 'Faila izmēra kļūda.',
'File count error.': 'Failu skaita kļūda',
'Init error.': 'Inicializācijas kļūda.',
'HTTP Error.': 'HTTP kļūda.',
'Security error.': 'Drošības kļūda.',
'Generic error.': 'Vispārēja rakstura kļūda.',
'IO error.': 'Ievades/Izvades kļūda.'
});plupload/i18n/nl.js000064400000001532151175232500010114 0ustar00//
Dutch
plupload.addI18n({
'Select files' : 'Selecteer bestand(en):',
'Add files to the upload queue and click the start button.' :
'Voeg bestanden toe aan de wachtrij en druk op
\'Start\'.',
'Filename' : 'Bestandsnaam',
'Status' : 'Status',
'Size' : 'Grootte',
'Add files' : 'Voeg bestanden toe',
'Stop current upload' : 'Stop upload',
'Start uploading queue' : 'Start upload',
'Uploaded %d/%d files': '%d/%d bestanden
ge-upload',
'N/A' : 'Niet beschikbaar',
'Drag files here.' : 'Sleep bestanden hierheen.',
'File extension error.': 'Ongeldig bestandstype.',
'File size error.': 'Bestandsgrootte Error.',
'Init error.': 'Initialisatie error.',
'HTTP Error.': 'HTTP Error.',
'Security error.': 'Beveiliging error.',
'Generic error.': 'Onbekende error.',
'IO error.': 'IO error.'
});plupload/i18n/pl.js000064400000001636151175232500010123
0ustar00plupload.addI18n({
'Select files' : 'Wybierz pliki:',
'Add files to the upload queue and click the start button.' :
'Dodaj pliki i kliknij \'Rozpocznij transfer\'.',
'Filename' : 'Nazwa pliku',
'Status' : 'Status',
'Size' : 'Rozmiar',
'Add files' : 'Dodaj pliki',
'Stop current upload' : 'Przerwij aktualny transfer',
'Start uploading queue' : 'Rozpocznij wysyłanie',
'Uploaded %d/%d files': 'Wysłano %d/%d plików',
'N/A' : 'Nie dostępne',
'Drag files here.' : 'Przeciągnij tu pliki',
'File extension error.': 'Nieobsługiwany format
pliku.',
'File size error.': 'Plik jest zbyt duży.',
'Init error.': 'Błąd inicjalizacji.',
'HTTP Error.': 'Błąd HTTP.',
'Security error.': 'Błąd bezpieczeństwa.',
'Generic error.': 'Błąd ogólny.',
'IO error.': 'Błąd IO.',
'Stop Upload': 'Przerwij transfer.',
'Add Files': 'Dodaj pliki',
'Start upload': 'Rozpocznij transfer.',
'%d files queued': '%d plików w kolejce.'
});
plupload/i18n/pt-br.js000064400000003226151175232500010531 0ustar00//
Brazilian Portuguese
plupload.addI18n({
'Select files' : 'Escolha os arquivos',
'Add files to the upload queue and click the start button.' :
'Adicione os arquivos abaixo e clique no botão "Iniciar o
envio".',
'Filename' : 'Nome do arquivo',
'Status' : 'Status',
'Size' : 'Tamanho',
'Add Files' : 'Adicionar arquivo(s)',
'Stop Upload' : 'Parar o envio',
'Start Upload' : 'Iniciar o envio',
'Add files' : 'Adicionar arquivo(s)',
'Add files.' : 'Adicionar arquivo(s)',
'Stop upload' : 'Parar o envio',
'Start upload' : 'Iniciar o envio',
'Uploaded %d/%d files': 'Enviado(s) %d/%d
arquivo(s)',
'N/A' : 'N/D',
'Drag files here.' : 'Arraste os arquivos pra cá',
'File extension error.': 'Tipo de arquivo não
permitido.',
'File size error.': 'Tamanho de arquivo não
permitido.',
'File count error.': 'Erro na contagem dos
arquivos',
'Init error.': 'Erro inicializando.',
'HTTP Error.': 'Erro HTTP.',
'Security error.': 'Erro de segurança.',
'Generic error.': 'Erro genérico.',
'IO error.': 'Erro de E/S.',
'File: %s': 'Arquivo: %s',
'Close': 'Fechar',
'%d files queued': '%d arquivo(s)',
'Using runtime: ': 'Usando: ',
'File: %f, size: %s, max file size: %m': 'Arquivo: %f,
tamanho: %s, máximo: %m',
'Upload element accepts only %d file(s) at a time. Extra files were
stripped.': 'Só são aceitos %d arquivos por vez. O que passou
disso foi descartado.',
'Upload URL might be wrong or doesn\'t exist': 'URL
de envio está errada ou não existe',
'Error: File too large: ': 'Erro: Arquivo muito grande:
',
'Error: Invalid file extension: ': 'Erro: Tipo de arquivo
não permitido: '
});
plupload/i18n/ro.js000064400000002034151175232500010121 0ustar00//
Romanian
plupload.addI18n({
'Select files' : 'Selectare fişiere',
'Add files to the upload queue and click the start button.' :
'Adaugă fişiere în lista apoi apasă butonul \'Începe
încărcare\'.',
'Filename' : 'Nume fişier',
'Status' : 'Stare',
'Size' : 'Mărime',
'Add files' : 'Adăugare fişiere',
'Stop current upload' : 'Întrerupe încărcarea
curentă',
'Start uploading queue' : 'Începe incărcarea',
'Uploaded %d/%d files': 'Fişiere încărcate
%d/%d',
'N/A' : 'N/A',
'Drag files here.' : 'Trage aici fişierele',
'File extension error.': 'Extensie fişier
eronată',
'File size error.': 'Eroare dimensiune fişier',
'Init error.': 'Eroare iniţializare',
'HTTP Error.': 'Eroare HTTP',
'Security error.': 'Eroare securitate',
'Generic error.': 'Eroare generică',
'IO error.': 'Eroare Intrare/Ieşire',
'Stop Upload': 'Oprire încărcare',
'Start upload': 'Începe încărcare',
'%d files queued': '%d fişiere listate'
});plupload/i18n/ru.js000064400000002214151175232500010127 0ustar00//
Russian
plupload.addI18n({
'Select files' : 'Выберите файлы',
'Add files to the upload queue and click the start button.' :
'Добавьте файлы в очередь и нажмите
кнопку "Загрузить файлы".',
'Filename' : 'Имя файла',
'Status' : 'Статус',
'Size' : 'Размер',
'Add files' : 'Добавить файлы',
'Stop current upload' : 'Остановить
загрузку',
'Start uploading queue' : 'Загрузить
файлы',
'Uploaded %d/%d files': 'Загружено %d/%d
файлов',
'N/A' : 'N/D',
'Drag files here.' : 'Перетащите файлы
сюда.',
'File extension error.': 'Неправильное
расширение файла.',
'File size error.': 'Неправильный
размер файла.',
'Init error.': 'Ошибка
инициализации.',
'HTTP Error.': 'Ошибка HTTP.',
'Security error.': 'Ошибка
безопасности.',
'Generic error.': 'Общая ошибка.',
'IO error.': 'Ошибка
ввода-вывода.'
});plupload/i18n/sk.js000064400000002010151175232500010110 0ustar00// .po
file like language pack
plupload.addI18n({
'Select files' : 'Vyberte súbory',
'Add files to the upload queue and click the start button.' :
'Pridajte súbory do zoznamu a potom spustite nahrávanie.',
'Filename' : 'Názov súboru',
'Status' : 'Stav',
'Size' : 'Veľkosť',
'Add files' : 'Pridať súbory',
'Stop current upload' : 'Zastaviť nahrávanie',
'Start uploading queue' : 'Spustiť nahrávanie
zoznamu',
'Drag files here.' : 'Sem pretiahnite súbory.',
'Start upload': 'Spustiť nahrávanie',
'Uploaded %d/%d files': 'Nahraných %d/%d súborov',
'Using runtime: ': 'K odoslaniu súborov sa použije
rozhranie: ',
'N/A' : 'N/A',
'File extension error.': 'Chybný typ súboru.',
'File size error.': 'Súbor je príliš veľký.',
'Init error.': 'Chyba inicializácie.',
'HTTP Error.': 'HTTP Chyba.',
'Security error.': 'Bezpečnostná Chyba.',
'Generic error.': 'Chyba.',
'IO error.': 'IO Chyba',
'Stop Upload': 'Zastaviť nahrávanie',
'%d files queued': '%d súborov pridaných do zoznamu'
});plupload/i18n/sr.js000064400000001066151175232500010131 0ustar00//
Serbian
plupload.addI18n({
'Select files' : 'Izaberite fajlove',
'Add files to the upload queue and click the start button.' :
'Dodajte fajlove u listu i kliknite na dugme Start.',
'Filename' : 'Naziv fajla',
'Status' : 'Status',
'Size' : 'Veličina',
'Add Files' : 'Dodaj fajlove',
'Stop current upload' : 'Zaustavi upload',
'Start uploading queue' : 'Počni upload',
'Drag files here.' : 'Prevucite fajlove ovde.',
'Start Upload': 'Počni upload',
'Uploaded %d/%d files': 'Snimljeno %d/%d fajlova'
});plupload/i18n/sv.js000064400000000707151175232500010136 0ustar00//
.po file like language pack
plupload.addI18n({
'Select files' : 'Välj filer',
'Add files to the upload queue and click the start button.' :
'Lägg till filer till kön och tryck på start.',
'Filename' : 'Filnamn',
'Status' : 'Status',
'Size' : 'Storlek',
'Add files' : 'Lägg till filer',
'Stop current upload' : 'Stoppa uppladdningen',
'Start uploading queue' : 'Starta uppladdningen',
'Drag files here.' : 'Dra filer hit'
});plupload/index.html000064400000000054151175232500010361
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>plupload/jquery.plupload.queue/css/index.html000064400000000054151175232500015432
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>plupload/jquery.plupload.queue/css/jquery.plupload.queue.css000064400000010440151175232500020430
0ustar00/*
Plupload
------------------------------------------------------------------- */
.plupload_button {
/* display: -moz-inline-box; /* FF < 3*//*
display: inline-block;
font: normal 12px sans-serif;
text-decoration: none;
color: #42454a;
border: 1px solid #bababa;
padding: 2px 8px 3px 20px;
margin-right: 4px;
background: #f3f3f3 url('../img/buttons.png') no-repeat 0
center;
outline: 0;
/* Optional rounded corners for browsers that support it *//*
-moz-border-radius: 3px;
-khtml-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;*/
margin: 5px;
}
.plupload_button i {
margin-left: -5px;
margin-right: 5px;
}
/*
.plupload_button:hover {
color: #000;
text-decoration: none;
}*/
.plupload_disabled, a.plupload_disabled:hover {
/*color: #737373;
border-color: #c5c5c5;
background: #ededed url('../img/buttons-disabled.png')
no-repeat 0 center;*/
cursor: default;
}
.plupload_add {
/*background-position: -181px center;*/
}
.plupload_wrapper {
/*font: normal 11px Verdana,sans-serif;*/
width: 100%;
}
.plupload_container {
padding: 8px;
/*background: url('../img/transp50.png');*/
/*-moz-border-radius: 5px;*/
}
.plupload_container input {
/*border: 1px solid #DDD;*/
/*font: normal 11px Verdana,sans-serif;*/
width: 98%;
}
.plupload_header {/*background: #2A2C2E
url('../img/backgrounds.gif') repeat-x;*/}
.plupload_header_content {
/*background: url('../img/backgrounds.gif') no-repeat 0 -317px;
min-height: 56px;
padding-left: 60px;
color: #FFF;*/
}
.plupload_header_title {
/*font: normal 18px sans-serif;
padding: 6px 0 3px;*/
}
.plupload_header_text {
/*font: normal 12px sans-serif;*/
}
.plupload_filelist {
margin: 0;
padding: 0;
list-style: none;
border: 1px solid #dddddd;
-webkit-border-radius: 5px;
border-radius: 5px;
}
.plupload_scroll .plupload_filelist {
height: 185px;
/*background: #f9f9f9;*/
overflow-y: scroll;
}
.plupload_filelist li {
padding: 5px 8px 0px 8px;
background: #f9f9f9;
/*padding: 10px 8px;
background: #f9f9f9 url('../img/backgrounds.gif') repeat-x 0
-156px;*/
border-bottom: 1px solid #dddddd;
}
.plupload_filelist_header, .plupload_filelist_footer {
/*background: #DFDFDF;
padding: 8px 8px;
color: #42454A;*/
}
.plupload_filelist_header {
/*border-top: 1px solid #EEE;*/
padding: 3px 10px;
}
.plupload_filelist_footer {border-top: 1px solid #FFF; height: 22px;
line-height: 20px; vertical-align: middle;}
.plupload_file_name {float: left; overflow: hidden}
.plupload_file_status {color: #777;}
.plupload_file_status span {color: #42454A;}
.plupload_file_statusbar,
.plupload_file_size, .plupload_file_status, .plupload_progress,
.plupload_progress_box {
float: right;
width: 80px;
}
.plupload_file_action_bottom {
padding-right:8px;
}
.plupload_file_size, .plupload_file_status, .plupload_file_action
{text-align: right;}
.plupload_filelist .plupload_file_name {width: 205px}
.plupload_file_action {
float: right;
width: 16px;
height: 16px;
margin-left: 15px;
}
.plupload_file_action * {
display: none;
width: 16px;
height: 16px;
}
li.plupload_uploading {background: #ECF3DC
url('../img/backgrounds.gif') repeat-x 0 -238px;}
li.plupload_done {color:#AAA}
li.plupload_delete a {
background: url('../img/delete.gif');
}
li.plupload_failed a {
background: url('../img/error.gif');
cursor: default;
}
li.plupload_done a {
background: url('../img/done.gif');
cursor: default;
}
.plupload_progress, .plupload_upload_status {
display: none;
}
.plupload_progress_container {
margin-top: 3px;
background: #FFF;
padding: 1px;
}
.plupload_progress_bar {
width: 0px;
height: 7px;
}
.plupload_scroll .plupload_filelist_header .plupload_file_action,
.plupload_scroll .plupload_filelist_footer .plupload_file_action {
margin-right: 17px;
}
/* Floats */
.plupload_clear,.plupload_clearer {clear: both;}
.plupload_clearer, .plupload_progress_bar, .plupload_progress_box {
display: block;
font-size: 0;
line-height: 0;
}
.plupload_progress_box {
margin-top: -3px;
}
li.plupload_droptext {
background: transparent;
text-align: center;
vertical-align: middle;
border: 0;
line-height: 165px;
}
plupload/jquery.plupload.queue/img/backgrounds.gif000064400000005641151175232500016421
0ustar00GIF89aPm��adh�����������������������������������������������47:68;7:=8;>:<@;>A=@D<?C>AE?BFADHBEJAEI*,.�����DGK����.13�������358�����025+-0147-/2EHLCFK���^ae_bf���acg`bf]ad]`c\^bY\_[]aX[]Z\`WY\VX[UWZ���TVXFJN��َ��x{~X[_������UY]oqu���]`dgjn��쏑����������������;=@TW[�������������������HLP������IMQ������OSW�����������뢣�[^b�����[_c��Χ�����`cg���LOQ\`cRVZKNRSVZTVYSUXHKObei;=AY[_PSVGJMLPT���FHJdgkNPTSUYDGLPSUQTXRUXNQS58;LOSBEIORTOQSCFI=@CBEHIKNWZ^KMP������cfj���vx|��������ɧ��������������wz}ehl_cg���fim���z|x{�����ߤ��{}����]ae\_cUX\�����猎����GJNnpt���EIMEIM!��,Pm�� H����*\Ȱ�Ç#J�H��ŋ3j�ȱ�Ǐ
C�I��ɓ(S�\ɲ�˗0cʜI��͛8s��ɳ�ϟ@�
J��ѣi(]ʴ�ӧP�J�JUi��X�j�ʵ�ׯ`�^�A��ٳhӪ]˶�[��ʝK��ݻx����߿�L���È�zX̸��ǐ#K�L����3k�̹��ϠC��̡��ӨS�^ͺ��ץ5ȞM���۸s���[����N����ȓ������УK�N��u��k�ν����Ë�������ӫ_Ͼ�����[�O��������Ͽ��
(�h�&� �4��F(�Vh�
���v��
�(�$j(É(���,���0�x"4�h�8��<��#�()�Di�H&��A���PF)�TVi�X:Ö\v��`�)�d��eh���l���p�)'���i�x��|��矀*蠄j衈&�袌6�裐F*餔Vj饘f�馜v�駠�*ꨤ�jꩨ��ꪬ��꫰�*무�j뭸�뮼���+��k��&���6���F+��Vk��f���v���+��k�覫������;����k������,�l��$���7���G,��Wl��g���w���#
��$�l��(����,����0�,��4ל�8���<����@-��Dm��H'���?/���PG-��TWm��Xg���\w��`�]�d�m��h����l���p�-��i'`��x��|���߀.��n��'��7��G.��Wn��g���w��G
�褗n�騧��ꬷ���~���n������/���o��+����7���G/���Wo���g����w}��/���o��觯������/����o�����)���H��3��:���'HA��̠7�z�
�@���(L�
W����0��g����8̡w����@�! ��H�"�HL����&�P���H�*Z�X̢�.z�`��H�2��hL���F1��p���H�:��x��E��>���
I�B��+H�"��F:�$'�HX�̤&7��Nz�FI�R��L�*W��V�����,gI�Z��̥.a)�^���0�I�b��L�2��La:�Ќ�4�I�jZ��̦6���nz���8�I�r���L�:���v���4g�I�z��̧>���~��
�@JЂT�H�B�І:���D'JъZ�u(6�юz�
�HGJҒ��(M�JW�Җ�T����LgJӚ��8ͩNw�Ӟ��@
�P�JԢ��HM�R��$L����p�)�a|������R�X�JV�J�gXHWB�\���p-+�@����
j�A\�Z��!w���� [-H`��&��ceBbX$8���,AK��*�J��6�����fH����֮Bp��@�J��B���v�[(�B}�k0��YȲ�lX�r��\U���niπ��
�m���,x��kZ�����ֻ^^�V �(+��)$�պbȯ����bEY���M¼���`�;Xv�p'�z�M��c�����{�
\����Z�
(vCV��R�"0�\��):
x
8^�v��Q��@�l�J�M݂�]ȁ����W���I����܊��`S8@2����(x� `3�M�W`Y�[�"�@;*���͠��'ʼ)��5�iVs*t�e/���(�5ec�2��(1�m^k�:���'M�H7��M���'͈M�a���G
jL7�Ԩu6�8P�հ�5U�@k#�֯�C#6��G�����oPk#��~�6�`�Ў���]�i[[�{6�H�������@�2�����b6�J��坆z�a��7!(��M�&@��>p4
O��a�M�fB���'.�7X�
�x�A�MG����GN��~�@p6�LT"0���gN�W��Tw��!���@��ΉAtgS�
���;��O�%س)�lA(�ַ����~6��-$�GH��מvK$b ��$��LB�p�#"�Cd"��Ф;plupload/jquery.plupload.queue/img/buttons-disabled.png000064400000002414151175232500017374
0ustar00�PNG
IHDRixn<�tEXtSoftwareAdobe
ImageReadyq�e<IPLTE���������������������������p�Y������w�`�����������Ʋ���Ӽs�\�����Nj�����������������G�>�̇������o�Xr�d�٥�Ջ|�kZ�Q��ɖԋ�ˁH�>�ڪ���W�E�ۨl�Z��{��ߐ�}��x~�i�����}�ۛ�������ӊ|�d��u��s��y������Dž��}����������ʵ߬�ݩ��ɶݬy�n���������q�_�̊��|���e�V���~�oz�k���������h�S�௸���ы�����E�>��ä�������m}�k�ߥ�̨�ˆ}�gn�X�ʱ���u�e���}�f�䶑�~�̄}�j�ڦ�Δ�ܯd�W���j�[e�UO�Ho�Y��{�Ԝ��u��pr�[��u�ߦ�̩��yC�:����ݪ�ơD�:�����Ҵɯt�\t�[B�6�Ж�Ȯ�������ϖ���|||��҃�Ӊ;�4���a�TP�A�ݯ�ٕ�����z���C�8�٥�ۨ����������m�ԝ��������ٖp�c�ğ��|k�XP�I�ŀx�dy�d�˲\�S�ؒ�ԊE�>��mc�S�̅~�i�͈������tRNS���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������N
��IDATx���csQ��M�M�AӤ�m۶m۶m۶��˺M������=����0*J����D�_QWy[Vk*�р�%/��CtW��`H}�+%�H:�D�ٞ�tGC�#���!I���?�W�=�'f���a�3�OI��9x��v��qi1~j�s���Qnb
B�Yt�D=[*���h�L^��$�ە��A��{>��
�1�
�HgH�)�Y�p��<:���[z�H�"�k���H;�-Ĝ5�Ό���+Ң��e\�UE���;O�
e��#U[�FctA�8�A:�y��;l)F����i�&���ҙ��=H���RǼ��E�1���X^���{R1�4�?HGy�QֈFI��4�0a�!��)��C�m��z�1WQIEND�B`�plupload/jquery.plupload.queue/img/buttons.png000064400000002637151175232500015636
0ustar00�PNG
IHDRixn<�tEXtSoftwareAdobe
ImageReadyq�e<�PLTE�����������������������������������������������p�Yw�`�Ӽ�ˑ������s�\�͔��|3�}�f\�St�\�٥t�O�ٕ���~�i)�
|�k�ݯ���y�d���j�[��Z~�o��}p�cd�W��ô̩��k��}6��NJ��u��uD���s�ː��j��y4���p��m�ۛ�ȍo�=��گߥn�8�̅��y�ߦ��ɀ�a��ϫԜ�ơ�Ջi�9W�E�ЖD�:C�8r�[��W�(z�k�ΔP�I�߬�c�1��_�C��tH�>��ɝؒu�e��ܨğe�1�ݩ��xq�?���������h�S�ˆO�H����ٖ���E�>�ڦ�ԝn�X�ʱ����7� o�X�̇�͈�Ȯr�d�ݪJ��ˁ��zx�d(�k�X�ۨh�F|�dc�Sq�_��f���m��|�̊����m���G�>R�"�ň|�U3�\�<y�n�ŀf�H�ݬ�҃B�6o�Y�ۨ;�4��ǽ�e�Vt�[�Ɗ�ӊ��b�1Z�Q�ڪP�Al�Z�ϖ��o�ܯ�Ӊ��{~�i�Ԋ���̄��͂�g�˲C�:����̨^�:E�>���{}�j�Džb�F��{���}�g�Ζ[�)a�T��~k�7��u�ы�ʐh�5�ɯ<��ԋe�UF��٥}�k��}����)+�tRNS�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������7 ��IDATx�b�����C���hH�i�!�0����9G�]LC���2�M֘��gh�4/�o��*��^�̩�m���+CpB@x��Y�9��t��u�)�;�m_�p�� i�]��쵇PH8V��j���^L���
�d��긙���w�����{�L��ã#"uq����\
��+��c[�pD�k(�;,,,V�B�1ª�I,�@B:;p�Mߌ��j\C&��e���)��C!��!`���ʫ�C�B�zҖH��p�8=B�.Kor��"��`z~�V�0�+�B%?`���җ�9�����}���b)�E�+7�.���.���LJ!�]���Y'�]p�c��P�8Xs�ή7
ޘ���PLC@B�ٻh�B��ѐ�qH-�0��!FC�^
��6���BIEND�B`�plupload/jquery.plupload.queue/img/delete.gif000064400000000264151175232500015355
0ustar00GIF89a�������̙�����f�ff�ff�f3���!�,a�Ik�h#�E���Ta
lP��@�wix
ظ[apHh��r9|7�t�$�S��p%0�A|�e���y���@pb��ah�}Ex�;plupload/jquery.plupload.queue/img/done.gif000064400000002000151175232500015026
0ustar00GIF89a���ܥ�ؒ��r�h��w�����z�mn�bB�3I�'?�;D�3l�V�LJ�ˆ�ѵ�ˆ�ڦ}�f�ߛ�i�ʇ\�;p�e����ܦ�����ז����ӛ��е��r�וQ�.y�k���?�;�p��|�d���;�'y�d�ԍq�[w�`~�o�͈�㶺۵���&�#�֕�ב&#p�Wi�Jo�dj�P�ݪ�̇�㸇�y����u��ss�\t�d}�gt�h�ۨ��d�L?�;�ۨ5�1��o�au�h�Ґ�ٵo�ao�Ym�W�٥n�Xo�Xs�fl�K�߬\�=51���}�f�ᰙ͊?�<v�i��x��f�I�ȏr�U)w%�쿱ݧ�٥�ܗ��v��r��N�AL�=p�cZ�7�נt�[�қ�ыt�Yn�cn�aj�Ip�Y���*�%�ґv�j)z%��߬��m^�H�̅4|0q�c��]�?t�\�ס�ߵ���'r$R�B���q�_U�5�ǃ�Ќ~�i��r�[���������!��,�? H�`�%��`���
������>,i*�Ƌp�LH�p��I��0G%�v@0
��h��(�@.$r��ѧJ(�:� AF`�6q��T'���2=�!p��E8y:�u$wtl$��!*<ِpeS�(Na��E%"'�8��h�
�4�$��?V��qc���5R��
X�H�P�ʓI@�DG���"1
����;plupload/jquery.plupload.queue/img/error.gif000064400000001742151175232500015246
0ustar00GIF89a��ա=�����֣>��X������\բ>��������l�}����\����U�ӏ�Ҍ��]������N����ԅ��W�؍�w
�1�������W��T��Z��[��X������q���٘#�:��Rυ�����Z����^忈�Ά�ߩ�Ϋ�*�Ç��W�-֓
��X����������V��W���������\������TғDߤ+�E�����{�q �D�b�ם�]����Զܞ'�ע�ؔ٠U����b�~ݤ;����т֝]�����^��h��\�����dӌ��Q�C��t�ܲ��PݱG����y������h���ڛ%�����]ݡ)��ъ�h�7���H���!��,� H��A@
��Qp�
`�4x"�
k�L�&��hLt��L?<<h���`�r��c$0�O��E�|!R!bzx�@0d�8.�S��hBHP�b��-eLIg �"Z�1C
R�(P ��`�b`��?F0
`���X�c��L�\��bG]:@iP&�F�;plupload/jquery.plupload.queue/img/index.html000064400000000054151175232500015416
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>plupload/jquery.plupload.queue/img/throbber.gif000064400000003602151175232500015721
0ustar00GIF89a�$&$���������\^\�����LJL����������������TRT�����������������LNL������!�NETSCAPE2.0!� ,|�#:Ƅ5��c;U�1A@}Q-UG5��`T�
��r
�!���H�ޱ'��"�bO�uH��I�<J�'l���c���!�^�x]e1vvF#`=j1FV"�/=|^�
id"!!� ,�$&$���������ljl����������|~|DFD���������lnl����������z
%R�t�1Ac;���HK%�:%"ġ�4��#AP�`K��
r�TD��Ɩr�.d��-��Ԕ�oPl0�xcXb "D#�:r= @#~;3�-
2v"!!� ,�$&$���������lnl���������|z|���LNL���������tvt��������|~|���s
%R�t�!Ac+���HK)�:���C�i�ߠ��l"��D����5���S
�dh��bh����^��yB`�s5
"CB ?$R1:B�Q:<0X
\2_#!!� ,�$&$���������lnl��������ܔ�����DBD���tvt���������trt����������DFDs
%R�d�1Ec;���GK%�z��C�!Y�ߠ��l���H���a�-���S6�����Ny��40k�x��M̿\~Y#s;�6����6�
�
u#!!� ,�$&$���������lnl��������ܔ�����|z|<:<���������trt����������v�$N�d�!Ac+���G;%�:��C�i�ߠ��l"��D���a�5���S&���y�Ny��40k�x��~�5C#�= ?"
�3tX�_#!!� ,�$&$���������lnl�����DFD��Ĕ�������|z|���TRT��������������LJL���|~|x�$N��4�#-c+!���E;��ze���B�����=~���!Q�����Vi��"�$�H�'���f#d��"tP6V`
"DC
�~;
=�R:<0Y]2`#!!� ,�$&$������������dbd�����������|~|���DFD�������������������������x
%R�d�1Ac;���HK�z����9P��oPC�����T4�=OÖ"�5��X6��"w
&��`�
<�
c9u>"# y;= j"�<0{S�2
u#!!� ,�$&$���������trt��������������TRT�����������������������\Z\w�$JƣQb0c��d��J2]@���
T
�A(�1h��MҠ94�T$�5��V2�A����n�
�:�Ղ`�-4�?cXtTQ
"_
#�>>@R"yh>{S
gu"!;plupload/jquery.plupload.queue/img/transp50.png000064400000000617151175232500015610
0ustar00�PNG
IHDR��<q�gAMA��7��tEXtSoftwareAdobe
ImageReadyq�e<!IDATx��ұ0İ���Y��R��J��} 0��X`,����Xc��0�ca,���X���0ca,0��X`,����Xc��0�ca,���X���0ca,0��X`,����Xc��0�ca,���X���0ca,0��X`,����Xc��0�ca,����Xc��0�ca,���X���0ca,0��X`,����Xc��0�ca,���X���0ca,0��X`,����Xc��0�ca,���Xv#�g"�C&�IEND�B`�plupload/jquery.plupload.queue/index.html000064400000000054151175232500014642
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>plupload/jquery.plupload.queue/jquery.plupload.queue.js000064400000027321151175232500017472
0ustar00/**
* jquery.plupload.queue.js
*
* Copyright 2009, Moxiecode Systems AB
* Released under GPL License.
*
* License: http://www.plupload.com/license
* Contributing: http://www.plupload.com/contributing
*/
// JSLint defined globals
/*global plupload:false, jQuery:false, alert:false */
(function($) {
var uploaders = {};
function _(str) {
return plupload.translate(str) || str;
}
function renderUI(id, target) {
// Remove all existing non plupload items
target.contents().each(function(i, node) {
node = $(node);
if (!node.is('.plupload')) {
node.remove();
}
});
target.prepend(
'<div class="plupload_wrapper
plupload_scroll">' +
'<div id="' + id + '_container"
class="plupload_container">' +
'<div class="plupload">' +
'<div class="plupload_header">' +
'<div class="plupload_header_content">' +
/*
'<div class="plupload_header_title">' +
_('Select files') + '</div>' +
'<div class="plupload_header_text">' +
_('Add files to the upload queue and click the start button.') +
'</div>' + */
'</div>' +
'</div>' +
'<div class="plupload_content">' +
'<div class="plupload_filelist_header">'
+
'<div class="plupload_file_name">' +
_('Filename') + '</div>' +
'<div
class="plupload_file_action"> </div>' +
'<div class="plupload_file_size">'+
_("Size")+'</div>' +
'<div
class="plupload_file_status"><span>' +
_('Status') + '</span></div>' +
'<div
class="plupload_file_statusbar"><span> </span></div>'
+ /*
'<div class="plupload_file_size">' +
_('Size') + '</div>' + */
'<div
class="plupload_clearer"> </div>' +
'</div>' +
'<ul id="' + id + '_filelist"
class="plupload_filelist"></ul>' +
'<div class="plupload_filelist_footer">'
+
'<div class="plupload_file_name">' +
'<div class="plupload_buttons">' +
'<a href="#" class="plupload_button
plupload_add btn btn-success fileinput-button"><i
class="icon-plus icon-white"></i>' + _('Add
Files') + '</a>' +
'<a href="#" class="plupload_button
plupload_start btn btn-primary start"><i
class="icon-upload icon-white"></i>' +
_('Start Upload') + '</a>' +
'</div>' +
'<span
class="plupload_upload_status"></span>' +
'</div>' +
'<div class="plupload_file_action
plupload_file_action_bottom"></div>' +
'<div class="plupload_file_size"><span
class="plupload_total_file_size">0
b</span></div>' +
'<div class="plupload_file_status"><span
class="plupload_total_status">0%</span></div>'
+
'<div
class="plupload_file_statusbar"><span></span></div>'
+
'<div class="plupload_progress">' +
'<div
class="plupload_progress_container">' +
'<div class="progress
plupload_progress_box">' +
'<div class="plupload_progress_bar
bar"></div>' +
'</div>' +
'<div/>' +
'</div>' +
'<div
class="plupload_clearer"> </div>' +
'</div>' +
'</div>' +
'</div>' +
'</div>' +
'<input type="hidden" id="' + id +
'_count" name="' + id + '_count"
value="0" />' +
'</div>'
);
}
$.fn.pluploadQueue = function(settings) {
if (settings) {
this.each(function() {
var uploader, target, id;
target = $(this);
id = target.attr('id');
if (!id) {
id = plupload.guid();
target.attr('id', id);
}
uploader = new plupload.Uploader($.extend({
dragdrop : true,
container : id
}, settings));
uploaders[id] = uploader;
function handleStatus(file) {
var actionClass;
if (file.status == plupload.DONE) {
actionClass = 'plupload_done';
}
if (file.status == plupload.FAILED) {
actionClass = 'plupload_failed';
}
if (file.status == plupload.QUEUED) {
actionClass = 'plupload_delete';
}
if (file.status == plupload.UPLOADING) {
actionClass = 'plupload_uploading';
}
var icon = $('#' + file.id).attr('class',
actionClass).find('a').css('display',
'block');
if (file.hint) {
icon.attr('title', file.hint);
}
}
function updateTotalProgress() {
$('span.plupload_total_status',
target).html(uploader.total.percent + '%');
$('div.plupload_progress_bar',
target).css('width', uploader.total.percent + '%');
$('span.plupload_upload_status', target).html(
_('Uploaded %d/%d files').replace(/%d\/%d/,
uploader.total.uploaded+'/'+uploader.files.length)
);
}
function updateList() {
var fileList = $('ul.plupload_filelist',
target).html(''), inputCount = 0, inputHTML;
$.each(uploader.files, function(i, file) {
inputHTML = '';
if (file.status == plupload.DONE) {
if (file.target_name) {
inputHTML += '<input type="hidden"
name="' + id + '_' + inputCount + '_tmpname"
value="' + plupload.xmlEncode(file.target_name) + '"
/>';
}
inputHTML += '<input type="hidden"
name="' + id + '_' + inputCount + '_name"
value="' + plupload.xmlEncode(file.name) + '"
/>';
inputHTML += '<input type="hidden"
name="' + id + '_' + inputCount + '_status"
value="' + (file.status == plupload.DONE ? 'done' :
'failed') + '" />';
inputCount++;
$('#' + id + '_count').val(inputCount);
}
fileList.append(
'<li id="' + file.id + '">' +
'<div
class="plupload_file_name"><span>' + file.name +
'</span></div>' +
'<div class="plupload_file_action"><a
href="#"></a></div>' +
'<div class="plupload_file_size">' +
plupload.formatSize(file.size) + '</div>' +
'<div class="plupload_file_status">' +
file.percent + '%</div>' +
'<div class="progress
plupload_file_statusbar"></div>' +
'<div
class="plupload_clearer"> </div>' +
inputHTML +
'</li>'
);
handleStatus(file);
$('#' + file.id + '.plupload_delete
a').click(function(e) {
$('#' + file.id).remove();
uploader.removeFile(file);
e.preventDefault();
});
});
$('span.plupload_total_file_size',
target).html(plupload.formatSize(uploader.total.size));
if (uploader.total.queued === 0) {
$('span.plupload_add_text', target).html(_('Add
Files'));
} else {
$('span.plupload_add_text', target).html(_('%d files
queued').replace(/%d/, uploader.total.queued));
}
$('a.plupload_start',
target).toggleClass('plupload_disabled', uploader.files.length ==
(uploader.total.uploaded + uploader.total.failed));
// Scroll to end of file list
fileList[0].scrollTop = fileList[0].scrollHeight;
updateTotalProgress();
// Re-add drag message if there is no files
if (!uploader.files.length && uploader.features.dragdrop
&& uploader.settings.dragdrop) {
$('#' + id + '_filelist').append('<li
class="plupload_droptext">' + _("Drag files
here.") + '</li>');
}
}
uploader.bind("UploadFile", function(up, file) {
$('#' +
file.id).addClass('plupload_current_file');
});
uploader.bind('Init', function(up, res) {
renderUI(id, target);
// Enable rename support
if (!settings.unique_names && settings.rename) {
target.on('click', '#' + id + '_filelist
div.plupload_file_name span', function(e) {
var targetSpan = $(e.target), file, parts, name, ext =
"";
// Get file name and split out name and extension
file = up.getFile(targetSpan.parents('li')[0].id);
name = file.name;
parts = /^(.+)(\.[^.]+)$/.exec(name);
if (parts) {
name = parts[1];
ext = parts[2];
}
// Display input element
targetSpan.hide().after('<input type="text"
/>');
targetSpan.next().val(name).focus().blur(function() {
targetSpan.show().next().remove();
}).keydown(function(e) {
var targetInput = $(this);
if (e.keyCode == 13) {
e.preventDefault();
// Rename file and glue extension back on
file.name = targetInput.val() + ext;
targetSpan.html(file.name);
targetInput.blur();
}
});
});
}
$('a.plupload_add', target).attr('id', id +
'_browse');
up.settings.browse_button = id + '_browse';
// Enable drag/drop (see PostInit handler as well)
if (up.settings.dragdrop) {
up.settings.drop_element = id + '_filelist';
}
$('#' + id + '_container').attr('title',
'Using runtime: ' + res.runtime);
$('a.plupload_start', target).click(function(e) {
if (!$(this).hasClass('plupload_disabled')) {
uploader.start();
}
e.preventDefault();
});
$('a.plupload_stop', target).click(function(e) {
e.preventDefault();
uploader.stop();
});
$('a.plupload_start',
target).addClass('plupload_disabled');
});
uploader.bind("PostInit", function(up) {
// features are populated only after input components are fully
instantiated
if (up.settings.dragdrop && up.features.dragdrop) {
$('#' + id + '_filelist').append('<li
class="plupload_droptext">' + _("Drag files
here.") + '</li>');
}
});
uploader.init();
uploader.bind("Error", function(up, err) {
var file = err.file, message;
if (file) {
message = err.message;
if (err.details) {
message += " (" + err.details + ")";
}
if (err.code == plupload.FILE_SIZE_ERROR) {
alert(_("Error: File too large:") + " " +
file.name);
}
if (err.code == plupload.FILE_EXTENSION_ERROR) {
alert(_("Error: Invalid file extension:") + " "
+ file.name);
}
file.hint = message;
$('#' + file.id).attr('class',
'plupload_failed').find('a').css('display',
'block').attr('title', message);
}
});
uploader.bind('StateChanged', function() {
if (uploader.state === plupload.STARTED) {
$('li.plupload_delete a,div.plupload_buttons',
target).hide();
$('span.plupload_upload_status,div.plupload_progress,a.plupload_stop',
target).css('display', 'block');
$('span.plupload_upload_status',
target).html('Uploaded ' + uploader.total.uploaded +
'/' + uploader.files.length + ' files');
if (settings.multiple_queues) {
$('span.plupload_total_status,span.plupload_total_file_size',
target).show();
}
} else {
updateList();
$('a.plupload_stop,div.plupload_progress', target).hide();
$('a.plupload_delete', target).css('display',
'block');
}
});
uploader.bind('QueueChanged', updateList);
uploader.bind('FileUploaded', function(up, file) {
handleStatus(file);
});
uploader.bind("UploadProgress", function(up, file) {
// Set file specific progress
$('#' + file.id + ' div.plupload_file_status',
target).html(file.percent + '%');
$('#' + file.id + ' div.plupload_file_statusbar',
target).html('<div class="bar" style="width: '+
file.percent + '%;"></div>');
handleStatus(file);
updateTotalProgress();
if (settings.multiple_queues && uploader.total.uploaded +
uploader.total.failed == uploader.files.length) {
$(".plupload_buttons,.plupload_upload_status",
target).css("display", "inline");
$(".plupload_start",
target).addClass("plupload_disabled");
$('span.plupload_total_status,span.plupload_total_file_size',
target).hide();
}
});
// Call setup function
if (settings.setup) {
settings.setup(uploader);
}
});
return this;
} else {
// Get uploader instance for specified element
return uploaders[$(this[0]).attr('id')];
}
};
})(jQuery);
plupload/jquery.plupload.queue.min.js000064400000014323151175232500013771
0ustar00(function(c){var d={};function a(e){return
plupload.translate(e)||e}function
b(f,e){e.contents().each(function(g,h){h=c(h);if(!h.is(".plupload")){h.remove()}});e.prepend('<div
class="plupload_wrapper plupload_scroll"><div
id="'+f+'_container"
class="plupload_container"><div
class="plupload"><div
class="plupload_header"><div
class="plupload_header_content"></div></div><div
class="plupload_content"><div
class="plupload_filelist_header"><div
class="plupload_file_name">'+a("Filename")+'</div><div
class="plupload_file_action"> </div><div
class="plupload_file_size">'+a("Size")+'</div><div
class="plupload_file_status"><span>'+a("Status")+'</span></div>
<div
class="plupload_file_statusbar"><span> </span></div><div
class="plupload_clearer"> </div></div><ul
id="'+f+'_filelist"
class="plupload_filelist"></ul>
<div class="plupload_filelist_footer"><div
class="plupload_file_name"><div
class="plupload_buttons">
<a href="#" class="plupload_button plupload_add btn
btn-success fileinput-button"><i class="icon-plus
icon-white"></i><span>'+a("Add
Files")+'</span></a><a href="#"
class="plupload_button plupload_start btn btn-primary
start"><i class="icon-upload
icon-white"></i><span>'+a("Start
upload")+'</span></a></div>
<span
class="plupload_upload_status"></span></div><div
class="plupload_file_action
plupload_file_action_bottom"></div>
<div class="plupload_file_size"><span
class="plupload_total_file_size">0
b</span></div><div
class="plupload_file_status"><span
class="plupload_total_status">0%</span></div><div
class="plupload_file_statusbar"><span></span></div><div
class="plupload_progress"><div
class="plupload_progress_container"><div
class="progress plupload_progress_box"><div
class="plupload_progress_bar
bar"></div></div></div></div><div
class="plupload_clearer"> </div></div></div></div></div><input
type="hidden" id="'+f+'_count"
name="'+f+'_count" value="0"
/></div>')}c.fn.pluploadQueue=function(e){if(e){this.each(function(){var
j,i,k;i=c(this);k=i.attr("id");if(!k){k=plupload.guid();i.attr("id",k)}j=new
plupload.Uploader(c.extend({dragdrop:true,container:k},e));if(e.preinit){e.preinit(j)}d[k]=j;function
h(l){var
m;if(l.status==plupload.DONE){m="plupload_done"}if(l.status==plupload.FAILED){m="plupload_failed"}if(l.status==plupload.QUEUED){m="plupload_delete"}if(l.status==plupload.UPLOADING){m="plupload_uploading"}c("#"+l.id).attr("class",m).find("a").css("display","block")}function
f(){c("span.plupload_total_status",i).html(j.total.percent+"%");c("div.plupload_progress_bar",i).css("width",j.total.percent+"%");c("span.plupload_upload_status",i).text("Uploaded
"+j.total.uploaded+"/"+j.files.length+"
files");if(j.total.uploaded==j.files.length){j.stop()}}function
g(){var
m=c("ul.plupload_filelist",i).html(""),n=0,l;c.each(j.files,function(p,o){l="";if(o.status==plupload.DONE){if(o.target_name){l+='<input
type="hidden"
name="'+k+"_"+n+'_tmpname"
value="'+plupload.xmlEncode(o.target_name)+'"
/>'}l+='<input type="hidden"
name="'+k+"_"+n+'_name"
value="'+plupload.xmlEncode(o.name)+'"
/>';l+='<input type="hidden"
name="'+k+"_"+n+'_status"
value="'+(o.status==plupload.DONE?"done":"failed")+'"
/>';n++;c("#"+k+"_count").val(n)}m.append('<li
id="'+o.id+'"><div
class="plupload_file_name"><span>'+o.name+'</span></div><div
class="plupload_file_action"><a
href="#"></a></div></div><div
class="plupload_file_size">'+plupload.formatSize(o.size)+'</div><div
class="plupload_file_status">'+o.percent+'%</div><div
class="progress plupload_file_statusbar"></div><div
class="plupload_clearer"> </div>'+l+"</li>");h(o);c("#"+o.id+".plupload_delete
a").click(function(q){c("#"+o.id).remove();j.removeFile(o);q.preventDefault()})});c("span.plupload_total_file_size",i).html(plupload.formatSize(j.total.size));if(j.total.queued===0){c("span.plupload_add_text",i).text(a("Add
Files."))}else{c("span.plupload_add_text",i).text(j.total.queued+"
files
queued.")}c("a.plupload_start",i).toggleClass("plupload_disabled",j.files.length===0);m[0].scrollTop=m[0].scrollHeight;f();if(!j.files.length&&j.features.dragdrop&&j.settings.dragdrop){c("#"+k+"_filelist").append('<li
class="plupload_droptext">'+a("Drag files
here.")+"</li>")}}j.bind("UploadFile",function(l,m){c("#"+m.id).addClass("plupload_current_file")});j.bind("Init",function(l,m){b(k,i);if(!e.unique_names&&e.rename){c("#"+k+"_filelist
div.plupload_file_name span",i).live("click",function(s){var
q=c(s.target),o,r,n,p="";o=l.getFile(q.parents("li")[0].id);n=o.name;r=/^(.+)(\.[^.]+)$/.exec(n);if(r){n=r[1];p=r[2]}q.hide().after('<input
type="text"
/>');q.next().val(n).focus().blur(function(){q.show().next().remove()}).keydown(function(u){var
t=c(this);if(u.keyCode==13){u.preventDefault();o.name=t.val()+p;q.text(o.name);t.blur()}})})}c("a.plupload_add",i).attr("id",k+"_browse");l.settings.browse_button=k+"_browse";if(l.features.dragdrop&&l.settings.dragdrop){l.settings.drop_element=k+"_filelist";c("#"+k+"_filelist").append('<li
class="plupload_droptext">'+a("Drag files
here.")+"</li>")}c("#"+k+"_container").attr("title","Using
runtime:
"+m.runtime);c("a.plupload_start",i).click(function(n){if(!c(this).hasClass("plupload_disabled")){j.start()}n.preventDefault()});c("a.plupload_stop",i).click(function(n){j.stop();n.preventDefault()});c("a.plupload_start",i).addClass("plupload_disabled")});j.init();if(e.setup){e.setup(j)}j.bind("Error",function(l,o){var
m=o.file,n;if(m){n=o.message;if(o.details){n+="
("+o.details+")"}c("#"+m.id).attr("class","plupload_failed").find("a").css("display","block").attr("title",n)}});j.bind("StateChanged",function(){if(j.state===plupload.STARTED){c("li.plupload_delete
a,div.plupload_buttons",i).hide();c("span.plupload_upload_status,div.plupload_progress,a.plupload_stop",i).css("display","block");c("span.plupload_upload_status",i).text("Uploaded
0/"+j.files.length+"
files")}else{c("a.plupload_stop,div.plupload_progress",i).hide();c("a.plupload_delete",i).css("display","block")}});j.bind("QueueChanged",g);j.bind("StateChanged",function(l){if(l.state==plupload.STOPPED){g()}});j.bind("FileUploaded",function(l,m){h(m)});j.bind("UploadProgress",function(l,m){c("#"+m.id+"
div.plupload_file_status",i).html(m.percent+"%");
c("#"+m.id+"
div.plupload_file_statusbar",i).html('<div
class="bar" style="width:
'+m.percent+'%;"></div>')
h(m);f()})});return this}else{return
d[c(this[0]).attr("id")]}}})(jQuery);plupload/jquery.ui.plupload/css/index.html000064400000000054151175232510014724
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>plupload/jquery.ui.plupload/css/jquery.ui.plupload.css000064400000005655151175232510017227
0ustar00/*
Plupload
------------------------------------------------------------------- */
.plupload_button {cursor: pointer;}
.plupload_wrapper {
font: normal 11px Verdana,sans-serif;
width: 100%;
}
.plupload .plupload_container input {width: 98%;}
.plupload .plupload_filelist_footer {border-width: 1px 0 0 0}
.plupload .plupload_filelist_header {border-width: 0 0 1px 0}
div.plupload .plupload_file {border-width: 0 0 1px 0}
div.plupload div.plupload_header {border-width: 0 0 1px 0; position:
relative;}
.plupload_file .ui-icon {
cursor:pointer;
}
.plupload_header_content {
background-image: url('../img/plupload.png');
background-repeat: no-repeat;
background-position: 8px center;
min-height: 56px;
padding-left: 60px;
position:relative;
}
.plupload_header_content_bw {background-image:
url('../img/plupload-bw.png');}
.plupload_header_title {
font: normal 18px sans-serif;
padding: 6px 0 3px;
}
.plupload_header_text {font: normal 12px sans-serif;}
.plupload_filelist,
.plupload_filelist_content {
border-collapse: collapse;
margin: 0;
padding: 0;
width: 100%;
-moz-user-select:none;
-webkit-user-select:none;
user-select:none;
}
.plupload_cell {padding: 8px 6px;}
.plupload_file {
border-left: none;
border-right: none;
}
.plupload .ui-sortable-helper,
.plupload .ui-sortable .plupload_file {
cursor:move;
}
.plupload_scroll {
max-height: 180px;
min-height: 168px;
_height: 168px;
overflow-y: auto;
}
.plupload_file_size, .plupload_file_status {text-align: right;}
.plupload_file_size, .plupload_file_status {width: 52px;}
.plupload_file_action {width: 16px;}
.plupload_file_name {
overflow: hidden;
padding-left: 10px;
}
.plupload_file_rename {
width:95%;
}
.plupload_progress {width: 60px;}
.plupload_progress_container {padding: 1px;}
/* Floats */
.plupload_right {float: right;}
.plupload_left {float: left;}
.plupload_clear,.plupload_clearer {clear: both;}
.plupload_clearer, .plupload_progress_bar {
display: block;
font-size: 0;
line-height: 0;
}
.plupload_clearer {height: 0;}
/* Misc */
.plupload_hidden {display: none;}
.plupload_droptext {
background: transparent;
text-align: center;
vertical-align: middle;
border: 0;
line-height: 165px;
}
.plupload_buttons, .plupload_upload_status {float: left}
.plupload_message {
position: absolute;
top: 0px;
left: 0px;
height: 100%;
width: 100%;
}
.plupload_message p {
padding:0.7em;
margin:0;
}
.plupload_message strong {
font-weight: bold;
}
plupload_message i {
font-style: italic;
}
.plupload_message p span.ui-icon {
float: left;
margin-right: 0.3em;
}
.plupload_header_content .ui-state-error,
.plupload_header_content .ui-state-highlight {
border:none;
}
.plupload_message_close {
position:absolute;
top:5px;
right:5px;
cursor:pointer;
}
.plupload .ui-sortable-placeholder {
height:35px;
}
plupload/jquery.ui.plupload/img/index.html000064400000000054151175232510014710
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>plupload/jquery.ui.plupload/img/plupload-bw.png000064400000004071151175232510015652
0ustar00�PNG
IHDR((���mtEXtSoftwareAdobe
ImageReadyq�e<�IDATxڬX[OWp8(�"
/(xi8��/�D����4�Hm��I�Zb�X|hb�����%>�`o)� j���pAD�
(��59k�9(jw�ef���{�]��544x��zzz�MOO�l{��y���d!��fff<Ȍ�C��郸�edd�Z�~�?v��k�f�w�
������
~���EV�^����z������Ԕ�i���EO�>-z���V�u����ŋ�9�nݺޅ��
�}}}�X� R�y�f�ڵ^NNN& ���D
�s�ҥK�︑�����b�Ϟ={�KAA�7����`=4�݆
�6n�,L@O�<���B`8��lRԠn����0�~��O����844�b����a?ފ+P[H̹B�6$X�����U��e˖eݻw�{�|��%K>��D*�:A}..m����۷o��/_�A-K�(���g���IJ�0�{YYYՏ?nۿ���.-eee�-[��`\P.9��W���[�8����mٷo_�*�J.� ��X,%��"�/�Bڧ���)mQ�V7BB_Nt]��8��TWTT�d�-n�Jm�Ν�;JWWWȦ��.�O��-
�D����9���||���R�B0�5�N��X&�,�
Nz�H$�����
�� 0�c֬Y�����֖�a�A�ʤCH��#���-���`�س�s,�#�Cf\�݈�����g�X2�b�k�7m��V�l��@�.&�V�F�� ��1�PV�\9�y~WYY�����������t��!��\�LQ,XW����s2�s<�q�A;P9�ۍd:����TÂ�N!.띮��\�rN�S�I��Z���^}���*���ȡ�C�U�'u
��\@�(��[�ٓ�23q=��H�9
n�@{9��;���%�P�p���x}ϵ舼g?��٨�㊊�X������R-�z��6x��A�˹C�l���GaGdp�#FK�[[�(<X���_j�� �T�z�a�k 5�����0�
�����jS�����ݘhUhܱcGN���֭[�8�-Գ}L��n�r���:>3�0��U�.j�X���M'5�A��`�rʆ۔��k>�GmX���^�z�kkk��Q"ۜ�c�٠�'1(3��R�5~���ָŲʹv��]g��;k�U+�w�� ��
�ܹssT�o�i��Xj��ҥKa�Sm(3"�6$iMy�c���ͣQ�Ƭ�.0�q��b��h�G.nK-k�Z��p^J����Ў\��1*�� �
)n)�4e3M�0e��4����>^�GJ��'.w���� to��B��B�V���Ӟg�p���d1Y��@���T��۬m��X��25��(�?�wN��.ӳ��$/�Dz1=K�.����@���"a����>}:�'wR�ΝOQ��T���,
%vU2�cY�{h;�ԋp4��mX�"v���w���)!��Ěҗ����|�YuJd.�?b@q�{SSS|֙�DyӅ2<��8��6_��Ӫ�:�ˤ{�M
$m��98�TWXX��id�{��A˞��T��H
֬��Pm�ɓ'{S��Q���俒Y��F�%�kkZ��ߖ[��vC�j����ޯ
�_�g4|��
�t��
RW�n��3Ĝ�a�
�JV��M�~鯏�������do�I[�[�� l��Π�T&b=K.H'��:v�XbA��p>���k��]�gxw��e�-�AɪU�ó���!�/Pu����+��F��^KKK=X
~`��ɕK-�n��x���io��p������S��������g8�O�5�?3ɨ˚�
A�f=���=ƚ���(Z�0[,�D�c�r������ͼ���0��UȄ�C������y� �#t�fE���DW�����K�\�r�0y����` ���Qd�!���!�pn��_��'�vJ�h��E1IEND�B`�plupload/jquery.ui.plupload/img/plupload.png000064400000007071151175232510015247
0ustar00�PNG
IHDR((���mtEXtSoftwareAdobe
ImageReadyq�e<
�IDATxڌYkl�>��cwg��#N�8N�����&�<�ZA��RSJU��*�DHUQ(��J(
h����PK�P�*�6%$ 4��$�q?�9;3��;w���Z��;{��9�;�^��Qk�c�9��I-[���a�A
�:٠źF]nD�Q�G��2t.��p>��=zr�f����ea?��y=�}M����/��j��]�&�6"��0���3vg��ԓ]H]v;�Z�XDD�`U1U�h���V�����Ο~�o-�Ţ~�k7�)�ȗ
�9e+�ǒ�o�;jJ=U��5��3WQ�\�5,��{�$���B.�3qH9-)��6�#*��#�EK��b����#4�y����}���]�Q�H�����f�K�B]�HW�P�$XK��,�1��T��dQVHRuE'�W����%����=E�?�&��37���P��X�z˵��t���j�g���)�������T�<L�#lT6�hf���,+m��Р'KxZ�m����t�3�s_��8��hU{���(P%|Rk5�^�w:]�Hb��.�0=��7��tu
҂dƲ����h[�7|k����w����;Y���E};�-`m�W �,��*�����
�py��t�b.��1��\]��J�<˦#G'i��@{�^��s��ѰR���qEO���*�)���źn�i���f�4~����LY ��I#��I�9L�=���M2�K����
�wft�|����G]�ڻ�V�\v˗[n�\V6��-�!`DFrp�mD��-���0"ga��F;���1<$@��W�Řq���;I�[~�k�跿��(��i�wzǪ-�V,�Ҥ�$&1NՈ6��w�Bc"U��}d&���e�WW�01[�*�d ��^;��
����t�����Ů�ψ�&}�A��?�^����IN 0g�
_��o˼"���3)lÐLG��YAb���%RKv���o�|�k���Z����ap����y�T�ߴ������`�V����:,�[���d�*���ƄH�qա������Cb�$0*�#��s����C�3j[ve�iӾ'Ī��<�ow�ڵ�U�4
��_'q0�ņ+���،$�Y @f(e����=�fXGȴ�x��[�r0s�v�sfICv��yk����d�ao��瞫z[���Q���j`*�\Y]S�ٝ̋4�Y��Rפ�pf\̮t�h��nJ��$'Q�,1
���}E�@Z�2��[x�9�u�.��*���%yOz4�JQ�6�SGYi+��!-�J�1�6�
M�ã��,2Ȍ.��b��8��k)��%+CB��,,4,�I+[�N�7.8u���;2==TU6س��k���k(GFONbq��
�t�yVl�0��r�
�a��9��lkV����$2����X!�F�c%���Qv��څ�����i�13#@*0&a
�L�pi�̋
�
p�[)�����4��оRp�3�B_C���I�d0'vk7e`�7��0��
ه�W�uK�
�ǑG"g��d���R�J`�QG�(�� b]��|��-�!
I'2��Pcc��$�d�ݨ���u�\�z�0�Y�CFF,5���)�^T�4�?�"�pړfV45����d<Z\���ko"�K�Jl��ͤ
(����͚�1d� ��=���q�[�c�'X�L�J�����l��g�uX�J2�D�b=ّ,P�9��_����O
�L�!�^a�K�X,���+�����<a�D�>�pN��*�|�3[��B�yK��5X�y����/�[�,�m�*�E[����A+�>�q,C�]'[h�&�Z�(!g���L���J�9W�E�!yhg��obQ36L��i��)ĸ3��
JbP�Ո�é��p3�Id�@ƣ��������X��$J�S{MRW���M7�c�45��ѝ��_�!x�Y�<h���3���$�'��L�2���!7u���T-B�
+1�ė�a,N)(+X5�ȉ!"x^+��$",uB*�Q
��2q���P�,�B��y��I�f�71��`P�@�BԸ��l�R����ڼ�M��
���1�2�K���ky<+��ɦe��@FK�5�'�
K���G� H�
�|�)�@�V��,�!����хɻ�u�t��Մpw&YXh3�;c��k��ʼn��I@D"s�,����-I��E�}��̸��5��a@�;G������˶��KT+gʻh"=�������s1�
�969A�1݉(��`�!ī��L�r��e�J�(X�4 �Q���@��p!�lML�C)^��]O7�V����:��َ
j��K+�
���[��|�4�S4�Y?srYg,��
\'���W�}DU���Λ�o�LѸ(��s�Ɇ��n��ufph�uW^.y�]G��p��I�n��QY�t�6)��.;Ζ4�_O��r�m7����Cb���,���J��0���Y5�VN8��e�9��>8R�v�݆ ��,�H��i���l!e���T4��C;a�+<�Ҏ0���R6����a��D+���� ��^���������j>:}�Gg�[�[�)�h���2�l�,�ފ�1mbmz�a��"6��a�8a����DR���_ؠ�L$:�JHG>��{gwu`��͉�N����gFjT@�W@���|L�a�Y`r���p+%�2 �f5�k�d�b��n�Q.i,']���\��,�7�7X�3١�;���쮮<{��?�����g��tՖ/�
X576��?w��2̀�``�$`�934j��̦�ӢCIF�.j,R�tW��9��{T���ۯ>G���/���܍{��XBN���쁜Z�4�ɾX e�KI L&0���Qa�D��L�9�M\:�4>]�'$�"3���T}�<�>yl`<w��O��P��v���-Ε��꒾��/�FDLE��l����8�t��
Pa���`;�t������r-*�w�N�8xt����~��#>��7L���-fz_]�|���}*��V
@hR�r��/\q��N�f�aN�x��8]0� 4�j��
����B��֝{��o���c�i��Y6�}��]ݭ}��^��-_Ꙏ������r�(K�1�7Q|�����_��JS���ۖ'>��&7���ћ���њY�Lw��;W�\`wwe�C`���J����eܜtw�N݊���~�N�F� ��k��}o��E�>���t\���.m�����ټ����g�GV�6���&e���3鸌��r�JAit�Ng������s�'ϊ�<��X����H�6~�;��9�~�.�7��<p�ӝ�N�j_�,n�;���$j�?'t�c�K�":��
/�y�{l/��b_�`<�K��ޢIEND�B`�plupload/jquery.ui.plupload/index.html000064400000000054151175232510014134
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>plupload/jquery.ui.plupload/jquery.ui.plupload.js000064400000031205151175232510016251
0ustar00(function(f,a,c,g,e){var h={};function b(i){return
c.translate(i)||i}function d(i){i.html('<div
class="plupload_wrapper"><div class="ui-widget-content
plupload_container"><div class="plupload"><div
class="ui-state-default ui-widget-header
plupload_header"><div
class="plupload_header_content"><div
class="plupload_header_title">'+b("Select
files")+'</div><div
class="plupload_header_text">'+b("Add files to the
upload queue and click the start
button.")+'</div></div></div><div
class="plupload_content"><table
class="plupload_filelist"><tr class="ui-widget-header
plupload_filelist_header"><td class="plupload_cell
plupload_file_name">'+b("Filename")+'</td><td
class="plupload_cell
plupload_file_status">'+b("Status")+'</td><td
class="plupload_cell
plupload_file_size">'+b("Size")+'</td><td
class="plupload_cell
plupload_file_action"> </td></tr></table><div
class="plupload_scroll"><table
class="plupload_filelist_content"></table></div><table
class="plupload_filelist"><tr class="ui-widget-header
ui-widget-content plupload_filelist_footer"><td
class="plupload_cell plupload_file_name"><div
class="plupload_buttons"><!-- Visible --><a
class="plupload_button plupload_add">'+b("Add
Files")+'</a> <a class="plupload_button
plupload_start">'+b("Start
Upload")+'</a> <a class="plupload_button
plupload_stop plupload_hidden">'+b("Stop
Upload")+'</a> </div><div
class="plupload_started plupload_hidden"><!-- Hidden
--><div class="plupload_progress plupload_right"><div
class="plupload_progress_container"></div></div><div
class="plupload_cell
plupload_upload_status"></div><div
class="plupload_clearer"> </div></div></td><td
class="plupload_file_status"><span
class="plupload_total_status">0%</span></td><td
class="plupload_file_size"><span
class="plupload_total_file_size">0
kb</span></td><td
class="plupload_file_action"></td></tr></table></div></div></div><input
class="plupload_count" value="0"
type="hidden"></div>')}g.widget("ui.plupload",{contents_bak:"",runtime:null,options:{browse_button_hover:"ui-state-hover",browse_button_active:"ui-state-active",dragdrop:true,multiple_queues:true,buttons:{browse:true,start:true,stop:true},autostart:false,sortable:false,rename:false,max_file_count:0},FILE_COUNT_ERROR:-9001,_create:function(){var
i=this,k,j;k=this.element.attr("id");if(!k){k=c.guid();this.element.attr("id",k)}this.id=k;this.contents_bak=this.element.html();d(this.element);this.container=g(".plupload_container",this.element).attr("id",k+"_container");this.filelist=g(".plupload_filelist_content",this.container).attr({id:k+"_filelist",unselectable:"on"});this.browse_button=g(".plupload_add",this.container).attr("id",k+"_browse");this.start_button=g(".plupload_start",this.container).attr("id",k+"_start");this.stop_button=g(".plupload_stop",this.container).attr("id",k+"_stop");if(g.ui.button){this.browse_button.button({icons:{primary:"ui-icon-circle-plus"}});this.start_button.button({icons:{primary:"ui-icon-circle-arrow-e"},disabled:true});this.stop_button.button({icons:{primary:"ui-icon-circle-close"}})}this.progressbar=g(".plupload_progress_container",this.container);if(g.ui.progressbar){this.progressbar.progressbar()}this.counter=g(".plupload_count",this.element).attr({id:k+"_count",name:k+"_count"});j=this.uploader=h[k]=new
c.Uploader(g.extend({container:k,browse_button:k+"_browse"},this.options));j.bind("Error",function(l,m){if(m.code===c.INIT_ERROR){i.destroy()}});j.bind("Init",function(l,m){if(!i.options.buttons.browse){i.browse_button.button("disable").hide();l.disableBrowse(true)}if(!i.options.buttons.start){i.start_button.button("disable").hide()}if(!i.options.buttons.stop){i.stop_button.button("disable").hide()}if(!i.options.unique_names&&i.options.rename){i._enableRenaming()}if(j.features.dragdrop&&i.options.dragdrop){i._enableDragAndDrop()}i.container.attr("title",b("Using
runtime:
")+(i.runtime=m.runtime));i.start_button.click(function(n){if(!g(this).button("option","disabled")){i.start()}n.preventDefault()});i.stop_button.click(function(n){i.stop();n.preventDefault()})});if(i.options.max_file_count){j.bind("FilesAdded",function(l,n){var
o=[],m=n.length;var
p=l.files.length+m-i.options.max_file_count;if(p>0){o=n.splice(m-p,p);l.trigger("Error",{code:i.FILE_COUNT_ERROR,message:b("File
count
error."),file:o})}})}j.init();j.bind("FilesAdded",function(l,m){i._trigger("selected",null,{up:l,files:m});if(i.options.autostart){setTimeout(function(){i.start()},10)}});j.bind("FilesRemoved",function(l,m){i._trigger("removed",null,{up:l,files:m})});j.bind("QueueChanged",function(){i._updateFileList()});j.bind("StateChanged",function(){i._handleState()});j.bind("UploadFile",function(l,m){i._handleFileStatus(m)});j.bind("FileUploaded",function(l,m){i._handleFileStatus(m);i._trigger("uploaded",null,{up:l,file:m})});j.bind("UploadProgress",function(l,m){g("#"+m.id).find(".plupload_file_status").html(m.percent+"%").end().find(".plupload_file_size").html(c.formatSize(m.size));i._handleFileStatus(m);i._updateTotalProgress();i._trigger("progress",null,{up:l,file:m})});j.bind("UploadComplete",function(l,m){i._trigger("complete",null,{up:l,files:m})});j.bind("Error",function(l,p){var
n=p.file,o,m;if(n){o="<strong>"+p.message+"</strong>";m=p.details;if(m){o+="
<br
/><i>"+p.details+"</i>"}else{switch(p.code){case
c.FILE_EXTENSION_ERROR:m=b("File:
%s").replace("%s",n.name);break;case
c.FILE_SIZE_ERROR:m=b("File: %f, size: %s, max file size:
%m").replace(/%([fsm])/g,function(r,q){switch(q){case"f":return
n.name;case"s":return n.size;case"m":return
c.parseSize(i.options.max_file_size)}});break;case
i.FILE_COUNT_ERROR:m=b("Upload element accepts only %d file(s) at a
time. Extra files were
stripped.").replace("%d",i.options.max_file_count);break;case
c.IMAGE_FORMAT_ERROR:m=c.translate("Image format either wrong or not
supported.");break;case
c.IMAGE_MEMORY_ERROR:m=c.translate("Runtime ran out of available
memory.");break;case
c.IMAGE_DIMENSIONS_ERROR:m=c.translate("Resoultion out of boundaries!
<b>%s</b> runtime supports images only up to
%wx%hpx.").replace(/%([swh])/g,function(r,q){switch(q){case"s":return
l.runtime;case"w":return
l.features.maxWidth;case"h":return
l.features.maxHeight}});break;case c.HTTP_ERROR:m=b("Upload URL might
be wrong or doesn't exist");break}o+=" <br
/><i>"+m+"</i>"}i.notify("error",o);i._trigger("error",null,{up:l,file:n,error:o})}})},_setOption:function(j,k){var
i=this;if(j=="buttons"&&typeof(k)=="object"){k=g.extend(i.options.buttons,k);if(!k.browse){i.browse_button.button("disable").hide();up.disableBrowse(true)}else{i.browse_button.button("enable").show();up.disableBrowse(false)}if(!k.start){i.start_button.button("disable").hide()}else{i.start_button.button("enable").show()}if(!k.stop){i.stop_button.button("disable").hide()}else{i.start_button.button("enable").show()}}i.uploader.settings[j]=k},start:function(){this.uploader.start();this._trigger("start",null)},stop:function(){this.uploader.stop();this._trigger("stop",null)},getFile:function(j){var
i;if(typeof
j==="number"){i=this.uploader.files[j]}else{i=this.uploader.getFile(j)}return
i},removeFile:function(j){var
i=this.getFile(j);if(i){this.uploader.removeFile(i)}},clearQueue:function(){this.uploader.splice()},getUploader:function(){return
this.uploader},refresh:function(){this.uploader.refresh()},_handleState:function(){var
j=this,i=this.uploader;if(i.state===c.STARTED){g(j.start_button).button("disable");g([]).add(j.stop_button).add(".plupload_started").removeClass("plupload_hidden");g(".plupload_upload_status",j.element).html(b("Uploaded
%d/%d
files").replace("%d/%d",i.total.uploaded+"/"+i.files.length));g(".plupload_header_content",j.element).addClass("plupload_header_content_bw")}else{g([]).add(j.stop_button).add(".plupload_started").addClass("plupload_hidden");if(j.options.multiple_queues){g(j.start_button).button("enable");g(".plupload_header_content",j.element).removeClass("plupload_header_content_bw")}j._updateFileList()}},_handleFileStatus:function(l){var
n,j;if(!g("#"+l.id).length){return}switch(l.status){case
c.DONE:n="plupload_done";j="ui-icon
ui-icon-circle-check";break;case c.FAILED:n="ui-state-error
plupload_failed";j="ui-icon ui-icon-alert";break;case
c.QUEUED:n="plupload_delete";j="ui-icon
ui-icon-circle-minus";break;case
c.UPLOADING:n="ui-state-highlight
plupload_uploading";j="ui-icon ui-icon-circle-arrow-w";var
i=g(".plupload_scroll",this.container),m=i.scrollTop(),o=i.height(),k=g("#"+l.id).position().top+g("#"+l.id).height();if(o<k){i.scrollTop(m+k-o)}break}n+="
ui-state-default
plupload_file";g("#"+l.id).attr("class",n).find(".ui-icon").attr("class",j)},_updateTotalProgress:function(){var
i=this.uploader;this.progressbar.progressbar("value",i.total.percent);this.element.find(".plupload_total_status").html(i.total.percent+"%").end().find(".plupload_total_file_size").html(c.formatSize(i.total.size)).end().find(".plupload_upload_status").html(b("Uploaded
%d/%d
files").replace("%d/%d",i.total.uploaded+"/"+i.files.length))},_updateFileList:function(){var
k=this,j=this.uploader,m=this.filelist,l=0,o,n=this.id+"_",i;if(g.ui.sortable&&this.options.sortable){g("tbody.ui-sortable",m).sortable("destroy")}m.empty();g.each(j.files,function(q,p){i="";o=n+l;if(p.status===c.DONE){if(p.target_name){i+='<input
type="hidden" name="'+o+'_tmpname"
value="'+c.xmlEncode(p.target_name)+'"
/>'}i+='<input type="hidden"
name="'+o+'_name"
value="'+c.xmlEncode(p.name)+'"
/>';i+='<input type="hidden"
name="'+o+'_status"
value="'+(p.status===c.DONE?"done":"failed")+'"
/>';l++;k.counter.val(l)}m.append('<tr
class="ui-state-default plupload_file"
id="'+p.id+'"><td class="plupload_cell
plupload_file_name"><span>'+p.name+'</span></td><td
class="plupload_cell
plupload_file_status">'+p.percent+'%</td><td
class="plupload_cell
plupload_file_size">'+c.formatSize(p.size)+'</td><td
class="plupload_cell plupload_file_action"><div
class="ui-icon"></div>'+i+"</td></tr>");k._handleFileStatus(p);g("#"+p.id+".plupload_delete
.ui-icon, #"+p.id+".plupload_done
.ui-icon").click(function(r){g("#"+p.id).remove();j.removeFile(p);r.preventDefault()});k._trigger("updatelist",null,m)});if(j.total.queued===0){g(".ui-button-text",k.browse_button).html(b("Add
Files"))}else{g(".ui-button-text",k.browse_button).html(b("%d
files
queued").replace("%d",j.total.queued))}if(j.files.length===(j.total.uploaded+j.total.failed)){k.start_button.button("disable")}else{k.start_button.button("enable")}m[0].scrollTop=m[0].scrollHeight;k._updateTotalProgress();if(!j.files.length&&j.features.dragdrop&&j.settings.dragdrop){g("#"+o+"_filelist").append('<tr><td
class="plupload_droptext">'+b("Drag files
here.")+"</td></tr>")}else{if(k.options.sortable&&g.ui.sortable){k._enableSortingList()}}},_enableRenaming:function(){var
i=this;this.filelist.on("click",".plupload_delete
.plupload_file_name span",function(o){var
m=g(o.target),k,n,j,l="";k=i.uploader.getFile(m.parents("tr")[0].id);j=k.name;n=/^(.+)(\.[^.]+)$/.exec(j);if(n){j=n[1];l=n[2]}m.hide().after('<input
class="plupload_file_rename" type="text"
/>');m.next().val(j).focus().blur(function(){m.show().next().remove()}).keydown(function(q){var
p=g(this);if(g.inArray(q.keyCode,[13,27])!==-1){q.preventDefault();if(q.keyCode===13){k.name=p.val()+l;m.html(k.name)}p.blur()}})})},_enableDragAndDrop:function(){this.filelist.append('<tr><td
class="plupload_droptext">'+b("Drag files
here.")+"</td></tr>");this.filelist.parent().attr("id",this.id+"_dropbox");this.uploader.settings.drop_element=this.options.drop_element=this.id+"_dropbox"},_enableSortingList:function(){var
j,i=this;if(g("tbody
tr",this.filelist).length<2){return}g("tbody",this.filelist).sortable({containment:"parent",items:".plupload_delete",helper:function(l,k){return
k.clone(true).find("td:not(.plupload_file_name)").remove().end().css("width","100%")},stop:function(p,o){var
l,n,k,m=[];g.each(g(this).sortable("toArray"),function(q,r){m[m.length]=i.uploader.getFile(r)});m.unshift(m.length);m.unshift(0);Array.prototype.splice.apply(i.uploader.files,m)}})},notify:function(j,k){var
i=g('<div class="plupload_message"><span
class="plupload_message_close ui-icon ui-icon-circle-close"
title="'+b("Close")+'"></span><p><span
class="ui-icon"></span>'+k+"</p></div>");i.addClass("ui-state-"+(j==="error"?"error":"highlight")).find("p
.ui-icon").addClass("ui-icon-"+(j==="error"?"alert":"info")).end().find(".plupload_message_close").click(function(){i.remove()}).end();g(".plupload_header_content",this.container).append(i)},destroy:function(){g(".plupload_button",this.element).unbind();if(g.ui.button){g(".plupload_add,
.plupload_start,
.plupload_stop",this.container).button("destroy")}if(g.ui.progressbar){this.progressbar.progressbar("destroy")}if(g.ui.sortable&&this.options.sortable){g("tbody",this.filelist).sortable("destroy")}this.uploader.destroy();this.element.empty().html(this.contents_bak);this.contents_bak="";g.Widget.prototype.destroy.apply(this)}})}(window,document,plupload,jQuery));plupload/plupload.html4.js000064400000011351151175232510011574
0ustar00(function(d,a,b,c){function e(f){return
a.getElementById(f)}b.runtimes.Html4=b.addRuntime("html4",{getFeatures:function(){return{multipart:true,triggerDialog:(b.ua.gecko&&d.FormData||b.ua.webkit)}},init:function(f,g){f.bind("Init",function(p){var
j=a.body,n,h="javascript",k,x,q,z=[],r=/MSIE/.test(navigator.userAgent),t=[],m=p.settings.filters,o,l,s,w;no_type_restriction:for(o=0;o<m.length;o++){l=m[o].extensions.split(/,/);for(w=0;w<l.length;w++){if(l[w]==="*"){t=[];break
no_type_restriction}s=b.mimeTypes[l[w]];if(s&&b.inArray(s,t)===-1){t.push(s)}}}t=t.join(",");function
v(){var
B,y,i,A;q=b.guid();z.push(q);B=a.createElement("form");B.setAttribute("id","form_"+q);B.setAttribute("method","post");B.setAttribute("enctype","multipart/form-data");B.setAttribute("encoding","multipart/form-data");B.setAttribute("target",p.id+"_iframe");B.style.position="absolute";y=a.createElement("input");y.setAttribute("id","input_"+q);y.setAttribute("type","file");y.setAttribute("accept",t);y.setAttribute("size",1);A=e(p.settings.browse_button);if(p.features.triggerDialog&&A){b.addEvent(e(p.settings.browse_button),"click",function(C){if(!y.disabled){y.click()}C.preventDefault()},p.id)}b.extend(y.style,{width:"100%",height:"100%",opacity:0,fontSize:"99px",cursor:"pointer"});b.extend(B.style,{overflow:"hidden"});i=p.settings.shim_bgcolor;if(i){B.style.background=i}if(r){b.extend(y.style,{filter:"alpha(opacity=0)"})}b.addEvent(y,"change",function(F){var
D=F.target,C,E=[],G;if(D.value){e("form_"+q).style.top=-1048575+"px";C=D.value.replace(/\\/g,"/");C=C.substring(C.length,C.lastIndexOf("/")+1);E.push(new
b.File(q,C));if(!p.features.triggerDialog){b.removeAllEvents(B,p.id)}else{b.removeEvent(A,"click",p.id)}b.removeEvent(y,"change",p.id);v();if(E.length){f.trigger("FilesAdded",E)}}},p.id);B.appendChild(y);j.appendChild(B);p.refresh()}function
u(){var i=a.createElement("div");i.innerHTML='<iframe
id="'+p.id+'_iframe"
name="'+p.id+'_iframe"
src="'+h+':"""
style="display:none"></iframe>';n=i.firstChild;j.appendChild(n);b.addEvent(n,"load",function(C){var
D=C.target,B,y;if(!k){return}try{B=D.contentWindow.document||D.contentDocument||d.frames[D.id].document}catch(A){p.trigger("Error",{code:b.SECURITY_ERROR,message:b.translate("Security
error."),file:k});return}y=B.documentElement.innerText||B.documentElement.textContent;if(y){k.status=b.DONE;k.loaded=1025;k.percent=100;p.trigger("UploadProgress",k);p.trigger("FileUploaded",k,{response:y})}},p.id)}if(p.settings.container){j=e(p.settings.container);if(b.getStyle(j,"position")==="static"){j.style.position="relative"}}p.bind("UploadFile",function(i,A){var
B,y;if(A.status==b.DONE||A.status==b.FAILED||i.state==b.STOPPED){return}B=e("form_"+A.id);y=e("input_"+A.id);y.setAttribute("name",i.settings.file_data_name);B.setAttribute("action",i.settings.url);b.each(b.extend({name:A.target_name||A.name},i.settings.multipart_params),function(E,C){var
D=a.createElement("input");b.extend(D,{type:"hidden",name:C,value:E});B.insertBefore(D,B.firstChild)});k=A;e("form_"+q).style.top=-1048575+"px";B.submit()});p.bind("FileUploaded",function(i){i.refresh()});p.bind("StateChanged",function(i){if(i.state==b.STARTED){u()}else{if(i.state==b.STOPPED){d.setTimeout(function(){b.removeEvent(n,"load",i.id);if(n.parentNode){n.parentNode.removeChild(n)}},0)}}b.each(i.files,function(A,y){if(A.status===b.DONE||A.status===b.FAILED){var
B=e("form_"+A.id);if(B){B.parentNode.removeChild(B)}}})});p.bind("Refresh",function(y){var
F,A,B,C,i,G,H,E,D;F=e(y.settings.browse_button);if(F){i=b.getPos(F,e(y.settings.container));G=b.getSize(F);H=e("form_"+q);E=e("input_"+q);b.extend(H.style,{top:i.y+"px",left:i.x+"px",width:G.w+"px",height:G.h+"px"});if(y.features.triggerDialog){if(b.getStyle(F,"position")==="static"){b.extend(F.style,{position:"relative"})}D=parseInt(F.style.zIndex,10);if(isNaN(D)){D=0}b.extend(F.style,{zIndex:D});b.extend(H.style,{zIndex:D-1})}B=y.settings.browse_button_hover;C=y.settings.browse_button_active;A=y.features.triggerDialog?F:H;if(B){b.addEvent(A,"mouseover",function(){b.addClass(F,B)},y.id);b.addEvent(A,"mouseout",function(){b.removeClass(F,B)},y.id)}if(C){b.addEvent(A,"mousedown",function(){b.addClass(F,C)},y.id);b.addEvent(a.body,"mouseup",function(){b.removeClass(F,C)},y.id)}}});f.bind("FilesRemoved",function(y,B){var
A,C;for(A=0;A<B.length;A++){C=e("form_"+B[A].id);if(C){C.parentNode.removeChild(C)}}});f.bind("DisableBrowse",function(i,A){var
y=a.getElementById("input_"+q);if(y){y.disabled=A}});f.bind("Destroy",function(i){var
y,A,B,C={inputContainer:"form_"+q,inputFile:"input_"+q,browseButton:i.settings.browse_button};for(y
in
C){A=e(C[y]);if(A){b.removeAllEvents(A,i.id)}}b.removeAllEvents(a.body,i.id);b.each(z,function(E,D){B=e("form_"+E);if(B){B.parentNode.removeChild(B)}})});v()});g({success:true})}})})(window,document,plupload);plupload/plupload.html5.js000064400000043032151175232510011576
0ustar00(function(k,m,l,g){var d={},j;function c(s){var
r=s.naturalWidth,u=s.naturalHeight;if(r*u>1024*1024){var
t=m.createElement("canvas");t.width=t.height=1;var
q=t.getContext("2d");q.drawImage(s,-r+1,0);return
q.getImageData(0,0,1,1).data[3]===0}else{return false}}function
f(u,r,z){var q=m.createElement("canvas");q.width=1;q.height=z;var
A=q.getContext("2d");A.drawImage(u,0,0);var
t=A.getImageData(0,0,1,z).data;var x=0;var v=z;var y=z;while(y>x){var
s=t[(y-1)*4+3];if(s===0){v=y}else{x=y}y=(v+x)>>1}var
w=(y/z);return(w===0)?1:w}function o(K,s,t){var
v=K.naturalWidth,z=K.naturalHeight;var E=t.width,B=t.height;var
F=s.getContext("2d");F.save();var r=c(K);if(r){v/=2;z/=2}var
I=1024;var q=m.createElement("canvas");q.width=q.height=I;var
u=q.getContext("2d");var G=f(K,v,z);var A=0;while(A<z){var
J=A+I>z?z-A:I;var C=0;while(C<v){var
D=C+I>v?v-C:I;u.clearRect(0,0,I,I);u.drawImage(K,-C,-A);var
x=(C*E/v)<<0;var y=Math.ceil(D*E/v);var w=(A*B/z/G)<<0;var
H=Math.ceil(J*B/z/G);F.drawImage(q,0,0,D,J,x,w,y,H);C+=I}A+=I}F.restore();q=u=null}function
p(r,s){var q;if("FileReader" in k){q=new
FileReader();q.readAsDataURL(r);q.onload=function(){s(q.result)}}else{return
s(r.getAsDataURL())}}function n(r,s){var q;if("FileReader" in
k){q=new
FileReader();q.readAsBinaryString(r);q.onload=function(){s(q.result)}}else{return
s(r.getAsBinary())}}function e(u,s,q,y){var
t,r,x,v,w=this;p(d[u.id],function(z){t=m.createElement("canvas");t.style.display="none";m.body.appendChild(t);x=new
Image();x.onerror=x.onabort=function(){y({success:false})};x.onload=function(){var
F,A,C,B,E;if(!s.width){s.width=x.width}if(!s.height){s.height=x.height}v=Math.min(s.width/x.width,s.height/x.height);if(v<1){F=Math.round(x.width*v);A=Math.round(x.height*v)}else{if(s.quality&&q==="image/jpeg"){F=x.width;A=x.height}else{y({success:false});return}}t.width=F;t.height=A;o(x,t,{width:F,height:A});if(q==="image/jpeg"){B=new
h(atob(z.substring(z.indexOf("base64,")+7)));if(B.headers&&B.headers.length){E=new
a();if(E.init(B.get("exif")[0])){E.setExif("PixelXDimension",F);E.setExif("PixelYDimension",A);B.set("exif",E.getBinary());if(w.hasEventListener("ExifData")){w.trigger("ExifData",u,E.EXIF())}if(w.hasEventListener("GpsData")){w.trigger("GpsData",u,E.GPS())}}}}if(s.quality&&q==="image/jpeg"){try{z=t.toDataURL(q,s.quality/100)}catch(D){z=t.toDataURL(q)}}else{z=t.toDataURL(q)}z=z.substring(z.indexOf("base64,")+7);z=atob(z);if(B&&B.headers&&B.headers.length){z=B.restore(z);B.purge()}t.parentNode.removeChild(t);y({success:true,data:z})};x.src=z})}l.runtimes.Html5=l.addRuntime("html5",{getFeatures:function(){var
v,r,u,t,s,q;r=u=s=q=false;if(k.XMLHttpRequest){v=new
XMLHttpRequest();u=!!v.upload;r=!!(v.sendAsBinary||v.upload)}if(r){t=!!(v.sendAsBinary||(k.Uint8Array&&k.ArrayBuffer));s=!!(File&&(File.prototype.getAsDataURL||k.FileReader)&&t);q=!!(File&&(File.prototype.mozSlice||File.prototype.webkitSlice||File.prototype.slice))}j=l.ua.safari&&l.ua.windows;return{html5:r,dragdrop:(function(){var
w=m.createElement("div");return("draggable" in
w)||("ondragstart" in w&&"ondrop" in
w)}()),jpgresize:s,pngresize:s,multipart:s||!!k.FileReader||!!k.FormData,canSendBinary:t,cantSendBlobInFormData:!!(l.ua.gecko&&k.FormData&&k.FileReader&&!FileReader.prototype.readAsArrayBuffer)||l.ua.android,progress:u,chunks:q,multi_selection:!(l.ua.safari&&l.ua.windows),triggerDialog:(l.ua.gecko&&k.FormData||l.ua.webkit)}},init:function(s,u){var
q,t;function r(z){var
x,w,y=[],A,v={};for(w=0;w<z.length;w++){x=z[w];if(v[x.name]&&l.ua.safari&&l.ua.windows){continue}v[x.name]=true;A=l.guid();d[A]=x;y.push(new
l.File(A,x.fileName||x.name,x.fileSize||x.size))}if(y.length){s.trigger("FilesAdded",y)}}q=this.getFeatures();if(!q.html5){u({success:false});return}s.bind("Init",function(A){var
J,I,F=[],z,G,w=A.settings.filters,x,E,v=m.body,H;J=m.createElement("div");J.id=A.id+"_html5_container";l.extend(J.style,{position:"absolute",background:s.settings.shim_bgcolor||"transparent",width:"100px",height:"100px",overflow:"hidden",zIndex:99999,opacity:s.settings.shim_bgcolor?"":0});J.className="plupload
html5";if(s.settings.container){v=m.getElementById(s.settings.container);if(l.getStyle(v,"position")==="static"){v.style.position="relative"}}v.appendChild(J);no_type_restriction:for(z=0;z<w.length;z++){x=w[z].extensions.split(/,/);for(G=0;G<x.length;G++){if(x[G]==="*"){F=[];break
no_type_restriction}E=l.mimeTypes[x[G]];if(E&&l.inArray(E,F)===-1){F.push(E)}}}J.innerHTML='<input
id="'+s.id+'_html5" style="font-size:999px"
type="file"
accept="'+F.join(",")+'"
'+(s.settings.multi_selection&&s.features.multi_selection?'multiple="multiple"':"")+"
/>";J.scrollTop=100;H=m.getElementById(s.id+"_html5");if(A.features.triggerDialog){l.extend(H.style,{position:"absolute",width:"100%",height:"100%"})}else{l.extend(H.style,{cssFloat:"right",styleFloat:"right"})}H.onchange=function(){r(this.files);this.value=""};I=m.getElementById(A.settings.browse_button);if(I){var
C=A.settings.browse_button_hover,D=A.settings.browse_button_active,B=A.features.triggerDialog?I:J;if(C){l.addEvent(B,"mouseover",function(){l.addClass(I,C)},A.id);l.addEvent(B,"mouseout",function(){l.removeClass(I,C)},A.id)}if(D){l.addEvent(B,"mousedown",function(){l.addClass(I,D)},A.id);l.addEvent(m.body,"mouseup",function(){l.removeClass(I,D)},A.id)}if(A.features.triggerDialog){l.addEvent(I,"click",function(K){var
y=m.getElementById(A.id+"_html5");if(y&&!y.disabled){y.click()}K.preventDefault()},A.id)}}});s.bind("PostInit",function(){var
v=m.getElementById(s.settings.drop_element);if(v){if(j){l.addEvent(v,"dragenter",function(z){var
y,w,x;y=m.getElementById(s.id+"_drop");if(!y){y=m.createElement("input");y.setAttribute("type","file");y.setAttribute("id",s.id+"_drop");y.setAttribute("multiple","multiple");l.addEvent(y,"change",function(){r(this.files);l.removeEvent(y,"change",s.id);y.parentNode.removeChild(y)},s.id);l.addEvent(y,"dragover",function(A){A.stopPropagation()},s.id);v.appendChild(y)}w=l.getPos(v,m.getElementById(s.settings.container));x=l.getSize(v);if(l.getStyle(v,"position")==="static"){l.extend(v.style,{position:"relative"})}l.extend(y.style,{position:"absolute",display:"block",top:0,left:0,width:x.w+"px",height:x.h+"px",opacity:0})},s.id);return}l.addEvent(v,"dragover",function(w){w.preventDefault()},s.id);l.addEvent(v,"drop",function(x){var
w=x.dataTransfer;if(w&&w.files){r(w.files)}x.preventDefault()},s.id)}});s.bind("Refresh",function(v){var
w,x,y,A,z;w=m.getElementById(s.settings.browse_button);if(w){x=l.getPos(w,m.getElementById(v.settings.container));y=l.getSize(w);A=m.getElementById(s.id+"_html5_container");l.extend(A.style,{top:x.y+"px",left:x.x+"px",width:y.w+"px",height:y.h+"px"});if(s.features.triggerDialog){if(l.getStyle(w,"position")==="static"){l.extend(w.style,{position:"relative"})}z=parseInt(l.getStyle(w,"zIndex"),10);if(isNaN(z)){z=0}l.extend(w.style,{zIndex:z});l.extend(A.style,{zIndex:z-1})}}});s.bind("DisableBrowse",function(v,x){var
w=m.getElementById(v.id+"_html5");if(w){w.disabled=x}});s.bind("CancelUpload",function(){if(t&&t.abort){t.abort()}});s.bind("UploadFile",function(v,x){var
y=v.settings,B,w;function A(D,G,C){var
E;if(File.prototype.slice){try{D.slice();return
D.slice(G,C)}catch(F){return
D.slice(G,C-G)}}else{if(E=File.prototype.webkitSlice||File.prototype.mozSlice){return
E.call(D,G,C)}else{return null}}}function z(C){var F=0,E=0;function D(){var
L,P,N,O,K,M,H,G=v.settings.url;function
J(S){if(t.sendAsBinary){t.sendAsBinary(S)}else{if(v.features.canSendBinary){var
Q=new Uint8Array(S.length);for(var
R=0;R<S.length;R++){Q[R]=(S.charCodeAt(R)&255)}t.send(Q.buffer)}}}function
I(R){var
V=0,W="----pluploadboundary"+l.guid(),T,S="--",U="\r\n",Q="";t=new
XMLHttpRequest;if(t.upload){t.upload.onprogress=function(X){x.loaded=Math.min(x.size,E+X.loaded-V);v.trigger("UploadProgress",x)}}t.onreadystatechange=function(){var
X,Z;if(t.readyState==4&&v.state!==l.STOPPED){try{X=t.status}catch(Y){X=0}if(X>=400){v.trigger("Error",{code:l.HTTP_ERROR,message:l.translate("HTTP
Error."),file:x,status:X})}else{if(N){Z={chunk:F,chunks:N,response:t.responseText,status:X};v.trigger("ChunkUploaded",x,Z);E+=M;if(Z.cancelled){x.status=l.FAILED;return}x.loaded=Math.min(x.size,(F+1)*K)}else{x.loaded=x.size}v.trigger("UploadProgress",x);R=L=T=Q=null;if(!N||++F>=N){x.status=l.DONE;v.trigger("FileUploaded",x,{response:t.responseText,status:X})}else{D()}}}};if(v.settings.multipart&&q.multipart){O.name=x.target_name||x.name;t.open("post",G,true);l.each(v.settings.headers,function(Y,X){t.setRequestHeader(X,Y)});if(typeof(R)!=="string"&&!!k.FormData){T=new
FormData();l.each(l.extend(O,v.settings.multipart_params),function(Y,X){T.append(X,Y)});T.append(v.settings.file_data_name,R);t.send(T);return}if(typeof(R)==="string"){t.setRequestHeader("Content-Type","multipart/form-data;
boundary="+W);l.each(l.extend(O,v.settings.multipart_params),function(Y,X){Q+=S+W+U+'Content-Disposition:
form-data;
name="'+X+'"'+U+U;Q+=unescape(encodeURIComponent(Y))+U});H=l.mimeTypes[x.name.replace(/^.+\.([^.]+)/,"$1").toLowerCase()]||"application/octet-stream";Q+=S+W+U+'Content-Disposition:
form-data; name="'+v.settings.file_data_name+'";
filename="'+unescape(encodeURIComponent(x.name))+'"'+U+"Content-Type:
"+H+U+U+R+U+S+W+S+U;V=Q.length-R.length;R=Q;J(R);return}}G=l.buildUrl(v.settings.url,l.extend(O,v.settings.multipart_params));t.open("post",G,true);t.setRequestHeader("Content-Type","application/octet-stream");l.each(v.settings.headers,function(Y,X){t.setRequestHeader(X,Y)});if(typeof(R)==="string"){J(R)}else{t.send(R)}}if(x.status==l.DONE||x.status==l.FAILED||v.state==l.STOPPED){return}O={name:x.target_name||x.name};if(y.chunk_size&&x.size>y.chunk_size&&(q.chunks||typeof(C)=="string")){K=y.chunk_size;N=Math.ceil(x.size/K);M=Math.min(K,x.size-(F*K));if(typeof(C)=="string"){L=C.substring(F*K,F*K+M)}else{L=A(C,F*K,F*K+M)}O.chunk=F;O.chunks=N}else{M=x.size;L=C}if(v.settings.multipart&&q.multipart&&typeof(L)!=="string"&&k.FileReader&&q.cantSendBlobInFormData&&q.chunks&&v.settings.chunk_size){(function(){var
Q=new
FileReader();Q.onload=function(){I(Q.result);Q=null};Q.readAsBinaryString(L)}())}else{I(L)}}D()}B=d[x.id];if(q.jpgresize&&v.settings.resize&&/\.(png|jpg|jpeg)$/i.test(x.name)){e.call(v,x,v.settings.resize,/\.png$/i.test(x.name)?"image/png":"image/jpeg",function(C){if(C.success){x.size=C.data.length;z(C.data)}else{if(q.chunks){z(B)}else{n(B,z)}}})}else{if(!q.chunks&&q.jpgresize){n(B,z)}else{z(B)}}});s.bind("Destroy",function(v){var
x,y,w=m.body,z={inputContainer:v.id+"_html5_container",inputFile:v.id+"_html5",browseButton:v.settings.browse_button,dropElm:v.settings.drop_element};for(x
in
z){y=m.getElementById(z[x]);if(y){l.removeAllEvents(y,v.id)}}l.removeAllEvents(m.body,v.id);if(v.settings.container){w=m.getElementById(v.settings.container)}w.removeChild(m.getElementById(z.inputContainer))});u({success:true})}});function
b(){var t=false,r;function u(w,y){var
v=t?0:-8*(y-1),z=0,x;for(x=0;x<y;x++){z|=(r.charCodeAt(w+x)<<Math.abs(v+x*8))}return
z}function q(x,v,w){var
w=arguments.length===3?w:r.length-v-1;r=r.substr(0,v)+x+r.substr(w+v)}function
s(w,x,z){var
A="",v=t?0:-8*(z-1),y;for(y=0;y<z;y++){A+=String.fromCharCode((x>>Math.abs(v+y*8))&255)}q(A,w,z)}return{II:function(v){if(v===g){return
t}else{t=v}},init:function(v){t=false;r=v},SEGMENT:function(v,x,w){switch(arguments.length){case
1:return r.substr(v,r.length-v-1);case 2:return r.substr(v,x);case
3:q(w,v,x);break;default:return r}},BYTE:function(v){return
u(v,1)},SHORT:function(v){return
u(v,2)},LONG:function(v,w){if(w===g){return
u(v,4)}else{s(v,w,4)}},SLONG:function(v){var
w=u(v,4);return(w>2147483647?w-4294967296:w)},STRING:function(v,w){var
x="";for(w+=v;v<w;v++){x+=String.fromCharCode(u(v,1))}return
x}}}function h(v){var
x={65505:{app:"EXIF",name:"APP1",signature:"Exif\0"},65506:{app:"ICC",name:"APP2",signature:"ICC_PROFILE\0"},65517:{app:"IPTC",name:"APP13",signature:"Photoshop
3.0\0"}},w=[],u,q,s=g,t=0,r;u=new
b();u.init(v);if(u.SHORT(0)!==65496){return}q=2;r=Math.min(1048576,v.length);while(q<=r){s=u.SHORT(q);if(s>=65488&&s<=65495){q+=2;continue}if(s===65498||s===65497){break}t=u.SHORT(q+2)+2;if(x[s]&&u.STRING(q+4,x[s].signature.length)===x[s].signature){w.push({hex:s,app:x[s].app.toUpperCase(),name:x[s].name.toUpperCase(),start:q,length:t,segment:u.SEGMENT(q,t)})}q+=t}u.init(null);return{headers:w,restore:function(B){u.init(B);var
z=new h(B);if(!z.headers){return false}for(var
A=z.headers.length;A>0;A--){var
C=z.headers[A-1];u.SEGMENT(C.start,C.length,"")}z.purge();q=u.SHORT(2)==65504?4+u.SHORT(4):2;for(var
A=0,y=w.length;A<y;A++){u.SEGMENT(q,0,w[A].segment);q+=w[A].length}return
u.SEGMENT()},get:function(A){var B=[];for(var
z=0,y=w.length;z<y;z++){if(w[z].app===A.toUpperCase()){B.push(w[z].segment)}}return
B},set:function(B,A){var
C=[];if(typeof(A)==="string"){C.push(A)}else{C=A}for(var
z=ii=0,y=w.length;z<y;z++){if(w[z].app===B.toUpperCase()){w[z].segment=C[ii];w[z].length=C[ii].length;ii++}if(ii>=C.length){break}}},purge:function(){w=[];u.init(null)}}}function
a(){var t,q,r={},w;t=new
b();q={tiff:{274:"Orientation",34665:"ExifIFDPointer",34853:"GPSInfoIFDPointer"},exif:{36864:"ExifVersion",40961:"ColorSpace",40962:"PixelXDimension",40963:"PixelYDimension",36867:"DateTimeOriginal",33434:"ExposureTime",33437:"FNumber",34855:"ISOSpeedRatings",37377:"ShutterSpeedValue",37378:"ApertureValue",37383:"MeteringMode",37384:"LightSource",37385:"Flash",41986:"ExposureMode",41987:"WhiteBalance",41990:"SceneCaptureType",41988:"DigitalZoomRatio",41992:"Contrast",41993:"Saturation",41994:"Sharpness"},gps:{0:"GPSVersionID",1:"GPSLatitudeRef",2:"GPSLatitude",3:"GPSLongitudeRef",4:"GPSLongitude"}};w={ColorSpace:{1:"sRGB",0:"Uncalibrated"},MeteringMode:{0:"Unknown",1:"Average",2:"CenterWeightedAverage",3:"Spot",4:"MultiSpot",5:"Pattern",6:"Partial",255:"Other"},LightSource:{1:"Daylight",2:"Fliorescent",3:"Tungsten",4:"Flash",9:"Fine
weather",10:"Cloudy
weather",11:"Shade",12:"Daylight fluorescent (D 5700 -
7100K)",13:"Day white fluorescent (N 4600
-5400K)",14:"Cool white fluorescent (W 3900 -
4500K)",15:"White fluorescent (WW 3200 -
3700K)",17:"Standard light A",18:"Standard light
B",19:"Standard light
C",20:"D55",21:"D65",22:"D75",23:"D50",24:"ISO
studio tungsten",255:"Other"},Flash:{0:"Flash did not
fire.",1:"Flash fired.",5:"Strobe return light not
detected.",7:"Strobe return light detected.",9:"Flash
fired, compulsory flash mode",13:"Flash fired, compulsory flash
mode, return light not detected",15:"Flash fired, compulsory
flash mode, return light detected",16:"Flash did not fire,
compulsory flash mode",24:"Flash did not fire, auto
mode",25:"Flash fired, auto mode",29:"Flash fired, auto
mode, return light not detected",31:"Flash fired, auto mode,
return light detected",32:"No flash function",65:"Flash
fired, red-eye reduction mode",69:"Flash fired, red-eye reduction
mode, return light not detected",71:"Flash fired, red-eye
reduction mode, return light detected",73:"Flash fired,
compulsory flash mode, red-eye reduction mode",77:"Flash fired,
compulsory flash mode, red-eye reduction mode, return light not
detected",79:"Flash fired, compulsory flash mode, red-eye
reduction mode, return light detected",89:"Flash fired, auto
mode, red-eye reduction mode",93:"Flash fired, auto mode, return
light not detected, red-eye reduction mode",95:"Flash fired, auto
mode, return light detected, red-eye reduction
mode"},ExposureMode:{0:"Auto exposure",1:"Manual
exposure",2:"Auto bracket"},WhiteBalance:{0:"Auto white
balance",1:"Manual white
balance"},SceneCaptureType:{0:"Standard",1:"Landscape",2:"Portrait",3:"Night
scene"},Contrast:{0:"Normal",1:"Soft",2:"Hard"},Saturation:{0:"Normal",1:"Low
saturation",2:"High
saturation"},Sharpness:{0:"Normal",1:"Soft",2:"Hard"},GPSLatitudeRef:{N:"North
latitude",S:"South latitude"},GPSLongitudeRef:{E:"East
longitude",W:"West longitude"}};function s(x,F){var
z=t.SHORT(x),C,I,J,E,D,y,A,G,H=[],B={};for(C=0;C<z;C++){A=y=x+12*C+2;J=F[t.SHORT(A)];if(J===g){continue}E=t.SHORT(A+=2);D=t.LONG(A+=2);A+=4;H=[];switch(E){case
1:case
7:if(D>4){A=t.LONG(A)+r.tiffHeader}for(I=0;I<D;I++){H[I]=t.BYTE(A+I)}break;case
2:if(D>4){A=t.LONG(A)+r.tiffHeader}B[J]=t.STRING(A,D-1);continue;case
3:if(D>2){A=t.LONG(A)+r.tiffHeader}for(I=0;I<D;I++){H[I]=t.SHORT(A+I*2)}break;case
4:if(D>1){A=t.LONG(A)+r.tiffHeader}for(I=0;I<D;I++){H[I]=t.LONG(A+I*4)}break;case
5:A=t.LONG(A)+r.tiffHeader;for(I=0;I<D;I++){H[I]=t.LONG(A+I*4)/t.LONG(A+I*4+4)}break;case
9:A=t.LONG(A)+r.tiffHeader;for(I=0;I<D;I++){H[I]=t.SLONG(A+I*4)}break;case
10:A=t.LONG(A)+r.tiffHeader;for(I=0;I<D;I++){H[I]=t.SLONG(A+I*4)/t.SLONG(A+I*4+4)}break;default:continue}G=(D==1?H[0]:H);if(w.hasOwnProperty(J)&&typeof
G!="object"){B[J]=w[J][G]}else{B[J]=G}}return B}function v(){var
y=g,x=r.tiffHeader;t.II(t.SHORT(x)==18761);if(t.SHORT(x+=2)!==42){return
false}r.IFD0=r.tiffHeader+t.LONG(x+=2);y=s(r.IFD0,q.tiff);r.exifIFD=("ExifIFDPointer"
in
y?r.tiffHeader+y.ExifIFDPointer:g);r.gpsIFD=("GPSInfoIFDPointer"
in y?r.tiffHeader+y.GPSInfoIFDPointer:g);return true}function u(z,x,C){var
E,B,A,D=0;if(typeof(x)==="string"){var
y=q[z.toLowerCase()];for(hex in
y){if(y[hex]===x){x=hex;break}}}E=r[z.toLowerCase()+"IFD"];B=t.SHORT(E);for(i=0;i<B;i++){A=E+12*i+2;if(t.SHORT(A)==x){D=A+8;break}}if(!D){return
false}t.LONG(D,C);return
true}return{init:function(x){r={tiffHeader:10};if(x===g||!x.length){return
false}t.init(x);if(t.SHORT(0)===65505&&t.STRING(4,5).toUpperCase()==="EXIF\0"){return
v()}return false},EXIF:function(){var
y;y=s(r.exifIFD,q.exif);if(y.ExifVersion&&l.typeOf(y.ExifVersion)==="array"){for(var
z=0,x="";z<y.ExifVersion.length;z++){x+=String.fromCharCode(y.ExifVersion[z])}y.ExifVersion=x}return
y},GPS:function(){var
x;x=s(r.gpsIFD,q.gps);if(x.GPSVersionID){x.GPSVersionID=x.GPSVersionID.join(".")}return
x},setExif:function(x,y){if(x!=="PixelXDimension"&&x!=="PixelYDimension"){return
false}return u("exif",x,y)},getBinary:function(){return
t.SEGMENT()}}}})(window,document,plupload);plupload/plupload.js000064400000027254151175232510010556
0ustar00/*1.5.7*/
(function(){var
f=0,k=[],m={},i={},a={"<":"lt",">":"gt","&":"amp",'"':"quot","'":"#39"},l=/[<>&\"\']/g,b,c=window.setTimeout,d={},e;function
h(){this.returnValue=false}function
j(){this.cancelBubble=true}(function(n){var
o=n.split(/,/),p,r,q;for(p=0;p<o.length;p+=2){q=o[p+1].split(/
/);for(r=0;r<q.length;r++){i[q[r]]=o[p]}}})("application/msword,doc
dot,application/pdf,pdf,application/pgp-signature,pgp,application/postscript,ps
ai eps,application/rtf,rtf,application/vnd.ms-excel,xls
xlb,application/vnd.ms-powerpoint,ppt pps
pot,application/zip,zip,application/x-shockwave-flash,swf
swfl,application/vnd.openxmlformats-officedocument.wordprocessingml.document,docx,application/vnd.openxmlformats-officedocument.wordprocessingml.template,dotx,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,xlsx,application/vnd.openxmlformats-officedocument.presentationml.presentation,pptx,application/vnd.openxmlformats-officedocument.presentationml.template,potx,application/vnd.openxmlformats-officedocument.presentationml.slideshow,ppsx,application/x-javascript,js,application/json,json,audio/mpeg,mpga
mpega mp2
mp3,audio/x-wav,wav,audio/mp4,m4a,image/bmp,bmp,image/gif,gif,image/jpeg,jpeg
jpg jpe,image/photoshop,psd,image/png,png,image/svg+xml,svg
svgz,image/tiff,tiff tif,text/plain,asc txt text diff log,text/html,htm
html xhtml,text/css,css,text/csv,csv,text/rtf,rtf,video/mpeg,mpeg mpg mpe
m2v,video/quicktime,qt
mov,video/mp4,mp4,video/x-m4v,m4v,video/x-flv,flv,video/x-ms-wmv,wmv,video/avi,avi,video/webm,webm,video/3gpp,3gp,video/3gpp2,3g2,video/vnd.rn-realvideo,rv,application/vnd.oasis.opendocument.formula-template,otf,application/octet-stream,exe");var
g={VERSION:"1.5.7",STOPPED:1,STARTED:2,QUEUED:1,UPLOADING:2,FAILED:4,DONE:5,GENERIC_ERROR:-100,HTTP_ERROR:-200,IO_ERROR:-300,SECURITY_ERROR:-400,INIT_ERROR:-500,FILE_SIZE_ERROR:-600,FILE_EXTENSION_ERROR:-601,IMAGE_FORMAT_ERROR:-700,IMAGE_MEMORY_ERROR:-701,IMAGE_DIMENSIONS_ERROR:-702,mimeTypes:i,ua:(function(){var
r=navigator,q=r.userAgent,s=r.vendor,o,n,p;o=/WebKit/.test(q);p=o&&s.indexOf("Apple")!==-1;n=window.opera&&window.opera.buildNumber;return{windows:navigator.platform.indexOf("Win")!==-1,android:/Android/.test(q),ie:!o&&!n&&(/MSIE/gi).test(q)&&(/Explorer/gi).test(r.appName),webkit:o,gecko:!o&&/Gecko/.test(q),safari:p,opera:!!n}}()),typeOf:function(n){return({}).toString.call(n).match(/\s([a-z|A-Z]+)/)[1].toLowerCase()},extend:function(n){g.each(arguments,function(o,p){if(p>0){g.each(o,function(r,q){n[q]=r})}});return
n},cleanName:function(n){var
o,p;p=[/[\300-\306]/g,"A",/[\340-\346]/g,"a",/\307/g,"C",/\347/g,"c",/[\310-\313]/g,"E",/[\350-\353]/g,"e",/[\314-\317]/g,"I",/[\354-\357]/g,"i",/\321/g,"N",/\361/g,"n",/[\322-\330]/g,"O",/[\362-\370]/g,"o",/[\331-\334]/g,"U",/[\371-\374]/g,"u"];for(o=0;o<p.length;o+=2){n=n.replace(p[o],p[o+1])}n=n.replace(/\s+/g,"_");n=n.replace(/[^a-z0-9_\-\.]+/gi,"");return
n},addRuntime:function(n,o){o.name=n;k[n]=o;k.push(o);return
o},guid:function(){var n=new
Date().getTime().toString(32),o;for(o=0;o<5;o++){n+=Math.floor(Math.random()*65535).toString(32)}return(g.guidPrefix||"p")+n+(f++).toString(32)},buildUrl:function(o,n){var
p="";g.each(n,function(r,q){p+=(p?"&":"")+encodeURIComponent(q)+"="+encodeURIComponent(r)});if(p){o+=(o.indexOf("?")>0?"&":"?")+p}return
o},each:function(q,r){var p,o,n;if(q){p=q.length;if(p===b){for(o in
q){if(q.hasOwnProperty(o)){if(r(q[o],o)===false){return}}}}else{for(n=0;n<p;n++){if(r(q[n],n)===false){return}}}}},formatSize:function(n){if(n===b||/\D/.test(n)){return
g.translate("N/A")}if(n>1073741824){return
Math.round(n/1073741824,1)+" GB"}if(n>1048576){return
Math.round(n/1048576,1)+" MB"}if(n>1024){return
Math.round(n/1024,1)+" KB"}return n+"
b"},getPos:function(o,s){var
t=0,r=0,v,u=document,p,q;o=o;s=s||u.body;function n(B){var
z,A,w=0,C=0;if(B){A=B.getBoundingClientRect();z=u.compatMode==="CSS1Compat"?u.documentElement:u.body;w=A.left+z.scrollLeft;C=A.top+z.scrollTop}return{x:w,y:C}}if(o&&o.getBoundingClientRect&&g.ua.ie&&(!u.documentMode||u.documentMode<8)){p=n(o);q=n(s);return{x:p.x-q.x,y:p.y-q.y}}v=o;while(v&&v!=s&&v.nodeType){t+=v.offsetLeft||0;r+=v.offsetTop||0;v=v.offsetParent}v=o.parentNode;while(v&&v!=s&&v.nodeType){t-=v.scrollLeft||0;r-=v.scrollTop||0;v=v.parentNode}return{x:t,y:r}},getSize:function(n){return{w:n.offsetWidth||n.clientWidth,h:n.offsetHeight||n.clientHeight}},parseSize:function(n){var
o;if(typeof(n)=="string"){n=/^([0-9]+)([mgk]?)$/.exec(n.toLowerCase().replace(/[^0-9mkg]/g,""));o=n[2];n=+n[1];if(o=="g"){n*=1073741824}if(o=="m"){n*=1048576}if(o=="k"){n*=1024}}return
n},xmlEncode:function(n){return
n?(""+n).replace(l,function(o){return
a[o]?"&"+a[o]+";":o}):n},toArray:function(p){var
o,n=[];for(o=0;o<p.length;o++){n[o]=p[o]}return
n},inArray:function(p,q){if(q){if(Array.prototype.indexOf){return
Array.prototype.indexOf.call(q,p)}for(var
n=0,o=q.length;n<o;n++){if(q[n]===p){return n}}}return
-1},addI18n:function(n){return g.extend(m,n)},translate:function(n){return
m[n]||n},isEmptyObj:function(n){if(n===b){return true}for(var o in
n){return false}return true},hasClass:function(p,o){var
n;if(p.className==""){return false}n=new
RegExp("(^|\\s+)"+o+"(\\s+|$)");return
n.test(p.className)},addClass:function(o,n){if(!g.hasClass(o,n)){o.className=o.className==""?n:o.className.replace(/\s+$/,"")+"
"+n}},removeClass:function(p,o){var n=new
RegExp("(^|\\s+)"+o+"(\\s+|$)");p.className=p.className.replace(n,function(r,q,s){return
q===" "&&s===" "?"
":""})},getStyle:function(o,n){if(o.currentStyle){return
o.currentStyle[n]}else{if(window.getComputedStyle){return
window.getComputedStyle(o,null)[n]}}},addEvent:function(s,n,t){var
r,q,p,o;o=arguments[3];n=n.toLowerCase();if(e===b){e="Plupload_"+g.guid()}if(s.addEventListener){r=t;s.addEventListener(n,r,false)}else{if(s.attachEvent){r=function(){var
u=window.event;if(!u.target){u.target=u.srcElement}u.preventDefault=h;u.stopPropagation=j;t(u)};s.attachEvent("on"+n,r)}}if(s[e]===b){s[e]=g.guid()}if(!d.hasOwnProperty(s[e])){d[s[e]]={}}q=d[s[e]];if(!q.hasOwnProperty(n)){q[n]=[]}q[n].push({func:r,orig:t,key:o})},removeEvent:function(s,n){var
q,t,p;if(typeof(arguments[2])=="function"){t=arguments[2]}else{p=arguments[2]}n=n.toLowerCase();if(s[e]&&d[s[e]]&&d[s[e]][n]){q=d[s[e]][n]}else{return}for(var
o=q.length-1;o>=0;o--){if(q[o].key===p||q[o].orig===t){if(s.removeEventListener){s.removeEventListener(n,q[o].func,false)}else{if(s.detachEvent){s.detachEvent("on"+n,q[o].func)}}q[o].orig=null;q[o].func=null;q.splice(o,1);if(t!==b){break}}}if(!q.length){delete
d[s[e]][n]}if(g.isEmptyObj(d[s[e]])){delete d[s[e]];try{delete
s[e]}catch(r){s[e]=b}}},removeAllEvents:function(o){var
n=arguments[1];if(o[e]===b||!o[e]){return}g.each(d[o[e]],function(q,p){g.removeEvent(o,p,n)})}};g.Uploader=function(r){var
o={},u,t=[],q,p=false;u=new
g.QueueProgress();r=g.extend({chunk_size:0,multipart:true,multi_selection:true,file_data_name:"file",filters:[]},r);function
s(){var
w,x=0,v;if(this.state==g.STARTED){for(v=0;v<t.length;v++){if(!w&&t[v].status==g.QUEUED){w=t[v];w.status=g.UPLOADING;if(this.trigger("BeforeUpload",w)){this.trigger("UploadFile",w)}}else{x++}}if(x==t.length){this.stop();this.trigger("UploadComplete",t)}}}function
n(){var
w,v;u.reset();for(w=0;w<t.length;w++){v=t[w];if(v.size!==b){u.size+=v.size;u.loaded+=v.loaded}else{u.size=b}if(v.status==g.DONE){u.uploaded++}else{if(v.status==g.FAILED){u.failed++}else{u.queued++}}}if(u.size===b){u.percent=t.length>0?Math.ceil(u.uploaded/t.length*100):0}else{u.bytesPerSec=Math.ceil(u.loaded/((+new
Date()-q||1)/1000));u.percent=u.size>0?Math.ceil(u.loaded/u.size*100):0}}g.extend(this,{state:g.STOPPED,runtime:"",features:{},files:t,settings:r,total:u,id:g.guid(),init:function(){var
A=this,B,x,w,z=0,y;if(typeof(r.preinit)=="function"){r.preinit(A)}else{g.each(r.preinit,function(D,C){A.bind(C,D)})}r.page_url=r.page_url||document.location.pathname.replace(/\/[^\/]+$/g,"/");if(!/^(\w+:\/\/|\/)/.test(r.url)){r.url=r.page_url+r.url}r.chunk_size=g.parseSize(r.chunk_size);r.max_file_size=g.parseSize(r.max_file_size);A.bind("FilesAdded",function(C,F){var
E,D,H=0,I,G=r.filters;if(G&&G.length){I=[];g.each(G,function(J){g.each(J.extensions.split(/,/),function(K){if(/^\s*\*\s*$/.test(K)){I.push("\\.*")}else{I.push("\\."+K.replace(new
RegExp("["+("/^$.*+?|()[]{}\\".replace(/./g,"\\$&"))+"]","g"),"\\$&"))}})});I=new
RegExp(I.join("|")+"$","i")}for(E=0;E<F.length;E++){D=F[E];D.loaded=0;D.percent=0;D.status=g.QUEUED;if(I&&!I.test(D.name)){C.trigger("Error",{code:g.FILE_EXTENSION_ERROR,message:g.translate("File
extension
error."),file:D});continue}if(D.size!==b&&D.size>r.max_file_size){C.trigger("Error",{code:g.FILE_SIZE_ERROR,message:g.translate("File
size
error."),file:D});continue}t.push(D);H++}if(H){c(function(){A.trigger("QueueChanged");A.refresh()},1)}else{return
false}});if(r.unique_names){A.bind("UploadFile",function(C,D){var
F=D.name.match(/\.([^.]+)$/),E="tmp";if(F){E=F[1]}D.target_name=D.id+"."+E})}A.bind("UploadProgress",function(C,D){D.percent=D.size>0?Math.ceil(D.loaded/D.size*100):100;n()});A.bind("StateChanged",function(C){if(C.state==g.STARTED){q=(+new
Date())}else{if(C.state==g.STOPPED){for(B=C.files.length-1;B>=0;B--){if(C.files[B].status==g.UPLOADING){C.files[B].status=g.QUEUED;n()}}}}});A.bind("QueueChanged",n);A.bind("Error",function(C,D){if(D.file){D.file.status=g.FAILED;n();if(C.state==g.STARTED){c(function(){s.call(A)},1)}}});A.bind("FileUploaded",function(C,D){D.status=g.DONE;D.loaded=D.size;C.trigger("UploadProgress",D);c(function(){s.call(A)},1)});if(r.runtimes){x=[];y=r.runtimes.split(/\s?,\s?/);for(B=0;B<y.length;B++){if(k[y[B]]){x.push(k[y[B]])}}}else{x=k}function
v(){var
F=x[z++],E,C,D;if(F){E=F.getFeatures();C=A.settings.required_features;if(C){C=C.split(",");for(D=0;D<C.length;D++){if(!E[C[D]]){v();return}}}F.init(A,function(G){if(G&&G.success){A.features=E;A.runtime=F.name;A.trigger("Init",{runtime:F.name});A.trigger("PostInit");A.refresh()}else{v()}})}else{A.trigger("Error",{code:g.INIT_ERROR,message:g.translate("Init
error.")})}}v();if(typeof(r.init)=="function"){r.init(A)}else{g.each(r.init,function(D,C){A.bind(C,D)})}},refresh:function(){this.trigger("Refresh")},start:function(){if(t.length&&this.state!=g.STARTED){this.state=g.STARTED;this.trigger("StateChanged");s.call(this)}},stop:function(){if(this.state!=g.STOPPED){this.state=g.STOPPED;this.trigger("CancelUpload");this.trigger("StateChanged")}},disableBrowse:function(){p=arguments[0]!==b?arguments[0]:true;this.trigger("DisableBrowse",p)},getFile:function(w){var
v;for(v=t.length-1;v>=0;v--){if(t[v].id===w){return
t[v]}}},removeFile:function(w){var
v;for(v=t.length-1;v>=0;v--){if(t[v].id===w.id){return
this.splice(v,1)[0]}}},splice:function(x,v){var
w;w=t.splice(x===b?0:x,v===b?t.length:v);this.trigger("FilesRemoved",w);this.trigger("QueueChanged");return
w},trigger:function(w){var
y=o[w.toLowerCase()],x,v;if(y){v=Array.prototype.slice.call(arguments);v[0]=this;for(x=0;x<y.length;x++){if(y[x].func.apply(y[x].scope,v)===false){return
false}}}return true},hasEventListener:function(v){return
!!o[v.toLowerCase()]},bind:function(v,x,w){var
y;v=v.toLowerCase();y=o[v]||[];y.push({func:x,scope:w||this});o[v]=y},unbind:function(v){v=v.toLowerCase();var
y=o[v],w,x=arguments[1];if(y){if(x!==b){for(w=y.length-1;w>=0;w--){if(y[w].func===x){y.splice(w,1);break}}}else{y=[]}if(!y.length){delete
o[v]}}},unbindAll:function(){var
v=this;g.each(o,function(x,w){v.unbind(w)})},destroy:function(){this.stop();this.trigger("Destroy");this.unbindAll()}})};g.File=function(q,o,p){var
n=this;n.id=q;n.name=o;n.size=p;n.loaded=0;n.percent=0;n.status=0};g.Runtime=function(){this.getFeatures=function(){};this.init=function(n,o){}};g.QueueProgress=function(){var
n=this;n.size=0;n.loaded=0;n.uploaded=0;n.failed=0;n.queued=0;n.percent=0;n.bytesPerSec=0;n.reset=function(){n.size=n.loaded=n.uploaded=n.failed=n.queued=n.percent=n.bytesPerSec=0}};g.runtimes={};window.plupload=g})();prettyphoto/css/index.html000064400000000054151175232510011733
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>prettyphoto/css/prettyPhoto.css000064400000046644151175232510013030
0ustar00div.pp_default .pp_top,div.pp_default .pp_top
.pp_middle,div.pp_default .pp_top .pp_left,div.pp_default .pp_top
.pp_right,div.pp_default .pp_bottom,div.pp_default .pp_bottom
.pp_left,div.pp_default .pp_bottom .pp_middle,div.pp_default .pp_bottom
.pp_right{height:13px}
div.pp_default .pp_top
.pp_left{background:url(../images/prettyPhoto/default/sprite.png) -78px
-93px no-repeat}
div.pp_default .pp_top
.pp_middle{background:url(../images/prettyPhoto/default/sprite_x.png) top
left repeat-x}
div.pp_default .pp_top
.pp_right{background:url(../images/prettyPhoto/default/sprite.png) -112px
-93px no-repeat}
div.pp_default .pp_content .ppt{color:#f8f8f8}
div.pp_default .pp_content_container
.pp_left{background:url(../images/prettyPhoto/default/sprite_y.png) -7px 0
repeat-y;padding-left:13px}
div.pp_default .pp_content_container
.pp_right{background:url(../images/prettyPhoto/default/sprite_y.png) top
right repeat-y;padding-right:13px}
div.pp_default
.pp_next:hover{background:url(../images/prettyPhoto/default/sprite_next.png)
center right no-repeat;cursor:pointer}
div.pp_default
.pp_previous:hover{background:url(../images/prettyPhoto/default/sprite_prev.png)
center left no-repeat;cursor:pointer}
div.pp_default
.pp_expand{background:url(../images/prettyPhoto/default/sprite.png) 0 -29px
no-repeat;cursor:pointer;width:28px;height:28px}
div.pp_default
.pp_expand:hover{background:url(../images/prettyPhoto/default/sprite.png) 0
-56px no-repeat;cursor:pointer}
div.pp_default
.pp_contract{background:url(../images/prettyPhoto/default/sprite.png) 0
-84px no-repeat;cursor:pointer;width:28px;height:28px}
div.pp_default
.pp_contract:hover{background:url(../images/prettyPhoto/default/sprite.png)
0 -113px no-repeat;cursor:pointer}
div.pp_default
.pp_close{width:30px;height:30px;background:url(../images/prettyPhoto/default/sprite.png)
2px 1px no-repeat;cursor:pointer}
div.pp_default .pp_gallery ul li
a{background:url(../images/prettyPhoto/default/default_thumb.png) center
center #f8f8f8;border:1px solid #aaa}
div.pp_default .pp_social{margin-top:7px}
div.pp_default .pp_gallery a.pp_arrow_previous,div.pp_default .pp_gallery
a.pp_arrow_next{position:static;left:auto}
div.pp_default .pp_nav .pp_play,div.pp_default .pp_nav
.pp_pause{background:url(../images/prettyPhoto/default/sprite.png) -51px
1px no-repeat;height:30px;width:30px}
div.pp_default .pp_nav .pp_pause{background-position:-51px -29px}
div.pp_default a.pp_arrow_previous,div.pp_default
a.pp_arrow_next{background:url(../images/prettyPhoto/default/sprite.png)
-31px -3px no-repeat;height:20px;width:20px;margin:4px 0 0}
div.pp_default a.pp_arrow_next{left:52px;background-position:-82px -3px}
div.pp_default .pp_content_container .pp_details{margin-top:5px}
div.pp_default
.pp_nav{clear:none;height:30px;width:110px;position:relative}
div.pp_default .pp_nav
.currentTextHolder{font-family:Georgia;font-style:italic;color:#999;font-size:11px;left:75px;line-height:25px;position:absolute;top:2px;margin:0;padding:0
0 0 10px}
div.pp_default .pp_close:hover,div.pp_default .pp_nav
.pp_play:hover,div.pp_default .pp_nav .pp_pause:hover,div.pp_default
.pp_arrow_next:hover,div.pp_default .pp_arrow_previous:hover{opacity:0.7}
div.pp_default
.pp_description{font-size:11px;font-weight:700;line-height:14px;margin:5px
50px 5px 0}
div.pp_default .pp_bottom
.pp_left{background:url(../images/prettyPhoto/default/sprite.png) -78px
-127px no-repeat}
div.pp_default .pp_bottom
.pp_middle{background:url(../images/prettyPhoto/default/sprite_x.png)
bottom left repeat-x}
div.pp_default .pp_bottom
.pp_right{background:url(../images/prettyPhoto/default/sprite.png) -112px
-127px no-repeat}
div.pp_default
.pp_loaderIcon{background:url(../images/prettyPhoto/default/loader.gif)
center center no-repeat}
div.light_rounded .pp_top
.pp_left{background:url(../images/prettyPhoto/light_rounded/sprite.png)
-88px -53px no-repeat}
div.light_rounded .pp_top
.pp_right{background:url(../images/prettyPhoto/light_rounded/sprite.png)
-110px -53px no-repeat}
div.light_rounded
.pp_next:hover{background:url(../images/prettyPhoto/default/sprite_next.png)
center right no-repeat;cursor:pointer}
div.light_rounded
.pp_previous:hover{background:url(../images/prettyPhoto/default/sprite_prev.png)
center left no-repeat;cursor:pointer}
div.light_rounded
.pp_expand{background:url(../images/prettyPhoto/light_rounded/sprite.png)
-31px -26px no-repeat;cursor:pointer}
div.light_rounded
.pp_expand:hover{background:url(../images/prettyPhoto/light_rounded/sprite.png)
-31px -47px no-repeat;cursor:pointer}
div.light_rounded
.pp_contract{background:url(../images/prettyPhoto/light_rounded/sprite.png)
0 -26px no-repeat;cursor:pointer}
div.light_rounded
.pp_contract:hover{background:url(../images/prettyPhoto/light_rounded/sprite.png)
0 -47px no-repeat;cursor:pointer}
div.light_rounded
.pp_close{width:75px;height:22px;background:url(../images/prettyPhoto/light_rounded/sprite.png)
-1px -1px no-repeat;cursor:pointer}
div.light_rounded .pp_nav
.pp_play{background:url(../images/prettyPhoto/light_rounded/sprite.png)
-1px -100px no-repeat;height:15px;width:14px}
div.light_rounded .pp_nav
.pp_pause{background:url(../images/prettyPhoto/light_rounded/sprite.png)
-24px -100px no-repeat;height:15px;width:14px}
div.light_rounded
.pp_arrow_previous{background:url(../images/prettyPhoto/light_rounded/sprite.png)
0 -71px no-repeat}
div.light_rounded
.pp_arrow_next{background:url(../images/prettyPhoto/light_rounded/sprite.png)
-22px -71px no-repeat}
div.light_rounded .pp_bottom
.pp_left{background:url(../images/prettyPhoto/light_rounded/sprite.png)
-88px -80px no-repeat}
div.light_rounded .pp_bottom
.pp_right{background:url(../images/prettyPhoto/light_rounded/sprite.png)
-110px -80px no-repeat}
div.dark_rounded .pp_top
.pp_left{background:url(../images/prettyPhoto/dark_rounded/sprite.png)
-88px -53px no-repeat}
div.dark_rounded .pp_top
.pp_right{background:url(../images/prettyPhoto/dark_rounded/sprite.png)
-110px -53px no-repeat}
div.dark_rounded .pp_content_container
.pp_left{background:url(../images/prettyPhoto/dark_rounded/contentPattern.png)
top left repeat-y}
div.dark_rounded .pp_content_container
.pp_right{background:url(../images/prettyPhoto/dark_rounded/contentPattern.png)
top right repeat-y}
div.dark_rounded
.pp_next:hover{background:url(../images/prettyPhoto/dark_rounded/btnNext.png)
center right no-repeat;cursor:pointer}
div.dark_rounded
.pp_previous:hover{background:url(../images/prettyPhoto/dark_rounded/btnPrevious.png)
center left no-repeat;cursor:pointer}
div.dark_rounded
.pp_expand{background:url(../images/prettyPhoto/dark_rounded/sprite.png)
-31px -26px no-repeat;cursor:pointer}
div.dark_rounded
.pp_expand:hover{background:url(../images/prettyPhoto/dark_rounded/sprite.png)
-31px -47px no-repeat;cursor:pointer}
div.dark_rounded
.pp_contract{background:url(../images/prettyPhoto/dark_rounded/sprite.png)
0 -26px no-repeat;cursor:pointer}
div.dark_rounded
.pp_contract:hover{background:url(../images/prettyPhoto/dark_rounded/sprite.png)
0 -47px no-repeat;cursor:pointer}
div.dark_rounded
.pp_close{width:75px;height:22px;background:url(../images/prettyPhoto/dark_rounded/sprite.png)
-1px -1px no-repeat;cursor:pointer}
div.dark_rounded .pp_description{margin-right:85px;color:#fff}
div.dark_rounded .pp_nav
.pp_play{background:url(../images/prettyPhoto/dark_rounded/sprite.png) -1px
-100px no-repeat;height:15px;width:14px}
div.dark_rounded .pp_nav
.pp_pause{background:url(../images/prettyPhoto/dark_rounded/sprite.png)
-24px -100px no-repeat;height:15px;width:14px}
div.dark_rounded
.pp_arrow_previous{background:url(../images/prettyPhoto/dark_rounded/sprite.png)
0 -71px no-repeat}
div.dark_rounded
.pp_arrow_next{background:url(../images/prettyPhoto/dark_rounded/sprite.png)
-22px -71px no-repeat}
div.dark_rounded .pp_bottom
.pp_left{background:url(../images/prettyPhoto/dark_rounded/sprite.png)
-88px -80px no-repeat}
div.dark_rounded .pp_bottom
.pp_right{background:url(../images/prettyPhoto/dark_rounded/sprite.png)
-110px -80px no-repeat}
div.dark_rounded
.pp_loaderIcon{background:url(../images/prettyPhoto/dark_rounded/loader.gif)
center center no-repeat}
div.dark_square .pp_left,div.dark_square .pp_middle,div.dark_square
.pp_right,div.dark_square .pp_content{background:#000}
div.dark_square .pp_description{color:#fff;margin:0 85px 0 0}
div.dark_square
.pp_loaderIcon{background:url(../images/prettyPhoto/dark_square/loader.gif)
center center no-repeat}
div.dark_square
.pp_expand{background:url(../images/prettyPhoto/dark_square/sprite.png)
-31px -26px no-repeat;cursor:pointer}
div.dark_square
.pp_expand:hover{background:url(../images/prettyPhoto/dark_square/sprite.png)
-31px -47px no-repeat;cursor:pointer}
div.dark_square
.pp_contract{background:url(../images/prettyPhoto/dark_square/sprite.png) 0
-26px no-repeat;cursor:pointer}
div.dark_square
.pp_contract:hover{background:url(../images/prettyPhoto/dark_square/sprite.png)
0 -47px no-repeat;cursor:pointer}
div.dark_square
.pp_close{width:75px;height:22px;background:url(../images/prettyPhoto/dark_square/sprite.png)
-1px -1px no-repeat;cursor:pointer}
div.dark_square .pp_nav{clear:none}
div.dark_square .pp_nav
.pp_play{background:url(../images/prettyPhoto/dark_square/sprite.png) -1px
-100px no-repeat;height:15px;width:14px}
div.dark_square .pp_nav
.pp_pause{background:url(../images/prettyPhoto/dark_square/sprite.png)
-24px -100px no-repeat;height:15px;width:14px}
div.dark_square
.pp_arrow_previous{background:url(../images/prettyPhoto/dark_square/sprite.png)
0 -71px no-repeat}
div.dark_square
.pp_arrow_next{background:url(../images/prettyPhoto/dark_square/sprite.png)
-22px -71px no-repeat}
div.dark_square
.pp_next:hover{background:url(../images/prettyPhoto/dark_square/btnNext.png)
center right no-repeat;cursor:pointer}
div.dark_square
.pp_previous:hover{background:url(../images/prettyPhoto/dark_square/btnPrevious.png)
center left no-repeat;cursor:pointer}
div.light_square
.pp_expand{background:url(../images/prettyPhoto/light_square/sprite.png)
-31px -26px no-repeat;cursor:pointer}
div.light_square
.pp_expand:hover{background:url(../images/prettyPhoto/light_square/sprite.png)
-31px -47px no-repeat;cursor:pointer}
div.light_square
.pp_contract{background:url(../images/prettyPhoto/light_square/sprite.png)
0 -26px no-repeat;cursor:pointer}
div.light_square
.pp_contract:hover{background:url(../images/prettyPhoto/light_square/sprite.png)
0 -47px no-repeat;cursor:pointer}
div.light_square
.pp_close{width:75px;height:22px;background:url(../images/prettyPhoto/light_square/sprite.png)
-1px -1px no-repeat;cursor:pointer}
div.light_square .pp_nav
.pp_play{background:url(../images/prettyPhoto/light_square/sprite.png) -1px
-100px no-repeat;height:15px;width:14px}
div.light_square .pp_nav
.pp_pause{background:url(../images/prettyPhoto/light_square/sprite.png)
-24px -100px no-repeat;height:15px;width:14px}
div.light_square
.pp_arrow_previous{background:url(../images/prettyPhoto/light_square/sprite.png)
0 -71px no-repeat}
div.light_square
.pp_arrow_next{background:url(../images/prettyPhoto/light_square/sprite.png)
-22px -71px no-repeat}
div.light_square
.pp_next:hover{background:url(../images/prettyPhoto/light_square/btnNext.png)
center right no-repeat;cursor:pointer}
div.light_square
.pp_previous:hover{background:url(../images/prettyPhoto/light_square/btnPrevious.png)
center left no-repeat;cursor:pointer}
div.facebook .pp_top
.pp_left{background:url(../images/prettyPhoto/facebook/sprite.png) -88px
-53px no-repeat}
div.facebook .pp_top
.pp_middle{background:url(../images/prettyPhoto/facebook/contentPatternTop.png)
top left repeat-x}
div.facebook .pp_top
.pp_right{background:url(../images/prettyPhoto/facebook/sprite.png) -110px
-53px no-repeat}
div.facebook .pp_content_container
.pp_left{background:url(../images/prettyPhoto/facebook/contentPatternLeft.png)
top left repeat-y}
div.facebook .pp_content_container
.pp_right{background:url(../images/prettyPhoto/facebook/contentPatternRight.png)
top right repeat-y}
div.facebook
.pp_expand{background:url(../images/prettyPhoto/facebook/sprite.png) -31px
-26px no-repeat;cursor:pointer}
div.facebook
.pp_expand:hover{background:url(../images/prettyPhoto/facebook/sprite.png)
-31px -47px no-repeat;cursor:pointer}
div.facebook
.pp_contract{background:url(../images/prettyPhoto/facebook/sprite.png) 0
-26px no-repeat;cursor:pointer}
div.facebook
.pp_contract:hover{background:url(../images/prettyPhoto/facebook/sprite.png)
0 -47px no-repeat;cursor:pointer}
div.facebook
.pp_close{width:22px;height:22px;background:url(../images/prettyPhoto/facebook/sprite.png)
-1px -1px no-repeat;cursor:pointer}
div.facebook .pp_description{margin:0 37px 0 0}
div.facebook
.pp_loaderIcon{background:url(../images/prettyPhoto/facebook/loader.gif)
center center no-repeat}
div.facebook
.pp_arrow_previous{background:url(../images/prettyPhoto/facebook/sprite.png)
0 -71px no-repeat;height:22px;margin-top:0;width:22px}
div.facebook .pp_arrow_previous.disabled{background-position:0
-96px;cursor:default}
div.facebook
.pp_arrow_next{background:url(../images/prettyPhoto/facebook/sprite.png)
-32px -71px no-repeat;height:22px;margin-top:0;width:22px}
div.facebook .pp_arrow_next.disabled{background-position:-32px
-96px;cursor:default}
div.facebook .pp_nav{margin-top:0}
div.facebook .pp_nav p{font-size:15px;padding:0 3px 0 4px}
div.facebook .pp_nav
.pp_play{background:url(../images/prettyPhoto/facebook/sprite.png) -1px
-123px no-repeat;height:22px;width:22px}
div.facebook .pp_nav
.pp_pause{background:url(../images/prettyPhoto/facebook/sprite.png) -32px
-123px no-repeat;height:22px;width:22px}
div.facebook
.pp_next:hover{background:url(../images/prettyPhoto/facebook/btnNext.png)
center right no-repeat;cursor:pointer}
div.facebook
.pp_previous:hover{background:url(../images/prettyPhoto/facebook/btnPrevious.png)
center left no-repeat;cursor:pointer}
div.facebook .pp_bottom
.pp_left{background:url(../images/prettyPhoto/facebook/sprite.png) -88px
-80px no-repeat}
div.facebook .pp_bottom
.pp_middle{background:url(../images/prettyPhoto/facebook/contentPatternBottom.png)
top left repeat-x}
div.facebook .pp_bottom
.pp_right{background:url(../images/prettyPhoto/facebook/sprite.png) -110px
-80px no-repeat}
div.pp_pic_holder a:focus{outline:none}
div.pp_overlay{background:#000;display:none;left:0;position:absolute;top:0;width:100%;z-index:9500}
div.pp_pic_holder{display:none;position:absolute;width:100px;z-index:10000}
.pp_content{height:40px;min-width:40px}
* html .pp_content{width:40px}
.pp_content_container{position:relative;text-align:left;width:100%}
.pp_content_container .pp_left{padding-left:20px}
.pp_content_container .pp_right{padding-right:20px}
.pp_content_container .pp_details{float:left;margin:10px 0 2px}
.pp_description{display:none;margin:0}
.pp_social{float:left;margin:0}
.pp_social .facebook{float:left;margin-left:5px;width:55px;overflow:hidden}
.pp_social .twitter{float:left}
.pp_nav{clear:right;float:left;margin:3px 10px 0 0}
.pp_nav p{float:left;white-space:nowrap;margin:2px 4px}
.pp_nav .pp_play,.pp_nav
.pp_pause{float:left;margin-right:4px;text-indent:-10000px}
a.pp_arrow_previous,a.pp_arrow_next{display:block;float:left;height:15px;margin-top:3px;overflow:hidden;text-indent:-10000px;width:14px}
.pp_hoverContainer{position:absolute;top:0;width:100%;z-index:2000}
.pp_gallery{display:none;left:50%;margin-top:-50px;position:absolute;z-index:10000}
.pp_gallery div{float:left;overflow:hidden;position:relative}
.pp_gallery
ul{float:left;height:35px;position:relative;white-space:nowrap;margin:0 0 0
5px;padding:0}
.pp_gallery ul a{border:1px rgba(0,0,0,0.5)
solid;display:block;float:left;height:33px;overflow:hidden}
.pp_gallery ul a img{border:0}
.pp_gallery li{display:block;float:left;margin:0 5px 0 0;padding:0}
.pp_gallery li.default
a{background:url(../images/prettyPhoto/facebook/default_thumbnail.gif) 0 0
no-repeat;display:block;height:33px;width:50px}
.pp_gallery .pp_arrow_previous,.pp_gallery
.pp_arrow_next{margin-top:7px!important}
a.pp_next{background:url(../images/prettyPhoto/default/sprite_next.png)
10000px 10000px
no-repeat;display:block;float:right;height:100%;text-indent:-10000px;width:49%}
a.pp_previous{background:url(../images/prettyPhoto/default/sprite_prev.png)
10000px 10000px
no-repeat;display:block;float:left;height:100%;text-indent:-10000px;width:49%}
a.pp_expand,a.pp_contract{cursor:pointer;display:none;height:20px;position:absolute;right:30px;text-indent:-10000px;top:10px;width:20px;z-index:20000}
a.pp_close{position:absolute;right:0;top:0;display:block;line-height:22px;text-indent:-10000px}
.pp_loaderIcon{display:block;height:24px;left:50%;position:absolute;top:50%;width:24px;margin:-12px
0 0 -12px}
#pp_full_res{line-height:1!important}
#pp_full_res .pp_inline{text-align:left}
#pp_full_res .pp_inline p{margin:0 0 15px}
div.ppt{color:#fff;display:none;font-size:17px;z-index:9999;margin:0 0 5px
15px}
div.pp_default .pp_content,div.light_rounded
.pp_content{background-color:#fff}
div.pp_default #pp_full_res .pp_inline,div.light_rounded .pp_content
.ppt,div.light_rounded #pp_full_res .pp_inline,div.light_square .pp_content
.ppt,div.light_square #pp_full_res .pp_inline,div.facebook .pp_content
.ppt,div.facebook #pp_full_res .pp_inline{color:#000}
div.pp_default .pp_gallery ul li a:hover,div.pp_default .pp_gallery ul
li.selected a,.pp_gallery ul a:hover,.pp_gallery li.selected
a{border-color:#fff}
div.pp_default .pp_details,div.light_rounded .pp_details,div.dark_rounded
.pp_details,div.dark_square .pp_details,div.light_square
.pp_details,div.facebook .pp_details{position:relative}
div.light_rounded .pp_top .pp_middle,div.light_rounded
.pp_content_container .pp_left,div.light_rounded .pp_content_container
.pp_right,div.light_rounded .pp_bottom .pp_middle,div.light_square
.pp_left,div.light_square .pp_middle,div.light_square
.pp_right,div.light_square .pp_content,div.facebook
.pp_content{background:#fff}
div.light_rounded .pp_description,div.light_square
.pp_description{margin-right:85px}
div.light_rounded .pp_gallery a.pp_arrow_previous,div.light_rounded
.pp_gallery a.pp_arrow_next,div.dark_rounded .pp_gallery
a.pp_arrow_previous,div.dark_rounded .pp_gallery
a.pp_arrow_next,div.dark_square .pp_gallery
a.pp_arrow_previous,div.dark_square .pp_gallery
a.pp_arrow_next,div.light_square .pp_gallery
a.pp_arrow_previous,div.light_square .pp_gallery
a.pp_arrow_next{margin-top:12px!important}
div.light_rounded .pp_arrow_previous.disabled,div.dark_rounded
.pp_arrow_previous.disabled,div.dark_square
.pp_arrow_previous.disabled,div.light_square
.pp_arrow_previous.disabled{background-position:0 -87px;cursor:default}
div.light_rounded .pp_arrow_next.disabled,div.dark_rounded
.pp_arrow_next.disabled,div.dark_square
.pp_arrow_next.disabled,div.light_square
.pp_arrow_next.disabled{background-position:-22px -87px;cursor:default}
div.light_rounded .pp_loaderIcon,div.light_square
.pp_loaderIcon{background:url(../images/prettyPhoto/light_rounded/loader.gif)
center center no-repeat}
div.dark_rounded .pp_top .pp_middle,div.dark_rounded
.pp_content,div.dark_rounded .pp_bottom
.pp_middle{background:url(../images/prettyPhoto/dark_rounded/contentPattern.png)
top left repeat}
div.dark_rounded .currentTextHolder,div.dark_square
.currentTextHolder{color:#c4c4c4}
div.dark_rounded #pp_full_res .pp_inline,div.dark_square #pp_full_res
.pp_inline{color:#fff}
.pp_top,.pp_bottom{height:20px;position:relative}
* html .pp_top,* html .pp_bottom{padding:0 20px}
.pp_top .pp_left,.pp_bottom
.pp_left{height:20px;left:0;position:absolute;width:20px}
.pp_top .pp_middle,.pp_bottom
.pp_middle{height:20px;left:20px;position:absolute;right:20px}
* html .pp_top .pp_middle,* html .pp_bottom
.pp_middle{left:0;position:static}
.pp_top .pp_right,.pp_bottom
.pp_right{height:20px;left:auto;position:absolute;right:0;top:0;width:20px}
.pp_fade,.pp_gallery li.default a
img{display:none}prettyphoto/images/index.html000064400000000054151175232510012410
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>prettyphoto/images/prettyPhoto/default/default_thumb.png000064400000003001151175232510017724
0ustar00�PNG
IHDR2!o�tEXtSoftwareAdobe
ImageReadyq�e<"iTXtXML:com.adobe.xmp<?xpacket
begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP
Core 5.0-c060 61.134777, 2010/02/12-17:32:00 "> <rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about=""
xmlns:xmp="http://ns.adobe.com/xap/1.0/"
xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/"
xmlns:stRef="http://ns.adobe.com/xap/1.0/sType/ResourceRef#"
xmp:CreatorTool="Adobe Photoshop CS5 Macintosh"
xmpMM:InstanceID="xmp.iid:D3B1BA623E8711E08E6F9312EF314E02"
xmpMM:DocumentID="xmp.did:D3B1BA633E8711E08E6F9312EF314E02">
<xmpMM:DerivedFrom
stRef:instanceID="xmp.iid:D3B1BA603E8711E08E6F9312EF314E02"
stRef:documentID="xmp.did:D3B1BA613E8711E08E6F9312EF314E02"/>
</rdf:Description> </rdf:RDF> </x:xmpmeta> <?xpacket
end="r"?>J�LuIDATx��Ɋ"A�۲��]q�D<�"}��C�
*��۸�7�C���e;x�?HUdD�_���t:}��������z�z�֛�,��l6�l6��W��b�Z].���Խ���tc��v�F#$��z�F����D��.�8-�V�
��~�I��M5�F�^����J"�l6��(q:������SU�D"a��䢵\.e9��^��5|�U"f
�J)���hM�S�韜D�P�L&�x<�vz��~���䎊>���J�r��ʘ`x��$ �P��U��+�ː�V�K(c��^����ݎZ��t�VK�R.�+
�l�O��*&,��g�l0!#7} �d2^�*�;�
Rs�/iZ�s�h�7�d2�����x��
u!D����'�l6SI��$�Z�X�8�L$�I����`
ʼn`B�K���r��
!j�ڤV���@
@f�-��LC&ϧ�pS���H��"�O�e2���
�g�|��v��X�乴~�`EIi4��y�.���tXE)Gzh��1Lp���`���Օ�����dC��!eN����S�8���htx�
�C�S����|�O�H!B���ӣ�fR�{�.�w@E�T���<$n�Gv~�O|�z~ 0�"�gl�IEND�B`�prettyphoto/images/prettyPhoto/default/loader.gif000064400000014273151175232510016345
0ustar00GIF89a�dfd���������|z|��̤�����trt��Ĝ����섆���Ԭ��lnl��������䄂���Ԭ�����ljl���������|~|��̤����tvt��Ĝ����쌊���ܴ��!�NETSCAPE2.0!� ,�@��"<���p�Z���0�<��s��
.�)���:�%���@˃H��5�#|��V[~tx~N�
M[}�pD�}[��$��g����$�#���O
$#n��O\KVu!Zg$C
��D$
�D
V�PG��A��� D*8 H��B��
J���@B.VH@(��,
!� ,�@��"<B�� �C��@<���p��%b��.O�����*�zHټ'BRRE]#���"]�
�QD_�_��D��
#O��j##��D���D�!�D�ʈ��Q
!P��$��ㄚ
�C$! ̄�"�:�h���}
p��
D�
J����b�} Qb9����@���Gِ
!� ,�ljl���������|~|��̤�����tvt��Ĝ����쌊���Ԭ��trt��������䄆������lnl��������䄂���̬����|z|��Ĥ����쌎���ܴ���N�"<@B��Њ�Ca(��|�D(I�!xh-p/�Y("."�j4`S
Q"SR�POT�#��C�$""PB�R��
aS�a!����D!��n�
�̻
���#�����!m���� D�##�Dꑸ0�ܦm��7e .@�`��
��2�� P��`8R�2l�
r����!� ,�@��"<p#*��¡�H�l6���Ө3�\�\��ґ
#F9�)p0��RZ(#q~a$
#S��#B
�$aRP"bb�~�
Cn�P�!
�D��n�!!���""���a
��R�"QP��% �aP�C%�_��`���! [��X�n�$�C�B����ѐ
"8X$AJ�,
P`�_!� ,�@��"<p*��F`(�P��BQ0�
��a�D(&3a'��������@0
A8�b�h-$
R$�!S�
!
�`� !%�QaD�a�����Bʗ�O�S�o�
%_P���%%O��D"B_��C�����O��R(@H���nBh�� �
p�@�〉�ĒP�$��
H|�
(4X9�B!� ,�ljl���������|~|��̤�����tvt��Ĝ����쌊���Ԭ��trt��������䄆������lnl��������䄂���̬����|z|��Ĥ����쌎���ܴ����N�"<4H���Њ�2 DX�FCm�Dh"��\� ��!��(B�|(��B��
HBT
#�p�$
S�!#p`paD�C$
Q��$$���ҕS��� ����P��! O���q��`���$�P`�k�B<IT`Æ�X�@�j6�i0"�G "����(d��/"2Pٲ��
!� ,�ljl���������|~|��̤�����tvt��Ĝ����쌊���Ԭ��trt��������䄆������lnl��������䄂���̬����|z|��Ĥ����쌎���ܴ����N�"<4.&B��Њ�2�("�@�``(C"�`�"�-c2��B
�r��a�!\��aS#$!R�D$$S�C�CQba
���p
��DS� ���a�� ��y#����O�PC� #pƯ ��`�^zTđ�xFX
�Ex�2���!Â�!.��BcG�B���jʁ$H�h�\�
!� ,�ljl���������|~|��̤�����tvt��Ĝ����쌊���Ԭ��trt��������䄆������lnl��������䄂���̬����|z|��Ĥ����쌎���ܴ����N�"�
E���2"@ %F
RP��"�C�j�"F`H�PH�!�5
�4cr�f.pQS_ !`SDSlmP�Q$
�D��D
������RĠ�l#P�l
O���
���a<�b�A �U��0FȐ�@B!0�j��,a�Ȉ'�4I9�b�~�(�I2��
A!� ,�@��"�@�N��i�B�Ԣ�8*��!�P�a�R*g��H$�=$���H��Z
HD5 rQS!## "S�!# �ano�$
�Q��%Eo�D$��D�aR������
��T#
�PS�!"w��PC�
F�nb���#v���@�Y@O�@\\�+<�у���;�Q���p�c'���'B���!� ,�ljl���������|~|��̤�����tvt��Ĝ����쌊���Ԭ��trt��������䄆������lnl��������䄂���̬����|z|��Ĥ����쌎���ܴ����N�"�d6�#���h%�J���E��QrIf
�"1$p�g4P.�H�=\
BR
_RD
���}"v�OmP#
�D��_#�#!�m�#Ȓ��Q!u���"�O�m����!��
��鵤����RB,"�s4X��C���!��-��ѡ��<|�b�M�0|PV+!� ,�@��"�,(�����e�%!�@��qF���8��n�JaH4R8�BS�!�J��z�hP�BR%$D$$
R�!"�$"_l_S
��mC��mD�_!t����S����"���Q##""O�� �ܭ�P�""��B���l���$�i�0"�ߊPp�?|
�朇/<���V�$�@��
!
tje!!� ,�@��"�,H�BD������I��>5
�P�j�eH4�H�F"0��c=<�$"BRFDR���m�"$s��mC
!�P�l�!
����S�
����
"���Q!"����%��O�}#k�^m%#�O%D�%�JhX
BB��F�� �a"�
�lA�T�!U�>
l9��N��!� ,�@��"�,
N�Ӑ����@jP(�B"�D���j-@ C���X��h8 L
�4"BRF {%^p�nR_ ���C%$"�`nP"��o�"�D�Q!����"�!���Q
��O�nO��S
}���B%!~#�%##_�АKC���&�@�
@@`�� +�RE �D 7�Kf
>|a����A!� ,�@��"�4��r�(-P�q@�R(�� u���P%HC�Q#Ѹ���QN��҅\r�GDz\DQjB"�Qi]"�}jiO%%
�"N�~DF~C��R���P�G���i�!N�~!
��
!$x�j
� ��$]6`�
��R�>���� ��P`��6Pd��:tR
!2C�!� ,�ljl���������|~|��̤�����tvt��Ĝ����쌊���Ԭ��trt��������䄆������lnl��������䄂���̬����|z|��Ĥ����쌎���ܴ���N�"�B��
� ��h�H*���}R��Q�B����"�Xكe�1��PZ 56hz|RB ^g{]w IPP�D##��D �|g]Q�
�������g$$
h�hQ
{O{$�دB $CD��
#]�T"DP�Ձ|h�
B@C"tDd�4��6f6p�1
U!� ,�ljl���������|~|��̤�����tvt��Ĝ����쌊���Ԭ��trt��������䄆������lnl��������䄂���̬����|z|��Ĥ����쌎���ܴ����N�"B�b*+P�ḔH2��aHtNC��u0I�ީ�()�a��qʡ�àA�,*[Q�B#�x\x���rwO
�]D�x������ ��#��Q ��!
vQw#g�N�$��B$C� �xx$$�r`
p�0�
&0�!
�D���"�A�݆9@�A@hP�R!� ,�@��""�Bt(-P��\,$�EZ<��H�D�,�DK墝���t.B-��\QR_
�Q|i
!RB\�OR��
��h�$��Q
���h" C�� m�N� !�v C��%%���7"C-p(��>0�`
C!�P��C4�((��!B��J���'T��Z�
!� ,�@��"<=���ȴ8=�͢(�.D�'QX�:H�A�Xh�OO�rAL��D�tlD��ܚ5Y}�B$
i��$"�B[iC
$��CO
Z�Z��$��}�#�}�%L��
#o�G� ��� {#Y�D0`����(�
�J�P��(0СB)h�@�!:tt@�Q����D���;prettyphoto/images/prettyPhoto/default/sprite.png000064400000015032151175232510016416
0ustar00�PNG
IHDR��B���tEXtSoftwareAdobe
ImageReadyq�e<fiTXtXML:com.adobe.xmp<?xpacket
begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP
Core 5.0-c060 61.134777, 2010/02/12-17:32:00 "> <rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about=""
xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/"
xmlns:stRef="http://ns.adobe.com/xap/1.0/sType/ResourceRef#"
xmlns:xmp="http://ns.adobe.com/xap/1.0/"
xmpMM:OriginalDocumentID="xmp.did:01801174072068118BF2F6B511368090"
xmpMM:DocumentID="xmp.did:275503303E8511E08E6F9312EF314E02"
xmpMM:InstanceID="xmp.iid:24283CC43E8311E08E6F9312EF314E02"
xmp:CreatorTool="Adobe Photoshop CS5 Macintosh">
<xmpMM:DerivedFrom
stRef:instanceID="xmp.iid:03801174072068118BF2F6B511368090"
stRef:documentID="xmp.did:01801174072068118BF2F6B511368090"/>
</rdf:Description> </rdf:RDF> </x:xmpmeta> <?xpacket
end="r"?>�GIJIDATx��]pE���Wc ��0
Ȋ`I�2�z7�E��
��K|k|�R���|\ETJ���
p�,�^$��Hx$��DH$��ϝ̙�3'��93鯪�$3�s�������Ӟ��"f�����QQQc��çz<�:t5}^���TJ�J�{���x��!(((0%��+�
7�`K��=��ߣ�gϞ��ԩӒ�������;]v�e,22R*�A�����BYP�^.//k������-��o߾��V�}��5;0b�Ϟ={�R笻��+����
F�Ej��18�?щ��լ����ܹsw&''��i��_�*�nJζ��K�.>2Q9RdЕ�oP�0�(�,��/u�c�h5������z��H�n��ݻSB���L���)��z�ڀ�.�xϮ]���ٳ�+111R'*(�����aj{���m"_��ѣG�D�����8��*�ӡp�f�\֛��J%hk��e��s�λ��w��<A��b���:��/��A��u�m����V
A2�0��q?�8qbXZZZ��5Q'R��6�&��(��
��]WW�Μ9�v����f��4o߾�2�(f�d�馛4�߹sg@�s��X�m^װr����7H�Vwot����Ğ䓗���� �NM���L�諯��!��С�t�,��7��������z��ȰT&R���!+�<��Г�6j�(Ͻ��;�L��
h[7�a0��6o�<H�ӧO���:�L����9\�kQu��2i�s�֭-�umV�^^E@�Fd������,��Ȍϖ�K���]���ݻw�O3���Z�A]�����^`Ǐo�LIIIa6�c��6|�ڵ�i^}Eź�cN�t�RF����_~�����+��ɓ�u�Gb�>VK@)t>�\
>ע����fdB���ٓO>��|�MI���'�U��bhz4��S���o�����_�3�<#=t٤��^{��:u�eee�֕��!k֬�1j'c4�ob�j������^z��8�.�z
320��֧�~�eggKA�?��d(�Y��4�ǖ!�F�/F��㏳��{�ѵ��g����O>��P���~�8����J��!�q�#s�Y��l����СC�h���r�5*��W&�l
..�]�x�m۶���g_�����!��<H0�KL�>�]{�f���<��x�F8�~�ػ�+��l�2ƣ�|���4���-�<{hR�'}�+�~���죏>�F�M�{��B
y6�Gm�Ȥu/$��
6��?��M�6M7��!��<�WX�%K�����K
�Ty��#\z�h�����
�'8iii~��?D��4�C�#Q��@�
��h�j٤z��S32�}/�b�dҕG��{���in#yl�,R�O_�p��EL��Z���˒��(ڰ.�____�q���G��r`�`;vL�G�ѵTwB}ܬLZ@
x���#GJ�ǃ5+��<j���O�||��(�'�����ڃ�Ν3�4���{N2op3g�d�}���p^�u6g�Ce�����~P�i�SG��̙3�\���A�/}衇�
��h�{��̌Ljt�ؑ%''�[o�U���o�^�!��<Z
���*���Bx����vTVV6E�y6��>�y��K��ٳgѩ�͟?��J�Ɵ�9Woچ���
�u
�����ɌLJ�5j[�p���(F�td2�2@�ĭ�Iy�D�Wȴ�Q�B8=̛7O~X� ��l�~L+�� ��|Y�f�������]^^���0�pK�㨃�������<X�m�ĉ�<x`Ɗ��d(d�,zr�c%Ny]^��&��F��ܹ�n����.�h��8��c�i�#�y����{��<AQQ�c�~A�ҭf�N%�Q�����"�� @�a��0$��#�U�X ��@iT\\\r�-��I�v�V��6�9�SEE��b�E,��v��QMV��\�X��E��e��~
�KJJf.Z��r�c2��,�)� �,������g*9W]u�%E
�lJJJ:L��JZ�)bk�1TUUA�+7oޜN�^�a��m���?ѧO�|zhדɍ�u�=��X�FJ���ڵk�tZ���C����$���"E��J>��Lڸq��>���y�7_@�QtKSw�С�L\�`A�,���ݸq#|4�_�lٲ���I�����a��4z�!?�ק�zj�|�z�����DzZ&�&�;��X��m y=�<*�a��ٴi�tb������)�<=p���駟�C�>�4���,������&M
�c̽"��S����t^�z�r=��X&�[��oz���_\`�"L��1!B�hL�}�ݷ<++���wiz�M2��.��a�CKa�/_�ߟ�+��ɑ����ԋ���"��$wT�|�َ�D�����ߨxȺ��j�7���Af�#kqE��))))ؙB>60r 0�|�7��H�`:E�E�M��_4��6�6�Me�;R��5�),�XCY,�n�9��zd�I�;vl�m��vklll*;qTh4u��$��Suuu_�4m뫯��?�Y++��
k��2�Z&�T��dE���"\&��E W�8n�.�J��)�@�X���5xM��<��"����{��d�ɴ�ij��E[��TEc�5�>j�����r4��C�aC�AeC���`C;6F&�FE��
��A�����B6��"�9����k�����aP����l%hk��e�ޕ��W�l߾�4����L �4..�Sǎ7dgg�K8�d:v�X�z��+,B0��V!�lhG*B���V��`���G`*�&L`�L�ս��������k@y��a���
=��"�P&��g�e����˗Kt3�*..f �R���eJJJ�S&k;�s�#0s(�b�q�s999lРA�5(�����64�g
�`��q
=t�P)�����L�+�Y�0�裏J��̯��6�en��L���I*?�O܄�L�+��9���{��%�3V������Jt7,�@vnѢE���j>��9� ���Z���ɖY��9�U@i�z;�nD�
�����b[n�ɤ7���"շY&[���
p�p{��wK�Pt�]w��eCkq�������������Z��`�d�"(��F˹a �#��ߖ�Z��걡�����-w*2Y�J�V�<y�b:f"��{L���=b�/���=t�Ж��L���!���9|�u�IdWLŐL)[�{A��b`N��c�lh�`�
�F�^�"2Y�f�Ø[#8��G`��N��Ȑ~
�x=��-��ħ��#��M�
�-�ES�a>s�o%p�s�=�%Ћ����-�fd�����J %d�v�1���L�O�+��߿ۊ+
�����$%��:�9��?��8to���Se�A.�
�^�v���x����#G�,��9�b�p%Y����!E{����-[���]�ٙ�7�I(��Lyyy�w�q�;f
`�bƕ����$�Kx����j҃sxƪU����h�\��亅)2��>===k���)..��5̬�LIII��C��-X�����
�T&�&7-L��蜕�u;M
ۂ9\gd
lX�j�L���^��*�
1�G��laC۴��V6�k(oÇ��
m�rvf�u�GR˙�A�>�X&R�ƺEt)oEEE#����ktt��|N�J_��h�F��>�\�pa��7�7d��:''�����`jO�7[歂�Ҕ7��|f;�� �L{��������0�0:�*���j�2n�v��̢[)o�7R���(_|��L��I��kd�`-x���U��S�J�\��N�|������ǍwP���#0zV&q`���;z(�ܹsun�(o��#z�R �o������r�3 7��\���ax�`5a���Sn
�^т��T%�Hs�"���p�&�V�@y�J���'�xB���=̭�]z�K<Y���x���������z���ܚG0�(�3���B
��bP�PR��7�+V��lp���;M>�(o-P3�0"W,��!.�N����n���R��a��شD%�
��G@�����@s�"�ð���Y��#�<"�%�7�t(Ð!C$��j��Fz���e�2e
�����;�q�2pt+=̕���:���?
Ł�F�����8�ʇ��O��.^��
�吷��0u�P��u�V�k�LyA�T�}���[)o�(�"�n�YZZ:�f
�E|�������t�Ν�͙33�P�Q��k��q�7��W~�Q�7�6P7P�,T�B��2�C���(((��h�?�5����аn�>
��"���(Іy�}�����*��>
x-��>
���f�DZhEO��ݟ�6�N/>yfbk���4�.nj`�7��n�:ͺ��D[<���B�ڇ�>M���1�����~��T���*�����v�5�QT��`�VL�&��:��Q�qA��C6,bMOO��)�r�ɣ�D;���r{5�5B�}TC�
���P/gS_��*��G�{��;H �ʀv�Q%�Q
����F�}t�"�vp�}!�Z�����9�3fL�o�1���!w���(
�OUTT���\����l�Ms[S\�}��3f̈����~��%C |/��5kV_3���>������ŋ�GFFv���.�n��p)�k@VQ�h��F�ڪU�|n0{�l�54~#�⧟~�6U�wCH�{�n�!�q˖-,11Q��E R� �ճ�=qi�t���
�
��q�G�������h#M\���@��G�<��Gl�ǕA/���N}Np����3�akq����,����x�:� ���(
)��>
��7z��8q��>��K��;�����6�Z[����V��gE��
��4i��>
Eh���؎A�#qSSSMo�'�B������G��\�P2DAAAwA�mNJPXX�;@&�����yx߾}�`B(�$X,6K( l��
�
\RA��ZA�0M�m�2���JE`*��F0���c�o%A��ҥ�l&�}mE�G��e ^F4/��Ǎ�
@��6�|c5p�y�y��� �`�(
у
��(��`B�:��bPg����
Jҫ� �G�u) �]��k�v6Ä��P% �*�
@�J��HH7���_��{[�=½hq#������8w��ff^9cP�X�F{"�:z�`D��p�A�zJ�',��Pj��:ӊ�H�ZdX5V���^I����šԞ�'O�F$X5VyL���^I�K�.���BM�X��'E�`KKK��,x�F�+��$XyV�^}<--��G���fI���(|/��@{�<�V=�h
շ�K���4@A}�� l�]���-H�-��g��3r�}��
���5��"��/����f�۶���*�إ�5
�S.[�F��$��+�#�999�RSS����P�J��A�#�
��Y@X/�%��*+�E�IEND�B`�prettyphoto/images/prettyPhoto/default/sprite_next.png000064400000002516151175232510017457
0ustar00�PNG
IHDR?�~�tEXtSoftwareAdobe
ImageReadyq�e<fiTXtXML:com.adobe.xmp<?xpacket
begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP
Core 5.0-c060 61.134777, 2010/02/12-17:32:00 "> <rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about=""
xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/"
xmlns:stRef="http://ns.adobe.com/xap/1.0/sType/ResourceRef#"
xmlns:xmp="http://ns.adobe.com/xap/1.0/"
xmpMM:OriginalDocumentID="xmp.did:07801174072068118BF2F6B511368090"
xmpMM:DocumentID="xmp.did:275503383E8511E08E6F9312EF314E02"
xmpMM:InstanceID="xmp.iid:275503373E8511E08E6F9312EF314E02"
xmp:CreatorTool="Adobe Photoshop CS5 Macintosh">
<xmpMM:DerivedFrom
stRef:instanceID="xmp.iid:07801174072068118BF2F6B511368090"
stRef:documentID="xmp.did:07801174072068118BF2F6B511368090"/>
</rdf:Description> </rdf:RDF> </x:xmpmeta> <?xpacket
end="r"?>F=�~IDATx��1k�@��$��!U0S3�F�B��_��@�N���B6����{�B�d��=���
u0����Q�w��9.�s�w���I��"�D?���0$z"z
��ۖ�&�D��T$ZR�!�̧?x�Tޏ/"`�@S�i�;�@܀4�<G�$�o�Sb�X`<�Z�²,�F#��f3��
ڷQa:���z=(��f� M���EГ����q�j5Ȳ�z��1�L���0�C���$�1C��i~W(������h�Rs�i
�uQ�TP���m��W��sx�ǜ�^�YV�N���OA�,˘Ci)��.��>?�ڶ�V��r��4/��8�']lV���%s�q�v<��
�
t�%U$�cj�7z��}q����̏�dq��'(IEND�B`�prettyphoto/images/prettyPhoto/default/sprite_prev.png000064400000002540151175232510017452
0ustar00�PNG
IHDR�e�tEXtSoftwareAdobe
ImageReadyq�e<fiTXtXML:com.adobe.xmp<?xpacket
begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP
Core 5.0-c060 61.134777, 2010/02/12-17:32:00 "> <rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about=""
xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/"
xmlns:stRef="http://ns.adobe.com/xap/1.0/sType/ResourceRef#"
xmlns:xmp="http://ns.adobe.com/xap/1.0/"
xmpMM:OriginalDocumentID="xmp.did:07801174072068118BF2F6B511368090"
xmpMM:DocumentID="xmp.did:D3B1BA5F3E8711E08E6F9312EF314E02"
xmpMM:InstanceID="xmp.iid:D3B1BA5E3E8711E08E6F9312EF314E02"
xmp:CreatorTool="Adobe Photoshop CS5 Macintosh">
<xmpMM:DerivedFrom
stRef:instanceID="xmp.iid:07801174072068118BF2F6B511368090"
stRef:documentID="xmp.did:07801174072068118BF2F6B511368090"/>
</rdf:Description> </rdf:RDF> </x:xmpmeta> <?xpacket
end="r"?>H�>�IDATx�엿j�Pƿ�AQ��<�Ppr�"��Q_�P��J1C��pt*��cɠD�C��'HLo-��{�����=��s�AV!x�G��͉��^
T*�t:ѶvO��
��ؘg�����gT�,aK�̶m��5uP���`0����t:(
t�����hI���l0�8�v��,�l<�C�e�����0,�K\.��g�;�V+��v6�N1�͐�d���}�v��\�9�C.��(�QF�*Y�R��J�R ��B8��^���zM��4MC�V��xD�X�n�����n�t���h�\.G?s7�L�5u��D:��b��~�G�Z��7��\�V���8N���XL�/���m����Y�§�+X'��1���;jj�? .��wy�IEND�B`�prettyphoto/images/prettyPhoto/default/sprite_x.png000064400000002111151175232510016737
0ustar00�PNG
IHDR�//��tEXtSoftwareAdobe
ImageReadyq�e<fiTXtXML:com.adobe.xmp<?xpacket
begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP
Core 5.0-c060 61.134777, 2010/02/12-17:32:00 "> <rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about=""
xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/"
xmlns:stRef="http://ns.adobe.com/xap/1.0/sType/ResourceRef#"
xmlns:xmp="http://ns.adobe.com/xap/1.0/"
xmpMM:OriginalDocumentID="xmp.did:01801174072068118BF2F6B511368090"
xmpMM:DocumentID="xmp.did:6FD77D8D3E6B11E08E6F9312EF314E02"
xmpMM:InstanceID="xmp.iid:6FD77D8C3E6B11E08E6F9312EF314E02"
xmp:CreatorTool="Adobe Photoshop CS5 Macintosh">
<xmpMM:DerivedFrom
stRef:instanceID="xmp.iid:03801174072068118BF2F6B511368090"
stRef:documentID="xmp.did:01801174072068118BF2F6B511368090"/>
</rdf:Description> </rdf:RDF> </x:xmpmeta> <?xpacket
end="r"?>�˛�yIDATx���A �T
�����] �{����B@�[ݽ̀B@!
��B@! ��B@! ��B@!
��B@<B��!���#��[��LUrIEND�B`�prettyphoto/images/prettyPhoto/default/sprite_y.png000064400000002212151175232510016742
0ustar00�PNG
IHDR=����ItEXtSoftwareAdobe
ImageReadyq�e<fiTXtXML:com.adobe.xmp<?xpacket
begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP
Core 5.0-c060 61.134777, 2010/02/12-17:32:00 "> <rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about=""
xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/"
xmlns:stRef="http://ns.adobe.com/xap/1.0/sType/ResourceRef#"
xmlns:xmp="http://ns.adobe.com/xap/1.0/"
xmpMM:OriginalDocumentID="xmp.did:01801174072068118BF2F6B511368090"
xmpMM:DocumentID="xmp.did:6FD77D953E6B11E08E6F9312EF314E02"
xmpMM:InstanceID="xmp.iid:6FD77D943E6B11E08E6F9312EF314E02"
xmp:CreatorTool="Adobe Photoshop CS5 Macintosh">
<xmpMM:DerivedFrom
stRef:instanceID="xmp.iid:05801174072068118BF2F6B511368090"
stRef:documentID="xmp.did:01801174072068118BF2F6B511368090"/>
</rdf:Description> </rdf:RDF> </x:xmpmeta> <?xpacket
end="r"?> �KJ�IDATx��ϱ
�0������\:#
�(D�}aYvuQUm,"�����-Vf^����h
�V��]�IEND�B`�prettyphoto/images/prettyPhoto/index.html000064400000000054151175232510014751
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>prettyphoto/index.html000064400000000054151175232510011143
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>prettyphoto/js/index.html000064400000000054151175232510011557
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>prettyphoto/js/jquery.prettyPhoto.js000064400000053061151175232520014006
0ustar00/*
------------------------------------------------------------------------
Class: prettyPhoto
Use: Lightbox clone for jQuery
Author: Stephane Caron (http://www.no-margin-for-errors.com)
Version: 3.1.5
-------------------------------------------------------------------------
*/
(function(e){function t(){var
e=location.href;hashtag=e.indexOf("#prettyPhoto")!==-1?decodeURI(e.substring(e.indexOf("#prettyPhoto")+1,e.length)):false;return
hashtag}function n(){if(typeof
theRel=="undefined")return;location.hash=theRel+"/"+rel_index+"/"}function
r(){if(location.href.indexOf("#prettyPhoto")!==-1)location.hash="prettyPhoto"}function
i(e,t){e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var
n="[\\?&]"+e+"=([^&#]*)";var r=new
RegExp(n);var i=r.exec(t);return
i==null?"":i[1]}e.prettyPhoto={version:"3.1.5"};e.fn.prettyPhoto=function(s){function
g(){e(".pp_loaderIcon").hide();projectedTop=scroll_pos["scrollTop"]+(d/2-a["containerHeight"]/2);if(projectedTop<0)projectedTop=0;$ppt.fadeTo(settings.animation_speed,1);$pp_pic_holder.find(".pp_content").animate({height:a["contentHeight"],width:a["contentWidth"]},settings.animation_speed);$pp_pic_holder.animate({top:projectedTop,left:v/2-a["containerWidth"]/2<0?0:v/2-a["containerWidth"]/2,width:a["containerWidth"]},settings.animation_speed,function(){$pp_pic_holder.find(".pp_hoverContainer,#fullResImage").height(a["height"]).width(a["width"]);$pp_pic_holder.find(".pp_fade").fadeIn(settings.animation_speed);if(isSet&&S(pp_images[set_position])=="image"){$pp_pic_holder.find(".pp_hoverContainer").show()}else{$pp_pic_holder.find(".pp_hoverContainer").hide()}if(settings.allow_expand){if(a["resized"]){e("a.pp_expand,a.pp_contract").show()}else{e("a.pp_expand").hide()}}if(settings.autoplay_slideshow&&!m&&!f)e.prettyPhoto.startSlideshow();settings.changepicturecallback();f=true});C();s.ajaxcallback()}function
y(t){$pp_pic_holder.find("#pp_full_res object,#pp_full_res
embed").css("visibility","hidden");$pp_pic_holder.find(".pp_fade").fadeOut(settings.animation_speed,function(){e(".pp_loaderIcon").show();t()})}function
b(t){t>1?e(".pp_nav").show():e(".pp_nav").hide()}function
w(e,t){resized=false;E(e,t);imageWidth=e,imageHeight=t;if((p>v||h>d)&&doresize&&settings.allow_resize&&!u){resized=true,fitting=false;while(!fitting){if(p>v){imageWidth=v-200;imageHeight=t/e*imageWidth}else
if(h>d){imageHeight=d-200;imageWidth=e/t*imageHeight}else{fitting=true}h=imageHeight,p=imageWidth}if(p>v||h>d){w(p,h)}E(imageWidth,imageHeight)}return{width:Math.floor(imageWidth),height:Math.floor(imageHeight),containerHeight:Math.floor(h),containerWidth:Math.floor(p)+settings.horizontal_padding*2,contentHeight:Math.floor(l),contentWidth:Math.floor(c),resized:resized}}function
E(t,n){t=parseFloat(t);n=parseFloat(n);$pp_details=$pp_pic_holder.find(".pp_details");$pp_details.width(t);detailsHeight=parseFloat($pp_details.css("marginTop"))+parseFloat($pp_details.css("marginBottom"));$pp_details=$pp_details.clone().addClass(settings.theme).width(t).appendTo(e("body")).css({position:"absolute",top:-1e4});detailsHeight+=$pp_details.height();detailsHeight=detailsHeight<=34?36:detailsHeight;$pp_details.remove();$pp_title=$pp_pic_holder.find(".ppt");$pp_title.width(t);titleHeight=parseFloat($pp_title.css("marginTop"))+parseFloat($pp_title.css("marginBottom"));$pp_title=$pp_title.clone().appendTo(e("body")).css({position:"absolute",top:-1e4});titleHeight+=$pp_title.height();$pp_title.remove();l=n+detailsHeight;c=t;h=l+titleHeight+$pp_pic_holder.find(".pp_top").height()+$pp_pic_holder.find(".pp_bottom").height();p=t}function
S(e){if(e.match(/youtube\.com\/watch/i)||e.match(/youtu\.be/i)){return"youtube"}else
if(e.match(/vimeo\.com/i)){return"vimeo"}else
if(e.match(/\b.mov\b/i)){return"quicktime"}else
if(e.match(/\b.swf\b/i)){return"flash"}else
if(e.match(/\biframe=true\b/i)){return"iframe"}else
if(e.match(/\bajax=true\b/i)){return"ajax"}else
if(e.match(/\bcustom=true\b/i)){return"custom"}else
if(e.substr(0,1)=="#"){return"inline"}else{return"image"}}function
x(){if(doresize&&typeof
$pp_pic_holder!="undefined"){scroll_pos=T();contentHeight=$pp_pic_holder.height(),contentwidth=$pp_pic_holder.width();projectedTop=d/2+scroll_pos["scrollTop"]-contentHeight/2;if(projectedTop<0)projectedTop=0;if(contentHeight>d)return;$pp_pic_holder.css({top:projectedTop,left:v/2+scroll_pos["scrollLeft"]-contentwidth/2})}}function
T(){if(self.pageYOffset){return{scrollTop:self.pageYOffset,scrollLeft:self.pageXOffset}}else
if(document.documentElement&&document.documentElement.scrollTop){return{scrollTop:document.documentElement.scrollTop,scrollLeft:document.documentElement.scrollLeft}}else
if(document.body){return{scrollTop:document.body.scrollTop,scrollLeft:document.body.scrollLeft}}}function
N(){d=e(window).height(),v=e(window).width();if(typeof
$pp_overlay!="undefined")$pp_overlay.height(e(document).height()).width(v)}function
C(){if(isSet&&settings.overlay_gallery&&S(pp_images[set_position])=="image"){itemWidth=52+5;navWidth=settings.theme=="facebook"||settings.theme=="pp_default"?50:30;itemsPerPage=Math.floor((a["containerWidth"]-100-navWidth)/itemWidth);itemsPerPage=itemsPerPage<pp_images.length?itemsPerPage:pp_images.length;totalPage=Math.ceil(pp_images.length/itemsPerPage)-1;if(totalPage==0){navWidth=0;$pp_gallery.find(".pp_arrow_next,.pp_arrow_previous").hide()}else{$pp_gallery.find(".pp_arrow_next,.pp_arrow_previous").show()}galleryWidth=itemsPerPage*itemWidth;fullGalleryWidth=pp_images.length*itemWidth;$pp_gallery.css("margin-left",-(galleryWidth/2+navWidth/2)).find("div:first").width(galleryWidth+5).find("ul").width(fullGalleryWidth).find("li.selected").removeClass("selected");goToPage=Math.floor(set_position/itemsPerPage)<totalPage?Math.floor(set_position/itemsPerPage):totalPage;e.prettyPhoto.changeGalleryPage(goToPage);$pp_gallery_li.filter(":eq("+set_position+")").addClass("selected")}else{$pp_pic_holder.find(".pp_content").unbind("mouseenter
mouseleave")}}function
k(t){if(settings.social_tools)facebook_like_link=settings.social_tools.replace("{location_href}",encodeURIComponent(location.href));settings.markup=settings.markup.replace("{pp_social}","");e("body").append(settings.markup);$pp_pic_holder=e(".pp_pic_holder"),$ppt=e(".ppt"),$pp_overlay=e("div.pp_overlay");if(isSet&&settings.overlay_gallery){currentGalleryPage=0;toInject="";for(var
n=0;n<pp_images.length;n++){if(!pp_images[n].match(/\b(jpg|jpeg|png|gif|webp)\b/gi)){classname="default";img_src=""}else{classname="";img_src=pp_images[n]}toInject+="<li
class='"+classname+"'><a
href='#'><img src='"+img_src+"'
width='50' alt=''
/></a></li>"}toInject=settings.gallery_markup.replace(/{gallery}/g,toInject);$pp_pic_holder.find("#pp_full_res").after(toInject);$pp_gallery=e(".pp_pic_holder
.pp_gallery"),$pp_gallery_li=$pp_gallery.find("li");$pp_gallery.find(".pp_arrow_next").click(function(){e.prettyPhoto.changeGalleryPage("next");e.prettyPhoto.stopSlideshow();return
false});$pp_gallery.find(".pp_arrow_previous").click(function(){e.prettyPhoto.changeGalleryPage("previous");e.prettyPhoto.stopSlideshow();return
false});$pp_pic_holder.find(".pp_content").hover(function(){$pp_pic_holder.find(".pp_gallery:not(.disabled)").fadeIn()},function(){$pp_pic_holder.find(".pp_gallery:not(.disabled)").fadeOut()});itemWidth=52+5;$pp_gallery_li.each(function(t){e(this).find("a").click(function(){e.prettyPhoto.changePage(t);e.prettyPhoto.stopSlideshow();return
false})})}if(settings.slideshow){$pp_pic_holder.find(".pp_nav").prepend('<a
href="#"
class="pp_play">Play</a>');$pp_pic_holder.find(".pp_nav
.pp_play").click(function(){e.prettyPhoto.startSlideshow();return
false})}$pp_pic_holder.attr("class","pp_pic_holder
"+settings.theme);$pp_overlay.css({opacity:0,height:e(document).height(),width:e(window).width()}).bind("click",function(){if(!settings.modal)e.prettyPhoto.close()});e("a.pp_close").bind("click",function(){e.prettyPhoto.close();return
false});if(settings.allow_expand){e("a.pp_expand").bind("click",function(t){if(e(this).hasClass("pp_expand")){e(this).removeClass("pp_expand").addClass("pp_contract");doresize=false}else{e(this).removeClass("pp_contract").addClass("pp_expand");doresize=true}y(function(){e.prettyPhoto.open()});return
false})}$pp_pic_holder.find(".pp_previous, .pp_nav
.pp_arrow_previous").bind("click",function(){e.prettyPhoto.changePage("previous");e.prettyPhoto.stopSlideshow();return
false});$pp_pic_holder.find(".pp_next, .pp_nav
.pp_arrow_next").bind("click",function(){e.prettyPhoto.changePage("next");e.prettyPhoto.stopSlideshow();return
false});x()}s=jQuery.extend({hook:"rel",animation_speed:"fast",ajaxcallback:function(){},slideshow:5e3,autoplay_slideshow:false,opacity:.8,show_title:true,allow_resize:true,allow_expand:true,default_width:500,default_height:344,counter_separator_label:"/",theme:"pp_default",horizontal_padding:20,hideflash:false,wmode:"opaque",autoplay:true,modal:false,deeplinking:true,overlay_gallery:true,overlay_gallery_max:30,keyboard_shortcuts:true,changepicturecallback:function(){},callback:function(){},ie6_fallback:true,markup:'<div
class="pp_pic_holder"> <div
class="ppt"> </div> <div
class="pp_top"> <div
class="pp_left"></div> <div
class="pp_middle"></div> <div
class="pp_right"></div> </div> <div
class="pp_content_container"> <div
class="pp_left"> <div class="pp_right">
<div class="pp_content"> <div
class="pp_loaderIcon"></div> <div
class="pp_fade"> <a href="#"
class="pp_expand" title="Expand the
image">Expand</a> <div
class="pp_hoverContainer"> <a
class="pp_next" href="#">next</a>
<a class="pp_previous"
href="#">previous</a> </div>
<div id="pp_full_res"></div>
<div class="pp_details"> <div
class="pp_nav"> <a href="#"
class="pp_arrow_previous">Previous</a> <p
class="currentTextHolder">0/0</p> <a
href="#" class="pp_arrow_next">Next</a>
</div> <p
class="pp_description"></p> <div
class="pp_social">{pp_social}</div> <a
class="pp_close" href="#">Close</a>
</div> </div> </div>
</div> </div> </div> <div
class="pp_bottom"> <div
class="pp_left"></div> <div
class="pp_middle"></div> <div
class="pp_right"></div> </div>
</div> <div
class="pp_overlay"></div>',gallery_markup:'<div
class="pp_gallery"> <a href="#"
class="pp_arrow_previous">Previous</a>
<div> <ul> {gallery}
</ul> </div> <a href="#"
class="pp_arrow_next">Next</a>
</div>',image_markup:'<img
id="fullResImage" src="{path}"
/>',flash_markup:'<object
classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
width="{width}" height="{height}"><param
name="wmode" value="{wmode}" /><param
name="allowfullscreen" value="true" /><param
name="allowscriptaccess" value="always" /><param
name="movie" value="{path}" /><embed
src="{path}" type="application/x-shockwave-flash"
allowfullscreen="true" allowscriptaccess="always"
width="{width}" height="{height}"
wmode="{wmode}"></embed></object>',quicktime_markup:'<object
classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
codebase="http://www.apple.com/qtactivex/qtplugin.cab"
height="{height}" width="{width}"><param
name="src" value="{path}"><param
name="autoplay" value="{autoplay}"><param
name="type" value="video/quicktime"><embed
src="{path}" height="{height}"
width="{width}" autoplay="{autoplay}"
type="video/quicktime"
pluginspage="http://www.apple.com/quicktime/download/"></embed></object>',iframe_markup:'<iframe
src ="{path}" width="{width}"
height="{height}"
frameborder="no"></iframe>',inline_markup:'<div
class="pp_inline">{content}</div>',custom_markup:"",social_tools:'<div
class="twitter"><a
href="http://twitter.com/share"
class="twitter-share-button"
data-count="none">Tweet</a><script
type="text/javascript"
src="http://platform.twitter.com/widgets.js"></script></div><div
class="facebook"><iframe
src="//www.facebook.com/plugins/like.php?locale=en_US&href={location_href}&layout=button_count&show_faces=true&width=500&action=like&font&colorscheme=light&height=23"
scrolling="no" frameborder="0" style="border:none;
overflow:hidden; width:500px; height:23px;"
allowTransparency="true"></iframe></div>'},s);var
o=this,u=false,a,f,l,c,h,p,d=e(window).height(),v=e(window).width(),m;doresize=true,scroll_pos=T();e(window).unbind("resize.prettyphoto").bind("resize.prettyphoto",function(){x();N()});if(s.keyboard_shortcuts){e(document).unbind("keydown.prettyphoto").bind("keydown.prettyphoto",function(t){if(typeof
$pp_pic_holder!="undefined"){if($pp_pic_holder.is(":visible")){switch(t.keyCode){case
37:e.prettyPhoto.changePage("previous");t.preventDefault();break;case
39:e.prettyPhoto.changePage("next");t.preventDefault();break;case
27:if(!settings.modal)e.prettyPhoto.close();t.preventDefault();break}}}})}e.prettyPhoto.initialize=function(){settings=s;if(settings.theme=="pp_default")settings.horizontal_padding=16;theRel=e(this).attr(settings.hook);galleryRegExp=/\[(?:.*)\]/;isSet=galleryRegExp.exec(theRel)?true:false;pp_images=isSet?jQuery.map(o,function(t,n){if(e(t).attr(settings.hook).indexOf(theRel)!=-1)return
e(t).attr("href")}):e.makeArray(e(this).attr("href"));pp_titles=isSet?jQuery.map(o,function(t,n){if(e(t).attr(settings.hook).indexOf(theRel)!=-1)return
e(t).find("img").attr("alt")?e(t).find("img").attr("alt"):""}):e.makeArray(e(this).find("img").attr("alt"));pp_descriptions=isSet?jQuery.map(o,function(t,n){if(e(t).attr(settings.hook).indexOf(theRel)!=-1)return
e(t).attr("title")?e(t).attr("title"):""}):e.makeArray(e(this).attr("title"));if(pp_images.length>settings.overlay_gallery_max)settings.overlay_gallery=false;set_position=jQuery.inArray(e(this).attr("href"),pp_images);rel_index=isSet?set_position:e("a["+settings.hook+"^='"+theRel+"']").index(e(this));k(this);if(settings.allow_resize)e(window).bind("scroll.prettyphoto",function(){x()});e.prettyPhoto.open();return
false};e.prettyPhoto.open=function(t){if(typeof
settings=="undefined"){settings=s;pp_images=e.makeArray(arguments[0]);pp_titles=arguments[1]?e.makeArray(arguments[1]):e.makeArray("");pp_descriptions=arguments[2]?e.makeArray(arguments[2]):e.makeArray("");isSet=pp_images.length>1?true:false;set_position=arguments[3]?arguments[3]:0;k(t.target)}if(settings.hideflash)e("object,embed,iframe[src*=youtube],iframe[src*=vimeo]").css("visibility","hidden");b(e(pp_images).length);e(".pp_loaderIcon").show();if(settings.deeplinking)n();if(settings.social_tools){facebook_like_link=settings.social_tools.replace("{location_href}",encodeURIComponent(location.href));$pp_pic_holder.find(".pp_social").html(facebook_like_link)}if($ppt.is(":hidden"))$ppt.css("opacity",0).show();$pp_overlay.show().fadeTo(settings.animation_speed,settings.opacity);$pp_pic_holder.find(".currentTextHolder").text(set_position+1+settings.counter_separator_label+e(pp_images).length);if(typeof
pp_descriptions[set_position]!="undefined"&&pp_descriptions[set_position]!=""){$pp_pic_holder.find(".pp_description").show().html(unescape(pp_descriptions[set_position]))}else{$pp_pic_holder.find(".pp_description").hide()}movie_width=parseFloat(i("width",pp_images[set_position]))?i("width",pp_images[set_position]):settings.default_width.toString();movie_height=parseFloat(i("height",pp_images[set_position]))?i("height",pp_images[set_position]):settings.default_height.toString();u=false;if(movie_height.indexOf("%")!=-1){movie_height=parseFloat(e(window).height()*parseFloat(movie_height)/100-150);u=true}if(movie_width.indexOf("%")!=-1){movie_width=parseFloat(e(window).width()*parseFloat(movie_width)/100-150);u=true}$pp_pic_holder.fadeIn(function(){settings.show_title&&pp_titles[set_position]!=""&&typeof
pp_titles[set_position]!="undefined"?$ppt.html(unescape(pp_titles[set_position])):$ppt.html(" ");imgPreloader="";skipInjection=false;switch(S(pp_images[set_position])){case"image":imgPreloader=new
Image;nextImage=new
Image;if(isSet&&set_position<e(pp_images).length-1)nextImage.src=pp_images[set_position+1];prevImage=new
Image;if(isSet&&pp_images[set_position-1])prevImage.src=pp_images[set_position-1];$pp_pic_holder.find("#pp_full_res")[0].innerHTML=settings.image_markup.replace(/{path}/g,pp_images[set_position]);imgPreloader.onload=function(){a=w(imgPreloader.width,imgPreloader.height);g()};imgPreloader.onerror=function(){alert("Image
cannot be loaded. Make sure the path is correct and image
exist.");e.prettyPhoto.close()};imgPreloader.src=pp_images[set_position];break;case"youtube":a=w(movie_width,movie_height);movie_id=i("v",pp_images[set_position]);if(movie_id==""){movie_id=pp_images[set_position].split("youtu.be/");movie_id=movie_id[1];if(movie_id.indexOf("?")>0)movie_id=movie_id.substr(0,movie_id.indexOf("?"));if(movie_id.indexOf("&")>0)movie_id=movie_id.substr(0,movie_id.indexOf("&"))}movie="http://www.youtube.com/embed/"+movie_id;i("rel",pp_images[set_position])?movie+="?rel="+i("rel",pp_images[set_position]):movie+="?rel=1";if(settings.autoplay)movie+="&autoplay=1";toInject=settings.iframe_markup.replace(/{width}/g,a["width"]).replace(/{height}/g,a["height"]).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,movie);break;case"vimeo":a=w(movie_width,movie_height);movie_id=pp_images[set_position];var
t=/http(s?):\/\/(www\.)?vimeo.com\/(\d+)/;var
n=movie_id.match(t);movie="http://player.vimeo.com/video/"+n[3]+"?title=0&byline=0&portrait=0";if(settings.autoplay)movie+="&autoplay=1;";vimeo_width=a["width"]+"/embed/?moog_width="+a["width"];toInject=settings.iframe_markup.replace(/{width}/g,vimeo_width).replace(/{height}/g,a["height"]).replace(/{path}/g,movie);break;case"quicktime":a=w(movie_width,movie_height);a["height"]+=15;a["contentHeight"]+=15;a["containerHeight"]+=15;toInject=settings.quicktime_markup.replace(/{width}/g,a["width"]).replace(/{height}/g,a["height"]).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,pp_images[set_position]).replace(/{autoplay}/g,settings.autoplay);break;case"flash":a=w(movie_width,movie_height);flash_vars=pp_images[set_position];flash_vars=flash_vars.substring(pp_images[set_position].indexOf("flashvars")+10,pp_images[set_position].length);filename=pp_images[set_position];filename=filename.substring(0,filename.indexOf("?"));toInject=settings.flash_markup.replace(/{width}/g,a["width"]).replace(/{height}/g,a["height"]).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,filename+"?"+flash_vars);break;case"iframe":a=w(movie_width,movie_height);frame_url=pp_images[set_position];frame_url=frame_url.substr(0,frame_url.indexOf("iframe")-1);toInject=settings.iframe_markup.replace(/{width}/g,a["width"]).replace(/{height}/g,a["height"]).replace(/{path}/g,frame_url);break;case"ajax":doresize=false;a=w(movie_width,movie_height);doresize=true;skipInjection=true;e.get(pp_images[set_position],function(e){toInject=settings.inline_markup.replace(/{content}/g,e);$pp_pic_holder.find("#pp_full_res")[0].innerHTML=toInject;g()});break;case"custom":a=w(movie_width,movie_height);toInject=settings.custom_markup;break;case"inline":myClone=e(pp_images[set_position]).clone().append('<br
clear="all"
/>').css({width:settings.default_width}).wrapInner('<div
id="pp_full_res"><div
class="pp_inline"></div></div>').appendTo(e("body")).show();doresize=false;a=w(e(myClone).width(),e(myClone).height());doresize=true;e(myClone).remove();toInject=settings.inline_markup.replace(/{content}/g,e(pp_images[set_position]).html());break}if(!imgPreloader&&!skipInjection){$pp_pic_holder.find("#pp_full_res")[0].innerHTML=toInject;g()}});return
false};e.prettyPhoto.changePage=function(t){currentGalleryPage=0;if(t=="previous"){set_position--;if(set_position<0)set_position=e(pp_images).length-1}else
if(t=="next"){set_position++;if(set_position>e(pp_images).length-1)set_position=0}else{set_position=t}rel_index=set_position;if(!doresize)doresize=true;if(settings.allow_expand){e(".pp_contract").removeClass("pp_contract").addClass("pp_expand")}y(function(){e.prettyPhoto.open()})};e.prettyPhoto.changeGalleryPage=function(e){if(e=="next"){currentGalleryPage++;if(currentGalleryPage>totalPage)currentGalleryPage=0}else
if(e=="previous"){currentGalleryPage--;if(currentGalleryPage<0)currentGalleryPage=totalPage}else{currentGalleryPage=e}slide_speed=e=="next"||e=="previous"?settings.animation_speed:0;slide_to=currentGalleryPage*itemsPerPage*itemWidth;$pp_gallery.find("ul").animate({left:-slide_to},slide_speed)};e.prettyPhoto.startSlideshow=function(){if(typeof
m=="undefined"){$pp_pic_holder.find(".pp_play").unbind("click").removeClass("pp_play").addClass("pp_pause").click(function(){e.prettyPhoto.stopSlideshow();return
false});m=setInterval(e.prettyPhoto.startSlideshow,settings.slideshow)}else{e.prettyPhoto.changePage("next")}};e.prettyPhoto.stopSlideshow=function(){$pp_pic_holder.find(".pp_pause").unbind("click").removeClass("pp_pause").addClass("pp_play").click(function(){e.prettyPhoto.startSlideshow();return
false});clearInterval(m);m=undefined};e.prettyPhoto.close=function(){if($pp_overlay.is(":animated"))return;e.prettyPhoto.stopSlideshow();$pp_pic_holder.stop().find("object,embed").css("visibility","hidden");e("div.pp_pic_holder,div.ppt,.pp_fade").fadeOut(settings.animation_speed,function(){e(this).remove()});$pp_overlay.fadeOut(settings.animation_speed,function(){if(settings.hideflash)e("object,embed,iframe[src*=youtube],iframe[src*=vimeo]").css("visibility","visible");e(this).remove();e(window).unbind("scroll.prettyphoto");r();settings.callback();doresize=true;f=false;delete
settings})};if(!pp_alreadyInitialized&&t()){pp_alreadyInitialized=true;hashIndex=t();hashRel=hashIndex;hashIndex=hashIndex.substring(hashIndex.indexOf("/")+1,hashIndex.length-1);hashRel=hashRel.substring(0,hashRel.indexOf("/"));setTimeout(function(){e("a["+s.hook+"^='"+hashRel+"']:eq("+hashIndex+")").trigger("click")},50)}return
this.unbind("click.prettyphoto").bind("click.prettyphoto",e.prettyPhoto.initialize)};})(jQuery);var
pp_alreadyInitialized=falseswiper/index.html000064400000000054151175232520010054
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>swiper/swiper.min.css000064400000052345151175232520010676
0ustar00/**
* Swiper 4.2.0
* Most modern mobile touch slider and framework with hardware accelerated
transitions
* http://www.idangero.us/swiper/
*
* Copyright 2014-2018 Vladimir Kharlampidi
*
* Released under the MIT License
*
* Released on: March 16, 2018
*/
.swiper-container{margin:0
auto;position:relative;overflow:hidden;list-style:none;padding:0;z-index:1}.swiper-container-no-flexbox
.swiper-slide{float:left}.swiper-container-vertical>.swiper-wrapper{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}.swiper-wrapper{position:relative;width:100%;height:100%;z-index:1;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-transition-property:-webkit-transform;transition-property:-webkit-transform;-o-transition-property:transform;transition-property:transform;transition-property:transform,-webkit-transform;-webkit-box-sizing:content-box;box-sizing:content-box}.swiper-container-android
.swiper-slide,.swiper-wrapper{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.swiper-container-multirow>.swiper-wrapper{-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}.swiper-container-free-mode>.swiper-wrapper{-webkit-transition-timing-function:ease-out;-o-transition-timing-function:ease-out;transition-timing-function:ease-out;margin:0
auto}.swiper-slide{-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;width:100%;height:100%;position:relative;-webkit-transition-property:-webkit-transform;transition-property:-webkit-transform;-o-transition-property:transform;transition-property:transform;transition-property:transform,-webkit-transform}.swiper-invisible-blank-slide{visibility:hidden}.swiper-container-autoheight,.swiper-container-autoheight
.swiper-slide{height:auto}.swiper-container-autoheight
.swiper-wrapper{-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;-webkit-transition-property:height,-webkit-transform;transition-property:height,-webkit-transform;-o-transition-property:transform,height;transition-property:transform,height;transition-property:transform,height,-webkit-transform}.swiper-container-3d{-webkit-perspective:1200px;perspective:1200px}.swiper-container-3d
.swiper-cube-shadow,.swiper-container-3d .swiper-slide,.swiper-container-3d
.swiper-slide-shadow-bottom,.swiper-container-3d
.swiper-slide-shadow-left,.swiper-container-3d
.swiper-slide-shadow-right,.swiper-container-3d
.swiper-slide-shadow-top,.swiper-container-3d
.swiper-wrapper{-webkit-transform-style:preserve-3d;transform-style:preserve-3d}.swiper-container-3d
.swiper-slide-shadow-bottom,.swiper-container-3d
.swiper-slide-shadow-left,.swiper-container-3d
.swiper-slide-shadow-right,.swiper-container-3d
.swiper-slide-shadow-top{position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none;z-index:10}.swiper-container-3d
.swiper-slide-shadow-left{background-image:-webkit-gradient(linear,right
top,left
top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,0)));background-image:-webkit-linear-gradient(right,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:-o-linear-gradient(right,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:linear-gradient(to
left,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-container-3d
.swiper-slide-shadow-right{background-image:-webkit-gradient(linear,left
top,right
top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,0)));background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:-o-linear-gradient(left,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:linear-gradient(to
right,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-container-3d
.swiper-slide-shadow-top{background-image:-webkit-gradient(linear,left
bottom,left
top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,0)));background-image:-webkit-linear-gradient(bottom,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:-o-linear-gradient(bottom,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:linear-gradient(to
top,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-container-3d
.swiper-slide-shadow-bottom{background-image:-webkit-gradient(linear,left
top,left
bottom,from(rgba(0,0,0,.5)),to(rgba(0,0,0,0)));background-image:-webkit-linear-gradient(top,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:-o-linear-gradient(top,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:linear-gradient(to
bottom,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-container-wp8-horizontal,.swiper-container-wp8-horizontal>.swiper-wrapper{-ms-touch-action:pan-y;touch-action:pan-y}.swiper-container-wp8-vertical,.swiper-container-wp8-vertical>.swiper-wrapper{-ms-touch-action:pan-x;touch-action:pan-x}.swiper-button-next,.swiper-button-prev{position:absolute;top:50%;width:27px;height:44px;margin-top:-22px;z-index:10;cursor:pointer;background-size:27px
44px;background-position:center;background-repeat:no-repeat}.swiper-button-next.swiper-button-disabled,.swiper-button-prev.swiper-button-disabled{opacity:.35;cursor:auto;pointer-events:none}.swiper-button-prev,.swiper-container-rtl
.swiper-button-next{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23007aff'%2F%3E%3C%2Fsvg%3E");left:10px;right:auto}.swiper-button-next,.swiper-container-rtl
.swiper-button-prev{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23007aff'%2F%3E%3C%2Fsvg%3E");right:10px;left:auto}.swiper-button-prev.swiper-button-white,.swiper-container-rtl
.swiper-button-next.swiper-button-white{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E")}.swiper-button-next.swiper-button-white,.swiper-container-rtl
.swiper-button-prev.swiper-button-white{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E")}.swiper-button-prev.swiper-button-black,.swiper-container-rtl
.swiper-button-next.swiper-button-black{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23000000'%2F%3E%3C%2Fsvg%3E")}.swiper-button-next.swiper-button-black,.swiper-container-rtl
.swiper-button-prev.swiper-button-black{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23000000'%2F%3E%3C%2Fsvg%3E")}.swiper-button-lock{display:none}.swiper-pagination{position:absolute;text-align:center;-webkit-transition:.3s
opacity;-o-transition:.3s opacity;transition:.3s
opacity;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);z-index:10}.swiper-pagination.swiper-pagination-hidden{opacity:0}.swiper-container-horizontal>.swiper-pagination-bullets,.swiper-pagination-custom,.swiper-pagination-fraction{bottom:10px;left:0;width:100%}.swiper-pagination-bullets-dynamic{overflow:hidden;font-size:0}.swiper-pagination-bullets-dynamic
.swiper-pagination-bullet{-webkit-transform:scale(.33);-ms-transform:scale(.33);transform:scale(.33);position:relative}.swiper-pagination-bullets-dynamic
.swiper-pagination-bullet-active{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}.swiper-pagination-bullets-dynamic
.swiper-pagination-bullet-active-main{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}.swiper-pagination-bullets-dynamic
.swiper-pagination-bullet-active-prev{-webkit-transform:scale(.66);-ms-transform:scale(.66);transform:scale(.66)}.swiper-pagination-bullets-dynamic
.swiper-pagination-bullet-active-prev-prev{-webkit-transform:scale(.33);-ms-transform:scale(.33);transform:scale(.33)}.swiper-pagination-bullets-dynamic
.swiper-pagination-bullet-active-next{-webkit-transform:scale(.66);-ms-transform:scale(.66);transform:scale(.66)}.swiper-pagination-bullets-dynamic
.swiper-pagination-bullet-active-next-next{-webkit-transform:scale(.33);-ms-transform:scale(.33);transform:scale(.33)}.swiper-pagination-bullet{width:8px;height:8px;display:inline-block;border-radius:100%;background:#000;opacity:.2}button.swiper-pagination-bullet{border:none;margin:0;padding:0;-webkit-box-shadow:none;box-shadow:none;-webkit-appearance:none;-moz-appearance:none;appearance:none}.swiper-pagination-clickable
.swiper-pagination-bullet{cursor:pointer}.swiper-pagination-bullet-active{opacity:1;background:#007aff}.swiper-container-vertical>.swiper-pagination-bullets{right:10px;top:50%;-webkit-transform:translate3d(0,-50%,0);transform:translate3d(0,-50%,0)}.swiper-container-vertical>.swiper-pagination-bullets
.swiper-pagination-bullet{margin:6px
0;display:block}.swiper-container-vertical>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic{top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);width:8px}.swiper-container-vertical>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic
.swiper-pagination-bullet{display:inline-block;-webkit-transition:.2s
top,.2s -webkit-transform;transition:.2s top,.2s
-webkit-transform;-o-transition:.2s transform,.2s top;transition:.2s
transform,.2s top;transition:.2s transform,.2s top,.2s
-webkit-transform}.swiper-container-horizontal>.swiper-pagination-bullets
.swiper-pagination-bullet{margin:0
4px}.swiper-container-horizontal>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic{left:50%;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);white-space:nowrap}.swiper-container-horizontal>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic
.swiper-pagination-bullet{-webkit-transition:.2s left,.2s
-webkit-transform;transition:.2s left,.2s
-webkit-transform;-o-transition:.2s transform,.2s left;transition:.2s
transform,.2s left;transition:.2s transform,.2s left,.2s
-webkit-transform}.swiper-container-horizontal.swiper-container-rtl>.swiper-pagination-bullets-dynamic
.swiper-pagination-bullet{-webkit-transition:.2s right,.2s
-webkit-transform;transition:.2s right,.2s
-webkit-transform;-o-transition:.2s transform,.2s right;transition:.2s
transform,.2s right;transition:.2s transform,.2s right,.2s
-webkit-transform}.swiper-pagination-progressbar{background:rgba(0,0,0,.25);position:absolute}.swiper-pagination-progressbar
.swiper-pagination-progressbar-fill{background:#007aff;position:absolute;left:0;top:0;width:100%;height:100%;-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0);-webkit-transform-origin:left
top;-ms-transform-origin:left top;transform-origin:left
top}.swiper-container-rtl .swiper-pagination-progressbar
.swiper-pagination-progressbar-fill{-webkit-transform-origin:right
top;-ms-transform-origin:right top;transform-origin:right
top}.swiper-container-horizontal>.swiper-pagination-progressbar{width:100%;height:4px;left:0;top:0}.swiper-container-vertical>.swiper-pagination-progressbar{width:4px;height:100%;left:0;top:0}.swiper-pagination-white
.swiper-pagination-bullet-active{background:#fff}.swiper-pagination-progressbar.swiper-pagination-white{background:rgba(255,255,255,.25)}.swiper-pagination-progressbar.swiper-pagination-white
.swiper-pagination-progressbar-fill{background:#fff}.swiper-pagination-black
.swiper-pagination-bullet-active{background:#000}.swiper-pagination-progressbar.swiper-pagination-black{background:rgba(0,0,0,.25)}.swiper-pagination-progressbar.swiper-pagination-black
.swiper-pagination-progressbar-fill{background:#000}.swiper-pagination-lock{display:none}.swiper-scrollbar{border-radius:10px;position:relative;-ms-touch-action:none;background:rgba(0,0,0,.1)}.swiper-container-horizontal>.swiper-scrollbar{position:absolute;left:1%;bottom:3px;z-index:50;height:5px;width:98%}.swiper-container-vertical>.swiper-scrollbar{position:absolute;right:3px;top:1%;z-index:50;width:5px;height:98%}.swiper-scrollbar-drag{height:100%;width:100%;position:relative;background:rgba(0,0,0,.5);border-radius:10px;left:0;top:0}.swiper-scrollbar-cursor-drag{cursor:move}.swiper-scrollbar-lock{display:none}.swiper-zoom-container{width:100%;height:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;text-align:center}.swiper-zoom-container>canvas,.swiper-zoom-container>img,.swiper-zoom-container>svg{max-width:100%;max-height:100%;-o-object-fit:contain;object-fit:contain}.swiper-slide-zoomed{cursor:move}.swiper-lazy-preloader{width:42px;height:42px;position:absolute;left:50%;top:50%;margin-left:-21px;margin-top:-21px;z-index:10;-webkit-transform-origin:50%;-ms-transform-origin:50%;transform-origin:50%;-webkit-animation:swiper-preloader-spin
1s steps(12,end) infinite;animation:swiper-preloader-spin 1s steps(12,end)
infinite}.swiper-lazy-preloader:after{display:block;content:'';width:100%;height:100%;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%20120%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20xmlns%3Axlink%3D'http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink'%3E%3Cdefs%3E%3Cline%20id%3D'l'%20x1%3D'60'%20x2%3D'60'%20y1%3D'7'%20y2%3D'27'%20stroke%3D'%236c6c6c'%20stroke-width%3D'11'%20stroke-linecap%3D'round'%2F%3E%3C%2Fdefs%3E%3Cg%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(30%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(60%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(90%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(120%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(150%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.37'%20transform%3D'rotate(180%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.46'%20transform%3D'rotate(210%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.56'%20transform%3D'rotate(240%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.66'%20transform%3D'rotate(270%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.75'%20transform%3D'rotate(300%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.85'%20transform%3D'rotate(330%2060%2C60)'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");background-position:50%;background-size:100%;background-repeat:no-repeat}.swiper-lazy-preloader-white:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%20120%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20xmlns%3Axlink%3D'http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink'%3E%3Cdefs%3E%3Cline%20id%3D'l'%20x1%3D'60'%20x2%3D'60'%20y1%3D'7'%20y2%3D'27'%20stroke%3D'%23fff'%20stroke-width%3D'11'%20stroke-linecap%3D'round'%2F%3E%3C%2Fdefs%3E%3Cg%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(30%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(60%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(90%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(120%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(150%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.37'%20transform%3D'rotate(180%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.46'%20transform%3D'rotate(210%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.56'%20transform%3D'rotate(240%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.66'%20transform%3D'rotate(270%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.75'%20transform%3D'rotate(300%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.85'%20transform%3D'rotate(330%2060%2C60)'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}@-webkit-keyframes
swiper-preloader-spin{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes
swiper-preloader-spin{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.swiper-container
.swiper-notification{position:absolute;left:0;top:0;pointer-events:none;opacity:0;z-index:-1000}.swiper-container-fade.swiper-container-free-mode
.swiper-slide{-webkit-transition-timing-function:ease-out;-o-transition-timing-function:ease-out;transition-timing-function:ease-out}.swiper-container-fade
.swiper-slide{pointer-events:none;-webkit-transition-property:opacity;-o-transition-property:opacity;transition-property:opacity}.swiper-container-fade
.swiper-slide .swiper-slide{pointer-events:none}.swiper-container-fade
.swiper-slide-active,.swiper-container-fade .swiper-slide-active
.swiper-slide-active{pointer-events:auto}.swiper-container-cube{overflow:visible}.swiper-container-cube
.swiper-slide{pointer-events:none;-webkit-backface-visibility:hidden;backface-visibility:hidden;z-index:1;visibility:hidden;-webkit-transform-origin:0
0;-ms-transform-origin:0 0;transform-origin:0
0;width:100%;height:100%}.swiper-container-cube .swiper-slide
.swiper-slide{pointer-events:none}.swiper-container-cube.swiper-container-rtl
.swiper-slide{-webkit-transform-origin:100% 0;-ms-transform-origin:100%
0;transform-origin:100% 0}.swiper-container-cube
.swiper-slide-active,.swiper-container-cube .swiper-slide-active
.swiper-slide-active{pointer-events:auto}.swiper-container-cube
.swiper-slide-active,.swiper-container-cube
.swiper-slide-next,.swiper-container-cube
.swiper-slide-next+.swiper-slide,.swiper-container-cube
.swiper-slide-prev{pointer-events:auto;visibility:visible}.swiper-container-cube
.swiper-slide-shadow-bottom,.swiper-container-cube
.swiper-slide-shadow-left,.swiper-container-cube
.swiper-slide-shadow-right,.swiper-container-cube
.swiper-slide-shadow-top{z-index:0;-webkit-backface-visibility:hidden;backface-visibility:hidden}.swiper-container-cube
.swiper-cube-shadow{position:absolute;left:0;bottom:0;width:100%;height:100%;background:#000;opacity:.6;-webkit-filter:blur(50px);filter:blur(50px);z-index:0}.swiper-container-flip{overflow:visible}.swiper-container-flip
.swiper-slide{pointer-events:none;-webkit-backface-visibility:hidden;backface-visibility:hidden;z-index:1}.swiper-container-flip
.swiper-slide .swiper-slide{pointer-events:none}.swiper-container-flip
.swiper-slide-active,.swiper-container-flip .swiper-slide-active
.swiper-slide-active{pointer-events:auto}.swiper-container-flip
.swiper-slide-shadow-bottom,.swiper-container-flip
.swiper-slide-shadow-left,.swiper-container-flip
.swiper-slide-shadow-right,.swiper-container-flip
.swiper-slide-shadow-top{z-index:0;-webkit-backface-visibility:hidden;backface-visibility:hidden}.swiper-container-coverflow
.swiper-wrapper{-ms-perspective:1200px}
/* Phoca Cart Brands Module */
/* Phoca Cart Product Scroller Module */
.swiper-container.ph-mod-brands-swiper-container,
.swiper-container.ph-mod-product-scroller-swiper-container {
/*margin: 1em auto;*/
}
.swiper-slide.ph-mod-brands-swiper-slide,
.swiper-slide.ph-mod-product-scroller-swiper-slide {}
.swiper-pagination.ph-mod-brands-swiper-pagination,
.swiper-pagination.ph-mod-product-scroller-swiper-pagination {
position: relative;
margin-top: 1em;
}
.swiper-button-next.ph-mod-brands-swiper-button-next,
.swiper-button-next.ph-mod-product-scroller-swiper-button-next {
float:right;
position: relative;
margin-right: -50px;
}
.swiper-button-prev.ph-mod-brands-swiper-button-prev,
.swiper-button-prev.ph-mod-product-scroller-swiper-button-prev {
float:left;
position: relative;
margin-left: -50px;
}
.swiper-button-prev:focus,
.swiper-button-next:focus {
outline: none;
}
.swiper-container .ph-brand-name {
text-align: center
}
.swiper-container .ph-brand-name img {
margin: 0 auto;
}
.swiper-container.ph-mod-brands-swiper-container .swiper-wrapper
.swiper-slide,
.swiper-container.ph-mod-product-scroller-swiper-container .swiper-wrapper
.swiper-slide {
height: auto;
display: flex;
margin-top:0;
margin-bottom:0;
}
.swiper-container.ph-mod-brands-swiper-container .swiper-wrapper
.swiper-slide .ph-item-box,
.swiper-container.ph-mod-product-scroller-swiper-container .swiper-wrapper
.swiper-slide .ph-item-box {
margin-left: auto;
margin-right: auto;
width: 100%;
padding: 10px;
}
.swiper-container.ph-mod-brands-swiper-container .swiper-wrapper
.swiper-slide .ph-item-box .ph-thumbnail,
.swiper-container.ph-mod-product-scroller-swiper-container .swiper-wrapper
.swiper-slide .ph-item-box .ph-thumbnail {
height: 100%;
display: flex;
flex-direction: column;
}
.swiper-container.ph-mod-brands-swiper-container .swiper-wrapper
.swiper-slide .ph-item-box .ph-thumbnail .caption,
.swiper-container.ph-mod-product-scroller-swiper-container .swiper-wrapper
.swiper-slide .ph-item-box .ph-thumbnail .caption {
height: 100%;
display: flex;
flex: 1;
flex-wrap: wrap;
flex-direction: column;
justify-content: flex-end;
}swiper/swiper.min.js000064400000351255151175232520010524 0ustar00/**
* Swiper 4.2.0
* Most modern mobile touch slider and framework with hardware accelerated
transitions
* http://www.idangero.us/swiper/
*
* Copyright 2014-2018 Vladimir Kharlampidi
*
* Released under the MIT License
*
* Released on: March 16, 2018
*/
!function(e,t){"object"==typeof
exports&&"undefined"!=typeof
module?module.exports=t():"function"==typeof
define&&define.amd?define(t):e.Swiper=t()}(this,function(){"use
strict";var e="undefined"==typeof
document?{body:{},addEventListener:function(){},removeEventListener:function(){},activeElement:{blur:function(){},nodeName:""},querySelector:function(){return
null},querySelectorAll:function(){return[]},getElementById:function(){return
null},createEvent:function(){return{initEvent:function(){}}},createElement:function(){return{children:[],childNodes:[],style:{},setAttribute:function(){},getElementsByTagName:function(){return[]}}},location:{hash:""}}:document,t="undefined"==typeof
window?{document:e,navigator:{userAgent:""},location:{},history:{},CustomEvent:function(){return
this},addEventListener:function(){},removeEventListener:function(){},getComputedStyle:function(){return{getPropertyValue:function(){return""}}},Image:function(){},Date:function(){},screen:{},setTimeout:function(){},clearTimeout:function(){}}:window,i=function(e){for(var
t=0;t<e.length;t+=1)this[t]=e[t];return
this.length=e.length,this};function s(s,a){var
r=[],n=0;if(s&&!a&&s instanceof i)return
s;if(s)if("string"==typeof s){var
o,l,d=s.trim();if(d.indexOf("<")>=0&&d.indexOf(">")>=0){var
h="div";for(0===d.indexOf("<li")&&(h="ul"),0===d.indexOf("<tr")&&(h="tbody"),0!==d.indexOf("<td")&&0!==d.indexOf("<th")||(h="tr"),0===d.indexOf("<tbody")&&(h="table"),0===d.indexOf("<option")&&(h="select"),(l=e.createElement(h)).innerHTML=d,n=0;n<l.childNodes.length;n+=1)r.push(l.childNodes[n])}else
for(o=a||"#"!==s[0]||s.match(/[
.<>:~]/)?(a||e).querySelectorAll(s.trim()):[e.getElementById(s.trim().split("#")[1])],n=0;n<o.length;n+=1)o[n]&&r.push(o[n])}else
if(s.nodeType||s===t||s===e)r.push(s);else
if(s.length>0&&s[0].nodeType)for(n=0;n<s.length;n+=1)r.push(s[n]);return
new i(r)}function a(e){for(var
t=[],i=0;i<e.length;i+=1)-1===t.indexOf(e[i])&&t.push(e[i]);return
t}s.fn=i.prototype,s.Class=i,s.Dom7=i;var r={addClass:function(e){if(void
0===e)return this;for(var t=e.split("
"),i=0;i<t.length;i+=1)for(var s=0;s<this.length;s+=1)void
0!==this[s].classList&&this[s].classList.add(t[i]);return
this},removeClass:function(e){for(var t=e.split("
"),i=0;i<t.length;i+=1)for(var s=0;s<this.length;s+=1)void
0!==this[s].classList&&this[s].classList.remove(t[i]);return
this},hasClass:function(e){return!!this[0]&&this[0].classList.contains(e)},toggleClass:function(e){for(var
t=e.split(" "),i=0;i<t.length;i+=1)for(var
s=0;s<this.length;s+=1)void
0!==this[s].classList&&this[s].classList.toggle(t[i]);return
this},attr:function(e,t){var
i=arguments;if(1===arguments.length&&"string"==typeof
e)return this[0]?this[0].getAttribute(e):void 0;for(var
s=0;s<this.length;s+=1)if(2===i.length)this[s].setAttribute(e,t);else
for(var a in e)this[s][a]=e[a],this[s].setAttribute(a,e[a]);return
this},removeAttr:function(e){for(var
t=0;t<this.length;t+=1)this[t].removeAttribute(e);return
this},data:function(e,t){var i;if(void 0!==t){for(var
s=0;s<this.length;s+=1)(i=this[s]).dom7ElementDataStorage||(i.dom7ElementDataStorage={}),i.dom7ElementDataStorage[e]=t;return
this}if(i=this[0]){if(i.dom7ElementDataStorage&&e in
i.dom7ElementDataStorage)return i.dom7ElementDataStorage[e];var
a=i.getAttribute("data-"+e);return a||void
0}},transform:function(e){for(var t=0;t<this.length;t+=1){var
i=this[t].style;i.webkitTransform=e,i.transform=e}return
this},transition:function(e){"string"!=typeof
e&&(e+="ms");for(var t=0;t<this.length;t+=1){var
i=this[t].style;i.webkitTransitionDuration=e,i.transitionDuration=e}return
this},on:function(){for(var
e,t=[],i=arguments.length;i--;)t[i]=arguments[i];var
a=t[0],r=t[1],n=t[2],o=t[3];function l(e){var t=e.target;if(t){var
i=e.target.dom7EventData||[];if(i.unshift(e),s(t).is(r))n.apply(t,i);else
for(var
a=s(t).parents(),o=0;o<a.length;o+=1)s(a[o]).is(r)&&n.apply(a[o],i)}}function
d(e){var
t=e&&e.target?e.target.dom7EventData||[]:[];t.unshift(e),n.apply(this,t)}"function"==typeof
t[1]&&(a=(e=t)[0],n=e[1],o=e[2],r=void 0),o||(o=!1);for(var
h,p=a.split(" "),c=0;c<this.length;c+=1){var
u=this[c];if(r)for(h=0;h<p.length;h+=1)u.dom7LiveListeners||(u.dom7LiveListeners=[]),u.dom7LiveListeners.push({type:a,listener:n,proxyListener:l}),u.addEventListener(p[h],l,o);else
for(h=0;h<p.length;h+=1)u.dom7Listeners||(u.dom7Listeners=[]),u.dom7Listeners.push({type:a,listener:n,proxyListener:d}),u.addEventListener(p[h],d,o)}return
this},off:function(){for(var
e,t=[],i=arguments.length;i--;)t[i]=arguments[i];var
s=t[0],a=t[1],r=t[2],n=t[3];"function"==typeof
t[1]&&(s=(e=t)[0],r=e[1],n=e[2],a=void 0),n||(n=!1);for(var
o=s.split(" "),l=0;l<o.length;l+=1)for(var
d=0;d<this.length;d+=1){var
h=this[d];if(a){if(h.dom7LiveListeners)for(var
p=0;p<h.dom7LiveListeners.length;p+=1)r?h.dom7LiveListeners[p].listener===r&&h.removeEventListener(o[l],h.dom7LiveListeners[p].proxyListener,n):h.dom7LiveListeners[p].type===o[l]&&h.removeEventListener(o[l],h.dom7LiveListeners[p].proxyListener,n)}else
if(h.dom7Listeners)for(var
c=0;c<h.dom7Listeners.length;c+=1)r?h.dom7Listeners[c].listener===r&&h.removeEventListener(o[l],h.dom7Listeners[c].proxyListener,n):h.dom7Listeners[c].type===o[l]&&h.removeEventListener(o[l],h.dom7Listeners[c].proxyListener,n)}return
this},trigger:function(){for(var
i=[],s=arguments.length;s--;)i[s]=arguments[s];for(var a=i[0].split("
"),r=i[1],n=0;n<a.length;n+=1)for(var
o=0;o<this.length;o+=1){var l=void 0;try{l=new
t.CustomEvent(a[n],{detail:r,bubbles:!0,cancelable:!0})}catch(t){(l=e.createEvent("Event")).initEvent(a[n],!0,!0),l.detail=r}this[o].dom7EventData=i.filter(function(e,t){return
t>0}),this[o].dispatchEvent(l),this[o].dom7EventData=[],delete
this[o].dom7EventData}return this},transitionEnd:function(e){var
t,i=["webkitTransitionEnd","transitionend"],s=this;function
a(r){if(r.target===this)for(e.call(this,r),t=0;t<i.length;t+=1)s.off(i[t],a)}if(e)for(t=0;t<i.length;t+=1)s.on(i[t],a);return
this},outerWidth:function(e){if(this.length>0){if(e){var
t=this.styles();return
this[0].offsetWidth+parseFloat(t.getPropertyValue("margin-right"))+parseFloat(t.getPropertyValue("margin-left"))}return
this[0].offsetWidth}return
null},outerHeight:function(e){if(this.length>0){if(e){var
t=this.styles();return
this[0].offsetHeight+parseFloat(t.getPropertyValue("margin-top"))+parseFloat(t.getPropertyValue("margin-bottom"))}return
this[0].offsetHeight}return
null},offset:function(){if(this.length>0){var
i=this[0],s=i.getBoundingClientRect(),a=e.body,r=i.clientTop||a.clientTop||0,n=i.clientLeft||a.clientLeft||0,o=i===t?t.scrollY:i.scrollTop,l=i===t?t.scrollX:i.scrollLeft;return{top:s.top+o-r,left:s.left+l-n}}return
null},css:function(e,i){var
s;if(1===arguments.length){if("string"!=typeof
e){for(s=0;s<this.length;s+=1)for(var a in
e)this[s].style[a]=e[a];return this}if(this[0])return
t.getComputedStyle(this[0],null).getPropertyValue(e)}if(2===arguments.length&&"string"==typeof
e){for(s=0;s<this.length;s+=1)this[s].style[e]=i;return this}return
this},each:function(e){if(!e)return this;for(var
t=0;t<this.length;t+=1)if(!1===e.call(this[t],t,this[t]))return
this;return this},html:function(e){if(void 0===e)return
this[0]?this[0].innerHTML:void 0;for(var
t=0;t<this.length;t+=1)this[t].innerHTML=e;return
this},text:function(e){if(void 0===e)return
this[0]?this[0].textContent.trim():null;for(var
t=0;t<this.length;t+=1)this[t].textContent=e;return
this},is:function(a){var r,n,o=this[0];if(!o||void
0===a)return!1;if("string"==typeof a){if(o.matches)return
o.matches(a);if(o.webkitMatchesSelector)return
o.webkitMatchesSelector(a);if(o.msMatchesSelector)return
o.msMatchesSelector(a);for(r=s(a),n=0;n<r.length;n+=1)if(r[n]===o)return!0;return!1}if(a===e)return
o===e;if(a===t)return o===t;if(a.nodeType||a instanceof
i){for(r=a.nodeType?[a]:a,n=0;n<r.length;n+=1)if(r[n]===o)return!0;return!1}return!1},index:function(){var
e,t=this[0];if(t){for(e=0;null!==(t=t.previousSibling);)1===t.nodeType&&(e+=1);return
e}},eq:function(e){if(void 0===e)return this;var t,s=this.length;return new
i(e>s-1?[]:e<0?(t=s+e)<0?[]:[this[t]]:[this[e]])},append:function(){for(var
t,s=[],a=arguments.length;a--;)s[a]=arguments[a];for(var
r=0;r<s.length;r+=1){t=s[r];for(var
n=0;n<this.length;n+=1)if("string"==typeof t){var
o=e.createElement("div");for(o.innerHTML=t;o.firstChild;)this[n].appendChild(o.firstChild)}else
if(t instanceof i)for(var
l=0;l<t.length;l+=1)this[n].appendChild(t[l]);else
this[n].appendChild(t)}return this},prepend:function(t){var
s,a;for(s=0;s<this.length;s+=1)if("string"==typeof t){var
r=e.createElement("div");for(r.innerHTML=t,a=r.childNodes.length-1;a>=0;a-=1)this[s].insertBefore(r.childNodes[a],this[s].childNodes[0])}else
if(t instanceof
i)for(a=0;a<t.length;a+=1)this[s].insertBefore(t[a],this[s].childNodes[0]);else
this[s].insertBefore(t,this[s].childNodes[0]);return
this},next:function(e){return
this.length>0?e?this[0].nextElementSibling&&s(this[0].nextElementSibling).is(e)?new
i([this[0].nextElementSibling]):new i([]):this[0].nextElementSibling?new
i([this[0].nextElementSibling]):new i([]):new
i([])},nextAll:function(e){var t=[],a=this[0];if(!a)return new
i([]);for(;a.nextElementSibling;){var
r=a.nextElementSibling;e?s(r).is(e)&&t.push(r):t.push(r),a=r}return
new i(t)},prev:function(e){if(this.length>0){var t=this[0];return
e?t.previousElementSibling&&s(t.previousElementSibling).is(e)?new
i([t.previousElementSibling]):new i([]):t.previousElementSibling?new
i([t.previousElementSibling]):new i([])}return new
i([])},prevAll:function(e){var t=[],a=this[0];if(!a)return new
i([]);for(;a.previousElementSibling;){var
r=a.previousElementSibling;e?s(r).is(e)&&t.push(r):t.push(r),a=r}return
new i(t)},parent:function(e){for(var
t=[],i=0;i<this.length;i+=1)null!==this[i].parentNode&&(e?s(this[i].parentNode).is(e)&&t.push(this[i].parentNode):t.push(this[i].parentNode));return
s(a(t))},parents:function(e){for(var t=[],i=0;i<this.length;i+=1)for(var
r=this[i].parentNode;r;)e?s(r).is(e)&&t.push(r):t.push(r),r=r.parentNode;return
s(a(t))},closest:function(e){var t=this;return void 0===e?new
i([]):(t.is(e)||(t=t.parents(e).eq(0)),t)},find:function(e){for(var
t=[],s=0;s<this.length;s+=1)for(var
a=this[s].querySelectorAll(e),r=0;r<a.length;r+=1)t.push(a[r]);return
new i(t)},children:function(e){for(var
t=[],r=0;r<this.length;r+=1)for(var
n=this[r].childNodes,o=0;o<n.length;o+=1)e?1===n[o].nodeType&&s(n[o]).is(e)&&t.push(n[o]):1===n[o].nodeType&&t.push(n[o]);return
new i(a(t))},remove:function(){for(var
e=0;e<this.length;e+=1)this[e].parentNode&&this[e].parentNode.removeChild(this[e]);return
this},add:function(){for(var
e=[],t=arguments.length;t--;)e[t]=arguments[t];var
i,a;for(i=0;i<e.length;i+=1){var
r=s(e[i]);for(a=0;a<r.length;a+=1)this[this.length]=r[a],this.length+=1}return
this},styles:function(){return
this[0]?t.getComputedStyle(this[0],null):{}}};Object.keys(r).forEach(function(e){s.fn[e]=r[e]});var
n,o,l,d={deleteProps:function(e){var
t=e;Object.keys(t).forEach(function(e){try{t[e]=null}catch(e){}try{delete
t[e]}catch(e){}})},nextTick:function(e,t){return void
0===t&&(t=0),setTimeout(e,t)},now:function(){return
Date.now()},getTranslate:function(e,i){var s,a,r;void
0===i&&(i="x");var n=t.getComputedStyle(e,null);return
t.WebKitCSSMatrix?((a=n.transform||n.webkitTransform).split(",").length>6&&(a=a.split(",
").map(function(e){return
e.replace(",",".")}).join(", ")),r=new
t.WebKitCSSMatrix("none"===a?"":a)):s=(r=n.MozTransform||n.OTransform||n.MsTransform||n.msTransform||n.transform||n.getPropertyValue("transform").replace("translate(","matrix(1,
0, 0,
1,")).toString().split(","),"x"===i&&(a=t.WebKitCSSMatrix?r.m41:16===s.length?parseFloat(s[12]):parseFloat(s[4])),"y"===i&&(a=t.WebKitCSSMatrix?r.m42:16===s.length?parseFloat(s[13]):parseFloat(s[5])),a||0},parseUrlQuery:function(e){var
i,s,a,r,n={},o=e||t.location.href;if("string"==typeof
o&&o.length)for(r=(s=(o=o.indexOf("?")>-1?o.replace(/\S*\?/,""):"").split("&").filter(function(e){return""!==e})).length,i=0;i<r;i+=1)a=s[i].replace(/#\S+/g,"").split("="),n[decodeURIComponent(a[0])]=void
0===a[1]?void 0:decodeURIComponent(a[1])||"";return
n},isObject:function(e){return"object"==typeof
e&&null!==e&&e.constructor&&e.constructor===Object},extend:function(){for(var
e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var
i=Object(e[0]),s=1;s<e.length;s+=1){var a=e[s];if(void
0!==a&&null!==a)for(var
r=Object.keys(Object(a)),n=0,o=r.length;n<o;n+=1){var
l=r[n],h=Object.getOwnPropertyDescriptor(a,l);void
0!==h&&h.enumerable&&(d.isObject(i[l])&&d.isObject(a[l])?d.extend(i[l],a[l]):!d.isObject(i[l])&&d.isObject(a[l])?(i[l]={},d.extend(i[l],a[l])):i[l]=a[l])}}return
i}},h=(l=e.createElement("div"),{touch:t.Modernizr&&!0===t.Modernizr.touch||!!("ontouchstart"in
t||t.DocumentTouch&&e instanceof
t.DocumentTouch),pointerEvents:!(!t.navigator.pointerEnabled&&!t.PointerEvent),prefixedPointerEvents:!!t.navigator.msPointerEnabled,transition:(o=l.style,"transition"in
o||"webkitTransition"in o||"MozTransition"in
o),transforms3d:t.Modernizr&&!0===t.Modernizr.csstransforms3d||(n=l.style,"webkitPerspective"in
n||"MozPerspective"in n||"OPerspective"in
n||"MsPerspective"in n||"perspective"in
n),flexbox:function(){for(var e=l.style,t="alignItems webkitAlignItems
webkitBoxAlign msFlexAlign mozBoxAlign webkitFlexDirection msFlexDirection
mozBoxDirection mozBoxOrient webkitBoxDirection
webkitBoxOrient".split(" "),i=0;i<t.length;i+=1)if(t[i]in
e)return!0;return!1}(),observer:"MutationObserver"in
t||"WebkitMutationObserver"in t,passiveListener:function(){var
e=!1;try{var
i=Object.defineProperty({},"passive",{get:function(){e=!0}});t.addEventListener("testPassiveListener",null,i)}catch(e){}return
e}(),gestures:"ongesturestart"in t}),p=function(e){void
0===e&&(e={});var
t=this;t.params=e,t.eventsListeners={},t.params&&t.params.on&&Object.keys(t.params.on).forEach(function(e){t.on(e,t.params.on[e])})},c={components:{configurable:!0}};p.prototype.on=function(e,t,i){var
s=this;if("function"!=typeof t)return s;var
a=i?"unshift":"push";return e.split("
").forEach(function(e){s.eventsListeners[e]||(s.eventsListeners[e]=[]),s.eventsListeners[e][a](t)}),s},p.prototype.once=function(e,t,i){var
s=this;if("function"!=typeof t)return s;return s.on(e,function
i(){for(var
a=[],r=arguments.length;r--;)a[r]=arguments[r];t.apply(s,a),s.off(e,i)},i)},p.prototype.off=function(e,t){var
i=this;return e.split(" ").forEach(function(e){void
0===t?i.eventsListeners[e]=[]:i.eventsListeners[e].forEach(function(s,a){s===t&&i.eventsListeners[e].splice(a,1)})}),i},p.prototype.emit=function(){for(var
e=[],t=arguments.length;t--;)e[t]=arguments[t];var i,s,a,r=this;return
r.eventsListeners?("string"==typeof
e[0]||Array.isArray(e[0])?(i=e[0],s=e.slice(1,e.length),a=r):(i=e[0].events,s=e[0].data,a=e[0].context||r),(Array.isArray(i)?i:i.split("
")).forEach(function(e){if(r.eventsListeners[e]){var
t=[];r.eventsListeners[e].forEach(function(e){t.push(e)}),t.forEach(function(e){e.apply(a,s)})}}),r):r},p.prototype.useModulesParams=function(e){var
t=this;t.modules&&Object.keys(t.modules).forEach(function(i){var
s=t.modules[i];s.params&&d.extend(e,s.params)})},p.prototype.useModules=function(e){void
0===e&&(e={});var
t=this;t.modules&&Object.keys(t.modules).forEach(function(i){var
s=t.modules[i],a=e[i]||{};s.instance&&Object.keys(s.instance).forEach(function(e){var
i=s.instance[e];t[e]="function"==typeof
i?i.bind(t):i}),s.on&&t.on&&Object.keys(s.on).forEach(function(e){t.on(e,s.on[e])}),s.create&&s.create.bind(t)(a)})},c.components.set=function(e){this.use&&this.use(e)},p.installModule=function(e){for(var
t=[],i=arguments.length-1;i-- >0;)t[i]=arguments[i+1];var
s=this;s.prototype.modules||(s.prototype.modules={});var
a=e.name||Object.keys(s.prototype.modules).length+"_"+d.now();return
s.prototype.modules[a]=e,e.proto&&Object.keys(e.proto).forEach(function(t){s.prototype[t]=e.proto[t]}),e.static&&Object.keys(e.static).forEach(function(t){s[t]=e.static[t]}),e.install&&e.install.apply(s,t),s},p.use=function(e){for(var
t=[],i=arguments.length-1;i-- >0;)t[i]=arguments[i+1];var s=this;return
Array.isArray(e)?(e.forEach(function(e){return
s.installModule(e)}),s):s.installModule.apply(s,[e].concat(t))},Object.defineProperties(p,c);var
u={updateSize:function(){var e,t,i=this.$el;e=void
0!==this.params.width?this.params.width:i[0].clientWidth,t=void
0!==this.params.height?this.params.height:i[0].clientHeight,0===e&&this.isHorizontal()||0===t&&this.isVertical()||(e=e-parseInt(i.css("padding-left"),10)-parseInt(i.css("padding-right"),10),t=t-parseInt(i.css("padding-top"),10)-parseInt(i.css("padding-bottom"),10),d.extend(this,{width:e,height:t,size:this.isHorizontal()?e:t}))},updateSlides:function(){var
e=this.params,i=this.$wrapperEl,s=this.size,a=this.rtlTranslate,r=this.wrongRTL,n=i.children("."+this.params.slideClass),o=this.virtual&&e.virtual.enabled?this.virtual.slides.length:n.length,l=[],p=[],c=[],u=e.slidesOffsetBefore;"function"==typeof
u&&(u=e.slidesOffsetBefore.call(this));var
v=e.slidesOffsetAfter;"function"==typeof
v&&(v=e.slidesOffsetAfter.call(this));var
f=o,m=this.snapGrid.length,g=this.snapGrid.length,b=e.spaceBetween,w=-u,y=0,x=0;if(void
0!==s){var E,T;"string"==typeof
b&&b.indexOf("%")>=0&&(b=parseFloat(b.replace("%",""))/100*s),this.virtualSize=-b,a?n.css({marginLeft:"",marginTop:""}):n.css({marginRight:"",marginBottom:""}),e.slidesPerColumn>1&&(E=Math.floor(o/e.slidesPerColumn)===o/this.params.slidesPerColumn?o:Math.ceil(o/e.slidesPerColumn)*e.slidesPerColumn,"auto"!==e.slidesPerView&&"row"===e.slidesPerColumnFill&&(E=Math.max(E,e.slidesPerView*e.slidesPerColumn)));for(var
S,C=e.slidesPerColumn,M=E/C,z=M-(e.slidesPerColumn*M-o),P=0;P<o;P+=1){T=0;var
k=n.eq(P);if(e.slidesPerColumn>1){var $=void 0,L=void 0,I=void
0;"column"===e.slidesPerColumnFill?(I=P-(L=Math.floor(P/C))*C,(L>z||L===z&&I===C-1)&&(I+=1)>=C&&(I=0,L+=1),$=L+I*E/C,k.css({"-webkit-box-ordinal-group":$,"-moz-box-ordinal-group":$,"-ms-flex-order":$,"-webkit-order":$,order:$})):L=P-(I=Math.floor(P/M))*M,k.css("margin-"+(this.isHorizontal()?"top":"left"),0!==I&&e.spaceBetween&&e.spaceBetween+"px").attr("data-swiper-column",L).attr("data-swiper-row",I)}if("none"!==k.css("display")){if("auto"===e.slidesPerView){var
D=t.getComputedStyle(k[0],null);T=this.isHorizontal()?k[0].getBoundingClientRect().width+parseFloat(D.getPropertyValue("margin-left"))+parseFloat(D.getPropertyValue("margin-right")):k[0].getBoundingClientRect().height+parseFloat(D.getPropertyValue("margin-top"))+parseFloat(D.getPropertyValue("margin-bottom")),e.roundLengths&&(T=Math.floor(T))}else
T=(s-(e.slidesPerView-1)*b)/e.slidesPerView,e.roundLengths&&(T=Math.floor(T)),n[P]&&(this.isHorizontal()?n[P].style.width=T+"px":n[P].style.height=T+"px");n[P]&&(n[P].swiperSlideSize=T),c.push(T),e.centeredSlides?(w=w+T/2+y/2+b,0===y&&0!==P&&(w=w-s/2-b),0===P&&(w=w-s/2-b),Math.abs(w)<.001&&(w=0),x%e.slidesPerGroup==0&&l.push(w),p.push(w)):(x%e.slidesPerGroup==0&&l.push(w),p.push(w),w=w+T+b),this.virtualSize+=T+b,y=T,x+=1}}if(this.virtualSize=Math.max(this.virtualSize,s)+v,a&&r&&("slide"===e.effect||"coverflow"===e.effect)&&i.css({width:this.virtualSize+e.spaceBetween+"px"}),h.flexbox&&!e.setWrapperSize||(this.isHorizontal()?i.css({width:this.virtualSize+e.spaceBetween+"px"}):i.css({height:this.virtualSize+e.spaceBetween+"px"})),e.slidesPerColumn>1&&(this.virtualSize=(T+e.spaceBetween)*E,this.virtualSize=Math.ceil(this.virtualSize/e.slidesPerColumn)-e.spaceBetween,this.isHorizontal()?i.css({width:this.virtualSize+e.spaceBetween+"px"}):i.css({height:this.virtualSize+e.spaceBetween+"px"}),e.centeredSlides)){S=[];for(var
O=0;O<l.length;O+=1)l[O]<this.virtualSize+l[0]&&S.push(l[O]);l=S}if(!e.centeredSlides){S=[];for(var
A=0;A<l.length;A+=1)l[A]<=this.virtualSize-s&&S.push(l[A]);l=S,Math.floor(this.virtualSize-s)-Math.floor(l[l.length-1])>1&&l.push(this.virtualSize-s)}0===l.length&&(l=[0]),0!==e.spaceBetween&&(this.isHorizontal()?a?n.css({marginLeft:b+"px"}):n.css({marginRight:b+"px"}):n.css({marginBottom:b+"px"})),d.extend(this,{slides:n,snapGrid:l,slidesGrid:p,slidesSizesGrid:c}),o!==f&&this.emit("slidesLengthChange"),l.length!==m&&(this.params.watchOverflow&&this.checkOverflow(),this.emit("snapGridLengthChange")),p.length!==g&&this.emit("slidesGridLengthChange"),(e.watchSlidesProgress||e.watchSlidesVisibility)&&this.updateSlidesOffset()}},updateAutoHeight:function(e){var
t,i=[],s=0;if("number"==typeof
e?this.setTransition(e):!0===e&&this.setTransition(this.params.speed),"auto"!==this.params.slidesPerView&&this.params.slidesPerView>1)for(t=0;t<Math.ceil(this.params.slidesPerView);t+=1){var
a=this.activeIndex+t;if(a>this.slides.length)break;i.push(this.slides.eq(a)[0])}else
i.push(this.slides.eq(this.activeIndex)[0]);for(t=0;t<i.length;t+=1)if(void
0!==i[t]){var
r=i[t].offsetHeight;s=r>s?r:s}s&&this.$wrapperEl.css("height",s+"px")},updateSlidesOffset:function(){for(var
e=this.slides,t=0;t<e.length;t+=1)e[t].swiperSlideOffset=this.isHorizontal()?e[t].offsetLeft:e[t].offsetTop},updateSlidesProgress:function(e){void
0===e&&(e=this.translate||0);var
t=this.params,i=this.slides,s=this.rtlTranslate;if(0!==i.length){void
0===i[0].swiperSlideOffset&&this.updateSlidesOffset();var
a=-e;s&&(a=e),i.removeClass(t.slideVisibleClass);for(var
r=0;r<i.length;r+=1){var
n=i[r],o=(a+(t.centeredSlides?this.minTranslate():0)-n.swiperSlideOffset)/(n.swiperSlideSize+t.spaceBetween);if(t.watchSlidesVisibility){var
l=-(a-n.swiperSlideOffset),d=l+this.slidesSizesGrid[r];(l>=0&&l<this.size||d>0&&d<=this.size||l<=0&&d>=this.size)&&i.eq(r).addClass(t.slideVisibleClass)}n.progress=s?-o:o}}},updateProgress:function(e){void
0===e&&(e=this.translate||0);var
t=this.params,i=this.maxTranslate()-this.minTranslate(),s=this.progress,a=this.isBeginning,r=this.isEnd,n=a,o=r;0===i?(s=0,a=!0,r=!0):(a=(s=(e-this.minTranslate())/i)<=0,r=s>=1),d.extend(this,{progress:s,isBeginning:a,isEnd:r}),(t.watchSlidesProgress||t.watchSlidesVisibility)&&this.updateSlidesProgress(e),a&&!n&&this.emit("reachBeginning
toEdge"),r&&!o&&this.emit("reachEnd
toEdge"),(n&&!a||o&&!r)&&this.emit("fromEdge"),this.emit("progress",s)},updateSlidesClasses:function(){var
e,t=this.slides,i=this.params,s=this.$wrapperEl,a=this.activeIndex,r=this.realIndex,n=this.virtual&&i.virtual.enabled;t.removeClass(i.slideActiveClass+"
"+i.slideNextClass+" "+i.slidePrevClass+"
"+i.slideDuplicateActiveClass+"
"+i.slideDuplicateNextClass+"
"+i.slideDuplicatePrevClass),(e=n?this.$wrapperEl.find("."+i.slideClass+'[data-swiper-slide-index="'+a+'"]'):t.eq(a)).addClass(i.slideActiveClass),i.loop&&(e.hasClass(i.slideDuplicateClass)?s.children("."+i.slideClass+":not(."+i.slideDuplicateClass+')[data-swiper-slide-index="'+r+'"]').addClass(i.slideDuplicateActiveClass):s.children("."+i.slideClass+"."+i.slideDuplicateClass+'[data-swiper-slide-index="'+r+'"]').addClass(i.slideDuplicateActiveClass));var
o=e.nextAll("."+i.slideClass).eq(0).addClass(i.slideNextClass);i.loop&&0===o.length&&(o=t.eq(0)).addClass(i.slideNextClass);var
l=e.prevAll("."+i.slideClass).eq(0).addClass(i.slidePrevClass);i.loop&&0===l.length&&(l=t.eq(-1)).addClass(i.slidePrevClass),i.loop&&(o.hasClass(i.slideDuplicateClass)?s.children("."+i.slideClass+":not(."+i.slideDuplicateClass+')[data-swiper-slide-index="'+o.attr("data-swiper-slide-index")+'"]').addClass(i.slideDuplicateNextClass):s.children("."+i.slideClass+"."+i.slideDuplicateClass+'[data-swiper-slide-index="'+o.attr("data-swiper-slide-index")+'"]').addClass(i.slideDuplicateNextClass),l.hasClass(i.slideDuplicateClass)?s.children("."+i.slideClass+":not(."+i.slideDuplicateClass+')[data-swiper-slide-index="'+l.attr("data-swiper-slide-index")+'"]').addClass(i.slideDuplicatePrevClass):s.children("."+i.slideClass+"."+i.slideDuplicateClass+'[data-swiper-slide-index="'+l.attr("data-swiper-slide-index")+'"]').addClass(i.slideDuplicatePrevClass))},updateActiveIndex:function(e){var
t,i=this.rtlTranslate?this.translate:-this.translate,s=this.slidesGrid,a=this.snapGrid,r=this.params,n=this.activeIndex,o=this.realIndex,l=this.snapIndex,h=e;if(void
0===h){for(var p=0;p<s.length;p+=1)void
0!==s[p+1]?i>=s[p]&&i<s[p+1]-(s[p+1]-s[p])/2?h=p:i>=s[p]&&i<s[p+1]&&(h=p+1):i>=s[p]&&(h=p);r.normalizeSlideIndex&&(h<0||void
0===h)&&(h=0)}if((t=a.indexOf(i)>=0?a.indexOf(i):Math.floor(h/r.slidesPerGroup))>=a.length&&(t=a.length-1),h!==n){var
c=parseInt(this.slides.eq(h).attr("data-swiper-slide-index")||h,10);d.extend(this,{snapIndex:t,realIndex:c,previousIndex:n,activeIndex:h}),this.emit("activeIndexChange"),this.emit("snapIndexChange"),o!==c&&this.emit("realIndexChange"),this.emit("slideChange")}else
t!==l&&(this.snapIndex=t,this.emit("snapIndexChange"))},updateClickedSlide:function(e){var
t=this.params,i=s(e.target).closest("."+t.slideClass)[0],a=!1;if(i)for(var
r=0;r<this.slides.length;r+=1)this.slides[r]===i&&(a=!0);if(!i||!a)return
this.clickedSlide=void 0,void(this.clickedIndex=void
0);this.clickedSlide=i,this.virtual&&this.params.virtual.enabled?this.clickedIndex=parseInt(s(i).attr("data-swiper-slide-index"),10):this.clickedIndex=s(i).index(),t.slideToClickedSlide&&void
0!==this.clickedIndex&&this.clickedIndex!==this.activeIndex&&this.slideToClickedSlide()}};var
v={getTranslate:function(e){void
0===e&&(e=this.isHorizontal()?"x":"y");var
t=this.params,i=this.rtlTranslate,s=this.translate,a=this.$wrapperEl;if(t.virtualTranslate)return
i?-s:s;var r=d.getTranslate(a[0],e);return
i&&(r=-r),r||0},setTranslate:function(e,t){var
i=this.rtlTranslate,s=this.params,a=this.$wrapperEl,r=this.progress,n=0,o=0;this.isHorizontal()?n=i?-e:e:o=e,s.roundLengths&&(n=Math.floor(n),o=Math.floor(o)),s.virtualTranslate||(h.transforms3d?a.transform("translate3d("+n+"px,
"+o+"px,
0px)"):a.transform("translate("+n+"px,
"+o+"px)")),this.translate=this.isHorizontal()?n:o;var
l=this.maxTranslate()-this.minTranslate();(0===l?0:(e-this.minTranslate())/l)!==r&&this.updateProgress(e),this.emit("setTranslate",this.translate,t)},minTranslate:function(){return-this.snapGrid[0]},maxTranslate:function(){return-this.snapGrid[this.snapGrid.length-1]}};var
f={setTransition:function(e,t){this.$wrapperEl.transition(e),this.emit("setTransition",e,t)},transitionStart:function(e,t){void
0===e&&(e=!0);var
i=this.activeIndex,s=this.params,a=this.previousIndex;s.autoHeight&&this.updateAutoHeight();var
r=t;if(r||(r=i>a?"next":i<a?"prev":"reset"),this.emit("transitionStart"),e&&i!==a){if("reset"===r)return
void
this.emit("slideResetTransitionStart");this.emit("slideChangeTransitionStart"),"next"===r?this.emit("slideNextTransitionStart"):this.emit("slidePrevTransitionStart")}},transitionEnd:function(e,t){void
0===e&&(e=!0);var
i=this.activeIndex,s=this.previousIndex;this.animating=!1,this.setTransition(0);var
a=t;if(a||(a=i>s?"next":i<s?"prev":"reset"),this.emit("transitionEnd"),e&&i!==s){if("reset"===a)return
void
this.emit("slideResetTransitionEnd");this.emit("slideChangeTransitionEnd"),"next"===a?this.emit("slideNextTransitionEnd"):this.emit("slidePrevTransitionEnd")}}};var
m={slideTo:function(e,t,i,s){void 0===e&&(e=0),void
0===t&&(t=this.params.speed),void 0===i&&(i=!0);var
a=this,r=e;r<0&&(r=0);var
n=a.params,o=a.snapGrid,l=a.slidesGrid,d=a.previousIndex,p=a.activeIndex,c=a.rtlTranslate,u=a.$wrapperEl;if(a.animating&&n.preventIntercationOnTransition)return!1;var
v=Math.floor(r/n.slidesPerGroup);v>=o.length&&(v=o.length-1),(p||n.initialSlide||0)===(d||0)&&i&&a.emit("beforeSlideChangeStart");var
f,m=-o[v];if(a.updateProgress(m),n.normalizeSlideIndex)for(var
g=0;g<l.length;g+=1)-Math.floor(100*m)>=Math.floor(100*l[g])&&(r=g);if(a.initialized&&r!==p){if(!a.allowSlideNext&&m<a.translate&&m<a.minTranslate())return!1;if(!a.allowSlidePrev&&m>a.translate&&m>a.maxTranslate()&&(p||0)!==r)return!1}return
f=r>p?"next":r<p?"prev":"reset",c&&-m===a.translate||!c&&m===a.translate?(a.updateActiveIndex(r),n.autoHeight&&a.updateAutoHeight(),a.updateSlidesClasses(),"slide"!==n.effect&&a.setTranslate(m),"reset"!==f&&(a.transitionStart(i,f),a.transitionEnd(i,f)),!1):(0!==t&&h.transition?(a.setTransition(t),a.setTranslate(m),a.updateActiveIndex(r),a.updateSlidesClasses(),a.emit("beforeTransitionStart",t,s),a.transitionStart(i,f),a.animating||(a.animating=!0,u.transitionEnd(function(){a&&!a.destroyed&&a.transitionEnd(i,f)}))):(a.setTransition(0),a.setTranslate(m),a.updateActiveIndex(r),a.updateSlidesClasses(),a.emit("beforeTransitionStart",t,s),a.transitionStart(i,f),a.transitionEnd(i,f)),!0)},slideToLoop:function(e,t,i,s){void
0===e&&(e=0),void 0===t&&(t=this.params.speed),void
0===i&&(i=!0);var a=e;return
this.params.loop&&(a+=this.loopedSlides),this.slideTo(a,t,i,s)},slideNext:function(e,t,i){void
0===e&&(e=this.params.speed),void 0===t&&(t=!0);var
s=this.params,a=this.animating;return
s.loop?!a&&(this.loopFix(),this._clientLeft=this.$wrapperEl[0].clientLeft,this.slideTo(this.activeIndex+s.slidesPerGroup,e,t,i)):this.slideTo(this.activeIndex+s.slidesPerGroup,e,t,i)},slidePrev:function(e,t,i){void
0===e&&(e=this.params.speed),void 0===t&&(t=!0);var
s=this.params,a=this.animating;return
s.loop?!a&&(this.loopFix(),this._clientLeft=this.$wrapperEl[0].clientLeft,this.slideTo(this.activeIndex-1,e,t,i)):this.slideTo(this.activeIndex-1,e,t,i)},slideReset:function(e,t,i){return
void 0===e&&(e=this.params.speed),void
0===t&&(t=!0),this.slideTo(this.activeIndex,e,t,i)},slideToClosest:function(e,t,i){void
0===e&&(e=this.params.speed),void 0===t&&(t=!0);var
s=this.activeIndex,a=Math.floor(s/this.params.slidesPerGroup);if(a<this.snapGrid.length-1){var
r=this.rtlTranslate?this.translate:-this.translate,n=this.snapGrid[a];r-n>(this.snapGrid[a+1]-n)/2&&(s=this.params.slidesPerGroup)}return
this.slideTo(s,e,t,i)},slideToClickedSlide:function(){var
e,t=this,i=t.params,a=t.$wrapperEl,r="auto"===i.slidesPerView?t.slidesPerViewDynamic():i.slidesPerView,n=t.clickedIndex;if(i.loop){if(t.animating)return;e=parseInt(s(t.clickedSlide).attr("data-swiper-slide-index"),10),i.centeredSlides?n<t.loopedSlides-r/2||n>t.slides.length-t.loopedSlides+r/2?(t.loopFix(),n=a.children("."+i.slideClass+'[data-swiper-slide-index="'+e+'"]:not(.'+i.slideDuplicateClass+")").eq(0).index(),d.nextTick(function(){t.slideTo(n)})):t.slideTo(n):n>t.slides.length-r?(t.loopFix(),n=a.children("."+i.slideClass+'[data-swiper-slide-index="'+e+'"]:not(.'+i.slideDuplicateClass+")").eq(0).index(),d.nextTick(function(){t.slideTo(n)})):t.slideTo(n)}else
t.slideTo(n)}};var g={loopCreate:function(){var
t=this,i=t.params,a=t.$wrapperEl;a.children("."+i.slideClass+"."+i.slideDuplicateClass).remove();var
r=a.children("."+i.slideClass);if(i.loopFillGroupWithBlank){var
n=i.slidesPerGroup-r.length%i.slidesPerGroup;if(n!==i.slidesPerGroup){for(var
o=0;o<n;o+=1){var
l=s(e.createElement("div")).addClass(i.slideClass+"
"+i.slideBlankClass);a.append(l)}r=a.children("."+i.slideClass)}}"auto"!==i.slidesPerView||i.loopedSlides||(i.loopedSlides=r.length),t.loopedSlides=parseInt(i.loopedSlides||i.slidesPerView,10),t.loopedSlides+=i.loopAdditionalSlides,t.loopedSlides>r.length&&(t.loopedSlides=r.length);var
d=[],h=[];r.each(function(e,i){var
a=s(i);e<t.loopedSlides&&h.push(i),e<r.length&&e>=r.length-t.loopedSlides&&d.push(i),a.attr("data-swiper-slide-index",e)});for(var
p=0;p<h.length;p+=1)a.append(s(h[p].cloneNode(!0)).addClass(i.slideDuplicateClass));for(var
c=d.length-1;c>=0;c-=1)a.prepend(s(d[c].cloneNode(!0)).addClass(i.slideDuplicateClass))},loopFix:function(){var
e,t=this.params,i=this.activeIndex,s=this.slides,a=this.loopedSlides,r=this.allowSlidePrev,n=this.allowSlideNext,o=this.snapGrid,l=this.rtlTranslate;this.allowSlidePrev=!0,this.allowSlideNext=!0;var
d=-o[i]-this.getTranslate();i<a?(e=s.length-3*a+i,e+=a,this.slideTo(e,0,!1,!0)&&0!==d&&this.setTranslate((l?-this.translate:this.translate)-d)):("auto"===t.slidesPerView&&i>=2*a||i>s.length-2*t.slidesPerView)&&(e=-s.length+i+a,e+=a,this.slideTo(e,0,!1,!0)&&0!==d&&this.setTranslate((l?-this.translate:this.translate)-d));this.allowSlidePrev=r,this.allowSlideNext=n},loopDestroy:function(){var
e=this.$wrapperEl,t=this.params,i=this.slides;e.children("."+t.slideClass+"."+t.slideDuplicateClass).remove(),i.removeAttr("data-swiper-slide-index")}};var
b={setGrabCursor:function(e){if(!h.touch&&this.params.simulateTouch){var
t=this.el;t.style.cursor="move",t.style.cursor=e?"-webkit-grabbing":"-webkit-grab",t.style.cursor=e?"-moz-grabbin":"-moz-grab",t.style.cursor=e?"grabbing":"grab"}},unsetGrabCursor:function(){h.touch||(this.el.style.cursor="")}};var
w={appendSlide:function(e){var
t=this.$wrapperEl,i=this.params;if(i.loop&&this.loopDestroy(),"object"==typeof
e&&"length"in e)for(var
s=0;s<e.length;s+=1)e[s]&&t.append(e[s]);else
t.append(e);i.loop&&this.loopCreate(),i.observer&&h.observer||this.update()},prependSlide:function(e){var
t=this.params,i=this.$wrapperEl,s=this.activeIndex;t.loop&&this.loopDestroy();var
a=s+1;if("object"==typeof e&&"length"in
e){for(var
r=0;r<e.length;r+=1)e[r]&&i.prepend(e[r]);a=s+e.length}else
i.prepend(e);t.loop&&this.loopCreate(),t.observer&&h.observer||this.update(),this.slideTo(a,0,!1)},removeSlide:function(e){var
t=this.params,i=this.$wrapperEl,s=this.activeIndex;t.loop&&(this.loopDestroy(),this.slides=i.children("."+t.slideClass));var
a,r=s;if("object"==typeof e&&"length"in
e){for(var
n=0;n<e.length;n+=1)a=e[n],this.slides[a]&&this.slides.eq(a).remove(),a<r&&(r-=1);r=Math.max(r,0)}else
a=e,this.slides[a]&&this.slides.eq(a).remove(),a<r&&(r-=1),r=Math.max(r,0);t.loop&&this.loopCreate(),t.observer&&h.observer||this.update(),t.loop?this.slideTo(r+this.loopedSlides,0,!1):this.slideTo(r,0,!1)},removeAllSlides:function(){for(var
e=[],t=0;t<this.slides.length;t+=1)e.push(t);this.removeSlide(e)}},y=function(){var
i=t.navigator.userAgent,s={ios:!1,android:!1,androidChrome:!1,desktop:!1,windows:!1,iphone:!1,ipod:!1,ipad:!1,cordova:t.cordova||t.phonegap,phonegap:t.cordova||t.phonegap},a=i.match(/(Windows
Phone);?[\s\/]+([\d.]+)?/),r=i.match(/(Android);?[\s\/]+([\d.]+)?/),n=i.match(/(iPad).*OS\s([\d_]+)/),o=i.match(/(iPod)(.*OS\s([\d_]+))?/),l=!n&&i.match(/(iPhone\sOS|iOS)\s([\d_]+)/);if(a&&(s.os="windows",s.osVersion=a[2],s.windows=!0),r&&!a&&(s.os="android",s.osVersion=r[2],s.android=!0,s.androidChrome=i.toLowerCase().indexOf("chrome")>=0),(n||l||o)&&(s.os="ios",s.ios=!0),l&&!o&&(s.osVersion=l[2].replace(/_/g,"."),s.iphone=!0),n&&(s.osVersion=n[2].replace(/_/g,"."),s.ipad=!0),o&&(s.osVersion=o[3]?o[3].replace(/_/g,"."):null,s.iphone=!0),s.ios&&s.osVersion&&i.indexOf("Version/")>=0&&"10"===s.osVersion.split(".")[0]&&(s.osVersion=i.toLowerCase().split("version/")[1].split("
")[0]),s.desktop=!(s.os||s.android||s.webView),s.webView=(l||n||o)&&i.match(/.*AppleWebKit(?!.*Safari)/i),s.os&&"ios"===s.os){var
d=s.osVersion.split("."),h=e.querySelector('meta[name="viewport"]');s.minimalUi=!s.webView&&(o||l)&&(1*d[0]==7?1*d[1]>=1:1*d[0]>7)&&h&&h.getAttribute("content").indexOf("minimal-ui")>=0}return
s.pixelRatio=t.devicePixelRatio||1,s}();function x(){var
e=this.params,t=this.el;if(!t||0!==t.offsetWidth){e.breakpoints&&this.setBreakpoint();var
i=this.allowSlideNext,s=this.allowSlidePrev;if(this.allowSlideNext=!0,this.allowSlidePrev=!0,this.updateSize(),this.updateSlides(),e.freeMode){var
a=Math.min(Math.max(this.translate,this.maxTranslate()),this.minTranslate());this.setTranslate(a),this.updateActiveIndex(),this.updateSlidesClasses(),e.autoHeight&&this.updateAutoHeight()}else
this.updateSlidesClasses(),("auto"===e.slidesPerView||e.slidesPerView>1)&&this.isEnd&&!this.params.centeredSlides?this.slideTo(this.slides.length-1,0,!1,!0):this.slideTo(this.activeIndex,0,!1,!0);this.allowSlidePrev=s,this.allowSlideNext=i}}var
E={attachEvents:function(){var
i=this.params,a=this.touchEvents,r=this.el,n=this.wrapperEl;this.onTouchStart=function(i){var
a=this.touchEventsData,r=this.params,n=this.touches;if(!this.animating||!r.preventIntercationOnTransition){var
o=i;if(o.originalEvent&&(o=o.originalEvent),a.isTouchEvent="touchstart"===o.type,(a.isTouchEvent||!("which"in
o)||3!==o.which)&&(!a.isTouched||!a.isMoved))if(r.noSwiping&&s(o.target).closest(r.noSwipingSelector?r.noSwipingSelector:"."+r.noSwipingClass)[0])this.allowClick=!0;else
if(!r.swipeHandler||s(o).closest(r.swipeHandler)[0]){n.currentX="touchstart"===o.type?o.targetTouches[0].pageX:o.pageX,n.currentY="touchstart"===o.type?o.targetTouches[0].pageY:o.pageY;var
l=n.currentX,h=n.currentY;if(!(y.ios&&!y.cordova&&r.iOSEdgeSwipeDetection&&l<=r.iOSEdgeSwipeThreshold&&l>=t.screen.width-r.iOSEdgeSwipeThreshold)){if(d.extend(a,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void
0,startMoving:void
0}),n.startX=l,n.startY=h,a.touchStartTime=d.now(),this.allowClick=!0,this.updateSize(),this.swipeDirection=void
0,r.threshold>0&&(a.allowThresholdMove=!1),"touchstart"!==o.type){var
p=!0;s(o.target).is(a.formElements)&&(p=!1),e.activeElement&&s(e.activeElement).is(a.formElements)&&e.activeElement!==o.target&&e.activeElement.blur(),p&&this.allowTouchMove&&o.preventDefault()}this.emit("touchStart",o)}}}}.bind(this),this.onTouchMove=function(t){var
i=this.touchEventsData,a=this.params,r=this.touches,n=this.rtlTranslate,o=t;if(o.originalEvent&&(o=o.originalEvent),i.isTouched){if(!i.isTouchEvent||"mousemove"!==o.type){var
l="touchmove"===o.type?o.targetTouches[0].pageX:o.pageX,h="touchmove"===o.type?o.targetTouches[0].pageY:o.pageY;if(o.preventedByNestedSwiper)return
r.startX=l,void(r.startY=h);if(!this.allowTouchMove)return
this.allowClick=!1,void(i.isTouched&&(d.extend(r,{startX:l,startY:h,currentX:l,currentY:h}),i.touchStartTime=d.now()));if(i.isTouchEvent&&a.touchReleaseOnEdges&&!a.loop)if(this.isVertical()){if(h<r.startY&&this.translate<=this.maxTranslate()||h>r.startY&&this.translate>=this.minTranslate())return
i.isTouched=!1,void(i.isMoved=!1)}else
if(l<r.startX&&this.translate<=this.maxTranslate()||l>r.startX&&this.translate>=this.minTranslate())return;if(i.isTouchEvent&&e.activeElement&&o.target===e.activeElement&&s(o.target).is(i.formElements))return
i.isMoved=!0,void(this.allowClick=!1);if(i.allowTouchCallbacks&&this.emit("touchMove",o),!(o.targetTouches&&o.targetTouches.length>1)){r.currentX=l,r.currentY=h;var
p,c=r.currentX-r.startX,u=r.currentY-r.startY;if(void
0===i.isScrolling&&(this.isHorizontal()&&r.currentY===r.startY||this.isVertical()&&r.currentX===r.startX?i.isScrolling=!1:c*c+u*u>=25&&(p=180*Math.atan2(Math.abs(u),Math.abs(c))/Math.PI,i.isScrolling=this.isHorizontal()?p>a.touchAngle:90-p>a.touchAngle)),i.isScrolling&&this.emit("touchMoveOpposite",o),"undefined"==typeof
startMoving&&(r.currentX===r.startX&&r.currentY===r.startY||(i.startMoving=!0)),i.isScrolling)i.isTouched=!1;else
if(i.startMoving){this.allowClick=!1,o.preventDefault(),a.touchMoveStopPropagation&&!a.nested&&o.stopPropagation(),i.isMoved||(a.loop&&this.loopFix(),i.startTranslate=this.getTranslate(),this.setTransition(0),this.animating&&this.$wrapperEl.trigger("webkitTransitionEnd
transitionend"),i.allowMomentumBounce=!1,!a.grabCursor||!0!==this.allowSlideNext&&!0!==this.allowSlidePrev||this.setGrabCursor(!0),this.emit("sliderFirstMove",o)),this.emit("sliderMove",o),i.isMoved=!0;var
v=this.isHorizontal()?c:u;r.diff=v,v*=a.touchRatio,n&&(v=-v),this.swipeDirection=v>0?"prev":"next",i.currentTranslate=v+i.startTranslate;var
f=!0,m=a.resistanceRatio;if(a.touchReleaseOnEdges&&(m=0),v>0&&i.currentTranslate>this.minTranslate()?(f=!1,a.resistance&&(i.currentTranslate=this.minTranslate()-1+Math.pow(-this.minTranslate()+i.startTranslate+v,m))):v<0&&i.currentTranslate<this.maxTranslate()&&(f=!1,a.resistance&&(i.currentTranslate=this.maxTranslate()+1-Math.pow(this.maxTranslate()-i.startTranslate-v,m))),f&&(o.preventedByNestedSwiper=!0),!this.allowSlideNext&&"next"===this.swipeDirection&&i.currentTranslate<i.startTranslate&&(i.currentTranslate=i.startTranslate),!this.allowSlidePrev&&"prev"===this.swipeDirection&&i.currentTranslate>i.startTranslate&&(i.currentTranslate=i.startTranslate),a.threshold>0){if(!(Math.abs(v)>a.threshold||i.allowThresholdMove))return
void(i.currentTranslate=i.startTranslate);if(!i.allowThresholdMove)return
i.allowThresholdMove=!0,r.startX=r.currentX,r.startY=r.currentY,i.currentTranslate=i.startTranslate,void(r.diff=this.isHorizontal()?r.currentX-r.startX:r.currentY-r.startY)}a.followFinger&&((a.freeMode||a.watchSlidesProgress||a.watchSlidesVisibility)&&(this.updateActiveIndex(),this.updateSlidesClasses()),a.freeMode&&(0===i.velocities.length&&i.velocities.push({position:r[this.isHorizontal()?"startX":"startY"],time:i.touchStartTime}),i.velocities.push({position:r[this.isHorizontal()?"currentX":"currentY"],time:d.now()})),this.updateProgress(i.currentTranslate),this.setTranslate(i.currentTranslate))}}}}else
i.startMoving&&i.isScrolling&&this.emit("touchMoveOpposite",o)}.bind(this),this.onTouchEnd=function(e){var
t=this,i=t.touchEventsData,s=t.params,a=t.touches,r=t.rtlTranslate,n=t.$wrapperEl,o=t.slidesGrid,l=t.snapGrid,h=e;if(h.originalEvent&&(h=h.originalEvent),i.allowTouchCallbacks&&t.emit("touchEnd",h),i.allowTouchCallbacks=!1,!i.isTouched)return
i.isMoved&&s.grabCursor&&t.setGrabCursor(!1),i.isMoved=!1,void(i.startMoving=!1);s.grabCursor&&i.isMoved&&i.isTouched&&(!0===t.allowSlideNext||!0===t.allowSlidePrev)&&t.setGrabCursor(!1);var
p,c=d.now(),u=c-i.touchStartTime;if(t.allowClick&&(t.updateClickedSlide(h),t.emit("tap",h),u<300&&c-i.lastClickTime>300&&(i.clickTimeout&&clearTimeout(i.clickTimeout),i.clickTimeout=d.nextTick(function(){t&&!t.destroyed&&t.emit("click",h)},300)),u<300&&c-i.lastClickTime<300&&(i.clickTimeout&&clearTimeout(i.clickTimeout),t.emit("doubleTap",h))),i.lastClickTime=d.now(),d.nextTick(function(){t.destroyed||(t.allowClick=!0)}),!i.isTouched||!i.isMoved||!t.swipeDirection||0===a.diff||i.currentTranslate===i.startTranslate)return
i.isTouched=!1,i.isMoved=!1,void(i.startMoving=!1);if(i.isTouched=!1,i.isMoved=!1,i.startMoving=!1,p=s.followFinger?r?t.translate:-t.translate:-i.currentTranslate,s.freeMode){if(p<-t.minTranslate())return
void t.slideTo(t.activeIndex);if(p>-t.maxTranslate())return
void(t.slides.length<l.length?t.slideTo(l.length-1):t.slideTo(t.slides.length-1));if(s.freeModeMomentum){if(i.velocities.length>1){var
v=i.velocities.pop(),f=i.velocities.pop(),m=v.position-f.position,g=v.time-f.time;t.velocity=m/g,t.velocity/=2,Math.abs(t.velocity)<s.freeModeMinimumVelocity&&(t.velocity=0),(g>150||d.now()-v.time>300)&&(t.velocity=0)}else
t.velocity=0;t.velocity*=s.freeModeMomentumVelocityRatio,i.velocities.length=0;var
b=1e3*s.freeModeMomentumRatio,w=t.velocity*b,y=t.translate+w;r&&(y=-y);var
x,E=!1,T=20*Math.abs(t.velocity)*s.freeModeMomentumBounceRatio;if(y<t.maxTranslate())s.freeModeMomentumBounce?(y+t.maxTranslate()<-T&&(y=t.maxTranslate()-T),x=t.maxTranslate(),E=!0,i.allowMomentumBounce=!0):y=t.maxTranslate();else
if(y>t.minTranslate())s.freeModeMomentumBounce?(y-t.minTranslate()>T&&(y=t.minTranslate()+T),x=t.minTranslate(),E=!0,i.allowMomentumBounce=!0):y=t.minTranslate();else
if(s.freeModeSticky){for(var
S,C=0;C<l.length;C+=1)if(l[C]>-y){S=C;break}y=-(y=Math.abs(l[S]-y)<Math.abs(l[S-1]-y)||"next"===t.swipeDirection?l[S]:l[S-1])}if(0!==t.velocity)b=r?Math.abs((-y-t.translate)/t.velocity):Math.abs((y-t.translate)/t.velocity);else
if(s.freeModeSticky)return void
t.slideToClosest();s.freeModeMomentumBounce&&E?(t.updateProgress(x),t.setTransition(b),t.setTranslate(y),t.transitionStart(!0,t.swipeDirection),t.animating=!0,n.transitionEnd(function(){t&&!t.destroyed&&i.allowMomentumBounce&&(t.emit("momentumBounce"),t.setTransition(s.speed),t.setTranslate(x),n.transitionEnd(function(){t&&!t.destroyed&&t.transitionEnd()}))})):t.velocity?(t.updateProgress(y),t.setTransition(b),t.setTranslate(y),t.transitionStart(!0,t.swipeDirection),t.animating||(t.animating=!0,n.transitionEnd(function(){t&&!t.destroyed&&t.transitionEnd()}))):t.updateProgress(y),t.updateActiveIndex(),t.updateSlidesClasses()}else
if(s.freeModeSticky)return void
t.slideToClosest();(!s.freeModeMomentum||u>=s.longSwipesMs)&&(t.updateProgress(),t.updateActiveIndex(),t.updateSlidesClasses())}else{for(var
M=0,z=t.slidesSizesGrid[0],P=0;P<o.length;P+=s.slidesPerGroup)void
0!==o[P+s.slidesPerGroup]?p>=o[P]&&p<o[P+s.slidesPerGroup]&&(M=P,z=o[P+s.slidesPerGroup]-o[P]):p>=o[P]&&(M=P,z=o[o.length-1]-o[o.length-2]);var
k=(p-o[M])/z;if(u>s.longSwipesMs){if(!s.longSwipes)return void
t.slideTo(t.activeIndex);"next"===t.swipeDirection&&(k>=s.longSwipesRatio?t.slideTo(M+s.slidesPerGroup):t.slideTo(M)),"prev"===t.swipeDirection&&(k>1-s.longSwipesRatio?t.slideTo(M+s.slidesPerGroup):t.slideTo(M))}else{if(!s.shortSwipes)return
void
t.slideTo(t.activeIndex);"next"===t.swipeDirection&&t.slideTo(M+s.slidesPerGroup),"prev"===t.swipeDirection&&t.slideTo(M)}}}.bind(this),this.onClick=function(e){this.allowClick||(this.params.preventClicks&&e.preventDefault(),this.params.preventClicksPropagation&&this.animating&&(e.stopPropagation(),e.stopImmediatePropagation()))}.bind(this);var
o="container"===i.touchEventsTarget?r:n,l=!!i.nested;if(h.touch||!h.pointerEvents&&!h.prefixedPointerEvents){if(h.touch){var
p=!("touchstart"!==a.start||!h.passiveListener||!i.passiveListeners)&&{passive:!0,capture:!1};o.addEventListener(a.start,this.onTouchStart,p),o.addEventListener(a.move,this.onTouchMove,h.passiveListener?{passive:!1,capture:l}:l),o.addEventListener(a.end,this.onTouchEnd,p)}(i.simulateTouch&&!y.ios&&!y.android||i.simulateTouch&&!h.touch&&y.ios)&&(o.addEventListener("mousedown",this.onTouchStart,!1),e.addEventListener("mousemove",this.onTouchMove,l),e.addEventListener("mouseup",this.onTouchEnd,!1))}else
o.addEventListener(a.start,this.onTouchStart,!1),e.addEventListener(a.move,this.onTouchMove,l),e.addEventListener(a.end,this.onTouchEnd,!1);(i.preventClicks||i.preventClicksPropagation)&&o.addEventListener("click",this.onClick,!0),this.on("resize
observerUpdate",x,!0)},detachEvents:function(){var
t=this.params,i=this.touchEvents,s=this.el,a=this.wrapperEl,r="container"===t.touchEventsTarget?s:a,n=!!t.nested;if(h.touch||!h.pointerEvents&&!h.prefixedPointerEvents){if(h.touch){var
o=!("onTouchStart"!==i.start||!h.passiveListener||!t.passiveListeners)&&{passive:!0,capture:!1};r.removeEventListener(i.start,this.onTouchStart,o),r.removeEventListener(i.move,this.onTouchMove,n),r.removeEventListener(i.end,this.onTouchEnd,o)}(t.simulateTouch&&!y.ios&&!y.android||t.simulateTouch&&!h.touch&&y.ios)&&(r.removeEventListener("mousedown",this.onTouchStart,!1),e.removeEventListener("mousemove",this.onTouchMove,n),e.removeEventListener("mouseup",this.onTouchEnd,!1))}else
r.removeEventListener(i.start,this.onTouchStart,!1),e.removeEventListener(i.move,this.onTouchMove,n),e.removeEventListener(i.end,this.onTouchEnd,!1);(t.preventClicks||t.preventClicksPropagation)&&r.removeEventListener("click",this.onClick,!0),this.off("resize
observerUpdate",x)}};var T={setBreakpoint:function(){var
e=this.activeIndex,t=this.loopedSlides;void 0===t&&(t=0);var
i=this.params,s=i.breakpoints;if(s&&(!s||0!==Object.keys(s).length)){var
a=this.getBreakpoint(s);if(a&&this.currentBreakpoint!==a){var r=a
in
s?s[a]:this.originalParams,n=i.loop&&r.slidesPerView!==i.slidesPerView;d.extend(this.params,r),d.extend(this,{allowTouchMove:this.params.allowTouchMove,allowSlideNext:this.params.allowSlideNext,allowSlidePrev:this.params.allowSlidePrev}),this.currentBreakpoint=a,n&&(this.loopDestroy(),this.loopCreate(),this.updateSlides(),this.slideTo(e-t+this.loopedSlides,0,!1)),this.emit("breakpoint",r)}}},getBreakpoint:function(e){if(e){var
i=!1,s=[];Object.keys(e).forEach(function(e){s.push(e)}),s.sort(function(e,t){return
parseInt(e,10)-parseInt(t,10)});for(var a=0;a<s.length;a+=1){var
r=s[a];r>=t.innerWidth&&!i&&(i=r)}return
i||"max"}}},S=function(){return{isIE:!!t.navigator.userAgent.match(/Trident/g)||!!t.navigator.userAgent.match(/MSIE/g),isSafari:(e=t.navigator.userAgent.toLowerCase(),e.indexOf("safari")>=0&&e.indexOf("chrome")<0&&e.indexOf("android")<0),isUiWebView:/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(t.navigator.userAgent)};var
e}();var
C={init:!0,direction:"horizontal",touchEventsTarget:"container",initialSlide:0,speed:300,preventIntercationOnTransition:!1,iOSEdgeSwipeDetection:!1,iOSEdgeSwipeThreshold:20,freeMode:!1,freeModeMomentum:!0,freeModeMomentumRatio:1,freeModeMomentumBounce:!0,freeModeMomentumBounceRatio:1,freeModeMomentumVelocityRatio:1,freeModeSticky:!1,freeModeMinimumVelocity:.02,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void
0,spaceBetween:0,slidesPerView:1,slidesPerColumn:1,slidesPerColumnFill:"column",slidesPerGroup:1,centeredSlides:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,watchOverflow:!1,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:0,touchMoveStopPropagation:!0,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,watchSlidesVisibility:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,preloadImages:!0,updateOnImagesReady:!0,loop:!1,loopAdditionalSlides:0,loopedSlides:null,loopFillGroupWithBlank:!1,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,containerModifierClass:"swiper-container-",slideClass:"swiper-slide",slideBlankClass:"swiper-slide-invisible-blank",slideActiveClass:"swiper-slide-active",slideDuplicateActiveClass:"swiper-slide-duplicate-active",slideVisibleClass:"swiper-slide-visible",slideDuplicateClass:"swiper-slide-duplicate",slideNextClass:"swiper-slide-next",slideDuplicateNextClass:"swiper-slide-duplicate-next",slidePrevClass:"swiper-slide-prev",slideDuplicatePrevClass:"swiper-slide-duplicate-prev",wrapperClass:"swiper-wrapper",runCallbacksOnInit:!0},M={update:u,translate:v,transition:f,slide:m,loop:g,grabCursor:b,manipulation:w,events:E,breakpoints:T,checkOverflow:{checkOverflow:function(){var
e=this.isLocked;this.isLocked=1===this.snapGrid.length,this.allowTouchMove=!this.isLocked,e&&e!==this.isLocked&&(this.isEnd=!1,this.navigation.update())}},classes:{addClasses:function(){var
e=this.classNames,t=this.params,i=this.rtl,s=this.$el,a=[];a.push(t.direction),t.freeMode&&a.push("free-mode"),h.flexbox||a.push("no-flexbox"),t.autoHeight&&a.push("autoheight"),i&&a.push("rtl"),t.slidesPerColumn>1&&a.push("multirow"),y.android&&a.push("android"),y.ios&&a.push("ios"),S.isIE&&(h.pointerEvents||h.prefixedPointerEvents)&&a.push("wp8-"+t.direction),a.forEach(function(i){e.push(t.containerModifierClass+i)}),s.addClass(e.join("
"))},removeClasses:function(){var
e=this.$el,t=this.classNames;e.removeClass(t.join("
"))}},images:{loadImage:function(e,i,s,a,r,n){var o;function
l(){n&&n()}e.complete&&r?l():i?((o=new
t.Image).onload=l,o.onerror=l,a&&(o.sizes=a),s&&(o.srcset=s),i&&(o.src=i)):l()},preloadImages:function(){var
e=this;function t(){void
0!==e&&null!==e&&e&&!e.destroyed&&(void
0!==e.imagesLoaded&&(e.imagesLoaded+=1),e.imagesLoaded===e.imagesToLoad.length&&(e.params.updateOnImagesReady&&e.update(),e.emit("imagesReady")))}e.imagesToLoad=e.$el.find("img");for(var
i=0;i<e.imagesToLoad.length;i+=1){var
s=e.imagesToLoad[i];e.loadImage(s,s.currentSrc||s.getAttribute("src"),s.srcset||s.getAttribute("srcset"),s.sizes||s.getAttribute("sizes"),!0,t)}}}},z={},P=function(e){function
t(){for(var
i,a,r,n=[],o=arguments.length;o--;)n[o]=arguments[o];1===n.length&&n[0].constructor&&n[0].constructor===Object?r=n[0]:(a=(i=n)[0],r=i[1]),r||(r={}),r=d.extend({},r),a&&!r.el&&(r.el=a),e.call(this,r),Object.keys(M).forEach(function(e){Object.keys(M[e]).forEach(function(i){t.prototype[i]||(t.prototype[i]=M[e][i])})});var
l=this;void
0===l.modules&&(l.modules={}),Object.keys(l.modules).forEach(function(e){var
t=l.modules[e];if(t.params){var
i=Object.keys(t.params)[0],s=t.params[i];if("object"!=typeof
s)return;if(!(i in r&&"enabled"in
s))return;!0===r[i]&&(r[i]={enabled:!0}),"object"!=typeof
r[i]||"enabled"in
r[i]||(r[i].enabled=!0),r[i]||(r[i]={enabled:!1})}});var
p=d.extend({},C);l.useModulesParams(p),l.params=d.extend({},p,z,r),l.originalParams=d.extend({},l.params),l.passedParams=d.extend({},r),l.$=s;var
c=s(l.params.el);if(a=c[0]){if(c.length>1){var u=[];return
c.each(function(e,i){var s=d.extend({},r,{el:i});u.push(new
t(s))}),u}a.swiper=l,c.data("swiper",l);var
v,f,m=c.children("."+l.params.wrapperClass);return
d.extend(l,{$el:c,el:a,$wrapperEl:m,wrapperEl:m[0],classNames:[],slides:s(),slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal:function(){return"horizontal"===l.params.direction},isVertical:function(){return"vertical"===l.params.direction},rtl:"rtl"===a.dir.toLowerCase()||"rtl"===c.css("direction"),rtlTranslate:"horizontal"===l.params.direction&&("rtl"===a.dir.toLowerCase()||"rtl"===c.css("direction")),wrongRTL:"-webkit-box"===m.css("display"),activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,progress:0,velocity:0,animating:!1,allowSlideNext:l.params.allowSlideNext,allowSlidePrev:l.params.allowSlidePrev,touchEvents:(v=["touchstart","touchmove","touchend"],f=["mousedown","mousemove","mouseup"],h.pointerEvents?f=["pointerdown","pointermove","pointerup"]:h.prefixedPointerEvents&&(f=["MSPointerDown","MSPointerMove","MSPointerUp"]),l.touchEventsTouch={start:v[0],move:v[1],end:v[2]},l.touchEventsDesktop={start:f[0],move:f[1],end:f[2]},h.touch||!l.params.simulateTouch?l.touchEventsTouch:l.touchEventsDesktop),touchEventsData:{isTouched:void
0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void
0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void
0,allowThresholdMove:void 0,formElements:"input, select, option,
textarea, button, video",lastClickTime:d.now(),clickTimeout:void
0,velocities:[],allowMomentumBounce:void 0,isTouchEvent:void
0,startMoving:void
0},allowClick:!0,allowTouchMove:l.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),l.useModules(),l.params.init&&l.init(),l}}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var
i={extendedDefaults:{configurable:!0},defaults:{configurable:!0},Class:{configurable:!0},$:{configurable:!0}};return
t.prototype.slidesPerViewDynamic=function(){var
e=this.params,t=this.slides,i=this.slidesGrid,s=this.size,a=this.activeIndex,r=1;if(e.centeredSlides){for(var
n,o=t[a].swiperSlideSize,l=a+1;l<t.length;l+=1)t[l]&&!n&&(r+=1,(o+=t[l].swiperSlideSize)>s&&(n=!0));for(var
d=a-1;d>=0;d-=1)t[d]&&!n&&(r+=1,(o+=t[d].swiperSlideSize)>s&&(n=!0))}else
for(var h=a+1;h<t.length;h+=1)i[h]-i[a]<s&&(r+=1);return
r},t.prototype.update=function(){var
e=this;e&&!e.destroyed&&(e.updateSize(),e.updateSlides(),e.updateProgress(),e.updateSlidesClasses(),e.params.freeMode?(t(),e.params.autoHeight&&e.updateAutoHeight()):(("auto"===e.params.slidesPerView||e.params.slidesPerView>1)&&e.isEnd&&!e.params.centeredSlides?e.slideTo(e.slides.length-1,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0))||t(),e.emit("update"));function
t(){var
t=e.rtlTranslate?-1*e.translate:e.translate,i=Math.min(Math.max(t,e.maxTranslate()),e.minTranslate());e.setTranslate(i),e.updateActiveIndex(),e.updateSlidesClasses()}},t.prototype.init=function(){this.initialized||(this.emit("beforeInit"),this.params.breakpoints&&this.setBreakpoint(),this.addClasses(),this.params.loop&&this.loopCreate(),this.updateSize(),this.updateSlides(),this.params.watchOverflow&&this.checkOverflow(),this.params.grabCursor&&this.setGrabCursor(),this.params.preloadImages&&this.preloadImages(),this.params.loop?this.slideTo(this.params.initialSlide+this.loopedSlides,0,this.params.runCallbacksOnInit):this.slideTo(this.params.initialSlide,0,this.params.runCallbacksOnInit),this.attachEvents(),this.initialized=!0,this.emit("init"))},t.prototype.destroy=function(e,t){void
0===e&&(e=!0),void 0===t&&(t=!0);var
i=this,s=i.params,a=i.$el,r=i.$wrapperEl,n=i.slides;i.emit("beforeDestroy"),i.initialized=!1,i.detachEvents(),s.loop&&i.loopDestroy(),t&&(i.removeClasses(),a.removeAttr("style"),r.removeAttr("style"),n&&n.length&&n.removeClass([s.slideVisibleClass,s.slideActiveClass,s.slideNextClass,s.slidePrevClass].join("
")).removeAttr("style").removeAttr("data-swiper-slide-index").removeAttr("data-swiper-column").removeAttr("data-swiper-row")),i.emit("destroy"),Object.keys(i.eventsListeners).forEach(function(e){i.off(e)}),!1!==e&&(i.$el[0].swiper=null,i.$el.data("swiper",null),d.deleteProps(i)),i.destroyed=!0},t.extendDefaults=function(e){d.extend(z,e)},i.extendedDefaults.get=function(){return
z},i.defaults.get=function(){return C},i.Class.get=function(){return
e},i.$.get=function(){return
s},Object.defineProperties(t,i),t}(p),k={name:"device",proto:{device:y},static:{device:y}},$={name:"support",proto:{support:h},static:{support:h}},L={name:"browser",proto:{browser:S},static:{browser:S}},I={name:"resize",create:function(){var
e=this;d.extend(e,{resize:{resizeHandler:function(){e&&!e.destroyed&&e.initialized&&(e.emit("beforeResize"),e.emit("resize"))},orientationChangeHandler:function(){e&&!e.destroyed&&e.initialized&&e.emit("orientationchange")}}})},on:{init:function(){t.addEventListener("resize",this.resize.resizeHandler),t.addEventListener("orientationchange",this.resize.orientationChangeHandler)},destroy:function(){t.removeEventListener("resize",this.resize.resizeHandler),t.removeEventListener("orientationchange",this.resize.orientationChangeHandler)}}},D={func:t.MutationObserver||t.WebkitMutationObserver,attach:function(e,t){void
0===t&&(t={});var
i=this,s=new(0,D.func)(function(e){e.forEach(function(e){i.emit("observerUpdate",e)})});s.observe(e,{attributes:void
0===t.attributes||t.attributes,childList:void
0===t.childList||t.childList,characterData:void
0===t.characterData||t.characterData}),i.observer.observers.push(s)},init:function(){if(h.observer&&this.params.observer){if(this.params.observeParents)for(var
e=this.$el.parents(),t=0;t<e.length;t+=1)this.observer.attach(e[t]);this.observer.attach(this.$el[0],{childList:!1}),this.observer.attach(this.$wrapperEl[0],{attributes:!1})}},destroy:function(){this.observer.observers.forEach(function(e){e.disconnect()}),this.observer.observers=[]}},O={name:"observer",params:{observer:!1,observeParents:!1},create:function(){d.extend(this,{observer:{init:D.init.bind(this),attach:D.attach.bind(this),destroy:D.destroy.bind(this),observers:[]}})},on:{init:function(){this.observer.init()},destroy:function(){this.observer.destroy()}}},A={update:function(e){var
t=this,i=t.params,s=i.slidesPerView,a=i.slidesPerGroup,r=i.centeredSlides,n=t.virtual,o=n.from,l=n.to,h=n.slides,p=n.slidesGrid,c=n.renderSlide,u=n.offset;t.updateActiveIndex();var
v,f,m,g=t.activeIndex||0;v=t.rtlTranslate?"right":t.isHorizontal()?"left":"top",r?(f=Math.floor(s/2)+a,m=Math.floor(s/2)+a):(f=s+(a-1),m=a);var
b=Math.max((g||0)-m,0),w=Math.min((g||0)+f,h.length-1),y=(t.slidesGrid[b]||0)-(t.slidesGrid[0]||0);function
x(){t.updateSlides(),t.updateProgress(),t.updateSlidesClasses(),t.lazy&&t.params.lazy.enabled&&t.lazy.load()}if(d.extend(t.virtual,{from:b,to:w,offset:y,slidesGrid:t.slidesGrid}),o===b&&l===w&&!e)return
t.slidesGrid!==p&&y!==u&&t.slides.css(v,y+"px"),void
t.updateProgress();if(t.params.virtual.renderExternal)return
t.params.virtual.renderExternal.call(t,{offset:y,from:b,to:w,slides:function(){for(var
e=[],t=b;t<=w;t+=1)e.push(h[t]);return e}()}),void x();var
E=[],T=[];if(e)t.$wrapperEl.find("."+t.params.slideClass).remove();else
for(var
S=o;S<=l;S+=1)(S<b||S>w)&&t.$wrapperEl.find("."+t.params.slideClass+'[data-swiper-slide-index="'+S+'"]').remove();for(var
C=0;C<h.length;C+=1)C>=b&&C<=w&&(void
0===l||e?T.push(C):(C>l&&T.push(C),C<o&&E.push(C)));T.forEach(function(e){t.$wrapperEl.append(c(h[e],e))}),E.sort(function(e,t){return
e<t}).forEach(function(e){t.$wrapperEl.prepend(c(h[e],e))}),t.$wrapperEl.children(".swiper-slide").css(v,y+"px"),x()},renderSlide:function(e,t){var
i=this.params.virtual;if(i.cache&&this.virtual.cache[t])return
this.virtual.cache[t];var
a=i.renderSlide?s(i.renderSlide.call(this,e,t)):s('<div
class="'+this.params.slideClass+'"
data-swiper-slide-index="'+t+'">'+e+"</div>");return
a.attr("data-swiper-slide-index")||a.attr("data-swiper-slide-index",t),i.cache&&(this.virtual.cache[t]=a),a},appendSlide:function(e){this.virtual.slides.push(e),this.virtual.update(!0)},prependSlide:function(e){if(this.virtual.slides.unshift(e),this.params.virtual.cache){var
t=this.virtual.cache,i={};Object.keys(t).forEach(function(e){i[e+1]=t[e]}),this.virtual.cache=i}this.virtual.update(!0),this.slideNext(0)}},H={name:"virtual",params:{virtual:{enabled:!1,slides:[],cache:!0,renderSlide:null,renderExternal:null}},create:function(){d.extend(this,{virtual:{update:A.update.bind(this),appendSlide:A.appendSlide.bind(this),prependSlide:A.prependSlide.bind(this),renderSlide:A.renderSlide.bind(this),slides:this.params.virtual.slides,cache:{}}})},on:{beforeInit:function(){if(this.params.virtual.enabled){this.classNames.push(this.params.containerModifierClass+"virtual");var
e={watchSlidesProgress:!0};d.extend(this.params,e),d.extend(this.originalParams,e),this.virtual.update()}},setTranslate:function(){this.params.virtual.enabled&&this.virtual.update()}}},N={handle:function(i){var
s=this.rtlTranslate,a=i;a.originalEvent&&(a=a.originalEvent);var
r=a.keyCode||a.charCode;if(!this.allowSlideNext&&(this.isHorizontal()&&39===r||this.isVertical()&&40===r))return!1;if(!this.allowSlidePrev&&(this.isHorizontal()&&37===r||this.isVertical()&&38===r))return!1;if(!(a.shiftKey||a.altKey||a.ctrlKey||a.metaKey||e.activeElement&&e.activeElement.nodeName&&("input"===e.activeElement.nodeName.toLowerCase()||"textarea"===e.activeElement.nodeName.toLowerCase()))){if(this.params.keyboard.onlyInViewport&&(37===r||39===r||38===r||40===r)){var
n=!1;if(this.$el.parents("."+this.params.slideClass).length>0&&0===this.$el.parents("."+this.params.slideActiveClass).length)return;var
o=t.innerWidth,l=t.innerHeight,d=this.$el.offset();s&&(d.left-=this.$el[0].scrollLeft);for(var
h=[[d.left,d.top],[d.left+this.width,d.top],[d.left,d.top+this.height],[d.left+this.width,d.top+this.height]],p=0;p<h.length;p+=1){var
c=h[p];c[0]>=0&&c[0]<=o&&c[1]>=0&&c[1]<=l&&(n=!0)}if(!n)return}this.isHorizontal()?(37!==r&&39!==r||(a.preventDefault?a.preventDefault():a.returnValue=!1),(39===r&&!s||37===r&&s)&&this.slideNext(),(37===r&&!s||39===r&&s)&&this.slidePrev()):(38!==r&&40!==r||(a.preventDefault?a.preventDefault():a.returnValue=!1),40===r&&this.slideNext(),38===r&&this.slidePrev()),this.emit("keyPress",r)}},enable:function(){this.keyboard.enabled||(s(e).on("keydown",this.keyboard.handle),this.keyboard.enabled=!0)},disable:function(){this.keyboard.enabled&&(s(e).off("keydown",this.keyboard.handle),this.keyboard.enabled=!1)}},B={name:"keyboard",params:{keyboard:{enabled:!1,onlyInViewport:!0}},create:function(){d.extend(this,{keyboard:{enabled:!1,enable:N.enable.bind(this),disable:N.disable.bind(this),handle:N.handle.bind(this)}})},on:{init:function(){this.params.keyboard.enabled&&this.keyboard.enable()},destroy:function(){this.keyboard.enabled&&this.keyboard.disable()}}};var
G={lastScrollTime:d.now(),event:t.navigator.userAgent.indexOf("firefox")>-1?"DOMMouseScroll":function(){var
t="onwheel"in e;if(!t){var
i=e.createElement("div");i.setAttribute("onwheel","return;"),t="function"==typeof
i.onwheel}return!t&&e.implementation&&e.implementation.hasFeature&&!0!==e.implementation.hasFeature("","")&&(t=e.implementation.hasFeature("Events.wheel","3.0")),t}()?"wheel":"mousewheel",normalize:function(e){var
t=0,i=0,s=0,a=0;return"detail"in
e&&(i=e.detail),"wheelDelta"in
e&&(i=-e.wheelDelta/120),"wheelDeltaY"in
e&&(i=-e.wheelDeltaY/120),"wheelDeltaX"in
e&&(t=-e.wheelDeltaX/120),"axis"in
e&&e.axis===e.HORIZONTAL_AXIS&&(t=i,i=0),s=10*t,a=10*i,"deltaY"in
e&&(a=e.deltaY),"deltaX"in
e&&(s=e.deltaX),(s||a)&&e.deltaMode&&(1===e.deltaMode?(s*=40,a*=40):(s*=800,a*=800)),s&&!t&&(t=s<1?-1:1),a&&!i&&(i=a<1?-1:1),{spinX:t,spinY:i,pixelX:s,pixelY:a}},handleMouseEnter:function(){this.mouseEntered=!0},handleMouseLeave:function(){this.mouseEntered=!1},handle:function(e){var
i=e,s=this,a=s.params.mousewheel;if(!s.mouseEntered&&!a.releaseOnEdges)return!0;i.originalEvent&&(i=i.originalEvent);var
r=0,n=s.rtlTranslate?-1:1,o=G.normalize(i);if(a.forceToAxis)if(s.isHorizontal()){if(!(Math.abs(o.pixelX)>Math.abs(o.pixelY)))return!0;r=o.pixelX*n}else{if(!(Math.abs(o.pixelY)>Math.abs(o.pixelX)))return!0;r=o.pixelY}else
r=Math.abs(o.pixelX)>Math.abs(o.pixelY)?-o.pixelX*n:-o.pixelY;if(0===r)return!0;if(a.invert&&(r=-r),s.params.freeMode){var
l=s.getTranslate()+r*a.sensitivity,h=s.isBeginning,p=s.isEnd;if(l>=s.minTranslate()&&(l=s.minTranslate()),l<=s.maxTranslate()&&(l=s.maxTranslate()),s.setTransition(0),s.setTranslate(l),s.updateProgress(),s.updateActiveIndex(),s.updateSlidesClasses(),(!h&&s.isBeginning||!p&&s.isEnd)&&s.updateSlidesClasses(),s.params.freeModeSticky&&(clearTimeout(s.mousewheel.timeout),s.mousewheel.timeout=d.nextTick(function(){s.slideToClosest()},300)),s.emit("scroll",i),s.params.autoplay&&s.params.autoplayDisableOnInteraction&&s.stopAutoplay(),l===s.minTranslate()||l===s.maxTranslate())return!0}else{if(d.now()-s.mousewheel.lastScrollTime>60)if(r<0)if(s.isEnd&&!s.params.loop||s.animating){if(a.releaseOnEdges)return!0}else
s.slideNext(),s.emit("scroll",i);else
if(s.isBeginning&&!s.params.loop||s.animating){if(a.releaseOnEdges)return!0}else
s.slidePrev(),s.emit("scroll",i);s.mousewheel.lastScrollTime=(new
t.Date).getTime()}return
i.preventDefault?i.preventDefault():i.returnValue=!1,!1},enable:function(){if(!G.event)return!1;if(this.mousewheel.enabled)return!1;var
e=this.$el;return"container"!==this.params.mousewheel.eventsTarged&&(e=s(this.params.mousewheel.eventsTarged)),e.on("mouseenter",this.mousewheel.handleMouseEnter),e.on("mouseleave",this.mousewheel.handleMouseLeave),e.on(G.event,this.mousewheel.handle),this.mousewheel.enabled=!0,!0},disable:function(){if(!G.event)return!1;if(!this.mousewheel.enabled)return!1;var
e=this.$el;return"container"!==this.params.mousewheel.eventsTarged&&(e=s(this.params.mousewheel.eventsTarged)),e.off(G.event,this.mousewheel.handle),this.mousewheel.enabled=!1,!0}},X={update:function(){var
e=this.params.navigation;if(!this.params.loop){var
t=this.navigation,i=t.$nextEl,s=t.$prevEl;s&&s.length>0&&(this.isBeginning?s.addClass(e.disabledClass):s.removeClass(e.disabledClass),s[this.params.watchOverflow&&this.isLocked?"addClass":"removeClass"](e.lockClass)),i&&i.length>0&&(this.isEnd?i.addClass(e.disabledClass):i.removeClass(e.disabledClass),i[this.params.watchOverflow&&this.isLocked?"addClass":"removeClass"](e.lockClass))}},init:function(){var
e,t,i=this,a=i.params.navigation;(a.nextEl||a.prevEl)&&(a.nextEl&&(e=s(a.nextEl),i.params.uniqueNavElements&&"string"==typeof
a.nextEl&&e.length>1&&1===i.$el.find(a.nextEl).length&&(e=i.$el.find(a.nextEl))),a.prevEl&&(t=s(a.prevEl),i.params.uniqueNavElements&&"string"==typeof
a.prevEl&&t.length>1&&1===i.$el.find(a.prevEl).length&&(t=i.$el.find(a.prevEl))),e&&e.length>0&&e.on("click",function(e){e.preventDefault(),i.isEnd&&!i.params.loop||i.slideNext()}),t&&t.length>0&&t.on("click",function(e){e.preventDefault(),i.isBeginning&&!i.params.loop||i.slidePrev()}),d.extend(i.navigation,{$nextEl:e,nextEl:e&&e[0],$prevEl:t,prevEl:t&&t[0]}))},destroy:function(){var
e=this.navigation,t=e.$nextEl,i=e.$prevEl;t&&t.length&&(t.off("click"),t.removeClass(this.params.navigation.disabledClass)),i&&i.length&&(i.off("click"),i.removeClass(this.params.navigation.disabledClass))}},Y={update:function(){var
e=this.rtl,t=this.params.pagination;if(t.el&&this.pagination.el&&this.pagination.$el&&0!==this.pagination.$el.length){var
i,a=this.virtual&&this.params.virtual.enabled?this.virtual.slides.length:this.slides.length,r=this.pagination.$el,n=this.params.loop?Math.ceil((a-2*this.loopedSlides)/this.params.slidesPerGroup):this.snapGrid.length;if(this.params.loop?((i=Math.ceil((this.activeIndex-this.loopedSlides)/this.params.slidesPerGroup))>a-1-2*this.loopedSlides&&(i-=a-2*this.loopedSlides),i>n-1&&(i-=n),i<0&&"bullets"!==this.params.paginationType&&(i=n+i)):i=void
0!==this.snapIndex?this.snapIndex:this.activeIndex||0,"bullets"===t.type&&this.pagination.bullets&&this.pagination.bullets.length>0){var
o,l,d,h=this.pagination.bullets;if(t.dynamicBullets&&(this.pagination.bulletSize=h.eq(0)[this.isHorizontal()?"outerWidth":"outerHeight"](!0),r.css(this.isHorizontal()?"width":"height",this.pagination.bulletSize*(t.dynamicMainBullets+4)+"px"),t.dynamicMainBullets>1&&void
0!==this.previousIndex&&(this.pagination.dynamicBulletIndex+=i-this.previousIndex,this.pagination.dynamicBulletIndex>t.dynamicMainBullets-1?this.pagination.dynamicBulletIndex=t.dynamicMainBullets-1:this.pagination.dynamicBulletIndex<0&&(this.pagination.dynamicBulletIndex=0)),o=i-this.pagination.dynamicBulletIndex,d=((l=o+(Math.min(h.length,t.dynamicMainBullets)-1))+o)/2),h.removeClass(t.bulletActiveClass+"
"+t.bulletActiveClass+"-next
"+t.bulletActiveClass+"-next-next
"+t.bulletActiveClass+"-prev
"+t.bulletActiveClass+"-prev-prev
"+t.bulletActiveClass+"-main"),r.length>1)h.each(function(e,a){var
r=s(a),n=r.index();n===i&&r.addClass(t.bulletActiveClass),t.dynamicBullets&&(n>=o&&n<=l&&r.addClass(t.bulletActiveClass+"-main"),n===o&&r.prev().addClass(t.bulletActiveClass+"-prev").prev().addClass(t.bulletActiveClass+"-prev-prev"),n===l&&r.next().addClass(t.bulletActiveClass+"-next").next().addClass(t.bulletActiveClass+"-next-next"))});else
if(h.eq(i).addClass(t.bulletActiveClass),t.dynamicBullets){for(var
p=h.eq(o),c=h.eq(l),u=o;u<=l;u+=1)h.eq(u).addClass(t.bulletActiveClass+"-main");p.prev().addClass(t.bulletActiveClass+"-prev").prev().addClass(t.bulletActiveClass+"-prev-prev"),c.next().addClass(t.bulletActiveClass+"-next").next().addClass(t.bulletActiveClass+"-next-next")}if(t.dynamicBullets){var
v=Math.min(h.length,t.dynamicMainBullets+4),f=(this.pagination.bulletSize*v-this.pagination.bulletSize)/2-d*this.pagination.bulletSize,m=e?"right":"left";h.css(this.isHorizontal()?m:"top",f+"px")}}if("fraction"===t.type&&(r.find("."+t.currentClass).text(i+1),r.find("."+t.totalClass).text(n)),"progressbar"===t.type){var
g=(i+1)/n,b=g,w=1;this.isHorizontal()||(w=g,b=1),r.find("."+t.progressbarFillClass).transform("translate3d(0,0,0)
scaleX("+b+")
scaleY("+w+")").transition(this.params.speed)}"custom"===t.type&&t.renderCustom?(r.html(t.renderCustom(this,i+1,n)),this.emit("paginationRender",this,r[0])):this.emit("paginationUpdate",this,r[0]),r[this.params.watchOverflow&&this.isLocked?"addClass":"removeClass"](t.lockClass)}},render:function(){var
e=this.params.pagination;if(e.el&&this.pagination.el&&this.pagination.$el&&0!==this.pagination.$el.length){var
t=this.virtual&&this.params.virtual.enabled?this.virtual.slides.length:this.slides.length,i=this.pagination.$el,s="";if("bullets"===e.type){for(var
a=this.params.loop?Math.ceil((t-2*this.loopedSlides)/this.params.slidesPerGroup):this.snapGrid.length,r=0;r<a;r+=1)e.renderBullet?s+=e.renderBullet.call(this,r,e.bulletClass):s+="<"+e.bulletElement+'
class="'+e.bulletClass+'"></'+e.bulletElement+">";i.html(s),this.pagination.bullets=i.find("."+e.bulletClass)}"fraction"===e.type&&(s=e.renderFraction?e.renderFraction.call(this,e.currentClass,e.totalClass):'<span
class="'+e.currentClass+'"></span> / <span
class="'+e.totalClass+'"></span>',i.html(s)),"progressbar"===e.type&&(s=e.renderProgressbar?e.renderProgressbar.call(this,e.progressbarFillClass):'<span
class="'+e.progressbarFillClass+'"></span>',i.html(s)),"custom"!==e.type&&this.emit("paginationRender",this.pagination.$el[0])}},init:function(){var
e=this,t=e.params.pagination;if(t.el){var
i=s(t.el);0!==i.length&&(e.params.uniqueNavElements&&"string"==typeof
t.el&&i.length>1&&1===e.$el.find(t.el).length&&(i=e.$el.find(t.el)),"bullets"===t.type&&t.clickable&&i.addClass(t.clickableClass),i.addClass(t.modifierClass+t.type),"bullets"===t.type&&t.dynamicBullets&&(i.addClass(""+t.modifierClass+t.type+"-dynamic"),e.pagination.dynamicBulletIndex=0,t.dynamicMainBullets<1&&(t.dynamicMainBullets=1)),t.clickable&&i.on("click","."+t.bulletClass,function(t){t.preventDefault();var
i=s(this).index()*e.params.slidesPerGroup;e.params.loop&&(i+=e.loopedSlides),e.slideTo(i)}),d.extend(e.pagination,{$el:i,el:i[0]}))}},destroy:function(){var
e=this.params.pagination;if(e.el&&this.pagination.el&&this.pagination.$el&&0!==this.pagination.$el.length){var
t=this.pagination.$el;t.removeClass(e.hiddenClass),t.removeClass(e.modifierClass+e.type),this.pagination.bullets&&this.pagination.bullets.removeClass(e.bulletActiveClass),e.clickable&&t.off("click","."+e.bulletClass)}}},V={setTranslate:function(){if(this.params.scrollbar.el&&this.scrollbar.el){var
e=this.scrollbar,t=this.rtlTranslate,i=this.progress,s=e.dragSize,a=e.trackSize,r=e.$dragEl,n=e.$el,o=this.params.scrollbar,l=s,d=(a-s)*i;t?(d=-d)>0?(l=s-d,d=0):-d+s>a&&(l=a+d):d<0?(l=s+d,d=0):d+s>a&&(l=a-d),this.isHorizontal()?(h.transforms3d?r.transform("translate3d("+d+"px,
0,
0)"):r.transform("translateX("+d+"px)"),r[0].style.width=l+"px"):(h.transforms3d?r.transform("translate3d(0px,
"+d+"px,
0)"):r.transform("translateY("+d+"px)"),r[0].style.height=l+"px"),o.hide&&(clearTimeout(this.scrollbar.timeout),n[0].style.opacity=1,this.scrollbar.timeout=setTimeout(function(){n[0].style.opacity=0,n.transition(400)},1e3))}},setTransition:function(e){this.params.scrollbar.el&&this.scrollbar.el&&this.scrollbar.$dragEl.transition(e)},updateSize:function(){if(this.params.scrollbar.el&&this.scrollbar.el){var
e=this.scrollbar,t=e.$dragEl,i=e.$el;t[0].style.width="",t[0].style.height="";var
s,a=this.isHorizontal()?i[0].offsetWidth:i[0].offsetHeight,r=this.size/this.virtualSize,n=r*(a/this.size);s="auto"===this.params.scrollbar.dragSize?a*r:parseInt(this.params.scrollbar.dragSize,10),this.isHorizontal()?t[0].style.width=s+"px":t[0].style.height=s+"px",i[0].style.display=r>=1?"none":"",this.params.scrollbarHide&&(i[0].style.opacity=0),d.extend(e,{trackSize:a,divider:r,moveDivider:n,dragSize:s}),e.$el[this.params.watchOverflow&&this.isLocked?"addClass":"removeClass"](this.params.scrollbar.lockClass)}},setDragPosition:function(e){var
t,i=this.scrollbar,s=this.rtlTranslate,a=i.$el,r=i.dragSize,n=i.trackSize;t=((this.isHorizontal()?"touchstart"===e.type||"touchmove"===e.type?e.targetTouches[0].pageX:e.pageX||e.clientX:"touchstart"===e.type||"touchmove"===e.type?e.targetTouches[0].pageY:e.pageY||e.clientY)-a.offset()[this.isHorizontal()?"left":"top"]-r/2)/(n-r),t=Math.max(Math.min(t,1),0),s&&(t=1-t);var
o=this.minTranslate()+(this.maxTranslate()-this.minTranslate())*t;this.updateProgress(o),this.setTranslate(o),this.updateActiveIndex(),this.updateSlidesClasses()},onDragStart:function(e){var
t=this.params.scrollbar,i=this.scrollbar,s=this.$wrapperEl,a=i.$el,r=i.$dragEl;this.scrollbar.isTouched=!0,e.preventDefault(),e.stopPropagation(),s.transition(100),r.transition(100),i.setDragPosition(e),clearTimeout(this.scrollbar.dragTimeout),a.transition(0),t.hide&&a.css("opacity",1),this.emit("scrollbarDragStart",e)},onDragMove:function(e){var
t=this.scrollbar,i=this.$wrapperEl,s=t.$el,a=t.$dragEl;this.scrollbar.isTouched&&(e.preventDefault?e.preventDefault():e.returnValue=!1,t.setDragPosition(e),i.transition(0),s.transition(0),a.transition(0),this.emit("scrollbarDragMove",e))},onDragEnd:function(e){var
t=this.params.scrollbar,i=this.scrollbar.$el;this.scrollbar.isTouched&&(this.scrollbar.isTouched=!1,t.hide&&(clearTimeout(this.scrollbar.dragTimeout),this.scrollbar.dragTimeout=d.nextTick(function(){i.css("opacity",0),i.transition(400)},1e3)),this.emit("scrollbarDragEnd",e),t.snapOnRelease&&this.slideToClosest())},enableDraggable:function(){if(this.params.scrollbar.el){var
t=this.scrollbar,i=this.touchEvents,s=this.touchEventsDesktop,a=this.params,r=t.$el[0],n=!(!h.passiveListener||!a.passiveListener)&&{passive:!1,capture:!1},o=!(!h.passiveListener||!a.passiveListener)&&{passive:!0,capture:!1};h.touch||!h.pointerEvents&&!h.prefixedPointerEvents?(h.touch&&(r.addEventListener(i.start,this.scrollbar.onDragStart,n),r.addEventListener(i.move,this.scrollbar.onDragMove,n),r.addEventListener(i.end,this.scrollbar.onDragEnd,o)),(a.simulateTouch&&!y.ios&&!y.android||a.simulateTouch&&!h.touch&&y.ios)&&(r.addEventListener("mousedown",this.scrollbar.onDragStart,n),e.addEventListener("mousemove",this.scrollbar.onDragMove,n),e.addEventListener("mouseup",this.scrollbar.onDragEnd,o))):(r.addEventListener(s.start,this.scrollbar.onDragStart,n),e.addEventListener(s.move,this.scrollbar.onDragMove,n),e.addEventListener(s.end,this.scrollbar.onDragEnd,o))}},disableDraggable:function(){if(this.params.scrollbar.el){var
t=this.scrollbar,i=this.touchEvents,s=this.touchEventsDesktop,a=this.params,r=t.$el[0],n=!(!h.passiveListener||!a.passiveListener)&&{passive:!1,capture:!1},o=!(!h.passiveListener||!a.passiveListener)&&{passive:!0,capture:!1};h.touch||!h.pointerEvents&&!h.prefixedPointerEvents?(h.touch&&(r.removeEventListener(i.start,this.scrollbar.onDragStart,n),r.removeEventListener(i.move,this.scrollbar.onDragMove,n),r.removeEventListener(i.end,this.scrollbar.onDragEnd,o)),(a.simulateTouch&&!y.ios&&!y.android||a.simulateTouch&&!h.touch&&y.ios)&&(r.removeEventListener("mousedown",this.scrollbar.onDragStart,n),e.removeEventListener("mousemove",this.scrollbar.onDragMove,n),e.removeEventListener("mouseup",this.scrollbar.onDragEnd,o))):(r.removeEventListener(s.start,this.scrollbar.onDragStart,n),e.removeEventListener(s.move,this.scrollbar.onDragMove,n),e.removeEventListener(s.end,this.scrollbar.onDragEnd,o))}},init:function(){if(this.params.scrollbar.el){var
e=this.scrollbar,t=this.$el,i=this.params.scrollbar,a=s(i.el);this.params.uniqueNavElements&&"string"==typeof
i.el&&a.length>1&&1===t.find(i.el).length&&(a=t.find(i.el));var
r=a.find("."+this.params.scrollbar.dragClass);0===r.length&&(r=s('<div
class="'+this.params.scrollbar.dragClass+'"></div>'),a.append(r)),d.extend(e,{$el:a,el:a[0],$dragEl:r,dragEl:r[0]}),i.draggable&&e.enableDraggable()}},destroy:function(){this.scrollbar.disableDraggable()}},R={setTransform:function(e,t){var
i=this.rtl,a=s(e),r=i?-1:1,n=a.attr("data-swiper-parallax")||"0",o=a.attr("data-swiper-parallax-x"),l=a.attr("data-swiper-parallax-y"),d=a.attr("data-swiper-parallax-scale"),h=a.attr("data-swiper-parallax-opacity");if(o||l?(o=o||"0",l=l||"0"):this.isHorizontal()?(o=n,l="0"):(l=n,o="0"),o=o.indexOf("%")>=0?parseInt(o,10)*t*r+"%":o*t*r+"px",l=l.indexOf("%")>=0?parseInt(l,10)*t+"%":l*t+"px",void
0!==h&&null!==h){var
p=h-(h-1)*(1-Math.abs(t));a[0].style.opacity=p}if(void
0===d||null===d)a.transform("translate3d("+o+",
"+l+", 0px)");else{var
c=d-(d-1)*(1-Math.abs(t));a.transform("translate3d("+o+",
"+l+", 0px)
scale("+c+")")}},setTranslate:function(){var
e=this,t=e.$el,i=e.slides,a=e.progress,r=e.snapGrid;t.children("[data-swiper-parallax],
[data-swiper-parallax-x],
[data-swiper-parallax-y]").each(function(t,i){e.parallax.setTransform(i,a)}),i.each(function(t,i){var
n=i.progress;e.params.slidesPerGroup>1&&"auto"!==e.params.slidesPerView&&(n+=Math.ceil(t/2)-a*(r.length-1)),n=Math.min(Math.max(n,-1),1),s(i).find("[data-swiper-parallax],
[data-swiper-parallax-x],
[data-swiper-parallax-y]").each(function(t,i){e.parallax.setTransform(i,n)})})},setTransition:function(e){void
0===e&&(e=this.params.speed);this.$el.find("[data-swiper-parallax],
[data-swiper-parallax-x],
[data-swiper-parallax-y]").each(function(t,i){var
a=s(i),r=parseInt(a.attr("data-swiper-parallax-duration"),10)||e;0===e&&(r=0),a.transition(r)})}},F={getDistanceBetweenTouches:function(e){if(e.targetTouches.length<2)return
1;var
t=e.targetTouches[0].pageX,i=e.targetTouches[0].pageY,s=e.targetTouches[1].pageX,a=e.targetTouches[1].pageY;return
Math.sqrt(Math.pow(s-t,2)+Math.pow(a-i,2))},onGestureStart:function(e){var
t=this.params.zoom,i=this.zoom,a=i.gesture;if(i.fakeGestureTouched=!1,i.fakeGestureMoved=!1,!h.gestures){if("touchstart"!==e.type||"touchstart"===e.type&&e.targetTouches.length<2)return;i.fakeGestureTouched=!0,a.scaleStart=F.getDistanceBetweenTouches(e)}a.$slideEl&&a.$slideEl.length||(a.$slideEl=s(e.target).closest(".swiper-slide"),0===a.$slideEl.length&&(a.$slideEl=this.slides.eq(this.activeIndex)),a.$imageEl=a.$slideEl.find("img,
svg,
canvas"),a.$imageWrapEl=a.$imageEl.parent("."+t.containerClass),a.maxRatio=a.$imageWrapEl.attr("data-swiper-zoom")||t.maxRatio,0!==a.$imageWrapEl.length)?(a.$imageEl.transition(0),this.zoom.isScaling=!0):a.$imageEl=void
0},onGestureChange:function(e){var
t=this.params.zoom,i=this.zoom,s=i.gesture;if(!h.gestures){if("touchmove"!==e.type||"touchmove"===e.type&&e.targetTouches.length<2)return;i.fakeGestureMoved=!0,s.scaleMove=F.getDistanceBetweenTouches(e)}s.$imageEl&&0!==s.$imageEl.length&&(h.gestures?this.zoom.scale=e.scale*i.currentScale:i.scale=s.scaleMove/s.scaleStart*i.currentScale,i.scale>s.maxRatio&&(i.scale=s.maxRatio-1+Math.pow(i.scale-s.maxRatio+1,.5)),i.scale<t.minRatio&&(i.scale=t.minRatio+1-Math.pow(t.minRatio-i.scale+1,.5)),s.$imageEl.transform("translate3d(0,0,0)
scale("+i.scale+")"))},onGestureEnd:function(e){var
t=this.params.zoom,i=this.zoom,s=i.gesture;if(!h.gestures){if(!i.fakeGestureTouched||!i.fakeGestureMoved)return;if("touchend"!==e.type||"touchend"===e.type&&e.changedTouches.length<2&&!y.android)return;i.fakeGestureTouched=!1,i.fakeGestureMoved=!1}s.$imageEl&&0!==s.$imageEl.length&&(i.scale=Math.max(Math.min(i.scale,s.maxRatio),t.minRatio),s.$imageEl.transition(this.params.speed).transform("translate3d(0,0,0)
scale("+i.scale+")"),i.currentScale=i.scale,i.isScaling=!1,1===i.scale&&(s.$slideEl=void
0))},onTouchStart:function(e){var
t=this.zoom,i=t.gesture,s=t.image;i.$imageEl&&0!==i.$imageEl.length&&(s.isTouched||(y.android&&e.preventDefault(),s.isTouched=!0,s.touchesStart.x="touchstart"===e.type?e.targetTouches[0].pageX:e.pageX,s.touchesStart.y="touchstart"===e.type?e.targetTouches[0].pageY:e.pageY))},onTouchMove:function(e){var
t=this.zoom,i=t.gesture,s=t.image,a=t.velocity;if(i.$imageEl&&0!==i.$imageEl.length&&(this.allowClick=!1,s.isTouched&&i.$slideEl)){s.isMoved||(s.width=i.$imageEl[0].offsetWidth,s.height=i.$imageEl[0].offsetHeight,s.startX=d.getTranslate(i.$imageWrapEl[0],"x")||0,s.startY=d.getTranslate(i.$imageWrapEl[0],"y")||0,i.slideWidth=i.$slideEl[0].offsetWidth,i.slideHeight=i.$slideEl[0].offsetHeight,i.$imageWrapEl.transition(0),this.rtl&&(s.startX=-s.startX,s.startY=-s.startY));var
r=s.width*t.scale,n=s.height*t.scale;if(!(r<i.slideWidth&&n<i.slideHeight)){if(s.minX=Math.min(i.slideWidth/2-r/2,0),s.maxX=-s.minX,s.minY=Math.min(i.slideHeight/2-n/2,0),s.maxY=-s.minY,s.touchesCurrent.x="touchmove"===e.type?e.targetTouches[0].pageX:e.pageX,s.touchesCurrent.y="touchmove"===e.type?e.targetTouches[0].pageY:e.pageY,!s.isMoved&&!t.isScaling){if(this.isHorizontal()&&(Math.floor(s.minX)===Math.floor(s.startX)&&s.touchesCurrent.x<s.touchesStart.x||Math.floor(s.maxX)===Math.floor(s.startX)&&s.touchesCurrent.x>s.touchesStart.x))return
void(s.isTouched=!1);if(!this.isHorizontal()&&(Math.floor(s.minY)===Math.floor(s.startY)&&s.touchesCurrent.y<s.touchesStart.y||Math.floor(s.maxY)===Math.floor(s.startY)&&s.touchesCurrent.y>s.touchesStart.y))return
void(s.isTouched=!1)}e.preventDefault(),e.stopPropagation(),s.isMoved=!0,s.currentX=s.touchesCurrent.x-s.touchesStart.x+s.startX,s.currentY=s.touchesCurrent.y-s.touchesStart.y+s.startY,s.currentX<s.minX&&(s.currentX=s.minX+1-Math.pow(s.minX-s.currentX+1,.8)),s.currentX>s.maxX&&(s.currentX=s.maxX-1+Math.pow(s.currentX-s.maxX+1,.8)),s.currentY<s.minY&&(s.currentY=s.minY+1-Math.pow(s.minY-s.currentY+1,.8)),s.currentY>s.maxY&&(s.currentY=s.maxY-1+Math.pow(s.currentY-s.maxY+1,.8)),a.prevPositionX||(a.prevPositionX=s.touchesCurrent.x),a.prevPositionY||(a.prevPositionY=s.touchesCurrent.y),a.prevTime||(a.prevTime=Date.now()),a.x=(s.touchesCurrent.x-a.prevPositionX)/(Date.now()-a.prevTime)/2,a.y=(s.touchesCurrent.y-a.prevPositionY)/(Date.now()-a.prevTime)/2,Math.abs(s.touchesCurrent.x-a.prevPositionX)<2&&(a.x=0),Math.abs(s.touchesCurrent.y-a.prevPositionY)<2&&(a.y=0),a.prevPositionX=s.touchesCurrent.x,a.prevPositionY=s.touchesCurrent.y,a.prevTime=Date.now(),i.$imageWrapEl.transform("translate3d("+s.currentX+"px,
"+s.currentY+"px,0)")}}},onTouchEnd:function(){var
e=this.zoom,t=e.gesture,i=e.image,s=e.velocity;if(t.$imageEl&&0!==t.$imageEl.length){if(!i.isTouched||!i.isMoved)return
i.isTouched=!1,void(i.isMoved=!1);i.isTouched=!1,i.isMoved=!1;var
a=300,r=300,n=s.x*a,o=i.currentX+n,l=s.y*r,d=i.currentY+l;0!==s.x&&(a=Math.abs((o-i.currentX)/s.x)),0!==s.y&&(r=Math.abs((d-i.currentY)/s.y));var
h=Math.max(a,r);i.currentX=o,i.currentY=d;var
p=i.width*e.scale,c=i.height*e.scale;i.minX=Math.min(t.slideWidth/2-p/2,0),i.maxX=-i.minX,i.minY=Math.min(t.slideHeight/2-c/2,0),i.maxY=-i.minY,i.currentX=Math.max(Math.min(i.currentX,i.maxX),i.minX),i.currentY=Math.max(Math.min(i.currentY,i.maxY),i.minY),t.$imageWrapEl.transition(h).transform("translate3d("+i.currentX+"px,
"+i.currentY+"px,0)")}},onTransitionEnd:function(){var
e=this.zoom,t=e.gesture;t.$slideEl&&this.previousIndex!==this.activeIndex&&(t.$imageEl.transform("translate3d(0,0,0)
scale(1)"),t.$imageWrapEl.transform("translate3d(0,0,0)"),t.$slideEl=void
0,t.$imageEl=void 0,t.$imageWrapEl=void
0,e.scale=1,e.currentScale=1)},toggle:function(e){var
t=this.zoom;t.scale&&1!==t.scale?t.out():t.in(e)},in:function(e){var
t,i,a,r,n,o,l,d,h,p,c,u,v,f,m,g,b=this.zoom,w=this.params.zoom,y=b.gesture,x=b.image;(y.$slideEl||(y.$slideEl=this.clickedSlide?s(this.clickedSlide):this.slides.eq(this.activeIndex),y.$imageEl=y.$slideEl.find("img,
svg,
canvas"),y.$imageWrapEl=y.$imageEl.parent("."+w.containerClass)),y.$imageEl&&0!==y.$imageEl.length)&&(y.$slideEl.addClass(""+w.zoomedSlideClass),void
0===x.touchesStart.x&&e?(t="touchend"===e.type?e.changedTouches[0].pageX:e.pageX,i="touchend"===e.type?e.changedTouches[0].pageY:e.pageY):(t=x.touchesStart.x,i=x.touchesStart.y),b.scale=y.$imageWrapEl.attr("data-swiper-zoom")||w.maxRatio,b.currentScale=y.$imageWrapEl.attr("data-swiper-zoom")||w.maxRatio,e?(m=y.$slideEl[0].offsetWidth,g=y.$slideEl[0].offsetHeight,a=y.$slideEl.offset().left+m/2-t,r=y.$slideEl.offset().top+g/2-i,l=y.$imageEl[0].offsetWidth,d=y.$imageEl[0].offsetHeight,h=l*b.scale,p=d*b.scale,v=-(c=Math.min(m/2-h/2,0)),f=-(u=Math.min(g/2-p/2,0)),n=a*b.scale,o=r*b.scale,n<c&&(n=c),n>v&&(n=v),o<u&&(o=u),o>f&&(o=f)):(n=0,o=0),y.$imageWrapEl.transition(300).transform("translate3d("+n+"px,
"+o+"px,0)"),y.$imageEl.transition(300).transform("translate3d(0,0,0)
scale("+b.scale+")"))},out:function(){var
e=this.zoom,t=this.params.zoom,i=e.gesture;i.$slideEl||(i.$slideEl=this.clickedSlide?s(this.clickedSlide):this.slides.eq(this.activeIndex),i.$imageEl=i.$slideEl.find("img,
svg,
canvas"),i.$imageWrapEl=i.$imageEl.parent("."+t.containerClass)),i.$imageEl&&0!==i.$imageEl.length&&(e.scale=1,e.currentScale=1,i.$imageWrapEl.transition(300).transform("translate3d(0,0,0)"),i.$imageEl.transition(300).transform("translate3d(0,0,0)
scale(1)"),i.$slideEl.removeClass(""+t.zoomedSlideClass),i.$slideEl=void
0)},enable:function(){var e=this.zoom;if(!e.enabled){e.enabled=!0;var
t=!("touchstart"!==this.touchEvents.start||!h.passiveListener||!this.params.passiveListeners)&&{passive:!0,capture:!1};h.gestures?(this.$wrapperEl.on("gesturestart",".swiper-slide",e.onGestureStart,t),this.$wrapperEl.on("gesturechange",".swiper-slide",e.onGestureChange,t),this.$wrapperEl.on("gestureend",".swiper-slide",e.onGestureEnd,t)):"touchstart"===this.touchEvents.start&&(this.$wrapperEl.on(this.touchEvents.start,".swiper-slide",e.onGestureStart,t),this.$wrapperEl.on(this.touchEvents.move,".swiper-slide",e.onGestureChange,t),this.$wrapperEl.on(this.touchEvents.end,".swiper-slide",e.onGestureEnd,t)),this.$wrapperEl.on(this.touchEvents.move,"."+this.params.zoom.containerClass,e.onTouchMove)}},disable:function(){var
e=this.zoom;if(e.enabled){this.zoom.enabled=!1;var
t=!("touchstart"!==this.touchEvents.start||!h.passiveListener||!this.params.passiveListeners)&&{passive:!0,capture:!1};h.gestures?(this.$wrapperEl.off("gesturestart",".swiper-slide",e.onGestureStart,t),this.$wrapperEl.off("gesturechange",".swiper-slide",e.onGestureChange,t),this.$wrapperEl.off("gestureend",".swiper-slide",e.onGestureEnd,t)):"touchstart"===this.touchEvents.start&&(this.$wrapperEl.off(this.touchEvents.start,".swiper-slide",e.onGestureStart,t),this.$wrapperEl.off(this.touchEvents.move,".swiper-slide",e.onGestureChange,t),this.$wrapperEl.off(this.touchEvents.end,".swiper-slide",e.onGestureEnd,t)),this.$wrapperEl.off(this.touchEvents.move,"."+this.params.zoom.containerClass,e.onTouchMove)}}},W={loadInSlide:function(e,t){void
0===t&&(t=!0);var i=this,a=i.params.lazy;if(void
0!==e&&0!==i.slides.length){var
r=i.virtual&&i.params.virtual.enabled?i.$wrapperEl.children("."+i.params.slideClass+'[data-swiper-slide-index="'+e+'"]'):i.slides.eq(e),n=r.find("."+a.elementClass+":not(."+a.loadedClass+"):not(."+a.loadingClass+")");!r.hasClass(a.elementClass)||r.hasClass(a.loadedClass)||r.hasClass(a.loadingClass)||(n=n.add(r[0])),0!==n.length&&n.each(function(e,n){var
o=s(n);o.addClass(a.loadingClass);var
l=o.attr("data-background"),d=o.attr("data-src"),h=o.attr("data-srcset"),p=o.attr("data-sizes");i.loadImage(o[0],d||l,h,p,!1,function(){if(void
0!==i&&null!==i&&i&&(!i||i.params)&&!i.destroyed){if(l?(o.css("background-image",'url("'+l+'")'),o.removeAttr("data-background")):(h&&(o.attr("srcset",h),o.removeAttr("data-srcset")),p&&(o.attr("sizes",p),o.removeAttr("data-sizes")),d&&(o.attr("src",d),o.removeAttr("data-src"))),o.addClass(a.loadedClass).removeClass(a.loadingClass),r.find("."+a.preloaderClass).remove(),i.params.loop&&t){var
e=r.attr("data-swiper-slide-index");if(r.hasClass(i.params.slideDuplicateClass)){var
s=i.$wrapperEl.children('[data-swiper-slide-index="'+e+'"]:not(.'+i.params.slideDuplicateClass+")");i.lazy.loadInSlide(s.index(),!1)}else{var
n=i.$wrapperEl.children("."+i.params.slideDuplicateClass+'[data-swiper-slide-index="'+e+'"]');i.lazy.loadInSlide(n.index(),!1)}}i.emit("lazyImageReady",r[0],o[0])}}),i.emit("lazyImageLoad",r[0],o[0])})}},load:function(){var
e=this,t=e.$wrapperEl,i=e.params,a=e.slides,r=e.activeIndex,n=e.virtual&&i.virtual.enabled,o=i.lazy,l=i.slidesPerView;function
d(e){if(n){if(t.children("."+i.slideClass+'[data-swiper-slide-index="'+e+'"]').length)return!0}else
if(a[e])return!0;return!1}function h(e){return
n?s(e).attr("data-swiper-slide-index"):s(e).index()}if("auto"===l&&(l=0),e.lazy.initialImageLoaded||(e.lazy.initialImageLoaded=!0),e.params.watchSlidesVisibility)t.children("."+i.slideVisibleClass).each(function(t,i){var
a=n?s(i).attr("data-swiper-slide-index"):s(i).index();e.lazy.loadInSlide(a)});else
if(l>1)for(var
p=r;p<r+l;p+=1)d(p)&&e.lazy.loadInSlide(p);else
e.lazy.loadInSlide(r);if(o.loadPrevNext)if(l>1||o.loadPrevNextAmount&&o.loadPrevNextAmount>1){for(var
c=o.loadPrevNextAmount,u=l,v=Math.min(r+u+Math.max(c,u),a.length),f=Math.max(r-Math.max(u,c),0),m=r+l;m<v;m+=1)d(m)&&e.lazy.loadInSlide(m);for(var
g=f;g<r;g+=1)d(g)&&e.lazy.loadInSlide(g)}else{var
b=t.children("."+i.slideNextClass);b.length>0&&e.lazy.loadInSlide(h(b));var
w=t.children("."+i.slidePrevClass);w.length>0&&e.lazy.loadInSlide(h(w))}}},q={LinearSpline:function(e,t){var
i,s,a,r,n,o=function(e,t){for(s=-1,i=e.length;i-s>1;)e[a=i+s>>1]<=t?s=a:i=a;return
i};return
this.x=e,this.y=t,this.lastIndex=e.length-1,this.interpolate=function(e){return
e?(n=o(this.x,e),r=n-1,(e-this.x[r])*(this.y[n]-this.y[r])/(this.x[n]-this.x[r])+this.y[r]):0},this},getInterpolateFunction:function(e){this.controller.spline||(this.controller.spline=this.params.loop?new
q.LinearSpline(this.slidesGrid,e.slidesGrid):new
q.LinearSpline(this.snapGrid,e.snapGrid))},setTranslate:function(e,t){var
i,s,a=this,r=a.controller.control;function n(e){var
t=a.rtlTranslate?-a.translate:a.translate;"slide"===a.params.controller.by&&(a.controller.getInterpolateFunction(e),s=-a.controller.spline.interpolate(-t)),s&&"container"!==a.params.controller.by||(i=(e.maxTranslate()-e.minTranslate())/(a.maxTranslate()-a.minTranslate()),s=(t-a.minTranslate())*i+e.minTranslate()),a.params.controller.inverse&&(s=e.maxTranslate()-s),e.updateProgress(s),e.setTranslate(s,a),e.updateActiveIndex(),e.updateSlidesClasses()}if(Array.isArray(r))for(var
o=0;o<r.length;o+=1)r[o]!==t&&r[o]instanceof
P&&n(r[o]);else r instanceof
P&&t!==r&&n(r)},setTransition:function(e,t){var
i,s=this,a=s.controller.control;function
r(t){t.setTransition(e,s),0!==e&&(t.transitionStart(),t.$wrapperEl.transitionEnd(function(){a&&(t.params.loop&&"slide"===s.params.controller.by&&t.loopFix(),t.transitionEnd())}))}if(Array.isArray(a))for(i=0;i<a.length;i+=1)a[i]!==t&&a[i]instanceof
P&&r(a[i]);else a instanceof
P&&t!==a&&r(a)}},j={makeElFocusable:function(e){return
e.attr("tabIndex","0"),e},addElRole:function(e,t){return
e.attr("role",t),e},addElLabel:function(e,t){return
e.attr("aria-label",t),e},disableEl:function(e){return
e.attr("aria-disabled",!0),e},enableEl:function(e){return
e.attr("aria-disabled",!1),e},onEnterKey:function(e){var
t=this.params.a11y;if(13===e.keyCode){var
i=s(e.target);this.navigation&&this.navigation.$nextEl&&i.is(this.navigation.$nextEl)&&(this.isEnd&&!this.params.loop||this.slideNext(),this.isEnd?this.a11y.notify(t.lastSlideMessage):this.a11y.notify(t.nextSlideMessage)),this.navigation&&this.navigation.$prevEl&&i.is(this.navigation.$prevEl)&&(this.isBeginning&&!this.params.loop||this.slidePrev(),this.isBeginning?this.a11y.notify(t.firstSlideMessage):this.a11y.notify(t.prevSlideMessage)),this.pagination&&i.is("."+this.params.pagination.bulletClass)&&i[0].click()}},notify:function(e){var
t=this.a11y.liveRegion;0!==t.length&&(t.html(""),t.html(e))},updateNavigation:function(){if(!this.params.loop){var
e=this.navigation,t=e.$nextEl,i=e.$prevEl;i&&i.length>0&&(this.isBeginning?this.a11y.disableEl(i):this.a11y.enableEl(i)),t&&t.length>0&&(this.isEnd?this.a11y.disableEl(t):this.a11y.enableEl(t))}},updatePagination:function(){var
e=this,t=e.params.a11y;e.pagination&&e.params.pagination.clickable&&e.pagination.bullets&&e.pagination.bullets.length&&e.pagination.bullets.each(function(i,a){var
r=s(a);e.a11y.makeElFocusable(r),e.a11y.addElRole(r,"button"),e.a11y.addElLabel(r,t.paginationBulletMessage.replace(/{{index}}/,r.index()+1))})},init:function(){this.$el.append(this.a11y.liveRegion);var
e,t,i=this.params.a11y;this.navigation&&this.navigation.$nextEl&&(e=this.navigation.$nextEl),this.navigation&&this.navigation.$prevEl&&(t=this.navigation.$prevEl),e&&(this.a11y.makeElFocusable(e),this.a11y.addElRole(e,"button"),this.a11y.addElLabel(e,i.nextSlideMessage),e.on("keydown",this.a11y.onEnterKey)),t&&(this.a11y.makeElFocusable(t),this.a11y.addElRole(t,"button"),this.a11y.addElLabel(t,i.prevSlideMessage),t.on("keydown",this.a11y.onEnterKey)),this.pagination&&this.params.pagination.clickable&&this.pagination.bullets&&this.pagination.bullets.length&&this.pagination.$el.on("keydown","."+this.params.pagination.bulletClass,this.a11y.onEnterKey)},destroy:function(){var
e,t;this.a11y.liveRegion&&this.a11y.liveRegion.length>0&&this.a11y.liveRegion.remove(),this.navigation&&this.navigation.$nextEl&&(e=this.navigation.$nextEl),this.navigation&&this.navigation.$prevEl&&(t=this.navigation.$prevEl),e&&e.off("keydown",this.a11y.onEnterKey),t&&t.off("keydown",this.a11y.onEnterKey),this.pagination&&this.params.pagination.clickable&&this.pagination.bullets&&this.pagination.bullets.length&&this.pagination.$el.off("keydown","."+this.params.pagination.bulletClass,this.a11y.onEnterKey)}},K={init:function(){if(this.params.history){if(!t.history||!t.history.pushState)return
this.params.history.enabled=!1,void(this.params.hashNavigation.enabled=!0);var
e=this.history;e.initialized=!0,e.paths=K.getPathValues(),(e.paths.key||e.paths.value)&&(e.scrollToSlide(0,e.paths.value,this.params.runCallbacksOnInit),this.params.history.replaceState||t.addEventListener("popstate",this.history.setHistoryPopState))}},destroy:function(){this.params.history.replaceState||t.removeEventListener("popstate",this.history.setHistoryPopState)},setHistoryPopState:function(){this.history.paths=K.getPathValues(),this.history.scrollToSlide(this.params.speed,this.history.paths.value,!1)},getPathValues:function(){var
e=t.location.pathname.slice(1).split("/").filter(function(e){return""!==e}),i=e.length;return{key:e[i-2],value:e[i-1]}},setHistory:function(e,i){if(this.history.initialized&&this.params.history.enabled){var
s=this.slides.eq(i),a=K.slugify(s.attr("data-history"));t.location.pathname.includes(e)||(a=e+"/"+a);var
r=t.history.state;r&&r.value===a||(this.params.history.replaceState?t.history.replaceState({value:a},null,a):t.history.pushState({value:a},null,a))}},slugify:function(e){return
e.toString().toLowerCase().replace(/\s+/g,"-").replace(/[^\w-]+/g,"").replace(/--+/g,"-").replace(/^-+/,"").replace(/-+$/,"")},scrollToSlide:function(e,t,i){if(t)for(var
s=0,a=this.slides.length;s<a;s+=1){var
r=this.slides.eq(s);if(K.slugify(r.attr("data-history"))===t&&!r.hasClass(this.params.slideDuplicateClass)){var
n=r.index();this.slideTo(n,e,i)}}else
this.slideTo(0,e,i)}},U={onHashCange:function(){var
t=e.location.hash.replace("#","");t!==this.slides.eq(this.activeIndex).attr("data-hash")&&this.slideTo(this.$wrapperEl.children("."+this.params.slideClass+'[data-hash="'+t+'"]').index())},setHash:function(){if(this.hashNavigation.initialized&&this.params.hashNavigation.enabled)if(this.params.hashNavigation.replaceState&&t.history&&t.history.replaceState)t.history.replaceState(null,null,"#"+this.slides.eq(this.activeIndex).attr("data-hash")||"");else{var
i=this.slides.eq(this.activeIndex),s=i.attr("data-hash")||i.attr("data-history");e.location.hash=s||""}},init:function(){if(!(!this.params.hashNavigation.enabled||this.params.history&&this.params.history.enabled)){this.hashNavigation.initialized=!0;var
i=e.location.hash.replace("#","");if(i)for(var
a=0,r=this.slides.length;a<r;a+=1){var
n=this.slides.eq(a);if((n.attr("data-hash")||n.attr("data-history"))===i&&!n.hasClass(this.params.slideDuplicateClass)){var
o=n.index();this.slideTo(o,0,this.params.runCallbacksOnInit,!0)}}this.params.hashNavigation.watchState&&s(t).on("hashchange",this.hashNavigation.onHashCange)}},destroy:function(){this.params.hashNavigation.watchState&&s(t).off("hashchange",this.hashNavigation.onHashCange)}},_={run:function(){var
e=this,t=e.slides.eq(e.activeIndex),i=e.params.autoplay.delay;t.attr("data-swiper-autoplay")&&(i=t.attr("data-swiper-autoplay")||e.params.autoplay.delay),e.autoplay.timeout=d.nextTick(function(){e.params.autoplay.reverseDirection?e.params.loop?(e.loopFix(),e.slidePrev(e.params.speed,!0,!0),e.emit("autoplay")):e.isBeginning?e.params.autoplay.stopOnLastSlide?e.autoplay.stop():(e.slideTo(e.slides.length-1,e.params.speed,!0,!0),e.emit("autoplay")):(e.slidePrev(e.params.speed,!0,!0),e.emit("autoplay")):e.params.loop?(e.loopFix(),e.slideNext(e.params.speed,!0,!0),e.emit("autoplay")):e.isEnd?e.params.autoplay.stopOnLastSlide?e.autoplay.stop():(e.slideTo(0,e.params.speed,!0,!0),e.emit("autoplay")):(e.slideNext(e.params.speed,!0,!0),e.emit("autoplay"))},i)},start:function(){return
void
0===this.autoplay.timeout&&(!this.autoplay.running&&(this.autoplay.running=!0,this.emit("autoplayStart"),this.autoplay.run(),!0))},stop:function(){return!!this.autoplay.running&&(void
0!==this.autoplay.timeout&&(this.autoplay.timeout&&(clearTimeout(this.autoplay.timeout),this.autoplay.timeout=void
0),this.autoplay.running=!1,this.emit("autoplayStop"),!0))},pause:function(e){var
t=this;t.autoplay.running&&(t.autoplay.paused||(t.autoplay.timeout&&clearTimeout(t.autoplay.timeout),t.autoplay.paused=!0,0!==e&&t.params.autoplay.waitForTransition?t.$wrapperEl.transitionEnd(function(){t&&!t.destroyed&&(t.autoplay.paused=!1,t.autoplay.running?t.autoplay.run():t.autoplay.stop())}):(t.autoplay.paused=!1,t.autoplay.run())))}},Z={setTranslate:function(){for(var
e=this.slides,t=0;t<e.length;t+=1){var
i=this.slides.eq(t),s=-i[0].swiperSlideOffset;this.params.virtualTranslate||(s-=this.translate);var
a=0;this.isHorizontal()||(a=s,s=0);var
r=this.params.fadeEffect.crossFade?Math.max(1-Math.abs(i[0].progress),0):1+Math.min(Math.max(i[0].progress,-1),0);i.css({opacity:r}).transform("translate3d("+s+"px,
"+a+"px, 0px)")}},setTransition:function(e){var
t=this,i=t.slides,s=t.$wrapperEl;if(i.transition(e),t.params.virtualTranslate&&0!==e){var
a=!1;i.transitionEnd(function(){if(!a&&t&&!t.destroyed){a=!0,t.animating=!1;for(var
e=["webkitTransitionEnd","transitionend"],i=0;i<e.length;i+=1)s.trigger(e[i])}})}}},Q={setTranslate:function(){var
e,t=this.$el,i=this.$wrapperEl,a=this.slides,r=this.width,n=this.height,o=this.rtlTranslate,l=this.size,d=this.params.cubeEffect,h=this.isHorizontal(),p=this.virtual&&this.params.virtual.enabled,c=0;d.shadow&&(h?(0===(e=i.find(".swiper-cube-shadow")).length&&(e=s('<div
class="swiper-cube-shadow"></div>'),i.append(e)),e.css({height:r+"px"})):0===(e=t.find(".swiper-cube-shadow")).length&&(e=s('<div
class="swiper-cube-shadow"></div>'),t.append(e)));for(var
u=0;u<a.length;u+=1){var
v=a.eq(u),f=u;p&&(f=parseInt(v.attr("data-swiper-slide-index"),10));var
m=90*f,g=Math.floor(m/360);o&&(m=-m,g=Math.floor(-m/360));var
b=Math.max(Math.min(v[0].progress,1),-1),w=0,y=0,x=0;f%4==0?(w=4*-g*l,x=0):(f-1)%4==0?(w=0,x=4*-g*l):(f-2)%4==0?(w=l+4*g*l,x=l):(f-3)%4==0&&(w=-l,x=3*l+4*l*g),o&&(w=-w),h||(y=w,w=0);var
E="rotateX("+(h?0:-m)+"deg)
rotateY("+(h?m:0)+"deg) translate3d("+w+"px,
"+y+"px,
"+x+"px)";if(b<=1&&b>-1&&(c=90*f+90*b,o&&(c=90*-f-90*b)),v.transform(E),d.slideShadows){var
T=h?v.find(".swiper-slide-shadow-left"):v.find(".swiper-slide-shadow-top"),C=h?v.find(".swiper-slide-shadow-right"):v.find(".swiper-slide-shadow-bottom");0===T.length&&(T=s('<div
class="swiper-slide-shadow-'+(h?"left":"top")+'"></div>'),v.append(T)),0===C.length&&(C=s('<div
class="swiper-slide-shadow-'+(h?"right":"bottom")+'"></div>'),v.append(C)),T.length&&(T[0].style.opacity=Math.max(-b,0)),C.length&&(C[0].style.opacity=Math.max(b,0))}}if(i.css({"-webkit-transform-origin":"50%
50% -"+l/2+"px","-moz-transform-origin":"50%
50% -"+l/2+"px","-ms-transform-origin":"50%
50% -"+l/2+"px","transform-origin":"50% 50%
-"+l/2+"px"}),d.shadow)if(h)e.transform("translate3d(0px,
"+(r/2+d.shadowOffset)+"px, "+-r/2+"px) rotateX(90deg)
rotateZ(0deg) scale("+d.shadowScale+")");else{var
M=Math.abs(c)-90*Math.floor(Math.abs(c)/90),z=1.5-(Math.sin(2*M*Math.PI/360)/2+Math.cos(2*M*Math.PI/360)/2),P=d.shadowScale,k=d.shadowScale/z,$=d.shadowOffset;e.transform("scale3d("+P+",
1, "+k+") translate3d(0px, "+(n/2+$)+"px,
"+-n/2/k+"px) rotateX(-90deg)")}var
L=S.isSafari||S.isUiWebView?-l/2:0;i.transform("translate3d(0px,0,"+L+"px)
rotateX("+(this.isHorizontal()?0:c)+"deg)
rotateY("+(this.isHorizontal()?-c:0)+"deg)")},setTransition:function(e){var
t=this.$el;this.slides.transition(e).find(".swiper-slide-shadow-top,
.swiper-slide-shadow-right, .swiper-slide-shadow-bottom,
.swiper-slide-shadow-left").transition(e),this.params.cubeEffect.shadow&&!this.isHorizontal()&&t.find(".swiper-cube-shadow").transition(e)}},J={setTranslate:function(){for(var
e=this.slides,t=this.rtlTranslate,i=0;i<e.length;i+=1){var
a=e.eq(i),r=a[0].progress;this.params.flipEffect.limitRotation&&(r=Math.max(Math.min(a[0].progress,1),-1));var
n=-180*r,o=0,l=-a[0].swiperSlideOffset,d=0;if(this.isHorizontal()?t&&(n=-n):(d=l,l=0,o=-n,n=0),a[0].style.zIndex=-Math.abs(Math.round(r))+e.length,this.params.flipEffect.slideShadows){var
h=this.isHorizontal()?a.find(".swiper-slide-shadow-left"):a.find(".swiper-slide-shadow-top"),p=this.isHorizontal()?a.find(".swiper-slide-shadow-right"):a.find(".swiper-slide-shadow-bottom");0===h.length&&(h=s('<div
class="swiper-slide-shadow-'+(this.isHorizontal()?"left":"top")+'"></div>'),a.append(h)),0===p.length&&(p=s('<div
class="swiper-slide-shadow-'+(this.isHorizontal()?"right":"bottom")+'"></div>'),a.append(p)),h.length&&(h[0].style.opacity=Math.max(-r,0)),p.length&&(p[0].style.opacity=Math.max(r,0))}a.transform("translate3d("+l+"px,
"+d+"px, 0px) rotateX("+o+"deg)
rotateY("+n+"deg)")}},setTransition:function(e){var
t=this,i=t.slides,s=t.activeIndex,a=t.$wrapperEl;if(i.transition(e).find(".swiper-slide-shadow-top,
.swiper-slide-shadow-right, .swiper-slide-shadow-bottom,
.swiper-slide-shadow-left").transition(e),t.params.virtualTranslate&&0!==e){var
r=!1;i.eq(s).transitionEnd(function(){if(!r&&t&&!t.destroyed){r=!0,t.animating=!1;for(var
e=["webkitTransitionEnd","transitionend"],i=0;i<e.length;i+=1)a.trigger(e[i])}})}}},ee={setTranslate:function(){for(var
e=this.width,t=this.height,i=this.slides,a=this.$wrapperEl,r=this.slidesSizesGrid,n=this.params.coverflowEffect,o=this.isHorizontal(),l=this.translate,d=o?e/2-l:t/2-l,p=o?n.rotate:-n.rotate,c=n.depth,u=0,v=i.length;u<v;u+=1){var
f=i.eq(u),m=r[u],g=(d-f[0].swiperSlideOffset-m/2)/m*n.modifier,b=o?p*g:0,w=o?0:p*g,y=-c*Math.abs(g),x=o?0:n.stretch*g,E=o?n.stretch*g:0;Math.abs(E)<.001&&(E=0),Math.abs(x)<.001&&(x=0),Math.abs(y)<.001&&(y=0),Math.abs(b)<.001&&(b=0),Math.abs(w)<.001&&(w=0);var
T="translate3d("+E+"px,"+x+"px,"+y+"px)
rotateX("+w+"deg)
rotateY("+b+"deg)";if(f.transform(T),f[0].style.zIndex=1-Math.abs(Math.round(g)),n.slideShadows){var
S=o?f.find(".swiper-slide-shadow-left"):f.find(".swiper-slide-shadow-top"),C=o?f.find(".swiper-slide-shadow-right"):f.find(".swiper-slide-shadow-bottom");0===S.length&&(S=s('<div
class="swiper-slide-shadow-'+(o?"left":"top")+'"></div>'),f.append(S)),0===C.length&&(C=s('<div
class="swiper-slide-shadow-'+(o?"right":"bottom")+'"></div>'),f.append(C)),S.length&&(S[0].style.opacity=g>0?g:0),C.length&&(C[0].style.opacity=-g>0?-g:0)}}(h.pointerEvents||h.prefixedPointerEvents)&&(a[0].style.perspectiveOrigin=d+"px
50%")},setTransition:function(e){this.slides.transition(e).find(".swiper-slide-shadow-top,
.swiper-slide-shadow-right, .swiper-slide-shadow-bottom,
.swiper-slide-shadow-left").transition(e)}},te=[k,$,L,I,O,H,B,{name:"mousewheel",params:{mousewheel:{enabled:!1,releaseOnEdges:!1,invert:!1,forceToAxis:!1,sensitivity:1,eventsTarged:"container"}},create:function(){d.extend(this,{mousewheel:{enabled:!1,enable:G.enable.bind(this),disable:G.disable.bind(this),handle:G.handle.bind(this),handleMouseEnter:G.handleMouseEnter.bind(this),handleMouseLeave:G.handleMouseLeave.bind(this),lastScrollTime:d.now()}})},on:{init:function(){this.params.mousewheel.enabled&&this.mousewheel.enable()},destroy:function(){this.mousewheel.enabled&&this.mousewheel.disable()}}},{name:"navigation",params:{navigation:{nextEl:null,prevEl:null,hideOnClick:!1,disabledClass:"swiper-button-disabled",hiddenClass:"swiper-button-hidden",lockClass:"swiper-button-lock"}},create:function(){d.extend(this,{navigation:{init:X.init.bind(this),update:X.update.bind(this),destroy:X.destroy.bind(this)}})},on:{init:function(){this.navigation.init(),this.navigation.update()},toEdge:function(){this.navigation.update()},fromEdge:function(){this.navigation.update()},destroy:function(){this.navigation.destroy()},click:function(e){var
t=this.navigation,i=t.$nextEl,a=t.$prevEl;!this.params.navigation.hideOnClick||s(e.target).is(a)||s(e.target).is(i)||(i&&i.toggleClass(this.params.navigation.hiddenClass),a&&a.toggleClass(this.params.navigation.hiddenClass))}}},{name:"pagination",params:{pagination:{el:null,bulletElement:"span",clickable:!1,hideOnClick:!1,renderBullet:null,renderProgressbar:null,renderFraction:null,renderCustom:null,type:"bullets",dynamicBullets:!1,dynamicMainBullets:1,bulletClass:"swiper-pagination-bullet",bulletActiveClass:"swiper-pagination-bullet-active",modifierClass:"swiper-pagination-",currentClass:"swiper-pagination-current",totalClass:"swiper-pagination-total",hiddenClass:"swiper-pagination-hidden",progressbarFillClass:"swiper-pagination-progressbar-fill",clickableClass:"swiper-pagination-clickable",lockClass:"swiper-pagination-lock"}},create:function(){d.extend(this,{pagination:{init:Y.init.bind(this),render:Y.render.bind(this),update:Y.update.bind(this),destroy:Y.destroy.bind(this),dynamicBulletIndex:0}})},on:{init:function(){this.pagination.init(),this.pagination.render(),this.pagination.update()},activeIndexChange:function(){this.params.loop?this.pagination.update():void
0===this.snapIndex&&this.pagination.update()},snapIndexChange:function(){this.params.loop||this.pagination.update()},slidesLengthChange:function(){this.params.loop&&(this.pagination.render(),this.pagination.update())},snapGridLengthChange:function(){this.params.loop||(this.pagination.render(),this.pagination.update())},destroy:function(){this.pagination.destroy()},click:function(e){this.params.pagination.el&&this.params.pagination.hideOnClick&&this.pagination.$el.length>0&&!s(e.target).hasClass(this.params.pagination.bulletClass)&&this.pagination.$el.toggleClass(this.params.pagination.hiddenClass)}}},{name:"scrollbar",params:{scrollbar:{el:null,dragSize:"auto",hide:!1,draggable:!1,snapOnRelease:!0,lockClass:"swiper-scrollbar-lock",dragClass:"swiper-scrollbar-drag"}},create:function(){d.extend(this,{scrollbar:{init:V.init.bind(this),destroy:V.destroy.bind(this),updateSize:V.updateSize.bind(this),setTranslate:V.setTranslate.bind(this),setTransition:V.setTransition.bind(this),enableDraggable:V.enableDraggable.bind(this),disableDraggable:V.disableDraggable.bind(this),setDragPosition:V.setDragPosition.bind(this),onDragStart:V.onDragStart.bind(this),onDragMove:V.onDragMove.bind(this),onDragEnd:V.onDragEnd.bind(this),isTouched:!1,timeout:null,dragTimeout:null}})},on:{init:function(){this.scrollbar.init(),this.scrollbar.updateSize(),this.scrollbar.setTranslate()},update:function(){this.scrollbar.updateSize()},resize:function(){this.scrollbar.updateSize()},observerUpdate:function(){this.scrollbar.updateSize()},setTranslate:function(){this.scrollbar.setTranslate()},setTransition:function(e){this.scrollbar.setTransition(e)},destroy:function(){this.scrollbar.destroy()}}},{name:"parallax",params:{parallax:{enabled:!1}},create:function(){d.extend(this,{parallax:{setTransform:R.setTransform.bind(this),setTranslate:R.setTranslate.bind(this),setTransition:R.setTransition.bind(this)}})},on:{beforeInit:function(){this.params.parallax.enabled&&(this.params.watchSlidesProgress=!0)},init:function(){this.params.parallax&&this.parallax.setTranslate()},setTranslate:function(){this.params.parallax&&this.parallax.setTranslate()},setTransition:function(e){this.params.parallax&&this.parallax.setTransition(e)}}},{name:"zoom",params:{zoom:{enabled:!1,maxRatio:3,minRatio:1,toggle:!0,containerClass:"swiper-zoom-container",zoomedSlideClass:"swiper-slide-zoomed"}},create:function(){var
e=this,t={enabled:!1,scale:1,currentScale:1,isScaling:!1,gesture:{$slideEl:void
0,slideWidth:void 0,slideHeight:void 0,$imageEl:void 0,$imageWrapEl:void
0,maxRatio:3},image:{isTouched:void 0,isMoved:void 0,currentX:void
0,currentY:void 0,minX:void 0,minY:void 0,maxX:void 0,maxY:void
0,width:void 0,height:void 0,startX:void 0,startY:void
0,touchesStart:{},touchesCurrent:{}},velocity:{x:void 0,y:void
0,prevPositionX:void 0,prevPositionY:void 0,prevTime:void
0}};"onGestureStart onGestureChange onGestureEnd onTouchStart
onTouchMove onTouchEnd onTransitionEnd toggle enable disable in
out".split("
").forEach(function(i){t[i]=F[i].bind(e)}),d.extend(e,{zoom:t})},on:{init:function(){this.params.zoom.enabled&&this.zoom.enable()},destroy:function(){this.zoom.disable()},touchStart:function(e){this.zoom.enabled&&this.zoom.onTouchStart(e)},touchEnd:function(e){this.zoom.enabled&&this.zoom.onTouchEnd(e)},doubleTap:function(e){this.params.zoom.enabled&&this.zoom.enabled&&this.params.zoom.toggle&&this.zoom.toggle(e)},transitionEnd:function(){this.zoom.enabled&&this.params.zoom.enabled&&this.zoom.onTransitionEnd()}}},{name:"lazy",params:{lazy:{enabled:!1,loadPrevNext:!1,loadPrevNextAmount:1,loadOnTransitionStart:!1,elementClass:"swiper-lazy",loadingClass:"swiper-lazy-loading",loadedClass:"swiper-lazy-loaded",preloaderClass:"swiper-lazy-preloader"}},create:function(){d.extend(this,{lazy:{initialImageLoaded:!1,load:W.load.bind(this),loadInSlide:W.loadInSlide.bind(this)}})},on:{beforeInit:function(){this.params.lazy.enabled&&this.params.preloadImages&&(this.params.preloadImages=!1)},init:function(){this.params.lazy.enabled&&!this.params.loop&&0===this.params.initialSlide&&this.lazy.load()},scroll:function(){this.params.freeMode&&!this.params.freeModeSticky&&this.lazy.load()},resize:function(){this.params.lazy.enabled&&this.lazy.load()},scrollbarDragMove:function(){this.params.lazy.enabled&&this.lazy.load()},transitionStart:function(){this.params.lazy.enabled&&(this.params.lazy.loadOnTransitionStart||!this.params.lazy.loadOnTransitionStart&&!this.lazy.initialImageLoaded)&&this.lazy.load()},transitionEnd:function(){this.params.lazy.enabled&&!this.params.lazy.loadOnTransitionStart&&this.lazy.load()}}},{name:"controller",params:{controller:{control:void
0,inverse:!1,by:"slide"}},create:function(){d.extend(this,{controller:{control:this.params.controller.control,getInterpolateFunction:q.getInterpolateFunction.bind(this),setTranslate:q.setTranslate.bind(this),setTransition:q.setTransition.bind(this)}})},on:{update:function(){this.controller.control&&this.controller.spline&&(this.controller.spline=void
0,delete
this.controller.spline)},resize:function(){this.controller.control&&this.controller.spline&&(this.controller.spline=void
0,delete
this.controller.spline)},observerUpdate:function(){this.controller.control&&this.controller.spline&&(this.controller.spline=void
0,delete
this.controller.spline)},setTranslate:function(e,t){this.controller.control&&this.controller.setTranslate(e,t)},setTransition:function(e,t){this.controller.control&&this.controller.setTransition(e,t)}}},{name:"a11y",params:{a11y:{enabled:!0,notificationClass:"swiper-notification",prevSlideMessage:"Previous
slide",nextSlideMessage:"Next
slide",firstSlideMessage:"This is the first
slide",lastSlideMessage:"This is the last
slide",paginationBulletMessage:"Go to slide
{{index}}"}},create:function(){var
e=this;d.extend(e,{a11y:{liveRegion:s('<span
class="'+e.params.a11y.notificationClass+'"
aria-live="assertive"
aria-atomic="true"></span>')}}),Object.keys(j).forEach(function(t){e.a11y[t]=j[t].bind(e)})},on:{init:function(){this.params.a11y.enabled&&(this.a11y.init(),this.a11y.updateNavigation())},toEdge:function(){this.params.a11y.enabled&&this.a11y.updateNavigation()},fromEdge:function(){this.params.a11y.enabled&&this.a11y.updateNavigation()},paginationUpdate:function(){this.params.a11y.enabled&&this.a11y.updatePagination()},destroy:function(){this.params.a11y.enabled&&this.a11y.destroy()}}},{name:"history",params:{history:{enabled:!1,replaceState:!1,key:"slides"}},create:function(){d.extend(this,{history:{init:K.init.bind(this),setHistory:K.setHistory.bind(this),setHistoryPopState:K.setHistoryPopState.bind(this),scrollToSlide:K.scrollToSlide.bind(this),destroy:K.destroy.bind(this)}})},on:{init:function(){this.params.history.enabled&&this.history.init()},destroy:function(){this.params.history.enabled&&this.history.destroy()},transitionEnd:function(){this.history.initialized&&this.history.setHistory(this.params.history.key,this.activeIndex)}}},{name:"hash-navigation",params:{hashNavigation:{enabled:!1,replaceState:!1,watchState:!1}},create:function(){d.extend(this,{hashNavigation:{initialized:!1,init:U.init.bind(this),destroy:U.destroy.bind(this),setHash:U.setHash.bind(this),onHashCange:U.onHashCange.bind(this)}})},on:{init:function(){this.params.hashNavigation.enabled&&this.hashNavigation.init()},destroy:function(){this.params.hashNavigation.enabled&&this.hashNavigation.destroy()},transitionEnd:function(){this.hashNavigation.initialized&&this.hashNavigation.setHash()}}},{name:"autoplay",params:{autoplay:{enabled:!1,delay:3e3,waitForTransition:!0,disableOnInteraction:!0,stopOnLastSlide:!1,reverseDirection:!1}},create:function(){d.extend(this,{autoplay:{running:!1,paused:!1,run:_.run.bind(this),start:_.start.bind(this),stop:_.stop.bind(this),pause:_.pause.bind(this)}})},on:{init:function(){this.params.autoplay.enabled&&this.autoplay.start()},beforeTransitionStart:function(e,t){this.autoplay.running&&(t||!this.params.autoplay.disableOnInteraction?this.autoplay.pause(e):this.autoplay.stop())},sliderFirstMove:function(){this.autoplay.running&&(this.params.autoplay.disableOnInteraction?this.autoplay.stop():this.autoplay.pause())},destroy:function(){this.autoplay.running&&this.autoplay.stop()}}},{name:"effect-fade",params:{fadeEffect:{crossFade:!1}},create:function(){d.extend(this,{fadeEffect:{setTranslate:Z.setTranslate.bind(this),setTransition:Z.setTransition.bind(this)}})},on:{beforeInit:function(){if("fade"===this.params.effect){this.classNames.push(this.params.containerModifierClass+"fade");var
e={slidesPerView:1,slidesPerColumn:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!0};d.extend(this.params,e),d.extend(this.originalParams,e)}},setTranslate:function(){"fade"===this.params.effect&&this.fadeEffect.setTranslate()},setTransition:function(e){"fade"===this.params.effect&&this.fadeEffect.setTransition(e)}}},{name:"effect-cube",params:{cubeEffect:{slideShadows:!0,shadow:!0,shadowOffset:20,shadowScale:.94}},create:function(){d.extend(this,{cubeEffect:{setTranslate:Q.setTranslate.bind(this),setTransition:Q.setTransition.bind(this)}})},on:{beforeInit:function(){if("cube"===this.params.effect){this.classNames.push(this.params.containerModifierClass+"cube"),this.classNames.push(this.params.containerModifierClass+"3d");var
e={slidesPerView:1,slidesPerColumn:1,slidesPerGroup:1,watchSlidesProgress:!0,resistanceRatio:0,spaceBetween:0,centeredSlides:!1,virtualTranslate:!0};d.extend(this.params,e),d.extend(this.originalParams,e)}},setTranslate:function(){"cube"===this.params.effect&&this.cubeEffect.setTranslate()},setTransition:function(e){"cube"===this.params.effect&&this.cubeEffect.setTransition(e)}}},{name:"effect-flip",params:{flipEffect:{slideShadows:!0,limitRotation:!0}},create:function(){d.extend(this,{flipEffect:{setTranslate:J.setTranslate.bind(this),setTransition:J.setTransition.bind(this)}})},on:{beforeInit:function(){if("flip"===this.params.effect){this.classNames.push(this.params.containerModifierClass+"flip"),this.classNames.push(this.params.containerModifierClass+"3d");var
e={slidesPerView:1,slidesPerColumn:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!0};d.extend(this.params,e),d.extend(this.originalParams,e)}},setTranslate:function(){"flip"===this.params.effect&&this.flipEffect.setTranslate()},setTransition:function(e){"flip"===this.params.effect&&this.flipEffect.setTransition(e)}}},{name:"effect-coverflow",params:{coverflowEffect:{rotate:50,stretch:0,depth:100,modifier:1,slideShadows:!0}},create:function(){d.extend(this,{coverflowEffect:{setTranslate:ee.setTranslate.bind(this),setTransition:ee.setTransition.bind(this)}})},on:{beforeInit:function(){"coverflow"===this.params.effect&&(this.classNames.push(this.params.containerModifierClass+"coverflow"),this.classNames.push(this.params.containerModifierClass+"3d"),this.params.watchSlidesProgress=!0,this.originalParams.watchSlidesProgress=!0)},setTranslate:function(){"coverflow"===this.params.effect&&this.coverflowEffect.setTranslate()},setTransition:function(e){"coverflow"===this.params.effect&&this.coverflowEffect.setTransition(e)}}}];return
void
0===P.use&&(P.use=P.Class.use,P.installModule=P.Class.installModule),P.use(te),P});
touchspin/index.html000064400000000054151175232520010557
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>touchspin/jquery.bootstrap-touchspin.css000064400000004164151175232520014647
0ustar00/* This CSS file is unnecessary if you are not using vertical
buttons functionality */
.bootstrap-touchspin-injected {
position: relative;
margin: 0;
padding: 0;
}
#phQuickViewPopup .bootstrap-touchspin .input-group-btn-vertical,
#ph-pc-checkout-box .bootstrap-touchspin .input-group-btn-vertical,
#ph-pc-item-box .bootstrap-touchspin .input-group-btn-vertical {
position: absolute;
right: 0;
height: 100%;
z-index: 1;/* needs to be increased in some templates*/
}
#phQuickViewPopup .bootstrap-touchspin .input-group-btn-vertical > .btn,
#ph-pc-checkout-box .bootstrap-touchspin .input-group-btn-vertical >
.btn,
#ph-pc-item-box .bootstrap-touchspin .input-group-btn-vertical > .btn {
position: absolute;
right: 0;
height: 50%;
padding: 0;
width: 1.6em;
text-align: center;
line-height: 1;
}
#phQuickViewPopup .bootstrap-touchspin .input-group-btn-vertical
.bootstrap-touchspin-up,
#ph-pc-checkout-box .bootstrap-touchspin .input-group-btn-vertical
.bootstrap-touchspin-up,
#ph-pc-item-box .bootstrap-touchspin .input-group-btn-vertical
.bootstrap-touchspin-up {
border-radius: 0 4px 0 0;
top: 0;
margin: 0;
}
#phQuickViewPopup .bootstrap-touchspin .input-group-btn-vertical
.bootstrap-touchspin-down,
#ph-pc-checkout-box .bootstrap-touchspin .input-group-btn-vertical
.bootstrap-touchspin-down,
#ph-pc-item-box .bootstrap-touchspin .input-group-btn-vertical
.bootstrap-touchspin-down {
border-radius: 0 0 4px 0;
bottom: 0;
margin: 0;
}
#ph-pc-checkout-box .form-inline .form-group .ph-input-quantity {
width: 30px;
}
#phQuickViewPopup .form-inline .form-group .ph-input-quantity,
#ph-pc-item-box .form-inline .form-group .ph-input-quantity {
width: 60px;
}
@media screen and (max-width: 768px) {
#ph-pc-checkout-box .form-inline .form-group .ph-input-quantity {
width: 30px;
}
#phQuickViewPopup .form-inline .form-group .ph-input-quantity ,
#ph-pc-item-box .form-inline .form-group .ph-input-quantity {
min-width: 80px;
}
}
.bootstrap-touchspin-down span.glyphicon,
.bootstrap-touchspin-up span.glyphicon,
.bootstrap-touchspin-down span.fa,
.bootstrap-touchspin-up span.fa {
font-size: 0.7em;
}
touchspin/jquery.bootstrap-touchspin.js000064400000054473151175232520014503
0ustar00(function(factory) {
if (typeof define === 'function' && define.amd) {
define(['jquery'], factory);
} else if (typeof module === 'object' &&
module.exports) {
module.exports = function(root, jQuery) {
if (jQuery === undefined) {
if (typeof window !== 'undefined') {
jQuery = require('jquery');
}
else {
jQuery = require('jquery')(root);
}
}
factory(jQuery);
return jQuery;
};
} else {
factory(jQuery);
}
}(function($) {
'use strict';
var _currentSpinnerId = 0;
$.fn.TouchSpin = function(options) {
var defaults = {
min: 0, // If null, there is no minimum enforced
max: 100, // If null, there is no maximum enforced
initval: '',
replacementval: '',
firstclickvalueifempty: null,
step: 1,
decimals: 0,
stepinterval: 100,
forcestepdivisibility: 'round', // none | floor | round |
ceil
stepintervaldelay: 500,
verticalbuttons: false,
verticalup: '+',
verticaldown: '-',
verticalupclass: '',
verticaldownclass: '',
prefix: '',
postfix: '',
prefix_extraclass: '',
postfix_extraclass: '',
booster: true,
boostat: 10,
maxboostedstep: false,
mousewheel: true,
buttondown_class: 'btn btn-primary',
buttonup_class: 'btn btn-primary',
buttondown_txt: '-',
buttonup_txt: '+',
callback_before_calculation: function(value) {
return value;
},
callback_after_calculation: function(value) {
return value;
}
};
var attributeMap = {
min: 'min',
max: 'max',
initval: 'init-val',
replacementval: 'replacement-val',
firstclickvalueifempty: 'first-click-value-if-empty',
step: 'step',
decimals: 'decimals',
stepinterval: 'step-interval',
verticalbuttons: 'vertical-buttons',
verticalupclass: 'vertical-up-class',
verticaldownclass: 'vertical-down-class',
forcestepdivisibility: 'force-step-divisibility',
stepintervaldelay: 'step-interval-delay',
prefix: 'prefix',
postfix: 'postfix',
prefix_extraclass: 'prefix-extra-class',
postfix_extraclass: 'postfix-extra-class',
booster: 'booster',
boostat: 'boostat',
maxboostedstep: 'max-boosted-step',
mousewheel: 'mouse-wheel',
buttondown_class: 'button-down-class',
buttonup_class: 'button-up-class',
buttondown_txt: 'button-down-txt',
buttonup_txt: 'button-up-txt'
};
return this.each(function() {
var settings,
originalinput = $(this),
originalinput_data = originalinput.data(),
_detached_prefix,
_detached_postfix,
container,
elements,
value,
downSpinTimer,
upSpinTimer,
downDelayTimeout,
upDelayTimeout,
spincount = 0,
spinning = false;
init();
function init() {
if (originalinput.data('alreadyinitialized')) {
return;
}
originalinput.data('alreadyinitialized', true);
_currentSpinnerId += 1;
originalinput.data('spinnerid', _currentSpinnerId);
if (!originalinput.is('input')) {
console.log('Must be an input.');
return;
}
_initSettings();
_setInitval();
_checkValue();
_buildHtml();
_initElements();
_hideEmptyPrefixPostfix();
_bindEvents();
_bindEventsInterface();
}
function _setInitval() {
if (settings.initval !== '' &&
originalinput.val() === '') {
originalinput.val(settings.initval);
}
}
function changeSettings(newsettings) {
_updateSettings(newsettings);
_checkValue();
var value = elements.input.val();
if (value !== '') {
value =
Number(settings.callback_before_calculation(elements.input.val()));
elements.input.val(settings.callback_after_calculation(Number(value).toFixed(settings.decimals)));
}
}
function _initSettings() {
settings = $.extend({}, defaults, originalinput_data,
_parseAttributes(), options);
}
function _parseAttributes() {
var data = {};
$.each(attributeMap, function(key, value) {
var attrName = 'bts-' + value + '';
if (originalinput.is('[data-' + attrName +
']')) {
data[key] = originalinput.data(attrName);
}
});
return data;
}
function _destroy() {
var $parent = originalinput.parent();
stopSpin();
originalinput.off('.touchspin');
if ($parent.hasClass('bootstrap-touchspin-injected')) {
originalinput.siblings().remove();
originalinput.unwrap();
}
else {
$('.bootstrap-touchspin-injected', $parent).remove();
$parent.removeClass('bootstrap-touchspin');
}
originalinput.data('alreadyinitialized', false);
}
function _updateSettings(newsettings) {
settings = $.extend({}, settings, newsettings);
// Update postfix and prefix texts if those settings were changed.
if (newsettings.postfix) {
var $postfix =
originalinput.parent().find('.bootstrap-touchspin-postfix');
if ($postfix.length === 0) {
_detached_postfix.insertAfter(originalinput);
}
originalinput.parent().find('.bootstrap-touchspin-postfix
.input-group-text').text(newsettings.postfix);
}
if (newsettings.prefix) {
var $prefix =
originalinput.parent().find('.bootstrap-touchspin-prefix');
if ($prefix.length === 0) {
_detached_prefix.insertBefore(originalinput);
}
originalinput.parent().find('.bootstrap-touchspin-prefix
.input-group-text').text(newsettings.prefix);
}
_hideEmptyPrefixPostfix();
}
function _buildHtml() {
var initval = originalinput.val(),
parentelement = originalinput.parent();
if (initval !== '') {
initval =
settings.callback_after_calculation(Number(initval).toFixed(settings.decimals));
}
originalinput.data('initvalue', initval).val(initval);
originalinput.addClass('form-control');
if (parentelement.hasClass('input-group')) {
_advanceInputGroup(parentelement);
}
else {
_buildInputGroup();
}
}
function _advanceInputGroup(parentelement) {
parentelement.addClass('bootstrap-touchspin');
var prev = originalinput.prev(),
next = originalinput.next();
var downhtml,
uphtml,
prefixhtml = '<span class="input-group-addon
input-group-prepend bootstrap-touchspin-prefix input-group-prepend
bootstrap-touchspin-injected"><span
class="input-group-text">' + settings.prefix +
'</span></span>',
postfixhtml = '<span class="input-group-addon
input-group-append bootstrap-touchspin-postfix input-group-append
bootstrap-touchspin-injected"><span
class="input-group-text">' + settings.postfix +
'</span></span>';
if (prev.hasClass('input-group-btn') ||
prev.hasClass('input-group-prepend')) {
downhtml = '<button class="' +
settings.buttondown_class + ' bootstrap-touchspin-down
bootstrap-touchspin-injected" type="button">' +
settings.buttondown_txt + '</button>';
prev.append(downhtml);
}
else {
downhtml = '<span class="input-group-btn
input-group-prepend bootstrap-touchspin-injected"><button
class="' + settings.buttondown_class + '
bootstrap-touchspin-down" type="button">' +
settings.buttondown_txt + '</button></span>';
$(downhtml).insertBefore(originalinput);
}
if (next.hasClass('input-group-btn') ||
next.hasClass('input-group-append')) {
uphtml = '<button class="' +
settings.buttonup_class + ' bootstrap-touchspin-up
bootstrap-touchspin-injected" type="button">' +
settings.buttonup_txt + '</button>';
next.prepend(uphtml);
}
else {
uphtml = '<span class="input-group-btn
input-group-append bootstrap-touchspin-injected"><button
class="' + settings.buttonup_class + '
bootstrap-touchspin-up" type="button">' +
settings.buttonup_txt + '</button></span>';
$(uphtml).insertAfter(originalinput);
}
$(prefixhtml).insertBefore(originalinput);
$(postfixhtml).insertAfter(originalinput);
container = parentelement;
}
function _buildInputGroup() {
var html;
var inputGroupSize = '';
if (originalinput.hasClass('input-sm')) {
inputGroupSize = 'input-group-sm';
}
if (originalinput.hasClass('input-lg')) {
inputGroupSize = 'input-group-lg';
}
if (settings.verticalbuttons) {
html = '<div class="input-group ' +
inputGroupSize + ' bootstrap-touchspin
bootstrap-touchspin-injected"><span
class="input-group-addon input-group-prepend
bootstrap-touchspin-prefix"><span
class="input-group-text">' + settings.prefix +
'</span></span><span class="input-group-addon
bootstrap-touchspin-postfix input-group-append"><span
class="input-group-text">' + settings.postfix +
'</span></span><span
class="input-group-btn-vertical"><button class="'
+ settings.buttondown_class + ' bootstrap-touchspin-up ' +
settings.verticalupclass + '" type="button">' +
settings.verticalup + '</button><button class="' +
settings.buttonup_class + ' bootstrap-touchspin-down ' +
settings.verticaldownclass + '" type="button">'
+ settings.verticaldown +
'</button></span></div>';
}
else {
html = '<div class="input-group bootstrap-touchspin
bootstrap-touchspin-injected"><span class="input-group-btn
input-group-prepend"><button class="' +
settings.buttondown_class + ' bootstrap-touchspin-down"
type="button">' + settings.buttondown_txt +
'</button></span><span class="input-group-addon
bootstrap-touchspin-prefix input-group-prepend"><span
class="input-group-text">' + settings.prefix +
'</span></span><span class="input-group-addon
bootstrap-touchspin-postfix input-group-append"><span
class="input-group-text">' + settings.postfix +
'</span></span><span class="input-group-btn
input-group-append"><button class="' +
settings.buttonup_class + ' bootstrap-touchspin-up"
type="button">' + settings.buttonup_txt +
'</button></span></div>';
}
container = $(html).insertBefore(originalinput);
$('.bootstrap-touchspin-prefix',
container).after(originalinput);
if (originalinput.hasClass('input-sm')) {
container.addClass('input-group-sm');
}
else if (originalinput.hasClass('input-lg')) {
container.addClass('input-group-lg');
}
}
function _initElements() {
elements = {
down: $('.bootstrap-touchspin-down', container),
up: $('.bootstrap-touchspin-up', container),
input: $('input', container),
prefix: $('.bootstrap-touchspin-prefix',
container).addClass(settings.prefix_extraclass),
postfix: $('.bootstrap-touchspin-postfix',
container).addClass(settings.postfix_extraclass)
};
}
function _hideEmptyPrefixPostfix() {
if (settings.prefix === '') {
_detached_prefix = elements.prefix.detach();
}
if (settings.postfix === '') {
_detached_postfix = elements.postfix.detach();
}
}
function _bindEvents() {
originalinput.on('keydown.touchspin', function(ev) {
var code = ev.keyCode || ev.which;
if (code === 38) {
if (spinning !== 'up') {
upOnce();
startUpSpin();
}
ev.preventDefault();
}
else if (code === 40) {
if (spinning !== 'down') {
downOnce();
startDownSpin();
}
ev.preventDefault();
}
});
originalinput.on('keyup.touchspin', function(ev) {
var code = ev.keyCode || ev.which;
if (code === 38) {
stopSpin();
}
else if (code === 40) {
stopSpin();
}
});
originalinput.on('blur.touchspin', function() {
_checkValue();
originalinput.val(settings.callback_after_calculation(originalinput.val()));
});
elements.down.on('keydown', function(ev) {
var code = ev.keyCode || ev.which;
if (code === 32 || code === 13) {
if (spinning !== 'down') {
downOnce();
startDownSpin();
}
ev.preventDefault();
}
});
elements.down.on('keyup.touchspin', function(ev) {
var code = ev.keyCode || ev.which;
if (code === 32 || code === 13) {
stopSpin();
}
});
elements.up.on('keydown.touchspin', function(ev) {
var code = ev.keyCode || ev.which;
if (code === 32 || code === 13) {
if (spinning !== 'up') {
upOnce();
startUpSpin();
}
ev.preventDefault();
}
});
elements.up.on('keyup.touchspin', function(ev) {
var code = ev.keyCode || ev.which;
if (code === 32 || code === 13) {
stopSpin();
}
});
elements.down.on('mousedown.touchspin', function(ev) {
elements.down.off('touchstart.touchspin'); // android
4 workaround
if (originalinput.is(':disabled')) {
return;
}
downOnce();
startDownSpin();
ev.preventDefault();
ev.stopPropagation();
});
elements.down.on('touchstart.touchspin', function(ev) {
elements.down.off('mousedown.touchspin'); // android 4
workaround
if (originalinput.is(':disabled')) {
return;
}
downOnce();
startDownSpin();
ev.preventDefault();
ev.stopPropagation();
});
elements.up.on('mousedown.touchspin', function(ev) {
elements.up.off('touchstart.touchspin'); // android 4
workaround
if (originalinput.is(':disabled')) {
return;
}
upOnce();
startUpSpin();
ev.preventDefault();
ev.stopPropagation();
});
elements.up.on('touchstart.touchspin', function(ev) {
elements.up.off('mousedown.touchspin'); // android 4
workaround
if (originalinput.is(':disabled')) {
return;
}
upOnce();
startUpSpin();
ev.preventDefault();
ev.stopPropagation();
});
elements.up.on('mouseup.touchspin mouseout.touchspin
touchleave.touchspin touchend.touchspin touchcancel.touchspin',
function(ev) {
if (!spinning) {
return;
}
ev.stopPropagation();
stopSpin();
});
elements.down.on('mouseup.touchspin mouseout.touchspin
touchleave.touchspin touchend.touchspin touchcancel.touchspin',
function(ev) {
if (!spinning) {
return;
}
ev.stopPropagation();
stopSpin();
});
elements.down.on('mousemove.touchspin
touchmove.touchspin', function(ev) {
if (!spinning) {
return;
}
ev.stopPropagation();
ev.preventDefault();
});
elements.up.on('mousemove.touchspin touchmove.touchspin',
function(ev) {
if (!spinning) {
return;
}
ev.stopPropagation();
ev.preventDefault();
});
originalinput.on('mousewheel.touchspin
DOMMouseScroll.touchspin', function(ev) {
if (!settings.mousewheel ||
!originalinput.is(':focus')) {
return;
}
var delta = ev.originalEvent.wheelDelta ||
-ev.originalEvent.deltaY || -ev.originalEvent.detail;
ev.stopPropagation();
ev.preventDefault();
if (delta < 0) {
downOnce();
}
else {
upOnce();
}
});
}
function _bindEventsInterface() {
originalinput.on('touchspin.destroy', function() {
_destroy();
});
originalinput.on('touchspin.uponce', function() {
stopSpin();
upOnce();
});
originalinput.on('touchspin.downonce', function() {
stopSpin();
downOnce();
});
originalinput.on('touchspin.startupspin', function() {
startUpSpin();
});
originalinput.on('touchspin.startdownspin', function() {
startDownSpin();
});
originalinput.on('touchspin.stopspin', function() {
stopSpin();
});
originalinput.on('touchspin.updatesettings', function(e,
newsettings) {
changeSettings(newsettings);
});
}
function _forcestepdivisibility(value) {
switch (settings.forcestepdivisibility) {
case 'round':
return (Math.round(value / settings.step) *
settings.step).toFixed(settings.decimals);
case 'floor':
return (Math.floor(value / settings.step) *
settings.step).toFixed(settings.decimals);
case 'ceil':
return (Math.ceil(value / settings.step) *
settings.step).toFixed(settings.decimals);
default:
return value.toFixed(settings.decimals);
}
}
function _checkValue() {
var val, parsedval, returnval;
val = settings.callback_before_calculation(originalinput.val());
if (val === '') {
if (settings.replacementval !== '') {
originalinput.val(settings.replacementval);
originalinput.trigger('change');
}
return;
}
if (settings.decimals > 0 && val === '.') {
return;
}
parsedval = parseFloat(val);
if (isNaN(parsedval)) {
if (settings.replacementval !== '') {
parsedval = settings.replacementval;
}
else {
parsedval = 0;
}
}
returnval = parsedval;
if (parsedval.toString() !== val) {
returnval = parsedval;
}
if ((settings.min !== null) && (parsedval <
settings.min)) {
returnval = settings.min;
}
if ((settings.max !== null) && (parsedval >
settings.max)) {
returnval = settings.max;
}
returnval = _forcestepdivisibility(returnval);
if (Number(val).toString() !== returnval.toString()) {
originalinput.val(returnval);
originalinput.trigger('change');
}
}
function _getBoostedStep() {
if (!settings.booster) {
return settings.step;
}
else {
var boosted = Math.pow(2, Math.floor(spincount /
settings.boostat)) * settings.step;
if (settings.maxboostedstep) {
if (boosted > settings.maxboostedstep) {
boosted = settings.maxboostedstep;
value = Math.round((value / boosted)) * boosted;
}
}
return Math.max(settings.step, boosted);
}
}
function valueIfIsNaN() {
if(typeof(settings.firstclickvalueifempty) === 'number')
{
return settings.firstclickvalueifempty;
} else {
return (settings.min + settings.max) / 2;
}
}
function upOnce() {
_checkValue();
value =
parseFloat(settings.callback_before_calculation(elements.input.val()));
var initvalue = value;
var boostedstep;
if (isNaN(value)) {
value = valueIfIsNaN();
} else {
boostedstep = _getBoostedStep();
value = value + boostedstep;
}
if ((settings.max !== null) && (value > settings.max)) {
value = settings.max;
originalinput.trigger('touchspin.on.max');
stopSpin();
}
elements.input.val(settings.callback_after_calculation(Number(value).toFixed(settings.decimals)));
if (initvalue !== value) {
originalinput.trigger('change');
}
}
function downOnce() {
_checkValue();
value =
parseFloat(settings.callback_before_calculation(elements.input.val()));
var initvalue = value;
var boostedstep;
if (isNaN(value)) {
value = valueIfIsNaN();
} else {
boostedstep = _getBoostedStep();
value = value - boostedstep;
}
if ((settings.min !== null) && (value < settings.min)) {
value = settings.min;
originalinput.trigger('touchspin.on.min');
stopSpin();
}
elements.input.val(settings.callback_after_calculation(Number(value).toFixed(settings.decimals)));
if (initvalue !== value) {
originalinput.trigger('change');
}
}
function startDownSpin() {
stopSpin();
spincount = 0;
spinning = 'down';
originalinput.trigger('touchspin.on.startspin');
originalinput.trigger('touchspin.on.startdownspin');
downDelayTimeout = setTimeout(function() {
downSpinTimer = setInterval(function() {
spincount++;
downOnce();
}, settings.stepinterval);
}, settings.stepintervaldelay);
}
function startUpSpin() {
stopSpin();
spincount = 0;
spinning = 'up';
originalinput.trigger('touchspin.on.startspin');
originalinput.trigger('touchspin.on.startupspin');
upDelayTimeout = setTimeout(function() {
upSpinTimer = setInterval(function() {
spincount++;
upOnce();
}, settings.stepinterval);
}, settings.stepintervaldelay);
}
function stopSpin() {
clearTimeout(downDelayTimeout);
clearTimeout(upDelayTimeout);
clearInterval(downSpinTimer);
clearInterval(upSpinTimer);
switch (spinning) {
case 'up':
originalinput.trigger('touchspin.on.stopupspin');
originalinput.trigger('touchspin.on.stopspin');
break;
case 'down':
originalinput.trigger('touchspin.on.stopdownspin');
originalinput.trigger('touchspin.on.stopspin');
break;
}
spincount = 0;
spinning = false;
}
});
};
}));
touchspin/jquery.bootstrap-touchspin.min.js000064400000025424151175232520015257
0ustar00!function(t){"function"==typeof
define&&define.amd?define(["jquery"],t):"object"==typeof
module&&module.exports?module.exports=function(n,o){return void
0===o&&(o="undefined"!=typeof
window?require("jquery"):require("jquery")(n)),t(o),o}:t(jQuery)}(function(t){"use
strict";var n=0;t.fn.TouchSpin=function(o){var
s={min:0,max:100,initval:"",replacementval:"",firstclickvalueifempty:null,step:1,decimals:0,stepinterval:100,forcestepdivisibility:"round",stepintervaldelay:500,verticalbuttons:!1,verticalup:"+",verticaldown:"-",verticalupclass:"",verticaldownclass:"",prefix:"",postfix:"",prefix_extraclass:"",postfix_extraclass:"",booster:!0,boostat:10,maxboostedstep:!1,mousewheel:!0,buttondown_class:"btn
btn-primary",buttonup_class:"btn
btn-primary",buttondown_txt:"-",buttonup_txt:"+",callback_before_calculation:function(t){return
t},callback_after_calculation:function(t){return
t}},p={min:"min",max:"max",initval:"init-val",replacementval:"replacement-val",firstclickvalueifempty:"first-click-value-if-empty",step:"step",decimals:"decimals",stepinterval:"step-interval",verticalbuttons:"vertical-buttons",verticalupclass:"vertical-up-class",verticaldownclass:"vertical-down-class",forcestepdivisibility:"force-step-divisibility",stepintervaldelay:"step-interval-delay",prefix:"prefix",postfix:"postfix",prefix_extraclass:"prefix-extra-class",postfix_extraclass:"postfix-extra-class",booster:"booster",boostat:"boostat",maxboostedstep:"max-boosted-step",mousewheel:"mouse-wheel",buttondown_class:"button-down-class",buttonup_class:"button-up-class",buttondown_txt:"button-down-txt",buttonup_txt:"button-up-txt"};return
this.each(function(){var
a,e,i,u,r,c,l,d,f,b,h=t(this),v=h.data(),x=0,g=!1;function
m(){""===a.prefix&&(e=r.prefix.detach()),""===a.postfix&&(i=r.postfix.detach())}function
w(){var
t,n,o;""!==(t=a.callback_before_calculation(h.val()))?a.decimals>0&&"."===t||(n=parseFloat(t),isNaN(n)&&(n=""!==a.replacementval?a.replacementval:0),o=n,n.toString()!==t&&(o=n),null!==a.min&&n<a.min&&(o=a.min),null!==a.max&&n>a.max&&(o=a.max),o=function(t){switch(a.forcestepdivisibility){case"round":return(Math.round(t/a.step)*a.step).toFixed(a.decimals);case"floor":return(Math.floor(t/a.step)*a.step).toFixed(a.decimals);case"ceil":return(Math.ceil(t/a.step)*a.step).toFixed(a.decimals);default:return
t.toFixed(a.decimals)}}(o),Number(t).toString()!==o.toString()&&(h.val(o),h.trigger("change"))):""!==a.replacementval&&(h.val(a.replacementval),h.trigger("change"))}function
_(){if(a.booster){var t=Math.pow(2,Math.floor(x/a.boostat))*a.step;return
a.maxboostedstep&&t>a.maxboostedstep&&(t=a.maxboostedstep,c=Math.round(c/t)*t),Math.max(a.step,t)}return
a.step}function y(){return"number"==typeof
a.firstclickvalueifempty?a.firstclickvalueifempty:(a.min+a.max)/2}function
k(){w();var
t,n=c=parseFloat(a.callback_before_calculation(r.input.val()));isNaN(c)?c=y():(t=_(),c+=t),null!==a.max&&c>a.max&&(c=a.max,h.trigger("touchspin.on.max"),N()),r.input.val(a.callback_after_calculation(Number(c).toFixed(a.decimals))),n!==c&&h.trigger("change")}function
C(){w();var
t,n=c=parseFloat(a.callback_before_calculation(r.input.val()));isNaN(c)?c=y():(t=_(),c-=t),null!==a.min&&c<a.min&&(c=a.min,h.trigger("touchspin.on.min"),N()),r.input.val(a.callback_after_calculation(Number(c).toFixed(a.decimals))),n!==c&&h.trigger("change")}function
j(){N(),x=0,g="down",h.trigger("touchspin.on.startspin"),h.trigger("touchspin.on.startdownspin"),f=setTimeout(function(){l=setInterval(function(){x++,C()},a.stepinterval)},a.stepintervaldelay)}function
D(){N(),x=0,g="up",h.trigger("touchspin.on.startspin"),h.trigger("touchspin.on.startupspin"),b=setTimeout(function(){d=setInterval(function(){x++,k()},a.stepinterval)},a.stepintervaldelay)}function
N(){switch(clearTimeout(f),clearTimeout(b),clearInterval(l),clearInterval(d),g){case"up":h.trigger("touchspin.on.stopupspin"),h.trigger("touchspin.on.stopspin");break;case"down":h.trigger("touchspin.on.stopdownspin"),h.trigger("touchspin.on.stopspin")}x=0,g=!1}!function(){if(h.data("alreadyinitialized"))return;if(h.data("alreadyinitialized",!0),n+=1,h.data("spinnerid",n),!h.is("input"))return
void console.log("Must be an
input.");a=t.extend({},s,v,(c={},t.each(p,function(t,n){var
o="bts-"+n;h.is("[data-"+o+"]")&&(c[t]=h.data(o))}),c),o),""!==a.initval&&""===h.val()&&h.val(a.initval),w(),function(){var
n=h.val(),o=h.parent();""!==n&&(n=a.callback_after_calculation(Number(n).toFixed(a.decimals)));h.data("initvalue",n).val(n),h.addClass("form-control"),o.hasClass("input-group")?function(n){n.addClass("bootstrap-touchspin");var
o,s,p=h.prev(),e=h.next(),i='<span class="input-group-addon
input-group-prepend bootstrap-touchspin-prefix input-group-prepend
bootstrap-touchspin-injected"><span
class="input-group-text">'+a.prefix+"</span></span>",r='<span
class="input-group-addon input-group-append
bootstrap-touchspin-postfix input-group-append
bootstrap-touchspin-injected"><span
class="input-group-text">'+a.postfix+"</span></span>";p.hasClass("input-group-btn")||p.hasClass("input-group-prepend")?(o='<button
class="'+a.buttondown_class+' bootstrap-touchspin-down
bootstrap-touchspin-injected"
type="button">'+a.buttondown_txt+"</button>",p.append(o)):(o='<span
class="input-group-btn input-group-prepend
bootstrap-touchspin-injected"><button
class="'+a.buttondown_class+' bootstrap-touchspin-down"
type="button">'+a.buttondown_txt+"</button></span>",t(o).insertBefore(h));e.hasClass("input-group-btn")||e.hasClass("input-group-append")?(s='<button
class="'+a.buttonup_class+' bootstrap-touchspin-up
bootstrap-touchspin-injected"
type="button">'+a.buttonup_txt+"</button>",e.prepend(s)):(s='<span
class="input-group-btn input-group-append
bootstrap-touchspin-injected"><button
class="'+a.buttonup_class+' bootstrap-touchspin-up"
type="button">'+a.buttonup_txt+"</button></span>",t(s).insertAfter(h));t(i).insertBefore(h),t(r).insertAfter(h),u=n}(o):function(){var
n,o="";h.hasClass("input-sm")&&(o="input-group-sm");h.hasClass("input-lg")&&(o="input-group-lg");n=a.verticalbuttons?'<div
class="input-group '+o+' bootstrap-touchspin
bootstrap-touchspin-injected"><span
class="input-group-addon input-group-prepend
bootstrap-touchspin-prefix"><span
class="input-group-text">'+a.prefix+'</span></span><span
class="input-group-addon bootstrap-touchspin-postfix
input-group-append"><span
class="input-group-text">'+a.postfix+'</span></span><span
class="input-group-btn-vertical"><button
class="'+a.buttondown_class+" bootstrap-touchspin-up
"+a.verticalupclass+'"
type="button">'+a.verticalup+'</button><button
class="'+a.buttonup_class+" bootstrap-touchspin-down
"+a.verticaldownclass+'"
type="button">'+a.verticaldown+"</button></span></div>":'<div
class="input-group bootstrap-touchspin
bootstrap-touchspin-injected"><span class="input-group-btn
input-group-prepend"><button
class="'+a.buttondown_class+' bootstrap-touchspin-down"
type="button">'+a.buttondown_txt+'</button></span><span
class="input-group-addon bootstrap-touchspin-prefix
input-group-prepend"><span
class="input-group-text">'+a.prefix+'</span></span><span
class="input-group-addon bootstrap-touchspin-postfix
input-group-append"><span
class="input-group-text">'+a.postfix+'</span></span><span
class="input-group-btn input-group-append"><button
class="'+a.buttonup_class+' bootstrap-touchspin-up"
type="button">'+a.buttonup_txt+"</button></span></div>";u=t(n).insertBefore(h),t(".bootstrap-touchspin-prefix",u).after(h),h.hasClass("input-sm")?u.addClass("input-group-sm"):h.hasClass("input-lg")&&u.addClass("input-group-lg")}()}(),r={down:t(".bootstrap-touchspin-down",u),up:t(".bootstrap-touchspin-up",u),input:t("input",u),prefix:t(".bootstrap-touchspin-prefix",u).addClass(a.prefix_extraclass),postfix:t(".bootstrap-touchspin-postfix",u).addClass(a.postfix_extraclass)},m(),h.on("keydown.touchspin",function(t){var
n=t.keyCode||t.which;38===n?("up"!==g&&(k(),D()),t.preventDefault()):40===n&&("down"!==g&&(C(),j()),t.preventDefault())}),h.on("keyup.touchspin",function(t){var
n=t.keyCode||t.which;38===n?N():40===n&&N()}),h.on("blur.touchspin",function(){w(),h.val(a.callback_after_calculation(h.val()))}),r.down.on("keydown",function(t){var
n=t.keyCode||t.which;32!==n&&13!==n||("down"!==g&&(C(),j()),t.preventDefault())}),r.down.on("keyup.touchspin",function(t){var
n=t.keyCode||t.which;32!==n&&13!==n||N()}),r.up.on("keydown.touchspin",function(t){var
n=t.keyCode||t.which;32!==n&&13!==n||("up"!==g&&(k(),D()),t.preventDefault())}),r.up.on("keyup.touchspin",function(t){var
n=t.keyCode||t.which;32!==n&&13!==n||N()}),r.down.on("mousedown.touchspin",function(t){r.down.off("touchstart.touchspin"),h.is(":disabled")||(C(),j(),t.preventDefault(),t.stopPropagation())}),r.down.on("touchstart.touchspin",function(t){r.down.off("mousedown.touchspin"),h.is(":disabled")||(C(),j(),t.preventDefault(),t.stopPropagation())}),r.up.on("mousedown.touchspin",function(t){r.up.off("touchstart.touchspin"),h.is(":disabled")||(k(),D(),t.preventDefault(),t.stopPropagation())}),r.up.on("touchstart.touchspin",function(t){r.up.off("mousedown.touchspin"),h.is(":disabled")||(k(),D(),t.preventDefault(),t.stopPropagation())}),r.up.on("mouseup.touchspin
mouseout.touchspin touchleave.touchspin touchend.touchspin
touchcancel.touchspin",function(t){g&&(t.stopPropagation(),N())}),r.down.on("mouseup.touchspin
mouseout.touchspin touchleave.touchspin touchend.touchspin
touchcancel.touchspin",function(t){g&&(t.stopPropagation(),N())}),r.down.on("mousemove.touchspin
touchmove.touchspin",function(t){g&&(t.stopPropagation(),t.preventDefault())}),r.up.on("mousemove.touchspin
touchmove.touchspin",function(t){g&&(t.stopPropagation(),t.preventDefault())}),h.on("mousewheel.touchspin
DOMMouseScroll.touchspin",function(t){if(a.mousewheel&&h.is(":focus")){var
n=t.originalEvent.wheelDelta||-t.originalEvent.deltaY||-t.originalEvent.detail;t.stopPropagation(),t.preventDefault(),n<0?C():k()}}),h.on("touchspin.destroy",function(){var
n;n=h.parent(),N(),h.off(".touchspin"),n.hasClass("bootstrap-touchspin-injected")?(h.siblings().remove(),h.unwrap()):(t(".bootstrap-touchspin-injected",n).remove(),n.removeClass("bootstrap-touchspin")),h.data("alreadyinitialized",!1)}),h.on("touchspin.uponce",function(){N(),k()}),h.on("touchspin.downonce",function(){N(),C()}),h.on("touchspin.startupspin",function(){D()}),h.on("touchspin.startdownspin",function(){j()}),h.on("touchspin.stopspin",function(){N()}),h.on("touchspin.updatesettings",function(n,o){!function(n){(function(n){if(a=t.extend({},a,n),n.postfix){var
o=h.parent().find(".bootstrap-touchspin-postfix");0===o.length&&i.insertAfter(h),h.parent().find(".bootstrap-touchspin-postfix
.input-group-text").text(n.postfix)}if(n.prefix){var
s=h.parent().find(".bootstrap-touchspin-prefix");0===s.length&&e.insertBefore(h),h.parent().find(".bootstrap-touchspin-prefix
.input-group-text").text(n.prefix)}m()})(n),w();var
o=r.input.val();""!==o&&(o=Number(a.callback_before_calculation(r.input.val())),r.input.val(a.callback_after_calculation(Number(o).toFixed(a.decimals))))}(o)});var
c}()})}});tower/index.html000064400000000054151175232520007703
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>tower/tower-file-input.min.css000064400000003746151175232520012427
0ustar00.tower-file input[type="file"] {
/* height: 0.1px;
width: 0.1px;
not working if required */
height: 1px !important;
width: 1px !important;
opacity: 0;
}
.tower-file label {
margin-bottom: 0;
}
.tower-file label, .tower-file .tower-file-clear:not(:disabled) {
cursor: pointer;
}
.tower-file .tower-file-button {
background: white;
border: 1px solid #ccc;
padding: 0.2rem 0.5rem;
font-size: 1rem;
font-weight: normal;
line-height: 1.5;
user-select: none;
transition: background-color 0.15s ease-in-out, border-color 0.15s
ease-in-out;
}
.tower-file .tower-file-button:hover:not(:disabled) {
cursor: pointer;
background: #f2f2f2;
border-color: #b8b8b8;
}
.tower-file .tower-file-details {
position: relative;
border-radius: 0.25rem;
margin-top: 0.5rem;
}
.tower-file .tower-file-details .tower-file-list
/*,
.tower-file .tower-file-details img*/
{
border: 1px solid #ddd;
display: inline-block;
}
.tower-file .tower-file-details .tower-file-list {
/*padding: 0.375rem 0.75rem 0.375rem 2.5rem;*/
}
.tower-file .tower-file-details img {
padding: 0.375rem;
max-width: 100%;
}
.tower-file .tower-file-details:before, .tower-file
.tower-file-details:after {
content: "";
position: absolute;
left: 2rem;
height: 0;
width: 0;
}
.tower-file .tower-file-details:before {
top: -0.6rem;
border: 5px solid transparent;
border-bottom-color: #ddd;
}
.tower-file .tower-file-details:after {
top: calc(-0.6rem + 1px);
border: 5px solid transparent;
border-bottom-color: white;
}
.ph-file-upload-thumb {
height: 5em;
width: auto;
}
.ph-file-upload-box {
float: left;
background: #f2f2f2;
width: 7em;
margin: 0.2em;
text-align: center;
border-radius: 3px;
}
.ph-file-upload-name {
width: 6em;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
font-size: small;
margin: 0 auto;
text-align: center;
}tower/tower-file-input.min.js000064400000013626151175232520012251
0ustar00(function ($) {
$.fn.phFileInput = function (options) {
var settings = $.extend({
fileList: true,
iconClass: null,
fileCount: 5,
fileSizeLimit: 512000,
lang: {}
}, options);
function formatBytes(bytes) {
var decimals = arguments.length > 1 && arguments[1]
!== undefined ? arguments[1] : 2;
if (bytes === 0) return '0 B';
var k = 1024;
var dm = decimals < 0 ? 0 : decimals;
var sizes = ['B', 'KB', 'MB',
'GB', 'TB', 'PB', 'EB',
'ZB', 'YB'];
var i = Math.floor(Math.log(bytes) / Math.log(k));
return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) +
' ' + sizes[i];
}
function inputValueChanged(e) {
var input = $(this);
var container = input.closest('.tower-file');
var label = container.find('label');
var clear =
container.find('.tower-file-clear');
var fileList =
container.find('.tower-file-list').empty().hide();
var details =
container.find('.tower-file-details');
if (!details.length) {
container.append('<div
class="tower-file-details"></div>');
details = container.find('.tower-file-details');
}
var files = input[0].files;
var iconHtml = '';
if (settings.iconClass !== null &&
settings.iconClass.length > 0) {
iconHtml = '<span class="'+
settings.iconClass +'"></span>';
}
// Test the file count
if(files.length > settings.fileCount){
alert(
settings.lang["COM_PHOCACART_ERROR_TOO_MANY_FILES_SELECTED"]
+ " \n\n" +
settings.lang["COM_PHOCACART_MAXIMUM_NUMBER_FILES_SELECTED_IS"] +
": " + settings.fileCount
);
files.value = '';
clearInputAndDetails(false, container);
return false;
}
if (files.length > 0) {
if (settings.fileList && settings.fileCount > 0)
{
if (!fileList.length) {
details.append('<div
class="tower-file-list"></div>');
fileList =
container.find('.tower-file-list');
}
for (var i = 0; i < files.length; i++) {
if (files[i].size > 0 && files[i].size
> settings.fileSizeLimit) {
alert(
settings.lang["COM_PHOCACART_ERROR"]
+ ": " + files[i].name
+ " \n\n" +
settings.lang["COM_PHOCACART_WARNFILETOOLARGE"]
+ " \n\n" +
settings.lang["COM_PHOCACART_FILE_SIZE"] + ": " +
formatBytes(files[i].size)
+ " \n" +
settings.lang["COM_PHOCACART_FILE_SIZE_LIMIT"] + ": " +
formatBytes(settings.fileSizeLimit)
);
files.value = '';
clearInputAndDetails(false, container);
return false;
}
var fileId = 'phFileUploadId' + this.id +
i;
fileList.append('<div
class="ph-file-upload-box"><img src=""
alt="" id="'+ fileId + '" /><div
class="ph-file-upload-name">' + files[i].name +
'</div></div>');
var img = $('#' + fileId);
img.attr('class',
'ph-file-upload-thumb');
img.attr('alt', files[i].name);
img.attr('title', files[i].name);
showImgPreview(files[i], img);
}
details.show();
fileList.show();
} else {
fileList.hide();
}
label.html(iconHtml + files.length + ' ' +
settings.lang["COM_PHOCACART_FILES_SELECTED"] );
clear.attr('disabled', null);
} else {
// No Files Selected
details.hide();
label.html(label.data('default-text'));
clear.attr('disabled', '');
}
}
// Read the file data and insert the data URL into the src
function showImgPreview(file, img) {
var reader = new FileReader();
reader.onload = function (e) {
img.attr('src', reader.result).show();
};
reader.readAsDataURL(file);
}
function clearInputAndDetails(event, specificContainer) {
if (event === false) {
var container = specificContainer;
} else {
var container = $(this).closest('.tower-file');
}
container.find('input[type="file"]').val('');
var iconHtml = '';
if (settings.iconClass !== null &&
settings.iconClass.length > 0) {
iconHtml = '<span class="'+
settings.iconClass +'"></span>';
}
var label = container.find('label');
label.html(iconHtml + ' ' +
label.data('default-text'));
container.find('.tower-file-clear').attr('disabled',
'');
var details = container.find('.tower-file-details');
details.hide();
}
this.filter('input[type="file"]').each(function
() {
var container = $(this).closest('.tower-file');
var label = container.find('label');
if (label.length) {
label.attr('data-default-text',
label.text().trim());
}
var clear = container.find('.tower-file-clear');
if (clear.length) {
clear.attr('disabled', '');
clear.on('click', clearInputAndDetails);
}
$(this).on('change', inputValueChanged);
});
};
}(jQuery));ui/images/index.html000064400000000054151175232520010425
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>ui/images/ui-icons_444444_256x240.png000064400000015536151175232520012540
0ustar00�PNG
IHDR�E�r@gAMA���abKGDD�<��tIME�
6�FmIDATx��{leG}�?g�K�Ɇ^CKd�*�M��&6"�R庅� ���T�*�Id��T��JyT�������[$�Q�Q�Ї%j!�Y�ҦP�R�U���%p��y͜3�sν���w����͜��&x/MƁA�c���px�1A�Ġ���
b�-`�I"�k|��
�s�D'Iʃ�c!�Y��?l�G?�s�І��0�Z
"�o�"`Jy�t�(�P��5RH�&��<��m`����r�:�t
�b�t��<"�t�J�^��ߖwX��)�긏�i�t��ڇ�(wͩ�뛦!HL���2�Wͽ���F��w�)�����f��l�3�
����M���¶�g��δ��b�#�*`�1��(���.��a{4�v��+�
����@������pxh8�4~?@>�˿�(��mG��3a�`�Ξ:�����#%$��Y��M�gФ�k�6��R��}�S�����I(��MO��v�`*�9w{|3�8��s$
�P}����a��e?�����M/>�u�A���2�z�E@��.�y;ޖeƖ6vղE4�S���{m�8lUVύ3��<����A�q�`��xxh8�4^/
����@�᷅�p-��٩��?X/z_a�%�%�n
��@��!
����?@X�RU�?b}`L�.Uc��%T����껜���ȥ
����R��@�?��P�-`��Y�BKl�ub����Z}�n{#=P���oE�
LcJ���*��{���洳ڙ��X��NC��c�"���s��MrI�j���K�6(�˼f*�%��fV�v 6�aS�n*�փl��L"��.�v�T�2�Mu֛��Z�_e�
�-�!LU��i���{Phpt �s�����@������pxh8�4^�ph�,up���'\Z��"Z-��l�k.�� @rr���{����e+�[�\�fָ�ұ��y�:LTn�0WJ@}8�|��Ţ=�x�;Х��B_~���1�;^;Q*vV��w4�p@W>��N�v[�L�m'���t�.��%wsH��Y�趃�sT�C)e��Xg��a�N�U�ǯb
�U5AW�����2�ͽ��{K��:X�I�7+� @��7�6ӥ2Y:��+��'cj2���`�?H����jJ9;�n?/�3��05�<�1U�\8SMi�U�o�R��.��l�Hl�N�
&�n����r����WF�
g�1ıj���"��d��˵5Ց�l�M`���/@Ą�Ƥ��?"�;��h�4^/
����@�1Hsv��`�W�T}����ߨ_����=du/�0�d1w9��X�&��Q�p��xx`=�jg�.�)�![ �岔[4�f����vn�d���Ʒ���:s���h�Du��@=�m:0۫���ʦ���طM�}����OU���lJd
�[������l�ly�Pga꺠���[�:>>��LDkZ�Y���ֺ�c
h���?U!zӋU9��ch�8d���|��K�m�~c��=��^��
s�g��H2(ICT�P����[�
�KUa��t4�ڼk�M�t��x1��_&�>���P~����V����p���2��@���������pxh8�4^���ְ,�6yp�e�L6�U�EwO^��ahP�]��)f�Fy�$B�2���>��^��W�ͫ�I�n�U�@�.����E�<
���O�Us�n>��@d
�{/"���\�1�w�y�U{��w7��MrW�/�(ȧ��>�qHlY��=^�,Y ����;N��Ų�˟lf��#t|$�4�i���&�Q�J���sϗA��X4TR�F�#��M�w0b���Z =��0�H�j��ryz�V�(��5�nO��J&}<�v���!w�@d�O$���HQ�-��������c'���F�����h�/��
��yP
<��asᙴ�>[�Ǟ�@������p��L�+
S}I�
���6u��Hf�[e�rJZ,�6���v�e���ue�Z�q�7��]v��7�"0e-��z\���n� �3�r):r/��+B��l6}>�yM�ٹ�%�h�E�C��BX�Ը���l���%T��8/K�O��0׳��K���cm��y���1D��:�K�$_`M�
���5f�aIS����n���c�N�X"�!�R�LK"0����P�������q��AWN�VP��U���(�iJ�lƟ�6�ȗ��k\�=�ц8d����,�s��9IWl"���E���[�e8�5\e(���Y���"�r������q6�u- |��B���R��ix>��9�W�HD����g�t�K��G�|��2��"�.�t���V������E�u>�b�������f���a?q�h'y'r�y���ԫ�L�M��e�^��-�U=��-���³��K\
|
��_���W�*��*ƸJ�$��J�T=l��~��y��y�v�)��e���1~9�7V(��$�uڴ9@�;�[J�5�?*��pl!��x ���W�a-"T�-Vq�细�6
0�6�}[�S]%����7Q�K�D3"YO��M�6iv�Q�5C��t��/����7 �8�-*�"����_E�U�y0�x�+CxG�3�D��
�W�l�,>�O�l�<xB�+b�e�{�z������a�0b
�u���T����L=�`���yYf�0 ��@0J��
��pxh8�4^F����"��r8����͛n�RZԧ[v�-�P�7��/��E'�Z~�t����O�N�v��O�I����g���آ�4��؛��m�
��p���168,1ŢD/w�obۗ�O�i�ڻsK?�=<��B|W{|�~zOO�������*�t�q���uZt�%c�3�<?�,���֝��X�5Q"�Gִ����W}���
���Q>ʣ��C��b�YV
6=��*��ۿ�M\�����8hs�����������8��'Ϳ,�l������E�b���\Y�e���M6܈��d9u��J�ZĽj���l�}����&8�:s�ךt���yis���Gm�h-�m��k�2�P�J��e%u\j5���n���|���;����δa[�;�Хˎ�p�?�|�y��RaC$�_a�/��� N�uN�e�ƍ��Ȅp��~�Ú�/���k�������n�������3|��(G����".�s��9�J�ۇ��l�������{�6�)X���{�����SDf��<��|��0��a��ƅDP���
~j���gco�gs{;�����'�Z9�Z��.��O�孁���e���U�~?�Ӆ1N3��ڶD�(�� Ws�rW�g��h��0����)=c�9M���!
�Y��;�Qd��[��{.�h�_���5�؋�nF�7��0Q��O����S5�:�'���/��ա���J�r����
�}\�#<,�W���$�<��K��|�L�[�0pI���2��JS�_�݂��`�?��tɦ�'t�w6�1u�V��L�5��A��x���<F�7!�q]�'���~�y5��E��h8�-����pxh8�4���l�QP:�)�z�tt��}�X��i���^u�u�"�l���vW��
b�
��*�9ͻx��W
1��D�K��8�
|������pC!��}E~7C~?C�n1[�C�'I_O�� ,�J͞�D\\I�g�<˴��I6�*Q�����x�]�~�W)�^�~��(�B�y��\�ӑ�����ľ�U��k���:�ͅҍ2�
W�!�B�Ԝ�i�M֘�<�Ŏ�$��l2�&*�j�֞�_er=�M�?�'��OxSI��xj�_+]�t�+1�z
��ӡ;,ĶV��5�S��~'�L2ɏ����<gY�%ݼ�E���2z@wC����X�4�Y�ĺ̝zޞ��!Yg8�˅������O<�*5�>���x�2�Ht!6ɽV�\'�S��3�6����6���N���0����G�.����[PPwB����<����g�}�e)�H��U�C�xW\�~���`�9V8��!ٱ�b�����^�豨vh�M�J�/�!�6<�r�i�/���8��*��c¯y͐�J��>�S��j���c���
@��m���F�?�aֺ��k�b���e��bKT6�U����B�f�*�͘y�w �#q�JԄ�3�(��e>�B���~�d�{��fE����P��8�8�^�����:l�\���Z�nLBdC@�"zIj��o!~�Ħ�"�?ǝ��[��E��ؿfH��|�%�����#tY��Hͪ�!lc9^8<���˅h�:"����MF�eF���5p���f�覊�Yn�Yͣ�n��Fh�M1w8�N<�<�s w�?`[�J!Az^
?�<̯�oɛ�_s[Kg{(e�}�E�~J��,��<ܧ����U����
"&B%�7�~�{�/
G�l�4^���j���ιԒt���cA��0�/�����ܓ{�ܠ�Q�8��YN�Bݞ�?[���R��$�k���\�{�u���~�Q��q�)�8���z:G�G��UK�:�
07��6�-��
WMY<�����
���Ѱ۸(5�&v�}%��8�)#9&)/��K^2�)��B̳�)��V.jRps�n��B��^ߊט�4�m7�.�F�wQ�|餟*��<���m��O�c��&`8���t��۬f+�����6��D������h/��gr�\�2Nl�}��jH��R4�Ȫ��"�����fl׳��98�,˨�)��\Ԧ��27B��jcTf�褿[��1{��2��i�2�{Y���L�A�]~�L7��S�_��\4�ڞr����M���7��ɝA�R�k�9ٮ��Nl!l�
��Y����W� dH ���=Q����sԻ��"N�U�m�O`�;Ip�������+&R�@c�c$ᭁ
����@������pxȣc���@�
@���#��Օ����q�BǺ�a�A�V�B�F&<-m
VcKC�Ղ�ⷨ�/J)�D��P�E
�sg�ˮ�}����k<�\��{�x!�5�����}q�RX�L�]���/���
0�l)'�YT�:�Z����K-��Pxj�0I
:T�PQ)��ꦴ��5f�W9��3$
�!���l�IR�o0}?BQ�*6r��*3���a��!}����O�A���� C y������Q>B6W)Oݗ��<:�Xl��Cxh8�J`������pxh8�4y0���AdЊ]�^�u_����~
�c_"���9�1�J&�����p�D�\����`q��$AgY�|���y�P�9B�:Vg�EW�߲��~�=4��E�Mn��ָD[s;�2��t4�F�T���bw�x�C�!o�u�*8\W�_�ӏh���c�������؋�ڜ(�67��ǘ�����m�7���G�?���pM��6��#�xL��wE^DPk�$�3�eA�Y�~U��RA����A�vX��||hz�6k�)�X�(ONث��K��{J��
�F�alr�;h��1 �
0
���Gd���C�6�E�<��}���px[@������pxh82��P�~+��u��ߠ������K����7��4�2"���U�>���ou�6G�����~���@4d���cS��D��w�W�ޝ��!������5�B�������/��|�
�`�.��.�B͕�Ȼ�U;�������|Azһ�]���W��v��>`��
���_k�/yz/ГCj���bl�d���cu�Ȟ~�L͕���P�}��y5���
��'p�~~*�_�U#�!G��B
|V�:ĵ��>b���%��=A���y�Շ��*^_�b
�T�)}7
b�P��o��h�hh���~��r�M��/d���������.�?,<}T���U�'�_X����~u�% �� .(����?�6��s�'��Q<}R���V�A_U?[��w^U�H�_͕���8�+��Q���{]���n����K{F�w�M��H�k�pS����)\]��|�7iǿ��O ��z��7hze�
!
��6^/
����@�����A'ݣdk�X�mW�.�c�P�nךB���N�CB^l�e�HO�3�`c�Ηw�����C������c�鑇=B�&L��}C�GI���
�ȱ�)��6�( yh���=���T��=*�/5^/
����@����ؿ0��zY꯳�L2�rO��d�sid���
[�ؿ=�b�d؊�[���!\5@�D���?5"���0a����1h��-���ſr�v
���H�s�^A��LY���S��'E!��W���~?�ä<�W
P�ʱBΣ\5�^��]T�s����_�v���� Y���C���k�� ��z^yy^j%tEXtdate:create2016-09-14T13:33:16-04:00!
%tEXtdate:modify2016-07-13T05:26:54-04:000Lm�tEXtSoftwareAdobe
ImageReadyq�e<IEND�B`�ui/index.html000064400000000054151175232520007160
0ustar00<html><body
bgcolor="#FFFFFF"></body></html>ui/jquery-ui.slider.min.css000064400000002361151175232520011675
0ustar00/*! jQuery UI - v1.12.1 - 2018-09-03
* http://jqueryui.com
* Copyright jQuery Foundation and other contributors; Licensed MIT */
.ui-slider {
position: relative;
text-align: left;
}
.ui-slider .ui-slider-handle {
position: absolute;
/*z-index: 2;*/
width: 1.2em;
height: 1.2em;
cursor: default;
-ms-touch-action: none;
touch-action: none;
}
.ui-slider .ui-slider-range {
position: absolute;
z-index: 0;
font-size: .7em;
display: block;
border: 0;
background-position: 0 0;
}
/* support: IE8 - See #6727 */
.ui-slider.ui-state-disabled .ui-slider-handle,
.ui-slider.ui-state-disabled .ui-slider-range {
filter: inherit;
}
.ui-slider-horizontal {
height: .8em;
}
.ui-slider-horizontal .ui-slider-handle {
top: -.3em;
margin-left: -.6em;
}
.ui-slider-horizontal .ui-slider-range {
top: 0;
height: 100%;
}
.ui-slider-horizontal .ui-slider-range-min {
left: 0;
}
.ui-slider-horizontal .ui-slider-range-max {
right: 0;
}
.ui-slider-vertical {
width: .8em;
height: 100px;
}
.ui-slider-vertical .ui-slider-handle {
left: -.3em;
margin-left: 0;
margin-bottom: -.6em;
}
.ui-slider-vertical .ui-slider-range {
left: 0;
width: 100%;
}
.ui-slider-vertical .ui-slider-range-min {
bottom: 0;
}
.ui-slider-vertical .ui-slider-range-max {
top: 0;
}ui/jquery-ui.slider.min.js000064400000053320151175232520011522 0ustar00/*!
jQuery UI - v1.12.1 - 2018-09-03
* http://jqueryui.com
* Includes: widget.js, keycode.js, widgets/mouse.js, widgets/slider.js
* Copyright jQuery Foundation and other contributors; Licensed MIT */
(function(t){"function"==typeof
define&&define.amd?define(["jquery"],t):t(jQuery)})(function(t){t.ui=t.ui||{},t.ui.version="1.12.1";var
e=0,i=Array.prototype.slice;t.cleanData=function(e){return function(i){var
s,n,o;for(o=0;null!=(n=i[o]);o++)try{s=t._data(n,"events"),s&&s.remove&&t(n).triggerHandler("remove")}catch(a){}e(i)}}(t.cleanData),t.widget=function(e,i,s){var
n,o,a,r={},l=e.split(".")[0];e=e.split(".")[1];var
h=l+"-"+e;return
s||(s=i,i=t.Widget),t.isArray(s)&&(s=t.extend.apply(null,[{}].concat(s))),t.expr[":"][h.toLowerCase()]=function(e){return!!t.data(e,h)},t[l]=t[l]||{},n=t[l][e],o=t[l][e]=function(t,e){return
this._createWidget?(arguments.length&&this._createWidget(t,e),void
0):new
o(t,e)},t.extend(o,n,{version:s.version,_proto:t.extend({},s),_childConstructors:[]}),a=new
i,a.options=t.widget.extend({},a.options),t.each(s,function(e,s){return
t.isFunction(s)?(r[e]=function(){function t(){return
i.prototype[e].apply(this,arguments)}function n(t){return
i.prototype[e].apply(this,t)}return function(){var
e,i=this._super,o=this._superApply;return
this._super=t,this._superApply=n,e=s.apply(this,arguments),this._super=i,this._superApply=o,e}}(),void
0):(r[e]=s,void
0)}),o.prototype=t.widget.extend(a,{widgetEventPrefix:n?a.widgetEventPrefix||e:e},r,{constructor:o,namespace:l,widgetName:e,widgetFullName:h}),n?(t.each(n._childConstructors,function(e,i){var
s=i.prototype;t.widget(s.namespace+"."+s.widgetName,o,i._proto)}),delete
n._childConstructors):i._childConstructors.push(o),t.widget.bridge(e,o),o},t.widget.extend=function(e){for(var
s,n,o=i.call(arguments,1),a=0,r=o.length;r>a;a++)for(s in
o[a])n=o[a][s],o[a].hasOwnProperty(s)&&void
0!==n&&(e[s]=t.isPlainObject(n)?t.isPlainObject(e[s])?t.widget.extend({},e[s],n):t.widget.extend({},n):n);return
e},t.widget.bridge=function(e,s){var
n=s.prototype.widgetFullName||e;t.fn[e]=function(o){var
a="string"==typeof o,r=i.call(arguments,1),l=this;return
a?this.length||"instance"!==o?this.each(function(){var
i,s=t.data(this,n);return"instance"===o?(l=s,!1):s?t.isFunction(s[o])&&"_"!==o.charAt(0)?(i=s[o].apply(s,r),i!==s&&void
0!==i?(l=i&&i.jquery?l.pushStack(i.get()):i,!1):void
0):t.error("no such method '"+o+"' for
"+e+" widget instance"):t.error("cannot call methods on
"+e+" prior to initialization; "+"attempted to call
method '"+o+"'")}):l=void
0:(r.length&&(o=t.widget.extend.apply(null,[o].concat(r))),this.each(function(){var
e=t.data(this,n);e?(e.option(o||{}),e._init&&e._init()):t.data(this,n,new
s(o,this))})),l}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(i,s){s=t(s||this.defaultElement||this)[0],this.element=t(s),this.uuid=e++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),this.classesElementLookup={},s!==this&&(t.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===s&&this.destroy()}}),this.document=t(s.style?s.ownerDocument:s.document||s),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),i),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){var
e=this;this._destroy(),t.each(this.classesElementLookup,function(t,i){e._removeClass(i,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:t.noop,widget:function(){return
this.element},option:function(e,i){var
s,n,o,a=e;if(0===arguments.length)return
t.widget.extend({},this.options);if("string"==typeof
e)if(a={},s=e.split("."),e=s.shift(),s.length){for(n=a[e]=t.widget.extend({},this.options[e]),o=0;s.length-1>o;o++)n[s[o]]=n[s[o]]||{},n=n[s[o]];if(e=s.pop(),1===arguments.length)return
void 0===n[e]?null:n[e];n[e]=i}else{if(1===arguments.length)return void
0===this.options[e]?null:this.options[e];a[e]=i}return
this._setOptions(a),this},_setOptions:function(t){var e;for(e in
t)this._setOption(e,t[e]);return
this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(e){var
i,s,n;for(i in
e)n=this.classesElementLookup[i],e[i]!==this.options.classes[i]&&n&&n.length&&(s=t(n.get()),this._removeClass(n,i),s.addClass(this._classes({element:s,keys:i,classes:e,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return
this._setOptions({disabled:!1})},disable:function(){return
this._setOptions({disabled:!0})},_classes:function(e){function i(i,o){var
a,r;for(r=0;i.length>r;r++)a=n.classesElementLookup[i[r]]||t(),a=e.add?t(t.unique(a.get().concat(e.element.get()))):t(a.not(e.element).get()),n.classesElementLookup[i[r]]=a,s.push(i[r]),o&&e.classes[i[r]]&&s.push(e.classes[i[r]])}var
s=[],n=this;return
e=t.extend({element:this.element,classes:this.options.classes||{}},e),this._on(e.element,{remove:"_untrackClassesElement"}),e.keys&&i(e.keys.match(/\S+/g)||[],!0),e.extra&&i(e.extra.match(/\S+/g)||[]),s.join("
")},_untrackClassesElement:function(e){var
i=this;t.each(i.classesElementLookup,function(s,n){-1!==t.inArray(e.target,n)&&(i.classesElementLookup[s]=t(n.not(e.target).get()))})},_removeClass:function(t,e,i){return
this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return
this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,s){s="boolean"==typeof
s?s:i;var n="string"==typeof
t||null===t,o={extra:n?e:i,keys:n?t:e,element:n?this.element:t,add:s};return
o.element.toggleClass(this._classes(o),s),this},_on:function(e,i,s){var
n,o=this;"boolean"!=typeof
e&&(s=i,i=e,e=!1),s?(i=n=t(i),this.bindings=this.bindings.add(i)):(s=i,i=this.element,n=this.widget()),t.each(s,function(s,a){function
r(){return
e||o.options.disabled!==!0&&!t(this).hasClass("ui-state-disabled")?("string"==typeof
a?o[a]:a).apply(o,arguments):void 0}"string"!=typeof
a&&(r.guid=a.guid=a.guid||r.guid||t.guid++);var
l=s.match(/^([\w:-]*)\s*(.*)$/),h=l[1]+o.eventNamespace,u=l[2];u?n.on(h,u,r):i.on(h,r)})},_off:function(e,i){i=(i||"").split("
").join(this.eventNamespace+"
")+this.eventNamespace,e.off(i).off(i),this.bindings=t(this.bindings.not(e).get()),this.focusable=t(this.focusable.not(e).get()),this.hoverable=t(this.hoverable.not(e).get())},_delay:function(t,e){function
i(){return("string"==typeof t?s[t]:t).apply(s,arguments)}var
s=this;return
setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){this._addClass(t(e.currentTarget),null,"ui-state-hover")},mouseleave:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){this._addClass(t(e.currentTarget),null,"ui-state-focus")},focusout:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-focus")}})},_trigger:function(e,i,s){var
n,o,a=this.options[e];if(s=s||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(n
in o)n in i||(i[n]=o[n]);return
this.element.trigger(i,s),!(t.isFunction(a)&&a.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(s,n,o){"string"==typeof
n&&(n={effect:n});var a,r=n?n===!0||"number"==typeof
n?i:n.effect||i:e;n=n||{},"number"==typeof
n&&(n={duration:n}),a=!t.isEmptyObject(n),n.complete=o,n.delay&&s.delay(n.delay),a&&t.effects&&t.effects.effect[r]?s[e](n):r!==e&&s[r]?s[r](n.duration,n.easing,o):s.queue(function(i){t(this)[e](),o&&o.call(s[0]),i()})}}),t.widget,t.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},t.ui.ie=!!/msie
[\w.]+/.exec(navigator.userAgent.toLowerCase());var
s=!1;t(document).on("mouseup",function(){s=!1}),t.widget("ui.mouse",{version:"1.12.1",options:{cancel:"input,
textarea, button, select,
option",distance:1,delay:0},_mouseInit:function(){var
e=this;this.element.on("mousedown."+this.widgetName,function(t){return
e._mouseDown(t)}).on("click."+this.widgetName,function(i){return!0===t.data(i.target,e.widgetName+".preventClickEvent")?(t.removeData(i.target,e.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):void
0}),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(e){if(!s){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(e),this._mouseDownEvent=e;var
i=this,n=1===e.which,o="string"==typeof
this.options.cancel&&e.target.nodeName?t(e.target).closest(this.options.cancel).length:!1;return
n&&!o&&this._mouseCapture(e)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){i.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(e)!==!1,!this._mouseStarted)?(e.preventDefault(),!0):(!0===t.data(e.target,this.widgetName+".preventClickEvent")&&t.removeData(e.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return
i._mouseMove(t)},this._mouseUpDelegate=function(t){return
i._mouseUp(t)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),e.preventDefault(),s=!0,!0)):!0}},_mouseMove:function(e){if(this._mouseMoved){if(t.ui.ie&&(!document.documentMode||9>document.documentMode)&&!e.button)return
this._mouseUp(e);if(!e.which)if(e.originalEvent.altKey||e.originalEvent.ctrlKey||e.originalEvent.metaKey||e.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else
if(!this.ignoreMissingWhich)return
this._mouseUp(e)}return(e.which||e.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,e)!==!1,this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete
this._mouseDelayTimer),this.ignoreMissingWhich=!1,s=!1,e.preventDefault()},_mouseDistanceMet:function(t){return
Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return
this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),t.widget("ui.slider",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"slide",options:{animate:!1,classes:{"ui-slider":"ui-corner-all","ui-slider-handle":"ui-corner-all","ui-slider-range":"ui-corner-all
ui-widget-header"},distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},numPages:5,_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this._calculateNewMax(),this._addClass("ui-slider
ui-slider-"+this.orientation,"ui-widget
ui-widget-content"),this._refresh(),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var
e,i,s=this.options,n=this.element.find(".ui-slider-handle"),o="<span
tabindex='0'></span>",a=[];for(i=s.values&&s.values.length||1,n.length>i&&(n.slice(i).remove(),n=n.slice(0,i)),e=n.length;i>e;e++)a.push(o);this.handles=n.add(t(a.join("")).appendTo(this.element)),this._addClass(this.handles,"ui-slider-handle","ui-state-default"),this.handle=this.handles.eq(0),this.handles.each(function(e){t(this).data("ui-slider-handle-index",e).attr("tabIndex",0)})},_createRange:function(){var
e=this.options;e.range?(e.range===!0&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:t.isArray(e.values)&&(e.values=e.values.slice(0)):e.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?(this._removeClass(this.range,"ui-slider-range-min
ui-slider-range-max"),this.range.css({left:"",bottom:""})):(this.range=t("<div>").appendTo(this.element),this._addClass(this.range,"ui-slider-range")),("min"===e.range||"max"===e.range)&&this._addClass(this.range,"ui-slider-range-"+e.range)):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this._mouseDestroy()},_mouseCapture:function(e){var
i,s,n,o,a,r,l,h,u=this,c=this.options;return
c.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:e.pageX,y:e.pageY},s=this._normValueFromMouse(i),n=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var
i=Math.abs(s-u.values(e));(n>i||n===i&&(e===u._lastChangedValue||u.values(e)===c.min))&&(n=i,o=t(this),a=e)}),r=this._start(e,a),r===!1?!1:(this._mouseSliding=!0,this._handleIndex=a,this._addClass(o,null,"ui-state-active"),o.trigger("focus"),l=o.offset(),h=!t(e.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=h?{left:0,top:0}:{left:e.pageX-l.left-o.width()/2,top:e.pageY-l.top-o.height()/2-(parseInt(o.css("borderTopWidth"),10)||0)-(parseInt(o.css("borderBottomWidth"),10)||0)+(parseInt(o.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(e,a,s),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var
e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e);return
this._slide(t,this._handleIndex,i),!1},_mouseStop:function(t){return
this._removeClass(this.handles,null,"ui-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var
e,i,s,n,o;return"horizontal"===this.orientation?(e=this.elementSize.width,i=t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,i=t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),s=i/e,s>1&&(s=1),0>s&&(s=0),"vertical"===this.orientation&&(s=1-s),n=this._valueMax()-this._valueMin(),o=this._valueMin()+s*n,this._trimAlignValue(o)},_uiHash:function(t,e,i){var
s={handle:this.handles[t],handleIndex:t,value:void
0!==e?e:this.value()};return
this._hasMultipleValues()&&(s.value=void
0!==e?e:this.values(t),s.values=i||this.values()),s},_hasMultipleValues:function(){return
this.options.values&&this.options.values.length},_start:function(t,e){return
this._trigger("start",t,this._uiHash(e))},_slide:function(t,e,i){var
s,n,o=this.value(),a=this.values();this._hasMultipleValues()&&(n=this.values(e?0:1),o=this.values(e),2===this.options.values.length&&this.options.range===!0&&(i=0===e?Math.min(n,i):Math.max(n,i)),a[e]=i),i!==o&&(s=this._trigger("slide",t,this._uiHash(e,i,a)),s!==!1&&(this._hasMultipleValues()?this.values(e,i):this.value(i)))},_stop:function(t,e){this._trigger("stop",t,this._uiHash(e))},_change:function(t,e){this._keySliding||this._mouseSliding||(this._lastChangedValue=e,this._trigger("change",t,this._uiHash(e)))},value:function(t){return
arguments.length?(this.options.value=this._trimAlignValue(t),this._refreshValue(),this._change(null,0),void
0):this._value()},values:function(e,i){var
s,n,o;if(arguments.length>1)return
this.options.values[e]=this._trimAlignValue(i),this._refreshValue(),this._change(null,e),void
0;if(!arguments.length)return
this._values();if(!t.isArray(arguments[0]))return
this._hasMultipleValues()?this._values(e):this.value();for(s=this.options.values,n=arguments[0],o=0;s.length>o;o+=1)s[o]=this._trimAlignValue(n[o]),this._change(null,o);this._refreshValue()},_setOption:function(e,i){var
s,n=0;switch("range"===e&&this.options.range===!0&&("min"===i?(this.options.value=this._values(0),this.options.values=null):"max"===i&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),t.isArray(this.options.values)&&(n=this.options.values.length),this._super(e,i),e){case"orientation":this._detectOrientation(),this._removeClass("ui-slider-horizontal
ui-slider-vertical")._addClass("ui-slider-"+this.orientation),this._refreshValue(),this.options.range&&this._refreshRange(i),this.handles.css("horizontal"===i?"bottom":"left","");break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),s=n-1;s>=0;s--)this._change(null,s);this._animateOff=!1;break;case"step":case"min":case"max":this._animateOff=!0,this._calculateNewMax(),this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_setOptionDisabled:function(t){this._super(t),this._toggleClass(null,"ui-state-disabled",!!t)},_value:function(){var
t=this.options.value;return
t=this._trimAlignValue(t)},_values:function(t){var
e,i,s;if(arguments.length)return
e=this.options.values[t],e=this._trimAlignValue(e);if(this._hasMultipleValues()){for(i=this.options.values.slice(),s=0;i.length>s;s+=1)i[s]=this._trimAlignValue(i[s]);return
i}return[]},_trimAlignValue:function(t){if(this._valueMin()>=t)return
this._valueMin();if(t>=this._valueMax())return this._valueMax();var
e=this.options.step>0?this.options.step:1,i=(t-this._valueMin())%e,s=t-i;return
2*Math.abs(i)>=e&&(s+=i>0?e:-e),parseFloat(s.toFixed(5))},_calculateNewMax:function(){var
t=this.options.max,e=this._valueMin(),i=this.options.step,s=Math.round((t-e)/i)*i;t=s+e,t>this.options.max&&(t-=i),this.max=parseFloat(t.toFixed(this._precision()))},_precision:function(){var
t=this._precisionOf(this.options.step);return
null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var
e=""+t,i=e.indexOf(".");return-1===i?0:e.length-i-1},_valueMin:function(){return
this.options.min},_valueMax:function(){return
this.max},_refreshRange:function(t){"vertical"===t&&this.range.css({width:"",left:""}),"horizontal"===t&&this.range.css({height:"",bottom:""})},_refreshValue:function(){var
e,i,s,n,o,a=this.options.range,r=this.options,l=this,h=this._animateOff?!1:r.animate,u={};this._hasMultipleValues()?this.handles.each(function(s){i=100*((l.values(s)-l._valueMin())/(l._valueMax()-l._valueMin())),u["horizontal"===l.orientation?"left":"bottom"]=i+"%",t(this).stop(1,1)[h?"animate":"css"](u,r.animate),l.options.range===!0&&("horizontal"===l.orientation?(0===s&&l.range.stop(1,1)[h?"animate":"css"]({left:i+"%"},r.animate),1===s&&l.range[h?"animate":"css"]({width:i-e+"%"},{queue:!1,duration:r.animate})):(0===s&&l.range.stop(1,1)[h?"animate":"css"]({bottom:i+"%"},r.animate),1===s&&l.range[h?"animate":"css"]({height:i-e+"%"},{queue:!1,duration:r.animate}))),e=i}):(s=this.value(),n=this._valueMin(),o=this._valueMax(),i=o!==n?100*((s-n)/(o-n)):0,u["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[h?"animate":"css"](u,r.animate),"min"===a&&"horizontal"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({width:i+"%"},r.animate),"max"===a&&"horizontal"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({width:100-i+"%"},r.animate),"min"===a&&"vertical"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({height:i+"%"},r.animate),"max"===a&&"vertical"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({height:100-i+"%"},r.animate))},_handleEvents:{keydown:function(e){var
i,s,n,o,a=t(e.target).data("ui-slider-handle-index");switch(e.keyCode){case
t.ui.keyCode.HOME:case t.ui.keyCode.END:case t.ui.keyCode.PAGE_UP:case
t.ui.keyCode.PAGE_DOWN:case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:case
t.ui.keyCode.DOWN:case
t.ui.keyCode.LEFT:if(e.preventDefault(),!this._keySliding&&(this._keySliding=!0,this._addClass(t(e.target),null,"ui-state-active"),i=this._start(e,a),i===!1))return}switch(o=this.options.step,s=n=this._hasMultipleValues()?this.values(a):this.value(),e.keyCode){case
t.ui.keyCode.HOME:n=this._valueMin();break;case
t.ui.keyCode.END:n=this._valueMax();break;case
t.ui.keyCode.PAGE_UP:n=this._trimAlignValue(s+(this._valueMax()-this._valueMin())/this.numPages);break;case
t.ui.keyCode.PAGE_DOWN:n=this._trimAlignValue(s-(this._valueMax()-this._valueMin())/this.numPages);break;case
t.ui.keyCode.UP:case
t.ui.keyCode.RIGHT:if(s===this._valueMax())return;n=this._trimAlignValue(s+o);break;case
t.ui.keyCode.DOWN:case
t.ui.keyCode.LEFT:if(s===this._valueMin())return;n=this._trimAlignValue(s-o)}this._slide(e,a,n)},keyup:function(e){var
i=t(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,i),this._change(e,i),this._removeClass(t(e.target),null,"ui-state-active"))}}})});ui/jquery-ui.slider.tooltip.min.js000064400000102224151175232520013211
0ustar00/*! jQuery UI - v1.12.1 - 2020-04-04
* http://jqueryui.com
* Includes: widget.js, position.js, keycode.js, unique-id.js,
widgets/mouse.js, widgets/slider.js, widgets/tooltip.js
* Copyright jQuery Foundation and other contributors; Licensed MIT */
(function(t){"function"==typeof
define&&define.amd?define(["jquery"],t):t(jQuery)})(function(t){t.ui=t.ui||{},t.ui.version="1.12.1";var
e=0,i=Array.prototype.slice;t.cleanData=function(e){return function(i){var
s,n,o;for(o=0;null!=(n=i[o]);o++)try{s=t._data(n,"events"),s&&s.remove&&t(n).triggerHandler("remove")}catch(a){}e(i)}}(t.cleanData),t.widget=function(e,i,s){var
n,o,a,r={},h=e.split(".")[0];e=e.split(".")[1];var
l=h+"-"+e;return
s||(s=i,i=t.Widget),t.isArray(s)&&(s=t.extend.apply(null,[{}].concat(s))),t.expr[":"][l.toLowerCase()]=function(e){return!!t.data(e,l)},t[h]=t[h]||{},n=t[h][e],o=t[h][e]=function(t,e){return
this._createWidget?(arguments.length&&this._createWidget(t,e),void
0):new
o(t,e)},t.extend(o,n,{version:s.version,_proto:t.extend({},s),_childConstructors:[]}),a=new
i,a.options=t.widget.extend({},a.options),t.each(s,function(e,s){return
t.isFunction(s)?(r[e]=function(){function t(){return
i.prototype[e].apply(this,arguments)}function n(t){return
i.prototype[e].apply(this,t)}return function(){var
e,i=this._super,o=this._superApply;return
this._super=t,this._superApply=n,e=s.apply(this,arguments),this._super=i,this._superApply=o,e}}(),void
0):(r[e]=s,void
0)}),o.prototype=t.widget.extend(a,{widgetEventPrefix:n?a.widgetEventPrefix||e:e},r,{constructor:o,namespace:h,widgetName:e,widgetFullName:l}),n?(t.each(n._childConstructors,function(e,i){var
s=i.prototype;t.widget(s.namespace+"."+s.widgetName,o,i._proto)}),delete
n._childConstructors):i._childConstructors.push(o),t.widget.bridge(e,o),o},t.widget.extend=function(e){for(var
s,n,o=i.call(arguments,1),a=0,r=o.length;r>a;a++)for(s in
o[a])n=o[a][s],o[a].hasOwnProperty(s)&&void
0!==n&&(e[s]=t.isPlainObject(n)?t.isPlainObject(e[s])?t.widget.extend({},e[s],n):t.widget.extend({},n):n);return
e},t.widget.bridge=function(e,s){var
n=s.prototype.widgetFullName||e;t.fn[e]=function(o){var
a="string"==typeof o,r=i.call(arguments,1),h=this;return
a?this.length||"instance"!==o?this.each(function(){var
i,s=t.data(this,n);return"instance"===o?(h=s,!1):s?t.isFunction(s[o])&&"_"!==o.charAt(0)?(i=s[o].apply(s,r),i!==s&&void
0!==i?(h=i&&i.jquery?h.pushStack(i.get()):i,!1):void
0):t.error("no such method '"+o+"' for
"+e+" widget instance"):t.error("cannot call methods on
"+e+" prior to initialization; "+"attempted to call
method '"+o+"'")}):h=void
0:(r.length&&(o=t.widget.extend.apply(null,[o].concat(r))),this.each(function(){var
e=t.data(this,n);e?(e.option(o||{}),e._init&&e._init()):t.data(this,n,new
s(o,this))})),h}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(i,s){s=t(s||this.defaultElement||this)[0],this.element=t(s),this.uuid=e++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),this.classesElementLookup={},s!==this&&(t.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===s&&this.destroy()}}),this.document=t(s.style?s.ownerDocument:s.document||s),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),i),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){var
e=this;this._destroy(),t.each(this.classesElementLookup,function(t,i){e._removeClass(i,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:t.noop,widget:function(){return
this.element},option:function(e,i){var
s,n,o,a=e;if(0===arguments.length)return
t.widget.extend({},this.options);if("string"==typeof
e)if(a={},s=e.split("."),e=s.shift(),s.length){for(n=a[e]=t.widget.extend({},this.options[e]),o=0;s.length-1>o;o++)n[s[o]]=n[s[o]]||{},n=n[s[o]];if(e=s.pop(),1===arguments.length)return
void 0===n[e]?null:n[e];n[e]=i}else{if(1===arguments.length)return void
0===this.options[e]?null:this.options[e];a[e]=i}return
this._setOptions(a),this},_setOptions:function(t){var e;for(e in
t)this._setOption(e,t[e]);return
this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(e){var
i,s,n;for(i in
e)n=this.classesElementLookup[i],e[i]!==this.options.classes[i]&&n&&n.length&&(s=t(n.get()),this._removeClass(n,i),s.addClass(this._classes({element:s,keys:i,classes:e,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return
this._setOptions({disabled:!1})},disable:function(){return
this._setOptions({disabled:!0})},_classes:function(e){function i(i,o){var
a,r;for(r=0;i.length>r;r++)a=n.classesElementLookup[i[r]]||t(),a=e.add?t(t.unique(a.get().concat(e.element.get()))):t(a.not(e.element).get()),n.classesElementLookup[i[r]]=a,s.push(i[r]),o&&e.classes[i[r]]&&s.push(e.classes[i[r]])}var
s=[],n=this;return
e=t.extend({element:this.element,classes:this.options.classes||{}},e),this._on(e.element,{remove:"_untrackClassesElement"}),e.keys&&i(e.keys.match(/\S+/g)||[],!0),e.extra&&i(e.extra.match(/\S+/g)||[]),s.join("
")},_untrackClassesElement:function(e){var
i=this;t.each(i.classesElementLookup,function(s,n){-1!==t.inArray(e.target,n)&&(i.classesElementLookup[s]=t(n.not(e.target).get()))})},_removeClass:function(t,e,i){return
this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return
this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,s){s="boolean"==typeof
s?s:i;var n="string"==typeof
t||null===t,o={extra:n?e:i,keys:n?t:e,element:n?this.element:t,add:s};return
o.element.toggleClass(this._classes(o),s),this},_on:function(e,i,s){var
n,o=this;"boolean"!=typeof
e&&(s=i,i=e,e=!1),s?(i=n=t(i),this.bindings=this.bindings.add(i)):(s=i,i=this.element,n=this.widget()),t.each(s,function(s,a){function
r(){return
e||o.options.disabled!==!0&&!t(this).hasClass("ui-state-disabled")?("string"==typeof
a?o[a]:a).apply(o,arguments):void 0}"string"!=typeof
a&&(r.guid=a.guid=a.guid||r.guid||t.guid++);var
h=s.match(/^([\w:-]*)\s*(.*)$/),l=h[1]+o.eventNamespace,c=h[2];c?n.on(l,c,r):i.on(l,r)})},_off:function(e,i){i=(i||"").split("
").join(this.eventNamespace+"
")+this.eventNamespace,e.off(i).off(i),this.bindings=t(this.bindings.not(e).get()),this.focusable=t(this.focusable.not(e).get()),this.hoverable=t(this.hoverable.not(e).get())},_delay:function(t,e){function
i(){return("string"==typeof t?s[t]:t).apply(s,arguments)}var
s=this;return
setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){this._addClass(t(e.currentTarget),null,"ui-state-hover")},mouseleave:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){this._addClass(t(e.currentTarget),null,"ui-state-focus")},focusout:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-focus")}})},_trigger:function(e,i,s){var
n,o,a=this.options[e];if(s=s||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(n
in o)n in i||(i[n]=o[n]);return
this.element.trigger(i,s),!(t.isFunction(a)&&a.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(s,n,o){"string"==typeof
n&&(n={effect:n});var a,r=n?n===!0||"number"==typeof
n?i:n.effect||i:e;n=n||{},"number"==typeof
n&&(n={duration:n}),a=!t.isEmptyObject(n),n.complete=o,n.delay&&s.delay(n.delay),a&&t.effects&&t.effects.effect[r]?s[e](n):r!==e&&s[r]?s[r](n.duration,n.easing,o):s.queue(function(i){t(this)[e](),o&&o.call(s[0]),i()})}}),t.widget,function(){function
e(t,e,i){return[parseFloat(t[0])*(u.test(t[0])?e/100:1),parseFloat(t[1])*(u.test(t[1])?i/100:1)]}function
i(e,i){return parseInt(t.css(e,i),10)||0}function s(e){var i=e[0];return
9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}var
n,o=Math.max,a=Math.abs,r=/left|center|right/,h=/top|center|bottom/,l=/[\+\-]\d+(\.[\d]+)?%?/,c=/^\w+/,u=/%$/,d=t.fn.position;t.position={scrollbarWidth:function(){if(void
0!==n)return n;var e,i,s=t("<div
style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div
style='height:100px;width:auto;'></div></div>"),o=s.children()[0];return
t("body").append(s),e=o.offsetWidth,s.css("overflow","scroll"),i=o.offsetWidth,e===i&&(i=s[0].clientWidth),s.remove(),n=e-i},getScrollInfo:function(e){var
i=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),s=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),n="scroll"===i||"auto"===i&&e.width<e.element[0].scrollWidth,o="scroll"===s||"auto"===s&&e.height<e.element[0].scrollHeight;return{width:o?t.position.scrollbarWidth():0,height:n?t.position.scrollbarWidth():0}},getWithinInfo:function(e){var
i=t(e||window),s=t.isWindow(i[0]),n=!!i[0]&&9===i[0].nodeType,o=!s&&!n;return{element:i,isWindow:s,isDocument:n,offset:o?t(e).offset():{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:i.outerWidth(),height:i.outerHeight()}}},t.fn.position=function(n){if(!n||!n.of)return
d.apply(this,arguments);n=t.extend({},n);var
u,p,f,m,g,v,_=t(n.of),b=t.position.getWithinInfo(n.within),y=t.position.getScrollInfo(b),w=(n.collision||"flip").split("
"),x={};return v=s(_),_[0].preventDefault&&(n.at="left
top"),p=v.width,f=v.height,m=v.offset,g=t.extend({},m),t.each(["my","at"],function(){var
t,e,i=(n[this]||"").split("
");1===i.length&&(i=r.test(i[0])?i.concat(["center"]):h.test(i[0])?["center"].concat(i):["center","center"]),i[0]=r.test(i[0])?i[0]:"center",i[1]=h.test(i[1])?i[1]:"center",t=l.exec(i[0]),e=l.exec(i[1]),x[this]=[t?t[0]:0,e?e[0]:0],n[this]=[c.exec(i[0])[0],c.exec(i[1])[0]]}),1===w.length&&(w[1]=w[0]),"right"===n.at[0]?g.left+=p:"center"===n.at[0]&&(g.left+=p/2),"bottom"===n.at[1]?g.top+=f:"center"===n.at[1]&&(g.top+=f/2),u=e(x.at,p,f),g.left+=u[0],g.top+=u[1],this.each(function(){var
s,r,h=t(this),l=h.outerWidth(),c=h.outerHeight(),d=i(this,"marginLeft"),v=i(this,"marginTop"),k=l+d+i(this,"marginRight")+y.width,C=c+v+i(this,"marginBottom")+y.height,D=t.extend({},g),P=e(x.my,h.outerWidth(),h.outerHeight());"right"===n.my[0]?D.left-=l:"center"===n.my[0]&&(D.left-=l/2),"bottom"===n.my[1]?D.top-=c:"center"===n.my[1]&&(D.top-=c/2),D.left+=P[0],D.top+=P[1],s={marginLeft:d,marginTop:v},t.each(["left","top"],function(e,i){t.ui.position[w[e]]&&t.ui.position[w[e]][i](D,{targetWidth:p,targetHeight:f,elemWidth:l,elemHeight:c,collisionPosition:s,collisionWidth:k,collisionHeight:C,offset:[u[0]+P[0],u[1]+P[1]],my:n.my,at:n.at,within:b,elem:h})}),n.using&&(r=function(t){var
e=m.left-D.left,i=e+p-l,s=m.top-D.top,r=s+f-c,u={target:{element:_,left:m.left,top:m.top,width:p,height:f},element:{element:h,left:D.left,top:D.top,width:l,height:c},horizontal:0>i?"left":e>0?"right":"center",vertical:0>r?"top":s>0?"bottom":"middle"};l>p&&p>a(e+i)&&(u.horizontal="center"),c>f&&f>a(s+r)&&(u.vertical="middle"),u.important=o(a(e),a(i))>o(a(s),a(r))?"horizontal":"vertical",n.using.call(this,t,u)}),h.offset(t.extend(D,{using:r}))})},t.ui.position={fit:{left:function(t,e){var
i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,a=s.width,r=t.left-e.collisionPosition.marginLeft,h=n-r,l=r+e.collisionWidth-a-n;e.collisionWidth>a?h>0&&0>=l?(i=t.left+h+e.collisionWidth-a-n,t.left+=h-i):t.left=l>0&&0>=h?n:h>l?n+a-e.collisionWidth:n:h>0?t.left+=h:l>0?t.left-=l:t.left=o(t.left-r,t.left)},top:function(t,e){var
i,s=e.within,n=s.isWindow?s.scrollTop:s.offset.top,a=e.within.height,r=t.top-e.collisionPosition.marginTop,h=n-r,l=r+e.collisionHeight-a-n;e.collisionHeight>a?h>0&&0>=l?(i=t.top+h+e.collisionHeight-a-n,t.top+=h-i):t.top=l>0&&0>=h?n:h>l?n+a-e.collisionHeight:n:h>0?t.top+=h:l>0?t.top-=l:t.top=o(t.top-r,t.top)}},flip:{left:function(t,e){var
i,s,n=e.within,o=n.offset.left+n.scrollLeft,r=n.width,h=n.isWindow?n.scrollLeft:n.offset.left,l=t.left-e.collisionPosition.marginLeft,c=l-h,u=l+e.collisionWidth-r-h,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];0>c?(i=t.left+d+p+f+e.collisionWidth-r-o,(0>i||a(c)>i)&&(t.left+=d+p+f)):u>0&&(s=t.left-e.collisionPosition.marginLeft+d+p+f-h,(s>0||u>a(s))&&(t.left+=d+p+f))},top:function(t,e){var
i,s,n=e.within,o=n.offset.top+n.scrollTop,r=n.height,h=n.isWindow?n.scrollTop:n.offset.top,l=t.top-e.collisionPosition.marginTop,c=l-h,u=l+e.collisionHeight-r-h,d="top"===e.my[1],p=d?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,m=-2*e.offset[1];0>c?(s=t.top+p+f+m+e.collisionHeight-r-o,(0>s||a(c)>s)&&(t.top+=p+f+m)):u>0&&(i=t.top-e.collisionPosition.marginTop+p+f+m-h,(i>0||u>a(i))&&(t.top+=p+f+m))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}}}(),t.ui.position,t.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},t.fn.extend({uniqueId:function(){var
t=0;return function(){return
this.each(function(){this.id||(this.id="ui-id-"+
++t)})}}(),removeUniqueId:function(){return
this.each(function(){/^ui-id-\d+$/.test(this.id)&&t(this).removeAttr("id")})}}),t.ui.ie=!!/msie
[\w.]+/.exec(navigator.userAgent.toLowerCase());var
s=!1;t(document).on("mouseup",function(){s=!1}),t.widget("ui.mouse",{version:"1.12.1",options:{cancel:"input,
textarea, button, select,
option",distance:1,delay:0},_mouseInit:function(){var
e=this;this.element.on("mousedown."+this.widgetName,function(t){return
e._mouseDown(t)}).on("click."+this.widgetName,function(i){return!0===t.data(i.target,e.widgetName+".preventClickEvent")?(t.removeData(i.target,e.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):void
0}),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(e){if(!s){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(e),this._mouseDownEvent=e;var
i=this,n=1===e.which,o="string"==typeof
this.options.cancel&&e.target.nodeName?t(e.target).closest(this.options.cancel).length:!1;return
n&&!o&&this._mouseCapture(e)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){i.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(e)!==!1,!this._mouseStarted)?(e.preventDefault(),!0):(!0===t.data(e.target,this.widgetName+".preventClickEvent")&&t.removeData(e.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return
i._mouseMove(t)},this._mouseUpDelegate=function(t){return
i._mouseUp(t)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),e.preventDefault(),s=!0,!0)):!0}},_mouseMove:function(e){if(this._mouseMoved){if(t.ui.ie&&(!document.documentMode||9>document.documentMode)&&!e.button)return
this._mouseUp(e);if(!e.which)if(e.originalEvent.altKey||e.originalEvent.ctrlKey||e.originalEvent.metaKey||e.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else
if(!this.ignoreMissingWhich)return
this._mouseUp(e)}return(e.which||e.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,e)!==!1,this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete
this._mouseDelayTimer),this.ignoreMissingWhich=!1,s=!1,e.preventDefault()},_mouseDistanceMet:function(t){return
Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return
this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),t.widget("ui.slider",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"slide",options:{animate:!1,classes:{"ui-slider":"ui-corner-all","ui-slider-handle":"ui-corner-all","ui-slider-range":"ui-corner-all
ui-widget-header"},distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},numPages:5,_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this._calculateNewMax(),this._addClass("ui-slider
ui-slider-"+this.orientation,"ui-widget
ui-widget-content"),this._refresh(),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var
e,i,s=this.options,n=this.element.find(".ui-slider-handle"),o="<span
tabindex='0'></span>",a=[];for(i=s.values&&s.values.length||1,n.length>i&&(n.slice(i).remove(),n=n.slice(0,i)),e=n.length;i>e;e++)a.push(o);this.handles=n.add(t(a.join("")).appendTo(this.element)),this._addClass(this.handles,"ui-slider-handle","ui-state-default"),this.handle=this.handles.eq(0),this.handles.each(function(e){t(this).data("ui-slider-handle-index",e).attr("tabIndex",0)})},_createRange:function(){var
e=this.options;e.range?(e.range===!0&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:t.isArray(e.values)&&(e.values=e.values.slice(0)):e.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?(this._removeClass(this.range,"ui-slider-range-min
ui-slider-range-max"),this.range.css({left:"",bottom:""})):(this.range=t("<div>").appendTo(this.element),this._addClass(this.range,"ui-slider-range")),("min"===e.range||"max"===e.range)&&this._addClass(this.range,"ui-slider-range-"+e.range)):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this._mouseDestroy()},_mouseCapture:function(e){var
i,s,n,o,a,r,h,l,c=this,u=this.options;return
u.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:e.pageX,y:e.pageY},s=this._normValueFromMouse(i),n=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var
i=Math.abs(s-c.values(e));(n>i||n===i&&(e===c._lastChangedValue||c.values(e)===u.min))&&(n=i,o=t(this),a=e)}),r=this._start(e,a),r===!1?!1:(this._mouseSliding=!0,this._handleIndex=a,this._addClass(o,null,"ui-state-active"),o.trigger("focus"),h=o.offset(),l=!t(e.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=l?{left:0,top:0}:{left:e.pageX-h.left-o.width()/2,top:e.pageY-h.top-o.height()/2-(parseInt(o.css("borderTopWidth"),10)||0)-(parseInt(o.css("borderBottomWidth"),10)||0)+(parseInt(o.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(e,a,s),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var
e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e);return
this._slide(t,this._handleIndex,i),!1},_mouseStop:function(t){return
this._removeClass(this.handles,null,"ui-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var
e,i,s,n,o;return"horizontal"===this.orientation?(e=this.elementSize.width,i=t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,i=t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),s=i/e,s>1&&(s=1),0>s&&(s=0),"vertical"===this.orientation&&(s=1-s),n=this._valueMax()-this._valueMin(),o=this._valueMin()+s*n,this._trimAlignValue(o)},_uiHash:function(t,e,i){var
s={handle:this.handles[t],handleIndex:t,value:void
0!==e?e:this.value()};return
this._hasMultipleValues()&&(s.value=void
0!==e?e:this.values(t),s.values=i||this.values()),s},_hasMultipleValues:function(){return
this.options.values&&this.options.values.length},_start:function(t,e){return
this._trigger("start",t,this._uiHash(e))},_slide:function(t,e,i){var
s,n,o=this.value(),a=this.values();this._hasMultipleValues()&&(n=this.values(e?0:1),o=this.values(e),2===this.options.values.length&&this.options.range===!0&&(i=0===e?Math.min(n,i):Math.max(n,i)),a[e]=i),i!==o&&(s=this._trigger("slide",t,this._uiHash(e,i,a)),s!==!1&&(this._hasMultipleValues()?this.values(e,i):this.value(i)))},_stop:function(t,e){this._trigger("stop",t,this._uiHash(e))},_change:function(t,e){this._keySliding||this._mouseSliding||(this._lastChangedValue=e,this._trigger("change",t,this._uiHash(e)))},value:function(t){return
arguments.length?(this.options.value=this._trimAlignValue(t),this._refreshValue(),this._change(null,0),void
0):this._value()},values:function(e,i){var
s,n,o;if(arguments.length>1)return
this.options.values[e]=this._trimAlignValue(i),this._refreshValue(),this._change(null,e),void
0;if(!arguments.length)return
this._values();if(!t.isArray(arguments[0]))return
this._hasMultipleValues()?this._values(e):this.value();for(s=this.options.values,n=arguments[0],o=0;s.length>o;o+=1)s[o]=this._trimAlignValue(n[o]),this._change(null,o);this._refreshValue()},_setOption:function(e,i){var
s,n=0;switch("range"===e&&this.options.range===!0&&("min"===i?(this.options.value=this._values(0),this.options.values=null):"max"===i&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),t.isArray(this.options.values)&&(n=this.options.values.length),this._super(e,i),e){case"orientation":this._detectOrientation(),this._removeClass("ui-slider-horizontal
ui-slider-vertical")._addClass("ui-slider-"+this.orientation),this._refreshValue(),this.options.range&&this._refreshRange(i),this.handles.css("horizontal"===i?"bottom":"left","");break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),s=n-1;s>=0;s--)this._change(null,s);this._animateOff=!1;break;case"step":case"min":case"max":this._animateOff=!0,this._calculateNewMax(),this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_setOptionDisabled:function(t){this._super(t),this._toggleClass(null,"ui-state-disabled",!!t)},_value:function(){var
t=this.options.value;return
t=this._trimAlignValue(t)},_values:function(t){var
e,i,s;if(arguments.length)return
e=this.options.values[t],e=this._trimAlignValue(e);if(this._hasMultipleValues()){for(i=this.options.values.slice(),s=0;i.length>s;s+=1)i[s]=this._trimAlignValue(i[s]);return
i}return[]},_trimAlignValue:function(t){if(this._valueMin()>=t)return
this._valueMin();if(t>=this._valueMax())return this._valueMax();var
e=this.options.step>0?this.options.step:1,i=(t-this._valueMin())%e,s=t-i;return
2*Math.abs(i)>=e&&(s+=i>0?e:-e),parseFloat(s.toFixed(5))},_calculateNewMax:function(){var
t=this.options.max,e=this._valueMin(),i=this.options.step,s=Math.round((t-e)/i)*i;t=s+e,t>this.options.max&&(t-=i),this.max=parseFloat(t.toFixed(this._precision()))},_precision:function(){var
t=this._precisionOf(this.options.step);return
null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var
e=""+t,i=e.indexOf(".");return-1===i?0:e.length-i-1},_valueMin:function(){return
this.options.min},_valueMax:function(){return
this.max},_refreshRange:function(t){"vertical"===t&&this.range.css({width:"",left:""}),"horizontal"===t&&this.range.css({height:"",bottom:""})},_refreshValue:function(){var
e,i,s,n,o,a=this.options.range,r=this.options,h=this,l=this._animateOff?!1:r.animate,c={};this._hasMultipleValues()?this.handles.each(function(s){i=100*((h.values(s)-h._valueMin())/(h._valueMax()-h._valueMin())),c["horizontal"===h.orientation?"left":"bottom"]=i+"%",t(this).stop(1,1)[l?"animate":"css"](c,r.animate),h.options.range===!0&&("horizontal"===h.orientation?(0===s&&h.range.stop(1,1)[l?"animate":"css"]({left:i+"%"},r.animate),1===s&&h.range[l?"animate":"css"]({width:i-e+"%"},{queue:!1,duration:r.animate})):(0===s&&h.range.stop(1,1)[l?"animate":"css"]({bottom:i+"%"},r.animate),1===s&&h.range[l?"animate":"css"]({height:i-e+"%"},{queue:!1,duration:r.animate}))),e=i}):(s=this.value(),n=this._valueMin(),o=this._valueMax(),i=o!==n?100*((s-n)/(o-n)):0,c["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[l?"animate":"css"](c,r.animate),"min"===a&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:i+"%"},r.animate),"max"===a&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:100-i+"%"},r.animate),"min"===a&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:i+"%"},r.animate),"max"===a&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:100-i+"%"},r.animate))},_handleEvents:{keydown:function(e){var
i,s,n,o,a=t(e.target).data("ui-slider-handle-index");switch(e.keyCode){case
t.ui.keyCode.HOME:case t.ui.keyCode.END:case t.ui.keyCode.PAGE_UP:case
t.ui.keyCode.PAGE_DOWN:case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:case
t.ui.keyCode.DOWN:case
t.ui.keyCode.LEFT:if(e.preventDefault(),!this._keySliding&&(this._keySliding=!0,this._addClass(t(e.target),null,"ui-state-active"),i=this._start(e,a),i===!1))return}switch(o=this.options.step,s=n=this._hasMultipleValues()?this.values(a):this.value(),e.keyCode){case
t.ui.keyCode.HOME:n=this._valueMin();break;case
t.ui.keyCode.END:n=this._valueMax();break;case
t.ui.keyCode.PAGE_UP:n=this._trimAlignValue(s+(this._valueMax()-this._valueMin())/this.numPages);break;case
t.ui.keyCode.PAGE_DOWN:n=this._trimAlignValue(s-(this._valueMax()-this._valueMin())/this.numPages);break;case
t.ui.keyCode.UP:case
t.ui.keyCode.RIGHT:if(s===this._valueMax())return;n=this._trimAlignValue(s+o);break;case
t.ui.keyCode.DOWN:case
t.ui.keyCode.LEFT:if(s===this._valueMin())return;n=this._trimAlignValue(s-o)}this._slide(e,a,n)},keyup:function(e){var
i=t(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,i),this._change(e,i),this._removeClass(t(e.target),null,"ui-state-active"))}}}),t.widget("ui.tooltip",{version:"1.12.1",options:{classes:{"ui-tooltip":"ui-corner-all
ui-widget-shadow"},content:function(){var
e=t(this).attr("title")||"";return
t("<a>").text(e).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left
top+15",at:"left bottom",collision:"flipfit
flip"},show:!0,track:!1,close:null,open:null},_addDescribedBy:function(e,i){var
s=(e.attr("aria-describedby")||"").split(/\s+/);s.push(i),e.data("ui-tooltip-id",i).attr("aria-describedby",t.trim(s.join("
")))},_removeDescribedBy:function(e){var
i=e.data("ui-tooltip-id"),s=(e.attr("aria-describedby")||"").split(/\s+/),n=t.inArray(i,s);-1!==n&&s.splice(n,1),e.removeData("ui-tooltip-id"),s=t.trim(s.join("
")),s?e.attr("aria-describedby",s):e.removeAttr("aria-describedby")},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.liveRegion=t("<div>").attr({role:"log","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this.disabledTitles=t([])},_setOption:function(e,i){var
s=this;this._super(e,i),"content"===e&&t.each(this.tooltips,function(t,e){s._updateContent(e.element)})},_setOptionDisabled:function(t){this[t?"_disable":"_enable"]()},_disable:function(){var
e=this;t.each(this.tooltips,function(i,s){var
n=t.Event("blur");n.target=n.currentTarget=s.element[0],e.close(n,!0)}),this.disabledTitles=this.disabledTitles.add(this.element.find(this.options.items).addBack().filter(function(){var
e=t(this);return
e.is("[title]")?e.data("ui-tooltip-title",e.attr("title")).removeAttr("title"):void
0}))},_enable:function(){this.disabledTitles.each(function(){var
e=t(this);e.data("ui-tooltip-title")&&e.attr("title",e.data("ui-tooltip-title"))}),this.disabledTitles=t([])},open:function(e){var
i=this,s=t(e?e.target:this.element).closest(this.options.items);s.length&&!s.data("ui-tooltip-id")&&(s.attr("title")&&s.data("ui-tooltip-title",s.attr("title")),s.data("ui-tooltip-open",!0),e&&"mouseover"===e.type&&s.parents().each(function(){var
e,s=t(this);s.data("ui-tooltip-open")&&(e=t.Event("blur"),e.target=e.currentTarget=this,i.close(e,!0)),s.attr("title")&&(s.uniqueId(),i.parents[this.id]={element:this,title:s.attr("title")},s.attr("title",""))}),this._registerCloseHandlers(e,s),this._updateContent(s,e))},_updateContent:function(t,e){var
i,s=this.options.content,n=this,o=e?e.type:null;return"string"==typeof
s||s.nodeType||s.jquery?this._open(e,t,s):(i=s.call(t[0],function(i){n._delay(function(){t.data("ui-tooltip-open")&&(e&&(e.type=o),this._open(e,t,i))})}),i&&this._open(e,t,i),void
0)},_open:function(e,i,s){function
n(t){l.of=t,a.is(":hidden")||a.position(l)}var
o,a,r,h,l=t.extend({},this.options.position);if(s){if(o=this._find(i))return
o.tooltip.find(".ui-tooltip-content").html(s),void
0;i.is("[title]")&&(e&&"mouseover"===e.type?i.attr("title",""):i.removeAttr("title")),o=this._tooltip(i),a=o.tooltip,this._addDescribedBy(i,a.attr("id")),a.find(".ui-tooltip-content").html(s),this.liveRegion.children().hide(),h=t("<div>").html(a.find(".ui-tooltip-content").html()),h.removeAttr("name").find("[name]").removeAttr("name"),h.removeAttr("id").find("[id]").removeAttr("id"),h.appendTo(this.liveRegion),this.options.track&&e&&/^mouse/.test(e.type)?(this._on(this.document,{mousemove:n}),n(e)):a.position(t.extend({of:i},this.options.position)),a.hide(),this._show(a,this.options.show),this.options.track&&this.options.show&&this.options.show.delay&&(r=this.delayedShow=setInterval(function(){a.is(":visible")&&(n(l.of),clearInterval(r))},t.fx.interval)),this._trigger("open",e,{tooltip:a})}},_registerCloseHandlers:function(e,i){var
s={keyup:function(e){if(e.keyCode===t.ui.keyCode.ESCAPE){var
s=t.Event(e);s.currentTarget=i[0],this.close(s,!0)}}};i[0]!==this.element[0]&&(s.remove=function(){this._removeTooltip(this._find(i).tooltip)}),e&&"mouseover"!==e.type||(s.mouseleave="close"),e&&"focusin"!==e.type||(s.focusout="close"),this._on(!0,i,s)},close:function(e){var
i,s=this,n=t(e?e.currentTarget:this.element),o=this._find(n);return
o?(i=o.tooltip,o.closing||(clearInterval(this.delayedShow),n.data("ui-tooltip-title")&&!n.attr("title")&&n.attr("title",n.data("ui-tooltip-title")),this._removeDescribedBy(n),o.hiding=!0,i.stop(!0),this._hide(i,this.options.hide,function(){s._removeTooltip(t(this))
}),n.removeData("ui-tooltip-open"),this._off(n,"mouseleave
focusout
keyup"),n[0]!==this.element[0]&&this._off(n,"remove"),this._off(this.document,"mousemove"),e&&"mouseleave"===e.type&&t.each(this.parents,function(e,i){t(i.element).attr("title",i.title),delete
s.parents[e]}),o.closing=!0,this._trigger("close",e,{tooltip:i}),o.hiding||(o.closing=!1)),void
0):(n.removeData("ui-tooltip-open"),void
0)},_tooltip:function(e){var
i=t("<div>").attr("role","tooltip"),s=t("<div>").appendTo(i),n=i.uniqueId().attr("id");return
this._addClass(s,"ui-tooltip-content"),this._addClass(i,"ui-tooltip","ui-widget
ui-widget-content"),i.appendTo(this._appendTo(e)),this.tooltips[n]={element:e,tooltip:i}},_find:function(t){var
e=t.data("ui-tooltip-id");return
e?this.tooltips[e]:null},_removeTooltip:function(t){t.remove(),delete
this.tooltips[t.attr("id")]},_appendTo:function(t){var
e=t.closest(".ui-front, dialog");return
e.length||(e=this.document[0].body),e},_destroy:function(){var
e=this;t.each(this.tooltips,function(i,s){var
n=t.Event("blur"),o=s.element;n.target=n.currentTarget=o[0],e.close(n,!0),t("#"+i).remove(),o.data("ui-tooltip-title")&&(o.attr("title")||o.attr("title",o.data("ui-tooltip-title")),o.removeData("ui-tooltip-title"))}),this.liveRegion.remove()}}),t.uiBackCompat!==!1&&t.widget("ui.tooltip",t.ui.tooltip,{options:{tooltipClass:null},_tooltip:function(){var
t=this._superApply(arguments);return
this.options.tooltipClass&&t.tooltip.addClass(this.options.tooltipClass),t}}),t.ui.tooltip});admin-view-run-test-task.min.js.gz000064400000002053151200777560013074
0ustar00��Vao�6��_��A4�f+0�U6�Q�d�]�2P
0Z�XjeR%Oq���}�䦉`��O։��x����IN��]ӯ֮%u�
������7������ !l��q���`��V.r��yA�M*ɇ����f����֭N�\E���@�ߧ�|N�s�,�v�o���rL�#�Bp}���|�g��[|C�Rk<2'0�T��j�Ó�6nCm�j
e�@!D�O����!V"����!
��hY�Ya��X��Q�Q*���Rsa�"m��
��
H�:F�O3�U��Qa�)��e��+�w��Q.|�ɽ��
��\c�w���l�O�\u}���=
���
�4�q�[!c<<y����������k��)�{=���3x@�5`�1'�3P����p6�؍�704�h{����[�M���ؼ���K�����5{�~�9�!6$r�:���-ʄы����,\�$�t:�&��,�R.��J��Oȶҏ�Q���
�zkNF+T���x�'�8ǔ�~������e2�E��Q4M�h'�8�Ńx>K���ϣ(�N)-�+��b��:��,��a��)Fu~Ců!�Χ��|2~^�'0��4;�?���v:�5&��<�ǧ��� q.�A��SB�V���;*h�=��z�go{uoSU�n�go�q�����|<h�r
@��{�qEk�ø�|˷�'RZG7`���M�<�F�{��D�V�2-���.+Dk���wZ��̂�~-^䭺�N�j�S�VU�����������\�m�M9=������8�⊖��肋d/��*�z�T_�/�h�M<��./A��h�0�f���↑�x0�g_q��y��w��Ńi������>3��"y�c'\�Oݶv{�匋"�m(g��-�2�+!��)rT�";k�8��Z�ǣ��M�a���<��dQ.���
����+o�Ƞ��:�nڮ�[�/^Pz{�����W��������L�n�&7�nda�ֻVi�&����o���J�scheduler-config.js000064400000002776151200777560010351
0ustar00/**
* @copyright (C) 2021 Open Source Matters, Inc.
<https://www.joomla.org>
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
if (!window.Joomla) {
throw new Error('Joomla API was not properly initialised!');
}
const copyToClipboardFallback = input => {
input.focus();
input.select();
try {
const copy = document.execCommand('copy');
if (copy) {
Joomla.renderMessages({
message:
[Joomla.Text._('COM_SCHEDULER_CONFIG_WEBCRON_LINK_COPY_SUCCESS')]
});
} else {
Joomla.renderMessages({
error:
[Joomla.Text._('COM_SCHEDULER_CONFIG_WEBCRON_LINK_COPY_FAIL')]
});
}
} catch (err) {
Joomla.renderMessages({
error: [err]
});
}
};
const copyToClipboard = () => {
const button = document.getElementById('link-copy');
button.addEventListener('click', ({
currentTarget
}) => {
const input = currentTarget.previousElementSibling;
if (!navigator.clipboard) {
copyToClipboardFallback(input);
return;
}
navigator.clipboard.writeText(input.value).then(() => {
Joomla.renderMessages({
message:
[Joomla.Text._('COM_SCHEDULER_CONFIG_WEBCRON_LINK_COPY_SUCCESS')]
});
}, () => {
Joomla.renderMessages({
error:
[Joomla.Text._('COM_SCHEDULER_CONFIG_WEBCRON_LINK_COPY_FAIL')]
});
});
});
};
const onBoot = () => {
copyToClipboard();
document.removeEventListener('DOMContentLoaded', onBoot);
};
document.addEventListener('DOMContentLoaded', onBoot);
admin-view-select-task-search.min.js.gz000064400000001153151200777560014035
0ustar00��TMs�0��W<cD�#ġ-ä�4��Q���]�!�w��@�$7�꽷���f�5�����}��O����
�o�0�l�b3�<t���r��z?�Zy�^�K�̀�cW�8@mُ��f��^�!�3��j��F��z<PtG'��6�b`Ǡ�̒ԛb��h`���TS�������������e�%��#�9���<Rw�>�Nߧ��̡f���PX
��y���-�$��,k�G��pZ�X.��Dl����!��6�t��h���)�-�E�c�"�S�N���r���$���t-�I�Ke~��j�c�p�E�c*
��������^9X�P�5���GkW�S�kL�T�mf���U6���!T�)��_��i�y\�
�T��֭��p���j�-��V$sdtN�w���s������1&�g��]E
�ȏ����2gl�B�AFFQ�
����O����=�{`�Q��ql�{�*;��~U�
��U�~���~oI�&�A�.a�:r�����Ya�V+����irMfvoY�`ɾBy�5�&ޚWJ�1n�ٜ�E�scheduler-config.min.js000064400000002206151200777560011117
0ustar00/**
* @copyright (C) 2021 Open Source Matters, Inc.
<https://www.joomla.org>
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/if(!window.Joomla)throw new Error("Joomla API was not properly
initialised!");const
copyToClipboardFallback=o=>{o.focus(),o.select();try{document.execCommand("copy")?Joomla.renderMessages({message:[Joomla.Text._("COM_SCHEDULER_CONFIG_WEBCRON_LINK_COPY_SUCCESS")]}):Joomla.renderMessages({error:[Joomla.Text._("COM_SCHEDULER_CONFIG_WEBCRON_LINK_COPY_FAIL")]})}catch(e){Joomla.renderMessages({error:[e]})}},copyToClipboard=()=>{document.getElementById("link-copy").addEventListener("click",({currentTarget:e})=>{const
t=e.previousElementSibling;if(!navigator.clipboard){copyToClipboardFallback(t);return}navigator.clipboard.writeText(t.value).then(()=>{Joomla.renderMessages({message:[Joomla.Text._("COM_SCHEDULER_CONFIG_WEBCRON_LINK_COPY_SUCCESS")]})},()=>{Joomla.renderMessages({error:[Joomla.Text._("COM_SCHEDULER_CONFIG_WEBCRON_LINK_COPY_FAIL")]})})})},onBoot=()=>{copyToClipboard(),document.removeEventListener("DOMContentLoaded",onBoot)};document.addEventListener("DOMContentLoaded",onBoot);
admin-view-run-test-task.js000064400000010234151200777560011673
0ustar00import JoomlaDialog from 'joomla.dialog';
/**
* @copyright (C) 2021 Open Source Matters, Inc.
<https://www.joomla.org>
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
/**
* Helper to create an element
*
* @param {String} nodeName
* @param {String} text
* @param {Array} classList
* @returns {HTMLElement}
*/
const createEl = (nodeName, text = '', classList = []) => {
const el = document.createElement(nodeName);
el.textContent = text;
if (classList && classList.length) {
el.classList.add(...classList);
}
return el;
};
/**
* Trigger the task through a GET request
*
* @param {String} url
* @param {HTMLElement} resultContainer
*/
const runTheTask = (url, resultContainer) => {
const statusHolder =
resultContainer.querySelector('.scheduler-status');
const progressBar =
resultContainer.querySelector('.progress-bar');
const complete = success => {
progressBar.style.width = '100%';
progressBar.classList.add(success ? 'bg-success' :
'bg-danger');
setTimeout(() =>
progressBar.classList.remove('progress-bar-animated'), 500);
};
progressBar.style.width = '15%';
fetch(url, {
headers: {
'X-CSRF-Token': Joomla.getOptions('csrf.token',
'')
}
}).then(response => {
if (!response.ok) {
throw new
Error(Joomla.Text._('JLIB_JS_AJAX_ERROR_OTHER').replace('%s',
response.status).replace('%d', response.status));
}
return response.json();
}).then(output => {
if (!output.data) {
// The request was successful but the response is empty in some
reason
throw new
Error(Joomla.Text._('JLIB_JS_AJAX_ERROR_NO_CONTENT'));
}
statusHolder.textContent =
Joomla.Text._('COM_SCHEDULER_TEST_RUN_STATUS_COMPLETED');
if (output.data.duration > 0) {
resultContainer.appendChild(createEl('div',
Joomla.Text._('COM_SCHEDULER_TEST_RUN_DURATION').replace('%s',
output.data.duration.toFixed(2))));
}
if (output.data.output) {
resultContainer.appendChild(createEl('div',
Joomla.Text._('COM_SCHEDULER_TEST_RUN_OUTPUT').replace('%s',
'').replace('<br>', '')));
resultContainer.appendChild(createEl('pre',
output.data.output, ['bg-body', 'p-2']));
}
complete(true);
}).catch(error => {
complete(false);
statusHolder.textContent =
Joomla.Text._('COM_SCHEDULER_TEST_RUN_STATUS_TERMINATED');
resultContainer.appendChild(createEl('div', error.message,
['text-danger']));
});
};
// Listen on click over a task button to run a task
document.addEventListener('click', event => {
const button =
event.target.closest('button[data-scheduler-run]');
if (!button) return;
event.preventDefault();
// Get the task info from the button
const {
id,
title,
url
} = button.dataset;
// Prepare the initial popup content, by following template:
// <div class="p-3">
// <h4>Task: Task title</h4>
// <div class="mb-2 scheduler-status">Status: Task
Status</div>
// <div class="progress mb-2"><div
class="progress-bar progress-bar-striped
bg-success"></div></div>
// </div>
const content = (() => {
const body = createEl('div', '',
['p-3']);
const progress = createEl('div', '',
['progress', 'mb-2']);
const progressBar = createEl('div', '',
['progress-bar', 'progress-bar-striped',
'progress-bar-animated']);
body.appendChild(createEl('h4',
Joomla.Text._('COM_SCHEDULER_TEST_RUN_TASK').replace('%s',
title)));
body.appendChild(createEl('div',
Joomla.Text._('COM_SCHEDULER_TEST_RUN_STATUS_STARTED'),
['mb-2', 'scheduler-status']));
progress.appendChild(progressBar);
body.appendChild(progress);
progressBar.style.width = '0%';
return body;
})();
// Create dialog instance
const dialog = new JoomlaDialog({
popupType: 'inline',
textHeader:
Joomla.Text._('COM_SCHEDULER_TEST_RUN_TITLE').replace('%d',
id),
textClose: Joomla.Text._('JCLOSE'),
popupContent: content,
width: '800px',
height: 'fit-content'
});
// Run the task when dialog is ready
dialog.addEventListener('joomla-dialog:open', () => {
runTheTask(url, content);
});
// Reload the page when dialog is closed
dialog.addEventListener('joomla-dialog:close', () => {
window.location.reload();
});
dialog.show();
});
admin-view-select-task-search.js000064400000011110151200777560012626
0ustar00/**
* @copyright (C) 2021 Open Source Matters, Inc.
<https://www.joomla.org>
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
/**
* Add a keyboard event listener to the Select a Task Type search element.
*
* IMPORTANT! This script is meant to be loaded deferred. This means that
a. it's non-blocking
* (the browser can load it whenever) and b. it doesn't need an on
DOMContentLoaded event handler
* because the browser is guaranteed to execute it only after the DOM
content has loaded, the
* whole point of it being deferred.
*
* The search box has a keyboard handler that fires every time you press a
keyboard button or send
* a keypress with a touch / virtual keyboard. We then iterate all task
type cards and check if
* the plain text (HTML stripped out) representation of the task title or
description partially
* matches the text you entered in the search box. If it doesn't we
add a Bootstrap class to hide
* the task.
*
* This way we limit the displayed tasks only to those searched.
*
* This feature follows progressive enhancement. The search box is hidden
by default and only
* displayed when this JavaScript here executes. Furthermore, session
storage is only used if it
* is available in the browser. That's a bit of a pain but makes sure
things won't break in older
* browsers.
*
* Furthermore and to facilitate the user experience we auto-focus the
search element which has a
* suitable title so that non-sighted users are not startled. This way we
address both UX concerns
* and accessibility.
*
* Finally, the search string is saved into session storage on the
assumption that the user is
* probably going to be creating multiple instances of the same task, one
after another, as is
* typical when building a new Joomla! site.
*/
// Make sure the element exists i.e. a template override has not removed
it.
const elSearch =
document.getElementById('comSchedulerSelectSearch');
const elSearchContainer =
document.getElementById('comSchedulerSelectSearchContainer');
const elSearchHeader =
document.getElementById('comSchedulerSelectTypeHeader');
const elSearchResults =
document.getElementById('comSchedulerSelectResultsContainer');
const alertElement = document.querySelector('.tasks-alert');
if (elSearch && elSearchContainer) {
// Add the keyboard event listener which performs the live search in the
cards
elSearch.addEventListener('keyup', ({
target
}) => {
/** @type {KeyboardEvent} event */
const partialSearch = target.value;
let hasSearchResults = false; // Save the search string into session
storage
if (typeof sessionStorage !== 'undefined') {
sessionStorage.setItem('Joomla.com_scheduler.new.search',
partialSearch);
}
// Iterate over all the task cards
document.querySelectorAll('.comSchedulerSelectCard').forEach(card
=> {
// First remove the class which hide the task cards
card.classList.remove('d-none');
// An empty search string means that we should show everything
if (!partialSearch) {
return;
}
const cardHeader = card.querySelector('.new-task-title');
const cardBody = card.querySelector('.new-task-caption');
const title = cardHeader ? cardHeader.textContent : '';
const description = cardBody ? cardBody.textContent : '';
// If the task title and description don’t match add a class to
hide it.
if (title &&
!title.toLowerCase().includes(partialSearch.toLowerCase()) &&
description &&
!description.toLowerCase().includes(partialSearch.toLowerCase())) {
card.classList.add('d-none');
} else {
hasSearchResults = true;
}
});
if (hasSearchResults || !partialSearch) {
alertElement.classList.add('d-none');
elSearchHeader.classList.remove('d-none');
elSearchResults.classList.remove('d-none');
} else {
alertElement.classList.remove('d-none');
elSearchHeader.classList.add('d-none');
elSearchResults.classList.add('d-none');
}
});
// For reasons of progressive enhancement the search box is hidden by
default.
elSearchContainer.classList.remove('d-none');
// Focus the just show element
elSearch.focus();
try {
if (typeof sessionStorage !== 'undefined') {
// Load the search string from session storage
elSearch.value =
sessionStorage.getItem('Joomla.com_scheduler.new.search') ||
'';
// Trigger the keyboard handler event manually to initiate the search
elSearch.dispatchEvent(new KeyboardEvent('keyup'));
}
} catch (e) {
// This is probably Internet Explorer which doesn't support the
KeyboardEvent constructor :(
}
}
scheduler-config.min.js.gz000064400000001057151200777560011541
0ustar00��RMo1��WL�d#j�ْ6�lRZ>�����
���gY�W4��&���/��{3��hA�Z����D&���.�È�`��ClB�og̋�n���R߉�N+
����}D������c��ˉ�z��C���(�ӌ!���n�F��A�e��qe}A���#�<T��
�(�d����.T:�'�E���-[�l��8��!�mo)sv1!�K��D��uN7��ɔQ�&��
�rXo
2�=+\��h>I
��w�T@_`�c�z�Ql���P����H�a<�>�w��f�
�ݫ��<�ƽ���8^��,��m+��P`���\�u{;��lf��e��n�O��9�%�9wX���n!g�ë�PJE�D�=��"1Κ��)6�=��0En����T��KKe<
���Y?M����N5SP��Dr�ǂe���hSU������R���z�[�m�Do��9�{"���G+�i�O��3�\�HX$4�M��ٮ�����admin-view-select-task-search.min.js000064400000003006151200777560013415
0ustar00/**
* @copyright (C) 2021 Open Source Matters, Inc.
<https://www.joomla.org>
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/const
elSearch=document.getElementById("comSchedulerSelectSearch"),elSearchContainer=document.getElementById("comSchedulerSelectSearchContainer"),elSearchHeader=document.getElementById("comSchedulerSelectTypeHeader"),elSearchResults=document.getElementById("comSchedulerSelectResultsContainer"),alertElement=document.querySelector(".tasks-alert");if(elSearch&&elSearchContainer){elSearch.addEventListener("keyup",({target:s})=>{const
e=s.value;let o=!1;typeof
sessionStorage<"u"&&sessionStorage.setItem("Joomla.com_scheduler.new.search",e),document.querySelectorAll(".comSchedulerSelectCard").forEach(t=>{if(t.classList.remove("d-none"),!e)return;const
n=t.querySelector(".new-task-title"),c=t.querySelector(".new-task-caption"),a=n?n.textContent:"",r=c?c.textContent:"";a&&!a.toLowerCase().includes(e.toLowerCase())&&r&&!r.toLowerCase().includes(e.toLowerCase())?t.classList.add("d-none"):o=!0}),o||!e?(alertElement.classList.add("d-none"),elSearchHeader.classList.remove("d-none"),elSearchResults.classList.remove("d-none")):(alertElement.classList.remove("d-none"),elSearchHeader.classList.add("d-none"),elSearchResults.classList.add("d-none"))}),elSearchContainer.classList.remove("d-none"),elSearch.focus();try{typeof
sessionStorage<"u"&&(elSearch.value=sessionStorage.getItem("Joomla.com_scheduler.new.search")||"",elSearch.dispatchEvent(new
KeyboardEvent("keyup")))}catch{}}
admin-view-run-test-task.min.js000064400000004345151200777560012463
0ustar00import i from"joomla.dialog";/**
* @copyright (C) 2021 Open Source Matters, Inc.
<https://www.joomla.org>
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/const a=(r,t="",d=[])=>{const
o=document.createElement(r);return
o.textContent=t,d&&d.length&&o.classList.add(...d),o},c=(r,t)=>{const
d=t.querySelector(".scheduler-status"),o=t.querySelector(".progress-bar"),s=e=>{o.style.width="100%",o.classList.add(e?"bg-success":"bg-danger"),setTimeout(()=>o.classList.remove("progress-bar-animated"),500)};o.style.width="15%",fetch(r,{headers:{"X-CSRF-Token":Joomla.getOptions("csrf.token","")}}).then(e=>{if(!e.ok)throw
new
Error(Joomla.Text._("JLIB_JS_AJAX_ERROR_OTHER").replace("%s",e.status).replace("%d",e.status));return
e.json()}).then(e=>{if(!e.data)throw new
Error(Joomla.Text._("JLIB_JS_AJAX_ERROR_NO_CONTENT"));d.textContent=Joomla.Text._("COM_SCHEDULER_TEST_RUN_STATUS_COMPLETED"),e.data.duration>0&&t.appendChild(a("div",Joomla.Text._("COM_SCHEDULER_TEST_RUN_DURATION").replace("%s",e.data.duration.toFixed(2)))),e.data.output&&(t.appendChild(a("div",Joomla.Text._("COM_SCHEDULER_TEST_RUN_OUTPUT").replace("%s","").replace("<br>",""))),t.appendChild(a("pre",e.data.output,["bg-body","p-2"]))),s(!0)}).catch(e=>{s(!1),d.textContent=Joomla.Text._("COM_SCHEDULER_TEST_RUN_STATUS_TERMINATED"),t.appendChild(a("div",e.message,["text-danger"]))})};document.addEventListener("click",r=>{const
t=r.target.closest("button[data-scheduler-run]");if(!t)return;r.preventDefault();const{id:d,title:o,url:s}=t.dataset,e=(()=>{const
n=a("div","",["p-3"]),_=a("div","",["progress","mb-2"]),T=a("div","",["progress-bar","progress-bar-striped","progress-bar-animated"]);return
n.appendChild(a("h4",Joomla.Text._("COM_SCHEDULER_TEST_RUN_TASK").replace("%s",o))),n.appendChild(a("div",Joomla.Text._("COM_SCHEDULER_TEST_RUN_STATUS_STARTED"),["mb-2","scheduler-status"])),_.appendChild(T),n.appendChild(_),T.style.width="0%",n})(),l=new
i({popupType:"inline",textHeader:Joomla.Text._("COM_SCHEDULER_TEST_RUN_TITLE").replace("%d",d),textClose:Joomla.Text._("JCLOSE"),popupContent:e,width:"800px",height:"fit-content"});l.addEventListener("joomla-dialog:open",()=>{c(s,e)}),l.addEventListener("joomla-dialog:close",()=>{window.location.reload()}),l.show()});
comment.js000064400000002200151201173340006533
0ustar00/*----------------------------------------------------------------------------------|
www.vdm.io |----/
fdsh
/-------------------------------------------------------------------------------------------------------/
@version 1.0.39
@build 4th April, 2023
@created 17th December, 2020
@package Reservation
@subpackage comment.js
@author farhad shahbazi <http://farhad.com>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
____ _____ _____ __ __ __ __ ___ _____ __ __ ____
_____ _ _ ____ _ _ ____
(_ _)( _ )( _ )( \/ )( ) /__\ / __)( _ )( \/ )( _ \(
_ )( \( )( ___)( \( )(_ _)
.-_)( )(_)( )(_)( ) ( )(__ /(__)\ ( (__ )(_)( ) ( )___/
)(_)( ) ( )__) ) ( )(
\____) (_____)(_____)(_/\/\_)(____)(__)(__) \___)(_____)(_/\/\_)(__)
(_____)(_)\_)(____)(_)\_) (__)
/------------------------------------------------------------------------------------------------------*/
/* JS Document */
/***[JCBGUI.site_view.javascript_file.32.$$$$]***/
var a=3;/***[/JCBGUI$$$$]***/
consultantitem.js000064400000003223151201173340010150
0ustar00/*----------------------------------------------------------------------------------|
www.vdm.io |----/
fdsh
/-------------------------------------------------------------------------------------------------------/
@version 1.0.39
@build 4th April, 2023
@created 17th December, 2020
@package Reservation
@subpackage consultantitem.js
@author farhad shahbazi <http://farhad.com>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
____ _____ _____ __ __ __ __ ___ _____ __ __ ____
_____ _ _ ____ _ _ ____
(_ _)( _ )( _ )( \/ )( ) /__\ / __)( _ )( \/ )( _ \(
_ )( \( )( ___)( \( )(_ _)
.-_)( )(_)( )(_)( ) ( )(__ /(__)\ ( (__ )(_)( ) ( )___/
)(_)( ) ( )__) ) ( )(
\____) (_____)(_____)(_/\/\_)(____)(__)(__) \___)(_____)(_/\/\_)(__)
(_____)(_)\_)(____)(_)\_) (__)
/------------------------------------------------------------------------------------------------------*/
/* JS Document */
/***[JCBGUI.site_view.javascript_file.27.$$$$]***/
jQuery(document).ready(function($){
$('.plans ul
li:first-child').addClass('activeplan');
$(document).on('click','.plans ul li', function(){
var planid= $(this).attr('data-planid');
var consultantid=
$('.consultantCard').attr('data-uid');
var route=
'/index.php?option=com_reservation&view=firstqst&uid='+consultantid+'&pid='+planid+'';
$('#startCo').attr('href', route);
$('.plans ul li').removeClass('activeplan');
$(this).addClass('activeplan');
});
});/***[/JCBGUI$$$$]***/
consultantsignup.js000064400000005512151201173340010522
0ustar00/*----------------------------------------------------------------------------------|
www.vdm.io |----/
fdsh
/-------------------------------------------------------------------------------------------------------/
@version 1.0.39
@build 4th April, 2023
@created 17th December, 2020
@package Reservation
@subpackage consultantsignup.js
@author farhad shahbazi <http://farhad.com>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
____ _____ _____ __ __ __ __ ___ _____ __ __ ____
_____ _ _ ____ _ _ ____
(_ _)( _ )( _ )( \/ )( ) /__\ / __)( _ )( \/ )( _ \(
_ )( \( )( ___)( \( )(_ _)
.-_)( )(_)( )(_)( ) ( )(__ /(__)\ ( (__ )(_)( ) ( )___/
)(_)( ) ( )__) ) ( )(
\____) (_____)(_____)(_/\/\_)(____)(__)(__) \___)(_____)(_/\/\_)(__)
(_____)(_)\_)(____)(_)\_) (__)
/------------------------------------------------------------------------------------------------------*/
/* JS Document */
/***[JCBGUI.site_view.javascript_file.31.$$$$]***/
jQuery(document).ready(function($){
var token= $('#token').attr('name');
$.ajax({
url : 'index.php?option=com_reservation',
method: 'post',
data: {[token]: '1' ,format: 'json', task:
'ajax.getCatLevelOne', raw: 'true', extension:
'com_reservation'},
dataType: 'json',
success: function(msg){
var options= '<option value="0"
>تخصص خود را انتخاب کنید</option>>';
$.each(msg,function(index, value){
options += '<option
value="'+value.id+'"
>'+value.title+'</option>>';
});
$('#jform_catid_level1').html(options);
},
error: function(err){
console.log(err);
}
})
$(document).on('change','#jform_catid_level1',function
() {
var catIdLevel1= $(this).val();
token= $('#token').attr('name');
$.ajax({
url : 'index.php?option=com_reservation',
method: 'post',
data: {[token]: '1' ,format: 'json',
task: 'ajax.getCatLevelTwo', raw: 'true', catIdLevel1:
catIdLevel1},
dataType: 'json',
success: function(msg){
var options= '';
$.each(msg,function(index, value){
options += '<option
value="'+value.id+'"
>'+value.title+'</option>>';
});
$('#jform_catid').html(options);
},
error: function(err){
console.log(err);
}
})
})
});/***[/JCBGUI$$$$]***/
consultant_plan.js000064400000005112151201173340010302
0ustar00/*----------------------------------------------------------------------------------|
www.vdm.io |----/
fdsh
/-------------------------------------------------------------------------------------------------------/
@version 1.0.39
@build 4th April, 2023
@created 17th December, 2020
@package Reservation
@subpackage consultant_plan.js
@author farhad shahbazi <http://farhad.com>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
____ _____ _____ __ __ __ __ ___ _____ __ __ ____
_____ _ _ ____ _ _ ____
(_ _)( _ )( _ )( \/ )( ) /__\ / __)( _ )( \/ )( _ \(
_ )( \( )( ___)( \( )(_ _)
.-_)( )(_)( )(_)( ) ( )(__ /(__)\ ( (__ )(_)( ) ( )___/
)(_)( ) ( )__) ) ( )(
\____) (_____)(_____)(_/\/\_)(____)(__)(__) \___)(_____)(_/\/\_)(__)
(_____)(_)\_)(____)(_)\_) (__)
/------------------------------------------------------------------------------------------------------*/
/* JS Document */
/***[JCBGUI.site_view.javascript_file.37.$$$$]***/
jQuery(document).ready(function($) {
$('[id^=del-]').click(function(){
/* when the button in the form, display the entered values in the modal
*/
id = '#plan-' + this.id.slice(4)
$(id)[0].checked = true;
});
$('#submit').click(function(){
/* when the submit button in the modal is clicked, submit the form */
$('#listviewform').submit();
});
function fill_form(form)
{
var form= $(form);
$('[id^=edit-]').click(function (){
var tr = $(this).parents('tr');
var td= tr.find('td')
td.each(function (index, value) {
var data_field= $(this).data('field');
var data_identifier= $(this).data('identifier');
if (data_field !== undefined)
{
var value= $(this).text();
if (data_identifier== 'name')
{
var field=
form.find($('[name="'+data_field+'"]'));
field.val(value.replace(/[^\d]+/i, ""));
}
}
})
before_id = $('#planid').val()
if(before_id)
{
$("#row-" + before_id).removeClass('selected')
}
$('#planid').val(this.id.slice(5));
$("#row-" +
this.id.slice(5)).addClass('selected')
elm = jQuery("#adminForm");
jQuery([document.documentElement, document.body]).animate({
scrollTop: elm.offset().top - 150
}, 1000);
jQuery('#submitdata').html('ویرایش');
});
}
fill_form('#adminForm')
})/***[/JCBGUI$$$$]***/
doctor.js000064400000010701151201173340006370
0ustar00/*----------------------------------------------------------------------------------|
www.vdm.io |----/
fdsh
/-------------------------------------------------------------------------------------------------------/
@version 1.0.39
@build 4th April, 2023
@created 17th December, 2020
@package Reservation
@subpackage doctor.js
@author farhad shahbazi <http://farhad.com>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
____ _____ _____ __ __ __ __ ___ _____ __ __ ____
_____ _ _ ____ _ _ ____
(_ _)( _ )( _ )( \/ )( ) /__\ / __)( _ )( \/ )( _ \(
_ )( \( )( ___)( \( )(_ _)
.-_)( )(_)( )(_)( ) ( )(__ /(__)\ ( (__ )(_)( ) ( )___/
)(_)( ) ( )__) ) ( )(
\____) (_____)(_____)(_/\/\_)(____)(__)(__) \___)(_____)(_/\/\_)(__)
(_____)(_)\_)(____)(_)\_) (__)
/------------------------------------------------------------------------------------------------------*/
/* JS Document */
/***[JCBGUI.site_view.javascript_file.35.$$$$]***/
jQuery(document).ready(function ($){
var $= jQuery
var userid= Joomla.getOptions('userid')
var uid= Joomla.getOptions('uid')
var events= Joomla.getOptions('appoinements')
var calendarEl = document.getElementById('calendar');
var calendar = new FullCalendar.Calendar(calendarEl, {
initialView: 'dayGridWeek',
customButtons: {
myCustomButton: {
text: 'custom!',
click: function() {
alert()
calendar.addEvent( { // this object will be
"parsed" into an Event Object
id: 'farhad',
editable : 'true',
title: 'تایم editable', // a
property!
start: '2021-05-09', // a property!
end: '2021-05-09' // a property! ** see
important note below about 'end' **
} )
}
}
},
eventClick: function(info) {
var close= '<button type="button"
class="btn btn-warning"
data-dismiss="modal">انصراف</button>';
if (userid)
{
var modal_body= 'آیا از رزرو این نوبت
مطمئن هستید ؟'
var aid= info.event.id
var link=
'index.php?option=com_reservation&view=reserve_appointment&start=true&uid='+uid+'&aid='+aid+''
var a= '<a href="'+link+'"
class="btn btn-success"> بله </a>'
}
else
{
var modal_body= 'برای رزرو نوبت ابتدا
وارد حساب کاربری خود شوید.'
var link=
'index.php?option=com_reservation&view=usersign&Itemid=138'
var a= '<a href="'+link+'"
class="btn btn-success"> ورود </a>'
}
$('.modal-body').html(modal_body);
$('.modal-footer').html(close+a);
$('.modal').modal('show');
console.log(info.event.id)
// change the border color just for fun
info.el.style.borderColor = 'red';
},
timeZone: 'Asia/Tehran',
locale: 'fa',
direction: 'rtl',
firstDay: 6,
views: {
dayGridWeek: { // name of view
titleFormat: { year: 'numeric' }
// other view-specific options here
}
},
headerToolbar: {
left: 'prev,next today',
center: 'title',
right: 'myCustomButton'
},
dateClick: function(arg) {
console.log(arg.date.toString());
}
});
calendar.render();
// var event = calendar.getEventById('farhad')
// var start = event.start
jQuery.each(events,function (index, value){
calendar.addEvent( {
id: value.id,
// editable : 'false',
title: value.title,
start: value.apoDate,
// end: '2021-03-04'
} )
})
if (jQuery(window).width() < 640)
calendar.changeView('dayGridDay')
jQuery(window).resize(function (){
if (jQuery(window).width() < 640)
calendar.changeView('dayGridDay')
else
calendar.changeView('dayGridWeek')
})
})/***[/JCBGUI$$$$]***/
doctorsignup.js000064400000005506151201173340007625
0ustar00/*----------------------------------------------------------------------------------|
www.vdm.io |----/
fdsh
/-------------------------------------------------------------------------------------------------------/
@version 1.0.39
@build 4th April, 2023
@created 17th December, 2020
@package Reservation
@subpackage doctorsignup.js
@author farhad shahbazi <http://farhad.com>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
____ _____ _____ __ __ __ __ ___ _____ __ __ ____
_____ _ _ ____ _ _ ____
(_ _)( _ )( _ )( \/ )( ) /__\ / __)( _ )( \/ )( _ \(
_ )( \( )( ___)( \( )(_ _)
.-_)( )(_)( )(_)( ) ( )(__ /(__)\ ( (__ )(_)( ) ( )___/
)(_)( ) ( )__) ) ( )(
\____) (_____)(_____)(_/\/\_)(____)(__)(__) \___)(_____)(_/\/\_)(__)
(_____)(_)\_)(____)(_)\_) (__)
/------------------------------------------------------------------------------------------------------*/
/* JS Document */
/***[JCBGUI.site_view.javascript_file.34.$$$$]***/
jQuery(document).ready(function($){
var token= $('#token').attr('name');
$.ajax({
url : 'index.php?option=com_reservation',
method: 'post',
data: {[token]: '1' ,format: 'json', task:
'ajax.getCatLevelOne', raw: 'true', extension:
'com_reservation'},
dataType: 'json',
success: function(msg){
var options= '<option value="0"
>تخصص خود را انتخاب کنید</option>>';
$.each(msg,function(index, value){
options += '<option
value="'+value.id+'"
>'+value.title+'</option>>';
});
$('#jform_catid_level1').html(options);
},
error: function(err){
console.log(err);
}
})
$(document).on('change','#jform_catid_level1',function
() {
var catIdLevel1= $(this).val();
token= $('#token').attr('name');
$.ajax({
url : 'index.php?option=com_reservation',
method: 'post',
data: {[token]: '1' ,format: 'json',
task: 'ajax.getCatLevelTwo', raw: 'true', catIdLevel1:
catIdLevel1},
dataType: 'json',
success: function(msg){
var options= '';
$.each(msg,function(index, value){
options += '<option
value="'+value.id+'"
>'+value.title+'</option>>';
});
$('#jform_catid').html(options);
},
error: function(err){
console.log(err);
}
})
})
});/***[/JCBGUI$$$$]***/
firstqst.js000064400000003071151201173340006757
0ustar00/*----------------------------------------------------------------------------------|
www.vdm.io |----/
fdsh
/-------------------------------------------------------------------------------------------------------/
@version 1.0.39
@build 4th April, 2023
@created 17th December, 2020
@package Reservation
@subpackage firstqst.js
@author farhad shahbazi <http://farhad.com>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
____ _____ _____ __ __ __ __ ___ _____ __ __ ____
_____ _ _ ____ _ _ ____
(_ _)( _ )( _ )( \/ )( ) /__\ / __)( _ )( \/ )( _ \(
_ )( \( )( ___)( \( )(_ _)
.-_)( )(_)( )(_)( ) ( )(__ /(__)\ ( (__ )(_)( ) ( )___/
)(_)( ) ( )__) ) ( )(
\____) (_____)(_____)(_/\/\_)(____)(__)(__) \___)(_____)(_/\/\_)(__)
(_____)(_)\_)(____)(_)\_) (__)
/------------------------------------------------------------------------------------------------------*/
/* JS Document */
/***[JCBGUI.site_view.javascript_file.30.$$$$]***/
jQuery(document).ready(function($){
$(document).ready(function() {
$(window).keydown(function(event){
if(event.keyCode == 13) {
event.preventDefault();
jQuery('button.formbtn').click();
return false;
}
});
});
$("#adminForm").submit(function (e) {
//disable the submit button
$("#chatSendBtn").attr("disabled", true);
});
})/***[/JCBGUI$$$$]***/
login.js000064400000005367151201173340006222
0ustar00/*----------------------------------------------------------------------------------|
www.vdm.io |----/
fdsh
/-------------------------------------------------------------------------------------------------------/
@version 1.0.39
@build 4th April, 2023
@created 17th December, 2020
@package Reservation
@subpackage login.js
@author farhad shahbazi <http://farhad.com>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
____ _____ _____ __ __ __ __ ___ _____ __ __ ____
_____ _ _ ____ _ _ ____
(_ _)( _ )( _ )( \/ )( ) /__\ / __)( _ )( \/ )( _ \(
_ )( \( )( ___)( \( )(_ _)
.-_)( )(_)( )(_)( ) ( )(__ /(__)\ ( (__ )(_)( ) ( )___/
)(_)( ) ( )__) ) ( )(
\____) (_____)(_____)(_/\/\_)(____)(__)(__) \___)(_____)(_/\/\_)(__)
(_____)(_)\_)(____)(_)\_) (__)
/------------------------------------------------------------------------------------------------------*/
/* JS Document */
/***[JCBGUI.site_view.javascript_file.43.$$$$]***/
jQuery(document).ready(function ($){
$('input').keydown(function(event){
if (event.which == 13) {
$('button.loginBtn').click();
}
});
if (jQuery("#demo").length)
{
var date= Joomla.getOptions('expire');
var countDownDate = new Date(date).getTime();
// Update the count down every 1 second
var x = setInterval(function() {
// Get today's date and time
var now = new Date().getTime();
// Find the distance between now and the count down date
var distance = countDownDate - now;
// Time calculations for days, hours, minutes and seconds
var days = Math.floor(distance / (1000 * 60 * 60 * 24));
var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) /
(1000 * 60 * 60));
var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000
* 60));
var seconds = Math.floor((distance % (1000 * 60)) / 1000);
// Display the result in the element with id="demo"
// document.getElementById("demo").innerHTML = days +
"d " + hours + "h "
// + minutes + "m " + seconds + "s ";
document.getElementById("demo").innerHTML =
seconds+' : '+minutes;
// If the count down is finished, write some text
if (distance < 0) {
clearInterval(x);
document.getElementById("demo").innerHTML =
'<button class="btnToLink"
onclick="Joomla.submitbutton(\'login.resetExpireTime\');">ارسال
مجدد کد</button>';
}
}, 1000);
}
})
/***[/JCBGUI$$$$]***/
messages.js000064400000047770151201173340006725
0ustar00/*----------------------------------------------------------------------------------|
www.vdm.io |----/
fdsh
/-------------------------------------------------------------------------------------------------------/
@version 1.0.39
@build 4th April, 2023
@created 17th December, 2020
@package Reservation
@subpackage messages.js
@author farhad shahbazi <http://farhad.com>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
____ _____ _____ __ __ __ __ ___ _____ __ __ ____
_____ _ _ ____ _ _ ____
(_ _)( _ )( _ )( \/ )( ) /__\ / __)( _ )( \/ )( _ \(
_ )( \( )( ___)( \( )(_ _)
.-_)( )(_)( )(_)( ) ( )(__ /(__)\ ( (__ )(_)( ) ( )___/
)(_)( ) ( )__) ) ( )(
\____) (_____)(_____)(_/\/\_)(____)(__)(__) \___)(_____)(_/\/\_)(__)
(_____)(_)\_)(____)(_)\_) (__)
/------------------------------------------------------------------------------------------------------*/
/* JS Document */
/***[JCBGUI.site_view.javascript_file.26.$$$$]***/
var pmlist = []
jQuery(document).ready(function($) {
// auto height textarea for send
function auto_grow(element) {
element.style.height = "5px";
element.style.height = (element.scrollHeight)+"px";
}
function readMessage(chatAjaxRoute, mid, seid) {
$.ajax({
url: chatAjaxRoute,
method: 'post',
data: {
[token]: '1',
task: 'ajax.ajaxReadMessage',
format: 'json',
raw: 'true',
mid: mid,
seid: seid
},
success: function(msg) {
},
error: function(err) {
}
});
}
function dateFormat(inputDate, format) {
const date = new Date(inputDate);
const p2e = s => s.replace(/[۰-۹]/g, d =>
'۰۱۲۳۴۵۶۷۸۹'.indexOf(d))
perday =
p2e(date.toLocaleDateString('fa-IR')).split('/');
const day = perday[2];
const month = perday[1];
const year = perday[0];
const hour = date.getHours();
const min = date.getMinutes();
format = format.replace("MM", month.toString().padStart(2,
"0"));
if (format.indexOf("yyyy") > -1) {
format = format.replace("yyyy", year.toString());
} else if (format.indexOf("yy") > -1) {
format = format.replace("yy", year.toString().substr(2, 2));
}
format = format.replace("dd", day.toString().padStart(2,
"0"));
format = format.replace("H", hour.toString().padStart(2,
"0"));
format = format.replace("M", min.toString().padStart(2,
"0"));
return format;
}
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
var token = $("#token").attr("name");
var chatAjaxRoute = Joomla.getOptions('chatAjaxRoute');
var from = Joomla.getOptions('userId');
var to = Joomla.getOptions('to');
var seid = Joomla.getOptions('seid');
var pid = Joomla.getOptions('pid');
var uid = Joomla.getOptions('uid');
var channel_token = Joomla.getOptions('channel_token');
$(document).on('contextmenu', '.pm', function(e) {
e.preventDefault();
cm = $('#context-menu');
cb = $('#chat-body');
cm.data('refer', this.id);
focused = $('.focus');
$.each(focused, function(i, val){
val.classList.remove('focus');
});
$(this).addClass('focus');
if (this.classList.contains('me')) {
$('#editctxbtn').css('display',
'flex');
$('#delctxbtn').css('display',
'flex');
cm.data('user-name', 'خودم');
}
else {
$('#editctxbtn').css('display',
'none');
$('#delctxbtn').css('display',
'none');
cm.data('user-name', $('#user-name').text());
}
cm.css('display', 'block');
t = Math.min(e.pageY, cb.offset().top + cb.height() - cm.height());
l = Math.min(e.pageX, cb.offset().left + cb.width() - cm.width());
cm.css('top', t);
cm.css('left', l);
});
$(document).on('click', 'div[id^=rep-]', function(e)
{
destid = '#pm-' + this.id.substr(4)
p = $(destid);
// console.log(destid);
p.addClass('focus2');
e = jQuery('#chat-body')[0];
e.scrollTop = e.scrollTop + p.offset().top - 1.5 * e.clientHeight;
setTimeout(function(){
p.removeClass('focus2');
}, 1500);
});
$(document).on('click', '#chat-body', function(e) {
e.preventDefault();
cm = $('#context-menu');
cm.css('display', 'none');
focused = $('.focus');
$.each(focused, function(i, val){
val.classList.remove('focus');
});
$('#editctxbtn').css('display', 'none');
$('#delctxbtn').css('display', 'none');
});
li = 0;
$(document).on('click', '#reply-close', function(e)
{
rh = $('#reply-header');
rh.css('display', 'none');
$('#reply-id').val('0');
focused = $('.focus');
$.each(focused, function(i, val){
val.classList.remove('focus');
});
});
$(document).on('click',
'li.Menu_MenuItemWrapper__NyeOc', function(e) {
e.preventDefault();
li = e;
function copyToClipboard(text) {
var dummy = document.createElement("textarea");
document.body.appendChild(dummy);
dummy.value = text;
dummy.select();
document.execCommand("copy");
document.body.removeChild(dummy);
}
// copyToClipboard(this.innerText.trim())
cm = $('#context-menu');
cm.css('display', 'none');
text = $('#' + cm.data('refer') + ' >
div.text > span').text().trim();
pmid = cm.data('refer').substr(3);
switch($(this).data('cmd')) {
case 'copy':
copyToClipboard(text);
Toastify({
text: 'رونوشت پیام انجام شد.',
duration: 3000,
close: true,
gravity: "top", // `top` or `bottom`
position: "center", // `left`, `center` or `right`
stopOnFocus: true, // Prevents dismissing of toast on hover
style: {
background: "#091e42a6",
},
offset: {
y: 20
},
onClick: function(){} // Callback after click
}).showToast();
break;
case 'reply':
rh = $('#reply-header');
rh.css('display', 'flex');
cm = $('#context-menu');
$('#reply-user').html(cm.data('user-name'));
$('#reply-text').html(text);
$('#reply-id').val(pmid);
break;
case 'edit':
jQuery('#chatMessage').val(text)
$('#pmid').val(pmid);
reply = jQuery('#pm-'+pmid+' > div.reply');
if(reply.length >= 1) {
replyid = reply[0].id.substr(4);
$('#reply-id').val(replyid);
}
break;
}
});
$(document).on('input', '#chatMessage', function(e)
{
target = $(this);
auto_grow(target[0]);
});
// im = jQuery('div.text > span > img')
var modal = document.getElementById("myModal");
var modalImg = document.getElementById("img01");
var captionText = document.getElementById("caption");
$(document).on('click','div.text > span >
img',function (e) {
modal.style.display = "block";
modalImg.src = this.src;
captionText.innerHTML = this.alt;
})
var span = document.getElementsByClassName("closeimg")[0];
span.onclick = function() {
modal.style.display = "none";
}
var filename = '';
var delayInMilliseconds = 1500; //1 second
$(':file').on('change', function () {
var file = this.files[0];
// filename = file.name;
// if (file.size > 10240) {
// alert('max upload size is 10k');
// }
// Also see .name, .type
});
$('#submit-delete').on('click', function () {
// alert('deleted ' +
$("#confirm-delete").data('id'));
id = $("#confirm-delete").data('id');
$.ajax({
url: chatAjaxRoute,
method: 'post',
data:{[token] : '1' , task: 'ajax.deleteChat',
format: 'json', raw: 'true', mid: id},
success: function (msg) {
// console.log($('#pm-' + id));
$('#pm-' + id).remove();
},
error: function (err) {
}
});
});
// $( "#confirm-delete" ).on('shown', function(){
// alert("I want this to appear after the modal has
opened!");
// });
$( "#delctxbtn" ).on('click', function(){
// alert($("#context-menu").data('refer'));
$("#confirm-delete").data('id',
$("#context-menu").data('refer').substr(3));
});
$('#chatSendBtn').on('click', function () { // for
sending file
var _this= $(this);
var formdata = new FormData($('#sending-form')[0]);
$.ajax({
// Your server script to process the upload
url:
'/components/com_reservation/controllers/fileupload.php',
type: 'POST',
// Form data
data: formdata,
// Tell jQuery not to process data or worry about content-type
// You *must* include these options!
cache: false,
contentType: false,
processData: false,
// dataType: "JSON",
beforeSend: function () {
//Your functions before send AJAX Request
},
success: function (msg) {
filename = msg;
if(filename) {
url = '/components/com_reservation/files/' + filename;
sleep(delayInMilliseconds).then(() => {
ext = filename.split('.').pop().toLowerCase();
image_ext = ['jpg', 'jpeg',
'png', 'gif', 'bmp', 'jfif',
'pjpeg', 'webp', 'tif', 'tiff'];
var msg = '';
if(image_ext.includes(ext)) {
msg = '<img
src="'+url+'">';
}
else {
msg = '<a
href="'+url+'">' + filename +
'</a>';
}
$.ajax({
url: chatAjaxRoute,
method: 'post',
data:{[token] : '1' , task:
'ajax.saveChat', format: 'json', raw: 'true',
message:msg,from: from, to: to, seid: seid, pid: pid},
success: function (msge) {
var currentdate = new Date();
appendmsg = '<div class="pm me"
id="pm-' + msge.id + '"><div
class="text"><span class="massage">' +
msg + '</span><div
class="info-message"><span class="readtick
unread" style=""></span><span
class="time">' + dateFormat(currentdate, 'yyyy/MM/dd
H:M') +
'</span></div></div></div>';
$('#chat-body').append(appendmsg);
_this.next('#chatMessage').val('');
var chatBoxBody = $('#chat-body')[0];
scrollToEnd(chatBoxBody);
},
error: function (err) {
}
});
$('#atachedfile').val('');
filename = '';
});
}
},
error: function (error) {
},
// Custom XMLHttpRequest
xhr: function () {
var myXhr = $.ajaxSettings.xhr();
if (myXhr.upload) {
// For handling the progress of the upload
myXhr.upload.addEventListener('progress', function (e)
{
if (e.lengthComputable) {
$('progress').show();
$('progress').attr({
value: e.loaded,
max: e.total,
});
$('#chatSendBtn').css('cursor','no-drop');
$('#chatSendBtn').prop('disabled',
true);
if(e.loaded == e.total) {
$('#chatSendBtn').css('cursor','pointer');
$('#chatSendBtn').prop('disabled',
false);
$('progress').hide();
// $('#atachedfile').clearFields();
}
}
}, false);
}
return myXhr;
}
});
});
// Enable pusher logging - don't include this in production
// Pusher.logToConsole = true;
var pusher = new Pusher('ded62ba8f60c31da4778', {
cluster: 'ap2'
});
var channel = pusher.subscribe(channel_token);
channel.bind('my-event', function(data) {
if (data.to == from) {
var user = $('.chat .users').find('#user' +
data.from);
currentdate = new Date();
reply = '';
if(data.reply != 0) {
reply_pm = $('#pm-' + data.reply);
reply_text = $('#pm-' + data.reply + '> div.text
> span').text().trim();
if(reply_pm.hasClass('me')) {
reply_user = 'خودم';
}
else {
reply_user = $('#user-name').text();
}
// if(reply_pm.hasClass('me')
reply = '<div id="rep-'+data.reply+'"
class="text reply"><div
class="Preview_preview__7RTlb"
data-prevent-context-menu-mobile="true" style="border-right:
3px solid rgb(19, 194, 194);"><div
class="Preview_details__kki9K"><span
class="Preview_sender__RUCFl" style="color: rgb(19, 194,
194);">'+reply_user+'</span><div
class="Text_text__0QjN9
TextPreview_text_preview__7vRSt"><span>'+reply_text+'</span></div></div></div></div>';
}
// console.log('data', data);
if(!data.pmid)
{
$('#chat-body').append('<div class="pm"
id="pm-' + data.id + '"><div
class="text"><span class="massage">' +
data.message + '</span><div
class="info-message"><span class="time">'
+ dateFormat(currentdate, 'yyyy/MM/dd H:M') +
'</span></div></div>'+reply+'</div>');
} else {
appendmsg = '<div class="text"><span
class="massage">' + data.message +
'</span><div class="info-message"><span
class="time">' + dateFormat(currentdate, 'yyyy/MM/dd
H:M') + '</span></div></div>'
$( `#pm-${data.pmid}`
).find('div.text:not(.reply)').replaceWith( appendmsg );
}
readMessage(chatAjaxRoute, data.id, seid);
var chatBoxBody = $('#chat-body')[0];
scrollToEnd(chatBoxBody);
} else if (data.id && data.read) {
p = $('#pm-' + data.id);
tick = p.find('.readtick');
tick.addClass('read')
tick.removeClass('unread')
}
});
function elementViewed(elmselector) {
selector = '#chat-body';
wH = $(selector).height(),
wS = $(selector).scrollTop();
hT = $(elmselector).offset().top;
hH = $(elmselector).outerHeight();
// console.log(elmselector);
// console.log(wS);
// console.log(wH);
// console.log(hT+hH-wH);
// console.log('');
alpha = (hT + hH - wH);
// if (wS > alpha && alpha >= 0 && alpha <= wH)
return true;
if (alpha >= 0 && alpha - wH <= 2 * hH) return true;
return false;
}
function readAvailableMessages() {
pms = $('.pm:not(.me)');
$.each(pms, function(i, val) {
if (elementViewed('#' + val.id)) {
pm = $('#' + val.id);
tick = pm.find('.readtick');
if (tick.hasClass('unread') &&
!pmlist.includes(val.id)) {
pmlist.push(val.id);
idnum = parseInt(val.id.split('-')[1])
readMessage(chatAjaxRoute, idnum, seid);
}
}
});
}
cb = $('#chat-body');
if(cb[0].clientHeight < cb[0].scrollHeight) { // has scroll
cb.scroll(function(e) {
readAvailableMessages();
});
} else {
readAvailableMessages();
}
var chatBoxBody = $('#chat-body')[0];
scrollToEnd(chatBoxBody);
$(document).on('click', 'button#conversation',
function(e) {
e.preventDefault();
var _this = $(this);
var token = $("#token").attr("name");
showLoading(_this);
$.ajax({
url: chatAjaxRoute,
method: 'post',
data: {
[token]: '1',
task: 'ajax.conversation',
format: 'json',
raw: 'true',
user1: from,
user2: to,
seid: seid,
pid: pid
},
success: function(msg) {
if (msg) {
_this.removeClass('btn-danger');
_this.addClass('btn-success');
_this.text('ادامه گفتگو');
$('#chatSendBtn').css('cursor',
'no-drop');
$('#chatSendBtn').prop('disabled', true);
$('#notice').text('گفتگو خاتمه
یافت');
} else {
_this.removeClass('btn-success');
_this.addClass('btn-danger');
_this.text('پایان گفتگو');
$('#chatSendBtn').css('cursor',
'pointer');
$('#chatSendBtn').prop('disabled', false);
$('#notice').text('گفتگو در حال انجام
است');
}
hideLoading(_this);
},
error: function(err) {
}
});
});
$(document).on('click', '#video_session', function(e)
{
e.preventDefault();
var _this = $(this);
var token = $("#token").attr("name");
showLoading(_this);
$.ajax({
url: chatAjaxRoute,
method: 'post',
data: {
[token]: '1',
task: 'ajax.goToClass',
format: 'json',
raw: 'true',
user1: from,
user2: to,
seid: seid,
pid: pid
},
success: function(msg) {
hideLoading(_this);
},
error: function(err) {
}
});
});
$(document).on('click', '#chatSendBtn', function(e) {
e.preventDefault();
var _this = $(this);
var token = $("#token").attr("name");
var message = $(this).next('#chatMessage').val();
var replyid = $('#reply-id').val();
var pmid = $('#pmid').val();
showLoading(_this);
$('#chatSendBtn').prop('disabled', true);
trimmedmsg = message.replaceAll(' ', '');
if (trimmedmsg) {
$.ajax({
url: chatAjaxRoute,
method: 'post',
data: {
[token]: '1',
task: 'ajax.saveChat',
format: 'json',
raw: 'true',
message: message,
from: from,
to: to,
seid: seid,
pid: pid,
replyid: replyid,
pmid: pmid
},
success: function(msg) {
reply_msg = '';
// if(replyid)
// text = jQuery('#' + replyid + ' > div.text
> span').text().trim();
reply = '';
reply_pm = $('#pm-' + replyid);
reply_text = $('#pm-' + replyid + '> div.text
> span').text().trim();
if(reply_pm.hasClass('me')) {
reply_user = 'خودم';
}
else {
reply_user = $('#user-name').text();
}
if(replyid != 0) {
// if(reply_pm.hasClass('me')
reply = '<div id="rep-'+replyid+'"
class="text reply"><div
class="Preview_preview__7RTlb"
data-prevent-context-menu-mobile="true" style="border-right:
3px solid rgb(19, 194, 194);"><div
class="Preview_details__kki9K"><span
class="Preview_sender__RUCFl" style="color: rgb(19, 194,
194);">'+reply_user+'</span><div
class="Text_text__0QjN9
TextPreview_text_preview__7vRSt"><span>'+reply_text+'</span></div></div></div></div>';
}
currentdate = new Date();
if(pmid != 0)
{
msg.id = pmid;
}
// if(pmid == 0)
// $('#chat-body').append(appendmsg);
// else {
// $( `#pm-${pmid}` ).replaceWith( appendmsg );
// }
appendmsg = '<div class="pm me"
id="pm-' + msg.id + '">'+reply+'<div
class="text"><span class="massage">' +
message + '</span><div
class="info-message"><span class="readtick
unread"></span><span class="time">' +
dateFormat(currentdate, 'yyyy/MM/dd H:M') +
'</span></div></div></div>';
//
$('.chat').find('.card-body').append(appendmsg);
if(pmid == 0){
$('#chat-body').append(appendmsg);
}
else {
// console.log(`#pm-${pmid}`);
// console.log($( `#pm-${pmid}`
).find('div.text:not(.reply)'));
$( `#pm-${pmid}`
).find('div.text:not(.reply)').replaceWith( appendmsg );
}
_this.next('#chatMessage').val('');
var chatBoxBody = $('#chat-body')[0];
scrollToEnd(chatBoxBody);
hideLoading(_this);
$('#chatSendBtn').prop('disabled', false);
rh = jQuery('#reply-header');
rh.css('display', 'none');
$('#reply-id').val('0');
$('#pmid').val('0');
focused = $('.focus');
$.each(focused, function(i, val){
val.classList.remove('focus');
});
},
error: function(err) {
}
});
}
});
function showLoading(_this) {
_this.children('#loading').css('display',
'block');
}
function hideLoading(_this) {
_this.children('#loading').css('display',
'none');
}
function scrollToEnd(element) {
element.scrollTop = element.scrollHeight;
}
});/***[/JCBGUI$$$$]***/
site.js000064400000010161151201173340006042
0ustar00/*----------------------------------------------------------------------------------|
www.vdm.io |----/
fdsh
/-------------------------------------------------------------------------------------------------------/
@version 1.0.39
@build 4th April, 2023
@created 17th December, 2020
@package Reservation
@subpackage site.js
@author farhad shahbazi <http://farhad.com>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
____ _____ _____ __ __ __ __ ___ _____ __ __ ____
_____ _ _ ____ _ _ ____
(_ _)( _ )( _ )( \/ )( ) /__\ / __)( _ )( \/ )( _ \(
_ )( \( )( ___)( \( )(_ _)
.-_)( )(_)( )(_)( ) ( )(__ /(__)\ ( (__ )(_)( ) ( )___/
)(_)( ) ( )__) ) ( )(
\____) (_____)(_____)(_/\/\_)(____)(__)(__) \___)(_____)(_/\/\_)(__)
(_____)(_)\_)(____)(_)\_) (__)
/------------------------------------------------------------------------------------------------------*/
/* JS Document */
/***[JCBGUI.joomla_component.javascript.28.$$$$]***/
jQuery(document).ready(function($) {
$(window).on('load', function() {
var token = Joomla.optionsStorage['csrf.token'];
var url = $('#jform_serverurl').val();
var secret = $('#jform_serversecret').val();
$.ajax({
url: '/administrator/index.php?option=com_reservation',
method: 'post',
dataType: 'json',
data: {[token] : '1', task:'ajax.isRegistered',
format: 'json' , raw: 'true' , url: url, secret:
secret},
success: function (msg) {
if(msg.status) {
$('#wlists').parent().addClass('alert-success')
$('#wlists').text('connected!');
}
else {
$('#wlists').parent().addClass('alert-error')
$('#wlists').text('not connected!');
}
},
error: function(err) {
}
});
});
var url = $('#jform_serverurl').val();
var secret = $('#jform_serversecret').val();
jsprovider = jQuery('#jform_adminjsprovider');
jsprovider.parent().parent().remove();
saltcode = $('#jform_serversecret');
p = saltcode.parent();
disable = url && secret ? '' :
'disabled="disabled"';
p.append(`<button class="btn btn-small"
type="button" id="connectwebhook"
${disable}><span>Create WebHook</span></button>`);
jQuery(document).on('keyup', '#jform_serversecret',
function(e) {
if(this.value && $('#jform_serverurl').val())
jQuery('#connectwebhook').removeAttr('disabled');
});
jQuery(document).on('keyup', '#jform_serverurl',
function(e) {
if(this.value && $('#jform_serversecret').val())
jQuery('#connectwebhook').removeAttr('disabled');
});
$('#connectwebhook').click(function(e) {
url = $('#jform_serverurl').val();
secret = $('#jform_serversecret').val();
token = Joomla.optionsStorage['csrf.token'];
$.ajax({
url: '/administrator/index.php?option=com_reservation',
method: 'post',
dataType: 'json',
data: {[token] : '1', task:'ajax.setWebHook',
format: 'json' , raw: 'true' , url: url, secret:
secret},
success: function (msg) {
if(msg.status) {
Joomla.JText.load({success: "Success"});
Joomla.renderMessages({'success':
['Created']});
$('#wlists').text('connected!');
$('#wlists').parent().removeClass('alert-error')
$('#wlists').parent().addClass('alert-success')
}
else {
Joomla.JText.load({error: "Error"});
Joomla.renderMessages({'error': ['Not
created']});
$('#wlists').parent().removeClass('alert-success')
$('#wlists').parent().addClass('alert-error')
$('#wlists').text('not connected!');
}
},
error: function(err) {
Joomla.JText.load({error: "Error"});
Joomla.renderMessages({'error': ['Not
created']});
$('#wlists').parent().removeClass('alert-success')
$('#wlists').parent().addClass('alert-error')
$('#wlists').text('not connected!');
}
});
event.preventDefault();
});
})/***[/JCBGUI$$$$]***/