@stencil/core
Version:
A Compiler for Web Components and Progressive Web Apps
1 lines • 3.23 kB
JavaScript
var __awaiter=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function u(t){try{s(r.next(t))}catch(t){i(t)}}function a(t){try{s(r["throw"](t))}catch(t){i(t)}}function s(t){t.done?o(t.value):new n(function(e){e(t.value)}).then(u,a)}s((r=r.apply(t,e||[])).next())})};var __generator=this&&this.__generator||function(t,e){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,u;return u={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(u[Symbol.iterator]=function(){return this}),u;function a(t){return function(e){return s([t,e])}}function s(u){if(r)throw new TypeError("Generator is already executing.");while(n)try{if(r=1,o&&(i=u[0]&2?o["return"]:u[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,u[1])).done)return i;if(o=0,i)u=[u[0]&2,i.value];switch(u[0]){case 0:case 1:i=u;break;case 4:n.label++;return{value:u[1],done:false};case 5:n.label++;o=u[1];u=[0];continue;case 7:u=n.ops.pop();n.trys.pop();continue;default:if(!(i=n.trys,i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){n.label=u[1];break}if(u[0]===6&&n.label<i[1]){n.label=i[1];i=u;break}if(i&&n.label<i[2]){n.label=i[2];n.ops.push(u);break}if(i[2])n.ops.pop();n.trys.pop();continue}u=e.call(t,n)}catch(t){u=[6,t];o=0}finally{r=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};System.register(["./p-459b95cc.system.js"],function(t){"use strict";var e,n;return{setters:[function(t){e=t.r;n=t.h}],execute:function(){var r=function(){function t(t){e(this,t);this.a="";this.b=""}t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,function(){var t,e,n;return __generator(this,function(r){switch(r.label){case 0:t="/data/builds/master.json?ts="+Date.now();return[4,fetch(t)];case 1:e=r.sent();if(!e.ok)return[3,3];n=this;return[4,e.json()];case 2:n.build=r.sent();r.label=3;case 3:return[2]}})})};t.prototype.onSubmit=function(t){t.preventDefault();t.stopPropagation();var e=this.a.trim().toLowerCase();var n=this.b.trim().toLowerCase();if(!e||!n){return}e=e.substring(0,7);n=n.substring(0,7);var r="/"+e+"/"+n;window.location.href=r};t.prototype.render=function(){var t=this;return[n("header",null,n("div",{class:"logo"},n("a",{href:"/"},n("img",{src:"/assets/logo.png?1"})))),n("section",null,this.build?n("section",{class:"master"},n("p",null,n("a",{href:"/master"},this.build.message))):null,n("form",{onSubmit:this.onSubmit.bind(this)},n("div",null,n("input",{onInput:function(e){return t.a=e.target.value}})),n("div",null,n("input",{onInput:function(e){return t.b=e.target.value}})),n("div",null,n("button",{type:"submit"},"Compare Screenshots"))))]};Object.defineProperty(t,"style",{get:function(){return"header{padding:8px;background:#fff;-webkit-box-shadow:var(--header-box-shadow);box-shadow:var(--header-box-shadow)}img{width:174px;height:32px}.logo{-ms-flex:1;flex:1;padding:7px}a{padding:8px;color:var(--analysis-data-color);text-decoration:none}.master{text-align:center}a:hover{text-decoration:underline}form{width:160px;margin:40px auto}form div{margin:10px}input{width:100%}"},enumerable:true,configurable:true});return t}();t("screenshot_lookup",r)}}});