Skip to content

Commit

Permalink
add implementation for beta6
Browse files Browse the repository at this point in the history
  • Loading branch information
Simply007 committed Nov 30, 2019
1 parent 4a64e01 commit 0aa9dfd
Show file tree
Hide file tree
Showing 3 changed files with 235 additions and 235 deletions.
1 change: 1 addition & 0 deletions dist/4.1.0-beta5.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!DOCTYPE html><html><head lang="en"><meta charset="UTF-8"><title></title><meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=yes"><!-- styles--><style>body{overflow:hidden;margin:0;padding:0;background:#eee}h3{margin-top:0}.content{padding:20px 10px 10px;height:160px}.loader{float:left;height:100px;overflow:hidden}.pending,.ready{padding-left:120px;opacity:1;-webkit-animation:fadein 1s;animation:fadein 1s}@-webkit-keyframes fadein{0%{opacity:0}to{opacity:1}}@keyframes fadein{0%{opacity:0}to{opacity:1}}.clear{clear:both}.qrcodewrapper{position:fixed;top:0;right:0;bottom:0}.qrcode{object-fit:none;height:100%}.circle-loader{margin-bottom:3.5em;border:10px solid rgba(0,0,0,.2);border-left-color:#5cb85c;-webkit-animation:loader-spin 1.2s linear infinite;animation:loader-spin 1.2s linear infinite;position:relative;display:inline-block;vertical-align:top;border-radius:50%;width:7em;height:7em}.load-complete{-webkit-animation:none;animation:none;border-color:#5cb85c;transition:border .5s ease-out}.checkmark.draw:after{-webkit-animation-duration:.8s;animation-duration:.8s;-webkit-animation-timing-function:ease;animation-timing-function:ease;-webkit-animation-name:checkmark;animation-name:checkmark;-webkit-transform:scaleX(-1) rotate(135deg);transform:scaleX(-1) rotate(135deg)}.checkmark:after{opacity:1;height:3.5em;width:1.75em;-webkit-transform-origin:left top;transform-origin:left top;border-right:3px solid #5cb85c;border-top:3px solid #5cb85c;content:"";left:.8em;top:3em;position:absolute}@-webkit-keyframes loader-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes loader-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@-webkit-keyframes checkmark{0%{height:0;width:0;opacity:1}20%{height:0;width:1.75em;opacity:1}40%{height:3.5em;width:1.75em;opacity:1}to{height:3.5em;width:1.75em;opacity:1}}@keyframes checkmark{0%{height:0;width:0;opacity:1}20%{height:0;width:1.75em;opacity:1}40%{height:3.5em;width:1.75em;opacity:1}to{height:3.5em;width:1.75em;opacity:1}}</style><script src="https://app.kenticocloud.com/js-api/custom-element.js"></script><link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"></head><body><!-- Custom element HTML--><div class="content" id="content"><div class="loader"><div class="circle-loader"><div class="checkmark draw"></div></div></div><div class="pending"><h3>Checking preview availability ...</h3></div><div class="ready"><h3>Preview is ready</h3><a class="preview" href="#" target="_blank">Open web preview in a new window</a></div><div class="na"><h3>Preview is not configured, please configure preview URL</h3></div><div class="clear"></div></div><script>!function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=86)}([function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e,n){t.exports=!n(3)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e,n){var r=n(4);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){var r=n(23)("wks"),o=n(11),i=n(0).Symbol,c="function"==typeof i;(t.exports=function(t){return r[t]||(r[t]=c&&i[t]||(c?i:o)("Symbol."+t))}).store=r},function(t,e){var n=t.exports={version:"2.6.3"};"number"==typeof __e&&(__e=n)},function(t,e,n){var r=n(2),o=n(24),i=n(17),c=Object.defineProperty;e.f=n(1)?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)try{return c(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var r=n(7),o=n(18);t.exports=n(1)?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var r=n(0),o=n(8),i=n(10),c=n(11)("src"),u=Function.toString,a=(""+u).split("toString");n(6).inspectSource=function(t){return u.call(t)},(t.exports=function(t,e,n,u){var l="function"==typeof n;l&&(i(n,"name")||o(n,"name",e)),t[e]!==n&&(l&&(i(n,c)||o(n,c,t[e]?""+t[e]:a.join(String(e)))),t===r?t[e]=n:u?t[e]?t[e]=n:o(t,e,n):(delete t[e],o(t,e,n)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[c]||u.call(this)})},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var r=n(0),o=n(6),i=n(8),c=n(9),u=n(25),a=function(t,e,n){var l,f,s,p,d=t&a.F,v=t&a.G,y=t&a.S,g=t&a.P,h=t&a.B,m=v?r:y?r[e]||(r[e]={}):(r[e]||{}).prototype,x=v?o:o[e]||(o[e]={}),b=x.prototype||(x.prototype={});for(l in v&&(n=e),n)s=((f=!d&&m&&void 0!==m[l])?m:n)[l],p=h&&f?u(s,r):g&&"function"==typeof s?u(Function.call,s):s,m&&c(m,l,s,t&a.U),x[l]!=s&&i(x,l,p),g&&b[l]!=s&&(b[l]=s)};r.core=o,a.F=1,a.G=2,a.S=4,a.P=8,a.B=16,a.W=32,a.U=64,a.R=128,t.exports=a},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e,n){var r=n(27),o=n(12);t.exports=function(t){return r(o(t))}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e,n){var r=n(4);t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){var r=n(14),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},function(t,e,n){var r=n(4),o=n(0).document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e){t.exports=!1},function(t,e,n){var r=n(6),o=n(0),i=o["__core-js_shared__"]||(o["__core-js_shared__"]={});(t.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n(22)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(t,e,n){t.exports=!n(1)&&!n(3)(function(){return 7!=Object.defineProperty(n(20)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){var r=n(21);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},,function(t,e,n){var r=n(16);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e,n){"use strict";var r=n(2);t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},function(t,e,n){var r=n(12);t.exports=function(t){return Object(r(t))}},,,,,function(t,e,n){var r=n(15),o=n(19),i=n(35);t.exports=function(t){return function(e,n,c){var u,a=r(e),l=o(a.length),f=i(c,l);if(t&&n!=n){for(;l>f;)if((u=a[f++])!=u)return!0}else for(;l>f;f++)if((t||f in a)&&a[f]===n)return t||f||0;return!t&&-1}}},function(t,e,n){var r=n(14),o=Math.max,i=Math.min;t.exports=function(t,e){return(t=r(t))<0?o(t+e,0):i(t,e)}},function(t,e,n){"use strict";var r,o,i=n(28),c=RegExp.prototype.exec,u=String.prototype.replace,a=c,l=(r=/a/,o=/b*/g,c.call(r,"a"),c.call(o,"a"),0!==r.lastIndex||0!==o.lastIndex),f=void 0!==/()??/.exec("")[1];(l||f)&&(a=function(t){var e,n,r,o,a=this;return f&&(n=new RegExp("^"+a.source+"$(?!\\s)",i.call(a))),l&&(e=a.lastIndex),r=c.call(a,t),l&&r&&(a.lastIndex=a.global?r.index+r[0].length:e),f&&r&&r.length>1&&u.call(r[0],n,function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(r[o]=void 0)}),r}),t.exports=a},,function(t,e,n){var r=n(16),o=n(5)("toStringTag"),i="Arguments"==r(function(){return arguments}());t.exports=function(t){var e,n,c;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),o))?n:i?r(e):"Object"==(c=r(e))&&"function"==typeof e.callee?"Arguments":c}},function(t,e,n){"use strict";var r=n(46)(!0);t.exports=function(t,e,n){return e+(n?r(t,e).length:1)}},function(t,e,n){"use strict";var r=n(38),o=RegExp.prototype.exec;t.exports=function(t,e){var n=t.exec;if("function"==typeof n){var i=n.call(t,e);if("object"!=typeof i)throw new TypeError("RegExp exec method returned something other than an Object or null");return i}if("RegExp"!==r(t))throw new TypeError("RegExp#exec called on incompatible receiver");return o.call(t,e)}},function(t,e,n){"use strict";n(47);var r=n(9),o=n(8),i=n(3),c=n(12),u=n(5),a=n(36),l=u("species"),f=!i(function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}),s=function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();t.exports=function(t,e,n){var p=u(t),d=!i(function(){var e={};return e[p]=function(){return 7},7!=""[t](e)}),v=d?!i(function(){var e=!1,n=/a/;return n.exec=function(){return e=!0,null},"split"===t&&(n.constructor={},n.constructor[l]=function(){return n}),n[p](""),!e}):void 0;if(!d||!v||"replace"===t&&!f||"split"===t&&!s){var y=/./[p],g=n(c,p,""[t],function(t,e,n,r,o){return e.exec===a?d&&!o?{done:!0,value:y.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}}),h=g[0],m=g[1];r(String.prototype,t,h),o(RegExp.prototype,p,2==e?function(t,e){return m.call(t,this,e)}:function(t){return m.call(t,this)})}}},,,,,function(t,e,n){var r=n(14),o=n(12);t.exports=function(t){return function(e,n){var i,c,u=String(o(e)),a=r(n),l=u.length;return a<0||a>=l?t?"":void 0:(i=u.charCodeAt(a))<55296||i>56319||a+1===l||(c=u.charCodeAt(a+1))<56320||c>57343?t?u.charAt(a):i:t?u.slice(a,a+2):c-56320+(i-55296<<10)+65536}}},function(t,e,n){"use strict";var r=n(36);n(13)({target:"RegExp",proto:!0,forced:r!==/./.exec},{exec:r})},function(t,e,n){"use strict";var r=n(2),o=n(29),i=n(19),c=n(14),u=n(39),a=n(40),l=Math.max,f=Math.min,s=Math.floor,p=/\$([$&`']|\d\d?|<[^>]*>)/g,d=/\$([$&`']|\d\d?)/g;n(41)("replace",2,function(t,e,n,v){return[function(r,o){var i=t(this),c=null==r?void 0:r[e];return void 0!==c?c.call(r,i,o):n.call(String(i),r,o)},function(t,e){var o=v(n,t,this,e);if(o.done)return o.value;var s=r(t),p=String(this),d="function"==typeof e;d||(e=String(e));var g=s.global;if(g){var h=s.unicode;s.lastIndex=0}for(var m=[];;){var x=a(s,p);if(null===x)break;if(m.push(x),!g)break;""===String(x[0])&&(s.lastIndex=u(p,i(s.lastIndex),h))}for(var b,S="",w=0,j=0;j<m.length;j++){x=m[j];for(var O=String(x[0]),T=l(f(c(x.index),p.length),0),E=[],_=1;_<x.length;_++)E.push(void 0===(b=x[_])?b:String(b));var M=x.groups;if(d){var C=[O].concat(E,T,p);void 0!==M&&C.push(M);var q=String(e.apply(void 0,C))}else q=y(O,p,T,E,M,e);T>=w&&(S+=p.slice(w,T)+q,w=T+O.length)}return S+p.slice(w)}];function y(t,e,r,i,c,u){var a=r+t.length,l=i.length,f=d;return void 0!==c&&(c=o(c),f=p),n.call(u,f,function(n,o){var u;switch(o.charAt(0)){case"$":return"$";case"&":return t;case"`":return e.slice(0,r);case"'":return e.slice(a);case"<":u=c[o.slice(1,-1)];break;default:var f=+o;if(0===f)return n;if(f>l){var p=s(f/10);return 0===p?n:p<=l?void 0===i[p-1]?o.charAt(1):i[p-1]+o.charAt(1):n}u=i[f-1]}return void 0===u?"":u})}})},,,,,,,,,,function(t,e){t.exports=function(t,e,n){var r=void 0===n;switch(e.length){case 0:return r?t():t.call(n);case 1:return r?t(e[0]):t.call(n,e[0]);case 2:return r?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return r?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return r?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}return t.apply(n,e)}},,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){t.exports=n(87)},function(t,e,n){"use strict";n.r(e);n(88),n(90),n(92),n(48),n(135);var r=n(94),o=null,i=null,c=null,u=null,a=null,l=null,f=null,s=null,p=/{urlslug}/gi,d=/{lang}/gi,v=null;function y(){var t=Math.ceil(document.querySelector("html").offsetHeight);CustomElement.setHeight(t)}function g(){document.querySelector(".loader").style.display="none",document.querySelector(".pending").style.display="none",document.querySelector(".ready").style.display="none",document.querySelector(".na").style.display="none"}function h(t){document.querySelector(".circle-loader").classList.remove("load-complete"),document.querySelector(".ready").style.display="none",document.querySelector(".pending h3").textContent=t,document.querySelector(".pending").style.display="",document.querySelector(".loader").style.display="",document.querySelector(".checkmark").style.display="none",y()}function m(){document.querySelector(".circle-loader").classList.add("load-complete"),document.querySelector(".ready").style.display="",document.querySelector(".loader").style.display="",document.querySelector(".pending").style.display="none",document.querySelector(".checkmark").style.display="";var t=c&&!f||!s?null:u.previewUrlPattern.replace(p,f).replace(d,a);t?(document.querySelector(".preview").setAttribute("href",t),document.querySelector(".preview").style.display=""):document.querySelector(".preview").style.display="none",y()}function x(t){i||(h("Checking preview availability ..."),i=setTimeout(function(t){i=null,o?b().then(function(t){return t.json()}).then(function(e){var n=e.item;console.log("defined lastModified: ".concat(o.toISOString())),console.log("received item last modified: ".concat(new Date(n.system.last_modified).toISOString())),n&&n.system&&!o||new Date(n.system.last_modified).getTime()>=o.getTime()?(o=new Date(n.system.last_modified),h("Sending notification to Gatsby..."),function(t,e){console.log("Sending request to gatsby!"),fetch(v,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:{operation:"update",elementCodenames:t,selectedLanguage:a},data:{items:[e]}})}).then(function(t){console.log("Gatsby result is: ".concat(JSON.stringify(t,void 0,2))),m()}).catch(function(t){console.error("Gatsby returned error: ".concat(JSON.stringify(t,void 0,2)))})}(t,n)):x()}).catch(function(t){console.error(err),x()}):b().then(function(t){return t.json()}).then(function(t){var e=t.item;o=new Date(e.system.last_modified),m()}).catch(function(t){console.error(t),x()})}.bind(null,t),1e3))}function b(){var t=l&&s?"https://preview-deliver.kenticocloud.com/"+s+"/items/"+l:null;return console.log("calling for item: ".concat(t)),fetch(t,{headers:new Headers({Authorization:"Bearer ".concat(u.previewApiKey)})})}function S(t,e){t?CustomElement.getElementValue(c,function(t){f=t,x(e)}):x(e)}function w(t){console.log("changes: ".concat(t)),S(c&&t.indexOf(c)>=0,t)}g(),h("Checking preview availability ..."),function(){try{CustomElement.init(function(t,e){if(!(u=t.config||{}).previewApiKey&&(console.error("Missing preview API key."),1))throw Error("Configuration is not valid.");console.log("Connection to gatsby opened..."),s=e.projectId,l=e.item.codename,a=e.variant.codename,v=u.gatsbyWebHookUrl,c=u.urlSlugElement,l?S(!!c):(g(),document.querySelector(".na").style.display="",y()),window.addEventListener("resize",y),CustomElement.observeElementChanges([],r(w,1e3))})}catch(t){console.error(t)}}()},function(t,e,n){"use strict";var r=n(13),o=n(34)(!1),i=[].indexOf,c=!!i&&1/[1].indexOf(1,-0)<0;r(r.P+r.F*(c||!n(89)(i)),"Array",{indexOf:function(t){return c?i.apply(this,arguments)||0:o(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(3);t.exports=function(t,e){return!!t&&r(function(){e?t.call(null,function(){},1):t.call(null)})}},function(t,e,n){var r=n(13),o=n(91);r(r.P+r.F*(Date.prototype.toISOString!==o),"Date",{toISOString:o})},function(t,e,n){"use strict";var r=n(3),o=Date.prototype.getTime,i=Date.prototype.toISOString,c=function(t){return t>9?t:"0"+t};t.exports=r(function(){return"0385-07-25T07:06:39.999Z"!=i.call(new Date(-5e13-1))})||!r(function(){i.call(new Date(NaN))})?function(){if(!isFinite(o.call(this)))throw RangeError("Invalid time value");var t=this,e=t.getUTCFullYear(),n=t.getUTCMilliseconds(),r=e<0?"-":e>9999?"+":"";return r+("00000"+Math.abs(e)).slice(r?-6:-4)+"-"+c(t.getUTCMonth()+1)+"-"+c(t.getUTCDate())+"T"+c(t.getUTCHours())+":"+c(t.getUTCMinutes())+":"+c(t.getUTCSeconds())+"."+(n>99?n:"0"+c(n))+"Z"}:i},function(t,e,n){var r=n(13);r(r.P,"Function",{bind:n(93)})},function(t,e,n){"use strict";var r=n(21),o=n(4),i=n(58),c=[].slice,u={};t.exports=Function.bind||function(t){var e=r(this),n=c.call(arguments,1),a=function(){var r=n.concat(c.call(arguments));return this instanceof a?function(t,e,n){if(!(e in u)){for(var r=[],o=0;o<e;o++)r[o]="a["+o+"]";u[e]=Function("F,a","return new F("+r.join(",")+")")}return u[e](t,n)}(e,r.length,r):i(e,r,t)};return o(e.prototype)&&(a.prototype=e.prototype),a}},function(t,e,n){(function(e){var n="Expected a function",r=NaN,o="[object Symbol]",i=/^\s+|\s+$/g,c=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,a=/^0o[0-7]+$/i,l=parseInt,f="object"==typeof e&&e&&e.Object===Object&&e,s="object"==typeof self&&self&&self.Object===Object&&self,p=f||s||Function("return this")(),d=Object.prototype.toString,v=Math.max,y=Math.min,g=function(){return p.Date.now()};function h(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function m(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&d.call(t)==o}(t))return r;if(h(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=h(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(i,"");var n=u.test(t);return n||a.test(t)?l(t.slice(2),n?2:8):c.test(t)?r:+t}t.exports=function(t,e,r){var o,i,c,u,a,l,f=0,s=!1,p=!1,d=!0;if("function"!=typeof t)throw new TypeError(n);function x(e){var n=o,r=i;return o=i=void 0,f=e,u=t.apply(r,n)}function b(t){var n=t-l;return void 0===l||n>=e||n<0||p&&t-f>=c}function S(){var t=g();if(b(t))return w(t);a=setTimeout(S,function(t){var n=e-(t-l);return p?y(n,c-(t-f)):n}(t))}function w(t){return a=void 0,d&&o?x(t):(o=i=void 0,u)}function j(){var t=g(),n=b(t);if(o=arguments,i=this,l=t,n){if(void 0===a)return function(t){return f=t,a=setTimeout(S,e),s?x(t):u}(l);if(p)return a=setTimeout(S,e),x(l)}return void 0===a&&(a=setTimeout(S,e)),u}return e=m(e)||0,h(r)&&(s=!!r.leading,c=(p="maxWait"in r)?v(m(r.maxWait)||0,e):c,d="trailing"in r?!!r.trailing:d),j.cancel=function(){void 0!==a&&clearTimeout(a),f=0,o=l=i=a=void 0},j.flush=function(){return void 0===a?u:w(g())},j}}).call(this,n(95))},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e){}]);</script></body></html>
Loading

0 comments on commit 0aa9dfd

Please sign in to comment.