@flypay/flyt-semantic-theme
Advanced tools
Comparing version 1.3.1 to 1.3.4
{ | ||
"name": "@flypay/flyt-semantic-theme", | ||
"version": "1.3.1", | ||
"version": "1.3.4", | ||
"description": "Flyt semantic theme to be shared across web projects", | ||
@@ -5,0 +5,0 @@ "main": "", |
/*! | ||
* # Semantic UI 2.2.7 - Accordion | ||
* # Semantic UI 2.2.10 - Accordion | ||
* http://github.com/semantic-org/semantic-ui/ | ||
@@ -4,0 +4,0 @@ * |
/*! | ||
* # Semantic UI 2.2.7 - Accordion | ||
* # Semantic UI 2.2.10 - Accordion | ||
* http://github.com/semantic-org/semantic-ui/ | ||
@@ -4,0 +4,0 @@ * |
/*! | ||
* # Semantic UI 2.2.7 - API | ||
* # Semantic UI 2.2.10 - API | ||
* http://github.com/semantic-org/semantic-ui/ | ||
@@ -4,0 +4,0 @@ * |
/*! | ||
* # Semantic UI 2.2.7 - API | ||
* # Semantic UI 2.2.10 - API | ||
* http://github.com/semantic-org/semantic-ui/ | ||
@@ -4,0 +4,0 @@ * |
/*! | ||
* # Semantic UI 2.2.7 - Checkbox | ||
* # Semantic UI 2.2.10 - Checkbox | ||
* http://github.com/semantic-org/semantic-ui/ | ||
@@ -4,0 +4,0 @@ * |
/*! | ||
* # Semantic UI 2.2.7 - Checkbox | ||
* # Semantic UI 2.2.10 - Checkbox | ||
* http://github.com/semantic-org/semantic-ui/ | ||
@@ -4,0 +4,0 @@ * |
/*! | ||
* # Semantic UI 2.2.7 - Dimmer | ||
* # Semantic UI 2.2.10 - Dimmer | ||
* http://github.com/semantic-org/semantic-ui/ | ||
@@ -4,0 +4,0 @@ * |
/*! | ||
* # Semantic UI 2.2.7 - Dimmer | ||
* # Semantic UI 2.2.10 - Dimmer | ||
* http://github.com/semantic-org/semantic-ui/ | ||
@@ -4,0 +4,0 @@ * |
/*! | ||
* # Semantic UI 2.2.7 - Dropdown | ||
* # Semantic UI 2.2.10 - Dropdown | ||
* http://github.com/semantic-org/semantic-ui/ | ||
@@ -4,0 +4,0 @@ * |
/*! | ||
* # Semantic UI 2.2.7 - Embed | ||
* # Semantic UI 2.2.10 - Embed | ||
* http://github.com/semantic-org/semantic-ui/ | ||
@@ -4,0 +4,0 @@ * |
/*! | ||
* # Semantic UI 2.2.7 - Embed | ||
* # Semantic UI 2.2.10 - Embed | ||
* http://github.com/semantic-org/semantic-ui/ | ||
@@ -4,0 +4,0 @@ * |
/*! | ||
* # Semantic UI 2.2.7 - Form Validation | ||
* # Semantic UI 2.2.10 - Form Validation | ||
* http://github.com/semantic-org/semantic-ui/ | ||
@@ -4,0 +4,0 @@ * |
/*! | ||
* # Semantic UI 2.2.7 - Form Validation | ||
* # Semantic UI 2.2.10 - Form Validation | ||
* http://github.com/semantic-org/semantic-ui/ | ||
@@ -4,0 +4,0 @@ * |
/*! | ||
* # Semantic UI 2.2.7 - Modal | ||
* # Semantic UI 2.2.10 - Modal | ||
* http://github.com/semantic-org/semantic-ui/ | ||
@@ -4,0 +4,0 @@ * |
/*! | ||
* # Semantic UI 2.2.7 - Modal | ||
* # Semantic UI 2.2.10 - Modal | ||
* http://github.com/semantic-org/semantic-ui/ | ||
@@ -4,0 +4,0 @@ * |
/*! | ||
* # Semantic UI 2.2.7 - Nag | ||
* # Semantic UI 2.2.10 - Nag | ||
* http://github.com/semantic-org/semantic-ui/ | ||
@@ -4,0 +4,0 @@ * |
/*! | ||
* # Semantic UI 2.2.7 - Nag | ||
* # Semantic UI 2.2.10 - Nag | ||
* http://github.com/semantic-org/semantic-ui/ | ||
@@ -4,0 +4,0 @@ * |
/*! | ||
* # Semantic UI 2.2.7 - Popup | ||
* # Semantic UI 2.2.10 - Popup | ||
* http://github.com/semantic-org/semantic-ui/ | ||
@@ -4,0 +4,0 @@ * |
/*! | ||
* # Semantic UI 2.2.7 - Popup | ||
* # Semantic UI 2.2.10 - Popup | ||
* http://github.com/semantic-org/semantic-ui/ | ||
@@ -10,2 +10,2 @@ * | ||
*/ | ||
!function(t,e,o,n){"use strict";e=void 0!==e&&e.Math==Math?e:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),t.fn.popup=function(n){var i,r=t(this),a=t(o),s=t(e),p=t("body"),l=r.selector||"",u=(new Date).getTime(),c=[],d=arguments[0],f="string"==typeof d,g=[].slice.call(arguments,1);return r.each(function(){var r,h,v,m,b,w,y=t.isPlainObject(n)?t.extend(!0,{},t.fn.popup.settings,n):t.extend({},t.fn.popup.settings),C=y.selector,T=y.className,P=y.error,x=y.metadata,k=y.namespace,S="."+y.namespace,E="module-"+k,A=t(this),D=t(y.context),O=t(y.scrollContext),j=t(y.boundary),F=y.target?t(y.target):A,R=0,H=!1,N=!1,M=this,W=A.data(E);w={initialize:function(){w.debug("Initializing",A),w.createID(),w.bind.events(),!w.exists()&&y.preserve&&w.create(),y.observeChanges&&w.observeChanges(),w.instantiate()},instantiate:function(){w.verbose("Storing instance",w),W=w,A.data(E,W)},observeChanges:function(){"MutationObserver"in e&&(v=new MutationObserver(w.event.documentChanged),v.observe(o,{childList:!0,subtree:!0}),w.debug("Setting up mutation observer",v))},refresh:function(){y.popup?r=t(y.popup).eq(0):y.inline&&(r=F.nextAll(C.popup).eq(0),y.popup=r),y.popup?(r.addClass(T.loading),h=w.get.offsetParent(),r.removeClass(T.loading),y.movePopup&&w.has.popup()&&w.get.offsetParent(r)[0]!==h[0]&&(w.debug("Moving popup to the same offset parent as activating element"),r.detach().appendTo(h))):h=y.inline?w.get.offsetParent(F):w.has.popup()?w.get.offsetParent(r):p,h.is("html")&&h[0]!==p[0]&&(w.debug("Setting page as offset parent"),h=p),w.get.variation()&&w.set.variation()},reposition:function(){w.refresh(),w.set.position()},destroy:function(){w.debug("Destroying previous module"),v&&v.disconnect(),r&&!y.preserve&&w.removePopup(),clearTimeout(w.hideTimer),clearTimeout(w.showTimer),w.unbind.close(),w.unbind.events(),A.removeData(E)},event:{start:function(e){var o=t.isPlainObject(y.delay)?y.delay.show:y.delay;clearTimeout(w.hideTimer),N||(w.showTimer=setTimeout(w.show,o))},end:function(){var e=t.isPlainObject(y.delay)?y.delay.hide:y.delay;clearTimeout(w.showTimer),w.hideTimer=setTimeout(w.hide,e)},touchstart:function(t){N=!0,w.show()},resize:function(){w.is.visible()&&w.set.position()},documentChanged:function(e){[].forEach.call(e,function(e){e.removedNodes&&[].forEach.call(e.removedNodes,function(e){(e==M||t(e).find(M).length>0)&&(w.debug("Element removed from DOM, tearing down events"),w.destroy())})})},hideGracefully:function(e){var n=t(e.target),i=t.contains(o.documentElement,e.target),r=n.closest(C.popup).length>0;e&&!r&&i?(w.debug("Click occurred outside popup hiding popup"),w.hide()):w.debug("Click was inside popup, keeping popup open")}},create:function(){var e=w.get.html(),o=w.get.title(),n=w.get.content();e||n||o?(w.debug("Creating pop-up html"),e||(e=y.templates.popup({title:o,content:n})),r=t("<div/>").addClass(T.popup).data(x.activator,A).html(e),y.inline?(w.verbose("Inserting popup element inline",r),r.insertAfter(A)):(w.verbose("Appending popup element to body",r),r.appendTo(D)),w.refresh(),w.set.variation(),y.hoverable&&w.bind.popup(),y.onCreate.call(r,M)):0!==F.next(C.popup).length?(w.verbose("Pre-existing popup found"),y.inline=!0,y.popup=F.next(C.popup).data(x.activator,A),w.refresh(),y.hoverable&&w.bind.popup()):y.popup?(t(y.popup).data(x.activator,A),w.verbose("Used popup specified in settings"),w.refresh(),y.hoverable&&w.bind.popup()):w.debug("No content specified skipping display",M)},createID:function(){b=(Math.random().toString(16)+"000000000").substr(2,8),m="."+b,w.verbose("Creating unique id for element",b)},toggle:function(){w.debug("Toggling pop-up"),w.is.hidden()?(w.debug("Popup is hidden, showing pop-up"),w.unbind.close(),w.show()):(w.debug("Popup is visible, hiding pop-up"),w.hide())},show:function(t){if(t=t||function(){},w.debug("Showing pop-up",y.transition),w.is.hidden()&&(!w.is.active()||!w.is.dropdown())){if(w.exists()||w.create(),!1===y.onShow.call(r,M))return void w.debug("onShow callback returned false, cancelling popup animation");y.preserve||y.popup||w.refresh(),r&&w.set.position()&&(w.save.conditions(),y.exclusive&&w.hideAll(),w.animate.show(t))}},hide:function(t){if(t=t||function(){},w.is.visible()||w.is.animating()){if(!1===y.onHide.call(r,M))return void w.debug("onHide callback returned false, cancelling popup animation");w.remove.visible(),w.unbind.close(),w.restore.conditions(),w.animate.hide(t)}},hideAll:function(){t(C.popup).filter("."+T.visible).each(function(){t(this).data(x.activator).popup("hide")})},exists:function(){return!!r&&(y.inline||y.popup?w.has.popup():r.closest(D).length>=1)},removePopup:function(){w.has.popup()&&!y.popup&&(w.debug("Removing popup",r),r.remove(),r=void 0,y.onRemove.call(r,M))},save:{conditions:function(){w.cache={title:A.attr("title")},w.cache.title&&A.removeAttr("title"),w.verbose("Saving original attributes",w.cache.title)}},restore:{conditions:function(){return w.cache&&w.cache.title&&(A.attr("title",w.cache.title),w.verbose("Restoring original attributes",w.cache.title)),!0}},supports:{svg:function(){return void 0===typeof SVGGraphicsElement}},animate:{show:function(e){e=t.isFunction(e)?e:function(){},y.transition&&void 0!==t.fn.transition&&A.transition("is supported")?(w.set.visible(),r.transition({animation:y.transition+" in",queue:!1,debug:y.debug,verbose:y.verbose,duration:y.duration,onComplete:function(){w.bind.close(),e.call(r,M),y.onVisible.call(r,M)}})):w.error(P.noTransition)},hide:function(e){if(e=t.isFunction(e)?e:function(){},w.debug("Hiding pop-up"),!1===y.onHide.call(r,M))return void w.debug("onHide callback returned false, cancelling popup animation");y.transition&&void 0!==t.fn.transition&&A.transition("is supported")?r.transition({animation:y.transition+" out",queue:!1,duration:y.duration,debug:y.debug,verbose:y.verbose,onComplete:function(){w.reset(),e.call(r,M),y.onHidden.call(r,M)}}):w.error(P.noTransition)}},change:{content:function(t){r.html(t)}},get:{html:function(){return A.removeData(x.html),A.data(x.html)||y.html},title:function(){return A.removeData(x.title),A.data(x.title)||y.title},content:function(){return A.removeData(x.content),A.data(x.content)||A.attr("title")||y.content},variation:function(){return A.removeData(x.variation),A.data(x.variation)||y.variation},popup:function(){return r},popupOffset:function(){return r.offset()},calculations:function(){var t,o=F[0],n=j[0]==e,i=y.inline||y.popup&&y.movePopup?F.position():F.offset(),a=n?{top:0,left:0}:j.offset(),p={},l=n?{top:s.scrollTop(),left:s.scrollLeft()}:{top:0,left:0};return p={target:{element:F[0],width:F.outerWidth(),height:F.outerHeight(),top:i.top,left:i.left,margin:{}},popup:{width:r.outerWidth(),height:r.outerHeight()},parent:{width:h.outerWidth(),height:h.outerHeight()},screen:{top:a.top,left:a.left,scroll:{top:l.top,left:l.left},width:j.width(),height:j.height()}},y.setFluidWidth&&w.is.fluid()&&(p.container={width:r.parent().outerWidth()},p.popup.width=p.container.width),p.target.margin.top=y.inline?parseInt(e.getComputedStyle(o).getPropertyValue("margin-top"),10):0,p.target.margin.left=y.inline?w.is.rtl()?parseInt(e.getComputedStyle(o).getPropertyValue("margin-right"),10):parseInt(e.getComputedStyle(o).getPropertyValue("margin-left"),10):0,t=p.screen,p.boundary={top:t.top+t.scroll.top,bottom:t.top+t.scroll.top+t.height,left:t.left+t.scroll.left,right:t.left+t.scroll.left+t.width},p},id:function(){return b},startEvent:function(){return"hover"==y.on?"mouseenter":"focus"==y.on&&"focus"},scrollEvent:function(){return"scroll"},endEvent:function(){return"hover"==y.on?"mouseleave":"focus"==y.on&&"blur"},distanceFromBoundary:function(t,e){var o,n,i={};return e=e||w.get.calculations(),o=e.popup,n=e.boundary,t&&(i={top:t.top-n.top,left:t.left-n.left,right:n.right-(t.left+o.width),bottom:n.bottom-(t.top+o.height)},w.verbose("Distance from boundaries determined",t,i)),i},offsetParent:function(e){var o=void 0!==e?e[0]:A[0],n=o.parentNode,i=t(n);if(n)for(var r="none"===i.css("transform"),a="static"===i.css("position"),s=i.is("html");n&&!s&&a&&r;)n=n.parentNode,i=t(n),r="none"===i.css("transform"),a="static"===i.css("position"),s=i.is("html");return i&&i.length>0?i:t()},positions:function(){return{"top left":!1,"top center":!1,"top right":!1,"bottom left":!1,"bottom center":!1,"bottom right":!1,"left center":!1,"right center":!1}},nextPosition:function(t){var e=t.split(" "),o=e[0],n=e[1],i={top:"bottom",bottom:"top",left:"right",right:"left"},r={left:"center",center:"right",right:"left"},a={"top left":"top center","top center":"top right","top right":"right center","right center":"bottom right","bottom right":"bottom center","bottom center":"bottom left","bottom left":"left center","left center":"top left"},s="top"==o||"bottom"==o,p=!1,l=!1,u=!1;return H||(w.verbose("All available positions available"),H=w.get.positions()),w.debug("Recording last position tried",t),H[t]=!0,"opposite"===y.prefer&&(u=[i[o],n],u=u.join(" "),p=!0===H[u],w.debug("Trying opposite strategy",u)),"adjacent"===y.prefer&&s&&(u=[o,r[n]],u=u.join(" "),l=!0===H[u],w.debug("Trying adjacent strategy",u)),(l||p)&&(w.debug("Using backup position",u),u=a[t]),u}},set:{position:function(t,e){if(0===F.length||0===r.length)return void w.error(P.notFound);var o,n,i,a,s,p,l,u;if(e=e||w.get.calculations(),t=t||A.data(x.position)||y.position,o=A.data(x.offset)||y.offset,n=y.distanceAway,i=e.target,a=e.popup,s=e.parent,0===i.width&&0===i.height&&!w.is.svg(i.element))return w.debug("Popup target is hidden, no action taken"),!1;switch(y.inline&&(w.debug("Adding margin to calculation",i.margin),"left center"==t||"right center"==t?(o+=i.margin.top,n+=-i.margin.left):"top left"==t||"top center"==t||"top right"==t?(o+=i.margin.left,n-=i.margin.top):(o+=i.margin.left,n+=i.margin.top)),w.debug("Determining popup position from calculations",t,e),w.is.rtl()&&(t=t.replace(/left|right/g,function(t){return"left"==t?"right":"left"}),w.debug("RTL: Popup position updated",t)),R==y.maxSearchDepth&&"string"==typeof y.lastResort&&(t=y.lastResort),t){case"top left":p={top:"auto",bottom:s.height-i.top+n,left:i.left+o,right:"auto"};break;case"top center":p={bottom:s.height-i.top+n,left:i.left+i.width/2-a.width/2+o,top:"auto",right:"auto"};break;case"top right":p={bottom:s.height-i.top+n,right:s.width-i.left-i.width-o,top:"auto",left:"auto"};break;case"left center":p={top:i.top+i.height/2-a.height/2+o,right:s.width-i.left+n,left:"auto",bottom:"auto"};break;case"right center":p={top:i.top+i.height/2-a.height/2+o,left:i.left+i.width+n,bottom:"auto",right:"auto"};break;case"bottom left":p={top:i.top+i.height+n,left:i.left+o,bottom:"auto",right:"auto"};break;case"bottom center":p={top:i.top+i.height+n,left:i.left+i.width/2-a.width/2+o,bottom:"auto",right:"auto"};break;case"bottom right":p={top:i.top+i.height+n,right:s.width-i.left-i.width-o,left:"auto",bottom:"auto"}}if(void 0===p&&w.error(P.invalidPosition,t),w.debug("Calculated popup positioning values",p),r.css(p).removeClass(T.position).addClass(t).addClass(T.loading),l=w.get.popupOffset(),u=w.get.distanceFromBoundary(l,e),w.is.offstage(u,t)){if(w.debug("Position is outside viewport",t),R<y.maxSearchDepth)return R++,t=w.get.nextPosition(t),w.debug("Trying new position",t),!!r&&w.set.position(t,e);if(!y.lastResort)return w.debug("Popup could not find a position to display",r),w.error(P.cannotPlace,M),w.remove.attempts(),w.remove.loading(),w.reset(),y.onUnplaceable.call(r,M),!1;w.debug("No position found, showing with last position")}return w.debug("Position is on stage",t),w.remove.attempts(),w.remove.loading(),y.setFluidWidth&&w.is.fluid()&&w.set.fluidWidth(e),!0},fluidWidth:function(t){t=t||w.get.calculations(),w.debug("Automatically setting element width to parent width",t.parent.width),r.css("width",t.container.width)},variation:function(t){(t=t||w.get.variation())&&w.has.popup()&&(w.verbose("Adding variation to popup",t),r.addClass(t))},visible:function(){A.addClass(T.visible)}},remove:{loading:function(){r.removeClass(T.loading)},variation:function(t){(t=t||w.get.variation())&&(w.verbose("Removing variation",t),r.removeClass(t))},visible:function(){A.removeClass(T.visible)},attempts:function(){w.verbose("Resetting all searched positions"),R=0,H=!1}},bind:{events:function(){w.debug("Binding popup events to module"),"click"==y.on&&A.on("click"+S,w.toggle),"hover"==y.on&&A.on("touchstart"+S,w.event.touchstart),w.get.startEvent()&&A.on(w.get.startEvent()+S,w.event.start).on(w.get.endEvent()+S,w.event.end),y.target&&w.debug("Target set to element",F),s.on("resize"+m,w.event.resize)},popup:function(){w.verbose("Allowing hover events on popup to prevent closing"),r&&w.has.popup()&&r.on("mouseenter"+S,w.event.start).on("mouseleave"+S,w.event.end)},close:function(){(!0===y.hideOnScroll||"auto"==y.hideOnScroll&&"click"!=y.on)&&O.one(w.get.scrollEvent()+m,w.event.hideGracefully),"hover"==y.on&&N&&(w.verbose("Binding popup close event to document"),a.on("touchstart"+m,function(t){w.verbose("Touched away from popup"),w.event.hideGracefully.call(M,t)})),"click"==y.on&&y.closable&&(w.verbose("Binding popup close event to document"),a.on("click"+m,function(t){w.verbose("Clicked away from popup"),w.event.hideGracefully.call(M,t)}))}},unbind:{events:function(){s.off(m),A.off(S)},close:function(){a.off(m),O.off(m)}},has:{popup:function(){return r&&r.length>0}},is:{offstage:function(e,o){var n=[];return t.each(e,function(t,e){e<-y.jitter&&(w.debug("Position exceeds allowable distance from edge",t,e,o),n.push(t))}),n.length>0},svg:function(t){return w.supports.svg()&&t instanceof SVGGraphicsElement},active:function(){return A.hasClass(T.active)},animating:function(){return void 0!==r&&r.hasClass(T.animating)},fluid:function(){return void 0!==r&&r.hasClass(T.fluid)},visible:function(){return void 0!==r&&r.hasClass(T.visible)},dropdown:function(){return A.hasClass(T.dropdown)},hidden:function(){return!w.is.visible()},rtl:function(){return"rtl"==A.css("direction")}},reset:function(){w.remove.visible(),y.preserve?void 0!==t.fn.transition&&r.transition("remove transition"):w.removePopup()},setting:function(e,o){if(t.isPlainObject(e))t.extend(!0,y,e);else{if(void 0===o)return y[e];y[e]=o}},internal:function(e,o){if(t.isPlainObject(e))t.extend(!0,w,e);else{if(void 0===o)return w[e];w[e]=o}},debug:function(){!y.silent&&y.debug&&(y.performance?w.performance.log(arguments):(w.debug=Function.prototype.bind.call(console.info,console,y.name+":"),w.debug.apply(console,arguments)))},verbose:function(){!y.silent&&y.verbose&&y.debug&&(y.performance?w.performance.log(arguments):(w.verbose=Function.prototype.bind.call(console.info,console,y.name+":"),w.verbose.apply(console,arguments)))},error:function(){y.silent||(w.error=Function.prototype.bind.call(console.error,console,y.name+":"),w.error.apply(console,arguments))},performance:{log:function(t){var e,o,n;y.performance&&(e=(new Date).getTime(),n=u||e,o=e-n,u=e,c.push({Name:t[0],Arguments:[].slice.call(t,1)||"",Element:M,"Execution Time":o})),clearTimeout(w.performance.timer),w.performance.timer=setTimeout(w.performance.display,500)},display:function(){var e=y.name+":",o=0;u=!1,clearTimeout(w.performance.timer),t.each(c,function(t,e){o+=e["Execution Time"]}),e+=" "+o+"ms",l&&(e+=" '"+l+"'"),(void 0!==console.group||void 0!==console.table)&&c.length>0&&(console.groupCollapsed(e),console.table?console.table(c):t.each(c,function(t,e){console.log(e.Name+": "+e["Execution Time"]+"ms")}),console.groupEnd()),c=[]}},invoke:function(e,o,n){var r,a,s,p=W;return o=o||g,n=M||n,"string"==typeof e&&void 0!==p&&(e=e.split(/[\. ]/),r=e.length-1,t.each(e,function(o,n){var i=o!=r?n+e[o+1].charAt(0).toUpperCase()+e[o+1].slice(1):e;if(t.isPlainObject(p[i])&&o!=r)p=p[i];else{if(void 0!==p[i])return a=p[i],!1;if(!t.isPlainObject(p[n])||o==r)return void 0!==p[n]&&(a=p[n],!1);p=p[n]}})),t.isFunction(a)?s=a.apply(n,o):void 0!==a&&(s=a),t.isArray(i)?i.push(s):void 0!==i?i=[i,s]:void 0!==s&&(i=s),a}},f?(void 0===W&&w.initialize(),w.invoke(d)):(void 0!==W&&W.invoke("destroy"),w.initialize())}),void 0!==i?i:this},t.fn.popup.settings={name:"Popup",silent:!1,debug:!1,verbose:!1,performance:!0,namespace:"popup",observeChanges:!0,onCreate:function(){},onRemove:function(){},onShow:function(){},onVisible:function(){},onHide:function(){},onUnplaceable:function(){},onHidden:function(){},on:"hover",boundary:e,addTouchEvents:!0,position:"top left",variation:"",movePopup:!0,target:!1,popup:!1,inline:!1,preserve:!1,hoverable:!1,content:!1,html:!1,title:!1,closable:!0,hideOnScroll:"auto",exclusive:!1,context:"body",scrollContext:e,prefer:"opposite",lastResort:!1,delay:{show:50,hide:70},setFluidWidth:!0,duration:200,transition:"scale",distanceAway:0,jitter:2,offset:0,maxSearchDepth:15,error:{invalidPosition:"The position you specified is not a valid position",cannotPlace:"Popup does not fit within the boundaries of the viewport",method:"The method you called is not defined.",noTransition:"This module requires ui transitions <https://github.com/Semantic-Org/UI-Transition>",notFound:"The target or popup you specified does not exist on the page"},metadata:{activator:"activator",content:"content",html:"html",offset:"offset",position:"position",title:"title",variation:"variation"},className:{active:"active",animating:"animating",dropdown:"dropdown",fluid:"fluid",loading:"loading",popup:"ui popup",position:"top left center bottom right",visible:"visible"},selector:{popup:".ui.popup"},templates:{escape:function(t){var e=/[&<>"'`]/,o={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},n=function(t){return o[t]};return e.test(t)?t.replace(/[&<>"'`]/g,n):t},popup:function(e){var o="",n=t.fn.popup.settings.templates.escape;return void 0!==typeof e&&(void 0!==typeof e.title&&e.title&&(e.title=n(e.title),o+='<div class="header">'+e.title+"</div>"),void 0!==typeof e.content&&e.content&&(e.content=n(e.content),o+='<div class="content">'+e.content+"</div>")),o}}}}(jQuery,window,document); | ||
!function(t,e,o,n){"use strict";e=void 0!==e&&e.Math==Math?e:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),t.fn.popup=function(n){var i,r=t(this),a=t(o),s=t(e),p=t("body"),l=r.selector||"",u=(new Date).getTime(),c=[],d=arguments[0],f="string"==typeof d,g=[].slice.call(arguments,1);return r.each(function(){var r,h,v,m,b,w,y=t.isPlainObject(n)?t.extend(!0,{},t.fn.popup.settings,n):t.extend({},t.fn.popup.settings),C=y.selector,T=y.className,P=y.error,x=y.metadata,k=y.namespace,S="."+y.namespace,E="module-"+k,A=t(this),D=t(y.context),O=t(y.scrollContext),j=t(y.boundary),F=y.target?t(y.target):A,R=0,H=!1,N=!1,M=this,W=A.data(E);w={initialize:function(){w.debug("Initializing",A),w.createID(),w.bind.events(),!w.exists()&&y.preserve&&w.create(),y.observeChanges&&w.observeChanges(),w.instantiate()},instantiate:function(){w.verbose("Storing instance",w),W=w,A.data(E,W)},observeChanges:function(){"MutationObserver"in e&&(v=new MutationObserver(w.event.documentChanged),v.observe(o,{childList:!0,subtree:!0}),w.debug("Setting up mutation observer",v))},refresh:function(){y.popup?r=t(y.popup).eq(0):y.inline&&(r=F.nextAll(C.popup).eq(0),y.popup=r),y.popup?(r.addClass(T.loading),h=w.get.offsetParent(),r.removeClass(T.loading),y.movePopup&&w.has.popup()&&w.get.offsetParent(r)[0]!==h[0]&&(w.debug("Moving popup to the same offset parent as activating element"),r.detach().appendTo(h))):h=y.inline?w.get.offsetParent(F):w.has.popup()?w.get.offsetParent(r):p,h.is("html")&&h[0]!==p[0]&&(w.debug("Setting page as offset parent"),h=p),w.get.variation()&&w.set.variation()},reposition:function(){w.refresh(),w.set.position()},destroy:function(){w.debug("Destroying previous module"),v&&v.disconnect(),r&&!y.preserve&&w.removePopup(),clearTimeout(w.hideTimer),clearTimeout(w.showTimer),w.unbind.close(),w.unbind.events(),A.removeData(E)},event:{start:function(e){var o=t.isPlainObject(y.delay)?y.delay.show:y.delay;clearTimeout(w.hideTimer),N||(w.showTimer=setTimeout(w.show,o))},end:function(){var e=t.isPlainObject(y.delay)?y.delay.hide:y.delay;clearTimeout(w.showTimer),w.hideTimer=setTimeout(w.hide,e)},touchstart:function(t){N=!0,w.show()},resize:function(){w.is.visible()&&w.set.position()},documentChanged:function(e){[].forEach.call(e,function(e){e.removedNodes&&[].forEach.call(e.removedNodes,function(e){(e==M||t(e).find(M).length>0)&&(w.debug("Element removed from DOM, tearing down events"),w.destroy())})})},hideGracefully:function(e){var n=t(e.target),i=t.contains(o.documentElement,e.target),r=n.closest(C.popup).length>0;e&&!r&&i?(w.debug("Click occurred outside popup hiding popup"),w.hide()):w.debug("Click was inside popup, keeping popup open")}},create:function(){var e=w.get.html(),o=w.get.title(),n=w.get.content();e||n||o?(w.debug("Creating pop-up html"),e||(e=y.templates.popup({title:o,content:n})),r=t("<div/>").addClass(T.popup).data(x.activator,A).html(e),y.inline?(w.verbose("Inserting popup element inline",r),r.insertAfter(A)):(w.verbose("Appending popup element to body",r),r.appendTo(D)),w.refresh(),w.set.variation(),y.hoverable&&w.bind.popup(),y.onCreate.call(r,M)):0!==F.next(C.popup).length?(w.verbose("Pre-existing popup found"),y.inline=!0,y.popup=F.next(C.popup).data(x.activator,A),w.refresh(),y.hoverable&&w.bind.popup()):y.popup?(t(y.popup).data(x.activator,A),w.verbose("Used popup specified in settings"),w.refresh(),y.hoverable&&w.bind.popup()):w.debug("No content specified skipping display",M)},createID:function(){b=(Math.random().toString(16)+"000000000").substr(2,8),m="."+b,w.verbose("Creating unique id for element",b)},toggle:function(){w.debug("Toggling pop-up"),w.is.hidden()?(w.debug("Popup is hidden, showing pop-up"),w.unbind.close(),w.show()):(w.debug("Popup is visible, hiding pop-up"),w.hide())},show:function(t){if(t=t||function(){},w.debug("Showing pop-up",y.transition),w.is.hidden()&&(!w.is.active()||!w.is.dropdown())){if(w.exists()||w.create(),!1===y.onShow.call(r,M))return void w.debug("onShow callback returned false, cancelling popup animation");y.preserve||y.popup||w.refresh(),r&&w.set.position()&&(w.save.conditions(),y.exclusive&&w.hideAll(),w.animate.show(t))}},hide:function(t){if(t=t||function(){},w.is.visible()||w.is.animating()){if(!1===y.onHide.call(r,M))return void w.debug("onHide callback returned false, cancelling popup animation");w.remove.visible(),w.unbind.close(),w.restore.conditions(),w.animate.hide(t)}},hideAll:function(){t(C.popup).filter("."+T.visible).each(function(){t(this).data(x.activator).popup("hide")})},exists:function(){return!!r&&(y.inline||y.popup?w.has.popup():r.closest(D).length>=1)},removePopup:function(){w.has.popup()&&!y.popup&&(w.debug("Removing popup",r),r.remove(),r=void 0,y.onRemove.call(r,M))},save:{conditions:function(){w.cache={title:A.attr("title")},w.cache.title&&A.removeAttr("title"),w.verbose("Saving original attributes",w.cache.title)}},restore:{conditions:function(){return w.cache&&w.cache.title&&(A.attr("title",w.cache.title),w.verbose("Restoring original attributes",w.cache.title)),!0}},supports:{svg:function(){return void 0===typeof SVGGraphicsElement}},animate:{show:function(e){e=t.isFunction(e)?e:function(){},y.transition&&void 0!==t.fn.transition&&A.transition("is supported")?(w.set.visible(),r.transition({animation:y.transition+" in",queue:!1,debug:y.debug,verbose:y.verbose,duration:y.duration,onComplete:function(){w.bind.close(),e.call(r,M),y.onVisible.call(r,M)}})):w.error(P.noTransition)},hide:function(e){if(e=t.isFunction(e)?e:function(){},w.debug("Hiding pop-up"),!1===y.onHide.call(r,M))return void w.debug("onHide callback returned false, cancelling popup animation");y.transition&&void 0!==t.fn.transition&&A.transition("is supported")?r.transition({animation:y.transition+" out",queue:!1,duration:y.duration,debug:y.debug,verbose:y.verbose,onComplete:function(){w.reset(),e.call(r,M),y.onHidden.call(r,M)}}):w.error(P.noTransition)}},change:{content:function(t){r.html(t)}},get:{html:function(){return A.removeData(x.html),A.data(x.html)||y.html},title:function(){return A.removeData(x.title),A.data(x.title)||y.title},content:function(){return A.removeData(x.content),A.data(x.content)||A.attr("title")||y.content},variation:function(){return A.removeData(x.variation),A.data(x.variation)||y.variation},popup:function(){return r},popupOffset:function(){return r.offset()},calculations:function(){var t,o=F[0],n=j[0]==e,i=y.inline||y.popup&&y.movePopup?F.position():F.offset(),a=n?{top:0,left:0}:j.offset(),p={},l=n?{top:s.scrollTop(),left:s.scrollLeft()}:{top:0,left:0};return p={target:{element:F[0],width:F.outerWidth(),height:F.outerHeight(),top:i.top,left:i.left,margin:{}},popup:{width:r.outerWidth(),height:r.outerHeight()},parent:{width:h.outerWidth(),height:h.outerHeight()},screen:{top:a.top,left:a.left,scroll:{top:l.top,left:l.left},width:j.width(),height:j.height()}},y.setFluidWidth&&w.is.fluid()&&(p.container={width:r.parent().outerWidth()},p.popup.width=p.container.width),p.target.margin.top=y.inline?parseInt(e.getComputedStyle(o).getPropertyValue("margin-top"),10):0,p.target.margin.left=y.inline?w.is.rtl()?parseInt(e.getComputedStyle(o).getPropertyValue("margin-right"),10):parseInt(e.getComputedStyle(o).getPropertyValue("margin-left"),10):0,t=p.screen,p.boundary={top:t.top+t.scroll.top,bottom:t.top+t.scroll.top+t.height,left:t.left+t.scroll.left,right:t.left+t.scroll.left+t.width},p},id:function(){return b},startEvent:function(){return"hover"==y.on?"mouseenter":"focus"==y.on&&"focus"},scrollEvent:function(){return"scroll"},endEvent:function(){return"hover"==y.on?"mouseleave":"focus"==y.on&&"blur"},distanceFromBoundary:function(t,e){var o,n,i={};return e=e||w.get.calculations(),o=e.popup,n=e.boundary,t&&(i={top:t.top-n.top,left:t.left-n.left,right:n.right-(t.left+o.width),bottom:n.bottom-(t.top+o.height)},w.verbose("Distance from boundaries determined",t,i)),i},offsetParent:function(e){var o=void 0!==e?e[0]:A[0],n=o.parentNode,i=t(n);if(n)for(var r="none"===i.css("transform"),a="static"===i.css("position"),s=i.is("html");n&&!s&&a&&r;)n=n.parentNode,i=t(n),r="none"===i.css("transform"),a="static"===i.css("position"),s=i.is("html");return i&&i.length>0?i:t()},positions:function(){return{"top left":!1,"top center":!1,"top right":!1,"bottom left":!1,"bottom center":!1,"bottom right":!1,"left center":!1,"right center":!1}},nextPosition:function(t){var e=t.split(" "),o=e[0],n=e[1],i={top:"bottom",bottom:"top",left:"right",right:"left"},r={left:"center",center:"right",right:"left"},a={"top left":"top center","top center":"top right","top right":"right center","right center":"bottom right","bottom right":"bottom center","bottom center":"bottom left","bottom left":"left center","left center":"top left"},s="top"==o||"bottom"==o,p=!1,l=!1,u=!1;return H||(w.verbose("All available positions available"),H=w.get.positions()),w.debug("Recording last position tried",t),H[t]=!0,"opposite"===y.prefer&&(u=[i[o],n],u=u.join(" "),p=!0===H[u],w.debug("Trying opposite strategy",u)),"adjacent"===y.prefer&&s&&(u=[o,r[n]],u=u.join(" "),l=!0===H[u],w.debug("Trying adjacent strategy",u)),(l||p)&&(w.debug("Using backup position",u),u=a[t]),u}},set:{position:function(t,e){if(0===F.length||0===r.length)return void w.error(P.notFound);var o,n,i,a,s,p,l,u;if(e=e||w.get.calculations(),t=t||A.data(x.position)||y.position,o=A.data(x.offset)||y.offset,n=y.distanceAway,i=e.target,a=e.popup,s=e.parent,0===i.width&&0===i.height&&!w.is.svg(i.element))return w.debug("Popup target is hidden, no action taken"),!1;switch(y.inline&&(w.debug("Adding margin to calculation",i.margin),"left center"==t||"right center"==t?(o+=i.margin.top,n+=-i.margin.left):"top left"==t||"top center"==t||"top right"==t?(o+=i.margin.left,n-=i.margin.top):(o+=i.margin.left,n+=i.margin.top)),w.debug("Determining popup position from calculations",t,e),w.is.rtl()&&(t=t.replace(/left|right/g,function(t){return"left"==t?"right":"left"}),w.debug("RTL: Popup position updated",t)),R==y.maxSearchDepth&&"string"==typeof y.lastResort&&(t=y.lastResort),t){case"top left":p={top:"auto",bottom:s.height-i.top+n,left:i.left+o,right:"auto"};break;case"top center":p={bottom:s.height-i.top+n,left:i.left+i.width/2-a.width/2+o,top:"auto",right:"auto"};break;case"top right":p={bottom:s.height-i.top+n,right:s.width-i.left-i.width-o,top:"auto",left:"auto"};break;case"left center":p={top:i.top+i.height/2-a.height/2+o,right:s.width-i.left+n,left:"auto",bottom:"auto"};break;case"right center":p={top:i.top+i.height/2-a.height/2+o,left:i.left+i.width+n,bottom:"auto",right:"auto"};break;case"bottom left":p={top:i.top+i.height+n,left:i.left+o,bottom:"auto",right:"auto"};break;case"bottom center":p={top:i.top+i.height+n,left:i.left+i.width/2-a.width/2+o,bottom:"auto",right:"auto"};break;case"bottom right":p={top:i.top+i.height+n,right:s.width-i.left-i.width-o,left:"auto",bottom:"auto"}}if(void 0===p&&w.error(P.invalidPosition,t),w.debug("Calculated popup positioning values",p),r.css(p).removeClass(T.position).addClass(t).addClass(T.loading),l=w.get.popupOffset(),u=w.get.distanceFromBoundary(l,e),w.is.offstage(u,t)){if(w.debug("Position is outside viewport",t),R<y.maxSearchDepth)return R++,t=w.get.nextPosition(t),w.debug("Trying new position",t),!!r&&w.set.position(t,e);if(!y.lastResort)return w.debug("Popup could not find a position to display",r),w.error(P.cannotPlace,M),w.remove.attempts(),w.remove.loading(),w.reset(),y.onUnplaceable.call(r,M),!1;w.debug("No position found, showing with last position")}return w.debug("Position is on stage",t),w.remove.attempts(),w.remove.loading(),y.setFluidWidth&&w.is.fluid()&&w.set.fluidWidth(e),!0},fluidWidth:function(t){t=t||w.get.calculations(),w.debug("Automatically setting element width to parent width",t.parent.width),r.css("width",t.container.width)},variation:function(t){(t=t||w.get.variation())&&w.has.popup()&&(w.verbose("Adding variation to popup",t),r.addClass(t))},visible:function(){A.addClass(T.visible)}},remove:{loading:function(){r.removeClass(T.loading)},variation:function(t){(t=t||w.get.variation())&&(w.verbose("Removing variation",t),r.removeClass(t))},visible:function(){A.removeClass(T.visible)},attempts:function(){w.verbose("Resetting all searched positions"),R=0,H=!1}},bind:{events:function(){w.debug("Binding popup events to module"),"click"==y.on&&A.on("click"+S,w.toggle),"hover"==y.on&&A.on("touchstart"+S,w.event.touchstart),w.get.startEvent()&&A.on(w.get.startEvent()+S,w.event.start).on(w.get.endEvent()+S,w.event.end),y.target&&w.debug("Target set to element",F),s.on("resize"+m,w.event.resize)},popup:function(){w.verbose("Allowing hover events on popup to prevent closing"),r&&w.has.popup()&&r.on("mouseenter"+S,w.event.start).on("mouseleave"+S,w.event.end)},close:function(){(!0===y.hideOnScroll||"auto"==y.hideOnScroll&&"click"!=y.on)&&O.one(w.get.scrollEvent()+m,w.event.hideGracefully),"hover"==y.on&&N&&(w.verbose("Binding popup close event to document"),a.on("touchstart"+m,function(t){w.verbose("Touched away from popup"),w.event.hideGracefully.call(M,t)})),"click"==y.on&&y.closable&&(w.verbose("Binding popup close event to document"),a.on("click"+m,function(t){w.verbose("Clicked away from popup"),w.event.hideGracefully.call(M,t)}))}},unbind:{events:function(){s.off(m),A.off(S)},close:function(){a.off(m),O.off(m)}},has:{popup:function(){return r&&r.length>0}},is:{offstage:function(e,o){var n=[];return t.each(e,function(t,e){e<-y.jitter&&(w.debug("Position exceeds allowable distance from edge",t,e,o),n.push(t))}),n.length>0},svg:function(t){return w.supports.svg()&&t instanceof SVGGraphicsElement},active:function(){return A.hasClass(T.active)},animating:function(){return void 0!==r&&r.hasClass(T.animating)},fluid:function(){return void 0!==r&&r.hasClass(T.fluid)},visible:function(){return void 0!==r&&r.hasClass(T.visible)},dropdown:function(){return A.hasClass(T.dropdown)},hidden:function(){return!w.is.visible()},rtl:function(){return"rtl"==A.css("direction")}},reset:function(){w.remove.visible(),y.preserve?void 0!==t.fn.transition&&r.transition("remove transition"):w.removePopup()},setting:function(e,o){if(t.isPlainObject(e))t.extend(!0,y,e);else{if(void 0===o)return y[e];y[e]=o}},internal:function(e,o){if(t.isPlainObject(e))t.extend(!0,w,e);else{if(void 0===o)return w[e];w[e]=o}},debug:function(){!y.silent&&y.debug&&(y.performance?w.performance.log(arguments):(w.debug=Function.prototype.bind.call(console.info,console,y.name+":"),w.debug.apply(console,arguments)))},verbose:function(){!y.silent&&y.verbose&&y.debug&&(y.performance?w.performance.log(arguments):(w.verbose=Function.prototype.bind.call(console.info,console,y.name+":"),w.verbose.apply(console,arguments)))},error:function(){y.silent||(w.error=Function.prototype.bind.call(console.error,console,y.name+":"),w.error.apply(console,arguments))},performance:{log:function(t){var e,o,n;y.performance&&(e=(new Date).getTime(),n=u||e,o=e-n,u=e,c.push({Name:t[0],Arguments:[].slice.call(t,1)||"",Element:M,"Execution Time":o})),clearTimeout(w.performance.timer),w.performance.timer=setTimeout(w.performance.display,500)},display:function(){var e=y.name+":",o=0;u=!1,clearTimeout(w.performance.timer),t.each(c,function(t,e){o+=e["Execution Time"]}),e+=" "+o+"ms",l&&(e+=" '"+l+"'"),(void 0!==console.group||void 0!==console.table)&&c.length>0&&(console.groupCollapsed(e),console.table?console.table(c):t.each(c,function(t,e){console.log(e.Name+": "+e["Execution Time"]+"ms")}),console.groupEnd()),c=[]}},invoke:function(e,o,n){var r,a,s,p=W;return o=o||g,n=M||n,"string"==typeof e&&void 0!==p&&(e=e.split(/[\. ]/),r=e.length-1,t.each(e,function(o,n){var i=o!=r?n+e[o+1].charAt(0).toUpperCase()+e[o+1].slice(1):e;if(t.isPlainObject(p[i])&&o!=r)p=p[i];else{if(void 0!==p[i])return a=p[i],!1;if(!t.isPlainObject(p[n])||o==r)return void 0!==p[n]&&(a=p[n],!1);p=p[n]}})),t.isFunction(a)?s=a.apply(n,o):void 0!==a&&(s=a),t.isArray(i)?i.push(s):void 0!==i?i=[i,s]:void 0!==s&&(i=s),a}},f?(void 0===W&&w.initialize(),w.invoke(d)):(void 0!==W&&W.invoke("destroy"),w.initialize())}),void 0!==i?i:this},t.fn.popup.settings={name:"Popup",silent:!1,debug:!1,verbose:!1,performance:!0,namespace:"popup",observeChanges:!0,onCreate:function(){},onRemove:function(){},onShow:function(){},onVisible:function(){},onHide:function(){},onUnplaceable:function(){},onHidden:function(){},on:"hover",boundary:e,addTouchEvents:!0,position:"top left",variation:"",movePopup:!0,target:!1,popup:!1,inline:!1,preserve:!1,hoverable:!1,content:!1,html:!1,title:!1,closable:!0,hideOnScroll:"auto",exclusive:!1,context:"body",scrollContext:e,prefer:"opposite",lastResort:!1,delay:{show:50,hide:70},setFluidWidth:!0,duration:200,transition:"scale",distanceAway:0,jitter:2,offset:0,maxSearchDepth:15,error:{invalidPosition:"The position you specified is not a valid position",cannotPlace:"Popup does not fit within the boundaries of the viewport",method:"The method you called is not defined.",noTransition:"This module requires ui transitions <https://github.com/Semantic-Org/UI-Transition>",notFound:"The target or popup you specified does not exist on the page"},metadata:{activator:"activator",content:"content",html:"html",offset:"offset",position:"position",title:"title",variation:"variation"},className:{active:"active",animating:"animating",dropdown:"dropdown",fluid:"fluid",loading:"loading",popup:"ui popup",position:"top left center bottom right",visible:"visible"},selector:{popup:".ui.popup"},templates:{escape:function(t){var e=/[&<>"'`]/g,o=/[&<>"'`]/,n={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},i=function(t){return n[t]};return o.test(t)?t.replace(e,i):t},popup:function(e){var o="",n=t.fn.popup.settings.templates.escape;return void 0!==typeof e&&(void 0!==typeof e.title&&e.title&&(e.title=n(e.title),o+='<div class="header">'+e.title+"</div>"),void 0!==typeof e.content&&e.content&&(e.content=n(e.content),o+='<div class="content">'+e.content+"</div>")),o}}}}(jQuery,window,document); |
/*! | ||
* # Semantic UI 2.2.7 - Progress | ||
* # Semantic UI 2.2.10 - Progress | ||
* http://github.com/semantic-org/semantic-ui/ | ||
@@ -4,0 +4,0 @@ * |
/*! | ||
* # Semantic UI 2.2.7 - Progress | ||
* # Semantic UI 2.2.10 - Progress | ||
* http://github.com/semantic-org/semantic-ui/ | ||
@@ -4,0 +4,0 @@ * |
/*! | ||
* # Semantic UI 2.2.7 - Rating | ||
* # Semantic UI 2.2.10 - Rating | ||
* http://github.com/semantic-org/semantic-ui/ | ||
@@ -4,0 +4,0 @@ * |
/*! | ||
* # Semantic UI 2.2.7 - Rating | ||
* # Semantic UI 2.2.10 - Rating | ||
* http://github.com/semantic-org/semantic-ui/ | ||
@@ -4,0 +4,0 @@ * |
/*! | ||
* # Semantic UI 2.2.7 - Search | ||
* # Semantic UI 2.2.10 - Search | ||
* http://github.com/semantic-org/semantic-ui/ | ||
@@ -4,0 +4,0 @@ * |
/*! | ||
* # Semantic UI 2.2.7 - Search | ||
* # Semantic UI 2.2.10 - Search | ||
* http://github.com/semantic-org/semantic-ui/ | ||
@@ -10,2 +10,2 @@ * | ||
*/ | ||
!function(e,t,s,n){"use strict";t=void 0!==t&&t.Math==Math?t:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),e.fn.search=function(n){var i,r=e(this),a=r.selector||"",o=(new Date).getTime(),c=[],u=arguments[0],l="string"==typeof u,d=[].slice.call(arguments,1);return e(this).each(function(){var v,f=e.isPlainObject(n)?e.extend(!0,{},e.fn.search.settings,n):e.extend({},e.fn.search.settings),g=f.className,h=f.metadata,p=f.regExp,m=f.fields,b=f.selector,y=f.error,R=f.namespace,C="."+R,w=R+"-module",x=e(this),j=x.find(b.prompt),k=x.find(b.searchButton),A=x.find(b.results),E=x.find(b.result),q=x.find(b.category),F=this,S=x.data(w),T=!1;v={initialize:function(){v.verbose("Initializing module"),v.determine.searchFields(),v.bind.events(),v.set.type(),v.create.results(),v.instantiate()},instantiate:function(){v.verbose("Storing instance of module",v),S=v,x.data(w,v)},destroy:function(){v.verbose("Destroying instance"),x.off(C).removeData(w)},refresh:function(){v.debug("Refreshing selector cache"),j=x.find(b.prompt),k=x.find(b.searchButton),q=x.find(b.category),A=x.find(b.results),E=x.find(b.result)},refreshResults:function(){A=x.find(b.results),E=x.find(b.result)},bind:{events:function(){v.verbose("Binding events to search"),f.automatic&&(x.on(v.get.inputEvent()+C,b.prompt,v.event.input),j.attr("autocomplete","off")),x.on("focus"+C,b.prompt,v.event.focus).on("blur"+C,b.prompt,v.event.blur).on("keydown"+C,b.prompt,v.handleKeyboard).on("click"+C,b.searchButton,v.query).on("mousedown"+C,b.results,v.event.result.mousedown).on("mouseup"+C,b.results,v.event.result.mouseup).on("click"+C,b.result,v.event.result.click)}},determine:{searchFields:function(){n&&void 0!==n.searchFields&&(f.searchFields=n.searchFields)}},event:{input:function(){clearTimeout(v.timer),v.timer=setTimeout(v.query,f.searchDelay)},focus:function(){v.set.focus(),v.has.minimumCharacters()&&(v.query(),v.can.show()&&v.showResults())},blur:function(e){var t=s.activeElement===this,n=function(){v.cancel.query(),v.remove.focus(),v.timer=setTimeout(v.hideResults,f.hideDelay)};t||(v.resultsClicked?(v.debug("Determining if user action caused search to close"),x.one("click.close"+C,b.results,function(e){if(v.is.inMessage(e)||T)return void j.focus();T=!1,v.is.animating()||v.is.hidden()||n()})):(v.debug("Input blurred without user action, closing results"),n()))},result:{mousedown:function(){v.resultsClicked=!0},mouseup:function(){v.resultsClicked=!1},click:function(s){v.debug("Search result selected");var n=e(this),i=n.find(b.title).eq(0),r=n.is("a[href]")?n:n.find("a[href]").eq(0),a=r.attr("href")||!1,o=r.attr("target")||!1,c=(i.html(),i.length>0&&i.text()),u=v.get.results(),l=n.data(h.result)||v.get.result(c,u);if(e.isFunction(f.onSelect)&&!1===f.onSelect.call(F,l,u))return v.debug("Custom onSelect callback cancelled default select action"),void(T=!0);v.hideResults(),c&&v.set.value(c),a&&(v.verbose("Opening search link found in result",r),"_blank"==o||s.ctrlKey?t.open(a):t.location.href=a)}}},handleKeyboard:function(e){var t,s=x.find(b.result),n=x.find(b.category),i=s.filter("."+g.active),r=s.index(i),a=s.length,o=i.length>0,c=e.which,u={backspace:8,enter:13,escape:27,upArrow:38,downArrow:40};if(c==u.escape&&(v.verbose("Escape key pressed, blurring search field"),v.trigger.blur()),v.is.visible())if(c==u.enter){if(v.verbose("Enter key pressed, selecting active result"),s.filter("."+g.active).length>0)return v.event.result.click.call(s.filter("."+g.active),e),e.preventDefault(),!1}else c==u.upArrow&&o?(v.verbose("Up key pressed, changing active result"),t=r-1<0?r:r-1,n.removeClass(g.active),s.removeClass(g.active).eq(t).addClass(g.active).closest(n).addClass(g.active),e.preventDefault()):c==u.downArrow&&(v.verbose("Down key pressed, changing active result"),t=r+1>=a?r:r+1,n.removeClass(g.active),s.removeClass(g.active).eq(t).addClass(g.active).closest(n).addClass(g.active),e.preventDefault());else c==u.enter&&(v.verbose("Enter key pressed, executing query"),v.query(),v.set.buttonPressed(),j.one("keyup",v.remove.buttonFocus))},setup:{api:function(t){var s={debug:f.debug,on:!1,cache:!0,action:"search",urlData:{query:t},onSuccess:function(e){v.parse.response.call(F,e,t)},onAbort:function(e){},onFailure:function(){v.displayMessage(y.serverError)},onError:v.error};e.extend(!0,s,f.apiSettings),v.verbose("Setting up API request",s),x.api(s)}},can:{useAPI:function(){return void 0!==e.fn.api},show:function(){return v.is.focused()&&!v.is.visible()&&!v.is.empty()},transition:function(){return f.transition&&void 0!==e.fn.transition&&x.transition("is supported")}},is:{animating:function(){return A.hasClass(g.animating)},hidden:function(){return A.hasClass(g.hidden)},inMessage:function(t){if(t.target){var n=e(t.target);return e.contains(s.documentElement,t.target)&&n.closest(b.message).length>0}},empty:function(){return""===A.html()},visible:function(){return A.filter(":visible").length>0},focused:function(){return j.filter(":focus").length>0}},trigger:{blur:function(){var e=s.createEvent("HTMLEvents"),t=j[0];t&&(v.verbose("Triggering native blur event"),e.initEvent("blur",!1,!1),t.dispatchEvent(e))}},get:{inputEvent:function(){var e=j[0];return void 0!==e&&void 0!==e.oninput?"input":void 0!==e&&void 0!==e.onpropertychange?"propertychange":"keyup"},value:function(){return j.val()},results:function(){return x.data(h.results)},result:function(t,s){var n=["title","id"],i=!1;return t=void 0!==t?t:v.get.value(),s=void 0!==s?s:v.get.results(),"category"===f.type?(v.debug("Finding result that matches",t),e.each(s,function(s,r){if(e.isArray(r.results)&&(i=v.search.object(t,r.results,n)[0]))return!1})):(v.debug("Finding result in results object",t),i=v.search.object(t,s,n)[0]),i||!1}},select:{firstResult:function(){v.verbose("Selecting first result"),E.first().addClass(g.active)}},set:{focus:function(){x.addClass(g.focus)},loading:function(){x.addClass(g.loading)},value:function(e){v.verbose("Setting search input value",e),j.val(e)},type:function(e){e=e||f.type,"category"==f.type&&x.addClass(f.type)},buttonPressed:function(){k.addClass(g.pressed)}},remove:{loading:function(){x.removeClass(g.loading)},focus:function(){x.removeClass(g.focus)},buttonPressed:function(){k.removeClass(g.pressed)}},query:function(){var t=v.get.value(),s=v.read.cache(t);v.has.minimumCharacters()?(s?(v.debug("Reading result from cache",t),v.save.results(s.results),v.addResults(s.html),v.inject.id(s.results)):(v.debug("Querying for",t),e.isPlainObject(f.source)||e.isArray(f.source)?v.search.local(t):v.can.useAPI()?v.search.remote(t):v.error(y.source)),f.onSearchQuery.call(F,t)):v.hideResults()},search:{local:function(e){var t,s=v.search.object(e,f.content);v.set.loading(),v.save.results(s),v.debug("Returned local search results",s),t=v.generateResults({results:s}),v.remove.loading(),v.addResults(t),v.inject.id(s),v.write.cache(e,{html:t,results:s})},remote:function(e){x.api("is loading")&&x.api("abort"),v.setup.api(e),x.api("query")},object:function(t,s,n){var i=[],r=[],a=t.toString().replace(p.escape,"\\$&"),o=new RegExp(p.beginsWith+a,"i"),c=function(t,s){var n=-1==e.inArray(s,i),a=-1==e.inArray(s,r);n&&a&&t.push(s)};return s=s||f.source,n=void 0!==n?n:f.searchFields,e.isArray(n)||(n=[n]),void 0===s||!1===s?(v.error(y.source),[]):(e.each(n,function(n,a){e.each(s,function(e,s){"string"==typeof s[a]&&(-1!==s[a].search(o)?c(i,s):f.searchFullText&&v.fuzzySearch(t,s[a])&&c(r,s))})}),e.merge(i,r))}},fuzzySearch:function(e,t){var s=t.length,n=e.length;if("string"!=typeof e)return!1;if(e=e.toLowerCase(),t=t.toLowerCase(),n>s)return!1;if(n===s)return e===t;e:for(var i=0,r=0;i<n;i++){for(var a=e.charCodeAt(i);r<s;)if(t.charCodeAt(r++)===a)continue e;return!1}return!0},parse:{response:function(e,t){var s=v.generateResults(e);v.verbose("Parsing server response",e),void 0!==e&&void 0!==t&&void 0!==e[m.results]&&(v.addResults(s),v.inject.id(e[m.results]),v.write.cache(t,{html:s,results:e[m.results]}),v.save.results(e[m.results]))}},cancel:{query:function(){v.can.useAPI()&&x.api("abort")}},has:{minimumCharacters:function(){return v.get.value().length>=f.minCharacters}},clear:{cache:function(e){var t=x.data(h.cache);e?e&&t&&t[e]&&(v.debug("Removing value from cache",e),delete t[e],x.data(h.cache,t)):(v.debug("Clearing cache",e),x.removeData(h.cache))}},read:{cache:function(e){var t=x.data(h.cache);return!!f.cache&&(v.verbose("Checking cache for generated html for query",e),"object"==typeof t&&void 0!==t[e]&&t[e])}},create:{id:function(e,t){var s,n,i=e+1;return void 0!==t?(s=String.fromCharCode(97+t),n=s+i,v.verbose("Creating category result id",n)):(n=i,v.verbose("Creating result id",n)),n},results:function(){0===A.length&&(A=e("<div />").addClass(g.results).appendTo(x))}},inject:{result:function(e,t,s){v.verbose("Injecting result into results");var n=void 0!==s?A.children().eq(s).children(b.result).eq(t):A.children(b.result).eq(t);v.verbose("Injecting results metadata",n),n.data(h.result,e)},id:function(t){v.debug("Injecting unique ids into results");var s=0,n=0;return"category"===f.type?e.each(t,function(t,i){n=0,e.each(i.results,function(e,t){var r=i.results[e];void 0===r.id&&(r.id=v.create.id(n,s)),v.inject.result(r,n,s),n++}),s++}):e.each(t,function(e,s){var i=t[e];void 0===i.id&&(i.id=v.create.id(n)),v.inject.result(i,n),n++}),t}},save:{results:function(e){v.verbose("Saving current search results to metadata",e),x.data(h.results,e)}},write:{cache:function(e,t){var s=void 0!==x.data(h.cache)?x.data(h.cache):{};f.cache&&(v.verbose("Writing generated html to cache",e,t),s[e]=t,x.data(h.cache,s))}},addResults:function(t){if(e.isFunction(f.onResultsAdd)&&!1===f.onResultsAdd.call(A,t))return v.debug("onResultsAdd callback cancelled default action"),!1;t?(A.html(t),v.refreshResults(),f.selectFirstResult&&v.select.firstResult(),v.showResults()):v.hideResults()},showResults:function(){v.is.visible()||(v.can.transition()?(v.debug("Showing results with css animations"),A.transition({animation:f.transition+" in",debug:f.debug,verbose:f.verbose,duration:f.duration,queue:!0})):(v.debug("Showing results with javascript"),A.stop().fadeIn(f.duration,f.easing)),f.onResultsOpen.call(A))},hideResults:function(){v.is.visible()&&(v.can.transition()?(v.debug("Hiding results with css animations"),A.transition({animation:f.transition+" out",debug:f.debug,verbose:f.verbose,duration:f.duration,queue:!0})):(v.debug("Hiding results with javascript"),A.stop().fadeOut(f.duration,f.easing)),f.onResultsClose.call(A))},generateResults:function(t){v.debug("Generating html from response",t);var s=f.templates[f.type],n=e.isPlainObject(t[m.results])&&!e.isEmptyObject(t[m.results]),i=e.isArray(t[m.results])&&t[m.results].length>0,r="";return n||i?(f.maxResults>0&&(n?"standard"==f.type&&v.error(y.maxResults):t[m.results]=t[m.results].slice(0,f.maxResults)),e.isFunction(s)?r=s(t,m):v.error(y.noTemplate,!1)):f.showNoResults&&(r=v.displayMessage(y.noResults,"empty")),f.onResults.call(F,t),r},displayMessage:function(e,t){return t=t||"standard",v.debug("Displaying message",e,t),v.addResults(f.templates.message(e,t)),f.templates.message(e,t)},setting:function(t,s){if(e.isPlainObject(t))e.extend(!0,f,t);else{if(void 0===s)return f[t];f[t]=s}},internal:function(t,s){if(e.isPlainObject(t))e.extend(!0,v,t);else{if(void 0===s)return v[t];v[t]=s}},debug:function(){!f.silent&&f.debug&&(f.performance?v.performance.log(arguments):(v.debug=Function.prototype.bind.call(console.info,console,f.name+":"),v.debug.apply(console,arguments)))},verbose:function(){!f.silent&&f.verbose&&f.debug&&(f.performance?v.performance.log(arguments):(v.verbose=Function.prototype.bind.call(console.info,console,f.name+":"),v.verbose.apply(console,arguments)))},error:function(){f.silent||(v.error=Function.prototype.bind.call(console.error,console,f.name+":"),v.error.apply(console,arguments))},performance:{log:function(e){var t,s,n;f.performance&&(t=(new Date).getTime(),n=o||t,s=t-n,o=t,c.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:F,"Execution Time":s})),clearTimeout(v.performance.timer),v.performance.timer=setTimeout(v.performance.display,500)},display:function(){var t=f.name+":",s=0;o=!1,clearTimeout(v.performance.timer),e.each(c,function(e,t){s+=t["Execution Time"]}),t+=" "+s+"ms",a&&(t+=" '"+a+"'"),r.length>1&&(t+=" ("+r.length+")"),(void 0!==console.group||void 0!==console.table)&&c.length>0&&(console.groupCollapsed(t),console.table?console.table(c):e.each(c,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),c=[]}},invoke:function(t,s,n){var r,a,o,c=S;return s=s||d,n=F||n,"string"==typeof t&&void 0!==c&&(t=t.split(/[\. ]/),r=t.length-1,e.each(t,function(s,n){var i=s!=r?n+t[s+1].charAt(0).toUpperCase()+t[s+1].slice(1):t;if(e.isPlainObject(c[i])&&s!=r)c=c[i];else{if(void 0!==c[i])return a=c[i],!1;if(!e.isPlainObject(c[n])||s==r)return void 0!==c[n]&&(a=c[n],!1);c=c[n]}})),e.isFunction(a)?o=a.apply(n,s):void 0!==a&&(o=a),e.isArray(i)?i.push(o):void 0!==i?i=[i,o]:void 0!==o&&(i=o),a}},l?(void 0===S&&v.initialize(),v.invoke(u)):(void 0!==S&&S.invoke("destroy"),v.initialize())}),void 0!==i?i:this},e.fn.search.settings={name:"Search",namespace:"search",silent:!1,debug:!1,verbose:!1,performance:!0,type:"standard",minCharacters:1,selectFirstResult:!1,apiSettings:!1,source:!1,searchFields:["title","description"],displayField:"",searchFullText:!0,automatic:!0,hideDelay:0,searchDelay:200,maxResults:7,cache:!0,showNoResults:!0,transition:"scale",duration:200,easing:"easeOutExpo",onSelect:!1,onResultsAdd:!1,onSearchQuery:function(e){},onResults:function(e){},onResultsOpen:function(){},onResultsClose:function(){},className:{animating:"animating",active:"active",empty:"empty",focus:"focus",hidden:"hidden",loading:"loading",results:"results",pressed:"down"},error:{source:"Cannot search. No source used, and Semantic API module was not included",noResults:"Your search returned no results",logging:"Error in debug logging, exiting.",noEndpoint:"No search endpoint was specified",noTemplate:"A valid template name was not specified.",serverError:"There was an issue querying the server.",maxResults:"Results must be an array to use maxResults setting",method:"The method you called is not defined."},metadata:{cache:"cache",results:"results",result:"result"},regExp:{escape:/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,beginsWith:"(?:s|^)"},fields:{categories:"results",categoryName:"name",categoryResults:"results",description:"description",image:"image",price:"price",results:"results",title:"title",url:"url",action:"action",actionText:"text",actionURL:"url"},selector:{prompt:".prompt",searchButton:".search.button",results:".results",message:".results > .message",category:".category",result:".result",title:".title, .name"},templates:{escape:function(e){var t=/[&<>"'`]/,s={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},n=function(e){return s[e]};return t.test(e)?e.replace(/[&<>"'`]/g,n):e},message:function(e,t){var s="";return void 0!==e&&void 0!==t&&(s+='<div class="message '+t+'">',s+="empty"==t?'<div class="header">No Results</div class="header"><div class="description">'+e+'</div class="description">':' <div class="description">'+e+"</div>",s+="</div>"),s},category:function(t,s){var n="";e.fn.search.settings.templates.escape;return void 0!==t[s.categoryResults]&&(e.each(t[s.categoryResults],function(t,i){void 0!==i[s.results]&&i.results.length>0&&(n+='<div class="category">',void 0!==i[s.categoryName]&&(n+='<div class="name">'+i[s.categoryName]+"</div>"),e.each(i.results,function(e,t){t[s.url]?n+='<a class="result" href="'+t[s.url]+'">':n+='<a class="result">',void 0!==t[s.image]&&(n+='<div class="image"> <img src="'+t[s.image]+'"></div>'),n+='<div class="content">',void 0!==t[s.price]&&(n+='<div class="price">'+t[s.price]+"</div>"),void 0!==t[s.title]&&(n+='<div class="title">'+t[s.title]+"</div>"),void 0!==t[s.description]&&(n+='<div class="description">'+t[s.description]+"</div>"),n+="</div>",n+="</a>"}),n+="</div>")}),t[s.action]&&(n+='<a href="'+t[s.action][s.actionURL]+'" class="action">'+t[s.action][s.actionText]+"</a>"),n)},standard:function(t,s){var n="";return void 0!==t[s.results]&&(e.each(t[s.results],function(e,t){t[s.url]?n+='<a class="result" href="'+t[s.url]+'">':n+='<a class="result">',void 0!==t[s.image]&&(n+='<div class="image"> <img src="'+t[s.image]+'"></div>'),n+='<div class="content">',void 0!==t[s.price]&&(n+='<div class="price">'+t[s.price]+"</div>"),void 0!==t[s.title]&&(n+='<div class="title">'+t[s.title]+"</div>"),void 0!==t[s.description]&&(n+='<div class="description">'+t[s.description]+"</div>"),n+="</div>",n+="</a>"}),t[s.action]&&(n+='<a href="'+t[s.action][s.actionURL]+'" class="action">'+t[s.action][s.actionText]+"</a>"),n)}}}}(jQuery,window,document); | ||
!function(e,t,s,n){"use strict";t=void 0!==t&&t.Math==Math?t:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),e.fn.search=function(n){var i,r=e(this),a=r.selector||"",o=(new Date).getTime(),c=[],u=arguments[0],l="string"==typeof u,d=[].slice.call(arguments,1);return e(this).each(function(){var v,f=e.isPlainObject(n)?e.extend(!0,{},e.fn.search.settings,n):e.extend({},e.fn.search.settings),g=f.className,h=f.metadata,p=f.regExp,m=f.fields,b=f.selector,y=f.error,R=f.namespace,C="."+R,w=R+"-module",x=e(this),j=x.find(b.prompt),k=x.find(b.searchButton),A=x.find(b.results),E=x.find(b.result),q=x.find(b.category),F=this,S=x.data(w),T=!1;v={initialize:function(){v.verbose("Initializing module"),v.determine.searchFields(),v.bind.events(),v.set.type(),v.create.results(),v.instantiate()},instantiate:function(){v.verbose("Storing instance of module",v),S=v,x.data(w,v)},destroy:function(){v.verbose("Destroying instance"),x.off(C).removeData(w)},refresh:function(){v.debug("Refreshing selector cache"),j=x.find(b.prompt),k=x.find(b.searchButton),q=x.find(b.category),A=x.find(b.results),E=x.find(b.result)},refreshResults:function(){A=x.find(b.results),E=x.find(b.result)},bind:{events:function(){v.verbose("Binding events to search"),f.automatic&&(x.on(v.get.inputEvent()+C,b.prompt,v.event.input),j.attr("autocomplete","off")),x.on("focus"+C,b.prompt,v.event.focus).on("blur"+C,b.prompt,v.event.blur).on("keydown"+C,b.prompt,v.handleKeyboard).on("click"+C,b.searchButton,v.query).on("mousedown"+C,b.results,v.event.result.mousedown).on("mouseup"+C,b.results,v.event.result.mouseup).on("click"+C,b.result,v.event.result.click)}},determine:{searchFields:function(){n&&void 0!==n.searchFields&&(f.searchFields=n.searchFields)}},event:{input:function(){clearTimeout(v.timer),v.timer=setTimeout(v.query,f.searchDelay)},focus:function(){v.set.focus(),v.has.minimumCharacters()&&(v.query(),v.can.show()&&v.showResults())},blur:function(e){var t=s.activeElement===this,n=function(){v.cancel.query(),v.remove.focus(),v.timer=setTimeout(v.hideResults,f.hideDelay)};t||(v.resultsClicked?(v.debug("Determining if user action caused search to close"),x.one("click.close"+C,b.results,function(e){if(v.is.inMessage(e)||T)return void j.focus();T=!1,v.is.animating()||v.is.hidden()||n()})):(v.debug("Input blurred without user action, closing results"),n()))},result:{mousedown:function(){v.resultsClicked=!0},mouseup:function(){v.resultsClicked=!1},click:function(s){v.debug("Search result selected");var n=e(this),i=n.find(b.title).eq(0),r=n.is("a[href]")?n:n.find("a[href]").eq(0),a=r.attr("href")||!1,o=r.attr("target")||!1,c=(i.html(),i.length>0&&i.text()),u=v.get.results(),l=n.data(h.result)||v.get.result(c,u);if(e.isFunction(f.onSelect)&&!1===f.onSelect.call(F,l,u))return v.debug("Custom onSelect callback cancelled default select action"),void(T=!0);v.hideResults(),c&&v.set.value(c),a&&(v.verbose("Opening search link found in result",r),"_blank"==o||s.ctrlKey?t.open(a):t.location.href=a)}}},handleKeyboard:function(e){var t,s=x.find(b.result),n=x.find(b.category),i=s.filter("."+g.active),r=s.index(i),a=s.length,o=i.length>0,c=e.which,u={backspace:8,enter:13,escape:27,upArrow:38,downArrow:40};if(c==u.escape&&(v.verbose("Escape key pressed, blurring search field"),v.trigger.blur()),v.is.visible())if(c==u.enter){if(v.verbose("Enter key pressed, selecting active result"),s.filter("."+g.active).length>0)return v.event.result.click.call(s.filter("."+g.active),e),e.preventDefault(),!1}else c==u.upArrow&&o?(v.verbose("Up key pressed, changing active result"),t=r-1<0?r:r-1,n.removeClass(g.active),s.removeClass(g.active).eq(t).addClass(g.active).closest(n).addClass(g.active),e.preventDefault()):c==u.downArrow&&(v.verbose("Down key pressed, changing active result"),t=r+1>=a?r:r+1,n.removeClass(g.active),s.removeClass(g.active).eq(t).addClass(g.active).closest(n).addClass(g.active),e.preventDefault());else c==u.enter&&(v.verbose("Enter key pressed, executing query"),v.query(),v.set.buttonPressed(),j.one("keyup",v.remove.buttonFocus))},setup:{api:function(t){var s={debug:f.debug,on:!1,cache:!0,action:"search",urlData:{query:t},onSuccess:function(e){v.parse.response.call(F,e,t)},onAbort:function(e){},onFailure:function(){v.displayMessage(y.serverError)},onError:v.error};e.extend(!0,s,f.apiSettings),v.verbose("Setting up API request",s),x.api(s)}},can:{useAPI:function(){return void 0!==e.fn.api},show:function(){return v.is.focused()&&!v.is.visible()&&!v.is.empty()},transition:function(){return f.transition&&void 0!==e.fn.transition&&x.transition("is supported")}},is:{animating:function(){return A.hasClass(g.animating)},hidden:function(){return A.hasClass(g.hidden)},inMessage:function(t){if(t.target){var n=e(t.target);return e.contains(s.documentElement,t.target)&&n.closest(b.message).length>0}},empty:function(){return""===A.html()},visible:function(){return A.filter(":visible").length>0},focused:function(){return j.filter(":focus").length>0}},trigger:{blur:function(){var e=s.createEvent("HTMLEvents"),t=j[0];t&&(v.verbose("Triggering native blur event"),e.initEvent("blur",!1,!1),t.dispatchEvent(e))}},get:{inputEvent:function(){var e=j[0];return void 0!==e&&void 0!==e.oninput?"input":void 0!==e&&void 0!==e.onpropertychange?"propertychange":"keyup"},value:function(){return j.val()},results:function(){return x.data(h.results)},result:function(t,s){var n=["title","id"],i=!1;return t=void 0!==t?t:v.get.value(),s=void 0!==s?s:v.get.results(),"category"===f.type?(v.debug("Finding result that matches",t),e.each(s,function(s,r){if(e.isArray(r.results)&&(i=v.search.object(t,r.results,n)[0]))return!1})):(v.debug("Finding result in results object",t),i=v.search.object(t,s,n)[0]),i||!1}},select:{firstResult:function(){v.verbose("Selecting first result"),E.first().addClass(g.active)}},set:{focus:function(){x.addClass(g.focus)},loading:function(){x.addClass(g.loading)},value:function(e){v.verbose("Setting search input value",e),j.val(e)},type:function(e){e=e||f.type,"category"==f.type&&x.addClass(f.type)},buttonPressed:function(){k.addClass(g.pressed)}},remove:{loading:function(){x.removeClass(g.loading)},focus:function(){x.removeClass(g.focus)},buttonPressed:function(){k.removeClass(g.pressed)}},query:function(){var t=v.get.value(),s=v.read.cache(t);v.has.minimumCharacters()?(s?(v.debug("Reading result from cache",t),v.save.results(s.results),v.addResults(s.html),v.inject.id(s.results)):(v.debug("Querying for",t),e.isPlainObject(f.source)||e.isArray(f.source)?v.search.local(t):v.can.useAPI()?v.search.remote(t):v.error(y.source)),f.onSearchQuery.call(F,t)):v.hideResults()},search:{local:function(e){var t,s=v.search.object(e,f.content);v.set.loading(),v.save.results(s),v.debug("Returned local search results",s),t=v.generateResults({results:s}),v.remove.loading(),v.addResults(t),v.inject.id(s),v.write.cache(e,{html:t,results:s})},remote:function(e){x.api("is loading")&&x.api("abort"),v.setup.api(e),x.api("query")},object:function(t,s,n){var i=[],r=[],a=t.toString().replace(p.escape,"\\$&"),o=new RegExp(p.beginsWith+a,"i"),c=function(t,s){var n=-1==e.inArray(s,i),a=-1==e.inArray(s,r);n&&a&&t.push(s)};return s=s||f.source,n=void 0!==n?n:f.searchFields,e.isArray(n)||(n=[n]),void 0===s||!1===s?(v.error(y.source),[]):(e.each(n,function(n,a){e.each(s,function(e,s){"string"==typeof s[a]&&(-1!==s[a].search(o)?c(i,s):f.searchFullText&&v.fuzzySearch(t,s[a])&&c(r,s))})}),e.merge(i,r))}},fuzzySearch:function(e,t){var s=t.length,n=e.length;if("string"!=typeof e)return!1;if(e=e.toLowerCase(),t=t.toLowerCase(),n>s)return!1;if(n===s)return e===t;e:for(var i=0,r=0;i<n;i++){for(var a=e.charCodeAt(i);r<s;)if(t.charCodeAt(r++)===a)continue e;return!1}return!0},parse:{response:function(e,t){var s=v.generateResults(e);v.verbose("Parsing server response",e),void 0!==e&&void 0!==t&&void 0!==e[m.results]&&(v.addResults(s),v.inject.id(e[m.results]),v.write.cache(t,{html:s,results:e[m.results]}),v.save.results(e[m.results]))}},cancel:{query:function(){v.can.useAPI()&&x.api("abort")}},has:{minimumCharacters:function(){return v.get.value().length>=f.minCharacters}},clear:{cache:function(e){var t=x.data(h.cache);e?e&&t&&t[e]&&(v.debug("Removing value from cache",e),delete t[e],x.data(h.cache,t)):(v.debug("Clearing cache",e),x.removeData(h.cache))}},read:{cache:function(e){var t=x.data(h.cache);return!!f.cache&&(v.verbose("Checking cache for generated html for query",e),"object"==typeof t&&void 0!==t[e]&&t[e])}},create:{id:function(e,t){var s,n,i=e+1;return void 0!==t?(s=String.fromCharCode(97+t),n=s+i,v.verbose("Creating category result id",n)):(n=i,v.verbose("Creating result id",n)),n},results:function(){0===A.length&&(A=e("<div />").addClass(g.results).appendTo(x))}},inject:{result:function(e,t,s){v.verbose("Injecting result into results");var n=void 0!==s?A.children().eq(s).children(b.result).eq(t):A.children(b.result).eq(t);v.verbose("Injecting results metadata",n),n.data(h.result,e)},id:function(t){v.debug("Injecting unique ids into results");var s=0,n=0;return"category"===f.type?e.each(t,function(t,i){n=0,e.each(i.results,function(e,t){var r=i.results[e];void 0===r.id&&(r.id=v.create.id(n,s)),v.inject.result(r,n,s),n++}),s++}):e.each(t,function(e,s){var i=t[e];void 0===i.id&&(i.id=v.create.id(n)),v.inject.result(i,n),n++}),t}},save:{results:function(e){v.verbose("Saving current search results to metadata",e),x.data(h.results,e)}},write:{cache:function(e,t){var s=void 0!==x.data(h.cache)?x.data(h.cache):{};f.cache&&(v.verbose("Writing generated html to cache",e,t),s[e]=t,x.data(h.cache,s))}},addResults:function(t){if(e.isFunction(f.onResultsAdd)&&!1===f.onResultsAdd.call(A,t))return v.debug("onResultsAdd callback cancelled default action"),!1;t?(A.html(t),v.refreshResults(),f.selectFirstResult&&v.select.firstResult(),v.showResults()):v.hideResults()},showResults:function(){v.is.visible()||(v.can.transition()?(v.debug("Showing results with css animations"),A.transition({animation:f.transition+" in",debug:f.debug,verbose:f.verbose,duration:f.duration,queue:!0})):(v.debug("Showing results with javascript"),A.stop().fadeIn(f.duration,f.easing)),f.onResultsOpen.call(A))},hideResults:function(){v.is.visible()&&(v.can.transition()?(v.debug("Hiding results with css animations"),A.transition({animation:f.transition+" out",debug:f.debug,verbose:f.verbose,duration:f.duration,queue:!0})):(v.debug("Hiding results with javascript"),A.stop().fadeOut(f.duration,f.easing)),f.onResultsClose.call(A))},generateResults:function(t){v.debug("Generating html from response",t);var s=f.templates[f.type],n=e.isPlainObject(t[m.results])&&!e.isEmptyObject(t[m.results]),i=e.isArray(t[m.results])&&t[m.results].length>0,r="";return n||i?(f.maxResults>0&&(n?"standard"==f.type&&v.error(y.maxResults):t[m.results]=t[m.results].slice(0,f.maxResults)),e.isFunction(s)?r=s(t,m):v.error(y.noTemplate,!1)):f.showNoResults&&(r=v.displayMessage(y.noResults,"empty")),f.onResults.call(F,t),r},displayMessage:function(e,t){return t=t||"standard",v.debug("Displaying message",e,t),v.addResults(f.templates.message(e,t)),f.templates.message(e,t)},setting:function(t,s){if(e.isPlainObject(t))e.extend(!0,f,t);else{if(void 0===s)return f[t];f[t]=s}},internal:function(t,s){if(e.isPlainObject(t))e.extend(!0,v,t);else{if(void 0===s)return v[t];v[t]=s}},debug:function(){!f.silent&&f.debug&&(f.performance?v.performance.log(arguments):(v.debug=Function.prototype.bind.call(console.info,console,f.name+":"),v.debug.apply(console,arguments)))},verbose:function(){!f.silent&&f.verbose&&f.debug&&(f.performance?v.performance.log(arguments):(v.verbose=Function.prototype.bind.call(console.info,console,f.name+":"),v.verbose.apply(console,arguments)))},error:function(){f.silent||(v.error=Function.prototype.bind.call(console.error,console,f.name+":"),v.error.apply(console,arguments))},performance:{log:function(e){var t,s,n;f.performance&&(t=(new Date).getTime(),n=o||t,s=t-n,o=t,c.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:F,"Execution Time":s})),clearTimeout(v.performance.timer),v.performance.timer=setTimeout(v.performance.display,500)},display:function(){var t=f.name+":",s=0;o=!1,clearTimeout(v.performance.timer),e.each(c,function(e,t){s+=t["Execution Time"]}),t+=" "+s+"ms",a&&(t+=" '"+a+"'"),r.length>1&&(t+=" ("+r.length+")"),(void 0!==console.group||void 0!==console.table)&&c.length>0&&(console.groupCollapsed(t),console.table?console.table(c):e.each(c,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),c=[]}},invoke:function(t,s,n){var r,a,o,c=S;return s=s||d,n=F||n,"string"==typeof t&&void 0!==c&&(t=t.split(/[\. ]/),r=t.length-1,e.each(t,function(s,n){var i=s!=r?n+t[s+1].charAt(0).toUpperCase()+t[s+1].slice(1):t;if(e.isPlainObject(c[i])&&s!=r)c=c[i];else{if(void 0!==c[i])return a=c[i],!1;if(!e.isPlainObject(c[n])||s==r)return void 0!==c[n]&&(a=c[n],!1);c=c[n]}})),e.isFunction(a)?o=a.apply(n,s):void 0!==a&&(o=a),e.isArray(i)?i.push(o):void 0!==i?i=[i,o]:void 0!==o&&(i=o),a}},l?(void 0===S&&v.initialize(),v.invoke(u)):(void 0!==S&&S.invoke("destroy"),v.initialize())}),void 0!==i?i:this},e.fn.search.settings={name:"Search",namespace:"search",silent:!1,debug:!1,verbose:!1,performance:!0,type:"standard",minCharacters:1,selectFirstResult:!1,apiSettings:!1,source:!1,searchFields:["title","description"],displayField:"",searchFullText:!0,automatic:!0,hideDelay:0,searchDelay:200,maxResults:7,cache:!0,showNoResults:!0,transition:"scale",duration:200,easing:"easeOutExpo",onSelect:!1,onResultsAdd:!1,onSearchQuery:function(e){},onResults:function(e){},onResultsOpen:function(){},onResultsClose:function(){},className:{animating:"animating",active:"active",empty:"empty",focus:"focus",hidden:"hidden",loading:"loading",results:"results",pressed:"down"},error:{source:"Cannot search. No source used, and Semantic API module was not included",noResults:"Your search returned no results",logging:"Error in debug logging, exiting.",noEndpoint:"No search endpoint was specified",noTemplate:"A valid template name was not specified.",serverError:"There was an issue querying the server.",maxResults:"Results must be an array to use maxResults setting",method:"The method you called is not defined."},metadata:{cache:"cache",results:"results",result:"result"},regExp:{escape:/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,beginsWith:"(?:s|^)"},fields:{categories:"results",categoryName:"name",categoryResults:"results",description:"description",image:"image",price:"price",results:"results",title:"title",url:"url",action:"action",actionText:"text",actionURL:"url"},selector:{prompt:".prompt",searchButton:".search.button",results:".results",message:".results > .message",category:".category",result:".result",title:".title, .name"},templates:{escape:function(e){var t=/[&<>"'`]/g,s=/[&<>"'`]/,n={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},i=function(e){return n[e]};return s.test(e)?e.replace(t,i):e},message:function(e,t){var s="";return void 0!==e&&void 0!==t&&(s+='<div class="message '+t+'">',s+="empty"==t?'<div class="header">No Results</div class="header"><div class="description">'+e+'</div class="description">':' <div class="description">'+e+"</div>",s+="</div>"),s},category:function(t,s){var n="";e.fn.search.settings.templates.escape;return void 0!==t[s.categoryResults]&&(e.each(t[s.categoryResults],function(t,i){void 0!==i[s.results]&&i.results.length>0&&(n+='<div class="category">',void 0!==i[s.categoryName]&&(n+='<div class="name">'+i[s.categoryName]+"</div>"),e.each(i.results,function(e,t){t[s.url]?n+='<a class="result" href="'+t[s.url]+'">':n+='<a class="result">',void 0!==t[s.image]&&(n+='<div class="image"> <img src="'+t[s.image]+'"></div>'),n+='<div class="content">',void 0!==t[s.price]&&(n+='<div class="price">'+t[s.price]+"</div>"),void 0!==t[s.title]&&(n+='<div class="title">'+t[s.title]+"</div>"),void 0!==t[s.description]&&(n+='<div class="description">'+t[s.description]+"</div>"),n+="</div>",n+="</a>"}),n+="</div>")}),t[s.action]&&(n+='<a href="'+t[s.action][s.actionURL]+'" class="action">'+t[s.action][s.actionText]+"</a>"),n)},standard:function(t,s){var n="";return void 0!==t[s.results]&&(e.each(t[s.results],function(e,t){t[s.url]?n+='<a class="result" href="'+t[s.url]+'">':n+='<a class="result">',void 0!==t[s.image]&&(n+='<div class="image"> <img src="'+t[s.image]+'"></div>'),n+='<div class="content">',void 0!==t[s.price]&&(n+='<div class="price">'+t[s.price]+"</div>"),void 0!==t[s.title]&&(n+='<div class="title">'+t[s.title]+"</div>"),void 0!==t[s.description]&&(n+='<div class="description">'+t[s.description]+"</div>"),n+="</div>",n+="</a>"}),t[s.action]&&(n+='<a href="'+t[s.action][s.actionURL]+'" class="action">'+t[s.action][s.actionText]+"</a>"),n)}}}}(jQuery,window,document); |
/*! | ||
* # Semantic UI 2.2.7 - Shape | ||
* # Semantic UI 2.2.10 - Shape | ||
* http://github.com/semantic-org/semantic-ui/ | ||
@@ -4,0 +4,0 @@ * |
/*! | ||
* # Semantic UI 2.2.7 - Shape | ||
* # Semantic UI 2.2.10 - Shape | ||
* http://github.com/semantic-org/semantic-ui/ | ||
@@ -4,0 +4,0 @@ * |
/*! | ||
* # Semantic UI 2.2.7 - Sidebar | ||
* # Semantic UI 2.2.10 - Sidebar | ||
* http://github.com/semantic-org/semantic-ui/ | ||
@@ -4,0 +4,0 @@ * |
/*! | ||
* # Semantic UI 2.2.7 - Sidebar | ||
* # Semantic UI 2.2.10 - Sidebar | ||
* http://github.com/semantic-org/semantic-ui/ | ||
@@ -4,0 +4,0 @@ * |
/*! | ||
* # Semantic UI 2.2.7 - Site | ||
* # Semantic UI 2.2.10 - Site | ||
* http://github.com/semantic-org/semantic-ui/ | ||
@@ -4,0 +4,0 @@ * |
/*! | ||
* # Semantic UI 2.2.7 - Site | ||
* # Semantic UI 2.2.10 - Site | ||
* http://github.com/semantic-org/semantic-ui/ | ||
@@ -4,0 +4,0 @@ * |
/*! | ||
* # Semantic UI 2.2.7 - State | ||
* # Semantic UI 2.2.10 - State | ||
* http://github.com/semantic-org/semantic-ui/ | ||
@@ -4,0 +4,0 @@ * |
/*! | ||
* # Semantic UI 2.2.7 - State | ||
* # Semantic UI 2.2.10 - State | ||
* http://github.com/semantic-org/semantic-ui/ | ||
@@ -4,0 +4,0 @@ * |
/*! | ||
* # Semantic UI 2.2.7 - Sticky | ||
* # Semantic UI 2.2.10 - Sticky | ||
* http://github.com/semantic-org/semantic-ui/ | ||
@@ -4,0 +4,0 @@ * |
/*! | ||
* # Semantic UI 2.2.7 - Sticky | ||
* # Semantic UI 2.2.10 - Sticky | ||
* http://github.com/semantic-org/semantic-ui/ | ||
@@ -4,0 +4,0 @@ * |
/*! | ||
* # Semantic UI 2.2.7 - Tab | ||
* # Semantic UI 2.2.10 - Tab | ||
* http://github.com/semantic-org/semantic-ui/ | ||
@@ -4,0 +4,0 @@ * |
/*! | ||
* # Semantic UI 2.2.7 - Tab | ||
* # Semantic UI 2.2.10 - Tab | ||
* http://github.com/semantic-org/semantic-ui/ | ||
@@ -4,0 +4,0 @@ * |
/*! | ||
* # Semantic UI 2.2.7 - Transition | ||
* # Semantic UI 2.2.10 - Transition | ||
* http://github.com/semantic-org/semantic-ui/ | ||
@@ -4,0 +4,0 @@ * |
/*! | ||
* # Semantic UI 2.2.7 - Transition | ||
* # Semantic UI 2.2.10 - Transition | ||
* http://github.com/semantic-org/semantic-ui/ | ||
@@ -4,0 +4,0 @@ * |
/*! | ||
* # Semantic UI 2.2.7 - Visibility | ||
* # Semantic UI 2.2.10 - Visibility | ||
* http://github.com/semantic-org/semantic-ui/ | ||
@@ -4,0 +4,0 @@ * |
/*! | ||
* # Semantic UI 2.2.7 - Visibility | ||
* # Semantic UI 2.2.10 - Visibility | ||
* http://github.com/semantic-org/semantic-ui/ | ||
@@ -4,0 +4,0 @@ * |
{ | ||
"name": "semantic-ui", | ||
"version": "2.2.7", | ||
"version": "2.2.10", | ||
"title": "Semantic UI", | ||
@@ -58,2 +58,3 @@ "description": "Semantic empowers designers and developers by creating a shared vocabulary for UI.", | ||
"gulp-chmod": "^2.0.0", | ||
"gulp-clean-css": "^2.3.2", | ||
"gulp-clone": "^1.0.0", | ||
@@ -70,3 +71,2 @@ "gulp-concat": "^2.6.1", | ||
"gulp-less": "^3.3.0", | ||
"gulp-clean-css": "^2.3.2", | ||
"gulp-notify": "^2.2.0", | ||
@@ -88,3 +88,4 @@ "gulp-plumber": "^1.1.0", | ||
"run-sequence": "^1.2.2", | ||
"wrench": "https://github.com/derekslife/wrench-js/tarball/156eaceed68ed31ffe2a3ecfbcb2be6ed1417fb2", | ||
"wrench": "^1.5.9", | ||
"wrench-sui": "^0.0.3", | ||
"yamljs": "^0.2.8" | ||
@@ -91,0 +92,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
7289391
180
105509