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BACZ2W,GAAgBtX,KAAK6F,GACpB,gBAAC,KAAqB,CAACA,KAAMA,EAAMgM,IAAKhM,EAAKxG,aAKpD+X,IAAgBA,GAAa+B,eAAerU,OAAS,GACpD,uBAAKnE,UAAU,iBACb,qBAAGA,UAAU,uBAAqB,yBAClC,uBAAKA,UAAU,8BACZyW,GAAa+B,eAAenZ,KAAK6F,GAChC,gBAAC,KAAqB,CAACA,KAAMA,EAAMgM,IAAKhM,EAAKxG,aAKpD+X,IAAgBA,GAAagC,oBAAoBtU,OAAS,GACzD,uBAAKnE,UAAU,iBACb,qBAAGA,UAAU,uBAAqB,8BAGlC,uBAAKA,UAAU,8BACZyW,GAAagC,oBAAoBpZ,KAAK6F,GACrC,gBAAC,KAAqB,CAACA,KAAMA,EAAMgM,IAAKhM,EAAKxG,gBASzDsD,GAAW0Q,IACX,uBAAK1S,UAAU,WACb,qBAAGA,UAAU,aAAa0S,KAG9B,gBAAC,IAAM,QAId,C","sources":["webpack://nuance/./src/nuance_assets/components/comments/_comments.scss","webpack://nuance/./src/nuance_assets/components/premium-article-info/_premium-article-info.scss","webpack://nuance/./src/nuance_assets/UI/read-article-sidebar/read-article-sidebar.tsx","webpack://nuance/./src/nuance_assets/UI/copy-article/copy-article.tsx","webpack://nuance/./src/nuance_assets/UI/reader-and-author-edit/reader-and-author-edit.tsx","webpack://nuance/./src/nuance_assets/UI/report-article/report-article.tsx","webpack://nuance/./src/nuance_assets/UI/clap-button/clap-button.tsx","webpack://nuance/./src/nuance_assets/components/post-information/post-information.tsx","webpack://nuance/./src/nuance_assets/components/premium-article-info/_premium-article-info.scss?5bf2","webpack://nuance/./src/nuance_assets/shared/ext-utils.ts","webpack://nuance/./src/nuance_assets/components/premium-article-info/premium-article-info.tsx","webpack://nuance/./src/nuance_assets/components/comments/_comments.scss?b48e","webpack://nuance/./src/nuance_assets/components/comments/write-comments.tsx","webpack://nuance/./src/nuance_assets/components/comments/comments.tsx","webpack://nuance/./src/nuance_assets/screens/read-article/read-article.tsx"],"sourcesContent":["// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".comment{position:relative;display:flex;flex-direction:column;margin:32px 0px 0px 0px}.comment a{color:#00e;text-decoration:none;cursor:pointer}.comment a:hover{color:#00b}.comment .comment.reply::before{content:\\\"\\\";position:absolute;left:-32px;top:-70px;bottom:0;width:1px;background:#ccc}.comment .user-icon{width:28px;height:28px;background-color:currentColor;border-radius:50%;margin-right:16px}.comment .username{display:flex;font-weight:bold;color:#00113e}.comment .username .verified-badge{margin-left:5px}.comment .username-dark{font-weight:bold;color:#fff}.comment .content{margin:10px 0px 0px 44px;color:currentColor}.comment .time{font-size:.8rem;color:#888;margin-right:10px}.comment .actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:10px;color:#303e84;margin-left:44px}.comment .actions.dark{color:#fff;border-bottom:none}.comment .actions button{display:flex;align-items:center;gap:5px;background:none;border:none;cursor:pointer;color:#303e84;transition:color .3s;font-size:12px}.comment .actions button.dark{color:#888}.comment .actions button.voted{background:rgba(27,193,240,.2);border-radius:100px}.comment .actions button.active{background:rgba(27,193,240,.2);border-radius:100px}.comment .actions button.edit{color:#3684d9}@media(hover: hover){.comment .actions button:hover{background:rgba(27,193,240,.2);border-radius:100px}.comment .actions button:hover.voted{background:rgba(67,223,186,.2)}.comment .actions button:hover.edit{color:#3684d9}}.comment .actions button .icon{width:16px;height:16px}.comment .actions button .comment-text{color:#19192e;font-size:12px;font-weight:400;line-height:18px}.comment .actions button .comment-control-text{font-size:12px;font-weight:400;line-height:18px;color:#303e84;border-bottom:none}.comment .actions button .comment-control-text.dark{color:#888}.comment .actions button .comment-control-text.edit{color:#3684d9}@media(max-width: 1089px){.comment .actions button{padding:2px}.comment .actions button .comment-text{display:none}.comment .actions button .comment-control-text{display:none}.comment .actions button.voted{border-radius:2px}.comment .actions button.active{border-radius:2px;background:rgba(27,193,240,.2)}}.comment.reply{margin-left:44px;margin-top:32px}.comment.reply::before{content:\\\"\\\";position:absolute;left:-20px;top:0;bottom:0;width:1px;background-color:#ccc}.comment .comment-avatar-and-name{display:flex;align-items:center;justify-content:flex-start;flex-direction:row}@media(min-width: 768px){.comment .comment-avatar-and-name{flex-direction:row;justify-content:flex-start}}.comment .comment-header-container{display:flex;align-items:flex-start;justify-content:space-between;flex-direction:row}@media(min-width: 768px){.comment .comment-header-container{display:flex;align-items:flex-start;justify-content:space-between;flex-direction:row}}.comment .icon{display:inline-block;width:24px;height:24px;vertical-align:middle;fill:currentColor}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/nuance_assets/components/comments/_comments.scss\",\"webpack://./src/nuance_assets/shared/styles/_Colors.scss\"],\"names\":[],\"mappings\":\"AAEA,SAaI,iBAAA,CACA,YAAA,CACA,qBAAA,CAEA,uBAAA,CAfD,WACC,UAAA,CACA,oBAAA,CACA,cAAA,CAEA,iBACI,UAAA,CAWJ,gCACI,UAAA,CACA,iBAAA,CACA,UAAA,CACA,SAAA,CACA,QAAA,CACA,SAAA,CACA,eAAA,CAKJ,oBACI,UAAA,CACA,WAAA,CACA,6BAAA,CACA,iBAAA,CACA,iBAAA,CAGJ,mBACI,YAAA,CACA,gBAAA,CACA,aCpCa,CDsCb,mCACI,eAAA,CAIR,wBACI,gBAAA,CACA,UC3BkB,CD8BtB,kBACI,wBAAA,CACA,kBAAA,CAGJ,eACI,eAAA,CACA,UAAA,CACA,iBAAA,CAGJ,kBACI,YAAA,CACA,cAAA,CACA,QAAA,CACA,eAAA,CACA,aAAA,CACA,gBAAA,CAEA,uBACI,UClDc,CDmDd,kBAAA,CAIJ,yBACI,YAAA,CACA,kBAAA,CACA,OAAA,CACA,eAAA,CACA,WAAA,CACA,cAAA,CACA,aAAA,CACA,oBAAA,CACA,cAAA,CAEA,8BACI,UCnBD,CDqBH,+BACI,8BAAA,CACA,mBAAA,CAGJ,gCACI,8BAAA,CACA,mBAAA,CAGJ,8BACI,aC/DS,CDkEb,qBACA,+BACI,8BAAA,CACA,mBAAA,CAEA,qCACI,8BAAA,CAEJ,oCACI,aC3EK,CAAA,CDgFb,+BACI,UAAA,CACA,WAAA,CAIJ,uCACI,aAAA,CAEA,cAAA,CACA,eAAA,CACA,gBAAA,CAGJ,+CACI,cAAA,CACA,eAAA,CACA,gBAAA,CACA,aAAA,CACA,kBAAA,CAEA,oDACI,UCvEL,CDyEC,oDACI,aCzGK,CD8Gb,0BAxEJ,yBAyEQ,WAAA,CAEA,uCACI,YAAA,CAEJ,+CACI,YAAA,CAKE,+BACE,iBAAA,CAEH,gCACG,iBAAA,CACA,8BAAA,CAAA,CAMpB,eACI,gBAAA,CACA,eAAA,CAGJ,uBACI,UAAA,CACA,iBAAA,CACA,UAAA,CACA,KAAA,CACA,QAAA,CACA,SAAA,CACA,qBAAA,CAGJ,kCACI,YAAA,CACA,kBAAA,CACA,0BAAA,CACA,kBAAA,CAEA,yBANJ,kCAQQ,kBAAA,CACA,0BAAA,CAAA,CAIR,mCACI,YAAA,CACA,sBAAA,CACA,6BAAA,CACA,kBAAA,CAEA,yBANJ,mCAOQ,YAAA,CACA,sBAAA,CACA,6BAAA,CACA,kBAAA,CAAA,CAKR,eACI,oBAAA,CACA,UAAA,CACA,WAAA,CACA,qBAAA,CACA,iBAAA\",\"sourcesContent\":[\"@import '../../shared/styles/Colors';\\n\\n.comment {\\n\\n   a{\\n    color: #00e;\\n    text-decoration: none;\\n    cursor: pointer;\\n    \\n    &:hover {\\n        color: darken(#00e, 10%);\\n    }\\n   }\\n\\n\\n    position: relative;\\n    display: flex;\\n    flex-direction: column;\\n\\n    margin: 32px 0px 0px 0px;\\n\\n    .comment.reply::before {\\n        content: '';\\n        position: absolute;\\n        left: -32px;\\n        top: -70px;\\n        bottom: 0;\\n        width: 1px;\\n        background: #ccc;\\n    }\\n\\n\\n\\n    .user-icon {\\n        width: 28px;\\n        height: 28px;\\n        background-color: currentColor;\\n        border-radius: 50%;\\n        margin-right: 16px;\\n    }\\n\\n    .username {\\n        display: flex;\\n        font-weight: bold;\\n        color: $primary-text-color;\\n\\n        .verified-badge {\\n            margin-left: 5px;\\n        }\\n    }\\n\\n    .username-dark {\\n        font-weight: bold;\\n        color: $dark-primary-text-color;\\n    }\\n\\n    .content {\\n        margin: 10px 0px 0px 44px;\\n        color: currentColor;\\n    }\\n\\n    .time {\\n        font-size: 0.8rem;\\n        color: #888;\\n        margin-right: 10px;\\n    }\\n\\n    .actions {\\n        display: flex;\\n        flex-wrap: wrap;\\n        gap: 10px;\\n        margin-top: 10px;\\n        color: #303E84;\\n        margin-left: 44px;\\n\\n        &.dark {\\n            color: $dark-primary-text-color;\\n            border-bottom: none;\\n            \\n        }\\n\\n        button {\\n            display: flex;\\n            align-items: center;\\n            gap: 5px;\\n            background: none;\\n            border: none;\\n            cursor: pointer;\\n            color: #303E84;\\n            transition: color 0.3s;\\n            font-size: 12px;\\n\\n            &.dark {\\n                color: $border-tags2;\\n            }\\n            &.voted{\\n                background: rgba(27, 193, 240, 0.2);\\n                border-radius: 100px;\\n            }\\n\\n            &.active {\\n                background: rgba(27, 193, 240, 0.2);\\n                border-radius: 100px;\\n            }\\n\\n            &.edit {\\n                color: $edit-comment-highlight;\\n            }\\n\\n            @media (hover: hover) {\\n            &:hover {\\n                background: rgba(27, 193, 240, 0.2);\\n                border-radius: 100px;\\n\\n                &.voted{\\n                    background: #43DFBA33;\\n                }\\n                &.edit {\\n                    color: $edit-comment-highlight;\\n                }\\n            }\\n        }\\n\\n            .icon {\\n                width: 16px;\\n                height: 16px;\\n\\n            }\\n\\n            .comment-text {\\n                color: #19192E;\\n\\n                font-size: 12px;\\n                font-weight: 400;\\n                line-height: 18px;\\n            }\\n\\n            .comment-control-text{\\n                font-size: 12px;\\n                font-weight: 400;\\n                line-height: 18px;\\n                color: #303E84;\\n                border-bottom: none;\\n\\n                &.dark {\\n                    color: $border-tags2;\\n                }\\n                &.edit {\\n                    color: $edit-comment-highlight;\\n                }\\n\\n            }\\n\\n            @media (max-width: 1089px) {\\n                padding: 2px;\\n\\n                .comment-text {\\n                    display: none; // Hide the text span\\n                }\\n                .comment-control-text {\\n                    display: none; \\n                }\\n               \\n                  \\n                    \\n                      &.voted{\\n                        border-radius: 2px;\\n                      }\\n                     &.active{\\n                        border-radius: 2px;\\n                        background: rgba(27, 193, 240, 0.2);\\n                     }\\n            }\\n        }\\n    }\\n\\n    &.reply {\\n        margin-left: 44px;\\n        margin-top: 32px;\\n    }\\n\\n    &.reply::before {\\n        content: '';\\n        position: absolute;\\n        left: -20px;\\n        top: 0;\\n        bottom: 0;\\n        width: 1px;\\n        background-color: #ccc;\\n    }\\n\\n    .comment-avatar-and-name {\\n        display: flex;\\n        align-items: center;\\n        justify-content: flex-start;\\n        flex-direction: row;\\n\\n        @media (min-width: 768px) {\\n\\n            flex-direction: row;\\n            justify-content: flex-start;\\n        }\\n    }\\n\\n    .comment-header-container {\\n        display: flex;\\n        align-items: flex-start;\\n        justify-content: space-between;\\n        flex-direction: row;\\n\\n        @media (min-width: 768px) {\\n            display: flex;\\n            align-items: flex-start;\\n            justify-content: space-between;\\n            flex-direction: row;\\n\\n        }\\n    }\\n\\n    .icon {\\n        display: inline-block;\\n        width: 24px;\\n        height: 24px;\\n        vertical-align: middle;\\n        fill: currentColor;\\n    }\\n}\",\"// Theme colors\\n$primary-color: #151451;\\n$accent-color: #02c3a1;\\n$second-accent-color: #43dfba;\\n$subtitle-text: #687487;\\n$upload-picture-color: #cafff2;\\n\\n// Text colors\\n$primary-text-color: #00113e;\\n$tag-text-color: #666666;\\n$paragraph-text-color: #b2b2b2;\\n$route-text-color: #00113e;\\n$quote-color: rgba(0, 17, 62, 0.8);\\n$input-text-color: #4c4c52;\\n$edit-profile-input-text-color: #19192E;\\n$lighter-text-color: #999;\\n$lighter-content-text-color: #666;\\n\\n\\n// Background colors\\n$primary-background-color: #ffffff;\\n$selected-background-color: #d4d4d4;\\n$link-background: #f2f2f2;\\n\\n//dark-mode\\n$dark-primary-background-color: rgb(21, 20, 81);\\n$dark-primary-text-color: #FFFF;\\n$dark-secondary-text-color: #B2B2B2;\\n$dark-button-color: #43dfba;\\n$dark-button-hover-color: rgb(43, 152, 127);\\n$dark-button-active-color:rgb(31, 99, 83);\\n\\n\\n\\n// Border colors\\n$light-border-color: #d9d9d9;\\n$medium-border-color: #b2b2b2;\\n$darker-border-color: #999999;\\n$error-color: #cc4747;\\n\\n// Highlights\\n$highlight-one: #25f68d;\\n$highlight-two: #1bc0f2;\\n$edit-comment-highlight: #3684D9;\\n$link-color: #0000ee;\\n$box-shadow: rgba(0, 0, 0, 0.2);\\n\\n// Dividers\\n$divider-color: rgb(192, 192, 192);\\n$vertical-divider: #c4c4c4;\\n\\n// Buttons\\n$button-border-hover: #435aac;\\n$button-hover-background: #10cfad;\\n$disabled-button-text: #e6e6e6;\\n$active-background-color: #303e84;\\n\\n//FB EMAIL OPT IN\\n$FB-email-opt-in-button-color: #722680;\\n$FB-button-border-hover: #8e72e0;\\n$FB-button-hover-background: #8e72e0;\\n$FB-disabled-button-text: #e6e6e6;\\n$FB-active-background-color: #753675;\\n$FB-email-opt-in-button-color: #722680;\\n$FB-primary-background-color: #ffffff;\\n$FB-primary-text-color: black;\\n\\n// Create/Edit articles\\n$title-divider-color: #00ffc3;\\n$text-editor-border: #1fe1bf;\\n\\n// Tags (dropdown box on create/edit articles)\\n$tag-placeholder-color: #aaa;\\n$border-tags1: #ddd;\\n$border-tags2: #888;\\n$tag-token-background: #f2f2f2;\\n$tag-options-box-shadow: rgba(0, 0, 0, 0.16);\\n\\n// Search Modal\\n$search-modal-background: rgba(255, 255, 255, 0.9);\\n\\n\\n// Quill Text Editor\\n$quill-background: rgb(255, 255, 255);\\n$quill-box-shadow: rgba(156, 156, 156, 0.05);\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".buy-nft-modal{width:95%;max-width:728px;background:#fff;position:absolute;left:91px;top:289px;z-index:1;box-shadow:0px 2px 10px 5px rgba(0,0,0,.06);border-radius:4px;padding:20px 100px 40px 100px;font-family:Roboto}.buy-nft-modal .buy-nft-modal-content{display:flex;flex-direction:column;align-items:center;width:100%;row-gap:30px;position:relative}.buy-nft-modal .buy-nft-modal-content .buy-nft-modal-logo{min-width:110px;max-width:110px;min-height:110px;max-height:110px}.buy-nft-modal .buy-nft-modal-content .buy-nft-modal-article-info-wrapper{display:flex;flex-direction:column;align-items:start;width:100%;row-gap:5px;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0em;text-align:left}.buy-nft-modal .buy-nft-modal-content .buy-nft-modal-article-info-wrapper .buy-nft-modal-article-info-title{align-self:center;font-family:Georgia,\\\"Times New Roman\\\",Times,serif;margin-bottom:20px;font-size:18px}.buy-nft-modal .buy-nft-modal-content .buy-nft-modal-article-info-wrapper .buy-nft-modal-article-info-centered{text-align:center}.buy-nft-modal .buy-nft-modal-content .buy-nft-modal-article-info-wrapper .buy-nft-modal-article-info-bold{font-weight:bolder}.buy-nft-modal .buy-nft-modal-content .buy-nft-modal-article-info-wrapper .buy-nft-modal-cost-wrapper{width:100%;display:flex;align-items:center;justify-content:space-between;margin-top:20px;font-weight:bolder;padding-bottom:5px;border-bottom:1px solid #e6e6e6}.buy-nft-modal .buy-nft-modal-content .buy-nft-modal-article-info-wrapper .buy-nft-modal-conditions-wrapper{display:flex;align-items:center;column-gap:10px}.buy-nft-modal .buy-nft-modal-content .buy-nft-modal-article-info-wrapper .buy-nft-modal-conditions-wrapper .buy-nft-modal-conditions-underline{cursor:pointer;text-decoration:underline}.buy-nft-modal .buy-nft-modal-content .buy-nft-modal-article-info-wrapper .buy-nft-modal-article-required-balance-wrapper{display:flex;align-self:center;flex-direction:column;align-items:start}.buy-nft-modal .buy-nft-modal-content .buy-nft-modal-article-info-wrapper .buy-nft-modal-article-required-balance-wrapper .value-wrapper{align-self:center;align-items:center;display:flex;column-gap:40px;width:100%;justify-content:space-between}.buy-nft-modal .buy-nft-modal-content .buy-nft-modal-how-it-works{text-decoration:underline;cursor:pointer}.buy-nft-modal .buy-nft-modal-content .buy-nft-modal-buttons-wrapper{width:100%;display:flex;align-items:center;column-gap:15px;justify-content:center}.buy-nft-modal .buy-nft-modal-content .address-value-wrapper{display:flex;align-items:center;justify-content:end;column-gap:10px;overflow:hidden;width:50%;padding:5px;padding-left:15px;padding-right:15px;border:1px solid #b2b2b2;border-radius:6px;cursor:pointer}.buy-nft-modal .buy-nft-modal-content .address-value-wrapper .copy-icon{min-width:15px;max-width:15px;min-height:15px;max-height:15px}.buy-nft-modal .buy-nft-modal-content .address-value-wrapper .address-value{text-wrap:nowrap;overflow:hidden}.buy-nft-modal .buy-nft-modal-content .premium-article-cancel-button{height:36px;width:120px;right:-80px;top:0;position:absolute}.buy-nft-modal .buy-nft-modal-content .premium-article-cancel-button:active{border:1px solid #02c3a1}.buy-nft-modal .buy-nft-modal-content .premium-article-cancel-button:disabled{border-color:#b2b2b2}@media only screen and (max-width: 768px){.buy-nft-modal{padding:20px;top:120px;left:2.5%}.buy-nft-modal .buy-nft-modal-content .premium-article-cancel-button{height:36px;width:80px;right:-10px;top:-10px}.buy-nft-modal .buy-nft-modal-content .premium-article-cancel-button:active{border:1px solid #02c3a1}.buy-nft-modal .buy-nft-modal-content .premium-article-cancel-button:disabled{border-color:#b2b2b2}}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/nuance_assets/components/premium-article-info/_premium-article-info.scss\",\"webpack://./src/nuance_assets/shared/styles/_Colors.scss\"],\"names\":[],\"mappings\":\"AAEA,eACE,SAAA,CACA,eAAA,CACA,eAAA,CACA,iBAAA,CACA,SAAA,CACA,SAAA,CACA,SAAA,CACA,2CAAA,CACA,iBAAA,CACA,6BAAA,CACA,kBAAA,CACA,sCACE,YAAA,CACA,qBAAA,CACA,kBAAA,CACA,UAAA,CACA,YAAA,CACA,iBAAA,CACA,0DACE,eAAA,CACA,eAAA,CACA,gBAAA,CACA,gBAAA,CAEF,0EACE,YAAA,CACA,qBAAA,CACA,iBAAA,CACA,UAAA,CACA,WAAA,CACA,cAAA,CACA,eAAA,CACA,gBAAA,CACA,kBAAA,CACA,eAAA,CACA,4GACE,iBAAA,CACA,iDAAA,CACA,kBAAA,CACA,cAAA,CAEF,+GACE,iBAAA,CAEF,2GACE,kBAAA,CAEF,sGACE,UAAA,CACA,YAAA,CACA,kBAAA,CACA,6BAAA,CACA,eAAA,CACA,kBAAA,CACA,kBAAA,CACA,+BAAA,CAEF,4GACE,YAAA,CACA,kBAAA,CACA,eAAA,CACA,gJACE,cAAA,CACA,yBAAA,CAGJ,0HACE,YAAA,CACA,iBAAA,CACA,qBAAA,CACA,iBAAA,CAEA,yIACE,iBAAA,CACA,kBAAA,CACA,YAAA,CACA,eAAA,CACA,UAAA,CACA,6BAAA,CAIN,kEACE,yBAAA,CACA,cAAA,CAEF,qEACE,UAAA,CACA,YAAA,CACA,kBAAA,CACA,eAAA,CACA,sBAAA,CAEF,6DACE,YAAA,CACA,kBAAA,CACA,mBAAA,CACA,eAAA,CACA,eAAA,CACA,SAAA,CACA,WAAA,CACA,iBAAA,CACA,kBAAA,CACA,wBAAA,CACA,iBAAA,CACA,cAAA,CAEA,wEACE,cAAA,CACA,cAAA,CACA,eAAA,CACA,eAAA,CAEF,4EACE,gBAAA,CACA,eAAA,CAGJ,qEACE,WAAA,CACA,WAAA,CACA,WAAA,CACA,KAAA,CACA,iBAAA,CAEA,4EACE,wBAAA,CAGF,8EACE,oBCjGc,CDsGtB,0CACE,eACE,YAAA,CACA,SAAA,CACA,SAAA,CAEE,qEACE,WAAA,CACA,UAAA,CACA,WAAA,CACA,SAAA,CAEA,4EACE,wBAAA,CAGF,8EACE,oBCvHY,CAAA\",\"sourcesContent\":[\"@import '../../shared/styles/Colors';\\n\\n.buy-nft-modal {\\n  width: 95%;\\n  max-width: 728px;\\n  background: white;\\n  position: absolute;\\n  left: 91px;\\n  top: 289px;\\n  z-index: 1;\\n  box-shadow: 0px 2px 10px 5px rgba(0, 0, 0, 0.06);\\n  border-radius: 4px;\\n  padding: 20px 100px 40px 100px;\\n  font-family: Roboto;\\n  .buy-nft-modal-content {\\n    display: flex;\\n    flex-direction: column;\\n    align-items: center;\\n    width: 100%;\\n    row-gap: 30px;\\n    position: relative;\\n    .buy-nft-modal-logo {\\n      min-width: 110px;\\n      max-width: 110px;\\n      min-height: 110px;\\n      max-height: 110px;\\n    }\\n    .buy-nft-modal-article-info-wrapper {\\n      display: flex;\\n      flex-direction: column;\\n      align-items: start;\\n      width: 100%;\\n      row-gap: 5px;\\n      font-size: 16px;\\n      font-weight: 400;\\n      line-height: 24px;\\n      letter-spacing: 0em;\\n      text-align: left;\\n      .buy-nft-modal-article-info-title {\\n        align-self: center;\\n        font-family: Georgia, 'Times New Roman', Times, serif;\\n        margin-bottom: 20px;\\n        font-size: 18px;\\n      }\\n      .buy-nft-modal-article-info-centered {\\n        text-align: center;\\n      }\\n      .buy-nft-modal-article-info-bold {\\n        font-weight: bolder;\\n      }\\n      .buy-nft-modal-cost-wrapper {\\n        width: 100%;\\n        display: flex;\\n        align-items: center;\\n        justify-content: space-between;\\n        margin-top: 20px;\\n        font-weight: bolder;\\n        padding-bottom: 5px;\\n        border-bottom: 1px solid #e6e6e6;\\n      }\\n      .buy-nft-modal-conditions-wrapper {\\n        display: flex;\\n        align-items: center;\\n        column-gap: 10px;\\n        .buy-nft-modal-conditions-underline {\\n          cursor: pointer;\\n          text-decoration: underline;\\n        }\\n      }\\n      .buy-nft-modal-article-required-balance-wrapper {\\n        display: flex;\\n        align-self: center;\\n        flex-direction: column;\\n        align-items: start;\\n\\n        .value-wrapper {\\n          align-self: center;\\n          align-items: center;\\n          display: flex;\\n          column-gap: 40px;\\n          width: 100%;\\n          justify-content: space-between;\\n        }\\n      }\\n    }\\n    .buy-nft-modal-how-it-works {\\n      text-decoration: underline;\\n      cursor: pointer;\\n    }\\n    .buy-nft-modal-buttons-wrapper {\\n      width: 100%;\\n      display: flex;\\n      align-items: center;\\n      column-gap: 15px;\\n      justify-content: center;\\n    }\\n    .address-value-wrapper {\\n      display: flex;\\n      align-items: center;\\n      justify-content: end;\\n      column-gap: 10px;\\n      overflow: hidden;\\n      width: 50%;\\n      padding: 5px;\\n      padding-left: 15px;\\n      padding-right: 15px;\\n      border: 1px solid #b2b2b2;\\n      border-radius: 6px;\\n      cursor: pointer;\\n\\n      .copy-icon {\\n        min-width: 15px;\\n        max-width: 15px;\\n        min-height: 15px;\\n        max-height: 15px;\\n      }\\n      .address-value {\\n        text-wrap: nowrap;\\n        overflow: hidden;\\n      }\\n    }\\n    .premium-article-cancel-button {\\n      height: 36px;\\n      width: 120px;\\n      right: -80px;\\n      top: 0;\\n      position: absolute;\\n\\n      &:active {\\n        border: 1px solid $accent-color;\\n      }\\n\\n      &:disabled {\\n        border-color: $medium-border-color;\\n      }\\n    }\\n  }\\n}\\n@media only screen and (max-width: 768px) {\\n  .buy-nft-modal {\\n    padding: 20px;\\n    top: 120px;\\n    left: 2.5%;\\n    .buy-nft-modal-content {\\n      .premium-article-cancel-button {\\n        height: 36px;\\n        width: 80px;\\n        right: -10px;\\n        top: -10px;\\n\\n        &:active {\\n          border: 1px solid $accent-color;\\n        }\\n\\n        &:disabled {\\n          border-color: $medium-border-color;\\n        }\\n      }\\n    }\\n  }\\n}\\n\",\"// Theme colors\\n$primary-color: #151451;\\n$accent-color: #02c3a1;\\n$second-accent-color: #43dfba;\\n$subtitle-text: #687487;\\n$upload-picture-color: #cafff2;\\n\\n// Text colors\\n$primary-text-color: #00113e;\\n$tag-text-color: #666666;\\n$paragraph-text-color: #b2b2b2;\\n$route-text-color: #00113e;\\n$quote-color: rgba(0, 17, 62, 0.8);\\n$input-text-color: #4c4c52;\\n$edit-profile-input-text-color: #19192E;\\n$lighter-text-color: #999;\\n$lighter-content-text-color: #666;\\n\\n\\n// Background colors\\n$primary-background-color: #ffffff;\\n$selected-background-color: #d4d4d4;\\n$link-background: #f2f2f2;\\n\\n//dark-mode\\n$dark-primary-background-color: rgb(21, 20, 81);\\n$dark-primary-text-color: #FFFF;\\n$dark-secondary-text-color: #B2B2B2;\\n$dark-button-color: #43dfba;\\n$dark-button-hover-color: rgb(43, 152, 127);\\n$dark-button-active-color:rgb(31, 99, 83);\\n\\n\\n\\n// Border colors\\n$light-border-color: #d9d9d9;\\n$medium-border-color: #b2b2b2;\\n$darker-border-color: #999999;\\n$error-color: #cc4747;\\n\\n// Highlights\\n$highlight-one: #25f68d;\\n$highlight-two: #1bc0f2;\\n$edit-comment-highlight: #3684D9;\\n$link-color: #0000ee;\\n$box-shadow: rgba(0, 0, 0, 0.2);\\n\\n// Dividers\\n$divider-color: rgb(192, 192, 192);\\n$vertical-divider: #c4c4c4;\\n\\n// Buttons\\n$button-border-hover: #435aac;\\n$button-hover-background: #10cfad;\\n$disabled-button-text: #e6e6e6;\\n$active-background-color: #303e84;\\n\\n//FB EMAIL OPT IN\\n$FB-email-opt-in-button-color: #722680;\\n$FB-button-border-hover: #8e72e0;\\n$FB-button-hover-background: #8e72e0;\\n$FB-disabled-button-text: #e6e6e6;\\n$FB-active-background-color: #753675;\\n$FB-email-opt-in-button-color: #722680;\\n$FB-primary-background-color: #ffffff;\\n$FB-primary-text-color: black;\\n\\n// Create/Edit articles\\n$title-divider-color: #00ffc3;\\n$text-editor-border: #1fe1bf;\\n\\n// Tags (dropdown box on create/edit articles)\\n$tag-placeholder-color: #aaa;\\n$border-tags1: #ddd;\\n$border-tags2: #888;\\n$tag-token-background: #f2f2f2;\\n$tag-options-box-shadow: rgba(0, 0, 0, 0.16);\\n\\n// Search Modal\\n$search-modal-background: rgba(255, 255, 255, 0.9);\\n\\n\\n// Quill Text Editor\\n$quill-background: rgb(255, 255, 255);\\n$quill-box-shadow: rgba(156, 156, 156, 0.05);\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","import React, { useEffect, useState } from 'react';\r\nimport { useNavigate } from 'react-router-dom';\r\nimport { useUserStore } from '../../store';\r\nimport { images, icons, colors } from '../../shared/constants';\r\n\r\ntype ReadArticleSidebarProps = {\r\n  isSidebarToggle?: (e: any) => void;\r\n  url: string;\r\n  isPremium?: boolean;\r\n  id?: string;\r\n  handle?: string;\r\n  avatar?: string;\r\n  dark?: boolean;\r\n};\r\n\r\nconst ReadArticleSidebar: React.FC<ReadArticleSidebarProps> = (\r\n  props\r\n): JSX.Element => {\r\n  const [shown, setShown] = useState(false);\r\n  const [isAuthorAndReader, setIsAuthorAndReader] = useState(false);\r\n\r\n  const author = useUserStore((state) => state.author);\r\n  const user = useUserStore((state) => state.user);\r\n\r\n  const CloseMenu = () => {\r\n    setShown(false);\r\n  };\r\n\r\n  const ToggleMenu = () => {\r\n    setShown(!shown);\r\n    props.isSidebarToggle && props.isSidebarToggle(!shown);\r\n  };\r\n\r\n  const copyLinkToArticle = () => {\r\n    if (\r\n      window.location.origin == 'https://exwqn-uaaaa-aaaaf-qaeaa-cai.ic0.app'\r\n    ) {\r\n      navigator.clipboard.writeText('http://www.nuance.xyz' + props.url);\r\n    } else {\r\n      navigator.clipboard.writeText(window.location.origin + props.url);\r\n    }\r\n\r\n    CloseMenu();\r\n    props.isSidebarToggle && props.isSidebarToggle(false);\r\n  };\r\n\r\n  const reportArticle = () => {\r\n    console.log('Logic for reporting article...');\r\n  };\r\n\r\n  let navigate = useNavigate();\r\n\r\n  const separateIds = (input: string) => {\r\n    // Split the input string by the '-' character\r\n    let parts = input.split('-');\r\n\r\n    // The first part is the post ID\r\n    let postId = parts[0];\r\n\r\n    // The rest of the parts make up the canister ID\r\n    let bucketCanisterId = parts.slice(1).join('-');\r\n    // Return the IDs in an object\r\n    return { postId, bucketCanisterId };\r\n  };\r\n\r\n  const postId = separateIds(props.id as string).postId;\r\n\r\n  function editArticle() {\r\n    navigate('/article/edit/' + postId);\r\n  }\r\n\r\n  function authorReaderCheck() {\r\n    var isEditor = false;\r\n    user?.publicationsArray.map((pubObj) => {\r\n      if (pubObj.isEditor && pubObj.publicationName === props.handle) {\r\n        isEditor = true;\r\n      }\r\n    });\r\n    return (props.handle == user?.handle || isEditor) && !props.isPremium;\r\n  }\r\n\r\n  useEffect(() => {\r\n    setIsAuthorAndReader(authorReaderCheck());\r\n  }, [props.handle]);\r\n\r\n  const darkOptionsAndColors = {\r\n    background: props.dark\r\n      ? colors.primaryTextColor\r\n      : colors.primaryBackgroundColor,\r\n    color: props.dark ? colors.primaryBackgroundColor : colors.primaryTextColor,\r\n    THREE_DOTS: props.dark ? icons.THREE_DOTS_WHITE : icons.THREE_DOTS_BLUE,\r\n    THREE_DOTS_LIGHT_ICON: props.dark\r\n      ? icons.THREE_DOTS_WHITE\r\n      : icons.THREE_DOTS,\r\n  };\r\n\r\n  return (\r\n    <div\r\n      className='read-article-sidebar-menu'\r\n      style={shown ? { width: '230px' } : { width: 0 }}\r\n    >\r\n      <img\r\n        className='sidebar-button'\r\n        onClick={ToggleMenu}\r\n        src={\r\n          shown\r\n            ? darkOptionsAndColors.THREE_DOTS\r\n            : darkOptionsAndColors.THREE_DOTS_LIGHT_ICON\r\n        }\r\n        alt='sidebar-button'\r\n      />\r\n      {\r\n        <div\r\n          className='sidebar-content'\r\n          style={shown ? { width: '230px' } : { width: 0 }}\r\n        >\r\n          <div\r\n            className='left-content-sidebar'\r\n            style={shown ? {} : { display: 'none' }}\r\n          >\r\n            <div className='menus'>\r\n              <a\r\n                className='links'\r\n                style={{ color: darkOptionsAndColors.color }}\r\n                onClick={copyLinkToArticle}\r\n              >\r\n                Copy link to article\r\n              </a>\r\n              <a\r\n                className='links'\r\n                style={{ color: darkOptionsAndColors.color }}\r\n                onClick={reportArticle}\r\n              >\r\n                Report article\r\n              </a>\r\n              {isAuthorAndReader ? (\r\n                <a\r\n                  className='links'\r\n                  style={{ color: darkOptionsAndColors.color }}\r\n                  onClick={editArticle}\r\n                >\r\n                  Edit article\r\n                </a>\r\n              ) : null}\r\n            </div>\r\n            <div className='horizontal-divider'></div>\r\n            {author && (\r\n              <div className='author'>\r\n                <img src={props.avatar || images.DEFAULT_AVATAR} alt=''></img>\r\n                <a style={{ color: darkOptionsAndColors.color }}>\r\n                  @{props.handle}\r\n                </a>\r\n              </div>\r\n            )}\r\n            <div className='horizontal-divider'></div>\r\n          </div>\r\n        </div>\r\n      }\r\n    </div>\r\n  );\r\n};\r\n\r\nexport default ReadArticleSidebar;\r\n","import React from 'react';\nimport { icons, colors } from '../../shared/constants';\n\ntype CopyArticleProps = {\n  url: string;\n  shown: boolean;\n  setShown: React.Dispatch<React.SetStateAction<boolean>>;\n  dark?: boolean;\n  postId: string;\n};\n\nconst CopyArticle: React.FC<CopyArticleProps> = (props): JSX.Element => {\n  const CloseMenu = () => {\n    props.setShown(false);\n  };\n\n  const copyLinkToArticle = () => {\n    console.log(window.location.origin);\n    // This ensures that the links work locally, in UAT and PROD; When in PROD they display NAUNCE.XYZ\n    navigator.clipboard.writeText(\n      window.location.href\n    );\n    setTimeout(() => {\n      CloseMenu();\n    }, 2000);\n  };\n  const darkOptionsAndColors = {\n    background: props.dark\n      ? colors.primaryTextColor\n      : colors.primaryBackgroundColor,\n    color: props.dark ? colors.primaryBackgroundColor : colors.primaryTextColor,\n    copyIconShown: icons.COPY_BLUE,\n    copyIconNotShown: props.dark ? icons.COPY_BLUE : icons.COPY,\n  };\n\n  return (\n    <div className='meatball-menu'>\n      <img\n        onClick={() => {\n          props.setShown(!props.shown), copyLinkToArticle();\n        }}\n        src={\n          props.shown\n            ? darkOptionsAndColors.copyIconShown\n            : darkOptionsAndColors.copyIconNotShown\n        }\n        alt='copy-article-menu'\n        style={{ cursor: 'pointer' }}\n      />\n\n      <div\n        className='drop-down-content'\n        style={\n          props.shown\n            ? {\n                height: 82,\n                boxShadow: '0px 2px 10px 5px rgba(117, 117, 117, 0.08)',\n                background: props.dark ? darkOptionsAndColors.background : '',\n              }\n            : { height: 0, background: 'transparent' }\n        }\n      >\n        <ul style={props.shown ? {} : { display: 'none' }}>\n          <div>\n            <a>\n              <li style={{ cursor: 'hand', color: darkOptionsAndColors.color }}>\n                Link copied!\n              </li>\n            </a>\n          </div>\n        </ul>\n      </div>\n    </div>\n  );\n};\n\nexport default CopyArticle;\n","import React, { useEffect, useState } from 'react';\nimport { useNavigate } from 'react-router-dom';\nimport { useUserStore } from '../../store';\nimport { colors, icons } from '../../shared/constants';\n\ntype ReaderAndAuthorProps = {\n  id?: String;\n  handle?: String;\n  isPremium?: boolean;\n  dark?: boolean;\n};\n\nconst ReaderAndAuthor: React.FC<ReaderAndAuthorProps> = (\n  props\n): JSX.Element => {\n  const [isAuthorAndReader, setIsAuthorAndReader] = useState(false);\n  const author = useUserStore((state) => state.author);\n  const user = useUserStore((state) => state.user);\n\n  const darkOptionsAndColors = {\n    background: props.dark\n      ? colors.primaryTextColor\n      : colors.primaryBackgroundColor,\n    color: props.dark ? colors.primaryBackgroundColor : colors.primaryTextColor,\n  };\n\n  let navigate = useNavigate();\n\n  function editArticle() {\n    navigate('/article/edit/' + props.id);\n  }\n\n  function authorReaderCheck() {\n    // setIsAuthorAndReader(props?.handle == user?.handle);\n    var isEditor = false;\n    user?.publicationsArray.map((pubObj) => {\n      if (pubObj.isEditor && pubObj.publicationName === props.handle) {\n        isEditor = true;\n      }\n    });\n    return (props.handle == user?.handle || isEditor) && !props.isPremium;\n  }\n\n  useEffect(() => {\n    setIsAuthorAndReader(authorReaderCheck());\n  }, [props.handle]);\n\n  return isAuthorAndReader ? (\n    <a className='links' onClick={editArticle}>\n      <li style={{ cursor: 'hand', color: darkOptionsAndColors.color }}>\n        Edit Article\n      </li>\n    </a>\n  ) : (\n    <a></a>\n  );\n};\nexport default ReaderAndAuthor;\n","import React, { useState, useEffect } from 'react';\r\nimport { colors, icons } from '../../shared/constants';\r\nimport ReaderAndAuthor from '../../UI/reader-and-author-edit/reader-and-author-edit';\r\nimport { usePostStore, useUserStore } from '../../store';\r\n\r\ntype ReportArticleProps = {\r\n  id: string;\r\n  handle: string;\r\n  url: string;\r\n  shown: boolean;\r\n  setShown: React.Dispatch<React.SetStateAction<boolean>>;\r\n  isPremium: boolean;\r\n  dark?: boolean;\r\n};\r\n\r\n//report article logic\r\nconst ReportArticle: React.FC<ReportArticleProps> = (props): JSX.Element => {\r\n  const CloseMenu = () => {\r\n    props.setShown(false);\r\n  };\r\n\r\n  const copyLinkToArticle = () => {\r\n    navigator.clipboard.writeText(window.location.origin + props.url);\r\n    CloseMenu();\r\n  };\r\n\r\n  //follow author logic\r\n\r\n  usePostStore((state) => state);\r\n\r\n  const { user, getAuthor, author } = useUserStore((state) => ({\r\n    user: state.user,\r\n    getAuthor: state.getAuthor,\r\n    author: state.author,\r\n  }));\r\n  const { followAuthor, unfollowAuthor } = useUserStore((state) => ({\r\n    followAuthor: state.followAuthor,\r\n    unfollowAuthor: state.unfollowAuthor,\r\n  }));\r\n\r\n  const [following, setFollowing] = useState(false);\r\n  const [loading, setLoading] = useState(false);\r\n\r\n  function handleFollow() {\r\n    if (!user?.followersArray || user.followersArray.includes(props.handle)) {\r\n      return;\r\n    }\r\n\r\n    if (props?.handle) {\r\n      followAuthor(props?.handle);\r\n      setLoading(true);\r\n\r\n      setTimeout(() => {\r\n        setLoading(false);\r\n      }, 10000);\r\n    }\r\n  }\r\n\r\n  useEffect(() => {\r\n    if (user && props.handle) {\r\n      setFollowing(user.followersArray.includes(props.handle));\r\n      setLoading(false);\r\n    }\r\n  }, [user?.followersArray, props.handle]);\r\n\r\n  const darkOptionsAndColors = {\r\n    background: props.dark\r\n      ? colors.primaryTextColor\r\n      : colors.primaryBackgroundColor,\r\n    color: props.dark ? colors.primaryBackgroundColor : colors.primaryTextColor,\r\n    THREE_DOTS: props.dark ? icons.THREE_DOTS_WHITE : icons.THREE_DOTS_BLUE,\r\n    THREE_DOTS_LIGHT_ICON: props.dark\r\n      ? icons.THREE_DOTS_WHITE\r\n      : icons.THREE_DOTS,\r\n  };\r\n\r\n  return (\r\n    <div className='meatball-menu'>\r\n      <img\r\n        onClick={() => {\r\n          props.setShown(!props.shown);\r\n        }}\r\n        src={\r\n          props.shown\r\n            ? darkOptionsAndColors.THREE_DOTS\r\n            : darkOptionsAndColors.THREE_DOTS_LIGHT_ICON\r\n        }\r\n        alt='copy-article-menu'\r\n        style={{ cursor: 'pointer' }}\r\n      />\r\n\r\n      <div\r\n        className='left-drop-down-content'\r\n        onMouseLeave={CloseMenu}\r\n        style={\r\n          props.shown\r\n            ? {\r\n                height: 100,\r\n                boxShadow: '0px 2px 10px 5px rgba(117, 117, 117, 0.08)',\r\n                background: darkOptionsAndColors.background,\r\n              }\r\n            : { height: 0, background: 'transparent' }\r\n        }\r\n      >\r\n        <ul style={props.shown ? {} : { display: 'none' }}>\r\n          <div onClick={copyLinkToArticle}>\r\n            <a>\r\n              <li\r\n                style={{\r\n                  cursor: 'hand',\r\n                  color: darkOptionsAndColors.color,\r\n                }}\r\n              >\r\n                Report Article\r\n              </li>\r\n            </a>\r\n            <ReaderAndAuthor\r\n              id={props.id}\r\n              handle={props.handle}\r\n              isPremium={props.isPremium}\r\n              dark={props.dark}\r\n            />\r\n            {following || !user ? null : (\r\n              <a>\r\n                <li\r\n                  onClick={handleFollow}\r\n                  style={{ cursor: 'hand', color: darkOptionsAndColors.color }}\r\n                >\r\n                  Follow Author\r\n                </li>\r\n              </a>\r\n            )}\r\n          </div>\r\n        </ul>\r\n      </div>\r\n    </div>\r\n  );\r\n};\r\n\r\nexport default ReportArticle;\r\n","import React, { useContext, useEffect, useState } from 'react';\nimport { useUserStore } from '../../store/userStore';\nimport { icons, colors } from '../../shared/constants';\nimport { Context } from '../../contextes/Context';\nimport { Context as ModalContext } from '../../contextes/ModalContext';\nimport { PostType } from '../../types/types';\nimport { useAuthStore } from '../../store';\nimport { toastError } from '../../services/toastService';\n\ntype ButtonProps = {\n  type?: String;\n  styleType?: String;\n  icon?: String;\n  style?: Object;\n  onClick?: (event: any) => void;\n  disabled: boolean;\n  onMouseDown: (event: any) => void;\n  onMouseUp: (event: any) => void;\n  dark?: boolean;\n  applaudingPost: PostType | undefined;\n};\n\nconst ClapButton: React.FC<ButtonProps> = (props): JSX.Element => {\n  const {\n    styleType,\n    icon,\n    children,\n    type,\n    disabled,\n    style,\n    onClick,\n    applaudingPost,\n  } = props;\n\n  let clapIcon = props.dark ? icons.CLAP_WHITE : icons.CLAP_BLUE;\n  const [clapIcons, setClapIcons] = useState([clapIcon]);\n  const [clicks, setClicks] = useState(0);\n\n  const modalContext = useContext(ModalContext);\n\n  const { fetchTokenBalances, tokenBalances } = useAuthStore((state) => ({\n    tokenBalances: state.tokenBalances,\n    fetchTokenBalances: state.fetchTokenBalances,\n  }));\n\n  function clapAnimation() {\n    setClicks(clicks + 1);\n    setClapIcons(clapIcons.concat(clapIcon));\n    setTimeout(() => {\n      setClicks(0);\n      //keep from growing too large but leaves room for fast clicks\n      if (clapIcons.length > 3) {\n        setClapIcons([clapIcon]);\n      }\n    }, 250);\n  }\n\n  const { user } = useUserStore((state) => ({\n    user: state.user,\n  }));\n\n  function clapCreate() {\n    for (let i = 0; i < clicks; i++) {\n      return (\n        <img\n          src={clapIcons[clicks]}\n          alt='clap'\n          className='clap-icon-container'\n        />\n      );\n    }\n  }\n\n  useEffect(() => {\n    clapCreate();\n  }, [clicks]);\n\n  const darkOptionsAndColors = {\n    background: props.dark\n      ? colors.primaryTextColor\n      : colors.primaryBackgroundColor,\n    color: props.dark ? colors.primaryBackgroundColor : colors.primaryTextColor,\n  };\n\n  const getNumberOfApplauds = () => {\n    if (modalContext && props.applaudingPost) {\n      let fakeApplaud = modalContext.getFakeApplaud(\n        props.applaudingPost.postId,\n        parseInt(props.applaudingPost.claps)\n      );\n      if (fakeApplaud) {\n        return fakeApplaud.after;\n      } else {\n        return parseInt(props.applaudingPost.claps);\n      }\n    }\n    return 0;\n  };\n  useEffect(() => {\n    if (modalContext && props.applaudingPost) {\n      let fakeApplaud = modalContext.getFakeApplaud(\n        props.applaudingPost.postId,\n        parseInt(props.applaudingPost.claps)\n      );\n      if (\n        fakeApplaud &&\n        parseInt(props.applaudingPost.claps) !== getNumberOfApplauds() &&\n        Math.abs(fakeApplaud.date.getTime() - new Date().getTime()) < 1000\n      ) {\n        var i = 0;\n        while (i < 3) {\n          setTimeout(() => {\n            clapAnimation();\n          }, 300 * i);\n          i += 1;\n        }\n      }\n    }\n  }, [getNumberOfApplauds()]);\n\n  return (\n    <button\n      className={'button-attributes-' + styleType}\n      style={style}\n      onClick={() => {\n        if (user) {\n          //clapAnimation()\n          //check if the post is written by the user\n          if (\n            applaudingPost?.handle === user.handle ||\n            applaudingPost?.creatorHandle === user.handle\n          ) {\n            toastError('You can not applaud your own article!');\n            return;\n          }\n          if (applaudingPost && tokenBalances.length !== 0) {\n            modalContext?.openModal('Clap', {\n              clappingPostData: applaudingPost,\n            });\n          }\n        } else {\n          modalContext?.openModal('Login');\n        }\n      }}\n      disabled={false}\n      onMouseDown={props.onMouseDown}\n      onMouseUp={props.onMouseUp}\n    >\n      {clapCreate()}\n      {icon ? <img className='plus-sign' src={String(icon)} /> : ''}\n      {getNumberOfApplauds()}\n    </button>\n  );\n};\n\nexport default ClapButton;\n","import React, { useContext, useState } from 'react';\nimport { useNavigate } from 'react-router';\nimport { Link } from 'react-router-dom';\nimport { colors, icons, images } from '../../shared/constants';\nimport { formatDate } from '../../shared/utils';\nimport { PostType, PublicationType } from '../../types/types';\nimport { Context } from '../../contextes/Context';\n\n\n\n\ntype PostInformationProps = {\n  post: PostType,\n  readTime: string,\n  publication: PublicationType | undefined,\n  isMobile: Boolean,\n  handle: string | undefined\n}\n\nconst PostInformation: React.FC<PostInformationProps> = (props): JSX.Element => {\n    const publicationFeatureIsLive = useContext(Context).publicationFeature;\n    if(props.isMobile){\n        return (\n            <div\n            style={{\n              display: 'flex',\n              alignItems: 'flex-start',\n              justifyContent:'space-between',\n              flexDirection:'column'\n            }}\n          >\n            <div\n              style={{\n                display: 'flex',\n                alignItems: 'flex-start',\n                flexDirection:'column'\n              }}\n            >\n              <p \n                className='last-modified'\n                style={{marginBottom:'4px'}}\n              >\n              last modified: {formatDate(props.post.modified) || ' -- '}\n              </p>\n              \n            </div>\n            {props.post.isPublication && publicationFeatureIsLive ? (\n              <div style={{\n                display:'flex',\n                alignItems:'flex-start',\n                flexDirection:'column'\n                }}>\n                \n               <p \n                className='last-modified'\n                style={{marginBottom:'4px'}}\n              >\n                {\n                  <Link to={`/publication/${props.publication?.publicationHandle}`}>\n                    {' '}\n                    <span\n                      style={{\n                        textDecoration: 'underline',\n                        color: colors.darkerBorderColor,\n                      }}\n                    >\n                      In {props.publication?.publicationHandle}\n                    </span>\n                  </Link>\n                }\n              </p>\n              </div>\n                ) : null}\n            <p \n                className='last-modified'\n                style={{color:'#b5acac', marginBottom:'4px'}}\n              >\n              {props.readTime} min read\n              </p>\n          </div>\n        );\n    }\n    else{\n        return (\n          <div\n            style={{\n              display: 'flex',\n              alignItems: 'center',\n              justifyContent: 'space-between',\n            }}\n          >\n            <div\n              style={{\n                display: 'flex',\n                alignItems: 'center',\n              }}\n            >\n              <p className='last-modified'>\n                last modified: {formatDate(props.post.modified) || ' -- '}\n              </p>\n              <p\n                className='last-modified'\n                style={{ marginLeft: '50px', color: '#b5acac' }}\n              >\n                {props.readTime} min read\n              </p>\n            </div>\n            {props.post.isPublication && publicationFeatureIsLive ? (\n              <div\n                style={{\n                  display: 'flex',\n                  alignItems: 'center',\n                }}\n              >\n                <div className='publication-avatar'>\n                  <img\n                    src={\n                      props.publication?.publicationHandle.toLowerCase() ===\n                      props.handle?.toLowerCase()\n                        ? props.publication?.avatar\n                        : images.DEFAULT_AVATAR\n                    }\n                    alt='background'\n                    className='publication-logo'\n                  />\n                  <img\n                    src={icons.PUBLICATION_ICON}\n                    alt='publication-icon'\n                    className='publication-icon'\n                  />\n                </div>\n                <p className='last-modified'>\n                  {\n                    <Link\n                      to={`/publication/${props.publication?.publicationHandle}`}\n                    >\n                      {' '}\n                      <span\n                        style={{\n                          textDecoration: 'underline',\n                          color: colors.darkerBorderColor,\n                        }}\n                      >\n                        In {props.publication?.publicationHandle}\n                      </span>\n                    </Link>\n                  }\n                </p>\n              </div>\n            ) : null}\n          </div>\n        );\n    }\n    \n  };\n  \n  export default PostInformation;\n\n\n\n\n\n\n\n\n\n\n\n\n\n","\n      import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n      import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n      import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n      import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n      import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n      import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n      import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].use[1]!../../../../node_modules/resolve-url-loader/index.js??ruleSet[1].rules[1].use[2]!../../../../node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[1].use[3]!./_premium-article-info.scss\";\n      \n      \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n      options.insert = insertFn.bind(null, \"head\");\n    \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].use[1]!../../../../node_modules/resolve-url-loader/index.js??ruleSet[1].rules[1].use[2]!../../../../node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[1].use[3]!./_premium-article-info.scss\";\n       export default content && content.locals ? content.locals : undefined;\n","import { Principal } from '@dfinity/principal';\n\nconst to32bits = (num: number) => {\n  let b = new ArrayBuffer(4);\n  new DataView(b).setUint32(0, num);\n  return Array.from(new Uint8Array(b));\n};\n\nconst from32bits = (ba: number[]) => {\n  var value: number = 0;\n  for (var i = 0; i < 4; i++) {\n    value = (value << 8) | ba[i];\n  }\n  return value;\n};\nconst toHexString = (byteArray: number[]) => {\n  return Array.from(byteArray, function (byte) {\n    return ('0' + (byte & 0xff).toString(16)).slice(-2);\n  }).join('');\n};\n\nexport const tokenIdentifier = (principal: string, index: number) => {\n  const padding = new Buffer('\\x0Atid');\n  const array = new Uint8Array([\n    ...padding,\n    ...Principal.fromText(principal).toUint8Array(),\n    ...to32bits(index),\n  ]);\n  return Principal.fromUint8Array(array).toText();\n};\nexport const decodeTokenId = (tid: string) => {\n  var p = [...Principal.fromText(tid).toUint8Array()];\n  var padding = p.splice(0, 4);\n  if (toHexString(padding) !== toHexString(Array.from(new Buffer('\\x0Atid')))) {\n    return {\n      index: 0,\n      canister: tid,\n      token: tokenIdentifier(tid, 0),\n    };\n  } else {\n    return {\n      index: from32bits(p.splice(-4)),\n      canister: Principal.fromUint8Array(new Uint8Array(p)).toText(),\n      token: tid,\n    };\n  }\n};\n\nexport const toBase256 = (num: number, digitCount: number) => {\n  var base256Array: number[] = [];\n  while (num > 0) {\n    base256Array.unshift(num % 256);\n    num = Math.floor(num / 256);\n  }\n\n  while (base256Array.length < digitCount) {\n    base256Array.unshift(0);\n  }\n\n  return base256Array;\n};\n","import React, { useContext, useEffect, useState } from 'react';\nimport Button from '../../UI/Button/Button';\nimport { colors, icons, images } from '../../shared/constants';\nimport { number, string } from 'prop-types';\nimport {\n  PostType,\n  PremiumArticleSaleInformation,\n  UserWallet,\n} from '../../types/types';\nimport './_premium-article-info.scss';\nimport RequiredFieldMessage from '../required-field-message/required-field-message';\nimport { usePostStore } from '../../store/postStore';\nimport { Link, useNavigate } from 'react-router-dom';\nimport { usePublisherStore } from '../../store/publisherStore';\nimport { useAuthStore } from '../../store/authStore';\nimport { Context as ModalContext } from '../../contextes/ModalContext';\nimport { toast, toastError, ToastType } from '../../services/toastService';\nimport { useTheme } from '../../contextes/ThemeContext';\nimport { Context } from '../../contextes/Context';\nimport { useUserStore } from '../../store';\nimport { tokenIdentifier } from '../../shared/ext-utils';\nimport { FaRegCopy } from 'react-icons/fa';\n\ntype PremiumArticleInfoProps = {\n  post: PostType | undefined;\n  refreshPost: () => Promise<void>;\n};\nexport const PremiumArticleInfo: React.FC<PremiumArticleInfoProps> = (\n  props\n): JSX.Element => {\n  const [userAccepted, setUserAccepted] = useState(false);\n  const [openingBuyScreen, setOpeningBuyScreen] = useState(false);\n  const [userBalance, setUserBalance] = useState(0);\n  const [userWallet, setUserWallet] = useState<UserWallet | undefined>(\n    undefined\n  );\n\n  const [marketplacePurchaseLoading, setMarketplacePurchaseLoading] =\n    useState(false);\n\n  const navigate = useNavigate();\n  const darkTheme = useTheme();\n\n  const context = useContext(Context);\n  const modalContext = useContext(ModalContext);\n\n  const darkOptionsAndColors = {\n    background: darkTheme\n      ? colors.darkModePrimaryBackgroundColor\n      : colors.primaryBackgroundColor,\n    color: darkTheme\n      ? colors.darkModePrimaryTextColor\n      : colors.primaryTextColor,\n    secondaryColor: darkTheme\n      ? colors.darkSecondaryTextColor\n      : colors.primaryTextColor,\n  };\n\n  const getUserWalletAndBalance = async () => {\n    let userBalance = await getMyBalance();\n    let userWallet = await getUserWallet();\n    if (userBalance !== undefined && userWallet.principal.length !== 0) {\n      return { userBalance, userWallet };\n    }\n  };\n\n  const { getUserWallet, isLoggedIn } = useAuthStore((state) => ({\n    getUserWallet: state.getUserWallet,\n    isLoggedIn: state.isLoggedIn,\n  }));\n\n  const { lockToken, transferIcp, settleToken, getOwnedNfts, getMyBalance } =\n    usePostStore((state) => ({\n      lockToken: state.lockToken,\n      transferIcp: state.transferIcp,\n      settleToken: state.settleToken,\n      getOwnedNfts: state.getOwnedNfts,\n      getMyBalance: state.getMyBalance,\n    }));\n\n  if (!props.post || !props.post.premiumArticleSaleInfo) {\n    return <div />;\n  }\n\n  type PremiumArticleModalPageType =\n    | 'locked'\n    | 'buy'\n    | 'unsufficient'\n    | 'congrats'\n    | 'sold out';\n  const [modalPage, setModalPage] = useState<PremiumArticleModalPageType>(\n    props.post.premiumArticleSaleInfo.totalSupply >\n      props.post.premiumArticleSaleInfo.currentSupply\n      ? 'locked'\n      : 'sold out'\n  );\n  const handleOpenBuyScreen = async () => {\n    setOpeningBuyScreen(true);\n    let walletAndBalance = await getUserWalletAndBalance();\n    if (walletAndBalance) {\n      setUserBalance(Number(walletAndBalance.userBalance));\n      setUserWallet(walletAndBalance.userWallet);\n      setModalPage('buy');\n      setUserAccepted(false);\n    }\n    setOpeningBuyScreen(false);\n  };\n\n  const handleMarketplacePurchase = async () => {\n    setMarketplacePurchaseLoading(true);\n    let articleSaleInfo = props.post?.premiumArticleSaleInfo;\n    if (articleSaleInfo && userWallet) {\n      let lockResponse = await lockToken(\n        tokenIdentifier(\n          articleSaleInfo.nftCanisterId,\n          articleSaleInfo.tokenIndex\n        ),\n        BigInt(articleSaleInfo.price_e8s),\n        articleSaleInfo.nftCanisterId,\n        userWallet.accountId\n      );\n      if (lockResponse) {\n        //lock successful\n        //transfer the ICPs\n        let transferResponse = await transferIcp(\n          BigInt(articleSaleInfo.price_e8s),\n          lockResponse\n        );\n        if ('Ok' in transferResponse) {\n          let settleResponse = await settleToken(\n            tokenIdentifier(\n              articleSaleInfo.nftCanisterId,\n              articleSaleInfo.tokenIndex\n            ),\n            articleSaleInfo.nftCanisterId\n          );\n          if (settleResponse) {\n            setModalPage('congrats');\n          }\n        } else {\n          toastError(transferResponse.Err);\n        }\n      }\n    }\n    setMarketplacePurchaseLoading(false);\n  };\n  switch (modalPage) {\n    case 'locked':\n      return (\n        <div style={darkOptionsAndColors} className='buy-nft-modal'>\n          <div className='buy-nft-modal-content'>\n            <img\n              className='buy-nft-modal-logo'\n              src={darkTheme ? images.NUANCE_LOGO_NFT : images.NUANCE_LOGO_NFT_BLACK}\n              style={{ filter: darkTheme ? 'contrast(0.5)' : 'none' }}\n            />\n            <div className='buy-nft-modal-article-info-wrapper'>\n              <div\n                className='buy-nft-modal-article-info-title'\n                style={{ marginBottom: '0' }}\n              >\n                This article is locked.\n              </div>\n              <div className='buy-nft-modal-article-info-title'>\n                {`There are ${\n                  props.post.premiumArticleSaleInfo.totalSupply -\n                  props.post.premiumArticleSaleInfo.currentSupply\n                } of ${\n                  props.post.premiumArticleSaleInfo.totalSupply\n                } NFT keys available.`}\n              </div>\n              <div className='buy-nft-modal-article-info-centered'>\n                This article can only be read when you own an NFT key. Use your\n                Nuance wallet to purchase this key for{' '}\n                <span style={{ fontWeight: 'bold' }}>\n                  {props.post.premiumArticleSaleInfo.priceReadable} ICP\n                </span>{' '}\n              </div>\n            </div>\n            <div\n              onClick={() => {\n                window.open(\n                  'https://wiki.nuance.xyz/nuance/how-do-premium-articles-work/article-nft-revenue-split',\n                  '_blank'\n                );\n              }}\n              className='buy-nft-modal-how-it-works'\n            >\n              {'> How does NFT access work?'}\n            </div>\n            <div className='buy-nft-modal-buttons-wrapper'>\n              <Button\n                loading={openingBuyScreen}\n                type='button'\n                styleType={{dark: 'navy-dark', light: 'navy'}}\n                style={{\n                  width: '120px',\n                }}\n                onClick={() => {\n                  if (isLoggedIn) {\n                    handleOpenBuyScreen();\n                  } else {\n                    modalContext?.openModal('Login');\n                  }\n                }}\n              >\n                Buy now\n              </Button>\n            </div>\n          </div>\n        </div>\n      );\n    case 'buy':\n      return (\n        <div style={darkOptionsAndColors} className='buy-nft-modal'>\n          <div className='buy-nft-modal-content'>\n            <Button\n              type='button'\n              className={{dark: 'premium-article-cancel-button', light: 'premium-article-cancel-button'}}\n              styleType={{dark: 'white', light: 'white'}}\n              onClick={() => {\n                if (!marketplacePurchaseLoading) {\n                  setModalPage('locked');\n                }\n              }}\n            >\n              Cancel\n            </Button>\n            <img\n              className='buy-nft-modal-logo'\n              src={darkTheme ? images.NUANCE_LOGO_NFT : images.NUANCE_LOGO_NFT_BLACK}\n              style={{ filter: darkTheme ? 'contrast(0.5)' : 'none' }}\n            />\n            <div className='buy-nft-modal-article-info-wrapper'>\n              <div className='buy-nft-modal-article-info-title'>\n                You are buying\n              </div>\n              <div className='buy-nft-modal-article-info'>{`1 NFT access key (out of ${props.post?.premiumArticleSaleInfo?.totalSupply}) to the article:`}</div>\n              <div className='buy-nft-modal-article-info'>{`\"${props.post?.title}\"`}</div>\n              <div className='buy-nft-modal-article-info'>\n                by @\n                <span className='buy-nft-modal-article-info-bold'>\n                  {props.post?.creatorHandle}\n                </span>\n              </div>\n              <div className='buy-nft-modal-cost-wrapper'>\n                <div>Total Cost</div>\n                <div>\n                  {props.post?.premiumArticleSaleInfo?.priceReadable + ' ICP'}\n                </div>\n              </div>\n              <div className='buy-nft-modal-conditions-wrapper'>\n                <input\n                  className='buy-nft-modal-checkbox'\n                  type='checkbox'\n                  id='terms'\n                  name='terms'\n                  value='terms'\n                  onChange={() => {\n                    setUserAccepted(!userAccepted);\n                  }}\n                  style={{\n                    color: darkOptionsAndColors.color,\n                  }}\n                />\n                <div>\n                  I accept the{' '}\n                  <span className='buy-nft-modal-conditions-underline'>\n                    terms and conditions\n                  </span>\n                </div>\n              </div>\n            </div>\n            <div className='buy-nft-modal-buttons-wrapper'>\n              <Button\n                type='button'\n                styleType={{dark: 'white', light: 'white'}}\n                style={{\n                  width: '120px',\n                }}\n                onClick={() => {\n                  if (!marketplacePurchaseLoading) {\n                    navigate('/my-profile/wallet');\n                  }\n                }}\n              >\n                My Wallet\n              </Button>\n              <Button\n                loading={marketplacePurchaseLoading}\n                type='button'\n                styleType={{dark: 'navy-dark', light: 'navy'}}\n                disabled={!userAccepted}\n                style={ {width: '120px'} }\n                onClick={() => {\n                  if (\n                    userBalance >\n                      (props.post?.premiumArticleSaleInfo\n                        ?.price_e8s as number) &&\n                    !marketplacePurchaseLoading\n                  ) {\n                    handleMarketplacePurchase();\n                  } else if (!marketplacePurchaseLoading) {\n                    //unsufficient funds\n                    setModalPage('unsufficient');\n                  }\n                }}\n              >\n                Buy now\n              </Button>\n            </div>\n          </div>\n        </div>\n      );\n    case 'unsufficient':\n      return (\n        <div style={darkOptionsAndColors} className='buy-nft-modal'>\n          <div className='buy-nft-modal-content'>\n            <img\n              className='buy-nft-modal-logo'\n              src={darkTheme ? images.NUANCE_LOGO_UNSUFFICIENT_BALANCE : images.NUANCE_LOGO_UNSUFFICIENT_BALANCE_BLACK}\n              style={{ filter: darkTheme ? 'contrast(0.5)' : 'none' }}\n            />\n            <div className='buy-nft-modal-article-info-wrapper'>\n              <div\n                style={{ color: '#AE0000' }}\n                className='buy-nft-modal-article-info-title'\n              >\n                Sorry, you do not have enough ICP in your wallet!\n              </div>\n              <div className='buy-nft-modal-article-required-balance-wrapper'>\n                <div className='value-wrapper'>\n                  <div className='buy-nft-modal-article-info'>Required:</div>\n                  <div className='buy-nft-modal-article-info'>\n                    {props.post.premiumArticleSaleInfo.priceReadable + ' ICP'}\n                  </div>\n                </div>\n                <div className='value-wrapper'>\n                  <div className='buy-nft-modal-article-info'>\n                    In your wallet:\n                  </div>\n                  <div className='buy-nft-modal-article-info'>\n                    {(userBalance / Math.pow(10, 8)).toFixed(4) + ' ICP'}\n                  </div>\n                </div>\n              </div>\n              <div className='buy-nft-modal-article-info-centered'>\n                Please transfer more ICP tokens to your wallet and try again.\n                Copy your address to send ICP to your wallet.\n              </div>\n            </div>\n            <div\n              onClick={() => {\n                if (userWallet) {\n                  navigator.clipboard.writeText(userWallet.accountId);\n                  toast('Copied to clipboard.', ToastType.Success);\n                }\n              }}\n              style={\n                darkTheme\n                  ? {\n                      borderColor: colors.darkerBorderColor,\n                    }\n                  : {}\n              }\n              className='address-value-wrapper'\n            >\n              <FaRegCopy\n                className='copy-icon'\n                style={\n                  darkTheme\n                    ? {\n                        color: colors.darkModePrimaryTextColor,\n                      }\n                    : {}\n                }\n              />\n              <p\n                className='address-value'\n                style={\n                  darkTheme\n                    ? {\n                        color: colors.darkSecondaryTextColor,\n                      }\n                    : {}\n                }\n              >\n                {userWallet?.accountId}\n              </p>\n            </div>\n            <div className='buy-nft-modal-buttons-wrapper'>\n              <Button\n                type='button'\n                styleType={{dark: 'white', light: 'white'}}\n                style={{\n                  width: '120px',\n                }}\n                onClick={() => {\n                  setModalPage('locked');\n                }}\n              >\n                Cancel\n              </Button>\n              <Button\n                loading={marketplacePurchaseLoading}\n                type='button'\n                styleType={{dark: 'navy-dark', light: 'navy'}}\n                style={{ width: '120px' }}\n                onClick={async () => {\n                  navigate('/my-profile/wallet');\n                }}\n              >\n                My Wallet\n              </Button>\n            </div>\n          </div>\n        </div>\n      );\n    case 'congrats':\n      return (\n        <div style={darkOptionsAndColors} className='buy-nft-modal'>\n          <div className='buy-nft-modal-content'>\n            <img\n              className='buy-nft-modal-logo'\n              src={darkTheme ? images.NUANCE_LOGO_NFT : images.NUANCE_LOGO_NFT_BLACK}\n              style={{ filter: darkTheme ? 'contrast(0.5)' : 'none' }}\n            />\n            <div className='buy-nft-modal-article-info-wrapper'>\n              <div className='buy-nft-modal-article-info-title'>\n                Congratulations!\n              </div>\n              <div\n                style={{ alignSelf: 'center' }}\n                className='buy-nft-modal-article-info'\n              >{`You now have NFT access key #${props.post.premiumArticleSaleInfo.tokenIndex} (out of ${props.post.premiumArticleSaleInfo.totalSupply}) to:`}</div>\n              <div\n                style={{ alignSelf: 'center' }}\n                className='buy-nft-modal-article-info'\n              >{`\"${props.post?.title}\"`}</div>\n              <div\n                style={{ alignSelf: 'center' }}\n                className='buy-nft-modal-article-info'\n              >\n                by @\n                <span className='buy-nft-modal-article-info-bold'>\n                  {props.post?.creatorHandle}\n                </span>\n              </div>\n            </div>\n            <div className='buy-nft-modal-buttons-wrapper'>\n              <Button\n                type='button'\n                styleType={{dark: 'white', light: 'white'}}\n                style={{\n                  width: '120px',\n                }}\n                onClick={() => {\n                  if (!marketplacePurchaseLoading) {\n                    navigate('/my-profile/wallet');\n                  }\n                }}\n              >\n                My Wallet\n              </Button>\n              <Button\n                loading={marketplacePurchaseLoading}\n                type='button'\n                styleType={{dark: 'navy-dark', light: 'navy'}}\n                style={{ width: '120px' }}\n                onClick={async () => {\n                  await props.refreshPost();\n                }}\n              >\n                Read Article\n              </Button>\n            </div>\n          </div>\n        </div>\n      );\n    case 'sold out':\n      return (\n        <div style={darkOptionsAndColors} className='buy-nft-modal'>\n          <div className='buy-nft-modal-content'>\n            <img\n              className='buy-nft-modal-logo'\n              src={darkTheme ? images.NUANCE_LOGO_UNSUFFICIENT_BALANCE : images.NUANCE_LOGO_UNSUFFICIENT_BALANCE_BLACK}\n              style={{ filter: darkTheme ? 'contrast(0.5)' : 'none' }}\n            />\n            <div className='buy-nft-modal-article-info-wrapper'>\n              <div\n                style={{ color: '#AE0000' }}\n                className='buy-nft-modal-article-info-title'\n              >\n                Sorry, this article is sold out!\n              </div>\n              <div\n                style={{ alignSelf: 'center' }}\n                className='buy-nft-modal-article-info-centered'\n              >\n                It might be available on the secondary market on toniq{' '}\n                <span\n                  className='buy-nft-modal-how-it-works'\n                  onClick={() => {\n                    window.open(\n                      'https://toniq.io/marketplace/nuance-' +\n                        props.post?.postId,\n                      '_blank'\n                    );\n                  }}\n                >\n                  here\n                </span>\n                .\n              </div>\n            </div>\n            <div className='buy-nft-modal-buttons-wrapper'>\n              <Button\n                type='button'\n                styleType={{dark: 'white', light: 'white'}}\n                style={{\n                  width: '120px',\n                }}\n                onClick={() => {\n                  setModalPage('locked');\n                }}\n              >\n                Cancel\n              </Button>\n              <Button\n                loading={marketplacePurchaseLoading}\n                type='button'\n                styleType={{dark: 'navy-dark', light: 'navy'}}\n                style={{ width: '120px' }}\n                onClick={async () => {\n                  navigate('/my-profile/wallet');\n                }}\n              >\n                My Wallet\n              </Button>\n            </div>\n          </div>\n        </div>\n      );\n  }\n};\n","\n      import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n      import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n      import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n      import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n      import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n      import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n      import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].use[1]!../../../../node_modules/resolve-url-loader/index.js??ruleSet[1].rules[1].use[2]!../../../../node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[1].use[3]!./_comments.scss\";\n      \n      \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n      options.insert = insertFn.bind(null, \"head\");\n    \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].use[1]!../../../../node_modules/resolve-url-loader/index.js??ruleSet[1].rules[1].use[2]!../../../../node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[1].use[3]!./_comments.scss\";\n       export default content && content.locals ? content.locals : undefined;\n","import React, { useState, useContext, useEffect } from 'react';\nimport { useTheme } from '../../contextes/ThemeContext';\nimport { toast } from 'react-hot-toast';\nimport { usePostStore } from '../../store/postStore';\nimport Button from '../../UI/Button/Button';\nimport { toastError } from '../../services/toastService';\nimport {\n  Comment,\n  SaveCommentModel,\n} from '../../../declarations/PostBucket/PostBucket.did';\nimport { colors } from '../../shared/constants';\nimport { Context } from '../../contextes/Context';\nimport { Context as ModalContext } from '../../contextes/ModalContext';\nimport RequiredFieldMessage from '../required-field-message/required-field-message';\nimport { buildTempComment } from '../../shared/utils';\ninterface WriteCommentProps {\n  label?: string;\n  postId: string;\n  commentId?: string;\n  replyToCommentId?: string;\n  bucketCanisterId: string;\n  handle: string;\n  avatar: string;\n  content?: string;\n  closeModal?: () => void;\n  comment?: Comment; //pass the entire comment for editing\n  edit?: boolean;\n  totalNumberOfComments: number;\n  comments: Comment[];\n  setComments: (newComments: Comment[], totalNumberOfComments: number) => void;\n}\n\nconst WriteComment: React.FC<WriteCommentProps> = ({\n  label = 'WRITE A COMMENT..',\n  postId,\n  commentId,\n  replyToCommentId,\n  bucketCanisterId,\n  handle,\n  avatar,\n  content,\n  comment,\n  edit = false,\n  closeModal = () => {},\n  totalNumberOfComments,\n  setComments,\n  comments,\n}) => {\n  const { saveComment } = usePostStore((state) => state);\n  const [commentText, setCommentText] = useState(content || '');\n  const [isSaving, setIsSaving] = useState(false);\n\n  const hasError = commentText.length >= 400;\n\n  const darkTheme = useTheme();\n  const darkOptionsAndColors = {\n    background: darkTheme\n      ? colors.darkModePrimaryBackgroundColor\n      : colors.primaryBackgroundColor,\n    color: darkTheme\n      ? colors.darkModePrimaryTextColor\n      : colors.primaryTextColor,\n  };\n\n  const context = useContext(Context);\n  const modalContext = useContext(ModalContext);\n\n  const commentModel: SaveCommentModel = {\n    content: commentText,\n    commentId: commentId ? [commentId] : [],\n    replyToCommentId: replyToCommentId ? [replyToCommentId] : [],\n    postId,\n  };\n\n  const scanCommentAndOptimisticiallyUpdate = (\n    scanningComment: Comment,\n    tempComment: Comment\n  ): Comment => {\n    if (scanningComment.commentId === tempComment.commentId) {\n      //found the comment\n      return {\n        ...tempComment,\n        replies: scanningComment.replies,\n        repliedCommentId: scanningComment.repliedCommentId,\n      };\n    }\n    //if here, loop through all the replies and scan the replies too\n    let repliesCopied = Array.from(scanningComment.replies);\n    return {\n      ...scanningComment,\n      replies: repliesCopied.map((reply) => {\n        //scan the replies too\n        return scanCommentAndOptimisticiallyUpdate(reply, tempComment);\n      }),\n    };\n  };\n\n  const scanCommentAndAddReply = (\n    scanningComment: Comment,\n    tempComment: Comment\n  ): Comment => {\n    if (\n      tempComment.repliedCommentId[0] &&\n      scanningComment.commentId === tempComment.repliedCommentId[0]\n    ) {\n      //found the replying comment\n      //add the tempComment to the start of the replies array\n      return {\n        ...scanningComment,\n        replies: [tempComment, ...scanningComment.replies],\n      };\n    }\n    //if here, loop through all the replies and scan the replies too\n    let repliesCopied = Array.from(scanningComment.replies);\n    return {\n      ...scanningComment,\n      replies: repliesCopied.map((reply) => {\n        //scan the replies too\n        return scanCommentAndAddReply(reply, tempComment);\n      }),\n    };\n  };\n\n  const optimisticUpdate = (isEdit: boolean) => {\n    //build the temp comment first\n    let tempComment = buildTempComment(\n      bucketCanisterId,\n      commentModel,\n      handle,\n      avatar,\n      isEdit ? comment : undefined\n    );\n    let updatedComments: Comment[] = [];\n    if (isEdit) {\n      //loop through all the comments and scan them to edit\n      updatedComments = comments.map((scanningComment) => {\n        return scanCommentAndOptimisticiallyUpdate(\n          scanningComment,\n          tempComment\n        );\n      });\n    } else {\n      //not an edit\n      //find the correct place to add the comment\n      if (tempComment.repliedCommentId[0] === undefined) {\n        //not a reply\n        //just add the start of the array\n        updatedComments = [tempComment, ...comments];\n      } else {\n        //a reply\n        //find the replying comment and add it to the start of the replies array\n        updatedComments = comments.map((scanningComment) => {\n          return scanCommentAndAddReply(\n            scanningComment,\n            tempComment\n          );\n        });\n      }\n    }\n\n    //update the state in the read-article screen\n    setComments(updatedComments, totalNumberOfComments + 1);\n  };\n\n  const commentCountExceeded = totalNumberOfComments >= 100;\n  const handleSave = async (edited: Boolean) => {\n    if (commentCountExceeded && !edited) {\n      toastError('A post can have maximum of 100 comments. Sorry!');\n      return;\n    }\n\n    setIsSaving(true);\n\n    if (handle === '' || handle === undefined || handle === null) {\n      function handleRegister() {\n        modalContext?.openModal('Login');\n      }\n      handleRegister();\n      setIsSaving(false);\n      return;\n    }\n\n    if (!commentText.trim()) {\n      toastError('Please enter a comment.');\n      setIsSaving(false);\n      return;\n    }\n\n    try {\n      closeModal();\n      const isEdit = commentId !== undefined;\n\n      //optimistically update the state\n      // - copy the old state before updating the state\n      let oldComments = Array.from(comments);\n      let oldTotalNumber = totalNumberOfComments;\n\n      optimisticUpdate(isEdit);\n\n      let saveResponse = await saveComment(\n        commentModel,\n        bucketCanisterId,\n        isEdit\n      );\n      if (saveResponse) {\n        //the save is successful\n        //update the vars in the read article screen\n        setComments(saveResponse[0], saveResponse[1]);\n        setCommentText(''); // Clear the comment input after saving\n      } else {\n        //the save is not successful\n        //reverse the optimistic update\n        setComments(oldComments, oldTotalNumber);\n      }\n\n      setIsSaving(false);\n    } catch (error) {\n      toast.error('Failed to post comment. Please try again later.');\n      setIsSaving(false);\n    }\n  };\n\n  return (\n    <div\n      className='write-comment'\n      style={replyToCommentId || edit ? { margin: '30px 0px 16px 38px' } : {}}\n    >\n      {commentCountExceeded && label !== 'EDIT YOUR COMMENT' ? (\n        <div className='comment-input-container'>\n          <div className='comment-title'>{label}</div>\n          <textarea\n            className={'has-error'}\n            style={darkOptionsAndColors}\n            placeholder={'Sorry, you cannot post more than 100 comments.'}\n            value={commentText}\n            onChange={(e) => {\n              if (!isSaving) {\n                setCommentText(e.target.value);\n              }\n            }}\n          />\n          <RequiredFieldMessage\n            hasError={hasError}\n            errorMessage='Comment cannot exeed 400 characters.'\n          />\n        </div>\n      ) : (\n        <div className='comment-input-container'>\n          <div className='comment-title'>{label}</div>\n          <textarea\n            className={hasError ? 'has-error' : 'comment-input'}\n            style={darkOptionsAndColors}\n            placeholder={'Text'}\n            value={commentText}\n            onChange={(e) => {\n              if (!isSaving) {\n                setCommentText(e.target.value);\n              }\n            }}\n          />\n          <RequiredFieldMessage\n            hasError={hasError}\n            errorMessage='Comment cannot exeed 400 characters.'\n          />\n        </div>\n      )}\n      {label === 'EDIT YOUR COMMENT' ? (\n        <Button\n          disabled={!commentText.trim() || isSaving || hasError}\n          loading={isSaving}\n          type='button'\n          styleType={{ dark: 'navy-dark', light: 'navy' }}\n          style={{ width: '153px' }}\n          onClick={() => handleSave(true)}\n        >\n          Change comment\n        </Button>\n      ) : (\n        <Button\n          disabled={\n            !commentText.trim() || isSaving || hasError || commentCountExceeded\n          }\n          loading={isSaving}\n          type='button'\n          styleType={{ dark: 'navy-dark', light: 'navy' }}\n          style={{ width: '134px' }}\n          onClick={handleSave}\n        >\n          Post comment\n        </Button>\n      )}\n    </div>\n  );\n};\n\nexport default WriteComment;\n","import React, { useState, useContext } from 'react';\nimport './_comments.scss';\nimport { icons, images } from '../../shared/constants';\nimport { Comment } from 'src/declarations/PostBucket/PostBucket.did';\nimport { User } from 'src/declarations/User/User.did';\nimport WriteComment from '../comments/write-comments';\nimport { usePostStore } from '../../store/postStore';\nimport { useAuthStore, useUserStore } from '../../../nuance_assets/store';\nimport { Context } from '../../contextes/Context';\nimport { useTheme } from '../../contextes/ThemeContext';\nimport { Context as ModalContext } from '../../contextes/ModalContext';\nimport { Link } from 'react-router-dom';\nimport { ToastType, toastError, toast } from '../..//services/toastService';\nimport GradientMdVerified from '../../UI/verified-icon/verified-icon';\n\ninterface CommentProps {\n  loggedInUser: string;\n  avatar: string;\n  comment: Comment;\n  isReply?: boolean;\n  postId: string;\n  bucketCanisterId: string;\n  totalNumberOfComments: number;\n  comments: Comment[];\n  isVerified: boolean;\n  setComments: (newComments: Comment[], totalNumberOfComments: number) => void;\n}\n\nconst Comments: React.FC<CommentProps> = ({\n  loggedInUser,\n  comment,\n  isReply = false,\n  postId,\n  bucketCanisterId,\n  avatar,\n  totalNumberOfComments,\n  comments,\n  isVerified,\n  setComments,\n}) => {\n  let identity =\n    useAuthStore((state) => state.userWallet?.principal.toString()) || '';\n  let censoredComment = (\n    <em>\n      {' '}\n      This comment was removed due to{' '}\n      <a href='https://wiki.nuance.xyz/nuance/content-rules' target='_blank'>\n        content rules\n      </a>\n      . Please play nice.{' '}\n    </em>\n  );\n  const [showReplyBox, setShowReplyBox] = useState(false);\n  const [replyActive, setReplyActive] = useState(false);\n  const [replyToCommentId, setReplyToCommentId] = useState<\n    string | undefined\n  >();\n  const [repliesVisible, setRepliesVisible] = useState(false);\n  const [editMode, setEditMode] = useState(false);\n  const [upVotesCount, setUpVotesCount] = useState(comment.upVotes.length);\n  const [downVotesCount, setDownVotesCount] = useState(\n    comment.downVotes.length\n  );\n  const [voting, setVoting] = useState({\n    upVoted: comment.upVotes.includes(identity),\n    downVoted: comment.downVotes.includes(identity),\n  });\n\n  const context = useContext(Context);\n  const modalContext = useContext(ModalContext);\n  const darkTheme = useTheme();\n\n  const {\n    upVoteComment,\n    downVoteComment,\n    getPostComments,\n    removeCommentVote,\n    reportComment,\n  } = usePostStore((state) => state);\n  const toggleReplies = () => {\n    setRepliesVisible(!repliesVisible);\n  };\n\n  let loggedOut =\n    loggedInUser === '' || loggedInUser === undefined || loggedInUser === null;\n  function handleRegister() {\n    modalContext?.openModal('Login');\n  }\n\n  const handleVote = async (voteType: string) => {\n    if (loggedOut) {\n      handleRegister();\n      return;\n    }\n\n    // Determine if the user has already voted in the same way.\n    const hasVoted = voteType === 'up' ? voting.upVoted : voting.downVoted;\n    const oppositeVoteType = voteType === 'up' ? 'down' : 'up';\n    const oppositeVoteFunction =\n      voteType === 'up' ? upVoteComment : downVoteComment;\n    const hasVotedOpposite =\n      voteType === 'up' ? voting.downVoted : voting.upVoted;\n\n    // Update the UI optimistically\n    if (hasVoted) {\n      voteType === 'up'\n        ? setUpVotesCount(upVotesCount - 1)\n        : setDownVotesCount(downVotesCount - 1);\n    } else {\n      voteType === 'up'\n        ? setUpVotesCount(upVotesCount + 1)\n        : setDownVotesCount(downVotesCount + 1);\n      if (hasVotedOpposite) {\n        oppositeVoteType === 'up'\n          ? setUpVotesCount(upVotesCount - 1)\n          : setDownVotesCount(downVotesCount - 1);\n      }\n    }\n\n    // Update local voting state\n    setVoting({\n      upVoted: voteType === 'up' ? !voting.upVoted : false,\n      downVoted: voteType === 'down' ? !voting.downVoted : false,\n    });\n\n    try {\n      if (hasVoted && !hasVotedOpposite) {\n        await removeCommentVote(comment.commentId, bucketCanisterId);\n        console.log('removeCommentVote');\n      } else if (hasVotedOpposite) {\n        await oppositeVoteFunction(comment.commentId, bucketCanisterId);\n        console.log('oppositeVoteFunction' + oppositeVoteFunction);\n      } else {\n        const action = voteType === 'up' ? upVoteComment : downVoteComment;\n        await action(comment.commentId, bucketCanisterId);\n        console.log('action' + action);\n      }\n    } catch (error) {\n      console.error(error);\n      toastError(\n        `Failed to ${\n          hasVoted ? 'remove' : 'cast'\n        } vote. Please try again later.`\n      );\n\n      setVoting({\n        upVoted: voting.upVoted,\n        downVoted: voting.downVoted,\n      });\n      setUpVotesCount(upVotesCount);\n      setDownVotesCount(downVotesCount);\n    }\n  };\n\n  const handleReply = (commentId: string) => {\n    setReplyToCommentId(commentId);\n    //setCommentText(''); // Optionally clear the comment input\n  };\n  const handleReplyClick = () => {\n    if (loggedOut) {\n      handleRegister();\n      return;\n    }\n    setReplyToCommentId(comment.commentId);\n    setShowReplyBox(!showReplyBox);\n    setReplyActive(!replyActive);\n    console.log('replyActive' + replyActive);\n  };\n\n  const handleEdit = () => {\n    setEditMode(!editMode);\n  };\n\n  const handleSaveEdit = async () => {\n    setEditMode(false);\n  };\n\n  const handleSaveReply = async () => {\n    setShowReplyBox(false);\n    setReplyActive(false);\n  };\n\n  const handleShare = async () => {\n    const url = `${window.location.origin}${window.location.pathname}?comment=${comment.commentId}`;\n    try {\n      await navigator.clipboard.writeText(url);\n      toast('Link copied to clipboard!', ToastType.Success);\n    } catch (err) {\n      console.error('Failed to copy:', err);\n      toastError('Failed to copy the link.');\n    }\n  };\n\n  const handleReport = async (isCensored: boolean) => {\n    if (isCensored) {\n      toastError('This comment has already been reported.');\n      return;\n    }\n\n    try {\n      await reportComment(comment.commentId, bucketCanisterId);\n      //toast('Comment reported!', ToastType.Success);\n    } catch (err) {\n      console.error('Failed to report: ', err);\n      toastError('Failed to report the comment.');\n    }\n  };\n\n  function timeAgo(dateParam: number | null): string {\n    if (typeof dateParam !== 'number' || dateParam === 0) {\n      return 'just now';\n    }\n\n    const date = new Date(dateParam);\n    const today = new Date();\n    const seconds = Math.round((today.getTime() - date.getTime()) / 1000);\n    const minutes = Math.round(seconds / 60);\n    const hours = Math.round(minutes / 60);\n    const days = Math.round(hours / 24);\n    const months = Math.round(days / 30.44);\n    const years = Math.round(months / 12);\n\n    const pluralize = (count: number, noun: string) =>\n      count === 1 ? noun : `${noun}s`;\n\n    if (seconds < 60) {\n      return `${seconds} ${pluralize(seconds, 'second')} ago`;\n    } else if (minutes < 60) {\n      return `${minutes} ${pluralize(minutes, 'minute')} ago`;\n    } else if (hours < 24) {\n      return `${hours} ${pluralize(hours, 'hour')} ago`;\n    } else if (days < 30.44) {\n      return `${days} ${pluralize(days, 'day')} ago`;\n    } else if (months < 12) {\n      return `${months} ${pluralize(months, 'month')} ago`;\n    } else {\n      return `${years} ${pluralize(years, 'year')} ago`;\n    }\n  }\n\n  return (\n    <div\n      id={`comment-${comment.commentId}`}\n      className={`comment ${isReply ? 'reply' : ''}`}\n    >\n      <div className='comment-header-container'>\n        <div className='comment-avatar-and-name'>\n          <div className='user-icon'>\n            <Link to={`/user/${comment.handle}`} rel='noopener noreferrer'>\n              <img\n                className='user-icon'\n                alt='user icon'\n                src={comment.avatar || images.DEFAULT_AVATAR}\n                style={comment.isVerified ? {\n                  background: \"linear-gradient(to bottom, #1FDCBD, #23F295)\",\n                  padding: \"0.1em\",\n                 } : {borderRadius: \"50%\"}}\n              />\n            </Link>\n          </div>\n          <Link to={`/user/${comment.handle}`} rel='noopener noreferrer'>\n            <strong className={darkTheme ? 'username-dark' : 'username'}>\n              {comment.handle} {comment.isVerified && <div className='verified-badge'><GradientMdVerified width={'12'} height={'12'} /></div>}\n            </strong>\n          </Link>\n        </div>\n        <span className='time'>{timeAgo(parseInt(comment.createdAt))}</span>\n      </div>\n      {editMode ? (\n        <WriteComment\n          label='EDIT YOUR COMMENT'\n          postId={postId}\n          commentId={comment.commentId}\n          bucketCanisterId={bucketCanisterId}\n          handle={loggedInUser}\n          avatar={avatar}\n          closeModal={handleSaveEdit}\n          content={comment.content}\n          comment={comment}\n          edit={true}\n          totalNumberOfComments={totalNumberOfComments}\n          setComments={setComments}\n          comments={comments}\n        />\n      ) : (\n        <>\n          <>\n            <p className='content'>\n              {comment.isCensored ? censoredComment : comment.content}\n            </p>\n            {comment.creator !== 'TEMP' && (\n              <div className={darkTheme ? 'actions dark' : 'actions'}>\n                {loggedInUser === comment.handle && (\n                  <button\n                    className='edit'\n                    onClick={handleEdit}\n                    aria-label='Edit comment'\n                  >\n                    <img className='icon' alt='Edit' src={icons.EDIT_COMMENT} />\n                    <span\n                      className={\n                        darkTheme\n                          ? 'comment-control-text dark edit'\n                          : 'comment-control-text edit'\n                      }\n                    >\n                      Edit\n                    </span>\n                  </button>\n                )}\n                <button\n                  className={\n                    darkTheme\n                      ? `thumbs-up ${voting.upVoted && 'voted'} dark`\n                      : `thumbs-up  ${voting.upVoted && 'voted'}`\n                  }\n                  onClick={() => handleVote('up')}\n                  aria-label='Thumbs up'\n                >\n                  <img\n                    className='icon'\n                    alt='Thumbs up'\n                    src={darkTheme ? icons.THUMBS_UP_DARK : icons.THUMBS_UP}\n                  />\n                  <span\n                    className={\n                      darkTheme\n                        ? 'comment-control-text dark'\n                        : 'comment-control-text'\n                    }\n                  >\n                    Thumbs up\n                  </span>\n                  {upVotesCount > 0 && `(${upVotesCount})`}\n                </button>\n                <button\n                  className={\n                    darkTheme\n                      ? `thumbs-down ${voting.downVoted && 'voted'} dark`\n                      : `thumbs-down ${voting.downVoted && 'voted'}`\n                  }\n                  onClick={() => handleVote('down')}\n                  aria-label='Thumbs down'\n                >\n                  <img\n                    className='icon'\n                    alt='Thumbs down'\n                    src={darkTheme ? icons.THUMBS_DOWN_DARK : icons.THUMBS_DOWN}\n                  />\n                  <span\n                    className={\n                      darkTheme\n                        ? 'comment-control-text dark'\n                        : 'comment-control-text'\n                    }\n                  >\n                    Thumbs down\n                  </span>\n                  {downVotesCount > 0 && `(${downVotesCount})`}\n                </button>\n\n                <button\n                  className={`reply-btn ${replyActive ? 'active' : ''}`}\n                  onClick={handleReplyClick}\n                >\n                  <img\n                    className='icon'\n                    alt='reply'\n                    src={darkTheme ? icons.REPLY_DARK : icons.REPLY}\n                  />\n                  <span\n                    className={\n                      darkTheme\n                        ? 'comment-control-text dark'\n                        : 'comment-control-text'\n                    }\n                  >\n                    Reply\n                  </span>\n                </button>\n                <button className='share' onClick={handleShare}>\n                  <img\n                    className='icon'\n                    alt='share'\n                    src={darkTheme ? icons.SHARE_DARK : icons.SHARE}\n                  />\n                  <span\n                    className={\n                      darkTheme\n                        ? 'comment-control-text dark'\n                        : 'comment-control-text'\n                    }\n                  >\n                    Share\n                  </span>\n                </button>\n\n                {loggedInUser !== comment.handle && (\n                  <button\n                    className='report'\n                    onClick={() => handleReport(comment.isCensored)}\n                  >\n                    <img\n                      className='icon'\n                      alt='report'\n                      src={darkTheme ? icons.REPORT_DARK : icons.REPORT}\n                    />\n                    <span\n                      className={\n                        darkTheme\n                          ? 'comment-control-text dark'\n                          : 'comment-control-text'\n                      }\n                    >\n                      Report\n                    </span>\n                  </button>\n                )}\n              </div>\n            )}\n          </>\n        </>\n      )}\n\n      {showReplyBox && (\n        <WriteComment\n          label={\n            'WRITE A REPLY TO ' + comment.handle.toLocaleUpperCase() + '..'\n          }\n          postId={postId}\n          replyToCommentId={replyToCommentId}\n          bucketCanisterId={bucketCanisterId}\n          handle={loggedInUser}\n          avatar={avatar}\n          closeModal={handleSaveReply}\n          totalNumberOfComments={totalNumberOfComments}\n          setComments={setComments}\n          comments={comments}\n        />\n      )}\n      {comment.replies &&\n        comment.replies.map((reply) => (\n          <Comments\n            key={reply.commentId}\n            isReply={true}\n            comment={reply}\n            bucketCanisterId={bucketCanisterId}\n            postId={postId}\n            loggedInUser={loggedInUser}\n            avatar={avatar}\n            totalNumberOfComments={totalNumberOfComments}\n            setComments={setComments}\n            comments={comments}\n            isVerified={isVerified}\n          />\n        ))}\n    </div>\n  );\n};\n\nexport default Comments;\n","import React, { useEffect, useState, useContext, useRef } from 'react';\nimport { useNavigate, Link, useParams, useLocation } from 'react-router-dom';\nimport { Helmet } from 'react-helmet';\nimport parse from 'html-react-parser';\nimport Header from '../../components/header/header';\nimport Footer from '../../components/footer/footer';\nimport ReadArticleSidebar from '../../UI/read-article-sidebar/read-article-sidebar';\nimport CopyArticle from '../../UI/copy-article/copy-article';\nimport ReportArticle from '../../UI/report-article/report-article';\nimport {\n  useAuthStore,\n  usePostStore,\n  usePublisherStore,\n  useUserStore,\n} from '../../store';\nimport Loader from '../../UI/loader/Loader';\nimport { formatDate, getIconForSocialChannel } from '../../shared/utils';\nimport {\n  colors,\n  images,\n  premiumArticlePlaceHolder,\n} from '../../shared/constants';\nimport 'react-quill/dist/quill.snow.css';\nimport FollowAuthor from '../../components/follow-author/follow-author';\nimport Button from '../../UI/Button/Button';\nimport { icons } from '../../shared/constants';\nimport ClapButton from '../../UI/clap-button/clap-button';\nimport LoggedOutSidebar from '../../components/logged-out-sidebar/logged-out-sidebar';\nimport Linkify from 'react-linkify';\nimport { Context } from '../../contextes/Context';\nimport {\n  MoreFromThisAuthor,\n  PostType,\n  PublicationStylingObject,\n} from '../../types/types';\nimport PostInformation from '../../components/post-information/post-information';\nimport EmailOptIn from '../../components/email-opt-in/email-opt-in';\nimport { useTheme } from '../../contextes/ThemeContext';\n\nimport { PremiumArticleInfo } from '../../components/premium-article-info/premium-article-info';\nimport Comments from '../../components/comments/comments';\nimport WriteComment from '../../components/comments/write-comments';\nimport { Comment } from '../../../declarations/PostBucket/PostBucket.did';\nimport { Tooltip } from 'react-tooltip';\nimport { Context as ModalContext } from '../../contextes/ModalContext';\nimport SubscriptionModal from '../../components/subscription-modal/subscription-modal';\nimport CancelSubscriptionModal from '../../components/cancel-subscription-modal/cancel-subscription-modal';\nimport CardPublishedArticles from '../../components/card-published-articles/card-published-articles';\nimport GradientMdVerified from '../../UI/verified-icon/verified-icon';\n\nconst ReadArticle = () => {\n  const isLoggedIn = useAuthStore((state) => state.isLoggedIn);\n  const [copyArticle, setCopyArticle] = useState(false);\n  const [meatBall, setMeatBall] = useState(false);\n  const [screenWidth, setScreenWidth] = useState(0);\n  const [loading, setLoading] = useState(true);\n\n  const [isToggled, setIsToggled] = useState(false);\n  const [avatar, setAvatar] = useState('');\n  const [bio, setBio] = useState('');\n  const [socialUrls, setSocialUrls] = useState<string[]>([]);\n  const [modalType, setModalType] = useState('');\n\n  // Publication Feature Context\n  const publicationFeatureIsLive = useContext(Context).publicationFeature;\n  const [publicationHandle, setPublicationHandle] = useState('');\n  const refEmailOptIn = useRef<HTMLDivElement>(null);\n\n  //NFT feature toggle\n  const nftFeatureIsLive = useContext(Context).nftFeature;\n\n  const navigate = useNavigate();\n  const darkTheme = useTheme();\n  const { handle, id } = useParams();\n\n  const context = useContext(Context);\n  const modalContext = useContext(ModalContext);\n\n  const {\n    getPost,\n    clearPost,\n    clapPost,\n    post,\n    author,\n    loadingError,\n    clearWordCount,\n    getPostComments,\n    getMoreFromThisAuthor,\n    getRelatedArticles,\n  } = usePostStore((state) => ({\n    getPost: state.getPost,\n    clearPost: state.clearPost,\n    setSearchText: state.setSearchText,\n    post: state.post,\n    author: state.author,\n    loadingError: state.getPostError,\n    clapPost: state.clapPost,\n    clearSearchBar: state.clearSearchBar,\n    isTagScreen: state.isTagScreen,\n    clearWordCount: state.clearWordCount,\n    getPremiumPostError: state.getPremiumPostError,\n    ownedPremiumPosts: state.ownedPremiumPosts,\n    getOwnedNfts: state.getOwnedNfts,\n    getPostComments: state.getPostComments,\n    saveComment: state.saveComment,\n    upVoteComment: state.upVoteComment,\n    downVoteComment: state.downVoteComment,\n    deleteComment: state.deleteComment,\n    getMoreFromThisAuthor: state.getMoreFromThisAuthor,\n    getRelatedArticles: state.getRelatedArticles,\n  }));\n\n  const { user, getUsersByHandlesReturnOnly } = useUserStore((state) => ({\n    user: state.user,\n    getUsersByHandlesReturnOnly: state.getUsersByHandlesReturnOnly,\n    usersByHandles: state.usersByHandles,\n  }));\n\n  const { getPublication, publication, clearAll } = usePublisherStore(\n    (state) => ({\n      getPublication: state.getPublication,\n      publication: state.publication,\n      clearAll: state.clearAll,\n    })\n  );\n  const { redirect, redirectScreen } = useAuthStore((state) => ({\n    redirect: state.redirect,\n    redirectScreen: state.redirectScreen,\n  }));\n  const load = () => {\n    if (handle && id) {\n      if (publication?.publicationHandle !== handle) {\n        clearAll();\n      }\n      setLoading(true);\n      const { postId, bucketCanisterId } = separateIds(id);\n      getPost(handle, postId, bucketCanisterId);\n    }\n  };\n\n  const onSubsriptionComplete = () => {\n    modalContext?.closeModal();\n    load();\n  };\n\n  const openSubscriptionModal = async () => {\n    setModalType('Subscription');\n    modalContext?.openModal('Subscription');\n  };\n\n  const openCancelSubscriptionModal = async () => {\n    setModalType('cancelSubscription');\n    modalContext?.openModal('cancelSubscription');\n  };\n\n  const separateIds = (input: string) => {\n    // Split the input string by the '-' character\n    let parts = input.split('-');\n\n    // The first part is the post ID\n    let postId = parts[0];\n\n    // The rest of the parts make up the canister ID\n    let bucketCanisterId = parts.slice(1).join('-');\n    // Return the IDs in an object\n    return { postId, bucketCanisterId };\n  };\n\n  const postId = separateIds(id as string).postId;\n\n  const getTitleFromUrl = (url: string) => {\n    const segments = new URL(url).pathname.split('/');\n    const title = segments.pop() || segments.pop() || '';\n    return title;\n  };\n\n  const searchTag = (tag: string) => {\n    //setSearchText('#' + tag);\n    //clearSearchBar(false);\n    navigate('/?tab=search&tag=' + encodeURIComponent(tag.toUpperCase()));\n  };\n\n  //local vars for the comments\n  const [comments, setComments] = useState<Comment[]>([]);\n  const [totalNumberOfComments, setTotalNumberOfComments] = useState(0);\n\n  const fetchComments = async (postId: string, bucketCanisterId: string) => {\n    let [comments, totalNumberOfComments] = await getPostComments(\n      postId,\n      bucketCanisterId\n    );\n    setComments(comments);\n    setTotalNumberOfComments(totalNumberOfComments);\n  };\n\n  //comment scrolling\n  const location = useLocation();\n  const queryParams = new URLSearchParams(location.search);\n  const commentId = queryParams.get('comment');\n\n  useEffect(() => {\n    const scrollToComment = () => {\n      const commentElement = document.getElementById(`comment-${commentId}`);\n      if (commentElement) {\n        const commentPosition =\n          commentElement.getBoundingClientRect().top + window.pageYOffset;\n\n        const margin = 30;\n        window.scrollTo({\n          top: commentPosition - margin,\n          behavior: 'smooth',\n        });\n\n        navigate(`${location.pathname}`, { replace: true });\n      }\n    };\n    if (commentId) {\n      if (comments && comments.length > 0) {\n        scrollToComment();\n      } else {\n        const retryTimeout = setTimeout(scrollToComment, 500);\n        return () => clearTimeout(retryTimeout);\n      }\n    }\n  }, [commentId, comments, navigate, location.pathname]);\n\n  useEffect(() => {\n    clearPost();\n    clearWordCount();\n    window.scrollTo(0, 0);\n    const publicationHandleName = publication?.publicationHandle;\n    setPublicationHandle(publicationHandleName!);\n    load();\n    return () => {\n      clearPost();\n    };\n  }, [location.pathname]);\n\n  useEffect(() => {\n    setPublicationHandle(publication?.publicationHandle!);\n  }, [publication]);\n\n  useEffect(() => {\n    if ((post || loadingError) && !loading) {\n      // redirect user if the post title does not match current title\n      if (post) {\n        if (\n          getTitleFromUrl(window.location.origin + post.url) !==\n          getTitleFromUrl(window.location.href)\n        ) {\n          window.location.href = post.url;\n        }\n      }\n\n      setLoading(false);\n    }\n  }, [post, loadingError]);\n\n  useEffect(() => {\n    if (post && !loading) {\n      redirect(post?.url);\n    }\n  }, [post]);\n\n  useEffect(() => {\n    if (post?.isMembersOnly && post?.content === '' && isLoggedIn) {\n      openSubscriptionModal();\n    } else if (post?.isMembersOnly && post?.content === '' && !isLoggedIn) {\n      modalContext?.openModal('Login');\n    }\n  }, [post, user]);\n\n  useEffect(() => {\n    if (post) {\n      fetchComments(postId, post.bucketCanisterId);\n      getMoreFromThisAuthorAndPublication(post);\n      fetchRelatedArticles(post.postId);\n    }\n  }, [post?.postId]);\n\n  useEffect(() => {\n    if (post) {\n      setLoading(false);\n      if (post.creatorHandle) {\n        handleWriterFields(post.creatorHandle);\n      }\n      if (\n        post.isPublication &&\n        publication?.publicationHandle !== post.handle\n      ) {\n        getPublication(post.handle);\n      }\n    }\n  }, [post]);\n\n  const handleWriterFields = async (handle: string) => {\n    let response = await getUsersByHandlesReturnOnly([handle]);\n    if (response) {\n      let writer = response[0];\n      setAvatar(writer.avatar);\n      setBio(writer.bio);\n      if (writer.website === '') {\n        setSocialUrls(writer.socialChannelsUrls);\n      } else {\n        setSocialUrls([writer.website, ...writer.socialChannelsUrls]);\n      }\n    }\n  };\n\n  useEffect(\n    (window.onresize = window.onload =\n      () => {\n        setScreenWidth(window.innerWidth);\n      }),\n    [context.width]\n  );\n\n  const isSidebarToggled = (data: any) => {\n    setIsToggled(!isToggled);\n  };\n\n  const [postclaps, setPostclaps] = useState('0');\n  const [tokenAnimate, setTokenAnimate] = useState(false);\n  const [buttoncount, setButtonCount] = useState(0);\n  const [mousedown, setMouseDown] = useState(false);\n  const [clapDisabled, setClapDisabled] = useState(false);\n\n  //more articles from the author and the publication\n  const [moreArticles, setMoreArticles] = useState<\n    MoreFromThisAuthor | undefined\n  >(undefined);\n\n  const getMoreFromThisAuthorAndPublication = async (post: PostType) => {\n    let moreArticles = await getMoreFromThisAuthor(post);\n    setMoreArticles(moreArticles);\n  };\n\n  const [relatedArticles, setRelatedArticles] = useState<PostType[]>([]);\n\n  const fetchRelatedArticles = async (postId: string) => {\n    let relatedArticles = await getRelatedArticles(postId);\n    setRelatedArticles(relatedArticles);\n  };\n\n  //disabled for null user and on authored posts\n  useEffect(() => {\n    if (!user) {\n      setClapDisabled(true);\n    } else {\n      setClapDisabled(\n        user.handle == post?.handle || user?.nuaTokens - buttoncount <= 0\n      );\n    }\n  }, [user, post]);\n\n  useEffect(() => {\n    if (user)\n      setClapDisabled(\n        user?.nuaTokens - buttoncount <= 0 || user.handle == post?.handle\n      );\n  }, [postclaps, user]);\n\n  function nineClaps() {\n    for (let i = 0; i < 9; i++) {\n      clapPost(post?.postId || '');\n    }\n  }\n\n  useEffect(() => {\n    if (mousedown && user) {\n      //single clap\n      if (user?.nuaTokens - buttoncount >= 1) {\n        setButtonCount((prevCounter) => prevCounter + 1);\n        clapPost(post?.postId || '');\n        //ovation effect, user must hold button for 2 seconds for 10 claps total\n        if (context.width > 768 && user?.nuaTokens - buttoncount > 9) {\n          const interval = setInterval(() => {\n            nineClaps();\n            setButtonCount((prevCounter) => prevCounter + 9);\n            setMouseDown(false);\n          }, 2000);\n          return () => clearInterval(interval);\n        }\n      }\n    }\n  }, [mousedown]);\n\n  useEffect(() => {\n    setTokenAnimate(true);\n    setTimeout(() => {\n      setTokenAnimate(false);\n    }, 1000);\n  }, [buttoncount]);\n\n  useEffect(() => {\n    if (post) {\n      setPostclaps(post?.claps);\n    }\n  });\n\n  const getAvatar = () => {\n    if (!post?.isPublication) {\n      return author?.avatar;\n    } else if (avatar !== '') {\n      return avatar;\n    }\n  };\n\n  const getBio = () => {\n    if (!post?.isPublication) {\n      return author?.bio;\n    } else if (bio !== '') {\n      return bio;\n    }\n  };\n\n  const getSocialChannelUrls = () => {\n    if (!post?.isPublication) {\n      if (author) {\n        if (author.website !== '') {\n          return [author.website, ...author.socialChannels];\n        } else {\n          return author.socialChannels;\n        }\n      } else {\n        return [];\n      }\n    } else {\n      return socialUrls;\n    }\n  };\n\n  const getReadTime = () => {\n    if (post?.wordCount) {\n      let time = Math.round(parseInt(post?.wordCount) / 250).toString();\n      if (time === '0') {\n        return '1';\n      }\n      return time;\n    } else {\n      return '1';\n    }\n  };\n\n  //for customizing linkify npm package\n  const componentDecorator = (href: any, text: any, key: any) => (\n    <a href={href} key={key} target='_blank' rel='noopener noreferrer'>\n      {text}\n    </a>\n  );\n\n  const darkOptionsAndColors = {\n    background: darkTheme\n      ? colors.primaryTextColor\n      : colors.primaryBackgroundColor,\n    color: darkTheme\n      ? colors.darkModePrimaryTextColor\n      : colors.primaryTextColor,\n    tags: darkTheme\n      ? colors.darkModeSecondaryButtonColor\n      : colors.tagTokenBackGround,\n    tagText: darkTheme ? colors.primaryBackgroundColor : colors.tagTextColor,\n    secondaryColor: darkTheme\n      ? colors.darkSecondaryTextColor\n      : colors.primaryTextColor,\n  };\n\n  let dashedTitle = post?.title.replace(/\\s+/g, '-').toLowerCase();\n  let url = `https://nuance.xyz${window.location.pathname}`;\n  return (\n    <div style={darkOptionsAndColors} className='read-article-wrapper'>\n      <Helmet>\n        <link rel='canonical' href={url} />\n\n        {/* HTML Meta Tags */}\n        <title>{post?.title}</title>\n        <meta name='title' content={post?.title} />\n        <meta name='description' content={post?.subtitle}></meta>\n        <meta name='author' content={post?.handle}></meta>\n\n        {/* Google / Search Engine Tags */}\n        <meta itemProp='name' content={post?.title} />\n        <meta itemProp='description' content={post?.subtitle} />\n        <meta itemProp='image' content={post?.headerImage} />\n\n        {/* Facebook Meta Tags */}\n        <meta property='og:title' content={post?.title} />\n        <meta property='og:description' content={post?.subtitle} />\n        <meta property='og:url' content={url} />\n        <meta property='og:type' content='article' />\n        <meta\n          property='og:image'\n          content={\n            post?.headerImage ||\n            (darkTheme ? images.NUANCE_LOGO : images.NUANCE_LOGO_BLACK)\n          }\n        />\n\n        {/* Twitter Meta Tags */}\n        <meta name='twitter:card' content='summary_large_image' />\n        <meta name='twitter:title' content={post?.title} />\n        <meta name='twitter:description' content={post?.subtitle} />\n        <meta name='twitter:image' content={post?.headerImage} />\n        <meta name='twitter:creator' content='@nuancedapp' />\n\n        <link\n          rel='stylesheet'\n          href='/assets/js/highlight/styles/github-dark-dimmed.min.css'\n        ></link>\n      </Helmet>\n\n      <Header\n        loggedIn={isLoggedIn}\n        isArticlePage={false}\n        isReadArticlePage={true}\n        ScreenWidth={context.width}\n        isPublicationPage={post?.isPublication}\n        category={post?.category}\n        publication={\n          publication?.publicationHandle.toLowerCase() !== handle?.toLowerCase()\n            ? undefined\n            : publication\n        }\n        postTitle={post?.title}\n      />\n\n      <div className='page'>\n        <div className={isToggled ? 'left left-toggled' : 'left'}>\n          <p className='date'>\n            {formatDate(post?.publishedDate) || formatDate(post?.created)}{' '}\n          </p>\n          <div className='left-content'>\n            <div className='menus'>\n              {post?.url && (\n                <>\n                  <CopyArticle\n                    url={post.url}\n                    shown={copyArticle}\n                    setShown={setCopyArticle}\n                    dark={darkTheme}\n                    postId={post?.postId}\n                  />\n                  {/* ReportArticle also takes in parameters for edit button since they share a drop down menu*/}\n                  <ReportArticle\n                    id={postId || ''}\n                    handle={author?.handle || ''}\n                    url={post?.url}\n                    shown={meatBall}\n                    setShown={setMeatBall}\n                    isPremium={post.isPremium}\n                    dark={darkTheme}\n                  />\n                </>\n              )}\n            </div>\n            <div className='horizontal-divider'></div>\n            {post && author && (\n              <div className='author'>\n                <img\n                  src={getAvatar() || images.DEFAULT_AVATAR}\n                  alt=''\n                  style={\n                    author?.isVerified\n                      ? {\n                          background:\n                            'linear-gradient(to bottom, #1FDCBD, #23F295)',\n                          padding: '0.1em',\n                        }\n                      : { borderRadius: '50%' }\n                  }\n                />\n                <Link\n                  to={`/user/${\n                    post.isPublication ? post.creatorHandle : author.handle\n                  }`}\n                  className='handle'\n                  style={{ color: darkOptionsAndColors.color }}\n                >\n                  @{post.isPublication ? post.creatorHandle : author.handle}\n                </Link>\n                {author?.isVerified && (\n                  <div className='verified-badge'>\n                    <GradientMdVerified width={'16'} height={'16'} />\n                  </div>\n                )}\n              </div>\n            )}\n            <div className='horizontal-divider'></div>\n          </div>\n\n          <div className='left-menu'>\n            <ReadArticleSidebar\n              isSidebarToggle={isSidebarToggled}\n              id={id}\n              url={post?.url || ''}\n              handle={post?.handle}\n              avatar={getAvatar()}\n              isPremium={post?.isPremium}\n              dark={darkTheme}\n            />\n          </div>\n          {\n            <>\n              <div className='side-bar-clap-button'>\n                <div\n                  className={\n                    tokenAnimate && buttoncount !== 0\n                      ? 'clap-count-container'\n                      : 'hide'\n                  }\n                >\n                  +{buttoncount}\n                </div>\n                <ClapButton\n                  styleType={darkTheme ? 'clap-button-dark' : 'clap-button'}\n                  disabled={loading}\n                  dark={darkTheme}\n                  type='button'\n                  style={{ width: '96px' }}\n                  onMouseDown={() => {\n                    setMouseDown(true);\n                  }}\n                  onMouseUp={() => {\n                    setMouseDown(false);\n                  }}\n                  applaudingPost={post}\n                />\n              </div>\n              <div className='publication-email-opt-in' ref={refEmailOptIn}>\n                {context.width > 1089 && publicationHandle == 'FastBlocks' ? (\n                  <EmailOptIn\n                    mobile={context.width < 1089}\n                    publictionHandle={publicationHandle}\n                  />\n                ) : null}\n              </div>\n            </>\n          }\n          <div className='desktop-only-flex left-sidebar-more-articles-wrapper'>\n            {relatedArticles.length > 0 && (\n              <div className='left-sidebar-more-articles'>\n                <p className='left-sidebar-more-articles-title'>\n                  RELATED ARTICLES\n                </p>\n                <div className='left-sidebar-article-list-items-wrapper'>\n                  {relatedArticles.map((post) => (\n                    <Link\n                      style={\n                        darkTheme\n                          ? {\n                              color: darkOptionsAndColors.color,\n                            }\n                          : {}\n                      }\n                      className='article-link'\n                      to={post.url}\n                    >\n                      {post.title.slice(0, 50)}\n                    </Link>\n                  ))}\n                </div>\n              </div>\n            )}\n            {moreArticles && moreArticles.authorArticles.length > 0 && (\n              <div className='left-sidebar-more-articles'>\n                <p className='left-sidebar-more-articles-title'>\n                  BY @\n                  {moreArticles.authorArticles[0].isPublication\n                    ? moreArticles.authorArticles[0].creatorHandle\n                    : moreArticles.authorArticles[0].handle}\n                </p>\n                <div className='left-sidebar-article-list-items-wrapper'>\n                  {moreArticles.authorArticles.map((post) => (\n                    <Link\n                      style={\n                        darkTheme\n                          ? {\n                              color: darkOptionsAndColors.color,\n                            }\n                          : {}\n                      }\n                      className='article-link'\n                      to={post.url}\n                    >\n                      {post.title.slice(0, 50)}\n                    </Link>\n                  ))}\n                </div>\n              </div>\n            )}\n            {moreArticles && moreArticles.publicationArticles.length > 0 && (\n              <div className='left-sidebar-more-articles'>\n                <p className='left-sidebar-more-articles-title'>\n                  BY @{moreArticles.publicationArticles[0].handle}\n                </p>\n                <div className='left-sidebar-article-list-items-wrapper'>\n                  {moreArticles.publicationArticles.map((post) => (\n                    <Link\n                      style={\n                        darkTheme\n                          ? {\n                              color: darkOptionsAndColors.color,\n                            }\n                          : {}\n                      }\n                      className='article-link'\n                      to={post.url}\n                    >\n                      {post.title.slice(0, 50)}\n                    </Link>\n                  ))}\n                </div>\n              </div>\n            )}\n          </div>\n          {!user && context.width > 768 ? (\n            <LoggedOutSidebar style={{ alignItems: 'end' }} />\n          ) : (\n            ''\n          )}\n        </div>\n\n        <div className='right'>\n          {loading && (\n            <div style={{ marginTop: '-50px' }}>\n              <Loader />\n            </div>\n          )}\n\n          {!loading && post && author && (\n            <div className='content'>\n              <div className='title-post-info-wrapper'>\n                {post.isPremium ? (\n                  <img\n                    className='nft-lock-icon'\n                    src={icons.NFT_LOCK_ICON}\n                    style={{ filter: darkTheme ? 'contrast(0.5)' : '' }}\n                  />\n                ) : post.isMembersOnly ? (\n                  <div className='read-article-subscription'>\n                    <img\n                      className='read-article-subscription-icon'\n                      src={icons.MEMBERS_ONLY}\n                      style={{ filter: darkTheme ? 'contrast(0.5)' : '' }}\n                    />\n                    <p className='read-article-subscription-text'>\n                      Members Only\n                    </p>\n                  </div>\n                ) : null}\n\n                <h1\n                  style={\n                    post.isPublication\n                      ? {\n                          fontFamily: publication?.styling.fontType,\n                          color: darkOptionsAndColors.color,\n                        }\n                      : { color: darkOptionsAndColors.color }\n                  }\n                  className='title'\n                >\n                  {post.title}\n                </h1>\n                <PostInformation\n                  post={post}\n                  readTime={getReadTime()}\n                  publication={publication}\n                  isMobile={context.width <= 768}\n                  handle={handle}\n                />\n                <h2 className='subtitle'>{post.subtitle}</h2>\n              </div>\n\n              <div\n                className='header-content-wrapper'\n                style={\n                  post.premiumArticleSaleInfo\n                    ? { backgroundColor: 'rgba(67, 223, 186, 0.5)' }\n                    : {}\n                }\n              >\n                <img\n                  className='header-image'\n                  src={\n                    post.headerImage ||\n                    (darkTheme ? images.NUANCE_LOGO : images.NUANCE_LOGO_BLACK)\n                  }\n                  style={{\n                    background: darkTheme\n                      ? darkOptionsAndColors.background\n                      : '',\n                  }}\n                />\n                {post.premiumArticleSaleInfo ? (\n                  <PremiumArticleInfo\n                    post={post}\n                    refreshPost={async () => {\n                      load();\n                    }}\n                  />\n                ) : post.isMembersOnly && post.content === '' && isLoggedIn ? (\n                  <>\n                    {modalType === 'Subscription' && modalContext?.isModalOpen && (\n                      <SubscriptionModal\n                        handle={author.handle || ''}\n                        authorPrincipalId={post.principal || ''}\n                        profileImage={author.avatar}\n                        isPublication={post.isPublication || false}\n                        onSubscriptionComplete={() => {\n                          onSubsriptionComplete();\n                        }}\n                      />\n                    )}\n\n                    {modalType === 'cancelSubscription' &&\n                      modalContext?.isModalOpen && (\n                        <CancelSubscriptionModal\n                          handle={author.handle || ''}\n                          profileImage={author.avatar}\n                          isPublication={post.isPublication || false}\n                          authorPrincipalId={post.principal || ''}\n                          onCancelComplete={() => {}}\n                        />\n                      )}\n                  </>\n                ) : null}\n\n                {post.premiumArticleSaleInfo ||\n                (post.isMembersOnly && post.content === '') ? (\n                  <div className='text text-not-allowed'>\n                    {parse(premiumArticlePlaceHolder)}\n                  </div>\n                ) : (\n                  <div className={darkTheme ? 'dark-text' : 'text'}>\n                    {parse(post.content)}\n                  </div>\n                )}\n              </div>\n\n              <div className='profile-footer-wrapper'>\n                <div className='tag-and-button'>\n                  {\n                    <div className='clap-footer'>\n                      <div\n                        className={\n                          tokenAnimate && buttoncount !== 0\n                            ? 'clap-count-container-footer'\n                            : 'hide'\n                        }\n                      >\n                        +{buttoncount}\n                      </div>\n                      <ClapButton\n                        styleType={\n                          darkTheme ? 'clap-button-dark' : 'clap-button'\n                        }\n                        type='button'\n                        style={{ width: '96px' }}\n                        dark={darkTheme}\n                        disabled={loading}\n                        onMouseDown={() => {\n                          setMouseDown(true);\n                        }}\n                        onMouseUp={() => {\n                          setMouseDown(false);\n                        }}\n                        applaudingPost={post}\n                      >\n                        {parseInt(postclaps) + buttoncount}\n                      </ClapButton>\n                    </div>\n                  }\n                  <div className='tag-links'>\n                    {post.tags?.map((tag) => {\n                      return (\n                        <span\n                          key={tag.tagId}\n                          className='tag-link'\n                          onClick={() => searchTag(tag.tagName)}\n                        >\n                          {tag.tagName}\n                        </span>\n                      );\n                    })}\n                  </div>\n                </div>\n                <div className='author-content'>\n                  <img\n                    src={getAvatar() || images.DEFAULT_AVATAR}\n                    alt='background'\n                    className='profile-picture'\n                    style={\n                      author?.isVerified\n                        ? {\n                            background:\n                              'linear-gradient(to bottom, #1FDCBD, #23F295)',\n                            padding: '0.2em',\n                          }\n                        : { borderRadius: '50%' }\n                    }\n                  />\n                  <Link\n                    to={`/user/${\n                      post.isPublication ? post.creatorHandle : author.handle\n                    }`}\n                    style={{ color: darkOptionsAndColors.color }}\n                    className='username'\n                  >\n                    @{post.isPublication ? post.creatorHandle : author.handle}\n                    {' '}\n                    {author?.isVerified && (\n                      <div className='verified-badge'>\n                        <GradientMdVerified\n                          width={'20'}\n                          height={'20'}\n                          gradientKey='bottom'\n                        />\n                      </div>\n                    )}\n                  </Link>\n                  <div className='social-channels'>\n                    {getSocialChannelUrls().map((url, index) => {\n                      return (\n                        <div\n                          key={index}\n                          onClick={() => {\n                            let urlWithProtocol =\n                              url.startsWith('https://') ||\n                              url.startsWith('http://')\n                                ? url\n                                : 'https://' + url;\n                            window.open(urlWithProtocol, '_blank');\n                          }}\n                        >\n                          <Tooltip\n                            clickable={true}\n                            className='tooltip-wrapper'\n                            anchorSelect={'#social-channel-' + index}\n                            place='top'\n                            noArrow={true}\n                          >\n                            {url}\n                          </Tooltip>\n                          <img\n                            className='social-channel-icon'\n                            src={getIconForSocialChannel(url, darkTheme)}\n                            id={'social-channel-' + index}\n                          />\n                        </div>\n                      );\n                    })}\n                  </div>\n                  <p\n                    className='description'\n                    style={\n                      darkTheme\n                        ? {\n                            color: darkOptionsAndColors.secondaryColor,\n                          }\n                        : {}\n                    }\n                  >\n                    {getBio()}\n                  </p>\n\n                  <FollowAuthor\n                    AuthorHandle={author?.handle || ''}\n                    Followers={user?.followersArray || undefined}\n                    user={user?.handle || ''}\n                    isPublication={false}\n                  />\n                </div>\n\n                <div className='publication-email-opt-in' ref={refEmailOptIn}>\n                  {context.width < 1089 && publicationHandle == 'FastBlocks' ? (\n                    <EmailOptIn\n                      mobile={context.width < 1089}\n                      publictionHandle={publicationHandle}\n                    />\n                  ) : null}\n                </div>\n                <div className='comment-section'>\n                  <WriteComment\n                    postId={post.postId}\n                    bucketCanisterId={post.bucketCanisterId}\n                    label='WRITE A COMMENT..'\n                    handle={user?.handle || ''}\n                    avatar={user?.avatar || ''}\n                    totalNumberOfComments={totalNumberOfComments}\n                    setComments={(newComments, totalNumber) => {\n                      setComments(newComments);\n                      setTotalNumberOfComments(totalNumber);\n                    }}\n                    comments={comments}\n                  />\n                  {comments.length > 0 &&\n                    comments[0].postId === post.postId &&\n                    comments.map((comment) => (\n                      <Comments\n                        key={comment.commentId}\n                        isReply={false}\n                        comment={comment}\n                        bucketCanisterId={post.bucketCanisterId}\n                        postId={post.postId}\n                        loggedInUser={user?.handle || ''}\n                        avatar={user?.avatar || ''}\n                        totalNumberOfComments={totalNumberOfComments}\n                        comments={comments}\n                        isVerified={comment.isVerified}\n                        setComments={(newComments, totalNumber) => {\n                          setComments(newComments);\n                          setTotalNumberOfComments(totalNumber);\n                        }}\n                      />\n                    ))}\n                </div>\n                <div style={{ height: '100px' }} />\n                {relatedArticles.length > 0 && (\n                  <div className='more-articles'>\n                    <p className='more-articles-title'>RELATED ARTICLES</p>\n                    <div className='article-list-items-wrapper'>\n                      {relatedArticles.map((post) => (\n                        <CardPublishedArticles post={post} key={post.postId} />\n                      ))}\n                    </div>\n                  </div>\n                )}\n                {moreArticles && moreArticles.authorArticles.length > 0 && (\n                  <div className='more-articles'>\n                    <p className='more-articles-title'>MORE FROM THIS AUTHOR</p>\n                    <div className='article-list-items-wrapper'>\n                      {moreArticles.authorArticles.map((post) => (\n                        <CardPublishedArticles post={post} key={post.postId} />\n                      ))}\n                    </div>\n                  </div>\n                )}\n                {moreArticles && moreArticles.publicationArticles.length > 0 && (\n                  <div className='more-articles'>\n                    <p className='more-articles-title'>\n                      MORE FROM THIS PUBLICATION\n                    </p>\n                    <div className='article-list-items-wrapper'>\n                      {moreArticles.publicationArticles.map((post) => (\n                        <CardPublishedArticles post={post} key={post.postId} />\n                      ))}\n                    </div>\n                  </div>\n                )}\n              </div>\n            </div>\n          )}\n\n          {!loading && loadingError && (\n            <div className='content'>\n              <p className='not-found'>{loadingError}</p>\n            </div>\n          )}\n          <Footer />\n        </div>\n      </div>\n    </div>\n  );\n};\n\nexport default ReadArticle;\n"],"names":["___CSS_LOADER_EXPORT___","push","module","id","props","shown","setShown","useState","isAuthorAndReader","setIsAuthorAndReader","author","state","user","navigate","postId","input","parts","split","bucketCanisterId","slice","join","separateIds","useEffect","isEditor","publicationsArray","map","pubObj","publicationName","handle","isPremium","darkOptionsAndColors","background","dark","color","THREE_DOTS","THREE_DOTS_LIGHT_ICON","className","style","width","onClick","isSidebarToggle","src","alt","display","window","location","origin","navigator","clipboard","writeText","url","console","log","avatar","copyLinkToArticle","href","setTimeout","copyIconShown","copyIconNotShown","cursor","height","boxShadow","CloseMenu","getAuthor","followAuthor","unfollowAuthor","following","setFollowing","loading","setLoading","followersArray","includes","onMouseLeave","styleType","icon","children","type","disabled","applaudingPost","clapIcon","clapIcons","setClapIcons","clicks","setClicks","modalContext","useContext","ModalContext","fetchTokenBalances","tokenBalances","clapCreate","i","getNumberOfApplauds","fakeApplaud","getFakeApplaud","parseInt","claps","after","Math","abs","date","getTime","Date","concat","length","creatorHandle","openModal","clappingPostData","onMouseDown","onMouseUp","String","publicationFeatureIsLive","Context","publicationFeature","isMobile","alignItems","justifyContent","flexDirection","marginBottom","post","modified","isPublication","to","publication","publicationHandle","textDecoration","readTime","marginLeft","toLowerCase","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","to32bits","num","b","ArrayBuffer","DataView","setUint32","Array","from","Uint8Array","tokenIdentifier","principal","index","padding","Buffer","array","toUint8Array","toText","PremiumArticleInfo","userAccepted","setUserAccepted","openingBuyScreen","setOpeningBuyScreen","userBalance","setUserBalance","userWallet","setUserWallet","undefined","marketplacePurchaseLoading","setMarketplacePurchaseLoading","darkTheme","secondaryColor","getUserWallet","isLoggedIn","lockToken","transferIcp","settleToken","getOwnedNfts","getMyBalance","premiumArticleSaleInfo","modalPage","setModalPage","totalSupply","currentSupply","handleOpenBuyScreen","async","walletAndBalance","getUserWalletAndBalance","Number","filter","fontWeight","priceReadable","open","Button","light","title","name","value","onChange","price_e8s","articleSaleInfo","lockResponse","nftCanisterId","tokenIndex","BigInt","accountId","transferResponse","Err","handleMarketplacePurchase","pow","toFixed","borderColor","alignSelf","refreshPost","label","commentId","replyToCommentId","content","comment","edit","closeModal","totalNumberOfComments","setComments","comments","saveComment","commentText","setCommentText","isSaving","setIsSaving","hasError","commentModel","scanCommentAndOptimisticiallyUpdate","scanningComment","tempComment","replies","repliedCommentId","repliesCopied","reply","scanCommentAndAddReply","commentCountExceeded","handleSave","edited","trim","isEdit","oldComments","oldTotalNumber","updatedComments","optimisticUpdate","saveResponse","error","margin","placeholder","e","target","errorMessage","Comments","loggedInUser","isReply","isVerified","identity","toString","censoredComment","showReplyBox","setShowReplyBox","replyActive","setReplyActive","setReplyToCommentId","repliesVisible","setRepliesVisible","editMode","setEditMode","upVotesCount","setUpVotesCount","upVotes","downVotesCount","setDownVotesCount","downVotes","voting","setVoting","upVoted","downVoted","upVoteComment","downVoteComment","getPostComments","removeCommentVote","reportComment","loggedOut","handleRegister","handleVote","voteType","hasVoted","oppositeVoteType","oppositeVoteFunction","hasVotedOpposite","action","rel","borderRadius","dateParam","today","seconds","round","minutes","hours","days","months","years","pluralize","count","noun","timeAgo","createdAt","isCensored","creator","pathname","err","handleReport","toLocaleUpperCase","key","copyArticle","setCopyArticle","meatBall","setMeatBall","screenWidth","setScreenWidth","isToggled","setIsToggled","setAvatar","bio","setBio","socialUrls","setSocialUrls","modalType","setModalType","setPublicationHandle","refEmailOptIn","useRef","nftFeature","context","getPost","clearPost","clapPost","loadingError","clearWordCount","getMoreFromThisAuthor","getRelatedArticles","setSearchText","getPostError","clearSearchBar","isTagScreen","getPremiumPostError","ownedPremiumPosts","deleteComment","getUsersByHandlesReturnOnly","usersByHandles","getPublication","clearAll","redirect","redirectScreen","load","getTitleFromUrl","segments","URL","pop","setTotalNumberOfComments","URLSearchParams","search","get","scrollToComment","commentElement","document","getElementById","commentPosition","getBoundingClientRect","top","pageYOffset","scrollTo","behavior","replace","retryTimeout","clearTimeout","publicationHandleName","isMembersOnly","openSubscriptionModal","fetchComments","getMoreFromThisAuthorAndPublication","fetchRelatedArticles","handleWriterFields","response","writer","website","socialChannelsUrls","onresize","onload","innerWidth","postclaps","setPostclaps","tokenAnimate","setTokenAnimate","buttoncount","setButtonCount","mousedown","setMouseDown","clapDisabled","setClapDisabled","moreArticles","setMoreArticles","relatedArticles","setRelatedArticles","nuaTokens","prevCounter","interval","setInterval","nineClaps","clearInterval","getAvatar","tags","tagText","Helmet","subtitle","itemProp","headerImage","property","loggedIn","isArticlePage","isReadArticlePage","ScreenWidth","isPublicationPage","category","postTitle","publishedDate","created","data","ref","mobile","publictionHandle","authorArticles","publicationArticles","marginTop","Loader","fontFamily","styling","fontType","wordCount","time","getReadTime","backgroundColor","isModalOpen","authorPrincipalId","profileImage","onSubscriptionComplete","onCancelComplete","tag","tagId","encodeURIComponent","toUpperCase","searchTag","tagName","gradientKey","socialChannels","urlWithProtocol","startsWith","clickable","anchorSelect","place","noArrow","AuthorHandle","Followers","newComments","totalNumber"],"sourceRoot":""}