import{b as bo,c as Ao}from"./chunk-BFYMXXFR.js";import{a as Mo}from"./chunk-AYGAB4QU.js";import{b as Po}from"./chunk-2G4IX3UF.js";import{a as Tt}from"./chunk-YP2ZZYVY.js";import{a as Ci,b as Si,c as yi,d as vi,e as Ei,f as io}from"./chunk-BZREIAP3.js";import{a as co,b as Ii,c as _o,d as po,e as mo,f as uo,g as ho,h as It,i as Co,j as So,l as Qi,m as yo}from"./chunk-O7SOLRWN.js";import{o as nt}from"./chunk-HWORNHYK.js";import{a as Mi}from"./chunk-V7ZLORPF.js";import{h as no,i as oo}from"./chunk-WNO6N5HY.js";import{c as ji}from"./chunk-KYFTWIBP.js";import{a as gi}from"./chunk-5KAYKNXN.js";import"./chunk-GH7JOTEN.js";import{a as Wi}from"./chunk-PEXRIOEF.js";import"./chunk-IW76GIZR.js";import{b as ge}from"./chunk-UBU2CFVX.js";import"./chunk-WQSXUN2B.js";import{a as vo}from"./chunk-VPLLFHDZ.js";import{a as Eo}from"./chunk-FO4UJRPC.js";import{a as ro,b as ao,c as be,d as Pi}from"./chunk-I3MX6C2W.js";import"./chunk-USQSMZNR.js";import"./chunk-VX4HDDST.js";import{c as so}from"./chunk-DQGL47G7.js";import{a as Re}from"./chunk-AW3K654D.js";import"./chunk-ZQWP2SWU.js";import{a as fo}from"./chunk-XJBOH5VX.js";import{c as Jn,g as eo,h as to}from"./chunk-E4XRA4V2.js";import"./chunk-3UY4NPZA.js";import"./chunk-QW6WJWKH.js";import{a as To}from"./chunk-TNPLV5TY.js";import{e as Oo}from"./chunk-GOVYNF4F.js";import{a as hi}from"./chunk-3FBGFV3V.js";import"./chunk-KUVCZRLX.js";import{a as go}from"./chunk-VMNW5LMV.js";import{a as Pt}from"./chunk-BLSX34MM.js";import{a as fi}from"./chunk-ON7HWJLE.js";import"./chunk-W24IDBO7.js";import{a as it}from"./chunk-EN2OO25U.js";import{a as Oe}from"./chunk-RTSWJO5X.js";import{a as Mt}from"./chunk-7WRF56BE.js";import{a as Wn,b as jn,c as Xi,d as Qn,e as Zn,f as Io,g as Ti}from"./chunk-GNS4PQQI.js";import{a as Ro}from"./chunk-T3N5K7WN.js";import"./chunk-R6UFR6OP.js";import"./chunk-TAAPE2KQ.js";import"./chunk-Y2WEUXNI.js";import{a as ui,c as $t,g as qn}from"./chunk-G4SSM5DN.js";import{a as lo}from"./chunk-KWNJKN7X.js";import"./chunk-GXA3YMKZ.js";import"./chunk-KFVLXK7J.js";import{a as Et}from"./chunk-7WMDTJTY.js";import"./chunk-R5QYYVFW.js";import"./chunk-J6ED7RJB.js";import"./chunk-EB5QHVRE.js";import"./chunk-RQJSABPV.js";import{c as Kn}from"./chunk-QSSD454H.js";import{a as vt}from"./chunk-4AW7XUEV.js";import"./chunk-44MGGBMP.js";import{h as pi}from"./chunk-6B7LVSD5.js";import"./chunk-TMELUQIT.js";import{b as Qe}from"./chunk-4KR5QHBK.js";import"./chunk-ADNRDCXI.js";import{a as Je}from"./chunk-UDJAXJ5I.js";import{a as tt}from"./chunk-NPJE7ESS.js";import"./chunk-OW5DLQI4.js";import"./chunk-NT6MJVBJ.js";import{a as ci}from"./chunk-TKP3CDX5.js";import{a as et}from"./chunk-PH6OCYZ4.js";import{a as Yt,d as _i}from"./chunk-5FHECZHZ.js";import{a as di,b as Ee,c as Ke}from"./chunk-LQJE4VHL.js";import"./chunk-BYP5TNEI.js";import{a as Vt,b as Te}from"./chunk-53J3B7V7.js";import{a as mi}from"./chunk-ZRPU55OY.js";import{E as U,F as je,a as bn,c as He,g as j,h as Ge,o as ue,p as Ct,r as An,w as Xe,x as We}from"./chunk-U7YDHGE3.js";import{G as kn,H as Bn,a as $n,s as Fn,u as yt}from"./chunk-TNCGHY53.js";import{a as he}from"./chunk-MUVDKD7T.js";import{$ as dt,Aa as ct,Ab as zi,Ae as Hi,Ah as Hn,B as Di,Bb as ei,Bf as xn,C as wi,Cb as ti,Da as l,Db as g,Dc as ni,De as Nn,Eb as F,Ec as H,Ee as Dn,F as fn,Fa as $i,Fb as k,Fc as G,Ff as me,G as Cn,Gb as ee,Gd as Ie,Ha as ut,Hb as P,Hd as ft,Ia as Fi,Ib as yn,Ic as Pn,Jb as m,Jc as xt,Jh as ai,Kd as Ue,L as Xt,Lc as gt,Ld as ie,Ma as ki,Mc as Pe,Mh as Gn,Na as M,Nc as In,Oa as qt,Pa as Kt,Pf as Yn,Ph as Xn,Q as Wt,Qb as vn,Qd as Rn,R as Me,Rb as J,Rg as zn,Rh as si,S as pt,Sb as X,Sf as Ze,Sg as Gi,T as Ve,Ta as Le,Tb as ne,Th as li,Ua as Q,Ue as wn,Uf as Vn,Ug as L,Vb as ii,Wc as te,Xb as En,Y as xi,Yb as v,Z as $e,Zb as R,_ as jt,_b as x,_c as Tn,_g as Un,b as st,ba as _,c as Lt,cb as Sn,cc as re,d as b,dc as ae,e as mn,ec as se,fd as de,fe as Ui,g as Ni,ga as I,gb as f,ha as T,hb as C,ic as Be,jb as ye,k as lt,ka as Nt,kb as q,kc as ze,kh as D,la as mt,lb as K,lc as Mn,le as St,ma as Yi,mb as u,mc as $,mh as ri,na as Se,nb as d,nh as _t,o as Ce,oa as Fe,ob as s,pa as Qt,pb as S,q as Ut,qb as ht,qh as qe,r as un,ra as Dt,rb as wt,re as Ne,s as Ht,sa as ke,sb as Jt,tb as B,tc as W,te as Ln,ua as Zt,ub as z,uc as le,ue as oi,v as hn,vb as Bi,vc as ve,w as Gt,wh as ce,xc as N,y as gn,ye as De,za as Vi,zb as Y,zd as On}from"./chunk-DZBHF6HI.js";import{a as _e,b as pe,e as zr,g as pn,i as h,j as Ye}from"./chunk-IQVXR75E.js";var xo=zr((wd,Gr)=>{Gr.exports=`<svg width="278" height="202" viewBox="0 0 278 202" fill="none" xmlns="http://www.w3.org/2000/svg">
  <path d="M154.004 185.78C207.06 179.326 249.514 169.528 248.829 163.895C248.144 158.262 204.579 158.927 151.523 165.381C98.4671 171.835 56.0125 181.633 56.6977 187.266C57.3829 192.899 100.948 192.233 154.004 185.78Z" fill="url(#paint0_radial_2530_45010)" fill-opacity="0.1" />
  <rect x="50.5752" y="22.3535" width="167" height="167" rx="24" transform="rotate(-7.69207 50.5752 22.3535)" fill="var(--bg)" />
  <path d="M106.941 75.79L175.903 66.4757C179.902 65.9355 184.024 69.0292 184.689 73.9578L190.119 114.161C190.785 119.09 187.632 123.166 183.632 123.706L114.671 133.02C110.671 133.561 106.55 130.467 105.884 125.538L100.454 85.335C99.7885 80.4063 102.941 76.3302 106.941 75.79Z" stroke="var(--bg-secondary-450)" stroke-width="6" />
  <path d="M115.966 52.623L137.514 70.5249" stroke="var(--bg-secondary-450)" stroke-width="6" stroke-linecap="round" stroke-linejoin="round" />
  <path d="M161.057 46.5332L145.03 69.5102" stroke="var(--bg-secondary-450)" stroke-width="6" stroke-linecap="round" stroke-linejoin="round" />
  <g clip-path="url(#clip0_2530_45010)">
    <rect y="8.43359" width="74" height="74" rx="37" fill="var(--bg-secondary-450)" />
    <path d="M36.9997 51.8372C44.8237 51.8372 51.1663 45.4946 51.1663 37.6706C51.1663 29.8465 44.8237 23.5039 36.9997 23.5039C29.1756 23.5039 22.833 29.8465 22.833 37.6706C22.833 45.4946 29.1756 51.8372 36.9997 51.8372Z" stroke="var(--secondary-icon-color)" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" />
    <path d="M59.6663 74.5046C59.6663 68.493 57.2783 62.7276 53.0274 58.4768C48.7766 54.226 43.0112 51.8379 36.9997 51.8379C30.9881 51.8379 25.2227 54.226 20.9719 58.4768C16.7211 62.7276 14.333 68.493 14.333 74.5046" stroke="var(--secondary-icon-color)" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" />
  </g>
  <g clip-path="url(#clip1_2530_45010)">
    <rect x="96" y="157.424" width="44" height="44" rx="22" fill="var(--secondary-icon-color)" />
    <path d="M118 184.837C123.062 184.837 127.166 180.733 127.166 175.671C127.166 170.608 123.062 166.504 118 166.504C112.937 166.504 108.833 170.608 108.833 175.671C108.833 180.733 112.937 184.837 118 184.837Z" stroke="var(--bg-secondary-350)" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" />
    <path d="M132.666 199.505C132.666 195.615 131.121 191.884 128.371 189.134C125.62 186.383 121.89 184.838 118 184.838C114.11 184.838 110.379 186.383 107.629 189.134C104.878 191.884 103.333 195.615 103.333 199.505" stroke="var(--bg-secondary-350)" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" />
  </g>
  <g clip-path="url(#clip2_2530_45010)">
    <rect x="218" y="77.4258" width="60" height="60" rx="30" fill="var(--fg-300)" />
    <path d="M248 115.504C254.904 115.504 260.5 109.907 260.5 103.004C260.5 96.1003 254.904 90.5039 248 90.5039C241.096 90.5039 235.5 96.1003 235.5 103.004C235.5 109.907 241.096 115.504 248 115.504Z" stroke="var(--bg-secondary-500)" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" />
    <path d="M268 135.504C268 130.2 265.893 125.112 262.142 121.362C258.391 117.611 253.304 115.504 248 115.504C242.696 115.504 237.609 117.611 233.858 121.362C230.107 125.112 228 130.2 228 135.504" stroke="var(--bg-secondary-500)" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" />
  </g>
  <circle cx="219" cy="135.43" r="16" fill="var(--bg-secondary-500)" />
  <g clip-path="url(#clip3_2530_45010)">
    <path d="M222.334 138.763L219 135.43L215.667 138.763" stroke="var(--fg-200)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
    <path d="M219 135.43V142.93" stroke="var(--fg-200)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
    <path d="M225.992 140.755C226.805 140.311 227.447 139.61 227.817 138.762C228.187 137.913 228.264 136.966 228.035 136.069C227.807 135.171 227.286 134.376 226.556 133.807C225.825 133.239 224.926 132.93 224 132.93H222.95C222.698 131.954 222.228 131.048 221.575 130.28C220.922 129.513 220.104 128.903 219.182 128.497C218.26 128.091 217.257 127.899 216.25 127.936C215.243 127.973 214.258 128.238 213.368 128.711C212.478 129.184 211.707 129.852 211.112 130.666C210.518 131.48 210.116 132.418 209.936 133.409C209.756 134.401 209.804 135.42 210.075 136.391C210.345 137.361 210.833 138.258 211.5 139.013" stroke="var(--fg-200)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
    <path d="M222.334 138.763L219 135.43L215.667 138.763" stroke="var(--fg-200)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
  </g>
  <circle cx="61" cy="76.4336" r="16" fill="var(--secondary-icon-color)" />
  <path d="M60.8525 73.166C62.5743 73.1661 63.9697 74.5614 63.9697 76.2832C63.9696 78.0049 62.5742 79.4003 60.8525 79.4004C59.1307 79.4004 57.7355 78.005 57.7354 76.2832C57.7354 74.5613 59.1307 73.166 60.8525 73.166ZM60.8525 73.9736C59.5774 73.9736 58.543 75.0081 58.543 76.2832C58.5431 77.5586 59.5778 78.5908 60.8525 78.5908C62.1275 78.5907 63.1601 77.5582 63.1602 76.2832C63.1602 75.0085 62.128 73.9737 60.8525 73.9736Z" fill="black" stroke="var(--bg)" />
  <path d="M60.8516 66.7402C60.076 66.7405 59.4473 67.3692 59.4473 68.1445V68.2988C59.4472 69.0559 58.994 69.7395 58.2969 70.0352L58.2891 70.0391L58.2803 70.043C58.2589 70.0529 58.2373 70.0585 58.2139 70.0605L58.1484 70.0664L58.0869 70.0879C57.4516 70.3169 56.7454 70.1822 56.2402 69.7451L56.1416 69.6543C55.888 69.3698 55.5309 69.2009 55.1514 69.1846L55.1494 69.1836C54.7556 69.1682 54.3723 69.3204 54.0947 69.6016C53.5506 70.1489 53.5508 71.0335 54.0938 71.5811L54.1035 71.5898C54.6841 72.1443 54.8562 73.004 54.5342 73.7412L54.5293 73.751L54.5254 73.7607C54.2489 74.4732 53.5683 74.9483 52.8037 74.9609H52.7129C51.9379 74.961 51.3088 75.5893 51.3086 76.3643C51.3086 77.14 51.9374 77.7695 52.7129 77.7695H52.8633C53.5773 77.7747 54.224 78.1797 54.5449 78.8096L54.6045 78.9385C54.8987 79.6412 54.7469 80.451 54.2188 80.998C53.9309 81.2694 53.7631 81.6432 53.75 82.0361V82.0605C53.7562 82.4282 53.9053 82.7795 54.1689 83.0391V83.04C54.7164 83.5857 55.6017 83.5846 56.1494 83.04L56.1504 83.0391C56.5239 82.6655 57.0279 82.4521 57.5557 82.4443C57.8088 82.443 58.0594 82.4979 58.29 82.6055L58.3057 82.6133L58.3232 82.6201C59.0318 82.8902 59.5054 83.5638 59.5205 84.3223H59.5195V84.4229C59.5196 85.1978 60.1488 85.8261 60.9238 85.8262C61.7003 85.8262 62.328 85.1975 62.3281 84.4229V84.2715C62.3321 83.5135 62.7851 82.8298 63.4814 82.5303L63.4873 82.5273C64.1921 82.2136 65.0171 82.3665 65.5615 82.9121C65.8323 83.201 66.2085 83.3729 66.6064 83.3848H66.6221C67.1904 83.3832 67.7022 83.0388 67.917 82.5137C68.1326 81.9878 68.0099 81.3832 67.6055 80.9834L67.6016 80.9795L67.498 80.8711C67.0047 80.3141 66.8724 79.5161 67.1709 78.8242L67.1699 78.8232C67.4717 78.1329 68.1553 77.6875 68.9092 77.6875V77.6865C69.288 77.7086 69.6591 77.5787 69.9395 77.3223C70.2321 77.0544 70.3961 76.6752 70.3945 76.2812C70.3932 75.5066 69.7658 74.879 68.9912 74.8789H68.8369C68.0825 74.8789 67.401 74.4287 67.1035 73.7363C67.0885 73.6974 67.0766 73.6568 67.0703 73.6143L67.0635 73.5654L67.0459 73.5186L67.0059 73.3906C66.8248 72.7469 67.0034 72.0505 67.4814 71.5732L67.4805 71.5723C67.7617 71.319 67.9302 70.9648 67.9453 70.5869L67.9443 70.5859C67.9607 70.1941 67.8132 69.8157 67.5381 69.5391H67.5391C67.2769 69.2723 66.9179 69.1197 66.542 69.1182L66.5342 69.1191C66.162 69.1238 65.8093 69.2761 65.5508 69.5391H65.5498L65.5459 69.5439C64.9903 70.1249 64.1316 70.2966 63.3945 69.9746C62.7003 69.6714 62.2527 68.985 62.2559 68.2275L62.2549 68.2266C62.2743 67.8976 62.1798 67.5722 61.9844 67.3086L61.8896 67.1953C61.6222 66.9036 61.2446 66.7391 60.8516 66.7402ZM58.7109 84.417C58.7057 83.9671 58.4415 83.5634 58.0352 83.376L58.0342 83.375L57.8779 83.3164C57.5087 83.2082 57.1039 83.2896 56.8037 83.542L56.7832 83.5596L56.7637 83.5801C56.3516 84.0133 55.7828 84.2602 55.1846 84.2676C54.5877 84.2738 54.0124 84.0404 53.5908 83.6172H53.5918C52.7345 82.7542 52.7345 81.3601 53.5918 80.4971L53.5898 80.4951C53.9284 80.182 54.0411 79.6959 53.875 79.2676L53.8711 79.2578L53.8662 79.2471C53.6929 78.8535 53.3081 78.5962 52.8779 78.5869H52.7129C51.4911 78.5869 50.5002 77.5965 50.5 76.374C50.5 75.1522 51.4911 74.1602 52.7129 74.1602V74.1592C53.1638 74.1725 53.5723 73.9103 53.7529 73.5L53.7539 73.501C53.7563 73.4963 53.7574 73.491 53.7598 73.4863C53.765 73.4741 53.7726 73.4627 53.7773 73.4502L53.7754 73.4492C53.9589 73.0462 53.8902 72.5704 53.5889 72.2393L53.5791 72.2275L53.5684 72.2178L53.4141 72.0518C52.6936 71.1913 52.7275 69.9074 53.5283 69.0859C54.3816 68.2099 55.784 68.1919 56.6592 69.0459L56.6602 69.0439C56.97 69.3745 57.4485 69.4896 57.876 69.3271L57.877 69.3281L58.0488 69.2646L58.1025 69.2451L58.1504 69.2139C58.4234 69.0356 58.5983 68.7453 58.6328 68.4268L58.6387 68.2891V68.1445C58.6387 66.9227 59.6291 65.9319 60.8516 65.9316C62.0734 65.9316 63.0654 66.9227 63.0654 68.1445H63.0664C63.045 68.5949 63.2941 69.0146 63.7002 69.21L63.707 69.2139L63.7129 69.2158C64.1165 69.3958 64.5912 69.3205 64.918 69.0176L64.9414 68.9941C65.3569 68.5542 65.9345 68.3038 66.54 68.3008C67.1231 68.3018 67.6825 68.5325 68.0957 68.9424C68.5121 69.3574 68.7461 69.9218 68.7461 70.5098C68.7461 71.0978 68.5115 71.661 68.0947 72.0762L68.0957 72.0771C67.7964 72.3522 67.6737 72.7654 67.7686 73.1533L67.8242 73.3232C67.8341 73.3479 67.8434 73.377 67.8506 73.4111L67.8721 73.5127L67.9316 73.5967C68.1338 73.8834 68.461 74.056 68.8115 74.0615H68.9912C70.213 74.0616 71.204 75.0519 71.2041 76.2744C71.2041 77.4962 70.213 78.4872 68.9912 78.4873V78.4893C68.5448 78.4707 68.1249 78.7142 67.9268 79.1211L67.9209 79.1318C67.7332 79.5426 67.8211 80.0251 68.1396 80.3438L68.1436 80.3486C69.0198 81.2046 69.0366 82.6089 68.1807 83.4854H68.1797C67.3248 84.3612 65.9205 84.3776 65.0439 83.5215H65.043C64.748 83.1971 64.2884 83.0775 63.873 83.2227C63.4366 83.3738 63.1422 83.7836 63.1367 84.2451V84.4229C63.1366 85.6446 62.1456 86.6357 60.9238 86.6357C59.7021 86.6356 58.7111 85.6446 58.7109 84.4229V84.417Z" fill="black" stroke="var(--bg)" />
  <path d="M45 97C55.5 115 81.5 115.5 88 109.5C94.5 103.5 70 92.5 68 119C66.4 140.2 80.6667 156.5 88 162" stroke="var(--bg-secondary-500)" stroke-linecap="round" stroke-dasharray="4 4" />
  <path d="M251 146.5C253.5 162 253 202 209 184.5C165 167 167 162 148 165" stroke="var(--bg-secondary-500)" stroke-linecap="round" stroke-dasharray="4 4" />
  <path d="M239.5 70.5002C223.5 57 193 63.5011 172.5 82.0005" stroke="var(--bg-secondary-500)" stroke-linecap="round" stroke-dasharray="4 4" />
  <path d="M170.286 79C170.286 80.3609 167.185 83.4258 166.259 85.8156C166.03 86.4039 166.577 86.8845 167.196 86.7608L176 85" stroke="var(--bg-secondary-500)" stroke-linecap="round" />
  <defs>
    <radialGradient id="paint0_radial_2530_45010" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(152.764 175.58) rotate(-6.93547) scale(96.7739 10.2746)">
      <stop />
      <stop offset="1" stop-opacity="0" />
    </radialGradient>
    <clipPath id="clip0_2530_45010">
      <rect y="8.43359" width="74" height="74" rx="37" fill="var(--bg)" />
    </clipPath>
    <clipPath id="clip1_2530_45010">
      <rect x="96" y="157.424" width="44" height="44" rx="22" fill="var(--bg)" />
    </clipPath>
    <clipPath id="clip2_2530_45010">
      <rect x="218" y="77.4258" width="60" height="60" rx="30" fill="var(--bg)" />
    </clipPath>
    <clipPath id="clip3_2530_45010">
      <rect width="20" height="20" fill="var(--bg)" transform="translate(209 125.43)" />
    </clipPath>
  </defs>
</svg>
`;});var Lo=(()=>{let t=class t{};h(t,"\u0275fac",function(i){return new(i||t)();}),h(t,"\u0275cmp",M({type:t,selectors:[["ng-component"]],decls:1,vars:0,consts:[["mode","user","key","UserVideoCommentList"]],template:function(i,r){i&1&&S(0,"my-video-comment-list-admin-owner",0);},dependencies:[Co],encapsulation:2}));let n=t;return n;})();function Ur(n,t){if(n&1){let o=Y();d(0,"div",2)(1,"my-peertube-checkbox",3),se("ngModelChange",function(i){let r=I(o).$implicit;return ae(r.review,i)||(r.review=i),T(i);}),P("ngModelChange",function(){I(o);let i=m();return T(i.updatePolicies());}),s()();}if(n&2){let o=t.$implicit,e=t.$index,i=m();l(),u("inputName","tag-"+e),re("ngModel",o.review),u("labelInnerHTML",i.getLabelText(o));}}var No=(()=>{let t=class t{authService=_(D);autoTagsService=_(It);notifier=_(L);html=_(Gn);route=_(Ie);tags=[];ngOnInit(){this.tags=this.route.snapshot.data.tags;}getLabelText(e){let i=e.name==="external-link"?"That contain <strong>an external link</strong>":"That contain any word from your <strong>"+e.name+"</strong> watched word list";return this.html.toSimpleSafeHtml(i);}updatePolicies(){let e=this.authService.getUser().account.name;this.autoTagsService.updateCommentPolicies({accountName:e,review:this.tags.filter(i=>i.review).map(i=>i.name)}).subscribe({next:()=>{this.notifier.success("\u8BC4\u8BBA\u653F\u7B56\u5DF2\u66F4\u65B0");},error:i=>this.notifier.handleError(i)});}};h(t,"\u0275fac",function(i){return new(i||t)();}),h(t,"\u0275cmp",M({type:t,selectors:[["ng-component"]],decls:4,vars:0,consts:()=>{let e;return e="\u81EA\u52A8\u5C4F\u853D\u8BC4\u8BBA\uFF1A",[e,[1,"d-block","mb-3"],[1,"form-group","ms-3"],[3,"ngModelChange","inputName","ngModel","labelInnerHTML"]];},template:function(i,r){i&1&&(d(0,"strong",1),g(1,0),s(),q(2,Ur,2,3,"div",2,ye)),i&2&&(l(2),K(r.tags));},dependencies:[U,j,ue,Te],encapsulation:2}));let n=t;return n;})();var Do=()=>{let n=_(D),t=_(It),o=n.getUser().account.name;return Ht([t.listAvailable({accountName:o}),t.getCommentPolicies({accountName:o})]).pipe(Ce(([e,i])=>e.available.map(r=>({name:r.name,type:r.type,review:i.review.includes(r.name)}))));};function Hr(n,t){if(n&1&&(ht(0,"div",1),Jt(1,"div",4),wt()),n&2){let o=m();l(),zi("innerHTML",o.svg,Vi);}}var wo=(()=>{let t=class t{activeModal=_(Fn);title;html;svg;};h(t,"\u0275fac",function(i){return new(i||t)();}),h(t,"\u0275cmp",M({type:t,selectors:[["my-new-feature-info-modal"]],decls:6,vars:3,consts:()=>{let e;return e="\u77E5\u9053\u4E86",[[1,"modal-body"],[1,"svg-relative-container"],[1,"content",3,"innerHtml"],["type","button","role","button","value",e,1,"peertube-button","primary-button",3,"click","key.enter"],["aria-hidden","true",1,"svg-container",3,"innerHTML"]];},template:function(i,r){i&1&&(ht(0,"div",0),f(1,Hr,2,1,"div",1),ht(2,"h2"),v(3),wt(),Jt(4,"div",2),ht(5,"input",3),yn("click",function(){return r.activeModal.close();})("key.enter",function(){return r.activeModal.close();}),wt()()),i&2&&(l(),C(r.svg?1:-1),l(2),R(r.title),l(),zi("innerHTML",r.html,Vi));},dependencies:[U],styles:[`h2[_ngcontent-%COMP%]{color:var(--fg-350);font-weight:700;margin-bottom:calc(1.325rem + .9vw)}@media(min-width:1200px){h2[_ngcontent-%COMP%]{margin-bottom:2rem}}h2[_ngcontent-%COMP%]{font-size:calc(1.3625rem + 1.35vw)}@media(min-width:1200px){h2[_ngcontent-%COMP%]{font-size:2.375rem}}.modal-body[_ngcontent-%COMP%]{text-align:center}.content[_ngcontent-%COMP%]{color:var(--fg-200);margin-bottom:calc(1.375rem + 1.5vw)}@media(min-width:1200px){.content[_ngcontent-%COMP%]{margin-bottom:2.5rem}}.svg-relative-container[_ngcontent-%COMP%]{position:relative}.svg-container[_ngcontent-%COMP%]{margin:0 auto;position:absolute;top:-3.5rem;right:0;left:0}.svg-relative-container[_ngcontent-%COMP%] + h2[_ngcontent-%COMP%]{margin-top:10rem}
/*# sourceMappingURL=new-feature-info-modal.component-IANZ5DI7.css.map */`]}));let n=t;return n;})();var Xr=xo(),Oi=(()=>{let t=class t{auth=_(D);modalService=_(yt);serverService=_(ce);userService=_(si);notifier=_(L);domSanitizer=_(On);showChannelCollaboration(){this.auth.userInformationLoaded.pipe(Xt()).subscribe(()=>{if(this.serverService.getHTMLConfig().client.newFeaturesInfo!==!0||this.auth.getUser().newFeaturesInfoRead&Ui.CHANNEL_COLLABORATION||this.modalService.hasOpenModals())return;let r=this.serverService.getHTMLConfig().instance.name,a=this.modalService.open(wo,{size:"lg",centered:!0}),c=a.componentInstance;c.title="\u9891\u9053\u534F\u4F5C\u529F\u80FD\u5373\u5C06\u767B\u9646 "+r+"\u3002",c.html="\u4F60\u73B0\u5728\u53EF\u4EE5<strong>\u9080\u8BF7\u5176\u4ED6\u7528\u6237</strong>\u6765\u534F\u4F5C\u7BA1\u7406\u4F60\u7684\u9891\u9053\u4E86\u3002",c.svg=this.domSanitizer.bypassSecurityTrustHtml(Xr),a.result.finally(()=>{this.userService.markNewFeatureInfoAsRead(Ui.CHANNEL_COLLABORATION).subscribe({next:()=>this.auth.refreshUserInformation(),error:p=>this.notifier.handleError(p)});});});}};h(t,"\u0275fac",function(i){return new(i||t)();}),h(t,"\u0275prov",$e({token:t,factory:t.ɵfac,providedIn:"root"}));let n=t;return n;})();var Yo=(()=>{let t=class t{serverService=_(ce);newFeatureInfoService=_(Oi);menuEntries=[];serverConfig;ngOnInit(){this.serverConfig=this.serverService.getHTMLConfig(),this.buildMenu(),this.newFeatureInfoService.showChannelCollaboration();}buildMenu(){this.menuEntries=[{label:"\u7BA1\u7406\u6211\u7684\u9891\u9053",routerLink:"/my-library/video-channels"},{label:"\u5173\u6CE8\u8005",routerLink:"/my-library/followers"},{label:"\u540C\u6B65",routerLink:"/my-library/video-channel-syncs",isDisplayed:()=>this.isChannelSyncEnabled()}];}isChannelSyncEnabled(){let e=this.serverConfig.import;return this.serverConfig.import.videoChannelSynchronization.enabled&&(e.videos.http.enabled||e.videos.torrent.enabled);}};h(t,"\u0275fac",function(i){return new(i||t)();}),h(t,"\u0275cmp",M({type:t,selectors:[["ng-component"]],decls:8,vars:1,consts:()=>{let e;e="\u6211\u7684\u9891\u9053";let i;return i="\u8DF3\u8FC7\u5B50\u83DC\u5355",[["myChannelSpaceContent",""],i,[1,"root"],[1,"margin-content"],["href","#my-channel-space-content",1,"visually-hidden-focusable","skip-to-content-sub-menu",3,"click"],["h1Icon","channel","h1",e,3,"menuEntries"],["tabindex","-1","id","my-channel-space-content",1,"margin-content","pb-5","outline-0"]];},template:function(i,r){if(i&1){let a=Y();d(0,"div",2)(1,"div",3)(2,"a",4),P("click",function(p){I(a);let y=ne(6);return p.preventDefault(),T(y.focus());}),g(3,1),s(),S(4,"my-horizontal-menu",5),s(),d(5,"div",6,0),S(7,"router-outlet"),s()();}i&2&&(l(4),u("menuEntries",r.menuEntries));},dependencies:[ft,Et],encapsulation:2}));let n=t;return n;})();function Wr(n,t){if(n&1&&(d(0,"span",4),v(1),s()),n&2){let o=m();l(),x(" ",o.getTotalTitle());}}function jr(n,t){n&1&&(d(0,"div",8),g(1,0),s());}function Qr(n,t){n&1&&(B(0),g(1,1),z());}function Zr(n,t){if(n&1&&(B(0),g(1,2),z()),n&2){let o=m().$implicit;l(),F(o.following.name),k(1);}}function qr(n,t){if(n&1&&(d(0,"div",10),S(1,"my-actor-avatar",11),d(2,"div",12)(3,"a",13)(4,"div",14),v(5),s(),S(6,"my-global-icon",15),s(),d(7,"div",16),f(8,Qr,2,0,"ng-container")(9,Zr,2,1,"ng-container"),s()()()),n&2){let o=t.$implicit,e=m();l(),u("actor",o.follower)("href",o.follower.url),l(2),u("href",o.follower.url,ct),l(2),R(o.follower.name+"@"+o.follower.host),l(3),C(e.isFollowingAccount(o)?8:9);}}var Vo=(()=>{let t=class t{route=_(Ie);auth=_(D);userSubscriptionService=_(Tt);notifier=_(L);follows=[];pagination={currentPage:1,itemsPerPage:10,totalItems:null};onDataSubject=new b();search;channelFilter;inputFilters;ngOnInit(){this.inputFilters=[{type:"select",key:"channel",title:"\u9891\u9053",items:this.auth.getUser().videoChannels.map(e=>({id:e.name,label:e.displayName}))}],this.search=this.route.snapshot.queryParamMap.get("search")||"",this.channelFilter=this.route.snapshot.queryParamMap.get("channel")||"",this.loadFollowers();}onNearOfBottom(){this.pagination.totalItems<=this.pagination.currentPage*this.pagination.itemsPerPage||(this.pagination.currentPage+=1,this.loadFollowers());}onSearch(e){this.search=e,_t(this.pagination),this.loadFollowers({reset:!0});}onFilter(e){this.channelFilter=e.channel,_t(this.pagination),this.loadFollowers({reset:!0});}isFollowingAccount(e){return e.following.name===this.getUsername();}getTotalTitle(){return me(""+this.pagination.totalItems+" {total, plural, =1 {\u4F4D\u8BA2\u9605\u8005} other {\u4F4D\u8BA2\u9605\u8005}}",{total:this.pagination.totalItems});}loadFollowers(e={}){let{reset:i=!1}=e;this.userSubscriptionService.listFollowers({pagination:this.pagination,nameWithHost:this.getUsername(),search:this.search,channel:this.channelFilter}).subscribe({next:r=>{this.follows=i?r.data:this.follows.concat(r.data),this.pagination.totalItems=r.total,this.onDataSubject.next(r.data);},error:r=>this.notifier.handleError(r)});}getUsername(){return this.auth.getUser().username;}};h(t,"\u0275fac",function(i){return new(i||t)();}),h(t,"\u0275cmp",M({type:t,selectors:[["ng-component"]],decls:9,vars:4,consts:()=>{let e;e="\u672A\u627E\u5230\u5173\u6CE8\u8005\u3002";let i;i="\u5173\u6CE8\u8005\u9875\u9762";let r;r="\u6B63\u5173\u6CE8\u4F60\u7684\u6240\u6709\u9891\u9053";let a;return a="\u6B63\u5173\u6CE8\u4F60\u7684\u9891\u9053 "+"\uFFFD0\uFFFD"+"",[e,r,a,[1,"followers-header","d-flex","justify-content-between","align-items-end","gap-2","flex-wrap"],[1,"total-items"],[1,"d-flex","gap-2","flex-wrap","ms-auto"],[3,"search"],[1,"d-block","ms-auto",3,"filtersChange","filters"],[1,"no-results"],["myInfiniteScroller","",1,"actors",3,"nearOfBottom","dataObservable"],[1,"actor"],["actorType","account","size","40",3,"actor","href"],[1,"actor-info"],["rel","noopener noreferrer","target","_blank","title",i,1,"actor-names",3,"href"],[1,"actor-display-name"],["iconName","external-link"],[1,"small","muted"]];},template:function(i,r){i&1&&(d(0,"div",3),f(1,Wr,2,1,"span",4),d(2,"div",5)(3,"my-search-input",6),P("search",function(c){return r.onSearch(c);}),s(),d(4,"my-advanced-input-filter",7),P("filtersChange",function(c){return r.onFilter(c);}),s()()(),f(5,jr,2,0,"div",8),d(6,"div",9),P("nearOfBottom",function(){return r.onNearOfBottom();}),q(7,qr,10,5,"div",10,ye),s()),i&2&&(l(),C(r.pagination.totalItems?1:-1),l(3),u("filters",r.inputFilters),l(),C(r.pagination.totalItems===0?5:-1),l(),u("dataObservable",r.onDataSubject.asObservable()),l(),K(r.follows));},dependencies:[he,ao,Je,et,Pt],styles:[`.followers-header[_ngcontent-%COMP%]{margin-bottom:30px;display:flex}input[type=text][_ngcontent-%COMP%]{font-size:16px;padding:var(--input-y-padding) var(--input-x-padding);width:300px;max-width:300px;color:var(--input-fg);background-color:var(--input-bg);border:var(--input-border-width) solid var(--input-border-color);border-radius:var(--input-border-radius);line-height:24px}input[type=text][_ngcontent-%COMP%]::placeholder{color:var(--input-placeholder-color);font-size:var(--input-placeholder-font-size)}input[type=text][readonly][_ngcontent-%COMP%]{color:var(--fg-300)}input[type=text][_ngcontent-%COMP%]:focus, input[type=text][_ngcontent-%COMP%]:focus-visible{box-shadow:0 0 0 .2rem var(--fg-100);outline:0}input[type=text][disabled][_ngcontent-%COMP%]{color:var(--fg-300);opacity:.8}@media screen and (max-width:340px){input[type=text][_ngcontent-%COMP%]{width:100%}}.actor[_ngcontent-%COMP%]{display:flex;min-height:auto;padding-bottom:1.25rem;margin-bottom:1.25rem;border-bottom:1px solid var(--input-border-color)}@media screen and (max-width:800px){.actor[_ngcontent-%COMP%]{flex-direction:column;height:auto;align-items:center}}.actor[_ngcontent-%COMP%] > my-actor-avatar[_ngcontent-%COMP%]{margin-inline-end:.625rem}.actor[_ngcontent-%COMP%]   .actor-info[_ngcontent-%COMP%]{flex-grow:1}.actor[_ngcontent-%COMP%]   .actor-names[_ngcontent-%COMP%]{width:fit-content;display:flex;align-items:baseline;color:var(--fg)}.actor[_ngcontent-%COMP%]   .actor-names[_ngcontent-%COMP%], .actor[_ngcontent-%COMP%]   .actor-names[_ngcontent-%COMP%]:hover, .actor[_ngcontent-%COMP%]   .actor-names[_ngcontent-%COMP%]:focus, .actor[_ngcontent-%COMP%]   .actor-names[_ngcontent-%COMP%]:active{text-decoration:none}.actor[_ngcontent-%COMP%]   .actor-names[_ngcontent-%COMP%]:focus:not(:focus-visible){outline:none}.actor[_ngcontent-%COMP%]   .actor-display-name[_ngcontent-%COMP%]{font-weight:600;font-size:18px}.actor[_ngcontent-%COMP%]   .actor-name[_ngcontent-%COMP%]{font-size:14px;color:var(--fg-300);margin-inline-start:.3125rem}.actor[_ngcontent-%COMP%]   .actor-owner[_ngcontent-%COMP%]{color:var(--fg);display:flex;align-items:center}.actor[_ngcontent-%COMP%]   .actor-owner[_ngcontent-%COMP%], .actor[_ngcontent-%COMP%]   .actor-owner[_ngcontent-%COMP%]:hover, .actor[_ngcontent-%COMP%]   .actor-owner[_ngcontent-%COMP%]:focus, .actor[_ngcontent-%COMP%]   .actor-owner[_ngcontent-%COMP%]:active{text-decoration:none}.actor[_ngcontent-%COMP%]   .actor-owner[_ngcontent-%COMP%]:focus:not(:focus-visible){outline:none}.actor[_ngcontent-%COMP%]   .actor-owner[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]:hover{opacity:.8}.actor[_ngcontent-%COMP%]   .actor-owner[_ngcontent-%COMP%]   my-actor-avatar[_ngcontent-%COMP%]{margin-inline-start:.3125rem}@media screen and (max-width:800px){.actor[_ngcontent-%COMP%]   .actor-info[_ngcontent-%COMP%]{padding-bottom:10px;text-align:center}.actor[_ngcontent-%COMP%]   .actor-info[_ngcontent-%COMP%]   .actor-names[_ngcontent-%COMP%]{flex-direction:column;align-items:center!important;margin:auto}}
/*# sourceMappingURL=my-followers.component-CZUZ5CY5.css.map */`]}));let n=t;return n;})();var $o=n=>["/c",n],Kr=n=>["/a",n],Jr=n=>[n];function ea(n,t){if(n&1&&(d(0,"span",4),v(1),s()),n&2){let o=m();l(),x(" ",o.getTotalTitle());}}function ta(n,t){n&1&&(d(0,"div",6),g(1,0),s());}function ia(n,t){if(n&1&&(d(0,"div",8),S(1,"my-actor-avatar",9),d(2,"div",10)(3,"a",11)(4,"div",12),v(5),s(),d(6,"div",13),v(7),s()(),d(8,"div",14),g(9,1),s(),d(10,"a",15)(11,"span"),g(12,2),s(),S(13,"my-actor-avatar",16),s()(),S(14,"my-subscribe-button",17),s()),n&2){let o=t.$implicit;l(),u("actor",o)("internalHref",$(10,$o,o.nameWithHost)),l(2),u("routerLink",$(12,$o,o.nameWithHost)),l(2),R(o.displayName),l(2),R(o.nameWithHost),l(2),F(o.followersCount),k(9),l(),u("routerLink",$(14,Kr,o.ownerBy)),l(2),F(o.ownerBy),k(12),l(),u("actor",o.ownerAccount),l(),u("videoChannels",$(16,Jr,o));}}var Fo=(()=>{let t=class t{userSubscriptionService=_(Tt);notifier=_(L);videoChannels=[];pagination={currentPage:1,itemsPerPage:10,totalItems:null};onDataSubject=new b();search;onNearOfBottom(){this.pagination.totalItems<=this.pagination.currentPage*this.pagination.itemsPerPage||(this.pagination.currentPage+=1,this.loadSubscriptions());}onSearch(e){this.search=e,_t(this.pagination),this.loadSubscriptions(!1);}getTotalTitle(){return me(""+this.pagination.totalItems+" {total, plural, =1 {\u4E2A\u8BA2\u9605} other {\u4E2A\u8BA2\u9605}}",{total:this.pagination.totalItems});}loadSubscriptions(e=!0){this.userSubscriptionService.listSubscriptions({pagination:this.pagination,search:this.search}).subscribe({next:i=>{this.videoChannels=e?this.videoChannels.concat(i.data):i.data,this.pagination.totalItems=i.total,this.onDataSubject.next(i.data);},error:i=>this.notifier.handleError(i)});}};h(t,"\u0275fac",function(i){return new(i||t)();}),h(t,"\u0275cmp",M({type:t,selectors:[["ng-component"]],decls:7,vars:3,consts:()=>{let e;e="\u4F60\u8FD8\u672A\u8FDB\u884C\u4EFB\u4F55\u8BA2\u9605\u3002";let i;i="\u9891\u9053\u9875\u9762";let r;r="\u6240\u6709\u8005\u8D26\u6237\u9875\u9762";let a;a=""+"\uFFFD0\uFFFD"+" \u4F4D\u8BA2\u9605\u8005\n        ";let c;return c="\u7531 "+"\uFFFD0\uFFFD"+" \u521B\u5EFA",[e,a,c,[1,"mb-4","d-flex","justify-content-between","align-items-end","gap-2","flex-wrap"],[1,"total-items"],["emitOnInit","true",1,"d-block","ms-auto",3,"search"],[1,"no-results"],["myInfiniteScroller","",1,"actors",3,"nearOfBottom","dataObservable"],[1,"actor"],["actorType","channel","size","80",3,"actor","internalHref"],[1,"actor-info"],["title",i,1,"actor-names",3,"routerLink"],[1,"actor-display-name"],[1,"actor-name"],[1,"actor-followers"],["title",r,1,"actor-owner",3,"routerLink"],["actorType","account","size","18",3,"actor"],[3,"videoChannels"]];},template:function(i,r){i&1&&(d(0,"div",3),f(1,ea,2,1,"span",4),d(2,"my-search-input",5),P("search",function(c){return r.onSearch(c);}),s()(),f(3,ta,2,0,"div",6),d(4,"div",7),P("nearOfBottom",function(){return r.onNearOfBottom();}),q(5,ia,15,18,"div",8,ye),s()),i&2&&(l(),C(r.pagination.totalItems?1:-1),l(2),C(r.pagination.totalItems===0?3:-1),l(),u("dataObservable",r.onDataSubject.asObservable()),l(),K(r.videoChannels));},dependencies:[Pt,Je,et,ie,Po],styles:[`input[type=text][_ngcontent-%COMP%]{font-size:16px;padding:var(--input-y-padding) var(--input-x-padding);width:300px;max-width:300px;color:var(--input-fg);background-color:var(--input-bg);border:var(--input-border-width) solid var(--input-border-color);border-radius:var(--input-border-radius);line-height:24px}input[type=text][_ngcontent-%COMP%]::placeholder{color:var(--input-placeholder-color);font-size:var(--input-placeholder-font-size)}input[type=text][readonly][_ngcontent-%COMP%]{color:var(--fg-300)}input[type=text][_ngcontent-%COMP%]:focus, input[type=text][_ngcontent-%COMP%]:focus-visible{box-shadow:0 0 0 .2rem var(--fg-100);outline:0}input[type=text][disabled][_ngcontent-%COMP%]{color:var(--fg-300);opacity:.8}@media screen and (max-width:340px){input[type=text][_ngcontent-%COMP%]{width:100%}}.actor[_ngcontent-%COMP%]{display:flex;min-height:130px;padding-bottom:1.25rem;margin-bottom:1.25rem;border-bottom:1px solid var(--input-border-color)}@media screen and (max-width:800px){.actor[_ngcontent-%COMP%]{flex-direction:column;height:auto;align-items:center}}.actor[_ngcontent-%COMP%] > my-actor-avatar[_ngcontent-%COMP%]{margin-inline-end:.625rem}.actor[_ngcontent-%COMP%]   .actor-info[_ngcontent-%COMP%]{flex-grow:1}.actor[_ngcontent-%COMP%]   .actor-names[_ngcontent-%COMP%]{width:fit-content;display:flex;align-items:baseline;color:var(--fg)}.actor[_ngcontent-%COMP%]   .actor-names[_ngcontent-%COMP%], .actor[_ngcontent-%COMP%]   .actor-names[_ngcontent-%COMP%]:hover, .actor[_ngcontent-%COMP%]   .actor-names[_ngcontent-%COMP%]:focus, .actor[_ngcontent-%COMP%]   .actor-names[_ngcontent-%COMP%]:active{text-decoration:none}.actor[_ngcontent-%COMP%]   .actor-names[_ngcontent-%COMP%]:focus:not(:focus-visible){outline:none}.actor[_ngcontent-%COMP%]   .actor-display-name[_ngcontent-%COMP%]{font-weight:600;font-size:18px}.actor[_ngcontent-%COMP%]   .actor-name[_ngcontent-%COMP%]{font-size:14px;color:var(--fg-300);margin-inline-start:.3125rem}.actor[_ngcontent-%COMP%]   .actor-owner[_ngcontent-%COMP%]{color:var(--fg);display:flex;align-items:center}.actor[_ngcontent-%COMP%]   .actor-owner[_ngcontent-%COMP%], .actor[_ngcontent-%COMP%]   .actor-owner[_ngcontent-%COMP%]:hover, .actor[_ngcontent-%COMP%]   .actor-owner[_ngcontent-%COMP%]:focus, .actor[_ngcontent-%COMP%]   .actor-owner[_ngcontent-%COMP%]:active{text-decoration:none}.actor[_ngcontent-%COMP%]   .actor-owner[_ngcontent-%COMP%]:focus:not(:focus-visible){outline:none}.actor[_ngcontent-%COMP%]   .actor-owner[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]:hover{opacity:.8}.actor[_ngcontent-%COMP%]   .actor-owner[_ngcontent-%COMP%]   my-actor-avatar[_ngcontent-%COMP%]{margin-inline-start:.3125rem}@media screen and (max-width:800px){.actor[_ngcontent-%COMP%]   .actor-info[_ngcontent-%COMP%]{padding-bottom:10px;text-align:center}.actor[_ngcontent-%COMP%]   .actor-info[_ngcontent-%COMP%]   .actor-names[_ngcontent-%COMP%]{flex-direction:column;align-items:center!important;margin:auto}}
/*# sourceMappingURL=my-subscriptions.component-PCWEQ77E.css.map */`]}));let n=t;return n;})();var na=n=>({$implicit:n});function oa(n,t){if(n&1&&(d(0,"div",2),g(1,0),s()),n&2){let o=m();l(),F(o.noResultMessage()),k(1);}}function ra(n,t){if(n&1){let o=Y();d(0,"div",6)(1,"my-peertube-checkbox",8),se("ngModelChange",function(i){I(o);let r=m().$implicit,a=m();return ae(a.selection()[r.id],i)||(a.selection()[r.id]=i),T(i);}),s()();}if(n&2){let o=m().$implicit,e=m();l(),u("inputName","video-check-"+o.id),re("ngModel",e.selection()[o.id]);}}function aa(n,t){n&1&&Bi(0);}function sa(n,t){if(n&1&&Q(0,aa,1,0,"ng-container",9),n&2){let o=m().$implicit,e=m();u("ngTemplateOutlet",e.rowButtonsTemplate)("ngTemplateOutletContext",$(2,na,o));}}function la(n,t){if(n&1&&(d(0,"div",4),f(1,ra,2,2,"div",6),S(2,"my-video-miniature",7),f(3,sa,1,4,"ng-container"),s()),n&2){let o=t.$implicit,e=m();l(),C(e.enableSelection()?1:-1),l(),u("video",o)("displayAsRow",!0)("displayOptions",e.miniatureDisplayOptions())("displayVideoActions",!1)("user",e.user()),l(),C(e.isInSelectionMode()===!1?3:-1);}}function da(n,t){n&1&&Bi(0);}function ca(n,t){if(n&1){let o=Y();d(0,"div",5)(1,"button",10),P("click",function(){I(o);let i=m();return T(i.abortSelectionMode());}),g(2,1),s(),Q(3,da,1,0,"ng-container",11),s();}if(n&2){let o=m();l(3),u("ngTemplateOutlet",o.globalButtonsTemplate);}}var ko=(()=>{let t=class t{notifier=_(L);user=H(void 0);pagination=H(void 0);titlePage=H(void 0);miniatureDisplayOptions=H(void 0);noResultMessage=H("\u6CA1\u6709\u7ED3\u679C\u3002");enableSelection=H(!0);disabled=H(!1);getVideosObservableFunction=H(void 0);templates=Pn(Vt);selection=xt({});videos=xt([]);rowButtonsTemplate;globalButtonsTemplate;sort="-publishedAt";onDataSubject=new b();hasDoneFirstQuery=!1;lastQueryLength;ngAfterContentInit(){{let e=this.templates().find(i=>i.name()==="rowButtons");e&&(this.rowButtonsTemplate=e.template);}{let e=this.templates().find(i=>i.name()==="globalButtons");e&&(this.globalButtonsTemplate=e.template);}}getVideosObservable(e){return this.getVideosObservableFunction()(e,this.sort);}abortSelectionMode(){this.selection.update(()=>({}));}isInSelectionMode(){return wn(this.selection()).some(e=>this.selection()[e]===!0);}videoById(e,i){return i.id;}onNearOfBottom(){this.disabled()||this.lastQueryLength!==void 0&&this.lastQueryLength<this.pagination().itemsPerPage||(this.pagination().currentPage+=1,this.loadMoreVideos());}loadMoreVideos(e=!1){e&&(this.hasDoneFirstQuery=!1),this.getVideosObservable(this.pagination().currentPage).subscribe({next:({data:i})=>{this.hasDoneFirstQuery=!0,this.lastQueryLength=i.length,e&&this.videos.set([]),this.videos.update(r=>r.concat(i)),this.onDataSubject.next(i);},error:i=>{let r="\u65E0\u6CD5\u52A0\u8F7D\u66F4\u591A\u89C6\u9891\u3002\u8BF7\u7A0D\u540E\u518D\u8BD5\u3002";xn.error(r,i),this.notifier.error(r);}});}reloadVideos(){_t(this.pagination()),this.loadMoreVideos(!0);}};h(t,"\u0275fac",function(i){return new(i||t)();}),h(t,"\u0275cmp",M({type:t,selectors:[["my-videos-selection"]],contentQueries:function(i,r,a){i&1&&vn(a,r.templates,Vt,4),i&2&&X();},inputs:{user:[1,"user"],pagination:[1,"pagination"],titlePage:[1,"titlePage"],miniatureDisplayOptions:[1,"miniatureDisplayOptions"],noResultMessage:[1,"noResultMessage"],enableSelection:[1,"enableSelection"],disabled:[1,"disabled"],getVideosObservableFunction:[1,"getVideosObservableFunction"],selection:[1,"selection"],videos:[1,"videos"]},outputs:{selection:"selectionChange",videos:"videosChange"},decls:5,vars:3,consts:()=>{let e;e="\n          "+"\uFFFD0\uFFFD"+"\n        ";let i;return i="\u53D6\u6D88",[e,i,[1,"no-results"],["myInfiniteScroller","",1,"videos",3,"nearOfBottom","dataObservable"],[1,"video"],[1,"action-selection-mode"],[1,"checkbox-container"],[3,"video","displayAsRow","displayOptions","displayVideoActions","user"],[3,"ngModelChange","inputName","ngModel"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"cancel-selection","peertube-button","secondary-button","me-2",3,"click"],[4,"ngTemplateOutlet"]];},template:function(i,r){i&1&&(f(0,oa,2,1,"div",2),d(1,"div",3),P("nearOfBottom",function(){return r.onNearOfBottom();}),q(2,la,4,7,"div",4,r.videoById,!0),s(),f(4,ca,4,1,"div",5)),i&2&&(C(r.hasDoneFirstQuery&&r.videos().length===0?0:-1),l(),u("dataObservable",r.onDataSubject.asObservable()),l(),K(r.videos()),l(2),C(r.isInSelectionMode()===!0?4:-1));},dependencies:[Je,Te,U,j,ue,oo,Tn],styles:[`.action-selection-mode[_ngcontent-%COMP%]{position:fixed;bottom:1rem}@supports (inset-inline-end: var(--x-margin-content)){.action-selection-mode[_ngcontent-%COMP%]{inset-inline-end:var(--x-margin-content)}}@supports not (inset-inline-end: var(--x-margin-content)){.action-selection-mode[_ngcontent-%COMP%]{right:var(--x-margin-content)}}.action-selection-mode[_ngcontent-%COMP%]   .action-button[_ngcontent-%COMP%]{display:block;margin-inline-start:calc(1.46875rem + 2.625vw)}@media(min-width:1200px){.action-selection-mode[_ngcontent-%COMP%]   .action-button[_ngcontent-%COMP%]{margin-inline-start:3.4375rem}}.video[_ngcontent-%COMP%]{display:flex;min-height:130px;padding-bottom:1.25rem;margin-bottom:1.25rem;border-bottom:1px solid var(--input-border-color)}@media screen and (max-width:800px){.video[_ngcontent-%COMP%]{min-height:initial;padding-bottom:.5rem;margin-bottom:.5rem}}.video[_ngcontent-%COMP%]:first-child{margin-top:47px}.video[_ngcontent-%COMP%]   .checkbox-container[_ngcontent-%COMP%]{display:flex;align-items:center;margin-inline-end:1.25rem;margin-inline-start:.75rem}.video[_ngcontent-%COMP%]   my-video-miniature[_ngcontent-%COMP%]{flex-grow:1;max-width:100%}@media screen and (max-width:800px){.video[_ngcontent-%COMP%]{flex-wrap:wrap}.checkbox-container[_ngcontent-%COMP%], .action-selection-mode[_ngcontent-%COMP%]{display:none!important}}
/*# sourceMappingURL=videos-selection.component-FWXCYWF2.css.map */`]}));let n=t;return n;})();var _a=["videosSelection"];function pa(n,t){if(n&1){let o=Y();d(0,"div",12)(1,"my-delete-button",13),P("click",function(){let i=I(o).$implicit,r=m();return T(r.deleteHistoryElement(i));}),s()();}}var Bo=(()=>{let t=class t{authService=_(D);userService=_(si);notifier=_(L);confirmService=_(qe);userHistoryService=_(Io);destroyRef=_(Yi);videosSelection=G("videosSelection");titlePage;pagination={currentPage:1,itemsPerPage:5,totalItems:null};videosHistoryEnabled;miniatureDisplayOptions={date:!0,views:!0,by:!0,privacyLabel:!1};getVideosObservableFunction=this.getVideosObservable.bind(this);user;videos=[];search;disabled=!1;constructor(){this.titlePage="\u6211\u7684\u89C2\u770B\u5386\u53F2";}ngOnInit(){this.user=this.authService.getUser(),this.authService.userInformationLoaded.pipe($n(this.destroyRef)).subscribe(()=>this.videosHistoryEnabled=this.user.videosHistoryEnabled);}disableForReuse(){this.disabled=!0;}enabledForReuse(){this.disabled=!1;}reloadData(){this.videosSelection().reloadVideos();}onSearch(e){this.search=e,this.reloadData();}getVideosObservable(e){let i=Vn(this.pagination,{currentPage:e});return this.userHistoryService.list(i,this.search).pipe(Ve(r=>this.pagination.totalItems=r.total));}generateSyndicationList(){throw new Error("Method not implemented.");}onVideosHistoryChange(){this.userService.updateMyProfile({videosHistoryEnabled:this.videosHistoryEnabled}).subscribe({next:()=>{let e=this.videosHistoryEnabled===!0?"\u5DF2\u542F\u7528\u89C6\u9891\u5386\u53F2":"\u5DF2\u7981\u7528\u89C6\u9891\u5386\u53F2";this.notifier.success(e),this.authService.refreshUserInformation();},error:e=>this.notifier.handleError(e)});}deleteHistoryElement(e){this.userHistoryService.deleteElement(e).subscribe({next:()=>{this.videos=this.videos.filter(i=>i.id!==e.id),ri(this.pagination);},error:i=>this.notifier.handleError(i)});}clearAllHistory(){return Ye(this,null,function*(){let e="\u5220\u9664\u89C6\u9891\u5386\u53F2",i="\u4F60\u786E\u5B9A\u8981\u5220\u9664\u4F60\u7684\u6240\u6709\u89C6\u9891\u5386\u53F2\u5417\uFF1F";(yield this.confirmService.confirm(i,e))===!0&&this.userHistoryService.clearAll().subscribe({next:()=>{this.notifier.success("\u5DF2\u5220\u9664\u89C6\u9891\u5386\u53F2"),this.reloadData();},error:a=>this.notifier.handleError(a)});});}getNoResultMessage(){return this.search?"\u672A\u627E\u5230\u5173\u4E8E\u201C"+this.search+"\u201D\u7684\u89C6\u9891\u3002":"\u4F60\u7684\u89C2\u770B\u8BB0\u5F55\u91CC\u8FD8\u6CA1\u6709\u4EFB\u4F55\u89C6\u9891\u3002";}};h(t,"\u0275fac",function(i){return new(i||t)();}),h(t,"\u0275cmp",M({type:t,selectors:[["ng-component"]],viewQuery:function(i,r){i&1&&J(r.videosSelection,_a,5),i&2&&X();},decls:12,vars:10,consts:()=>{let e;e="\u8DDF\u8E2A\u89C2\u770B\u5386\u53F2";let i;i="\u6E05\u9664\u6240\u6709\u5386\u53F2\u8BB0\u5F55";let r;return r="\u4ECE\u5386\u53F2\u8BB0\u5F55\u5220\u9664",[["videosSelection",""],e,i,[1,"top-buttons"],[1,"search-wrapper"],["emitOnInit","true",3,"search"],[1,"history-switch"],["inputName","track-watch-history",3,"ngModelChange","ngModel"],["for","track-watch-history"],["icon","delete",3,"click"],[3,"videosChange","pagination","videos","miniatureDisplayOptions","titlePage","getVideosObservableFunction","user","noResultMessage","enableSelection","disabled"],["ptTemplate","rowButtons"],[1,"action-button"],["label",r,3,"click"]];},template:function(i,r){if(i&1){let a=Y();d(0,"div",3)(1,"div",4)(2,"my-search-input",5),P("search",function(p){return r.onSearch(p);}),s()(),d(3,"div",6)(4,"my-input-switch",7),se("ngModelChange",function(p){return I(a),ae(r.videosHistoryEnabled,p)||(r.videosHistoryEnabled=p),T(p);}),P("ngModelChange",function(){return r.onVideosHistoryChange();}),s(),d(5,"label",8),g(6,1),s()(),d(7,"my-button",9),P("click",function(){return r.clearAllHistory();}),g(8,2),s()(),d(9,"my-videos-selection",10,0),se("videosChange",function(p){return I(a),ae(r.videos,p)||(r.videos=p),T(p);}),Q(11,pa,2,0,"ng-template",11),s();}i&2&&(l(4),re("ngModel",r.videosHistoryEnabled),l(5),u("pagination",r.pagination),re("videos",r.videos),u("miniatureDisplayOptions",r.miniatureDisplayOptions)("titlePage",r.titlePage)("getVideosObservableFunction",r.getVideosObservableFunction)("user",r.user)("noResultMessage",r.getNoResultMessage())("enableSelection",!1)("disabled",r.disabled));},dependencies:[Ke,Pt,Eo,U,j,ue,ko,Vt,hi],styles:[`.no-history[_ngcontent-%COMP%]{display:flex;justify-content:center;margin-top:50px;font-weight:600}.top-buttons[_ngcontent-%COMP%]{margin-bottom:30px;display:grid;grid-template-columns:250px 1fr auto auto;align-items:center}.top-buttons[_ngcontent-%COMP%]   .search-wrapper[_ngcontent-%COMP%]{grid-column:1}.top-buttons[_ngcontent-%COMP%]   .search-wrapper[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]{font-size:16px;padding:var(--input-y-padding) var(--input-x-padding);width:250px;max-width:250px;color:var(--input-fg);background-color:var(--input-bg);border:var(--input-border-width) solid var(--input-border-color);border-radius:var(--input-border-radius);line-height:24px}.top-buttons[_ngcontent-%COMP%]   .search-wrapper[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]::placeholder{color:var(--input-placeholder-color);font-size:var(--input-placeholder-font-size)}.top-buttons[_ngcontent-%COMP%]   .search-wrapper[_ngcontent-%COMP%]   input[readonly][_ngcontent-%COMP%]{color:var(--fg-300)}.top-buttons[_ngcontent-%COMP%]   .search-wrapper[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]:focus, .top-buttons[_ngcontent-%COMP%]   .search-wrapper[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]:focus-visible{box-shadow:0 0 0 .2rem var(--fg-100);outline:0}.top-buttons[_ngcontent-%COMP%]   .search-wrapper[_ngcontent-%COMP%]   input[disabled][_ngcontent-%COMP%]{color:var(--fg-300);opacity:.8}@media screen and (max-width:290px){.top-buttons[_ngcontent-%COMP%]   .search-wrapper[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]{width:100%}}.top-buttons[_ngcontent-%COMP%]   .history-switch[_ngcontent-%COMP%]{grid-column:3;display:flex;align-items:center;margin-inline-start:auto;margin-inline-end:.9375rem}.top-buttons[_ngcontent-%COMP%]   .history-switch[_ngcontent-%COMP%]   label[_ngcontent-%COMP%]{margin:0 0 0 5px;color:var(--fg-400);font-weight:600}.top-buttons[_ngcontent-%COMP%]   .delete-history[_ngcontent-%COMP%]{grid-column:4}.video[_ngcontent-%COMP%]{display:flex;min-height:130px;padding-bottom:1.25rem;margin-bottom:1.25rem;border-bottom:1px solid var(--input-border-color)}@media screen and (max-width:800px){.video[_ngcontent-%COMP%]{min-height:initial;padding-bottom:.5rem;margin-bottom:.5rem}}.action-button[_ngcontent-%COMP%]{display:flex;align-self:flex-end}@media screen and (max-width:800px){.top-buttons[_ngcontent-%COMP%]{grid-template-columns:auto 1fr auto;row-gap:20px}.top-buttons[_ngcontent-%COMP%]   .history-switch[_ngcontent-%COMP%]{grid-row:1;grid-column:1;margin:0}.top-buttons[_ngcontent-%COMP%]   .delete-history[_ngcontent-%COMP%]{grid-row:1;grid-column:3}.top-buttons[_ngcontent-%COMP%]   .search-wrapper[_ngcontent-%COMP%]{grid-column:1/4}}
/*# sourceMappingURL=my-history.component-BK5MS3IB.css.map */`]}));let n=t;return n;})();var zo=(()=>{let t=class t{menuEntries=[];ngOnInit(){this.buildMenu();}buildMenu(){this.menuEntries=[{label:"\u64AD\u653E\u5217\u8868",routerLink:"/my-library/video-playlists"},{label:"\u8BA2\u9605",routerLink:"/my-library/subscriptions"},{label:"\u5386\u53F2",routerLink:"/my-library/history/videos"}];}};h(t,"\u0275fac",function(i){return new(i||t)();}),h(t,"\u0275cmp",M({type:t,selectors:[["ng-component"]],decls:8,vars:1,consts:()=>{let e;e="\u6211\u7684\u5A92\u4F53\u5E93";let i;return i="\u8DF3\u8FC7\u5B50\u83DC\u5355",[["myLibraryContent",""],i,[1,"root"],[1,"margin-content"],["href","#my-library-content-content",1,"visually-hidden-focusable","skip-to-content-sub-menu",3,"click"],["h1",e,3,"menuEntries"],["tabindex","-1","id","my-library-content",1,"margin-content","pb-5","outline-0"]];},template:function(i,r){if(i&1){let a=Y();d(0,"div",2)(1,"div",3)(2,"a",4),P("click",function(p){I(a);let y=ne(6);return p.preventDefault(),T(y.focus());}),g(3,1),s(),S(4,"my-horizontal-menu",5),s(),d(5,"div",6,0),S(7,"router-outlet"),s()();}i&2&&(l(4),u("menuEntries",r.menuEntries));},dependencies:[ft,Et],encapsulation:2}));let n=t;return n;})();function ma(n,t){if(n&1&&S(0,"my-actor-avatar",2),n&2){let o=m();u("actor",o.actor())("actorType",o.actorType());}}function ua(n,t){n&1&&S(0,"my-global-icon",5);}function ha(n,t){if(n&1&&(d(0,"span",6),v(1),s()),n&2){let o=m();l(),R(o.actor().name);}}function ga(n,t){n&1&&S(0,"my-collaborator-state",7);}function fa(n,t){n&1&&S(0,"my-collaborator-state",8);}var Ot=(()=>{let t=class t{authService=_(D);actor=H.required();actorType=H.required();displayAvatar=H(!0,{transform:Pe});displayUsername=H(!0,{transform:Pe});target=H("");routerLink;linkTitle;ngOnInit(){this.actorType()==="channel"?(this.routerLink=["/c",this.actor().name],this.linkTitle="\u8F6C\u5230 "+this.actor().displayName+" \u7684\u9891\u9053\u9875\u9762"):(this.routerLink=["/a",this.actor().name],this.linkTitle="\u8F6C\u5230 "+this.actor().displayName+" \u7684\u8D26\u53F7\u9875\u9762");}isEditorOfChannel(){if(this.actorType()!=="channel")return!1;let e=this.authService.getUser();return e.isCollaboratingToChannels()&&e.isEditorOfChannel(this.actor());}isOwnerOfChannel(){if(this.actorType()!=="channel")return!1;let e=this.authService.getUser();return e.isCollaboratingToChannels()&&e.isOwnerOfChannel(this.actor());}};h(t,"\u0275fac",function(i){return new(i||t)();}),h(t,"\u0275cmp",M({type:t,selectors:[["my-actor-cell"]],inputs:{actor:[1,"actor"],actorType:[1,"actorType"],displayAvatar:[1,"displayAvatar"],displayUsername:[1,"displayUsername"],target:[1,"target"]},decls:10,vars:8,consts:[[3,"routerLink","title","target"],[1,"chip","two-lines"],["size","32",3,"actor","actorType"],[1,"information"],[1,"fw-semibold"],["iconName","external-link"],[1,"muted"],["type","accepted","small","true",1,"ms-2"],["type","owner","small","true",1,"ms-2"]],template:function(i,r){i&1&&(d(0,"a",0)(1,"div",1),f(2,ma,1,2,"my-actor-avatar",2),d(3,"div",3)(4,"span",4),v(5),f(6,ua,1,0,"my-global-icon",5),s(),f(7,ha,2,1,"span",6),s(),f(8,ga,1,0,"my-collaborator-state",7)(9,fa,1,0,"my-collaborator-state",8),s()()),i&2&&(u("routerLink",r.routerLink)("title",r.linkTitle)("target",r.target()),l(2),C(r.displayAvatar()?2:-1),l(3),x(" ",r.actor().displayName," "),l(),C(r.target()==="_blank"?6:-1),l(),C(r.displayUsername()?7:-1),l(),C(r.isEditorOfChannel()?8:r.isOwnerOfChannel()?9:-1));},dependencies:[Rn,ie,tt,et,he],styles:[`a[_ngcontent-%COMP%]:hover{opacity:1}a[_ngcontent-%COMP%]:hover   .information[_ngcontent-%COMP%]{opacity:.8}
/*# sourceMappingURL=actor-cell.component-PPYSRTR3.css.map */`]}));let n=t;return n;})();var Ca=["modal"];function Sa(n,t){if(n&1&&(d(0,"div",10),v(1),s()),n&2){let o=m(2);l(),R(o.formErrors.channel);}}function ya(n,t){if(n&1){let o=Y();d(0,"div",2)(1,"h1",3),v(2),s(),d(3,"button",4),P("click",function(){let i=I(o).dismiss;return T(i());}),S(4,"my-global-icon",5),s()(),d(5,"div",6)(6,"div",7)(7,"label",8),g(8,1),s(),S(9,"my-select-channel",9),f(10,Sa,2,1,"div",10),s()(),d(11,"div",11)(12,"div",12)(13,"input",13),P("click",function(){let i=I(o).dismiss;return T(i());})("key.enter",function(){let i=I(o).dismiss;return T(i());}),s(),d(14,"input",14),P("click",function(){let i=I(o).close;return T(i());}),s()()();}if(n&2){let o=m();l(2),R(o.getModalTitle()),l(3),u("formGroup",o.form),l(3),F(o.ownershipChanges.length),k(8),l(),u("items",o.videoChannels),l(),C(o.formErrors.channel?10:-1);}}var Uo=(()=>{let t=class t extends Mt{formReactiveService=_(Qe);changeOwnershipService=_(ci);notifier=_(L);authService=_(D);modalService=_(yt);accepted=ni();modal=G("modal");ownershipChanges=[];videoChannels;error=null;ngOnInit(){this.videoChannels=[],Ze(this.authService,{includeCollaborations:!1}).subscribe(e=>this.videoChannels=e),this.buildForm({channel:To});}show(e){this.form.patchValue({channel:this.videoChannels[0].id}),this.ownershipChanges=e,this.modalService.open(this.modal(),{centered:!0}).result.then(()=>this.acceptOwnership()).catch(()=>{this.ownershipChanges=[];});}acceptOwnership(){let e=this.form.value.channel;this.changeOwnershipService.acceptVideo(this.ownershipChanges.map(i=>i.id),{channelId:e}).subscribe({next:()=>{let i=this.ownershipChanges.length,r=me("{count, plural, =1 {Video {videoName} accepted} other {{count} videos accepted}}",{count:i,videoName:this.ownershipChanges[0].video.name});this.notifier.success(r),this.accepted&&this.accepted.emit();},error:i=>this.notifier.handleError(i)});}getModalTitle(){let e=this.ownershipChanges.length;return me("{count, plural, =1 {Accept video} other {Accept {count} videos}}",{count:e});}};h(t,"\u0275fac",(()=>{let e;return function(r){return(e||(e=ke(t)))(r||t);};})()),h(t,"\u0275cmp",M({type:t,selectors:[["my-accept-change-video-ownership"]],viewQuery:function(i,r){i&1&&J(r.modal,Ca,5),i&2&&X();},outputs:{accepted:"accepted"},features:[Le],decls:2,vars:0,consts:()=>{let e;e="\u5173\u95ED\u6B64\u6A21\u5F0F";let i;i="\u53D6\u6D88";let r;r="\u63A5\u53D7";let a;return a="{VAR_PLURAL, plural, =1 {Select a channel to receive the video} other {Select a channel to receive the videos}}",a=ee(a,{VAR_PLURAL:"\uFFFD0\uFFFD"}),[["modal",""],a,[1,"modal-header"],[1,"modal-title"],["title",e,1,"border-0","p-0",3,"click"],["iconName","cross"],[1,"modal-body",3,"formGroup"],[1,"form-group"],["for","channel"],["inputId","channel","formControlName","channel",1,"d-block",3,"items"],["role","alert",1,"form-error"],[1,"modal-footer","inputs"],[1,"inputs"],["type","button","role","button","value",i,1,"peertube-button","secondary-button",3,"click","key.enter"],["type","submit","value",r,1,"peertube-button","primary-button",3,"click"]];},template:function(i,r){i&1&&Q(0,ya,15,5,"ng-template",null,0,N);},dependencies:[he,U,j,Ge,je,We,Xe,nt],styles:[`.peertube-select-container[_ngcontent-%COMP%]{width:350px}@media screen and (max-width:380px){.peertube-select-container[_ngcontent-%COMP%]{width:100%}}
/*# sourceMappingURL=accept-change-video-ownership.component-OTQODHX6.css.map */`]}));let n=t;return n;})();var va=["acceptChangeVideoOwnershipComponent"],Ea=["table"];function Ma(n,t){if(n&1&&(B(0),g(1,6),W(2,"myNumberFormatter"),z()),n&2){let o=t.$implicit;l(2),F(o)(le(2,2,o)),k(1);}}function Pa(n,t){n&1&&(d(0,"span",11),v(1,"TO YOU"),s());}function Ia(n,t){if(n&1&&S(0,"my-actor-cell",12),n&2){let o=m().$implicit;u("actor",o.nextOwnerAccount)("displayAvatar",!0)("displayUsername",!0);}}function Ta(n,t){if(n&1&&(d(0,"td"),S(1,"my-video-cell",10),s(),d(2,"td"),f(3,Pa,2,0,"span",11)(4,Ia,1,3,"my-actor-cell",12),s(),d(5,"td"),v(6),W(7,"ptDate"),s(),d(8,"td")(9,"span",13),v(10),s()()),n&2){let o=t.$implicit,e=m();l(),u("video",o.video),l(2),C(e.isReceiver(o)?3:4),l(3),R(ve(7,5,o.createdAt,"short")),l(3),u("ngClass",e.getStateClass(o.state.id)),l(),R(o.state.label);}}function Oa(n,t){if(n&1&&S(0,"my-action-dropdown",14),n&2){let o=t.$implicit,e=m();u("actions",e.actions)("entry",o);}}function Ra(n,t){n&1&&(B(0),g(1,7),z());}var Ho=(()=>{let t=class t{notifier=_(L);changeOwnershipService=_(ci);authService=_(D);acceptChangeVideoOwnershipComponent=G("acceptChangeVideoOwnershipComponent");table=G("table");actions=[];bulkActions=[];columns=[{id:"video",label:"\u89C6\u9891",sortable:!1},{id:"targetAccount",label:"Target account",sortable:!1},{id:"createdAt",label:"\u521B\u5EFA\u65F6\u95F4",sortable:!0},{id:"status",label:"\u72B6\u6001",sortable:!1}];dataLoader;constructor(){this.dataLoader=this._dataLoader.bind(this);let{simpleActions:e,bulkActions:i}=ro([[{label:()=>"Manage video",linkBuilder:r=>[Yt.buildManageUrl(r.video)],isDisplayed:r=>this.isReceiver(r)&&r.state.id===St.ACCEPTED||this.isInitiator(r)&&r.state.id!==St.ACCEPTED,enableBulk:!1}],[{label:()=>"Accept...",handler:r=>this.openAcceptModal(r),isDisplayed:r=>this.canAcceptOrReject(r),enableBulk:!0},{label:()=>"\u62D2\u7EDD",handler:r=>this.reject(r),isDisplayed:r=>this.canAcceptOrReject(r),enableBulk:!0}]]);this.actions=e,this.bulkActions=i;}canAcceptOrReject(e){return this.isReceiver(e)&&e.state.id===St.PENDING;}isReceiver(e){return e.nextOwnerAccount.id===this.authService.getUser().account.id;}isInitiator(e){return e.initiatorAccount.id===this.authService.getUser().account.id;}getStateClass(e){switch(e){case St.ACCEPTED:return"badge-green";case St.REJECTED:return"badge-red";default:return"badge-yellow";}}openAcceptModal(e){this.acceptChangeVideoOwnershipComponent().show(e);}accepted(){this.table().loadData();}reject(e){this.changeOwnershipService.rejectVideo(e.map(i=>i.id)).subscribe({next:()=>this.table().loadData(),error:i=>this.notifier.handleError(i)});}_dataLoader(e){return this.changeOwnershipService.listOfVideos(e.pagination,e.sort).pipe(Ce(i=>({data:i.data.map(r=>pe(_e({},r),{initiatorAccount:new Gi(r.initiatorAccount),nextOwnerAccount:new Gi(r.nextOwnerAccount)})),total:i.total})));}};h(t,"\u0275fac",function(i){return new(i||t)();}),h(t,"\u0275cmp",M({type:t,selectors:[["my-video-ownership-changes"]],viewQuery:function(i,r){i&1&&J(r.acceptChangeVideoOwnershipComponent,va,5)(r.table,Ea,5),i&2&&X(2);},decls:12,vars:3,consts:()=>{let e;e="\u6BCF\u4E00\u9875\u9879\u76EE";let i;i="{VAR_PLURAL, plural, =0 {No video ownership change} =1 {1 video ownership change} other {{INTERPOLATION} video ownership changes}}",i=ee(i,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let r;r="\u64CD\u4F5C";let a;return a="\u672A\u627E\u5230\u6240\u6709\u6743\u66F4\u6539\u8BF7\u6C42\u3002",[["table",""],["totalTitle",""],["tableCells",""],["actionCell",""],["noResults",""],["acceptChangeVideoOwnershipComponent",""],i,a,["key","MyOwnershipChangesComponent","paginatorText",e,"columnConfig","false",3,"defaultColumns","dataLoader","bulkActions"],[3,"accepted"],["size","small",3,"video"],[1,"pt-badge","badge-primary"],["actorType","account","target","_blank",3,"actor","displayAvatar","displayUsername"],[1,"pt-badge",3,"ngClass"],["placement","bottom-right top-right left auto","container","body","label",r,3,"actions","entry"]];},template:function(i,r){i&1&&(d(0,"my-table",8,0),Q(2,Ma,3,4,"ng-template",null,1,N)(4,Ta,11,8,"ng-template",null,2,N)(6,Oa,1,2,"ng-template",null,3,N)(8,Ra,2,0,"ng-template",null,4,N),s(),d(10,"my-accept-change-video-ownership",9,5),P("accepted",function(){return r.accepted();}),s()),i&2&&u("defaultColumns",r.columns)("dataLoader",r.dataLoader)("bulkActions",r.bulkActions);},dependencies:[de,te,Uo,Pi,be,it,Ot,Re,Oe],encapsulation:2}));let n=t;return n;})();var Go=(()=>{let t=class t{};h(t,"\u0275fac",function(i){return new(i||t)();}),h(t,"\u0275cmp",M({type:t,selectors:[["ng-component"]],decls:1,vars:0,template:function(i,r){i&1&&S(0,"my-video-ownership-changes");},dependencies:[Ho],encapsulation:2}));let n=t;return n;})();var ba=["table"];function Aa(n,t){n&1&&(d(0,"div")(1,"p",11),g(2,6),s()());}function La(n,t){if(n&1&&(B(0),g(1,7),W(2,"myNumberFormatter"),z()),n&2){let o=t.$implicit;l(2),F(o)(le(2,2,o)),k(1);}}function Na(n,t){if(n&1&&(d(0,"a",12),S(1,"my-global-icon",13),B(2),g(3,8),z(),s()),n&2){let o=m();u("routerLink",Be(o.getSyncCreateLink()));}}function Da(n,t){if(n&1&&(d(0,"td")(1,"a",14),v(2),s()(),d(3,"td"),S(4,"my-actor-cell",15),s(),d(5,"td")(6,"span",16),v(7),s()(),d(8,"td"),v(9),W(10,"ptDate"),s(),d(11,"td"),v(12),W(13,"ptDate"),s()),n&2){let o=t.$implicit,e=m();l(),u("href",o.externalChannelUrl,ct),l(),R(o.externalChannelUrl),l(2),u("actor",o.channel),l(2),u("ngClass",e.getSyncStateClass(o.state.id)),l(),x(" ",o.state.label," "),l(2),R(ve(10,7,o.createdAt,"short")),l(3),R(ve(13,10,o.lastSyncAt,"short"));}}function wa(n,t){if(n&1&&S(0,"my-action-dropdown",17),n&2){let o=t.$implicit,e=m();u("actions",e.videoChannelSyncActions)("entry",o);}}function xa(n,t){n&1&&(B(0),g(1,9),z());}var Xo=(()=>{let t=class t{videoChannelsSyncService=_(Ti);serverService=_(ce);notifier=_(L);authService=_(D);videoChannelService=_(_i);table=G("table");videoChannelSyncActions=[];serverConfig;columns=[{id:"externalChannelUrl",label:"\u5916\u90E8\u9891\u9053",sortable:!0},{id:"videoChannel",label:"\u9891\u9053",sortable:!0},{id:"state",label:"\u72B6\u6001",sortable:!0},{id:"createdAt",label:"\u521B\u5EFA\u65F6\u95F4",sortable:!0},{id:"lastSyncAt",label:"\u4E0A\u6B21\u540C\u6B65\u65F6\u95F4",sortable:!0}];dataLoader;get user(){return this.authService.getUser();}constructor(){this.dataLoader=this._dataLoader.bind(this);}ngOnInit(){this.serverConfig=this.serverService.getHTMLConfig(),this.videoChannelSyncActions=[[{label:"\u5217\u51FA\u5BFC\u5165",linkBuilder:()=>["/my-library/video-imports"],queryParamsBuilder:e=>({videoChannelSyncId:e.id}),iconName:"cloud-download"}],[{label:"\u5220\u9664",iconName:"delete",handler:e=>this.deleteSync(e)},{label:"\u5B8C\u6574\u540C\u6B65\u9891\u9053",description:"\u8FD9\u4F1A\u63D0\u53D6\u672C\u5730\u9891\u9053\u4E0A\u7F3A\u5931\u7684\u4EFB\u4F55\u89C6\u9891",iconName:"refresh",handler:e=>this.fullySynchronize(e)}]];}_dataLoader(e){return this.authService.userInformationLoaded.pipe(Xt(),Ut(()=>this.videoChannelsSyncService.listByAccount({sort:e.sort,pagination:e.pagination,includeCollaborations:!0,account:this.authService.getUser().account})));}syncEnabled(){return this.serverConfig.import.videoChannelSynchronization.enabled;}deleteSync(e){this.videoChannelsSyncService.delete(e.id).subscribe({next:()=>{this.notifier.success("\u5DF2\u6210\u529F\u79FB\u9664 "+e.channel.displayName+" \u7684\u540C\u6B65\u3002"),this.table().loadData();},error:i=>this.notifier.handleError(i)});}fullySynchronize(e){this.videoChannelService.importVideos(e.channel.name,e.externalChannelUrl,e.id).subscribe({next:()=>{this.notifier.success(""+e.channel.displayName+" \u7684\u5B8C\u6574\u540C\u6B65\u5DF2\u8BF7\u6C42\u6210\u529F\u3002");},error:i=>this.notifier.handleError(i)});}getSyncCreateLink(){return"/my-library/video-channel-syncs/create";}getSyncStateClass(e){return co(e);}getChannelUrl(e){return"/c/"+e;}};h(t,"\u0275fac",function(i){return new(i||t)();}),h(t,"\u0275cmp",M({type:t,selectors:[["ng-component"]],viewQuery:function(i,r){i&1&&J(r.table,ba,5),i&2&&X();},decls:13,vars:3,consts:()=>{let e;e="\u6BCF\u4E00\u9875\u540C\u6B65";let i;i="\u26A0\uFE0F \u5B9E\u4F8B\u4E0D\u5141\u8BB8\u9891\u9053\u540C\u6B65";let r;r="{VAR_PLURAL, plural, =0 {\u65E0\u540C\u6B65} =1 {1\u4E2A\u540C\u6B65} other {{INTERPOLATION} \u4E2A\u540C\u6B65}}",r=ee(r,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let a;a="\u6DFB\u52A0\u540C\u6B65";let c;return c="\u60A8\u6CA1\u6709\u914D\u7F6E\u9891\u9053\u540C\u6B65\u3002",[["table",""],["totalTitle",""],["captionRight",""],["tableCells",""],["actionCell",""],["noResults",""],i,r,a,c,["key","MyVideoChannelsSyncComponent","paginatorText",e,"columnConfig","false",3,"defaultColumns","dataLoader"],[1,"muted"],[1,"peertube-create-button",3,"routerLink"],["iconName","add","aria-hidden","true"],["target","_blank","rel","noopener noreferrer",3,"href"],["actorType","channel",3,"actor"],[3,"ngClass"],["container","body",3,"actions","entry"]];},template:function(i,r){i&1&&(f(0,Aa,3,0,"div"),d(1,"my-table",10,0),Q(3,La,3,4,"ng-template",null,1,N)(5,Na,4,2,"ng-template",null,2,N)(7,Da,14,13,"ng-template",null,3,N)(9,wa,1,2,"ng-template",null,4,N)(11,xa,2,0,"ng-template",null,5,N),s()),i&2&&(C(r.syncEnabled()?-1:0),l(),u("defaultColumns",r.columns)("dataLoader",r.dataLoader));},dependencies:[de,te,he,ie,it,be,Ot,Re,Oe],encapsulation:2}));let n=t;return n;})();var Ya=n=>({"input-error":n});function Va(n,t){if(n&1&&(d(0,"my-alert",6),v(1),s()),n&2){let o=m();l(),R(o.error);}}function $a(n,t){if(n&1&&(d(0,"div",15),v(1),s()),n&2){let o=m();l(),R(o.formErrors.externalChannelUrl);}}function Fa(n,t){if(n&1&&(d(0,"div",15),v(1),s()),n&2){let o=m();l(),R(o.formErrors.videoChannel);}}var Wo=(()=>{let t=class t extends Mt{formReactiveService=_(Qe);authService=_(D);router=_(Ue);notifier=_(L);videoChannelSyncService=_(Ti);videoChannelService=_(_i);error;userVideoChannels=[];existingVideosStrategy;ngOnInit(){this.buildForm({externalChannelUrl:Oo,videoChannel:ji,existingVideoStrategy:ji}),Ze(this.authService,{includeCollaborations:!0}).subscribe(e=>this.userVideoChannels=e);}getFormButtonTitle(){return"\u521B\u5EFA";}formValidated(){this.error=void 0;let e=this.form.value,i={externalChannelUrl:e.externalChannelUrl,videoChannelId:e.videoChannel},r=e.existingVideoStrategy==="import";this.videoChannelSyncService.create(i).pipe(Ut(({videoChannelSync:a})=>r?this.videoChannelService.importVideos(a.channel.name,a.externalChannelUrl,a.id):Promise.resolve(null))).subscribe({next:()=>{this.notifier.success("\u5DF2\u6210\u529F\u5EFA\u7ACB\u540C\u6B65\u3002"),this.router.navigate(["/my-library","video-channel-syncs"]);},error:a=>{this.error=a.message;}});}};h(t,"\u0275fac",(()=>{let e;return function(r){return(e||(e=ke(t)))(r||t);};})()),h(t,"\u0275cmp",M({type:t,selectors:[["my-video-channel-sync-edit"]],features:[Le],decls:30,vars:11,consts:()=>{let e;e="\u793A\u4F8B\uFF1Ahttps://youtube.com/channel/UC_fancy_channel";let i;i="\u65B0\u589E\u540C\u6B65";let r;r="\u8FDC\u7A0B\u9891\u9053 URL";let a;a="\u89C6\u9891\u9891\u9053";let c;c="\u8FDC\u7A0B\u9891\u9053\u5DF2\u6709\u89C6\u9891\u7684\u9009\u9879\uFF1A";let p;p="\u5168\u90E8\u5BFC\u5165\u5E76\u76D1\u89C6\u65B0\u7684\u53D1\u5E03";let y;return y="\u4EC5\u76D1\u89C6\u65B0\u7684\u53D1\u5E03",[i,r,a,c,p,y,["type","danger"],[1,"pt-two-cols"],[1,"title-col"],[1,"content-col"],[3,"ngSubmit","formGroup"],[1,"form-group"],["for","externalChannelUrl"],[1,"input-group"],["type","text","id","externalChannelUrl","placeholder",e,"formControlName","externalChannelUrl",1,"form-control",3,"ngClass"],["role","alert",1,"form-error"],["for","videoChannel"],["inputId","videoChannel","formControlName","videoChannel",3,"items"],["role","radiogroup",1,"form-group"],["for","existingVideoStrategy"],[1,"peertube-radio-container"],["type","radio","name","existingVideoStrategy","id","import","value","import","formControlName","existingVideoStrategy"],["for","import"],["type","radio","name","existingVideoStrategy","id","doNothing","value","nothing","formControlName","existingVideoStrategy"],["for","doNothing"],["type","submit",1,"peertube-button","primary-button",3,"value","disabled"]];},template:function(i,r){i&1&&(f(0,Va,2,1,"my-alert",6),d(1,"div",7)(2,"div",8)(3,"h2"),g(4,0),s()(),d(5,"div",9)(6,"form",10),P("ngSubmit",function(){return r.formValidated();}),d(7,"div",11)(8,"label",12),g(9,1),s(),d(10,"div",13),S(11,"input",14),s(),f(12,$a,2,1,"div",15),s(),d(13,"div",11)(14,"label",16),g(15,2),s(),S(16,"my-select-channel",17),f(17,Fa,2,1,"div",15),s(),d(18,"div",18)(19,"label",19),g(20,3),s(),d(21,"div",20),S(22,"input",21),d(23,"label",22),g(24,4),s()(),d(25,"div",20),S(26,"input",23),d(27,"label",24),g(28,5),s()()(),S(29,"input",25),s()()()),i&2&&(C(r.error?0:-1),l(6),u("formGroup",r.form),l(5),u("ngClass",$(9,Ya,r.formErrors.externalChannelUrl)),l(),C(r.formErrors.externalChannelUrl?12:-1),l(4),u("items",r.userVideoChannels),l(),C(r.formErrors.videoChannel?17:-1),l(12),u("value",Be(r.getFormButtonTitle()))("disabled",!r.form.valid));},dependencies:[U,Ct,He,An,j,Ge,je,We,Xe,te,nt,vt],styles:[`input[type=text][_ngcontent-%COMP%]{font-size:16px;padding:var(--input-y-padding) var(--input-x-padding);width:480px;max-width:480px;color:var(--input-fg);background-color:var(--input-bg);border:var(--input-border-width) solid var(--input-border-color);border-radius:var(--input-border-radius);line-height:24px}input[type=text][_ngcontent-%COMP%]::placeholder{color:var(--input-placeholder-color);font-size:var(--input-placeholder-font-size)}input[type=text][readonly][_ngcontent-%COMP%]{color:var(--fg-300)}input[type=text][_ngcontent-%COMP%]:focus, input[type=text][_ngcontent-%COMP%]:focus-visible{box-shadow:0 0 0 .2rem var(--fg-100);outline:0}input[type=text][disabled][_ngcontent-%COMP%]{color:var(--fg-300);opacity:.8}@media screen and (max-width:520px){input[type=text][_ngcontent-%COMP%]{width:100%}}my-select-channel[_ngcontent-%COMP%]{display:block;max-width:480px}
/*# sourceMappingURL=video-channel-sync-edit.component-JK72EISF.css.map */`]}));let n=t;return n;})();var ka=["table"];function Ba(n,t){if(n&1&&(B(0),g(1,6),W(2,"myNumberFormatter"),z()),n&2){let o=t.$implicit;l(2),F(o)(le(2,2,o)),k(1);}}function za(n,t){if(n&1&&(d(0,"a",11),v(1),s()),n&2){let o=m().$implicit;u("href",o.targetUrl,ct)("title",o.targetUrl),l(),R(o.targetUrl);}}function Ua(n,t){if(n&1&&(d(0,"span",12),v(1),s()),n&2){let o=m().$implicit;u("title",o.torrentName||o.magnetUri),l(),R(o.torrentName||o.magnetUri);}}function Ha(n,t){if(n&1&&S(0,"my-actor-cell",13),n&2){let o=m().$implicit;u("actor",o.video.channel);}}function Ga(n,t){if(n&1&&v(0),n&2){let o=m().$implicit;x(" ",o.video==null?null:o.video.name," ");}}function Xa(n,t){if(n&1&&(d(0,"a",15),v(1),s()),n&2){let o=m(2).$implicit,e=m();u("href",e.getVideoUrl(o.video),ct),l(),R(o.video==null?null:o.video.name);}}function Wa(n,t){n&1&&(B(0),g(1,7),z());}function ja(n,t){if(n&1&&f(0,Xa,2,2,"a",15)(1,Wa,2,0,"ng-container"),n&2){let o=m().$implicit;C(o.video?0:1);}}function Qa(n,t){if(n&1&&(d(0,"td",10),f(1,za,2,3,"a",11)(2,Ua,2,2,"span",12),s(),d(3,"td"),f(4,Ha,1,1,"my-actor-cell",13),s(),d(5,"td"),f(6,Ga,1,1)(7,ja,2,1),s(),d(8,"td")(9,"span",14),v(10),s()(),d(11,"td"),v(12),W(13,"ptDate"),s()),n&2){let o=t.$implicit,e=m();l(),C(o.targetUrl?1:2),l(3),C(o.video!=null&&o.video.channel?4:-1),l(2),C(e.isVideoImportPending(o)?6:e.isVideoImportSuccess(o)?7:-1),l(3),u("ngClass",e.getVideoImportStateClass(o.state.id)),l(),x(" ",o.state.label," "),l(2),R(ve(13,6,o.createdAt,"short"));}}function Za(n,t){if(n&1&&S(0,"my-action-dropdown",16),n&2){let o=t.$implicit,e=m();u("actions",e.videoImportActions)("entry",o);}}function qa(n,t){if(n&1&&(d(0,"pre"),v(1),s()),n&2){let o=t.$implicit;l(),R(o.error);}}function Ka(n,t){n&1&&(B(0),g(1,8),z());}var jo=(()=>{let t=class t{notifier=_(L);videoImportService=_(Ro);table=G("table");inputFilters=[{key:"targetUrl",type:"text",title:"Target URL",placeholder:"https://example.com/.../video.mp4"},{key:"id",type:"text",title:"Import ID",constraint:"numeric"},{key:"videoId",type:"text",title:"Video ID",constraint:"numeric"},{key:"videoChannelSyncId",type:"text",title:"Channel sync ID",constraint:"numeric"}];videoImportActions=[];columns=[{id:"target",label:"\u76EE\u6807",sortable:!1},{id:"channel",label:"\u9891\u9053",sortable:!1},{id:"video",label:"\u89C6\u9891",sortable:!1},{id:"state",label:"\u72B6\u6001",sortable:!1},{id:"createdAt",label:"\u521B\u5EFA\u65F6\u95F4",sortable:!0}];dataLoader;hasExpandedRow;constructor(){this.dataLoader=this._dataLoader.bind(this),this.hasExpandedRow=this._hasExpandedRow.bind(this);}ngOnInit(){this.videoImportActions=[{label:"\u53D6\u6D88\u5BFC\u5165",iconName:"no",handler:e=>this.cancelImport(e),isDisplayed:e=>this.isVideoImportPending(e)},{label:"\u91CD\u8BD5\u5BFC\u5165",iconName:"refresh",handler:e=>this.retryImport(e),isDisplayed:e=>this.isVideoImportFailed(e)},{label:"\u5220\u9664\u5BFC\u5165\u4EFB\u52A1",description:"\u5173\u8054\u7684\u89C6\u9891\u672A\u88AB\u5220\u9664",iconName:"delete",handler:e=>this.deleteImport(e),isDisplayed:e=>this.isVideoImportFailed(e)||this.isVideoImportCancelled(e)||!e.video},{label:"\u7F16\u8F91\u89C6\u9891",iconName:"edit",linkBuilder:e=>[this.getEditVideoUrl(e.video)],isDisplayed:e=>this.isVideoImportSuccess(e)&&!!e.video}];}getVideoImportStateClass(e){switch(e){case Ne.FAILED:return"badge-red";case Ne.REJECTED:return"badge-banned";case Ne.PENDING:return"badge-yellow";case Ne.PROCESSING:return"badge-blue";default:return"badge-green";}}isVideoImportSuccess(e){return e.state.id===Ne.SUCCESS;}isVideoImportPending(e){return e.state.id===Ne.PENDING;}isVideoImportFailed(e){return e.state.id===Ne.FAILED;}isVideoImportCancelled(e){return e.state.id===Ne.CANCELLED;}getVideoUrl(e){return Yt.buildWatchUrl(e);}getEditVideoUrl(e){return Yt.buildManageUrl(e);}deleteImport(e){this.videoImportService.deleteVideoImport(e).subscribe({next:()=>this.table().loadData(),error:i=>this.notifier.handleError(i)});}cancelImport(e){this.videoImportService.cancelVideoImport(e).subscribe({next:()=>this.table().loadData(),error:i=>this.notifier.handleError(i)});}retryImport(e){this.videoImportService.retryVideoImport(e).subscribe({next:()=>this.table().loadData(),error:i=>this.notifier.handleError(i)});}_dataLoader(e){return this.videoImportService.listMyVideoImports(pe(_e({},e),{includeCollaborations:!0}));}_hasExpandedRow(e){return!!e.error;}};h(t,"\u0275fac",function(i){return new(i||t)();}),h(t,"\u0275cmp",M({type:t,selectors:[["ng-component"]],viewQuery:function(i,r){i&1&&J(r.table,ka,5),i&2&&X();},decls:12,vars:4,consts:()=>{let e;e="\u6BCF\u4E00\u9875\u5BFC\u5165";let i;i="{VAR_PLURAL, plural, =0 {\u65E0\u5BFC\u5165} =1 {1 \u4E2A\u5BFC\u5165} other {{INTERPOLATION} \u4E2A\u5BFC\u5165}}",i=ee(i,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let r;r="\u6B64\u89C6\u9891\u5DF2\u88AB\u5220\u9664";let a;a="\u64CD\u4F5C";let c;return c="\u6CA1\u627E\u5230\u89C6\u9891\u5BFC\u5165\u3002",[["table",""],["totalTitle",""],["tableCells",""],["actionCell",""],["expandedRow",""],["noResults",""],i,r,c,["key","MyVideoImportsComponent","paginatorText",e,"columnConfig","false","searchInput","true","refreshButton","true",3,"defaultColumns","dataLoader","inputFilters","hasExpandedRow"],[1,"max-width-300px","ellipsis"],["target","_blank","rel","noopener noreferrer",3,"href","title"],[3,"title"],["actorType","channel",3,"actor"],[1,"pt-badge",3,"ngClass"],["target","_blank","rel","noopener noreferrer",3,"href"],["label",a,"container","body",3,"actions","entry"]];},template:function(i,r){i&1&&(d(0,"my-table",9,0),Q(2,Ba,3,4,"ng-template",null,1,N)(4,Qa,14,9,"ng-template",null,2,N)(6,Za,1,2,"ng-template",null,3,N)(8,qa,2,1,"ng-template",null,4,N)(10,Ka,2,0,"ng-template",null,5,N),s()),i&2&&u("defaultColumns",r.columns)("dataLoader",r.dataLoader)("inputFilters",r.inputFilters)("hasExpandedRow",r.hasExpandedRow);},dependencies:[de,te,be,Ot,it,Re,Oe],styles:[`pre[_ngcontent-%COMP%]{font-size:11px}.video-import-error[_ngcontent-%COMP%]{color:var(--red)}
/*# sourceMappingURL=my-video-imports.component-TZLTH2W6.css.map */`]}));let n=t;return n;})();var bt=class extends Mt{videoPlaylistToUpdate;userVideoChannels=[];videoPlaylistPrivacies=[];};var Ja=n=>({"input-error":n}),es=n=>["/my-library/video-playlists/update",n];function ts(n,t){if(n&1&&(d(0,"my-alert",14),v(1),s()),n&2){let o=m();l(),R(o.error);}}function is(n,t){n&1&&(d(0,"li",21),g(1,6),s());}function ns(n,t){if(n&1&&(d(0,"a",41),v(1),s()),n&2){let o=m(2);u("routerLink",$(2,es,o.videoPlaylistToUpdate==null?null:o.videoPlaylistToUpdate.shortUUID)),l(),x(" ",o.videoPlaylistToUpdate==null?null:o.videoPlaylistToUpdate.displayName," ");}}function os(n,t){if(n&1&&(d(0,"li",21),g(1,7),s(),d(2,"li",40),f(3,ns,2,4,"a",41),s()),n&2){let o=m();l(3),C(o.videoPlaylistToUpdate?3:-1);}}function rs(n,t){n&1&&(d(0,"h2",22),g(1,8),s());}function as(n,t){n&1&&(d(0,"h2",22),g(1,9),s());}function ss(n,t){if(n&1&&(d(0,"div",30),v(1),s()),n&2){let o=m();l(),x(" ",o.formErrors.displayName," ");}}function ls(n,t){if(n&1&&(d(0,"div",30),v(1),s()),n&2){let o=m();l(),R(o.formErrors.privacy);}}function ds(n,t){if(n&1&&(d(0,"div",37)(1,"div"),g(2,10),s(),d(3,"div"),g(4,11),s()()),n&2){let o=m();l(2),F(o.getOwnerAccountDisplayName()),k(2);}}function cs(n,t){if(n&1&&(d(0,"div",30),v(1),s()),n&2){let o=m();l(),R(o.formErrors.videoChannelId);}}function _s(n,t){n&1&&(d(0,"div",25)(1,"my-peertube-checkbox",42),B(2,43),d(3,"span"),g(4,12),s(),S(5,"br"),d(6,"span"),g(7,13),s(),z(),s()());}var Qo=(()=>{let t=class t extends bt{formReactiveService=_(Qe);authService=_(D);notifier=_(L);router=_(Ue);videoPlaylistService=_(ge);serverService=_(ce);error;ngOnInit(){this.buildForm({displayName:Ci,privacy:Si,description:yi,videoChannelId:vi,insertAtFirstPosition:null,thumbnailfile:null}),this.form.get("privacy").valueChanges.subscribe(e=>{Ei(this.form.get("videoChannelId"),e);}),Ze(this.authService,{includeCollaborations:!0}).subscribe(e=>this.userVideoChannels=e),this.serverService.getVideoPlaylistPrivacies().subscribe(e=>{this.videoPlaylistPrivacies=e,this.form.patchValue({privacy:Ln.PRIVATE});});}formValidated(){this.error=void 0;let e=this.form.value,i={displayName:e.displayName,privacy:e.privacy,description:e.description||null,videoChannelId:e.videoChannelId||null,thumbnailfile:e.thumbnailfile||null};this.videoPlaylistService.createVideoPlaylist(i).pipe(Me(({videoPlaylist:{id:r}})=>{if(e.insertAtFirstPosition!==!0||!e.videoChannelId)return lt(!0);let a=this.userVideoChannels.find(c=>c.id===e.videoChannelId)?.name;return this.videoPlaylistService.getVideoPlaylist(r).pipe(Me(c=>this.videoPlaylistService.reorderPlaylistsOfChannel(a,c.videoChannelPosition,0)));})).subscribe({next:()=>{this.notifier.success("\u64AD\u653E\u5217\u8868 "+i.displayName+" \u5DF2\u521B\u5EFA\u3002"),this.router.navigate(["/my-library","video-playlists"]);},error:r=>{this.error=r.message;}});}isCreation(){return!0;}isEditor(){return!1;}getOwnerAccountDisplayName(){return this.authService.getUser().account.displayName;}getFormButtonTitle(){return"\u521B\u5EFA";}};h(t,"\u0275fac",(()=>{let e;return function(r){return(e||(e=ke(t)))(r||t);};})()),h(t,"\u0275cmp",M({type:t,selectors:[["ng-component"]],features:[Le],decls:41,vars:18,consts:()=>{let e;e="\u7F16\u8F91";let i;i="\u6211\u7684\u64AD\u653E\u5217\u8868";let r;r="\u64AD\u653E\u5217\u8868\u7F29\u7565\u56FE";let a;a="\u663E\u793A\u540D\u79F0";let c;c="\u8BF4\u660E";let p;p="\u9690\u79C1";let y;y="\u9891\u9053";let E;E="\u521B\u5EFA";let O;O="\u7F16\u8F91";let w;w="\u65B0\u5EFA\u64AD\u653E\u5217\u8868";let Ae;Ae="\u66F4\u65B0\u64AD\u653E\u5217\u8868";let ot;ot="\u4EC5\u5217\u51FA "+"\uFFFD0\uFFFD"+" \u62E5\u6709\u7684\u9891\u9053\u3002 ";let rt;rt="\u4E0D\u652F\u6301\u66F4\u6539\u64AD\u653E\u5217\u8868\u7684\u6240\u6709\u8005\u3002";let Z;Z="\u5C06\u5176\u63D2\u5165\u5230\u9891\u9053\u64AD\u653E\u5217\u8868\u5217\u8868\u7684\u9996\u4F4D";let at;at="\u60A8\u53EF\u4EE5\u624B\u52A8\u5BF9\u9891\u9053\u4E2D\u7684\u64AD\u653E\u5217\u8868\u8FDB\u884C\u6392\u5E8F\u3002";let xe;return xe="\u9ED8\u8BA4\u60C5\u51B5\u4E0B\uFF0C\u65B0\u6DFB\u52A0\u7684\u64AD\u653E\u5217\u8868\u4F1A\u6DFB\u52A0\u5230\u5217\u8868\u672B\u5C3E\u3002",[i,r,a,c,p,y,E,O,w,Ae,ot,rt,at,xe,["type","danger"],[1,"pt-two-cols"],[1,"title-col"],["aria-label","breadcrumb"],[1,"pt-breadcrumb"],[1,"breadcrumb-item"],["routerLink","/my-library/video-playlists"],[1,"breadcrumb-item","active"],[1,"visually-hidden"],[1,"content-col"],[3,"ngSubmit","formGroup"],[1,"form-group"],["for","thumbnailfile"],["inputLabel",e,"inputName","thumbnailfile","formControlName","thumbnailfile"],["for","displayName"],["type","text","id","displayName","formControlName","displayName",1,"form-control",3,"ngClass"],["role","alert",1,"form-error"],["for","description"],["helpType","markdownText"],["inputId","description","formControlName","description",3,"formError"],["for","privacy"],["inputId","privacy","formControlName","privacy",3,"items"],["for","videoChannelId"],[1,"form-group-description"],["inputId","videoChannelId","formControlName","videoChannelId",3,"items"],["type","submit",1,"peertube-button","primary-button",3,"value","disabled"],["aria-current","page",1,"breadcrumb-item","active"],[3,"routerLink"],["inputName","insertAtFirstPosition","formControlName","insertAtFirstPosition","labelText",Z],["ngProjectAs","description",5,["description"]]];},template:function(i,r){i&1&&(f(0,ts,2,1,"my-alert",14),d(1,"div",15)(2,"div",16)(3,"nav",17)(4,"ol",18)(5,"li",19)(6,"a",20),g(7,0),s()(),f(8,is,2,0,"li",21)(9,os,4,1),s()(),f(10,rs,2,0,"h2",22)(11,as,2,0,"h2",22),s(),d(12,"div",23)(13,"form",24),P("ngSubmit",function(){return r.formValidated();}),d(14,"div",25)(15,"label",26),g(16,1),s(),S(17,"my-image-input",27),s(),d(18,"div",25)(19,"label",28),g(20,2),s(),S(21,"input",29),f(22,ss,2,1,"div",30),s(),d(23,"div",25)(24,"label",31),g(25,3),s(),S(26,"my-help",32)(27,"my-markdown-textarea",33),s(),d(28,"div",25)(29,"label",34),g(30,4),s(),S(31,"my-select-options",35),f(32,ls,2,1,"div",30),s(),d(33,"div",25)(34,"label",36),g(35,5),s(),f(36,ds,5,1,"div",37),S(37,"my-select-channel",38),f(38,cs,2,1,"div",30),s(),f(39,_s,8,0,"div",25),S(40,"input",39),s()()()),i&2&&(C(r.error?0:-1),l(8),C(r.isCreation()?8:9),l(2),C(r.isCreation()?10:11),l(3),u("formGroup",r.form),l(8),u("ngClass",$(16,Ja,r.formErrors.displayName)),l(),C(r.formErrors.displayName?22:-1),l(5),u("formError",r.formErrors.description),l(4),u("items",r.videoPlaylistPrivacies),l(),C(r.formErrors.privacy?32:-1),l(4),C(r.isEditor()?36:-1),l(),u("items",r.userVideoChannels),l(),C(r.formErrors.videoChannelId?38:-1),l(),C(r.isCreation()&&r.form.value.videoChannelId?39:-1),l(),u("value",Be(r.getFormButtonTitle()))("disabled",!r.form.valid));},dependencies:[de,te,ie,U,Ct,He,j,Ge,je,We,Xe,gi,mi,fi,pi,nt,vt,Te],styles:[`input[type=text][_ngcontent-%COMP%]{font-size:16px;padding:var(--input-y-padding) var(--input-x-padding);width:340px;max-width:340px;color:var(--input-fg);background-color:var(--input-bg);border:var(--input-border-width) solid var(--input-border-color);border-radius:var(--input-border-radius);line-height:24px}input[type=text][_ngcontent-%COMP%]::placeholder{color:var(--input-placeholder-color);font-size:var(--input-placeholder-font-size)}input[type=text][readonly][_ngcontent-%COMP%]{color:var(--fg-300)}input[type=text][_ngcontent-%COMP%]:focus, input[type=text][_ngcontent-%COMP%]:focus-visible{box-shadow:0 0 0 .2rem var(--fg-100);outline:0}input[type=text][disabled][_ngcontent-%COMP%]{color:var(--fg-300);opacity:.8}@media screen and (max-width:380px){input[type=text][_ngcontent-%COMP%]{width:100%}}.peertube-select-container[_ngcontent-%COMP%]{width:340px}@media screen and (max-width:370px){.peertube-select-container[_ngcontent-%COMP%]{width:100%}}my-select-channel[_ngcontent-%COMP%], my-select-options[_ngcontent-%COMP%]{display:block;max-width:340px}.content-col[_ngcontent-%COMP%]{max-width:500px}my-image-input[_ngcontent-%COMP%]{width:223px;height:122px}
/*# sourceMappingURL=my-video-playlist-edit.component-4OG4CYRI.css.map */`]}));let n=t;return n;})();var ms=20,Zo=(()=>{let t=class t{_ngZone=_(Fe);_platform=_(Xi);_renderer=_(ut).createRenderer(null,null);_cleanupGlobalListener;constructor(){}_scrolled=new b();_scrolledCount=0;scrollContainers=new Map();register(e){this.scrollContainers.has(e)||this.scrollContainers.set(e,e.elementScrolled().subscribe(()=>this._scrolled.next(e)));}deregister(e){let i=this.scrollContainers.get(e);i&&(i.unsubscribe(),this.scrollContainers.delete(e));}scrolled(e=ms){return this._platform.isBrowser?new Lt(i=>{this._cleanupGlobalListener||(this._cleanupGlobalListener=this._ngZone.runOutsideAngular(()=>this._renderer.listen("document","scroll",()=>this._scrolled.next())));let r=e>0?this._scrolled.pipe(Di(e)).subscribe(i):this._scrolled.subscribe(i);return this._scrolledCount++,()=>{r.unsubscribe(),this._scrolledCount--,this._scrolledCount||(this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0);};}):lt();}ngOnDestroy(){this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0,this.scrollContainers.forEach((e,i)=>this.deregister(i)),this._scrolled.complete();}ancestorScrolled(e,i){let r=this.getAncestorScrollContainers(e);return this.scrolled(i).pipe(gn(a=>!a||r.indexOf(a)>-1));}getAncestorScrollContainers(e){let i=[];return this.scrollContainers.forEach((r,a)=>{this._scrollableContainsElement(a,e)&&i.push(a);}),i;}_scrollableContainsElement(e,i){let r=Ee(i),a=e.getElementRef().nativeElement;do if(r==a)return!0;while(r=r.parentElement);return!1;}};h(t,"\u0275fac",function(i){return new(i||t)();}),h(t,"\u0275prov",$e({token:t,factory:t.ɵfac,providedIn:"root"}));let n=t;return n;})();var us=20,Zi=(()=>{let t=class t{_platform=_(Xi);_listeners;_viewportSize=null;_change=new b();_document=_(mt);constructor(){let e=_(Fe),i=_(ut).createRenderer(null,null);e.runOutsideAngular(()=>{if(this._platform.isBrowser){let r=a=>this._change.next(a);this._listeners=[i.listen("window","resize",r),i.listen("window","orientationchange",r)];}this.change().subscribe(()=>this._viewportSize=null);});}ngOnDestroy(){this._listeners?.forEach(e=>e()),this._change.complete();}getViewportSize(){this._viewportSize||this._updateViewportSize();let e={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),e;}getViewportRect(){let e=this.getViewportScrollPosition(),{width:i,height:r}=this.getViewportSize();return{top:e.top,left:e.left,bottom:e.top+r,right:e.left+i,height:r,width:i};}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};let e=this._document,i=this._getWindow(),r=e.documentElement,a=r.getBoundingClientRect(),c=-a.top||e.body?.scrollTop||i.scrollY||r.scrollTop||0,p=-a.left||e.body?.scrollLeft||i.scrollX||r.scrollLeft||0;return{top:c,left:p};}change(e=us){return e>0?this._change.pipe(Di(e)):this._change;}_getWindow(){return this._document.defaultView||window;}_updateViewportSize(){let e=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:e.innerWidth,height:e.innerHeight}:{width:0,height:0};}};h(t,"\u0275fac",function(i){return new(i||t)();}),h(t,"\u0275prov",$e({token:t,factory:t.ɵfac,providedIn:"root"}));let n=t;return n;})();var qo=(()=>{let t=class t{};h(t,"\u0275fac",function(i){return new(i||t)();}),h(t,"\u0275mod",qt({type:t})),h(t,"\u0275inj",jt({}));let n=t;return n;})();function Ji(n){let t=n.cloneNode(!0),o=t.querySelectorAll("[id]"),e=n.nodeName.toLowerCase();t.removeAttribute("id");for(let i=0;i<o.length;i++)o[i].removeAttribute("id");return e==="canvas"?er(n,t):(e==="input"||e==="select"||e==="textarea")&&Jo(n,t),Ko("canvas",n,t,er),Ko("input, textarea, select",n,t,Jo),t;}function Ko(n,t,o,e){let i=t.querySelectorAll(n);if(i.length){let r=o.querySelectorAll(n);for(let a=0;a<i.length;a++)e(i[a],r[a]);}}var hs=0;function Jo(n,t){t.type!=="file"&&(t.value=n.value),t.type==="radio"&&t.name&&(t.name=`mat-clone-${t.name}-${hs++}`);}function er(n,t){let o=t.getContext("2d");if(o)try{o.drawImage(n,0,0);}catch(e){}}function an(n){let t=n.getBoundingClientRect();return{top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:t.width,height:t.height,x:t.x,y:t.y};}function en(n,t,o){let{top:e,bottom:i,left:r,right:a}=n;return o>=e&&o<=i&&t>=r&&t<=a;}function gs(n,t){let o=t.left<n.left,e=t.left+t.width>n.right,i=t.top<n.top,r=t.top+t.height>n.bottom;return o||e||i||r;}function Bt(n,t,o){n.top+=t,n.bottom=n.top+n.height,n.left+=o,n.right=n.left+n.width;}function tr(n,t,o,e){let{top:i,right:r,bottom:a,left:c,width:p,height:y}=n,E=p*t,O=y*t;return e>i-O&&e<a+O&&o>c-E&&o<r+E;}var Ri=class{_document;positions=new Map();constructor(t){this._document=t;}clear(){this.positions.clear();}cache(t){this.clear(),this.positions.set(this._document,{scrollPosition:this.getViewportScrollPosition()}),t.forEach(o=>{this.positions.set(o,{scrollPosition:{top:o.scrollTop,left:o.scrollLeft},clientRect:an(o)});});}handleScroll(t){let o=$t(t),e=this.positions.get(o);if(!e)return null;let i=e.scrollPosition,r,a;if(o===this._document){let y=this.getViewportScrollPosition();r=y.top,a=y.left;}else r=o.scrollTop,a=o.scrollLeft;let c=i.top-r,p=i.left-a;return this.positions.forEach((y,E)=>{y.clientRect&&o!==E&&o.contains(E)&&Bt(y.clientRect,c,p);}),i.top=r,i.left=a,{top:c,left:p};}getViewportScrollPosition(){return{top:window.scrollY,left:window.scrollX};}};function ur(n,t){let o=n.rootNodes;if(o.length===1&&o[0].nodeType===t.ELEMENT_NODE)return o[0];let e=t.createElement("div");return o.forEach(i=>e.appendChild(i)),e;}function sn(n,t,o){for(let e in t)if(t.hasOwnProperty(e)){let i=t[e];i?n.setProperty(e,i,o?.has(e)?"important":""):n.removeProperty(e);}return n;}function At(n,t){let o=t?"":"none";sn(n.style,{"touch-action":t?"":"none","-webkit-user-drag":t?"":"none","-webkit-tap-highlight-color":t?"":"transparent","user-select":o,"-ms-user-select":o,"-webkit-user-select":o,"-moz-user-select":o});}function ir(n,t,o){sn(n.style,{position:t?"":"fixed",top:t?"":"0",opacity:t?"":"0",left:t?"":"-999em"},o);}function bi(n,t){return t&&t!="none"?n+" "+t:n;}function nr(n,t){n.style.width=`${t.width}px`,n.style.height=`${t.height}px`,n.style.transform=zt(t.left,t.top);}function zt(n,t){return`translate3d(${Math.round(n)}px, ${Math.round(t)}px, 0)`;}var Ft={capture:!0},qi={passive:!1,capture:!0},fs=(()=>{let t=class t{};h(t,"\u0275fac",function(i){return new(i||t)();}),h(t,"\u0275cmp",M({type:t,selectors:[["ng-component"]],hostAttrs:["cdk-drag-resets-container",""],decls:0,vars:0,template:function(i,r){},styles:[`@layer cdk-resets {
  .cdk-drag-preview {
    background: none;
    border: none;
    padding: 0;
    color: inherit;
    inset: auto;
  }
}
.cdk-drag-placeholder *,
.cdk-drag-preview * {
  pointer-events: none !important;
}
`],encapsulation:2,changeDetection:0}));let n=t;return n;})(),ln=(()=>{let t=class t{_ngZone=_(Fe);_document=_(mt);_styleLoader=_(Qn);_renderer=_(ut).createRenderer(null,null);_cleanupDocumentTouchmove;_scroll=new b();_dropInstances=new Set();_dragInstances=new Set();_activeDragInstances=Qt([]);_globalListeners;_draggingPredicate=e=>e.isDragging();_domNodesToDirectives=null;pointerMove=new b();pointerUp=new b();constructor(){}registerDropContainer(e){this._dropInstances.has(e)||this._dropInstances.add(e);}registerDragItem(e){this._dragInstances.add(e),this._dragInstances.size===1&&this._ngZone.runOutsideAngular(()=>{this._cleanupDocumentTouchmove?.(),this._cleanupDocumentTouchmove=this._renderer.listen(this._document,"touchmove",this._persistentTouchmoveListener,qi);});}removeDropContainer(e){this._dropInstances.delete(e);}removeDragItem(e){this._dragInstances.delete(e),this.stopDragging(e),this._dragInstances.size===0&&this._cleanupDocumentTouchmove?.();}startDragging(e,i){if(!(this._activeDragInstances().indexOf(e)>-1)&&(this._styleLoader.load(fs),this._activeDragInstances.update(r=>[...r,e]),this._activeDragInstances().length===1)){let r=i.type.startsWith("touch"),a=p=>this.pointerUp.next(p),c=[["scroll",p=>this._scroll.next(p),Ft],["selectstart",this._preventDefaultWhileDragging,qi]];r?c.push(["touchend",a,Ft],["touchcancel",a,Ft]):c.push(["mouseup",a,Ft]),r||c.push(["mousemove",p=>this.pointerMove.next(p),qi]),this._ngZone.runOutsideAngular(()=>{this._globalListeners=c.map(([p,y,E])=>this._renderer.listen(this._document,p,y,E));});}}stopDragging(e){this._activeDragInstances.update(i=>{let r=i.indexOf(e);return r>-1?(i.splice(r,1),[...i]):i;}),this._activeDragInstances().length===0&&this._clearGlobalListeners();}isDragging(e){return this._activeDragInstances().indexOf(e)>-1;}scrolled(e){let i=[this._scroll];return e&&e!==this._document&&i.push(new Lt(r=>this._ngZone.runOutsideAngular(()=>{let a=this._renderer.listen(e,"scroll",c=>{this._activeDragInstances().length&&r.next(c);},Ft);return()=>{a();};}))),Gt(...i);}registerDirectiveNode(e,i){this._domNodesToDirectives??=new WeakMap(),this._domNodesToDirectives.set(e,i);}removeDirectiveNode(e){this._domNodesToDirectives?.delete(e);}getDragDirectiveForNode(e){return this._domNodesToDirectives?.get(e)||null;}ngOnDestroy(){this._dragInstances.forEach(e=>this.removeDragItem(e)),this._dropInstances.forEach(e=>this.removeDropContainer(e)),this._domNodesToDirectives=null,this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete();}_preventDefaultWhileDragging=e=>{this._activeDragInstances().length>0&&e.preventDefault();};_persistentTouchmoveListener=e=>{this._activeDragInstances().length>0&&(this._activeDragInstances().some(this._draggingPredicate)&&e.preventDefault(),this.pointerMove.next(e));};_clearGlobalListeners(){this._globalListeners?.forEach(e=>e()),this._globalListeners=void 0;}};h(t,"\u0275fac",function(i){return new(i||t)();}),h(t,"\u0275prov",$e({token:t,factory:t.ɵfac,providedIn:"root"}));let n=t;return n;})();function or(n){let t=n.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(n)*t;}function Cs(n){let t=getComputedStyle(n),o=Ki(t,"transition-property"),e=o.find(c=>c==="transform"||c==="all");if(!e)return 0;let i=o.indexOf(e),r=Ki(t,"transition-duration"),a=Ki(t,"transition-delay");return or(r[i])+or(a[i]);}function Ki(n,t){return n.getPropertyValue(t).split(",").map(e=>e.trim());}var Ss=new Set(["position"]),tn=class{_document;_rootElement;_direction;_initialDomRect;_previewTemplate;_previewClass;_pickupPositionOnPage;_initialTransform;_zIndex;_renderer;_previewEmbeddedView=null;_preview;get element(){return this._preview;}constructor(t,o,e,i,r,a,c,p,y,E){this._document=t,this._rootElement=o,this._direction=e,this._initialDomRect=i,this._previewTemplate=r,this._previewClass=a,this._pickupPositionOnPage=c,this._initialTransform=p,this._zIndex=y,this._renderer=E;}attach(t){this._preview=this._createPreview(),t.appendChild(this._preview),rr(this._preview)&&this._preview.showPopover();}destroy(){this._preview.remove(),this._previewEmbeddedView?.destroy(),this._preview=this._previewEmbeddedView=null;}setTransform(t){this._preview.style.transform=t;}getBoundingClientRect(){return this._preview.getBoundingClientRect();}addClass(t){this._preview.classList.add(t);}getTransitionDuration(){return Cs(this._preview);}addEventListener(t,o){return this._renderer.listen(this._preview,t,o);}_createPreview(){let t=this._previewTemplate,o=this._previewClass,e=t?t.template:null,i;if(e&&t){let r=t.matchSize?this._initialDomRect:null,a=t.viewContainer.createEmbeddedView(e,t.context);a.detectChanges(),i=ur(a,this._document),this._previewEmbeddedView=a,t.matchSize?nr(i,r):i.style.transform=zt(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y);}else i=Ji(this._rootElement),nr(i,this._initialDomRect),this._initialTransform&&(i.style.transform=this._initialTransform);return sn(i.style,{"pointer-events":"none",margin:rr(i)?"0 auto 0 0":"0",position:"fixed",top:"0",left:"0","z-index":this._zIndex+""},Ss),At(i,!1),i.classList.add("cdk-drag-preview"),i.setAttribute("popover","manual"),i.setAttribute("dir",this._direction),o&&(Array.isArray(o)?o.forEach(r=>i.classList.add(r)):i.classList.add(o)),i;}};function rr(n){return"showPopover"in n;}var ys={passive:!0},ar={passive:!1},vs={passive:!1,capture:!0},Es=800,sr="cdk-drag-placeholder",lr=new Set(["position"]);function hr(n,t,o={dragStartThreshold:5,pointerDirectionChangeThreshold:5}){let e=n.get(Fi,null,{optional:!0})||n.get(ut).createRenderer(null,null);return new nn(t,o,n.get(mt),n.get(Fe),n.get(Zi),n.get(ln),e);}var nn=class{_config;_document;_ngZone;_viewportRuler;_dragDropRegistry;_renderer;_rootElementCleanups;_cleanupShadowRootSelectStart;_preview=null;_previewContainer;_placeholderRef=null;_placeholder;_pickupPositionInElement;_pickupPositionOnPage;_marker;_anchor=null;_passiveTransform={x:0,y:0};_activeTransform={x:0,y:0};_initialTransform;_hasStartedDragging=Qt(!1);_hasMoved=!1;_initialContainer;_initialIndex;_parentPositions;_moveEvents=new b();_pointerDirectionDelta;_pointerPositionAtLastDirectionChange;_lastKnownPointerPosition;_rootElement;_ownerSVGElement=null;_rootElementTapHighlight;_pointerMoveSubscription=st.EMPTY;_pointerUpSubscription=st.EMPTY;_scrollSubscription=st.EMPTY;_resizeSubscription=st.EMPTY;_lastTouchEventTime;_dragStartTime;_boundaryElement=null;_nativeInteractionsEnabled=!0;_initialDomRect;_previewRect;_boundaryRect;_previewTemplate;_placeholderTemplate;_handles=[];_disabledHandles=new Set();_dropContainer;_direction="ltr";_parentDragRef=null;_cachedShadowRoot;lockAxis=null;dragStartDelay=0;previewClass;scale=1;get disabled(){return this._disabled||!!(this._dropContainer&&this._dropContainer.disabled);}set disabled(t){t!==this._disabled&&(this._disabled=t,this._toggleNativeDragInteractions(),this._handles.forEach(o=>At(o,t)));}_disabled=!1;beforeStarted=new b();started=new b();released=new b();ended=new b();entered=new b();exited=new b();dropped=new b();moved=this._moveEvents;data;constrainPosition;constructor(t,o,e,i,r,a,c){this._config=o,this._document=e,this._ngZone=i,this._viewportRuler=r,this._dragDropRegistry=a,this._renderer=c,this.withRootElement(t).withParent(o.parentDragRef||null),this._parentPositions=new Ri(e),a.registerDragItem(this);}getPlaceholderElement(){return this._placeholder;}getRootElement(){return this._rootElement;}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement();}withHandles(t){this._handles=t.map(e=>Ee(e)),this._handles.forEach(e=>At(e,this.disabled)),this._toggleNativeDragInteractions();let o=new Set();return this._disabledHandles.forEach(e=>{this._handles.indexOf(e)>-1&&o.add(e);}),this._disabledHandles=o,this;}withPreviewTemplate(t){return this._previewTemplate=t,this;}withPlaceholderTemplate(t){return this._placeholderTemplate=t,this;}withRootElement(t){let o=Ee(t);if(o!==this._rootElement){this._removeRootElementListeners();let e=this._renderer;this._rootElementCleanups=this._ngZone.runOutsideAngular(()=>[e.listen(o,"mousedown",this._pointerDown,ar),e.listen(o,"touchstart",this._pointerDown,ys),e.listen(o,"dragstart",this._nativeDragStart,ar)]),this._initialTransform=void 0,this._rootElement=o;}return typeof SVGElement<"u"&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this;}withBoundaryElement(t){return this._boundaryElement=t?Ee(t):null,this._resizeSubscription.unsubscribe(),t&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this;}withParent(t){return this._parentDragRef=t,this;}dispose(){this._removeRootElementListeners(),this.isDragging()&&this._rootElement?.remove(),this._marker?.remove(),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeListeners(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._dropContainer=void 0,this._resizeSubscription.unsubscribe(),this._parentPositions.clear(),this._boundaryElement=this._rootElement=this._ownerSVGElement=this._placeholderTemplate=this._previewTemplate=this._marker=this._parentDragRef=null;}isDragging(){return this._hasStartedDragging()&&this._dragDropRegistry.isDragging(this);}reset(){this._rootElement.style.transform=this._initialTransform||"",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0};}resetToBoundary(){if(this._boundaryElement&&this._rootElement&&gs(this._boundaryElement.getBoundingClientRect(),this._rootElement.getBoundingClientRect())){let t=this._boundaryElement.getBoundingClientRect(),o=this._rootElement.getBoundingClientRect(),e=0,i=0;o.left<t.left?e=t.left-o.left:o.right>t.right&&(e=t.right-o.right),o.top<t.top?i=t.top-o.top:o.bottom>t.bottom&&(i=t.bottom-o.bottom);let r=this._activeTransform.x,a=this._activeTransform.y,c=r+e,p=a+i;this._rootElement.style.transform=zt(c,p),this._activeTransform={x:c,y:p},this._passiveTransform={x:c,y:p};}}disableHandle(t){!this._disabledHandles.has(t)&&this._handles.indexOf(t)>-1&&(this._disabledHandles.add(t),At(t,!0));}enableHandle(t){this._disabledHandles.has(t)&&(this._disabledHandles.delete(t),At(t,this.disabled));}withDirection(t){return this._direction=t,this;}_withDropContainer(t){this._dropContainer=t;}getFreeDragPosition(){let t=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:t.x,y:t.y};}setFreeDragPosition(t){return this._activeTransform={x:0,y:0},this._passiveTransform.x=t.x,this._passiveTransform.y=t.y,this._dropContainer||this._applyRootElementTransform(t.x,t.y),this;}withPreviewContainer(t){return this._previewContainer=t,this;}_sortFromLastPointerPosition(){let t=this._lastKnownPointerPosition;t&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(t),t);}_removeListeners(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe(),this._scrollSubscription.unsubscribe(),this._cleanupShadowRootSelectStart?.(),this._cleanupShadowRootSelectStart=void 0;}_destroyPreview(){this._preview?.destroy(),this._preview=null;}_destroyPlaceholder(){this._anchor?.remove(),this._placeholder?.remove(),this._placeholderRef?.destroy(),this._placeholder=this._anchor=this._placeholderRef=null;}_pointerDown=t=>{if(this.beforeStarted.next(),this._handles.length){let o=this._getTargetHandle(t);o&&!this._disabledHandles.has(o)&&!this.disabled&&this._initializeDragSequence(o,t);}else this.disabled||this._initializeDragSequence(this._rootElement,t);};_pointerMove=t=>{let o=this._getPointerPositionOnPage(t);if(!this._hasStartedDragging()){let i=Math.abs(o.x-this._pickupPositionOnPage.x),r=Math.abs(o.y-this._pickupPositionOnPage.y);if(i+r>=this._config.dragStartThreshold){let c=Date.now()>=this._dragStartTime+this._getDragStartDelay(t),p=this._dropContainer;if(!c){this._endDragSequence(t);return;}(!p||!p.isDragging()&&!p.isReceiving())&&(t.cancelable&&t.preventDefault(),this._hasStartedDragging.set(!0),this._ngZone.run(()=>this._startDragSequence(t)));}return;}t.cancelable&&t.preventDefault();let e=this._getConstrainedPointerPosition(o);if(this._hasMoved=!0,this._lastKnownPointerPosition=o,this._updatePointerDirectionDelta(e),this._dropContainer)this._updateActiveDropContainer(e,o);else{let i=this.constrainPosition?this._initialDomRect:this._pickupPositionOnPage,r=this._activeTransform;r.x=e.x-i.x+this._passiveTransform.x,r.y=e.y-i.y+this._passiveTransform.y,this._applyRootElementTransform(r.x,r.y);}this._moveEvents.observers.length&&this._ngZone.run(()=>{this._moveEvents.next({source:this,pointerPosition:e,event:t,distance:this._getDragDistance(e),delta:this._pointerDirectionDelta});});};_pointerUp=t=>{this._endDragSequence(t);};_endDragSequence(t){if(this._dragDropRegistry.isDragging(this)&&(this._removeListeners(),this._dragDropRegistry.stopDragging(this),this._toggleNativeDragInteractions(),this._handles&&(this._rootElement.style.webkitTapHighlightColor=this._rootElementTapHighlight),!!this._hasStartedDragging()))if(this.released.next({source:this,event:t}),this._dropContainer)this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(t),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this);});else{this._passiveTransform.x=this._activeTransform.x;let o=this._getPointerPositionOnPage(t);this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(o),dropPoint:o,event:t});}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this);}}_startDragSequence(t){kt(t)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();let o=this._getShadowRoot(),e=this._dropContainer;if(o&&this._ngZone.runOutsideAngular(()=>{this._cleanupShadowRootSelectStart=this._renderer.listen(o,"selectstart",Ms,vs);}),e){let i=this._rootElement,r=i.parentNode,a=this._placeholder=this._createPlaceholderElement(),c=this._marker=this._marker||this._document.createComment("");r.insertBefore(c,i),this._initialTransform=i.style.transform||"",this._preview=new tn(this._document,this._rootElement,this._direction,this._initialDomRect,this._previewTemplate||null,this.previewClass||null,this._pickupPositionOnPage,this._initialTransform,this._config.zIndex||1e3,this._renderer),this._preview.attach(this._getPreviewInsertionPoint(r,o)),ir(i,!1,lr),this._document.body.appendChild(r.replaceChild(a,i)),this.started.next({source:this,event:t}),e.start(),this._initialContainer=e,this._initialIndex=e.getItemIndex(this);}else this.started.next({source:this,event:t}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(e?e.getScrollableParents():[]);}_initializeDragSequence(t,o){this._parentDragRef&&o.stopPropagation();let e=this.isDragging(),i=kt(o),r=!i&&o.button!==0,a=this._rootElement,c=$t(o),p=!i&&this._lastTouchEventTime&&this._lastTouchEventTime+Es>Date.now(),y=i?jn(o):Wn(o);if(c&&c.draggable&&o.type==="mousedown"&&o.preventDefault(),e||r||p||y)return;if(this._handles.length){let w=a.style;this._rootElementTapHighlight=w.webkitTapHighlightColor||"",w.webkitTapHighlightColor="transparent";}this._hasMoved=!1,this._hasStartedDragging.set(this._hasMoved),this._removeListeners(),this._initialDomRect=this._rootElement.getBoundingClientRect(),this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(w=>this._updateOnScroll(w)),this._boundaryElement&&(this._boundaryRect=an(this._boundaryElement));let E=this._previewTemplate;this._pickupPositionInElement=E&&E.template&&!E.matchSize?{x:0,y:0}:this._getPointerPositionInElement(this._initialDomRect,t,o);let O=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(o);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:O.x,y:O.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,o);}_cleanupDragArtifacts(t){ir(this._rootElement,!0,lr),this._marker.parentNode.replaceChild(this._rootElement,this._marker),this._destroyPreview(),this._destroyPlaceholder(),this._initialDomRect=this._boundaryRect=this._previewRect=this._initialTransform=void 0,this._ngZone.run(()=>{let o=this._dropContainer,e=o.getItemIndex(this),i=this._getPointerPositionOnPage(t),r=this._getDragDistance(i),a=o._isOverContainer(i.x,i.y);this.ended.next({source:this,distance:r,dropPoint:i,event:t}),this.dropped.next({item:this,currentIndex:e,previousIndex:this._initialIndex,container:o,previousContainer:this._initialContainer,isPointerOverContainer:a,distance:r,dropPoint:i,event:t}),o.drop(this,e,this._initialIndex,this._initialContainer,a,r,i,t),this._dropContainer=this._initialContainer;});}_updateActiveDropContainer({x:t,y:o},{x:e,y:i}){let r=this._initialContainer._getSiblingContainerFromPosition(this,t,o);!r&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(t,o)&&(r=this._initialContainer),r&&r!==this._dropContainer&&this._ngZone.run(()=>{let a=this._dropContainer.getItemIndex(this),c=this._dropContainer.getItemAtIndex(a+1)?.getVisibleElement()||null;this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._conditionallyInsertAnchor(r,this._dropContainer,c),this._dropContainer=r,this._dropContainer.enter(this,t,o,r===this._initialContainer&&r.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:r,currentIndex:r.getItemIndex(this)});}),this.isDragging()&&(this._dropContainer._startScrollingIfNecessary(e,i),this._dropContainer._sortItem(this,t,o,this._pointerDirectionDelta),this.constrainPosition?this._applyPreviewTransform(t,o):this._applyPreviewTransform(t-this._pickupPositionInElement.x,o-this._pickupPositionInElement.y));}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();let t=this._placeholder.getBoundingClientRect();this._preview.addClass("cdk-drag-animating"),this._applyPreviewTransform(t.left,t.top);let o=this._preview.getTransitionDuration();return o===0?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(e=>{let i=c=>{(!c||this._preview&&$t(c)===this._preview.element&&c.propertyName==="transform")&&(a(),e(),clearTimeout(r));},r=setTimeout(i,o*1.5),a=this._preview.addEventListener("transitionend",i);}));}_createPlaceholderElement(){let t=this._placeholderTemplate,o=t?t.template:null,e;return o?(this._placeholderRef=t.viewContainer.createEmbeddedView(o,t.context),this._placeholderRef.detectChanges(),e=ur(this._placeholderRef,this._document)):e=Ji(this._rootElement),e.style.pointerEvents="none",e.classList.add(sr),e;}_getPointerPositionInElement(t,o,e){let i=o===this._rootElement?null:o,r=i?i.getBoundingClientRect():t,a=kt(e)?e.targetTouches[0]:e,c=this._getViewportScrollPosition(),p=a.pageX-r.left-c.left,y=a.pageY-r.top-c.top;return{x:r.left-t.left+p,y:r.top-t.top+y};}_getPointerPositionOnPage(t){let o=this._getViewportScrollPosition(),e=kt(t)?t.touches[0]||t.changedTouches[0]||{pageX:0,pageY:0}:t,i=e.pageX-o.left,r=e.pageY-o.top;if(this._ownerSVGElement){let a=this._ownerSVGElement.getScreenCTM();if(a){let c=this._ownerSVGElement.createSVGPoint();return c.x=i,c.y=r,c.matrixTransform(a.inverse());}}return{x:i,y:r};}_getConstrainedPointerPosition(t){let o=this._dropContainer?this._dropContainer.lockAxis:null,{x:e,y:i}=this.constrainPosition?this.constrainPosition(t,this,this._initialDomRect,this._pickupPositionInElement):t;if(this.lockAxis==="x"||o==="x"?i=this._pickupPositionOnPage.y-(this.constrainPosition?this._pickupPositionInElement.y:0):(this.lockAxis==="y"||o==="y")&&(e=this._pickupPositionOnPage.x-(this.constrainPosition?this._pickupPositionInElement.x:0)),this._boundaryRect){let{x:r,y:a}=this.constrainPosition?{x:0,y:0}:this._pickupPositionInElement,c=this._boundaryRect,{width:p,height:y}=this._getPreviewRect(),E=c.top+a,O=c.bottom-(y-a),w=c.left+r,Ae=c.right-(p-r);e=dr(e,w,Ae),i=dr(i,E,O);}return{x:e,y:i};}_updatePointerDirectionDelta(t){let{x:o,y:e}=t,i=this._pointerDirectionDelta,r=this._pointerPositionAtLastDirectionChange,a=Math.abs(o-r.x),c=Math.abs(e-r.y);return a>this._config.pointerDirectionChangeThreshold&&(i.x=o>r.x?1:-1,r.x=o),c>this._config.pointerDirectionChangeThreshold&&(i.y=e>r.y?1:-1,r.y=e),i;}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;let t=this._handles.length>0||!this.isDragging();t!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=t,At(this._rootElement,t));}_removeRootElementListeners(){this._rootElementCleanups?.forEach(t=>t()),this._rootElementCleanups=void 0;}_applyRootElementTransform(t,o){let e=1/this.scale,i=zt(t*e,o*e),r=this._rootElement.style;this._initialTransform==null&&(this._initialTransform=r.transform&&r.transform!="none"?r.transform:""),r.transform=bi(i,this._initialTransform);}_applyPreviewTransform(t,o){let e=this._previewTemplate?.template?void 0:this._initialTransform,i=zt(t,o);this._preview.setTransform(bi(i,e));}_getDragDistance(t){let o=this._pickupPositionOnPage;return o?{x:t.x-o.x,y:t.y-o.y}:{x:0,y:0};}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear();}_containInsideBoundaryOnResize(){let{x:t,y:o}=this._passiveTransform;if(t===0&&o===0||this.isDragging()||!this._boundaryElement)return;let e=this._rootElement.getBoundingClientRect(),i=this._boundaryElement.getBoundingClientRect();if(i.width===0&&i.height===0||e.width===0&&e.height===0)return;let r=i.left-e.left,a=e.right-i.right,c=i.top-e.top,p=e.bottom-i.bottom;i.width>e.width?(r>0&&(t+=r),a>0&&(t-=a)):t=0,i.height>e.height?(c>0&&(o+=c),p>0&&(o-=p)):o=0,(t!==this._passiveTransform.x||o!==this._passiveTransform.y)&&this.setFreeDragPosition({y:o,x:t});}_getDragStartDelay(t){let o=this.dragStartDelay;return typeof o=="number"?o:kt(t)?o.touch:o?o.mouse:0;}_updateOnScroll(t){let o=this._parentPositions.handleScroll(t);if(o){let e=$t(t);this._boundaryRect&&e!==this._boundaryElement&&e.contains(this._boundaryElement)&&Bt(this._boundaryRect,o.top,o.left),this._pickupPositionOnPage.x+=o.left,this._pickupPositionOnPage.y+=o.top,this._dropContainer||(this._activeTransform.x-=o.left,this._activeTransform.y-=o.top,this._applyRootElementTransform(this._activeTransform.x,this._activeTransform.y));}}_getViewportScrollPosition(){return this._parentPositions.positions.get(this._document)?.scrollPosition||this._parentPositions.getViewportScrollPosition();}_getShadowRoot(){return this._cachedShadowRoot===void 0&&(this._cachedShadowRoot=ui(this._rootElement)),this._cachedShadowRoot;}_getPreviewInsertionPoint(t,o){let e=this._previewContainer||"global";if(e==="parent")return t;if(e==="global"){let i=this._document;return o||i.fullscreenElement||i.webkitFullscreenElement||i.mozFullScreenElement||i.msFullscreenElement||i.body;}return Ee(e);}_getPreviewRect(){return(!this._previewRect||!this._previewRect.width&&!this._previewRect.height)&&(this._previewRect=this._preview?this._preview.getBoundingClientRect():this._initialDomRect),this._previewRect;}_nativeDragStart=t=>{if(this._handles.length){let o=this._getTargetHandle(t);o&&!this._disabledHandles.has(o)&&!this.disabled&&t.preventDefault();}else this.disabled||t.preventDefault();};_getTargetHandle(t){return this._handles.find(o=>t.target&&(t.target===o||o.contains(t.target)));}_conditionallyInsertAnchor(t,o,e){if(t===this._initialContainer)this._anchor?.remove(),this._anchor=null;else if(o===this._initialContainer&&o.hasAnchor){let i=this._anchor??=Ji(this._placeholder);i.classList.remove(sr),i.classList.add("cdk-drag-anchor"),i.style.transform="",e?e.before(i):Ee(o.element).appendChild(i);}}};function dr(n,t,o){return Math.max(t,Math.min(o,n));}function kt(n){return n.type[0]==="t";}function Ms(n){n.preventDefault();}function gr(n,t,o){let e=cr(t,n.length-1),i=cr(o,n.length-1);if(e===i)return;let r=n[e],a=i<e?-1:1;for(let c=e;c!==i;c+=a)n[c]=n[c+a];n[i]=r;}function cr(n,t){return Math.max(0,Math.min(t,n));}var Ai=class{_dragDropRegistry;_element;_sortPredicate;_itemPositions=[];_activeDraggables;orientation="vertical";direction="ltr";constructor(t){this._dragDropRegistry=t;}_previousSwap={drag:null,delta:0,overlaps:!1};start(t){this.withItems(t);}sort(t,o,e,i){let r=this._itemPositions,a=this._getItemIndexFromPointerPosition(t,o,e,i);if(a===-1&&r.length>0)return null;let c=this.orientation==="horizontal",p=r.findIndex(Z=>Z.drag===t),y=r[a],E=r[p].clientRect,O=y.clientRect,w=p>a?1:-1,Ae=this._getItemOffsetPx(E,O,w),ot=this._getSiblingOffsetPx(p,r,w),rt=r.slice();return gr(r,p,a),r.forEach((Z,at)=>{if(rt[at]===Z)return;let xe=Z.drag===t,A=xe?Ae:ot,cn=xe?t.getPlaceholderElement():Z.drag.getRootElement();Z.offset+=A;let _n=Math.round(Z.offset*(1/Z.drag.scale));c?(cn.style.transform=bi(`translate3d(${_n}px, 0, 0)`,Z.initialTransform),Bt(Z.clientRect,0,A)):(cn.style.transform=bi(`translate3d(0, ${_n}px, 0)`,Z.initialTransform),Bt(Z.clientRect,A,0));}),this._previousSwap.overlaps=en(O,o,e),this._previousSwap.drag=y.drag,this._previousSwap.delta=c?i.x:i.y,{previousIndex:p,currentIndex:a};}enter(t,o,e,i){let r=this._activeDraggables,a=r.indexOf(t),c=t.getPlaceholderElement();a>-1&&r.splice(a,1);let p=i==null||i<0?this._getItemIndexFromPointerPosition(t,o,e):i,y=r[p];if(y===t&&(y=r[p+1]),!y&&(p==null||p===-1||p<r.length-1)&&this._shouldEnterAsFirstChild(o,e)&&(y=r[0]),y&&!this._dragDropRegistry.isDragging(y)){let E=y.getRootElement();E.parentElement.insertBefore(c,E),r.splice(p,0,t);}else this._element.appendChild(c),r.push(t);c.style.transform="",this._cacheItemPositions();}withItems(t){this._activeDraggables=t.slice(),this._cacheItemPositions();}withSortPredicate(t){this._sortPredicate=t;}reset(){this._activeDraggables?.forEach(t=>{let o=t.getRootElement();if(o){let e=this._itemPositions.find(i=>i.drag===t)?.initialTransform;o.style.transform=e||"";}}),this._itemPositions=[],this._activeDraggables=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1;}getActiveItemsSnapshot(){return this._activeDraggables;}getItemIndex(t){return this._getVisualItemPositions().findIndex(o=>o.drag===t);}getItemAtIndex(t){return this._getVisualItemPositions()[t]?.drag||null;}updateOnScroll(t,o){this._itemPositions.forEach(({clientRect:e})=>{Bt(e,t,o);}),this._itemPositions.forEach(({drag:e})=>{this._dragDropRegistry.isDragging(e)&&e._sortFromLastPointerPosition();});}withElementContainer(t){this._element=t;}_cacheItemPositions(){let t=this.orientation==="horizontal";this._itemPositions=this._activeDraggables.map(o=>{let e=o.getVisibleElement();return{drag:o,offset:0,initialTransform:e.style.transform||"",clientRect:an(e)};}).sort((o,e)=>t?o.clientRect.left-e.clientRect.left:o.clientRect.top-e.clientRect.top);}_getVisualItemPositions(){return this.orientation==="horizontal"&&this.direction==="rtl"?this._itemPositions.slice().reverse():this._itemPositions;}_getItemOffsetPx(t,o,e){let i=this.orientation==="horizontal",r=i?o.left-t.left:o.top-t.top;return e===-1&&(r+=i?o.width-t.width:o.height-t.height),r;}_getSiblingOffsetPx(t,o,e){let i=this.orientation==="horizontal",r=o[t].clientRect,a=o[t+e*-1],c=r[i?"width":"height"]*e;if(a){let p=i?"left":"top",y=i?"right":"bottom";e===-1?c-=a.clientRect[p]-r[y]:c+=r[p]-a.clientRect[y];}return c;}_shouldEnterAsFirstChild(t,o){if(!this._activeDraggables.length)return!1;let e=this._itemPositions,i=this.orientation==="horizontal";if(e[0].drag!==this._activeDraggables[0]){let a=e[e.length-1].clientRect;return i?t>=a.right:o>=a.bottom;}else{let a=e[0].clientRect;return i?t<=a.left:o<=a.top;}}_getItemIndexFromPointerPosition(t,o,e,i){let r=this.orientation==="horizontal",a=this._itemPositions.findIndex(({drag:c,clientRect:p})=>{if(c===t)return!1;if(i){let y=r?i.x:i.y;if(c===this._previousSwap.drag&&this._previousSwap.overlaps&&y===this._previousSwap.delta)return!1;}return r?o>=Math.floor(p.left)&&o<Math.floor(p.right):e>=Math.floor(p.top)&&e<Math.floor(p.bottom);});return a===-1||!this._sortPredicate(a,t)?-1:a;}},on=class{_document;_dragDropRegistry;_element;_sortPredicate;_rootNode;_activeItems;_previousSwap={drag:null,deltaX:0,deltaY:0,overlaps:!1};_relatedNodes=[];constructor(t,o){this._document=t,this._dragDropRegistry=o;}start(t){let o=this._element.childNodes;this._relatedNodes=[];for(let e=0;e<o.length;e++){let i=o[e];this._relatedNodes.push([i,i.nextSibling]);}this.withItems(t);}sort(t,o,e,i){let r=this._getItemIndexFromPointerPosition(t,o,e),a=this._previousSwap;if(r===-1||this._activeItems[r]===t)return null;let c=this._activeItems[r];if(a.drag===c&&a.overlaps&&a.deltaX===i.x&&a.deltaY===i.y)return null;let p=this.getItemIndex(t),y=t.getPlaceholderElement(),E=c.getRootElement();r>p?E.after(y):E.before(y),gr(this._activeItems,p,r);let O=this._getRootNode().elementFromPoint(o,e);return a.deltaX=i.x,a.deltaY=i.y,a.drag=c,a.overlaps=E===O||E.contains(O),{previousIndex:p,currentIndex:r};}enter(t,o,e,i){let r=this._activeItems.indexOf(t);r>-1&&this._activeItems.splice(r,1);let a=i==null||i<0?this._getItemIndexFromPointerPosition(t,o,e):i;a===-1&&(a=this._getClosestItemIndexToPointer(t,o,e));let c=this._activeItems[a];c&&!this._dragDropRegistry.isDragging(c)?(this._activeItems.splice(a,0,t),c.getRootElement().before(t.getPlaceholderElement())):(this._activeItems.push(t),this._element.appendChild(t.getPlaceholderElement()));}withItems(t){this._activeItems=t.slice();}withSortPredicate(t){this._sortPredicate=t;}reset(){let t=this._element,o=this._previousSwap;for(let e=this._relatedNodes.length-1;e>-1;e--){let[i,r]=this._relatedNodes[e];i.parentNode===t&&i.nextSibling!==r&&(r===null?t.appendChild(i):r.parentNode===t&&t.insertBefore(i,r));}this._relatedNodes=[],this._activeItems=[],o.drag=null,o.deltaX=o.deltaY=0,o.overlaps=!1;}getActiveItemsSnapshot(){return this._activeItems;}getItemIndex(t){return this._activeItems.indexOf(t);}getItemAtIndex(t){return this._activeItems[t]||null;}updateOnScroll(){this._activeItems.forEach(t=>{this._dragDropRegistry.isDragging(t)&&t._sortFromLastPointerPosition();});}withElementContainer(t){t!==this._element&&(this._element=t,this._rootNode=void 0);}_getItemIndexFromPointerPosition(t,o,e){let i=this._getRootNode().elementFromPoint(Math.floor(o),Math.floor(e)),r=i?this._activeItems.findIndex(a=>{let c=a.getRootElement();return i===c||c.contains(i);}):-1;return r===-1||!this._sortPredicate(r,t)?-1:r;}_getRootNode(){return this._rootNode||(this._rootNode=ui(this._element)||this._document),this._rootNode;}_getClosestItemIndexToPointer(t,o,e){if(this._activeItems.length===0)return-1;if(this._activeItems.length===1)return 0;let i=1/0,r=-1;for(let a=0;a<this._activeItems.length;a++){let c=this._activeItems[a];if(c!==t){let{x:p,y}=c.getRootElement().getBoundingClientRect(),E=Math.hypot(o-p,e-y);E<i&&(i=E,r=a);}}return r;}},_r=.05,fr=.05,fe=function(n){return n[n.NONE=0]="NONE",n[n.UP=1]="UP",n[n.DOWN=2]="DOWN",n;}(fe||{}),oe=function(n){return n[n.NONE=0]="NONE",n[n.LEFT=1]="LEFT",n[n.RIGHT=2]="RIGHT",n;}(oe||{});function Cr(n,t){return new rn(t,n.get(ln),n.get(mt),n.get(Fe),n.get(Zi));}var rn=class{_dragDropRegistry;_ngZone;_viewportRuler;element;disabled=!1;sortingDisabled=!1;lockAxis=null;autoScrollDisabled=!1;autoScrollStep=2;hasAnchor=!1;enterPredicate=()=>!0;sortPredicate=()=>!0;beforeStarted=new b();entered=new b();exited=new b();dropped=new b();sorted=new b();receivingStarted=new b();receivingStopped=new b();data;_container;_isDragging=!1;_parentPositions;_sortStrategy;_domRect;_draggables=[];_siblings=[];_activeSiblings=new Set();_viewportScrollSubscription=st.EMPTY;_verticalScrollDirection=fe.NONE;_horizontalScrollDirection=oe.NONE;_scrollNode;_stopScrollTimers=new b();_cachedShadowRoot=null;_document;_scrollableElements=[];_initialScrollSnap;_direction="ltr";constructor(t,o,e,i,r){this._dragDropRegistry=o,this._ngZone=i,this._viewportRuler=r;let a=this.element=Ee(t);this._document=e,this.withOrientation("vertical").withElementContainer(a),o.registerDropContainer(this),this._parentPositions=new Ri(e);}dispose(){this._stopScrolling(),this._stopScrollTimers.complete(),this._viewportScrollSubscription.unsubscribe(),this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this.receivingStarted.complete(),this.receivingStopped.complete(),this._activeSiblings.clear(),this._scrollNode=null,this._parentPositions.clear(),this._dragDropRegistry.removeDropContainer(this);}isDragging(){return this._isDragging;}start(){this._draggingStarted(),this._notifyReceivingSiblings();}enter(t,o,e,i){this._draggingStarted(),i==null&&this.sortingDisabled&&(i=this._draggables.indexOf(t)),this._sortStrategy.enter(t,o,e,i),this._cacheParentPositions(),this._notifyReceivingSiblings(),this.entered.next({item:t,container:this,currentIndex:this.getItemIndex(t)});}exit(t){this._reset(),this.exited.next({item:t,container:this});}drop(t,o,e,i,r,a,c,p={}){this._reset(),this.dropped.next({item:t,currentIndex:o,previousIndex:e,container:this,previousContainer:i,isPointerOverContainer:r,distance:a,dropPoint:c,event:p});}withItems(t){let o=this._draggables;return this._draggables=t,t.forEach(e=>e._withDropContainer(this)),this.isDragging()&&(o.filter(i=>i.isDragging()).every(i=>t.indexOf(i)===-1)?this._reset():this._sortStrategy.withItems(this._draggables)),this;}withDirection(t){return this._direction=t,this._sortStrategy instanceof Ai&&(this._sortStrategy.direction=t),this;}connectedTo(t){return this._siblings=t.slice(),this;}withOrientation(t){if(t==="mixed")this._sortStrategy=new on(this._document,this._dragDropRegistry);else{let o=new Ai(this._dragDropRegistry);o.direction=this._direction,o.orientation=t,this._sortStrategy=o;}return this._sortStrategy.withElementContainer(this._container),this._sortStrategy.withSortPredicate((o,e)=>this.sortPredicate(o,e,this)),this;}withScrollableParents(t){let o=this._container;return this._scrollableElements=t.indexOf(o)===-1?[o,...t]:t.slice(),this;}withElementContainer(t){if(t===this._container)return this;let o=Ee(this.element),e=this._scrollableElements.indexOf(this._container),i=this._scrollableElements.indexOf(t);return e>-1&&this._scrollableElements.splice(e,1),i>-1&&this._scrollableElements.splice(i,1),this._sortStrategy&&this._sortStrategy.withElementContainer(t),this._cachedShadowRoot=null,this._scrollableElements.unshift(t),this._container=t,this;}getScrollableParents(){return this._scrollableElements;}getItemIndex(t){return this._isDragging?this._sortStrategy.getItemIndex(t):this._draggables.indexOf(t);}getItemAtIndex(t){return this._isDragging?this._sortStrategy.getItemAtIndex(t):this._draggables[t]||null;}isReceiving(){return this._activeSiblings.size>0;}_sortItem(t,o,e,i){if(this.sortingDisabled||!this._domRect||!tr(this._domRect,_r,o,e))return;let r=this._sortStrategy.sort(t,o,e,i);r&&this.sorted.next({previousIndex:r.previousIndex,currentIndex:r.currentIndex,container:this,item:t});}_startScrollingIfNecessary(t,o){if(this.autoScrollDisabled)return;let e,i=fe.NONE,r=oe.NONE;if(this._parentPositions.positions.forEach((a,c)=>{c===this._document||!a.clientRect||e||tr(a.clientRect,_r,t,o)&&([i,r]=Ps(c,a.clientRect,this._direction,t,o),(i||r)&&(e=c));}),!i&&!r){let{width:a,height:c}=this._viewportRuler.getViewportSize(),p={width:a,height:c,top:0,right:a,bottom:c,left:0};i=Sr(p,o),r=yr(p,t),e=window;}e&&(i!==this._verticalScrollDirection||r!==this._horizontalScrollDirection||e!==this._scrollNode)&&(this._verticalScrollDirection=i,this._horizontalScrollDirection=r,this._scrollNode=e,(i||r)&&e?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling());}_stopScrolling(){this._stopScrollTimers.next();}_draggingStarted(){let t=this._container.style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=t.msScrollSnapType||t.scrollSnapType||"",t.scrollSnapType=t.msScrollSnapType="none",this._sortStrategy.start(this._draggables),this._cacheParentPositions(),this._viewportScrollSubscription.unsubscribe(),this._listenToScrollEvents();}_cacheParentPositions(){this._parentPositions.cache(this._scrollableElements),this._domRect=this._parentPositions.positions.get(this._container).clientRect;}_reset(){this._isDragging=!1;let t=this._container.style;t.scrollSnapType=t.msScrollSnapType=this._initialScrollSnap,this._siblings.forEach(o=>o._stopReceiving(this)),this._sortStrategy.reset(),this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear();}_startScrollInterval=()=>{this._stopScrolling(),hn(0,Ni).pipe(pt(this._stopScrollTimers)).subscribe(()=>{let t=this._scrollNode,o=this.autoScrollStep;this._verticalScrollDirection===fe.UP?t.scrollBy(0,-o):this._verticalScrollDirection===fe.DOWN&&t.scrollBy(0,o),this._horizontalScrollDirection===oe.LEFT?t.scrollBy(-o,0):this._horizontalScrollDirection===oe.RIGHT&&t.scrollBy(o,0);});};_isOverContainer(t,o){return this._domRect!=null&&en(this._domRect,t,o);}_getSiblingContainerFromPosition(t,o,e){return this._siblings.find(i=>i._canReceive(t,o,e));}_canReceive(t,o,e){if(!this._domRect||!en(this._domRect,o,e)||!this.enterPredicate(t,this))return!1;let i=this._getShadowRoot().elementFromPoint(o,e);return i?i===this._container||this._container.contains(i):!1;}_startReceiving(t,o){let e=this._activeSiblings;!e.has(t)&&o.every(i=>this.enterPredicate(i,this)||this._draggables.indexOf(i)>-1)&&(e.add(t),this._cacheParentPositions(),this._listenToScrollEvents(),this.receivingStarted.next({initiator:t,receiver:this,items:o}));}_stopReceiving(t){this._activeSiblings.delete(t),this._viewportScrollSubscription.unsubscribe(),this.receivingStopped.next({initiator:t,receiver:this});}_listenToScrollEvents(){this._viewportScrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(t=>{if(this.isDragging()){let o=this._parentPositions.handleScroll(t);o&&this._sortStrategy.updateOnScroll(o.top,o.left);}else this.isReceiving()&&this._cacheParentPositions();});}_getShadowRoot(){if(!this._cachedShadowRoot){let t=ui(this._container);this._cachedShadowRoot=t||this._document;}return this._cachedShadowRoot;}_notifyReceivingSiblings(){let t=this._sortStrategy.getActiveItemsSnapshot().filter(o=>o.isDragging());this._siblings.forEach(o=>o._startReceiving(this,t));}};function Sr(n,t){let{top:o,bottom:e,height:i}=n,r=i*fr;return t>=o-r&&t<=o+r?fe.UP:t>=e-r&&t<=e+r?fe.DOWN:fe.NONE;}function yr(n,t){let{left:o,right:e,width:i}=n,r=i*fr;return t>=o-r&&t<=o+r?oe.LEFT:t>=e-r&&t<=e+r?oe.RIGHT:oe.NONE;}function Ps(n,t,o,e,i){let r=Sr(t,i),a=yr(t,e),c=fe.NONE,p=oe.NONE;if(r){let y=n.scrollTop;r===fe.UP?y>0&&(c=fe.UP):n.scrollHeight-y>n.clientHeight&&(c=fe.DOWN);}if(a){let y=n.scrollLeft;o==="rtl"?a===oe.RIGHT?y<0&&(p=oe.RIGHT):n.scrollWidth+y>n.clientWidth&&(p=oe.LEFT):a===oe.LEFT?y>0&&(p=oe.LEFT):n.scrollWidth-y>n.clientWidth&&(p=oe.RIGHT);}return[c,p];}var Is=(()=>{let t=class t{_injector=_(Nt);constructor(){}createDrag(e,i){return hr(this._injector,e,i);}createDropList(e){return Cr(this._injector,e);}};h(t,"\u0275fac",function(i){return new(i||t)();}),h(t,"\u0275prov",$e({token:t,factory:t.ɵfac,providedIn:"root"}));let n=t;return n;})(),pr=new dt("CDK_DRAG_PARENT");var Ts=new dt("CdkDragHandle");var vr=new dt("CDK_DRAG_CONFIG"),Er=new dt("CdkDropList"),Mr=(()=>{let t=class t{element=_(Zt);dropContainer=_(Er,{optional:!0,skipSelf:!0});_ngZone=_(Fe);_viewContainerRef=_(ki);_dir=_(Wi,{optional:!0});_changeDetectorRef=_(gt);_selfHandle=_(Ts,{optional:!0,self:!0});_parentDrag=_(pr,{optional:!0,skipSelf:!0});_dragDropRegistry=_(ln);_destroyed=new b();_handles=new mn([]);_previewTemplate=null;_placeholderTemplate=null;_dragRef;data;lockAxis=null;rootElementSelector;boundaryElement;dragStartDelay;freeDragPosition;get disabled(){return this._disabled||!!(this.dropContainer&&this.dropContainer.disabled);}set disabled(e){this._disabled=e,this._dragRef.disabled=this._disabled;}_disabled=!1;constrainPosition;previewClass;previewContainer;scale=1;started=new Se();released=new Se();ended=new Se();entered=new Se();exited=new Se();dropped=new Se();moved=new Lt(e=>{let i=this._dragRef.moved.pipe(Ce(r=>({source:this,pointerPosition:r.pointerPosition,event:r.event,delta:r.delta,distance:r.distance}))).subscribe(e);return()=>{i.unsubscribe();};});_injector=_(Nt);constructor(){let e=this.dropContainer,i=_(vr,{optional:!0});this._dragRef=hr(this._injector,this.element,{dragStartThreshold:i&&i.dragStartThreshold!=null?i.dragStartThreshold:5,pointerDirectionChangeThreshold:i&&i.pointerDirectionChangeThreshold!=null?i.pointerDirectionChangeThreshold:5,zIndex:i?.zIndex}),this._dragRef.data=this,this._dragDropRegistry.registerDirectiveNode(this.element.nativeElement,this),i&&this._assignDefaults(i),e&&(e.addItem(this),e._dropListRef.beforeStarted.pipe(pt(this._destroyed)).subscribe(()=>{this._dragRef.scale=this.scale;})),this._syncInputs(this._dragRef),this._handleEvents(this._dragRef);}getPlaceholderElement(){return this._dragRef.getPlaceholderElement();}getRootElement(){return this._dragRef.getRootElement();}reset(){this._dragRef.reset();}resetToBoundary(){this._dragRef.resetToBoundary();}getFreeDragPosition(){return this._dragRef.getFreeDragPosition();}setFreeDragPosition(e){this._dragRef.setFreeDragPosition(e);}ngAfterViewInit(){$i(()=>{this._updateRootElement(),this._setupHandlesListener(),this._dragRef.scale=this.scale,this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition);},{injector:this._injector});}ngOnChanges(e){let i=e.rootElementSelector,r=e.freeDragPosition;i&&!i.firstChange&&this._updateRootElement(),this._dragRef.scale=this.scale,r&&!r.firstChange&&this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition);}ngOnDestroy(){this.dropContainer&&this.dropContainer.removeItem(this),this._dragDropRegistry.removeDirectiveNode(this.element.nativeElement),this._ngZone.runOutsideAngular(()=>{this._handles.complete(),this._destroyed.next(),this._destroyed.complete(),this._dragRef.dispose();});}_addHandle(e){let i=this._handles.getValue();i.push(e),this._handles.next(i);}_removeHandle(e){let i=this._handles.getValue(),r=i.indexOf(e);r>-1&&(i.splice(r,1),this._handles.next(i));}_setPreviewTemplate(e){this._previewTemplate=e;}_resetPreviewTemplate(e){e===this._previewTemplate&&(this._previewTemplate=null);}_setPlaceholderTemplate(e){this._placeholderTemplate=e;}_resetPlaceholderTemplate(e){e===this._placeholderTemplate&&(this._placeholderTemplate=null);}_updateRootElement(){let e=this.element.nativeElement,i=e;this.rootElementSelector&&(i=e.closest!==void 0?e.closest(this.rootElementSelector):e.parentElement?.closest(this.rootElementSelector)),this._dragRef.withRootElement(i||e);}_getBoundaryElement(){let e=this.boundaryElement;return e?typeof e=="string"?this.element.nativeElement.closest(e):Ee(e):null;}_syncInputs(e){e.beforeStarted.subscribe(()=>{if(!e.isDragging()){let i=this._dir,r=this.dragStartDelay,a=this._placeholderTemplate?{template:this._placeholderTemplate.templateRef,context:this._placeholderTemplate.data,viewContainer:this._viewContainerRef}:null,c=this._previewTemplate?{template:this._previewTemplate.templateRef,context:this._previewTemplate.data,matchSize:this._previewTemplate.matchSize,viewContainer:this._viewContainerRef}:null;e.disabled=this.disabled,e.lockAxis=this.lockAxis,e.scale=this.scale,e.dragStartDelay=typeof r=="object"&&r?r:di(r),e.constrainPosition=this.constrainPosition,e.previewClass=this.previewClass,e.withBoundaryElement(this._getBoundaryElement()).withPlaceholderTemplate(a).withPreviewTemplate(c).withPreviewContainer(this.previewContainer||"global"),i&&e.withDirection(i.value);}}),e.beforeStarted.pipe(Cn(1)).subscribe(()=>{if(this._parentDrag){e.withParent(this._parentDrag._dragRef);return;}let i=this.element.nativeElement.parentElement;for(;i;){let r=this._dragDropRegistry.getDragDirectiveForNode(i);if(r){e.withParent(r._dragRef);break;}i=i.parentElement;}});}_handleEvents(e){e.started.subscribe(i=>{this.started.emit({source:this,event:i.event}),this._changeDetectorRef.markForCheck();}),e.released.subscribe(i=>{this.released.emit({source:this,event:i.event});}),e.ended.subscribe(i=>{this.ended.emit({source:this,distance:i.distance,dropPoint:i.dropPoint,event:i.event}),this._changeDetectorRef.markForCheck();}),e.entered.subscribe(i=>{this.entered.emit({container:i.container.data,item:this,currentIndex:i.currentIndex});}),e.exited.subscribe(i=>{this.exited.emit({container:i.container.data,item:this});}),e.dropped.subscribe(i=>{this.dropped.emit({previousIndex:i.previousIndex,currentIndex:i.currentIndex,previousContainer:i.previousContainer.data,container:i.container.data,isPointerOverContainer:i.isPointerOverContainer,item:this,distance:i.distance,dropPoint:i.dropPoint,event:i.event});});}_assignDefaults(e){let{lockAxis:i,dragStartDelay:r,constrainPosition:a,previewClass:c,boundaryElement:p,draggingDisabled:y,rootElementSelector:E,previewContainer:O}=e;this.disabled=y??!1,this.dragStartDelay=r||0,this.lockAxis=i||null,a&&(this.constrainPosition=a),c&&(this.previewClass=c),p&&(this.boundaryElement=p),E&&(this.rootElementSelector=E),O&&(this.previewContainer=O);}_setupHandlesListener(){this._handles.pipe(Ve(e=>{let i=e.map(r=>r.element);this._selfHandle&&this.rootElementSelector&&i.push(this.element),this._dragRef.withHandles(i);}),Me(e=>Gt(...e.map(i=>i._stateChanges.pipe(Wt(i))))),pt(this._destroyed)).subscribe(e=>{let i=this._dragRef,r=e.element.nativeElement;e.disabled?i.disableHandle(r):i.enableHandle(r);});}};h(t,"\u0275fac",function(i){return new(i||t)();}),h(t,"\u0275dir",Kt({type:t,selectors:[["","cdkDrag",""]],hostAttrs:[1,"cdk-drag"],hostVars:4,hostBindings:function(i,r){i&2&&ii("cdk-drag-disabled",r.disabled)("cdk-drag-dragging",r._dragRef.isDragging());},inputs:{data:[0,"cdkDragData","data"],lockAxis:[0,"cdkDragLockAxis","lockAxis"],rootElementSelector:[0,"cdkDragRootElement","rootElementSelector"],boundaryElement:[0,"cdkDragBoundary","boundaryElement"],dragStartDelay:[0,"cdkDragStartDelay","dragStartDelay"],freeDragPosition:[0,"cdkDragFreeDragPosition","freeDragPosition"],disabled:[2,"cdkDragDisabled","disabled",Pe],constrainPosition:[0,"cdkDragConstrainPosition","constrainPosition"],previewClass:[0,"cdkDragPreviewClass","previewClass"],previewContainer:[0,"cdkDragPreviewContainer","previewContainer"],scale:[2,"cdkDragScale","scale",In]},outputs:{started:"cdkDragStarted",released:"cdkDragReleased",ended:"cdkDragEnded",entered:"cdkDragEntered",exited:"cdkDragExited",dropped:"cdkDragDropped",moved:"cdkDragMoved"},exportAs:["cdkDrag"],features:[ze([{provide:pr,useExisting:t}]),Dt]}));let n=t;return n;})(),mr=new dt("CdkDropListGroup");var Pr=(()=>{let t=class t{element=_(Zt);_changeDetectorRef=_(gt);_scrollDispatcher=_(Zo);_dir=_(Wi,{optional:!0});_group=_(mr,{optional:!0,skipSelf:!0});_latestSortedRefs;_destroyed=new b();_scrollableParentsResolved=!1;_dropListRef;connectedTo=[];data;orientation="vertical";id=_(qn).getId("cdk-drop-list-");lockAxis=null;get disabled(){return this._disabled||!!this._group&&this._group.disabled;}set disabled(e){this._dropListRef.disabled=this._disabled=e;}_disabled=!1;sortingDisabled=!1;enterPredicate=()=>!0;sortPredicate=()=>!0;autoScrollDisabled=!1;autoScrollStep;elementContainerSelector=null;hasAnchor=!1;dropped=new Se();entered=new Se();exited=new Se();sorted=new Se();_unsortedItems=new Set();constructor(){let e=_(vr,{optional:!0}),i=_(Nt);this._dropListRef=Cr(i,this.element),this._dropListRef.data=this,e&&this._assignDefaults(e),this._dropListRef.enterPredicate=(r,a)=>this.enterPredicate(r.data,a.data),this._dropListRef.sortPredicate=(r,a,c)=>this.sortPredicate(r,a.data,c.data),this._setupInputSyncSubscription(this._dropListRef),this._handleEvents(this._dropListRef),t._dropLists.push(this),this._group&&this._group._items.add(this);}addItem(e){this._unsortedItems.add(e),e._dragRef._withDropContainer(this._dropListRef),this._dropListRef.isDragging()&&this._syncItemsWithRef(this.getSortedItems().map(i=>i._dragRef));}removeItem(e){if(this._unsortedItems.delete(e),this._latestSortedRefs){let i=this._latestSortedRefs.indexOf(e._dragRef);i>-1&&(this._latestSortedRefs.splice(i,1),this._syncItemsWithRef(this._latestSortedRefs));}}getSortedItems(){return Array.from(this._unsortedItems).sort((e,i)=>e._dragRef.getVisibleElement().compareDocumentPosition(i._dragRef.getVisibleElement())&Node.DOCUMENT_POSITION_FOLLOWING?-1:1);}ngOnDestroy(){let e=t._dropLists.indexOf(this);e>-1&&t._dropLists.splice(e,1),this._group&&this._group._items.delete(this),this._latestSortedRefs=void 0,this._unsortedItems.clear(),this._dropListRef.dispose(),this._destroyed.next(),this._destroyed.complete();}_setupInputSyncSubscription(e){this._dir&&this._dir.change.pipe(Wt(this._dir.value),pt(this._destroyed)).subscribe(i=>e.withDirection(i)),e.beforeStarted.subscribe(()=>{let i=Zn(this.connectedTo).map(r=>{if(typeof r=="string"){let a=t._dropLists.find(c=>c.id===r);return a;}return r;});if(this._group&&this._group._items.forEach(r=>{i.indexOf(r)===-1&&i.push(r);}),!this._scrollableParentsResolved){let r=this._scrollDispatcher.getAncestorScrollContainers(this.element).map(a=>a.getElementRef().nativeElement);this._dropListRef.withScrollableParents(r),this._scrollableParentsResolved=!0;}if(this.elementContainerSelector){let r=this.element.nativeElement.querySelector(this.elementContainerSelector);e.withElementContainer(r);}e.disabled=this.disabled,e.lockAxis=this.lockAxis,e.sortingDisabled=this.sortingDisabled,e.autoScrollDisabled=this.autoScrollDisabled,e.autoScrollStep=di(this.autoScrollStep,2),e.hasAnchor=this.hasAnchor,e.connectedTo(i.filter(r=>r&&r!==this).map(r=>r._dropListRef)).withOrientation(this.orientation);});}_handleEvents(e){e.beforeStarted.subscribe(()=>{this._syncItemsWithRef(this.getSortedItems().map(i=>i._dragRef)),this._changeDetectorRef.markForCheck();}),e.entered.subscribe(i=>{this.entered.emit({container:this,item:i.item.data,currentIndex:i.currentIndex});}),e.exited.subscribe(i=>{this.exited.emit({container:this,item:i.item.data}),this._changeDetectorRef.markForCheck();}),e.sorted.subscribe(i=>{this.sorted.emit({previousIndex:i.previousIndex,currentIndex:i.currentIndex,container:this,item:i.item.data});}),e.dropped.subscribe(i=>{this.dropped.emit({previousIndex:i.previousIndex,currentIndex:i.currentIndex,previousContainer:i.previousContainer.data,container:i.container.data,item:i.item.data,isPointerOverContainer:i.isPointerOverContainer,distance:i.distance,dropPoint:i.dropPoint,event:i.event}),this._changeDetectorRef.markForCheck();}),Gt(e.receivingStarted,e.receivingStopped).subscribe(()=>this._changeDetectorRef.markForCheck());}_assignDefaults(e){let{lockAxis:i,draggingDisabled:r,sortingDisabled:a,listAutoScrollDisabled:c,listOrientation:p}=e;this.disabled=r??!1,this.sortingDisabled=a??!1,this.autoScrollDisabled=c??!1,this.orientation=p||"vertical",this.lockAxis=i||null;}_syncItemsWithRef(e){this._latestSortedRefs=e,this._dropListRef.withItems(e);}};h(t,"_dropLists",[]),h(t,"\u0275fac",function(i){return new(i||t)();}),h(t,"\u0275dir",Kt({type:t,selectors:[["","cdkDropList",""],["cdk-drop-list"]],hostAttrs:[1,"cdk-drop-list"],hostVars:7,hostBindings:function(i,r){i&2&&(Sn("id",r.id),ii("cdk-drop-list-disabled",r.disabled)("cdk-drop-list-dragging",r._dropListRef.isDragging())("cdk-drop-list-receiving",r._dropListRef.isReceiving()));},inputs:{connectedTo:[0,"cdkDropListConnectedTo","connectedTo"],data:[0,"cdkDropListData","data"],orientation:[0,"cdkDropListOrientation","orientation"],id:"id",lockAxis:[0,"cdkDropListLockAxis","lockAxis"],disabled:[2,"cdkDropListDisabled","disabled",Pe],sortingDisabled:[2,"cdkDropListSortingDisabled","sortingDisabled",Pe],enterPredicate:[0,"cdkDropListEnterPredicate","enterPredicate"],sortPredicate:[0,"cdkDropListSortPredicate","sortPredicate"],autoScrollDisabled:[2,"cdkDropListAutoScrollDisabled","autoScrollDisabled",Pe],autoScrollStep:[0,"cdkDropListAutoScrollStep","autoScrollStep"],elementContainerSelector:[0,"cdkDropListElementContainer","elementContainerSelector"],hasAnchor:[2,"cdkDropListHasAnchor","hasAnchor",Pe]},outputs:{dropped:"cdkDropListDropped",entered:"cdkDropListEntered",exited:"cdkDropListExited",sorted:"cdkDropListSorted"},exportAs:["cdkDropList"],features:[ze([{provide:mr,useValue:void 0},{provide:Er,useExisting:t}])]}));let n=t;return n;})();var Ir=(()=>{let t=class t{};h(t,"\u0275fac",function(i){return new(i||t)();}),h(t,"\u0275mod",qt({type:t})),h(t,"\u0275inj",jt({providers:[Is],imports:[qo]}));let n=t;return n;})();var Os=["videoShareModal"];function Rs(n,t){if(n&1&&S(0,"my-video-playlist-miniature",7),n&2){let o=m();u("playlist",o.playlist);}}function bs(n,t){if(n&1&&S(0,"my-action-dropdown",10),n&2){let o=m();u("entry",o.playlist)("actions",o.playlistActions);}}function As(n,t){n&1&&(d(0,"div",12)(1,"div"),g(2,2),s(),d(3,"div"),g(4,3),s(),d(5,"div"),ei(6,4),S(7,"a",16),ti(),s()());}function Ls(n,t){if(n&1){let o=Y();d(0,"div",14)(1,"my-video-playlist-element-miniature",17),P("elementRemoved",function(i){I(o);let r=m();return T(r.onElementRemoved(i));}),s()();}if(n&2){let o=t.$implicit,e=m();u("cdkDragStartDelay",e.getDragStartDelay()),l(),u("playlistElement",o)("playlist",e.playlist)("owned",!0)("position",o.position);}}var Tr=(()=>{let t=class t{hooks=_(Xn);notifier=_(L);router=_(Ue);confirmService=_(qe);route=_(Ie);screenService=_(ai);videoPlaylistService=_(ge);videoShareModal=G("videoShareModal");errored=!1;playlistElements=[];playlist;playlistActions=[];pagination={currentPage:1,itemsPerPage:10,totalItems:null};onDataSubject=new b();videoPlaylistId;paramsSub;ngOnInit(){this.playlistActions=[[{label:"\u66F4\u65B0\u64AD\u653E\u5217\u8868",iconName:"edit",linkBuilder:e=>["/my-library","video-playlists","update",e.shortUUID]},{label:"\u5220\u9664\u64AD\u653E\u5217\u8868",iconName:"delete",handler:e=>this.deleteVideoPlaylist(e)}]],this.paramsSub=this.route.params.subscribe(e=>{this.videoPlaylistId=e.videoPlaylistId,this.loadElements(),this.loadPlaylistInfo();});}ngOnDestroy(){this.paramsSub&&this.paramsSub.unsubscribe();}drop(e){let i=e.previousIndex,r=e.currentIndex;if(i===r)return;let a=this.playlistElements[i].position,c=this.playlistElements[r].position;a>c&&c--;let p=this.playlistElements[i];this.playlistElements.splice(i,1),this.playlistElements.splice(r,0,p),this.videoPlaylistService.reorderVideosOfPlaylist(this.playlist.id,a,c).subscribe({next:()=>{this.reorderClientPositions();},error:y=>this.notifier.handleError(y)});}onElementRemoved(e){let i=this.findFirst();this.playlistElements=this.playlistElements.filter(r=>r.id!==e.id),ri(this.pagination),this.reorderClientPositions(i);}onNearOfBottom(){this.pagination.totalItems<=this.pagination.currentPage*this.pagination.itemsPerPage||(this.pagination.currentPage+=1,this.loadElements());}trackByFn(e,i){return i.id;}isRegularPlaylist(e){return e?.type.id===oi.REGULAR;}showShareModal(){this.videoShareModal().show();}deleteVideoPlaylist(e){return Ye(this,null,function*(){(yield this.confirmService.confirm("\u4F60\u786E\u5B9A\u8981\u5220\u9664 "+e.displayName+" \u5417\uFF1F ","\u5220\u9664"))!==!1&&this.videoPlaylistService.removeVideoPlaylist(e).subscribe({next:()=>{this.router.navigate(["/my-library","video-playlists"]),this.notifier.success("\u64AD\u653E\u5217\u8868 "+e.displayName+" \u5DF2\u5220\u9664\u3002");},error:r=>this.notifier.handleError(r)});});}getDragStartDelay(){return this.screenService.isInTouchScreen()?500:null;}loadElements(){this.hooks.wrapObsFun(this.videoPlaylistService.getPlaylistVideos.bind(this.videoPlaylistService),{videoPlaylistId:this.videoPlaylistId,componentPagination:this.pagination},"my-library","filter:api.my-library.video-playlist-elements.list.params","filter:api.my-library.video-playlist-elements.list.result").subscribe({next:({total:e,data:i})=>{this.playlistElements=this.playlistElements.concat(i),this.pagination.totalItems=e,this.onDataSubject.next(i);},error:e=>{this.errored||(this.notifier.handleError(e),this.errored=!0);}});}loadPlaylistInfo(){this.videoPlaylistService.getVideoPlaylist(this.videoPlaylistId).subscribe({next:e=>{this.playlist=e;},error:e=>{this.errored||(this.notifier.handleError(e),this.errored=!0);}});}reorderClientPositions(e){if(this.playlistElements.length===0)return;let i=e||this.findFirst(),r=1;for(let c of this.playlistElements)c.position=r,r++;let a=this.findFirst();i&&a&&i.id!==a.id&&this.loadPlaylistInfo();}findFirst(){return this.playlistElements.find(e=>e.position===1);}};h(t,"\u0275fac",function(i){return new(i||t)();}),h(t,"\u0275cmp",M({type:t,selectors:[["ng-component"]],viewQuery:function(i,r){i&1&&J(r.videoShareModal,Os,5),i&2&&X();},decls:14,vars:5,consts:()=>{let e;e="\u5206\u4EAB";let i;i="\u64AD\u653E\u5217\u8868\u4E2D\u6CA1\u6709\u89C6\u9891\u3002";let r;r="\u6D4F\u89C8 PeerTube \u4E0A\u7684\u89C6\u9891\uFF0C\u5E76\u5C06\u5B83\u4EEC\u6DFB\u52A0\u5230\u60A8\u7684\u64AD\u653E\u5217\u8868\u4E2D\u3002";let a;return a="\u8BE6\u89C1"+"\uFFFD#7\uFFFD"+"\u6587\u6863"+"\uFFFD/#7\uFFFD"+"\u4E86\u89E3\u66F4\u591A\u4FE1\u606F\u3002",[["videoShareModal",""],e,i,r,a,[1,"root"],[1,"playlist-info"],["toManage","false","displayChannel","true","displayDescription","true","displayPrivacy","true",3,"playlist"],[1,"playlist-buttons"],["icon","share",1,"me-3",3,"click"],["label","More",3,"entry","actions"],[1,"playlist-elements"],[1,"no-results"],["myInfiniteScroller","","cdkDropList","",1,"videos",3,"nearOfBottom","cdkDropListDropped","dataObservable"],["cdkDrag","",1,"video",3,"cdkDragStartDelay"],[3,"playlist"],["target","_blank","href","https://docs.joinpeertube.org/use/library#playlist"],[3,"elementRemoved","playlistElement","playlist","owned","position"]];},template:function(i,r){i&1&&(d(0,"div",5)(1,"div",6),f(2,Rs,1,1,"my-video-playlist-miniature",7),d(3,"div",8)(4,"my-button",9),P("click",function(){return r.showShareModal();}),g(5,1),s(),f(6,bs,1,2,"my-action-dropdown",10),s()(),d(7,"div",11),f(8,As,8,0,"div",12),d(9,"div",13),P("nearOfBottom",function(){return r.onNearOfBottom();})("cdkDropListDropped",function(c){return r.drop(c);}),q(10,Ls,2,5,"div",14,r.trackByFn,!0),s()()(),S(12,"my-video-share",15,0)),i&2&&(l(2),C(r.playlist?2:-1),l(4),C(r.isRegularPlaylist(r.playlist)?6:-1),l(2),C(r.pagination.totalItems===0?8:-1),l(),u("dataObservable",r.onDataSubject.asObservable()),l(),K(r.playlistElements),l(2),u("playlist",r.playlist));},dependencies:[Ke,Mi,it,Je,Pr,Mr,Ao,bo],styles:[`.root[_ngcontent-%COMP%]{display:grid;grid-template-columns:auto 1fr}.playlist-info[_ngcontent-%COMP%]{grid-column:1;display:flex;flex-direction:column;margin-inline-end:1rem}.playlist-buttons[_ngcontent-%COMP%]{display:flex;margin:30px 0 10px}.cdk-drag-preview[_ngcontent-%COMP%]{box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-placeholder[_ngcontent-%COMP%]{opacity:0}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.video[_ngcontent-%COMP%]:last-child{border:0}.videos.cdk-drop-list-dragging[_ngcontent-%COMP%]   .video[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.playlist-elements[_ngcontent-%COMP%]{grid-column:2}my-video-playlist-miniature[_ngcontent-%COMP%]{width:280px}@media screen and (max-width:800px){my-video-playlist-miniature[_ngcontent-%COMP%]{width:201px}}@media screen and (max-width:500px){.root[_ngcontent-%COMP%]{display:block}.playlist-info[_ngcontent-%COMP%]{width:calc(100% + 2 * var(--x-margin-content));padding-top:20px;margin-bottom:10px}my-video-playlist-miniature[_ngcontent-%COMP%], .playlist-buttons[_ngcontent-%COMP%]{margin-inline-start:auto;margin-inline-end:auto}  my-video-playlist-element-miniature .video{padding:5px!important}  my-video-playlist-element-miniature .position{margin-inline-end:.3125rem!important}}
/*# sourceMappingURL=my-video-playlist-elements.component-VX3J4GNJ.css.map */`]}));let n=t;return n;})();var Ns=n=>({"input-error":n}),Ds=n=>["/my-library/video-playlists/update",n];function ws(n,t){if(n&1&&(d(0,"my-alert",14),v(1),s()),n&2){let o=m();l(),R(o.error);}}function xs(n,t){n&1&&(d(0,"li",21),g(1,6),s());}function Ys(n,t){if(n&1&&(d(0,"a",41),v(1),s()),n&2){let o=m(2);u("routerLink",$(2,Ds,o.videoPlaylistToUpdate==null?null:o.videoPlaylistToUpdate.shortUUID)),l(),x(" ",o.videoPlaylistToUpdate==null?null:o.videoPlaylistToUpdate.displayName," ");}}function Vs(n,t){if(n&1&&(d(0,"li",21),g(1,7),s(),d(2,"li",40),f(3,Ys,2,4,"a",41),s()),n&2){let o=m();l(3),C(o.videoPlaylistToUpdate?3:-1);}}function $s(n,t){n&1&&(d(0,"h2",22),g(1,8),s());}function Fs(n,t){n&1&&(d(0,"h2",22),g(1,9),s());}function ks(n,t){if(n&1&&(d(0,"div",30),v(1),s()),n&2){let o=m();l(),x(" ",o.formErrors.displayName," ");}}function Bs(n,t){if(n&1&&(d(0,"div",30),v(1),s()),n&2){let o=m();l(),R(o.formErrors.privacy);}}function zs(n,t){if(n&1&&(d(0,"div",37)(1,"div"),g(2,10),s(),d(3,"div"),g(4,11),s()()),n&2){let o=m();l(2),F(o.getOwnerAccountDisplayName()),k(2);}}function Us(n,t){if(n&1&&(d(0,"div",30),v(1),s()),n&2){let o=m();l(),R(o.formErrors.videoChannelId);}}function Hs(n,t){n&1&&(d(0,"div",25)(1,"my-peertube-checkbox",42),B(2,43),d(3,"span"),g(4,12),s(),S(5,"br"),d(6,"span"),g(7,13),s(),z(),s()());}var Or=(()=>{let t=class t extends bt{formReactiveService=_(Qe);authService=_(D);notifier=_(L);router=_(Ue);route=_(Ie);videoPlaylistService=_(ge);serverService=_(ce);error;paramsSub;ngOnInit(){this.buildForm({displayName:Ci,privacy:Si,description:yi,videoChannelId:vi,thumbnailfile:null}),this.form.get("privacy").valueChanges.subscribe(e=>{Ei(this.form.get("videoChannelId"),e);}),this.paramsSub=this.route.params.pipe(Ce(e=>e.videoPlaylistId),Me(e=>Ht([this.videoPlaylistService.getVideoPlaylist(e),this.serverService.getVideoPlaylistPrivacies(),Ze(this.authService,{includeCollaborations:!0})]))).subscribe({next:([e,i,r])=>{this.videoPlaylistToUpdate=e,this.videoPlaylistPrivacies=i,this.userVideoChannels=r.filter(a=>a.ownerAccountId===this.videoPlaylistToUpdate.ownerAccount.id),this.hydrateFormFromPlaylist();},error:e=>{this.error=e.message;}});}ngOnDestroy(){this.paramsSub&&this.paramsSub.unsubscribe();}formValidated(){this.error=void 0;let e=this.form.value,i={displayName:e.displayName,privacy:e.privacy,description:e.description||null,videoChannelId:e.videoChannelId||null,thumbnailfile:e.thumbnailfile||void 0};this.videoPlaylistService.updateVideoPlaylist(this.videoPlaylistToUpdate,i).subscribe({next:()=>{this.notifier.success("\u64AD\u653E\u5217\u8868 "+i.displayName+" \u5DF2\u66F4\u65B0\u3002"),this.router.navigate(["/my-library","video-playlists"]);},error:r=>{this.error=r.message;}});}isCreation(){return!1;}getFormButtonTitle(){return"\u7F16\u8F91";}isEditor(){return this.videoPlaylistToUpdate?this.videoPlaylistToUpdate?.ownerAccount.id!==this.authService.getUser().account.id:!1;}getOwnerAccountDisplayName(){return this.videoPlaylistToUpdate?.ownerAccount.displayName;}hydrateFormFromPlaylist(){this.form.patchValue({displayName:this.videoPlaylistToUpdate.displayName,privacy:this.videoPlaylistToUpdate.privacy.id,description:this.videoPlaylistToUpdate.description,videoChannelId:this.videoPlaylistToUpdate.videoChannel?this.videoPlaylistToUpdate.videoChannel.id:null}),fetch(this.videoPlaylistToUpdate.getThumbnailUrl(223)).then(e=>e.blob()).then(e=>{this.form.patchValue({thumbnailfile:e});});}};h(t,"\u0275fac",(()=>{let e;return function(r){return(e||(e=ke(t)))(r||t);};})()),h(t,"\u0275cmp",M({type:t,selectors:[["ng-component"]],features:[Le],decls:41,vars:18,consts:()=>{let e;e="\u7F16\u8F91";let i;i="\u6211\u7684\u64AD\u653E\u5217\u8868";let r;r="\u64AD\u653E\u5217\u8868\u7F29\u7565\u56FE";let a;a="\u663E\u793A\u540D\u79F0";let c;c="\u8BF4\u660E";let p;p="\u9690\u79C1";let y;y="\u9891\u9053";let E;E="\u521B\u5EFA";let O;O="\u7F16\u8F91";let w;w="\u65B0\u5EFA\u64AD\u653E\u5217\u8868";let Ae;Ae="\u66F4\u65B0\u64AD\u653E\u5217\u8868";let ot;ot="\u4EC5\u5217\u51FA "+"\uFFFD0\uFFFD"+" \u62E5\u6709\u7684\u9891\u9053\u3002 ";let rt;rt="\u4E0D\u652F\u6301\u66F4\u6539\u64AD\u653E\u5217\u8868\u7684\u6240\u6709\u8005\u3002";let Z;Z="\u5C06\u5176\u63D2\u5165\u5230\u9891\u9053\u64AD\u653E\u5217\u8868\u5217\u8868\u7684\u9996\u4F4D";let at;at="\u60A8\u53EF\u4EE5\u624B\u52A8\u5BF9\u9891\u9053\u4E2D\u7684\u64AD\u653E\u5217\u8868\u8FDB\u884C\u6392\u5E8F\u3002";let xe;return xe="\u9ED8\u8BA4\u60C5\u51B5\u4E0B\uFF0C\u65B0\u6DFB\u52A0\u7684\u64AD\u653E\u5217\u8868\u4F1A\u6DFB\u52A0\u5230\u5217\u8868\u672B\u5C3E\u3002",[i,r,a,c,p,y,E,O,w,Ae,ot,rt,at,xe,["type","danger"],[1,"pt-two-cols"],[1,"title-col"],["aria-label","breadcrumb"],[1,"pt-breadcrumb"],[1,"breadcrumb-item"],["routerLink","/my-library/video-playlists"],[1,"breadcrumb-item","active"],[1,"visually-hidden"],[1,"content-col"],[3,"ngSubmit","formGroup"],[1,"form-group"],["for","thumbnailfile"],["inputLabel",e,"inputName","thumbnailfile","formControlName","thumbnailfile"],["for","displayName"],["type","text","id","displayName","formControlName","displayName",1,"form-control",3,"ngClass"],["role","alert",1,"form-error"],["for","description"],["helpType","markdownText"],["inputId","description","formControlName","description",3,"formError"],["for","privacy"],["inputId","privacy","formControlName","privacy",3,"items"],["for","videoChannelId"],[1,"form-group-description"],["inputId","videoChannelId","formControlName","videoChannelId",3,"items"],["type","submit",1,"peertube-button","primary-button",3,"value","disabled"],["aria-current","page",1,"breadcrumb-item","active"],[3,"routerLink"],["inputName","insertAtFirstPosition","formControlName","insertAtFirstPosition","labelText",Z],["ngProjectAs","description",5,["description"]]];},template:function(i,r){i&1&&(f(0,ws,2,1,"my-alert",14),d(1,"div",15)(2,"div",16)(3,"nav",17)(4,"ol",18)(5,"li",19)(6,"a",20),g(7,0),s()(),f(8,xs,2,0,"li",21)(9,Vs,4,1),s()(),f(10,$s,2,0,"h2",22)(11,Fs,2,0,"h2",22),s(),d(12,"div",23)(13,"form",24),P("ngSubmit",function(){return r.formValidated();}),d(14,"div",25)(15,"label",26),g(16,1),s(),S(17,"my-image-input",27),s(),d(18,"div",25)(19,"label",28),g(20,2),s(),S(21,"input",29),f(22,ks,2,1,"div",30),s(),d(23,"div",25)(24,"label",31),g(25,3),s(),S(26,"my-help",32)(27,"my-markdown-textarea",33),s(),d(28,"div",25)(29,"label",34),g(30,4),s(),S(31,"my-select-options",35),f(32,Bs,2,1,"div",30),s(),d(33,"div",25)(34,"label",36),g(35,5),s(),f(36,zs,5,1,"div",37),S(37,"my-select-channel",38),f(38,Us,2,1,"div",30),s(),f(39,Hs,8,0,"div",25),S(40,"input",39),s()()()),i&2&&(C(r.error?0:-1),l(8),C(r.isCreation()?8:9),l(2),C(r.isCreation()?10:11),l(3),u("formGroup",r.form),l(8),u("ngClass",$(16,Ns,r.formErrors.displayName)),l(),C(r.formErrors.displayName?22:-1),l(5),u("formError",r.formErrors.description),l(4),u("items",r.videoPlaylistPrivacies),l(),C(r.formErrors.privacy?32:-1),l(4),C(r.isEditor()?36:-1),l(),u("items",r.userVideoChannels),l(),C(r.formErrors.videoChannelId?38:-1),l(),C(r.isCreation()&&r.form.value.videoChannelId?39:-1),l(),u("value",Be(r.getFormButtonTitle()))("disabled",!r.form.valid));},dependencies:[de,te,ie,U,Ct,He,j,Ge,je,We,Xe,gi,mi,fi,pi,nt,vt,Te],styles:[`input[type=text][_ngcontent-%COMP%]{font-size:16px;padding:var(--input-y-padding) var(--input-x-padding);width:340px;max-width:340px;color:var(--input-fg);background-color:var(--input-bg);border:var(--input-border-width) solid var(--input-border-color);border-radius:var(--input-border-radius);line-height:24px}input[type=text][_ngcontent-%COMP%]::placeholder{color:var(--input-placeholder-color);font-size:var(--input-placeholder-font-size)}input[type=text][readonly][_ngcontent-%COMP%]{color:var(--fg-300)}input[type=text][_ngcontent-%COMP%]:focus, input[type=text][_ngcontent-%COMP%]:focus-visible{box-shadow:0 0 0 .2rem var(--fg-100);outline:0}input[type=text][disabled][_ngcontent-%COMP%]{color:var(--fg-300);opacity:.8}@media screen and (max-width:380px){input[type=text][_ngcontent-%COMP%]{width:100%}}.peertube-select-container[_ngcontent-%COMP%]{width:340px}@media screen and (max-width:370px){.peertube-select-container[_ngcontent-%COMP%]{width:100%}}my-select-channel[_ngcontent-%COMP%], my-select-options[_ngcontent-%COMP%]{display:block;max-width:340px}.content-col[_ngcontent-%COMP%]{max-width:500px}my-image-input[_ngcontent-%COMP%]{width:223px;height:122px}
/*# sourceMappingURL=my-video-playlist-edit.component-4OG4CYRI.css.map */`]}));let n=t;return n;})();var br=pn(Un());var Gs=n=>({active:n}),Xs=n=>({"has-collaborator-state":n});function Ws(n,t){n&1&&S(0,"my-collaborator-state",4);}function js(n,t){n&1&&S(0,"my-collaborator-state",5);}function Qs(n,t){if(n&1&&f(0,Ws,1,0,"my-collaborator-state",4)(1,js,1,0,"my-collaborator-state",5),n&2){let o=m();C(o.user.isEditorOfChannel(o.channel())?0:1);}}var Li=(()=>{let t=class t{authService=_(D);checked=xt(!1);channel=H.required();inputName=H(void 0);label=H("\u5207\u6362\u8BE5\u9891\u9053");get user(){return this.authService.getUser();}propagateChange=e=>{};writeValue(e){this.checked.set(e);}registerOnChange(e){this.propagateChange=e;}registerOnTouched(){}toggle(){this.checked.set(!this.checked()),this.propagateChange(this.checked());}};h(t,"\u0275fac",function(i){return new(i||t)();}),h(t,"\u0275cmp",M({type:t,selectors:[["my-channel-toggle"]],inputs:{checked:[1,"checked"],channel:[1,"channel"],inputName:[1,"inputName"],label:[1,"label"]},outputs:{checked:"checkedChange"},features:[ze([{provide:bn,useExisting:xi(()=>t),multi:!0}])],decls:6,vars:10,consts:[[1,"root","button-unstyle",3,"click","ngClass","title"],["actorType","channel","size","34",3,"actor"],[1,"info",3,"ngClass"],[1,"name"],["small","true","type","accepted"],["small","true","type","owner"]],template:function(i,r){i&1&&(d(0,"button",0),P("click",function(){return r.toggle();}),S(1,"my-actor-avatar",1),d(2,"div",2)(3,"div",3),v(4),s(),f(5,Qs,2,1),s()()),i&2&&(u("ngClass",$(6,Gs,r.checked()))("title",r.label()),l(),u("actor",r.channel()),l(),u("ngClass",$(8,Xs,r.user.isCollaboratingToChannels())),l(2),R(r.channel().displayName),l(),C(r.user.isCollaboratingToChannels()?5:-1));},dependencies:[de,te,et,tt],styles:[`.root[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;text-align:start;line-height:1.2;padding-inline-start:17px}.root[_ngcontent-%COMP%]:hover{opacity:.9}.info[_ngcontent-%COMP%]{border-radius:4px;background-color:var(--bg-secondary-400);max-width:150px;padding-top:.75rem;padding-bottom:.75rem;padding-inline-start:25px;padding-inline-end:1rem}.info[_ngcontent-%COMP%]   .name[_ngcontent-%COMP%]{color:var(--fg-400);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:.875rem}.info.has-collaborator-state[_ngcontent-%COMP%]{padding-top:.5rem;padding-bottom:.5rem}my-actor-avatar[_ngcontent-%COMP%]{position:absolute;left:0;border:2px solid var(--bg-secondary-400);border-radius:5px}.root.active[_ngcontent-%COMP%]   .info[_ngcontent-%COMP%]{background-color:var(--bg-secondary-450)}.root.active[_ngcontent-%COMP%]   .name[_ngcontent-%COMP%]{font-weight:700}.root.active[_ngcontent-%COMP%]   my-actor-avatar[_ngcontent-%COMP%]{border-color:var(--bg-secondary-450);background-color:var(--bg-secondary-450)}
/*# sourceMappingURL=channel-toggle.component-ONNTWUQO.css.map */`]}));let n=t;return n;})();var Zs=["table"],qs=n=>["/my-library/video-playlists",n],Ks=n=>["/c",n],Js=n=>["update",n],el=(n,t)=>t.id;function tl(n,t){if(n&1){let o=Y();d(0,"my-channel-toggle",18),se("ngModelChange",function(i){let r=I(o).$implicit;return ae(r.selected,i)||(r.selected=i),T(i);}),P("ngModelChange",function(){let i=I(o).$implicit,r=m();return T(r.onChannelFilter(i));}),s();}if(n&2){let o=t.$implicit;u("channel",o),re("ngModel",o.selected);}}function il(n,t){if(n&1&&(B(0),g(1,9),W(2,"myNumberFormatter"),z()),n&2){let o=m().$implicit,e=m();l(2),F(o)(le(2,3,o))(e.getFilteredChannel().displayName),k(1);}}function nl(n,t){if(n&1&&(B(0),g(1,10),W(2,"myNumberFormatter"),z()),n&2){let o=m().$implicit;l(2),F(o)(le(2,2,o)),k(1);}}function ol(n,t){if(n&1&&f(0,il,3,5,"ng-container")(1,nl,3,4,"ng-container"),n&2){let o=m();C(o.getFilteredChannel()?0:1);}}function rl(n,t){n&1&&(d(0,"a",19),S(1,"my-global-icon",20),B(2),g(3,11),z(),s());}function al(n,t){if(n&1&&(d(0,"td",21),v(1),s()),n&2){let o=m().$implicit;l(),x(" ",o.videoChannelPosition," ");}}function sl(n,t){if(n&1&&(d(0,"td"),S(1,"my-video-playlist-miniature",22),s()),n&2){let o=m().$implicit;l(),u("playlist",o);}}function ll(n,t){n&1&&S(0,"my-collaborator-state",26);}function dl(n,t){n&1&&S(0,"my-collaborator-state",27);}function cl(n,t){if(n&1&&f(0,ll,1,0,"my-collaborator-state",26)(1,dl,1,0,"my-collaborator-state",27),n&2){let o=m(3).$implicit,e=m();C(e.user.isOwnerOfChannel(o.videoChannel)?0:e.user.isEditorOfChannel(o.videoChannel)?1:-1);}}function _l(n,t){if(n&1&&(d(0,"a",25)(1,"span"),v(2),s(),f(3,cl,2,1),s()),n&2){let o=m(2).$implicit,e=m();u("routerLink",$(3,Ks,o.videoChannel.name)),l(2),R(o.videoChannel.displayName),l(),C(e.user.isCollaboratingToChannels()?3:-1);}}function pl(n,t){if(n&1&&(d(0,"td")(1,"div",23)(2,"a",24),v(3),s(),f(4,_l,4,5,"a",25),s()()),n&2){let o=m().$implicit;l(2),u("routerLink",$(3,qs,o.shortUUID)),l(),x(" ",o.displayName," "),l(),C(o.videoChannel?4:-1);}}function ml(n,t){if(n&1&&(d(0,"td"),S(1,"my-privacy-badge",28),s()),n&2){let o=m().$implicit;l(),u("playlist",o);}}function ul(n,t){if(n&1&&(d(0,"td"),v(1),W(2,"ptDate"),s()),n&2){let o=m().$implicit;l(),x(" ",ve(2,1,o.updatedAt,"short")," ");}}function hl(n,t){if(n&1&&(f(0,al,2,1,"td",21),f(1,sl,2,1,"td"),f(2,pl,5,5,"td"),f(3,ml,2,1,"td"),f(4,ul,3,4,"td")),n&2){m();let o=ne(9);C(o.isColumnDisplayed("videoChannelPosition")?0:-1),l(),C(o.isColumnDisplayed("videos")?1:-1),l(),C(o.isColumnDisplayed("name")?2:-1),l(),C(o.isColumnDisplayed("privacy")?3:-1),l(),C(o.isColumnDisplayed("updatedAt")?4:-1);}}function gl(n,t){if(n&1){let o=Y();S(0,"my-edit-button",29),d(1,"my-delete-button",30),P("click",function(){I(o);let i=m().$implicit,r=m();return T(r.deleteVideoPlaylist(i));}),s();}if(n&2){let o=m().$implicit;u("ptRouterLink",$(1,Js,o.shortUUID));}}function fl(n,t){if(n&1&&f(0,gl,2,3),n&2){let o=t.$implicit,e=m();C(e.isRegularPlaylist(o)?0:-1);}}function Cl(n,t){if(n&1&&v(0),n&2){let o=t.$implicit;x(" ",o.description," ");}}function Sl(n,t){if(n&1&&v(0),n&2){let o=t.search,e=t.hasFilters,i=m();x(" ",i.getNoResults(!!o||e)," ");}}var Rr=(0,br.default)("peertube:my-video-playlists"),Ar=(()=>{let t=class t{notifier=_(L);confirmService=_(qe);videoPlaylistService=_(ge);auth=_(D);headerService=_(li);cdr=_(gt);screenService=_(ai);table=G("table");user;channels=[];onDataSubject=new b();columns=[];customUpdateUrl;customParseQueryParams;dataLoader;hasExpandedRow;playlistsAfterDrop=[];playlistsBeforeDrop=[];paginationStart=0;constructor(){this.customUpdateUrl=this._customUpdateUrl.bind(this),this.customParseQueryParams=this._customParseQueryParams.bind(this),this.dataLoader=this._dataLoader.bind(this),this.hasExpandedRow=this._hasExpandedRow.bind(this);}ngOnInit(){this.headerService.setSearchHidden(!0),this.user=this.auth.getUser(),this.columns=[{id:"videoChannelPosition",label:"\u4F4D\u7F6E",selected:!0,sortable:!0,isDisplayed:()=>this.hasReorderableRows()},{id:"videos",label:"\u89C6\u9891",selected:!0,sortable:!1},{id:"name",label:"\u540D\u79F0",selected:!0,sortable:!0},{id:"privacy",label:"\u9690\u79C1",selected:!0,sortable:!1},{id:"updatedAt",label:"\u5DF2\u66F4\u65B0",selected:!0,sortable:!0}];}ngOnDestroy(){this.headerService.setSearchHidden(!1);}_customParseQueryParams(e){this.user=this.auth.getUser(),this.channels=[...this.user.videoChannels,...this.user.videoChannelCollaborations].map(i=>pe(_e({},i),{selected:e.channelName===i.name})),this.cdr.detectChanges();}getNoResults(e){return e?"No playlists found matching your filters.":this.getFilteredChannel()?"\u5728\u6240\u9009\u9891\u9053\u4E2D\u672A\u627E\u5230\u64AD\u653E\u5217\u8868\u3002":"\u4F60\u5C1A\u672A\u53D1\u5E03\u4EFB\u4F55\u64AD\u653E\u5217\u8868\u3002";}_customUpdateUrl(){return{channelName:this.getFilteredChannel()?.name};}deleteVideoPlaylist(e){return Ye(this,null,function*(){(yield this.confirmService.confirm("\u4F60\u786E\u5B9A\u8981\u5220\u9664 "+e.displayName+" \u5417\uFF1F ","\u5220\u9664"))!==!1&&this.videoPlaylistService.removeVideoPlaylist(e).subscribe({next:()=>{this.table().loadData(),this.notifier.success("\u64AD\u653E\u5217\u8868 "+e.displayName+" \u5DF2\u5220\u9664\u3002");},error:r=>this.notifier.handleError(r)});});}isRegularPlaylist(e){return e.type.id===oi.REGULAR;}onRowReorder(e){let{dragIndex:i,dropIndex:r}=e,a=i-this.paginationStart,c=r-this.paginationStart,p=this.playlistsBeforeDrop[a],y=this.playlistsBeforeDrop[c];if(Rr("onRowReorder",{previousIndex:a,newIndex:c,dragPlaylist:p,dropAfterPlaylist:y}),a===c)return;let E=p.videoChannelPosition,O=y.videoChannelPosition;E>O&&O--,Rr("Will reorder",{oldPosition:E,insertAfter:O});for(let w=1;w<=this.playlistsAfterDrop.length;w++)this.playlistsAfterDrop[w-1].videoChannelPosition=w+this.paginationStart;this.videoPlaylistService.reorderPlaylistsOfChannel(this.getFilteredChannel().name,E,O).subscribe({next:()=>{this.table().loadData({skipLoader:!this.screenService.isInTouchScreen()}),this.notifier.success("\u91CD\u65B0\u6392\u5217\u4E86\u64AD\u653E\u5217\u8868\u987A\u5E8F");},error:w=>this.notifier.handleError(w)});}onChannelFilter(e){for(let i of this.channels)i.id!==e.id&&(i.selected=!1);this.table().onFiltersChange();}hasReorderableRows(){return!!this.getFilteredChannel();}_dataLoader(e){let{pagination:i,sort:r,search:a}=e;this.paginationStart=i.start;let c=this.getFilteredChannel();return(c?this.videoPlaylistService.listChannelPlaylists({videoChannel:{nameWithHost:zn.CREATE_BY_STRING(c.name,c.host)},includeCollaborations:!0,restPagination:i,sort:r,search:a}):this.videoPlaylistService.listAccountPlaylists({account:this.user.account,includeCollaborations:!0,restPagination:i,sort:r,search:a})).pipe(Ve(({data:y})=>{this.playlistsAfterDrop=y,this.playlistsBeforeDrop=[...y];}));}_hasExpandedRow(e){return!!e.description;}getFilteredChannel(){return this.channels.find(e=>e.selected);}};h(t,"\u0275fac",function(i){return new(i||t)();}),h(t,"\u0275cmp",M({type:t,selectors:[["ng-component"]],viewQuery:function(i,r){i&1&&J(r.table,Zs,5),i&2&&X();},decls:22,vars:6,consts:()=>{let e;e="\u6BCF\u4E00\u9875\u64AD\u653E\u5217\u8868";let i;i="\u62D6\u653E\u6B64\u884C\u91CD\u65B0\u6392\u5217\u4F60\u9891\u9053\u4E2D\u64AD\u653E\u5217\u8868\u7684\u987A\u5E8F";let r;r="\u6309\u9891\u9053\u7B5B\u9009";let a;a="\u8FD9\u5141\u8BB8\u4F60\u91CD\u65B0\u6392\u5217\u5206\u914D\u7ED9\u5B83\u7684\u64AD\u653E\u5217\u8868\u7684\u987A\u5E8F";let c;c="{VAR_PLURAL, plural, =0 {\u65E0\u64AD\u653E\u5217\u8868} =1 {1 \u4E2A\u64AD\u653E\u5217\u8868} other {{INTERPOLATION} \u4E2A\u64AD\u653E\u5217\u8868}}",c=ee(c,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let p;p=""+c+" \uFF0C\u4F4D\u4E8E "+"\uFFFD2\uFFFD"+" \u9891\u9053";let y;y="{VAR_PLURAL, plural, =0 {\u65E0\u64AD\u653E\u5217\u8868} =1 {1 \u4E2A\u64AD\u653E\u5217\u8868} other {{INTERPOLATION} \u4E2A\u64AD\u653E\u5217\u8868}}",y=ee(y,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let E;return E="\u521B\u5EFA\u64AD\u653E\u5217\u8868",[["table",""],["totalTitle",""],["captionRight",""],["tableCells",""],["actionCell",""],["expandedRow",""],["noResults",""],r,a,p,y,E,[1,"form-group"],[1,"label"],[1,"form-group-description"],[1,"channel-filters"],[3,"channel","ngModel"],["key","MyVideoPlaylistsComponent","defaultSort","updatedAt","paginatorText",e,"defaultRowsPerPage","10","columnConfig","false","searchInput","true","dragHandleTitle",i,3,"rowReorder","defaultColumns","dataLoader","customParseQueryParams","customUpdateUrl","hasExpandedRow","reorderableRows"],[3,"ngModelChange","channel","ngModel"],["routerLink","create",1,"peertube-create-button"],["iconName","add","aria-hidden","true"],[2,"width","10px"],["thumbnailOnly","true","toManage","true",3,"playlist"],[1,"name-container"],[1,"name",3,"routerLink"],[1,"channel-sub-link-in-cell",3,"routerLink"],["type","owner","small","true",1,"ms-2"],["type","accepted","small","true",1,"ms-2"],[3,"playlist"],["label","",3,"ptRouterLink"],["label","",3,"click"]];},template:function(i,r){i&1&&(d(0,"div",12)(1,"div",13),g(2,7),s(),d(3,"div",14),g(4,8),s(),d(5,"div",15),q(6,tl,1,2,"my-channel-toggle",16,el),s()(),d(8,"my-table",17,0),P("rowReorder",function(c){return r.onRowReorder(c);}),Q(10,ol,2,1,"ng-template",null,1,N)(12,rl,4,0,"ng-template",null,2,N)(14,hl,5,5,"ng-template",null,3,N)(16,fl,1,1,"ng-template",null,4,N)(18,Cl,1,1,"ng-template",null,5,N)(20,Sl,1,1,"ng-template",null,6,N),s()),i&2&&(l(6),K(r.channels),l(2),u("defaultColumns",r.columns)("dataLoader",r.dataLoader)("customParseQueryParams",r.customParseQueryParams)("customUpdateUrl",r.customUpdateUrl)("hasExpandedRow",r.hasExpandedRow)("reorderableRows",r.hasReorderableRows()));},dependencies:[U,j,ue,he,ie,Mi,hi,go,Li,be,Ii,Ir,tt,Oe,Re],styles:[`.channel-filters[_ngcontent-%COMP%]{display:flex;align-items:center;padding-bottom:1rem;border-bottom:1px solid var(--bg-secondary-400);margin-bottom:1rem;gap:1rem;overflow:hidden}.channel-filters[_ngcontent-%COMP%]:hover{overflow:auto}.name[_ngcontent-%COMP%]{color:var(--fg);line-height:1rem;font-weight:700;text-decoration:none}.name-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}my-video-playlist-miniature[_ngcontent-%COMP%]{display:block;width:130px}
/*# sourceMappingURL=my-video-playlists.component-BYPSTI5W.css.map */`]}));let n=t;return n;})();var Lr=(()=>{let t=class t{serverService=_(ce);newFeatureInfoService=_(Oi);menuEntries=[];serverConfig;ngOnInit(){this.serverConfig=this.serverService.getHTMLConfig(),this.buildMenu(),this.newFeatureInfoService.showChannelCollaboration();}buildMenu(){this.menuEntries=[{label:"\u7BA1\u7406\u6211\u7684\u89C6\u9891",routerLink:"/my-library/videos"},{label:"\u8BC4\u8BBA",routerLink:"/my-library/comments-on-my-videos",children:[{label:"\u6211\u7684\u89C6\u9891\u8BC4\u8BBA",routerLink:"/my-library/comments-on-my-videos"},{label:"\u5DF2\u5173\u6CE8\u7684\u8BCD\u8BED",routerLink:"/my-library/watched-words/list"},{label:"Watched words subscriptions",routerLink:"/my-library/watched-words/subscriptions"},{label:"\u81EA\u52A8\u6807\u8BB0\u653F\u7B56",routerLink:"/my-library/auto-tag-policies"}]},{label:"\u66F4\u591A",routerLink:this.isVideoImportEnabled()?"/my-library/video-imports":"/my-library/ownership",children:[{label:"\u5BFC\u5165",routerLink:"/my-library/video-imports",isDisplayed:()=>this.isVideoImportEnabled()},{label:"\u89C6\u9891\u8F6C\u79FB",routerLink:"/my-library/ownership"}]}];}isVideoImportEnabled(){let e=this.serverConfig.import.videos;return e.http.enabled||e.torrent.enabled;}};h(t,"\u0275fac",function(i){return new(i||t)();}),h(t,"\u0275cmp",M({type:t,selectors:[["ng-component"]],decls:8,vars:1,consts:()=>{let e;e="\u6211\u7684\u89C6\u9891";let i;return i="\u8DF3\u8FC7\u5B50\u83DC\u5355",[["myVideoSpaceContent",""],i,[1,"root"],[1,"margin-content"],["href","#my-video-space-content",1,"visually-hidden-focusable","skip-to-content-sub-menu",3,"click"],["h1Icon","videos","h1",e,3,"menuEntries"],["tabindex","-1","id","my-video-space-content",1,"margin-content","pb-5","outline-0"]];},template:function(i,r){if(i&1){let a=Y();d(0,"div",2)(1,"div",3)(2,"a",4),P("click",function(p){I(a);let y=ne(6);return p.preventDefault(),T(y.focus());}),g(3,1),s(),S(4,"my-horizontal-menu",5),s(),d(5,"div",6,0),S(7,"router-outlet"),s()();}i&2&&(l(4),u("menuEntries",r.menuEntries));},dependencies:[ft,Et],encapsulation:2}));let n=t;return n;})();var Nr=pn(Un());var yl=["modal"];function vl(n,t){n&1&&S(0,"my-collaborator-state",20);}function El(n,t){n&1&&S(0,"my-collaborator-state",21);}function Ml(n,t){if(n&1&&f(0,vl,1,0,"my-collaborator-state",20)(1,El,1,0,"my-collaborator-state",21),n&2){let o=m().$implicit,e=m(2);C(e.user.isOwnerOfChannel(o.videoChannel)?0:e.user.isEditorOfChannel(o.videoChannel)?1:-1);}}function Pl(n,t){if(n&1){let o=Y();d(0,"div",12)(1,"my-peertube-checkbox",19),se("ngModelChange",function(i){let r=I(o).$implicit,a=m(2);return ae(a.playlistsEnabled[r.id],i)||(a.playlistsEnabled[r.id]=i),T(i);}),s(),f(2,Ml,2,1),s();}if(n&2){let o=t.$implicit,e=m(2);l(),u("inputName",e.getPrimaryInputName(o)),re("ngModel",e.playlistsEnabled[o.id]),u("labelText",o.displayName),l(),C(e.user.isCollaboratingToChannels()?2:-1);}}function Il(n,t){if(n&1){let o=Y();d(0,"my-playlist-create-block",22),P("playlistCreated",function(){I(o);let i=m(2);return T(i.onPlaylistCreated());}),s();}}function Tl(n,t){if(n&1){let o=Y();d(0,"div",4)(1,"h4",5),g(2,1),s(),d(3,"button",6),P("click",function(){I(o);let i=m();return T(i.hide());}),S(4,"my-global-icon",7),s()(),d(5,"div",8)(6,"div",9)(7,"input",10),se("ngModelChange",function(i){I(o);let r=m();return ae(r.videoPlaylistSearch,i)||(r.videoPlaylistSearch=i),T(i);}),P("ngModelChange",function(){I(o);let i=m();return T(i.onVideoPlaylistSearchChanged());}),s()(),d(8,"div",11),q(9,Pl,3,4,"div",12,ye),s(),d(11,"button",13),P("click",function(){I(o);let i=m();return T(i.isNewPlaylistBlockOpened=!0);}),S(12,"my-global-icon",14),d(13,"span"),g(14,2),s()(),f(15,Il,1,0,"my-playlist-create-block",15),s(),d(16,"div",16)(17,"input",17),P("click",function(){I(o);let i=m();return T(i.hide());})("key.enter",function(){I(o);let i=m();return T(i.hide());}),s(),d(18,"my-button",18),P("click",function(){I(o);let i=m();return T(i.save());}),g(19,3),s()();}if(n&2){let o=m();l(7),re("ngModel",o.videoPlaylistSearch),l(2),K(o.currentPlaylists),l(2),u("hidden",o.isNewPlaylistBlockOpened),l(4),C(o.isNewPlaylistBlockOpened?15:-1),l(3),u("loading",o.updatingPlaylists)("disabled",o.updatingPlaylists);}}var Ol=(0,Nr.default)("peertube:playlists:BulkUpdateVideosInPlaylistModalComponent"),Dr=(()=>{let t=class t{authService=_(D);notifier=_(L);videoPlaylistService=_(ge);modalService=_(yt);saved=ni();videos;videoPlaylistSearch;videoPlaylistSearchChanged=new b();seenPlaylists={};currentPlaylists=[];elementsPerPlaylist={};playlistsEnabled={};initialPlaylistsEnabled={};isNewPlaylistBlockOpened=!1;updatingPlaylists=!1;modal=G("modal");openedModal;videosContainedInPlaylists;listenToAccountPlaylistsChangeSub;get user(){return this.authService.getUser();}get videoIds(){return this.videos.map(e=>e.id);}ngOnInit(){this.videoPlaylistService.listMyPlaylistWithCache(this.user,this.videoPlaylistSearch).subscribe(e=>this.currentPlaylists=e.data),this.listenToAccountPlaylistsChangeSub=this.videoPlaylistService.listenToMyAccountPlaylistsChange().subscribe(e=>{this.currentPlaylists=e.data,this.rebuildPlaylists();}),this.videoPlaylistSearchChanged.pipe(fn(500),Me(()=>this.videoPlaylistService.listMyPlaylistWithCache(this.user,this.videoPlaylistSearch))).subscribe(({data:e})=>{this.currentPlaylists=e,this.rebuildPlaylists();});}ngOnDestroy(){this.listenToAccountPlaylistsChangeSub?.unsubscribe();}show(e){this.videos=e.videos,this.videosContainedInPlaylists=e.videosContainedInPlaylists,this.elementsPerPlaylist={},this.playlistsEnabled={},this.initialPlaylistsEnabled={},this.isNewPlaylistBlockOpened=!1,this.rebuildPlaylists(),this.openedModal=this.modalService.open(this.modal(),{centered:!0,keyboard:!1});}hide(){this.openedModal.close();}rebuildPlaylists(){if(this.videosContainedInPlaylists){for(let e of this.currentPlaylists)this.elementsPerPlaylist[e.id]=[],this.seenPlaylists[e.id]=e;for(let[e,i]of Object.entries(this.videosContainedInPlaylists))for(let r of i)this.elementsPerPlaylist[r.playlistId]&&this.elementsPerPlaylist[r.playlistId].push({videoId:+e,playlistElementId:r.playlistElementId});for(let[e,i]of Object.entries(this.elementsPerPlaylist)){let r=+e;this.playlistsEnabled[r]===void 0&&(this.playlistsEnabled[r]=Dn(i.map(a=>a.videoId)).length===this.videoIds.length,this.initialPlaylistsEnabled[r]=this.playlistsEnabled[r]);}Ol("Rebuilt playlists, enabled playlists:",this.playlistsEnabled);}}onVideoPlaylistSearchChanged(){this.videoPlaylistSearchChanged.next();}getPrimaryInputName(e){return"videos-update-playlist-"+e.id;}save(){let e=[];this.updatingPlaylists=!0;for(let[i,r]of Object.entries(this.playlistsEnabled)){let a=+i,c=this.seenPlaylists[a],p=this.initialPlaylistsEnabled[a];r&&!p?e.push(this.addVideosInPlaylist(c)):!r&&p&&e.push(this.removeVideosFromPlaylist(c));}if(e.length===0){this.updatingPlaylists=!1,this.notifier.info("No change to save"),this.hide();return;}un(...e).subscribe({next:i=>{i.type==="success"?this.notifier.success(i.message):this.notifier.error(i.message);},error:i=>this.notifier.handleError(i),complete:()=>{this.updatingPlaylists=!1,this.hide(),this.saved.emit(this.videos);}});}addVideosInPlaylist(e){let i=new Set(this.elementsPerPlaylist[e.id].map(a=>a.videoId)),r=this.videos.filter(a=>!i.has(a.id)).map(a=>({videoId:a.id}));return this.videoPlaylistService.addVideoInPlaylist(e.id,r).pipe(Ce(a=>({type:"success",message:me("{count, plural, =1 {Video added} other {{count} videos added}} to {playlistName}",{count:a.length,playlistName:e.displayName})})),wi(a=>lt({type:"error",message:a.message})));}removeVideosFromPlaylist(e){return this.videoPlaylistService.removeElementsFromPlaylist({playlistId:e.id,elements:this.elementsPerPlaylist[e.id].map(i=>({playlistElementId:i.playlistElementId,videoId:i.videoId}))}).pipe(Ce(i=>({type:"success",message:me("{count, plural, =1 {Video removed} other {{count} videos removed}} from {playlistName}",{count:i.length,playlistName:e.displayName})})),wi(i=>lt({type:"error",message:i.message})));}onPlaylistCreated(){this.isNewPlaylistBlockOpened=!1,this.rebuildPlaylists();}};h(t,"\u0275fac",function(i){return new(i||t)();}),h(t,"\u0275cmp",M({type:t,selectors:[["my-bulk-update-videos-in-playlist-modal"]],viewQuery:function(i,r){i&1&&J(r.modal,yl,5),i&2&&X();},outputs:{saved:"saved"},decls:2,vars:0,consts:()=>{let e;e="\u5173\u95ED\u6B64\u6A21\u5F0F";let i;i="\u641C\u7D22\u64AD\u653E\u5217\u8868";let r;r="\u53D6\u6D88";let a;a="Update videos in playlists";let c;c="\u521B\u5EFA\u79C1\u4EAB\u64AD\u653E\u5217\u8868";let p;return p="\u4FDD\u5B58",[["modal",""],a,c,p,[1,"modal-header"],[1,"modal-title"],["title",e,1,"border-0","p-0",3,"click"],["iconName","cross"],[1,"modal-body"],[1,"mb-4"],["type","text","placeholder",i,3,"ngModelChange","ngModel"],[1,"playlists"],[1,"playlist","d-flex","gap-2","mb-2"],[1,"mt-4","peertube-button","secondary-button",3,"click","hidden"],["iconName","add","aria-hidden","true"],[1,"d-block","mt-3","pt-3"],[1,"modal-footer","inputs"],["type","button","role","button","value",r,1,"peertube-button","secondary-button",3,"click","key.enter"],["theme","primary",3,"click","loading","disabled"],[3,"ngModelChange","inputName","ngModel","labelText"],["type","owner","small","true",1,"ms-2"],["type","accepted","small","true",1,"ms-2"],[1,"d-block","mt-3","pt-3",3,"playlistCreated"]];},template:function(i,r){i&1&&Q(0,Tl,20,5,"ng-template",null,0,N);},dependencies:[U,He,j,ue,Te,he,tt,Ke,io],styles:[`my-peertube-checkbox[_ngcontent-%COMP%]{align-self:center;margin-inline-end:.625rem}.display-name[_ngcontent-%COMP%]{display:flex;align-items:flex-end;flex-grow:1;margin:0;font-weight:400;cursor:pointer;font-size:1rem}my-playlist-create-block[_ngcontent-%COMP%]{border-top:1px solid var(--bg-secondary-400)}input[type=text][_ngcontent-%COMP%]{font-size:16px;padding:var(--input-y-padding) var(--input-x-padding);width:100%;max-width:100%;color:var(--input-fg);background-color:var(--input-bg);border:var(--input-border-width) solid var(--input-border-color);border-radius:var(--input-border-radius);line-height:24px}input[type=text][_ngcontent-%COMP%]::placeholder{color:var(--input-placeholder-color);font-size:var(--input-placeholder-font-size)}input[type=text][readonly][_ngcontent-%COMP%]{color:var(--fg-300)}input[type=text][_ngcontent-%COMP%]:focus, input[type=text][_ngcontent-%COMP%]:focus-visible{box-shadow:0 0 0 .2rem var(--fg-100);outline:0}input[type=text][disabled][_ngcontent-%COMP%]{color:var(--fg-300);opacity:.8}@media screen and (max-width: calc(100% + 40px)){input[type=text][_ngcontent-%COMP%]{width:100%}}
/*# sourceMappingURL=bulk-update-videos-in-playlist-modal.component-QYTOXLMX.css.map */`]}));let n=t;return n;})();function Rl(n,t){if(n&1&&(d(0,"span",0),v(1),s()),n&2){let o=m();u("ngClass",o.badgeClass),l(),R(o.label);}}var wr=(()=>{let t=class t{video=H.required();label;badgeClass;ngOnChanges(){this.buildBadgeAndLabel();}buildBadgeAndLabel(){let e=this.video();if(!e.state){this.label="";return;}let i=e.state.id;switch(this.badgeClass=yo(e.state.id),i){case Hi.PUBLISHED:if(e.privacy.id===De.PRIVATE){this.label="\u5728\u4F60\u7684\u5E93\u4E2D",this.badgeClass="badge-grey";return;}if(e.privacy.id===De.INTERNAL){this.label="\u5185\u90E8",this.badgeClass="badge-blue";return;}this.label=Qi(e.state.id);return;case Hi.TO_TRANSCODE:this.label=this.video().waitTranscoding===!0?"\u8F6C\u7801\u4E2D":"\u5F85\u8F6C\u7801";return;default:this.label=Qi(e.state.id);}}};h(t,"\u0275fac",function(i){return new(i||t)();}),h(t,"\u0275cmp",M({type:t,selectors:[["my-video-state-badge"]],inputs:{video:[1,"video"]},features:[Dt],decls:1,vars:1,consts:[[1,"pt-badge",3,"ngClass"]],template:function(i,r){i&1&&f(0,Rl,2,2,"span",0),i&2&&C(r.label?0:-1);},dependencies:[de,te],encapsulation:2}));let n=t;return n;})();var bl=["table"],Al=["bulkUpdateVideosInPlaylistModal"],Ll=["bulkUpdateVideosModal"],Nl=n=>({tagsOneOf:n}),Dl=n=>({privacyOneOf:n}),wl=n=>["/videos/manage",n,"stats"],xl=()=>[],Yl=n=>["/w/p/",n],Vl=n=>["/videos","manage",n],$l=(n,t)=>t.id;function Fl(n,t){if(n&1){let o=Y();d(0,"my-channel-toggle",18),se("ngModelChange",function(i){let r=I(o).$implicit;return ae(r.selected,i)||(r.selected=i),T(i);}),P("ngModelChange",function(){I(o),m();let i=ne(6);return T(i.onFiltersChange());}),s();}if(n&2){let o=t.$implicit;u("channel",o),re("ngModel",o.selected);}}function kl(n,t){if(n&1&&(B(0),g(1,8),W(2,"myNumberFormatter"),z()),n&2){let o=t.$implicit;l(2),F(o)(le(2,2,o)),k(1);}}function Bl(n,t){if(n&1&&(d(0,"td"),S(1,"my-video-cell",19),s()),n&2){let o=m().$implicit;l(),u("video",o);}}function zl(n,t){if(n&1&&(d(0,"td"),S(1,"my-video-cell",20),s()),n&2){let o=m().$implicit;l(),u("video",o);}}function Ul(n,t){if(n&1&&(d(0,"a",22),v(1),s()),n&2){let o=t.$implicit;u("queryParams",$(2,Nl,o)),l(),x(" ",o," ");}}function Hl(n,t){if(n&1&&(d(0,"td")(1,"div",21),q(2,Ul,2,4,"a",22,ye),s()()),n&2){let o=m().$implicit;l(2),K(o.tags);}}function Gl(n,t){if(n&1&&(d(0,"span",26),g(1,9),s()),n&2){let o=m(2).$implicit;u("ngbTooltip",o.blacklistedReason);}}function Xl(n,t){if(n&1&&(d(0,"td")(1,"div",23)(2,"a",24),S(3,"my-privacy-badge",25),s(),f(4,Gl,2,1,"span",26),s()()),n&2){let o=m().$implicit,e=m();l(2),u("queryParams",$(4,Dl,o.privacy.id))("title",e.getPrivacyFilterTitle(o.privacy.label)),l(),u("video",o),l(),C(o.blacklisted?4:-1);}}function Wl(n,t){if(n&1&&(d(0,"td"),S(1,"my-video-nsfw-badge",27),s()),n&2){let o=m().$implicit;l(),u("video",o);}}function jl(n,t){if(n&1&&(S(0,"br"),B(1),g(2,11),W(3,"myNumberFormatter"),z()),n&2){let o=m(2).$implicit;l(3),F(o.viewers)(le(3,2,o.views)),k(2);}}function Ql(n,t){if(n&1&&(d(0,"td")(1,"a",28),B(2),g(3,10),W(4,"myNumberFormatter"),z(),f(5,jl,4,4),s()()),n&2){let o=m().$implicit;l(),u("routerLink",$(6,wl,o.shortUUID)),l(3),F(o.views)(le(4,4,o.views)),k(3),l(),C(o.isLive?5:-1);}}function Zl(n,t){if(n&1&&(d(0,"td")(1,"span"),g(2,12),W(3,"myNumberFormatter"),s()()),n&2){let o=m().$implicit;l(3),F(o.comments)(le(3,2,o.comments)),k(2);}}function ql(n,t){if(n&1&&(d(0,"td"),v(1),W(2,"ptDate"),s()),n&2){let o=m().$implicit;l(),x(" ",ve(2,1,o.publishedAt,"short")," ");}}function Kl(n,t){if(n&1&&(d(0,"td"),S(1,"my-video-state-badge",27),s()),n&2){let o=m().$implicit;l(),u("video",o);}}function Jl(n,t){if(n&1&&v(0),n&2){let o=m(2).$implicit;x(" ",o.category.label," ");}}function ed(n,t){if(n&1&&(d(0,"td"),f(1,Jl,1,1),s()),n&2){let o=m().$implicit;l(),C(o.category!=null&&o.category.id?1:-1);}}function td(n,t){if(n&1&&v(0),n&2){let o=m(2).$implicit;x(" ",o.language.label," ");}}function id(n,t){if(n&1&&(d(0,"td"),f(1,td,1,1),s()),n&2){let o=m().$implicit;l(),C(o.language!=null&&o.language.id?1:-1);}}function nd(n,t){if(n&1&&v(0),n&2){let o=m(2).$implicit;x(" ",o.licence.label," ");}}function od(n,t){if(n&1&&(d(0,"td"),f(1,nd,1,1),s()),n&2){let o=m().$implicit;l(),C(o.licence!=null&&o.licence.id?1:-1);}}function rd(n,t){if(n&1&&(d(0,"a",31),v(1),s()),n&2){let o=t.$implicit,e=m(3);En(e.getPlaylistBadge(o.playlistDisplayName)),u("routerLink",$(4,Yl,o.playlistShortUUID)),l(),x(" ",o.playlistDisplayName," ");}}function ad(n,t){if(n&1&&(d(0,"td")(1,"div",29),q(2,rd,2,6,"a",30,ye),s()()),n&2){let o=m().$implicit,e=m();l(2),K(e.videosContainedInPlaylists[o.id]||Mn(0,xl));}}function sd(n,t){if(n&1&&(f(0,Bl,2,1,"td"),f(1,zl,2,1,"td"),f(2,Hl,4,0,"td"),f(3,Xl,5,6,"td"),f(4,Wl,2,1,"td"),f(5,Ql,6,8,"td"),f(6,Zl,4,4,"td"),f(7,ql,3,4,"td"),f(8,Kl,2,1,"td"),f(9,ed,2,1,"td"),f(10,id,2,1,"td"),f(11,od,2,1,"td"),f(12,ad,4,1,"td")),n&2){m();let o=ne(6);C(o.isColumnDisplayed("duration")?0:-1),l(),C(o.isColumnDisplayed("name")?1:-1),l(),C(o.isColumnDisplayed("tags")?2:-1),l(),C(o.isColumnDisplayed("privacy")?3:-1),l(),C(o.isColumnDisplayed("sensitive")?4:-1),l(),C(o.isColumnDisplayed("insights")?5:-1),l(),C(o.isColumnDisplayed("comments")?6:-1),l(),C(o.isColumnDisplayed("published")?7:-1),l(),C(o.isColumnDisplayed("state")?8:-1),l(),C(o.isColumnDisplayed("category")?9:-1),l(),C(o.isColumnDisplayed("language")?10:-1),l(),C(o.isColumnDisplayed("licence")?11:-1),l(),C(o.isColumnDisplayed("playlists")?12:-1);}}function ld(n,t){if(n&1){let o=Y();S(0,"my-button",32),d(1,"my-video-actions-dropdown",33),P("videoRemoved",function(){I(o),m();let i=ne(6);return T(i.loadData());})("videoFilesRemoved",function(){I(o),m();let i=ne(6);return T(i.loadData());})("transcodingCreated",function(){I(o),m();let i=ne(6);return T(i.loadData());})("videoExistsInPlaylistChange",function(){let i=I(o).$implicit,r=m();return T(r.fetchVideosContainedInPlaylists([i]));}),s();}if(n&2){let o=t.$implicit,e=m();u("ptRouterLink",$(3,Vl,o.shortUUID)),l(),u("video",o)("displayOptions",e.videoActionsOptions);}}function dd(n,t){if(n&1&&v(0),n&2){let o=t.search,e=t.hasFilters,i=m();x(" ",i.getNoResults(!!o||e)," ");}}var xr=(()=>{let t=class t{confirmService=_(qe);auth=_(D);notifier=_(L);videoService=_(Kn);playlistService=_(ge);server=_(ce);headerService=_(li);badgeService=_(lo);route=_(Ie);table=G("table");bulkUpdateVideosInPlaylistModal=G("bulkUpdateVideosInPlaylistModal");bulkUpdateVideosModal=G("bulkUpdateVideosModal");videosContainedInPlaylists={};bulkActions=[];videoActionsOptions={playlist:!0,download:!0,update:!1,blacklist:!1,delete:!0,report:!1,duplicate:!1,muteByUser:!1,muteByServer:!1,liveInfo:!0,removeFiles:!1,transcoding:!1};user;channels=[];inputFilters=[];columns=[];customUpdateUrl;customParseQueryParams;dataLoader;constructor(){this.customUpdateUrl=this._customUpdateUrl.bind(this),this.customParseQueryParams=this._customParseQueryParams.bind(this),this.dataLoader=this._dataLoader.bind(this);}get serverConfig(){return this.server.getHTMLConfig();}ngOnInit(){this.headerService.setSearchHidden(!0),this.user=this.auth.getUser(),this.columns=[{id:"duration",label:"\u65F6\u957F",selected:!0,sortable:!0},{id:"name",label:"\u540D\u79F0",selected:!0,sortable:!0},{id:"tags",label:"\u6807\u7B7E",selected:!0,sortable:!1},{id:"privacy",label:"\u9690\u79C1",selected:!0,sortable:!1},{id:"sensitive",label:"\u654F\u611F\u5185\u5BB9",selected:!0,sortable:!1},{id:"insights",label:"\u6570\u636E\u6D1E\u5BDF",selected:!0,sortable:!0,sortKey:"views"},{id:"comments",label:"\u8BC4\u8BBA",selected:!0,sortable:!0},{id:"published",label:"\u5DF2\u53D1\u5E03",selected:!0,sortable:!0,sortKey:"publishedAt"},{id:"state",label:"\u72B6\u6001",selected:!0,sortable:!1},{id:"category",label:"\u7C7B\u522B",selected:!1,sortable:!1},{id:"language",label:"\u8BED\u8A00",selected:!1,sortable:!1},{id:"licence",label:"\u8BB8\u53EF",selected:!1,sortable:!1},{id:"playlists",label:"\u64AD\u653E\u5217\u8868",selected:!0,sortable:!1}],this.inputFilters=[{type:"options",key:"isLive",title:"\u89C6\u9891\u7C7B\u578B",options:[{value:"all",label:"All"},{value:!0,label:"\u76F4\u64AD"},{value:!1,label:"\u70B9\u64AD"}]},{type:"options",key:"privacyOneOf",title:"\u9690\u79C1",options:[{value:"all",label:"All"},{value:De.PUBLIC,label:"\u516C\u5F00\u89C6\u9891"},{value:De.INTERNAL,label:"\u5185\u90E8\u89C6\u9891"},{value:De.UNLISTED,label:"\u672A\u5217\u51FA\u7684\u89C6\u9891"},{value:De.PASSWORD_PROTECTED,label:"\u53D7\u5BC6\u7801\u4FDD\u62A4\u7684\u89C6\u9891"},{value:De.PRIVATE,label:"\u79C1\u6709\u89C6\u9891"}]},{type:"tags",key:"tagsOneOf",title:"\u5305\u542B\u4EE5\u4E0B\u81F3\u5C11\u4E00\u4E2A\u6807\u7B7E"}],this._customParseQueryParams(this.route.snapshot.queryParams),this.buildActions();}ngOnDestroy(){this.headerService.setSearchHidden(!1);}_customParseQueryParams(e){let i=e.channelNameOneOf?new Set(Nn(e.channelNameOneOf)):new Set();this.user=this.auth.getUser(),this.channels=[...this.user.videoChannels,...this.user.videoChannelCollaborations].map(r=>pe(_e({},r),{selected:i.has(r.name)}));}getNoResults(e){return e?"\u672A\u627E\u5230\u5339\u914D\u4F60\u7B5B\u9009\u5668\u7684\u89C6\u9891\u3002":this.channels.some(i=>i.selected)?"\u5728\u6240\u9009\u9891\u9053\u4E2D\u672A\u627E\u5230\u89C6\u9891\u3002":"\u4F60\u8FD8\u6CA1\u6709\u53D1\u5E03\u4EFB\u4F55\u89C6\u9891\u3002";}_customUpdateUrl(){return{channelNameOneOf:this.channels.filter(i=>i.selected).map(i=>i.name)};}_dataLoader(e){let{pagination:i,sort:r,search:a,isLive:c,privacyOneOf:p,tagsOneOf:y}=e,E=this.channels.filter(O=>O.selected).map(O=>O.name);return this.videoService.listMyVideos({restPagination:i,sort:r,search:a,includeCollaborations:!0,channelNameOneOf:E.length!==0?E:void 0,isLive:c,privacyOneOf:p!==void 0?[p]:void 0,tagsOneOf:y}).pipe(Ve(({data:O})=>this.fetchVideosContainedInPlaylists(O)));}fetchVideosContainedInPlaylists(e){this.playlistService.doVideosExistInPlaylist(e.map(i=>i.id)).subscribe(i=>{this.videosContainedInPlaylists=Object.keys(i).reduce((r,a)=>pe(_e({},r),{[a]:Yn(i[+a],c=>c.playlistId)}),this.videosContainedInPlaylists);});}getPlaylistBadge(e){return this.badgeService.getRandomBadge("playlist",e);}removeVideos(e){return Ye(this,null,function*(){let i=me("\u4F60\u786E\u5B9A\u8981\u5220\u9664 {count, plural, =1 {\u6B64\u89C6\u9891} other {\u8FD9 {count} \u4E2A\u89C6\u9891}}\u5417\uFF1F",{count:e.length});(yield this.confirmService.confirm(i,"\u5220\u9664"))!==!1&&this.videoService.removeVideo(e.map(a=>a.id)).subscribe({next:()=>{this.notifier.success(me("\u5DF2\u5220\u9664 {count, plural, =1 {1 \u4E2A\u89C6\u9891} other {{count} \u4E2A\u89C6\u9891}}\u3002",{count:e.length})),this.table().loadData();},error:a=>this.notifier.handleError(a)});});}buildActions(){this.bulkActions=[[{label:"Add to playlist...",handler:e=>{this.bulkUpdateVideosInPlaylistModal().show({videos:e,videosContainedInPlaylists:this.videosContainedInPlaylists});},iconName:"playlist-add"},{label:"Update...",handler:e=>this.bulkUpdateVideosModal().show({videos:e}),iconName:"edit"}],[{label:"\u5220\u9664",handler:e=>this.removeVideos(e),iconName:"delete"}]];}getPrivacyFilterTitle(e){return"Filter by privacy: "+e+"";}};h(t,"\u0275fac",function(i){return new(i||t)();}),h(t,"\u0275cmp",M({type:t,selectors:[["my-videos"]],viewQuery:function(i,r){i&1&&J(r.table,bl,5)(r.bulkUpdateVideosInPlaylistModal,Al,5)(r.bulkUpdateVideosModal,Ll,5),i&2&&X(3);},decls:19,vars:6,consts:()=>{let e;e="\u6BCF\u9875\u89C6\u9891";let i;i="\u6BCF\u4E2A\u9891\u9053\uFF1A";let r;r="{VAR_PLURAL, plural, =0 {\u65E0\u89C6\u9891} =1 {1 \u4E2A\u89C6\u9891} other {{INTERPOLATION} \u4E2A\u89C6\u9891}}",r=ee(r,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let a;a="\u5DF2\u5C4F\u853D";let c;c="\u5BFC\u822A\u5230\u89C6\u9891\u7EDF\u8BA1\u9875\u9762";let p;p="{VAR_PLURAL, plural, =0 {\u65E0\u4EBA\u89C2\u770B} =1 {1 \u6B21\u89C2\u770B} other {{INTERPOLATION} \u6B21\u89C2\u770B}}",p=ee(p,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let y;y="{VAR_PLURAL, plural, =0 {\u6CA1\u6709\u89C2\u4F17} =1 {1 \u4F4D\u89C2\u4F17} other {{INTERPOLATION} \u4F4D\u89C2\u4F17}}",y=ee(y,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let E;E="{VAR_PLURAL, plural, =0 {\u6CA1\u6709\u8BC4\u8BBA} =1 {1 \u5219\u8BC4\u8BBA} other {{INTERPOLATION} \u5219\u8BC4\u8BBA}}",E=ee(E,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let O;return O="\u7BA1\u7406",[["table",""],["totalTitle",""],["tableCells",""],["actionCell",""],["noResults",""],["bulkUpdateVideosInPlaylistModal",""],["bulkUpdateVideosModal",""],i,r,a,p,y,E,[1,"channel-filters"],[1,"channel-label"],[3,"channel","ngModel"],["key","MyVideosComponent","defaultSort","publishedAt","paginatorText",e,"defaultRowsPerPage","5","searchInput","true","canUseMatchSort","true",3,"defaultColumns","bulkActions","dataLoader","customParseQueryParams","customUpdateUrl","inputFilters"],[3,"saved"],[3,"ngModelChange","channel","ngModel"],["thumbnail","true","title","false",3,"video"],["thumbnail","false","title","true","displayEditorInfo","true",1,"video-cell-name",3,"video"],[1,"badges","tags"],["routerLink",".",1,"pt-badge","badge-secondary","pt-badge-keep-case",3,"queryParams"],[1,"pt-badges-container"],["routerLink",".",3,"queryParams","title"],["displayTooltip","false",3,"video"],[1,"pt-badge","badge-red",3,"ngbTooltip"],[3,"video"],["title",c,1,"pt",3,"routerLink"],[1,"badges","playlists"],[1,"pt-badge","pt-badge-keep-case",3,"class","routerLink"],[1,"pt-badge","pt-badge-keep-case",3,"routerLink"],["label",O,"theme","secondary","icon","film","responsiveLabel","true",1,"me-3",3,"ptRouterLink"],["placement","bottom auto","buttonIcon","more-horizontal","buttonStyled","true",3,"videoRemoved","videoFilesRemoved","transcodingCreated","videoExistsInPlaylistChange","video","displayOptions"]];},template:function(i,r){if(i&1){let a=Y();d(0,"div",13)(1,"div",14),g(2,7),s(),q(3,Fl,1,2,"my-channel-toggle",15,$l),s(),d(5,"my-table",16,0),Q(7,kl,3,4,"ng-template",null,1,N)(9,sd,13,13,"ng-template",null,2,N)(11,ld,2,5,"ng-template",null,3,N)(13,dd,1,1,"ng-template",null,4,N),s(),d(15,"my-bulk-update-videos-in-playlist-modal",17,5),P("saved",function(p){return r.fetchVideosContainedInPlaylists(p);}),s(),d(17,"my-bulk-update-videos-modal",17,6),P("saved",function(){I(a);let p=ne(6);return T(p.loadData());}),s();}i&2&&(l(3),K(r.channels),l(2),u("defaultColumns",r.columns)("bulkActions",r.bulkActions)("dataLoader",r.dataLoader)("customParseQueryParams",r.customParseQueryParams)("customUpdateUrl",r.customUpdateUrl)("inputFilters",r.inputFilters));},dependencies:[U,j,ue,Ke,Bn,kn,no,Pi,ie,wr,Li,_o,be,Ii,Dr,So,Oe,Re],styles:[`my-select-checkbox[_ngcontent-%COMP%]{min-width:250px}.pt-badge[_ngcontent-%COMP%]{margin-inline-end:.3125rem}.badges[_ngcontent-%COMP%]   .pt-badge[_ngcontent-%COMP%]{max-width:200px;vertical-align:bottom;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.video-info[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{display:flex}.video-info[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]   my-global-icon[_ngcontent-%COMP%]{position:relative;top:-2px;display:inline-block;width:16px;height:16px;line-height:16px;margin-inline-start:.1875rem}td[_ngcontent-%COMP%]{padding-top:.75rem;padding-bottom:.75rem}.channel-label[_ngcontent-%COMP%]{color:var(--fg-200);font-weight:700;white-space:nowrap}.channel-filters[_ngcontent-%COMP%]{display:flex;align-items:center;padding-bottom:1rem;border-bottom:1px solid var(--bg-secondary-400);margin-bottom:1rem;gap:1rem;overflow:hidden}.channel-filters[_ngcontent-%COMP%]:hover{overflow:auto}@media screen and (min-width:800px){.video-cell-name[_ngcontent-%COMP%]{width:300px;display:block}}@media screen and (max-width:800px){my-video-cell[_ngcontent-%COMP%]{max-width:120px;display:block}}
/*# sourceMappingURL=my-videos.component-3PRMAU6L.css.map */`]}));let n=t;return n;})();var Yr=(()=>{let t=class t{};h(t,"\u0275fac",function(i){return new(i||t)();}),h(t,"\u0275cmp",M({type:t,selectors:[["ng-component"]],decls:7,vars:0,consts:()=>{let e;e="\u5305\u542B\u4EFB\u4F55\u5173\u6CE8\u8BCD\u7684\u8BC4\u8BBA\u90FD\u4F1A\u81EA\u52A8\u6807\u6709\u5217\u8868\u540D\u79F0\u3002";let i;return i="\u8FD9\u4E9B\u81EA\u52A8\u6807\u7B7E\u53EF\u4EE5\u7528\u4E8E\u8FC7\u6EE4\u8BC4\u8BBA\u6216 "+"\uFFFD#5\uFFFD"+"\u81EA\u52A8\u963B\u6B62"+"\uFFFD/#5\uFFFD"+" \u4ED6\u4EEC\u3002",[e,i,[1,"callout","callout-primary","mb-4"],["routerLink","/my-account/auto-tag-policies"],["mode","user"]];},template:function(i,r){i&1&&(d(0,"div",2)(1,"div"),g(2,0),s(),d(3,"div"),ei(4,1),S(5,"a",3),ti(),s()(),S(6,"my-watched-words-list-admin-owner",4));},dependencies:[mo,ie],encapsulation:2}));let n=t;return n;})();var Vr=(()=>{let t=class t{};h(t,"\u0275fac",function(i){return new(i||t)();}),h(t,"\u0275cmp",M({type:t,selectors:[["ng-component"]],features:[ze([uo])],decls:3,vars:0,consts:()=>{let e;return e=" Subscribe to remote watched words lists to automatically keep them synchronized.\n",[e,[1,"callout","callout-primary","mb-4"],["mode","user"]];},template:function(i,r){i&1&&(d(0,"div",1),g(1,0),s(),S(2,"my-watched-words-subscriptions-admin-owner",2));},dependencies:[ho],encapsulation:2}));let n=t;return n;})();var dn={path:"",providers:[Jn,to,eo,Mo,Tt,It,po,fo,so],resolve:{user:vo},canActivateChild:[Hn]},kr=[{path:"videos/comments",redirectTo:"comments-on-my-videos",pathMatch:"full"},{path:"comments-on-my-videos",component:Lo,data:{meta:{title:"\u60A8\u7684\u89C6\u9891\u7684\u8BC4\u8BBA"}}},{path:"watched-words/list",component:Yr,data:{meta:{title:"\u60A8\u5173\u6CE8\u7684\u8BCD\u8BED"}}},{path:"watched-words/subscriptions",component:Vr,data:{meta:{title:"Your watched words subscriptions"}}},{path:"auto-tag-policies",component:No,resolve:{tags:Do},data:{meta:{title:"\u60A8\u7684\u81EA\u52A8\u6807\u7B7E\u653F\u7B56"}}},{path:"videos",component:xr,data:{meta:{title:"\u6211\u7684\u89C6\u9891"}}},{path:"video-imports",component:jo,data:{meta:{title:"\u6211\u7684\u89C6\u9891\u5BFC\u5165"}}},{path:"ownership",component:Go,data:{meta:{title:"\u89C6\u9891\u8F6C\u79FB"}}}],Br=[{path:"",redirectTo:"video-channels",pathMatch:"full"},{path:"video-channels",loadChildren:()=>import("./chunk-VRAAJCRS.js")},{path:"followers",component:Vo,data:{meta:{title:"\u6211\u7684\u5173\u6CE8\u8005"}}},{path:"video-channel-syncs",component:Xo,data:{meta:{title:"\u6211\u7684\u540C\u6B65"}}},{path:"video-channel-syncs/create",component:Wo,data:{meta:{title:"\u65B0\u5EFA\u540C\u6B65"}}}],cd=[{path:"video-playlists",component:Ar,data:{meta:{title:"\u6211\u7684\u64AD\u653E\u5217\u8868"}}},{path:"video-playlists/create",component:Qo,data:{meta:{title:"\u65B0\u5EFA\u64AD\u653E\u5217\u8868"}}},{path:"video-playlists/:videoPlaylistId",component:Tr,data:{meta:{title:"\u64AD\u653E\u5217\u8868\u5143\u7D20"}}},{path:"video-playlists/update/:videoPlaylistId",component:Or,data:{meta:{title:"\u66F4\u65B0\u64AD\u653E\u5217\u8868"}}},{path:"subscriptions",component:Fo,data:{meta:{title:"\u6211\u7684\u8BA2\u9605"}}},{path:"history/videos",component:Bo,data:{meta:{title:"\u6211\u7684\u89C6\u9891\u5386\u53F2"},reuse:{enabled:!0,key:"my-videos-history-list"}}}];function $r(n){if(n.length===0)return!1;let t=n[0].path;return kr.some(o=>o.path===t||o.path.startsWith(`${t}/`));}function Fr(n){if(n.length===0)return!1;let t=n[0].path;return Br.some(o=>o.path===t||o.path.startsWith(`${t}/`));}var O0=[pe(_e({},dn),{component:Lr,canMatch:[(n,t)=>$r(t)],children:kr}),pe(_e({},dn),{component:Yo,canMatch:[(n,t)=>Fr(t)],children:Br}),pe(_e({},dn),{component:zo,canMatch:[(n,t)=>!$r(t)&&!Fr(t)],children:cd})];export{O0 as default};/**i18n:347eeb695970c32bc275618edc2e751c67145d9fc3012e70543c114a99b9e016*///# sourceMappingURL=chunk-QNF2WY64.js.map