You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

3 lines
11 KiB
JavaScript

var app=function(){"use strict";function t(){}function e(t){return t()}function n(){return Object.create(null)}function o(t){t.forEach(e)}function r(t){return"function"==typeof t}function i(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function s(t,e,n,o){return t[1]&&o?function(t,e){for(const n in e)t[n]=e[n];return t}(n.ctx.slice(),t[1](o(e))):n.ctx}function l(t,e,n,o,r,i,l){const c=function(t,e,n,o){if(t[2]&&o){const r=t[2](o(n));if(void 0===e.dirty)return r;if("object"==typeof r){const t=[],n=Math.max(e.dirty.length,r.length);for(let o=0;o<n;o+=1)t[o]=e.dirty[o]|r[o];return t}return e.dirty|r}return e.dirty}(e,o,r,i);if(c){const r=s(e,n,o,l);t.p(r,c)}}function c(t,e){t.appendChild(e)}function a(t,e,n){t.insertBefore(e,n||null)}function u(t){t.parentNode.removeChild(t)}function h(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function f(t){return document.createElement(t)}function d(t){return document.createTextNode(t)}function p(){return d(" ")}function g(t,e,n,o){return t.addEventListener(e,n,o),()=>t.removeEventListener(e,n,o)}function m(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function $(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function y(t,e){for(let n=0;n<t.options.length;n+=1){const o=t.options[n];if(o.__value===e)return void(o.selected=!0)}}function x(t,e,n){t.classList[n?"add":"remove"](e)}let b;function v(t){b=t}const W=[],_=[],w=[],z=[],k=Promise.resolve();let T=!1;function E(t){w.push(t)}let C=!1;const S=new Set;function L(){if(!C){C=!0;do{for(let t=0;t<W.length;t+=1){const e=W[t];v(e),M(e.$$)}for(v(null),W.length=0;_.length;)_.pop()();for(let t=0;t<w.length;t+=1){const e=w[t];S.has(e)||(S.add(e),e())}w.length=0}while(W.length);for(;z.length;)z.pop()();T=!1,C=!1,S.clear()}}function M(t){if(null!==t.fragment){t.update(),o(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(E)}}const j=new Set;let A;function H(){A={r:0,c:[],p:A}}function N(){A.r||o(A.c),A=A.p}function B(t,e){t&&t.i&&(j.delete(t),t.i(e))}function I(t,e,n,o){if(t&&t.o){if(j.has(t))return;j.add(t),A.c.push((()=>{j.delete(t),o&&(n&&t.d(1),o())})),t.o(e)}}function O(t){t&&t.c()}function P(t,n,i){const{fragment:s,on_mount:l,on_destroy:c,after_update:a}=t.$$;s&&s.m(n,i),E((()=>{const n=l.map(e).filter(r);c?c.push(...n):o(n),t.$$.on_mount=[]})),a.forEach(E)}function q(t,e){const n=t.$$;null!==n.fragment&&(o(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function D(t,e){-1===t.$$.dirty[0]&&(W.push(t),T||(T=!0,k.then(L)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function R(e,r,i,s,l,c,a=[-1]){const h=b;v(e);const f=r.props||{},d=e.$$={fragment:null,ctx:null,props:c,update:t,not_equal:l,bound:n(),on_mount:[],on_destroy:[],before_update:[],after_update:[],context:new Map(h?h.$$.context:[]),callbacks:n(),dirty:a,skip_bound:!1};let p=!1;if(d.ctx=i?i(e,f,((t,n,...o)=>{const r=o.length?o[0]:n;return d.ctx&&l(d.ctx[t],d.ctx[t]=r)&&(!d.skip_bound&&d.bound[t]&&d.bound[t](r),p&&D(e,t)),n})):[],d.update(),p=!0,o(d.before_update),d.fragment=!!s&&s(d.ctx),r.target){if(r.hydrate){const t=function(t){return Array.from(t.childNodes)}(r.target);d.fragment&&d.fragment.l(t),t.forEach(u)}else d.fragment&&d.fragment.c();r.intro&&B(e.$$.fragment),P(e,r.target,r.anchor),L()}v(h)}class F{$destroy(){q(this,1),this.$destroy=t}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}function J(t){let e,n;const o=t[2].default,r=function(t,e,n,o){if(t){const r=s(t,e,n,o);return t[0](r)}}(o,t,t[1],null);return{c(){e=f("a"),r&&r.c(),m(e,"href",t[0]),m(e,"rel","noopener"),m(e,"target","_blank")},m(t,o){a(t,e,o),r&&r.m(e,null),n=!0},p(t,[i]){r&&r.p&&2&i&&l(r,o,t,t[1],i,null,null),(!n||1&i)&&m(e,"href",t[0])},i(t){n||(B(r,t),n=!0)},o(t){I(r,t),n=!1},d(t){t&&u(e),r&&r.d(t)}}}function U(t,e,n){let{$$slots:o={},$$scope:r}=e,{href:i}=e;return t.$$set=t=>{"href"in t&&n(0,i=t.href),"$$scope"in t&&n(1,r=t.$$scope)},[i,r,o]}class G extends F{constructor(t){super(),R(this,t,U,J,i,{href:0})}}function K(t){let e;return{c(){e=d("Phantomas")},m(t,n){a(t,e,n)},d(t){t&&u(e)}}}function Q(t){let e,n,o,r,i,s,l,h,g,$,y,x,b,v;return h=new G({props:{href:"https://github.com/macbre/phantomas",$$slots:{default:[K]},$$scope:{ctx:t}}}),{c(){e=f("article"),n=f("header"),n.innerHTML="<h1>Technical Details</h1>",o=p(),r=f("p"),r.textContent="The values shown in the list are URL, Total Weight, Content Ratio.",i=p(),s=f("p"),l=d("Websites listed here are downloaded and analyzed with\n "),O(h.$$.fragment),g=d(".\n The total weight is counted and then the size of actual content is measured\n and shown as a ratio."),$=p(),y=f("p"),y.textContent="For example: If a website has a total weight of 100kb and 60kb are the\n documents structure, text, images, videos and so on, then the content ratio\n is 60%. The rest are extras like CSS, JavaScript and so on. It is hard to\n say what a good ratio is but my gut feeling is that everything above 20% is\n pretty good already.",x=p(),b=f("p"),b.innerHTML="<strong>Disclaimer:</strong> Currently, inline scripts and styles are\n measured as content due to technical limitations of Phantomas. This will\n hopefully be fixed soon.",m(e,"id","info-popup")},m(t,u){a(t,e,u),c(e,n),c(e,o),c(e,r),c(e,i),c(e,s),c(s,l),P(h,s,null),c(s,g),c(e,$),c(e,y),c(e,x),c(e,b),v=!0},p(t,[e]){const n={};1&e&&(n.$$scope={dirty:e,ctx:t}),h.$set(n)},i(t){v||(B(h.$$.fragment,t),v=!0)},o(t){I(h.$$.fragment,t),v=!1},d(t){t&&u(e),q(h)}}}class V extends F{constructor(t){super(),R(this,t,null,Q,i,{})}}var X=[{url:"https://koehr.in",contentWeight:23078,extraWeight:66537,stamp:1606004545427},{url:"https://koehr.tech",contentWeight:4964,extraWeight:20108,stamp:1606004547391},{url:"https://sjmulder.nl",contentWeight:2361,extraWeight:0,stamp:1606004663706},{url:"http://cyberia.host",contentWeight:1191,extraWeight:0,stamp:1606004664417},{url:"https://text.npr.org",contentWeight:2760,extraWeight:0,stamp:1606004665037},{url:"https://playerone.kevincox.ca",contentWeight:1904,extraWeight:42661,stamp:1606004665881},{url:"https://dotfilehub.com",contentWeight:961,extraWeight:1281,stamp:1606004667422},{url:"https://manpages.bsd.lv",contentWeight:7045,extraWeight:1346,stamp:1606004669823},{url:"https://danluu.com",contentWeight:2895,extraWeight:0,stamp:1606004670441},{url:"https://gtf.io",contentWeight:2040,extraWeight:2752,stamp:1606004671103},{url:"http://minid.net",contentWeight:4110,extraWeight:0,stamp:1606004672171}];function Y(t,e,n){const o=t.slice();return o[7]=e[n],o}function Z(t,e,n){const o=t.slice();return o[10]=e[n],o}function tt(e){let n,o,r,i,s=e[10]+"";return{c(){n=f("option"),o=d("content-"),r=d(s),n.__value=i=e[10],n.value=n.__value},m(t,e){a(t,n,e),c(n,o),c(n,r)},p:t,d(t){t&&u(n)}}}function et(t){let e,n;return e=new V({}),{c(){O(e.$$.fragment)},m(t,o){P(e,t,o),n=!0},i(t){n||(B(e.$$.fragment,t),n=!0)},o(t){I(e.$$.fragment,t),n=!1},d(t){q(e,t)}}}function nt(t){let e,n=at(t[7].url)+"";return{c(){e=d(n)},m(t,n){a(t,e,n)},p(t,o){4&o&&n!==(n=at(t[7].url)+"")&&$(e,n)},d(t){t&&u(e)}}}function ot(t){let e,n,o,r,i,s,l,h,g,y,b,v,W,_,w,z,k,T,E,C=t[7].size+"",S=t[7].ratio+"";return r=new G({props:{href:t[7].url,$$slots:{default:[nt]},$$scope:{ctx:t}}}),{c(){e=f("li"),n=f("div"),o=f("span"),O(r.$$.fragment),i=p(),s=f("span"),l=d(C),h=d("kb"),g=p(),y=f("span"),b=d(S),v=d("%"),W=p(),_=f("div"),w=p(),z=f("div"),k=p(),m(o,"class","url"),m(s,"class","size"),m(y,"class","ratio"),m(n,"class","entry"),m(_,"class","entry-size-bar"),x(_,"highlighted","size"===t[0]),x(_,"yellow",t[7].size>it),x(_,"red",t[7].size>st),m(z,"class","entry-ratio-bar"),x(z,"highlighted","ratio"===t[0]),x(z,"yellow",t[7].ratio>lt),x(z,"red",t[7].ratio>ct),m(e,"style",T=`--size:${t[7].size};--ratio:${t[7].ratio}%`)},m(t,u){a(t,e,u),c(e,n),c(n,o),P(r,o,null),c(n,i),c(n,s),c(s,l),c(s,h),c(n,g),c(n,y),c(y,b),c(y,v),c(e,W),c(e,_),c(e,w),c(e,z),c(e,k),E=!0},p(t,n){const o={};4&n&&(o.href=t[7].url),8196&n&&(o.$$scope={dirty:n,ctx:t}),r.$set(o),(!E||4&n)&&C!==(C=t[7].size+"")&&$(l,C),(!E||4&n)&&S!==(S=t[7].ratio+"")&&$(b,S),1&n&&x(_,"highlighted","size"===t[0]),4&n&&x(_,"yellow",t[7].size>it),4&n&&x(_,"red",t[7].size>st),1&n&&x(z,"highlighted","ratio"===t[0]),4&n&&x(z,"yellow",t[7].ratio>lt),4&n&&x(z,"red",t[7].ratio>ct),(!E||4&n&&T!==(T=`--size:${t[7].size};--ratio:${t[7].ratio}%`))&&m(e,"style",T)},i(t){E||(B(r.$$.fragment,t),E=!0)},o(t){I(r.$$.fragment,t),E=!1},d(t){t&&u(e),q(r)}}}function rt(t){let e,n,r,i,s,l,x,b,v,W,_,w,z=t[1]?"x":"How does this work?",k=t[3],T=[];for(let e=0;e<k.length;e+=1)T[e]=tt(Z(t,k,e));let C=t[1]&&et(),S=t[2],L=[];for(let e=0;e<S.length;e+=1)L[e]=ot(Y(t,S,e));const M=t=>I(L[t],1,1,(()=>{L[t]=null}));return{c(){e=f("header"),n=d("Sort by:\n "),r=f("select");for(let t=0;t<T.length;t+=1)T[t].c();i=p(),s=f("button"),l=d(z),x=p(),C&&C.c(),b=p(),v=f("ol");for(let t=0;t<L.length;t+=1)L[t].c();void 0===t[0]&&E((()=>t[5].call(r))),m(s,"class","float-right")},m(o,u){a(o,e,u),c(e,n),c(e,r);for(let t=0;t<T.length;t+=1)T[t].m(r,null);y(r,t[0]),c(e,i),c(e,s),c(s,l),a(o,x,u),C&&C.m(o,u),a(o,b,u),a(o,v,u);for(let t=0;t<L.length;t+=1)L[t].m(v,null);W=!0,_||(w=[g(r,"change",t[5]),g(s,"click",t[4])],_=!0)},p(t,[e]){if(8&e){let n;for(k=t[3],n=0;n<k.length;n+=1){const o=Z(t,k,n);T[n]?T[n].p(o,e):(T[n]=tt(o),T[n].c(),T[n].m(r,null))}for(;n<T.length;n+=1)T[n].d(1);T.length=k.length}if(9&e&&y(r,t[0]),(!W||2&e)&&z!==(z=t[1]?"x":"How does this work?")&&$(l,z),t[1]?C?2&e&&B(C,1):(C=et(),C.c(),B(C,1),C.m(b.parentNode,b)):C&&(H(),I(C,1,1,(()=>{C=null})),N()),5&e){let n;for(S=t[2],n=0;n<S.length;n+=1){const o=Y(t,S,n);L[n]?(L[n].p(o,e),B(L[n],1)):(L[n]=ot(o),L[n].c(),B(L[n],1),L[n].m(v,null))}for(H(),n=S.length;n<L.length;n+=1)M(n);N()}},i(t){if(!W){B(C);for(let t=0;t<S.length;t+=1)B(L[t]);W=!0}},o(t){I(C),L=L.filter(Boolean);for(let t=0;t<L.length;t+=1)I(L[t]);W=!1},d(t){t&&u(e),h(T,t),t&&u(x),C&&C.d(t),t&&u(b),t&&u(v),h(L,t),_=!1,o(w)}}}const it=200,st=225,lt=50,ct=25;function at(t){return t.replaceAll(/(^https?:\/\/|\/$)/g,"")}function ut(t,e,n){const o=X.map((t=>{const e=t.contentWeight+t.extraWeight,n=Math.round(e/1024),o=Math.round(100*t.contentWeight/e);return{url:t.url,size:n,ratio:o}})),r=["size","ratio"];let i,s=r[0],l=!1;return t.$$.update=()=>{1&t.$$.dirty&&n(2,i=o.sort(((t,e)=>"size"===s?t.size-e.size:e.ratio-t.ratio)))},[s,l,i,r,function(){n(1,l=!l)},function(){s=function(t){const e=t.querySelector(":checked")||t.options[0];return e&&e.__value}(this),n(0,s),n(3,r)}]}return new class extends F{constructor(t){super(),R(this,t,ut,rt,i,{})}}({target:document.getElementById("members-table")})}();
//# sourceMappingURL=bundle.js.map