From 0988af7bc31b6cfd4f72574e6e42f5c60e6840f6 Mon Sep 17 00:00:00 2001 From: Yevhenii Molodyi Date: Wed, 17 Jul 2024 17:17:36 +0300 Subject: [PATCH] Improve details --- app/app_56005b7d701846dddd94.js | 1 - app/app_881ca916c7b56b5efc6f.js | 1 + index.html | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) delete mode 100644 app/app_56005b7d701846dddd94.js create mode 100644 app/app_881ca916c7b56b5efc6f.js diff --git a/app/app_56005b7d701846dddd94.js b/app/app_56005b7d701846dddd94.js deleted file mode 100644 index 4378c352..00000000 --- a/app/app_56005b7d701846dddd94.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunknews_aggregator=self.webpackChunknews_aggregator||[]).push([[524],{926:(e,t,n)=>{const i=Number.MAX_SAFE_INTEGER,o=10**7,r=Math.floor,s=Math.random;let a=o,l="";const c=()=>{++a===i&&(a=o,l="-"+r(100*s()));const e=a.toString(36);return`${e.at(-1)}${e.at(-2)}${e.at(-3)}${e.slice(0,-3)}${l}`},d=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i{let t;return()=>void 0===t?t=e():t},u=e=>t=>typeof t===e,h=u("string"),m=u("function"),y=u("boolean"),g=u("undefined"),f=u("object"),w=e=>e&&f(e),b=Array.isArray,v=e=>"number"==typeof e&&e-e==0,S=function(e,t){if(void 0===t&&(t=180),!e||!h(e))return"";const n=/\.\s["A-Z]/g,i=[];let o,r,s,a,l,c=0;for(;null!==(r=n.exec(e))&&(o=r.index,s=e.substring(c,o+1),a=i.length-1,l=i[a],l&&l.length+s.length30)););return 0===i.length?e:i.join("\n\n")},C=Object.assign(Object.create(null),{" ":" ",">":">","<":"<",""":'"',"'":"'","&":"&"}),I=new RegExp(Object.keys(C).join("|"),"g"),_=new RegExp("&#(\\d+);?","g"),N=new RegExp("​","g"),k=e=>C[e],x=e=>(h(e)&&e||"").replace(_,((e,t)=>String.fromCharCode(t))).replace(I,k).replace(N,""),T=(e,t)=>S(x(e),t),A=/(.)(?=(\d{3})+$)/g,E=e=>v(e)?e>=1e3?(""+e).replace(A,"$1,"):""+e:void 0,$=[["just now",999],["sec",1e3],["min",6e4],["hour",36e5],["day",864e5],["week",6048e5],["month",2592e6],["year",31536e6]],D=$.length,R=D-1,B=(e,t)=>{const[n,i]=$[t],o=Math.round(e/i);return`${o} ${n}${1===o?"":"s"} ago`},P=(e,t)=>{const n=t||Date.now(),i=Math.abs(e-n);for(let e=0;ev(e)?P(e,t):"",K=e=>h(e)?e.charAt(0).toUpperCase()+e.slice(1):"",M=Array.isArray;var W=n(838);const O=n.n(W)().sanitize,F=e=>O(e,{USE_PROFILES:{html:!0}}),z=e=>h(e)?e.toLowerCase():e,U=e=>h(e)?e.trim():"";var H=n(299);const G="ArrowDown",j="Enter",V="Escape",J="Delete",q="touch",Y=`${q}start`,Z=`${q}move`,X=`${q}end`,Q=`${q}cancel`,ee=()=>{},te=()=>!0,ne=e=>(e||{}).current,ie=(e,t)=>{e&&(e.current=t)},oe=(e,t)=>b(e)?e.map(t):null,re=e=>(e&&m(e.focus)&&e.focus(),e),se=e=>m(e)?e():ne(e),ae=(e,t)=>re(se(e)||se(t)),le=function(e,t){void 0===t&&(t=1e3),setTimeout((()=>ae(e)),t)},ce=e=>(ne(e)||{}).style,de=(e,t)=>{const n=ne(e);n&&m(n.setValue)&&n.setValue(t)},pe=e=>{e.stopPropagation(),e.preventDefault()},ue="testPassive",he=!!(()=>{try{const e=Object.defineProperty({},"passive",{get:function(){return e._r=!0}});return window.addEventListener(ue,null,e),window.removeEventListener(ue,null,e),e._r}catch(e){return!1}})()&&{passive:!0},me="clientX",ye="clientY",ge=e=>t=>(e=>e&&e[0]||{})(t)[e],fe=ge(me),we=ge(ye),be=(e,t)=>n=>n[e]||t(n.targetTouches)||t(n.changedTouches)||0,ve=be(me,fe),Se=be(ye,we),Ce=(e,t)=>{const n=(e||"").split("://")[0];return"https"===n||t&&"http"===n?e:void 0},Ie=()=>window&&window.innerWidth,_e="ontouchstart"in window||!(!navigator||!navigator.maxTouchPoints),Ne=window&&window.innerWidth>380,ke=!_e||Ne,xe=!_e,Te="keydown";let Ae=Object.create(null);const Ee=e=>{if((e.altKey||e.metaKey)&&e.key){const t=Ae[e.key.toUpperCase()];m(t)&&(e.stopImmediatePropagation(),t())}},$e=()=>{(0,H.vJ)((()=>xe?(document.addEventListener(Te,Ee,!1),()=>{Ae=null,document.removeEventListener(Te,Ee,!1)}):void 0),[])},De=Object.is,Re=Object.assign,Be=e=>{let t;const n=new Set,i=(e,i)=>{const o=m(e)?e(t):e;if(!De(o,t)){const e=t;t=(null!=i?i:!f(o)||null===o)?o:Re({},t,o),n.forEach((n=>n(t,e)))}},o=()=>t,r={getState:o,setState:i,subscribe:e=>(n.add(e),()=>n.delete(e))};return t=e(i,o,r),r},Pe=(e,t,n)=>{(0,H.vJ)((()=>e.subscribe(t,n)),[])},Le=(e,t,n)=>{const[i,o]=(0,H.J0)(n);return(0,H.vJ)((()=>e.subscribe(t,o)),[]),i},Ke=()=>({}),Me=()=>(0,H.WO)(Ke),We=e=>{return t=(e=>(t,n,i)=>{const o=i.subscribe;return i.subscribe=(e,t,n)=>{let r=e;if(t){const o=(null==n?void 0:n.equalityFn)||De;let s=e(i.getState());r=n=>{const i=e(n);if(!o(s,i)){const e=s;t(s=i,e)}},null!=n&&n.fireImmediately&&t(s,s)}return o(r)},e(t,n,i)})(e),t?Be(t):Be;var t},Oe=(e,t)=>d(Pe,e,t),Fe=(e,t)=>d(Le,e,t,(()=>t(e.getState()))),ze=e=>[e.setState,e.getState],Ue=(e,t)=>[n=>({[e]:t?{[t]:n}:n}),t=>t[e]],He="IEX",Ge="FMP",je="AV",Ve="NEWS",Je="TNEWS",qe="WEBZ",Ye=Object.create(null),Ze=e=>t=>{Ye[e]=t},Xe={exportSettingsFn:()=>({setAvKey:Ze(je),setIexKey:Ze(He),setFmpKey:Ze(Ge),setNewsKey:Ze(Ve),setTheNewsKey:Ze(Je),setWebzKey:Ze(qe)}),getAvKey:()=>Ye[je],getIexKey:()=>Ye[He],getFmpKey:()=>Ye[Ge],getNewsKey:()=>Ye[Ve],getTheNewsKey:()=>Ye[Je],getWebzKey:()=>Ye[qe]},Qe=Xe,et={NEWS:"NEWS_API_ORG"},tt="CryptoCompare",nt="CoinStats",it="Messari",ot="IEX Cloud",rt="FMP",st="Financial Modeling Prep",at="Alpha Vantage",lt="NewsApi",ct="NewsApi.org",dt="TheNewsAPI",pt="Webz.io",ut="Reddit",ht="DEV Community",mt="StackOverflow",yt=Object.assign,gt=e=>{const{publishedAt:t}=e,n=v(t);return yt(e,{title:F(e.title),description:F(e.description),related:F(e.related),author:F(e.author),publishedAt:n?t:F(t),timeAgo:n?e.timeAgo:F(e.timeAgo)})},ft=e=>t=>{t.articleId=c();const{source:n,author:i}=t||{},{name:o}=n||{};var r,s;return t.source=e,t.author=(void 0===(r=[o,i])&&(r=[]),void 0===s&&(s=", "),M(r)?r.filter(Boolean).join(s):""),t},wt={toArticles:function(e,t){void 0===e&&(e=[]);const n="newsapi_search"===t||"newsapi_top"===t?ft(t):(e=>t=>(t.articleId=c(),t.source=e,t))(t);return e.map((e=>gt(n(e))))},toNews:(e,t)=>{const{source:n}=t,{articles:i,sortBy:o}=e;return{source:n,articles:wt.toArticles(i,n),sortBy:K(o)}}},bt=wt,vt=function(){for(var e=arguments.length,t=new Array(e),n=0;ne:1===t.length?t[0]:e=>t.reduce(((e,t)=>t(e)),e)},St=e=>e<10?"0"+e:""+e,Ct=vt((e=>e.getUTCMonth()+1),St),It=vt((e=>e.getUTCDate()),St),_t=/(\d{4})-(\d{2})-(\d{2})/,Nt=e=>{if(!h(e)||10!==e.trim().length)return!1;const t=e.match(_t);if(null===t||"object"!=typeof t||4!==t.length)return!1;const n=(new Date).getFullYear();return!(t[1].length<4||t[1]<1999||t[1]>n)&&(!(t[2].length<2||t[2]<1||t[2]>12)&&!(t[3].length<2||t[3]<1||t[3]>31))},kt=e=>{const t=new Date;return t.getUTCFullYear()-e+"-"+Ct(t)+"-"+It(t)},xt=()=>{const e=new Date;return e.getUTCFullYear()+"-"+Ct(e)+"-"+It(e)},Tt=e=>(e=>{if(Nt(e)){const t=e.split("-");return Date.UTC(t[0],parseInt(t[1],10)-1,t[2])}})(e)/1e3,At=e=>(e||"").length>12?Date.UTC(e.slice(0,4),parseInt(e.slice(4,6),10)-1,e.slice(6,8),e.slice(9,11),e.slice(11,13)):void 0,Et=e=>{if(!h(e))return;const[t,n]=e.trim().replace("Z","").split("T"),[i,o,r]=(t||"").split("-"),[s,a,l]=(n||"").split(":");return At(`${i}${o}${r}T${s}${a}${Math.round(l)}`)},$t=function(e,t){if(void 0===t&&(t="No Date"),!e)return"";if(v(e))return(e=>{const t=new Date(e),n=t.toTimeString().split(" "),i=t.getUTCFullYear(),o=Ct(t),r=It(t);return`${n[0]} ${r}-${o}-${i}`})(e);const n=h(e)?e.trim().split("T"):[""],i=10===n[0].length?n[0].split("-"):[],o=3===i.length?`${i[2]}-${i[1]}-${i[0]}`:"";return[n[1]&&9===n[1].length?n[1].substring(0,8):"",o].filter(Boolean).join(" ")||t},Dt=e=>"TNT"===e.loadId,Rt=(e,t)=>{let{data:n}=e;const i=Date.now();return b(n)?n.map((e=>{const{title:n,description:o,snippet:r,source:s,categories:a,published_at:l,url:d}=e;return gt({source:t,articleId:c(),title:n,description:o||r,author:s,related:a,publishedAt:l,timeAgo:L(Et(l),i),url:d})})):[]},Bt=e=>{const t=Dt(e)?K(e.category):e.search;return`${dt}: ${t}`},Pt=(e,t)=>v(e)?v(t)?Math.min(e+1,t):e+1:void 0,Lt=e=>{const{page:t,found:n,limit:i}=e||{},o=((e,t)=>v(e)&&v(t)?E(Math.ceil(e/t)):"")(n,i);return[Pt(t,o),o]},Kt=e=>{let{type:t,source:n,itemConf:i,category:o}=e;return{type:t,source:n,itemConf:i,category:o}},Mt=e=>Dt(e)?{...Kt(e),loadId:"TNT",locale:e.locale,domain:e.domain}:{...Kt(e),loadId:"TNS",search:e.search,sortBy:e.sortBy},Wt=(e,t)=>{const{meta:n}=e||{},[i,o]=Lt(n);return i?{nextPage:i,maxPage:o,onPageLoad:()=>xo({nextPage:i,...Mt(t)})}:void 0},Ot={toNews:(e,t)=>{const n=(e=>e.itemConf.paneId)(t);return{source:n,caption:Bt(t),articles:Rt(e,n),page:Wt(e,t)}}},Ft=Ot,zt=Object.assign,Ut=Array.isArray,Ht={W_WEBZ_QUERY:"webz",W_WEBZ_COUNTRY:"webz_country"},Gt=(e,t)=>-1===e.indexOf("\n")?t&&"english"!==t?e:S(e):e.replace(/\n/g,"\n\n"),jt=(e,t,n)=>{const i=[],o=Object.create(null),r=Date.now();return Ut(e)?(e.forEach((e=>{const{title:s="",uuid:a,text:l,published:c,author:d,thread:p}=e,{site_full:u,site:h,site_categories:m}=p||{},y=s.trim();var g;y&&!o[y]&&(i.push(zt(e,{source:t,articleId:a,author:d||u||h,description:Gt(l,n),related:(g=m,(g||[]).filter((e=>-1===(e||"").indexOf("_"))).map(K).join("|")),publishedAt:c,timeAgo:L(c,r)})),o[y]=!0)})),i.map(gt)):i},Vt={toNews:(e,t)=>{const{posts:n,requestsLeft:i}=e||{},{type:o,lang:r}=t||{},s=Ht[o];return{source:s,articles:jt(n,s,r),sortBy:i}}},Jt=Array.isArray,qt=(e,t)=>Jt(e)?e.map((e=>gt(t(e,Date.now())))):[],Yt="dt_topby",Zt=(e,t)=>{const{title:n,user:i,canonical_url:o,tags:r,positive_reactions_count:s,reading_time_minutes:a,published_at:l}=e;return{source:Yt,articleId:c(),title:x(n),description:T(`${s} ${a}min`),author:(i||{}).name,related:r,timeAgo:L(Et(l),t),publishedAt:l,url:o}},Xt=e=>qt(e,Zt),Qt={toNews:(e,t)=>({source:Yt,articles:Xt(e)})},en={SO_TAGGED:"stack_tagged",SO_SEARCH:"stack_search"},tn=Object.assign,nn=(e,t)=>e.map((e=>gt(((e,t)=>{const{title:n,question_id:i,owner:o={}}=e;return tn(e,{articleId:i||c(),source:t,title:F(n),owner:{display_name:F(o.display_name)}})})(e,t)))),on={toNews:(e,t)=>{const{items:n}=e,{type:i}=t,o=en[i];return{source:o,articles:nn(n,o),sortBy:t.tag}}},rn="iex_news",sn="AAPL",an=(e,t)=>e?`$ ${t}`:t,ln=e=>h(e)?e.split(",").join(", "):void 0,cn=e=>{const t=Date.now(),n={};return b(e)?e.reduce(((e,i,o)=>{const{headline:r,source:s,datetime:a,summary:l,related:d,url:p,hasPaywall:u}=i,m=(e=>h(e)?e.trim():"")(s),y=T(l),g={source:rn,articleId:c(),title:r,description:y,related:ln(d),author:an(u,m),publishedAt:a,timeAgo:L(a,t),url:p},f=n[r];if(f){const[t,n,i,o]=f;t===m&&n===y&&(i!e._isNewer)).map(gt):[]},dn=e=>{let{symbol:t=sn}=e;return`${ot}: ${t}`},pn={toNews:(e,t)=>({source:rn,caption:dn(t),articles:cn(e)})},un="fmp_news",hn=e=>{const t=(e||"").split(" "),n=(t[0]||"").split("-").reverse().join("-");return(t[1]||"")+" "+n},mn=(e,t)=>{let{title:n,text:i,symbol:o,site:r,publishedDate:s,url:a}=e;return{source:un,articleId:c(),title:n,description:i,related:o,author:r,publishedDate:hn(s),timeAgo:L(s,t),url:a}},yn={toNews:(e,t)=>({source:un,articles:qt(e,mn)})},gn=Array.isArray,fn="sentiment_score",wn=`ticker_${fn}`,bn=e=>Math.round(100*e)/100,vn=e=>{const t=e.join(", ");return""===t?"":` (${t})`},Sn=(e,t)=>e?`${e} ${t}`:"",Cn=e=>t=>{const n={},i=[],o=[];let r=0,s=0,a=0,l=0,c=0;return t.forEach((t=>{((e,t)=>{const n=t.ticker_sentiment;gn(n)&&n.forEach((t=>{const n=t.ticker;e[n]?e[n].push(t):e[n]=[t]}))})(n,t);const d=bn(t[e]);d>=.35?(r++,i.push(d)):d<.35&&d>=.15?s++:d<.15&&d>-.15?a++:d<=-.15&&d>-.35?l++:d<=-.35&&d>=-1&&(c++,o.push(d))})),[F([Sn(r,`Bullish${vn(i)}`),Sn(s,"Somewhat-Bullish"),Sn(a,"Neutral"),Sn(l,"Somewhat-Bearish"),Sn(c,`Bearish${vn(o)}`)].filter(Boolean).join("\n")),n]},In=Cn(`overall_${fn}`),_n=Cn(wn),Nn=e=>F(`${e} Sentiment Summary`),kn=e=>t=>-1!==t.indexOf(e),xn=kn("Bearish ("),Tn=kn("Bullish ("),An=Array.isArray,En=Object.keys,$n="av_sentiments",Dn=(e,t)=>t.relevance_score===e.relevance_score?t.ticker_sentiment_score-e.ticker_sentiment_score:t.relevance_score-e.relevance_score,Rn=(e,t)=>e+`${bn(t.relevance_score)} ${t.ticker} ${t.ticker_sentiment_label} (${bn(t.ticker_sentiment_score)})\n`,Bn=(e,t)=>{let{title:n,summary:i,source:o,time_published:r,url:s,overall_sentiment_label:a,overall_sentiment_score:l,ticker_sentiment:d}=e;const p=At(r);return{source:$n,articleId:c(),title:n,description:`${T(i)}\n\n ${h=a,m=l,F(`${h} (${bn(m)})`)}\n\n ${u=d,An(u)?F(u.sort(Dn).reduce(Rn,"")):""}`,author:o,timeAgo:L(p,t),publishedAt:p,url:s};var u,h,m},Pn=(e,t)=>t._n-e._n,Ln=e=>En(e).reduce(((t,n)=>{const i=e[n],o=_n(i)[0],r=i.length;return((e,t)=>e>9||xn(t)||Tn(t))(r,o)&&t.push({_n:r,source:$n,articleId:c(),title:Nn(n),description:o}),t}),[]).sort(Pn),Kn=e=>(e=>{const[t,n]=In(e),i=Ln(n);return i.unshift({source:$n,articleId:c(),title:Nn("Overall"),description:t}),i})(e).concat(qt(e,Bn)),Mn={toNews(e,t){const{feed:n}=e||{},{sortBy:i}=t;return{source:$n,articles:Kn(n),sortBy:i}}},Wn=e=>v(e)?1e3*e:void 0,On="cryptocompare_news",Fn=(e,t)=>{let{title:n,body:i,categories:o,url:r,source:s,source_info:a,published_on:l}=e;const{name:d}=a||{},p=Wn(l);return{source:On,articleId:c(),title:n,description:T(i),related:o,author:d||s,timeAgo:L(p,t),publishedAt:p,url:r}},zn=e=>{const{Data:t}=e||{};return qt(t,Fn)},Un={toNews(e,t){const{sortOrder:n}=t;return{source:On,articles:zn(e),sortBy:n}}},Hn="coinstats_news",Gn=e=>(e||[]).map((e=>{let{coinKeyWords:t}=e;return t})).filter(Boolean).join("|"),jn=(e,t)=>{let{title:n,description:i,coins:o,feedDate:r,source:s,link:a}=e;return{source:Hn,articleId:c(),title:n,description:x(i),related:Gn(o),author:s,publishedAt:r,timeAgo:L(r,t),url:a}},Vn=e=>{const{news:t}=e||{};return qt(t,jn)},Jn={toNews(e,t){const{filter:n}=t;return{source:Hn,articles:Vn(e),sortBy:K(n)}}},qn="messari_news",Yn=e=>(e||[]).filter(Boolean).map((e=>`#${e}`)).join(" "),Zn=(e,t)=>{let{title:n,tags:i,published_at:o,url:r,author:s}=e;const{name:a}=s||{};return{source:qn,articleId:c(),title:n,author:a,related:Yn(i),publishedAt:o,timeAgo:L(o,t),url:r}},Xn=e=>{const{data:t}=e||{};return qt(t,Zn)},Qn={toNews:(e,t)=>({source:qn,articles:Xn(e)})},ei="https://www.reddit.com",ti=`${ei}/r`,ni=Array.isArray,ii={getRequestUrl(e){let{subreddit:t,limit:n,t:i,q:o,sort:r}=e;const[s,a]=o?["search.json",`&q=${o}&sort=${r}&restrict_sr=true`]:["top.json",""];return`${ti}/${t||"Amd"}/${s}?limit=${n}&t=${i}${a}`},checkResponse(e,t){const{data:n}=e||{},{children:i}=n||{};return ni(i)}},oi=ii,ri={REDDIT:"rd_topby",REDDIT_SEARCH:"rd_searchby"},si=e=>F(`${ti}/${e}`),ai=e=>{let{subreddit:t,t:n,q:i}=e;return F(`No items were found in r/${t}${i?` for ${i} query `:" "}with ${n} period`)},li=(e,t,n)=>{let{data:i}=t;const{title:o,url:r,selftext:s,link_flair_text:a,domain:l,created_utc:d,author:p,score:u,upvote_ratio:h,permalink:m,num_comments:y}=i,g=Wn(d),f=function(){for(var e=arguments.length,t=new Array(e),n=0;n{const n=U(e),i=U(t);return n&&i&&!((e,t)=>{if("["===e[0]){const n=e.indexOf("]");return-1!==n&&e.slice(1,n).trim()===t}})(n,i)?`${n} (${i})`:n})(o,a),b=`${ei}${m}`;return{source:e,articleId:c(),title:x(w),description:T(s),author:f,related:l,timeAgo:L(g,n),publishedAt:g,url:r,commentsUrl:r===b?void 0:b,numOfComments:v(y)?0===y?"":""+y:""}},ci=(e,t)=>({title:F(e),url:si(t)}),di=e=>{const{subreddit:t,subreddit_subscribers:n}=e,i=x(F(t)),o=E(n);return ci(`r/${i} ${o}`,i)},pi=e=>({source:e,articleId:c()}),ui=(e,t,n)=>{const{data:i}=e||{},{children:o}=i||{},{subreddit:r}=t,s=o.filter((e=>t=>{const{data:n}=t||{};return n&&z(n.subreddit)===e&&!n.over_18&&!n.quarantine&&!n.author_is_blocked})(z(r))),a=qt(s,d(li,n)),l=((e,t)=>{const n=b(e)?e[0]:void 0,{data:i}=n||{};return w(i)?{...di(i),...pi(t)}:void 0})(s,n);return l&&a.unshift(l),0===a.length&&a.unshift({...ci(ai(t),r),...pi(n)}),a},hi={News:bt,TheNews:Ft,Webz:Vt,DevTo:Qt,StackOverflow:on,Iex:pn,Fmp:yn,Av:Mn,CryptoCompare:Un,CoinStats:Jn,Messari:Qn,Reddit:{toNews(e,t){const n=ri[t.type];return{source:n,articles:ui(e,t,n)}}}},mi={crOptionFetch:e=>{const{apiKey:t}=e;return e.apiKey=void 0,{headers:{"x-api-key":t}}},checkResponse:(e,t)=>{const{status:n,message:i}=e;if("error"===n)throw{msg:i};return!0}},yi={getRequestUrl:e=>(e=>{let{source:t,sortBy:n}=e;return`https://newsapi.org/v2/${"top"===n?"top-headlines?":`everything?sortBy=${n}&language=en&`}sources=${t}`})(e),...mi},gi="news",fi=864e5,wi="AU",bi="business",vi=e=>`https://api.webz.io/filterWebContent?token=${e}&order=desc&format=json`,Si=e=>{const{apiKey:t,inTitle:n,siteType:i=gi,beforeDays:o}=e,r=(e=>{const t=parseInt(e,10);return!Number.isNaN(t)&&t<30?Date.now()-t*fi:Date.now()-2*fi})(o||2),s=n||"Weather";return e.apiKey=void 0,`${vi(t)}&sort=crawled&ts=${r}&q=language:english AND thread.title:${s} AND site_type:${i}`},Ci={getRequestUrl:e=>"W_WEBZ_COUNTRY"===e.type?(e=>{const{apiKey:t,country:n=wi,topic:i=bi,lang:o}=e,r=o?`language:${o} AND `:"";return e.apiKey=void 0,`${vi(t)}&q=${r}site_type:news AND country:${n} AND site_category:${i}`})(e):Si(e),checkResponse(e,t){const{status:n,message:i}=e;if("error"===n)throw{msg:i};return!0}},Ii=Array.isArray,_i={getRequestUrl(e){let{tag:t,perPage:n,inRecentDays:i}=e;return`https://dev.to/api/articles?tag=${t}&top=${i}&per_page=${n}`},checkResponse:(e,t)=>Ii(e)},Ni="https://api.stackexchange.com/2.2",ki=Tt(kt(1)),xi=Tt(xt()),Ti="CSS",Ai="week",Ei="CSS",$i="flexbox",Di="votes",Ri={SO_TAGGED:e=>{let{tag:t=Ti,sortBy:n=Ai,fromDate:i=ki,toDate:o=xi}=e;return`${Ni}/questions?page=1&pagesize=50&order=desc&fromdate=${i}&todate=${o}&sort=${n}&tagged=${t}&site=stackoverflow`},SO_SEARCH:e=>{let{tagged:t=Ei,inTitle:n=$i,sortBy:i=Di,fromDate:o=ki,toDate:r=xi}=e;return`${Ni}/search?page=1&pagesize=50&order=desc&fromdate=${o}&todate=${r}&sort=${i}&tagged=${t}&intitle=${n}&site=stackoverflow`}},Bi={getRequestUrl:e=>(0,Ri[e.type])(e),checkResponse(e,t){const{error_message:n,error_name:i=""}=e;if(n)throw{msg:`${i} ${n}`};return!0}},Pi="AAPL",Li="20",Ki={getRequestUrl(e){let{symbol:t=Pi,recent:n=Li,apiKey:i}=e;return`https://cloud.iexapis.com/stable/stock/${t.toLowerCase()}/news/last/${n}?token=${i}`},checkResponse:(e,t)=>!0},Mi={getRequestUrl(e){const{symbol:t="",apiKey:n}=e,i=t?`tickers=${t.toUpperCase()}&apikey=${n}`:`apikey=${n}`;return e.apiKey=void 0,`https://financialmodelingprep.com/api/v3/stock_news?${i}`},checkResponse(e,t){const n=(e||{})["Error Message"];if(n)throw{msg:n};return!0}},Wi=(e,t)=>t?`&${e}=${t}`:"",Oi=Array.isArray,Fi={getRequestUrl(e){const{apiKey:t,tickers:n,topics:i,sortBy:o,limit:r}=e,s=Wi("tickers",n),a=s?"":Wi("topics",i),l=Wi("limit",r);return e.apiKey=void 0,`https://www.alphavantage.co/query?function=NEWS_SENTIMENT${s}${a}${l}&sort=${o}&apikey=${t}`},checkResponse(e,t){const{feed:n}=e||{};return Oi(n)}},zi={getRequestUrl:e=>{let{symbol:t="Weather",sortBy:n="relevancy"}=e;return`https://newsapi.org/v2/everything?q=${t}&sortBy=${n}`},...mi},Ui={getRequestUrl:e=>{const{category:t,country:n}=e;return`https://newsapi.org/v2/top-headlines?category=${t}&country=${n}`},...mi},Hi=(e,t)=>{const{apiKey:n,nextPage:i}=t,o=(e=>Wi("page",e))(i);return t.apiKey=void 0,`https://api.thenewsapi.com/v1/news/${e}?api_token=${n}${o}&limit=3&language=en`},Gi=(e,t)=>"all"===t?"":Wi(e,t),ji=()=>!0,Vi="ALL_NEWS_FEEDS",Ji="ALL_NEWS_CATEGORIES",qi="latest",Yi="latest",Zi="https://data.messari.io/api/v1/news",Xi="title,tags,published_at,url,author/name",Qi={News:yi,Webz:Ci,DevTo:_i,StackOverflow:Bi,Iex:Ki,Fmp:Mi,Av:Fi,NewsSearch:zi,NewsTop:Ui,CryptoCompare:{getRequestUrl(e){const{feed:t=Vi,category:n=Ji,sortOrder:i=qi}=e;return`https://min-api.cryptocompare.com/data/v2/news/?feeds=${t}&categories=${n}&sortOrder=${i}`},checkResponse:(e,t)=>!0},CoinStats:{getRequestUrl(e){const{filter:t=Yi}=e;return e.filter=t,`https://api.coinstats.app/public/v1/news/${t}/?skip=0&limit=20`},checkResponse:(e,t)=>!0},Messari:{getRequestUrl(e){let{assetKey:t}=e;return t&&"all"!==t?`${Zi}/${t}?fields=${Xi}`:`${Zi}?fields=${Xi}`},checkResponse:(e,t)=>!0},TheNewsSearch:{getRequestUrl(e){const{search:t,category:n,sortBy:i}=e,o=Gi("categories",n);return`${Hi("all",e)}${o}&search=${t}&sort=${i}`},checkResponse:ji},TheNewsTop:{getRequestUrl:e=>{const{category:t,locale:n,domain:i}=e,o=Gi("categories",t),r=Gi("domains",i),s=Gi("locale",n);return`${Hi("top",e)}${s}${o}${r}`},checkResponse:ji},Reddit:oi},eo="Key is not set. \nPlease, set and try again.",to=(e,t,n)=>({apiKey:!m(n)||n(),api:Qi[e],adapter:hi[e],msgErr:t}),no=()=>({apiKey:Qe.getNewsKey(),adapter:hi.News,msgErr:`${ct} ${eo}`}),io=()=>({apiKey:Qe.getTheNewsKey(),adapter:hi.TheNews,msgErr:`${dt} ${eo}`}),oo={getApiConf:e=>{switch(e){case"N":return{...no(),api:Qi.News};case"NS":return{...no(),api:Qi.NewsSearch};case"NT":return{...no(),api:Qi.NewsTop};case"TNS":return{...io(),api:Qi.TheNewsSearch};case"TNT":return{...io(),api:Qi.TheNewsTop};case"W":return to("Webz",`${pt} API ${eo}`,Qe.getWebzKey);case"RD":return to("Reddit",`${ut} API ${eo}`);case"DT":return to("DevTo",`${ht} API ${eo}`);case"SO":return to("StackOverflow",`${mt} API ${eo}`);case"IEX":return to("Iex",`${ot} API ${eo}`,Qe.getIexKey);case"FMP":return to("Fmp",`${rt} API ${eo}`,Qe.getFmpKey);case"AV":return to("Av",`${at} API ${eo}`,Qe.getAvKey);case"CCN":return to("CryptoCompare",`${tt} News API ${eo}`);case"CS":return to("CoinStats",`${nt} API ${eo}`);case"MS":return to("Messari",`${it} Blockchain News API ${eo}`);default:return{msgErr:"Unknow news API provider"}}}};let ro,so;const ao=function(e){let{uri:t,optionFetch:n,option:i,onCheckResponse:o,onFetch:r,onCompleted:s,onFailed:a,onCatch:l}=e;const c=Date.now();c-so<5e3?a(ro!==t?{msg:"Time request frequency restriction.\n1 Request per 5 second."}:{msg:"Request has already loaded.\n1 Request per 5 second."}):(ro=t,so=c,fetch(t,n).then((e=>{const{status:t,statusText:n}=e;if(404===t)throw{msg:`Not Found ${t}`};if(t>=500&&t<600)throw{msg:`Response Error ${t} : ${n}`};return Promise.all([Promise.resolve(t),e.json()])})).then((e=>{let[t,n]=e;o(n,i)&&r({json:n,option:i,onCompleted:s})})).catch((e=>{l({error:e,option:i,onFailed:a})})))},lo=e=>{let{error:t,onFailed:n}=e;n(t)},co=e=>t=>{let{json:n,option:i,onCompleted:o}=t;o({news:e.toNews(n,i),itemConf:i.itemConf})},po=(e,t,n)=>{const{api:i,adapter:o}=e;ao({uri:i.getRequestUrl(e),optionFetch:m(i.crOptionFetch)?i.crOptionFetch(e):void 0,option:e,onCheckResponse:i.checkResponse,onFetch:co(o),onCompleted:t,onCatch:lo,onFailed:n})},uo="LOADING",ho="LOADING_COMPLETE",mo="LOADING_FAILED",yo=(e=>{const t=Object.create(null);return t.value=e,{useAtomValue:()=>(t.rerender=Me()[1],t.value),setValue:e=>{const n=t.value,i=t.rerender;t.value=((e,t)=>m(t)?t(e):t)(n,e),n!==t.value&&m(i)&&i()}}})(),go=yo.setValue,fo=yo.useAtomValue,wo=Object.assign,bo={},[vo,So]=Ue("msItem"),Co=We((()=>({...vo()}))),[Io]=ze(Co),_o=Oe(Co,So),No=e=>{let{news:t,itemConf:n}=e;if(t){const e=((e,t)=>{const{source:n,articles:i=[],sortBy:o,caption:r,page:s,isRelatedBars:a}=t;return e[n]=e[n]?i.concat(e[n]):i,{isAdd:!0,id:n,data:e[n],sortBy:o,caption:r,page:s,isRelatedBars:a}})(bo,t);Io({msItem:e})}go(ho)},ko=e=>{xu(e),go(mo)},xo=function(e){void 0===e&&(e={});const{itemConf:t,loadId:n}=e,{apiKey:i,adapter:o,api:r,msgErr:s}=oo.getApiConf(n||"N");i?(Lu(t),go(uo),wo(e,{apiKey:i,adapter:o,api:r}),po(e,No,ko)):ko({msg:s})},To=e=>{((e,t)=>{const{articleId:n,source:i}=t;e[i]=e[i].filter((e=>e.articleId!==n))})(bo,e)},Ao=e=>{const t=((e,t)=>(e[t]=[],{isUpdate:!0,id:t,data:e[t],sortBy:""}))(bo,e);Io({msItem:t})},Eo=e=>{const t=((e,t)=>{const{articleId:n,source:i}=t,o=e[i].findIndex((e=>e.articleId===n));return e[i]=e[i].slice(o+1),{isUpdate:!0,id:i,data:e[i]}})(bo,e);Io({msItem:t})},$o={margin:-1,fontSize:"1.125rem"},Do={...$o,textAlign:"center"},Ro={marginRight:2,marginLeft:2},Bo={display:"inline-block",width:110},Po={margin:"16px 0 8px 16px"},Lo="calc(190px + 4rem)",Ko={display:"block",width:Lo},Mo=function(e){return void 0===e&&(e=Lo),{width:e}},Wo=()=>{},Oo=function(e){void 0===e&&(e=Wo);const t=(0,H.li)(null);return[t,(0,H.hb)((()=>{const{current:n}=t;n&&n.focusPrevEl&&n.focusPrevEl(),e()}),[])]},Fo=e=>b(e)?e[0]:"",zo=e=>{const t=b(e)?h(e[1])?e[1]:e[0]:void 0;return h(t)?t.trim():t},Uo=e=>[K(e),e],Ho=e=>[e,e],Go=e=>{const t=(0,H.li)(e||null),n=(0,H.hb)((e=>{t.current=zo(e)}),[]);return[t,n]},jo=()=>{},Vo=function(e,t){return void 0===e&&(e=jo),void 0===t&&(t=jo),(0,H.hb)((n=>{const{keyCode:i}=n;13===i?e():27===i&&t()}),[])},Jo="select-none",qo=`menu-more__item ${Jo}`,Yo=`row__news-source ${Jo}`,Zo="#121212",Xo={color:Zo},Qo={display:"block"},er={display:"inline-block"},tr={display:"none"},nr=e=>b(e)?e[0]?e[1]:"":e||"",ir=(e,t)=>{const n=nr(e),i=nr(t);return n?i?`${n} ${i}`:n:i||void 0},or=(e,t)=>t?{...e,...t}:e,rr=e=>e?Qo:tr,sr="show-popup",ar=e=>(t,n)=>t?[ir(n,sr),e]:[n,tr],lr=ar(Qo),cr=ar(er),dr=e=>ir(e,"c-bg"),pr=e=>dr(ir("pane",e)),ur=e=>ir(e,"panel-shadow"),hr=e=>ir(ur("popup-menu"),e),mr=e=>ir(e,"with-scroll");var yr=n(172);var gr=0;Array.isArray;function fr(e,t,n,i,o,r){t||(t={});var s,a,l=t;if("ref"in l)for(a in l={},t)"ref"==a?s=t[a]:l[a]=t[a];var c={type:e,props:l,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--gr,__i:-1,__u:0,__source:o,__self:r};if("function"==typeof e&&(s=e.defaultProps))for(a in s)void 0===l[a]&&(l[a]=s[a]);return yr.fF.vnode&&yr.fF.vnode(c),c}const wr=pr("browser-pane"),br=e=>{let{isShow:t,style:n,onKeyDown:i,children:o}=e;const[r,s]=lr(t,wr);return fr("div",{className:r,style:{...n,...s},role:"presentation",onKeyDown:i,children:o})},vr=(e,t)=>t?`${e||""} [${t.toLowerCase()}]`:e,Sr=(e,t,n)=>_e?[]:[vr(e,n),t],Cr=e=>{let{w:t,h:n=t,children:i,...o}=e;return fr("svg",{width:`${t}px`,height:`${n}px`,"aria-hidden":"true",role:"img",...o,xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"none",viewBox:`0 0 ${t} ${n}`,children:i})},Ir="r",_r={fill:"inherit",stroke:"inherit"},Nr=e=>{let{cy:t}=e;return fr("circle",{cx:"3",cy:t,r:"2.5"})},kr=e=>{let{btRef:t,className:n,onClick:i}=e;const[o,r]=Sr("More","tl");return fr("button",{ref:t,type:"button","aria-label":o,"data-pos":r,className:n,onClick:i,children:fr(Cr,{w:"6",h:"24",style:_r,children:[fr(Nr,{cy:"4"}),fr(Nr,{cy:"12"}),fr(Nr,{cy:"19"})]})})},xr=e=>{let{children:t,...n}=e;return fr(Cr,{...n,width:"100%",height:"100%",children:t})},Tr="bt-svg-x",Ar={padding:3,stroke:"inherit"},Er=e=>{let{dataPos:t,className:n=Tr,style:i,onClick:o}=e;const[r,s]=Sr("Close",t||"cl");return fr("button",{type:"button","aria-label":r,"data-pos":s,tabIndex:"-1",className:n,style:i,onClick:o,children:fr(xr,{w:"12",style:Ar,strokeLinecap:"round",strokeWidth:"2",children:[fr("path",{d:"M 0,0 L 12,12"}),fr("path",{d:"M 12,0 L 0,12"})]})})},$r={fontSize:"1.125rem",fontWeight:"bold"},Dr=e=>{let{style:t,caption:n,children:i,onMore:o,onClose:r}=e;return fr("div",{className:"br-caption gap-right",style:t,children:[m(o)&&fr(kr,{className:"bt-svg-more bt-svg-menu",onClick:o}),fr("span",{className:Jo,style:$r,children:n}),i,fr(Er,{className:"bt-svg-x bt-svg-close",onClick:r})]})},Rr=(e,t,n)=>{(0,H.vJ)((()=>{const i=ne(e);return _e&&i&&i.addEventListener(t,n,he),()=>{_e&&i&&i.removeEventListener(t,n,he)}}),[t,n,e])},Br=e=>{let{style:t,className:n,onScroll:i,children:o}=e;const r=(0,H.li)();return Rr(r,"scroll",i),fr("div",{ref:r,className:mr(n),style:t,children:o})},Pr=e=>{let{style:t,isFailed:n}=e;return fr("span",{style:t,"data-loader":n?"circle-failed":"circle"})},Lr=e=>{let{keyCode:t}=e;return 13===t||32===t},Kr=(e,t)=>(0,H.Kr)((()=>m(e)?t=>{Lr(t)&&e(t)}:void 0),t||[]),Mr=e=>{let{refEl:t,className:n,style:i,caption:o,children:r,onClick:s}=e;return fr("div",{ref:t,role:"menuitem",tabIndex:"0",className:n,style:i,onClick:s,onKeyDown:Kr(s),children:o||r})},Wr=e=>{let{isShow:t,withoutAnimation:n,isScrollable:i,className:o,style:r,children:s,...a}=e;return fr("div",{className:ir(o,[t&&!n,sr]),style:or(r,t?Qo:tr),"data-scrollable":i?"true":void 0,...a,children:s})},Or=(0,H.ph)((e=>{let{items:t,crItem:n,...i}=e;return oe(t,((e,t)=>n(e,t,i)))})),Fr=Or,zr={Browser:br,BrowserCaption:Dr,ScrollPane:Br,SpinnerLoading:Pr,MenuItem:Mr,ShowHide:Wr,ItemStack:Fr},Ur=zr,Hr=e=>{let{ariaLabel:t,dataPos:n,caption:i,className:o,style:r,onClick:s}=e;const[a,l]=Sr(t,n);return fr("button",{type:"button","aria-label":a,"data-pos":l,className:ir("bt-circle select-none",o),style:r,onClick:s,children:i||""})},Gr=(e,t)=>{(0,H.vJ)((()=>xe&&e?(((e,t)=>{Ae&&(Ae[e]=t)})(e,t),()=>(e=>Ae&&(Ae[e]=void 0))(e)):void 0),[])},jr=(e,t,n,i)=>(Gr(n,i),Sr(e,t,n)),Vr={textDecoration:"underline"},Jr=e=>{let{caption:t,keyIndex:n}=e;const[i,o,r]=((e,t)=>[e.substring(0,t),e.substring(t,t+1),e.substring(t+1)])(t,n);return fr(yr.FK,{children:[fr("span",{children:i}),fr("span",{style:Vr,children:o}),fr("span",{children:r})]})},qr=e=>{let{className:t,style:n,caption:i,hotKey:o,children:r}=e;const s=((e,t)=>t&&e?e.toUpperCase().indexOf(t):-1)(i,o),a=_e||-1===s?i||"":fr(Jr,{caption:i,keyIndex:s});return fr("span",{className:t,style:n,children:[a,r]})},Yr="bt-flat",Zr=`${Yr}__div`,Xr=`${Yr}__span`,Qr=e=>{let{ariaLabel:t,dataPos:n,className:i,style:o,clDiv:r,caption:s,hotKey:a,children:l,onClick:c}=e;const[d,p]=jr(t,n,a,c);return fr("button",{type:"button","aria-label":d,"data-pos":p,className:ir(Yr,i),style:o,onClick:c,children:fr("div",{className:Zr,children:[s?fr(qr,{className:Xr,caption:s,hotKey:a}):null,l]})})},es="bt-flat",ts=`${es}__div`,ns=`${es}__span`,is=e=>{let{ariaLabel:t,dataPos:n,style:i,caption:o,hotKey:r,children:s,onClick:a}=e;const[l,c]=jr(t,n,r,a);return fr("button",{type:"button","aria-label":l,"data-pos":c,className:es,style:i,onClick:a,children:fr("div",{className:ts,children:fr(qr,{className:ns,caption:o,hotKey:r,children:s})})})},os="bt-raised",rs=`${os}__div`,ss=`${os}__span`,as=e=>{let{refBt:t,isPrimary:n,style:i,caption:o,hotKey:r,onClick:s}=e;return fr("button",{ref:t,type:"button",className:os,style:i,onClick:s,children:fr("div",{className:rs,children:fr(qr,{className:ss,style:n?Xo:void 0,caption:o,hotKey:r})})})},ls={CircleButton:Hr,FlatButton:Qr,ModalButton:is,RaisedButton:as},cs=ls,ds=e=>{const t=(0,H.li)(null);return null===t.current&&(t.current=e()),t.current},ps=e=>ds((()=>e||c())),us=e=>{const[t,n]=(0,H.J0)((()=>!!e));return[t,...(0,H.Kr)((()=>[()=>n(!0),()=>n(!1)]),[])]},hs=e=>{let{is:t,mls:n,children:i}=e;const[o,r]=(0,H.J0)(t);return(0,H.vJ)((()=>{t?setTimeout((()=>r(!0)),n):r(!1)}),[t,n]),t&&o?fr(yr.FK,{children:i}):null},ms="m-select",ys=`${ms}__label`,gs=`${ms}__div`,fs=`${ms}__div__value`,ws=`${ms}__div__bt`,bs=`${ms}__line`,vs=mr(`${ms}__options`),Ss=`${ms}__item`,Cs="m-input",Is="m-textfield-input",_s=`${Is}__div`,Ns=`${Cs}__line`,ks=`${Cs}__msg-err`,xs="bt-svg-clear",Ts={right:"calc(15px - 1rem)"},As={position:"absolute",top:25,right:15,stroke:Zo},Es=(0,H.ph)((e=>{let{is:t,onClick:n}=e;return fr(hs,{is:t,mls:700,children:fr(Er,{className:xs,style:As,onClick:n})})})),$s=Es,Ds={transform:"scale(1) translate(0px, -6px)"},Rs={color:"#f44336"},Bs={borderBottom:"2px solid #f44336"},Ps=e=>e.target.value,Ls=(e,t)=>e?t.trim():t,Ks=e=>{let{refEl:t,style:n,inputStyle:i,inputCn:o,caption:r,id:s,isTrimValue:a=!0,initValue:l,maxLength:c="20",autoCapitalize:d="off",errorMsg:p="",hasClear:u=!0,children:h,onTest:m=te,onEnter:y=ee,onBlur:g=ee,onInputChange:f=ee,onKeyDown:w=ee,...b}=e;const v=ps(s),S=(0,H.li)(),[C,I]=(0,H.J0)(l||""),[_,N]=(0,H.J0)((()=>m(l||""))),[k,x,T]=us(),[A,E]=(0,H.Kr)((()=>[(e,t)=>{const n=Ps(e);m(n)&&t(Ls(a,n),s,e)},e=>{I(""),f("",s)}]),[a,f]),[$,D,R]=(0,H.Kr)((()=>[e=>{A(e,g),T()},e=>{const t=Ps(e),n=m(t);I(t),N(n),n&&f(Ls(a,t),s)},e=>{const t=e.key;t===J||t===V?E(e):t===j?A(e,y):w(e)}]),[a,f]);(0,H.Yn)(t,(()=>({getValue:()=>Ls(a,String(C)),setValue:I,focus:()=>ae(S)})),[a,C]);const B=C||k?void 0:Ds,[P,L]=_?[]:[Rs,Bs],K=_e&&u&&C;return fr("div",{className:ms,style:n,children:[fr("label",{className:ys,style:{...B,...P},htmlFor:v,children:r}),fr("div",{className:_s,children:[fr("input",{ref:S,id:v,type:"text",className:ir(Is,o),style:i,value:C,autoComplete:"off",autoCorrect:"off",autoCapitalize:d,spellCheck:"false",translate:"no",maxLength:c,onFocus:x,onBlur:$,onChange:D,onKeyDown:R,...b}),fr($s,{is:K,onClick:E}),h,fr("div",{className:Ns,style:L}),L&&fr("div",{className:ks,children:p})]})]})},Ms=e=>{const t=(0,H.li)(e);return(0,H.Kr)((()=>[e=>{t.current=e},()=>t.current]),[])},Ws={transform:"scale(1) translate(0px, -6px)"},Os={color:"#f44336"},Fs={borderBottom:"2px solid #f44336"},zs={borderBottom:"2px solid #80c040"},Us=()=>{},Hs=()=>!0,Gs=e=>{let{refEl:t,style:n,caption:i,name:o="pwd",maxLength:r="32",errorMsg:s="",onTest:a=Hs,onEnter:l=Us}=e;const c=ds((()=>(e=>e+"_"+Math.random().toString(36).substr(2,6))(o))),d=(0,H.li)(),[p,u]=Ms(!1),[h,m]=Ms(!1),[y,g]=(0,H.J0)({value:""}),{value:f}=y,w=Me()[1];(0,H.vJ)((()=>{const e=setTimeout((()=>{const e=d.current;e&&e.hasAttribute("value")&&e.removeAttribute("value")}));return()=>clearTimeout(e)})),(0,H.vJ)((()=>{u()&&p(!1)})),(0,H.Yn)(t,(()=>({setWasEnter:()=>{p(!0),w()},getValue:()=>{const e=d.current;return e&&e.value},clear:()=>{p(!0),g({value:""})}})));const b=(I=d.current)&&I.value||m()?void 0:Ws,v=a(f),S=v?void 0:Os,C=v?u()?zs:void 0:Fs;var I;return fr("form",{className:ms,style:n,children:[fr("label",{className:ys,style:{...b,...S},htmlFor:c,children:i}),fr("div",{className:_s,children:[fr("input",{hidden:!0,autoComplete:"username",value:o,readOnly:!0}),fr("input",{ref:d,id:c,type:"password",autoComplete:"current-password",className:Is,maxLength:r,value:f,onChange:e=>{g({value:e.target.value.trim()})},onKeyDown:e=>{46===e.keyCode?g({value:""}):13===e.keyCode&&(pe(e),l(e.target.value),p(!0),w())},onFocus:()=>{h(!0),w()},onBlur:()=>{h(!1),w()}}),_e&&f&&fr("button",{type:"button",className:xs,onClick:e=>{pe(e),g({value:""})},children:"x"}),fr("div",{className:Ns,style:C}),!v&&fr("div",{className:ks,children:s})]})]})},js=(e,t)=>{const n=ps();return[n,{role:"combobox","aria-autocomplete":t?"list":"none","aria-expanded":e,"aria-controls":e?n:void 0}]},Vs=()=>fr(Cr,{w:"24",children:fr("path",{d:"M7 10l5 5 5-5z"})}),Js=e=>{let{refEl:t,style:n,onKeyDown:i,onClick:o}=e;return fr("button",{ref:t,type:"button",className:ws,style:n,onKeyDown:i,onClick:o,children:fr(Vs,{})})},qs=(e,t)=>{ne(t)&&(document.removeEventListener("click",e,!0),t.current=null)},Ys=(e,t)=>{const n=(0,H.li)(null),i=(0,H.li)(null),o=(0,H.hb)((e=>{const i=ne(n)||{};i.contains&&!i.contains(e.target)&&(e.stopPropagation(),t())}),[]);return(0,H.vJ)((()=>{e&&!i.current?(document.addEventListener("click",o,!0),i.current=!0):e||qs(o,i)})),(0,H.vJ)((()=>()=>qs(o,i)),[]),n},Zs=(e,t)=>ke?(0,H.hb)((n=>{n&&27===n.keyCode&&(e(),t||n.stopPropagation())}),[]):ee,Xs=dr(),Qs=e=>{let{isShow:t,style:n,children:i,onClose:o}=e;const r=Ys(t,o),s=Zs(o);return fr("div",{role:"presentation","aria-hidden":!t,ref:r,className:Xs,style:n,onKeyDown:t?s:void 0,children:i})},ea={block:"center",behavior:"smooth"},ta=e=>t=>{const n=(ne(t)||{})[e];n&&(n.scrollIntoView(ea),n.focus(),ie(t,n))},na=ta("nextSibling"),ia=ta("previousSibling"),oa=e=>{const t=(0,H.li)();return[t,(0,H.hb)((n=>{n.key===G?(pe(n),na(t)):"ArrowUp"===n.key?(pe(n),ia(t)):n.key!==V&&"Tab"!==n.key||e()}),[])]},ra=e=>({id:e,role:"listbox","aria-label":"Suggestions"}),sa=(e,t,n)=>{let{refFirstItem:i,refItem:o,currentItem:r,clItem:s,onSelect:a}=n;const l=Fo(e),c=zo(e),[d,p,u]=c===(r&&zo(r))?["0",o,"true"]:["-1"],h=0===t?p||i:p;return(0,yr.n)("div",{...(m=u,y=d,{role:"option","aria-selected":m,tabIndex:y}),key:c,ref:e=>{h&&ie(h,e)},className:s,onClick:t=>a(e,t),onKeyDown:t=>{t.key===j&&a(e,t)}},l);var m,y},aa=e=>{let{refOp:t,id:n,isShow:i,isFocusItem:o=!0,className:r,style:s,options:a,item:l,clItem:c,onSelect:d,onClose:p}=e;const u=(0,H.li)(null),h=(0,H.li)(null),[m,y]=oa(p);return(0,H.Yn)(t,(()=>({hKeyDown:y})),[]),(0,H.vJ)((()=>{i&&o&&ie(m,ae(h,u))}),[i,o]),fr(Qs,{isShow:i,onClose:p,children:fr(Wr,{...ra(n),isScrollable:!0,isShow:i,className:r,style:s,onKeyDown:y,children:fr(Fr,{items:a,crItem:sa,refFirstItem:u,refItem:h,currentItem:l,clItem:c,onSelect:d})})})},la={...Ts,top:"calc(17px - 1rem)"},ca=["",""],da=e=>{let{id:t,style:n,initItem:i,caption:o,options:r,onSelect:s}=e;const a=(0,H.li)(),[l,c]=(0,H.J0)(i||ca),[d,p]=(0,H.J0)(!1),[u,h]=js(d),[m,y]=(0,H.Kr)((()=>[e=>{pe(e),p(!0)},()=>{p(!1),ae(a)}]),[]),[g,f]=(0,H.Kr)((()=>[(e,n)=>{pe(n),s(e,t),y(),c(e)},e=>{e.key===G&&m(e)}]),[]);return fr("div",{...h,tabIndex:"-1",className:ms,style:n,onClick:m,onKeyDown:f,children:[fr("label",{className:ys,children:o}),fr(aa,{id:u,isShow:d,className:vs,item:l,options:r,clItem:Ss,onSelect:g,onClose:y}),fr("div",{className:gs,children:[fr("div",{className:fs,children:Fo(l)}),fr(Js,{refEl:a,style:la}),fr("div",{className:bs})]})]})},pa={TextField:Ks,PasswordField:Gs,InputSelect:da},ua=Date.now||(()=>new Date.getTime),ha=function(e,t){void 0===t&&(t=800);let n=0;return function(){const i=ua();if(i-n>t)return n=i,e(...arguments)}},ma=(e,t,n)=>(0,H.hb)(ha(e,n),t||[]),ya=()=>{const e=(0,H.li)(!0),{current:t}=e;return e.current=!1,t},ga=Array.isArray,fa=(e,t,n)=>{const i=(0,H.li)(),o=(0,H.li)(),r=t||i,s=n||o;return[(0,H.Kr)((()=>ga(e)?t=>{const n=e.length-1;return((e,t,n,i)=>0===i?e:i===n?t:void 0)(r,s,n,t)}:void 0),[e,r,s]),s,r]},wa=(e,t)=>(0,H.hb)((()=>ne(e)||ne(t)),[]),ba=(e,t,n)=>{(0,H.vJ)((()=>{e&&le(t,n)}),[e,t,n])},va=e=>{let{style:t,onFocus:n}=e;return fr("div",{style:t,tabIndex:"0","aria-hidden":"true",onFocus:n})},Sa=e=>{let{refEl:t,refFirst:n,refLast:i,style:o,children:r}=e;return ke?fr(yr.FK,{children:[fr(va,{style:o,onFocus:()=>{ae(i,t)}}),r,fr(va,{style:o,onFocus:()=>{ae(n,t)}})]}):r},Ca={position:"relative"},Ia={position:"absolute",top:0,left:16},_a={paddingLeft:16},Na=e=>{let{refTitle:t,titleCl:n,title:i,onClick:o}=e;return i?fr(Mr,{refEl:t,className:n,style:Ca,onClick:o,children:[fr("span",{style:Ia,children:"<"}),fr("span",{style:_a,children:i})]}):null},ka={position:"relative"},xa={display:"inline-block",position:"absolute",top:0,right:4,color:"inherit",padding:"1px 16px 1px 0px",fontWeight:"bold"},Ta=(e,t,n)=>m(t)?e?()=>{t(),n()}:t:void 0,Aa=e=>{let{getFocusRef:t,items:n,itemCl:i,pageNumber:o,onNextPage:r,onClose:s}=e;return fr(yr.FK,{children:oe(n,((e,n)=>{let{cn:a,name:l,type:c,id:p,isClose:u,onClick:h}=e;const[m,y]="sub"===c?[d(r,p,l,o),fr("span",{style:xa,children:">"})]:[Ta(u,h,s),null];return fr(Mr,{refEl:t(n),className:a||i,style:ka,onClick:m,children:[fr("span",{children:l}),y]},l)}))})},Ea=[],$a=e=>{let{isVisible:t,items:n=Ea,style:i,title:o,titleCl:r,itemCl:s,pageNumber:a,onClose:l,children:c,onNextPage:d,onPrevPage:p}=e;const u=(0,H.li)(),[h,m,y]=fa(n),g=wa(u,y),f=(0,H.hb)((()=>{p(a)}),[p,a]);return ba(t,g),fr("div",{style:i,children:fr(Sa,{refFirst:g,refLast:m,children:[fr(Na,{refTitle:u,titleCl:r,title:o,onClick:f}),fr(Aa,{getFocusRef:h,items:n,itemCl:s||r,pageNumber:a,onNextPage:d,onClose:l}),c]})})},Da=e=>{let{isShow:t,style:n,pages:i,pageCurrent:o,onNextPage:r,onPrevPage:s,onClose:a}=e;return oe(i,((e,i)=>(0,H.Ob)(e,{isShow:t,pageCurrent:o,style:n,pageNumber:i+1,isVisible:t&&o===i+1,onNextPage:0===i?r:void 0,onPrevPage:0!==i?s:void 0,onClose:a})))},Ra={position:"absolute",overflow:"hidden"},Ba={display:"flex",flexFlow:"row nowrap",alignItems:"flex-start",overflowX:"hidden",transition:"all 750ms ease-out"},Pa={pageWidth:100,maxPages:2,initId:"p0",p0:[]},La=e=>{const t=e.pageWidth,n=e.maxPages,i=e.initId||"p0";return{pageWidth:t,pagesStyle:{width:n*t+"px"},pageStyle:{width:`${t}px`},pageCurrent:1,pages:[fr($a,{items:e[i],titleCl:e.titleCl,itemCl:e.itemCl},i)]}},Ka=(e,t,n,i)=>{e.push(fr($a,{title:n,items:i[t],titleCl:i.titleCl,itemCl:i.itemCl},t))},Ma=(e,t)=>({transform:`translateX(${-1*e*(t-1)+0}px)`}),Wa={ModalSlider:e=>{let{model:t=Pa,isShow:n,className:i,rootStyle:o,style:r,onClose:s}=e;const[a,l]=(0,H.J0)((()=>La(t))),{pageWidth:c,pagesStyle:d,pageStyle:p,pageCurrent:u,pages:h}=a,m=ma((e=>{l((t=>(t.pageCurrent=e-1,{...t})))})),y=ma(((e,n,i)=>{l((o=>{const{pages:r}=o;return r.length-1+1>i?r[i]&&r[i].key!==e&&(i>0?o.pages.splice(i):o.pages=[],Ka(o.pages,e,n,t)):Ka(r,e,n,t),o.pageCurrent=i+1,{...o}}))}),[t]),g=ya();(0,H.vJ)((()=>{g||l(La(t))}),[t]);const f={...r,...Ra,...p},w={...Ba,...d,...Ma(c,u)};return fr(Qs,{isShow:n,style:o,onClose:s,children:fr(Wr,{className:i,style:f,isShow:n,children:fr("div",{style:w,children:fr(Da,{isShow:n,style:p,pages:h,pageCurrent:u,onNextPage:y,onPrevPage:m,onClose:s})})})})}},Oa=e=>!!e,Fa=(e,t)=>y(t)?t:!e,za=e=>(0,H.WO)(Fa,e,Oa),Ua=Object.assign,Ha=Array.isArray,Ga=!_e,ja=!!_e&&he,[Va,Ja,qa,Ya]=_e?[Y,Z,Q,X]:["mousedown","mousemove","mouseleave","mouseup"],Za=e=>t=>parseInt(t[e],10),Xa=Za("top"),Qa=Za("left"),el=(e,t)=>e>0?e>t?t-16:e:8,tl=(e,t,n)=>n-e>22&&t-n>22,nl=e=>"BUTTON"===e.tagName||e.dataset.scrollable,il=(e,t,n,i)=>{const o=(e=>m(e.composedPath)?e.composedPath():void 0)(e);if(Ha(o))for(let e=0;e{(0,H.vJ)((()=>{let t,n,i=ne(e),o=i.style,r=0,s=0;function a(e){e.cancelable&&(e.stopPropagation(),Ga&&e.preventDefault()),0===r&&0===s&&(o.cursor="move"),r=ve(e)-t,s=Se(e)-n;const i=`translate(${r}px,${s}px)`;Ua(o,{webkitTransform:i,transform:i})}function l(){d(),function(){const e=Xa(o),t=Qa(o),n=el(t+r,window.innerWidth-i.clientWidth),a=el(e+s,window.innerHeight-i.clientHeight);Ua(o,{top:`${a}px`,left:`${n}px`,webkitTransform:"",transform:""}),r=0,s=0}()}function c(e){t=ve(e),n=Se(e),il(e,t,n,i)&&(i.addEventListener(Ja,a,ja),i.addEventListener(qa,l,ja),i.addEventListener(Ya,l,ja))}function d(){o.cursor="",i.removeEventListener(Ja,a,ja),i.removeEventListener(qa,l,ja),i.removeEventListener(Ya,l,ja)}return _e&&Ua(o,{touchAction:"none"}),i.addEventListener(Va,c,ja),()=>{d(),i.removeEventListener(Va,c,ja),o=null,i=null}}),[])},rl=(e,t,n)=>{(0,H.vJ)((()=>{const i=xe&&e&&e.current,o=e=>{(e.altKey||e.metaKey)&&e.key&&e.key.toUpperCase()===t&&(e.stopImmediatePropagation(),n())};return i&&m(n)?(i.addEventListener(Te,o,!1),()=>i.removeEventLister(Te,o,!1)):void 0}),[])},sl=e=>{const t=(0,H.li)(),n=(0,H.li)();return(0,H.vJ)((()=>{e?(ie(n,(document||{}).activeElement),ae(t)):ae(n)}),[e]),t},al=e=>{let{isShow:t,className:n,style:i,onClose:o,children:r}=e;return fr(Qs,{isShow:t,onClose:o,children:fr(Wr,{className:n,style:i,isShow:t,children:r})})},ll=()=>{},cl=function(e,t,n){void 0===t&&(t=ll),void 0===n&&(n=ll);const[i,o]=za(e),r=()=>{(i?n:t)(),o()};return[i,r,e=>{Lr(e)&&(e.preventDefault(),r())}]},dl="rgba(0,0,0,0)",pl={display:"inline-block",cursor:"pointer"},ul={display:"inline-block"},hl=()=>fr("path",{d:"M 2,5 L 8,14 14,1",strokeWidth:"2",strokeLinecap:"round",fill:dl}),ml=function(e,t){return void 0===t&&(t=e),{stroke:e,fill:t}},yl=e=>{let{refChb:t,isChecked:n,style:i,onClick:o,onKeyDown:r}=e;const s=n?ml("#2f7ed8"):ml("#777777",dl);return fr("div",{ref:t,role:"checkbox",tabIndex:"0","aria-checked":n,className:"chb",style:{...pl,...i},onClick:o,onKeyDown:r,children:fr(xr,{w:16,style:ul,children:[fr("rect",{x:"1",y:"1",height:"14",width:"14",strokeWidth:"2",rx:"3",strokeLinecap:"round",...s}),n?fr(hl,{}):null]})})},gl={margin:"24px 0 0 16px"},fl={fontWeight:"bold",marginLeft:8,userSelect:"none"},wl=e=>{let{refChb:t,style:n=gl,initialValue:i,caption:o,onCheck:r,onUnCheck:s,onToggle:a}=e;const[l,c,d]=cl(i,r||a,s||a);return fr("div",{style:n,children:[fr(yl,{refChb:t,isChecked:l,onClick:c,onKeyDown:d}),fr("button",{type:"button",tabIndex:"-1",style:fl,onClick:c,children:o})]})},bl={left:8,zIndex:100,padding:"4px 12px 12px"},vl={maxWidth:150,paddingBottom:2,textAlign:"left",verticalAlign:"middle"},Sl={padding:"6px 0 6px",lineHeight:"normal"},Cl=e=>{const t=e.indexOf("(");return-1===t?e:e.slice(0,t-1)},Il=e=>{let{isShow:t,className:n,style:i,chbStroke:o,configs:r,onToggle:s,onClose:a}=e;const l=sl(t),[c,d]=fa(r,l);return c?fr(al,{isShow:t,style:{...bl,...i},className:n,onClose:a,children:fr(Sa,{refFirst:l,refLast:d,children:r.map(((e,t)=>fr(wl,{refChb:c(t),initialValue:e.df,style:Sl,stroke:o,caption:Cl(e.caption),captionStyle:vl,onToggle:()=>s(e.id)},e.id)))})}):null},_l=dr("dialog"),Nl=hr("menu-more__item select-none"),kl={position:"absolute",top:30,left:Ne?50:15,borderRadius:"5px",boxShadow:"rgba(0, 0, 0, 0.2) 0px 0px 0px 6px",zIndex:10},xl={textAlign:"right",margin:"16px 4px 10px 0"},Tl=e=>{let{onLoad:t,onShow:n,onClose:i}=e;return fr("div",{style:xl,children:[m(t)&&fr(as,{isPrimary:!0,style:Ro,caption:"Load",hotKey:"L",onClick:t}),m(n)&&fr(as,{style:Ro,caption:"Show",hotKey:"H",onClick:n}),fr(as,{style:Ro,caption:"Close",hotKey:"C",onClick:i})]})},Al=e=>{let{refEl:t,isShow:n,style:i,captionStyle:o,caption:r,menuToggle:s,toggleItem:a,children:l,onKeyDown:c,onLoad:d,onShow:p,onClose:u}=e;const h=(0,H.li)(null),m=(0,H.li)(null),y=(0,H.li)(n),[g,f]=za(!1),[w,b,v,S]=(0,H.Kr)((()=>[()=>ae(h),()=>ae(m),e=>{document.activeElement==ne(h)&&c(e)},e=>{b(),u()}]),[]);(0,H.vJ)((()=>{ie(m,document.activeElement),w()}),[]),ol(h),(0,H.vJ)((()=>{n&&!ne(y)&&w(),ie(y,n)}),[n]),(0,H.Yn)(t,(()=>({focusPrevEl:b}))),rl(h,"L",d),rl(h,"H",p),rl(h,"C",S);const[C,I]=lr(n,_l);return fr("div",{ref:h,role:"dialog",className:C,style:{...kl,...i,...I},tabIndex:"0",onKeyDown:v,children:[fr(Dr,{style:o,caption:r,onMore:s?f:void 0,onClose:u}),s&&fr(Il,{isShow:g,className:Nl,configs:s,onToggle:a,onClose:f}),fr("div",{children:l}),fr(Tl,{onLoad:d,onShow:p,onClose:S})]})},El=`${dr("dialog")} ${sr}`,$l={position:"absolute",top:"20%",borderRadius:5,boxShadow:"rgba(0, 0, 0, 0.2) 0px 0px 0px 6px",zIndex:10},Dl={float:"right",margin:"16px 4px 10px 0"},Rl=e=>{e.stopPropagation()},Bl=e=>{let{refFocusFirst:t,refFocusLast:n,isShow:i,isWithButton:o,style:r,caption:s,captionStyle:a,children:l,onKeyDown:c,onClose:d,divBtStyle:p,commandButtons:u,withoutClose:h,isClosePrimary:m=!1}=e;const y=sl(i),g=Zs(d),f=ir([i,El]),w=rr(i);return fr(Sa,{refEl:y,refFirst:t,refLast:n,style:w,children:fr("div",{ref:y,tabIndex:"0",role:"dialog","aria-label":s,"aria-hidden":!i,className:f,style:{...$l,...r,...w},onClick:Rl,onKeyDown:g,children:[fr(Dr,{style:a,caption:s,onClose:d}),fr("div",{children:l}),o&&fr("div",{style:{...Dl,...p},children:[u,!h&&fr(as,{isPrimary:m,style:Ro,caption:"Close",onClick:d},"_close")]})]})})},Pl={...Ur,...cs,...pa,...Wa,...{DraggableDialog:Al,ModalDialog:Bl,ModalPane:Qs,ModalPopup:al}},Ll=[["Top","top"],["Popular","popularity"],["Newest","publishedAt"]],Kl=Ll[0],Ml=zo(Kl),Wl=Mo(),Ol=e=>{let{isShow:t,caption:n,type:i,source:o,itemConf:r,onLoad:s,onShow:a,onClose:l}=e;const[c,d]=Oo(l),[p,u]=Go(Ml),h=(0,H.hb)((()=>{s({type:i,source:o,itemConf:r,sortBy:ne(p)}),d()}),[]),m=Vo(h,d);return fr(Pl.DraggableDialog,{refEl:c,isShow:t,captionStyle:Do,caption:n,onKeyDown:m,onLoad:h,onShowChart:a,onClose:d,children:fr(Pl.InputSelect,{style:Wl,caption:"SortBy",initItem:Kl,options:Ll,onSelect:u})})},Fl=e=>m(e)?e():e,zl=(e,t)=>({...e,[t]:!e[t]}),Ul=e=>(0,H.WO)(zl,e||{},Fl),Hl=e=>{const t=(0,H.li)(e||Object.create(null)),n=(0,H.hb)(((n,i)=>{h(i)&&(t.current[i]=h(n)?""===n?e[i]:n:zo(n))}),[e]);return[t,n]},Gl=(e,t,n)=>{const{type:i,source:o,itemConf:r,onLoad:s,onClose:a}=e,[l,c]=Oo(a);return[l,(0,H.hb)((()=>{s({type:i,source:o,itemConf:r,loadId:t,...ne(n)}),c()}),[]),c]},jl=e=>t=>{let{children:n}=t;return fr("div",{style:e,children:n})},Vl=jl({display:"flex",flexDirection:"column"}),Jl=jl({display:"inline-flex",alignItems:"flex-start",maxHeight:"1.7rem"}),ql=e=>e,Yl="TRUE",Zl=window.localStorage,Xl=window.btoa||ql,Ql=window.atob||ql,ec=e=>({message:e}),tc=ec("LocalStorage is absent"),nc=ec("Use LocalStorage is not allowed"),ic=!!Zl;let oc=!1;const rc=e=>`NA_${e}`,sc=e=>{if(!ic)return[void 0,{...tc}];try{const t=Ql(Zl[rc(e)]);return[t===Yl||t]}catch(e){return[void 0,e]}},ac=(e,t)=>{if(!oc)return{...nc};if(y(t))return t?ac(e,Yl):(e=>{if(!ic)return{...tc};try{Zl.removeItem(rc(e))}catch(e){return e}})(e);if(!ic)return{...tc};try{Zl[rc(e)]=Xl(t)}catch(e){return e}},lc="UITheme",cc="FontSize",dc="IS_AIO",[pc,uc]=Ue("isAio"),hc=We((()=>({...pc(!!sc(dc)[0])}))),[mc,yc]=ze(hc),gc=Fe(hc,uc),fc=()=>uc(yc()),wc=e=>()=>{mc(pc(e)),ac(dc,e)},bc=wc(!0),vc=wc(!1),Sc=[["No similiar item in list"]],Cc="c",Ic="f",_c=(e,t)=>e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]?e:t,Nc=(e,t)=>{let[n,i,o]=t;const r=void 0===i?e[2]:i,s=void 0===o?e[3]:o;switch(n){case Cc:return _c(e,[0,0,r,s]);case"s":return _c(e,[1,0,r,s]);case Ic:return _c(e,[1,1,r,s]);default:return e}},kc=["",""],xc={top:64},Tc={...Ts,top:"calc(42.8px - 1.8rem)"},Ac={fill:"#80c040"},Ec=!_e,$c=(e,t,n)=>Ec||_e&&!e&&t.length===n.length,Dc=e=>{let{isInput:t,maxInput:n="20",id:i,style:o,tfStyle:r,initItem:s,caption:a,options:l,onSelect:c}=e;const d=gc(),u=!(!t||!d),h=(0,H.li)(),m=(0,H.li)(),y=(0,H.li)(),g=(0,H.li)(),f=(0,H.li)(),[w,b]=((e,t)=>(0,H.WO)(Nc,[0,0,e,t||kc]))(l,s),[v,S,C,I]=w,[_,N]=js(v,!0),[k,x,T,A,E]=(0,H.Kr)((()=>[()=>{c(s,i),b([Cc,l,""]),le(h,200)},e=>{const t=e===Sc[0],n=t?s:e;c(n,i),b([Cc,t?l:void 0,n]),de(h,Fo(n)),n&&ae(m)},()=>{b([Cc]),ae(m)},e=>{e.key===G&&b([Ic])},()=>{b([Ic])}]),[]),$=(0,H.Kr)((()=>p((()=>l.map((e=>(e._t=e[0].toLowerCase(),e)))))),[l]),D=(0,H.Kr)((()=>(e,t)=>{const n=(e||"").toLowerCase(),i=u?n:n.trim();i?(clearTimeout(ne(g)),ie(g,setTimeout((()=>{const t=$().filter((e=>-1!==e._t.indexOf(i))),n=t.length?t:u?[[e]]:Sc;ie(f,n[0]),b(["s",n])}),350))):k()}),[u,$,k,b]),[R,B]=(0,H.Kr)((()=>[(e,t)=>{pe(t),x(e)},(e,t,n)=>{pe(n),x(ne(f))}]),[]),P=_e&&I?{tabIndex:"-1",readOnly:!0,inputCn:Jo,onClick:()=>{b([Ic])}}:void 0;return fr("div",{className:ms,style:o,children:[fr("label",{className:ys,children:a}),fr(aa,{id:_,refOp:y,isShow:v,isFocusItem:S,className:vs,style:xc,item:I,options:C,clItem:Ss,onSelect:R,onClose:T}),fr(Ks,{...N,...P,refEl:h,style:r,isTrimValue:!u,initValue:Fo(I),maxLength:n,onInputChange:D,onEnter:B,onKeyDown:A,children:$c(I,C,l)?fr(Js,{refEl:m,style:or(Tc,v&&Ac),onKeyDown:e=>{if(v){const t=ne(y);t&&t.hKeyDown(e)}else e.key===G?b([Ic]):e.key===J&&(de(h,""),k())},onClick:E}):null})]})},Rc="YYYY-MM-DD",Bc=e=>{let{style:t,initialFrom:n,initialTo:i,onInput:o}=e;const r=(0,H.hb)(((e,t)=>{o(""+Tt(e),t)}),[o]);return fr("div",{children:[fr(Ks,{id:"fromDate",caption:"From Date",hasClear:!1,style:t,initValue:n,errorMsg:Rc,onTest:Nt,onEnter:r,onBlur:r}),fr(Ks,{id:"toDate",caption:"To Date",hasClear:!1,style:t,initValue:i,errorMsg:Rc,onTest:Nt,onEnter:r,onBlur:r})]})},Pc="sg",Lc=Mo(),Kc={...Ko,marginLeft:0},Mc=(e,t)=>!w(e)||!!e[t],Wc=e=>{let{isInputs:t,configs:n,onSelect:i,onEnter:o}=e;return(n||[]).map((e=>{const n=e[0],r=e[1],s="s"===n?da:n===Pc?Dc:void 0,a=n===Pc?{isInput:e[6]}:void 0,l=s?(0,yr.n)(s,{...a,key:r,id:r,caption:e[2],options:e[3],initItem:e[4],style:Lc,tfStyle:Kc,onSelect:i}):"t"===n?(0,yr.n)(Ks,{...e[4],key:r,id:r,style:Ko,caption:e[2],initValue:e[3],onEnter:o,onBlur:i,onInputChange:i}):"tf"===n?fr(Bc,{style:Bo,initialFrom:e[3],initialTo:e[4],onInput:i},"_ft"):void 0;return l?fr(Wr,{isShow:Mc(t,r),children:l}):null}))},Oc={marginTop:16,marginLeft:8},Fc=e=>{let{style:t,spanStyle:n,children:i}=e;return fr("div",{style:{...Oc,...t},children:[fr("span",{style:{...Xo,...n},children:"Powered by"}),i]})},zc=Array.isArray,Uc=e=>{const{isShow:t,caption:n,loadId:i,INPUT_CONFIGS:o,INITIAL_INPUTS:r,TOGGLES:s,IS_INPUTS:a,children:l,onShow:c}=e,[d,p]=Ul(a),[u,h]=Hl(r),[m,y,g]=Gl(e,i,u),f=Vo(y,g),[w,b]=zc(v=s)&&v.length>1?[$o,s]:[Do];var v;return fr(Al,{refEl:m,isShow:t,captionStyle:w,caption:n,menuToggle:b,toggleItem:p,onKeyDown:f,onLoad:y,onShow:c,onClose:g,children:fr(Vl,{children:[fr(Wc,{isInputs:d,configs:o,onSelect:h,onEnter:y}),fr(Fc,{style:Po,children:l})]})})},Hc=function(e){return void 0===e&&(e="10"),{maxLength:e,autoCapitalize:"characters",inputStyle:{textTransform:"uppercase"}}},Gc=Object.create,jc=e=>e.reduce(((t,n)=>{const i=((e,t)=>1===e.length||!0===t[5])(e,n);return t[0][(e=>e[1])(n)]=(e=>{const t=e[0];return"s"===t||t===Pc?zo(e[4]):"t"===t?e[3]:void 0})(n),t[1].push({id:n[1],caption:n[2],df:i}),t[2][n[1]]=i,t}),[Gc(null),[],Gc(null)]),Vc=e=>t=>(t||{})[e],Jc=Vc("paneCaption"),qc=Vc("caption"),Yc=e=>qc(e)||Jc(e),Zc=(Vc("paneCaption"),Vc("type")),Xc=Vc("loadId"),Qc=e=>Xc(e)||Zc(e),ed=(e,t)=>t?`${e} (Default: ${t})`:e,td=(e,t)=>e||K(t),nd=(e,t)=>{let{caption:n,dfValue:i,inputProps:o,is:r}=t;return["t",e,td(n,e),i,o,r]},id=e=>function(t,n,i){let{caption:o,dfOption:r,dfIndex:s,is:a,isInput:l,isNotFirstUpperCase:c}=void 0===i?{}:i;const d=h(n[0])?((e,t)=>oe(e,t?Ho:Uo)||[])(n,c):n;return[e,t,td(o,t),d,r||d[s||0],a,l]},od=id("s"),rd=id(Pc),sd=kt(1),ad=xt(),ld=(e,t,n)=>["tf",e,"From To Date",t||sd,n||ad],cd=e=>p((()=>{const t=e();return[t,...jc(t)]})),dd={DF:Ol,DialogType1:Ol,DialogType2:e=>{const{itemConf:t}=e,{getConfig:n,CompLink:i}=t,[o,r,s,a]=n();return fr(Uc,{...e,caption:Yc(t),loadId:Qc(t),INPUT_CONFIGS:o,INITIAL_INPUTS:r,TOGGLES:s,IS_INPUTS:a,children:fr(i,{})})}},pd={getElement:e=>dd[e]||dd.DF},ud=e=>{let{onMinWidth:t,onInitWidth:n,onPlusWidth:i,onMinusWidth:o,onRemoveItems:r}=e;return{titleCl:qo,pageWidth:196,maxPages:2,p0:[{id:"p1",type:"sub",cn:qo,name:"Resize"},{cn:qo,name:"Remove Items",onClick:r,isClose:!0}],p1:[{cn:qo,name:"to MinWidth",onClick:t},{cn:qo,name:"to InitWidth",onClick:n},{cn:qo,name:"+10px to Width",onClick:i},{cn:qo,name:"-10px to Width",onClick:o}]}},hd=Array.isArray,md=Object.keys,yd=(e,t)=>t[1]-e[1],gd=e=>{if(!hd(e))return;const t=e.reduce(((e,t)=>((t.related||"").split("|").forEach((t=>{e[t]?++e[t]:e[t]=1})),e)),Object.create(null));return md(t).map((e=>[e,t[e]])).sort(yd)},fd=e=>{const[t,n]=(0,H.J0)(!1);return[t,...(0,H.Kr)((()=>[()=>n((e=>!e)),()=>{ae(e),n(!1)}]),[])]},wd=e=>{let{refEl:t,className:n,style:i,captionStyle:o,btCloseStyle:r,title:s,onKeyDown:a,onClick:l,onToggle:c,onClose:d}=e;const[p,u]=(0,H.Kr)((()=>[e=>{13===e.keyCode?c():m(a)&&a(e)},e=>{e.stopPropagation(),d()}]),[]);return fr("div",{role:"button",ref:t,tabIndex:"0",className:n,style:i,onClick:l,onKeyDown:p,children:[fr("span",{className:Jo,style:o,children:s}),fr(Er,{style:r,onClick:u})]})},bd="article-header",vd="article-descr",Sd={position:"relative",marginBottom:5,lineHeight:1.5,borderBottomRightRadius:2,boxShadow:"1px 4px 6px 1px rgba(0,0,0,0.6)"},Cd={color:"#0a0a0a",display:"inline-block",paddingRight:32,fontSize:"1.125rem",fontWeight:"bold",wordBreak:"break-word"},Id={position:"absolute",right:-4},_d=e=>{let{refEl:t,isShowDescr:n,title:i,children:o,onKeyDown:r,onClick:s,onToggle:a,onClose:l}=e;return fr(yr.FK,{children:[fr(wd,{refEl:t,className:bd,captionStyle:Cd,btCloseStyle:Id,title:i,onKeyDown:r,onClick:s,onToggle:a,onClose:l}),fr(Wr,{isShow:n,withoutAnimation:!0,className:vd,children:o})]})},Nd={fontSize:"1rem",fontWeight:"bold"},kd={display:"flex"},xd={...Nd,whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden",display:"inline-block",width:140,paddingRight:8,textAlign:"right"},Td={...Nd,paddingLeft:6},Ad=(e,t,n)=>({display:"inline-block",height:"1.2rem",width:200*n/t,background:e}),Ed=(0,H.ph)((e=>{let{style:t,items:n,maxValue:i,color:o="darkcyan"}=e;return fr("div",{style:t,children:n.map((e=>fr("div",{style:kd,children:[fr("span",{style:xd,children:e[0]}),fr("span",{style:Ad(o,i,e[1])}),fr("span",{style:Td,children:e[1]})]},e[0])))})})),$d={padding:"6px 0"},Dd=Array.isArray,Rd=e=>{let{categoryBars:t,maxValue:n,numberOfItems:i}=e;const[o,r]=(0,H.J0)(!1),s=(0,H.Kr)((()=>()=>r(!0)),[]),[a,l]=fd();(0,H.vJ)((()=>{Dd(t)&&r(!1)}),[t]);const c=or(Sd,o&&tr);return Dd(t)?fr("div",{style:c,children:fr(_d,{title:`Categories Bar Chart (${i})`,isShowDescr:a,onClick:l,onToggle:l,onClose:s,children:fr(Ed,{style:$d,items:t,maxValue:n})})}):null},Bd=(e,t)=>{(0,H.vJ)((()=>(e&&e.addEventListener("change",t),()=>{e&&e.removeEventListener("change",t)})),[])},Pd=Number.isNaN,Ld=Object.assign,Kd=e=>{Ld(e,{id:null,deltaStep:1,countStep:0})};const Md=class{constructor(e){let{elementRef:t,initWidth:n,minWidth:i,maxWidth:o,step:r=10,onResizeAfter:s}=e;this.elementRef=t,this.step=r,this.onResizeAfter=s,this.initWidth=n,this.minWidth=i,this.maxWidth=o,this.minDelta=i-n,this.maxDelta=o-n,this.delta=0,Kd(this),this.hStartResizeLeft=d(this._startResize,this._resizeLeft),this.hStartResizeRight=d(this._startResize,this._resizeRight)}_increaseDeltaStep=()=>{this.countStep+=1,this.countStep>30?this.deltaStep=3:this.countStep>15&&(this.deltaStep=2),(this.maxDelta-this.delta<20||this.delta-this.minDelta<20)&&(this.deltaStep=1)};_getElementStyle=()=>{const{current:e}=this.elementRef||{},{style:t}=e||{};return t||{}};_setElementWidth=e=>{this._getElementStyle().width=e+"px"};_getElementWidth=()=>parseInt(this._getElementStyle().width,10);_onResizeAfter=()=>{const{onResizeAfter:e}=this;m(e)&&e(this._getElementWidth())};clearInterval=()=>{clearInterval(this.id)};toWidth=(e,t)=>{const{minWidth:n,maxWidth:i,initWidth:o}=this;e>=n&&e<=i&&(this.delta=e-o,this._setElementWidth(e),t&&this._onResizeAfter())};resizeBy=e=>{e<0&&this.delta>this.minDelta||e>0&&this.delta{this.resizeBy(-this.deltaStep),this._increaseDeltaStep()};_resizeRight=()=>{this.resizeBy(this.deltaStep),this._increaseDeltaStep()};_updateDelta=()=>{const e=parseInt(this._getElementStyle().width,10);Pd(e)||(this.delta=e-this.initWidth)};_startResize=e=>{null!==this.id&&this._stopResize(),this._updateDelta(),this.id=setInterval(e,5)};_stopResize=()=>{this.clearInterval(),Kd(this)};hStopResize=()=>{this._stopResize(),this._onResizeAfter()}},Wd=e=>{const t=ds((()=>new Md(e))),n=Kr(e.onMinusWidth),i=Kr(e.onPlusWidth);return(0,H.vJ)((()=>()=>t.clearInterval()),[]),[t.hStartResizeLeft,t.hStartResizeRight,t.hStopResize,n,i]},Od=e=>{let{to:t,ariaLabel:n,dataPos:i,style:o,startResize:r,stopResize:s,onKeyDown:a,children:l}=e;const c=(0,H.li)(),d="r"===t?"11":"1",[p,u]=Sr(n,i);return Rr(c,Y,r),Rr(c,X,s),fr("button",{ref:c,type:"button","aria-label":p,"data-pos":u,className:"bt-resize select-none",style:o,onMouseDown:r,onMouseUp:s,onKeyDown:a,children:fr(xr,{w:"12",strokeWidth:"1.5",strokeLinecap:"round",fill:"none",children:[fr("path",{d:"M 1,6 L 11,6"}),fr("path",{d:`M 6,2 L ${d},6 6,10`})]})})},Fd={display:"inline-block"},zd={marginLeft:10},Ud=e=>{const[t,n,i,o,r]=Wd(e);return fr("div",{style:{...Fd,...e.style},children:[fr(Od,{ariaLabel:"Resize to Left",dataPos:"tr",style:zd,startResize:t,stopResize:i,onKeyDown:o}),fr(Od,{to:"r",ariaLabel:"Resize to Right",dataPos:"tr",style:zd,startResize:n,stopResize:i,onKeyDown:r})]})},Hd={position:"relative",margin:"0 3px 0 12px"},Gd={position:"relative"},jd="(min-width: 450px)",Vd=e=>window.matchMedia?window.matchMedia(e):void 0,Jd=Vd(jd),qd=()=>{const e=Vd(jd);return e&&e.matches},Yd=e=>{let{refRootDiv:t,onRemoveItems:n,onPlusWidth:i,onMinusWidth:o}=e;const[r,s]=(0,H.J0)(qd);return Bd(Jd,(e=>{s(e.matches)})),r?fr(Jl,{children:[fr(Hr,{ariaLabel:"Remove Items [r]",dataPos:"btr",caption:"R",style:Hd,onClick:n}),fr(Ud,{elementRef:t,style:Gd,initWidth:635,minWidth:395,maxWidth:1200,onPlusWidth:i,onMinusWidth:o})]}):null},Zd={textAlign:"center",paddingTop:4},Xd=e=>{let{nextPage:t,maxPage:n}=e;return n?`${t}/${n}`:t},Qd=e=>{let{page:t}=e;return t?fr("div",{style:Zd,children:fr(Qr,{caption:`Load Next Page ${Xd(t)}`,onClick:t.onPageLoad})}):null},ep=(void 0===rp&&(rp=635),{width:!Ie()||window.innerWidth>700?rp:Ie()?window.innerWidth-16:635}),tp=pr("news-pane"),np=hr("items__menu-more"),ip={paddingLeft:30,textAlign:"left"},op={overflow:"hidden auto",height:"92%",paddingRight:10};var rp;const sp=e=>parseInt(e.width,10)||635,ap=e=>e+"px",lp=(e,t,n)=>{let{Item:i,refFirstItem:o,onCloseItem:r,onRemoveUnder:s}=n;return fr(i,{refEl:0===t?o:void 0,item:e,onCloseItem:r,onRemoveUnder:s},e.articleId)},cp=e=>{let{id:t,paneCaption:n,Item:i,useMsPane:o,useMsItem:r,onRemoveItems:s,onRemoveUnder:a,onCloseItem:l}=e;const c=(0,H.li)(),p=(0,H.li)(),u=(0,H.Kr)((()=>((e,t)=>{const n=t=>{(ce(e)||{}).width=ap(t)};return{onMinWidth:d(n,395),onInitWidth:d(n,635),onPlusWidth:()=>{const t=ce(e)||{},n=sp(t)+10;n<1200&&(t.width=ap(n))},onMinusWidth:()=>{const t=ce(e)||{},n=sp(t)-10;n>395&&(t.width=ap(n))},onRemoveItems:t}})(c,s)),[]),h=(0,H.Kr)((()=>ud(u)),[]),{onPlusWidth:m,onMinusWidth:y}=u,[g,f]=za(!0),[w,b,v]=us(!1),[S,C]=(0,H.J0)({articles:[],sortBy:"",caption:""}),{articles:I,sortBy:_,caption:N,page:k,isRelatedBars:x}=S,[T,A,E]=(0,H.Kr)((()=>{if(x){const e=gd(I);return[e,(e[0]||[])[1],I.length]}return[]}),[x,I]),$=(0,H.hb)((()=>{f(!1)}),[]),D=(0,H.hb)((e=>{e.stopPropagation()}),[]);o((e=>{e&&e.id===t&&f(!0)})),r((e=>{e&&e.id===t&&(!0===e.isAdd?(f(!0),C({articles:e.data,sortBy:e.sortBy,caption:e.caption,page:e.page,isRelatedBars:e.isRelatedBars}),le(p)):!0===e.isUpdate&&C((t=>({...t,articles:e.data}))))})),rl(c,"R",s),rl(c,"+",m),rl(c,"-",y);const R=N||((e,t)=>[e,t].filter(Boolean).map(K).join(": "))(n,_),[B,P]=cr(g,tp);return fr("div",{ref:c,className:B,style:{...ep,...P},children:[fr(Pl.ModalSlider,{isShow:w,className:np,model:h,onClose:v}),fr(Pl.BrowserCaption,{style:ip,caption:R,onMore:b,onClose:$,children:fr(Yd,{refRootDiv:c,onRemoveItems:s,onPlusWidth:m,onMinusWidth:y})}),fr(Pl.ScrollPane,{style:op,onScroll:D,children:[x&&A&&fr(Rd,{categoryBars:T,maxValue:A,numberOfItems:E}),fr(Pl.ItemStack,{items:I,crItem:lp,Item:i,refFirstItem:p,onCloseItem:l,onRemoveUnder:a}),fr(Qd,{page:k})]})]})},dp=e=>{const t=(0,H.li)(e),n=(0,H.hb)((e=>{t.current=e}),[]);return[t,n]},pp=(e,t,n)=>(0,H.hb)((i=>i>90?(t(e),!1):!(i>40)||(n(),!1)),[]),up="border-left",hp="touch-action",mp=!_e,yp=e=>{mp&&e.preventDefault()},gp=Object.assign,fp=e=>e.style,wp=(e,t)=>{const n=fp(e);n.removeProperty(up),_e&&n.removeProperty(hp),t&&gp(n,{right:0,opacity:1})},bp=()=>{},vp=e=>{let{refEl:t,className:n,style:i,children:o,setTimeStamp:r=bp,onGesture:s}=e;const a=(0,H.li)(),l=t||a,c=(0,H.li)(0),d=(0,H.li)(0),p=(0,H.li)(null),u=(0,H.li)(!1),h=(0,H.li)(!1),m=(0,H.li)(),y=(0,H.hb)((()=>{clearTimeout(ne(m)),ie(u,!1),ie(d,0);const e=ne(p);e&&(wp(e,!0),ie(p,null))}),[]),g=(0,H.hb)((e=>{ie(u,!0),(e=>{const t=fp(e);t.setProperty(up,"4px solid #d64336"),_e&&t.setProperty(hp,"none")})(e)}),[]),f=(0,H.hb)((e=>{if("A"!==e.target.tagName){const t=e.currentTarget;ne(u)?y():(ie(d,Se(e)),ie(p,t),ie(m,setTimeout((()=>g(t)),1e3)))}}),[]),w=(0,H.hb)((e=>{if(yp(e),ne(u)){const i=ve(e);if(i)if(ne(h)){const o=ne(c)-i;o<0&&(t=e.currentTarget,n=o,gp(fp(t),{right:n+"px",opacity:1-.5*Math.abs(n)/60}))}else ie(c,i),ie(h,!0)}else{const t=ne(d);t&&Math.abs(t-Se(e))>15&&y()}var t,n}),[]),b=(0,H.hb)((e=>{if(ne(u)){let t=!1;if(ne(h)){yp(e),r(e.timeStamp);const n=ve(e),i=ne(c)-n;t=i<0&&s(Math.abs(i)),ie(h,!1)}ie(u,!1),wp(e.currentTarget,t)}else y()}),[]),v=(0,H.Kr)((()=>_e?void 0:{onMouseDown:f,onMouseMove:w,onMouseUp:b,onMouseLeave:b}),[]);return Rr(l,Y,f),Rr(l,Z,w),Rr(l,X,b),fr("div",{ref:l,role:"presentation",className:n,style:i,...v,children:o})},Sp=e=>{let{className:t,style:n,href:i,children:o,fallback:r=null,...s}=e;const a=Ce(i);return a?fr("a",{className:t,style:n,...s,href:a,target:"_blank",children:o}):r},Cp=e=>t=>{let{className:n,style:i,text:o}=t;return o?fr(e,{className:n,style:i,children:o}):null},Ip=(Cp("div"),Cp("span")),_p="link-wrapper",Np={...Xo,fontSize:"1rem",fontWeight:"bold"},kp={wordBreak:"break-word"},xp={display:"flex",justifyContent:"space-between"},Tp={...Np,...kp,whiteSpace:"pre-line",display:"block",lineHeight:1.4,padding:"8px 16px 4px 12px"},Ap={...Np,...xp,flexWrap:"wrap",lineHeight:1.6,padding:"0 16px 0 12px"},Ep={...kp},$p={...Xo,whiteSpace:"nowrap",marginLeft:"auto"},Dp={...xp,padding:"8px 12px 0 12px"},Rp={...xp,padding:"0 12px 6px 12px"},Bp={color:"gray",fontWeight:"bold"},Pp={...Bp,paddingRight:16},Lp={paddingTop:8},Kp=e=>{let{related:t,commentsUrl:n,commentsTitle:i}=e;return(n||i)&&fr("div",{className:Jo,style:Ap,children:[fr("span",{style:Ep,children:n?t:`${t} ${i}`}),fr(Sp,{className:_p,style:$p,href:n,children:i})]})},Mp=e=>{let{href:t,description:n,related:i,commentsUrl:o,commentsTitle:r,publishedAt:s,timeAgo:a,author:l,onKeyDown:c,onClose:d}=e;return fr(yr.FK,{children:[fr("div",{style:Dp,children:[fr(Ip,{style:Pp,text:l}),fr(Ip,{style:Bp,text:a})]}),t?fr(Sp,{className:_p,style:Tp,href:t,onKeyDown:c,children:n}):fr("div",{style:Tp,children:n}),fr("div",{style:Lp,children:[fr(Kp,{related:i,commentsUrl:o,commentsTitle:r}),fr("div",{style:Rp,children:[fr(Er,{dataPos:"cr",onClick:d}),fr(Ip,{className:Jo,style:Bp,text:s})]})]})]})},Wp=()=>{},Op=e=>{let{refEl:t,item:n,onCloseItem:i,onRemoveUnder:o=Wp,onRemoveItem:r=Wp}=e;const s=(0,H.li)(null),[a,l]=dp(null),[c,d]=(0,H.J0)(!1),p=(0,H.Kr)((()=>()=>{re(((ne(s)||{}).nextElementSibling||{}).firstElementChild),i(n),d(!0)}),[]),u=pp(n,o,p),[h,m,y]=fd(t),g=(0,H.Kr)((()=>e=>{const{timeStamp:t}=e||{},n=ne(a);t&&n&&t-n<200||(l(t),m())}),[]),f=(0,H.Kr)((()=>e=>{const{keyCode:t}=e;27===t?y():46===t&&p()}),[]),{title:w,author:b,timeAgo:v,publishedDate:S,publishedAt:C,url:I,related:_,commentsUrl:N,numOfComments:k}=n,x=n.description||"More...",T=c?tr:void 0,A=S||$t(C),E=Ce(I),$=Ce(N),D=$?`Comments ${k}`:k;return I&&!E?null:fr(vp,{refEl:s,style:{...Sd,...T},setTimeStamp:l,onGesture:u,children:fr(_d,{refEl:t,isShowDescr:h,title:w,onKeyDown:f,onClick:g,onToggle:m,onClose:p,children:fr(Mp,{href:E,description:x,related:_,commentsUrl:$,commentsTitle:D,publishedAt:A,author:b,timeAgo:v,onKeyDown:f,onClose:p})})})},Fp=(e,t)=>(0,H.hb)((t=>{46===t.keyCode&&e(t)}),t||[]),zp={position:"relative",fontWeight:"bold",width:"100%",padding:"8px 4px 16px 16px",marginBottom:5,lineHeight:1.5,boxShadow:"1px 4px 6px 1px rgba(0,0,0,0.6)",borderTopRightRadius:2,borderBottomRightRadius:2},Up={position:"absolute",top:8,right:0},Hp={paddingBottom:8},Gp={display:"block",paddingBottom:8},jp={...Xo,display:"inline-block",backgroundColor:"gray",padding:"4px 8px",margin:"6px 8px 2px 8px",borderRadius:16},Vp=e=>({display:"inline-block",paddingRight:8,fontSize:"1.125rem",color:e}),Jp=Vp("#d7bb52"),qp=Vp("#80c040"),Yp=Vp(Zo),Zp=_e?"A":fr("span",{role:"img","arial-label":"hammer and pick",children:"⚒"}),Xp=_e?"S":fr("span",{role:"img","aria-label":"fish",children:"🐟"}),Qp=_e?"V":fr("span",{role:"img","aria-label":"wheel of dharma",children:"☸"}),eu=_e?"R":fr("span",{role:"img","arial-label":"shamrock",children:"☘"}),tu=(e,t)=>fr("span",{className:vd,style:jp,children:e},t),nu={DF:[cp,Op],STACK_ITEM:[cp,e=>{let{item:t,onCloseItem:n,onRemoveUnder:i=ee,onRemoveItem:o=ee}=e;const[r,s]=za(!1),a=(0,H.hb)((()=>{n(t),s(!0)}),[]),l=Fp(a),c=pp(t,i,a),{is_answered:d,answer_count:p,score:u,view_count:h,title:m,link:y,owner:g,tags:f}=t||{},{reputation:w,display_name:b}=g||{};return fr(vp,{className:bd,style:{...zp,...r?tr:void 0},onGesture:c,children:[fr("div",{style:Hp,children:[fr("span",{style:d?qp:Jp,children:[Zp," ",p]}),fr("span",{style:Jp,children:[Xp," ",u]}),fr("span",{style:Yp,children:[Qp," ",h]}),fr("span",{style:qp,children:[eu," ",w]}),fr("span",{style:Yp,children:b}),fr(Er,{style:Up,onClick:a})]}),fr("div",{children:m}),fr(Sp,{className:"link-wrapper",style:Gp,href:y,onKeyDown:l,children:fr(Fr,{items:f,crItem:tu})})]})}]},iu={getElement:e=>nu[e]||nu.DF},ou=(e,t)=>{const{type:n}=t;if(e[n])return{key:n};{const i=(e=>{const{type:t,dialogType:n,dialogProps:i}=e;return fr(pd.getElement(n),{type:t,itemConf:e,...i,onShow:d(Lu,e),onLoad:xo},t)})(t);return e[n]=!0,{key:n,Comp:i}}},ru=(e,t,n)=>{const{type:i}=t;if(e[i])return{id:t.paneId};{const o=((e,t)=>{const{type:n,paneType:i,paneCaption:o,paneId:r}=e,[s,a]=iu.getElement(i);return fr(s,{id:r,paneCaption:o,Item:a,useMsPane:t,useMsItem:_o,onRemoveItems:d(Ao,r),onRemoveUnder:Eo,onCloseItem:To},n)})(t,n);return e[i]=!0,{Comp:o}}},su=Object.create(null),au=Object.create(null),[lu,cu]=Ue("msAbout","is"),[du,pu]=Ue("msModalDialog","option"),[uu,hu]=Ue("msDialog"),[mu,yu]=Ue("msBrowser","id"),[gu,fu]=Ue("msPane"),[wu,bu]=Ue("dialogItems"),vu=We((()=>({...lu(),...du(),...uu(),...mu(),...gu(),...wu([])}))),[Su]=ze(vu),Cu=Oe(vu,cu),Iu=()=>Su(lu(!0)),_u=Oe(vu,pu),Nu=function(e,t){void 0===t&&(t={}),t.modalDialogType=e,Su(du(t))},ku=d(Nu,"s",Qe.exportSettingsFn()),xu=d(Nu,"a"),Tu=Oe(vu,hu),Au=Fe(vu,bu),Eu=e=>Su(uu(ou(su,e))),$u=e=>Su(wu([e])),Du=()=>Su(wu([])),Ru=Oe(vu,yu),Bu=d((e=>{Su(mu(e))}),et.NEWS),Pu=Oe(vu,fu),Lu=e=>{Su({...lu(!1),...gu(ru(au,e,Pu))})},Ku="News Aggregator v0.4.0",Mu=e=>`0 0 ${e} ${e}`,Wu=e=>{let{color:t="currentColor",size:n="24",children:i,...o}=e;return fr("svg",{xmlns:"http://www.w3.org/2000/svg",width:n,height:n,viewBox:Mu(n),fill:"none",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...o,children:i})},Ou=e=>fr(Wu,{...e,children:[fr("circle",{cx:"12",cy:"12",r:"10"}),fr("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),fr("line",{x1:"12",y1:"8",x2:"12",y2:"8"})]}),Fu=e=>fr(Wu,{...e,children:[fr("circle",{cx:"12",cy:"12",r:"3"}),fr("path",{d:"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"})]}),zu="#2f7ed8",Uu=(e,t,n)=>({backgroundColor:e,width:t+"%",transition:n,opacity:1}),Hu=(e,t,n)=>ne(e)?(ie(e,!1),Uu(t,0)):Uu(t,((e,t)=>e<0?0:e>=100?(ie(t,!0),100):e)(n,e),"width 350ms linear"),Gu=e=>{let{color:t=zu,completed:n}=e;const i=Me()[1],o=(0,H.li)(!1),r=(0,H.li)(null);(0,H.vJ)((()=>{ne(o)&&ie(r,setTimeout(i,800))})),(0,H.vJ)((()=>()=>{clearTimeout(ne(r))}),[]);return fr("div",{className:"progress-line",style:Hu(o,t,n)})},ju="#2f7ed8",Vu=(e,t)=>[e,t],Ju=(0,H.ph)((()=>{const e=fo(),[t,n]=e===uo?Vu(35,ju):e===ho?Vu(100,ju):e===mo?Vu(100,"#ed5813"):Vu(0,ju);return fr(Gu,{color:n,completed:t})}),(()=>!0)),qu=e=>{let{ariaLabel:t,dataPos:n,className:i}=e;return fr("span",{"aria-label":t,"data-pos":n,className:i,children:fr("svg",{viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",clipRule:"evenodd",strokeLinejoin:"round",strokeMiterlimit:"2",strokeWidth:"2",children:[fr("rect",{ry:"1.8825414",rx:"194.14471",y:"1.434558",x:"19.176462",height:"12.460618",width:"10.85316",fill:"#8ecc2d",stroke:"#8ecc2d"}),fr("rect",{ry:"1.87537",rx:"204.478",y:"16.639841",x:"8.8410215",height:"13.752699",width:"18.307165",fill:"#232f3b",stroke:"#232f3b"}),fr("rect",{ry:"1.87537",rx:"204.478",y:"3.4229634",x:"2.5897937",height:"10.894996",width:"10.001963",fill:"#a487d4",stroke:"#a487d4"})]})})},Yu=e=>{let{className:t,style:n,caption:i}=e;return fr("span",{className:t,style:n,children:i})},Zu=(e,t)=>{const n=(0,H.li)(),i=(0,H.li)();return(0,H.vJ)((()=>{e&&!ne(i)?(ie(i,document.activeElement),ae(t,n)):e||(ae(i),ie(i,null))}),[e]),n},Xu=()=>{const e=(0,H.li)([]);return(0,H.hb)(((t,n,i)=>{const[o,r]=ne(e);t?o?n!==o&&(r(),ie(e,[n,i])):ie(e,[n,i]):n===o&&ie(e,[null,null])}),[])},Qu={lineHeight:2.5},eh={paddingLeft:10},th={paddingLeft:4,verticalAlign:"top",fontWeight:"bold",fontSize:"1rem",cursor:"pointer"},nh="currentColor",ih="transparent",oh=e=>{let{refBt:t,isClose:n=!0,style:i,itemStyle:o,captionStyle:r,caption:s,fillOpen:a=nh,fillClose:l=ih,children:c,onToggle:d}=e;const p=(0,H.Bi)(),[u,h]=za(!n),y=m(d)?()=>{d(!u,s,h),h()}:h,g=Kr(y,[y]),[f,w,b,v]=u?["M 2,14 L 14,14 14,2 2,14",a,Qo,sr]:["M 2,2 L 14,8 2,14 2,2",l,tr,null];return fr("div",{style:{...Qu,...i},children:[fr("div",{ref:t,role:"button",className:"open-close select-none","aria-expanded":u,"aria-controls":p,tabIndex:"0",style:eh,onClick:y,onKeyDown:g,children:[fr(Cr,{w:"16",children:fr("path",{d:f,fill:w,strokeWidth:"1",stroke:a})}),fr("span",{style:{...th,...r},children:s})]}),fr("div",{id:p,className:v,style:b,children:c})]})},rh="row__topic",sh={margin:"0 16px",borderBottom:`1px solid ${Zo}`},ah=e=>{let{refBt:t,caption:n,items:i,onItem:o,onToggle:r}=e;return b(i)?fr(oh,{refBt:t,caption:n,onToggle:r,children:i.map((e=>b(e)?fr(Mr,{className:rh,caption:e[0],onClick:e[1],style:e[2]},e[0]):fr("div",{style:sh},e)))}):fr(Mr,{className:rh,caption:n,onClick:o},n)},lh=(0,H.ph)((e=>{let{menuModel:t,getFocusRef:n,onToggle:i}=e;return n?t.map(((e,t)=>fr(ah,{refBt:n(t),caption:e.t,items:e.items,onItem:e.onItem,onToggle:i},e.t))):null})),ch=e=>{const t=Xu();return fr(lh,{...e,onToggle:t})},dh=e=>{let{menuModel:t,refFocusItem:n,className:i,isShow:o,onClose:r}=e;const s=Zu(o&&ke,n),a=(0,H.li)(),l=fa(t,s,a)[0];return fr(al,{isShow:o,className:i,onClose:r,children:fr(Sa,{refFirst:s,refLast:a,children:fr(ch,{menuModel:t,getFocusRef:l})})})},ph=(e,t)=>n=>{let{title:i,tabIndex:o="-1",...r}=n;return fr(Sp,{className:"link",tabIndex:o,...r,href:e,children:i||t})},uh=ph("https://cryptocompare.com",tt),hh=ph("https://coinstats.app",nt),mh=ph("https://messari.io",it),yh=ph("https://newsapi.org",ct),gh=ph("https://thenewsapi.com",dt),fh=ph("https://webz.io",pt),wh=ph("https://www.reddit.com",ut),bh=ph("https://dev.to",ht),vh=ph("https://stackoverflow.com",mt),Sh=ph("https://iexcloud.io",ot),Ch=ph("https://financialmodelingprep.com",rt),Ih=ph("https://www.alphavantage.co",at),_h=[["All",""],["Blockchain","blockchain"],["Earnings","earnings"],["IPO","ipo"],["Mergers & Acquisitions","mergers_and_acquisitions"],["Financial Markets","financial_markets"],["Economy - Fiscal Policy","economy_fiscal"],["Economy - Monetary Policy","economy_monetary"],["Economy - Macro/Overall","economy_macro"],["Energy & Transportation","energy_transportation"],["Finance","finance"],["Life Sciences","life_sciences"],["Manufacturing","manufacturing"],["Real Estate & Construction","real_estate"],["Retail & Wholesale","retail_wholesale"],["Technology","technology"]],Nh=[["Latest","LATEST"],["Earliest","EARLIEST"],["Relevance","RELEVANCE"]],kh=[["Limit 50","50"],["Limit 100","100"],["Limit 200","200"]],xh=cd((()=>[nd("tickers",{caption:"Stock Symbol",dfValue:"AMD",inputProps:Hc(16),is:!0}),od("topics",_h),od("sortBy",Nh),od("limit",kh)])),Th=[["Latest","latest"],["Handpicked","handpicked"],["Trending","trending"],["Bullish","bullish"],["Bearish","bearish"]],Ah=cd((()=>[od("filter",Th,{caption:"News filter"})])),Eh=[["All","ALL_NEWS_FEEDS"],["Decrypt","decrypt"],["CoinDesk","coindesk"],["CoinTelegraph","cointelegraph"],["CryptoCompare","cryptocompare"]],$h=[["All","ALL_NEWS_CATEGORIES"],["Altcoin"],["Asia"],["Blockchain"],["Business"],["Commodity"],["Exchange"],["Fiat"],["ICO"],["Market"],["Mining"],["Regulation"],["Trading"],["Technology"],["Sponsored"],["Wallet"]],Dh=[["Latest","latest"],["Popular","popular"]],Rh=cd((()=>[rd("category",$h,{is:!0}),od("feed",Eh),od("sortOrder",Dh,{caption:"SortBy"})])),Bh=["algorithms","analytics","ai","generativeai","ethics","openai","chartgpt","bardgpt","llama","machinelearning","clustering","nlp","dataengineering","datascience","deeplearning","aws","architecture","api","css","tailwindcss","html","devops","docker","github","githubcopilot","javascript","typescript","angular","vue","react","nextjs","node","deno","python","backend","sql","nosql","database","mongodb","couchdbase","postgres","oracle","graphql","warehousing","showdev","webdev","womenintech","development","coding","programming","computerscience","softwareengineering","productivity","automation","testing","opensource","career","ui","cuda","nvidia","cybersecurity","security","privacy","hardware","unity3d","gamedev","linux","discuss","news","free"],Ph=["10","20","30","40","50"],Lh=["7","14","21","30","60","90","180","360"],Kh=cd((()=>[rd("tag",Bh,{is:!0,isNotFirstUpperCase:!0}),od("perPage",Ph,{caption:"Per Page",dfIndex:2}),od("inRecentDays",Lh,{caption:"In Recent Days"})])),Mh=cd((()=>[nd("symbol",{caption:"Stock Symbol",dfValue:"AMD",inputProps:Hc()})])),Wh=[["10 News","10"],["20 News","20"],["30 News","30"],["40 News","40"],["50 News","50"]],Oh=Wh[1],Fh=cd((()=>[nd("symbol",{caption:"Stock Symbol",dfValue:"AMD",inputProps:Hc(),is:!0}),od("recent",Wh,{dfOption:Oh})])),zh=[["All","all"]],Uh=cd((()=>[od("assetKey",zh,{caption:"News about"})])),Hh=[["Relevancy","relevancy"],["Popularity","popularity"],["PublishedAt","publishedAt"]],Gh="Weather",jh=cd((()=>[nd("symbol",{caption:ed("Term",Gh),dfValue:Gh,is:!0}),od("sortBy",Hh)])),Vh=["business","entertainment","general","health","science","sports","technology"],Jh=[["Argentina","ar"],["Australia","au"],["Austria","at"],["Belguim","be"],["Brazil","br"],["Bulgaria","bg"],["Canada","ca"],["China","cn"],["Colombia","co"],["Cuba","cu"],["Czechia","cz"],["Egypt","eg"],["France","fr"],["Germany","de"],["Greece","gr"],["Hong Kong","hk"],["Hungary","hu"],["India","in"],["Indonesia","id"],["Ireland","ie"],["Israel","il"],["Italy","it"],["Japan","jp"],["Latvia","lv"],["Lithuania","lt"],["Malaysia","my"],["Mexico","mx"],["Morocco","ma"],["Netherlands","nl"],["New Zealand","nz"],["Nigeria","ng"],["Norway","no"],["Phillipines","ph"],["Poland","pl"],["Portugal","pt"],["Romania","ro"],["Russian Federation","ru"],["Saudi Arabia","sa"],["Serbia","rs"],["Singapore","sg"],["Slovakia","sk"],["Slovenia","si"],["South Africa","za"],["South Korea","kr"],["Sweden","se"],["Switzerland","ch"],["Taiwan","tw"],["Thailand","th"],["Türkiye","tr"],["Ukraine","ua"],["United Arab Emirates","ae"],["United Kingdom","gb"],["United States","us"],["Venezuela","ve"]],qh=Jh[52],Yh=cd((()=>[rd("country",Jh,{dfOption:qh,is:!0}),rd("category",Vh)])),Zh=["Amd","intel","architecture","algorithms","AskAcademia","AskEconomics","AskReddit","askscience","artificial","AItoolsCatalog","aidevtools","ChatGPT","ChatGPTPro","ChatGPTCoding","OpenAI","LocalLLaMA","MachineLearning","learnmachinelearning","machinelearningnews","singularity","hardware","laptops","eGPU","gadgets","raspberry_pi","networking","sysadmin","books","FreeEBOOKS","bicycling","classicalmusic","CryptoCurrency","CryptoMarkets","CryptoTechnology","cardano","Autos","cars","Database","SQL","NoSQL","dataengineering","datascience","dataisbeautiful","Infographics","datasets","deeplearning","economy","Economics","sustainability","environment","Daytrading","options","GAMETHEORY","explainlikeimfive","europe","Finance","sustainableFinance","FinancialIndependence","FluentInFinance","html5","javascript","typescript","reactjs","nextjs","node","Deno","webdev","web_design","browsers","privacy","java","Kotlin","rust","elixir","Python","programming","opensource","SaaS","nocode","SideProject","selfhosted","webhosting","Cloud","cloudcomputing","aws","AZURE","devops","docker","virtualization","LifeProTips","lifehacks","linux","windows","todayilearned","science","statistics","StockMarket","stocks","startup","startups","Entrepreneur","business","BusinessIntelligence","smallbusiness","advertising","marketing","digital_marketing","socialmedia","analytics","PPC","SEO","bigseo","juststart","travel","visualization","technology","homeautomation","homeowners","RealEstate","InteriorDesign","philosophy","minimalism","energy","Renewable","RenewableEnergy","electricvehicles","teslamotors","Physics","solar","solarDIY","batteries","soccer","football","WomensSoccer","investing","UpliftingNews","news","worldnews"],Xh=["hour","day","week","month","year","all"],Qh=["10","20","30"],em=cd((()=>[rd("subreddit",Zh,{is:!0,isInput:!0,isNotFirstUpperCase:!0}),od("t",Xh,{caption:"Period",dfIndex:1,isNotFirstUpperCase:!0}),od("limit",Qh)])),tm=Xh[3],nm=Qh[0],im=[["relevance"],["hot"],["top"],["new"],["comments"]],om=im[2],rm=cd((()=>[rd("subreddit",Zh,{is:!0}),nd("q",{caption:ed("Query",""),dfValue:"",is:!0}),od("t",Xh,{caption:"Period",dfOption:tm}),od("limit",Qh,{dfOption:nm}),od("sort",im,{caption:"Sort By",dfOption:om})])),sm=[["Activity, Recent Day","activity"],["Creation Date","creation"],["Score","votes"],["Relevance","relevance"]],am=sm[2],lm="flexbox",cm=cd((()=>[nd("tagged",{caption:ed("Tagged","CSS"),dfValue:"CSS",is:!0}),nd("inTitle",{caption:ed("In Title",lm),dfValue:lm,is:!0}),od("sortBy",sm,{dfOption:am}),ld("_ft")])),dm=[["Activity, Recent Day","activity"],["Creation Date","creation"],["Score","votes"],["Hot Tab","hot"],["Hot Week Tab","week"],["Hot Month Tab","month"]],pm=dm[4],um=cd((()=>[nd("tag",{caption:ed("Tag","CSS"),dfValue:"CSS",is:!0}),od("sortBy",dm,{dfOption:pm,is:!0}),ld("_ft")])),hm=["all","general","science","sports","business","health","tech","politics","food","travel"],mm=[["PublishedAt"," published_at"],["Relevancy","relevance_score"]],ym="Weather",gm=cd((()=>[nd("search",{caption:ed("Term",ym),dfValue:ym,is:!0}),rd("category",hm),od("sortBy",mm)])),fm=[["All","all"],["Argentina","ar"],["Armenia","am"],["Australia","au"],["Austria","at"],["Belarus","by"],["Belgium","be"],["Bolivia","bo"],["Brazil","br"],["Bulgaria","bg"],["Canada","ca"],["Chile","cl"],["China","cn"],["Colombia","co"],["Croatia","hr"],["Czechia","cz"],["Ecuador","ec"],["Egypt","eg"],["France","fr"],["Germany","de"],["Greece","gr"],["Honduras","hn"],["Hong Kong","hk"],["India","in"],["Indonesia","id"],["Iran","ir"],["Ireland","ie"],["Israel","il"],["Italy","it"],["Japan","jp"],["Korea","kr"],["Mexico","mx"],["Netherlands","nl"],["New Zealand","nz"],["Nicaragua","ni"],["Pakistan","pk"],["Panama","pa"],["Peru","pe"],["Poland","pl"],["Portugal","pt"],["Qatar","qa"],["Romania","ro"],["Russia","ru"],["Saudi Arabia","sa"],["South Africa","za"],["Spain","es"],["Switzerland","ch"],["Syria","sy"],["Taiwan","tw"],["Thailand","th"],["Türkiye","tr"],["Ukraine","ua"],["United Kingdom","gb"],["United States Of America","us"],["Uruguay","uy"],["Venezuela","ve"]],wm=[["All","all"],["Business Insider","businessinsider.com"],["CNBC","cnbc.com"],["CNET","cnet.com"],["The Verge","theverge.com"]],bm=cd((()=>[rd("locale",fm,{is:!0}),rd("category",hm),od("domain",wm)])),vm=[["Australia","AU"],["Austria","AT"],["Belarus","BY"],["Belguim","BE"],["Brazil","BR"],["Bulgaria","BG"],["Canada","CA"],["Chile","CL"],["China","CN"],["Colombia","CO"],["Croatia","HR"],["Czech Republic","CZ"],["Denmark","DK"],["Estonia","EE"],["Finland","FI"],["France","FR"],["Germany","DE"],["Greece","GR"],["Hong Kong","HK"],["Hungary","HU"],["India","IN"],["Indonesia","ID"],["Iran","IR"],["Ireland","IE"],["Israel","IL"],["Italy","IT"],["Japan","JP"],["Malaysia","MY"],["Mexico","MX"],["Nertherlands","NL"],["New Zealand","NZ"],["Nigeria","NG"],["Norway","NO"],["Philippines","PH"],["Poland","PL"],["Portugal","PT"],["Romania","RO"],["Russia","RU"],["Serbia","RS"],["Singapore","SG"],["Slovakia","SK"],["Slovenia","SI"],["South Africa","ZA"],["South Korea","KR"],["Spain","ES"],["Sweden","SE"],["Switzerland","CH"],["Taiwan","TW"],["Thailand","TH"],["Türkiye","TR"],["Ukraine","UA"],["United Kingdom","GB"],["United States","US"],["Vietnam","VN"]],Sm=[["Business","business"],["Politics","politics"],["Entertainment","entertainment"],["Health","health"],["Travel","travel"],["Financial","financial_news"],["Sports","sports"],["Technology","tech"],["Real Estate","real_estate"],["Education","education"],["Fashion","fashion"],["Science","science"],["Architects","architects"]],Cm=[["All",""],["English","english"]],Im=cd((()=>[rd("country",vm,{is:!0}),rd("topic",Sm),od("lang",Cm,{caption:"Language"})])),_m=["news","blogs"],Nm=e=>{const t=parseInt(e,10);return!Number.isNaN(t)&&t>0&&t<31||""===e},km=cd((()=>[nd("inTitle",{caption:"In Title (Default: Weather)",dfValue:"Weather",is:!0}),od("siteType",_m,{caption:"Site Type"}),nd("beforeDays",{caption:"Before Days, Max 30",dfValue:2,inputProps:{maxLength:2,errorMsg:"0({...o,dialogType:"DialogType2",getConfig:e,CompLink:t,paneCaption:n,paneId:i}),Tm={WEBZ:{type:"W_WEBZ_QUERY",...xm(km,fh,`${pt}: News, Blogs`,"webz",{caption:"News, Blogs",loadId:"W"})},WEBZ_COUNTRY:{type:"W_WEBZ_COUNTRY",...xm(Im,fh,`${pt}: By Country`,"webz_country",{caption:"By Country, Topic",loadId:"W"})},REDDIT:{type:"REDDIT",...xm(em,wh,`${ut}: Top By`,"rd_topby",{loadId:"RD"})},REDDIT_SEARCH:{type:"REDDIT_SEARCH",...xm(rm,wh,`${ut}: Search`,"rd_searchby",{loadId:"RD"})},DEV_TO:{type:"DEV_TO",...xm(Kh,bh,`${ht}: Top By`,"dt_topby",{caption:"Top By",loadId:"DT"})},STACK_TAGGED:{type:"SO_TAGGED",...xm(um,vh,`${mt}: Tagged`,"stack_tagged",{caption:"Tagged Questions",loadId:"SO",paneType:"STACK_ITEM"})},STACK_SEARCH:{type:"SO_SEARCH",...xm(cm,vh,`${mt}: Search`,"stack_search",{caption:"Search Questions",loadId:"SO",paneType:"STACK_ITEM"})},CRYPTO_COMPARE:{type:"CRYPTO_COMPARE",...xm(Rh,uh,tt,"cryptocompare_news",{loadId:"CCN"})},COIN_STATS:{type:"COIN_STATS",...xm(Ah,hh,`${nt} News`,"coinstats_news",{loadId:"CS"})},MESSARI:{type:"MESSARI",...xm(Uh,mh,it,"messari_news",{loadId:"MS"})},IEX:{type:"IEX_NEWS",...xm(Fh,Sh,ot,"iex_news",{loadId:"IEX"})},FMP:{type:"FMP",...xm(Mh,Ch,st,"fmp_news")},AV:{type:"AV",...xm(xh,Ih,at,"av_sentiments")},NEWS_SEARCH:{type:"NEWS_SEARCH",...xm(jh,yh,`${lt}: Search`,"newsapi_search",{loadId:"NS",dialogProps:{source:"newsapi_search"}})},NEWS_TOP:{type:"NEWS_TOP",...xm(Yh,yh,`${lt}: Top By`,"newsapi_top",{loadId:"NT",dialogProps:{source:"newsapi_top"}})},THE_NEWS_SEARCH:{type:"THE_NEWS_SEARCH",...xm(gm,gh,`${dt}: Search`,"thenewsapi_search",{caption:"Search",loadId:"TNS"})},THE_NEWS_TOP:{type:"THE_NEWS_TOP",...xm(bm,gh,`${dt}: Top By`,"thenewsapi_top",{caption:"Top By",loadId:"TNT"})}},Am={paddingTop:2},Em=(e,t)=>n=>{Eu(t),e(n)};let $m;const Dm=(e,t,n,i)=>{if(!$m){const o=d(Em,i),r=e=>()=>{e(),i()};$m=[{t:"Blockchain",items:[[tt,o(Tm.CRYPTO_COMPARE),Am],[nt,o(Tm.COIN_STATS)],[it,o(Tm.MESSARI)]]},{t:"Stock Market",items:[[`${at}: Sentiment`,o(Tm.AV)],[ot,o(Tm.IEX)],[st,o(Tm.FMP)]]},{t:"General News",items:[[`${ct}: Browser`,r(t)],[`${ct}: Search`,o(Tm.NEWS_SEARCH)],[`${ct}: Top By`,o(Tm.NEWS_TOP)],"1",[`${dt}: Search`,o(Tm.THE_NEWS_SEARCH)],[`${dt}: Top By`,o(Tm.THE_NEWS_TOP)],"2",[`${pt}: News, Blogs`,o(Tm.WEBZ)],[`${pt}: By Country, Topic`,o(Tm.WEBZ_COUNTRY)]]},{t:"Miscellaneous",items:[[ht,o(Tm.DEV_TO)],"1",[`${mt}: Tagged`,o(Tm.STACK_TAGGED)],[`${mt}: Search`,o(Tm.STACK_SEARCH)],"2",[`${ut}: Top By`,o(Tm.REDDIT)],[`${ut}: Search`,o(Tm.REDDIT_SEARCH)]]},Ne?void 0:{t:`About ${e}`,onItem:r(n)}].filter(Boolean)}return $m},Rm=(e,t)=>e.isShow===t.isShow,Bm=e=>(0,H.ph)(e,Rm),Pm=()=>!0,Lm=(e,t)=>{const n=_e?"":String(e+1);return{ariaLabel:t,dataPos:"l",hotKey:n||void 0,caption:n+(t||"DIA").slice(0,3)}},Km=(e,t)=>(0,yr.n)(Qr,{...Lm(t,Yc(e)),key:e.type,timeout:0,className:"bt-hot",onClick:d(Eu,e)}),Mm=(e=>(0,H.ph)(e,Pm))((()=>{const e=Au();return b(e)?fr("div",{style:er,children:[fr(Fr,{items:e,crItem:Km}),0!==e.length&&fr(Qr,{ariaLabel:"Clean Hot Bar",dataPos:"l",hotKey:_e?void 0:"C",timeout:0,caption:"CL",onClick:Du},"BT_CLEAN")]}):null})),Wm="header",Om=dr(Wm),Fm=ur(dr(`${Wm}__panel-browser`)),zm=`${Wm}__icon-app`,Um=`${Wm}__label-app`,Hm=`${Wm}__browser-bts`,Gm=`${Wm}__bts`,jm=`${Wm}__bt-about`,Vm={position:"relative",top:-1,verticalAlign:"middle",margin:"0 8px"},Jm=e=>{let{onNewsSources:t,onSettings:n,onAbout:i}=e;const o=(0,H.li)(),[r,s]=za(),a=(0,H.hb)((e=>{const t=e&&e.target;ie(o,t&&"menuitem"===t.role?t:null),s(!1)}),[]),l=Dm(Ku,t,i,a);return Gr("Q",s),fr("div",{className:Om,children:[fr(dh,{isShow:r,menuModel:l,refFocusItem:o,className:Fm,onClose:a}),fr(Ju,{}),fr(qu,{ariaLabel:Ku,dataPos:"l",className:zm}),fr(Yu,{className:Um,caption:Ku}),fr("span",{className:Hm,children:fr(Pl.ModalButton,{ariaLabel:"Query Sources Menu",dataPos:Ir,caption:"Query",hotKey:"Q",onClick:s,children:fr("span",{className:"arrow-down"})})}),fr(Mm,{}),fr("div",{className:Gm,children:[fr(Pl.FlatButton,{ariaLabel:"About News Aggregator",dataPos:Ir,className:jm,hotKey:"A",onClick:i,children:fr(Ou,{style:Vm})}),fr(Pl.FlatButton,{ariaLabel:"Settings Dialog",dataPos:Ir,hotKey:"S",onClick:n,children:fr(Fu,{style:Vm})})]})]})},qm=e=>{const[t,n,i]=us(e);return[t,n,i,Zs(i)]},Ym={position:"relative",display:"block",width:32,height:32,margin:"0 auto",marginTop:32,textAlign:"middle"},Zm=(e,t,n,i)=>{const[o,r]=(0,H.J0)();return(0,H.vJ)((()=>{e&&1!==o&&2!==o&&(r(1),fetch(t).then((e=>{const{status:n}=e;if(n>=200&&n<400)return e.json();throw{status:n,url:t}})).then((e=>{r(2),n(e)})).catch((e=>{r(3),i(e)})))}),[e]),1===o?fr(Pr,{style:Ym}):3===o?fr(Pr,{style:Ym,isFailed:!0}):null},Xm=e=>{let{caption:t,isInitClose:n,items:i,hmItems:o,onClick:r,...s}=e;return fr(oh,{caption:t,isClose:n,children:oe(i,((e,t)=>{const n={...(o||{})[e.id],...s};return fr(Mr,{className:Yo,caption:n.menuTitle,onClick:d(r,n)},t)}))})},{Browser:Qm,BrowserCaption:ey,ModalSlider:ty,ScrollPane:ny,ItemStack:iy}=Pl,oy=hr("items__menu-more"),ry={paddingRight:0},sy={textAlign:"left"},ay={height:"92%",paddingRight:10,overflowY:"auto"},ly=()=>{},cy=(e,t,n)=>(0,yr.n)(Xm,{...e,...n,key:t}),dy=e=>{let{caption:t,menuMore:n,browserId:i,useMsBrowser:o,url:r,onError:s=ly,children:a,onClick:l}=e;const[c,d,p,u]=qm(Ne),[h,m,y]=us(!1),[g,f]=(0,H.J0)(),w=Zm(c,r,f,s);o((e=>{e&&e.id===i&&d()}));const{menu:b,items:v}=g||{},S=n?m:void 0,C={paddingLeft:n?30:10};return fr(Qm,{isShow:c,style:ry,onKeyDown:u,children:[n&&fr(ty,{isShow:h,className:oy,model:n,onClose:y}),fr(ey,{style:{...sy,...C},caption:t,onMore:S,onClose:p}),w,fr(ny,{style:ay,children:[fr(iy,{items:b,crItem:cy,browserId:i,hmItems:v,onClick:l}),a]})]})},py=(e=>t=>{let{style:n}=t;return fr(Fc,{style:n,children:fr(e,{})})})(yh),uy=e=>{let{browserId:t,useMsBrowser:n,onClick:i,onError:o,onRemoveBadges:r}=e;return fr(dy,{caption:"NewsApi.org Browser",url:"data/news-source-menu.json",browserId:t,useMsBrowser:n,onClick:i,onError:o,children:fr(py,{})})},hy={zIndex:1030,position:"absolute",top:70,left:10},my=(e,t)=>{for(let n=0;n{let{maxDialog:t=3,useMsDialog:n,closeDialog:i}=e;const[o,r]=(0,H.J0)({hmIs:{},compDialogs:[],visibleDialogs:[]}),{hmIs:s,compDialogs:a}=o;return n((e=>{const n=e||{};n&&r((e=>{const{key:i,Comp:o}=n;return o&&!g(my(e.compDialogs,i))?e:(((e,t,n)=>{const{hmIs:i,visibleDialogs:o}=e,r=o.indexOf(t);-1!==r&&o.splice(r,1),o.push(t),i[t]=!0,o.length>n&&(i[o[0]]=!1,o.splice(0,1))})(e,i,t),o?e.compDialogs.push(o):e.compDialogs=((e,t)=>{const n=my(e,t)||0;return[...e.slice(0,n),...e.slice(n+1),e[n]]})(e.compDialogs,i),{...e})}))})),fr("div",{style:hy,children:a.map((e=>{const t=e.key;return(0,H.Ob)(e,{key:t,isShow:s[t],onClose:()=>{(e=>{r((t=>{const{hmIs:n,visibleDialogs:i}=t;return n[e]=!1,t.visibleDialogs=i.filter((t=>t!==e)),{...t}}))})(t),i(e.props.itemConf)}})}))})},gy=e=>{let{useMsBrowser:t,useMsDialog:n,closeDialog:i}=e;return fr("div",{className:"hrz-container",children:[fr(uy,{browserId:et.NEWS,useMsBrowser:t,onClick:Eu,onError:xu}),fr(yy,{maxDialog:3,useMsDialog:n,closeDialog:i})]})},fy={marginTop:3},wy={display:"inline-block",color:"#80c040",width:26,height:26,lineHeight:"24px",textAlign:"center",textTransform:"uppercase",border:"2px solid #80c040",borderRadius:"50%",fontSize:"1.125rem"},by=e=>{let{step:t,description:n}=e;return fr("p",{style:fy,children:[fr("span",{style:wy,children:t}),fr("span",{style:Xo,children:[" ",n]})]})},vy=e=>{let{id:t,style:n}=e;return fr("use",{style:n,href:`./sprite.svg#${t}Logo`})},Sy=e=>{let{ariaLabel:t,dataPos:n,className:i,href:o}=e;const[r,s]=Sr(t,n);return fr("a",{"aria-label":r,"data-pos":s,className:i,href:o,children:fr("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",children:fr(vy,{id:"GitHub"})})})},Cy={transform:"translate(-210px, -210px) scale(0.9)"},Iy=e=>{let{ariaLabel:t,dataPos:n,className:i}=e;const[o,r]=Sr(t,n);return fr("a",{"aria-label":o,"data-pos":r,className:i,href:"https://preactjs.com",children:fr("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"-256 -256 512 512",children:fr(vy,{id:"Preact",style:Cy})})})},_y={position:"relative",textAlign:"center",paddingTop:20},Ny=()=>fr("div",{style:_y,children:[fr(Sy,{ariaLabel:"GitHub: Repository News Aggregator",dataPos:"gh",className:"logo__github",href:"https://github.com/zhnzhn/news-aggregator"}),fr(Iy,{ariaLabel:"Official Preact site",dataPos:Ir,className:"logo__preact"})]}),ky=pr("about-pane"),xy={paddingLeft:12,textAlign:"left"},Ty={height:"92%",paddingTop:8,paddingRight:10,overflowY:"auto"},Ay={...Xo,paddingLeft:12,paddingRight:5,lineHeight:1.4,fontWeight:"bold"},Ey={lineHeight:1.4},$y={lineHeight:1.8},Dy={color:"#80c040"},Ry={marginTop:8},By=(e,t)=>Ne?`${e} [${t}]`:e,{ItemStack:Py}=Pl,Ly=[[uh],[hh],[mh],[Sh],[Ch,{title:st}],[Ih],[yh],[gh],[bh],[vh],[fh],[wh]],Ky=(e,t)=>{let[n,i]=e;return fr("div",{children:fr(n,{...i,tabIndex:"0"})},t)},My=[`Please, click button ${By("QUERY","q")} in header.`,"Choose headlines source.",`Click button ${By("LOAD","l")} in dialog.`],Wy=`API Keys can be set in the ${By("Settings Dialog","s")}`,Oy=(e,t)=>fr(by,{step:t+1,description:e},t),Fy=e=>{let{isInitShow:t,useMsAbout:n}=e;const[i,o,r,s]=qm(t);n((e=>{if(e){(e.is?o:r)()}}));const[a,l]=lr(i,ky);return fr("div",{className:a,style:l,role:"presentation",onKeyDown:s,children:[fr(Pl.BrowserCaption,{style:xy,caption:"About News Aggregator",onClose:r}),fr(Pl.ScrollPane,{style:Ty,children:fr("div",{style:Ay,children:[fr("div",{style:Ey,children:[fr("p",{children:[fr("span",{style:Dy,children:"News Agreggator"})," is a web app for browsing news, blogs, social media headlines."]}),fr("p",{style:Ry,children:"Available headlines providers: "})]}),fr("div",{style:$y,children:fr(Py,{items:Ly,crItem:Ky})}),fr("div",{style:Ey,children:[fr("p",{style:Ry,children:"Personal API Keys from some providers are required."}),fr("p",{children:Wy})]}),fr("p",{style:Ry,children:fr("span",{style:Xo,children:"Browsing by source:"})}),fr(Py,{items:My,crItem:Oy}),fr(Ny,{}),fr("p",{children:fr("span",{style:Xo,children:"*Logos Fair Use."})})]})})]})},zy=(e,t)=>{const{key:n}=t;let i=0;for(;i{let{useMsPane:t}=e;const[n,i]=(0,H.J0)([]);return t((e=>{const{Comp:t}=e||{};t&&i((e=>zy(e,t)?e:[t,...e]))})),fr("div",{className:"hrz-container",children:n})},Hy=e=>{let{isShow:t,CL:n,S:i,initialWasClosed:o=!0,timeout:r=450}=e;const[s,a]=Me(),l=(0,H.li)(o),c=(0,H.li)(t);(0,H.vJ)((()=>{c.current&&!t&&setTimeout((()=>{l.current=!0,a()}),r),c.current=t,l.current=!1}),[t,s]);const[d,p]=l.current?[n.INIT,i.INIT]:t?[n.SHOWING,i.SHOWING]:[n.HIDING,i.HIDING];return{className:d,style:p}},Gy="modal-root",jy={INIT:Gy,SHOWING:`${Gy} show-modal`,HIDING:`${Gy} hide-modal`},Vy={INIT:{display:"none"},SHOWING:{display:"block"},HIDING:{backgroundColor:"rgba(0,0,0, 0)"}},Jy=e=>{let{isShow:t,timeout:n,children:i,onClose:o}=e;return fr("div",{...Hy({isShow:t,CL:jy,S:Vy,timeout:n}),onClick:o,children:i})},qy=(e,t,n)=>{let{Comp:i,type:o}=e,{currentDialog:r,data:s,onClose:a}=n;return fr(i,{isShow:r===o,data:s[o],onClose:a},o)},Yy=e=>{let{router:t,showAction:n,useMsModalDialog:i}=e;const[o,r]=(0,H.J0)({isShow:!1,currentDialog:null,data:{},dialogs:[]}),{isShow:s,data:a,dialogs:l,currentDialog:c}=o,d=(0,H.hb)((()=>r((e=>({...e,isShow:!1,currentDialog:null})))),[]);return i((e=>{const{option:n}=e||{};if(n){const e=(e=>(e||{}).modalDialogType)(n);h(e)&&r((i=>(i.data[e]||i.dialogs.push({type:e,Comp:t[e]}),i.data[e]=n,{...i,isShow:!0,currentDialog:e})))}})),fr(Jy,{isShow:s,onClose:d,children:fr(Fr,{items:l,crItem:qy,currentDialog:c,data:a,onClose:d})})},Zy=e=>ir("tab",[e,"active"]),Xy=(e,t)=>`tab-${e}-${t}`,Qy=(e,t)=>`tabpanel-${e}-${t}`,eg=(e,t,n)=>{let{id:i,selectedTabIndex:o,hClick:r,hKeyDown:s}=n;return(0,H.Ob)(e,{key:t,id:i,index:t,isSelected:t===o,onClick:d(r,t,e),onKeyDown:d(s,t,e)})},tg=e=>{let{ariaLabel:t,id:n,style:i,selectedTabIndex:o,setTabIndex:r,children:s}=e;const a=(0,H.hb)(((e,t)=>{r(e),m(t.props.onClick)&&t.props.onClick()}),[]),l=s.length,c=(0,H.hb)(((e,t,i)=>{const o=e=>{const i=((e,t)=>-1===e?t-1:e===t?0:e)(e,l);(e=>{re(document.getElementById(e))})(Xy(n,i)),a(i,t)},{keyCode:r}=i,s=39===r?1:37===r?-1:0;s&&(pe(i),o(e+s))}),[l]);return fr("div",{role:"tablist","aria-label":t,"aria-orientation":"horizontal",className:"tabs",style:i,children:fr(Fr,{items:s,crItem:eg,id:n,selectedTabIndex:o,hClick:a,hKeyDown:c})})},ng=(e,t,n)=>{let{id:i,isShow:o,selectedTabIndex:r}=n;const s=t===r;return fr("div",{style:rr(s),role:"tabpanel",id:Qy(i,t),"aria-labelledby":Xy(i,t),children:(0,H.Ob)(e.props.children,{isShow:o,isSelected:s,isVisible:o&&s})},t)},ig=e=>{let{id:t,style:n,isShow:i,selectedTabIndex:o,children:r}=e;return fr("div",{className:"panes",children:fr(Fr,{items:r,crItem:ng,id:t,isShow:i,selectedTabIndex:o})})},og=e=>{let{ariaLabel:t,id:n,isShow:i,width:o,height:r,tabsStyle:s,children:a}=e;const[l,c]=(0,H.J0)(0);return fr("div",{style:{width:o,height:r},children:[fr(tg,{ariaLabel:t,id:n,style:s,selectedTabIndex:l,setTabIndex:c,children:a}),fr(ig,{id:n,isShow:i,selectedTabIndex:l,children:a})]})},rg=e=>{let{isSelected:t,id:n,index:i,title:o,onClick:r,onKeyDown:s}=e;return fr("button",{type:"button",role:"tab",className:Zy(t),id:Xy(n,i),tabIndex:t?"0":"-1","aria-selected":t,"aria-controls":Qy(n,i),onClick:r,onKeyDown:s,children:fr("span",{className:"tab_t",children:o})})},sg=(e,t,n)=>e&&t&&m(e[t])?e[t]:()=>n,ag={lineHeight:2.2},lg=e=>e.current.getValue(),cg=(e,t)=>{const n=-1===e.toUpperCase().indexOf("API")?"API Key":"Key";return`${e} ${n} (${t})`},dg=(e,t)=>{return{caption:cg(e,t),maxLength:t,onTest:(n=t,e=>e.length===n||""===e)};var n},pg=e=>{const t=(0,H.li)(),n=(0,H.li)(),i=(0,H.li)(),o=(0,H.li)(),r=(0,H.li)(),s=(0,H.li)(),{isVisible:a,setRefLast:l,style:c,fieldStyle:d,buttonsStyle:p,btStyle:u,data:h}=e,{setAv:m,setIex:y,setFmp:g,setNews:f,setTheNews:w,setWebz:b}=(e=>({setAv:sg(e,"setAvKey"),setIex:sg(e,"setIexKey"),setFmp:sg(e,"setFmpKey"),setNews:sg(e,"setNewsKey"),setTheNews:sg(e,"setTheNewsKey"),setWebz:sg(e,"setWebzKey")}))(h),v=(0,H.hb)((()=>{m(""),y(""),g(""),f(""),w(""),b(""),[t,n,i,o,r,s].forEach((e=>e.current.clear()))}),[]),S=(0,H.hb)((()=>{y(lg(n)),g(lg(i)),m(lg(t)),f(lg(o)),w(lg(r)),b(lg(s)),[n,i,o,s].forEach((e=>e.current.setWasEnter()))}),[]);return a?fr(Br,{style:c,children:[fr(oh,{style:ag,caption:"Market News & Sentiment",children:fr(Gs,{...dg(at,16),refEl:t,style:d,name:"alpha-vantage",onEnter:m})}),fr(oh,{style:ag,caption:"Stock Market",children:[fr(Gs,{...dg(ot,35),refEl:n,style:d,name:"iex-cloud",onEnter:y}),fr(Gs,{...dg(rt,32),refEl:i,style:d,name:"fmp-api",onEnter:g})]}),fr(oh,{style:ag,caption:"General News",children:[fr(Gs,{...dg(ct,32),refEl:o,style:d,name:"newsapi.org",onEnter:f}),fr(Gs,{...dg(dt,40),refEl:r,style:d,name:"thenewsapi",onEnter:w}),fr(Gs,{...dg(pt,36),refEl:s,style:d,name:"webz.io",onEnter:b})]}),fr("div",{style:p,children:[fr(as,{caption:"Clear All",onClick:v}),fr(as,{isPrimary:!0,refBt:a?l:void 0,style:u,caption:"Set All",onClick:S})]})]}):null},ug=(e,t,n)=>v(n)&&n>=e&&n<=t,hg=(e,t,n)=>{e.DF=e.find((e=>e[1]===t))||e[n]},mg=[[4,16],[4,18]],yg=((e,t)=>new Array(e).fill("").map(((e,n)=>{return[`${i=t+n}px`,i];var i})))(...Ne?mg[0]:mg[1]),gg=Ne?yg[2][1]:yg[3][1];let fg=gg;const wg=document.documentElement,bg=e=>{const t=(e||[])[1];ug(16,21,t)&&(fg=t,wg.style.fontSize=`${t}px`,ac(cc,t))},vg={DF:"GREY",GREY:"GREY",WHITE:"WHITE",SAND:"SAND"},Sg=[["Grey","GREY"],["White","WHITE"],["Sand","SAND"]],Cg=(e,t)=>`rgba(${e}, ${e}, ${e}, ${t})`,Ig="#3a6799",_g="#a9a9a9",Ng={BG_BODY:"#5f5f5f",BG:"#4d4d4d",BT_H:Cg(255,.1),BT_FC:"#6ca1dc",BT_RC:_g,BG_OPTIONS:"#404040",MSI_C:"#f8f8ff",MSI_FH:Cg(255,.1),SBT_BG:Ig,BG_HEADER:Ig,C_HEADER:_g,ART_H:"#404040",ART_D:"#4d4d4d"},kg="#0096c8",xg={BT_H:Cg(48,.3),MSI_C:"#303030",MSI_FH:Cg(255,.4),SBT_BG:"#0096c8",BG_HEADER:kg,BT_FC:kg,C_HEADER:"#4d4d4d"},Tg="#eaeaea",Ag={...xg,BG_BODY:"darkgrey",BG:Tg,BG_OPTIONS:"#dfe4e7",BT_RC:Tg,ART_H:"#dfe4e7",ART_D:"#eaeaea"},Eg="#e8e0cb",$g={...xg,BG_BODY:"darkgrey",BG:Eg,BG_OPTIONS:"#c6bda5",BT_RC:Eg,ART_H:"#c6bda5",ART_D:"#e8e0cb"},Dg={[vg.GREY]:Ng,[vg.WHITE]:Ag,[vg.SAND]:$g},Rg=e=>{(e=>{const t=document.body.style;t.backgroundColor=e.BG_BODY,t.setProperty("--bg-c",e.BG),t.setProperty("--bt-h",e.BT_H),t.setProperty("--bt-fc",e.BT_FC),t.setProperty("--bt-rc",e.BT_RC),t.setProperty("--h-c",e.C_HEADER),t.setProperty("--h-bg",e.BG_HEADER),t.setProperty("--mso-bg",e.BG_OPTIONS),t.setProperty("--msi-c",e.MSI_C),t.setProperty("--msi-fh",e.MSI_FH),t.setProperty("--sbt-bg",e.SBT_BG),t.setProperty("--art-h",e.ART_H),t.setProperty("--art-d",e.ART_D)})(Dg[e]),ac(lc,e)},Bg={themeName:vg.DF,_init(){var e;this.setThemeName((()=>{const[e]=sc(lc),t=e&&vg[e]?e:vg.DF;return hg(Sg,t,0),t})()),(()=>{const[e]=sc(cc);if(e){const t=parseInt(e,10);ug(16,21,t)&&(fg=t)}wg.style.fontSize=`${fg}px`,hg(yg,fg,1)})(),e=!!sc("IS")[0],oc=!!e},getThemeName(){return this.themeName},setThemeName(e){this.themeName=vg[e]||vg.DF,Rg(this.themeName)}};Bg._init();const Pg=e=>{const t=(e||[])[1];Bg.getThemeName()!==t&&Bg.setThemeName(t)},Lg=()=>{oc=!0,ac("IS",!0),ac(lc,Bg.getThemeName()),ac(cc,fg),ac(dc,fc())},Kg=()=>{oc=!1;try{Zl.clear()}catch(e){console.log(e)}},Mg={margin:"12px 0 12px 16px"},Wg={height:22},Og=oc,Fg=fc(),zg=e=>{let{style:t,selectStyle:n,buttonsStyle:i,btStyle:o,onClose:r,isVisible:s,setRefLast:a}=e;return fr("div",{style:t,children:[fr(Pl.InputSelect,{style:n,caption:"UI Theme",initItem:Sg.DF,options:Sg,onSelect:Pg}),fr(Pl.InputSelect,{style:n,caption:"Font Size",initItem:yg.DF,options:yg,onSelect:bg}),fr(wl,{style:Mg,initialValue:Og,caption:"Allow use localStorage",onCheck:Lg,onUnCheck:Kg}),fr(wl,{style:Mg,initialValue:Fg,caption:"Advanced input options",onCheck:bc,onUnCheck:vc}),fr("div",{style:Wg}),fr("div",{style:i,children:fr(Pl.RaisedButton,{refBt:s?a:void 0,style:o,isPrimary:!0,caption:"Close",onClick:r})})]})},Ug="User Settings",Hg={position:"static",width:340,maxHeight:460,margin:"70px auto 0px"},Gg={margin:"26px 0 4px 0"},jg={marginLeft:24,textAlign:"left"},Vg={position:"relative",maxHeight:370},Jg={...Vg,overflowY:"auto"},qg={display:"flex",justifyContent:"flex-end",flexWrap:"wrap",margin:"10px 12px 10px 0"},Yg={...Ko,width:315,marginLeft:8},Zg=Mo(306),Xg=Bm((e=>{let{isShow:t,data:n,onClose:i}=e;const o=(0,H.li)(),r=(0,H.hb)((e=>{o.current=e}),[]);return fr(Pl.ModalDialog,{caption:Ug,style:Hg,divBtStyle:Gg,captionStyle:Do,refFocusLast:o,isShow:t,onClose:i,children:fr(og,{ariaLabel:Ug,id:"sd",width:"100%",tabsStyle:jg,isShow:t,children:[fr(rg,{title:"API Keys",children:fr(pg,{style:Jg,fieldStyle:Yg,buttonsStyle:qg,btStyle:Ro,data:n,setRefLast:r})}),fr(rg,{title:"UI Theme",children:fr(zg,{style:Vg,selectStyle:Zg,buttonsStyle:qg,btStyle:Ro,setRefLast:r,onClose:i})})]})})})),Qg={position:"static",width:350,height:220,margin:"70px auto 0px"},ef={...Xo,width:"100%",padding:"8px 12px",fontWeight:"bold",lineHeight:1.4,whiteSpace:"pre-line",wordBreak:"break-word"},tf=e=>{if(e instanceof TypeError)return e.message;const{status:t,url:n,msg:i}=e||{};return t?`${n}\ncode:${t}\nNetwork exception`:i||"Exception Message"},nf={s:Xg,a:Bm((e=>{let{isShow:t,data:n,onClose:i}=e;return fr(Bl,{isShow:t,isClosePrimary:!0,style:Qg,captionStyle:Do,caption:"Exception",onClose:i,children:fr("p",{style:ef,children:tf(n)})})}))},of=()=>($e(),fr("div",{children:[fr(Jm,{onNewsSources:Bu,onSettings:ku,onAbout:Iu}),fr("div",{className:"component-container",children:[fr(gy,{useMsBrowser:Ru,useMsDialog:Tu,closeDialog:$u}),fr(Fy,{isInitShow:!0,useMsAbout:Cu}),fr(Uy,{useMsPane:Pu})]}),fr(Yy,{router:nf,useMsModalDialog:_u})]}));(0,H.XX)(fr(of,{}),document.getElementById("app"))}},e=>{var t;t=926,e(e.s=t)}]); \ No newline at end of file diff --git a/app/app_881ca916c7b56b5efc6f.js b/app/app_881ca916c7b56b5efc6f.js new file mode 100644 index 00000000..90e2ea3f --- /dev/null +++ b/app/app_881ca916c7b56b5efc6f.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunknews_aggregator=self.webpackChunknews_aggregator||[]).push([[524],{926:(e,t,n)=>{const i=Number.MAX_SAFE_INTEGER,o=10**7,r=Math.floor,s=Math.random;let a=o,l="";const c=()=>{++a===i&&(a=o,l="-"+r(100*s()));const e=a.toString(36);return`${e.at(-1)}${e.at(-2)}${e.at(-3)}${e.slice(0,-3)}${l}`},d=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i{let t;return()=>void 0===t?t=e():t},u=e=>t=>typeof t===e,h=u("string"),m=u("function"),g=u("boolean"),y=u("undefined"),f=u("object"),w=e=>e&&f(e),b=Array.isArray,v=e=>"number"==typeof e&&e-e==0,S=function(e,t){if(void 0===t&&(t=180),!e||!h(e))return"";const n=/\.\s["A-Z]/g,i=[];let o,r,s,a,l,c=0;for(;null!==(r=n.exec(e))&&(o=r.index,s=e.substring(c,o+1),a=i.length-1,l=i[a],l&&l.length+s.length30)););return 0===i.length?e:i.join("\n\n")},C=Object.assign(Object.create(null),{" ":" ",">":">","<":"<",""":'"',"'":"'","&":"&"}),I=new RegExp(Object.keys(C).join("|"),"g"),_=new RegExp("&#(\\d+);?","g"),N=new RegExp("​","g"),k=e=>C[e],x=e=>(h(e)&&e||"").replace(_,((e,t)=>String.fromCharCode(t))).replace(I,k).replace(N,""),T=(e,t)=>S(x(e),t),A=/(.)(?=(\d{3})+$)/g,E=e=>v(e)?e>=1e3?(""+e).replace(A,"$1,"):""+e:void 0,$=[["just now",999],["sec",1e3],["min",6e4],["hour",36e5],["day",864e5],["week",6048e5],["month",2592e6],["year",31536e6]],D=$.length,R=D-1,B=(e,t)=>{const[n,i]=$[t],o=Math.round(e/i);return`${o} ${n}${1===o?"":"s"} ago`},P=(e,t)=>{const n=t||Date.now(),i=Math.abs(e-n);for(let e=0;ev(e)?P(e,t):"",K=e=>h(e)?e.charAt(0).toUpperCase()+e.slice(1):"",W=Array.isArray;var M=n(838);const O=n.n(M)().sanitize,F=e=>O(e,{USE_PROFILES:{html:!0}}),z=e=>h(e)?e.toLowerCase():e,U=e=>h(e)?e.trim():"";var H=n(299);const G="ArrowDown",j="Enter",V="Escape",J="Delete",q="touch",Y=`${q}start`,Z=`${q}move`,X=`${q}end`,Q=`${q}cancel`,ee=()=>{},te=()=>!0,ne=e=>(e||{}).current,ie=(e,t)=>{e&&(e.current=t)},oe=(e,t)=>b(e)?e.map(t):null,re=e=>(e&&m(e.focus)&&e.focus(),e),se=e=>m(e)?e():ne(e),ae=(e,t)=>re(se(e)||se(t)),le=function(e,t){void 0===t&&(t=1e3),setTimeout((()=>ae(e)),t)},ce=e=>(ne(e)||{}).style,de=(e,t)=>{const n=ne(e);n&&m(n.setValue)&&n.setValue(t)},pe=e=>{e.stopPropagation(),e.preventDefault()},ue="testPassive",he=!!(()=>{try{const e=Object.defineProperty({},"passive",{get:function(){return e._r=!0}});return window.addEventListener(ue,null,e),window.removeEventListener(ue,null,e),e._r}catch(e){return!1}})()&&{passive:!0},me="clientX",ge="clientY",ye=e=>t=>(e=>e&&e[0]||{})(t)[e],fe=ye(me),we=ye(ge),be=(e,t)=>n=>n[e]||t(n.targetTouches)||t(n.changedTouches)||0,ve=be(me,fe),Se=be(ge,we),Ce=(e,t)=>{const n=(e||"").split("://")[0];return"https"===n||t&&"http"===n?e:void 0},Ie=()=>window&&window.innerWidth,_e="ontouchstart"in window||!(!navigator||!navigator.maxTouchPoints),Ne=window&&window.innerWidth>380,ke=!_e||Ne,xe=!_e,Te="keydown";let Ae=Object.create(null);const Ee=e=>{if((e.altKey||e.metaKey)&&e.key){const t=Ae[e.key.toUpperCase()];m(t)&&(e.stopImmediatePropagation(),t())}},$e=()=>{(0,H.vJ)((()=>xe?(document.addEventListener(Te,Ee,!1),()=>{Ae=null,document.removeEventListener(Te,Ee,!1)}):void 0),[])},De=Object.is,Re=Object.assign,Be=e=>{let t;const n=new Set,i=(e,i)=>{const o=m(e)?e(t):e;if(!De(o,t)){const e=t;t=(null!=i?i:!f(o)||null===o)?o:Re({},t,o),n.forEach((n=>n(t,e)))}},o=()=>t,r={getState:o,setState:i,subscribe:e=>(n.add(e),()=>n.delete(e))};return t=e(i,o,r),r},Pe=(e,t,n)=>{(0,H.vJ)((()=>e.subscribe(t,n)),[])},Le=(e,t,n)=>{const[i,o]=(0,H.J0)(n);return(0,H.vJ)((()=>e.subscribe(t,o)),[]),i},Ke=()=>({}),We=()=>(0,H.WO)(Ke),Me=e=>{return t=(e=>(t,n,i)=>{const o=i.subscribe;return i.subscribe=(e,t,n)=>{let r=e;if(t){const o=(null==n?void 0:n.equalityFn)||De;let s=e(i.getState());r=n=>{const i=e(n);if(!o(s,i)){const e=s;t(s=i,e)}},null!=n&&n.fireImmediately&&t(s,s)}return o(r)},e(t,n,i)})(e),t?Be(t):Be;var t},Oe=(e,t)=>d(Pe,e,t),Fe=(e,t)=>d(Le,e,t,(()=>t(e.getState()))),ze=e=>[e.setState,e.getState],Ue=(e,t)=>[n=>({[e]:t?{[t]:n}:n}),t=>t[e]],He="IEX",Ge="FMP",je="AV",Ve="NEWS",Je="TNEWS",qe="WEBZ",Ye=Object.create(null),Ze=e=>t=>{Ye[e]=t},Xe={exportSettingsFn:()=>({setAvKey:Ze(je),setIexKey:Ze(He),setFmpKey:Ze(Ge),setNewsKey:Ze(Ve),setTheNewsKey:Ze(Je),setWebzKey:Ze(qe)}),getAvKey:()=>Ye[je],getIexKey:()=>Ye[He],getFmpKey:()=>Ye[Ge],getNewsKey:()=>Ye[Ve],getTheNewsKey:()=>Ye[Je],getWebzKey:()=>Ye[qe]},Qe=Xe,et={NEWS:"NEWS_API_ORG"},tt="CryptoCompare",nt="CoinStats",it="Messari",ot="IEX Cloud",rt="FMP",st="Financial Modeling Prep",at="Alpha Vantage",lt="NewsApi",ct="NewsApi.org",dt="TheNewsAPI",pt="Webz.io",ut="Reddit",ht="DEV Community",mt="StackOverflow",gt=Object.assign,yt=e=>{const{publishedAt:t}=e,n=v(t);return gt(e,{title:F(e.title),description:F(e.description),related:F(e.related),author:F(e.author),publishedAt:n?t:F(t),timeAgo:n?e.timeAgo:F(e.timeAgo)})},ft=e=>t=>{t.articleId=c();const{source:n,author:i}=t||{},{name:o}=n||{};var r,s;return t.source=e,t.author=(void 0===(r=[o,i])&&(r=[]),void 0===s&&(s=", "),W(r)?r.filter(Boolean).join(s):""),t},wt={toArticles:function(e,t){void 0===e&&(e=[]);const n="newsapi_search"===t||"newsapi_top"===t?ft(t):(e=>t=>(t.articleId=c(),t.source=e,t))(t);return e.map((e=>yt(n(e))))},toNews:(e,t)=>{const{source:n}=t,{articles:i,sortBy:o}=e;return{source:n,articles:wt.toArticles(i,n),sortBy:K(o)}}},bt=wt,vt=function(){for(var e=arguments.length,t=new Array(e),n=0;ne:1===t.length?t[0]:e=>t.reduce(((e,t)=>t(e)),e)},St=e=>e<10?"0"+e:""+e,Ct=vt((e=>e.getUTCMonth()+1),St),It=vt((e=>e.getUTCDate()),St),_t=/(\d{4})-(\d{2})-(\d{2})/,Nt=e=>{if(!h(e)||10!==e.trim().length)return!1;const t=e.match(_t);if(null===t||"object"!=typeof t||4!==t.length)return!1;const n=(new Date).getFullYear();return!(t[1].length<4||t[1]<1999||t[1]>n)&&(!(t[2].length<2||t[2]<1||t[2]>12)&&!(t[3].length<2||t[3]<1||t[3]>31))},kt=e=>{const t=new Date;return t.getUTCFullYear()-e+"-"+Ct(t)+"-"+It(t)},xt=()=>{const e=new Date;return e.getUTCFullYear()+"-"+Ct(e)+"-"+It(e)},Tt=e=>(e=>{if(Nt(e)){const t=e.split("-");return Date.UTC(t[0],parseInt(t[1],10)-1,t[2])}})(e)/1e3,At=e=>(e||"").length>12?Date.UTC(e.slice(0,4),parseInt(e.slice(4,6),10)-1,e.slice(6,8),e.slice(9,11),e.slice(11,13)):void 0,Et=e=>{if(!h(e))return;const[t,n]=e.trim().replace("Z","").split("T"),[i,o,r]=(t||"").split("-"),[s,a,l]=(n||"").split(":");return At(`${i}${o}${r}T${s}${a}${Math.round(l)}`)},$t=function(e,t){if(void 0===t&&(t="No Date"),!e)return"";if(v(e))return(e=>{const t=new Date(e),n=t.toTimeString().split(" "),i=t.getUTCFullYear(),o=Ct(t),r=It(t);return`${n[0]} ${r}-${o}-${i}`})(e);const n=h(e)?e.trim().split("T"):[""],i=10===n[0].length?n[0].split("-"):[],o=3===i.length?`${i[2]}-${i[1]}-${i[0]}`:"";return[n[1]&&9===n[1].length?n[1].substring(0,8):"",o].filter(Boolean).join(" ")||t},Dt=e=>"TNT"===e.loadId,Rt=(e,t)=>{let{data:n}=e;const i=Date.now();return b(n)?n.map((e=>{const{title:n,description:o,snippet:r,source:s,categories:a,published_at:l,url:d}=e;return yt({source:t,articleId:c(),title:n,description:o||r,author:s,related:a,publishedAt:l,timeAgo:L(Et(l),i),url:d})})):[]},Bt=e=>{const t=Dt(e)?K(e.category):e.search;return`${dt}: ${t}`},Pt=(e,t)=>v(e)?v(t)?Math.min(e+1,t):e+1:void 0,Lt=e=>{const{page:t,found:n,limit:i}=e||{},o=((e,t)=>v(e)&&v(t)?E(Math.ceil(e/t)):"")(n,i);return[Pt(t,o),o]},Kt=e=>{let{type:t,source:n,itemConf:i,category:o}=e;return{type:t,source:n,itemConf:i,category:o}},Wt=e=>Dt(e)?{...Kt(e),loadId:"TNT",locale:e.locale,domain:e.domain}:{...Kt(e),loadId:"TNS",search:e.search,sortBy:e.sortBy},Mt=(e,t)=>{const{meta:n}=e||{},[i,o]=Lt(n);return i?{nextPage:i,maxPage:o,onPageLoad:()=>xo({nextPage:i,...Wt(t)})}:void 0},Ot={toNews:(e,t)=>{const n=(e=>e.itemConf.paneId)(t);return{source:n,caption:Bt(t),articles:Rt(e,n),page:Mt(e,t)}}},Ft=Ot,zt=Object.assign,Ut=Array.isArray,Ht={W_WEBZ_QUERY:"webz",W_WEBZ_COUNTRY:"webz_country"},Gt=(e,t)=>-1===e.indexOf("\n")?t&&"english"!==t?e:S(e):e.replace(/\n/g,"\n\n"),jt=(e,t,n)=>{const i=[],o=Object.create(null),r=Date.now();return Ut(e)?(e.forEach((e=>{const{title:s="",uuid:a,text:l,published:c,author:d,thread:p}=e,{site_full:u,site:h,site_categories:m}=p||{},g=s.trim();var y;g&&!o[g]&&(i.push(zt(e,{source:t,articleId:a,author:d||u||h,description:Gt(l,n),related:(y=m,(y||[]).filter((e=>-1===(e||"").indexOf("_"))).map(K).join("|")),publishedAt:c,timeAgo:L(c,r)})),o[g]=!0)})),i.map(yt)):i},Vt={toNews:(e,t)=>{const{posts:n,requestsLeft:i}=e||{},{type:o,lang:r}=t||{},s=Ht[o];return{source:s,articles:jt(n,s,r),sortBy:i}}},Jt=Array.isArray,qt=(e,t)=>Jt(e)?e.map((e=>yt(t(e,Date.now())))):[],Yt="dt_topby",Zt=(e,t)=>{const{title:n,user:i,canonical_url:o,tags:r,positive_reactions_count:s,reading_time_minutes:a,published_at:l}=e;return{source:Yt,articleId:c(),title:x(n),description:T(`${s} ${a}min`),author:(i||{}).name,related:r,timeAgo:L(Et(l),t),publishedAt:l,url:o}},Xt=e=>qt(e,Zt),Qt={toNews:(e,t)=>({source:Yt,articles:Xt(e)})},en={SO_TAGGED:"stack_tagged",SO_SEARCH:"stack_search"},tn=Object.assign,nn=(e,t)=>e.map((e=>yt(((e,t)=>{const{title:n,question_id:i,owner:o={}}=e;return tn(e,{articleId:i||c(),source:t,title:F(n),owner:{display_name:F(o.display_name)}})})(e,t)))),on={toNews:(e,t)=>{const{items:n}=e,{type:i}=t,o=en[i];return{source:o,articles:nn(n,o),sortBy:t.tag}}},rn="iex_news",sn="AAPL",an=(e,t)=>e?`$ ${t}`:t,ln=e=>h(e)?e.split(",").join(", "):void 0,cn=e=>{const t=Date.now(),n={};return b(e)?e.reduce(((e,i,o)=>{const{headline:r,source:s,datetime:a,summary:l,related:d,url:p,hasPaywall:u}=i,m=(e=>h(e)?e.trim():"")(s),g=T(l),y={source:rn,articleId:c(),title:r,description:g,related:ln(d),author:an(u,m),publishedAt:a,timeAgo:L(a,t),url:p},f=n[r];if(f){const[t,n,i,o]=f;t===m&&n===g&&(i!e._isNewer)).map(yt):[]},dn=e=>{let{symbol:t=sn}=e;return`${ot}: ${t}`},pn={toNews:(e,t)=>({source:rn,caption:dn(t),articles:cn(e)})},un="fmp_news",hn=e=>{const t=(e||"").split(" "),n=(t[0]||"").split("-").reverse().join("-");return(t[1]||"")+" "+n},mn=(e,t)=>{let{title:n,text:i,symbol:o,site:r,publishedDate:s,url:a}=e;return{source:un,articleId:c(),title:n,description:i,related:o,author:r,publishedDate:hn(s),timeAgo:L(s,t),url:a}},gn={toNews:(e,t)=>({source:un,articles:qt(e,mn)})},yn=Array.isArray,fn="sentiment_score",wn=`ticker_${fn}`,bn=e=>Math.round(100*e)/100,vn=e=>{const t=e.join(", ");return""===t?"":` (${t})`},Sn=(e,t)=>e?`${e} ${t}`:"",Cn=e=>t=>{const n={},i=[],o=[];let r=0,s=0,a=0,l=0,c=0;return t.forEach((t=>{((e,t)=>{const n=t.ticker_sentiment;yn(n)&&n.forEach((t=>{const n=t.ticker;e[n]?e[n].push(t):e[n]=[t]}))})(n,t);const d=bn(t[e]);d>=.35?(r++,i.push(d)):d<.35&&d>=.15?s++:d<.15&&d>-.15?a++:d<=-.15&&d>-.35?l++:d<=-.35&&d>=-1&&(c++,o.push(d))})),[F([Sn(r,`Bullish${vn(i)}`),Sn(s,"Somewhat-Bullish"),Sn(a,"Neutral"),Sn(l,"Somewhat-Bearish"),Sn(c,`Bearish${vn(o)}`)].filter(Boolean).join("\n")),n]},In=Cn(`overall_${fn}`),_n=Cn(wn),Nn=e=>F(`${e} Sentiment Summary`),kn=e=>t=>-1!==t.indexOf(e),xn=kn("Bearish ("),Tn=kn("Bullish ("),An=Array.isArray,En=Object.keys,$n="av_sentiments",Dn=(e,t)=>t.relevance_score===e.relevance_score?t.ticker_sentiment_score-e.ticker_sentiment_score:t.relevance_score-e.relevance_score,Rn=(e,t)=>e+`${bn(t.relevance_score)} ${t.ticker} ${t.ticker_sentiment_label} (${bn(t.ticker_sentiment_score)})\n`,Bn=(e,t)=>{let{title:n,summary:i,source:o,time_published:r,url:s,overall_sentiment_label:a,overall_sentiment_score:l,ticker_sentiment:d}=e;const p=At(r);return{source:$n,articleId:c(),title:n,description:`${T(i)}\n\n ${h=a,m=l,F(`${h} (${bn(m)})`)}\n\n ${u=d,An(u)?F(u.sort(Dn).reduce(Rn,"")):""}`,author:o,timeAgo:L(p,t),publishedAt:p,url:s};var u,h,m},Pn=(e,t)=>t._n-e._n,Ln=e=>En(e).reduce(((t,n)=>{const i=e[n],o=_n(i)[0],r=i.length;return((e,t)=>e>9||xn(t)||Tn(t))(r,o)&&t.push({_n:r,source:$n,articleId:c(),title:Nn(n),description:o}),t}),[]).sort(Pn),Kn=e=>(e=>{const[t,n]=In(e),i=Ln(n);return i.unshift({source:$n,articleId:c(),title:Nn("Overall"),description:t}),i})(e).concat(qt(e,Bn)),Wn={toNews(e,t){const{feed:n}=e||{},{sortBy:i}=t;return{source:$n,articles:Kn(n),sortBy:i}}},Mn=e=>v(e)?1e3*e:void 0,On="cryptocompare_news",Fn=(e,t)=>{let{title:n,body:i,categories:o,url:r,source:s,source_info:a,published_on:l}=e;const{name:d}=a||{},p=Mn(l);return{source:On,articleId:c(),title:n,description:T(i),related:o,author:d||s,timeAgo:L(p,t),publishedAt:p,url:r}},zn=e=>{const{Data:t}=e||{};return qt(t,Fn)},Un={toNews(e,t){const{sortOrder:n}=t;return{source:On,articles:zn(e),sortBy:n}}},Hn="coinstats_news",Gn=e=>(e||[]).map((e=>{let{coinKeyWords:t}=e;return t})).filter(Boolean).join("|"),jn=(e,t)=>{let{title:n,description:i,coins:o,feedDate:r,source:s,link:a}=e;return{source:Hn,articleId:c(),title:n,description:x(i),related:Gn(o),author:s,publishedAt:r,timeAgo:L(r,t),url:a}},Vn=e=>{const{news:t}=e||{};return qt(t,jn)},Jn={toNews(e,t){const{filter:n}=t;return{source:Hn,articles:Vn(e),sortBy:K(n)}}},qn="messari_news",Yn=e=>(e||[]).filter(Boolean).map((e=>`#${e}`)).join(" "),Zn=(e,t)=>{let{title:n,tags:i,published_at:o,url:r,author:s}=e;const{name:a}=s||{};return{source:qn,articleId:c(),title:n,author:a,related:Yn(i),publishedAt:o,timeAgo:L(o,t),url:r}},Xn=e=>{const{data:t}=e||{};return qt(t,Zn)},Qn={toNews:(e,t)=>({source:qn,articles:Xn(e)})},ei="https://www.reddit.com",ti=`${ei}/r`,ni=Array.isArray,ii={getRequestUrl(e){let{subreddit:t,limit:n,t:i,q:o,sort:r}=e;const[s,a]=o?["search.json",`&q=${o}&sort=${r}&restrict_sr=true`]:["top.json",""];return`${ti}/${t||"Amd"}/${s}?limit=${n}&t=${i}${a}`},checkResponse(e,t){const{data:n}=e||{},{children:i}=n||{};return ni(i)}},oi=ii,ri={REDDIT:"rd_topby",REDDIT_SEARCH:"rd_searchby"},si=e=>F(`${ti}/${e}`),ai=e=>{let{subreddit:t,t:n,q:i}=e;return F(`No items were found in r/${t}${i?` for ${i} query `:" "}with ${n} period`)},li=(e,t,n)=>{let{data:i}=t;const{title:o,url:r,selftext:s,link_flair_text:a,domain:l,created_utc:d,author:p,score:u,upvote_ratio:h,permalink:m,num_comments:g}=i,y=Mn(d),f=function(){for(var e=arguments.length,t=new Array(e),n=0;n{const n=U(e),i=U(t);return n&&i&&!((e,t)=>{if("["===e[0]){const n=e.indexOf("]");return-1!==n&&e.slice(1,n).trim()===t}})(n,i)?`${n} (${i})`:n})(o,a),b=`${ei}${m}`;return{source:e,articleId:c(),title:x(w),description:T(s),author:f,related:l,timeAgo:L(y,n),publishedAt:y,url:r,commentsUrl:r===b?void 0:b,numOfComments:v(g)?0===g?"":""+g:""}},ci=(e,t)=>({title:F(e),url:si(t)}),di=e=>{const{subreddit:t,subreddit_subscribers:n}=e,i=x(F(t)),o=E(n);return ci(`r/${i} ${o}`,i)},pi=e=>({source:e,articleId:c()}),ui=(e,t,n)=>{const{data:i}=e||{},{children:o}=i||{},{subreddit:r}=t,s=o.filter((e=>t=>{const{data:n}=t||{};return n&&z(n.subreddit)===e&&!n.over_18&&!n.quarantine&&!n.author_is_blocked})(z(r))),a=qt(s,d(li,n)),l=((e,t)=>{const n=b(e)?e[0]:void 0,{data:i}=n||{};return w(i)?{...di(i),...pi(t)}:void 0})(s,n);return l&&a.unshift(l),0===a.length&&a.unshift({...ci(ai(t),r),...pi(n)}),a},hi={News:bt,TheNews:Ft,Webz:Vt,DevTo:Qt,StackOverflow:on,Iex:pn,Fmp:gn,Av:Wn,CryptoCompare:Un,CoinStats:Jn,Messari:Qn,Reddit:{toNews(e,t){const n=ri[t.type];return{source:n,articles:ui(e,t,n)}}}},mi={crOptionFetch:e=>{const{apiKey:t}=e;return e.apiKey=void 0,{headers:{"x-api-key":t}}},checkResponse:(e,t)=>{const{status:n,message:i}=e;if("error"===n)throw{msg:i};return!0}},gi={getRequestUrl:e=>(e=>{let{source:t,sortBy:n}=e;return`https://newsapi.org/v2/${"top"===n?"top-headlines?":`everything?sortBy=${n}&language=en&`}sources=${t}`})(e),...mi},yi="news",fi=864e5,wi="AU",bi="business",vi=e=>`https://api.webz.io/filterWebContent?token=${e}&order=desc&format=json`,Si=e=>{const{apiKey:t,inTitle:n,siteType:i=yi,beforeDays:o}=e,r=(e=>{const t=parseInt(e,10);return!Number.isNaN(t)&&t<30?Date.now()-t*fi:Date.now()-2*fi})(o||2),s=n||"Weather";return e.apiKey=void 0,`${vi(t)}&sort=crawled&ts=${r}&q=language:english AND thread.title:${s} AND site_type:${i}`},Ci={getRequestUrl:e=>"W_WEBZ_COUNTRY"===e.type?(e=>{const{apiKey:t,country:n=wi,topic:i=bi,lang:o}=e,r=o?`language:${o} AND `:"";return e.apiKey=void 0,`${vi(t)}&q=${r}site_type:news AND country:${n} AND site_category:${i}`})(e):Si(e),checkResponse(e,t){const{status:n,message:i}=e;if("error"===n)throw{msg:i};return!0}},Ii=Array.isArray,_i={getRequestUrl(e){let{tag:t,perPage:n,inRecentDays:i}=e;return`https://dev.to/api/articles?tag=${t}&top=${i}&per_page=${n}`},checkResponse:(e,t)=>Ii(e)},Ni="https://api.stackexchange.com/2.2",ki=Tt(kt(1)),xi=Tt(xt()),Ti="CSS",Ai="week",Ei="CSS",$i="flexbox",Di="votes",Ri={SO_TAGGED:e=>{let{tag:t=Ti,sortBy:n=Ai,fromDate:i=ki,toDate:o=xi}=e;return`${Ni}/questions?page=1&pagesize=50&order=desc&fromdate=${i}&todate=${o}&sort=${n}&tagged=${t}&site=stackoverflow`},SO_SEARCH:e=>{let{tagged:t=Ei,inTitle:n=$i,sortBy:i=Di,fromDate:o=ki,toDate:r=xi}=e;return`${Ni}/search?page=1&pagesize=50&order=desc&fromdate=${o}&todate=${r}&sort=${i}&tagged=${t}&intitle=${n}&site=stackoverflow`}},Bi={getRequestUrl:e=>(0,Ri[e.type])(e),checkResponse(e,t){const{error_message:n,error_name:i=""}=e;if(n)throw{msg:`${i} ${n}`};return!0}},Pi="AAPL",Li="20",Ki={getRequestUrl(e){let{symbol:t=Pi,recent:n=Li,apiKey:i}=e;return`https://cloud.iexapis.com/stable/stock/${t.toLowerCase()}/news/last/${n}?token=${i}`},checkResponse:(e,t)=>!0},Wi={getRequestUrl(e){const{symbol:t="",apiKey:n}=e,i=t?`tickers=${t.toUpperCase()}&apikey=${n}`:`apikey=${n}`;return e.apiKey=void 0,`https://financialmodelingprep.com/api/v3/stock_news?${i}`},checkResponse(e,t){const n=(e||{})["Error Message"];if(n)throw{msg:n};return!0}},Mi=(e,t)=>t?`&${e}=${t}`:"",Oi=Array.isArray,Fi={getRequestUrl(e){const{apiKey:t,tickers:n,topics:i,sortBy:o,limit:r}=e,s=Mi("tickers",n),a=s?"":Mi("topics",i),l=Mi("limit",r);return e.apiKey=void 0,`https://www.alphavantage.co/query?function=NEWS_SENTIMENT${s}${a}${l}&sort=${o}&apikey=${t}`},checkResponse(e,t){const{feed:n}=e||{};return Oi(n)}},zi={getRequestUrl:e=>{let{symbol:t="Weather",sortBy:n="relevancy"}=e;return`https://newsapi.org/v2/everything?q=${t}&sortBy=${n}`},...mi},Ui={getRequestUrl:e=>{const{category:t,country:n}=e;return`https://newsapi.org/v2/top-headlines?category=${t}&country=${n}`},...mi},Hi=(e,t)=>{const{apiKey:n,nextPage:i}=t,o=(e=>Mi("page",e))(i);return t.apiKey=void 0,`https://api.thenewsapi.com/v1/news/${e}?api_token=${n}${o}&limit=3&language=en`},Gi=(e,t)=>"all"===t?"":Mi(e,t),ji=()=>!0,Vi="ALL_NEWS_FEEDS",Ji="ALL_NEWS_CATEGORIES",qi="latest",Yi="latest",Zi="https://data.messari.io/api/v1/news",Xi="title,tags,published_at,url,author/name",Qi={News:gi,Webz:Ci,DevTo:_i,StackOverflow:Bi,Iex:Ki,Fmp:Wi,Av:Fi,NewsSearch:zi,NewsTop:Ui,CryptoCompare:{getRequestUrl(e){const{feed:t=Vi,category:n=Ji,sortOrder:i=qi}=e;return`https://min-api.cryptocompare.com/data/v2/news/?feeds=${t}&categories=${n}&sortOrder=${i}`},checkResponse:(e,t)=>!0},CoinStats:{getRequestUrl(e){const{filter:t=Yi}=e;return e.filter=t,`https://api.coinstats.app/public/v1/news/${t}/?skip=0&limit=20`},checkResponse:(e,t)=>!0},Messari:{getRequestUrl(e){let{assetKey:t}=e;return t&&"all"!==t?`${Zi}/${t}?fields=${Xi}`:`${Zi}?fields=${Xi}`},checkResponse:(e,t)=>!0},TheNewsSearch:{getRequestUrl(e){const{search:t,category:n,sortBy:i}=e,o=Gi("categories",n);return`${Hi("all",e)}${o}&search=${t}&sort=${i}`},checkResponse:ji},TheNewsTop:{getRequestUrl:e=>{const{category:t,locale:n,domain:i}=e,o=Gi("categories",t),r=Gi("domains",i),s=Gi("locale",n);return`${Hi("top",e)}${s}${o}${r}`},checkResponse:ji},Reddit:oi},eo="Key is not set. \nPlease, set and try again.",to=(e,t,n)=>({apiKey:!m(n)||n(),api:Qi[e],adapter:hi[e],msgErr:t}),no=()=>({apiKey:Qe.getNewsKey(),adapter:hi.News,msgErr:`${ct} ${eo}`}),io=()=>({apiKey:Qe.getTheNewsKey(),adapter:hi.TheNews,msgErr:`${dt} ${eo}`}),oo={getApiConf:e=>{switch(e){case"N":return{...no(),api:Qi.News};case"NS":return{...no(),api:Qi.NewsSearch};case"NT":return{...no(),api:Qi.NewsTop};case"TNS":return{...io(),api:Qi.TheNewsSearch};case"TNT":return{...io(),api:Qi.TheNewsTop};case"W":return to("Webz",`${pt} API ${eo}`,Qe.getWebzKey);case"RD":return to("Reddit",`${ut} API ${eo}`);case"DT":return to("DevTo",`${ht} API ${eo}`);case"SO":return to("StackOverflow",`${mt} API ${eo}`);case"IEX":return to("Iex",`${ot} API ${eo}`,Qe.getIexKey);case"FMP":return to("Fmp",`${rt} API ${eo}`,Qe.getFmpKey);case"AV":return to("Av",`${at} API ${eo}`,Qe.getAvKey);case"CCN":return to("CryptoCompare",`${tt} News API ${eo}`);case"CS":return to("CoinStats",`${nt} API ${eo}`);case"MS":return to("Messari",`${it} Blockchain News API ${eo}`);default:return{msgErr:"Unknow news API provider"}}}};let ro,so;const ao=function(e){let{uri:t,optionFetch:n,option:i,onCheckResponse:o,onFetch:r,onCompleted:s,onFailed:a,onCatch:l}=e;const c=Date.now();c-so<5e3?a(ro!==t?{msg:"Time request frequency restriction.\n1 Request per 5 second."}:{msg:"Request has already loaded.\n1 Request per 5 second."}):(ro=t,so=c,fetch(t,n).then((e=>{const{status:t,statusText:n}=e;if(404===t)throw{msg:`Not Found ${t}`};if(t>=500&&t<600)throw{msg:`Response Error ${t} : ${n}`};return Promise.all([Promise.resolve(t),e.json()])})).then((e=>{let[t,n]=e;o(n,i)&&r({json:n,option:i,onCompleted:s})})).catch((e=>{l({error:e,option:i,onFailed:a})})))},lo=e=>{let{error:t,onFailed:n}=e;n(t)},co=e=>t=>{let{json:n,option:i,onCompleted:o}=t;o({news:e.toNews(n,i),itemConf:i.itemConf})},po=(e,t,n)=>{const{api:i,adapter:o}=e;ao({uri:i.getRequestUrl(e),optionFetch:m(i.crOptionFetch)?i.crOptionFetch(e):void 0,option:e,onCheckResponse:i.checkResponse,onFetch:co(o),onCompleted:t,onCatch:lo,onFailed:n})},uo="LOADING",ho="LOADING_COMPLETE",mo="LOADING_FAILED",go=(e=>{const t=Object.create(null);return t.value=e,{useAtomValue:()=>(t.rerender=We()[1],t.value),setValue:e=>{const n=t.value,i=t.rerender;t.value=((e,t)=>m(t)?t(e):t)(n,e),n!==t.value&&m(i)&&i()}}})(),yo=go.setValue,fo=go.useAtomValue,wo=Object.assign,bo={},[vo,So]=Ue("msItem"),Co=Me((()=>({...vo()}))),[Io]=ze(Co),_o=Oe(Co,So),No=e=>{let{news:t,itemConf:n}=e;if(t){const e=((e,t)=>{const{source:n,articles:i=[],sortBy:o,caption:r,page:s,isRelatedBars:a}=t;return e[n]=e[n]?i.concat(e[n]):i,{isAdd:!0,id:n,data:e[n],sortBy:o,caption:r,page:s,isRelatedBars:a}})(bo,t);Io({msItem:e})}yo(ho)},ko=e=>{xu(e),yo(mo)},xo=function(e){void 0===e&&(e={});const{itemConf:t,loadId:n}=e,{apiKey:i,adapter:o,api:r,msgErr:s}=oo.getApiConf(n||"N");i?(Lu(t),yo(uo),wo(e,{apiKey:i,adapter:o,api:r}),po(e,No,ko)):ko({msg:s})},To=e=>{((e,t)=>{const{articleId:n,source:i}=t;e[i]=e[i].filter((e=>e.articleId!==n))})(bo,e)},Ao=e=>{const t=((e,t)=>(e[t]=[],{isUpdate:!0,id:t,data:e[t],sortBy:""}))(bo,e);Io({msItem:t})},Eo=e=>{const t=((e,t)=>{const{articleId:n,source:i}=t,o=e[i].findIndex((e=>e.articleId===n));return e[i]=e[i].slice(o+1),{isUpdate:!0,id:i,data:e[i]}})(bo,e);Io({msItem:t})},$o={margin:-1,fontSize:"1.125rem"},Do={...$o,textAlign:"center"},Ro={marginRight:2,marginLeft:2},Bo={display:"inline-block",width:110},Po={margin:"16px 0 8px 16px"},Lo="calc(190px + 4rem)",Ko={display:"block",width:Lo},Wo=function(e){return void 0===e&&(e=Lo),{width:e}},Mo=()=>{},Oo=function(e){void 0===e&&(e=Mo);const t=(0,H.li)(null);return[t,(0,H.hb)((()=>{const{current:n}=t;n&&n.focusPrevEl&&n.focusPrevEl(),e()}),[])]},Fo=e=>b(e)?e[0]:"",zo=e=>{const t=b(e)?h(e[1])?e[1]:e[0]:void 0;return h(t)?t.trim():t},Uo=e=>[K(e),e],Ho=e=>[e,e],Go=e=>{const t=(0,H.li)(e||null),n=(0,H.hb)((e=>{t.current=zo(e)}),[]);return[t,n]},jo=()=>{},Vo=function(e,t){return void 0===e&&(e=jo),void 0===t&&(t=jo),(0,H.hb)((n=>{const{keyCode:i}=n;13===i?e():27===i&&t()}),[])},Jo="select-none",qo=`menu-more__item ${Jo}`,Yo=`row__news-source ${Jo}`,Zo="#121212",Xo={color:Zo},Qo={display:"block"},er={display:"inline-block"},tr={display:"none"},nr=e=>b(e)?e[0]?e[1]:"":e||"",ir=(e,t)=>{const n=nr(e),i=nr(t);return n?i?`${n} ${i}`:n:i||void 0},or=(e,t)=>t?{...e,...t}:e,rr=e=>e?Qo:tr,sr="show-popup",ar=e=>(t,n)=>t?[ir(n,sr),e]:[n,tr],lr=ar(Qo),cr=ar(er),dr=e=>ir(e,"c-bg"),pr=e=>dr(ir("pane",e)),ur=e=>ir(e,"panel-shadow"),hr=e=>ir(ur("popup-menu"),e),mr=e=>ir(e,"with-scroll");var gr=n(172);var yr=0;Array.isArray;function fr(e,t,n,i,o,r){t||(t={});var s,a,l=t;if("ref"in l)for(a in l={},t)"ref"==a?s=t[a]:l[a]=t[a];var c={type:e,props:l,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--yr,__i:-1,__u:0,__source:o,__self:r};if("function"==typeof e&&(s=e.defaultProps))for(a in s)void 0===l[a]&&(l[a]=s[a]);return gr.fF.vnode&&gr.fF.vnode(c),c}const wr=pr("browser-pane"),br=e=>{let{isShow:t,style:n,onKeyDown:i,children:o}=e;const[r,s]=lr(t,wr);return fr("div",{className:r,style:{...n,...s},role:"presentation",onKeyDown:i,children:o})},vr=(e,t)=>t?`${e||""} [${t.toLowerCase()}]`:e,Sr=(e,t,n)=>_e?[]:[vr(e,n),t],Cr=e=>{let{w:t,h:n=t,children:i,...o}=e;return fr("svg",{width:`${t}px`,height:`${n}px`,"aria-hidden":"true",role:"img",...o,xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"none",viewBox:`0 0 ${t} ${n}`,children:i})},Ir="r",_r={fill:"inherit",stroke:"inherit"},Nr=e=>{let{cy:t}=e;return fr("circle",{cx:"3",cy:t,r:"2.5"})},kr=e=>{let{btRef:t,className:n,onClick:i}=e;const[o,r]=Sr("More","tl");return fr("button",{ref:t,type:"button","aria-label":o,"data-pos":r,className:n,onClick:i,children:fr(Cr,{w:"6",h:"24",style:_r,children:[fr(Nr,{cy:"4"}),fr(Nr,{cy:"12"}),fr(Nr,{cy:"19"})]})})},xr=e=>{let{children:t,...n}=e;return fr(Cr,{...n,width:"100%",height:"100%",children:t})},Tr="bt-svg-x",Ar={padding:3,stroke:"inherit"},Er=e=>{let{dataPos:t,className:n=Tr,style:i,onClick:o}=e;const[r,s]=Sr("Close",t||"cl");return fr("button",{type:"button","aria-label":r,"data-pos":s,tabIndex:"-1",className:n,style:i,onClick:o,children:fr(xr,{w:"12",style:Ar,strokeLinecap:"round",strokeWidth:"2",children:[fr("path",{d:"M 0,0 L 12,12"}),fr("path",{d:"M 12,0 L 0,12"})]})})},$r={fontSize:"1.125rem",fontWeight:"bold"},Dr=e=>{let{style:t,caption:n,children:i,onMore:o,onClose:r}=e;return fr("div",{className:"br-caption gap-right",style:t,children:[m(o)&&fr(kr,{className:"bt-svg-more bt-svg-menu",onClick:o}),fr("span",{className:Jo,style:$r,children:n}),i,fr(Er,{className:"bt-svg-x bt-svg-close",onClick:r})]})},Rr=(e,t,n)=>{(0,H.vJ)((()=>{const i=ne(e);return _e&&i&&i.addEventListener(t,n,he),()=>{_e&&i&&i.removeEventListener(t,n,he)}}),[t,n,e])},Br=e=>{let{style:t,className:n,onScroll:i,children:o}=e;const r=(0,H.li)();return Rr(r,"scroll",i),fr("div",{ref:r,className:mr(n),style:t,children:o})},Pr=e=>{let{style:t,isFailed:n}=e;return fr("span",{style:t,"data-loader":n?"circle-failed":"circle"})},Lr=e=>{let{keyCode:t}=e;return 13===t||32===t},Kr=(e,t)=>(0,H.Kr)((()=>m(e)?t=>{Lr(t)&&e(t)}:void 0),t||[]),Wr=e=>{let{refEl:t,className:n,style:i,caption:o,children:r,onClick:s}=e;return fr("div",{ref:t,role:"menuitem",tabIndex:"0",className:n,style:i,onClick:s,onKeyDown:Kr(s),children:o||r})},Mr=e=>{let{isShow:t,withoutAnimation:n,isScrollable:i,className:o,style:r,children:s,...a}=e;return fr("div",{className:ir(o,[t&&!n,sr]),style:or(r,t?Qo:tr),"data-scrollable":i?"true":void 0,...a,children:s})},Or=(0,H.ph)((e=>{let{items:t,crItem:n,...i}=e;return oe(t,((e,t)=>n(e,t,i)))})),Fr=Or,zr={Browser:br,BrowserCaption:Dr,ScrollPane:Br,SpinnerLoading:Pr,MenuItem:Wr,ShowHide:Mr,ItemStack:Fr},Ur=zr,Hr=e=>{let{ariaLabel:t,dataPos:n,caption:i,className:o,style:r,onClick:s}=e;const[a,l]=Sr(t,n);return fr("button",{type:"button","aria-label":a,"data-pos":l,className:ir("bt-circle select-none",o),style:r,onClick:s,children:i||""})},Gr=(e,t)=>{(0,H.vJ)((()=>xe&&e?(((e,t)=>{Ae&&(Ae[e]=t)})(e,t),()=>(e=>Ae&&(Ae[e]=void 0))(e)):void 0),[])},jr=(e,t,n,i)=>(Gr(n,i),Sr(e,t,n)),Vr={textDecoration:"underline"},Jr=e=>{let{caption:t,keyIndex:n}=e;const[i,o,r]=((e,t)=>[e.substring(0,t),e.substring(t,t+1),e.substring(t+1)])(t,n);return fr(gr.FK,{children:[fr("span",{children:i}),fr("span",{style:Vr,children:o}),fr("span",{children:r})]})},qr=e=>{let{className:t,style:n,caption:i,hotKey:o,children:r}=e;const s=((e,t)=>t&&e?e.toUpperCase().indexOf(t):-1)(i,o),a=_e||-1===s?i||"":fr(Jr,{caption:i,keyIndex:s});return fr("span",{className:t,style:n,children:[a,r]})},Yr="bt-flat",Zr=`${Yr}__div`,Xr=`${Yr}__span`,Qr=e=>{let{ariaLabel:t,dataPos:n,className:i,style:o,clDiv:r,caption:s,hotKey:a,children:l,onClick:c}=e;const[d,p]=jr(t,n,a,c);return fr("button",{type:"button","aria-label":d,"data-pos":p,className:ir(Yr,i),style:o,onClick:c,children:fr("div",{className:Zr,children:[s?fr(qr,{className:Xr,caption:s,hotKey:a}):null,l]})})},es="bt-flat",ts=`${es}__div`,ns=`${es}__span`,is=e=>{let{ariaLabel:t,dataPos:n,style:i,caption:o,hotKey:r,children:s,onClick:a}=e;const[l,c]=jr(t,n,r,a);return fr("button",{type:"button","aria-label":l,"data-pos":c,className:es,style:i,onClick:a,children:fr("div",{className:ts,children:fr(qr,{className:ns,caption:o,hotKey:r,children:s})})})},os="bt-raised",rs=`${os}__div`,ss=`${os}__span`,as=e=>{let{refBt:t,isPrimary:n,style:i,caption:o,hotKey:r,onClick:s}=e;return fr("button",{ref:t,type:"button",className:os,style:i,onClick:s,children:fr("div",{className:rs,children:fr(qr,{className:ss,style:n?Xo:void 0,caption:o,hotKey:r})})})},ls={CircleButton:Hr,FlatButton:Qr,ModalButton:is,RaisedButton:as},cs=ls,ds=e=>{const t=(0,H.li)(null);return null===t.current&&(t.current=e()),t.current},ps=e=>ds((()=>e||c())),us=e=>{const[t,n]=(0,H.J0)((()=>!!e));return[t,...(0,H.Kr)((()=>[()=>n(!0),()=>n(!1)]),[])]},hs=e=>{let{is:t,mls:n,children:i}=e;const[o,r]=(0,H.J0)(t);return(0,H.vJ)((()=>{t?setTimeout((()=>r(!0)),n):r(!1)}),[t,n]),t&&o?fr(gr.FK,{children:i}):null},ms="m-select",gs=`${ms}__label`,ys=`${ms}__div`,fs=`${ms}__div__value`,ws=`${ms}__div__bt`,bs=`${ms}__line`,vs=mr(`${ms}__options`),Ss=`${ms}__item`,Cs="m-input",Is="m-textfield-input",_s=`${Is}__div`,Ns=`${Cs}__line`,ks=`${Cs}__msg-err`,xs="bt-svg-clear",Ts={right:"calc(15px - 1rem)"},As={position:"absolute",top:25,right:15,stroke:Zo},Es=(0,H.ph)((e=>{let{is:t,onClick:n}=e;return fr(hs,{is:t,mls:700,children:fr(Er,{className:xs,style:As,onClick:n})})})),$s=Es,Ds={transform:"scale(1) translate(0px, -6px)"},Rs={color:"#f44336"},Bs={borderBottom:"2px solid #f44336"},Ps=e=>e.target.value,Ls=(e,t)=>e?t.trim():t,Ks=e=>{let{refEl:t,style:n,inputStyle:i,inputCn:o,caption:r,id:s,isTrimValue:a=!0,initValue:l,maxLength:c="20",autoCapitalize:d="off",errorMsg:p="",hasClear:u=!0,children:h,onTest:m=te,onEnter:g=ee,onBlur:y=ee,onInputChange:f=ee,onKeyDown:w=ee,...b}=e;const v=ps(s),S=(0,H.li)(),[C,I]=(0,H.J0)(l||""),[_,N]=(0,H.J0)((()=>m(l||""))),[k,x,T]=us(),[A,E]=(0,H.Kr)((()=>[(e,t)=>{const n=Ps(e);m(n)&&t(Ls(a,n),s,e)},e=>{I(""),f("",s)}]),[a,f]),[$,D,R]=(0,H.Kr)((()=>[e=>{A(e,y),T()},e=>{const t=Ps(e),n=m(t);I(t),N(n),n&&f(Ls(a,t),s)},e=>{const t=e.key;t===J||t===V?E(e):t===j?A(e,g):w(e)}]),[a,f]);(0,H.Yn)(t,(()=>({getValue:()=>Ls(a,String(C)),setValue:I,focus:()=>ae(S)})),[a,C]);const B=C||k?void 0:Ds,[P,L]=_?[]:[Rs,Bs],K=_e&&u&&C;return fr("div",{className:ms,style:n,children:[fr("label",{className:gs,style:{...B,...P},htmlFor:v,children:r}),fr("div",{className:_s,children:[fr("input",{ref:S,id:v,type:"text",className:ir(Is,o),style:i,value:C,autoComplete:"off",autoCorrect:"off",autoCapitalize:d,spellCheck:"false",translate:"no",maxLength:c,onFocus:x,onBlur:$,onChange:D,onKeyDown:R,...b}),fr($s,{is:K,onClick:E}),h,fr("div",{className:Ns,style:L}),L&&fr("div",{className:ks,children:p})]})]})},Ws=e=>{const t=(0,H.li)(e);return(0,H.Kr)((()=>[e=>{t.current=e},()=>t.current]),[])},Ms={transform:"scale(1) translate(0px, -6px)"},Os={color:"#f44336"},Fs={borderBottom:"2px solid #f44336"},zs={borderBottom:"2px solid #80c040"},Us=()=>{},Hs=()=>!0,Gs=e=>{let{refEl:t,style:n,caption:i,name:o="pwd",maxLength:r="32",errorMsg:s="",onTest:a=Hs,onEnter:l=Us}=e;const c=ds((()=>(e=>e+"_"+Math.random().toString(36).substr(2,6))(o))),d=(0,H.li)(),[p,u]=Ws(!1),[h,m]=Ws(!1),[g,y]=(0,H.J0)({value:""}),{value:f}=g,w=We()[1];(0,H.vJ)((()=>{const e=setTimeout((()=>{const e=d.current;e&&e.hasAttribute("value")&&e.removeAttribute("value")}));return()=>clearTimeout(e)})),(0,H.vJ)((()=>{u()&&p(!1)})),(0,H.Yn)(t,(()=>({setWasEnter:()=>{p(!0),w()},getValue:()=>{const e=d.current;return e&&e.value},clear:()=>{p(!0),y({value:""})}})));const b=(I=d.current)&&I.value||m()?void 0:Ms,v=a(f),S=v?void 0:Os,C=v?u()?zs:void 0:Fs;var I;return fr("form",{className:ms,style:n,children:[fr("label",{className:gs,style:{...b,...S},htmlFor:c,children:i}),fr("div",{className:_s,children:[fr("input",{hidden:!0,autoComplete:"username",value:o,readOnly:!0}),fr("input",{ref:d,id:c,type:"password",autoComplete:"current-password",className:Is,maxLength:r,value:f,onChange:e=>{y({value:e.target.value.trim()})},onKeyDown:e=>{46===e.keyCode?y({value:""}):13===e.keyCode&&(pe(e),l(e.target.value),p(!0),w())},onFocus:()=>{h(!0),w()},onBlur:()=>{h(!1),w()}}),_e&&f&&fr("button",{type:"button",className:xs,onClick:e=>{pe(e),y({value:""})},children:"x"}),fr("div",{className:Ns,style:C}),!v&&fr("div",{className:ks,children:s})]})]})},js=(e,t)=>{const n=ps();return[n,{role:"combobox","aria-autocomplete":t?"list":"none","aria-expanded":e,"aria-controls":e?n:void 0}]},Vs=()=>fr(Cr,{w:"24",children:fr("path",{d:"M7 10l5 5 5-5z"})}),Js=e=>{let{refEl:t,style:n,onKeyDown:i,onClick:o}=e;return fr("button",{ref:t,type:"button",className:ws,style:n,onKeyDown:i,onClick:o,children:fr(Vs,{})})},qs=(e,t)=>{ne(t)&&(document.removeEventListener("click",e,!0),t.current=null)},Ys=(e,t)=>{const n=(0,H.li)(null),i=(0,H.li)(null),o=(0,H.hb)((e=>{const i=ne(n)||{};i.contains&&!i.contains(e.target)&&(e.stopPropagation(),t())}),[]);return(0,H.vJ)((()=>{e&&!i.current?(document.addEventListener("click",o,!0),i.current=!0):e||qs(o,i)})),(0,H.vJ)((()=>()=>qs(o,i)),[]),n},Zs=(e,t)=>ke?(0,H.hb)((n=>{n&&27===n.keyCode&&(e(),t||n.stopPropagation())}),[]):ee,Xs=dr(),Qs=e=>{let{isShow:t,style:n,children:i,onClose:o}=e;const r=Ys(t,o),s=Zs(o);return fr("div",{role:"presentation","aria-hidden":!t,ref:r,className:Xs,style:n,onKeyDown:t?s:void 0,children:i})},ea={block:"center",behavior:"smooth"},ta=e=>t=>{const n=(ne(t)||{})[e];n&&(n.scrollIntoView(ea),n.focus(),ie(t,n))},na=ta("nextSibling"),ia=ta("previousSibling"),oa=e=>{const t=(0,H.li)();return[t,(0,H.hb)((n=>{n.key===G?(pe(n),na(t)):"ArrowUp"===n.key?(pe(n),ia(t)):n.key!==V&&"Tab"!==n.key||e()}),[])]},ra=e=>({id:e,role:"listbox","aria-label":"Suggestions"}),sa=(e,t,n)=>{let{refFirstItem:i,refItem:o,currentItem:r,clItem:s,onSelect:a}=n;const l=Fo(e),c=zo(e),[d,p,u]=c===(r&&zo(r))?["0",o,"true"]:["-1"],h=0===t?p||i:p;return(0,gr.n)("div",{...(m=u,g=d,{role:"option","aria-selected":m,tabIndex:g}),key:c,ref:e=>{h&&ie(h,e)},className:s,onClick:t=>a(e,t),onKeyDown:t=>{t.key===j&&a(e,t)}},l);var m,g},aa=e=>{let{refOp:t,id:n,isShow:i,isFocusItem:o=!0,className:r,style:s,options:a,item:l,clItem:c,onSelect:d,onClose:p}=e;const u=(0,H.li)(null),h=(0,H.li)(null),[m,g]=oa(p);return(0,H.Yn)(t,(()=>({hKeyDown:g})),[]),(0,H.vJ)((()=>{i&&o&&ie(m,ae(h,u))}),[i,o]),fr(Qs,{isShow:i,onClose:p,children:fr(Mr,{...ra(n),isScrollable:!0,isShow:i,className:r,style:s,onKeyDown:g,children:fr(Fr,{items:a,crItem:sa,refFirstItem:u,refItem:h,currentItem:l,clItem:c,onSelect:d})})})},la={...Ts,top:"calc(17px - 1rem)"},ca=["",""],da=e=>{let{id:t,style:n,initItem:i,caption:o,options:r,onSelect:s}=e;const a=(0,H.li)(),[l,c]=(0,H.J0)(i||ca),[d,p]=(0,H.J0)(!1),[u,h]=js(d),[m,g]=(0,H.Kr)((()=>[e=>{pe(e),p(!0)},()=>{p(!1),ae(a)}]),[]),[y,f]=(0,H.Kr)((()=>[(e,n)=>{pe(n),s(e,t),g(),c(e)},e=>{e.key===G&&m(e)}]),[]);return fr("div",{...h,tabIndex:"-1",className:ms,style:n,onClick:m,onKeyDown:f,children:[fr("label",{className:gs,children:o}),fr(aa,{id:u,isShow:d,className:vs,item:l,options:r,clItem:Ss,onSelect:y,onClose:g}),fr("div",{className:ys,children:[fr("div",{className:fs,children:Fo(l)}),fr(Js,{refEl:a,style:la}),fr("div",{className:bs})]})]})},pa={TextField:Ks,PasswordField:Gs,InputSelect:da},ua=Date.now||(()=>new Date.getTime),ha=function(e,t){void 0===t&&(t=800);let n=0;return function(){const i=ua();if(i-n>t)return n=i,e(...arguments)}},ma=(e,t,n)=>(0,H.hb)(ha(e,n),t||[]),ga=()=>{const e=(0,H.li)(!0),{current:t}=e;return e.current=!1,t},ya=Array.isArray,fa=(e,t,n)=>{const i=(0,H.li)(),o=(0,H.li)(),r=t||i,s=n||o;return[(0,H.Kr)((()=>ya(e)?t=>{const n=e.length-1;return((e,t,n,i)=>0===i?e:i===n?t:void 0)(r,s,n,t)}:void 0),[e,r,s]),s,r]},wa=(e,t)=>(0,H.hb)((()=>ne(e)||ne(t)),[]),ba=(e,t,n)=>{(0,H.vJ)((()=>{e&&le(t,n)}),[e,t,n])},va=e=>{let{style:t,onFocus:n}=e;return fr("div",{style:t,tabIndex:"0","aria-hidden":"true",onFocus:n})},Sa=e=>{let{refEl:t,refFirst:n,refLast:i,style:o,children:r}=e;return ke?fr(gr.FK,{children:[fr(va,{style:o,onFocus:()=>{ae(i,t)}}),r,fr(va,{style:o,onFocus:()=>{ae(n,t)}})]}):r},Ca={position:"relative"},Ia={position:"absolute",top:0,left:16},_a={paddingLeft:16},Na=e=>{let{refTitle:t,titleCl:n,title:i,onClick:o}=e;return i?fr(Wr,{refEl:t,className:n,style:Ca,onClick:o,children:[fr("span",{style:Ia,children:"<"}),fr("span",{style:_a,children:i})]}):null},ka={position:"relative"},xa={display:"inline-block",position:"absolute",top:0,right:4,color:"inherit",padding:"1px 16px 1px 0px",fontWeight:"bold"},Ta=(e,t,n)=>m(t)?e?()=>{t(),n()}:t:void 0,Aa=e=>{let{getFocusRef:t,items:n,itemCl:i,pageNumber:o,onNextPage:r,onClose:s}=e;return fr(gr.FK,{children:oe(n,((e,n)=>{let{cn:a,name:l,type:c,id:p,isClose:u,onClick:h}=e;const[m,g]="sub"===c?[d(r,p,l,o),fr("span",{style:xa,children:">"})]:[Ta(u,h,s),null];return fr(Wr,{refEl:t(n),className:a||i,style:ka,onClick:m,children:[fr("span",{children:l}),g]},l)}))})},Ea=[],$a=e=>{let{isVisible:t,items:n=Ea,style:i,title:o,titleCl:r,itemCl:s,pageNumber:a,onClose:l,children:c,onNextPage:d,onPrevPage:p}=e;const u=(0,H.li)(),[h,m,g]=fa(n),y=wa(u,g),f=(0,H.hb)((()=>{p(a)}),[p,a]);return ba(t,y),fr("div",{style:i,children:fr(Sa,{refFirst:y,refLast:m,children:[fr(Na,{refTitle:u,titleCl:r,title:o,onClick:f}),fr(Aa,{getFocusRef:h,items:n,itemCl:s||r,pageNumber:a,onNextPage:d,onClose:l}),c]})})},Da=e=>{let{isShow:t,style:n,pages:i,pageCurrent:o,onNextPage:r,onPrevPage:s,onClose:a}=e;return oe(i,((e,i)=>(0,H.Ob)(e,{isShow:t,pageCurrent:o,style:n,pageNumber:i+1,isVisible:t&&o===i+1,onNextPage:0===i?r:void 0,onPrevPage:0!==i?s:void 0,onClose:a})))},Ra={position:"absolute",overflow:"hidden"},Ba={display:"flex",flexFlow:"row nowrap",alignItems:"flex-start",overflowX:"hidden",transition:"all 750ms ease-out"},Pa={pageWidth:100,maxPages:2,initId:"p0",p0:[]},La=e=>{const t=e.pageWidth,n=e.maxPages,i=e.initId||"p0";return{pageWidth:t,pagesStyle:{width:n*t+"px"},pageStyle:{width:`${t}px`},pageCurrent:1,pages:[fr($a,{items:e[i],titleCl:e.titleCl,itemCl:e.itemCl},i)]}},Ka=(e,t,n,i)=>{e.push(fr($a,{title:n,items:i[t],titleCl:i.titleCl,itemCl:i.itemCl},t))},Wa=(e,t)=>({transform:`translateX(${-1*e*(t-1)+0}px)`}),Ma={ModalSlider:e=>{let{model:t=Pa,isShow:n,className:i,rootStyle:o,style:r,onClose:s}=e;const[a,l]=(0,H.J0)((()=>La(t))),{pageWidth:c,pagesStyle:d,pageStyle:p,pageCurrent:u,pages:h}=a,m=ma((e=>{l((t=>(t.pageCurrent=e-1,{...t})))})),g=ma(((e,n,i)=>{l((o=>{const{pages:r}=o;return r.length-1+1>i?r[i]&&r[i].key!==e&&(i>0?o.pages.splice(i):o.pages=[],Ka(o.pages,e,n,t)):Ka(r,e,n,t),o.pageCurrent=i+1,{...o}}))}),[t]),y=ga();(0,H.vJ)((()=>{y||l(La(t))}),[t]);const f={...r,...Ra,...p},w={...Ba,...d,...Wa(c,u)};return fr(Qs,{isShow:n,style:o,onClose:s,children:fr(Mr,{className:i,style:f,isShow:n,children:fr("div",{style:w,children:fr(Da,{isShow:n,style:p,pages:h,pageCurrent:u,onNextPage:g,onPrevPage:m,onClose:s})})})})}},Oa=e=>!!e,Fa=(e,t)=>g(t)?t:!e,za=e=>(0,H.WO)(Fa,e,Oa),Ua=Object.assign,Ha=Array.isArray,Ga=!_e,ja=!!_e&&he,[Va,Ja,qa,Ya]=_e?[Y,Z,Q,X]:["mousedown","mousemove","mouseleave","mouseup"],Za=e=>t=>parseInt(t[e],10),Xa=Za("top"),Qa=Za("left"),el=(e,t)=>e>0?e>t?t-16:e:8,tl=(e,t,n)=>n-e>22&&t-n>22,nl=e=>"BUTTON"===e.tagName||e.dataset.scrollable,il=(e,t,n,i)=>{const o=(e=>m(e.composedPath)?e.composedPath():void 0)(e);if(Ha(o))for(let e=0;e{(0,H.vJ)((()=>{let t,n,i=ne(e),o=i.style,r=0,s=0;function a(e){e.cancelable&&(e.stopPropagation(),Ga&&e.preventDefault()),0===r&&0===s&&(o.cursor="move"),r=ve(e)-t,s=Se(e)-n;const i=`translate(${r}px,${s}px)`;Ua(o,{webkitTransform:i,transform:i})}function l(){d(),function(){const e=Xa(o),t=Qa(o),n=el(t+r,window.innerWidth-i.clientWidth),a=el(e+s,window.innerHeight-i.clientHeight);Ua(o,{top:`${a}px`,left:`${n}px`,webkitTransform:"",transform:""}),r=0,s=0}()}function c(e){t=ve(e),n=Se(e),il(e,t,n,i)&&(i.addEventListener(Ja,a,ja),i.addEventListener(qa,l,ja),i.addEventListener(Ya,l,ja))}function d(){o.cursor="",i.removeEventListener(Ja,a,ja),i.removeEventListener(qa,l,ja),i.removeEventListener(Ya,l,ja)}return _e&&Ua(o,{touchAction:"none"}),i.addEventListener(Va,c,ja),()=>{d(),i.removeEventListener(Va,c,ja),o=null,i=null}}),[])},rl=(e,t,n)=>{(0,H.vJ)((()=>{const i=xe&&e&&e.current,o=e=>{(e.altKey||e.metaKey)&&e.key&&e.key.toUpperCase()===t&&(e.stopImmediatePropagation(),n())};return i&&m(n)?(i.addEventListener(Te,o,!1),()=>i.removeEventLister(Te,o,!1)):void 0}),[])},sl=e=>{const t=(0,H.li)(),n=(0,H.li)();return(0,H.vJ)((()=>{e?(ie(n,(document||{}).activeElement),ae(t)):ae(n)}),[e]),t},al=e=>{let{isShow:t,className:n,style:i,onClose:o,children:r}=e;return fr(Qs,{isShow:t,onClose:o,children:fr(Mr,{className:n,style:i,isShow:t,children:r})})},ll=()=>{},cl=function(e,t,n){void 0===t&&(t=ll),void 0===n&&(n=ll);const[i,o]=za(e),r=()=>{(i?n:t)(),o()};return[i,r,e=>{Lr(e)&&(e.preventDefault(),r())}]},dl="rgba(0,0,0,0)",pl={display:"inline-block",cursor:"pointer"},ul={display:"inline-block"},hl=()=>fr("path",{d:"M 2,5 L 8,14 14,1",strokeWidth:"2",strokeLinecap:"round",fill:dl}),ml=function(e,t){return void 0===t&&(t=e),{stroke:e,fill:t}},gl=e=>{let{refChb:t,isChecked:n,style:i,onClick:o,onKeyDown:r}=e;const s=n?ml("#2f7ed8"):ml("#777777",dl);return fr("div",{ref:t,role:"checkbox",tabIndex:"0","aria-checked":n,className:"chb",style:{...pl,...i},onClick:o,onKeyDown:r,children:fr(xr,{w:16,style:ul,children:[fr("rect",{x:"1",y:"1",height:"14",width:"14",strokeWidth:"2",rx:"3",strokeLinecap:"round",...s}),n?fr(hl,{}):null]})})},yl={margin:"24px 0 0 16px"},fl={fontWeight:"bold",marginLeft:8,userSelect:"none"},wl=e=>{let{refChb:t,style:n=yl,initialValue:i,caption:o,onCheck:r,onUnCheck:s,onToggle:a}=e;const[l,c,d]=cl(i,r||a,s||a);return fr("div",{style:n,children:[fr(gl,{refChb:t,isChecked:l,onClick:c,onKeyDown:d}),fr("button",{type:"button",tabIndex:"-1",style:fl,onClick:c,children:o})]})},bl={color:"var(--black)",left:8,zIndex:100,padding:"4px 12px 12px",lineHeight:2.2,fontSize:"1rem",fontWeight:"700"},vl={maxWidth:150,paddingBottom:2,textAlign:"left",verticalAlign:"middle"},Sl={padding:"6px 0 6px",lineHeight:"normal"},Cl=e=>{const t=e.indexOf("(");return-1===t?e:e.slice(0,t-1)},Il=e=>{let{isShow:t,className:n,style:i,chbStroke:o,configs:r,onToggle:s,onClose:a}=e;const l=sl(t),[c,d]=fa(r,l);return c?fr(al,{isShow:t,style:{...bl,...i},className:n,onClose:a,children:fr(Sa,{refFirst:l,refLast:d,children:r.map(((e,t)=>fr(wl,{refChb:c(t),initialValue:e.df,style:Sl,stroke:o,caption:Cl(e.caption),captionStyle:vl,onToggle:()=>s(e.id)},e.id)))})}):null},_l=dr("dialog"),Nl=hr("select-none"),kl={position:"absolute",top:30,left:Ne?50:15,borderRadius:"5px",boxShadow:"rgba(0, 0, 0, 0.2) 0px 0px 0px 6px",zIndex:10},xl={textAlign:"right",margin:"16px 4px 10px 0"},Tl=e=>{let{onLoad:t,onShow:n,onClose:i}=e;return fr("div",{style:xl,children:[m(t)&&fr(as,{isPrimary:!0,style:Ro,caption:"Load",hotKey:"L",onClick:t}),m(n)&&fr(as,{style:Ro,caption:"Show",hotKey:"H",onClick:n}),fr(as,{style:Ro,caption:"Close",hotKey:"C",onClick:i})]})},Al=e=>{let{refEl:t,isShow:n,style:i,captionStyle:o,caption:r,menuToggle:s,toggleItem:a,children:l,onKeyDown:c,onLoad:d,onShow:p,onClose:u}=e;const h=(0,H.li)(null),m=(0,H.li)(null),g=(0,H.li)(n),[y,f]=za(!1),[w,b,v,S]=(0,H.Kr)((()=>[()=>ae(h),()=>ae(m),e=>{document.activeElement==ne(h)&&c(e)},e=>{b(),u()}]),[]);(0,H.vJ)((()=>{ie(m,document.activeElement),w()}),[]),ol(h),(0,H.vJ)((()=>{n&&!ne(g)&&w(),ie(g,n)}),[n]),(0,H.Yn)(t,(()=>({focusPrevEl:b}))),rl(h,"L",d),rl(h,"H",p),rl(h,"C",S);const[C,I]=lr(n,_l);return fr("div",{ref:h,role:"dialog",className:C,style:{...kl,...i,...I},tabIndex:"0",onKeyDown:v,children:[fr(Dr,{style:o,caption:r,onMore:s?f:void 0,onClose:u}),s&&fr(Il,{isShow:y,className:Nl,configs:s,onToggle:a,onClose:f}),fr("div",{children:l}),fr(Tl,{onLoad:d,onShow:p,onClose:S})]})},El=`${dr("dialog")} ${sr}`,$l={position:"absolute",top:"20%",borderRadius:5,boxShadow:"rgba(0, 0, 0, 0.2) 0px 0px 0px 6px",zIndex:10},Dl={float:"right",margin:"16px 4px 10px 0"},Rl=e=>{e.stopPropagation()},Bl=e=>{let{refFocusFirst:t,refFocusLast:n,isShow:i,isWithButton:o,style:r,caption:s,captionStyle:a,children:l,onKeyDown:c,onClose:d,divBtStyle:p,commandButtons:u,withoutClose:h,isClosePrimary:m=!1}=e;const g=sl(i),y=Zs(d),f=ir([i,El]),w=rr(i);return fr(Sa,{refEl:g,refFirst:t,refLast:n,style:w,children:fr("div",{ref:g,tabIndex:"0",role:"dialog","aria-label":s,"aria-hidden":!i,className:f,style:{...$l,...r,...w},onClick:Rl,onKeyDown:y,children:[fr(Dr,{style:a,caption:s,onClose:d}),fr("div",{children:l}),o&&fr("div",{style:{...Dl,...p},children:[u,!h&&fr(as,{isPrimary:m,style:Ro,caption:"Close",onClick:d},"_close")]})]})})},Pl={...Ur,...cs,...pa,...Ma,...{DraggableDialog:Al,ModalDialog:Bl,ModalPane:Qs,ModalPopup:al}},Ll=[["Top","top"],["Popular","popularity"],["Newest","publishedAt"]],Kl=Ll[0],Wl=zo(Kl),Ml=Wo(),Ol=e=>{let{isShow:t,caption:n,type:i,source:o,itemConf:r,onLoad:s,onShow:a,onClose:l}=e;const[c,d]=Oo(l),[p,u]=Go(Wl),h=(0,H.hb)((()=>{s({type:i,source:o,itemConf:r,sortBy:ne(p)}),d()}),[]),m=Vo(h,d);return fr(Pl.DraggableDialog,{refEl:c,isShow:t,captionStyle:Do,caption:n,onKeyDown:m,onLoad:h,onShowChart:a,onClose:d,children:fr(Pl.InputSelect,{style:Ml,caption:"SortBy",initItem:Kl,options:Ll,onSelect:u})})},Fl=e=>m(e)?e():e,zl=(e,t)=>({...e,[t]:!e[t]}),Ul=e=>(0,H.WO)(zl,e||{},Fl),Hl=e=>{const t=(0,H.li)(e||Object.create(null)),n=(0,H.hb)(((n,i)=>{h(i)&&(t.current[i]=h(n)?""===n?e[i]:n:zo(n))}),[e]);return[t,n]},Gl=(e,t,n)=>{const{type:i,source:o,itemConf:r,onLoad:s,onClose:a}=e,[l,c]=Oo(a);return[l,(0,H.hb)((()=>{s({type:i,source:o,itemConf:r,loadId:t,...ne(n)}),c()}),[]),c]},jl=e=>t=>{let{children:n}=t;return fr("div",{style:e,children:n})},Vl=jl({display:"flex",flexDirection:"column"}),Jl=jl({display:"inline-flex",alignItems:"flex-start",maxHeight:"1.7rem"}),ql=e=>e,Yl="TRUE",Zl=window.localStorage,Xl=window.btoa||ql,Ql=window.atob||ql,ec=e=>({message:e}),tc=ec("LocalStorage is absent"),nc=ec("Use LocalStorage is not allowed"),ic=!!Zl;let oc=!1;const rc=e=>`NA_${e}`,sc=e=>{if(!ic)return[void 0,{...tc}];try{const t=Ql(Zl[rc(e)]);return[t===Yl||t]}catch(e){return[void 0,e]}},ac=(e,t)=>{if(!oc)return{...nc};if(g(t))return t?ac(e,Yl):(e=>{if(!ic)return{...tc};try{Zl.removeItem(rc(e))}catch(e){return e}})(e);if(!ic)return{...tc};try{Zl[rc(e)]=Xl(t)}catch(e){return e}},lc="UITheme",cc="FontSize",dc="IS_AIO",[pc,uc]=Ue("isAio"),hc=Me((()=>({...pc(!!sc(dc)[0])}))),[mc,gc]=ze(hc),yc=Fe(hc,uc),fc=()=>uc(gc()),wc=e=>()=>{mc(pc(e)),ac(dc,e)},bc=wc(!0),vc=wc(!1),Sc=[["No similiar item in list"]],Cc="c",Ic="f",_c=(e,t)=>e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]?e:t,Nc=(e,t)=>{let[n,i,o]=t;const r=void 0===i?e[2]:i,s=void 0===o?e[3]:o;switch(n){case Cc:return _c(e,[0,0,r,s]);case"s":return _c(e,[1,0,r,s]);case Ic:return _c(e,[1,1,r,s]);default:return e}},kc=["",""],xc={top:64},Tc={...Ts,top:"calc(42.8px - 1.8rem)"},Ac={fill:"#80c040"},Ec=!_e,$c=(e,t,n)=>Ec||_e&&!e&&t.length===n.length,Dc=e=>{let{isInput:t,maxInput:n="20",id:i,style:o,tfStyle:r,initItem:s,caption:a,options:l,onSelect:c}=e;const d=yc(),u=!(!t||!d),h=(0,H.li)(),m=(0,H.li)(),g=(0,H.li)(),y=(0,H.li)(),f=(0,H.li)(),[w,b]=((e,t)=>(0,H.WO)(Nc,[0,0,e,t||kc]))(l,s),[v,S,C,I]=w,[_,N]=js(v,!0),[k,x,T,A,E]=(0,H.Kr)((()=>[()=>{c(s,i),b([Cc,l,""]),le(h,200)},e=>{const t=e===Sc[0],n=t?s:e;c(n,i),b([Cc,t?l:void 0,n]),de(h,Fo(n)),n&&ae(m)},()=>{b([Cc]),ae(m)},e=>{e.key===G&&b([Ic])},()=>{b([Ic])}]),[]),$=(0,H.Kr)((()=>p((()=>l.map((e=>(e._t=e[0].toLowerCase(),e)))))),[l]),D=(0,H.Kr)((()=>(e,t)=>{const n=(e||"").toLowerCase(),i=u?n:n.trim();i?(clearTimeout(ne(y)),ie(y,setTimeout((()=>{const t=$().filter((e=>-1!==e._t.indexOf(i))),n=t.length?t:u?[[e]]:Sc;ie(f,n[0]),b(["s",n])}),350))):k()}),[u,$,k,b]),[R,B]=(0,H.Kr)((()=>[(e,t)=>{pe(t),x(e)},(e,t,n)=>{pe(n),x(ne(f))}]),[]),P=_e&&I?{tabIndex:"-1",readOnly:!0,inputCn:Jo,onClick:()=>{b([Ic])}}:void 0;return fr("div",{className:ms,style:o,children:[fr("label",{className:gs,children:a}),fr(aa,{id:_,refOp:g,isShow:v,isFocusItem:S,className:vs,style:xc,item:I,options:C,clItem:Ss,onSelect:R,onClose:T}),fr(Ks,{...N,...P,refEl:h,style:r,isTrimValue:!u,initValue:Fo(I),maxLength:n,onInputChange:D,onEnter:B,onKeyDown:A,children:$c(I,C,l)?fr(Js,{refEl:m,style:or(Tc,v&&Ac),onKeyDown:e=>{if(v){const t=ne(g);t&&t.hKeyDown(e)}else e.key===G?b([Ic]):e.key===J&&(de(h,""),k())},onClick:E}):null})]})},Rc="YYYY-MM-DD",Bc=e=>{let{style:t,initialFrom:n,initialTo:i,onInput:o}=e;const r=(0,H.hb)(((e,t)=>{o(""+Tt(e),t)}),[o]);return fr("div",{children:[fr(Ks,{id:"fromDate",caption:"From Date",hasClear:!1,style:t,initValue:n,errorMsg:Rc,onTest:Nt,onEnter:r,onBlur:r}),fr(Ks,{id:"toDate",caption:"To Date",hasClear:!1,style:t,initValue:i,errorMsg:Rc,onTest:Nt,onEnter:r,onBlur:r})]})},Pc="sg",Lc=Wo(),Kc={...Ko,marginLeft:0},Wc=(e,t)=>!w(e)||!!e[t],Mc=e=>{let{isInputs:t,configs:n,onSelect:i,onEnter:o}=e;return(n||[]).map((e=>{const n=e[0],r=e[1],s="s"===n?da:n===Pc?Dc:void 0,a=n===Pc?{isInput:e[6]}:void 0,l=s?(0,gr.n)(s,{...a,key:r,id:r,caption:e[2],options:e[3],initItem:e[4],style:Lc,tfStyle:Kc,onSelect:i}):"t"===n?(0,gr.n)(Ks,{...e[4],key:r,id:r,style:Ko,caption:e[2],initValue:e[3],onEnter:o,onBlur:i,onInputChange:i}):"tf"===n?fr(Bc,{style:Bo,initialFrom:e[3],initialTo:e[4],onInput:i},"_ft"):void 0;return l?fr(Mr,{isShow:Wc(t,r),children:l}):null}))},Oc={marginTop:16,marginLeft:8},Fc=e=>{let{style:t,spanStyle:n,children:i}=e;return fr("div",{style:{...Oc,...t},children:[fr("span",{style:{...Xo,...n},children:"Powered by"}),i]})},zc=Array.isArray,Uc=e=>{const{isShow:t,caption:n,loadId:i,INPUT_CONFIGS:o,INITIAL_INPUTS:r,TOGGLES:s,IS_INPUTS:a,children:l,onShow:c}=e,[d,p]=Ul(a),[u,h]=Hl(r),[m,g,y]=Gl(e,i,u),f=Vo(g,y),[w,b]=zc(v=s)&&v.length>1?[$o,s]:[Do];var v;return fr(Al,{refEl:m,isShow:t,captionStyle:w,caption:n,menuToggle:b,toggleItem:p,onKeyDown:f,onLoad:g,onShow:c,onClose:y,children:fr(Vl,{children:[fr(Mc,{isInputs:d,configs:o,onSelect:h,onEnter:g}),fr(Fc,{style:Po,children:l})]})})},Hc=function(e){return void 0===e&&(e="10"),{maxLength:e,autoCapitalize:"characters",inputStyle:{textTransform:"uppercase"}}},Gc=Object.create,jc=e=>e.reduce(((t,n)=>{const i=((e,t)=>1===e.length||!0===t[5])(e,n);return t[0][(e=>e[1])(n)]=(e=>{const t=e[0];return"s"===t||t===Pc?zo(e[4]):"t"===t?e[3]:void 0})(n),t[1].push({id:n[1],caption:n[2],df:i}),t[2][n[1]]=i,t}),[Gc(null),[],Gc(null)]),Vc=e=>t=>(t||{})[e],Jc=Vc("paneCaption"),qc=Vc("caption"),Yc=e=>qc(e)||Jc(e),Zc=(Vc("paneCaption"),Vc("type")),Xc=Vc("loadId"),Qc=e=>Xc(e)||Zc(e),ed=(e,t)=>t?`${e} (Default: ${t})`:e,td=(e,t)=>e||K(t),nd=(e,t)=>{let{caption:n,dfValue:i,inputProps:o,is:r}=t;return["t",e,td(n,e),i,o,r]},id=e=>function(t,n,i){let{caption:o,dfOption:r,dfIndex:s,is:a,isInput:l,isNotFirstUpperCase:c}=void 0===i?{}:i;const d=h(n[0])?((e,t)=>oe(e,t?Ho:Uo)||[])(n,c):n;return[e,t,td(o,t),d,r||d[s||0],a,l]},od=id("s"),rd=id(Pc),sd=kt(1),ad=xt(),ld=(e,t,n)=>["tf",e,"From To Date",t||sd,n||ad],cd=e=>p((()=>{const t=e();return[t,...jc(t)]})),dd={DF:Ol,DialogType1:Ol,DialogType2:e=>{const{itemConf:t}=e,{getConfig:n,CompLink:i}=t,[o,r,s,a]=n();return fr(Uc,{...e,caption:Yc(t),loadId:Qc(t),INPUT_CONFIGS:o,INITIAL_INPUTS:r,TOGGLES:s,IS_INPUTS:a,children:fr(i,{})})}},pd={getElement:e=>dd[e]||dd.DF},ud=e=>{let{onMinWidth:t,onInitWidth:n,onPlusWidth:i,onMinusWidth:o,onRemoveItems:r}=e;return{titleCl:qo,pageWidth:196,maxPages:2,p0:[{id:"p1",type:"sub",cn:qo,name:"Resize"},{cn:qo,name:"Remove Items",onClick:r,isClose:!0}],p1:[{cn:qo,name:"to MinWidth",onClick:t},{cn:qo,name:"to InitWidth",onClick:n},{cn:qo,name:"+10px to Width",onClick:i},{cn:qo,name:"-10px to Width",onClick:o}]}},hd=Array.isArray,md=Object.keys,gd=(e,t)=>t[1]-e[1],yd=e=>{if(!hd(e))return;const t=e.reduce(((e,t)=>((t.related||"").split("|").forEach((t=>{e[t]?++e[t]:e[t]=1})),e)),Object.create(null));return md(t).map((e=>[e,t[e]])).sort(gd)},fd=e=>{const[t,n]=(0,H.J0)(!1);return[t,...(0,H.Kr)((()=>[()=>n((e=>!e)),()=>{ae(e),n(!1)}]),[])]},wd=e=>{let{refEl:t,className:n,style:i,captionStyle:o,btCloseStyle:r,title:s,onKeyDown:a,onClick:l,onToggle:c,onClose:d}=e;const[p,u]=(0,H.Kr)((()=>[e=>{13===e.keyCode?c():m(a)&&a(e)},e=>{e.stopPropagation(),d()}]),[]);return fr("div",{role:"button",ref:t,tabIndex:"0",className:n,style:i,onClick:l,onKeyDown:p,children:[fr("span",{className:Jo,style:o,children:s}),fr(Er,{style:r,onClick:u})]})},bd="article-header",vd="article-descr",Sd={position:"relative",marginBottom:5,lineHeight:1.5,borderBottomRightRadius:2,boxShadow:"1px 4px 6px 1px rgba(0,0,0,0.6)"},Cd={color:"#0a0a0a",display:"inline-block",paddingRight:32,fontSize:"1.125rem",fontWeight:"bold",wordBreak:"break-word"},Id={position:"absolute",right:-4},_d=e=>{let{refEl:t,isShowDescr:n,title:i,children:o,onKeyDown:r,onClick:s,onToggle:a,onClose:l}=e;return fr(gr.FK,{children:[fr(wd,{refEl:t,className:bd,captionStyle:Cd,btCloseStyle:Id,title:i,onKeyDown:r,onClick:s,onToggle:a,onClose:l}),fr(Mr,{isShow:n,withoutAnimation:!0,className:vd,children:o})]})},Nd={fontSize:"1rem",fontWeight:"bold"},kd={display:"flex"},xd={...Nd,whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden",display:"inline-block",width:140,paddingRight:8,textAlign:"right"},Td={...Nd,paddingLeft:6},Ad=(e,t,n)=>({display:"inline-block",height:"1.2rem",width:200*n/t,background:e}),Ed=(0,H.ph)((e=>{let{style:t,items:n,maxValue:i,color:o="darkcyan"}=e;return fr("div",{style:t,children:n.map((e=>fr("div",{style:kd,children:[fr("span",{style:xd,children:e[0]}),fr("span",{style:Ad(o,i,e[1])}),fr("span",{style:Td,children:e[1]})]},e[0])))})})),$d={padding:"6px 0"},Dd=Array.isArray,Rd=e=>{let{categoryBars:t,maxValue:n,numberOfItems:i}=e;const[o,r]=(0,H.J0)(!1),s=(0,H.Kr)((()=>()=>r(!0)),[]),[a,l]=fd();(0,H.vJ)((()=>{Dd(t)&&r(!1)}),[t]);const c=or(Sd,o&&tr);return Dd(t)?fr("div",{style:c,children:fr(_d,{title:`Categories Bar Chart (${i})`,isShowDescr:a,onClick:l,onToggle:l,onClose:s,children:fr(Ed,{style:$d,items:t,maxValue:n})})}):null},Bd=(e,t)=>{(0,H.vJ)((()=>(e&&e.addEventListener("change",t),()=>{e&&e.removeEventListener("change",t)})),[])},Pd=Number.isNaN,Ld=Object.assign,Kd=e=>{Ld(e,{id:null,deltaStep:1,countStep:0})};const Wd=class{constructor(e){let{elementRef:t,initWidth:n,minWidth:i,maxWidth:o,step:r=10,onResizeAfter:s}=e;this.elementRef=t,this.step=r,this.onResizeAfter=s,this.initWidth=n,this.minWidth=i,this.maxWidth=o,this.minDelta=i-n,this.maxDelta=o-n,this.delta=0,Kd(this),this.hStartResizeLeft=d(this._startResize,this._resizeLeft),this.hStartResizeRight=d(this._startResize,this._resizeRight)}_increaseDeltaStep=()=>{this.countStep+=1,this.countStep>30?this.deltaStep=3:this.countStep>15&&(this.deltaStep=2),(this.maxDelta-this.delta<20||this.delta-this.minDelta<20)&&(this.deltaStep=1)};_getElementStyle=()=>{const{current:e}=this.elementRef||{},{style:t}=e||{};return t||{}};_setElementWidth=e=>{this._getElementStyle().width=e+"px"};_getElementWidth=()=>parseInt(this._getElementStyle().width,10);_onResizeAfter=()=>{const{onResizeAfter:e}=this;m(e)&&e(this._getElementWidth())};clearInterval=()=>{clearInterval(this.id)};toWidth=(e,t)=>{const{minWidth:n,maxWidth:i,initWidth:o}=this;e>=n&&e<=i&&(this.delta=e-o,this._setElementWidth(e),t&&this._onResizeAfter())};resizeBy=e=>{e<0&&this.delta>this.minDelta||e>0&&this.delta{this.resizeBy(-this.deltaStep),this._increaseDeltaStep()};_resizeRight=()=>{this.resizeBy(this.deltaStep),this._increaseDeltaStep()};_updateDelta=()=>{const e=parseInt(this._getElementStyle().width,10);Pd(e)||(this.delta=e-this.initWidth)};_startResize=e=>{null!==this.id&&this._stopResize(),this._updateDelta(),this.id=setInterval(e,5)};_stopResize=()=>{this.clearInterval(),Kd(this)};hStopResize=()=>{this._stopResize(),this._onResizeAfter()}},Md=e=>{const t=ds((()=>new Wd(e))),n=Kr(e.onMinusWidth),i=Kr(e.onPlusWidth);return(0,H.vJ)((()=>()=>t.clearInterval()),[]),[t.hStartResizeLeft,t.hStartResizeRight,t.hStopResize,n,i]},Od=e=>{let{to:t,ariaLabel:n,dataPos:i,style:o,startResize:r,stopResize:s,onKeyDown:a,children:l}=e;const c=(0,H.li)(),d="r"===t?"11":"1",[p,u]=Sr(n,i);return Rr(c,Y,r),Rr(c,X,s),fr("button",{ref:c,type:"button","aria-label":p,"data-pos":u,className:"bt-resize select-none",style:o,onMouseDown:r,onMouseUp:s,onKeyDown:a,children:fr(xr,{w:"12",strokeWidth:"1.5",strokeLinecap:"round",fill:"none",children:[fr("path",{d:"M 1,6 L 11,6"}),fr("path",{d:`M 6,2 L ${d},6 6,10`})]})})},Fd={display:"inline-block"},zd={marginLeft:10},Ud=e=>{const[t,n,i,o,r]=Md(e);return fr("div",{style:{...Fd,...e.style},children:[fr(Od,{ariaLabel:"Resize to Left",dataPos:"tr",style:zd,startResize:t,stopResize:i,onKeyDown:o}),fr(Od,{to:"r",ariaLabel:"Resize to Right",dataPos:"tr",style:zd,startResize:n,stopResize:i,onKeyDown:r})]})},Hd={position:"relative",margin:"0 3px 0 12px"},Gd={position:"relative"},jd="(min-width: 450px)",Vd=e=>window.matchMedia?window.matchMedia(e):void 0,Jd=Vd(jd),qd=()=>{const e=Vd(jd);return e&&e.matches},Yd=e=>{let{refRootDiv:t,onRemoveItems:n,onPlusWidth:i,onMinusWidth:o}=e;const[r,s]=(0,H.J0)(qd);return Bd(Jd,(e=>{s(e.matches)})),r?fr(Jl,{children:[fr(Hr,{ariaLabel:"Remove Items [r]",dataPos:"btr",caption:"R",style:Hd,onClick:n}),fr(Ud,{elementRef:t,style:Gd,initWidth:635,minWidth:395,maxWidth:1200,onPlusWidth:i,onMinusWidth:o})]}):null},Zd={textAlign:"center",paddingTop:4},Xd=e=>{let{nextPage:t,maxPage:n}=e;return n?`${t}/${n}`:t},Qd=e=>{let{page:t}=e;return t?fr("div",{style:Zd,children:fr(Qr,{caption:`Load Next Page ${Xd(t)}`,onClick:t.onPageLoad})}):null},ep=(void 0===rp&&(rp=635),{width:!Ie()||window.innerWidth>700?rp:Ie()?window.innerWidth-16:635}),tp=pr("news-pane"),np=hr("items__menu-more"),ip={paddingLeft:30,textAlign:"left"},op={overflow:"hidden auto",height:"92%",paddingRight:10};var rp;const sp=e=>parseInt(e.width,10)||635,ap=e=>e+"px",lp=(e,t,n)=>{let{Item:i,refFirstItem:o,onCloseItem:r,onRemoveUnder:s}=n;return fr(i,{refEl:0===t?o:void 0,item:e,onCloseItem:r,onRemoveUnder:s},e.articleId)},cp=e=>{let{id:t,paneCaption:n,Item:i,useMsPane:o,useMsItem:r,onRemoveItems:s,onRemoveUnder:a,onCloseItem:l}=e;const c=(0,H.li)(),p=(0,H.li)(),u=(0,H.Kr)((()=>((e,t)=>{const n=t=>{(ce(e)||{}).width=ap(t)};return{onMinWidth:d(n,395),onInitWidth:d(n,635),onPlusWidth:()=>{const t=ce(e)||{},n=sp(t)+10;n<1200&&(t.width=ap(n))},onMinusWidth:()=>{const t=ce(e)||{},n=sp(t)-10;n>395&&(t.width=ap(n))},onRemoveItems:t}})(c,s)),[]),h=(0,H.Kr)((()=>ud(u)),[]),{onPlusWidth:m,onMinusWidth:g}=u,[y,f]=za(!0),[w,b,v]=us(!1),[S,C]=(0,H.J0)({articles:[],sortBy:"",caption:""}),{articles:I,sortBy:_,caption:N,page:k,isRelatedBars:x}=S,[T,A,E]=(0,H.Kr)((()=>{if(x){const e=yd(I);return[e,(e[0]||[])[1],I.length]}return[]}),[x,I]),$=(0,H.hb)((()=>{f(!1)}),[]),D=(0,H.hb)((e=>{e.stopPropagation()}),[]);o((e=>{e&&e.id===t&&f(!0)})),r((e=>{e&&e.id===t&&(!0===e.isAdd?(f(!0),C({articles:e.data,sortBy:e.sortBy,caption:e.caption,page:e.page,isRelatedBars:e.isRelatedBars}),le(p)):!0===e.isUpdate&&C((t=>({...t,articles:e.data}))))})),rl(c,"R",s),rl(c,"+",m),rl(c,"-",g);const R=N||((e,t)=>[e,t].filter(Boolean).map(K).join(": "))(n,_),[B,P]=cr(y,tp);return fr("div",{ref:c,className:B,style:{...ep,...P},children:[fr(Pl.ModalSlider,{isShow:w,className:np,model:h,onClose:v}),fr(Pl.BrowserCaption,{style:ip,caption:R,onMore:b,onClose:$,children:fr(Yd,{refRootDiv:c,onRemoveItems:s,onPlusWidth:m,onMinusWidth:g})}),fr(Pl.ScrollPane,{style:op,onScroll:D,children:[x&&A&&fr(Rd,{categoryBars:T,maxValue:A,numberOfItems:E}),fr(Pl.ItemStack,{items:I,crItem:lp,Item:i,refFirstItem:p,onCloseItem:l,onRemoveUnder:a}),fr(Qd,{page:k})]})]})},dp=e=>{const t=(0,H.li)(e),n=(0,H.hb)((e=>{t.current=e}),[]);return[t,n]},pp=(e,t,n)=>(0,H.hb)((i=>i>90?(t(e),!1):!(i>40)||(n(),!1)),[]),up="border-left",hp="touch-action",mp=!_e,gp=e=>{mp&&e.preventDefault()},yp=Object.assign,fp=e=>e.style,wp=(e,t)=>{const n=fp(e);n.removeProperty(up),_e&&n.removeProperty(hp),t&&yp(n,{right:0,opacity:1})},bp=()=>{},vp=e=>{let{refEl:t,className:n,style:i,children:o,setTimeStamp:r=bp,onGesture:s}=e;const a=(0,H.li)(),l=t||a,c=(0,H.li)(0),d=(0,H.li)(0),p=(0,H.li)(null),u=(0,H.li)(!1),h=(0,H.li)(!1),m=(0,H.li)(),g=(0,H.hb)((()=>{clearTimeout(ne(m)),ie(u,!1),ie(d,0);const e=ne(p);e&&(wp(e,!0),ie(p,null))}),[]),y=(0,H.hb)((e=>{ie(u,!0),(e=>{const t=fp(e);t.setProperty(up,"4px solid #d64336"),_e&&t.setProperty(hp,"none")})(e)}),[]),f=(0,H.hb)((e=>{if("A"!==e.target.tagName){const t=e.currentTarget;ne(u)?g():(ie(d,Se(e)),ie(p,t),ie(m,setTimeout((()=>y(t)),1e3)))}}),[]),w=(0,H.hb)((e=>{if(gp(e),ne(u)){const i=ve(e);if(i)if(ne(h)){const o=ne(c)-i;o<0&&(t=e.currentTarget,n=o,yp(fp(t),{right:n+"px",opacity:1-.5*Math.abs(n)/60}))}else ie(c,i),ie(h,!0)}else{const t=ne(d);t&&Math.abs(t-Se(e))>15&&g()}var t,n}),[]),b=(0,H.hb)((e=>{if(ne(u)){let t=!1;if(ne(h)){gp(e),r(e.timeStamp);const n=ve(e),i=ne(c)-n;t=i<0&&s(Math.abs(i)),ie(h,!1)}ie(u,!1),wp(e.currentTarget,t)}else g()}),[]),v=(0,H.Kr)((()=>_e?void 0:{onMouseDown:f,onMouseMove:w,onMouseUp:b,onMouseLeave:b}),[]);return Rr(l,Y,f),Rr(l,Z,w),Rr(l,X,b),fr("div",{ref:l,role:"presentation",className:n,style:i,...v,children:o})},Sp=e=>{let{className:t,style:n,href:i,children:o,fallback:r=null,...s}=e;const a=Ce(i);return a?fr("a",{className:t,style:n,...s,href:a,target:"_blank",children:o}):r},Cp=e=>t=>{let{className:n,style:i,text:o}=t;return o?fr(e,{className:n,style:i,children:o}):null},Ip=(Cp("div"),Cp("span")),_p="link-wrapper",Np={...Xo,fontSize:"1rem",fontWeight:"bold"},kp={wordBreak:"break-word"},xp={display:"flex",justifyContent:"space-between"},Tp={...Np,...kp,whiteSpace:"pre-line",display:"block",lineHeight:1.4,padding:"8px 16px 4px 12px"},Ap={...Np,...xp,flexWrap:"wrap",lineHeight:1.6,padding:"0 16px 0 12px"},Ep={...kp},$p={...Xo,whiteSpace:"nowrap",marginLeft:"auto"},Dp={...xp,padding:"8px 12px 0 12px"},Rp={...xp,padding:"0 12px 6px 12px"},Bp={color:"gray",fontWeight:"bold"},Pp={...Bp,paddingRight:16},Lp={paddingTop:8},Kp=e=>{let{related:t,commentsUrl:n,commentsTitle:i}=e;return(n||i)&&fr("div",{className:Jo,style:Ap,children:[fr("span",{style:Ep,children:n?t:`${t} ${i}`}),fr(Sp,{className:_p,style:$p,href:n,children:i})]})},Wp=e=>{let{href:t,description:n,related:i,commentsUrl:o,commentsTitle:r,publishedAt:s,timeAgo:a,author:l,onKeyDown:c,onClose:d}=e;return fr(gr.FK,{children:[fr("div",{style:Dp,children:[fr(Ip,{style:Pp,text:l}),fr(Ip,{style:Bp,text:a})]}),t?fr(Sp,{className:_p,style:Tp,href:t,onKeyDown:c,children:n}):fr("div",{style:Tp,children:n}),fr("div",{style:Lp,children:[fr(Kp,{related:i,commentsUrl:o,commentsTitle:r}),fr("div",{style:Rp,children:[fr(Er,{dataPos:"cr",onClick:d}),fr(Ip,{className:Jo,style:Bp,text:s})]})]})]})},Mp=()=>{},Op=e=>{let{refEl:t,item:n,onCloseItem:i,onRemoveUnder:o=Mp,onRemoveItem:r=Mp}=e;const s=(0,H.li)(null),[a,l]=dp(null),[c,d]=(0,H.J0)(!1),p=(0,H.Kr)((()=>()=>{re(((ne(s)||{}).nextElementSibling||{}).firstElementChild),i(n),d(!0)}),[]),u=pp(n,o,p),[h,m,g]=fd(t),y=(0,H.Kr)((()=>e=>{const{timeStamp:t}=e||{},n=ne(a);t&&n&&t-n<200||(l(t),m())}),[]),f=(0,H.Kr)((()=>e=>{const{keyCode:t}=e;27===t?g():46===t&&p()}),[]),{title:w,author:b,timeAgo:v,publishedDate:S,publishedAt:C,url:I,related:_,commentsUrl:N,numOfComments:k}=n,x=n.description||"More...",T=c?tr:void 0,A=S||$t(C),E=Ce(I),$=Ce(N),D=$?`Comments ${k}`:k;return I&&!E?null:fr(vp,{refEl:s,style:{...Sd,...T},setTimeStamp:l,onGesture:u,children:fr(_d,{refEl:t,isShowDescr:h,title:w,onKeyDown:f,onClick:y,onToggle:m,onClose:p,children:fr(Wp,{href:E,description:x,related:_,commentsUrl:$,commentsTitle:D,publishedAt:A,author:b,timeAgo:v,onKeyDown:f,onClose:p})})})},Fp=(e,t)=>(0,H.hb)((t=>{46===t.keyCode&&e(t)}),t||[]),zp={position:"relative",fontWeight:"bold",width:"100%",padding:"8px 4px 16px 16px",marginBottom:5,lineHeight:1.5,boxShadow:"1px 4px 6px 1px rgba(0,0,0,0.6)",borderTopRightRadius:2,borderBottomRightRadius:2},Up={position:"absolute",top:8,right:0},Hp={paddingBottom:8},Gp={display:"block",paddingBottom:8},jp={...Xo,display:"inline-block",backgroundColor:"gray",padding:"4px 8px",margin:"6px 8px 2px 8px",borderRadius:16},Vp=e=>({display:"inline-block",paddingRight:8,fontSize:"1.125rem",color:e}),Jp=Vp("#d7bb52"),qp=Vp("#80c040"),Yp=Vp(Zo),Zp=_e?"A":fr("span",{role:"img","arial-label":"hammer and pick",children:"⚒"}),Xp=_e?"S":fr("span",{role:"img","aria-label":"fish",children:"🐟"}),Qp=_e?"V":fr("span",{role:"img","aria-label":"wheel of dharma",children:"☸"}),eu=_e?"R":fr("span",{role:"img","arial-label":"shamrock",children:"☘"}),tu=(e,t)=>fr("span",{className:vd,style:jp,children:e},t),nu={DF:[cp,Op],STACK_ITEM:[cp,e=>{let{item:t,onCloseItem:n,onRemoveUnder:i=ee,onRemoveItem:o=ee}=e;const[r,s]=za(!1),a=(0,H.hb)((()=>{n(t),s(!0)}),[]),l=Fp(a),c=pp(t,i,a),{is_answered:d,answer_count:p,score:u,view_count:h,title:m,link:g,owner:y,tags:f}=t||{},{reputation:w,display_name:b}=y||{};return fr(vp,{className:bd,style:{...zp,...r?tr:void 0},onGesture:c,children:[fr("div",{style:Hp,children:[fr("span",{style:d?qp:Jp,children:[Zp," ",p]}),fr("span",{style:Jp,children:[Xp," ",u]}),fr("span",{style:Yp,children:[Qp," ",h]}),fr("span",{style:qp,children:[eu," ",w]}),fr("span",{style:Yp,children:b}),fr(Er,{style:Up,onClick:a})]}),fr("div",{children:m}),fr(Sp,{className:"link-wrapper",style:Gp,href:g,onKeyDown:l,children:fr(Fr,{items:f,crItem:tu})})]})}]},iu={getElement:e=>nu[e]||nu.DF},ou=(e,t)=>{const{type:n}=t;if(e[n])return{key:n};{const i=(e=>{const{type:t,dialogType:n,dialogProps:i}=e;return fr(pd.getElement(n),{type:t,itemConf:e,...i,onShow:d(Lu,e),onLoad:xo},t)})(t);return e[n]=!0,{key:n,Comp:i}}},ru=(e,t,n)=>{const{type:i}=t;if(e[i])return{id:t.paneId};{const o=((e,t)=>{const{type:n,paneType:i,paneCaption:o,paneId:r}=e,[s,a]=iu.getElement(i);return fr(s,{id:r,paneCaption:o,Item:a,useMsPane:t,useMsItem:_o,onRemoveItems:d(Ao,r),onRemoveUnder:Eo,onCloseItem:To},n)})(t,n);return e[i]=!0,{Comp:o}}},su=Object.create(null),au=Object.create(null),[lu,cu]=Ue("msAbout","is"),[du,pu]=Ue("msModalDialog","option"),[uu,hu]=Ue("msDialog"),[mu,gu]=Ue("msBrowser","id"),[yu,fu]=Ue("msPane"),[wu,bu]=Ue("dialogItems"),vu=Me((()=>({...lu(),...du(),...uu(),...mu(),...yu(),...wu([])}))),[Su]=ze(vu),Cu=Oe(vu,cu),Iu=()=>Su(lu(!0)),_u=Oe(vu,pu),Nu=function(e,t){void 0===t&&(t={}),t.modalDialogType=e,Su(du(t))},ku=d(Nu,"s",Qe.exportSettingsFn()),xu=d(Nu,"a"),Tu=Oe(vu,hu),Au=Fe(vu,bu),Eu=e=>Su(uu(ou(su,e))),$u=e=>Su(wu([e])),Du=()=>Su(wu([])),Ru=Oe(vu,gu),Bu=d((e=>{Su(mu(e))}),et.NEWS),Pu=Oe(vu,fu),Lu=e=>{Su({...lu(!1),...yu(ru(au,e,Pu))})},Ku="News Aggregator v0.4.0",Wu=e=>`0 0 ${e} ${e}`,Mu=e=>{let{color:t="currentColor",size:n="24",children:i,...o}=e;return fr("svg",{xmlns:"http://www.w3.org/2000/svg",width:n,height:n,viewBox:Wu(n),fill:"none",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...o,children:i})},Ou=e=>fr(Mu,{...e,children:[fr("circle",{cx:"12",cy:"12",r:"10"}),fr("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),fr("line",{x1:"12",y1:"8",x2:"12",y2:"8"})]}),Fu=e=>fr(Mu,{...e,children:[fr("circle",{cx:"12",cy:"12",r:"3"}),fr("path",{d:"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"})]}),zu="#2f7ed8",Uu=(e,t,n)=>({backgroundColor:e,width:t+"%",transition:n,opacity:1}),Hu=(e,t,n)=>ne(e)?(ie(e,!1),Uu(t,0)):Uu(t,((e,t)=>e<0?0:e>=100?(ie(t,!0),100):e)(n,e),"width 350ms linear"),Gu=e=>{let{color:t=zu,completed:n}=e;const i=We()[1],o=(0,H.li)(!1),r=(0,H.li)(null);(0,H.vJ)((()=>{ne(o)&&ie(r,setTimeout(i,800))})),(0,H.vJ)((()=>()=>{clearTimeout(ne(r))}),[]);return fr("div",{className:"progress-line",style:Hu(o,t,n)})},ju="#2f7ed8",Vu=(e,t)=>[e,t],Ju=(0,H.ph)((()=>{const e=fo(),[t,n]=e===uo?Vu(35,ju):e===ho?Vu(100,ju):e===mo?Vu(100,"#ed5813"):Vu(0,ju);return fr(Gu,{color:n,completed:t})}),(()=>!0)),qu=e=>{let{ariaLabel:t,dataPos:n,className:i}=e;return fr("span",{"aria-label":t,"data-pos":n,className:i,children:fr("svg",{viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",clipRule:"evenodd",strokeLinejoin:"round",strokeMiterlimit:"2",strokeWidth:"2",children:[fr("rect",{ry:"1.8825414",rx:"194.14471",y:"1.434558",x:"19.176462",height:"12.460618",width:"10.85316",fill:"#8ecc2d",stroke:"#8ecc2d"}),fr("rect",{ry:"1.87537",rx:"204.478",y:"16.639841",x:"8.8410215",height:"13.752699",width:"18.307165",fill:"#232f3b",stroke:"#232f3b"}),fr("rect",{ry:"1.87537",rx:"204.478",y:"3.4229634",x:"2.5897937",height:"10.894996",width:"10.001963",fill:"#a487d4",stroke:"#a487d4"})]})})},Yu=e=>{let{className:t,style:n,caption:i}=e;return fr("span",{className:t,style:n,children:i})},Zu=(e,t)=>{const n=(0,H.li)(),i=(0,H.li)();return(0,H.vJ)((()=>{e&&!ne(i)?(ie(i,document.activeElement),ae(t,n)):e||(ae(i),ie(i,null))}),[e]),n},Xu=()=>{const e=(0,H.li)([]);return(0,H.hb)(((t,n,i)=>{const[o,r]=ne(e);t?o?n!==o&&(r(),ie(e,[n,i])):ie(e,[n,i]):n===o&&ie(e,[null,null])}),[])},Qu={lineHeight:2.5},eh={paddingLeft:10},th={paddingLeft:4,verticalAlign:"top",fontWeight:"bold",fontSize:"1rem",cursor:"pointer"},nh="currentColor",ih="transparent",oh=e=>{let{refBt:t,isClose:n=!0,style:i,itemStyle:o,captionStyle:r,caption:s,fillOpen:a=nh,fillClose:l=ih,children:c,onToggle:d}=e;const p=(0,H.Bi)(),[u,h]=za(!n),g=m(d)?()=>{d(!u,s,h),h()}:h,y=Kr(g,[g]),[f,w,b,v]=u?["M 2,14 L 14,14 14,2 2,14",a,Qo,sr]:["M 2,2 L 14,8 2,14 2,2",l,tr,null];return fr("div",{style:{...Qu,...i},children:[fr("div",{ref:t,role:"button",className:"open-close select-none","aria-expanded":u,"aria-controls":p,tabIndex:"0",style:eh,onClick:g,onKeyDown:y,children:[fr(Cr,{w:"16",children:fr("path",{d:f,fill:w,strokeWidth:"1",stroke:a})}),fr("span",{style:{...th,...r},children:s})]}),fr("div",{id:p,className:v,style:b,children:c})]})},rh="row__topic",sh={margin:"0 16px",borderBottom:`1px solid ${Zo}`},ah=e=>{let{refBt:t,caption:n,items:i,onItem:o,onToggle:r}=e;return b(i)?fr(oh,{refBt:t,caption:n,onToggle:r,children:i.map((e=>b(e)?fr(Wr,{className:rh,caption:e[0],onClick:e[1],style:e[2]},e[0]):fr("div",{style:sh},e)))}):fr(Wr,{className:rh,caption:n,onClick:o},n)},lh=(0,H.ph)((e=>{let{menuModel:t,getFocusRef:n,onToggle:i}=e;return n?t.map(((e,t)=>fr(ah,{refBt:n(t),caption:e.t,items:e.items,onItem:e.onItem,onToggle:i},e.t))):null})),ch=e=>{const t=Xu();return fr(lh,{...e,onToggle:t})},dh=e=>{let{menuModel:t,refFocusItem:n,className:i,isShow:o,onClose:r}=e;const s=Zu(o&&ke,n),a=(0,H.li)(),l=fa(t,s,a)[0];return fr(al,{isShow:o,className:i,onClose:r,children:fr(Sa,{refFirst:s,refLast:a,children:fr(ch,{menuModel:t,getFocusRef:l})})})},ph=(e,t)=>n=>{let{title:i,tabIndex:o="-1",...r}=n;return fr(Sp,{className:"link",tabIndex:o,...r,href:e,children:i||t})},uh=ph("https://cryptocompare.com",tt),hh=ph("https://coinstats.app",nt),mh=ph("https://messari.io",it),gh=ph("https://newsapi.org",ct),yh=ph("https://thenewsapi.com",dt),fh=ph("https://webz.io",pt),wh=ph("https://www.reddit.com",ut),bh=ph("https://dev.to",ht),vh=ph("https://stackoverflow.com",mt),Sh=ph("https://iexcloud.io",ot),Ch=ph("https://financialmodelingprep.com",rt),Ih=ph("https://www.alphavantage.co",at),_h=[["All",""],["Blockchain","blockchain"],["Earnings","earnings"],["IPO","ipo"],["Mergers & Acquisitions","mergers_and_acquisitions"],["Financial Markets","financial_markets"],["Economy - Fiscal Policy","economy_fiscal"],["Economy - Monetary Policy","economy_monetary"],["Economy - Macro/Overall","economy_macro"],["Energy & Transportation","energy_transportation"],["Finance","finance"],["Life Sciences","life_sciences"],["Manufacturing","manufacturing"],["Real Estate & Construction","real_estate"],["Retail & Wholesale","retail_wholesale"],["Technology","technology"]],Nh=[["Latest","LATEST"],["Earliest","EARLIEST"],["Relevance","RELEVANCE"]],kh=[["Limit 50","50"],["Limit 100","100"],["Limit 200","200"]],xh=cd((()=>[nd("tickers",{caption:"Stock Symbol",dfValue:"AMD",inputProps:Hc(16),is:!0}),od("topics",_h),od("sortBy",Nh),od("limit",kh)])),Th=[["Latest","latest"],["Handpicked","handpicked"],["Trending","trending"],["Bullish","bullish"],["Bearish","bearish"]],Ah=cd((()=>[od("filter",Th,{caption:"News filter"})])),Eh=[["All","ALL_NEWS_FEEDS"],["Decrypt","decrypt"],["CoinDesk","coindesk"],["CoinTelegraph","cointelegraph"],["CryptoCompare","cryptocompare"]],$h=[["All","ALL_NEWS_CATEGORIES"],["Altcoin"],["Asia"],["Blockchain"],["Business"],["Commodity"],["Exchange"],["Fiat"],["ICO"],["Market"],["Mining"],["Regulation"],["Trading"],["Technology"],["Sponsored"],["Wallet"]],Dh=[["Latest","latest"],["Popular","popular"]],Rh=cd((()=>[rd("category",$h,{is:!0}),od("feed",Eh),od("sortOrder",Dh,{caption:"SortBy"})])),Bh=["algorithms","analytics","ai","generativeai","ethics","openai","chartgpt","bardgpt","llama","machinelearning","clustering","nlp","dataengineering","datascience","deeplearning","aws","architecture","api","css","tailwindcss","html","devops","docker","github","githubcopilot","javascript","typescript","angular","vue","react","nextjs","node","deno","python","backend","sql","nosql","database","mongodb","couchdbase","postgres","oracle","graphql","warehousing","showdev","webdev","womenintech","development","coding","programming","computerscience","softwareengineering","productivity","automation","testing","opensource","career","ui","cuda","nvidia","cybersecurity","security","privacy","hardware","unity3d","gamedev","linux","discuss","news","free"],Ph=["10","20","30","40","50"],Lh=["7","14","21","30","60","90","180","360"],Kh=cd((()=>[rd("tag",Bh,{is:!0,isNotFirstUpperCase:!0}),od("perPage",Ph,{caption:"Per Page",dfIndex:2}),od("inRecentDays",Lh,{caption:"In Recent Days"})])),Wh=cd((()=>[nd("symbol",{caption:"Stock Symbol",dfValue:"AMD",inputProps:Hc()})])),Mh=[["10 News","10"],["20 News","20"],["30 News","30"],["40 News","40"],["50 News","50"]],Oh=Mh[1],Fh=cd((()=>[nd("symbol",{caption:"Stock Symbol",dfValue:"AMD",inputProps:Hc(),is:!0}),od("recent",Mh,{dfOption:Oh})])),zh=[["All","all"]],Uh=cd((()=>[od("assetKey",zh,{caption:"News about"})])),Hh=[["Relevancy","relevancy"],["Popularity","popularity"],["PublishedAt","publishedAt"]],Gh="Weather",jh=cd((()=>[nd("symbol",{caption:ed("Term",Gh),dfValue:Gh,is:!0}),od("sortBy",Hh)])),Vh=["business","entertainment","general","health","science","sports","technology"],Jh=[["Argentina","ar"],["Australia","au"],["Austria","at"],["Belguim","be"],["Brazil","br"],["Bulgaria","bg"],["Canada","ca"],["China","cn"],["Colombia","co"],["Cuba","cu"],["Czechia","cz"],["Egypt","eg"],["France","fr"],["Germany","de"],["Greece","gr"],["Hong Kong","hk"],["Hungary","hu"],["India","in"],["Indonesia","id"],["Ireland","ie"],["Israel","il"],["Italy","it"],["Japan","jp"],["Latvia","lv"],["Lithuania","lt"],["Malaysia","my"],["Mexico","mx"],["Morocco","ma"],["Netherlands","nl"],["New Zealand","nz"],["Nigeria","ng"],["Norway","no"],["Phillipines","ph"],["Poland","pl"],["Portugal","pt"],["Romania","ro"],["Russian Federation","ru"],["Saudi Arabia","sa"],["Serbia","rs"],["Singapore","sg"],["Slovakia","sk"],["Slovenia","si"],["South Africa","za"],["South Korea","kr"],["Sweden","se"],["Switzerland","ch"],["Taiwan","tw"],["Thailand","th"],["Türkiye","tr"],["Ukraine","ua"],["United Arab Emirates","ae"],["United Kingdom","gb"],["United States","us"],["Venezuela","ve"]],qh=Jh[52],Yh=cd((()=>[rd("country",Jh,{dfOption:qh,is:!0}),rd("category",Vh)])),Zh=["Amd","intel","architecture","algorithms","AskAcademia","AskEconomics","AskReddit","askscience","artificial","AItoolsCatalog","aidevtools","ChatGPT","ChatGPTPro","ChatGPTCoding","OpenAI","LocalLLaMA","MachineLearning","learnmachinelearning","machinelearningnews","singularity","hardware","laptops","eGPU","gadgets","raspberry_pi","networking","sysadmin","books","FreeEBOOKS","bicycling","classicalmusic","CryptoCurrency","CryptoMarkets","CryptoTechnology","cardano","Autos","cars","Database","SQL","NoSQL","dataengineering","datascience","dataisbeautiful","Infographics","datasets","deeplearning","economy","Economics","sustainability","environment","Daytrading","options","GAMETHEORY","explainlikeimfive","europe","Finance","sustainableFinance","FinancialIndependence","FluentInFinance","html5","javascript","typescript","reactjs","nextjs","node","Deno","webdev","web_design","browsers","privacy","java","Kotlin","rust","elixir","Python","programming","opensource","SaaS","nocode","SideProject","selfhosted","webhosting","Cloud","cloudcomputing","aws","AZURE","devops","docker","virtualization","LifeProTips","lifehacks","linux","windows","todayilearned","science","statistics","StockMarket","stocks","startup","startups","Entrepreneur","business","BusinessIntelligence","smallbusiness","advertising","marketing","digital_marketing","socialmedia","analytics","PPC","SEO","bigseo","juststart","travel","visualization","technology","homeautomation","homeowners","RealEstate","InteriorDesign","philosophy","minimalism","energy","Renewable","RenewableEnergy","electricvehicles","teslamotors","Physics","solar","solarDIY","batteries","soccer","football","WomensSoccer","investing","UpliftingNews","news","worldnews"],Xh=["hour","day","week","month","year","all"],Qh=["10","20","30"],em=cd((()=>[rd("subreddit",Zh,{is:!0,isInput:!0,isNotFirstUpperCase:!0}),od("t",Xh,{caption:"Period",dfIndex:1,isNotFirstUpperCase:!0}),od("limit",Qh)])),tm=Xh[3],nm=Qh[0],im=[["relevance"],["hot"],["top"],["new"],["comments"]],om=im[2],rm=cd((()=>[rd("subreddit",Zh,{is:!0}),nd("q",{caption:ed("Query",""),dfValue:"",is:!0}),od("t",Xh,{caption:"Period",dfOption:tm}),od("limit",Qh,{dfOption:nm}),od("sort",im,{caption:"Sort By",dfOption:om})])),sm=[["Activity, Recent Day","activity"],["Creation Date","creation"],["Score","votes"],["Relevance","relevance"]],am=sm[2],lm="flexbox",cm=cd((()=>[nd("tagged",{caption:ed("Tagged","CSS"),dfValue:"CSS",is:!0}),nd("inTitle",{caption:ed("In Title",lm),dfValue:lm,is:!0}),od("sortBy",sm,{dfOption:am}),ld("_ft")])),dm=[["Activity, Recent Day","activity"],["Creation Date","creation"],["Score","votes"],["Hot Tab","hot"],["Hot Week Tab","week"],["Hot Month Tab","month"]],pm=dm[4],um=cd((()=>[nd("tag",{caption:ed("Tag","CSS"),dfValue:"CSS",is:!0}),od("sortBy",dm,{dfOption:pm,is:!0}),ld("_ft")])),hm=["all","general","science","sports","business","health","tech","politics","food","travel"],mm=[["PublishedAt"," published_at"],["Relevancy","relevance_score"]],gm="Weather",ym=cd((()=>[nd("search",{caption:ed("Term",gm),dfValue:gm,is:!0}),rd("category",hm),od("sortBy",mm)])),fm=[["All","all"],["Argentina","ar"],["Armenia","am"],["Australia","au"],["Austria","at"],["Belarus","by"],["Belgium","be"],["Bolivia","bo"],["Brazil","br"],["Bulgaria","bg"],["Canada","ca"],["Chile","cl"],["China","cn"],["Colombia","co"],["Croatia","hr"],["Czechia","cz"],["Ecuador","ec"],["Egypt","eg"],["France","fr"],["Germany","de"],["Greece","gr"],["Honduras","hn"],["Hong Kong","hk"],["India","in"],["Indonesia","id"],["Iran","ir"],["Ireland","ie"],["Israel","il"],["Italy","it"],["Japan","jp"],["Korea","kr"],["Mexico","mx"],["Netherlands","nl"],["New Zealand","nz"],["Nicaragua","ni"],["Pakistan","pk"],["Panama","pa"],["Peru","pe"],["Poland","pl"],["Portugal","pt"],["Qatar","qa"],["Romania","ro"],["Russia","ru"],["Saudi Arabia","sa"],["South Africa","za"],["Spain","es"],["Switzerland","ch"],["Syria","sy"],["Taiwan","tw"],["Thailand","th"],["Türkiye","tr"],["Ukraine","ua"],["United Kingdom","gb"],["United States Of America","us"],["Uruguay","uy"],["Venezuela","ve"]],wm=[["All","all"],["Business Insider","businessinsider.com"],["CNBC","cnbc.com"],["CNET","cnet.com"],["The Verge","theverge.com"]],bm=cd((()=>[rd("locale",fm,{is:!0}),rd("category",hm),od("domain",wm)])),vm=[["Australia","AU"],["Austria","AT"],["Belarus","BY"],["Belguim","BE"],["Brazil","BR"],["Bulgaria","BG"],["Canada","CA"],["Chile","CL"],["China","CN"],["Colombia","CO"],["Croatia","HR"],["Czech Republic","CZ"],["Denmark","DK"],["Estonia","EE"],["Finland","FI"],["France","FR"],["Germany","DE"],["Greece","GR"],["Hong Kong","HK"],["Hungary","HU"],["India","IN"],["Indonesia","ID"],["Iran","IR"],["Ireland","IE"],["Israel","IL"],["Italy","IT"],["Japan","JP"],["Malaysia","MY"],["Mexico","MX"],["Nertherlands","NL"],["New Zealand","NZ"],["Nigeria","NG"],["Norway","NO"],["Philippines","PH"],["Poland","PL"],["Portugal","PT"],["Romania","RO"],["Russia","RU"],["Serbia","RS"],["Singapore","SG"],["Slovakia","SK"],["Slovenia","SI"],["South Africa","ZA"],["South Korea","KR"],["Spain","ES"],["Sweden","SE"],["Switzerland","CH"],["Taiwan","TW"],["Thailand","TH"],["Türkiye","TR"],["Ukraine","UA"],["United Kingdom","GB"],["United States","US"],["Vietnam","VN"]],Sm=[["Business","business"],["Politics","politics"],["Entertainment","entertainment"],["Health","health"],["Travel","travel"],["Financial","financial_news"],["Sports","sports"],["Technology","tech"],["Real Estate","real_estate"],["Education","education"],["Fashion","fashion"],["Science","science"],["Architects","architects"]],Cm=[["All",""],["English","english"]],Im=cd((()=>[rd("country",vm,{is:!0}),rd("topic",Sm),od("lang",Cm,{caption:"Language"})])),_m=["news","blogs"],Nm=e=>{const t=parseInt(e,10);return!Number.isNaN(t)&&t>0&&t<31||""===e},km=cd((()=>[nd("inTitle",{caption:"In Title (Default: Weather)",dfValue:"Weather",is:!0}),od("siteType",_m,{caption:"Site Type"}),nd("beforeDays",{caption:"Before Days, Max 30",dfValue:2,inputProps:{maxLength:2,errorMsg:"0({...o,dialogType:"DialogType2",getConfig:e,CompLink:t,paneCaption:n,paneId:i}),Tm={WEBZ:{type:"W_WEBZ_QUERY",...xm(km,fh,`${pt}: News, Blogs`,"webz",{caption:"News, Blogs",loadId:"W"})},WEBZ_COUNTRY:{type:"W_WEBZ_COUNTRY",...xm(Im,fh,`${pt}: By Country`,"webz_country",{caption:"By Country, Topic",loadId:"W"})},REDDIT:{type:"REDDIT",...xm(em,wh,`${ut}: Top By`,"rd_topby",{loadId:"RD"})},REDDIT_SEARCH:{type:"REDDIT_SEARCH",...xm(rm,wh,`${ut}: Search`,"rd_searchby",{loadId:"RD"})},DEV_TO:{type:"DEV_TO",...xm(Kh,bh,`${ht}: Top By`,"dt_topby",{caption:"Top By",loadId:"DT"})},STACK_TAGGED:{type:"SO_TAGGED",...xm(um,vh,`${mt}: Tagged`,"stack_tagged",{caption:"Tagged Questions",loadId:"SO",paneType:"STACK_ITEM"})},STACK_SEARCH:{type:"SO_SEARCH",...xm(cm,vh,`${mt}: Search`,"stack_search",{caption:"Search Questions",loadId:"SO",paneType:"STACK_ITEM"})},CRYPTO_COMPARE:{type:"CRYPTO_COMPARE",...xm(Rh,uh,tt,"cryptocompare_news",{loadId:"CCN"})},COIN_STATS:{type:"COIN_STATS",...xm(Ah,hh,`${nt} News`,"coinstats_news",{loadId:"CS"})},MESSARI:{type:"MESSARI",...xm(Uh,mh,it,"messari_news",{loadId:"MS"})},IEX:{type:"IEX_NEWS",...xm(Fh,Sh,ot,"iex_news",{loadId:"IEX"})},FMP:{type:"FMP",...xm(Wh,Ch,st,"fmp_news")},AV:{type:"AV",...xm(xh,Ih,at,"av_sentiments")},NEWS_SEARCH:{type:"NEWS_SEARCH",...xm(jh,gh,`${lt}: Search`,"newsapi_search",{loadId:"NS",dialogProps:{source:"newsapi_search"}})},NEWS_TOP:{type:"NEWS_TOP",...xm(Yh,gh,`${lt}: Top By`,"newsapi_top",{loadId:"NT",dialogProps:{source:"newsapi_top"}})},THE_NEWS_SEARCH:{type:"THE_NEWS_SEARCH",...xm(ym,yh,`${dt}: Search`,"thenewsapi_search",{caption:"Search",loadId:"TNS"})},THE_NEWS_TOP:{type:"THE_NEWS_TOP",...xm(bm,yh,`${dt}: Top By`,"thenewsapi_top",{caption:"Top By",loadId:"TNT"})}},Am={paddingTop:2},Em=(e,t)=>n=>{Eu(t),e(n)};let $m;const Dm=(e,t,n,i)=>{if(!$m){const o=d(Em,i),r=e=>()=>{e(),i()};$m=[{t:"Blockchain",items:[[tt,o(Tm.CRYPTO_COMPARE),Am],[nt,o(Tm.COIN_STATS)],[it,o(Tm.MESSARI)]]},{t:"Stock Market",items:[[`${at}: Sentiment`,o(Tm.AV)],[ot,o(Tm.IEX)],[st,o(Tm.FMP)]]},{t:"General News",items:[[`${ct}: Browser`,r(t)],[`${ct}: Search`,o(Tm.NEWS_SEARCH)],[`${ct}: Top By`,o(Tm.NEWS_TOP)],"1",[`${dt}: Search`,o(Tm.THE_NEWS_SEARCH)],[`${dt}: Top By`,o(Tm.THE_NEWS_TOP)],"2",[`${pt}: News, Blogs`,o(Tm.WEBZ)],[`${pt}: By Country, Topic`,o(Tm.WEBZ_COUNTRY)]]},{t:"Miscellaneous",items:[[ht,o(Tm.DEV_TO)],"1",[`${mt}: Tagged`,o(Tm.STACK_TAGGED)],[`${mt}: Search`,o(Tm.STACK_SEARCH)],"2",[`${ut}: Top By`,o(Tm.REDDIT)],[`${ut}: Search`,o(Tm.REDDIT_SEARCH)]]},Ne?void 0:{t:`About ${e}`,onItem:r(n)}].filter(Boolean)}return $m},Rm=(e,t)=>e.isShow===t.isShow,Bm=e=>(0,H.ph)(e,Rm),Pm=()=>!0,Lm=(e,t)=>{const n=_e?"":String(e+1);return{ariaLabel:t,dataPos:"l",hotKey:n||void 0,caption:n+(t||"DIA").slice(0,3)}},Km=(e,t)=>(0,gr.n)(Qr,{...Lm(t,Yc(e)),key:e.type,timeout:0,className:"bt-hot",onClick:d(Eu,e)}),Wm=(e=>(0,H.ph)(e,Pm))((()=>{const e=Au();return b(e)?fr("div",{style:er,children:[fr(Fr,{items:e,crItem:Km}),0!==e.length&&fr(Qr,{ariaLabel:"Clean Hot Bar",dataPos:"l",hotKey:_e?void 0:"C",timeout:0,caption:"CL",onClick:Du},"BT_CLEAN")]}):null})),Mm="header",Om=dr(Mm),Fm=ur(dr(`${Mm}__panel-browser`)),zm=`${Mm}__icon-app`,Um=`${Mm}__label-app`,Hm=`${Mm}__browser-bts`,Gm=`${Mm}__bts`,jm=`${Mm}__bt-about`,Vm={position:"relative",top:-1,verticalAlign:"middle",margin:"0 8px"},Jm=e=>{let{onNewsSources:t,onSettings:n,onAbout:i}=e;const o=(0,H.li)(),[r,s]=za(),a=(0,H.hb)((e=>{const t=e&&e.target;ie(o,t&&"menuitem"===t.role?t:null),s(!1)}),[]),l=Dm(Ku,t,i,a);return Gr("Q",s),fr("div",{className:Om,children:[fr(dh,{isShow:r,menuModel:l,refFocusItem:o,className:Fm,onClose:a}),fr(Ju,{}),fr(qu,{ariaLabel:Ku,dataPos:"l",className:zm}),fr(Yu,{className:Um,caption:Ku}),fr("span",{className:Hm,children:fr(Pl.ModalButton,{ariaLabel:"Query Sources Menu",dataPos:Ir,caption:"Query",hotKey:"Q",onClick:s,children:fr("span",{className:"arrow-down"})})}),fr(Wm,{}),fr("div",{className:Gm,children:[fr(Pl.FlatButton,{ariaLabel:"About News Aggregator",dataPos:Ir,className:jm,hotKey:"A",onClick:i,children:fr(Ou,{style:Vm})}),fr(Pl.FlatButton,{ariaLabel:"Settings Dialog",dataPos:Ir,hotKey:"S",onClick:n,children:fr(Fu,{style:Vm})})]})]})},qm=e=>{const[t,n,i]=us(e);return[t,n,i,Zs(i)]},Ym={position:"relative",display:"block",width:32,height:32,margin:"0 auto",marginTop:32,textAlign:"middle"},Zm=(e,t,n,i)=>{const[o,r]=(0,H.J0)();return(0,H.vJ)((()=>{e&&1!==o&&2!==o&&(r(1),fetch(t).then((e=>{const{status:n}=e;if(n>=200&&n<400)return e.json();throw{status:n,url:t}})).then((e=>{r(2),n(e)})).catch((e=>{r(3),i(e)})))}),[e]),1===o?fr(Pr,{style:Ym}):3===o?fr(Pr,{style:Ym,isFailed:!0}):null},Xm=e=>{let{caption:t,isInitClose:n,items:i,hmItems:o,onClick:r,...s}=e;return fr(oh,{caption:t,isClose:n,children:oe(i,((e,t)=>{const n={...(o||{})[e.id],...s};return fr(Wr,{className:Yo,caption:n.menuTitle,onClick:d(r,n)},t)}))})},{Browser:Qm,BrowserCaption:eg,ModalSlider:tg,ScrollPane:ng,ItemStack:ig}=Pl,og=hr("items__menu-more"),rg={paddingRight:0},sg={textAlign:"left"},ag={height:"92%",paddingRight:10,overflowY:"auto"},lg=()=>{},cg=(e,t,n)=>(0,gr.n)(Xm,{...e,...n,key:t}),dg=e=>{let{caption:t,menuMore:n,browserId:i,useMsBrowser:o,url:r,onError:s=lg,children:a,onClick:l}=e;const[c,d,p,u]=qm(Ne),[h,m,g]=us(!1),[y,f]=(0,H.J0)(),w=Zm(c,r,f,s);o((e=>{e&&e.id===i&&d()}));const{menu:b,items:v}=y||{},S=n?m:void 0,C={paddingLeft:n?30:10};return fr(Qm,{isShow:c,style:rg,onKeyDown:u,children:[n&&fr(tg,{isShow:h,className:og,model:n,onClose:g}),fr(eg,{style:{...sg,...C},caption:t,onMore:S,onClose:p}),w,fr(ng,{style:ag,children:[fr(ig,{items:b,crItem:cg,browserId:i,hmItems:v,onClick:l}),a]})]})},pg=(e=>t=>{let{style:n}=t;return fr(Fc,{style:n,children:fr(e,{})})})(gh),ug=e=>{let{browserId:t,useMsBrowser:n,onClick:i,onError:o,onRemoveBadges:r}=e;return fr(dg,{caption:"NewsApi.org Browser",url:"data/news-source-menu.json",browserId:t,useMsBrowser:n,onClick:i,onError:o,children:fr(pg,{})})},hg={zIndex:1030,position:"absolute",top:70,left:10},mg=(e,t)=>{for(let n=0;n{let{maxDialog:t=3,useMsDialog:n,closeDialog:i}=e;const[o,r]=(0,H.J0)({hmIs:{},compDialogs:[],visibleDialogs:[]}),{hmIs:s,compDialogs:a}=o;return n((e=>{const n=e||{};n&&r((e=>{const{key:i,Comp:o}=n;return o&&!y(mg(e.compDialogs,i))?e:(((e,t,n)=>{const{hmIs:i,visibleDialogs:o}=e,r=o.indexOf(t);-1!==r&&o.splice(r,1),o.push(t),i[t]=!0,o.length>n&&(i[o[0]]=!1,o.splice(0,1))})(e,i,t),o?e.compDialogs.push(o):e.compDialogs=((e,t)=>{const n=mg(e,t)||0;return[...e.slice(0,n),...e.slice(n+1),e[n]]})(e.compDialogs,i),{...e})}))})),fr("div",{style:hg,children:a.map((e=>{const t=e.key;return(0,H.Ob)(e,{key:t,isShow:s[t],onClose:()=>{(e=>{r((t=>{const{hmIs:n,visibleDialogs:i}=t;return n[e]=!1,t.visibleDialogs=i.filter((t=>t!==e)),{...t}}))})(t),i(e.props.itemConf)}})}))})},yg=e=>{let{useMsBrowser:t,useMsDialog:n,closeDialog:i}=e;return fr("div",{className:"hrz-container",children:[fr(ug,{browserId:et.NEWS,useMsBrowser:t,onClick:Eu,onError:xu}),fr(gg,{maxDialog:3,useMsDialog:n,closeDialog:i})]})},fg={marginTop:3},wg={display:"inline-block",color:"#80c040",width:26,height:26,lineHeight:"24px",textAlign:"center",textTransform:"uppercase",border:"2px solid #80c040",borderRadius:"50%",fontSize:"1.125rem"},bg=e=>{let{step:t,description:n}=e;return fr("p",{style:fg,children:[fr("span",{style:wg,children:t}),fr("span",{style:Xo,children:[" ",n]})]})},vg=e=>{let{id:t,style:n}=e;return fr("use",{style:n,href:`./sprite.svg#${t}Logo`})},Sg=e=>{let{ariaLabel:t,dataPos:n,className:i,href:o}=e;const[r,s]=Sr(t,n);return fr("a",{"aria-label":r,"data-pos":s,className:i,href:o,children:fr("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",children:fr(vg,{id:"GitHub"})})})},Cg={transform:"translate(-210px, -210px) scale(0.9)"},Ig=e=>{let{ariaLabel:t,dataPos:n,className:i}=e;const[o,r]=Sr(t,n);return fr("a",{"aria-label":o,"data-pos":r,className:i,href:"https://preactjs.com",children:fr("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"-256 -256 512 512",children:fr(vg,{id:"Preact",style:Cg})})})},_g={position:"relative",textAlign:"center",paddingTop:20},Ng=()=>fr("div",{style:_g,children:[fr(Sg,{ariaLabel:"GitHub: Repository News Aggregator",dataPos:"gh",className:"logo__github",href:"https://github.com/zhnzhn/news-aggregator"}),fr(Ig,{ariaLabel:"Official Preact site",dataPos:Ir,className:"logo__preact"})]}),kg=pr("about-pane"),xg={paddingLeft:12,textAlign:"left"},Tg={height:"92%",paddingTop:8,paddingRight:10,overflowY:"auto"},Ag={...Xo,paddingLeft:12,paddingRight:5,lineHeight:1.4,fontWeight:"bold"},Eg={lineHeight:1.4},$g={lineHeight:1.8},Dg={color:"#80c040"},Rg={marginTop:8},Bg=(e,t)=>Ne?`${e} [${t}]`:e,{ItemStack:Pg}=Pl,Lg=[[uh],[hh],[mh],[Sh],[Ch,{title:st}],[Ih],[gh],[yh],[bh],[vh],[fh],[wh]],Kg=(e,t)=>{let[n,i]=e;return fr("div",{children:fr(n,{...i,tabIndex:"0"})},t)},Wg=[`Please, click button ${Bg("QUERY","q")} in header.`,"Choose headlines source.",`Click button ${Bg("LOAD","l")} in dialog.`],Mg=`API Keys can be set in the ${Bg("Settings Dialog","s")}`,Og=(e,t)=>fr(bg,{step:t+1,description:e},t),Fg=e=>{let{isInitShow:t,useMsAbout:n}=e;const[i,o,r,s]=qm(t);n((e=>{if(e){(e.is?o:r)()}}));const[a,l]=lr(i,kg);return fr("div",{className:a,style:l,role:"presentation",onKeyDown:s,children:[fr(Pl.BrowserCaption,{style:xg,caption:"About News Aggregator",onClose:r}),fr(Pl.ScrollPane,{style:Tg,children:fr("div",{style:Ag,children:[fr("div",{style:Eg,children:[fr("p",{children:[fr("span",{style:Dg,children:"News Agreggator"})," is a web app for browsing news, blogs, social media headlines."]}),fr("p",{style:Rg,children:"Available headlines providers: "})]}),fr("div",{style:$g,children:fr(Pg,{items:Lg,crItem:Kg})}),fr("div",{style:Eg,children:[fr("p",{style:Rg,children:"Personal API Keys from some providers are required."}),fr("p",{children:Mg})]}),fr("p",{style:Rg,children:fr("span",{style:Xo,children:"Browsing by source:"})}),fr(Pg,{items:Wg,crItem:Og}),fr(Ng,{}),fr("p",{children:fr("span",{style:Xo,children:"*Logos Fair Use."})})]})})]})},zg=(e,t)=>{const{key:n}=t;let i=0;for(;i{let{useMsPane:t}=e;const[n,i]=(0,H.J0)([]);return t((e=>{const{Comp:t}=e||{};t&&i((e=>zg(e,t)?e:[t,...e]))})),fr("div",{className:"hrz-container",children:n})},Hg=e=>{let{isShow:t,CL:n,S:i,initialWasClosed:o=!0,timeout:r=450}=e;const[s,a]=We(),l=(0,H.li)(o),c=(0,H.li)(t);(0,H.vJ)((()=>{c.current&&!t&&setTimeout((()=>{l.current=!0,a()}),r),c.current=t,l.current=!1}),[t,s]);const[d,p]=l.current?[n.INIT,i.INIT]:t?[n.SHOWING,i.SHOWING]:[n.HIDING,i.HIDING];return{className:d,style:p}},Gg="modal-root",jg={INIT:Gg,SHOWING:`${Gg} show-modal`,HIDING:`${Gg} hide-modal`},Vg={INIT:{display:"none"},SHOWING:{display:"block"},HIDING:{backgroundColor:"rgba(0,0,0, 0)"}},Jg=e=>{let{isShow:t,timeout:n,children:i,onClose:o}=e;return fr("div",{...Hg({isShow:t,CL:jg,S:Vg,timeout:n}),onClick:o,children:i})},qg=(e,t,n)=>{let{Comp:i,type:o}=e,{currentDialog:r,data:s,onClose:a}=n;return fr(i,{isShow:r===o,data:s[o],onClose:a},o)},Yg=e=>{let{router:t,showAction:n,useMsModalDialog:i}=e;const[o,r]=(0,H.J0)({isShow:!1,currentDialog:null,data:{},dialogs:[]}),{isShow:s,data:a,dialogs:l,currentDialog:c}=o,d=(0,H.hb)((()=>r((e=>({...e,isShow:!1,currentDialog:null})))),[]);return i((e=>{const{option:n}=e||{};if(n){const e=(e=>(e||{}).modalDialogType)(n);h(e)&&r((i=>(i.data[e]||i.dialogs.push({type:e,Comp:t[e]}),i.data[e]=n,{...i,isShow:!0,currentDialog:e})))}})),fr(Jg,{isShow:s,onClose:d,children:fr(Fr,{items:l,crItem:qg,currentDialog:c,data:a,onClose:d})})},Zg=e=>ir("tab",[e,"active"]),Xg=(e,t)=>`tab-${e}-${t}`,Qg=(e,t)=>`tabpanel-${e}-${t}`,ey=(e,t,n)=>{let{id:i,selectedTabIndex:o,hClick:r,hKeyDown:s}=n;return(0,H.Ob)(e,{key:t,id:i,index:t,isSelected:t===o,onClick:d(r,t,e),onKeyDown:d(s,t,e)})},ty=e=>{let{ariaLabel:t,id:n,style:i,selectedTabIndex:o,setTabIndex:r,children:s}=e;const a=(0,H.hb)(((e,t)=>{r(e),m(t.props.onClick)&&t.props.onClick()}),[]),l=s.length,c=(0,H.hb)(((e,t,i)=>{const o=e=>{const i=((e,t)=>-1===e?t-1:e===t?0:e)(e,l);(e=>{re(document.getElementById(e))})(Xg(n,i)),a(i,t)},{keyCode:r}=i,s=39===r?1:37===r?-1:0;s&&(pe(i),o(e+s))}),[l]);return fr("div",{role:"tablist","aria-label":t,"aria-orientation":"horizontal",className:"tabs",style:i,children:fr(Fr,{items:s,crItem:ey,id:n,selectedTabIndex:o,hClick:a,hKeyDown:c})})},ny=(e,t,n)=>{let{id:i,isShow:o,selectedTabIndex:r}=n;const s=t===r;return fr("div",{style:rr(s),role:"tabpanel",id:Qg(i,t),"aria-labelledby":Xg(i,t),children:(0,H.Ob)(e.props.children,{isShow:o,isSelected:s,isVisible:o&&s})},t)},iy=e=>{let{id:t,style:n,isShow:i,selectedTabIndex:o,children:r}=e;return fr("div",{className:"panes",children:fr(Fr,{items:r,crItem:ny,id:t,isShow:i,selectedTabIndex:o})})},oy=e=>{let{ariaLabel:t,id:n,isShow:i,width:o,height:r,tabsStyle:s,children:a}=e;const[l,c]=(0,H.J0)(0);return fr("div",{style:{width:o,height:r},children:[fr(ty,{ariaLabel:t,id:n,style:s,selectedTabIndex:l,setTabIndex:c,children:a}),fr(iy,{id:n,isShow:i,selectedTabIndex:l,children:a})]})},ry=e=>{let{isSelected:t,id:n,index:i,title:o,onClick:r,onKeyDown:s}=e;return fr("button",{type:"button",role:"tab",className:Zg(t),id:Xg(n,i),tabIndex:t?"0":"-1","aria-selected":t,"aria-controls":Qg(n,i),onClick:r,onKeyDown:s,children:fr("span",{className:"tab_t",children:o})})},sy=(e,t,n)=>e&&t&&m(e[t])?e[t]:()=>n,ay={lineHeight:2.2},ly=e=>e.current.getValue(),cy=(e,t)=>{const n=-1===e.toUpperCase().indexOf("API")?"API Key":"Key";return`${e} ${n} (${t})`},dy=(e,t)=>{return{caption:cy(e,t),maxLength:t,onTest:(n=t,e=>e.length===n||""===e)};var n},py=e=>{const t=(0,H.li)(),n=(0,H.li)(),i=(0,H.li)(),o=(0,H.li)(),r=(0,H.li)(),s=(0,H.li)(),{isVisible:a,setRefLast:l,style:c,fieldStyle:d,buttonsStyle:p,btStyle:u,data:h}=e,{setAv:m,setIex:g,setFmp:y,setNews:f,setTheNews:w,setWebz:b}=(e=>({setAv:sy(e,"setAvKey"),setIex:sy(e,"setIexKey"),setFmp:sy(e,"setFmpKey"),setNews:sy(e,"setNewsKey"),setTheNews:sy(e,"setTheNewsKey"),setWebz:sy(e,"setWebzKey")}))(h),v=(0,H.hb)((()=>{m(""),g(""),y(""),f(""),w(""),b(""),[t,n,i,o,r,s].forEach((e=>e.current.clear()))}),[]),S=(0,H.hb)((()=>{g(ly(n)),y(ly(i)),m(ly(t)),f(ly(o)),w(ly(r)),b(ly(s)),[n,i,o,s].forEach((e=>e.current.setWasEnter()))}),[]);return a?fr(Br,{style:c,children:[fr(oh,{style:ay,caption:"Market News & Sentiment",children:fr(Gs,{...dy(at,16),refEl:t,style:d,name:"alpha-vantage",onEnter:m})}),fr(oh,{style:ay,caption:"Stock Market",children:[fr(Gs,{...dy(ot,35),refEl:n,style:d,name:"iex-cloud",onEnter:g}),fr(Gs,{...dy(rt,32),refEl:i,style:d,name:"fmp-api",onEnter:y})]}),fr(oh,{style:ay,caption:"General News",children:[fr(Gs,{...dy(ct,32),refEl:o,style:d,name:"newsapi.org",onEnter:f}),fr(Gs,{...dy(dt,40),refEl:r,style:d,name:"thenewsapi",onEnter:w}),fr(Gs,{...dy(pt,36),refEl:s,style:d,name:"webz.io",onEnter:b})]}),fr("div",{style:p,children:[fr(as,{caption:"Clear All",onClick:v}),fr(as,{isPrimary:!0,refBt:a?l:void 0,style:u,caption:"Set All",onClick:S})]})]}):null},uy=(e,t,n)=>v(n)&&n>=e&&n<=t,hy=(e,t,n)=>{e.DF=e.find((e=>e[1]===t))||e[n]},my=[[4,16],[4,18]],gy=((e,t)=>new Array(e).fill("").map(((e,n)=>{return[`${i=t+n}px`,i];var i})))(...Ne?my[0]:my[1]),yy=Ne?gy[2][1]:gy[3][1];let fy=yy;const wy=document.documentElement,by=e=>{const t=(e||[])[1];uy(16,21,t)&&(fy=t,wy.style.fontSize=`${t}px`,ac(cc,t))},vy={DF:"GREY",GREY:"GREY",WHITE:"WHITE",SAND:"SAND"},Sy=[["Grey","GREY"],["White","WHITE"],["Sand","SAND"]],Cy=(e,t)=>`rgba(${e}, ${e}, ${e}, ${t})`,Iy="#3a6799",_y="#a9a9a9",Ny={BG_BODY:"#5f5f5f",BG:"#4d4d4d",BT_H:Cy(255,.1),BT_FC:"#6ca1dc",BT_RC:_y,BG_OPTIONS:"#404040",MSI_C:"#f8f8ff",MSI_FH:Cy(255,.1),SBT_BG:Iy,BG_HEADER:Iy,C_HEADER:_y,ART_H:"#404040",ART_D:"#4d4d4d"},ky="#0096c8",xy={BT_H:Cy(48,.3),MSI_C:"#303030",MSI_FH:Cy(255,.4),SBT_BG:"#0096c8",BG_HEADER:ky,BT_FC:ky,C_HEADER:"#4d4d4d"},Ty="#eaeaea",Ay={...xy,BG_BODY:"darkgrey",BG:Ty,BG_OPTIONS:"#dfe4e7",BT_RC:Ty,ART_H:"#dfe4e7",ART_D:"#eaeaea"},Ey="#e8e0cb",$y={...xy,BG_BODY:"darkgrey",BG:Ey,BG_OPTIONS:"#c6bda5",BT_RC:Ey,ART_H:"#c6bda5",ART_D:"#e8e0cb"},Dy={[vy.GREY]:Ny,[vy.WHITE]:Ay,[vy.SAND]:$y},Ry=e=>{(e=>{const t=document.body.style;t.backgroundColor=e.BG_BODY,t.setProperty("--bg-c",e.BG),t.setProperty("--bt-h",e.BT_H),t.setProperty("--bt-fc",e.BT_FC),t.setProperty("--bt-rc",e.BT_RC),t.setProperty("--h-c",e.C_HEADER),t.setProperty("--h-bg",e.BG_HEADER),t.setProperty("--mso-bg",e.BG_OPTIONS),t.setProperty("--msi-c",e.MSI_C),t.setProperty("--msi-fh",e.MSI_FH),t.setProperty("--sbt-bg",e.SBT_BG),t.setProperty("--art-h",e.ART_H),t.setProperty("--art-d",e.ART_D)})(Dy[e]),ac(lc,e)},By={themeName:vy.DF,_init(){var e;this.setThemeName((()=>{const[e]=sc(lc),t=e&&vy[e]?e:vy.DF;return hy(Sy,t,0),t})()),(()=>{const[e]=sc(cc);if(e){const t=parseInt(e,10);uy(16,21,t)&&(fy=t)}wy.style.fontSize=`${fy}px`,hy(gy,fy,1)})(),e=!!sc("IS")[0],oc=!!e},getThemeName(){return this.themeName},setThemeName(e){this.themeName=vy[e]||vy.DF,Ry(this.themeName)}};By._init();const Py=e=>{const t=(e||[])[1];By.getThemeName()!==t&&By.setThemeName(t)},Ly=()=>{oc=!0,ac("IS",!0),ac(lc,By.getThemeName()),ac(cc,fy),ac(dc,fc())},Ky=()=>{oc=!1;try{Zl.clear()}catch(e){console.log(e)}},Wy={margin:"12px 0 12px 16px"},My={height:22},Oy=oc,Fy=fc(),zy=e=>{let{style:t,selectStyle:n,buttonsStyle:i,btStyle:o,onClose:r,isVisible:s,setRefLast:a}=e;return fr("div",{style:t,children:[fr(Pl.InputSelect,{style:n,caption:"UI Theme",initItem:Sy.DF,options:Sy,onSelect:Py}),fr(Pl.InputSelect,{style:n,caption:"Font Size",initItem:gy.DF,options:gy,onSelect:by}),fr(wl,{style:Wy,initialValue:Oy,caption:"Allow use localStorage",onCheck:Ly,onUnCheck:Ky}),fr(wl,{style:Wy,initialValue:Fy,caption:"Advanced input options",onCheck:bc,onUnCheck:vc}),fr("div",{style:My}),fr("div",{style:i,children:fr(Pl.RaisedButton,{refBt:s?a:void 0,style:o,isPrimary:!0,caption:"Close",onClick:r})})]})},Uy="User Settings",Hy={position:"static",width:340,maxHeight:460,margin:"70px auto 0px"},Gy={margin:"26px 0 4px 0"},jy={marginLeft:24,textAlign:"left"},Vy={position:"relative",maxHeight:370},Jy={...Vy,overflowY:"auto"},qy={display:"flex",justifyContent:"flex-end",flexWrap:"wrap",margin:"10px 12px 10px 0"},Yy={...Ko,width:315,marginLeft:8},Zy=Wo(306),Xy=Bm((e=>{let{isShow:t,data:n,onClose:i}=e;const o=(0,H.li)(),r=(0,H.hb)((e=>{o.current=e}),[]);return fr(Pl.ModalDialog,{caption:Uy,style:Hy,divBtStyle:Gy,captionStyle:Do,refFocusLast:o,isShow:t,onClose:i,children:fr(oy,{ariaLabel:Uy,id:"sd",width:"100%",tabsStyle:jy,isShow:t,children:[fr(ry,{title:"API Keys",children:fr(py,{style:Jy,fieldStyle:Yy,buttonsStyle:qy,btStyle:Ro,data:n,setRefLast:r})}),fr(ry,{title:"UI Theme",children:fr(zy,{style:Vy,selectStyle:Zy,buttonsStyle:qy,btStyle:Ro,setRefLast:r,onClose:i})})]})})})),Qy={position:"static",width:350,height:220,margin:"70px auto 0px"},ef={...Xo,width:"100%",padding:"8px 12px",fontWeight:"bold",lineHeight:1.4,whiteSpace:"pre-line",wordBreak:"break-word"},tf=e=>{if(e instanceof TypeError)return e.message;const{status:t,url:n,msg:i}=e||{};return t?`${n}\ncode:${t}\nNetwork exception`:i||"Exception Message"},nf={s:Xy,a:Bm((e=>{let{isShow:t,data:n,onClose:i}=e;return fr(Bl,{isShow:t,isClosePrimary:!0,style:Qy,captionStyle:Do,caption:"Exception",onClose:i,children:fr("p",{style:ef,children:tf(n)})})}))},of=()=>($e(),fr("div",{children:[fr(Jm,{onNewsSources:Bu,onSettings:ku,onAbout:Iu}),fr("div",{className:"component-container",children:[fr(yg,{useMsBrowser:Ru,useMsDialog:Tu,closeDialog:$u}),fr(Fg,{isInitShow:!0,useMsAbout:Cu}),fr(Ug,{useMsPane:Pu})]}),fr(Yg,{router:nf,useMsModalDialog:_u})]}));(0,H.XX)(fr(of,{}),document.getElementById("app"))}},e=>{var t;t=926,e(e.s=t)}]); \ No newline at end of file diff --git a/index.html b/index.html index c45fa839..b2b7a406 100644 --- a/index.html +++ b/index.html @@ -41,7 +41,7 @@

News Aggregator

- +