From c20f567521fdde692ccefadc85608aad73599722 Mon Sep 17 00:00:00 2001 From: Pusher Robot Date: Thu, 6 Oct 2022 13:58:59 -0400 Subject: [PATCH] Updated component to version 2.5.0 --- composer.json | 4 ++-- index.js | 2 +- package.json | 2 +- search.css | 26 +++++++------------------- search.js | 2 +- search.min.css | 4 ++-- search.min.js | 2 +- 7 files changed, 15 insertions(+), 27 deletions(-) diff --git a/composer.json b/composer.json index 1b2e8a9..b5e5838 100755 --- a/composer.json +++ b/composer.json @@ -5,10 +5,10 @@ "authors": [{ "name": "Jack Lukic", "email": "jacklukic@gmail.com", - "web": "http://www.jacklukic.com", + "homepage": "http://www.jacklukic.com", "role": "Creator" }], "keywords": ["semantic", "ui", "css", "framework"], "license": "MIT", - "version": "2.4.1" + "version": "2.5.0" } \ No newline at end of file diff --git a/index.js b/index.js index 863143e..00f5d43 100755 --- a/index.js +++ b/index.js @@ -1,5 +1,5 @@ /*! - * # Semantic UI 2.4.1 - Search + * # Semantic UI 2.5.0 - Search * http://github.com/semantic-org/semantic-ui/ * * diff --git a/package.json b/package.json index ea54c3c..91aab8a 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "semantic-ui-search", - "version": "2.4.1", + "version": "2.5.0", "title": "Semantic UI - Search", "description": "Single component release of search", "homepage": "http://www.semantic-ui.com", diff --git a/search.css b/search.css index bda3276..6ee5ffc 100755 --- a/search.css +++ b/search.css @@ -1,5 +1,5 @@ /*! - * # Semantic UI 2.4.0 - Search + * # Semantic UI 2.5.0 - Search * http://github.com/semantic-org/semantic-ui/ * * @@ -30,12 +30,8 @@ background: #FFFFFF; border: 1px solid rgba(34, 36, 38, 0.15); color: rgba(0, 0, 0, 0.87); - -webkit-box-shadow: 0em 0em 0em 0em transparent inset; - box-shadow: 0em 0em 0em 0em transparent inset; - -webkit-transition: background-color 0.1s ease, color 0.1s ease, border-color 0.1s ease, -webkit-box-shadow 0.1s ease; - transition: background-color 0.1s ease, color 0.1s ease, border-color 0.1s ease, -webkit-box-shadow 0.1s ease; + box-shadow: 0em 0em 0em 0em transparent inset; transition: background-color 0.1s ease, color 0.1s ease, box-shadow 0.1s ease, border-color 0.1s ease; - transition: background-color 0.1s ease, color 0.1s ease, box-shadow 0.1s ease, border-color 0.1s ease, -webkit-box-shadow 0.1s ease; } .ui.search .prompt { border-radius: 500rem; @@ -58,8 +54,7 @@ position: absolute; top: 100%; left: 0%; - -webkit-transform-origin: center top; - transform-origin: center top; + transform-origin: center top; white-space: normal; text-align: left; text-transform: none; @@ -67,8 +62,7 @@ margin-top: 0.5em; width: 18em; border-radius: 0.28571429rem; - -webkit-box-shadow: 0px 2px 4px 0px rgba(34, 36, 38, 0.12), 0px 2px 10px 0px rgba(34, 36, 38, 0.15); - box-shadow: 0px 2px 4px 0px rgba(34, 36, 38, 0.12), 0px 2px 10px 0px rgba(34, 36, 38, 0.15); + box-shadow: 0px 2px 4px 0px rgba(34, 36, 38, 0.12), 0px 2px 10px 0px rgba(34, 36, 38, 0.15); border: 1px solid #D4D4D5; z-index: 998; } @@ -213,8 +207,7 @@ border-color: #767676 transparent transparent; border-style: solid; border-width: 0.2em; - -webkit-box-shadow: 0px 0px 0px 1px transparent; - box-shadow: 0px 0px 0px 1px transparent; + box-shadow: 0px 0px 0px 1px transparent; } /*-------------- @@ -244,8 +237,7 @@ position: relative; border-left-color: rgba(34, 36, 38, 0.1); background: #F3F4F5; - -webkit-box-shadow: none; - box-shadow: none; + box-shadow: none; } .ui.search > .results .result.active .title { color: rgba(0, 0, 0, 0.85); @@ -289,7 +281,6 @@ color: ''; top: 0em; right: 0em; - -webkit-transition: color 0.1s ease, opacity 0.1s ease; transition: color 0.1s ease, opacity 0.1s ease; } .ui.search.selection > .icon.input > .active.remove.icon { @@ -321,9 +312,7 @@ .ui.category.search > .results .category { display: table-row; background: #F3F4F5; - -webkit-box-shadow: none; - box-shadow: none; - -webkit-transition: background 0.1s ease, border-color 0.1s ease; + box-shadow: none; transition: background 0.1s ease, border-color 0.1s ease; } @@ -364,7 +353,6 @@ } .ui.category.search > .results .category .result { border-bottom: 1px solid rgba(34, 36, 38, 0.1); - -webkit-transition: background 0.1s ease, border-color 0.1s ease; transition: background 0.1s ease, border-color 0.1s ease; padding: 0.85714286em 1.14285714em; } diff --git a/search.js b/search.js index bd92d9e..198cba9 100755 --- a/search.js +++ b/search.js @@ -1,5 +1,5 @@ /*! - * # Semantic UI 2.4.1 - Search + * # Semantic UI 2.5.0 - Search * http://github.com/semantic-org/semantic-ui/ * * diff --git a/search.min.css b/search.min.css index fd72ace..1dfaba6 100755 --- a/search.min.css +++ b/search.min.css @@ -1,9 +1,9 @@ /*! - * # Semantic UI 2.4.0 - Search + * # Semantic UI 2.5.0 - Search * http://github.com/semantic-org/semantic-ui/ * * * Released under the MIT license * http://opensource.org/licenses/MIT * - */.ui.search{position:relative}.ui.search>.prompt{margin:0;outline:0;-webkit-appearance:none;-webkit-tap-highlight-color:rgba(255,255,255,0);text-shadow:none;font-style:normal;font-weight:400;line-height:1.21428571em;padding:.67857143em 1em;font-size:1em;background:#fff;border:1px solid rgba(34,36,38,.15);color:rgba(0,0,0,.87);-webkit-box-shadow:0 0 0 0 transparent inset;box-shadow:0 0 0 0 transparent inset;-webkit-transition:background-color .1s ease,color .1s ease,border-color .1s ease,-webkit-box-shadow .1s ease;transition:background-color .1s ease,color .1s ease,border-color .1s ease,-webkit-box-shadow .1s ease;transition:background-color .1s ease,color .1s ease,box-shadow .1s ease,border-color .1s ease;transition:background-color .1s ease,color .1s ease,box-shadow .1s ease,border-color .1s ease,-webkit-box-shadow .1s ease}.ui.search .prompt{border-radius:500rem}.ui.search .prompt~.search.icon{cursor:pointer}.ui.search>.results{display:none;position:absolute;top:100%;left:0;-webkit-transform-origin:center top;transform-origin:center top;white-space:normal;text-align:left;text-transform:none;background:#fff;margin-top:.5em;width:18em;border-radius:.28571429rem;-webkit-box-shadow:0 2px 4px 0 rgba(34,36,38,.12),0 2px 10px 0 rgba(34,36,38,.15);box-shadow:0 2px 4px 0 rgba(34,36,38,.12),0 2px 10px 0 rgba(34,36,38,.15);border:1px solid #d4d4d5;z-index:998}.ui.search>.results>:first-child{border-radius:.28571429rem .28571429rem 0 0}.ui.search>.results>:last-child{border-radius:0 0 .28571429rem .28571429rem}.ui.search>.results .result{cursor:pointer;display:block;overflow:hidden;font-size:1em;padding:.85714286em 1.14285714em;color:rgba(0,0,0,.87);line-height:1.33;border-bottom:1px solid rgba(34,36,38,.1)}.ui.search>.results .result:last-child{border-bottom:none!important}.ui.search>.results .result .image{float:right;overflow:hidden;background:0 0;width:5em;height:3em;border-radius:.25em}.ui.search>.results .result .image img{display:block;width:auto;height:100%}.ui.search>.results .result .image+.content{margin:0 6em 0 0}.ui.search>.results .result .title{margin:-.14285714em 0 0;font-family:Lato,'Helvetica Neue',Arial,Helvetica,sans-serif;font-weight:700;font-size:1em;color:rgba(0,0,0,.85)}.ui.search>.results .result .description{margin-top:0;font-size:.92857143em;color:rgba(0,0,0,.4)}.ui.search>.results .result .price{float:right;color:#21ba45}.ui.search>.results>.message{padding:1em 1em}.ui.search>.results>.message .header{font-family:Lato,'Helvetica Neue',Arial,Helvetica,sans-serif;font-size:1rem;font-weight:700;color:rgba(0,0,0,.87)}.ui.search>.results>.message .description{margin-top:.25rem;font-size:1em;color:rgba(0,0,0,.87)}.ui.search>.results>.action{display:block;border-top:none;background:#f3f4f5;padding:.92857143em 1em;color:rgba(0,0,0,.87);font-weight:700;text-align:center}.ui.search>.prompt:focus{border-color:rgba(34,36,38,.35);background:#fff;color:rgba(0,0,0,.95)}.ui.loading.search .input>i.icon:before{position:absolute;content:'';top:50%;left:50%;margin:-.64285714em 0 0 -.64285714em;width:1.28571429em;height:1.28571429em;border-radius:500rem;border:.2em solid rgba(0,0,0,.1)}.ui.loading.search .input>i.icon:after{position:absolute;content:'';top:50%;left:50%;margin:-.64285714em 0 0 -.64285714em;width:1.28571429em;height:1.28571429em;-webkit-animation:button-spin .6s linear;animation:button-spin .6s linear;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;border-radius:500rem;border-color:#767676 transparent transparent;border-style:solid;border-width:.2em;-webkit-box-shadow:0 0 0 1px transparent;box-shadow:0 0 0 1px transparent}.ui.category.search>.results .category .result:hover,.ui.search>.results .result:hover{background:#f9fafb}.ui.search .action:hover{background:#e0e0e0}.ui.category.search>.results .category.active{background:#f3f4f5}.ui.category.search>.results .category.active>.name{color:rgba(0,0,0,.87)}.ui.category.search>.results .category .result.active,.ui.search>.results .result.active{position:relative;border-left-color:rgba(34,36,38,.1);background:#f3f4f5;-webkit-box-shadow:none;box-shadow:none}.ui.search>.results .result.active .title{color:rgba(0,0,0,.85)}.ui.search>.results .result.active .description{color:rgba(0,0,0,.85)}.ui.disabled.search{cursor:default;pointer-events:none;opacity:.45}.ui.search.selection .prompt{border-radius:.28571429rem}.ui.search.selection>.icon.input>.remove.icon{pointer-events:none;position:absolute;left:auto;opacity:0;color:'';top:0;right:0;-webkit-transition:color .1s ease,opacity .1s ease;transition:color .1s ease,opacity .1s ease}.ui.search.selection>.icon.input>.active.remove.icon{cursor:pointer;opacity:.8;pointer-events:auto}.ui.search.selection>.icon.input:not([class*="left icon"])>.icon~.remove.icon{right:1.85714em}.ui.search.selection>.icon.input>.remove.icon:hover{opacity:1;color:#db2828}.ui.category.search .results{width:28em}.ui.category.search .results.animating,.ui.category.search .results.visible{display:table}.ui.category.search>.results .category{display:table-row;background:#f3f4f5;-webkit-box-shadow:none;box-shadow:none;-webkit-transition:background .1s ease,border-color .1s ease;transition:background .1s ease,border-color .1s ease}.ui.category.search>.results .category:last-child{border-bottom:none}.ui.category.search>.results .category:first-child .name+.result{border-radius:0 .28571429rem 0 0}.ui.category.search>.results .category:last-child .result:last-child{border-radius:0 0 .28571429rem 0}.ui.category.search>.results .category>.name{display:table-cell;text-overflow:ellipsis;width:100px;white-space:nowrap;background:0 0;font-family:Lato,'Helvetica Neue',Arial,Helvetica,sans-serif;font-size:1em;padding:.4em 1em;font-weight:700;color:rgba(0,0,0,.4);border-bottom:1px solid rgba(34,36,38,.1)}.ui.category.search>.results .category .results{display:table-cell;background:#fff;border-left:1px solid rgba(34,36,38,.15);border-bottom:1px solid rgba(34,36,38,.1)}.ui.category.search>.results .category .result{border-bottom:1px solid rgba(34,36,38,.1);-webkit-transition:background .1s ease,border-color .1s ease;transition:background .1s ease,border-color .1s ease;padding:.85714286em 1.14285714em}.ui[class*="left aligned"].search>.results{right:auto;left:0}.ui[class*="right aligned"].search>.results{right:0;left:auto}.ui.fluid.search .results{width:100%}.ui.mini.search{font-size:.78571429em}.ui.small.search{font-size:.92857143em}.ui.search{font-size:1em}.ui.large.search{font-size:1.14285714em}.ui.big.search{font-size:1.28571429em}.ui.huge.search{font-size:1.42857143em}.ui.massive.search{font-size:1.71428571em}@media only screen and (max-width:767px){.ui.search .results{max-width:calc(100vw - 2rem)}} \ No newline at end of file + */.ui.search{position:relative}.ui.search>.prompt{margin:0;outline:0;-webkit-appearance:none;-webkit-tap-highlight-color:rgba(255,255,255,0);text-shadow:none;font-style:normal;font-weight:400;line-height:1.21428571em;padding:.67857143em 1em;font-size:1em;background:#fff;border:1px solid rgba(34,36,38,.15);color:rgba(0,0,0,.87);box-shadow:0 0 0 0 transparent inset;transition:background-color .1s ease,color .1s ease,box-shadow .1s ease,border-color .1s ease}.ui.search .prompt{border-radius:500rem}.ui.search .prompt~.search.icon{cursor:pointer}.ui.search>.results{display:none;position:absolute;top:100%;left:0;transform-origin:center top;white-space:normal;text-align:left;text-transform:none;background:#fff;margin-top:.5em;width:18em;border-radius:.28571429rem;box-shadow:0 2px 4px 0 rgba(34,36,38,.12),0 2px 10px 0 rgba(34,36,38,.15);border:1px solid #d4d4d5;z-index:998}.ui.search>.results>:first-child{border-radius:.28571429rem .28571429rem 0 0}.ui.search>.results>:last-child{border-radius:0 0 .28571429rem .28571429rem}.ui.search>.results .result{cursor:pointer;display:block;overflow:hidden;font-size:1em;padding:.85714286em 1.14285714em;color:rgba(0,0,0,.87);line-height:1.33;border-bottom:1px solid rgba(34,36,38,.1)}.ui.search>.results .result:last-child{border-bottom:none!important}.ui.search>.results .result .image{float:right;overflow:hidden;background:0 0;width:5em;height:3em;border-radius:.25em}.ui.search>.results .result .image img{display:block;width:auto;height:100%}.ui.search>.results .result .image+.content{margin:0 6em 0 0}.ui.search>.results .result .title{margin:-.14285714em 0 0;font-family:Lato,'Helvetica Neue',Arial,Helvetica,sans-serif;font-weight:700;font-size:1em;color:rgba(0,0,0,.85)}.ui.search>.results .result .description{margin-top:0;font-size:.92857143em;color:rgba(0,0,0,.4)}.ui.search>.results .result .price{float:right;color:#21ba45}.ui.search>.results>.message{padding:1em 1em}.ui.search>.results>.message .header{font-family:Lato,'Helvetica Neue',Arial,Helvetica,sans-serif;font-size:1rem;font-weight:700;color:rgba(0,0,0,.87)}.ui.search>.results>.message .description{margin-top:.25rem;font-size:1em;color:rgba(0,0,0,.87)}.ui.search>.results>.action{display:block;border-top:none;background:#f3f4f5;padding:.92857143em 1em;color:rgba(0,0,0,.87);font-weight:700;text-align:center}.ui.search>.prompt:focus{border-color:rgba(34,36,38,.35);background:#fff;color:rgba(0,0,0,.95)}.ui.loading.search .input>i.icon:before{position:absolute;content:'';top:50%;left:50%;margin:-.64285714em 0 0 -.64285714em;width:1.28571429em;height:1.28571429em;border-radius:500rem;border:.2em solid rgba(0,0,0,.1)}.ui.loading.search .input>i.icon:after{position:absolute;content:'';top:50%;left:50%;margin:-.64285714em 0 0 -.64285714em;width:1.28571429em;height:1.28571429em;-webkit-animation:button-spin .6s linear;animation:button-spin .6s linear;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;border-radius:500rem;border-color:#767676 transparent transparent;border-style:solid;border-width:.2em;box-shadow:0 0 0 1px transparent}.ui.category.search>.results .category .result:hover,.ui.search>.results .result:hover{background:#f9fafb}.ui.search .action:hover{background:#e0e0e0}.ui.category.search>.results .category.active{background:#f3f4f5}.ui.category.search>.results .category.active>.name{color:rgba(0,0,0,.87)}.ui.category.search>.results .category .result.active,.ui.search>.results .result.active{position:relative;border-left-color:rgba(34,36,38,.1);background:#f3f4f5;box-shadow:none}.ui.search>.results .result.active .title{color:rgba(0,0,0,.85)}.ui.search>.results .result.active .description{color:rgba(0,0,0,.85)}.ui.disabled.search{cursor:default;pointer-events:none;opacity:.45}.ui.search.selection .prompt{border-radius:.28571429rem}.ui.search.selection>.icon.input>.remove.icon{pointer-events:none;position:absolute;left:auto;opacity:0;color:'';top:0;right:0;transition:color .1s ease,opacity .1s ease}.ui.search.selection>.icon.input>.active.remove.icon{cursor:pointer;opacity:.8;pointer-events:auto}.ui.search.selection>.icon.input:not([class*="left icon"])>.icon~.remove.icon{right:1.85714em}.ui.search.selection>.icon.input>.remove.icon:hover{opacity:1;color:#db2828}.ui.category.search .results{width:28em}.ui.category.search .results.animating,.ui.category.search .results.visible{display:table}.ui.category.search>.results .category{display:table-row;background:#f3f4f5;box-shadow:none;transition:background .1s ease,border-color .1s ease}.ui.category.search>.results .category:last-child{border-bottom:none}.ui.category.search>.results .category:first-child .name+.result{border-radius:0 .28571429rem 0 0}.ui.category.search>.results .category:last-child .result:last-child{border-radius:0 0 .28571429rem 0}.ui.category.search>.results .category>.name{display:table-cell;text-overflow:ellipsis;width:100px;white-space:nowrap;background:0 0;font-family:Lato,'Helvetica Neue',Arial,Helvetica,sans-serif;font-size:1em;padding:.4em 1em;font-weight:700;color:rgba(0,0,0,.4);border-bottom:1px solid rgba(34,36,38,.1)}.ui.category.search>.results .category .results{display:table-cell;background:#fff;border-left:1px solid rgba(34,36,38,.15);border-bottom:1px solid rgba(34,36,38,.1)}.ui.category.search>.results .category .result{border-bottom:1px solid rgba(34,36,38,.1);transition:background .1s ease,border-color .1s ease;padding:.85714286em 1.14285714em}.ui[class*="left aligned"].search>.results{right:auto;left:0}.ui[class*="right aligned"].search>.results{right:0;left:auto}.ui.fluid.search .results{width:100%}.ui.mini.search{font-size:.78571429em}.ui.small.search{font-size:.92857143em}.ui.search{font-size:1em}.ui.large.search{font-size:1.14285714em}.ui.big.search{font-size:1.28571429em}.ui.huge.search{font-size:1.42857143em}.ui.massive.search{font-size:1.71428571em}@media only screen and (max-width:767px){.ui.search .results{max-width:calc(100vw - 2rem)}} \ No newline at end of file diff --git a/search.min.js b/search.min.js index 439fa98..174bf3b 100755 --- a/search.min.js +++ b/search.min.js @@ -1 +1 @@ -!function(q,A,E,D){"use strict";A=void 0!==A&&A.Math==Math?A:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),q.fn.search=function(o){var C,x=q(this),w=x.selector||"",S=(new Date).getTime(),F=[],j=o,T="string"==typeof j,k=[].slice.call(arguments,1);return q(this).each(function(){var f,u=q.isPlainObject(o)?q.extend(!0,{},q.fn.search.settings,o):q.extend({},q.fn.search.settings),g=u.className,l=u.metadata,d=u.regExp,i=u.fields,h=u.selector,p=u.error,e=u.namespace,n="."+e,t=e+"-module",m=q(this),v=m.find(h.prompt),s=m.find(h.searchButton),r=m.find(h.results),a=m.find(h.result),y=(m.find(h.category),this),c=m.data(t),b=!1,R=!1;f={initialize:function(){f.verbose("Initializing module"),f.get.settings(),f.determine.searchFields(),f.bind.events(),f.set.type(),f.create.results(),f.instantiate()},instantiate:function(){f.verbose("Storing instance of module",f),c=f,m.data(t,f)},destroy:function(){f.verbose("Destroying instance"),m.off(n).removeData(t)},refresh:function(){f.debug("Refreshing selector cache"),v=m.find(h.prompt),s=m.find(h.searchButton),m.find(h.category),r=m.find(h.results),a=m.find(h.result)},refreshResults:function(){r=m.find(h.results),a=m.find(h.result)},bind:{events:function(){f.verbose("Binding events to search"),u.automatic&&(m.on(f.get.inputEvent()+n,h.prompt,f.event.input),v.attr("autocomplete","off")),m.on("focus"+n,h.prompt,f.event.focus).on("blur"+n,h.prompt,f.event.blur).on("keydown"+n,h.prompt,f.handleKeyboard).on("click"+n,h.searchButton,f.query).on("mousedown"+n,h.results,f.event.result.mousedown).on("mouseup"+n,h.results,f.event.result.mouseup).on("click"+n,h.result,f.event.result.click)}},determine:{searchFields:function(){o&&o.searchFields!==D&&(u.searchFields=o.searchFields)}},event:{input:function(){u.searchDelay?(clearTimeout(f.timer),f.timer=setTimeout(function(){f.is.focused()&&f.query()},u.searchDelay)):f.query()},focus:function(){f.set.focus(),u.searchOnFocus&&f.has.minimumCharacters()&&f.query(function(){f.can.show()&&f.showResults()})},blur:function(e){var t=E.activeElement===this,s=function(){f.cancel.query(),f.remove.focus(),f.timer=setTimeout(f.hideResults,u.hideDelay)};t||(R=!1,f.resultsClicked?(f.debug("Determining if user action caused search to close"),m.one("click.close"+n,h.results,function(e){f.is.inMessage(e)||b?v.focus():(b=!1,f.is.animating()||f.is.hidden()||s())})):(f.debug("Input blurred without user action, closing results"),s()))},result:{mousedown:function(){f.resultsClicked=!0},mouseup:function(){f.resultsClicked=!1},click:function(e){f.debug("Search result selected");var t=q(this),s=t.find(h.title).eq(0),n=t.is("a[href]")?t:t.find("a[href]").eq(0),r=n.attr("href")||!1,i=n.attr("target")||!1,a=(s.html(),0=u.minCharacters},results:function(){return 0!==r.length&&""!=r.html()}},clear:{cache:function(e){var t=m.data(l.cache);e?e&&t&&t[e]&&(f.debug("Removing value from cache",e),delete t[e],m.data(l.cache,t)):(f.debug("Clearing cache",e),m.removeData(l.cache))}},read:{cache:function(e){var t=m.data(l.cache);return!!u.cache&&(f.verbose("Checking cache for generated html for query",e),"object"==typeof t&&t[e]!==D&&t[e])}},create:{categoryResults:function(e){var s={};return q.each(e,function(e,t){t.category&&(s[t.category]===D?(f.verbose("Creating new category of results",t.category),s[t.category]={name:t.category,results:[t]}):s[t.category].results.push(t))}),s},id:function(e,t){var s,n=e+1;return t!==D?(s=String.fromCharCode(97+t)+n,f.verbose("Creating category result id",s)):(s=n,f.verbose("Creating result id",s)),s},results:function(){0===r.length&&(r=q("
").addClass(g.results).appendTo(m))}},inject:{result:function(e,t,s){f.verbose("Injecting result into results");var n=s!==D?r.children().eq(s).children(h.results).first().children(h.result).eq(t):r.children(h.result).eq(t);f.verbose("Injecting results metadata",n),n.data(l.result,e)},id:function(n){f.debug("Injecting unique ids into results");var r=0,i=0;return"category"===u.type?q.each(n,function(e,n){i=0,q.each(n.results,function(e,t){var s=n.results[e];s.id===D&&(s.id=f.create.id(i,r)),f.inject.result(s,i,r),i++}),r++}):q.each(n,function(e,t){var s=n[e];s.id===D&&(s.id=f.create.id(i)),f.inject.result(s,i),i++}),n}},save:{results:function(e){f.verbose("Saving current search results to metadata",e),m.data(l.results,e)}},write:{cache:function(e,t){var s=m.data(l.cache)!==D?m.data(l.cache):{};u.cache&&(f.verbose("Writing generated html to cache",e,t),s[e]=t,m.data(l.cache,s))}},addResults:function(e){if(q.isFunction(u.onResultsAdd)&&!1===u.onResultsAdd.call(r,e))return f.debug("onResultsAdd callback cancelled default action"),!1;e?(r.html(e),f.refreshResults(),u.selectFirstResult&&f.select.firstResult(),f.showResults()):f.hideResults(function(){r.empty()})},showResults:function(e){e=q.isFunction(e)?e:function(){},R||!f.is.visible()&&f.has.results()&&(f.can.transition()?(f.debug("Showing results with css animations"),r.transition({animation:u.transition+" in",debug:u.debug,verbose:u.verbose,duration:u.duration,onComplete:function(){e()},queue:!0})):(f.debug("Showing results with javascript"),r.stop().fadeIn(u.duration,u.easing)),u.onResultsOpen.call(r))},hideResults:function(e){e=q.isFunction(e)?e:function(){},f.is.visible()&&(f.can.transition()?(f.debug("Hiding results with css animations"),r.transition({animation:u.transition+" out",debug:u.debug,verbose:u.verbose,duration:u.duration,onComplete:function(){e()},queue:!0})):(f.debug("Hiding results with javascript"),r.stop().fadeOut(u.duration,u.easing)),u.onResultsClose.call(r))},generateResults:function(e){f.debug("Generating html from response",e);var t=u.templates[u.type],s=q.isPlainObject(e[i.results])&&!q.isEmptyObject(e[i.results]),n=q.isArray(e[i.results])&&0 .message",category:".category",result:".result",title:".title, .name"},templates:{escape:function(e){var t={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"};return/[&<>"'`]/.test(e)?e.replace(/[&<>"'`]/g,function(e){return t[e]}):e},message:function(e,t){var s="";return e!==D&&t!==D&&(s+='
',s+="empty"==t?'
No Results
'+e+'
':'
'+e+"
",s+="
"),s},category:function(e,s){var n="";q.fn.search.settings.templates.escape;return e[s.categoryResults]!==D&&(q.each(e[s.categoryResults],function(e,t){t[s.results]!==D&&0',t[s.categoryName]!==D&&(n+='
'+t[s.categoryName]+"
"),n+='",n+="
")}),e[s.action]&&(n+=''+e[s.action][s.actionText]+""),n)},standard:function(e,s){var n="";return e[s.results]!==D&&(q.each(e[s.results],function(e,t){t[s.url]?n+='':n+='',t[s.image]!==D&&(n+='
'),n+='
',t[s.price]!==D&&(n+='
'+t[s.price]+"
"),t[s.title]!==D&&(n+='
'+t[s.title]+"
"),t[s.description]!==D&&(n+='
'+t[s.description]+"
"),n+="
",n+="
"}),e[s.action]&&(n+=''+e[s.action][s.actionText]+""),n)}}}}(jQuery,window,document); \ No newline at end of file +!function(q,A,E,D){"use strict";A=void 0!==A&&A.Math==Math?A:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),q.fn.search=function(o){var C,x=q(this),w=x.selector||"",S=(new Date).getTime(),F=[],j=o,T="string"==typeof j,k=[].slice.call(arguments,1);return q(this).each(function(){var u=q.isPlainObject(o)?q.extend(!0,{},q.fn.search.settings,o):q.extend({},q.fn.search.settings),f=u.className,l=u.metadata,d=u.regExp,i=u.fields,g=u.selector,h=u.error,e=u.namespace,n="."+e,t=e+"-module",p=q(this),m=p.find(g.prompt),s=p.find(g.searchButton),r=p.find(g.results),a=p.find(g.result),v=(p.find(g.category),this),c=p.data(t),y=!1,b=!1,R={initialize:function(){R.verbose("Initializing module"),R.get.settings(),R.determine.searchFields(),R.bind.events(),R.set.type(),R.create.results(),R.instantiate()},instantiate:function(){R.verbose("Storing instance of module",R),c=R,p.data(t,R)},destroy:function(){R.verbose("Destroying instance"),p.off(n).removeData(t)},refresh:function(){R.debug("Refreshing selector cache"),m=p.find(g.prompt),s=p.find(g.searchButton),p.find(g.category),r=p.find(g.results),a=p.find(g.result)},refreshResults:function(){r=p.find(g.results),a=p.find(g.result)},bind:{events:function(){R.verbose("Binding events to search"),u.automatic&&(p.on(R.get.inputEvent()+n,g.prompt,R.event.input),m.attr("autocomplete","off")),p.on("focus"+n,g.prompt,R.event.focus).on("blur"+n,g.prompt,R.event.blur).on("keydown"+n,g.prompt,R.handleKeyboard).on("click"+n,g.searchButton,R.query).on("mousedown"+n,g.results,R.event.result.mousedown).on("mouseup"+n,g.results,R.event.result.mouseup).on("click"+n,g.result,R.event.result.click)}},determine:{searchFields:function(){o&&o.searchFields!==D&&(u.searchFields=o.searchFields)}},event:{input:function(){u.searchDelay?(clearTimeout(R.timer),R.timer=setTimeout(function(){R.is.focused()&&R.query()},u.searchDelay)):R.query()},focus:function(){R.set.focus(),u.searchOnFocus&&R.has.minimumCharacters()&&R.query(function(){R.can.show()&&R.showResults()})},blur:function(e){function t(){R.cancel.query(),R.remove.focus(),R.timer=setTimeout(R.hideResults,u.hideDelay)}var s=E.activeElement===this;s||(b=!1,R.resultsClicked?(R.debug("Determining if user action caused search to close"),p.one("click.close"+n,g.results,function(e){R.is.inMessage(e)||y?m.focus():(y=!1,R.is.animating()||R.is.hidden()||t())})):(R.debug("Input blurred without user action, closing results"),t()))},result:{mousedown:function(){R.resultsClicked=!0},mouseup:function(){R.resultsClicked=!1},click:function(e){R.debug("Search result selected");var t=q(this),s=t.find(g.title).eq(0),n=t.is("a[href]")?t:t.find("a[href]").eq(0),r=n.attr("href")||!1,i=n.attr("target")||!1,a=(s.html(),0=u.minCharacters},results:function(){return 0!==r.length&&""!=r.html()}},clear:{cache:function(e){var t=p.data(l.cache);e?e&&t&&t[e]&&(R.debug("Removing value from cache",e),delete t[e],p.data(l.cache,t)):(R.debug("Clearing cache",e),p.removeData(l.cache))}},read:{cache:function(e){var t=p.data(l.cache);return!!u.cache&&(R.verbose("Checking cache for generated html for query",e),"object"==typeof t&&t[e]!==D&&t[e])}},create:{categoryResults:function(e){var s={};return q.each(e,function(e,t){t.category&&(s[t.category]===D?(R.verbose("Creating new category of results",t.category),s[t.category]={name:t.category,results:[t]}):s[t.category].results.push(t))}),s},id:function(e,t){var s,n=e+1;return t!==D?(s=String.fromCharCode(97+t)+n,R.verbose("Creating category result id",s)):(s=n,R.verbose("Creating result id",s)),s},results:function(){0===r.length&&(r=q("
").addClass(f.results).appendTo(p))}},inject:{result:function(e,t,s){R.verbose("Injecting result into results");var n=s!==D?r.children().eq(s).children(g.results).first().children(g.result).eq(t):r.children(g.result).eq(t);R.verbose("Injecting results metadata",n),n.data(l.result,e)},id:function(n){R.debug("Injecting unique ids into results");var r=0,i=0;return"category"===u.type?q.each(n,function(e,n){i=0,q.each(n.results,function(e,t){var s=n.results[e];s.id===D&&(s.id=R.create.id(i,r)),R.inject.result(s,i,r),i++}),r++}):q.each(n,function(e,t){var s=n[e];s.id===D&&(s.id=R.create.id(i)),R.inject.result(s,i),i++}),n}},save:{results:function(e){R.verbose("Saving current search results to metadata",e),p.data(l.results,e)}},write:{cache:function(e,t){var s=p.data(l.cache)!==D?p.data(l.cache):{};u.cache&&(R.verbose("Writing generated html to cache",e,t),s[e]=t,p.data(l.cache,s))}},addResults:function(e){if(q.isFunction(u.onResultsAdd)&&!1===u.onResultsAdd.call(r,e))return R.debug("onResultsAdd callback cancelled default action"),!1;e?(r.html(e),R.refreshResults(),u.selectFirstResult&&R.select.firstResult(),R.showResults()):R.hideResults(function(){r.empty()})},showResults:function(e){e=q.isFunction(e)?e:function(){},b||!R.is.visible()&&R.has.results()&&(R.can.transition()?(R.debug("Showing results with css animations"),r.transition({animation:u.transition+" in",debug:u.debug,verbose:u.verbose,duration:u.duration,onComplete:function(){e()},queue:!0})):(R.debug("Showing results with javascript"),r.stop().fadeIn(u.duration,u.easing)),u.onResultsOpen.call(r))},hideResults:function(e){e=q.isFunction(e)?e:function(){},R.is.visible()&&(R.can.transition()?(R.debug("Hiding results with css animations"),r.transition({animation:u.transition+" out",debug:u.debug,verbose:u.verbose,duration:u.duration,onComplete:function(){e()},queue:!0})):(R.debug("Hiding results with javascript"),r.stop().fadeOut(u.duration,u.easing)),u.onResultsClose.call(r))},generateResults:function(e){R.debug("Generating html from response",e);var t=u.templates[u.type],s=q.isPlainObject(e[i.results])&&!q.isEmptyObject(e[i.results]),n=q.isArray(e[i.results])&&0 .message",category:".category",result:".result",title:".title, .name"},templates:{escape:function(e){var t={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"};return/[&<>"'`]/.test(e)?e.replace(/[&<>"'`]/g,function(e){return t[e]}):e},message:function(e,t){var s="";return e!==D&&t!==D&&(s+='
',s+="empty"==t?'
No Results
'+e+'
':'
'+e+"
",s+="
"),s},category:function(e,s){var n="";q.fn.search.settings.templates.escape;return e[s.categoryResults]!==D&&(q.each(e[s.categoryResults],function(e,t){t[s.results]!==D&&0',t[s.categoryName]!==D&&(n+='
'+t[s.categoryName]+"
"),n+='",n+="
")}),e[s.action]&&(n+=''+e[s.action][s.actionText]+""),n)},standard:function(e,s){var n="";return e[s.results]!==D&&(q.each(e[s.results],function(e,t){t[s.url]?n+='':n+='',t[s.image]!==D&&(n+='
'),n+='
',t[s.price]!==D&&(n+='
'+t[s.price]+"
"),t[s.title]!==D&&(n+='
'+t[s.title]+"
"),t[s.description]!==D&&(n+='
'+t[s.description]+"
"),n+="
",n+="
"}),e[s.action]&&(n+=''+e[s.action][s.actionText]+""),n)}}}}(jQuery,window,document); \ No newline at end of file