@polymarket/embeds
Advanced tools
Comparing version 1.0.1 to 1.0.2
# @polymarket/embeds | ||
## 1.0.2 | ||
### Patch Changes | ||
- utm params, remove logging | ||
## 1.0.1 | ||
@@ -4,0 +10,0 @@ |
@@ -26,3 +26,3 @@ { | ||
"name": "k", | ||
"default": "class extends($t=O,vt=[V({type:String,attribute:\"theme\",reflect:!0})],_t=[V({type:String,attribute:\"width\"})],bt=[V({type:String,attribute:\"market\"})],yt=[V({type:Boolean,attribute:\"volume\",converter:(o,i)=>i===String?o===\"true\":i===Boolean?o:!1})],gt=[V({type:Boolean,attribute:\"chart\",converter:(o,i)=>i===String?o===\"true\":i===Boolean?o:!1})],mt=[ee()],ft=[ee()],dt=[ee()],pt=[ee()],$t){constructor(){super();P(this,we,$(g,8,this,\"light\")),$(g,11,this);P(this,ke,$(g,12,this,400)),$(g,15,this);P(this,Ce,$(g,16,this)),$(g,19,this);P(this,Ae,$(g,20,this,!1)),$(g,23,this);P(this,Se,$(g,24,this,!1)),$(g,27,this);P(this,Ee,$(g,28,this)),$(g,31,this);P(this,Me,$(g,32,this)),$(g,35,this);P(this,Pe,$(g,36,this)),$(g,39,this);P(this,Ne,$(g,40,this)),$(g,43,this);He();}static get styles(){return pe` :host { --polymarket-color-white: #ffffff; --polymarket-color-black: #000000; --polymarket-color-gray-1: #333333; --polymarket-color-gray-2: #4f4f4f; --polymarket-color-gray-3: #828282; --polymarket-color-gray-4: #bdbdbd; --polymarket-color-gray-5: #e0e0e0; --polymarket-color-gray-6: #f2f2f2; --polymarket-radii-sm: 4px; --polymarket-radii-md: 8px; --polymarket-radii-lg: 12px; --polymarket-radii-full: 50%; --polymarket-space-1: 4px; --polymarket-space-2: 8px; --polymarket-space-3: 12px; --polymarket-space-4: 16px; --polymarket-font-size-sm: 11px; --polymarket-font-size-md: 13px; --polymarket-font-size-lg: 15px; --polymarket-font-size-xl: 18px; --polymarket-line-height-sm: 13px; --polymarket-line-height-md: 17px; --polymarket-line-height-lg: 19px; --polymarket-line-height-xl: 21px; --polymarket-font-weight-normal: 400; --polymarket-font-weight-medium: 500; --polymarket-font-weight-semi: 600; --polymarket-font-weight-bold: 700; display: block; width: 100%; height: 100%; font-family: \"Open Sauce Sans\", sans-serif; font-style: normal; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } :host([theme=\"dark\"]) { --polymarket-color-white: #1d2b39; --polymarket-color-black: #ffffff; --polymarket-color-gray-1: #f2f2f2; --polymarket-color-gray-2: #858d92; --polymarket-color-gray-3: #858d92; --polymarket-color-gray-4: #425464; --polymarket-color-gray-5: #344452; --polymarket-color-gray-6: #2c3f4f; } :host * { box-sizing: border-box; } .container { display: flex; flex-direction: column; width: 100%; max-width: calc(100vw - 4px); height: fit-content; justify-content: center; align-items: center; padding: 2px; } .card-container { display: flex; flex-direction: column; width: 400px; max-width: calc(100vw - 8px); height: fit-content; padding: 20px; background-color: var(--polymarket-color-white); border-radius: var(--polymarket-radii-md); border: 1px solid var(--polymarket-color-gray-6); gap: 32px; } .top-row-container { display: flex; flex-direction: row; justify-content: space-between; align-items: center; height: 60px; width: 100%; gap: var(--polymarket-space-3); } .bottom-row-container { display: flex; flex-direction: row; justify-content: space-between; align-items: center; width: 100%; height: 32px; gap: var(--polymarket-space-3); } .top-row-left-container { display: flex; flex-direction: row; align-items: center; width: 100%; flex: 1; gap: var(--polymarket-space-3); img { width: 40px; height: 40px; object-fit: cover; border-radius: var(--polymarket-radii-sm); } a { flex: 1; text-decoration: none; color: var(--polymarket-color-black); font-size: var(--polymarket-font-size-lg); line-height: var(--polymarket-line-height-lg); font-weight: var(--polymarket-font-weight-semi); text-decoration: underline; text-decoration-color: transparent; text-decoration-thickness: 2px; transition: text-decoration-color 100ms ease; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; &:hover { text-decoration-color: var(--polymarket-color-black); } } } .top-row-right-container { position: relative; align-items: center; width: 75px; height: 60px; overflow: visible; } .bottom-row-left-container { align-items: center; height: 24px; width: 114px; } .bottom-row-right-container { display: flex; flex-direction: row; align-items: center; width: auto; gap: var(--polymarket-space-3); } .typography-primary { color: var(--polymarket-color-gray-3); font-size: var(--polymarket-font-size-md); line-height: var(--polymarket-line-height-md); font-weight: var(--polymarket-font-weight-medium); } .typography-secondary { color: var(--polymarket-color-gray-3); font-size: var(--polymarket-font-size-sm); line-height: var(--polymarket-line-height-sm); font-weight: var(--polymarket-font-weight-medium); } .typography-number { text-transform: uppercase; } .button-primary { display: flex; justify-content: center; align-items: center; padding: 0px var(--polymarket-space-3); height: 32px; background-color: var(--polymarket-color-gray-6); border-radius: var(--polymarket-radii-md); color: var(--polymarket-color-black); font-size: var(--polymarket-font-size-md); line-height: var(--polymarket-line-height-md); font-weight: var(--polymarket-font-weight-semi); cursor: pointer; border: none; transition: background-color 100ms ease-in-out; gap: var(--polymarket-space-1); text-decoration: none; &:hover { background-color: var(--polymarket-color-gray-5); } } .gauge-text-container { position: absolute; background-color: transparent; border-radius: 100% / 100% 100% 0 0; left: 50%; top: calc(50% + 2px); transform: translate(-50%, -50%); width: calc(120px * 0.85); height: calc(60px * 0.85); display: flex; align-items: center; justify-content: flex-end; z-index: 3; } .gauge-subtext-container { position: absolute; left: 0; bottom: 0; width: 120px; height: 60px; transform: scale(1.1); background-color: transparent; display: flex; align-items: center; justify-content: flex-start; padding-top: 6px; z-index: 4; } .gauge-text { position: absolute; background-color: transparent; border-radius: 100% / 100% 100% 0 0; left: 50%; top: calc(50% + 2px); transform: translate(-50%, -50%); z-index: 3; margin: 0; color: var(--polymarket-color-black); font-size: var(--polymarket-font-size-lg); line-height: var(--polymarket-line-height-lg); font-weight: var(--polymarket-font-weight-bold); } .gauge-subtext { position: absolute; left: 50%; top: calc(50% + 18px); transform: translate(-50%, -50%); background-color: transparent; z-index: 4; margin: 0; color: var(--polymarket-color-gray-3); font-size: var(--polymarket-font-size-sm); line-height: var(--polymarket-line-height-sm); font-weight: var(--polymarket-font-weight-medium); } .gauge { position: absolute; left: 50%; top: 50%; transform: translate(-50%, calc(-50% - 10px)) scaleX(1.1); } .gauge-track { position: absolute; top: 0; z-index: 1; stroke: var(--polymarket-color-gray-5); } :host([theme=\"dark\"]) { .gauge-track { stroke: var(--polymarket-color-gray-4); } } .gauge-fill { position: absolute; top: 0; z-index: 1; } .arrow-icon { transform: rotate(180deg); fill: var(--polymarket-color-black); path { fill: var(--polymarket-color-black); } } .polymarket-logo { path { fill: var(--polymarket-color-gray-4); } } :host([theme=\"dark\"]) { .polymarket-logo { path { fill: var(--polymarket-color-gray-3); } } } `}connectedCallback(){super.connectedCallback(),He(),this.fetchMarketData();}firstUpdated(o){super.firstUpdated(o),this.initTheme();}initTheme(){document.querySelector(\"html\")?.setAttribute(\"theme\",this.theme);}getUtmParams(){let o=\"embed\",i=window.location!=window.parent.location?document.referrer:document.location.href;return `utm_medium=${o}&utm_source=${i}`}async fetchMarketData(){if(this.marketSlug){let o=await xe({slug:this.marketSlug});this._market=o;let i=this.getUtmParams();this._href=o.events?.length&&o.events[0]?.slug?`https://polymarket.com/event/${o.events[0].slug}/${o.slug}?${i}`:`https://polymarket.com/market/${o.slug}?${i}`;let n=o.outcomePrices[0]?parseFloat(o.outcomePrices[0]):0,h=Math.min(Math.max(n*100,0),100),m=[0,10,20,30,40,50,60,70,80,90,100].sort((r,s)=>Math.abs(r-h)-Math.abs(s-h))[0];this._probability=h,this._fillPathD=Kt[m.toFixed(0)];}}handleClick(){console.log({\"document.location.href\":document.location.href,\"window.parent.location\":window.parent.location,\"window.location\":window.location,\"document.referrer\":document.referrer});}render(){return this._market?$e` <div class=\"container\" @click=\"${this.handleClick}\"> <div class=\"card-container\"> <div class=\"top-row-container\"> <div class=\"top-row-left-container\"> <img src=\"${this._market.imageOptimized?.imageUrlSource??this._market.image}\" alt=\"icon\" /> <a href=\"${this._href}\">${this._market.question}</a> </div> <div class=\"top-row-right-container\"> <svg width=\"75px\" height=\"35px\" viewBox=\"0 0 110 60\" class=\"gauge\" > <path id=\"gauge-track\" d=\"M5,55 A50,50 0 0 1 105,55\" class=\"gauge-track\" fill=\"none\" stroke-width=\"8\" /> <path id=\"gauge-fill\" d=${this._fillPathD} class=\"gauge-fill\" fill=\"none\" stroke=\"${(this._probability??0)<50?\"#E64800\":\"#00B955\"}\" stroke-width=\"8.5\" /> </svg> <p class=\"gauge-text\"> ${(0, Te.default)(this._probability).format(\"0\")}% </p> <p class=\"gauge-subtext\">chance</p> </div> </div> <div class=\"bottom-row-container\"> <div class=\"bottom-row-left-container\"> <svg width=\"114\" height=\"24\" viewBox=\"0 0 168 38\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" class=\"polymarket-logo\" > <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M78.6391 27.3227V9.54077H75.7148V27.3227H78.6391ZM49.9319 21.095V27.3233H46.8903V10.4676H53.455C54.7469 10.4676 55.8645 10.6972 56.8079 11.1564C57.7513 11.6156 58.4697 12.2523 58.9629 13.0666C59.4561 13.8808 59.7027 14.8089 59.7027 15.8508C59.7027 16.939 59.4581 17.8767 58.9688 18.6639C58.4794 19.4511 57.767 20.0531 56.8314 20.4699C55.8958 20.8867 54.7704 21.095 53.455 21.095H49.9319ZM49.9318 18.6871H53.455C54.5432 18.6871 55.3477 18.4362 55.8683 17.9346C56.389 17.4329 56.6493 16.746 56.6493 15.8739C56.6493 15.3337 56.5358 14.8378 56.3087 14.3863C56.0817 13.9348 55.7294 13.5721 55.2518 13.2981C54.7742 13.0241 54.1753 12.8871 53.455 12.8871H49.9318V18.6871ZM67.2507 27.5554C68.4643 27.5554 69.5173 27.2815 70.4098 26.7335C71.3024 26.1855 71.9855 25.4292 72.4591 24.4644C72.9328 23.4997 73.1696 22.4076 73.1696 21.1882V20.9451C73.1696 19.7257 72.9328 18.6336 72.4591 17.6689C71.9855 16.7042 71.3004 15.9459 70.404 15.394C69.5075 14.8422 68.4486 14.5663 67.2273 14.5663C66.0216 14.5663 64.9724 14.8422 64.0799 15.394C63.1874 15.9459 62.5043 16.7042 62.0306 17.6689C61.557 18.6336 61.3201 19.7257 61.3201 20.9451V21.1882C61.3201 22.4076 61.557 23.4997 62.0306 24.4644C62.5043 25.4292 63.1893 26.1855 64.0858 26.7335C64.9822 27.2815 66.0372 27.5554 67.2507 27.5554ZM64.9959 24.1058C65.497 24.8622 66.2486 25.2404 67.2508 25.2404C67.9162 25.2404 68.4741 25.0609 68.9242 24.702C69.3744 24.3432 69.7072 23.8589 69.9225 23.2492C70.1378 22.6394 70.2454 21.9526 70.2454 21.1885V20.9454C70.2454 20.189 70.1378 19.5041 69.9225 18.8905C69.7072 18.2769 69.3725 17.7888 68.9184 17.426C68.4643 17.0633 67.9006 16.8819 67.2273 16.8819C66.5618 16.8819 66.0059 17.0633 65.5596 17.426C65.1134 17.7888 64.7826 18.2769 64.5673 18.8905C64.352 19.5041 64.2443 20.189 64.2443 20.9454V21.1885C64.2443 22.377 64.4949 23.3495 64.9959 24.1058ZM85.4179 31.4486C84.8189 32.0699 83.9636 32.3806 82.8518 32.3806C82.4682 32.3806 82.0024 32.3111 81.4543 32.1722V29.961L81.9945 29.9842C82.6913 29.9842 83.2218 29.8626 83.5858 29.6195C83.9499 29.3764 84.2376 28.95 84.449 28.3403L84.8483 27.2752L80.3856 14.7955H83.5447L86.1871 23.2002L88.7472 14.7955H91.8593L86.7978 29.2201C86.4768 30.0845 86.0168 30.8273 85.4179 31.4486ZM96.3776 27.3239V18.2709C96.8473 17.3679 97.642 16.9164 98.7616 16.9164C99.4975 16.9164 100.055 17.0939 100.435 17.4489C100.815 17.8039 101.005 18.4021 101.005 19.2433V27.3239H103.929V18.9771L103.917 18.7108C104.089 18.1628 104.381 17.7268 104.792 17.4026C105.203 17.0785 105.714 16.9164 106.325 16.9164C107.068 16.9164 107.626 17.0843 107.998 17.42C108.37 17.7557 108.556 18.3519 108.556 19.2086V27.3239H111.48V19.2202C111.48 17.6071 111.124 16.4282 110.411 15.6835C109.699 14.9387 108.669 14.5663 107.323 14.5663C106.469 14.5663 105.714 14.7342 105.056 15.0699C104.399 15.4056 103.854 15.8745 103.424 16.4765C103.103 15.8282 102.645 15.3477 102.05 15.0352C101.455 14.7226 100.758 14.5663 99.9594 14.5663C99.1765 14.5663 98.4778 14.6994 97.8632 14.9657C97.2486 15.232 96.726 15.6159 96.2954 16.1176L96.2014 14.7978H93.4534V27.3239H96.3776ZM120.167 27.1734C119.611 27.4281 118.981 27.5554 118.276 27.5554C117.446 27.5554 116.703 27.3934 116.045 27.0692C115.387 26.7451 114.874 26.2974 114.507 25.7263C114.139 25.1552 113.955 24.5146 113.955 23.8046C113.955 22.4694 114.458 21.4468 115.464 20.7367C116.47 20.0267 117.897 19.6717 119.744 19.6717H121.506V18.8613C121.506 18.1976 121.322 17.6785 120.954 17.3042C120.586 16.9299 120.042 16.7427 119.321 16.7427C118.891 16.7427 118.511 16.8161 118.182 16.9627C117.853 17.1093 117.599 17.31 117.419 17.5647C117.239 17.8194 117.149 18.1049 117.149 18.4214H114.225C114.225 17.7499 114.442 17.119 114.876 16.5286C115.311 15.9382 115.929 15.4635 116.732 15.1046C117.534 14.7457 118.452 14.5663 119.486 14.5663C120.457 14.5663 121.314 14.7284 122.058 15.0525C122.802 15.3767 123.383 15.8629 123.802 16.5112C124.221 17.1595 124.43 17.9506 124.43 18.8844V24.4066C124.43 25.5488 124.591 26.4556 124.912 27.1271V27.3239H121.929C121.803 27.0538 121.694 26.664 121.6 26.1547C121.2 26.5791 120.723 26.9187 120.167 27.1734ZM118.84 25.251C118.222 25.251 117.74 25.0908 117.396 24.7706C117.051 24.4503 116.879 24.0354 116.879 23.526C116.879 22.87 117.141 22.3607 117.666 21.9979C118.19 21.6352 118.962 21.4538 119.979 21.4538H121.506V23.7923C121.287 24.1936 120.94 24.5371 120.467 24.8226C119.993 25.1082 119.451 25.251 118.84 25.251ZM130.287 18.7918V27.3239H127.363V14.7978H130.146L130.228 16.2102C130.549 15.6854 130.949 15.2802 131.426 14.9946C131.904 14.7091 132.456 14.5663 133.082 14.5663C133.247 14.5663 133.432 14.5817 133.64 14.6126C133.847 14.6435 134.002 14.6782 134.104 14.7168L134.08 17.4373C133.689 17.3756 133.301 17.3447 132.918 17.3447C131.61 17.3447 130.733 17.8271 130.287 18.7918ZM138.786 27.3227V23.2592L140.067 21.9742L143.766 27.3227H147.148L141.946 20.0062L146.655 14.7966H143.132L139.656 18.6748L138.786 19.7399V9.54077H135.874V27.3227H138.786ZM157.057 26.884C156.235 27.3316 155.24 27.5554 154.074 27.5554C152.837 27.5554 151.756 27.2911 150.832 26.7624C149.909 26.2338 149.2 25.5102 148.707 24.5918C148.214 23.6734 147.967 22.643 147.967 21.5008V21.0261C147.967 19.7373 148.217 18.6047 148.719 17.6284C149.22 16.6521 149.909 15.8976 150.785 15.3651C151.662 14.8326 152.649 14.5663 153.745 14.5663C154.943 14.5663 155.949 14.8249 156.763 15.342C157.577 15.859 158.186 16.5826 158.589 17.5126C158.992 18.4426 159.194 19.5212 159.194 20.7483V21.9639H150.915C150.969 22.6044 151.138 23.1717 151.42 23.6656C151.701 24.1596 152.083 24.5455 152.565 24.8233C153.046 25.1012 153.608 25.2401 154.25 25.2401C155.565 25.2401 156.622 24.7307 157.421 23.712L158.983 25.2054C158.521 25.8768 157.879 26.4364 157.057 26.884ZM156.305 19.8803H150.973C151.106 18.931 151.408 18.194 151.878 17.6692C152.347 17.1443 152.966 16.8819 153.733 16.8819C154.594 16.8819 155.229 17.1424 155.636 17.6634C156.043 18.1843 156.266 18.85 156.305 19.6604V19.8803ZM167.317 27.2774C166.754 27.4626 166.12 27.5552 165.415 27.5552C164.381 27.5552 163.567 27.2735 162.972 26.7101C162.377 26.1467 162.08 25.2476 162.08 24.0127V16.9277H160.013V14.7976H162.08V11.7414H165.004V14.7976H167.235V16.9277H165.004V23.8159C165.004 24.3407 165.113 24.6977 165.333 24.8868C165.552 25.0759 165.881 25.1704 166.319 25.1704C166.632 25.1704 166.965 25.1318 167.317 25.0546V27.2774Z\" /> <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M30.6525 17.4069V0L0 8.6333V8.77358V29.2266V29.3668L30.6525 38.0001V20.5933V17.4069ZM27.6857 16.5713V3.8835L5.16277 10.2277L27.6857 16.5713ZM25.4849 19.0001L2.96678 12.6572V25.3429L25.4849 19.0001ZM5.16283 27.7724L27.6857 34.1166V21.4289L5.16283 27.7724Z\" /> </svg> </div> <div class=\"bottom-row-right-container\"> <p class=\"typography-secondary typography-number\"> ${this.showVolume?`${(0, Te.default)(this._market.volumeNum).format(\"0.[0]a\")}`:\"\"} <span style=\"text-transform: capitalize;\" >${this.showVolume?\"Bet\":\"\"}</span > </p> <a class=\"button-primary\" href=\"${this._href}\"> More details <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"13\" height=\"10\" viewBox=\"0 0 19 16\" class=\"arrow-icon\" > <path d=\"M19 6.99997H4.414L9.707 1.70697L8.293 0.292969L0.585999 7.99997L8.293 15.707L9.707 14.293L4.414 8.99997H19V6.99997Z\" /> </svg> </a> </div> </div> </div> </div>`:$e` <span>${\" \"}</span> `}}" | ||
"default": "class extends($t=O,vt=[V({type:String,attribute:\"theme\",reflect:!0})],_t=[V({type:String,attribute:\"width\"})],bt=[V({type:String,attribute:\"market\"})],yt=[V({type:Boolean,attribute:\"volume\",converter:(o,i)=>i===String?o===\"true\":i===Boolean?o:!1})],gt=[V({type:Boolean,attribute:\"chart\",converter:(o,i)=>i===String?o===\"true\":i===Boolean?o:!1})],mt=[ee()],ft=[ee()],dt=[ee()],pt=[ee()],$t){constructor(){super();P(this,we,$(g,8,this,\"light\")),$(g,11,this);P(this,ke,$(g,12,this,400)),$(g,15,this);P(this,Ce,$(g,16,this)),$(g,19,this);P(this,Ae,$(g,20,this,!1)),$(g,23,this);P(this,Se,$(g,24,this,!1)),$(g,27,this);P(this,Ee,$(g,28,this)),$(g,31,this);P(this,Me,$(g,32,this)),$(g,35,this);P(this,Pe,$(g,36,this)),$(g,39,this);P(this,Ne,$(g,40,this)),$(g,43,this);He();}static get styles(){return pe` :host { --polymarket-color-white: #ffffff; --polymarket-color-black: #000000; --polymarket-color-gray-1: #333333; --polymarket-color-gray-2: #4f4f4f; --polymarket-color-gray-3: #828282; --polymarket-color-gray-4: #bdbdbd; --polymarket-color-gray-5: #e0e0e0; --polymarket-color-gray-6: #f2f2f2; --polymarket-radii-sm: 4px; --polymarket-radii-md: 8px; --polymarket-radii-lg: 12px; --polymarket-radii-full: 50%; --polymarket-space-1: 4px; --polymarket-space-2: 8px; --polymarket-space-3: 12px; --polymarket-space-4: 16px; --polymarket-font-size-sm: 11px; --polymarket-font-size-md: 13px; --polymarket-font-size-lg: 15px; --polymarket-font-size-xl: 18px; --polymarket-line-height-sm: 13px; --polymarket-line-height-md: 17px; --polymarket-line-height-lg: 19px; --polymarket-line-height-xl: 21px; --polymarket-font-weight-normal: 400; --polymarket-font-weight-medium: 500; --polymarket-font-weight-semi: 600; --polymarket-font-weight-bold: 700; display: block; width: 100%; height: 100%; font-family: \"Open Sauce Sans\", sans-serif; font-style: normal; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } :host([theme=\"dark\"]) { --polymarket-color-white: #1d2b39; --polymarket-color-black: #ffffff; --polymarket-color-gray-1: #f2f2f2; --polymarket-color-gray-2: #858d92; --polymarket-color-gray-3: #858d92; --polymarket-color-gray-4: #425464; --polymarket-color-gray-5: #344452; --polymarket-color-gray-6: #2c3f4f; } :host * { box-sizing: border-box; } .container { display: flex; flex-direction: column; width: 100%; max-width: calc(100vw - 4px); height: fit-content; justify-content: center; align-items: center; padding: 2px; } .card-container { display: flex; flex-direction: column; width: 400px; max-width: calc(100vw - 8px); height: fit-content; padding: 20px; background-color: var(--polymarket-color-white); border-radius: var(--polymarket-radii-md); border: 1px solid var(--polymarket-color-gray-6); gap: 32px; } .top-row-container { display: flex; flex-direction: row; justify-content: space-between; align-items: center; height: 60px; width: 100%; gap: var(--polymarket-space-3); } .bottom-row-container { display: flex; flex-direction: row; justify-content: space-between; align-items: center; width: 100%; height: 32px; gap: var(--polymarket-space-3); } .top-row-left-container { display: flex; flex-direction: row; align-items: center; width: 100%; flex: 1; gap: var(--polymarket-space-3); img { width: 40px; height: 40px; object-fit: cover; border-radius: var(--polymarket-radii-sm); } a { flex: 1; text-decoration: none; color: var(--polymarket-color-black); font-size: var(--polymarket-font-size-lg); line-height: var(--polymarket-line-height-lg); font-weight: var(--polymarket-font-weight-semi); text-decoration: underline; text-decoration-color: transparent; text-decoration-thickness: 2px; transition: text-decoration-color 100ms ease; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; &:hover { text-decoration-color: var(--polymarket-color-black); } } } .top-row-right-container { position: relative; align-items: center; width: 75px; height: 60px; overflow: visible; } .bottom-row-left-container { align-items: center; height: 24px; width: 114px; } .bottom-row-right-container { display: flex; flex-direction: row; align-items: center; width: auto; gap: var(--polymarket-space-3); } .typography-primary { color: var(--polymarket-color-gray-3); font-size: var(--polymarket-font-size-md); line-height: var(--polymarket-line-height-md); font-weight: var(--polymarket-font-weight-medium); } .typography-secondary { color: var(--polymarket-color-gray-3); font-size: var(--polymarket-font-size-sm); line-height: var(--polymarket-line-height-sm); font-weight: var(--polymarket-font-weight-medium); } .typography-number { text-transform: uppercase; } .button-primary { display: flex; justify-content: center; align-items: center; padding: 0px var(--polymarket-space-3); height: 32px; background-color: var(--polymarket-color-gray-6); border-radius: var(--polymarket-radii-md); color: var(--polymarket-color-black); font-size: var(--polymarket-font-size-md); line-height: var(--polymarket-line-height-md); font-weight: var(--polymarket-font-weight-semi); cursor: pointer; border: none; transition: background-color 100ms ease-in-out; gap: var(--polymarket-space-1); text-decoration: none; &:hover { background-color: var(--polymarket-color-gray-5); } } .gauge-text-container { position: absolute; background-color: transparent; border-radius: 100% / 100% 100% 0 0; left: 50%; top: calc(50% + 2px); transform: translate(-50%, -50%); width: calc(120px * 0.85); height: calc(60px * 0.85); display: flex; align-items: center; justify-content: flex-end; z-index: 3; } .gauge-subtext-container { position: absolute; left: 0; bottom: 0; width: 120px; height: 60px; transform: scale(1.1); background-color: transparent; display: flex; align-items: center; justify-content: flex-start; padding-top: 6px; z-index: 4; } .gauge-text { position: absolute; background-color: transparent; border-radius: 100% / 100% 100% 0 0; left: 50%; top: calc(50% + 2px); transform: translate(-50%, -50%); z-index: 3; margin: 0; color: var(--polymarket-color-black); font-size: var(--polymarket-font-size-lg); line-height: var(--polymarket-line-height-lg); font-weight: var(--polymarket-font-weight-bold); } .gauge-subtext { position: absolute; left: 50%; top: calc(50% + 18px); transform: translate(-50%, -50%); background-color: transparent; z-index: 4; margin: 0; color: var(--polymarket-color-gray-3); font-size: var(--polymarket-font-size-sm); line-height: var(--polymarket-line-height-sm); font-weight: var(--polymarket-font-weight-medium); } .gauge { position: absolute; left: 50%; top: 50%; transform: translate(-50%, calc(-50% - 10px)) scaleX(1.1); } .gauge-track { position: absolute; top: 0; z-index: 1; stroke: var(--polymarket-color-gray-5); } :host([theme=\"dark\"]) { .gauge-track { stroke: var(--polymarket-color-gray-4); } } .gauge-fill { position: absolute; top: 0; z-index: 1; } .arrow-icon { transform: rotate(180deg); fill: var(--polymarket-color-black); path { fill: var(--polymarket-color-black); } } .polymarket-logo { path { fill: var(--polymarket-color-gray-4); } } :host([theme=\"dark\"]) { .polymarket-logo { path { fill: var(--polymarket-color-gray-3); } } } `}connectedCallback(){super.connectedCallback(),He(),this.fetchMarketData();}firstUpdated(o){super.firstUpdated(o),this.initTheme();}initTheme(){document.querySelector(\"html\")?.setAttribute(\"theme\",this.theme);}getUtmParams(){let o=\"embed\",i=\"market\",n=window.location!=window.parent.location&&document.referrer?document.referrer:`${document.location.host}${document.location.pathname}`;return `utm_medium=${o}&utm_campaign=${i}&utm_source=${n}`}async fetchMarketData(){if(this.marketSlug){let o=await xe({slug:this.marketSlug});this._market=o;let i=this.getUtmParams();this._href=o.events?.length&&o.events[0]?.slug?`https://polymarket.com/event/${o.events[0].slug}/${o.slug}?${i}`:`https://polymarket.com/market/${o.slug}?${i}`;let n=o.outcomePrices[0]?parseFloat(o.outcomePrices[0]):0,h=Math.min(Math.max(n*100,0),100),m=[0,10,20,30,40,50,60,70,80,90,100].sort((r,s)=>Math.abs(r-h)-Math.abs(s-h))[0];this._probability=h,this._fillPathD=Kt[m.toFixed(0)];}}render(){return this._market?$e` <div class=\"container\"> <div class=\"card-container\"> <div class=\"top-row-container\"> <div class=\"top-row-left-container\"> <img src=\"${this._market.imageOptimized?.imageUrlSource??this._market.image}\" alt=\"icon\" /> <a href=\"${this._href}\">${this._market.question}</a> </div> <div class=\"top-row-right-container\"> <svg width=\"75px\" height=\"35px\" viewBox=\"0 0 110 60\" class=\"gauge\" > <path id=\"gauge-track\" d=\"M5,55 A50,50 0 0 1 105,55\" class=\"gauge-track\" fill=\"none\" stroke-width=\"8\" /> <path id=\"gauge-fill\" d=${this._fillPathD} class=\"gauge-fill\" fill=\"none\" stroke=\"${(this._probability??0)<50?\"#E64800\":\"#00B955\"}\" stroke-width=\"8.5\" /> </svg> <p class=\"gauge-text\"> ${(0, Te.default)(this._probability).format(\"0\")}% </p> <p class=\"gauge-subtext\">chance</p> </div> </div> <div class=\"bottom-row-container\"> <div class=\"bottom-row-left-container\"> <svg width=\"114\" height=\"24\" viewBox=\"0 0 168 38\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" class=\"polymarket-logo\" > <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M78.6391 27.3227V9.54077H75.7148V27.3227H78.6391ZM49.9319 21.095V27.3233H46.8903V10.4676H53.455C54.7469 10.4676 55.8645 10.6972 56.8079 11.1564C57.7513 11.6156 58.4697 12.2523 58.9629 13.0666C59.4561 13.8808 59.7027 14.8089 59.7027 15.8508C59.7027 16.939 59.4581 17.8767 58.9688 18.6639C58.4794 19.4511 57.767 20.0531 56.8314 20.4699C55.8958 20.8867 54.7704 21.095 53.455 21.095H49.9319ZM49.9318 18.6871H53.455C54.5432 18.6871 55.3477 18.4362 55.8683 17.9346C56.389 17.4329 56.6493 16.746 56.6493 15.8739C56.6493 15.3337 56.5358 14.8378 56.3087 14.3863C56.0817 13.9348 55.7294 13.5721 55.2518 13.2981C54.7742 13.0241 54.1753 12.8871 53.455 12.8871H49.9318V18.6871ZM67.2507 27.5554C68.4643 27.5554 69.5173 27.2815 70.4098 26.7335C71.3024 26.1855 71.9855 25.4292 72.4591 24.4644C72.9328 23.4997 73.1696 22.4076 73.1696 21.1882V20.9451C73.1696 19.7257 72.9328 18.6336 72.4591 17.6689C71.9855 16.7042 71.3004 15.9459 70.404 15.394C69.5075 14.8422 68.4486 14.5663 67.2273 14.5663C66.0216 14.5663 64.9724 14.8422 64.0799 15.394C63.1874 15.9459 62.5043 16.7042 62.0306 17.6689C61.557 18.6336 61.3201 19.7257 61.3201 20.9451V21.1882C61.3201 22.4076 61.557 23.4997 62.0306 24.4644C62.5043 25.4292 63.1893 26.1855 64.0858 26.7335C64.9822 27.2815 66.0372 27.5554 67.2507 27.5554ZM64.9959 24.1058C65.497 24.8622 66.2486 25.2404 67.2508 25.2404C67.9162 25.2404 68.4741 25.0609 68.9242 24.702C69.3744 24.3432 69.7072 23.8589 69.9225 23.2492C70.1378 22.6394 70.2454 21.9526 70.2454 21.1885V20.9454C70.2454 20.189 70.1378 19.5041 69.9225 18.8905C69.7072 18.2769 69.3725 17.7888 68.9184 17.426C68.4643 17.0633 67.9006 16.8819 67.2273 16.8819C66.5618 16.8819 66.0059 17.0633 65.5596 17.426C65.1134 17.7888 64.7826 18.2769 64.5673 18.8905C64.352 19.5041 64.2443 20.189 64.2443 20.9454V21.1885C64.2443 22.377 64.4949 23.3495 64.9959 24.1058ZM85.4179 31.4486C84.8189 32.0699 83.9636 32.3806 82.8518 32.3806C82.4682 32.3806 82.0024 32.3111 81.4543 32.1722V29.961L81.9945 29.9842C82.6913 29.9842 83.2218 29.8626 83.5858 29.6195C83.9499 29.3764 84.2376 28.95 84.449 28.3403L84.8483 27.2752L80.3856 14.7955H83.5447L86.1871 23.2002L88.7472 14.7955H91.8593L86.7978 29.2201C86.4768 30.0845 86.0168 30.8273 85.4179 31.4486ZM96.3776 27.3239V18.2709C96.8473 17.3679 97.642 16.9164 98.7616 16.9164C99.4975 16.9164 100.055 17.0939 100.435 17.4489C100.815 17.8039 101.005 18.4021 101.005 19.2433V27.3239H103.929V18.9771L103.917 18.7108C104.089 18.1628 104.381 17.7268 104.792 17.4026C105.203 17.0785 105.714 16.9164 106.325 16.9164C107.068 16.9164 107.626 17.0843 107.998 17.42C108.37 17.7557 108.556 18.3519 108.556 19.2086V27.3239H111.48V19.2202C111.48 17.6071 111.124 16.4282 110.411 15.6835C109.699 14.9387 108.669 14.5663 107.323 14.5663C106.469 14.5663 105.714 14.7342 105.056 15.0699C104.399 15.4056 103.854 15.8745 103.424 16.4765C103.103 15.8282 102.645 15.3477 102.05 15.0352C101.455 14.7226 100.758 14.5663 99.9594 14.5663C99.1765 14.5663 98.4778 14.6994 97.8632 14.9657C97.2486 15.232 96.726 15.6159 96.2954 16.1176L96.2014 14.7978H93.4534V27.3239H96.3776ZM120.167 27.1734C119.611 27.4281 118.981 27.5554 118.276 27.5554C117.446 27.5554 116.703 27.3934 116.045 27.0692C115.387 26.7451 114.874 26.2974 114.507 25.7263C114.139 25.1552 113.955 24.5146 113.955 23.8046C113.955 22.4694 114.458 21.4468 115.464 20.7367C116.47 20.0267 117.897 19.6717 119.744 19.6717H121.506V18.8613C121.506 18.1976 121.322 17.6785 120.954 17.3042C120.586 16.9299 120.042 16.7427 119.321 16.7427C118.891 16.7427 118.511 16.8161 118.182 16.9627C117.853 17.1093 117.599 17.31 117.419 17.5647C117.239 17.8194 117.149 18.1049 117.149 18.4214H114.225C114.225 17.7499 114.442 17.119 114.876 16.5286C115.311 15.9382 115.929 15.4635 116.732 15.1046C117.534 14.7457 118.452 14.5663 119.486 14.5663C120.457 14.5663 121.314 14.7284 122.058 15.0525C122.802 15.3767 123.383 15.8629 123.802 16.5112C124.221 17.1595 124.43 17.9506 124.43 18.8844V24.4066C124.43 25.5488 124.591 26.4556 124.912 27.1271V27.3239H121.929C121.803 27.0538 121.694 26.664 121.6 26.1547C121.2 26.5791 120.723 26.9187 120.167 27.1734ZM118.84 25.251C118.222 25.251 117.74 25.0908 117.396 24.7706C117.051 24.4503 116.879 24.0354 116.879 23.526C116.879 22.87 117.141 22.3607 117.666 21.9979C118.19 21.6352 118.962 21.4538 119.979 21.4538H121.506V23.7923C121.287 24.1936 120.94 24.5371 120.467 24.8226C119.993 25.1082 119.451 25.251 118.84 25.251ZM130.287 18.7918V27.3239H127.363V14.7978H130.146L130.228 16.2102C130.549 15.6854 130.949 15.2802 131.426 14.9946C131.904 14.7091 132.456 14.5663 133.082 14.5663C133.247 14.5663 133.432 14.5817 133.64 14.6126C133.847 14.6435 134.002 14.6782 134.104 14.7168L134.08 17.4373C133.689 17.3756 133.301 17.3447 132.918 17.3447C131.61 17.3447 130.733 17.8271 130.287 18.7918ZM138.786 27.3227V23.2592L140.067 21.9742L143.766 27.3227H147.148L141.946 20.0062L146.655 14.7966H143.132L139.656 18.6748L138.786 19.7399V9.54077H135.874V27.3227H138.786ZM157.057 26.884C156.235 27.3316 155.24 27.5554 154.074 27.5554C152.837 27.5554 151.756 27.2911 150.832 26.7624C149.909 26.2338 149.2 25.5102 148.707 24.5918C148.214 23.6734 147.967 22.643 147.967 21.5008V21.0261C147.967 19.7373 148.217 18.6047 148.719 17.6284C149.22 16.6521 149.909 15.8976 150.785 15.3651C151.662 14.8326 152.649 14.5663 153.745 14.5663C154.943 14.5663 155.949 14.8249 156.763 15.342C157.577 15.859 158.186 16.5826 158.589 17.5126C158.992 18.4426 159.194 19.5212 159.194 20.7483V21.9639H150.915C150.969 22.6044 151.138 23.1717 151.42 23.6656C151.701 24.1596 152.083 24.5455 152.565 24.8233C153.046 25.1012 153.608 25.2401 154.25 25.2401C155.565 25.2401 156.622 24.7307 157.421 23.712L158.983 25.2054C158.521 25.8768 157.879 26.4364 157.057 26.884ZM156.305 19.8803H150.973C151.106 18.931 151.408 18.194 151.878 17.6692C152.347 17.1443 152.966 16.8819 153.733 16.8819C154.594 16.8819 155.229 17.1424 155.636 17.6634C156.043 18.1843 156.266 18.85 156.305 19.6604V19.8803ZM167.317 27.2774C166.754 27.4626 166.12 27.5552 165.415 27.5552C164.381 27.5552 163.567 27.2735 162.972 26.7101C162.377 26.1467 162.08 25.2476 162.08 24.0127V16.9277H160.013V14.7976H162.08V11.7414H165.004V14.7976H167.235V16.9277H165.004V23.8159C165.004 24.3407 165.113 24.6977 165.333 24.8868C165.552 25.0759 165.881 25.1704 166.319 25.1704C166.632 25.1704 166.965 25.1318 167.317 25.0546V27.2774Z\" /> <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M30.6525 17.4069V0L0 8.6333V8.77358V29.2266V29.3668L30.6525 38.0001V20.5933V17.4069ZM27.6857 16.5713V3.8835L5.16277 10.2277L27.6857 16.5713ZM25.4849 19.0001L2.96678 12.6572V25.3429L25.4849 19.0001ZM5.16283 27.7724L27.6857 34.1166V21.4289L5.16283 27.7724Z\" /> </svg> </div> <div class=\"bottom-row-right-container\"> <p class=\"typography-secondary typography-number\"> ${this.showVolume?`${(0, Te.default)(this._market.volumeNum).format(\"0.[0]a\")}`:\"\"} <span style=\"text-transform: capitalize;\" >${this.showVolume?\"Bet\":\"\"}</span > </p> <a class=\"button-primary\" href=\"${this._href}\"> More details <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"13\" height=\"10\" viewBox=\"0 0 19 16\" class=\"arrow-icon\" > <path d=\"M19 6.99997H4.414L9.707 1.70697L8.293 0.292969L0.585999 7.99997L8.293 15.707L9.707 14.293L4.414 8.99997H19V6.99997Z\" /> </svg> </a> </div> </div> </div> </div>`:$e` <span>${\" \"}</span> `}}" | ||
} | ||
@@ -326,3 +326,3 @@ ], | ||
"name": "k", | ||
"default": "class extends($t=O,vt=[V({type:String,attribute:\"theme\",reflect:!0})],_t=[V({type:String,attribute:\"width\"})],bt=[V({type:String,attribute:\"market\"})],yt=[V({type:Boolean,attribute:\"volume\",converter:(o,i)=>i===String?o===\"true\":i===Boolean?o:!1})],gt=[V({type:Boolean,attribute:\"chart\",converter:(o,i)=>i===String?o===\"true\":i===Boolean?o:!1})],mt=[ee()],ft=[ee()],dt=[ee()],pt=[ee()],$t){constructor(){super();P(this,we,$(g,8,this,\"light\")),$(g,11,this);P(this,ke,$(g,12,this,400)),$(g,15,this);P(this,Ce,$(g,16,this)),$(g,19,this);P(this,Ae,$(g,20,this,!1)),$(g,23,this);P(this,Se,$(g,24,this,!1)),$(g,27,this);P(this,Ee,$(g,28,this)),$(g,31,this);P(this,Me,$(g,32,this)),$(g,35,this);P(this,Pe,$(g,36,this)),$(g,39,this);P(this,Ne,$(g,40,this)),$(g,43,this);He();}static get styles(){return pe` :host { --polymarket-color-white: #ffffff; --polymarket-color-black: #000000; --polymarket-color-gray-1: #333333; --polymarket-color-gray-2: #4f4f4f; --polymarket-color-gray-3: #828282; --polymarket-color-gray-4: #bdbdbd; --polymarket-color-gray-5: #e0e0e0; --polymarket-color-gray-6: #f2f2f2; --polymarket-radii-sm: 4px; --polymarket-radii-md: 8px; --polymarket-radii-lg: 12px; --polymarket-radii-full: 50%; --polymarket-space-1: 4px; --polymarket-space-2: 8px; --polymarket-space-3: 12px; --polymarket-space-4: 16px; --polymarket-font-size-sm: 11px; --polymarket-font-size-md: 13px; --polymarket-font-size-lg: 15px; --polymarket-font-size-xl: 18px; --polymarket-line-height-sm: 13px; --polymarket-line-height-md: 17px; --polymarket-line-height-lg: 19px; --polymarket-line-height-xl: 21px; --polymarket-font-weight-normal: 400; --polymarket-font-weight-medium: 500; --polymarket-font-weight-semi: 600; --polymarket-font-weight-bold: 700; display: block; width: 100%; height: 100%; font-family: \"Open Sauce Sans\", sans-serif; font-style: normal; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } :host([theme=\"dark\"]) { --polymarket-color-white: #1d2b39; --polymarket-color-black: #ffffff; --polymarket-color-gray-1: #f2f2f2; --polymarket-color-gray-2: #858d92; --polymarket-color-gray-3: #858d92; --polymarket-color-gray-4: #425464; --polymarket-color-gray-5: #344452; --polymarket-color-gray-6: #2c3f4f; } :host * { box-sizing: border-box; } .container { display: flex; flex-direction: column; width: 100%; max-width: calc(100vw - 4px); height: fit-content; justify-content: center; align-items: center; padding: 2px; } .card-container { display: flex; flex-direction: column; width: 400px; max-width: calc(100vw - 8px); height: fit-content; padding: 20px; background-color: var(--polymarket-color-white); border-radius: var(--polymarket-radii-md); border: 1px solid var(--polymarket-color-gray-6); gap: 32px; } .top-row-container { display: flex; flex-direction: row; justify-content: space-between; align-items: center; height: 60px; width: 100%; gap: var(--polymarket-space-3); } .bottom-row-container { display: flex; flex-direction: row; justify-content: space-between; align-items: center; width: 100%; height: 32px; gap: var(--polymarket-space-3); } .top-row-left-container { display: flex; flex-direction: row; align-items: center; width: 100%; flex: 1; gap: var(--polymarket-space-3); img { width: 40px; height: 40px; object-fit: cover; border-radius: var(--polymarket-radii-sm); } a { flex: 1; text-decoration: none; color: var(--polymarket-color-black); font-size: var(--polymarket-font-size-lg); line-height: var(--polymarket-line-height-lg); font-weight: var(--polymarket-font-weight-semi); text-decoration: underline; text-decoration-color: transparent; text-decoration-thickness: 2px; transition: text-decoration-color 100ms ease; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; &:hover { text-decoration-color: var(--polymarket-color-black); } } } .top-row-right-container { position: relative; align-items: center; width: 75px; height: 60px; overflow: visible; } .bottom-row-left-container { align-items: center; height: 24px; width: 114px; } .bottom-row-right-container { display: flex; flex-direction: row; align-items: center; width: auto; gap: var(--polymarket-space-3); } .typography-primary { color: var(--polymarket-color-gray-3); font-size: var(--polymarket-font-size-md); line-height: var(--polymarket-line-height-md); font-weight: var(--polymarket-font-weight-medium); } .typography-secondary { color: var(--polymarket-color-gray-3); font-size: var(--polymarket-font-size-sm); line-height: var(--polymarket-line-height-sm); font-weight: var(--polymarket-font-weight-medium); } .typography-number { text-transform: uppercase; } .button-primary { display: flex; justify-content: center; align-items: center; padding: 0px var(--polymarket-space-3); height: 32px; background-color: var(--polymarket-color-gray-6); border-radius: var(--polymarket-radii-md); color: var(--polymarket-color-black); font-size: var(--polymarket-font-size-md); line-height: var(--polymarket-line-height-md); font-weight: var(--polymarket-font-weight-semi); cursor: pointer; border: none; transition: background-color 100ms ease-in-out; gap: var(--polymarket-space-1); text-decoration: none; &:hover { background-color: var(--polymarket-color-gray-5); } } .gauge-text-container { position: absolute; background-color: transparent; border-radius: 100% / 100% 100% 0 0; left: 50%; top: calc(50% + 2px); transform: translate(-50%, -50%); width: calc(120px * 0.85); height: calc(60px * 0.85); display: flex; align-items: center; justify-content: flex-end; z-index: 3; } .gauge-subtext-container { position: absolute; left: 0; bottom: 0; width: 120px; height: 60px; transform: scale(1.1); background-color: transparent; display: flex; align-items: center; justify-content: flex-start; padding-top: 6px; z-index: 4; } .gauge-text { position: absolute; background-color: transparent; border-radius: 100% / 100% 100% 0 0; left: 50%; top: calc(50% + 2px); transform: translate(-50%, -50%); z-index: 3; margin: 0; color: var(--polymarket-color-black); font-size: var(--polymarket-font-size-lg); line-height: var(--polymarket-line-height-lg); font-weight: var(--polymarket-font-weight-bold); } .gauge-subtext { position: absolute; left: 50%; top: calc(50% + 18px); transform: translate(-50%, -50%); background-color: transparent; z-index: 4; margin: 0; color: var(--polymarket-color-gray-3); font-size: var(--polymarket-font-size-sm); line-height: var(--polymarket-line-height-sm); font-weight: var(--polymarket-font-weight-medium); } .gauge { position: absolute; left: 50%; top: 50%; transform: translate(-50%, calc(-50% - 10px)) scaleX(1.1); } .gauge-track { position: absolute; top: 0; z-index: 1; stroke: var(--polymarket-color-gray-5); } :host([theme=\"dark\"]) { .gauge-track { stroke: var(--polymarket-color-gray-4); } } .gauge-fill { position: absolute; top: 0; z-index: 1; } .arrow-icon { transform: rotate(180deg); fill: var(--polymarket-color-black); path { fill: var(--polymarket-color-black); } } .polymarket-logo { path { fill: var(--polymarket-color-gray-4); } } :host([theme=\"dark\"]) { .polymarket-logo { path { fill: var(--polymarket-color-gray-3); } } } `}connectedCallback(){super.connectedCallback(),He(),this.fetchMarketData();}firstUpdated(o){super.firstUpdated(o),this.initTheme();}initTheme(){document.querySelector(\"html\")?.setAttribute(\"theme\",this.theme);}getUtmParams(){let o=\"embed\",i=window.location!=window.parent.location?document.referrer:document.location.href;return `utm_medium=${o}&utm_source=${i}`}async fetchMarketData(){if(this.marketSlug){let o=await xe({slug:this.marketSlug});this._market=o;let i=this.getUtmParams();this._href=o.events?.length&&o.events[0]?.slug?`https://polymarket.com/event/${o.events[0].slug}/${o.slug}?${i}`:`https://polymarket.com/market/${o.slug}?${i}`;let n=o.outcomePrices[0]?parseFloat(o.outcomePrices[0]):0,h=Math.min(Math.max(n*100,0),100),m=[0,10,20,30,40,50,60,70,80,90,100].sort((r,s)=>Math.abs(r-h)-Math.abs(s-h))[0];this._probability=h,this._fillPathD=Kt[m.toFixed(0)];}}handleClick(){console.log({\"document.location.href\":document.location.href,\"window.parent.location\":window.parent.location,\"window.location\":window.location,\"document.referrer\":document.referrer});}render(){return this._market?$e` <div class=\"container\" @click=\"${this.handleClick}\"> <div class=\"card-container\"> <div class=\"top-row-container\"> <div class=\"top-row-left-container\"> <img src=\"${this._market.imageOptimized?.imageUrlSource??this._market.image}\" alt=\"icon\" /> <a href=\"${this._href}\">${this._market.question}</a> </div> <div class=\"top-row-right-container\"> <svg width=\"75px\" height=\"35px\" viewBox=\"0 0 110 60\" class=\"gauge\" > <path id=\"gauge-track\" d=\"M5,55 A50,50 0 0 1 105,55\" class=\"gauge-track\" fill=\"none\" stroke-width=\"8\" /> <path id=\"gauge-fill\" d=${this._fillPathD} class=\"gauge-fill\" fill=\"none\" stroke=\"${(this._probability??0)<50?\"#E64800\":\"#00B955\"}\" stroke-width=\"8.5\" /> </svg> <p class=\"gauge-text\"> ${(0, Te.default)(this._probability).format(\"0\")}% </p> <p class=\"gauge-subtext\">chance</p> </div> </div> <div class=\"bottom-row-container\"> <div class=\"bottom-row-left-container\"> <svg width=\"114\" height=\"24\" viewBox=\"0 0 168 38\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" class=\"polymarket-logo\" > <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M78.6391 27.3227V9.54077H75.7148V27.3227H78.6391ZM49.9319 21.095V27.3233H46.8903V10.4676H53.455C54.7469 10.4676 55.8645 10.6972 56.8079 11.1564C57.7513 11.6156 58.4697 12.2523 58.9629 13.0666C59.4561 13.8808 59.7027 14.8089 59.7027 15.8508C59.7027 16.939 59.4581 17.8767 58.9688 18.6639C58.4794 19.4511 57.767 20.0531 56.8314 20.4699C55.8958 20.8867 54.7704 21.095 53.455 21.095H49.9319ZM49.9318 18.6871H53.455C54.5432 18.6871 55.3477 18.4362 55.8683 17.9346C56.389 17.4329 56.6493 16.746 56.6493 15.8739C56.6493 15.3337 56.5358 14.8378 56.3087 14.3863C56.0817 13.9348 55.7294 13.5721 55.2518 13.2981C54.7742 13.0241 54.1753 12.8871 53.455 12.8871H49.9318V18.6871ZM67.2507 27.5554C68.4643 27.5554 69.5173 27.2815 70.4098 26.7335C71.3024 26.1855 71.9855 25.4292 72.4591 24.4644C72.9328 23.4997 73.1696 22.4076 73.1696 21.1882V20.9451C73.1696 19.7257 72.9328 18.6336 72.4591 17.6689C71.9855 16.7042 71.3004 15.9459 70.404 15.394C69.5075 14.8422 68.4486 14.5663 67.2273 14.5663C66.0216 14.5663 64.9724 14.8422 64.0799 15.394C63.1874 15.9459 62.5043 16.7042 62.0306 17.6689C61.557 18.6336 61.3201 19.7257 61.3201 20.9451V21.1882C61.3201 22.4076 61.557 23.4997 62.0306 24.4644C62.5043 25.4292 63.1893 26.1855 64.0858 26.7335C64.9822 27.2815 66.0372 27.5554 67.2507 27.5554ZM64.9959 24.1058C65.497 24.8622 66.2486 25.2404 67.2508 25.2404C67.9162 25.2404 68.4741 25.0609 68.9242 24.702C69.3744 24.3432 69.7072 23.8589 69.9225 23.2492C70.1378 22.6394 70.2454 21.9526 70.2454 21.1885V20.9454C70.2454 20.189 70.1378 19.5041 69.9225 18.8905C69.7072 18.2769 69.3725 17.7888 68.9184 17.426C68.4643 17.0633 67.9006 16.8819 67.2273 16.8819C66.5618 16.8819 66.0059 17.0633 65.5596 17.426C65.1134 17.7888 64.7826 18.2769 64.5673 18.8905C64.352 19.5041 64.2443 20.189 64.2443 20.9454V21.1885C64.2443 22.377 64.4949 23.3495 64.9959 24.1058ZM85.4179 31.4486C84.8189 32.0699 83.9636 32.3806 82.8518 32.3806C82.4682 32.3806 82.0024 32.3111 81.4543 32.1722V29.961L81.9945 29.9842C82.6913 29.9842 83.2218 29.8626 83.5858 29.6195C83.9499 29.3764 84.2376 28.95 84.449 28.3403L84.8483 27.2752L80.3856 14.7955H83.5447L86.1871 23.2002L88.7472 14.7955H91.8593L86.7978 29.2201C86.4768 30.0845 86.0168 30.8273 85.4179 31.4486ZM96.3776 27.3239V18.2709C96.8473 17.3679 97.642 16.9164 98.7616 16.9164C99.4975 16.9164 100.055 17.0939 100.435 17.4489C100.815 17.8039 101.005 18.4021 101.005 19.2433V27.3239H103.929V18.9771L103.917 18.7108C104.089 18.1628 104.381 17.7268 104.792 17.4026C105.203 17.0785 105.714 16.9164 106.325 16.9164C107.068 16.9164 107.626 17.0843 107.998 17.42C108.37 17.7557 108.556 18.3519 108.556 19.2086V27.3239H111.48V19.2202C111.48 17.6071 111.124 16.4282 110.411 15.6835C109.699 14.9387 108.669 14.5663 107.323 14.5663C106.469 14.5663 105.714 14.7342 105.056 15.0699C104.399 15.4056 103.854 15.8745 103.424 16.4765C103.103 15.8282 102.645 15.3477 102.05 15.0352C101.455 14.7226 100.758 14.5663 99.9594 14.5663C99.1765 14.5663 98.4778 14.6994 97.8632 14.9657C97.2486 15.232 96.726 15.6159 96.2954 16.1176L96.2014 14.7978H93.4534V27.3239H96.3776ZM120.167 27.1734C119.611 27.4281 118.981 27.5554 118.276 27.5554C117.446 27.5554 116.703 27.3934 116.045 27.0692C115.387 26.7451 114.874 26.2974 114.507 25.7263C114.139 25.1552 113.955 24.5146 113.955 23.8046C113.955 22.4694 114.458 21.4468 115.464 20.7367C116.47 20.0267 117.897 19.6717 119.744 19.6717H121.506V18.8613C121.506 18.1976 121.322 17.6785 120.954 17.3042C120.586 16.9299 120.042 16.7427 119.321 16.7427C118.891 16.7427 118.511 16.8161 118.182 16.9627C117.853 17.1093 117.599 17.31 117.419 17.5647C117.239 17.8194 117.149 18.1049 117.149 18.4214H114.225C114.225 17.7499 114.442 17.119 114.876 16.5286C115.311 15.9382 115.929 15.4635 116.732 15.1046C117.534 14.7457 118.452 14.5663 119.486 14.5663C120.457 14.5663 121.314 14.7284 122.058 15.0525C122.802 15.3767 123.383 15.8629 123.802 16.5112C124.221 17.1595 124.43 17.9506 124.43 18.8844V24.4066C124.43 25.5488 124.591 26.4556 124.912 27.1271V27.3239H121.929C121.803 27.0538 121.694 26.664 121.6 26.1547C121.2 26.5791 120.723 26.9187 120.167 27.1734ZM118.84 25.251C118.222 25.251 117.74 25.0908 117.396 24.7706C117.051 24.4503 116.879 24.0354 116.879 23.526C116.879 22.87 117.141 22.3607 117.666 21.9979C118.19 21.6352 118.962 21.4538 119.979 21.4538H121.506V23.7923C121.287 24.1936 120.94 24.5371 120.467 24.8226C119.993 25.1082 119.451 25.251 118.84 25.251ZM130.287 18.7918V27.3239H127.363V14.7978H130.146L130.228 16.2102C130.549 15.6854 130.949 15.2802 131.426 14.9946C131.904 14.7091 132.456 14.5663 133.082 14.5663C133.247 14.5663 133.432 14.5817 133.64 14.6126C133.847 14.6435 134.002 14.6782 134.104 14.7168L134.08 17.4373C133.689 17.3756 133.301 17.3447 132.918 17.3447C131.61 17.3447 130.733 17.8271 130.287 18.7918ZM138.786 27.3227V23.2592L140.067 21.9742L143.766 27.3227H147.148L141.946 20.0062L146.655 14.7966H143.132L139.656 18.6748L138.786 19.7399V9.54077H135.874V27.3227H138.786ZM157.057 26.884C156.235 27.3316 155.24 27.5554 154.074 27.5554C152.837 27.5554 151.756 27.2911 150.832 26.7624C149.909 26.2338 149.2 25.5102 148.707 24.5918C148.214 23.6734 147.967 22.643 147.967 21.5008V21.0261C147.967 19.7373 148.217 18.6047 148.719 17.6284C149.22 16.6521 149.909 15.8976 150.785 15.3651C151.662 14.8326 152.649 14.5663 153.745 14.5663C154.943 14.5663 155.949 14.8249 156.763 15.342C157.577 15.859 158.186 16.5826 158.589 17.5126C158.992 18.4426 159.194 19.5212 159.194 20.7483V21.9639H150.915C150.969 22.6044 151.138 23.1717 151.42 23.6656C151.701 24.1596 152.083 24.5455 152.565 24.8233C153.046 25.1012 153.608 25.2401 154.25 25.2401C155.565 25.2401 156.622 24.7307 157.421 23.712L158.983 25.2054C158.521 25.8768 157.879 26.4364 157.057 26.884ZM156.305 19.8803H150.973C151.106 18.931 151.408 18.194 151.878 17.6692C152.347 17.1443 152.966 16.8819 153.733 16.8819C154.594 16.8819 155.229 17.1424 155.636 17.6634C156.043 18.1843 156.266 18.85 156.305 19.6604V19.8803ZM167.317 27.2774C166.754 27.4626 166.12 27.5552 165.415 27.5552C164.381 27.5552 163.567 27.2735 162.972 26.7101C162.377 26.1467 162.08 25.2476 162.08 24.0127V16.9277H160.013V14.7976H162.08V11.7414H165.004V14.7976H167.235V16.9277H165.004V23.8159C165.004 24.3407 165.113 24.6977 165.333 24.8868C165.552 25.0759 165.881 25.1704 166.319 25.1704C166.632 25.1704 166.965 25.1318 167.317 25.0546V27.2774Z\" /> <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M30.6525 17.4069V0L0 8.6333V8.77358V29.2266V29.3668L30.6525 38.0001V20.5933V17.4069ZM27.6857 16.5713V3.8835L5.16277 10.2277L27.6857 16.5713ZM25.4849 19.0001L2.96678 12.6572V25.3429L25.4849 19.0001ZM5.16283 27.7724L27.6857 34.1166V21.4289L5.16283 27.7724Z\" /> </svg> </div> <div class=\"bottom-row-right-container\"> <p class=\"typography-secondary typography-number\"> ${this.showVolume?`${(0, Te.default)(this._market.volumeNum).format(\"0.[0]a\")}`:\"\"} <span style=\"text-transform: capitalize;\" >${this.showVolume?\"Bet\":\"\"}</span > </p> <a class=\"button-primary\" href=\"${this._href}\"> More details <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"13\" height=\"10\" viewBox=\"0 0 19 16\" class=\"arrow-icon\" > <path d=\"M19 6.99997H4.414L9.707 1.70697L8.293 0.292969L0.585999 7.99997L8.293 15.707L9.707 14.293L4.414 8.99997H19V6.99997Z\" /> </svg> </a> </div> </div> </div> </div>`:$e` <span>${\" \"}</span> `}}" | ||
"default": "class extends($t=O,vt=[V({type:String,attribute:\"theme\",reflect:!0})],_t=[V({type:String,attribute:\"width\"})],bt=[V({type:String,attribute:\"market\"})],yt=[V({type:Boolean,attribute:\"volume\",converter:(o,i)=>i===String?o===\"true\":i===Boolean?o:!1})],gt=[V({type:Boolean,attribute:\"chart\",converter:(o,i)=>i===String?o===\"true\":i===Boolean?o:!1})],mt=[ee()],ft=[ee()],dt=[ee()],pt=[ee()],$t){constructor(){super();P(this,we,$(g,8,this,\"light\")),$(g,11,this);P(this,ke,$(g,12,this,400)),$(g,15,this);P(this,Ce,$(g,16,this)),$(g,19,this);P(this,Ae,$(g,20,this,!1)),$(g,23,this);P(this,Se,$(g,24,this,!1)),$(g,27,this);P(this,Ee,$(g,28,this)),$(g,31,this);P(this,Me,$(g,32,this)),$(g,35,this);P(this,Pe,$(g,36,this)),$(g,39,this);P(this,Ne,$(g,40,this)),$(g,43,this);He();}static get styles(){return pe` :host { --polymarket-color-white: #ffffff; --polymarket-color-black: #000000; --polymarket-color-gray-1: #333333; --polymarket-color-gray-2: #4f4f4f; --polymarket-color-gray-3: #828282; --polymarket-color-gray-4: #bdbdbd; --polymarket-color-gray-5: #e0e0e0; --polymarket-color-gray-6: #f2f2f2; --polymarket-radii-sm: 4px; --polymarket-radii-md: 8px; --polymarket-radii-lg: 12px; --polymarket-radii-full: 50%; --polymarket-space-1: 4px; --polymarket-space-2: 8px; --polymarket-space-3: 12px; --polymarket-space-4: 16px; --polymarket-font-size-sm: 11px; --polymarket-font-size-md: 13px; --polymarket-font-size-lg: 15px; --polymarket-font-size-xl: 18px; --polymarket-line-height-sm: 13px; --polymarket-line-height-md: 17px; --polymarket-line-height-lg: 19px; --polymarket-line-height-xl: 21px; --polymarket-font-weight-normal: 400; --polymarket-font-weight-medium: 500; --polymarket-font-weight-semi: 600; --polymarket-font-weight-bold: 700; display: block; width: 100%; height: 100%; font-family: \"Open Sauce Sans\", sans-serif; font-style: normal; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } :host([theme=\"dark\"]) { --polymarket-color-white: #1d2b39; --polymarket-color-black: #ffffff; --polymarket-color-gray-1: #f2f2f2; --polymarket-color-gray-2: #858d92; --polymarket-color-gray-3: #858d92; --polymarket-color-gray-4: #425464; --polymarket-color-gray-5: #344452; --polymarket-color-gray-6: #2c3f4f; } :host * { box-sizing: border-box; } .container { display: flex; flex-direction: column; width: 100%; max-width: calc(100vw - 4px); height: fit-content; justify-content: center; align-items: center; padding: 2px; } .card-container { display: flex; flex-direction: column; width: 400px; max-width: calc(100vw - 8px); height: fit-content; padding: 20px; background-color: var(--polymarket-color-white); border-radius: var(--polymarket-radii-md); border: 1px solid var(--polymarket-color-gray-6); gap: 32px; } .top-row-container { display: flex; flex-direction: row; justify-content: space-between; align-items: center; height: 60px; width: 100%; gap: var(--polymarket-space-3); } .bottom-row-container { display: flex; flex-direction: row; justify-content: space-between; align-items: center; width: 100%; height: 32px; gap: var(--polymarket-space-3); } .top-row-left-container { display: flex; flex-direction: row; align-items: center; width: 100%; flex: 1; gap: var(--polymarket-space-3); img { width: 40px; height: 40px; object-fit: cover; border-radius: var(--polymarket-radii-sm); } a { flex: 1; text-decoration: none; color: var(--polymarket-color-black); font-size: var(--polymarket-font-size-lg); line-height: var(--polymarket-line-height-lg); font-weight: var(--polymarket-font-weight-semi); text-decoration: underline; text-decoration-color: transparent; text-decoration-thickness: 2px; transition: text-decoration-color 100ms ease; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; &:hover { text-decoration-color: var(--polymarket-color-black); } } } .top-row-right-container { position: relative; align-items: center; width: 75px; height: 60px; overflow: visible; } .bottom-row-left-container { align-items: center; height: 24px; width: 114px; } .bottom-row-right-container { display: flex; flex-direction: row; align-items: center; width: auto; gap: var(--polymarket-space-3); } .typography-primary { color: var(--polymarket-color-gray-3); font-size: var(--polymarket-font-size-md); line-height: var(--polymarket-line-height-md); font-weight: var(--polymarket-font-weight-medium); } .typography-secondary { color: var(--polymarket-color-gray-3); font-size: var(--polymarket-font-size-sm); line-height: var(--polymarket-line-height-sm); font-weight: var(--polymarket-font-weight-medium); } .typography-number { text-transform: uppercase; } .button-primary { display: flex; justify-content: center; align-items: center; padding: 0px var(--polymarket-space-3); height: 32px; background-color: var(--polymarket-color-gray-6); border-radius: var(--polymarket-radii-md); color: var(--polymarket-color-black); font-size: var(--polymarket-font-size-md); line-height: var(--polymarket-line-height-md); font-weight: var(--polymarket-font-weight-semi); cursor: pointer; border: none; transition: background-color 100ms ease-in-out; gap: var(--polymarket-space-1); text-decoration: none; &:hover { background-color: var(--polymarket-color-gray-5); } } .gauge-text-container { position: absolute; background-color: transparent; border-radius: 100% / 100% 100% 0 0; left: 50%; top: calc(50% + 2px); transform: translate(-50%, -50%); width: calc(120px * 0.85); height: calc(60px * 0.85); display: flex; align-items: center; justify-content: flex-end; z-index: 3; } .gauge-subtext-container { position: absolute; left: 0; bottom: 0; width: 120px; height: 60px; transform: scale(1.1); background-color: transparent; display: flex; align-items: center; justify-content: flex-start; padding-top: 6px; z-index: 4; } .gauge-text { position: absolute; background-color: transparent; border-radius: 100% / 100% 100% 0 0; left: 50%; top: calc(50% + 2px); transform: translate(-50%, -50%); z-index: 3; margin: 0; color: var(--polymarket-color-black); font-size: var(--polymarket-font-size-lg); line-height: var(--polymarket-line-height-lg); font-weight: var(--polymarket-font-weight-bold); } .gauge-subtext { position: absolute; left: 50%; top: calc(50% + 18px); transform: translate(-50%, -50%); background-color: transparent; z-index: 4; margin: 0; color: var(--polymarket-color-gray-3); font-size: var(--polymarket-font-size-sm); line-height: var(--polymarket-line-height-sm); font-weight: var(--polymarket-font-weight-medium); } .gauge { position: absolute; left: 50%; top: 50%; transform: translate(-50%, calc(-50% - 10px)) scaleX(1.1); } .gauge-track { position: absolute; top: 0; z-index: 1; stroke: var(--polymarket-color-gray-5); } :host([theme=\"dark\"]) { .gauge-track { stroke: var(--polymarket-color-gray-4); } } .gauge-fill { position: absolute; top: 0; z-index: 1; } .arrow-icon { transform: rotate(180deg); fill: var(--polymarket-color-black); path { fill: var(--polymarket-color-black); } } .polymarket-logo { path { fill: var(--polymarket-color-gray-4); } } :host([theme=\"dark\"]) { .polymarket-logo { path { fill: var(--polymarket-color-gray-3); } } } `}connectedCallback(){super.connectedCallback(),He(),this.fetchMarketData();}firstUpdated(o){super.firstUpdated(o),this.initTheme();}initTheme(){document.querySelector(\"html\")?.setAttribute(\"theme\",this.theme);}getUtmParams(){let o=\"embed\",i=\"market\",n=window.location!=window.parent.location&&document.referrer?document.referrer:`${document.location.host}${document.location.pathname}`;return `utm_medium=${o}&utm_campaign=${i}&utm_source=${n}`}async fetchMarketData(){if(this.marketSlug){let o=await xe({slug:this.marketSlug});this._market=o;let i=this.getUtmParams();this._href=o.events?.length&&o.events[0]?.slug?`https://polymarket.com/event/${o.events[0].slug}/${o.slug}?${i}`:`https://polymarket.com/market/${o.slug}?${i}`;let n=o.outcomePrices[0]?parseFloat(o.outcomePrices[0]):0,h=Math.min(Math.max(n*100,0),100),m=[0,10,20,30,40,50,60,70,80,90,100].sort((r,s)=>Math.abs(r-h)-Math.abs(s-h))[0];this._probability=h,this._fillPathD=Kt[m.toFixed(0)];}}render(){return this._market?$e` <div class=\"container\"> <div class=\"card-container\"> <div class=\"top-row-container\"> <div class=\"top-row-left-container\"> <img src=\"${this._market.imageOptimized?.imageUrlSource??this._market.image}\" alt=\"icon\" /> <a href=\"${this._href}\">${this._market.question}</a> </div> <div class=\"top-row-right-container\"> <svg width=\"75px\" height=\"35px\" viewBox=\"0 0 110 60\" class=\"gauge\" > <path id=\"gauge-track\" d=\"M5,55 A50,50 0 0 1 105,55\" class=\"gauge-track\" fill=\"none\" stroke-width=\"8\" /> <path id=\"gauge-fill\" d=${this._fillPathD} class=\"gauge-fill\" fill=\"none\" stroke=\"${(this._probability??0)<50?\"#E64800\":\"#00B955\"}\" stroke-width=\"8.5\" /> </svg> <p class=\"gauge-text\"> ${(0, Te.default)(this._probability).format(\"0\")}% </p> <p class=\"gauge-subtext\">chance</p> </div> </div> <div class=\"bottom-row-container\"> <div class=\"bottom-row-left-container\"> <svg width=\"114\" height=\"24\" viewBox=\"0 0 168 38\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" class=\"polymarket-logo\" > <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M78.6391 27.3227V9.54077H75.7148V27.3227H78.6391ZM49.9319 21.095V27.3233H46.8903V10.4676H53.455C54.7469 10.4676 55.8645 10.6972 56.8079 11.1564C57.7513 11.6156 58.4697 12.2523 58.9629 13.0666C59.4561 13.8808 59.7027 14.8089 59.7027 15.8508C59.7027 16.939 59.4581 17.8767 58.9688 18.6639C58.4794 19.4511 57.767 20.0531 56.8314 20.4699C55.8958 20.8867 54.7704 21.095 53.455 21.095H49.9319ZM49.9318 18.6871H53.455C54.5432 18.6871 55.3477 18.4362 55.8683 17.9346C56.389 17.4329 56.6493 16.746 56.6493 15.8739C56.6493 15.3337 56.5358 14.8378 56.3087 14.3863C56.0817 13.9348 55.7294 13.5721 55.2518 13.2981C54.7742 13.0241 54.1753 12.8871 53.455 12.8871H49.9318V18.6871ZM67.2507 27.5554C68.4643 27.5554 69.5173 27.2815 70.4098 26.7335C71.3024 26.1855 71.9855 25.4292 72.4591 24.4644C72.9328 23.4997 73.1696 22.4076 73.1696 21.1882V20.9451C73.1696 19.7257 72.9328 18.6336 72.4591 17.6689C71.9855 16.7042 71.3004 15.9459 70.404 15.394C69.5075 14.8422 68.4486 14.5663 67.2273 14.5663C66.0216 14.5663 64.9724 14.8422 64.0799 15.394C63.1874 15.9459 62.5043 16.7042 62.0306 17.6689C61.557 18.6336 61.3201 19.7257 61.3201 20.9451V21.1882C61.3201 22.4076 61.557 23.4997 62.0306 24.4644C62.5043 25.4292 63.1893 26.1855 64.0858 26.7335C64.9822 27.2815 66.0372 27.5554 67.2507 27.5554ZM64.9959 24.1058C65.497 24.8622 66.2486 25.2404 67.2508 25.2404C67.9162 25.2404 68.4741 25.0609 68.9242 24.702C69.3744 24.3432 69.7072 23.8589 69.9225 23.2492C70.1378 22.6394 70.2454 21.9526 70.2454 21.1885V20.9454C70.2454 20.189 70.1378 19.5041 69.9225 18.8905C69.7072 18.2769 69.3725 17.7888 68.9184 17.426C68.4643 17.0633 67.9006 16.8819 67.2273 16.8819C66.5618 16.8819 66.0059 17.0633 65.5596 17.426C65.1134 17.7888 64.7826 18.2769 64.5673 18.8905C64.352 19.5041 64.2443 20.189 64.2443 20.9454V21.1885C64.2443 22.377 64.4949 23.3495 64.9959 24.1058ZM85.4179 31.4486C84.8189 32.0699 83.9636 32.3806 82.8518 32.3806C82.4682 32.3806 82.0024 32.3111 81.4543 32.1722V29.961L81.9945 29.9842C82.6913 29.9842 83.2218 29.8626 83.5858 29.6195C83.9499 29.3764 84.2376 28.95 84.449 28.3403L84.8483 27.2752L80.3856 14.7955H83.5447L86.1871 23.2002L88.7472 14.7955H91.8593L86.7978 29.2201C86.4768 30.0845 86.0168 30.8273 85.4179 31.4486ZM96.3776 27.3239V18.2709C96.8473 17.3679 97.642 16.9164 98.7616 16.9164C99.4975 16.9164 100.055 17.0939 100.435 17.4489C100.815 17.8039 101.005 18.4021 101.005 19.2433V27.3239H103.929V18.9771L103.917 18.7108C104.089 18.1628 104.381 17.7268 104.792 17.4026C105.203 17.0785 105.714 16.9164 106.325 16.9164C107.068 16.9164 107.626 17.0843 107.998 17.42C108.37 17.7557 108.556 18.3519 108.556 19.2086V27.3239H111.48V19.2202C111.48 17.6071 111.124 16.4282 110.411 15.6835C109.699 14.9387 108.669 14.5663 107.323 14.5663C106.469 14.5663 105.714 14.7342 105.056 15.0699C104.399 15.4056 103.854 15.8745 103.424 16.4765C103.103 15.8282 102.645 15.3477 102.05 15.0352C101.455 14.7226 100.758 14.5663 99.9594 14.5663C99.1765 14.5663 98.4778 14.6994 97.8632 14.9657C97.2486 15.232 96.726 15.6159 96.2954 16.1176L96.2014 14.7978H93.4534V27.3239H96.3776ZM120.167 27.1734C119.611 27.4281 118.981 27.5554 118.276 27.5554C117.446 27.5554 116.703 27.3934 116.045 27.0692C115.387 26.7451 114.874 26.2974 114.507 25.7263C114.139 25.1552 113.955 24.5146 113.955 23.8046C113.955 22.4694 114.458 21.4468 115.464 20.7367C116.47 20.0267 117.897 19.6717 119.744 19.6717H121.506V18.8613C121.506 18.1976 121.322 17.6785 120.954 17.3042C120.586 16.9299 120.042 16.7427 119.321 16.7427C118.891 16.7427 118.511 16.8161 118.182 16.9627C117.853 17.1093 117.599 17.31 117.419 17.5647C117.239 17.8194 117.149 18.1049 117.149 18.4214H114.225C114.225 17.7499 114.442 17.119 114.876 16.5286C115.311 15.9382 115.929 15.4635 116.732 15.1046C117.534 14.7457 118.452 14.5663 119.486 14.5663C120.457 14.5663 121.314 14.7284 122.058 15.0525C122.802 15.3767 123.383 15.8629 123.802 16.5112C124.221 17.1595 124.43 17.9506 124.43 18.8844V24.4066C124.43 25.5488 124.591 26.4556 124.912 27.1271V27.3239H121.929C121.803 27.0538 121.694 26.664 121.6 26.1547C121.2 26.5791 120.723 26.9187 120.167 27.1734ZM118.84 25.251C118.222 25.251 117.74 25.0908 117.396 24.7706C117.051 24.4503 116.879 24.0354 116.879 23.526C116.879 22.87 117.141 22.3607 117.666 21.9979C118.19 21.6352 118.962 21.4538 119.979 21.4538H121.506V23.7923C121.287 24.1936 120.94 24.5371 120.467 24.8226C119.993 25.1082 119.451 25.251 118.84 25.251ZM130.287 18.7918V27.3239H127.363V14.7978H130.146L130.228 16.2102C130.549 15.6854 130.949 15.2802 131.426 14.9946C131.904 14.7091 132.456 14.5663 133.082 14.5663C133.247 14.5663 133.432 14.5817 133.64 14.6126C133.847 14.6435 134.002 14.6782 134.104 14.7168L134.08 17.4373C133.689 17.3756 133.301 17.3447 132.918 17.3447C131.61 17.3447 130.733 17.8271 130.287 18.7918ZM138.786 27.3227V23.2592L140.067 21.9742L143.766 27.3227H147.148L141.946 20.0062L146.655 14.7966H143.132L139.656 18.6748L138.786 19.7399V9.54077H135.874V27.3227H138.786ZM157.057 26.884C156.235 27.3316 155.24 27.5554 154.074 27.5554C152.837 27.5554 151.756 27.2911 150.832 26.7624C149.909 26.2338 149.2 25.5102 148.707 24.5918C148.214 23.6734 147.967 22.643 147.967 21.5008V21.0261C147.967 19.7373 148.217 18.6047 148.719 17.6284C149.22 16.6521 149.909 15.8976 150.785 15.3651C151.662 14.8326 152.649 14.5663 153.745 14.5663C154.943 14.5663 155.949 14.8249 156.763 15.342C157.577 15.859 158.186 16.5826 158.589 17.5126C158.992 18.4426 159.194 19.5212 159.194 20.7483V21.9639H150.915C150.969 22.6044 151.138 23.1717 151.42 23.6656C151.701 24.1596 152.083 24.5455 152.565 24.8233C153.046 25.1012 153.608 25.2401 154.25 25.2401C155.565 25.2401 156.622 24.7307 157.421 23.712L158.983 25.2054C158.521 25.8768 157.879 26.4364 157.057 26.884ZM156.305 19.8803H150.973C151.106 18.931 151.408 18.194 151.878 17.6692C152.347 17.1443 152.966 16.8819 153.733 16.8819C154.594 16.8819 155.229 17.1424 155.636 17.6634C156.043 18.1843 156.266 18.85 156.305 19.6604V19.8803ZM167.317 27.2774C166.754 27.4626 166.12 27.5552 165.415 27.5552C164.381 27.5552 163.567 27.2735 162.972 26.7101C162.377 26.1467 162.08 25.2476 162.08 24.0127V16.9277H160.013V14.7976H162.08V11.7414H165.004V14.7976H167.235V16.9277H165.004V23.8159C165.004 24.3407 165.113 24.6977 165.333 24.8868C165.552 25.0759 165.881 25.1704 166.319 25.1704C166.632 25.1704 166.965 25.1318 167.317 25.0546V27.2774Z\" /> <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M30.6525 17.4069V0L0 8.6333V8.77358V29.2266V29.3668L30.6525 38.0001V20.5933V17.4069ZM27.6857 16.5713V3.8835L5.16277 10.2277L27.6857 16.5713ZM25.4849 19.0001L2.96678 12.6572V25.3429L25.4849 19.0001ZM5.16283 27.7724L27.6857 34.1166V21.4289L5.16283 27.7724Z\" /> </svg> </div> <div class=\"bottom-row-right-container\"> <p class=\"typography-secondary typography-number\"> ${this.showVolume?`${(0, Te.default)(this._market.volumeNum).format(\"0.[0]a\")}`:\"\"} <span style=\"text-transform: capitalize;\" >${this.showVolume?\"Bet\":\"\"}</span > </p> <a class=\"button-primary\" href=\"${this._href}\"> More details <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"13\" height=\"10\" viewBox=\"0 0 19 16\" class=\"arrow-icon\" > <path d=\"M19 6.99997H4.414L9.707 1.70697L8.293 0.292969L0.585999 7.99997L8.293 15.707L9.707 14.293L4.414 8.99997H19V6.99997Z\" /> </svg> </a> </div> </div> </div> </div>`:$e` <span>${\" \"}</span> `}}" | ||
} | ||
@@ -495,6 +495,2 @@ ], | ||
"kind": "method", | ||
"name": "handleClick" | ||
}, | ||
{ | ||
"kind": "method", | ||
"name": "render" | ||
@@ -501,0 +497,0 @@ } |
@@ -21,3 +21,2 @@ import * as lit_html from 'lit-html'; | ||
private fetchMarketData; | ||
handleClick(): void; | ||
render(): lit_html.TemplateResult<1>; | ||
@@ -24,0 +23,0 @@ } |
@@ -337,3 +337,3 @@ var Re=Object.create;var D=Object.defineProperty;var ze=Object.getOwnPropertyDescriptor;var wt=Object.getOwnPropertyNames;var kt=Object.getPrototypeOf,Ct=Object.prototype.hasOwnProperty;var Be=(t,e)=>(e=Symbol[t])?e:Symbol.for("Symbol."+t),B=t=>{throw TypeError(t)};var At=(t,e,o)=>e in t?D(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o;var Ve=(t,e)=>D(t,"name",{value:e,configurable:!0});var St=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Et=(t,e,o,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of wt(e))!Ct.call(t,n)&&n!==o&&D(t,n,{get:()=>e[n],enumerable:!(i=ze(e,n))||i.enumerable});return t};var Mt=(t,e,o)=>(o=t!=null?Re(kt(t)):{},Et(D(o,"default",{value:t,enumerable:!0}),t));var je=t=>[,,,Re(t?.[Be("metadata")]??null)],Ie=["class","method","getter","setter","accessor","field","value","get","set"],Z=t=>t!==void 0&&typeof t!="function"?B("Function expected"):t,Pt=(t,e,o,i,n)=>({kind:Ie[t],name:e,metadata:i,addInitializer:h=>o._?B("Already initialized"):n.push(Z(h||null))}),Nt=(t,e)=>At(e,Be("metadata"),t[3]),$=(t,e,o,i)=>{for(var n=0,h=t[e>>1],p=h&&h.length;n<p;n++)e&1?h[n].call(o):i=h[n].call(o,i);return i},E=(t,e,o,i,n,h)=>{var p,m,r,s,u,a=e&7,l=!!(e&8),c=!!(e&16),d=a>3?t.length+1:a?l?1:2:0,f=Ie[a+5],v=a>3&&(t[d-1]=[]),y=t[d]||(t[d]=[]),_=a&&(!c&&!l&&(n=n.prototype),a<5&&(a>3||!c)&&ze(a<4?n:{get[o](){return Fe(this,h)},set[o](b){return Ue(this,h,b)}},o));a?c&&a<4&&Ve(h,(a>2?"set ":a>1?"get ":"")+o):Ve(n,o);for(var A=i.length-1;A>=0;A--)s=Pt(a,o,r={},t[3],y),a&&(s.static=l,s.private=c,u=s.access={has:c?b=>Tt(n,b):b=>o in b},a^3&&(u.get=c?b=>(a^1?Fe:Ht)(b,n,a^4?h:_.get):b=>b[o]),a>2&&(u.set=c?(b,M)=>Ue(b,n,M,a^4?h:_.set):(b,M)=>b[o]=M)),m=(0, i[A])(a?a<4?c?h:_[f]:a>4?void 0:{get:_.get,set:_.set}:n,s),r._=1,a^4||m===void 0?Z(m)&&(a>4?v.unshift(m):a?c?h=m:_[f]=m:n=m):typeof m!="object"||m===null?B("Object expected"):(Z(p=m.get)&&(_.get=p),Z(p=m.set)&&(_.set=p),Z(p=m.init)&&v.unshift(p));return a||Nt(t,n),_&&D(n,o,_),c?a^4?h:_:n};var he=(t,e,o)=>e.has(t)||B("Cannot "+o),Tt=(t,e)=>Object(e)!==e?B('Cannot use the "in" operator on this value'):t.has(e),Fe=(t,e,o)=>(he(t,e,"read from private field"),o?o.call(t):e.get(t)),P=(t,e,o)=>e.has(t)?B("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,o),Ue=(t,e,o,i)=>(he(t,e,"write to private field"),i?i.call(t,o):e.set(t,o),o),Ht=(t,e,o)=>(he(t,e,"access private method"),o);var ht=St((ct,le)=>{(function(t,e){typeof define=="function"&&define.amd?define(e):typeof le=="object"&&le.exports?le.exports=e():t.numeral=e();})(ct,function(){var t,e,o="2.0.6",i={},n={},h={currentLocale:"en",zeroFormat:null,nullFormat:null,defaultFormat:"0,0",scalePercentBy100:!0},p={currentLocale:h.currentLocale,zeroFormat:h.zeroFormat,nullFormat:h.nullFormat,defaultFormat:h.defaultFormat,scalePercentBy100:h.scalePercentBy100};function m(r,s){this._input=r,this._value=s;}return t=function(r){var s,u,a,l;if(t.isNumeral(r))s=r.value();else if(r===0||typeof r>"u")s=0;else if(r===null||e.isNaN(r))s=null;else if(typeof r=="string")if(p.zeroFormat&&r===p.zeroFormat)s=0;else if(p.nullFormat&&r===p.nullFormat||!r.replace(/[^0-9]+/g,"").length)s=null;else {for(u in i)if(l=typeof i[u].regexps.unformat=="function"?i[u].regexps.unformat():i[u].regexps.unformat,l&&r.match(l)){a=i[u].unformat;break}a=a||t._.stringToNumber,s=a(r);}else s=Number(r)||null;return new m(r,s)},t.version=o,t.isNumeral=function(r){return r instanceof m},t._=e={numberToFormat:function(r,s,u){var a=n[t.options.currentLocale],l=!1,c=!1,d=0,f="",v=1e12,y=1e9,_=1e6,A=1e3,b="",M=!1,C,H,w,S,ce,Le,N;if(r=r||0,H=Math.abs(r),t._.includes(s,"(")?(l=!0,s=s.replace(/[\(|\)]/g,"")):(t._.includes(s,"+")||t._.includes(s,"-"))&&(ce=t._.includes(s,"+")?s.indexOf("+"):r<0?s.indexOf("-"):-1,s=s.replace(/[\+|\-]/g,"")),t._.includes(s,"a")&&(C=s.match(/a(k|m|b|t)?/),C=C?C[1]:!1,t._.includes(s," a")&&(f=" "),s=s.replace(new RegExp(f+"a[kmbt]?"),""),H>=v&&!C||C==="t"?(f+=a.abbreviations.trillion,r=r/v):H<v&&H>=y&&!C||C==="b"?(f+=a.abbreviations.billion,r=r/y):H<y&&H>=_&&!C||C==="m"?(f+=a.abbreviations.million,r=r/_):(H<_&&H>=A&&!C||C==="k")&&(f+=a.abbreviations.thousand,r=r/A)),t._.includes(s,"[.]")&&(c=!0,s=s.replace("[.]",".")),w=r.toString().split(".")[0],S=s.split(".")[1],Le=s.indexOf(","),d=(s.split(".")[0].split(",")[0].match(/0/g)||[]).length,S?(t._.includes(S,"[")?(S=S.replace("]",""),S=S.split("["),b=t._.toFixed(r,S[0].length+S[1].length,u,S[1].length)):b=t._.toFixed(r,S.length,u),w=b.split(".")[0],t._.includes(b,".")?b=a.delimiters.decimal+b.split(".")[1]:b="",c&&Number(b.slice(1))===0&&(b="")):w=t._.toFixed(r,0,u),f&&!C&&Number(w)>=1e3&&f!==a.abbreviations.trillion)switch(w=String(Number(w)/1e3),f){case a.abbreviations.thousand:f=a.abbreviations.million;break;case a.abbreviations.million:f=a.abbreviations.billion;break;case a.abbreviations.billion:f=a.abbreviations.trillion;break}if(t._.includes(w,"-")&&(w=w.slice(1),M=!0),w.length<d)for(var Oe=d-w.length;Oe>0;Oe--)w="0"+w;return Le>-1&&(w=w.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+a.delimiters.thousands)),s.indexOf(".")===0&&(w=""),N=w+b+(f||""),l?N=(l&&M?"(":"")+N+(l&&M?")":""):ce>=0?N=ce===0?(M?"-":"+")+N:N+(M?"-":"+"):M&&(N="-"+N),N},stringToNumber:function(r){var s=n[p.currentLocale],u=r,a={thousand:3,million:6,billion:9,trillion:12},l,c,f;if(p.zeroFormat&&r===p.zeroFormat)c=0;else if(p.nullFormat&&r===p.nullFormat||!r.replace(/[^0-9]+/g,"").length)c=null;else {c=1,s.delimiters.decimal!=="."&&(r=r.replace(/\./g,"").replace(s.delimiters.decimal,"."));for(l in a)if(f=new RegExp("[^a-zA-Z]"+s.abbreviations[l]+"(?:\\)|(\\"+s.currency.symbol+")?(?:\\))?)?$"),u.match(f)){c*=Math.pow(10,a[l]);break}c*=(r.split("-").length+Math.min(r.split("(").length-1,r.split(")").length-1))%2?1:-1,r=r.replace(/[^0-9\.]+/g,""),c*=Number(r);}return c},isNaN:function(r){return typeof r=="number"&&isNaN(r)},includes:function(r,s){return r.indexOf(s)!==-1},insert:function(r,s,u){return r.slice(0,u)+s+r.slice(u)},reduce:function(r,s){if(this===null)throw new TypeError("Array.prototype.reduce called on null or undefined");if(typeof s!="function")throw new TypeError(s+" is not a function");var u=Object(r),a=u.length>>>0,l=0,c;if(arguments.length===3)c=arguments[2];else {for(;l<a&&!(l in u);)l++;if(l>=a)throw new TypeError("Reduce of empty array with no initial value");c=u[l++];}for(;l<a;l++)l in u&&(c=s(c,u[l],l,u));return c},multiplier:function(r){var s=r.toString().split(".");return s.length<2?1:Math.pow(10,s[1].length)},correctionFactor:function(){var r=Array.prototype.slice.call(arguments);return r.reduce(function(s,u){var a=e.multiplier(u);return s>a?s:a},1)},toFixed:function(r,s,u,a){var l=r.toString().split("."),c=s-(a||0),d,f,v,y;return l.length===2?d=Math.min(Math.max(l[1].length,c),s):d=c,v=Math.pow(10,d),y=(u(r+"e+"+d)/v).toFixed(d),a>s-d&&(f=new RegExp("\\.?0{1,"+(a-(s-d))+"}$"),y=y.replace(f,"")),y}},t.options=p,t.formats=i,t.locales=n,t.locale=function(r){return r&&(p.currentLocale=r.toLowerCase()),p.currentLocale},t.localeData=function(r){if(!r)return n[p.currentLocale];if(r=r.toLowerCase(),!n[r])throw new Error("Unknown locale : "+r);return n[r]},t.reset=function(){for(var r in h)p[r]=h[r];},t.zeroFormat=function(r){p.zeroFormat=typeof r=="string"?r:null;},t.nullFormat=function(r){p.nullFormat=typeof r=="string"?r:null;},t.defaultFormat=function(r){p.defaultFormat=typeof r=="string"?r:"0.0";},t.register=function(r,s,u){if(s=s.toLowerCase(),this[r+"s"][s])throw new TypeError(s+" "+r+" already registered.");return this[r+"s"][s]=u,u},t.validate=function(r,s){var u,a,l,c,d,f,v,y;if(typeof r!="string"&&(r+="",console.warn&&console.warn("Numeral.js: Value is not string. It has been co-erced to: ",r)),r=r.trim(),r.match(/^\d+$/))return !0;if(r==="")return !1;try{v=t.localeData(s);}catch{v=t.localeData(t.locale());}return l=v.currency.symbol,d=v.abbreviations,u=v.delimiters.decimal,v.delimiters.thousands==="."?a="\\.":a=v.delimiters.thousands,y=r.match(/^[^\d]+/),y!==null&&(r=r.substr(1),y[0]!==l)||(y=r.match(/[^\d]+$/),y!==null&&(r=r.slice(0,-1),y[0]!==d.thousand&&y[0]!==d.million&&y[0]!==d.billion&&y[0]!==d.trillion))?!1:(f=new RegExp(a+"{2}"),r.match(/[^\d.,]/g)?!1:(c=r.split(u),c.length>2?!1:c.length<2?!!c[0].match(/^\d+.*\d$/)&&!c[0].match(f):c[0].length===1?!!c[0].match(/^\d+$/)&&!c[0].match(f)&&!!c[1].match(/^\d+$/):!!c[0].match(/^\d+.*\d$/)&&!c[0].match(f)&&!!c[1].match(/^\d+$/)))},t.fn=m.prototype={clone:function(){return t(this)},format:function(r,s){var u=this._value,a=r||p.defaultFormat,l,c,d;if(s=s||Math.round,u===0&&p.zeroFormat!==null)c=p.zeroFormat;else if(u===null&&p.nullFormat!==null)c=p.nullFormat;else {for(l in i)if(a.match(i[l].regexps.format)){d=i[l].format;break}d=d||t._.numberToFormat,c=d(u,a,s);}return c},value:function(){return this._value},input:function(){return this._input},set:function(r){return this._value=Number(r),this},add:function(r){var s=e.correctionFactor.call(null,this._value,r);function u(a,l,c,d){return a+Math.round(s*l)}return this._value=e.reduce([this._value,r],u,0)/s,this},subtract:function(r){var s=e.correctionFactor.call(null,this._value,r);function u(a,l,c,d){return a-Math.round(s*l)}return this._value=e.reduce([r],u,Math.round(this._value*s))/s,this},multiply:function(r){function s(u,a,l,c){var d=e.correctionFactor(u,a);return Math.round(u*d)*Math.round(a*d)/Math.round(d*d)}return this._value=e.reduce([this._value,r],s,1),this},divide:function(r){function s(u,a,l,c){var d=e.correctionFactor(u,a);return Math.round(u*d)/Math.round(a*d)}return this._value=e.reduce([this._value,r],s),this},difference:function(r){return Math.abs(t(this._value).subtract(r).value())}},t.register("locale","en",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(r){var s=r%10;return ~~(r%100/10)===1?"th":s===1?"st":s===2?"nd":s===3?"rd":"th"},currency:{symbol:"$"}}),function(){t.register("format","bps",{regexps:{format:/(BPS)/,unformat:/(BPS)/},format:function(r,s,u){var a=t._.includes(s," BPS")?" ":"",l;return r=r*1e4,s=s.replace(/\s?BPS/,""),l=t._.numberToFormat(r,s,u),t._.includes(l,")")?(l=l.split(""),l.splice(-1,0,a+"BPS"),l=l.join("")):l=l+a+"BPS",l},unformat:function(r){return +(t._.stringToNumber(r)*1e-4).toFixed(15)}});}(),function(){var r={base:1e3,suffixes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]},s={base:1024,suffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},u=r.suffixes.concat(s.suffixes.filter(function(l){return r.suffixes.indexOf(l)<0})),a=u.join("|");a="("+a.replace("B","B(?!PS)")+")",t.register("format","bytes",{regexps:{format:/([0\s]i?b)/,unformat:new RegExp(a)},format:function(l,c,d){var f,v=t._.includes(c,"ib")?s:r,y=t._.includes(c," b")||t._.includes(c," ib")?" ":"",_,A,b;for(c=c.replace(/\s?i?b/,""),_=0;_<=v.suffixes.length;_++)if(A=Math.pow(v.base,_),b=Math.pow(v.base,_+1),l===null||l===0||l>=A&&l<b){y+=v.suffixes[_],A>0&&(l=l/A);break}return f=t._.numberToFormat(l,c,d),f+y},unformat:function(l){var c=t._.stringToNumber(l),d,f;if(c){for(d=r.suffixes.length-1;d>=0;d--){if(t._.includes(l,r.suffixes[d])){f=Math.pow(r.base,d);break}if(t._.includes(l,s.suffixes[d])){f=Math.pow(s.base,d);break}}c*=f||1;}return c}});}(),function(){t.register("format","currency",{regexps:{format:/(\$)/},format:function(r,s,u){var a=t.locales[t.options.currentLocale],l={before:s.match(/^([\+|\-|\(|\s|\$]*)/)[0],after:s.match(/([\+|\-|\)|\s|\$]*)$/)[0]},c,d,f;for(s=s.replace(/\s?\$\s?/,""),c=t._.numberToFormat(r,s,u),r>=0?(l.before=l.before.replace(/[\-\(]/,""),l.after=l.after.replace(/[\-\)]/,"")):r<0&&!t._.includes(l.before,"-")&&!t._.includes(l.before,"(")&&(l.before="-"+l.before),f=0;f<l.before.length;f++)switch(d=l.before[f],d){case"$":c=t._.insert(c,a.currency.symbol,f);break;case" ":c=t._.insert(c," ",f+a.currency.symbol.length-1);break}for(f=l.after.length-1;f>=0;f--)switch(d=l.after[f],d){case"$":c=f===l.after.length-1?c+a.currency.symbol:t._.insert(c,a.currency.symbol,-(l.after.length-(1+f)));break;case" ":c=f===l.after.length-1?c+" ":t._.insert(c," ",-(l.after.length-(1+f)+a.currency.symbol.length-1));break}return c}});}(),function(){t.register("format","exponential",{regexps:{format:/(e\+|e-)/,unformat:/(e\+|e-)/},format:function(r,s,u){var a,l=typeof r=="number"&&!t._.isNaN(r)?r.toExponential():"0e+0",c=l.split("e");return s=s.replace(/e[\+|\-]{1}0/,""),a=t._.numberToFormat(Number(c[0]),s,u),a+"e"+c[1]},unformat:function(r){var s=t._.includes(r,"e+")?r.split("e+"):r.split("e-"),u=Number(s[0]),a=Number(s[1]);a=t._.includes(r,"e-")?a*=-1:a;function l(c,d,f,v){var y=t._.correctionFactor(c,d),_=c*y*(d*y)/(y*y);return _}return t._.reduce([u,Math.pow(10,a)],l,1)}});}(),function(){t.register("format","ordinal",{regexps:{format:/(o)/},format:function(r,s,u){var a=t.locales[t.options.currentLocale],l,c=t._.includes(s," o")?" ":"";return s=s.replace(/\s?o/,""),c+=a.ordinal(r),l=t._.numberToFormat(r,s,u),l+c}});}(),function(){t.register("format","percentage",{regexps:{format:/(%)/,unformat:/(%)/},format:function(r,s,u){var a=t._.includes(s," %")?" ":"",l;return t.options.scalePercentBy100&&(r=r*100),s=s.replace(/\s?\%/,""),l=t._.numberToFormat(r,s,u),t._.includes(l,")")?(l=l.split(""),l.splice(-1,0,a+"%"),l=l.join("")):l=l+a+"%",l},unformat:function(r){var s=t._.stringToNumber(r);return t.options.scalePercentBy100?s*.01:s}});}(),function(){t.register("format","time",{regexps:{format:/(:)/,unformat:/(:)/},format:function(r,s,u){var a=Math.floor(r/60/60),l=Math.floor((r-a*60*60)/60),c=Math.round(r-a*60*60-l*60);return a+":"+(l<10?"0"+l:l)+":"+(c<10?"0"+c:c)},unformat:function(r){var s=r.split(":"),u=0;return s.length===3?(u=u+Number(s[0])*60*60,u=u+Number(s[1])*60,u=u+Number(s[2])):s.length===2&&(u=u+Number(s[0])*60,u=u+Number(s[1])),Number(u)}});}(),t});});var te=globalThis,re=te.ShadowRoot&&(te.ShadyCSS===void 0||te.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ue=Symbol(),Ze=new WeakMap,q=class{constructor(e,o,i){if(this._$cssResult$=!0,i!==ue)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=o;}get styleSheet(){let e=this.o,o=this.t;if(re&&e===void 0){let i=o!==void 0&&o.length===1;i&&(e=Ze.get(o)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&Ze.set(o,e));}return e}toString(){return this.cssText}},De=t=>new q(typeof t=="string"?t:t+"",void 0,ue),pe=(t,...e)=>{let o=t.length===1?t[0]:e.reduce((i,n,h)=>i+(p=>{if(p._$cssResult$===!0)return p.cssText;if(typeof p=="number")return p;throw Error("Value passed to 'css' function must be a 'css' function result: "+p+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+t[h+1],t[0]);return new q(o,t,ue)},de=(t,e)=>{if(re)t.adoptedStyleSheets=e.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet);else for(let o of e){let i=document.createElement("style"),n=te.litNonce;n!==void 0&&i.setAttribute("nonce",n),i.textContent=o.cssText,t.appendChild(i);}},oe=re?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let o="";for(let i of e.cssRules)o+=i.cssText;return De(o)})(t):t;var{is:Lt,defineProperty:Ot,getOwnPropertyDescriptor:Vt,getOwnPropertyNames:Ft,getOwnPropertySymbols:Ut,getPrototypeOf:Rt}=Object,ie=globalThis,qe=ie.trustedTypes,zt=qe?qe.emptyScript:"",Bt=ie.reactiveElementPolyfillSupport,J=(t,e)=>t,W={toAttribute(t,e){switch(e){case Boolean:t=t?zt:null;break;case Object:case Array:t=t==null?t:JSON.stringify(t);}return t},fromAttribute(t,e){let o=t;switch(e){case Boolean:o=t!==null;break;case Number:o=t===null?null:Number(t);break;case Object:case Array:try{o=JSON.parse(t);}catch{o=null;}}return o}},se=(t,e)=>!Lt(t,e),Je={attribute:!0,type:String,converter:W,reflect:!1,hasChanged:se};Symbol.metadata??=Symbol("metadata"),ie.litPropertyMetadata??=new WeakMap;var T=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e);}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,o=Je){if(o.state&&(o.attribute=!1),this._$Ei(),this.elementProperties.set(e,o),!o.noAccessor){let i=Symbol(),n=this.getPropertyDescriptor(e,i,o);n!==void 0&&Ot(this.prototype,e,n);}}static getPropertyDescriptor(e,o,i){let{get:n,set:h}=Vt(this.prototype,e)??{get(){return this[o]},set(p){this[o]=p;}};return {get(){return n?.call(this)},set(p){let m=n?.call(this);h.call(this,p),this.requestUpdate(e,m,i);},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Je}static _$Ei(){if(this.hasOwnProperty(J("elementProperties")))return;let e=Rt(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties);}static finalize(){if(this.hasOwnProperty(J("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(J("properties"))){let o=this.properties,i=[...Ft(o),...Ut(o)];for(let n of i)this.createProperty(n,o[n]);}let e=this[Symbol.metadata];if(e!==null){let o=litPropertyMetadata.get(e);if(o!==void 0)for(let[i,n]of o)this.elementProperties.set(i,n);}this._$Eh=new Map;for(let[o,i]of this.elementProperties){let n=this._$Eu(o,i);n!==void 0&&this._$Eh.set(n,o);}this.elementStyles=this.finalizeStyles(this.styles);}static finalizeStyles(e){let o=[];if(Array.isArray(e)){let i=new Set(e.flat(1/0).reverse());for(let n of i)o.unshift(oe(n));}else e!==void 0&&o.push(oe(e));return o}static _$Eu(e,o){let i=o.attribute;return i===!1?void 0:typeof i=="string"?i:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev();}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this));}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.();}removeController(e){this._$EO?.delete(e);}_$E_(){let e=new Map,o=this.constructor.elementProperties;for(let i of o.keys())this.hasOwnProperty(i)&&(e.set(i,this[i]),delete this[i]);e.size>0&&(this._$Ep=e);}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return de(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.());}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.());}attributeChangedCallback(e,o,i){this._$AK(e,i);}_$EC(e,o){let i=this.constructor.elementProperties.get(e),n=this.constructor._$Eu(e,i);if(n!==void 0&&i.reflect===!0){let h=(i.converter?.toAttribute!==void 0?i.converter:W).toAttribute(o,i.type);this._$Em=e,h==null?this.removeAttribute(n):this.setAttribute(n,h),this._$Em=null;}}_$AK(e,o){let i=this.constructor,n=i._$Eh.get(e);if(n!==void 0&&this._$Em!==n){let h=i.getPropertyOptions(n),p=typeof h.converter=="function"?{fromAttribute:h.converter}:h.converter?.fromAttribute!==void 0?h.converter:W;this._$Em=n,this[n]=p.fromAttribute(o,h.type),this._$Em=null;}}requestUpdate(e,o,i){if(e!==void 0){if(i??=this.constructor.getPropertyOptions(e),!(i.hasChanged??se)(this[e],o))return;this.P(e,o,i);}this.isUpdatePending===!1&&(this._$ES=this._$ET());}P(e,o,i){this._$AL.has(e)||this._$AL.set(e,o),i.reflect===!0&&this._$Em!==e&&(this._$Ej??=new Set).add(e);}async _$ET(){this.isUpdatePending=!0;try{await this._$ES;}catch(o){Promise.reject(o);}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[n,h]of this._$Ep)this[n]=h;this._$Ep=void 0;}let i=this.constructor.elementProperties;if(i.size>0)for(let[n,h]of i)h.wrapped!==!0||this._$AL.has(n)||this[n]===void 0||this.P(n,this[n],h);}let e=!1,o=this._$AL;try{e=this.shouldUpdate(o),e?(this.willUpdate(o),this._$EO?.forEach(i=>i.hostUpdate?.()),this.update(o)):this._$EU();}catch(i){throw e=!1,this._$EU(),i}e&&this._$AE(o);}willUpdate(e){}_$AE(e){this._$EO?.forEach(o=>o.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e);}_$EU(){this._$AL=new Map,this.isUpdatePending=!1;}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return !0}update(e){this._$Ej&&=this._$Ej.forEach(o=>this._$EC(o,this[o])),this._$EU();}updated(e){}firstUpdated(e){}};T.elementStyles=[],T.shadowRootOptions={mode:"open"},T[J("elementProperties")]=new Map,T[J("finalized")]=new Map,Bt?.({ReactiveElement:T}),(ie.reactiveElementVersions??=[]).push("2.0.4");var ve=globalThis,ne=ve.trustedTypes,We=ne?ne.createPolicy("lit-html",{createHTML:t=>t}):void 0,et="$lit$",L=`lit$${Math.random().toFixed(9).slice(2)}$`,tt="?"+L,jt=`<${tt}>`,R=document,G=()=>R.createComment(""),X=t=>t===null||typeof t!="object"&&typeof t!="function",rt=Array.isArray,It=t=>rt(t)||typeof t?.[Symbol.iterator]=="function",fe=`[ | ||
} | ||
`}connectedCallback(){super.connectedCallback(),He(),this.fetchMarketData();}firstUpdated(o){super.firstUpdated(o),this.initTheme();}initTheme(){document.querySelector("html")?.setAttribute("theme",this.theme);}getUtmParams(){let o="embed",i=window.location!=window.parent.location?document.referrer:document.location.href;return `utm_medium=${o}&utm_source=${i}`}async fetchMarketData(){if(this.marketSlug){let o=await xe({slug:this.marketSlug});this._market=o;let i=this.getUtmParams();this._href=o.events?.length&&o.events[0]?.slug?`https://polymarket.com/event/${o.events[0].slug}/${o.slug}?${i}`:`https://polymarket.com/market/${o.slug}?${i}`;let n=o.outcomePrices[0]?parseFloat(o.outcomePrices[0]):0,h=Math.min(Math.max(n*100,0),100),m=[0,10,20,30,40,50,60,70,80,90,100].sort((r,s)=>Math.abs(r-h)-Math.abs(s-h))[0];this._probability=h,this._fillPathD=Kt[m.toFixed(0)];}}handleClick(){console.log({"document.location.href":document.location.href,"window.parent.location":window.parent.location,"window.location":window.location,"document.referrer":document.referrer});}render(){return this._market?$e` <div class="container" @click="${this.handleClick}"> | ||
`}connectedCallback(){super.connectedCallback(),He(),this.fetchMarketData();}firstUpdated(o){super.firstUpdated(o),this.initTheme();}initTheme(){document.querySelector("html")?.setAttribute("theme",this.theme);}getUtmParams(){let o="embed",i="market",n=window.location!=window.parent.location&&document.referrer?document.referrer:`${document.location.host}${document.location.pathname}`;return `utm_medium=${o}&utm_campaign=${i}&utm_source=${n}`}async fetchMarketData(){if(this.marketSlug){let o=await xe({slug:this.marketSlug});this._market=o;let i=this.getUtmParams();this._href=o.events?.length&&o.events[0]?.slug?`https://polymarket.com/event/${o.events[0].slug}/${o.slug}?${i}`:`https://polymarket.com/market/${o.slug}?${i}`;let n=o.outcomePrices[0]?parseFloat(o.outcomePrices[0]):0,h=Math.min(Math.max(n*100,0),100),m=[0,10,20,30,40,50,60,70,80,90,100].sort((r,s)=>Math.abs(r-h)-Math.abs(s-h))[0];this._probability=h,this._fillPathD=Kt[m.toFixed(0)];}}render(){return this._market?$e` <div class="container"> | ||
<div class="card-container"> | ||
@@ -340,0 +340,0 @@ <div class="top-row-container"> |
@@ -337,3 +337,3 @@ var Re=Object.create;var D=Object.defineProperty;var ze=Object.getOwnPropertyDescriptor;var wt=Object.getOwnPropertyNames;var kt=Object.getPrototypeOf,Ct=Object.prototype.hasOwnProperty;var Be=(t,e)=>(e=Symbol[t])?e:Symbol.for("Symbol."+t),B=t=>{throw TypeError(t)};var At=(t,e,o)=>e in t?D(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o;var Ve=(t,e)=>D(t,"name",{value:e,configurable:!0});var St=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Et=(t,e,o,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of wt(e))!Ct.call(t,n)&&n!==o&&D(t,n,{get:()=>e[n],enumerable:!(i=ze(e,n))||i.enumerable});return t};var Mt=(t,e,o)=>(o=t!=null?Re(kt(t)):{},Et(D(o,"default",{value:t,enumerable:!0}),t));var je=t=>[,,,Re(t?.[Be("metadata")]??null)],Ie=["class","method","getter","setter","accessor","field","value","get","set"],Z=t=>t!==void 0&&typeof t!="function"?B("Function expected"):t,Pt=(t,e,o,i,n)=>({kind:Ie[t],name:e,metadata:i,addInitializer:h=>o._?B("Already initialized"):n.push(Z(h||null))}),Nt=(t,e)=>At(e,Be("metadata"),t[3]),$=(t,e,o,i)=>{for(var n=0,h=t[e>>1],p=h&&h.length;n<p;n++)e&1?h[n].call(o):i=h[n].call(o,i);return i},E=(t,e,o,i,n,h)=>{var p,m,r,s,u,a=e&7,l=!!(e&8),c=!!(e&16),d=a>3?t.length+1:a?l?1:2:0,f=Ie[a+5],v=a>3&&(t[d-1]=[]),y=t[d]||(t[d]=[]),_=a&&(!c&&!l&&(n=n.prototype),a<5&&(a>3||!c)&&ze(a<4?n:{get[o](){return Fe(this,h)},set[o](b){return Ue(this,h,b)}},o));a?c&&a<4&&Ve(h,(a>2?"set ":a>1?"get ":"")+o):Ve(n,o);for(var A=i.length-1;A>=0;A--)s=Pt(a,o,r={},t[3],y),a&&(s.static=l,s.private=c,u=s.access={has:c?b=>Tt(n,b):b=>o in b},a^3&&(u.get=c?b=>(a^1?Fe:Ht)(b,n,a^4?h:_.get):b=>b[o]),a>2&&(u.set=c?(b,M)=>Ue(b,n,M,a^4?h:_.set):(b,M)=>b[o]=M)),m=(0, i[A])(a?a<4?c?h:_[f]:a>4?void 0:{get:_.get,set:_.set}:n,s),r._=1,a^4||m===void 0?Z(m)&&(a>4?v.unshift(m):a?c?h=m:_[f]=m:n=m):typeof m!="object"||m===null?B("Object expected"):(Z(p=m.get)&&(_.get=p),Z(p=m.set)&&(_.set=p),Z(p=m.init)&&v.unshift(p));return a||Nt(t,n),_&&D(n,o,_),c?a^4?h:_:n};var he=(t,e,o)=>e.has(t)||B("Cannot "+o),Tt=(t,e)=>Object(e)!==e?B('Cannot use the "in" operator on this value'):t.has(e),Fe=(t,e,o)=>(he(t,e,"read from private field"),o?o.call(t):e.get(t)),P=(t,e,o)=>e.has(t)?B("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,o),Ue=(t,e,o,i)=>(he(t,e,"write to private field"),i?i.call(t,o):e.set(t,o),o),Ht=(t,e,o)=>(he(t,e,"access private method"),o);var ht=St((ct,le)=>{(function(t,e){typeof define=="function"&&define.amd?define(e):typeof le=="object"&&le.exports?le.exports=e():t.numeral=e();})(ct,function(){var t,e,o="2.0.6",i={},n={},h={currentLocale:"en",zeroFormat:null,nullFormat:null,defaultFormat:"0,0",scalePercentBy100:!0},p={currentLocale:h.currentLocale,zeroFormat:h.zeroFormat,nullFormat:h.nullFormat,defaultFormat:h.defaultFormat,scalePercentBy100:h.scalePercentBy100};function m(r,s){this._input=r,this._value=s;}return t=function(r){var s,u,a,l;if(t.isNumeral(r))s=r.value();else if(r===0||typeof r>"u")s=0;else if(r===null||e.isNaN(r))s=null;else if(typeof r=="string")if(p.zeroFormat&&r===p.zeroFormat)s=0;else if(p.nullFormat&&r===p.nullFormat||!r.replace(/[^0-9]+/g,"").length)s=null;else {for(u in i)if(l=typeof i[u].regexps.unformat=="function"?i[u].regexps.unformat():i[u].regexps.unformat,l&&r.match(l)){a=i[u].unformat;break}a=a||t._.stringToNumber,s=a(r);}else s=Number(r)||null;return new m(r,s)},t.version=o,t.isNumeral=function(r){return r instanceof m},t._=e={numberToFormat:function(r,s,u){var a=n[t.options.currentLocale],l=!1,c=!1,d=0,f="",v=1e12,y=1e9,_=1e6,A=1e3,b="",M=!1,C,H,w,S,ce,Le,N;if(r=r||0,H=Math.abs(r),t._.includes(s,"(")?(l=!0,s=s.replace(/[\(|\)]/g,"")):(t._.includes(s,"+")||t._.includes(s,"-"))&&(ce=t._.includes(s,"+")?s.indexOf("+"):r<0?s.indexOf("-"):-1,s=s.replace(/[\+|\-]/g,"")),t._.includes(s,"a")&&(C=s.match(/a(k|m|b|t)?/),C=C?C[1]:!1,t._.includes(s," a")&&(f=" "),s=s.replace(new RegExp(f+"a[kmbt]?"),""),H>=v&&!C||C==="t"?(f+=a.abbreviations.trillion,r=r/v):H<v&&H>=y&&!C||C==="b"?(f+=a.abbreviations.billion,r=r/y):H<y&&H>=_&&!C||C==="m"?(f+=a.abbreviations.million,r=r/_):(H<_&&H>=A&&!C||C==="k")&&(f+=a.abbreviations.thousand,r=r/A)),t._.includes(s,"[.]")&&(c=!0,s=s.replace("[.]",".")),w=r.toString().split(".")[0],S=s.split(".")[1],Le=s.indexOf(","),d=(s.split(".")[0].split(",")[0].match(/0/g)||[]).length,S?(t._.includes(S,"[")?(S=S.replace("]",""),S=S.split("["),b=t._.toFixed(r,S[0].length+S[1].length,u,S[1].length)):b=t._.toFixed(r,S.length,u),w=b.split(".")[0],t._.includes(b,".")?b=a.delimiters.decimal+b.split(".")[1]:b="",c&&Number(b.slice(1))===0&&(b="")):w=t._.toFixed(r,0,u),f&&!C&&Number(w)>=1e3&&f!==a.abbreviations.trillion)switch(w=String(Number(w)/1e3),f){case a.abbreviations.thousand:f=a.abbreviations.million;break;case a.abbreviations.million:f=a.abbreviations.billion;break;case a.abbreviations.billion:f=a.abbreviations.trillion;break}if(t._.includes(w,"-")&&(w=w.slice(1),M=!0),w.length<d)for(var Oe=d-w.length;Oe>0;Oe--)w="0"+w;return Le>-1&&(w=w.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+a.delimiters.thousands)),s.indexOf(".")===0&&(w=""),N=w+b+(f||""),l?N=(l&&M?"(":"")+N+(l&&M?")":""):ce>=0?N=ce===0?(M?"-":"+")+N:N+(M?"-":"+"):M&&(N="-"+N),N},stringToNumber:function(r){var s=n[p.currentLocale],u=r,a={thousand:3,million:6,billion:9,trillion:12},l,c,f;if(p.zeroFormat&&r===p.zeroFormat)c=0;else if(p.nullFormat&&r===p.nullFormat||!r.replace(/[^0-9]+/g,"").length)c=null;else {c=1,s.delimiters.decimal!=="."&&(r=r.replace(/\./g,"").replace(s.delimiters.decimal,"."));for(l in a)if(f=new RegExp("[^a-zA-Z]"+s.abbreviations[l]+"(?:\\)|(\\"+s.currency.symbol+")?(?:\\))?)?$"),u.match(f)){c*=Math.pow(10,a[l]);break}c*=(r.split("-").length+Math.min(r.split("(").length-1,r.split(")").length-1))%2?1:-1,r=r.replace(/[^0-9\.]+/g,""),c*=Number(r);}return c},isNaN:function(r){return typeof r=="number"&&isNaN(r)},includes:function(r,s){return r.indexOf(s)!==-1},insert:function(r,s,u){return r.slice(0,u)+s+r.slice(u)},reduce:function(r,s){if(this===null)throw new TypeError("Array.prototype.reduce called on null or undefined");if(typeof s!="function")throw new TypeError(s+" is not a function");var u=Object(r),a=u.length>>>0,l=0,c;if(arguments.length===3)c=arguments[2];else {for(;l<a&&!(l in u);)l++;if(l>=a)throw new TypeError("Reduce of empty array with no initial value");c=u[l++];}for(;l<a;l++)l in u&&(c=s(c,u[l],l,u));return c},multiplier:function(r){var s=r.toString().split(".");return s.length<2?1:Math.pow(10,s[1].length)},correctionFactor:function(){var r=Array.prototype.slice.call(arguments);return r.reduce(function(s,u){var a=e.multiplier(u);return s>a?s:a},1)},toFixed:function(r,s,u,a){var l=r.toString().split("."),c=s-(a||0),d,f,v,y;return l.length===2?d=Math.min(Math.max(l[1].length,c),s):d=c,v=Math.pow(10,d),y=(u(r+"e+"+d)/v).toFixed(d),a>s-d&&(f=new RegExp("\\.?0{1,"+(a-(s-d))+"}$"),y=y.replace(f,"")),y}},t.options=p,t.formats=i,t.locales=n,t.locale=function(r){return r&&(p.currentLocale=r.toLowerCase()),p.currentLocale},t.localeData=function(r){if(!r)return n[p.currentLocale];if(r=r.toLowerCase(),!n[r])throw new Error("Unknown locale : "+r);return n[r]},t.reset=function(){for(var r in h)p[r]=h[r];},t.zeroFormat=function(r){p.zeroFormat=typeof r=="string"?r:null;},t.nullFormat=function(r){p.nullFormat=typeof r=="string"?r:null;},t.defaultFormat=function(r){p.defaultFormat=typeof r=="string"?r:"0.0";},t.register=function(r,s,u){if(s=s.toLowerCase(),this[r+"s"][s])throw new TypeError(s+" "+r+" already registered.");return this[r+"s"][s]=u,u},t.validate=function(r,s){var u,a,l,c,d,f,v,y;if(typeof r!="string"&&(r+="",console.warn&&console.warn("Numeral.js: Value is not string. It has been co-erced to: ",r)),r=r.trim(),r.match(/^\d+$/))return !0;if(r==="")return !1;try{v=t.localeData(s);}catch{v=t.localeData(t.locale());}return l=v.currency.symbol,d=v.abbreviations,u=v.delimiters.decimal,v.delimiters.thousands==="."?a="\\.":a=v.delimiters.thousands,y=r.match(/^[^\d]+/),y!==null&&(r=r.substr(1),y[0]!==l)||(y=r.match(/[^\d]+$/),y!==null&&(r=r.slice(0,-1),y[0]!==d.thousand&&y[0]!==d.million&&y[0]!==d.billion&&y[0]!==d.trillion))?!1:(f=new RegExp(a+"{2}"),r.match(/[^\d.,]/g)?!1:(c=r.split(u),c.length>2?!1:c.length<2?!!c[0].match(/^\d+.*\d$/)&&!c[0].match(f):c[0].length===1?!!c[0].match(/^\d+$/)&&!c[0].match(f)&&!!c[1].match(/^\d+$/):!!c[0].match(/^\d+.*\d$/)&&!c[0].match(f)&&!!c[1].match(/^\d+$/)))},t.fn=m.prototype={clone:function(){return t(this)},format:function(r,s){var u=this._value,a=r||p.defaultFormat,l,c,d;if(s=s||Math.round,u===0&&p.zeroFormat!==null)c=p.zeroFormat;else if(u===null&&p.nullFormat!==null)c=p.nullFormat;else {for(l in i)if(a.match(i[l].regexps.format)){d=i[l].format;break}d=d||t._.numberToFormat,c=d(u,a,s);}return c},value:function(){return this._value},input:function(){return this._input},set:function(r){return this._value=Number(r),this},add:function(r){var s=e.correctionFactor.call(null,this._value,r);function u(a,l,c,d){return a+Math.round(s*l)}return this._value=e.reduce([this._value,r],u,0)/s,this},subtract:function(r){var s=e.correctionFactor.call(null,this._value,r);function u(a,l,c,d){return a-Math.round(s*l)}return this._value=e.reduce([r],u,Math.round(this._value*s))/s,this},multiply:function(r){function s(u,a,l,c){var d=e.correctionFactor(u,a);return Math.round(u*d)*Math.round(a*d)/Math.round(d*d)}return this._value=e.reduce([this._value,r],s,1),this},divide:function(r){function s(u,a,l,c){var d=e.correctionFactor(u,a);return Math.round(u*d)/Math.round(a*d)}return this._value=e.reduce([this._value,r],s),this},difference:function(r){return Math.abs(t(this._value).subtract(r).value())}},t.register("locale","en",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(r){var s=r%10;return ~~(r%100/10)===1?"th":s===1?"st":s===2?"nd":s===3?"rd":"th"},currency:{symbol:"$"}}),function(){t.register("format","bps",{regexps:{format:/(BPS)/,unformat:/(BPS)/},format:function(r,s,u){var a=t._.includes(s," BPS")?" ":"",l;return r=r*1e4,s=s.replace(/\s?BPS/,""),l=t._.numberToFormat(r,s,u),t._.includes(l,")")?(l=l.split(""),l.splice(-1,0,a+"BPS"),l=l.join("")):l=l+a+"BPS",l},unformat:function(r){return +(t._.stringToNumber(r)*1e-4).toFixed(15)}});}(),function(){var r={base:1e3,suffixes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]},s={base:1024,suffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},u=r.suffixes.concat(s.suffixes.filter(function(l){return r.suffixes.indexOf(l)<0})),a=u.join("|");a="("+a.replace("B","B(?!PS)")+")",t.register("format","bytes",{regexps:{format:/([0\s]i?b)/,unformat:new RegExp(a)},format:function(l,c,d){var f,v=t._.includes(c,"ib")?s:r,y=t._.includes(c," b")||t._.includes(c," ib")?" ":"",_,A,b;for(c=c.replace(/\s?i?b/,""),_=0;_<=v.suffixes.length;_++)if(A=Math.pow(v.base,_),b=Math.pow(v.base,_+1),l===null||l===0||l>=A&&l<b){y+=v.suffixes[_],A>0&&(l=l/A);break}return f=t._.numberToFormat(l,c,d),f+y},unformat:function(l){var c=t._.stringToNumber(l),d,f;if(c){for(d=r.suffixes.length-1;d>=0;d--){if(t._.includes(l,r.suffixes[d])){f=Math.pow(r.base,d);break}if(t._.includes(l,s.suffixes[d])){f=Math.pow(s.base,d);break}}c*=f||1;}return c}});}(),function(){t.register("format","currency",{regexps:{format:/(\$)/},format:function(r,s,u){var a=t.locales[t.options.currentLocale],l={before:s.match(/^([\+|\-|\(|\s|\$]*)/)[0],after:s.match(/([\+|\-|\)|\s|\$]*)$/)[0]},c,d,f;for(s=s.replace(/\s?\$\s?/,""),c=t._.numberToFormat(r,s,u),r>=0?(l.before=l.before.replace(/[\-\(]/,""),l.after=l.after.replace(/[\-\)]/,"")):r<0&&!t._.includes(l.before,"-")&&!t._.includes(l.before,"(")&&(l.before="-"+l.before),f=0;f<l.before.length;f++)switch(d=l.before[f],d){case"$":c=t._.insert(c,a.currency.symbol,f);break;case" ":c=t._.insert(c," ",f+a.currency.symbol.length-1);break}for(f=l.after.length-1;f>=0;f--)switch(d=l.after[f],d){case"$":c=f===l.after.length-1?c+a.currency.symbol:t._.insert(c,a.currency.symbol,-(l.after.length-(1+f)));break;case" ":c=f===l.after.length-1?c+" ":t._.insert(c," ",-(l.after.length-(1+f)+a.currency.symbol.length-1));break}return c}});}(),function(){t.register("format","exponential",{regexps:{format:/(e\+|e-)/,unformat:/(e\+|e-)/},format:function(r,s,u){var a,l=typeof r=="number"&&!t._.isNaN(r)?r.toExponential():"0e+0",c=l.split("e");return s=s.replace(/e[\+|\-]{1}0/,""),a=t._.numberToFormat(Number(c[0]),s,u),a+"e"+c[1]},unformat:function(r){var s=t._.includes(r,"e+")?r.split("e+"):r.split("e-"),u=Number(s[0]),a=Number(s[1]);a=t._.includes(r,"e-")?a*=-1:a;function l(c,d,f,v){var y=t._.correctionFactor(c,d),_=c*y*(d*y)/(y*y);return _}return t._.reduce([u,Math.pow(10,a)],l,1)}});}(),function(){t.register("format","ordinal",{regexps:{format:/(o)/},format:function(r,s,u){var a=t.locales[t.options.currentLocale],l,c=t._.includes(s," o")?" ":"";return s=s.replace(/\s?o/,""),c+=a.ordinal(r),l=t._.numberToFormat(r,s,u),l+c}});}(),function(){t.register("format","percentage",{regexps:{format:/(%)/,unformat:/(%)/},format:function(r,s,u){var a=t._.includes(s," %")?" ":"",l;return t.options.scalePercentBy100&&(r=r*100),s=s.replace(/\s?\%/,""),l=t._.numberToFormat(r,s,u),t._.includes(l,")")?(l=l.split(""),l.splice(-1,0,a+"%"),l=l.join("")):l=l+a+"%",l},unformat:function(r){var s=t._.stringToNumber(r);return t.options.scalePercentBy100?s*.01:s}});}(),function(){t.register("format","time",{regexps:{format:/(:)/,unformat:/(:)/},format:function(r,s,u){var a=Math.floor(r/60/60),l=Math.floor((r-a*60*60)/60),c=Math.round(r-a*60*60-l*60);return a+":"+(l<10?"0"+l:l)+":"+(c<10?"0"+c:c)},unformat:function(r){var s=r.split(":"),u=0;return s.length===3?(u=u+Number(s[0])*60*60,u=u+Number(s[1])*60,u=u+Number(s[2])):s.length===2&&(u=u+Number(s[0])*60,u=u+Number(s[1])),Number(u)}});}(),t});});var te=globalThis,re=te.ShadowRoot&&(te.ShadyCSS===void 0||te.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ue=Symbol(),Ze=new WeakMap,q=class{constructor(e,o,i){if(this._$cssResult$=!0,i!==ue)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=o;}get styleSheet(){let e=this.o,o=this.t;if(re&&e===void 0){let i=o!==void 0&&o.length===1;i&&(e=Ze.get(o)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&Ze.set(o,e));}return e}toString(){return this.cssText}},De=t=>new q(typeof t=="string"?t:t+"",void 0,ue),pe=(t,...e)=>{let o=t.length===1?t[0]:e.reduce((i,n,h)=>i+(p=>{if(p._$cssResult$===!0)return p.cssText;if(typeof p=="number")return p;throw Error("Value passed to 'css' function must be a 'css' function result: "+p+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+t[h+1],t[0]);return new q(o,t,ue)},de=(t,e)=>{if(re)t.adoptedStyleSheets=e.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet);else for(let o of e){let i=document.createElement("style"),n=te.litNonce;n!==void 0&&i.setAttribute("nonce",n),i.textContent=o.cssText,t.appendChild(i);}},oe=re?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let o="";for(let i of e.cssRules)o+=i.cssText;return De(o)})(t):t;var{is:Lt,defineProperty:Ot,getOwnPropertyDescriptor:Vt,getOwnPropertyNames:Ft,getOwnPropertySymbols:Ut,getPrototypeOf:Rt}=Object,ie=globalThis,qe=ie.trustedTypes,zt=qe?qe.emptyScript:"",Bt=ie.reactiveElementPolyfillSupport,J=(t,e)=>t,W={toAttribute(t,e){switch(e){case Boolean:t=t?zt:null;break;case Object:case Array:t=t==null?t:JSON.stringify(t);}return t},fromAttribute(t,e){let o=t;switch(e){case Boolean:o=t!==null;break;case Number:o=t===null?null:Number(t);break;case Object:case Array:try{o=JSON.parse(t);}catch{o=null;}}return o}},se=(t,e)=>!Lt(t,e),Je={attribute:!0,type:String,converter:W,reflect:!1,hasChanged:se};Symbol.metadata??=Symbol("metadata"),ie.litPropertyMetadata??=new WeakMap;var T=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e);}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,o=Je){if(o.state&&(o.attribute=!1),this._$Ei(),this.elementProperties.set(e,o),!o.noAccessor){let i=Symbol(),n=this.getPropertyDescriptor(e,i,o);n!==void 0&&Ot(this.prototype,e,n);}}static getPropertyDescriptor(e,o,i){let{get:n,set:h}=Vt(this.prototype,e)??{get(){return this[o]},set(p){this[o]=p;}};return {get(){return n?.call(this)},set(p){let m=n?.call(this);h.call(this,p),this.requestUpdate(e,m,i);},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Je}static _$Ei(){if(this.hasOwnProperty(J("elementProperties")))return;let e=Rt(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties);}static finalize(){if(this.hasOwnProperty(J("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(J("properties"))){let o=this.properties,i=[...Ft(o),...Ut(o)];for(let n of i)this.createProperty(n,o[n]);}let e=this[Symbol.metadata];if(e!==null){let o=litPropertyMetadata.get(e);if(o!==void 0)for(let[i,n]of o)this.elementProperties.set(i,n);}this._$Eh=new Map;for(let[o,i]of this.elementProperties){let n=this._$Eu(o,i);n!==void 0&&this._$Eh.set(n,o);}this.elementStyles=this.finalizeStyles(this.styles);}static finalizeStyles(e){let o=[];if(Array.isArray(e)){let i=new Set(e.flat(1/0).reverse());for(let n of i)o.unshift(oe(n));}else e!==void 0&&o.push(oe(e));return o}static _$Eu(e,o){let i=o.attribute;return i===!1?void 0:typeof i=="string"?i:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev();}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this));}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.();}removeController(e){this._$EO?.delete(e);}_$E_(){let e=new Map,o=this.constructor.elementProperties;for(let i of o.keys())this.hasOwnProperty(i)&&(e.set(i,this[i]),delete this[i]);e.size>0&&(this._$Ep=e);}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return de(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.());}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.());}attributeChangedCallback(e,o,i){this._$AK(e,i);}_$EC(e,o){let i=this.constructor.elementProperties.get(e),n=this.constructor._$Eu(e,i);if(n!==void 0&&i.reflect===!0){let h=(i.converter?.toAttribute!==void 0?i.converter:W).toAttribute(o,i.type);this._$Em=e,h==null?this.removeAttribute(n):this.setAttribute(n,h),this._$Em=null;}}_$AK(e,o){let i=this.constructor,n=i._$Eh.get(e);if(n!==void 0&&this._$Em!==n){let h=i.getPropertyOptions(n),p=typeof h.converter=="function"?{fromAttribute:h.converter}:h.converter?.fromAttribute!==void 0?h.converter:W;this._$Em=n,this[n]=p.fromAttribute(o,h.type),this._$Em=null;}}requestUpdate(e,o,i){if(e!==void 0){if(i??=this.constructor.getPropertyOptions(e),!(i.hasChanged??se)(this[e],o))return;this.P(e,o,i);}this.isUpdatePending===!1&&(this._$ES=this._$ET());}P(e,o,i){this._$AL.has(e)||this._$AL.set(e,o),i.reflect===!0&&this._$Em!==e&&(this._$Ej??=new Set).add(e);}async _$ET(){this.isUpdatePending=!0;try{await this._$ES;}catch(o){Promise.reject(o);}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[n,h]of this._$Ep)this[n]=h;this._$Ep=void 0;}let i=this.constructor.elementProperties;if(i.size>0)for(let[n,h]of i)h.wrapped!==!0||this._$AL.has(n)||this[n]===void 0||this.P(n,this[n],h);}let e=!1,o=this._$AL;try{e=this.shouldUpdate(o),e?(this.willUpdate(o),this._$EO?.forEach(i=>i.hostUpdate?.()),this.update(o)):this._$EU();}catch(i){throw e=!1,this._$EU(),i}e&&this._$AE(o);}willUpdate(e){}_$AE(e){this._$EO?.forEach(o=>o.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e);}_$EU(){this._$AL=new Map,this.isUpdatePending=!1;}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return !0}update(e){this._$Ej&&=this._$Ej.forEach(o=>this._$EC(o,this[o])),this._$EU();}updated(e){}firstUpdated(e){}};T.elementStyles=[],T.shadowRootOptions={mode:"open"},T[J("elementProperties")]=new Map,T[J("finalized")]=new Map,Bt?.({ReactiveElement:T}),(ie.reactiveElementVersions??=[]).push("2.0.4");var ve=globalThis,ne=ve.trustedTypes,We=ne?ne.createPolicy("lit-html",{createHTML:t=>t}):void 0,et="$lit$",L=`lit$${Math.random().toFixed(9).slice(2)}$`,tt="?"+L,jt=`<${tt}>`,R=document,G=()=>R.createComment(""),X=t=>t===null||typeof t!="object"&&typeof t!="function",rt=Array.isArray,It=t=>rt(t)||typeof t?.[Symbol.iterator]=="function",fe=`[ | ||
} | ||
`}connectedCallback(){super.connectedCallback(),He(),this.fetchMarketData();}firstUpdated(o){super.firstUpdated(o),this.initTheme();}initTheme(){document.querySelector("html")?.setAttribute("theme",this.theme);}getUtmParams(){let o="embed",i=window.location!=window.parent.location?document.referrer:document.location.href;return `utm_medium=${o}&utm_source=${i}`}async fetchMarketData(){if(this.marketSlug){let o=await xe({slug:this.marketSlug});this._market=o;let i=this.getUtmParams();this._href=o.events?.length&&o.events[0]?.slug?`https://polymarket.com/event/${o.events[0].slug}/${o.slug}?${i}`:`https://polymarket.com/market/${o.slug}?${i}`;let n=o.outcomePrices[0]?parseFloat(o.outcomePrices[0]):0,h=Math.min(Math.max(n*100,0),100),m=[0,10,20,30,40,50,60,70,80,90,100].sort((r,s)=>Math.abs(r-h)-Math.abs(s-h))[0];this._probability=h,this._fillPathD=Kt[m.toFixed(0)];}}handleClick(){console.log({"document.location.href":document.location.href,"window.parent.location":window.parent.location,"window.location":window.location,"document.referrer":document.referrer});}render(){return this._market?$e` <div class="container" @click="${this.handleClick}"> | ||
`}connectedCallback(){super.connectedCallback(),He(),this.fetchMarketData();}firstUpdated(o){super.firstUpdated(o),this.initTheme();}initTheme(){document.querySelector("html")?.setAttribute("theme",this.theme);}getUtmParams(){let o="embed",i="market",n=window.location!=window.parent.location&&document.referrer?document.referrer:`${document.location.host}${document.location.pathname}`;return `utm_medium=${o}&utm_campaign=${i}&utm_source=${n}`}async fetchMarketData(){if(this.marketSlug){let o=await xe({slug:this.marketSlug});this._market=o;let i=this.getUtmParams();this._href=o.events?.length&&o.events[0]?.slug?`https://polymarket.com/event/${o.events[0].slug}/${o.slug}?${i}`:`https://polymarket.com/market/${o.slug}?${i}`;let n=o.outcomePrices[0]?parseFloat(o.outcomePrices[0]):0,h=Math.min(Math.max(n*100,0),100),m=[0,10,20,30,40,50,60,70,80,90,100].sort((r,s)=>Math.abs(r-h)-Math.abs(s-h))[0];this._probability=h,this._fillPathD=Kt[m.toFixed(0)];}}render(){return this._market?$e` <div class="container"> | ||
<div class="card-container"> | ||
@@ -340,0 +340,0 @@ <div class="top-row-container"> |
{ | ||
"name": "@polymarket/embeds", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Web Components for Polymarket", | ||
@@ -5,0 +5,0 @@ "type": "module", |
@@ -447,8 +447,9 @@ import { css, LitElement, html, CSSResult, PropertyValues } from "lit"; | ||
const utmMedium = "embed"; | ||
const utmCampaign = "market"; | ||
const utmSource = | ||
window.location != window.parent.location | ||
window.location != window.parent.location && !!document.referrer | ||
? document.referrer | ||
: document.location.href; | ||
: `${document.location.host}${document.location.pathname}`; | ||
return `utm_medium=${utmMedium}&utm_source=${utmSource}`; | ||
return `utm_medium=${utmMedium}&utm_campaign=${utmCampaign}&utm_source=${utmSource}`; | ||
} | ||
@@ -491,11 +492,2 @@ | ||
handleClick() { | ||
console.log({ | ||
"document.location.href": document.location.href, | ||
"window.parent.location": window.parent.location, | ||
"window.location": window.location, | ||
"document.referrer": document.referrer, | ||
}); | ||
} | ||
override render() { | ||
@@ -505,3 +497,3 @@ if (!this._market) { | ||
} | ||
return html` <div class="container" @click="${this.handleClick}"> | ||
return html` <div class="container"> | ||
<div class="card-container"> | ||
@@ -508,0 +500,0 @@ <div class="top-row-container"> |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2001062
4374