var __awaiter=this&&this.__awaiter||function(e,t,r,n){function o(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function a(e){try{u(n.next(e))}catch(t){i(t)}}function l(e){try{u(n["throw"](e))}catch(t){i(t)}}function u(e){e.done?r(e.value):o(e.value).then(a,l)}u((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,a;return a={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function l(e){return function(t){return u([e,t])}}function u(a){if(n)throw new TypeError("Generator is already executing.");while(r)try{if(n=1,o&&(i=a[0]&2?o["return"]:a[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,a[1])).done)return i;if(o=0,i)a=[a[0]&2,i.value];switch(a[0]){case 0:case 1:i=a;break;case 4:r.label++;return{value:a[1],done:false};case 5:r.label++;o=a[1];a=[0];continue;case 7:a=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){r.label=a[1];break}if(a[0]===6&&r.label<i[1]){r.label=i[1];i=a;break}if(i&&r.label<i[2]){r.label=i[2];r.ops.push(a);break}if(i[2])r.ops.pop();r.trys.pop();continue}a=t.call(e,r)}catch(l){a=[6,l];o=0}finally{n=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var __spreadArrays=this&&this.__spreadArrays||function(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;for(var n=Array(e),o=0,t=0;t<r;t++)for(var i=arguments[t],a=0,l=i.length;a<l;a++,o++)n[o]=i[a];return n};System.register(["./p-dc7e8ad3.system.js"],(function(e){"use strict";var t,r,n;return{setters:[function(e){t=e.r;r=e.h;n=e.H}],execute:function(){var o="https://res.cloudinary.com/boaterbase/image/upload/";var i=e("bb_collection",function(){function e(e){var r=this;t(this,e);this.loaded=false;this.search="";this.searchHandler=function(e){var t=e.target;r.search=t.value}}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.loaded=true;return[2]}))}))};e.prototype.render=function(){var e=this;if(this.loaded&&this.collection&&this.collection.documents){var t=this.collection.documents.filter((function(t){var r=t.fields;return r.title.toLowerCase().indexOf(e.search)!=-1}));t=__spreadArrays(t,t,t);return r(n,null,r("h1",null,"Featured Boats"),r("form",null,r("input",{type:"search",placeholder:"Search",value:this.search,onInput:this.searchHandler})),r("ul",null,t.map((function(t){var n=t.name,i=t.fields;return r("li",{key:n},r("div",{style:{padding:"0.5rem"}},i.media&&r("img",{onClick:function(){e.loaded=false},onLoad:function(e){return e.target.style.opacity=1},style:{transition:"opacity 0.5s",opacity:"0",backgroundColor:i.media[0].info.colors?i.media[0].info.colors[0].color:"black",display:"block",width:"100%"},sizes:"100vw",src:o+"c_scale,w_auto,dpr_auto,q_auto,fl_lossy,f_auto/c_limit,w_800/"+i.media[0].info.public_id}),r("h3",null,i.title)))}))))}else return r(n,null)};Object.defineProperty(e,"style",{get:function(){return":host{all:initial;display:block;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box}:focus{outline:none;-webkit-box-shadow:0 0 0 2px #4682b4;box-shadow:0 0 0 2px #4682b4}form{display:block;margin:1rem}input[type=search]{display:block;width:100%;border-radius:2rem;font-size:1rem;padding:.5rem 1rem;margin:0;border:none;background-color:#eee}h1{margin:1rem}ul{margin:1rem;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-bottom:50rem}li,ul{list-style-type:none;padding:0}li{margin:0;min-width:300px;width:calc(100%/3)}li img{display:block;width:100%;height:180px;-o-object-fit:cover;object-fit:cover;border-radius:.25rem;-webkit-box-shadow:0 0 1rem rgba(0,10,20,.25);box-shadow:0 0 1rem rgba(0,10,20,.25)}li h3{font-size:1rem}"},enumerable:true,configurable:true});return e}())}}}));