diff --git a/plugins/ValkyrSceneCards/ValkyrSceneCards.js b/plugins/ValkyrSceneCards/ValkyrSceneCards.js index 371e1b6..8e68027 100644 --- a/plugins/ValkyrSceneCards/ValkyrSceneCards.js +++ b/plugins/ValkyrSceneCards/ValkyrSceneCards.js @@ -1,2 +1,2 @@ /*! For license information please see ValkyrSceneCards.js.LICENSE.txt */ -(()=>{var e={725:(e,r,t)=>{"use strict";t.r(r)},498:(e,r,t)=>{"use strict";t.r(r)},264:(e,r,t)=>{"use strict";t.r(r)},237:function(e,r){"use strict";var t=this&&this.__rest||function(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o{var{scene:r}=e,o=t(e,["scene"]);if(!r.details||o.hideDescription)return n.createElement("div",{className:"vsc-description"});const i={WebkitLineClamp:o.descriptionMaxLines};return n.createElement("div",{className:"vsc-description"},n.createElement("div",{style:i,className:"vsc-description-inner"},r.details))}},407:function(e,r){"use strict";var t=this&&this.__rest||function(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o{var{scene:r}=e;return t(e,["scene"]).hideDirector||!r.director?null:n.createElement("div",{className:"vsc-director"},"Directed by"," ",n.createElement("a",{href:o(r.director)},r.director))}},98:(e,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const{React:t}=window.PluginApi;r.default=()=>t.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":"true",focusable:"false",width:"1em",height:"1em",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 36 36",style:{transform:"rotate(360deg)"}},t.createElement("path",{fill:"currentColor",d:"M22.855.758L7.875 7.024l12.537 9.733c2.633 2.224 6.377 2.937 9.77 1.518c4.826-2.018 7.096-7.576 5.072-12.413C33.232 1.024 27.68-1.261 22.855.758zm-9.962 17.924L2.05 10.284L.137 23.529a7.993 7.993 0 0 0 2.958 7.803a8.001 8.001 0 0 0 9.798-12.65zm15.339 7.015l-8.156-4.69l-.033 9.223c-.088 2 .904 3.98 2.75 5.041a5.462 5.462 0 0 0 7.479-2.051c1.499-2.644.589-6.013-2.04-7.523z"}),t.createElement("rect",{x:"0",y:"0",width:"36",height:"36",fill:"rgba(0, 0, 0, 0)"}))},254:function(e,r,t){"use strict";var n=this&&this.__rest||function(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o{var r,{hideResolution:t,resolutionIcon:o,scene:l}=e,u=n(e,["hideResolution","resolutionIcon","scene"]);const c=l.files.sort(((e,r)=>r.height-e.height))[0],d=void 0!==l.date&&!u.hideDate,m=!!c&&!u.hideDuration,f=!!c&&!t;if(!d&&!m&&t)return null;const p=d?s.createElement("span",{className:"vsc-date"},l.date):null,v=f&&o,h=f&&!o?s.createElement("span",{className:"vsc-resolution"},i.default.resolution(c.width,c.height)):null;let g=null;if(m){let e=i.default.secondsToTimestamp(null!==(r=c.duration)&&void 0!==r?r:0);if(u.durationPadding){const r=e.split(":").reverse();1===r.length&&r.push("00","00"),2===r.length&&r.push("00"),e=r.map((e=>e.length<2?"0"+e:e)).reverse().join(":")}g=s.createElement("span",{className:"vsc-duration"},e)}return s.createElement("div",{className:"vsc-key-data"},s.createElement(a.default,{file:c,hide:!v}),p,g,h)}},622:function(e,r,t){"use strict";var n=this&&this.__rest||function(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o{var r,t,o,u,{performer:c}=e,d=n(e,["performer"]);const m=!!c.birthdate&&!d.hidePerformerHoverAge,f=m?s.createElement("span",{className:"vsc-performer-age"},a.default.age(c.birthdate,d.sceneDate)," years old"):null,p=!!c.country&&!d.hidePerformerHoverNationality,v=p?s.createElement("span",{className:`fi fi-${null===(r=c.country)||void 0===r?void 0:r.toLowerCase()}`}):null,h=!!c.image_path&&!c.image_path.includes("default=true")&&!d.hidePerformerHoverImage,g=h?s.createElement("a",{href:`/performers/${c.id}`,className:"performer-tag col m-auto"},s.createElement("img",{className:"image-thumbnail",alt:null!==(t=c.name)&&void 0!==t?t:"",src:null!==(o=c.image_path)&&void 0!==o?o:""})):null,y=!d.hidePerformerHoverName,b=(0,i.default)("vsc-performer-text-list-popover-name",{[`vsc-gender-color--${(null===(u=c.gender)||void 0===u?void 0:u.toLowerCase())||"unknown"}`]:d.performerGenderColors}),P=y?s.createElement("div",{className:b},c.name):null,O=p||m?s.createElement("div",{className:"vsc-performer-text-list-popover-data"},v,f):null,E=s.createElement("div",{className:"performer-tag-container row"},g,P,O);return O||h?s.createElement(l,{content:E,leaveDelay:100,placement:"top"},d.children):d.children}},309:function(e,r,t){"use strict";var n=this&&this.__rest||function(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o{var{scene:r}=e,t=n(e,["scene"]);if(t.hidePerformer||!t.performerAvatars||r.performers.length<1)return null;const o=(0,i.sortPerformers)(r.performers);return s.createElement("ul",{className:"vsc-performers-list vsc-performers-list__avatars"},o.map((e=>{let n;const o=t.sceneCustomAvatars.find((r=>r.performers.find((r=>r.id===e.id))));switch(!0){case!!o:n=s.createElement(d,{performer:e,image:o});break;case t.performerAvatarsProfile:n=s.createElement(c,{performer:e});break;default:n=s.createElement(u,{performer:e})}return s.createElement("li",{className:"vsc-performer"},s.createElement(a.default,{hidePerformerHoverAge:t.hidePerformerHoverAge,hidePerformerHoverImage:t.hidePerformerHoverImage,hidePerformerHoverNationality:t.hidePerformerHoverNationality,hidePerformerHoverName:!1,performer:e,performerGenderColors:t.performerGenderColors,sceneDate:r.date},n))})))};const u=({performer:e})=>{const r=e.name.split("-").join(" ").split(" ");let t="";r.forEach((e=>{t+=e.split("")[0]}));const n=(0,i.getPerformerGenderIcon)(e.gender);return s.createElement("a",{href:`/performers/${e.id}`,className:"vsc-performer-avatar"},s.createElement("span",{"aria-label":e.name},t),n?s.createElement(l,{icon:n}):null)},c=({performer:e})=>!e.image_path||e.image_path.includes("default=true")?s.createElement(u,{performer:e}):s.createElement("a",{href:`/performers/${e.id}`,className:"vsc-performer-avatar vsc-performer-avatar--profile"},s.createElement("img",{src:e.image_path,alt:e.name})),d=({image:e,performer:r})=>e.paths.image?s.createElement("a",{href:`/performers/${r.id}`,className:"vsc-performer-avatar vsc-performer-avatar--custom"},s.createElement("img",{src:e.paths.image,alt:r.name})):s.createElement(u,{performer:r})},23:function(e,r,t){"use strict";var n=this&&this.__rest||function(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o{var{scene:r}=e,t=n(e,["scene"]);if(t.hidePerformer||t.performerAvatars||r.performers.length<1)return null;const o=(0,a.sortPerformers)(r.performers),u=o.length;return l.createElement("div",{className:"vsc-performers-list vsc-performers-list__text"},o.map(((e,n)=>{var o;const a=n===u-2,c=n{if(r)return null;const t=o.default.resolution(e.width,e.height),{HoverPopover:n}=window.PluginApi.components;let a="";switch(t){case"144p":case"240p":case"360p":case"480p":case"540p":a="SD";break;case"720p":case"1080p":a="HD";break;case"1440p":a="2K";break;default:a=t||null}return i.createElement(n,{className:"vsc-resolution vsc-resolution--icon",content:i.createElement("span",{className:"vsc-text-hover"},e.width," × ",e.height),leaveDelay:100,placement:"top"},a)}},458:function(e,r,t){"use strict";var n=this&&this.__rest||function(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o{var{config:r,scene:t}=e,o=n(e,["config","scene"]);return f.createElement(f.Fragment,null,f.createElement("div",{className:"vsc-top-line"},f.createElement(c.default,{hideParentStudio:r.hideParentStudio,parentStudioSeparator:r.parentStudioSeparator,scene:t}),f.createElement(m.default,{hideOCount:r.hideOCount,hideOrganized:r.hideOrganized,hidePlayCount:r.hidePlayCount,hideZeroValueData:r.hideZeroValueData,scene:t})),f.createElement(d.default,{scene:t}),f.createElement(s.default,{durationPadding:r.durationPadding,hideDate:r.hideDate,hideDuration:r.hideDuration,hideResolution:r.hideResolution,resolutionIcon:r.resolutionIcon,scene:t}),f.createElement(i.default,{descriptionMaxLines:r.descriptionMaxLines,hideDescription:r.hideDescription,scene:t}),f.createElement(a.default,{hideDirector:r.hideDirector,scene:t}),f.createElement(u.default,{hidePerformer:r.hidePerformer,hidePerformerHoverAge:r.hidePerformerHoverAge,hidePerformerHoverImage:r.hidePerformerHoverImage,hidePerformerHoverNationality:r.hidePerformerHoverNationality,performerAvatars:r.performerAvatars,performerGenderColors:r.performerGenderColors,scene:t}),f.createElement(l.default,{hidePerformer:r.hidePerformer,hidePerformerHoverAge:r.hidePerformerHoverAge,hidePerformerHoverImage:r.hidePerformerHoverImage,hidePerformerHoverNationality:r.hidePerformerHoverNationality,performerAvatars:r.performerAvatars,performerAvatarsProfile:r.performerAvatarsProfile,performerGenderColors:r.performerGenderColors,scene:t,sceneCustomAvatars:o.customAvatars}))}},364:function(e,r,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.SceneCardDetails=void 0;var o=t(458);Object.defineProperty(r,"SceneCardDetails",{enumerable:!0,get:function(){return n(o).default}})},209:function(e,r,t){"use strict";var n=this&&this.__rest||function(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o{var{scene:r}=e,t=n(e,["scene"]);const{studio:s}=r;if(!s)return null;const l=(0,o.makeStudioUrl)({studioID:s.id});return i.createElement("span",{className:"vsc-studio"},i.createElement("a",{href:l},s.name),i.createElement(a,{childStudio:s,hideParentStudio:t.hideParentStudio,parentStudioSeparator:t.parentStudioSeparator}))};const a=e=>{var{childStudio:r,parentStudioSeparator:t}=e;if(n(e,["childStudio","parentStudioSeparator"]).hideParentStudio||!r.parent_studio)return null;const{parent_studio:a}=r,s=(0,o.makeStudioUrl)({studioID:a.id}),l=!t,u=t?" "+t+" ":null;return i.createElement(i.Fragment,null,l?" (":null,u,i.createElement("a",{href:s},a.name),l?")":null)}},993:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const n=t(730),{React:o}=window.PluginApi;r.default=({scene:e})=>{var r;const t=null!==(r=e.title)&&void 0!==r?r:"Untitled",i=(0,n.makeSceneUrl)({scene:e});return o.createElement("a",{href:i,className:"vsc-title"},o.createElement("h5",null,t))}},226:function(e,r,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0});const o=n(t(98)),{React:i}=window.PluginApi,{Icon:a}=window.PluginApi.components,{faBox:s,faEye:l}=window.PluginApi.libraries.FontAwesomeSolid;r.default=({hideOCount:e,hidePlayCount:r,hideZeroValueData:t,scene:n})=>{var c,d;const m=u(r,t,n.o_counter),f=u(e,t,n.play_count);if(!m&&!f&&!n.organized)return null;const p=f?i.createElement("span",{className:"vsc-play-count"},i.createElement(a,{icon:l}),i.createElement("span",null," ",null!==(c=n.play_count)&&void 0!==c?c:0)):null,v=m?i.createElement("span",{className:"vsc-o-count"},i.createElement(o.default,null),i.createElement("span",null," ",null!==(d=n.o_counter)&&void 0!==d?d:0)):null,h=n.organized?i.createElement("span",{className:"vsc-organized"},i.createElement(a,{icon:s})):null;return i.createElement("div",{className:"vsc-user-data"},p,v,h)};const u=(e,r,t)=>!(r&&(null!=t?t:0)<1)&&!e},273:(e,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.getPerformerGenderIcon=void 0;const{faMars:t,faTansgenderAlt:n,faVenus:o}=window.PluginApi.libraries.FontAwesomeSolid;r.getPerformerGenderIcon=e=>{switch(e){case void 0:return null;case"FEMALE":return o;case"MALE":return t;default:return n}}},730:function(e,r,t){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,r,t,n){void 0===n&&(n=t);var o=Object.getOwnPropertyDescriptor(r,t);o&&!("get"in o?!r.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(e,n,o)}:function(e,r,t,n){void 0===n&&(n=t),e[n]=r[t]}),o=this&&this.__exportStar||function(e,r){for(var t in e)"default"===t||Object.prototype.hasOwnProperty.call(r,t)||n(r,e,t)};Object.defineProperty(r,"__esModule",{value:!0}),o(t(273),r),o(t(432),r),o(t(504),r),o(t(15),r)},432:(e,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.makeStudioUrl=r.makeSceneUrl=void 0;r.makeSceneUrl=({scene:e})=>`/scenes/${e.id}`;r.makeStudioUrl=({studioID:e})=>`/studios/${e}`},504:(e,r)=>{"use strict";function t(e){const t=e.slice();return t.sort(((e,t)=>{var n,o;if(e.gender===t.gender)return(null!==(n=e.name)&&void 0!==n?n:"").localeCompare(null!==(o=t.name)&&void 0!==o?o:"");return(e.gender?r.GENDERS.indexOf(e.gender):r.GENDERS.length)-(t.gender?r.GENDERS.indexOf(t.gender):r.GENDERS.length)})),t}Object.defineProperty(r,"__esModule",{value:!0}),r.GENDERS=void 0,r.sortPerformers=t;const n={sortPerformers:t};r.default=n,r.GENDERS=["FEMALE","TRANSGENDER_FEMALE","MALE","TRANSGENDER_MALE","INTERSEX","NON_BINARY"]},15:(e,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const t=["byte","kilobyte","megabyte","gigabyte","terabyte","petabyte"],n=["B","KB","MB","GB","TB","PB"];class o{constructor(e,r,t,n){this.singular=e,this.plural=r,this.shortString=t,this.secs=n}toString(){return this.shortString}}o.SECOND=new o("second","seconds","s",1),o.MINUTE=new o("minute","minutes","m",60),o.HOUR=new o("hour","hours","h",60*o.MINUTE.secs),o.DAY=new o("day","days","D",24*o.HOUR.secs),o.WEEK=new o("week","weeks","W",7*o.DAY.secs),o.MONTH=new o("month","months","M",30*o.DAY.secs),o.YEAR=new o("year","years","Y",365*o.DAY.secs),o.DURATIONS=[o.SECOND,o.MINUTE,o.HOUR,o.DAY,o.WEEK,o.MONTH,o.YEAR];class i{constructor(e,r){this.count=e,this.duration=r}toString(){return this.count.toString()+this.duration.toString()}}const a=e=>{if(!e)return null;const r=e.split("-");if(3!==r.length)return null;const t=Number(r[0]),n=Math.max(0,Number(r[1])-1),o=Number(r[2]);return new Date(t,n,o,0,0,0,0)},s=e=>{if(!e)return null;const r=e.split("-");let t=Number(r[0]);isNaN(t)&&(t=(new Date).getFullYear());let n=0;r.length>1&&(n=Math.max(0,Number(r[1])-1),(n>11||isNaN(n))&&(n=0));let o=1;return r.length>2&&(o=Number(r[2]),(o>31||isNaN(o))&&(o=1)),new Date(t,n,o,0,0,0,0)};function l(e){return`${e.getFullYear()}-${(e.getMonth()+1).toString().padStart(2,"0")}-${e.getDate().toString().padStart(2,"0")}`}const u=(e,r)=>e?e.startsWith("http://")||e.startsWith("https://")?e:r?e.startsWith(r.host)?`${r.protocol}//${e}`:`${r.protocol}//${r.host}/${e}`:`https://${e}`:e,c=(e,r,t=!0)=>r?e.formatDate(r,{format:"long",timeZone:t?"utc":void 0}):"",d=["","K","M","B"],m={fileSize:(e=0)=>{if(Number.isNaN(parseFloat(String(e)))||!Number.isFinite(e))return{size:0,unit:t[0]};let r=0,n=e;for(;n>=1024&&r+1{const r=t.indexOf(e);return n[r]},fileSizeFractionalDigits:e=>t.indexOf(e)>=3?1:0,secondsToTimestamp:e=>{let r=!1;e<0&&(r=!0,e=-e);const t=(e=Math.trunc(e))%60,n=(e=(e-t)/60)%60,o=e=(e-n)/60;let i=String(t).padStart(2,"0");return 0===o?i=String(n)+":"+i:(i=String(n).padStart(2,"0")+":"+i,i=String(o)+":"+i),r?"-"+i:i},timestampToSeconds:e=>{if(!e)return null;const r=e.split(":");if(r.length>3)return null;let t=0,n=1;for(;r.length>0;){const e=r.pop();if(void 0===e)return null;const o=parseInt(e,10);if(Number.isNaN(o))return null;t+=n*o,n*=60}return t},fileNameFromPath:e=>!1==!!e?"No File Name":e.replace(/^.*[\\/]/,""),stringToDate:a,stringToFuzzyDate:s,stringToFuzzyDateTime:e=>{if(!e)return null;const r=e.split(" ");let t=null;if(r.length>0&&(t=s(r[0])),t||(t=new Date),r.length>1){const e=r[1].split(":");t&&e.length>0&&t.setHours(Number(e[0])),t&&e.length>1&&t.setMinutes(Number(e[1])),t&&e.length>2&&t.setSeconds(Number(e[2]))}return t},dateToString:l,dateTimeToString:function(e){return`${l(e)} ${e.getHours().toString().padStart(2,"0")}:${e.getMinutes().toString().padStart(2,"0")}`},age:(e,r)=>{if(!e)return 0;const t=a(e),n=r?a(r):new Date;if(!t||!n)return 0;let o=n.getFullYear()-t.getFullYear();return(t.getMonth()>n.getMonth()||t.getMonth()>=n.getMonth()&&t.getDate()>n.getDate())&&(o-=1),o},bitRate:e=>`${(e/1e6).toFixed(2)} megabits per second`,resolution:(e,r)=>{const t=e>r?r:e;return t>=6144?"HUGE":t>=3840?"8K":t>=3584?"7K":t>=3e3?"6K":t>=2560?"5K":t>=1920?"4K":t>=1440?"1440p":t>=1080?"1080p":t>=720?"720p":t>=540?"540p":t>=480?"480p":t>=360?"360p":t>=240?"240p":t>=144?"144p":void 0},sanitiseURL:u,domainFromURL:(e,r)=>{if(r)return r.hostname;if(e){var t="";try{var n=u(e);n&&(e=n),t=new URL(e).hostname}catch(r){t=e}return t}return""},formatDate:c,formatDateTime:(e,r,t=!1)=>`${c(e,r,t)} ${e.formatTime(r,{timeZone:t?"utc":void 0})}`,secondsAsTimeString:(e=0,r=2)=>((e=0)=>{if(Number.isNaN(parseFloat(String(e)))||!Number.isFinite(e))return[new i(0,o.DURATIONS[0])];const r=[];let t=e;for(let e=o.DURATIONS.length-1;e>=0;e--){const n=Math.floor(t/o.DURATIONS[e].secs);0!==n&&(t%=o.DURATIONS[e].secs,r.push(new i(n,o.DURATIONS[e])))}return r})(e).slice(0,r).join(" "),abbreviateCounter:(e=0)=>{if(Number.isNaN(parseFloat(String(e)))||!Number.isFinite(e))return{size:0,unit:d[0]};let r=0,t=0,n=e;for(;n>=1e3&&r+1e.startsWith('"')&&e.endsWith('"')?e.slice(1,-1):e,addQuotes:e=>`"${e}"`};r.default=m},942:(e,r)=>{var t;!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e="",r=0;r{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};(()=>{"use strict";const e=t(364);t(264);const{PluginApi:r}=window,{GQL:n,React:o}=r;r.patch.instead("SceneCard",(function(e,r,t){var i,a,s,l,u,c,d,m,f,p,v,h,g,y,b,P,O,E,S,_,w,N,D,A;const j=n.useConfigurationQuery();if(!j.loading){const r=j.data.configuration.plugins.ValkyrSceneCards,M={descriptionMaxLines:(null==r?void 0:r.descriptionMaxLines)||3,durationPadding:null!==(i=null==r?void 0:r.durationPadding)&&void 0!==i&&i,hideDate:null!==(a=null==r?void 0:r.hideDate)&&void 0!==a&&a,hideDescription:null!==(s=null==r?void 0:r.hideDescription)&&void 0!==s&&s,hideDirector:null!==(l=null==r?void 0:r.hideDirector)&&void 0!==l&&l,hideDuration:null!==(u=null==r?void 0:r.hideDuration)&&void 0!==u&&u,hideGalleries:null!==(c=null==r?void 0:r.hideGalleries)&&void 0!==c&&c,hideGroups:null!==(d=null==r?void 0:r.hideGroups)&&void 0!==d&&d,hideMarkers:null!==(m=null==r?void 0:r.hideMarkers)&&void 0!==m&&m,hideOCount:null!==(f=null==r?void 0:r.hideOCount)&&void 0!==f&&f,hideOrganized:null!==(p=null==r?void 0:r.hideOrganized)&&void 0!==p&&p,hidePlayCount:null!==(v=null==r?void 0:r.hidePlayCount)&&void 0!==v&&v,hideParentStudio:null!==(h=null==r?void 0:r.hideParentStudio)&&void 0!==h&&h,hidePerformer:null!==(g=null==r?void 0:r.hidePerformer)&&void 0!==g&&g,hidePerformerHoverAge:null!==(y=null==r?void 0:r.hidePerformerHoverAge)&&void 0!==y&&y,hidePerformerHoverImage:null!==(b=null==r?void 0:r.hidePerformerHoverImage)&&void 0!==b&&b,hidePerformerHoverNationality:null!==(P=null==r?void 0:r.hidePerformerHoverNationality)&&void 0!==P&&P,hideResolution:null!==(O=null==r?void 0:r.hideResolution)&&void 0!==O&&O,hideTags:null!==(E=null==r?void 0:r.hideTags)&&void 0!==E&&E,hideZeroValueData:null!==(S=null==r?void 0:r.hideZeroValueData)&&void 0!==S&&S,parentStudioSeparator:null==r?void 0:r.parentStudioSeparator,performerAvatars:null!==(_=null==r?void 0:r.performerAvatars)&&void 0!==_&&_,performerAvatarsCustomTag:null==r?void 0:r.performerAvatarsCustomTag,performerAvatarsProfile:null!==(w=null==r?void 0:r.performerAvatarsProfile)&&void 0!==w&&w,performerGenderColors:null!==(N=null==r?void 0:r.performerGenderColors)&&void 0!==N&&N,resolutionIcon:null!==(D=null==r?void 0:r.resolutionIcon)&&void 0!==D&&D},C=Object.assign(Object.assign({},e),{config:M,customAvatars:[]});if(C.scene.performers){const e=n.useFindPerformersQuery({variables:{filter:{per_page:-1},performer_ids:C.scene.performers.map((e=>+e.id))}});e.data&&(C.scene=Object.assign(Object.assign({},C.scene),{performers:e.data.findPerformers.performers}))}if(!M.hideParentStudio&&C.scene.studio){const r=n.useFindStudioQuery({variables:{id:(null===(A=e.scene.studio)||void 0===A?void 0:A.id)||""}});r.data&&(C.scene=Object.assign(Object.assign({},C.scene),{studio:Object.assign(Object.assign({},C.scene.studio),r.data.findStudio)}))}if(M.performerAvatars&&M.performerAvatarsCustomTag){const e=n.useFindImagesQuery({variables:{image_filter:{performers:{modifier:"INCLUDES",value:C.scene.performers.map((e=>e.id))},tags:{modifier:"INCLUDES",value:[M.performerAvatarsCustomTag]}}}});e.data&&(C.customAvatars=e.data.findImages.images)}return[o.createElement("div",{className:"valkyr-scene-card"},o.createElement(t,Object.assign({},C)))]}return[]})),r.patch.instead("SceneCard.Details",(function(r){return[o.createElement(e.SceneCardDetails,Object.assign({},r))]})),r.patch.instead("SceneCard.Overlays",(function(){return[]})),r.patch.instead("SceneCard.Popovers",(function(e,r,t){var n;const i=e,a=null!==(n=i.scene.groups)&&void 0!==n?n:i.scene.movies,{hideGalleries:s,hideGroups:l,hideMarkers:u,hideTags:c}=i.config;if(s&&l&&u&&c)return[];const d=Object.assign(Object.assign({},i),{scene:Object.assign(Object.assign({},e.scene),{galleries:s?[]:i.scene.galleries,groups:l?[]:a,performers:[],o_counter:void 0,organized:!1,scene_markers:u?[]:i.scene.scene_markers,tags:c?[]:i.scene.tags})});return 0===d.scene.tags.length&&0===a.length&&0===d.scene.scene_markers.length&&0===d.scene.galleries.length?[o.createElement(o.Fragment,null,o.createElement("hr",null),o.createElement("div",{className:"card-popovers"}))]:[o.createElement(t,Object.assign({},d))]}))})()})(); \ No newline at end of file +(()=>{var e={725:(e,r,t)=>{"use strict";t.r(r)},498:(e,r,t)=>{"use strict";t.r(r)},264:(e,r,t)=>{"use strict";t.r(r)},237:function(e,r){"use strict";var t=this&&this.__rest||function(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o{var{scene:r}=e,o=t(e,["scene"]);if(!r.details||o.hideDescription)return n.createElement("div",{className:"vsc-description"});const i={WebkitLineClamp:o.descriptionMaxLines};return n.createElement("div",{className:"vsc-description"},n.createElement("div",{style:i,className:"vsc-description-inner"},r.details))}},407:function(e,r){"use strict";var t=this&&this.__rest||function(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o{var{scene:r}=e;return t(e,["scene"]).hideDirector||!r.director?null:n.createElement("div",{className:"vsc-director"},"Directed by"," ",n.createElement("a",{href:o(r.director)},r.director))}},98:(e,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const{React:t}=window.PluginApi;r.default=()=>t.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":"true",focusable:"false",width:"1em",height:"1em",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 36 36",style:{transform:"rotate(360deg)"}},t.createElement("path",{fill:"currentColor",d:"M22.855.758L7.875 7.024l12.537 9.733c2.633 2.224 6.377 2.937 9.77 1.518c4.826-2.018 7.096-7.576 5.072-12.413C33.232 1.024 27.68-1.261 22.855.758zm-9.962 17.924L2.05 10.284L.137 23.529a7.993 7.993 0 0 0 2.958 7.803a8.001 8.001 0 0 0 9.798-12.65zm15.339 7.015l-8.156-4.69l-.033 9.223c-.088 2 .904 3.98 2.75 5.041a5.462 5.462 0 0 0 7.479-2.051c1.499-2.644.589-6.013-2.04-7.523z"}),t.createElement("rect",{x:"0",y:"0",width:"36",height:"36",fill:"rgba(0, 0, 0, 0)"}))},254:function(e,r,t){"use strict";var n=this&&this.__rest||function(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o{var r,{hideResolution:t,resolutionIcon:o,scene:l}=e,u=n(e,["hideResolution","resolutionIcon","scene"]);const c=l.files.sort(((e,r)=>r.height-e.height))[0],d=void 0!==l.date&&!u.hideDate,m=!!c&&!u.hideDuration,f=!!c&&!t;if(!d&&!m&&t)return null;const p=d?s.createElement("span",{className:"vsc-date"},l.date):null,v=f&&o,h=f&&!o?s.createElement("span",{className:"vsc-resolution"},i.default.resolution(c.width,c.height)):null;let g=null;if(m){let e=i.default.secondsToTimestamp(null!==(r=c.duration)&&void 0!==r?r:0);if(u.durationPadding){const r=e.split(":").reverse();1===r.length&&r.push("00","00"),2===r.length&&r.push("00"),e=r.map((e=>e.length<2?"0"+e:e)).reverse().join(":")}g=s.createElement("span",{className:"vsc-duration"},e)}return s.createElement("div",{className:"vsc-key-data"},s.createElement(a.default,{file:c,hide:!v}),p,g,h)}},622:function(e,r,t){"use strict";var n=this&&this.__rest||function(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o{var r,t,o,u,{performer:c}=e,d=n(e,["performer"]);const m=!!c.birthdate&&!d.hidePerformerHoverAge,f=m?s.createElement("span",{className:"vsc-performer-age"},a.default.age(c.birthdate,d.sceneDate)," years old"):null,p=!!c.country&&!d.hidePerformerHoverNationality,v=p?s.createElement("span",{className:`fi fi-${null===(r=c.country)||void 0===r?void 0:r.toLowerCase()}`}):null,h=!!c.image_path&&!c.image_path.includes("default=true")&&!d.hidePerformerHoverImage,g=h?s.createElement("a",{href:`/performers/${c.id}`,className:"performer-tag col m-auto"},s.createElement("img",{className:"image-thumbnail",alt:null!==(t=c.name)&&void 0!==t?t:"",src:null!==(o=c.image_path)&&void 0!==o?o:""})):null,y=!d.hidePerformerHoverName,b=(0,i.default)("vsc-performer-text-list-popover-name",{[`vsc-gender-color--${(null===(u=c.gender)||void 0===u?void 0:u.toLowerCase())||"unknown"}`]:d.performerGenderColors}),P=y?s.createElement("div",{className:b},c.name):null,O=p||m?s.createElement("div",{className:"vsc-performer-text-list-popover-data"},v,f):null,E=s.createElement("div",{className:"performer-tag-container row"},g,P,O);return O||h?s.createElement(l,{content:E,leaveDelay:100,placement:"top"},d.children):d.children}},309:function(e,r,t){"use strict";var n=this&&this.__rest||function(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o{var{scene:r}=e,t=n(e,["scene"]);if(t.hidePerformer||!t.performerAvatars||r.performers.length<1)return null;const o=(0,i.sortPerformers)(r.performers);return s.createElement("ul",{className:"vsc-performers-list vsc-performers-list__avatars"},o.map((e=>{let n;const o=t.sceneCustomAvatars.find((r=>r.performers.find((r=>r.id===e.id))));switch(!0){case!!o:n=s.createElement(d,{performer:e,image:o});break;case t.performerAvatarsProfile:n=s.createElement(c,{performer:e});break;default:n=s.createElement(u,{performer:e})}return s.createElement("li",{className:"vsc-performer"},s.createElement(a.default,{hidePerformerHoverAge:t.hidePerformerHoverAge,hidePerformerHoverImage:t.hidePerformerHoverImage,hidePerformerHoverNationality:t.hidePerformerHoverNationality,hidePerformerHoverName:!1,performer:e,performerGenderColors:t.performerGenderColors,sceneDate:r.date},n))})))};const u=({performer:e})=>{const r=e.name.split("-").join(" ").split(" ");let t="";r.forEach((e=>{t+=e.split("")[0]}));const n=(0,i.getPerformerGenderIcon)(e.gender);return s.createElement("a",{href:`/performers/${e.id}`,className:"vsc-performer-avatar"},s.createElement("span",{"aria-label":e.name},t),n?s.createElement(l,{icon:n}):null)},c=({performer:e})=>!e.image_path||e.image_path.includes("default=true")?s.createElement(u,{performer:e}):s.createElement("a",{href:`/performers/${e.id}`,className:"vsc-performer-avatar vsc-performer-avatar--profile"},s.createElement("img",{src:e.image_path,alt:e.name})),d=({image:e,performer:r})=>e.paths.image?s.createElement("a",{href:`/performers/${r.id}`,className:"vsc-performer-avatar vsc-performer-avatar--custom"},s.createElement("img",{src:e.paths.image,alt:r.name})):s.createElement(u,{performer:r})},23:function(e,r,t){"use strict";var n=this&&this.__rest||function(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o{var{scene:r}=e,t=n(e,["scene"]);if(t.hidePerformer||t.performerAvatars||r.performers.length<1)return null;const o=(0,a.sortPerformers)(r.performers),u=o.length;return l.createElement("div",{className:"vsc-performers-list vsc-performers-list__text"},o.map(((e,n)=>{var o;const a=n===u-2,c=n{if(r)return null;const t=o.default.resolution(e.width,e.height),{HoverPopover:n}=window.PluginApi.components;let a="";switch(t){case"144p":case"240p":case"360p":case"480p":case"540p":a="SD";break;case"720p":case"1080p":a="HD";break;case"1440p":a="2K";break;default:a=t||null}return i.createElement(n,{className:"vsc-resolution vsc-resolution--icon",content:i.createElement("span",{className:"vsc-text-hover"},e.width," × ",e.height),leaveDelay:100,placement:"top"},a)}},458:function(e,r,t){"use strict";var n=this&&this.__rest||function(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o{var{config:r,scene:t}=e,o=n(e,["config","scene"]);return f.createElement(f.Fragment,null,f.createElement("div",{className:"vsc-top-line"},f.createElement(c.default,{hideParentStudio:r.hideParentStudio,parentStudioSeparator:r.parentStudioSeparator,scene:t}),f.createElement(m.default,{hideOCount:r.hideOCount,hideOrganized:r.hideOrganized,hidePlayCount:r.hidePlayCount,hideZeroValueData:r.hideZeroValueData,scene:t})),f.createElement(d.default,{scene:t}),f.createElement(s.default,{durationPadding:r.durationPadding,hideDate:r.hideDate,hideDuration:r.hideDuration,hideResolution:r.hideResolution,resolutionIcon:r.resolutionIcon,scene:t}),f.createElement(i.default,{descriptionMaxLines:r.descriptionMaxLines,hideDescription:r.hideDescription,scene:t}),f.createElement(a.default,{hideDirector:r.hideDirector,scene:t}),f.createElement(u.default,{hidePerformer:r.hidePerformer,hidePerformerHoverAge:r.hidePerformerHoverAge,hidePerformerHoverImage:r.hidePerformerHoverImage,hidePerformerHoverNationality:r.hidePerformerHoverNationality,performerAvatars:r.performerAvatars,performerGenderColors:r.performerGenderColors,scene:t}),f.createElement(l.default,{hidePerformer:r.hidePerformer,hidePerformerHoverAge:r.hidePerformerHoverAge,hidePerformerHoverImage:r.hidePerformerHoverImage,hidePerformerHoverNationality:r.hidePerformerHoverNationality,performerAvatars:r.performerAvatars,performerAvatarsProfile:r.performerAvatarsProfile,performerGenderColors:r.performerGenderColors,scene:t,sceneCustomAvatars:o.customAvatars}))}},364:function(e,r,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.SceneCardDetails=void 0;var o=t(458);Object.defineProperty(r,"SceneCardDetails",{enumerable:!0,get:function(){return n(o).default}})},209:function(e,r,t){"use strict";var n=this&&this.__rest||function(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o{var{scene:r}=e,t=n(e,["scene"]);const{studio:s}=r;if(!s)return null;const l=(0,o.makeStudioUrl)({studioID:s.id});return i.createElement("span",{className:"vsc-studio"},i.createElement("a",{href:l},s.name),i.createElement(a,{childStudio:s,hideParentStudio:t.hideParentStudio,parentStudioSeparator:t.parentStudioSeparator}))};const a=e=>{var{childStudio:r,parentStudioSeparator:t}=e;if(n(e,["childStudio","parentStudioSeparator"]).hideParentStudio||!r.parent_studio)return null;const{parent_studio:a}=r,s=(0,o.makeStudioUrl)({studioID:a.id}),l=!t,u=t?" "+t+" ":null;return i.createElement(i.Fragment,null,l?" (":null,u,i.createElement("a",{href:s},a.name),l?")":null)}},993:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const n=t(730),{React:o}=window.PluginApi;r.default=({scene:e})=>{var r;const t=null!==(r=e.title)&&void 0!==r?r:"Untitled",i=(0,n.makeSceneUrl)({scene:e});return o.createElement("a",{href:i,className:"vsc-title"},o.createElement("h5",null,t))}},226:function(e,r,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0});const o=n(t(98)),{React:i}=window.PluginApi,{Icon:a}=window.PluginApi.components,{faBox:s,faEye:l}=window.PluginApi.libraries.FontAwesomeSolid;r.default=({hideOCount:e,hidePlayCount:r,hideZeroValueData:t,scene:n})=>{var c,d;const m=u(r,t,n.o_counter),f=u(e,t,n.play_count);if(!m&&!f&&!n.organized)return null;const p=f?i.createElement("span",{className:"vsc-play-count"},i.createElement(a,{icon:l}),i.createElement("span",null," ",null!==(c=n.play_count)&&void 0!==c?c:0)):null,v=m?i.createElement("span",{className:"vsc-o-count"},i.createElement(o.default,null),i.createElement("span",null," ",null!==(d=n.o_counter)&&void 0!==d?d:0)):null,h=n.organized?i.createElement("span",{className:"vsc-organized"},i.createElement(a,{icon:s})):null;return i.createElement("div",{className:"vsc-user-data"},p,v,h)};const u=(e,r,t)=>!(r&&(null!=t?t:0)<1)&&!e},273:(e,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.getPerformerGenderIcon=void 0;const{faMars:t,faTansgenderAlt:n,faVenus:o}=window.PluginApi.libraries.FontAwesomeSolid;r.getPerformerGenderIcon=e=>{switch(e){case void 0:return null;case"FEMALE":return o;case"MALE":return t;default:return n}}},730:function(e,r,t){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,r,t,n){void 0===n&&(n=t);var o=Object.getOwnPropertyDescriptor(r,t);o&&!("get"in o?!r.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(e,n,o)}:function(e,r,t,n){void 0===n&&(n=t),e[n]=r[t]}),o=this&&this.__exportStar||function(e,r){for(var t in e)"default"===t||Object.prototype.hasOwnProperty.call(r,t)||n(r,e,t)};Object.defineProperty(r,"__esModule",{value:!0}),o(t(273),r),o(t(432),r),o(t(504),r),o(t(15),r)},432:(e,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.makeStudioUrl=r.makeSceneUrl=void 0;r.makeSceneUrl=({scene:e})=>`/scenes/${e.id}`;r.makeStudioUrl=({studioID:e})=>`/studios/${e}`},504:(e,r)=>{"use strict";function t(e){const t=e.slice();return t.sort(((e,t)=>{var n,o;if(e.gender===t.gender)return(null!==(n=e.name)&&void 0!==n?n:"").localeCompare(null!==(o=t.name)&&void 0!==o?o:"");return(e.gender?r.GENDERS.indexOf(e.gender):r.GENDERS.length)-(t.gender?r.GENDERS.indexOf(t.gender):r.GENDERS.length)})),t}Object.defineProperty(r,"__esModule",{value:!0}),r.GENDERS=void 0,r.sortPerformers=t;const n={sortPerformers:t};r.default=n,r.GENDERS=["FEMALE","TRANSGENDER_FEMALE","MALE","TRANSGENDER_MALE","INTERSEX","NON_BINARY"]},15:(e,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const t=["byte","kilobyte","megabyte","gigabyte","terabyte","petabyte"],n=["B","KB","MB","GB","TB","PB"];class o{constructor(e,r,t,n){this.singular=e,this.plural=r,this.shortString=t,this.secs=n}toString(){return this.shortString}}o.SECOND=new o("second","seconds","s",1),o.MINUTE=new o("minute","minutes","m",60),o.HOUR=new o("hour","hours","h",60*o.MINUTE.secs),o.DAY=new o("day","days","D",24*o.HOUR.secs),o.WEEK=new o("week","weeks","W",7*o.DAY.secs),o.MONTH=new o("month","months","M",30*o.DAY.secs),o.YEAR=new o("year","years","Y",365*o.DAY.secs),o.DURATIONS=[o.SECOND,o.MINUTE,o.HOUR,o.DAY,o.WEEK,o.MONTH,o.YEAR];class i{constructor(e,r){this.count=e,this.duration=r}toString(){return this.count.toString()+this.duration.toString()}}const a=e=>{if(!e)return null;const r=e.split("-");if(3!==r.length)return null;const t=Number(r[0]),n=Math.max(0,Number(r[1])-1),o=Number(r[2]);return new Date(t,n,o,0,0,0,0)},s=e=>{if(!e)return null;const r=e.split("-");let t=Number(r[0]);isNaN(t)&&(t=(new Date).getFullYear());let n=0;r.length>1&&(n=Math.max(0,Number(r[1])-1),(n>11||isNaN(n))&&(n=0));let o=1;return r.length>2&&(o=Number(r[2]),(o>31||isNaN(o))&&(o=1)),new Date(t,n,o,0,0,0,0)};function l(e){return`${e.getFullYear()}-${(e.getMonth()+1).toString().padStart(2,"0")}-${e.getDate().toString().padStart(2,"0")}`}const u=(e,r)=>e?e.startsWith("http://")||e.startsWith("https://")?e:r?e.startsWith(r.host)?`${r.protocol}//${e}`:`${r.protocol}//${r.host}/${e}`:`https://${e}`:e,c=(e,r,t=!0)=>r?e.formatDate(r,{format:"long",timeZone:t?"utc":void 0}):"",d=["","K","M","B"],m={fileSize:(e=0)=>{if(Number.isNaN(parseFloat(String(e)))||!Number.isFinite(e))return{size:0,unit:t[0]};let r=0,n=e;for(;n>=1024&&r+1{const r=t.indexOf(e);return n[r]},fileSizeFractionalDigits:e=>t.indexOf(e)>=3?1:0,secondsToTimestamp:e=>{let r=!1;e<0&&(r=!0,e=-e);const t=(e=Math.trunc(e))%60,n=(e=(e-t)/60)%60,o=e=(e-n)/60;let i=String(t).padStart(2,"0");return 0===o?i=String(n)+":"+i:(i=String(n).padStart(2,"0")+":"+i,i=String(o)+":"+i),r?"-"+i:i},timestampToSeconds:e=>{if(!e)return null;const r=e.split(":");if(r.length>3)return null;let t=0,n=1;for(;r.length>0;){const e=r.pop();if(void 0===e)return null;const o=parseInt(e,10);if(Number.isNaN(o))return null;t+=n*o,n*=60}return t},fileNameFromPath:e=>!1==!!e?"No File Name":e.replace(/^.*[\\/]/,""),stringToDate:a,stringToFuzzyDate:s,stringToFuzzyDateTime:e=>{if(!e)return null;const r=e.split(" ");let t=null;if(r.length>0&&(t=s(r[0])),t||(t=new Date),r.length>1){const e=r[1].split(":");t&&e.length>0&&t.setHours(Number(e[0])),t&&e.length>1&&t.setMinutes(Number(e[1])),t&&e.length>2&&t.setSeconds(Number(e[2]))}return t},dateToString:l,dateTimeToString:function(e){return`${l(e)} ${e.getHours().toString().padStart(2,"0")}:${e.getMinutes().toString().padStart(2,"0")}`},age:(e,r)=>{if(!e)return 0;const t=a(e),n=r?a(r):new Date;if(!t||!n)return 0;let o=n.getFullYear()-t.getFullYear();return(t.getMonth()>n.getMonth()||t.getMonth()>=n.getMonth()&&t.getDate()>n.getDate())&&(o-=1),o},bitRate:e=>`${(e/1e6).toFixed(2)} megabits per second`,resolution:(e,r)=>{const t=e>r?r:e;return t>=6144?"HUGE":t>=3840?"8K":t>=3584?"7K":t>=3e3?"6K":t>=2560?"5K":t>=1920?"4K":t>=1440?"1440p":t>=1080?"1080p":t>=720?"720p":t>=540?"540p":t>=480?"480p":t>=360?"360p":t>=240?"240p":t>=144?"144p":void 0},sanitiseURL:u,domainFromURL:(e,r)=>{if(r)return r.hostname;if(e){var t="";try{var n=u(e);n&&(e=n),t=new URL(e).hostname}catch(r){t=e}return t}return""},formatDate:c,formatDateTime:(e,r,t=!1)=>`${c(e,r,t)} ${e.formatTime(r,{timeZone:t?"utc":void 0})}`,secondsAsTimeString:(e=0,r=2)=>((e=0)=>{if(Number.isNaN(parseFloat(String(e)))||!Number.isFinite(e))return[new i(0,o.DURATIONS[0])];const r=[];let t=e;for(let e=o.DURATIONS.length-1;e>=0;e--){const n=Math.floor(t/o.DURATIONS[e].secs);0!==n&&(t%=o.DURATIONS[e].secs,r.push(new i(n,o.DURATIONS[e])))}return r})(e).slice(0,r).join(" "),abbreviateCounter:(e=0)=>{if(Number.isNaN(parseFloat(String(e)))||!Number.isFinite(e))return{size:0,unit:d[0]};let r=0,t=0,n=e;for(;n>=1e3&&r+1e.startsWith('"')&&e.endsWith('"')?e.slice(1,-1):e,addQuotes:e=>`"${e}"`};r.default=m},942:(e,r)=>{var t;!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e="",r=0;r{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};(()=>{"use strict";const e=t(364);t(264);const{PluginApi:r}=window,{GQL:n,React:o}=r;r.patch.instead("SceneCard",(function(e,r,t){var i,a,s,l,u,c,d,m,f,p,v,h,g,y,b,P,O,E,S,_,w,N,D,A;const j=n.useConfigurationQuery();if(!j.loading){const r=j.data.configuration.plugins.ValkyrSceneCards,M={descriptionMaxLines:(null==r?void 0:r.descriptionMaxLines)||3,durationPadding:null!==(i=null==r?void 0:r.durationPadding)&&void 0!==i&&i,hideDate:null!==(a=null==r?void 0:r.hideDate)&&void 0!==a&&a,hideDescription:null!==(s=null==r?void 0:r.hideDescription)&&void 0!==s&&s,hideDirector:null!==(l=null==r?void 0:r.hideDirector)&&void 0!==l&&l,hideDuration:null!==(u=null==r?void 0:r.hideDuration)&&void 0!==u&&u,hideGalleries:null!==(c=null==r?void 0:r.hideGalleries)&&void 0!==c&&c,hideGroups:null!==(d=null==r?void 0:r.hideGroups)&&void 0!==d&&d,hideMarkers:null!==(m=null==r?void 0:r.hideMarkers)&&void 0!==m&&m,hideOCount:null!==(f=null==r?void 0:r.hideOCount)&&void 0!==f&&f,hideOrganized:null!==(p=null==r?void 0:r.hideOrganized)&&void 0!==p&&p,hidePlayCount:null!==(v=null==r?void 0:r.hidePlayCount)&&void 0!==v&&v,hideParentStudio:null!==(h=null==r?void 0:r.hideParentStudio)&&void 0!==h&&h,hidePerformer:null!==(g=null==r?void 0:r.hidePerformer)&&void 0!==g&&g,hidePerformerHoverAge:null!==(y=null==r?void 0:r.hidePerformerHoverAge)&&void 0!==y&&y,hidePerformerHoverImage:null!==(b=null==r?void 0:r.hidePerformerHoverImage)&&void 0!==b&&b,hidePerformerHoverNationality:null!==(P=null==r?void 0:r.hidePerformerHoverNationality)&&void 0!==P&&P,hideResolution:null!==(O=null==r?void 0:r.hideResolution)&&void 0!==O&&O,hideTags:null!==(E=null==r?void 0:r.hideTags)&&void 0!==E&&E,hideZeroValueData:null!==(S=null==r?void 0:r.hideZeroValueData)&&void 0!==S&&S,parentStudioSeparator:null==r?void 0:r.parentStudioSeparator,performerAvatars:null!==(_=null==r?void 0:r.performerAvatars)&&void 0!==_&&_,performerAvatarsCustomTag:null==r?void 0:r.performerAvatarsCustomTag,performerAvatarsProfile:null!==(w=null==r?void 0:r.performerAvatarsProfile)&&void 0!==w&&w,performerGenderColors:null!==(N=null==r?void 0:r.performerGenderColors)&&void 0!==N&&N,resolutionIcon:null!==(D=null==r?void 0:r.resolutionIcon)&&void 0!==D&&D},C=Object.assign(Object.assign({},e),{config:M,customAvatars:[]});if(C.scene.performers.length){const e=n.useFindPerformersQuery({variables:{filter:{per_page:-1},performer_ids:C.scene.performers.map((e=>+e.id))}});e.data&&(C.scene=Object.assign(Object.assign({},C.scene),{performers:e.data.findPerformers.performers}))}if(!M.hideParentStudio&&C.scene.studio){const r=n.useFindStudioQuery({variables:{id:(null===(A=e.scene.studio)||void 0===A?void 0:A.id)||""}});r.data&&(C.scene=Object.assign(Object.assign({},C.scene),{studio:Object.assign(Object.assign({},C.scene.studio),r.data.findStudio)}))}if(M.performerAvatars&&M.performerAvatarsCustomTag&&C.scene.performers.length){const e=n.useFindImagesQuery({variables:{image_filter:{performers:{modifier:"INCLUDES",value:C.scene.performers.map((e=>e.id))},tags:{modifier:"INCLUDES",value:[M.performerAvatarsCustomTag]}}}});e.data&&(C.customAvatars=e.data.findImages.images)}return[o.createElement("div",{className:"valkyr-scene-card"},o.createElement(t,Object.assign({},C)))]}return[]})),r.patch.instead("SceneCard.Details",(function(r){return[o.createElement(e.SceneCardDetails,Object.assign({},r))]})),r.patch.instead("SceneCard.Overlays",(function(){return[]})),r.patch.instead("SceneCard.Popovers",(function(e,r,t){var n;const i=e,a=null!==(n=i.scene.groups)&&void 0!==n?n:i.scene.movies,{hideGalleries:s,hideGroups:l,hideMarkers:u,hideTags:c}=i.config;if(s&&l&&u&&c)return[];const d=Object.assign(Object.assign({},i),{scene:Object.assign(Object.assign({},e.scene),{galleries:s?[]:i.scene.galleries,groups:l?[]:a,performers:[],o_counter:void 0,organized:!1,scene_markers:u?[]:i.scene.scene_markers,tags:c?[]:i.scene.tags})});return 0===d.scene.tags.length&&0===a.length&&0===d.scene.scene_markers.length&&0===d.scene.galleries.length?[o.createElement(o.Fragment,null,o.createElement("hr",null),o.createElement("div",{className:"card-popovers"}))]:[o.createElement(t,Object.assign({},d))]}))})()})(); \ No newline at end of file diff --git a/plugins/ValkyrSceneCards/ValkyrSceneCards.yml b/plugins/ValkyrSceneCards/ValkyrSceneCards.yml index bb35ad7..96a6d7e 100644 --- a/plugins/ValkyrSceneCards/ValkyrSceneCards.yml +++ b/plugins/ValkyrSceneCards/ValkyrSceneCards.yml @@ -1,7 +1,7 @@ name: Valkyr Scene Cards description: A rework of the scene card component for Stash. url: https://github.com/Valkyr-JS/ValkyrSceneCards -version: 1.0.0 +version: 1.0.1 ui: javascript: - ValkyrSceneCards.js