PageSourceSearch

https://www.story.one/en/wp-content/themes/storyone/assets/scripts/user-list-button.a5c458d872d797507464.js

js story.one collected 2026-10-03 22:29:38 UTC 10,078 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkproject_name=self.webpackChunkproject_name||[]).push([[1288,5883,2915],{59520:function(e,t,r){r.r(t),r.d(t,{default:function(){return B}});var n=r(4942),o=r(88785),a=r(44854),u=r(16451),l=r(12140),c=r(57302),i=r(22592),s=r(22682),f=r(87302),d=r(97201),p=r(47328);function v(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function b(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?v(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):v(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var y=["data-type","aria-describedby"],m={class:"author-card__body"},h={class:"author-card__text-container"},k=["href","id"],_={class:"author-card__subtitles"},w={key:0,class:"author-card__info | typo-helper text-medium-grey"},g={class:"author-card__info__item"},O={key:0},P={class:"author-card__info__item"},x={__name:"author-card",props:b(b({},i.$5),{},{backgroundColor:{type:String,default:"white"},layout:{type:String,default:"column"},show_follow_button:{Boolean:Boolean,default:!0},showStats:{type:Boolean,default:!0},custom_attributes:Object}),setup:function(e){var t=e,r=(0,a.Fl)((function(){return(0,c.Yh)(t)})),i=(0,a.Fl)((function(){return(0,c.b3)(t)})),v=(0,a.Fl)((function(){return{view:(0,u.ZP)("view")}})),b=(0,a.Fl)((function(){return"author-card-".concat(t.uuid)})),x=(0,a.Fl)((function(){return"row"===t.layout})),B=(0,a.Fl)((function(){return t.show_follow_button&&void 0!==t.is_followed_by_me}));return function(a,c){var Z;return(0,o.openBlock)(),(0,o.createElementBlock)("article",(0,o.mergeProps)({class:["author-card",(Z={},(0,n.Z)(Z,"bg-".concat(t.backgroundColor),t.backgroundColor),(0,n.Z)(Z,"author-card--layout--row",(0,o.unref)(x)),(0,n.Z)(Z,"author-card--layout--column",!(0,o.unref)(x)),Z)],"data-type":t.type},e.custom_attributes,{"aria-describedby":(0,o.unref)(b)}),[(0,o.createVNode)(p.default,(0,o.mergeProps)(t,{class:"author-card__pic",size:(0,o.unref)(x)?"s":"full","border-radius":(0,o.unref)(x)?"s":"l"}),null,16,["size","border-radius"]),(0,o.createElementVNode)("div",m,[(0,o.createElementVNode)("div",h,[(0,o.createElementVNode)("a",{class:"author-card__title | copy text-medium text-inherit",href:(0,o.unref)(r),id:(0,o.unref)(b)},[(0,o.createElementVNode)("h3",null,(0,o.toDisplayString)((0,o.unref)(i)),1)],8,k),(0,o.createElementVNode)("div",_,[t.showStats?((0,o.openBlock)(),(0,o.createElementBlock)("div",w,[(0,o.createElementVNode)("span",g,[(0,o.unref)(x)?((0,o.openBlock)(),(0,o.createBlock)(f.default,{key:0,name:"book",type:"symbol"})):(0,o.createCommentVNode)("v-if",!0),(0,o.createTextVNode)(" "+(0,o.toDisplayString)((0,o.unref)(l.uf)(t.published_books_count))+" "+(0,o.toDisplayString)((0,o.unref)(u.ZP)("books")),1
1)]),(0,o.unref)(x)?(0,o.createCommentVNode)("v-if",!0):((0,o.openBlock)(),(0,o.createElementBlock)("span",O,"•")),(0,o.createElementVNode)("span",P,[(0,o.unref)(x)?((0,o.openBlock)(),(0,o.createBlock)(f.default,{key:0,name:"story",type:"symbol"})):(0,o.createCommentVNode)("v-if",!0),(0,o.createTextVNode)(" "+(0,o.toDisplayString)((0,o.unref)(l.uf)(t.published_stories_count))+" "+(0,o.toDisplayString)((0,o.unref)(u.ZP)("stories")),1)])])):(0,o.createCommentVNode)("v-if",!0)])]),(0,o.unref)(B)?((0,o.openBlock)(),(0,o.createBlock)(s.default,(0,o.normalizeProps)((0,o.mergeProps)({key:0},t)),null,16)):((0,o.openBlock)(),(0,o.createBlock)(d.default,{key:1,"button-style":"outlined",size:"small",href:(0,o.unref)(r)},{default:(0,o.withCtx)((function(){return[(0,o.createTextVNode)((0,o.toDisplayString)((0,o.unref)(v).view),1)]})),_:1},8,["href"]))])],16,y)}}};var B=(0,r(83744).Z)(x,[["__scopeId","data-v-5046925a"]])},22682:function(e,t,r){r.r(t),r.d(t,{default:function(){return _}});var n=r(15861),o=r(4942),a=r(87757),u=r.n(a),l=r(88785),c=r(37581),i=r(16451),s=r(11817),f=r(51727),d=r(64252),p=r(5921),v=r(84935),b=r(22592),y=r(97201);function m(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function h(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?m(Object(r),!0).forEach((function(t){(0,o.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):m(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var k={__name:"author-follow-button",props:h(h({},b.$5),{},{followButtonTracking:String}),setup:function(e){var t=e,r=(0,f.a)(),o=r.user,a=r.isLoggedIn,b=(0,r.isCurrentUser)(t.uuid),m=(0,c.O)().openAuthModal,h=(0,l.ref)(t.is_followed_by_me),k=(0,l.computed)((function(){return{editProfile:(0,i.ZP)("editProfile")}}));function _(){return(_=(0,n.Z)(u().mark((function e(){var r,n,a;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o.value&&!b.value){e.next=3;break}return h.value=!1,e.abrupt("return");case 3:return e.prev=3,e.next=6,s.Z.get((0,d.ZP)((0,p.ZP)("user-followees",{uuid:o.value.uuid}),{"filter[uuid]":t.uuid}));case 6:n=e.sent,a=n.data,h.value=(null==a||null===(r=a.data)||void 0===r?void 0:r.length)>0,e.next=14;break;case 11:e.prev=11,e.t0=e.catch(3),(0,p.UW)(e.t0);case 14:case"end":return e.stop()}}),e,null,[[3,11]])})))).apply(this,arguments)}function w(){return g.apply(this,arguments)}function g(){return(g=(0,n.Z)(u().mark((function e(){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,s.Z.post((0,p.ZP)("follow-user",{uuid:t.uuid}));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function O(){return P.apply(this,arguments)}function P(){return(P=(0,n.Z)(u().mark((function e(){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,s.Z.delete((0,p.ZP)("unfollow-user",{uuid:t.uuid}));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function x(){return B.apply(this,arguments)}function B(){return(B=(0,n.Z)(u().mark((function e(){var t;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a.value){e.next=3;break}return m("login"),e.abrupt("return");case 3:if(t=h.value,h.value=!h.value,e.prev=5,!t){e.next=11;break}return e.next=9,O();case 9:e.next=13;break;case 11:return e.next=13,w();case 13:e.next=18;break;case 15:e.prev=15,e.t0=e.catch(5),console.error(e.t0);case 18:case"end":return e.stop()}}),e,null,[[5,15]])})))).apply(this,arguments)}var Z=(0,l.computed)((function(){return h.value?(0,i.ZP)("following"):(0,i.ZP)("follow")})),j=(0,l.computed)((function(){return h.value?(0,i.ZP)("unfollow"):(0,i.ZP)("follow")})),V=(0,l.computed)((function(){try{return JSON.parse(t.followButtonTracking)}catch(e){return null}}));return(0,l.onMounted)((function(){void 0===h.value&&function(){_.apply(this,arguments)}()})),function(e,t){return(0,l.unref)(b)?((0,l.openBlock)(),(0,l.createBlock)(y.default,{key:0,class:"author-follow-button",size:"small","button-style":"outlined",href:(0,l.unref)(v.Z)("profile-settings")},{default:(0,l.withCtx)((function(){return[(0,l.createTextVNode)((0,l.toDisplayString)(k.value.editProfile),1)]})),_:1},8,["href"])):((0,l.openBlock)(),(0,l.createBlock)(y.default,{key:1,class:(0,l.normalizeClass)(["author-follow-button",{"is-hidden":void 0===h.value}]),size:"small","button-style":h.value?"primary":"outlined",onClick:x,"aria-label":j.value,custom_attributes:V.value},{default:(0,l.withCtx)((function(){return[(0,l.createTextVNode)((0,l.toDisplayString)(Z.value),1)]})),_:1},8,["class","button-style","aria-label","custom_attributes"]))}}};var _=(0,r(83744).Z)(k,[["__scopeId","data-v-59f423c8"]])},29810:function(e,t,r){r.r(t),r.d(t,{default:function(){return y}});var n=r(42982),o=r(88785),a=r(66309),u=r(51727),l=r(64252),c=r(19731),i=r(59520),s=r(26536),f=r(63865),d=r(96552),p=r(37581),v=["aria-busy"],b={__name:"user-list-button",props:{title:String,api_url:{type:String,required:!0}},setup:function(e){var t=e,r=(0,u.a)().isLoggedIn,b=(0,p.O)().openAuthModal,y=(0,o.ref)(t.api_url),m=(0,o.ref)(null),h=(0,o.ref)([]),k=(0,o.ref)(!1),_=(0,o.ref)(null),w=(0,o.ref)(!1),g=(0,c.b)(y,{immediate:!1,refetch:!0,afterFetch:function(e){var t=e.data,r=null==t?void 0:t.data;h.value=[].concat((0,n.Z)(h.value),(0,n.Z)(r));var o=null==t?void 0:t.links.next;m.value=(0,l.CO)(o,y.value)}}).get().json(),O=g.data,P=g.isFetching,x=g.execute;function B(){r.value?(w.value=!0,k.value||x()):b("login")}return(0,g.onFetchFinally)((function(){k.value=!0})),(0,a.MQn)(_,(function(){m.value&&(y.value=m.value)}),{distance:200}),function(e,r){return(0,o.openBlock)(),(0,o.createElementBlock)("button",{class:"user-list-button",onClick:B},[(0,o.renderSlot)(e.$slots,"default"),(0,o.createVNode)(f.default,{class:"user-list-modal",modelValue:w.value,"onUpdate:modelValue":r[0]||(r[0]=function(e){return w.value=e})},{default:(0,o.withCtx)((function(){return[(0,o.createVNode)(s.default,{class:"h3-mobile"},{default:(0,o.withCtx)((function(){return[(0,o.createTextVNode)((0,o.toDisplayString)(t.title),
11)]})),_:1}),(0,o.createElementVNode)("section",{class:"modal__body",ref_key:"scrollContainer",ref:_,role:"feed","aria-busy":(0,o.unref)(P)},[((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(h.value,(function(e,t){var r,n;return(0,o.openBlock)(),(0,o.createBlock)(i.default,(0,o.mergeProps)(e,{layout:"row","show-stats":!1,"aria-posinset":t+1,"aria-setsize":(null===(r=(0,o.unref)(O))||void 0===r||null===(n=r.meta)||void 0===n?void 0:n.total)||-1}),null,16,["aria-posinset","aria-setsize"])})),256)),(0,o.unref)(P)?((0,o.openBlock)(),(0,o.createBlock)(d.default,{key:0})):(0,o.createCommentVNode)("v-if",!0)],8,v)]})),_:1},8,["modelValue"])])}}};var y=(0,r(83744).Z)(b,[["__scopeId","data-v-7aeea304"]])}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.