prasi-bun/app/srv/site/live-4QMOJQZB.js

136 lines
106 KiB
JavaScript

import{a as Rt,b as v,c as Ke,e as Ee,f as vs,h as ee,i as Wr,j as T,n as Ne,o as Te,p as Jr}from"./chunk-DH54TKQS.js";var Kr=Rt((Ye,At)=>{(function(t,e){"use strict";var n="1.0.36",r="",i="?",o="function",s="undefined",c="object",l="string",h="major",a="model",f="name",u="type",d="vendor",p="version",g="architecture",N="console",m="mobile",b="tablet",j="smarttv",Ce="wearable",pn="embedded",gn=350,vt="Amazon",He="Apple",Lr="ASUS",Or="BlackBerry",Se="Browser",Ct="Chrome",bs="Edge",St="Firefox",It="Google",Pr="Huawei",mn="LG",wn="Microsoft",Vr="Motorola",Et="Opera",yn="Samsung",Fr="Sharp",Nt="Sony",ll="Viera",bn="Xiaomi",xn="Zebra",Br="Facebook",jr="Chromium OS",$r="Mac OS",xs=function(x,k){var y={};for(var S in x)k[S]&&k[S].length%2===0?y[S]=k[S].concat(x[S]):y[S]=x[S];return y},Tt=function(x){for(var k={},y=0;y<x.length;y++)k[x[y].toUpperCase()]=x[y];return k},Gr=function(x,k){return typeof x===l?We(k).indexOf(We(x))!==-1:!1},We=function(x){return x.toLowerCase()},_s=function(x){return typeof x===l?x.replace(/[^\d\.]/g,r).split(".")[0]:e},_n=function(x,k){if(typeof x===l)return x=x.replace(/^\s\s*/,r),typeof k===s?x:x.substring(0,gn)},Je=function(x,k){for(var y=0,S,ie,q,_,w,H;y<k.length&&!w;){var vn=k[y],Hr=k[y+1];for(S=ie=0;S<vn.length&&!w&&vn[S];)if(w=vn[S++].exec(x),w)for(q=0;q<Hr.length;q++)H=w[++ie],_=Hr[q],typeof _===c&&_.length>0?_.length===2?typeof _[1]==o?this[_[0]]=_[1].call(this,H):this[_[0]]=_[1]:_.length===3?typeof _[1]===o&&!(_[1].exec&&_[1].test)?this[_[0]]=H?_[1].call(this,H,_[2]):e:this[_[0]]=H?H.replace(_[1],_[2]):e:_.length===4&&(this[_[0]]=H?_[3].call(this,H.replace(_[1],_[2])):e):this[_]=H||e;y+=2}},kn=function(x,k){for(var y in k)if(typeof k[y]===c&&k[y].length>0){for(var S=0;S<k[y].length;S++)if(Gr(k[y][S],x))return y===i?e:y}else if(Gr(k[y],x))return y===i?e:y;return x},ks={"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},zr={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},qr={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[p,[f,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[p,[f,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[f,p],[/opios[\/ ]+([\w\.]+)/i],[p,[f,Et+" Mini"]],[/\bopr\/([\w\.]+)/i],[p,[f,Et]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[f,p],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[p,[f,"UC"+Se]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i],[p,[f,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[p,[f,"WeChat"]],[/konqueror\/([\w\.]+)/i],[p,[f,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[p,[f,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[p,[f,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[f,/(.+)/,"$1 Secure "+Se],p],[/\bfocus\/([\w\.]+)/i],[p,[f,St+" Focus"]],[/\bopt\/([\w\.]+)/i],[p,[f,Et+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[p,[f,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[p,[f,"Dolphin"]],[/coast\/([\w\.]+)/i],[p,[f,Et+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[p,[f,"MIUI "+Se]],[/fxios\/([-\w\.]+)/i],[p,[f,St]],[/\bqihu|(qi?ho?o?|360)browser/i],[[f,"360 "+Se]],[/(oculus|samsung|sailfish|huawei)browser\/([\w\.]+)/i],[[f,/(.+)/,"$1 "+Se],p],[/(comodo_dragon)\/([\w\.]+)/i],[[f,/_/g," "],p],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[f,p],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i,/\[(linkedin)app\]/i],[f],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[f,Br],p],[/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[f,p],[/\bgsa\/([\w\.]+) .*safari\//i],[p,[f,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[p,[f,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[p,[f,Ct+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[f,Ct+" WebView"],p],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[p,[f,"Android "+Se]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[f,p],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[p,[f,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[p,f],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[f,[p,kn,ks]],[/(webkit|khtml)\/([\w\.]+)/i],[f,p],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[f,"Netscape"],p],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[p,[f,St+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i,/panasonic;(viera)/i],[f,p],[/(cobalt)\/([\w\.]+)/i],[f,[p,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[g,"amd64"]],[/(ia32(?=;))/i],[[g,We]],[/((?:i[346]|x)86)[;\)]/i],[[g,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[g,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[g,"armhf"]],[/windows (ce|mobile); ppc;/i],[[g,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[g,/ower/,r,We]],[/(sun4\w)[;\)]/i],[[g,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[g,We]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[a,[d,yn],[u,b]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[a,[d,yn],[u,m]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[a,[d,He],[u,m]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[a,[d,He],[u,b]],[/(macintosh);/i],[a,[d,He]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[a,[d,Fr],[u,m]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[a,[d,Pr],[u,b]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[a,[d,Pr],[u,m]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[a,/_/g," "],[d,bn],[u,m]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[a,/_/g," "],[d,bn],[u,b]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[a,[d,"OPPO"],[u,m]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[a,[d,"Vivo"],[u,m]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[a,[d,"Realme"],[u,m]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[a,[d,Vr],[u,m]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[a,[d,Vr],[u,b]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[a,[d,mn],[u,b]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[a,[d,mn],[u,m]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[a,[d,"Lenovo"],[u,b]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[a,/_/g," "],[d,"Nokia"],[u,m]],[/(pixel c)\b/i],[a,[d,It],[u,b]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[a,[d,It],[u,m]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[a,[d,Nt],[u,m]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[a,"Xperia Tablet"],[d,Nt],[u,b]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[a,[d,"OnePlus"],[u,m]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[a,[d,vt],[u,b]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[a,/(.+)/g,"Fire Phone $1"],[d,vt],[u,m]],[/(playbook);[-\w\),; ]+(rim)/i],[a,d,[u,b]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[a,[d,Or],[u,m]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[a,[d,Lr],[u,b]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[a,[d,Lr],[u,m]],[/(nexus 9)/i],[a,[d,"HTC"],[u,b]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[d,[a,/_/g," "],[u,m]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[a,[d,"Acer"],[u,b]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[a,[d,"Meizu"],[u,m]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[d,a,[u,m]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[d,a,[u,b]],[/(surface duo)/i],[a,[d,wn],[u,b]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[a,[d,"Fairphone"],[u,m]],[/(u304aa)/i],[a,[d,"AT&T"],[u,m]],[/\bsie-(\w*)/i],[a,[d,"Siemens"],[u,m]],[/\b(rct\w+) b/i],[a,[d,"RCA"],[u,b]],[/\b(venue[\d ]{2,7}) b/i],[a,[d,"Dell"],[u,b]],[/\b(q(?:mv|ta)\w+) b/i],[a,[d,"Verizon"],[u,b]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[a,[d,"Barnes & Noble"],[u,b]],[/\b(tm\d{3}\w+) b/i],[a,[d,"NuVision"],[u,b]],[/\b(k88) b/i],[a,[d,"ZTE"],[u,b]],[/\b(nx\d{3}j) b/i],[a,[d,"ZTE"],[u,m]],[/\b(gen\d{3}) b.+49h/i],[a,[d,"Swiss"],[u,m]],[/\b(zur\d{3}) b/i],[a,[d,"Swiss"],[u,b]],[/\b((zeki)?tb.*\b) b/i],[a,[d,"Zeki"],[u,b]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[d,"Dragon Touch"],a,[u,b]],[/\b(ns-?\w{0,9}) b/i],[a,[d,"Insignia"],[u,b]],[/\b((nxa|next)-?\w{0,9}) b/i],[a,[d,"NextBook"],[u,b]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[d,"Voice"],a,[u,m]],[/\b(lvtel\-)?(v1[12]) b/i],[[d,"LvTel"],a,[u,m]],[/\b(ph-1) /i],[a,[d,"Essential"],[u,m]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[a,[d,"Envizen"],[u,b]],[/\b(trio[-\w\. ]+) b/i],[a,[d,"MachSpeed"],[u,b]],[/\btu_(1491) b/i],[a,[d,"Rotor"],[u,b]],[/(shield[\w ]+) b/i],[a,[d,"Nvidia"],[u,b]],[/(sprint) (\w+)/i],[d,a,[u,m]],[/(kin\.[onetw]{3})/i],[[a,/\./g," "],[d,wn],[u,m]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[a,[d,xn],[u,b]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[a,[d,xn],[u,m]],[/smart-tv.+(samsung)/i],[d,[u,j]],[/hbbtv.+maple;(\d+)/i],[[a,/^/,"SmartTV"],[d,yn],[u,j]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[d,mn],[u,j]],[/(apple) ?tv/i],[d,[a,He+" TV"],[u,j]],[/crkey/i],[[a,Ct+"cast"],[d,It],[u,j]],[/droid.+aft(\w+)( bui|\))/i],[a,[d,vt],[u,j]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[a,[d,Fr],[u,j]],[/(bravia[\w ]+)( bui|\))/i],[a,[d,Nt],[u,j]],[/(mitv-\w{5}) bui/i],[a,[d,bn],[u,j]],[/Hbbtv.*(technisat) (.*);/i],[d,a,[u,j]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[d,_n],[a,_n],[u,j]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[u,j]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[d,a,[u,N]],[/droid.+; (shield) bui/i],[a,[d,"Nvidia"],[u,N]],[/(playstation [345portablevi]+)/i],[a,[d,Nt],[u,N]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[a,[d,wn],[u,N]],[/((pebble))app/i],[d,a,[u,Ce]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[a,[d,He],[u,Ce]],[/droid.+; (glass) \d/i],[a,[d,It],[u,Ce]],[/droid.+; (wt63?0{2,3})\)/i],[a,[d,xn],[u,Ce]],[/(quest( 2| pro)?)/i],[a,[d,Br],[u,Ce]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[d,[u,pn]],[/(aeobc)\b/i],[a,[d,vt],[u,pn]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[a,[u,m]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[a,[u,b]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[u,b]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[u,m]],[/(android[-\w\. ]{0,9});.+buil/i],[a,[d,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[p,[f,bs+"HTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[p,[f,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[f,p],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[p,f]],os:[[/microsoft (windows) (vista|xp)/i],[f,p],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[f,[p,kn,zr]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[f,"Windows"],[p,kn,zr]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[p,/_/g,"."],[f,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[f,$r],[p,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[p,f],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[f,p],[/\(bb(10);/i],[p,[f,Or]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[p,[f,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[p,[f,St+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[p,[f,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[p,[f,"watchOS"]],[/crkey\/([\d\.]+)/i],[p,[f,Ct+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[f,jr],p],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[f,p],[/(sunos) ?([\w\.\d]*)/i],[[f,"Solaris"],p],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[f,p]]},$=function(x,k){if(typeof x===c&&(k=x,x=e),!(this instanceof $))return new $(x,k).getResult();var y=typeof t!==s&&t.navigator?t.navigator:e,S=x||(y&&y.userAgent?y.userAgent:r),ie=y&&y.userAgentData?y.userAgentData:e,q=k?xs(qr,k):qr,_=y&&y.userAgent==S;return this.getBrowser=function(){var w={};return w[f]=e,w[p]=e,Je.call(w,S,q.browser),w[h]=_s(w[p]),_&&y&&y.brave&&typeof y.brave.isBrave==o&&(w[f]="Brave"),w},this.getCPU=function(){var w={};return w[g]=e,Je.call(w,S,q.cpu),w},this.getDevice=function(){var w={};return w[d]=e,w[a]=e,w[u]=e,Je.call(w,S,q.device),_&&!w[u]&&ie&&ie.mobile&&(w[u]=m),_&&w[a]=="Macintosh"&&y&&typeof y.standalone!==s&&y.maxTouchPoints&&y.maxTouchPoints>2&&(w[a]="iPad",w[u]=b),w},this.getEngine=function(){var w={};return w[f]=e,w[p]=e,Je.call(w,S,q.engine),w},this.getOS=function(){var w={};return w[f]=e,w[p]=e,Je.call(w,S,q.os),_&&!w[f]&&ie&&ie.platform!="Unknown"&&(w[f]=ie.platform.replace(/chrome os/i,jr).replace(/macos/i,$r)),w},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return S},this.setUA=function(w){return S=typeof w===l&&w.length>gn?_n(w,gn):w,this},this.setUA(S),this};$.VERSION=n,$.BROWSER=Tt([f,p,h]),$.CPU=Tt([g]),$.DEVICE=Tt([a,d,u,N,m,j,b,Ce,pn]),$.ENGINE=$.OS=Tt([f,p]),typeof Ye!==s?(typeof At!==s&&At.exports&&(Ye=At.exports=$),Ye.UAParser=$):typeof define===o&&define.amd?define(function(){return $}):typeof t!==s&&(t.UAParser=$);var Ie=typeof t!==s&&(t.jQuery||t.Zepto);if(Ie&&!Ie.ua){var Dt=new $;Ie.ua=Dt.getResult(),Ie.ua.get=function(){return Dt.getUA()},Ie.ua.set=function(x){Dt.setUA(x);var k=Dt.getResult();for(var y in k)Ie.ua[y]=k[y]}}})(typeof window=="object"?window:Ye)});var hi=Rt((yl,fi)=>{var Es="Expected a function",ii="__lodash_hash_undefined__",oi=1/0,Ns="[object Function]",Ts="[object GeneratorFunction]",Ds="[object Symbol]",Rs=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,As=/^\w*$/,Us=/^\./,Ms=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ls=/[\\^$.*+?()[\]{}|]/g,Os=/\\(\\)?/g,Ps=/^\[object .+?Constructor\]$/,Vs=typeof global=="object"&&global&&global.Object===Object&&global,Fs=typeof self=="object"&&self&&self.Object===Object&&self,Sn=Vs||Fs||Function("return this")();function Bs(t,e){return t?.[e]}function js(t){var e=!1;if(t!=null&&typeof t.toString!="function")try{e=!!(t+"")}catch{}return e}var $s=Array.prototype,Gs=Function.prototype,si=Object.prototype,Cn=Sn["__core-js_shared__"],ei=function(){var t=/[^.]+$/.exec(Cn&&Cn.keys&&Cn.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),ci=Gs.toString,In=si.hasOwnProperty,ai=si.toString,zs=RegExp("^"+ci.call(In).replace(Ls,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ti=Sn.Symbol,qs=$s.splice,Hs=li(Sn,"Map"),Xe=li(Object,"create"),ni=ti?ti.prototype:void 0,ri=ni?ni.toString:void 0;function we(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Ws(){this.__data__=Xe?Xe(null):{}}function Js(t){return this.has(t)&&delete this.__data__[t]}function Ks(t){var e=this.__data__;if(Xe){var n=e[t];return n===ii?void 0:n}return In.call(e,t)?e[t]:void 0}function Ys(t){var e=this.__data__;return Xe?e[t]!==void 0:In.call(e,t)}function Xs(t,e){var n=this.__data__;return n[t]=Xe&&e===void 0?ii:e,this}we.prototype.clear=Ws;we.prototype.delete=Js;we.prototype.get=Ks;we.prototype.has=Ys;we.prototype.set=Xs;function Ae(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Zs(){this.__data__=[]}function Qs(t){var e=this.__data__,n=Ut(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():qs.call(e,n,1),!0}function ec(t){var e=this.__data__,n=Ut(e,t);return n<0?void 0:e[n][1]}function tc(t){return Ut(this.__data__,t)>-1}function nc(t,e){var n=this.__data__,r=Ut(n,t);return r<0?n.push([t,e]):n[r][1]=e,this}Ae.prototype.clear=Zs;Ae.prototype.delete=Qs;Ae.prototype.get=ec;Ae.prototype.has=tc;Ae.prototype.set=nc;function ye(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function rc(){this.__data__={hash:new we,map:new(Hs||Ae),string:new we}}function ic(t){return Mt(this,t).delete(t)}function oc(t){return Mt(this,t).get(t)}function sc(t){return Mt(this,t).has(t)}function cc(t,e){return Mt(this,t).set(t,e),this}ye.prototype.clear=rc;ye.prototype.delete=ic;ye.prototype.get=oc;ye.prototype.has=sc;ye.prototype.set=cc;function Ut(t,e){for(var n=t.length;n--;)if(yc(t[n][0],e))return n;return-1}function ac(t,e){e=fc(e,t)?[e]:uc(e);for(var n=0,r=e.length;t!=null&&n<r;)t=t[mc(e[n++])];return n&&n==r?t:void 0}function lc(t){if(!ui(t)||pc(t))return!1;var e=bc(t)||js(t)?zs:Ps;return e.test(wc(t))}function dc(t){if(typeof t=="string")return t;if(Nn(t))return ri?ri.call(t):"";var e=t+"";return e=="0"&&1/t==-oi?"-0":e}function uc(t){return di(t)?t:gc(t)}function Mt(t,e){var n=t.__data__;return hc(e)?n[typeof e=="string"?"string":"hash"]:n.map}function li(t,e){var n=Bs(t,e);return lc(n)?n:void 0}function fc(t,e){if(di(t))return!1;var n=typeof t;return n=="number"||n=="symbol"||n=="boolean"||t==null||Nn(t)?!0:As.test(t)||!Rs.test(t)||e!=null&&t in Object(e)}function hc(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function pc(t){return!!ei&&ei in t}var gc=En(function(t){t=_c(t);var e=[];return Us.test(t)&&e.push(""),t.replace(Ms,function(n,r,i,o){e.push(i?o.replace(Os,"$1"):r||n)}),e});function mc(t){if(typeof t=="string"||Nn(t))return t;var e=t+"";return e=="0"&&1/t==-oi?"-0":e}function wc(t){if(t!=null){try{return ci.call(t)}catch{}try{return t+""}catch{}}return""}function En(t,e){if(typeof t!="function"||e&&typeof e!="function")throw new TypeError(Es);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=t.apply(this,r);return n.cache=o.set(i,s),s};return n.cache=new(En.Cache||ye),n}En.Cache=ye;function yc(t,e){return t===e||t!==t&&e!==e}var di=Array.isArray;function bc(t){var e=ui(t)?ai.call(t):"";return e==Ns||e==Ts}function ui(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function xc(t){return!!t&&typeof t=="object"}function Nn(t){return typeof t=="symbol"||xc(t)&&ai.call(t)==Ds}function _c(t){return t==null?"":dc(t)}function kc(t,e,n){var r=t==null?void 0:ac(t,e);return r===void 0?n:r}fi.exports=kc});var Ni=Rt((jl,oe)=>{var{sha3_512:Sc}=vs(),ki=24,Qe=32,Tn=(t=4,e=Math.random)=>{let n="";for(;n.length<t;)n=n+Math.floor(e()*36).toString(36);return n};function vi(t){let e=8n,n=0n;for(let r of t.values()){let i=BigInt(r);n=(n<<e)+i}return n}var Ci=(t="")=>vi(Sc(t)).toString(36).slice(1),_i=Array.from({length:26},(t,e)=>String.fromCharCode(e+97)),Ic=t=>_i[Math.floor(t()*_i.length)],Si=({globalObj:t=typeof global<"u"?global:typeof window<"u"?window:{},random:e=Math.random}={})=>{let n=Object.keys(t).toString(),r=n.length?n+Tn(Qe,e):Tn(Qe,e);return Ci(r).substring(0,Qe)},Ii=t=>()=>t++,Ec=476782367,Ei=({random:t=Math.random,counter:e=Ii(Math.floor(t()*Ec)),length:n=ki,fingerprint:r=Si({random:t})}={})=>function(){let o=Ic(t),s=Date.now().toString(36),c=e().toString(36),l=Tn(n,t),h=`${s+l+c+r}`;return`${o+Ci(h).substring(1,n)}`},Nc=Ei(),Tc=(t,{minLength:e=2,maxLength:n=Qe}={})=>{let r=t.length,i=/^[0-9a-z]+$/;try{if(typeof t=="string"&&r>=e&&r<=n&&i.test(t))return!0}finally{}return!1};oe.exports.getConstants=()=>({defaultLength:ki,bigLength:Qe});oe.exports.init=Ei;oe.exports.createId=Nc;oe.exports.bufToBigInt=vi;oe.exports.createCounter=Ii;oe.exports.createFingerprint=Si;oe.exports.isCuid=Tc});var Dn=Rt(($l,et)=>{var{createId:Dc,init:Rc,getConstants:Ac,isCuid:Uc}=Ni();et.exports.createId=Dc;et.exports.init=Rc;et.exports.getConstants=Ac;et.exports.isCuid=Uc});var hn=v(Ke()),ys=v(Kr());var De={NORMAL:0,WILDCARD:1,PLACEHOLDER:2};function Re(t={}){let e={options:t,rootNode:Xr(),staticRoutesMap:{}},n=r=>t.strictTrailingSlash?r:r.replace(/\/$/,"")||"/";if(t.routes)for(let r in t.routes)Yr(e,n(r),t.routes[r]);return{ctx:e,lookup:r=>Cs(e,n(r)),insert:(r,i)=>Yr(e,n(r),i),remove:r=>Ss(e,n(r))}}function Cs(t,e){let n=t.staticRoutesMap[e];if(n)return n.data;let r=e.split("/"),i={},o=!1,s=null,c=t.rootNode,l=null;for(let h=0;h<r.length;h++){let a=r[h];c.wildcardChildNode!==null&&(s=c.wildcardChildNode,l=r.slice(h).join("/"));let f=c.children.get(a);if(f!==void 0)c=f;else if(c=c.placeholderChildNode,c!==null)i[c.paramName]=a,o=!0;else break}return(c===null||c.data===null)&&s!==null&&(c=s,i[c.paramName||"_"]=l,o=!0),c?o?{...c.data,params:o?i:void 0}:c.data:null}function Yr(t,e,n){let r=!0,i=e.split("/"),o=t.rootNode,s=0;for(let c of i){let l;if(l=o.children.get(c))o=l;else{let h=Is(c);l=Xr({type:h,parent:o}),o.children.set(c,l),h===De.PLACEHOLDER?(l.paramName=c==="*"?`_${s++}`:c.slice(1),o.placeholderChildNode=l,r=!1):h===De.WILDCARD&&(o.wildcardChildNode=l,l.paramName=c.slice(3)||"_",r=!1),o=l}}return o.data=n,r===!0&&(t.staticRoutesMap[e]=o),o}function Ss(t,e){let n=!1,r=e.split("/"),i=t.rootNode;for(let o of r)if(i=i.children.get(o),!i)return n;if(i.data){let o=r[r.length-1];if(i.data=null,Object.keys(i.children).length===0){let s=i.parent;s.children.delete(o),s.wildcardChildNode=null,s.placeholderChildNode=null}n=!0}return n}function Xr(t={}){return{type:t.type||De.NORMAL,parent:t.parent||null,children:new Map,data:t.data||null,paramName:t.paramName||null,wildcardChildNode:null,placeholderChildNode:null}}function Is(t){return t.startsWith("**")?De.WILDCARD:t[0]===":"||t==="*"?De.PLACEHOLDER:De.NORMAL}var me={liveSync:{ws:null,init:!1,decompress:null},prod:!1,loader:void 0,mode:"",layout:{section:null,content:null},status:"init",site:{id:"",api_url:"",api_prasi:{port:"",db:""},responsive:"all",domain:"",name:"",js:"",js_compiled:""},page:null,mpage:null,mpageLoaded:null,pagePreload:{},pages:{},route:Re(),treePending:null,treeMeta:{},cachedParentID:{},portal:{},comps:{pending:{},resolve:{},all:{}},script:{db:null,api:null},compInstance:{},ws:null,wsRetry:{fast:!1,localIP:!1,disabled:!1,reconnecting:!1}};var un=v(Ke());var M=(t,e,n,r)=>{let i=t[e];return n==="desktop"||!n?!i&&t.mobile&&t.mobile[e]&&(i=t.mobile[e]):t.mobile&&t.mobile[e]&&(i=t.mobile[e]),i||(i=r),i};var Zr=(t,e)=>{let n=M(t,"adv",e,{});return typeof n.css=="string"&&n.css.trim()?cx(css`
${n.css}
`,"cel",e):""};var Qr=(t,e)=>{let n=M(t,"bg",e,{size:"contain",pos:"center"}),r=`${serverurl}${n.url}`;return n&&n.url&&n.url.startsWith("http")&&(r=n.url),cx(`
background-repeat: no-repeat;
`,n.color&&`
background-color: ${n.color};
`,n.url&&typeof siteApiUrl=="string"&&`
background-image: url("${r}");
`,n.size&&`
background-size: ${n.size};
`,n.pos&&`
background-position: ${n.pos};
`)};var pi=v(hi());var gi=(t,e)=>{let n=M(t,"border",e,{style:"solid",stroke:{},rounded:{tr:0,tl:0,bl:0,br:0},color:"transparent"});return cx(W(n,"stroke.l","border-left-width"),W(n,"stroke.r","border-right-width"),W(n,"stroke.b","border-bottom-width"),W(n,"stroke.t","border-top-width"),W(n,"color","border-color","transparent"),W(n,"style","border-style","dashed"),W(n,"rounded.tl","border-top-left-radius"),W(n,"rounded.tr","border-top-right-radius"),W(n,"rounded.bl","border-bottom-left-radius"),W(n,"rounded.br","border-bottom-right-radius"))},W=(t,e,n,r)=>{let i=(0,pi.default)(t,e);if(r)return i?`${n}: ${i};`:`${n}: ${r};`;if(i)return`${n}: ${i}px;`};var mi=(t,e,n)=>{let r=M(t,"dim",e,{h:"fit",w:"fit"});return r.w==="full"&&r.h==="full"?`
width:100%;
height:100%;
flex:1;
`:cx(r.w==="fit"&&`
& > .txt-box > * {
white-space: nowrap !important;
}
`,r.w==="full"&&`
width: 100%;
`,r.w&&typeof r.w=="number"&&r.w>=0&&`
width: ${r.w}${r.wUnit||"px"};
overflow-x: clip;
`,r.h==="full"&&`
height: ${n?"100%":"100"+(t.type==="section"?"vh":"%")};
margin-bottom: auto;
`,r.h&&typeof r.h=="number"&&r.h>=0&&`
height: ${r.h}${r.hUnit||"px"};
overflow-y: clip;
`)};var wi=({item:t,hover:e,active:n})=>cx(e&&css`
& {
box-shadow: inset 0 0 0px 3px #bae3fd;
> img {
opacity: 0.6;
}
}
`,n&&css`
box-shadow: inset 0 0 0px 2px #009cff !important;
> img {
opacity: 0.6;
}
`);var Ue=window,yi=(t,e)=>{let n=M(t,"font",e,{});if(n.family){Ue.loadedFonts||(Ue.loadedFonts=[]);let r=`:wght@${[300,400,500,600].join(";")}`,i=n.family.replace(/ /g,"+");if(Ue.loadedFonts.indexOf(n.family)<0){Ue.loadedFonts.push(n.family);let o=document,s=`https://fonts.googleapis.com/css2?family=${i}${r}&display=block`;if(!o.querySelector(`link[href="${s}]`)){let c=o.createElement("link");c.type="text/css",c.rel="stylesheet",c.href=s,o.head.appendChild(c)}}}return!n.family&&Ue.defaultFont&&(n.family=Ue.defaultFont),cx(n.color&&`
color: ${n.color};
`,`
word-break: ${n.whitespace==="whitespace-normal"?"break-word":"normal"};
`,n.color&&`
color: ${n.color};
`,`
text-align: ${n.align?n.align:"left"};
`,n.size&&`
font-size: ${n.size||15}px;
`,n.height&&`
line-height: ${n.height==="auto"?"normal":`${n.height}%`};
`,n.family&&`
font-family: ${n.family};
`)};var bi=(t,e)=>{let n=[],r=M(t,"layout",e,{dir:"col",align:"top-left",gap:0,wrap:void 0});if(r)r.wrap&&n.push(r.wrap==="flex-wrap"?"flex-wrap: wrap;":"flex-wrap: nowrap;"),r.dir.startsWith("col")?(r.dir==="col"?n.push("flex-direction: column;"):r.dir==="col-reverse"&&n.push("flex-direction: column-reverse;"),r.gap==="auto"?(r.align==="left"&&n.push("align-items:start; justify-content: space-between;"),r.align==="center"&&n.push("align-items:center; justify-content: space-between;"),r.align==="right"&&n.push("align-items:end; justify-content: space-between;")):(n.push(`gap: ${r.gap}px;`),r.align==="top-left"&&n.push("align-items:start; justify-content: start;"),r.align==="top-center"&&n.push("align-items:center; justify-content: start;"),r.align==="top-right"&&n.push("align-items:end; justify-content: start;"),r.align==="left"&&n.push("align-items:start; justify-content: center;"),r.align==="center"&&n.push("align-items:center; justify-content: center;"),r.align==="right"&&n.push("align-items:end; justify-content: center;"),r.align==="bottom-left"&&n.push("align-items:start; justify-content: end;"),r.align==="bottom-center"&&n.push("align-items:center; justify-content: end;"),r.align==="bottom-right"&&n.push("align-items:end; justify-content: end;"))):(r.dir==="row"?n.push("flex-direction: row;"):r.dir==="row-reverse"&&n.push("flex-direction: row-reverse;"),r.gap==="auto"?(r.align==="top"&&n.push("align-items:start; justify-content: space-between;"),r.align==="center"&&n.push("align-items:center; justify-content: space-between;"),r.align==="bottom"&&n.push("align-items:end; justify-content: space-between;")):(n.push(`
gap: ${r.gap}px;
`),r.align==="top-left"&&n.push("align-items:start; justify-content: start;"),r.align==="top-center"&&n.push("align-items:start; justify-content: center;"),r.align==="top-right"&&n.push("align-items:start; justify-content: end;"),r.align==="left"&&n.push("align-items:center; justify-content: start;"),r.align==="center"&&n.push("align-items:center; justify-content: center;"),r.align==="right"&&n.push("align-items:center; justify-content: end;"),r.align==="bottom-left"&&n.push("align-items:end; justify-content: start;"),r.align==="bottom-center"&&n.push("align-items:end; justify-content: center;"),r.align==="bottom-right"&&n.push("align-items:end; justify-content: end;")));else return"flex-direction:column; align-items:start; justify-content: start;";return n.join(`
`).trim()};var xi=(t,e)=>{let n=M(t,"padding",e,{l:0,b:0,t:0,r:0});return cx(n.l!==void 0&&`
padding-left: ${n.l}px;
`,n.r!==void 0&&`
padding-right: ${n.r}px;
`,n.b!==void 0&&`
padding-bottom: ${n.b}px;
`,n.t!==void 0&&`
padding-top: ${n.t}px;
`)};var Ze=(t,e)=>{try{return cx([t.name,css`
display: flex;
position: relative;
user-select: none;
${bi(t,e.mode)}
${xi(t,e.mode)}
${mi(t,e.mode,e?.editor)}
${gi(t,e.mode)}
${Qr(t,e.mode)}
${yi(t,e.mode)}
`,(e?.hover||e?.active)&&wi({item:t,hover:e?.hover,active:e?.active}),Zr(t,e.mode)])}catch(n){console.log(n)}return cx([])};var Lt=window;function vc(t){let e=document.createElement("a");return e.setAttribute("href",t),e.cloneNode(!1).href}function Cc(t){return t?new Promise((e,n)=>{let r="$importModule$"+Math.random().toString(32).slice(2),i=document.createElement("script"),o=()=>{delete window[r],i.onerror=null,i.onload=null,i.remove(),URL.revokeObjectURL(i.src),i.src=""};i.defer=!0,i.type="module",i.onerror=()=>{n(new Error(`Failed to import: ${t}`)),o()},i.onload=()=>{e(window[r]),o()};let c=`import * as m from "${vc(t)}"; window.${r} = m;`,l=new Blob([c],{type:"text/javascript"});i.src=URL.createObjectURL(l),document.head.appendChild(i)}):""}var Me=Cc;var zo=v(Dn());var V=()=>new Map,Ot=t=>{let e=V();return t.forEach((n,r)=>{e.set(r,n)}),e},se=(t,e,n)=>{let r=t.get(e);return r===void 0&&t.set(e,r=n()),r},Ti=(t,e)=>{let n=[];for(let[r,i]of t)n.push(e(i,r));return n},Di=(t,e)=>{for(let[n,r]of t)if(e(r,n))return!0;return!1};var te=()=>new Set;var Pt=t=>t[t.length-1];var ce=Array.from;var An=Array.isArray;var Vt=class{constructor(){this._observers=V()}on(e,n){se(this._observers,e,te).add(n)}once(e,n){let r=(...i)=>{this.off(e,r),n(...i)};this.on(e,r)}off(e,n){let r=this._observers.get(e);r!==void 0&&(r.delete(n),r.size===0&&this._observers.delete(e))}emit(e,n){return ce((this._observers.get(e)||V()).values()).forEach(r=>r(...n))}destroy(){this._observers=V()}};var J=Math.floor;var Le=Math.abs;var Ft=(t,e)=>t<e?t:e,ae=(t,e)=>t>e?t:e,zl=Number.isNaN;var Ri=t=>t!==0?t<0:1/t<0;var ql=Number.MAX_SAFE_INTEGER,Hl=Number.MIN_SAFE_INTEGER,Wl=1<<31;var Ai=Number.isInteger||(t=>typeof t=="number"&&isFinite(t)&&J(t)===t),Jl=Number.isNaN,Kl=Number.parseInt;var Lc=String.fromCharCode,Yl=String.fromCodePoint,Xl=Lc(65535),Oc=t=>t.toLowerCase(),Pc=/^\s*/g,Vc=t=>t.replace(Pc,""),Fc=/([A-Z])/g,On=(t,e)=>Vc(t.replace(Fc,n=>`${e}${Oc(n)}`));var Bc=t=>{let e=unescape(encodeURIComponent(t)),n=e.length,r=new Uint8Array(n);for(let i=0;i<n;i++)r[i]=e.codePointAt(i);return r},Oe=typeof TextEncoder<"u"?new TextEncoder:null,jc=t=>Oe.encode(t),Ui=Oe?jc:Bc;var Ln=typeof TextDecoder>"u"?null:new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!0});Ln&&Ln.decode(new Uint8Array).length===1&&(Ln=null);var be=class{constructor(){this.cpos=0,this.cbuf=new Uint8Array(100),this.bufs=[]}},$t=()=>new be;var zc=t=>{let e=t.cpos;for(let n=0;n<t.bufs.length;n++)e+=t.bufs[n].length;return e};var K=t=>{let e=new Uint8Array(zc(t)),n=0;for(let r=0;r<t.bufs.length;r++){let i=t.bufs[r];e.set(i,n),n+=i.length}return e.set(new Uint8Array(t.cbuf.buffer,0,t.cpos),n),e},qc=(t,e)=>{let n=t.cbuf.length;n-t.cpos<e&&(t.bufs.push(new Uint8Array(t.cbuf.buffer,0,t.cpos)),t.cbuf=new Uint8Array(ae(n,e)*2),t.cpos=0)},A=(t,e)=>{let n=t.cbuf.length;t.cpos===n&&(t.bufs.push(t.cbuf),t.cbuf=new Uint8Array(n*2),t.cpos=0),t.cbuf[t.cpos++]=e};var Gt=A;var C=(t,e)=>{for(;e>127;)A(t,128|127&e),e=J(e/128);A(t,127&e)},zt=(t,e)=>{let n=Ri(e);for(n&&(e=-e),A(t,(e>63?128:0)|(n?64:0)|63&e),e=J(e/64);e>0;)A(t,(e>127?128:0)|127&e),e=J(e/128)},Vn=new Uint8Array(3e4),Hc=Vn.length/3,Wc=(t,e)=>{if(e.length<Hc){let n=Oe.encodeInto(e,Vn).written||0;C(t,n);for(let r=0;r<n;r++)A(t,Vn[r])}else F(t,Ui(e))},Jc=(t,e)=>{let n=unescape(encodeURIComponent(e)),r=n.length;C(t,r);for(let i=0;i<r;i++)A(t,n.codePointAt(i))},xe=Oe&&Oe.encodeInto?Wc:Jc;var qt=(t,e)=>{let n=t.cbuf.length,r=t.cpos,i=Ft(n-r,e.length),o=e.length-i;t.cbuf.set(e.subarray(0,i),r),t.cpos+=i,o>0&&(t.bufs.push(t.cbuf),t.cbuf=new Uint8Array(ae(n*2,o)),t.cbuf.set(e.subarray(i)),t.cpos=o)},F=(t,e)=>{C(t,e.byteLength),qt(t,e)},Fn=(t,e)=>{qc(t,e);let n=new DataView(t.cbuf.buffer,t.cpos,e);return t.cpos+=e,n},Kc=(t,e)=>Fn(t,4).setFloat32(0,e,!1),Yc=(t,e)=>Fn(t,8).setFloat64(0,e,!1),Xc=(t,e)=>Fn(t,8).setBigInt64(0,e,!1);var Li=new DataView(new ArrayBuffer(4)),Zc=t=>(Li.setFloat32(0,t),Li.getFloat32(0)===t),Pe=(t,e)=>{switch(typeof e){case"string":A(t,119),xe(t,e);break;case"number":Ai(e)&&Le(e)<=2147483647?(A(t,125),zt(t,e)):Zc(e)?(A(t,124),Kc(t,e)):(A(t,123),Yc(t,e));break;case"bigint":A(t,122),Xc(t,e);break;case"object":if(e===null)A(t,126);else if(An(e)){A(t,117),C(t,e.length);for(let n=0;n<e.length;n++)Pe(t,e[n])}else if(e instanceof Uint8Array)A(t,116),F(t,e);else{A(t,118);let n=Object.keys(e);C(t,n.length);for(let r=0;r<n.length;r++){let i=n[r];xe(t,i),Pe(t,e[i])}}break;case"boolean":A(t,e?120:121);break;default:A(t,127)}},nt=class extends be{constructor(e){super(),this.w=e,this.s=null,this.count=0}write(e){this.s===e?this.count++:(this.count>0&&C(this,this.count-1),this.count=1,this.w(this,e),this.s=e)}};var Oi=t=>{t.count>0&&(zt(t.encoder,t.count===1?t.s:-t.s),t.count>1&&C(t.encoder,t.count-2))},_e=class{constructor(){this.encoder=new be,this.s=0,this.count=0}write(e){this.s===e?this.count++:(Oi(this),this.count=1,this.s=e)}toUint8Array(){return Oi(this),K(this.encoder)}};var Pi=t=>{if(t.count>0){let e=t.diff*2+(t.count===1?0:1);zt(t.encoder,e),t.count>1&&C(t.encoder,t.count-2)}},Ve=class{constructor(){this.encoder=new be,this.s=0,this.count=0,this.diff=0}write(e){this.diff===e-this.s?(this.s=e,this.count++):(Pi(this),this.count=1,this.diff=e-this.s,this.s=e)}toUint8Array(){return Pi(this),K(this.encoder)}},jt=class{constructor(){this.sarr=[],this.s="",this.lensE=new _e}write(e){this.s+=e,this.s.length>19&&(this.sarr.push(this.s),this.s=""),this.lensE.write(e.length)}toUint8Array(){let e=new be;return this.sarr.push(this.s),this.s="",xe(e,this.sarr.join("")),qt(e,this.lensE.toUint8Array()),K(e)}};var ke=t=>new Error(t),z=()=>{throw ke("Method unimplemented")},le=()=>{throw ke("Unexpected case")};var Ql=crypto.subtle,Vi=crypto.getRandomValues.bind(crypto);var Bn=()=>Vi(new Uint32Array(1))[0];var ta=[1e7]+-1e3+-4e3+-8e3+-1e11,Fi=()=>ta.replace(/[018]/g,t=>(t^Bn()&15>>t/4).toString(16));var Bi=Date.now;var jn=t=>new Promise(t);var nd=Promise.all.bind(Promise);var $n=t=>t===void 0?null:t;var Gn=class{constructor(){this.map=new Map}setItem(e,n){this.map.set(e,n)}getItem(e){return this.map.get(e)}},ji=new Gn,sa=!0;try{typeof localStorage<"u"&&localStorage&&(ji=localStorage,sa=!1)}catch{}var $i=ji;var zi=Object.assign,aa=Object.keys,qi=(t,e)=>{for(let n in t)e(t[n],n)};var Gi=t=>aa(t).length;var Hi=t=>{for(let e in t)return!1;return!0},la=(t,e)=>{for(let n in t)if(!e(t[n],n))return!1;return!0},da=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),Wi=(t,e)=>t===e||Gi(t)===Gi(e)&&la(t,(n,r)=>(n!==void 0||da(e,r))&&e[r]===n);var rt=(t,e,n=0)=>{try{for(;n<t.length;n++)t[n](...e)}finally{n<t.length&&rt(t,e,n+1)}};var Ji=(t,e)=>e.includes(t);var it=typeof process<"u"&&process.release&&/node|io\.js/.test(process.release.name)&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]";var rd=typeof navigator<"u"?/Mac/.test(navigator.platform):!1,Y,fa=[],ha=()=>{if(Y===void 0)if(it){Y=V();let t=process.argv,e=null;for(let n=0;n<t.length;n++){let r=t[n];r[0]==="-"?(e!==null&&Y.set(e,""),e=r):e!==null?(Y.set(e,r),e=null):fa.push(r)}e!==null&&Y.set(e,"")}else typeof location=="object"?(Y=V(),(location.search||"?").slice(1).split("&").forEach(t=>{if(t.length!==0){let[e,n]=t.split("=");Y.set(`--${On(e,"-")}`,n),Y.set(`-${On(e,"-")}`,n)}})):Y=V();return Y},zn=t=>ha().has(t);var qn=t=>it?$n(process.env[t.toUpperCase()]):$n($i.getItem(t));var pa=t=>zn("--"+t)||qn(t)!==null,id=pa("production"),Yi=it&&Ji(process.env.FORCE_COLOR,["true","1","2"]),Xi=!zn("no-colors")&&(!it||process.stdout.isTTY||Yi)&&(!it||zn("color")||Yi||qn("COLORTERM")!==null||(qn("TERM")||"").includes("color"));var Hn=class{constructor(e,n){this.left=e,this.right=n}},X=(t,e)=>new Hn(t,e);var ve=typeof document<"u"?document:{};var od=typeof DOMParser<"u"?new DOMParser:null;var Zi=t=>Ti(t,(e,n)=>`${n}:${e};`).join("");var sd=ve.ELEMENT_NODE,cd=ve.TEXT_NODE,ad=ve.CDATA_SECTION_NODE,ld=ve.COMMENT_NODE,dd=ve.DOCUMENT_NODE,ud=ve.DOCUMENT_TYPE_NODE,fd=ve.DOCUMENT_FRAGMENT_NODE;var Z=Symbol;var ot=Z(),st=Z(),Wn=Z(),Jn=Z(),Kn=Z(),ct=Z(),Yn=Z(),at=Z(),Xn=Z(),Qi=t=>{let e=[],n=[],r=0;for(;r<t.length;r++){let i=t[r];i.constructor===String||i.constructor===Number?e.push(i):i.constructor===Object&&n.push(JSON.stringify(i))}return n};var hd=Bi();var xa={[ot]:X("font-weight","bold"),[st]:X("font-weight","normal"),[Wn]:X("color","blue"),[Kn]:X("color","green"),[Jn]:X("color","grey"),[ct]:X("color","red"),[Yn]:X("color","purple"),[at]:X("color","orange"),[Xn]:X("color","black")},_a=t=>{let e=[],n=[],r=V(),i=[],o=0;for(;o<t.length;o++){let s=t[o],c=xa[s];if(c!==void 0)r.set(c.left,c.right);else if(s.constructor===String||s.constructor===Number){let l=Zi(r);o>0||l.length>0?(e.push("%c"+s),n.push(l)):e.push(s)}else break}for(o>0&&(i=n,i.unshift(e.join("")));o<t.length;o++){let s=t[o];s instanceof Symbol||i.push(s)}return i},ka=Xi?_a:Qi,eo=(...t)=>{console.log(...ka(t)),va.forEach(e=>e.print(t))};var va=te();var to=t=>({[Symbol.iterator](){return this},next:t}),no=(t,e)=>to(()=>{let n;do n=t.next();while(!n.done&&!e(n.value));return n}),Ht=(t,e)=>to(()=>{let{done:n,value:r}=t.next();return{done:n,value:n?void 0:e(r)}});var er=class{constructor(e,n){this.clock=e,this.len=n}},Xt=class{constructor(){this.clients=new Map}},mo=(t,e,n)=>e.clients.forEach((r,i)=>{let o=t.doc.store.clients.get(i);for(let s=0;s<r.length;s++){let c=r[s];vo(t,o,c.clock,c.len,n)}}),Na=(t,e)=>{let n=0,r=t.length-1;for(;n<=r;){let i=J((n+r)/2),o=t[i],s=o.clock;if(s<=e){if(e<s+o.len)return i;n=i+1}else r=i-1}return null},wo=(t,e)=>{let n=t.clients.get(e.client);return n!==void 0&&Na(n,e.clock)!==null},yo=t=>{t.clients.forEach(e=>{e.sort((i,o)=>i.clock-o.clock);let n,r;for(n=1,r=1;n<e.length;n++){let i=e[r-1],o=e[n];i.clock+i.len>=o.clock?i.len=ae(i.len,o.clock+o.len-i.clock):(r<n&&(e[r]=o),r++)}e.length=r})};var bo=(t,e,n,r)=>{se(t.clients,e,()=>[]).push(new er(n,r))},Ta=()=>new Xt;var Da=(t,e)=>{C(t.restEncoder,e.clients.size),ce(e.clients.entries()).sort((n,r)=>r[0]-n[0]).forEach(([n,r])=>{t.resetDsCurVal(),C(t.restEncoder,n);let i=r.length;C(t.restEncoder,i);for(let o=0;o<i;o++){let s=r[o];t.writeDsClock(s.clock),t.writeDsLen(s.len)}})};var xo=Bn,ut=class t extends Vt{constructor({guid:e=Fi(),collectionid:n=null,gc:r=!0,gcFilter:i=()=>!0,meta:o=null,autoLoad:s=!1,shouldLoad:c=!0}={}){super(),this.gc=r,this.gcFilter=i,this.clientID=xo(),this.guid=e,this.collectionid=n,this.share=new Map,this.store=new ar,this._transaction=null,this._transactionCleanups=[],this.subdocs=new Set,this._item=null,this.shouldLoad=c,this.autoLoad=s,this.meta=o,this.isLoaded=!1,this.isSynced=!1,this.whenLoaded=jn(h=>{this.on("load",()=>{this.isLoaded=!0,h(this)})});let l=()=>jn(h=>{let a=f=>{(f===void 0||f===!0)&&(this.off("sync",a),h())};this.on("sync",a)});this.on("sync",h=>{h===!1&&this.isSynced&&(this.whenSynced=l()),this.isSynced=h===void 0||h===!0,this.isLoaded||this.emit("load",[])}),this.whenSynced=l()}load(){let e=this._item;e!==null&&!this.shouldLoad&&I(e.parent.doc,n=>{n.subdocsLoaded.add(this)},null,!0),this.shouldLoad=!0}getSubdocs(){return this.subdocs}getSubdocGuids(){return new Set(ce(this.subdocs).map(e=>e.guid))}transact(e,n=null){return I(this,e,n)}get(e,n=D){let r=se(this.share,e,()=>{let o=new n;return o._integrate(this,null),o}),i=r.constructor;if(n!==D&&i!==n)if(i===D){let o=new n;o._map=r._map,r._map.forEach(s=>{for(;s!==null;s=s.left)s.parent=o}),o._start=r._start;for(let s=o._start;s!==null;s=s.right)s.parent=o;return o._length=r._length,this.share.set(e,o),o._integrate(this,null),o}else throw new Error(`Type with the name ${e} has already been defined with a different constructor`);return r}getArray(e=""){return this.get(e,hr)}getText(e=""){return this.get(e,mr)}getMap(e=""){return this.get(e,pt)}getXmlFragment(e=""){return this.get(e,mt)}toJSON(){let e={};return this.share.forEach((n,r)=>{e[r]=n.toJSON()}),e}destroy(){ce(this.subdocs).forEach(n=>n.destroy());let e=this._item;if(e!==null){this._item=null;let n=e.content;n.doc=new t({guid:this.guid,...n.opts,shouldLoad:!1}),n.doc._item=e,I(e.parent.doc,r=>{let i=n.doc;e.deleted||r.subdocsAdded.add(i),r.subdocsRemoved.add(this)},null,!0)}this.emit("destroyed",[!0]),this.emit("destroy",[this]),super.destroy()}on(e,n){super.on(e,n)}off(e,n){super.off(e,n)}};var tr=class{constructor(){this.restEncoder=$t()}toUint8Array(){return K(this.restEncoder)}resetDsCurVal(){}writeDsClock(e){C(this.restEncoder,e)}writeDsLen(e){C(this.restEncoder,e)}},nr=class extends tr{writeLeftID(e){C(this.restEncoder,e.client),C(this.restEncoder,e.clock)}writeRightID(e){C(this.restEncoder,e.client),C(this.restEncoder,e.clock)}writeClient(e){C(this.restEncoder,e)}writeInfo(e){Gt(this.restEncoder,e)}writeString(e){xe(this.restEncoder,e)}writeParentInfo(e){C(this.restEncoder,e?1:0)}writeTypeRef(e){C(this.restEncoder,e)}writeLen(e){C(this.restEncoder,e)}writeAny(e){Pe(this.restEncoder,e)}writeBuf(e){F(this.restEncoder,e)}writeJSON(e){xe(this.restEncoder,JSON.stringify(e))}writeKey(e){xe(this.restEncoder,e)}},rr=class{constructor(){this.restEncoder=$t(),this.dsCurrVal=0}toUint8Array(){return K(this.restEncoder)}resetDsCurVal(){this.dsCurrVal=0}writeDsClock(e){let n=e-this.dsCurrVal;this.dsCurrVal=e,C(this.restEncoder,n)}writeDsLen(e){e===0&&le(),C(this.restEncoder,e-1),this.dsCurrVal+=e}},ir=class extends rr{constructor(){super(),this.keyMap=new Map,this.keyClock=0,this.keyClockEncoder=new Ve,this.clientEncoder=new _e,this.leftClockEncoder=new Ve,this.rightClockEncoder=new Ve,this.infoEncoder=new nt(Gt),this.stringEncoder=new jt,this.parentInfoEncoder=new nt(Gt),this.typeRefEncoder=new _e,this.lenEncoder=new _e}toUint8Array(){let e=$t();return C(e,0),F(e,this.keyClockEncoder.toUint8Array()),F(e,this.clientEncoder.toUint8Array()),F(e,this.leftClockEncoder.toUint8Array()),F(e,this.rightClockEncoder.toUint8Array()),F(e,K(this.infoEncoder)),F(e,this.stringEncoder.toUint8Array()),F(e,K(this.parentInfoEncoder)),F(e,this.typeRefEncoder.toUint8Array()),F(e,this.lenEncoder.toUint8Array()),qt(e,K(this.restEncoder)),K(e)}writeLeftID(e){this.clientEncoder.write(e.client),this.leftClockEncoder.write(e.clock)}writeRightID(e){this.clientEncoder.write(e.client),this.rightClockEncoder.write(e.clock)}writeClient(e){this.clientEncoder.write(e)}writeInfo(e){this.infoEncoder.write(e)}writeString(e){this.stringEncoder.write(e)}writeParentInfo(e){this.parentInfoEncoder.write(e?1:0)}writeTypeRef(e){this.typeRefEncoder.write(e)}writeLen(e){this.lenEncoder.write(e)}writeAny(e){Pe(this.restEncoder,e)}writeBuf(e){F(this.restEncoder,e)}writeJSON(e){Pe(this.restEncoder,e)}writeKey(e){let n=this.keyMap.get(e);n===void 0?(this.keyClockEncoder.write(this.keyClock++),this.stringEncoder.write(e)):this.keyClockEncoder.write(n)}},Ra=(t,e,n,r)=>{r=ae(r,e[0].id.clock);let i=ne(e,r);C(t.restEncoder,e.length-i),t.writeClient(n),C(t.restEncoder,r);let o=e[i];o.write(t,r-o.id.clock);for(let s=i+1;s<e.length;s++)e[s].write(t,0)},Aa=(t,e,n)=>{let r=new Map;n.forEach((i,o)=>{B(e,o)>i&&r.set(o,i)}),xr(e).forEach((i,o)=>{n.has(o)||r.set(o,0)}),C(t.restEncoder,r.size),ce(r.entries()).sort((i,o)=>o[0]-i[0]).forEach(([i,o])=>{Ra(t,e.clients.get(i),i,o)})};var Ua=(t,e)=>Aa(t,e.doc.store,e.beforeState);var or=class{constructor(){this.l=[]}},oo=()=>new or,so=(t,e)=>t.l.push(e),co=(t,e)=>{let n=t.l,r=n.length;t.l=n.filter(i=>e!==i),r===t.l.length&&console.error("[yjs] Tried to remove event handler that doesn't exist.")},_o=(t,e,n)=>rt(t.l,[e,n]),Fe=class{constructor(e,n){this.client=e,this.clock=n}},Wt=(t,e)=>t===e||t!==null&&e!==null&&t.client===e.client&&t.clock===e.clock,E=(t,e)=>new Fe(t,e);var Ma=t=>{for(let[e,n]of t.doc.share.entries())if(n===t)return e;throw le()};var sr=class{constructor(e,n){this.ds=e,this.sv=n}};var La=(t,e)=>new sr(t,e),Dd=La(Ta(),new Map);var lt=(t,e)=>e===void 0?!t.deleted:e.sv.has(t.id.client)&&(e.sv.get(t.id.client)||0)>t.id.clock&&!wo(e.ds,t.id),cr=(t,e)=>{let n=se(t.meta,cr,te),r=t.doc.store;n.has(e)||(e.sv.forEach((i,o)=>{i<B(r,o)&&ue(t,E(o,i))}),mo(t,e.ds,i=>{}),n.add(e))};var ar=class{constructor(){this.clients=new Map,this.pendingStructs=null,this.pendingDs=null}},xr=t=>{let e=new Map;return t.clients.forEach((n,r)=>{let i=n[n.length-1];e.set(r,i.id.clock+i.length)}),e},B=(t,e)=>{let n=t.clients.get(e);if(n===void 0)return 0;let r=n[n.length-1];return r.id.clock+r.length},ko=(t,e)=>{let n=t.clients.get(e.id.client);if(n===void 0)n=[],t.clients.set(e.id.client,n);else{let r=n[n.length-1];if(r.id.clock+r.length!==e.id.clock)throw le()}n.push(e)},ne=(t,e)=>{let n=0,r=t.length-1,i=t[r],o=i.id.clock;if(o===e)return r;let s=J(e/(o+i.length-1)*r);for(;n<=r;){if(i=t[s],o=i.id.clock,o<=e){if(e<o+i.length)return s;n=s+1}else r=s-1;s=J((n+r)/2)}throw le()},Oa=(t,e)=>{let n=t.clients.get(e.client);return n[ne(n,e.clock)]},Zn=Oa,lr=(t,e,n)=>{let r=ne(e,n),i=e[r];return i.id.clock<n&&i instanceof O?(e.splice(r+1,0,Bo(t,i,n-i.id.clock)),r+1):r},ue=(t,e)=>{let n=t.doc.store.clients.get(e.client);return n[lr(t,n,e.clock)]},ao=(t,e,n)=>{let r=e.clients.get(n.client),i=ne(r,n.clock),o=r[i];return n.clock!==o.id.clock+o.length-1&&o.constructor!==Q&&r.splice(i+1,0,Bo(t,o,n.clock-o.id.clock+1)),o},Pa=(t,e,n)=>{let r=t.clients.get(e.id.client);r[ne(r,e.id.clock)]=n},vo=(t,e,n,r,i)=>{if(r===0)return;let o=n+r,s=lr(t,e,n),c;do c=e[s++],o<c.id.clock+c.length&&lr(t,e,o),i(c);while(s<e.length&&e[s].id.clock<o)},dr=class{constructor(e,n,r){this.doc=e,this.deleteSet=new Xt,this.beforeState=xr(e.store),this.afterState=new Map,this.changed=new Map,this.changedParentTypes=new Map,this._mergeStructs=[],this.origin=n,this.meta=new Map,this.local=r,this.subdocsAdded=new Set,this.subdocsRemoved=new Set,this.subdocsLoaded=new Set,this._needFormattingCleanup=!1}},lo=(t,e)=>e.deleteSet.clients.size===0&&!Di(e.afterState,(n,r)=>e.beforeState.get(r)!==n)?!1:(yo(e.deleteSet),Ua(t,e),Da(t,e.deleteSet),!0),uo=(t,e,n)=>{let r=e._item;(r===null||r.id.clock<(t.beforeState.get(r.id.client)||0)&&!r.deleted)&&se(t.changed,e,te).add(n)},Yt=(t,e)=>{let n=t[e],r=t[e-1],i=e;for(;i>0;n=r,r=t[--i-1]){if(r.deleted===n.deleted&&r.constructor===n.constructor&&r.mergeWith(n)){n instanceof O&&n.parentSub!==null&&n.parent._map.get(n.parentSub)===n&&n.parent._map.set(n.parentSub,r);continue}break}let o=e-i;return o&&t.splice(e+1-o,o),o},Va=(t,e,n)=>{for(let[r,i]of t.clients.entries()){let o=e.clients.get(r);for(let s=i.length-1;s>=0;s--){let c=i[s],l=c.clock+c.len;for(let h=ne(o,c.clock),a=o[h];h<o.length&&a.id.clock<l;a=o[++h]){let f=o[h];if(c.clock+c.len<=f.id.clock)break;f instanceof O&&f.deleted&&!f.keep&&n(f)&&f.gc(e,!1)}}}},Fa=(t,e)=>{t.clients.forEach((n,r)=>{let i=e.clients.get(r);for(let o=n.length-1;o>=0;o--){let s=n[o],c=Ft(i.length-1,1+ne(i,s.clock+s.len-1));for(let l=c,h=i[l];l>0&&h.id.clock>=s.clock;h=i[l])l-=1+Yt(i,l)}})};var Co=(t,e)=>{if(e<t.length){let n=t[e],r=n.doc,i=r.store,o=n.deleteSet,s=n._mergeStructs;try{yo(o),n.afterState=xr(n.doc.store),r.emit("beforeObserverCalls",[n,r]);let c=[];n.changed.forEach((l,h)=>c.push(()=>{(h._item===null||!h._item.deleted)&&h._callObserver(n,l)})),c.push(()=>{n.changedParentTypes.forEach((l,h)=>{h._dEH.l.length>0&&(h._item===null||!h._item.deleted)&&(l=l.filter(a=>a.target._item===null||!a.target._item.deleted),l.forEach(a=>{a.currentTarget=h,a._path=null}),l.sort((a,f)=>a.path.length-f.path.length),_o(h._dEH,l,n))})}),c.push(()=>r.emit("afterTransaction",[n,r])),rt(c,[]),n._needFormattingCleanup&&Wa(n)}finally{r.gc&&Va(o,i,r.gcFilter),Fa(o,i),n.afterState.forEach((a,f)=>{let u=n.beforeState.get(f)||0;if(u!==a){let d=i.clients.get(f),p=ae(ne(d,u),1);for(let g=d.length-1;g>=p;)g-=1+Yt(d,g)}});for(let a=s.length-1;a>=0;a--){let{client:f,clock:u}=s[a].id,d=i.clients.get(f),p=ne(d,u);p+1<d.length&&Yt(d,p+1)>1||p>0&&Yt(d,p)}if(!n.local&&n.afterState.get(r.clientID)!==n.beforeState.get(r.clientID)&&(eo(at,ot,"[yjs] ",st,ct,"Changed the client-id because another client seems to be using it."),r.clientID=xo()),r.emit("afterTransactionCleanup",[n,r]),r._observers.has("update")){let a=new nr;lo(a,n)&&r.emit("update",[a.toUint8Array(),n.origin,r,n])}if(r._observers.has("updateV2")){let a=new ir;lo(a,n)&&r.emit("updateV2",[a.toUint8Array(),n.origin,r,n])}let{subdocsAdded:c,subdocsLoaded:l,subdocsRemoved:h}=n;(c.size>0||h.size>0||l.size>0)&&(c.forEach(a=>{a.clientID=r.clientID,a.collectionid==null&&(a.collectionid=r.collectionid),r.subdocs.add(a)}),h.forEach(a=>r.subdocs.delete(a)),r.emit("subdocs",[{loaded:l,added:c,removed:h},r,n]),h.forEach(a=>a.destroy())),t.length<=e+1?(r._transactionCleanups=[],r.emit("afterAllTransactions",[r,t])):Co(t,e+1)}}},I=(t,e,n=null,r=!0)=>{let i=t._transactionCleanups,o=!1,s=null;t._transaction===null&&(o=!0,t._transaction=new dr(t,n,r),i.push(t._transaction),i.length===1&&t.emit("beforeAllTransactions",[t]),t.emit("beforeTransaction",[t._transaction,t]));try{s=e(t._transaction)}finally{if(o){let c=t._transaction===i[0];t._transaction=null,c&&Co(i,0)}}return s};var fo="You must not compute changes after the event-handler fired.",Be=class{constructor(e,n){this.target=e,this.currentTarget=e,this.transaction=n,this._changes=null,this._keys=null,this._delta=null,this._path=null}get path(){return this._path||(this._path=Ba(this.currentTarget,this.target))}deletes(e){return wo(this.transaction.deleteSet,e.id)}get keys(){if(this._keys===null){if(this.transaction.doc._transactionCleanups.length===0)throw ke(fo);let e=new Map,n=this.target;this.transaction.changed.get(n).forEach(i=>{if(i!==null){let o=n._map.get(i),s,c;if(this.adds(o)){let l=o.left;for(;l!==null&&this.adds(l);)l=l.left;if(this.deletes(o))if(l!==null&&this.deletes(l))s="delete",c=Pt(l.content.getContent());else return;else l!==null&&this.deletes(l)?(s="update",c=Pt(l.content.getContent())):(s="add",c=void 0)}else if(this.deletes(o))s="delete",c=Pt(o.content.getContent());else return;e.set(i,{action:s,oldValue:c})}}),this._keys=e}return this._keys}get delta(){return this.changes.delta}adds(e){return e.id.clock>=(this.transaction.beforeState.get(e.id.client)||0)}get changes(){let e=this._changes;if(e===null){if(this.transaction.doc._transactionCleanups.length===0)throw ke(fo);let n=this.target,r=te(),i=te(),o=[];if(e={added:r,deleted:i,delta:o,keys:this.keys},this.transaction.changed.get(n).has(null)){let c=null,l=()=>{c&&o.push(c)};for(let h=n._start;h!==null;h=h.right)h.deleted?this.deletes(h)&&!this.adds(h)&&((c===null||c.delete===void 0)&&(l(),c={delete:0}),c.delete+=h.length,i.add(h)):this.adds(h)?((c===null||c.insert===void 0)&&(l(),c={insert:[]}),c.insert=c.insert.concat(h.content.getContent()),r.add(h)):((c===null||c.retain===void 0)&&(l(),c={retain:0}),c.retain+=h.length);c!==null&&c.retain===void 0&&l()}this._changes=e}return e}},Ba=(t,e)=>{let n=[];for(;e._item!==null&&e!==t;){if(e._item.parentSub!==null)n.unshift(e._item.parentSub);else{let r=0,i=e._item.parent._start;for(;i!==e._item&&i!==null;)i.deleted||r++,i=i.right;n.unshift(r)}e=e._item.parent}return n},So=80,_r=0,ur=class{constructor(e,n){e.marker=!0,this.p=e,this.index=n,this.timestamp=_r++}},ja=t=>{t.timestamp=_r++},Io=(t,e,n)=>{t.p.marker=!1,t.p=e,e.marker=!0,t.index=n,t.timestamp=_r++},$a=(t,e,n)=>{if(t.length>=So){let r=t.reduce((i,o)=>i.timestamp<o.timestamp?i:o);return Io(r,e,n),r}else{let r=new ur(e,n);return t.push(r),r}},rn=(t,e)=>{if(t._start===null||e===0||t._searchMarker===null)return null;let n=t._searchMarker.length===0?null:t._searchMarker.reduce((o,s)=>Le(e-o.index)<Le(e-s.index)?o:s),r=t._start,i=0;for(n!==null&&(r=n.p,i=n.index,ja(n));r.right!==null&&i<e;){if(!r.deleted&&r.countable){if(e<i+r.length)break;i+=r.length}r=r.right}for(;r.left!==null&&i>e;)r=r.left,!r.deleted&&r.countable&&(i-=r.length);for(;r.left!==null&&r.left.id.client===r.id.client&&r.left.id.clock+r.left.length===r.id.clock;)r=r.left,!r.deleted&&r.countable&&(i-=r.length);return n!==null&&Le(n.index-i)<r.parent.length/So?(Io(n,r,i),n):$a(t._searchMarker,r,i)},ft=(t,e,n)=>{for(let r=t.length-1;r>=0;r--){let i=t[r];if(n>0){let o=i.p;for(o.marker=!1;o&&(o.deleted||!o.countable);)o=o.left,o&&!o.deleted&&o.countable&&(i.index-=o.length);if(o===null||o.marker===!0){t.splice(r,1);continue}i.p=o,o.marker=!0}(e<i.index||n>0&&e===i.index)&&(i.index=ae(e,i.index+n))}};var on=(t,e,n)=>{let r=t,i=e.changedParentTypes;for(;se(i,t,()=>[]).push(n),t._item!==null;)t=t._item.parent;_o(r._eH,n,e)},D=class{constructor(){this._item=null,this._map=new Map,this._start=null,this.doc=null,this._length=0,this._eH=oo(),this._dEH=oo(),this._searchMarker=null}get parent(){return this._item?this._item.parent:null}_integrate(e,n){this.doc=e,this._item=n}_copy(){throw z()}clone(){throw z()}_write(e){}get _first(){let e=this._start;for(;e!==null&&e.deleted;)e=e.right;return e}_callObserver(e,n){!e.local&&this._searchMarker&&(this._searchMarker.length=0)}observe(e){so(this._eH,e)}observeDeep(e){so(this._dEH,e)}unobserve(e){co(this._eH,e)}unobserveDeep(e){co(this._dEH,e)}toJSON(){}},Eo=(t,e,n)=>{e<0&&(e=t._length+e),n<0&&(n=t._length+n);let r=n-e,i=[],o=t._start;for(;o!==null&&r>0;){if(o.countable&&!o.deleted){let s=o.content.getContent();if(s.length<=e)e-=s.length;else{for(let c=e;c<s.length&&r>0;c++)i.push(s[c]),r--;e=0}}o=o.right}return i},No=t=>{let e=[],n=t._start;for(;n!==null;){if(n.countable&&!n.deleted){let r=n.content.getContent();for(let i=0;i<r.length;i++)e.push(r[i])}n=n.right}return e};var ht=(t,e)=>{let n=0,r=t._start;for(;r!==null;){if(r.countable&&!r.deleted){let i=r.content.getContent();for(let o=0;o<i.length;o++)e(i[o],n++,t)}r=r.right}},To=(t,e)=>{let n=[];return ht(t,(r,i)=>{n.push(e(r,i,t))}),n},Ga=t=>{let e=t._start,n=null,r=0;return{[Symbol.iterator](){return this},next:()=>{if(n===null){for(;e!==null&&e.deleted;)e=e.right;if(e===null)return{done:!0,value:void 0};n=e.content.getContent(),r=0,e=e.right}let i=n[r++];return n.length<=r&&(n=null),{done:!1,value:i}}}},Do=(t,e)=>{let n=rn(t,e),r=t._start;for(n!==null&&(r=n.p,e-=n.index);r!==null;r=r.right)if(!r.deleted&&r.countable){if(e<r.length)return r.content.getContent()[e];e-=r.length}},Zt=(t,e,n,r)=>{let i=n,o=t.doc,s=o.clientID,c=o.store,l=n===null?e._start:n.right,h=[],a=()=>{h.length>0&&(i=new O(E(s,B(c,s)),i,i&&i.lastId,l,l&&l.id,e,null,new wt(h)),i.integrate(t,0),h=[])};r.forEach(f=>{if(f===null)h.push(f);else switch(f.constructor){case Number:case Object:case Boolean:case Array:case String:h.push(f);break;default:switch(a(),f.constructor){case Uint8Array:case ArrayBuffer:i=new O(E(s,B(c,s)),i,i&&i.lastId,l,l&&l.id,e,null,new tn(new Uint8Array(f))),i.integrate(t,0);break;case ut:i=new O(E(s,B(c,s)),i,i&&i.lastId,l,l&&l.id,e,null,new nn(f)),i.integrate(t,0);break;default:if(f instanceof D)i=new O(E(s,B(c,s)),i,i&&i.lastId,l,l&&l.id,e,null,new he(f)),i.integrate(t,0);else throw new Error("Unexpected content type in insert operation")}}}),a()},Ro=()=>ke("Length exceeded!"),Ao=(t,e,n,r)=>{if(n>e._length)throw Ro();if(n===0)return e._searchMarker&&ft(e._searchMarker,n,r.length),Zt(t,e,null,r);let i=n,o=rn(e,n),s=e._start;for(o!==null&&(s=o.p,n-=o.index,n===0&&(s=s.prev,n+=s&&s.countable&&!s.deleted?s.length:0));s!==null;s=s.right)if(!s.deleted&&s.countable){if(n<=s.length){n<s.length&&ue(t,E(s.id.client,s.id.clock+n));break}n-=s.length}return e._searchMarker&&ft(e._searchMarker,i,r.length),Zt(t,e,s,r)},za=(t,e,n)=>{let i=(e._searchMarker||[]).reduce((o,s)=>s.index>o.index?s:o,{index:0,p:e._start}).p;if(i)for(;i.right;)i=i.right;return Zt(t,e,i,n)},Uo=(t,e,n,r)=>{if(r===0)return;let i=n,o=r,s=rn(e,n),c=e._start;for(s!==null&&(c=s.p,n-=s.index);c!==null&&n>0;c=c.right)!c.deleted&&c.countable&&(n<c.length&&ue(t,E(c.id.client,c.id.clock+n)),n-=c.length);for(;r>0&&c!==null;)c.deleted||(r<c.length&&ue(t,E(c.id.client,c.id.clock+r)),c.delete(t),r-=c.length),c=c.right;if(r>0)throw Ro();e._searchMarker&&ft(e._searchMarker,i,-o+r)},Qt=(t,e,n)=>{let r=e._map.get(n);r!==void 0&&r.delete(t)},kr=(t,e,n,r)=>{let i=e._map.get(n)||null,o=t.doc,s=o.clientID,c;if(r==null)c=new wt([r]);else switch(r.constructor){case Number:case Object:case Boolean:case Array:case String:c=new wt([r]);break;case Uint8Array:c=new tn(r);break;case ut:c=new nn(r);break;default:if(r instanceof D)c=new he(r);else throw new Error("Unexpected content type")}new O(E(s,B(o.store,s)),i,i&&i.lastId,null,null,e,n,c).integrate(t,0)},vr=(t,e)=>{let n=t._map.get(e);return n!==void 0&&!n.deleted?n.content.getContent()[n.length-1]:void 0},Mo=t=>{let e={};return t._map.forEach((n,r)=>{n.deleted||(e[r]=n.content.getContent()[n.length-1])}),e},Lo=(t,e)=>{let n=t._map.get(e);return n!==void 0&&!n.deleted};var Jt=t=>no(t.entries(),e=>!e[1].deleted),fr=class extends Be{constructor(e,n){super(e,n),this._transaction=n}},hr=class t extends D{constructor(){super(),this._prelimContent=[],this._searchMarker=[]}static from(e){let n=new t;return n.push(e),n}_integrate(e,n){super._integrate(e,n),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new t}clone(){let e=new t;return e.insert(0,this.toArray().map(n=>n instanceof D?n.clone():n)),e}get length(){return this._prelimContent===null?this._length:this._prelimContent.length}_callObserver(e,n){super._callObserver(e,n),on(this,e,new fr(this,e))}insert(e,n){this.doc!==null?I(this.doc,r=>{Ao(r,this,e,n)}):this._prelimContent.splice(e,0,...n)}push(e){this.doc!==null?I(this.doc,n=>{za(n,this,e)}):this._prelimContent.push(...e)}unshift(e){this.insert(0,e)}delete(e,n=1){this.doc!==null?I(this.doc,r=>{Uo(r,this,e,n)}):this._prelimContent.splice(e,n)}get(e){return Do(this,e)}toArray(){return No(this)}slice(e=0,n=this.length){return Eo(this,e,n)}toJSON(){return this.map(e=>e instanceof D?e.toJSON():e)}map(e){return To(this,e)}forEach(e){ht(this,e)}[Symbol.iterator](){return Ga(this)}_write(e){e.writeTypeRef(Ya)}};var pr=class extends Be{constructor(e,n,r){super(e,n),this.keysChanged=r}},pt=class t extends D{constructor(e){super(),this._prelimContent=null,e===void 0?this._prelimContent=new Map:this._prelimContent=new Map(e)}_integrate(e,n){super._integrate(e,n),this._prelimContent.forEach((r,i)=>{this.set(i,r)}),this._prelimContent=null}_copy(){return new t}clone(){let e=new t;return this.forEach((n,r)=>{e.set(r,n instanceof D?n.clone():n)}),e}_callObserver(e,n){on(this,e,new pr(this,e,n))}toJSON(){let e={};return this._map.forEach((n,r)=>{if(!n.deleted){let i=n.content.getContent()[n.length-1];e[r]=i instanceof D?i.toJSON():i}}),e}get size(){return[...Jt(this._map)].length}keys(){return Ht(Jt(this._map),e=>e[0])}values(){return Ht(Jt(this._map),e=>e[1].content.getContent()[e[1].length-1])}entries(){return Ht(Jt(this._map),e=>[e[0],e[1].content.getContent()[e[1].length-1]])}forEach(e){this._map.forEach((n,r)=>{n.deleted||e(n.content.getContent()[n.length-1],r,this)})}[Symbol.iterator](){return this.entries()}delete(e){this.doc!==null?I(this.doc,n=>{Qt(n,this,e)}):this._prelimContent.delete(e)}set(e,n){return this.doc!==null?I(this.doc,r=>{kr(r,this,e,n)}):this._prelimContent.set(e,n),n}get(e){return vr(this,e)}has(e){return Lo(this,e)}clear(){this.doc!==null?I(this.doc,e=>{this.forEach(function(n,r,i){Qt(e,i,r)})}):this._prelimContent.clear()}_write(e){e.writeTypeRef(Xa)}};var de=(t,e)=>t===e||typeof t=="object"&&typeof e=="object"&&t&&e&&Wi(t,e),gt=class{constructor(e,n,r,i){this.left=e,this.right=n,this.index=r,this.currentAttributes=i}forward(){switch(this.right===null&&le(),this.right.content.constructor){case U:this.right.deleted||$e(this.currentAttributes,this.right.content);break;default:this.right.deleted||(this.index+=this.right.length);break}this.left=this.right,this.right=this.right.right}},ho=(t,e,n)=>{for(;e.right!==null&&n>0;){switch(e.right.content.constructor){case U:e.right.deleted||$e(e.currentAttributes,e.right.content);break;default:e.right.deleted||(n<e.right.length&&ue(t,E(e.right.id.client,e.right.id.clock+n)),e.index+=e.right.length,n-=e.right.length);break}e.left=e.right,e.right=e.right.right}return e},Kt=(t,e,n)=>{let r=new Map,i=rn(e,n);if(i){let o=new gt(i.p.left,i.p,i.index,r);return ho(t,o,n-i.index)}else{let o=new gt(null,e._start,0,r);return ho(t,o,n)}},Oo=(t,e,n,r)=>{for(;n.right!==null&&(n.right.deleted===!0||n.right.content.constructor===U&&de(r.get(n.right.content.key),n.right.content.value));)n.right.deleted||r.delete(n.right.content.key),n.forward();let i=t.doc,o=i.clientID;r.forEach((s,c)=>{let l=n.left,h=n.right,a=new O(E(o,B(i.store,o)),l,l&&l.lastId,h,h&&h.id,e,null,new U(c,s));a.integrate(t,0),n.right=a,n.forward()})},$e=(t,e)=>{let{key:n,value:r}=e;r===null?t.delete(n):t.set(n,r)},Po=(t,e)=>{for(;t.right!==null;){if(!(t.right.deleted||t.right.content.constructor===U&&de(e[t.right.content.key]||null,t.right.content.value)))break;t.forward()}},Vo=(t,e,n,r)=>{let i=t.doc,o=i.clientID,s=new Map;for(let c in r){let l=r[c],h=n.currentAttributes.get(c)||null;if(!de(h,l)){s.set(c,h);let{left:a,right:f}=n;n.right=new O(E(o,B(i.store,o)),a,a&&a.lastId,f,f&&f.id,e,null,new U(c,l)),n.right.integrate(t,0),n.forward()}}return s},Qn=(t,e,n,r,i)=>{n.currentAttributes.forEach((u,d)=>{i[d]===void 0&&(i[d]=null)});let o=t.doc,s=o.clientID;Po(n,i);let c=Vo(t,e,n,i),l=r.constructor===String?new fe(r):r instanceof D?new he(r):new je(r),{left:h,right:a,index:f}=n;e._searchMarker&&ft(e._searchMarker,n.index,l.getLength()),a=new O(E(s,B(o.store,s)),h,h&&h.lastId,a,a&&a.id,e,null,l),a.integrate(t,0),n.right=a,n.index=f,n.forward(),Oo(t,e,n,c)},po=(t,e,n,r,i)=>{let o=t.doc,s=o.clientID;Po(n,i);let c=Vo(t,e,n,i);e:for(;n.right!==null&&(r>0||c.size>0&&(n.right.deleted||n.right.content.constructor===U));){if(!n.right.deleted)switch(n.right.content.constructor){case U:{let{key:l,value:h}=n.right.content,a=i[l];if(a!==void 0){if(de(a,h))c.delete(l);else{if(r===0)break e;c.set(l,h)}n.right.delete(t)}else n.currentAttributes.set(l,h);break}default:r<n.right.length&&ue(t,E(n.right.id.client,n.right.id.clock+r)),r-=n.right.length;break}n.forward()}if(r>0){let l="";for(;r>0;r--)l+=`
`;n.right=new O(E(s,B(o.store,s)),n.left,n.left&&n.left.lastId,n.right,n.right&&n.right.id,e,null,new fe(l)),n.right.integrate(t,0),n.forward()}Oo(t,e,n,c)},Fo=(t,e,n,r,i)=>{let o=e,s=V();for(;o&&(!o.countable||o.deleted);){if(!o.deleted&&o.content.constructor===U){let h=o.content;s.set(h.key,h)}o=o.right}let c=0,l=!1;for(;e!==o;){if(n===e&&(l=!0),!e.deleted){let h=e.content;switch(h.constructor){case U:{let{key:a,value:f}=h,u=r.get(a)||null;(s.get(a)!==h||u===f)&&(e.delete(t),c++,!l&&(i.get(a)||null)===f&&u!==f&&(u===null?i.delete(a):i.set(a,u))),!l&&!e.deleted&&$e(i,h);break}}}e=e.right}return c},qa=(t,e)=>{for(;e&&e.right&&(e.right.deleted||!e.right.countable);)e=e.right;let n=new Set;for(;e&&(e.deleted||!e.countable);){if(!e.deleted&&e.content.constructor===U){let r=e.content.key;n.has(r)?e.delete(t):n.add(r)}e=e.left}},Ha=t=>{let e=0;return I(t.doc,n=>{let r=t._start,i=t._start,o=V(),s=Ot(o);for(;i;){if(i.deleted===!1)switch(i.content.constructor){case U:$e(s,i.content);break;default:e+=Fo(n,r,i,o,s),o=Ot(s),r=i;break}i=i.right}}),e},Wa=t=>{let e=new Set,n=t.doc;for(let[r,i]of t.afterState.entries()){let o=t.beforeState.get(r)||0;i!==o&&vo(t,n.store.clients.get(r),o,i,s=>{!s.deleted&&s.content.constructor===U&&s.constructor!==Q&&e.add(s.parent)})}I(n,r=>{mo(t,t.deleteSet,i=>{if(i instanceof Q||!i.parent._hasFormatting||e.has(i.parent))return;let o=i.parent;i.content.constructor===U?e.add(o):qa(r,i)});for(let i of e)Ha(i)})},go=(t,e,n)=>{let r=n,i=Ot(e.currentAttributes),o=e.right;for(;n>0&&e.right!==null;){if(e.right.deleted===!1)switch(e.right.content.constructor){case he:case je:case fe:n<e.right.length&&ue(t,E(e.right.id.client,e.right.id.clock+n)),n-=e.right.length,e.right.delete(t);break}e.forward()}o&&Fo(t,o,e.right,i,e.currentAttributes);let s=(e.left||e.right).parent;return s._searchMarker&&ft(s._searchMarker,e.index,-r+n),e},gr=class extends Be{constructor(e,n,r){super(e,n),this.childListChanged=!1,this.keysChanged=new Set,r.forEach(i=>{i===null?this.childListChanged=!0:this.keysChanged.add(i)})}get changes(){if(this._changes===null){let e={keys:this.keys,delta:this.delta,added:new Set,deleted:new Set};this._changes=e}return this._changes}get delta(){if(this._delta===null){let e=this.target.doc,n=[];I(e,r=>{let i=new Map,o=new Map,s=this.target._start,c=null,l={},h="",a=0,f=0,u=()=>{if(c!==null){let d=null;switch(c){case"delete":f>0&&(d={delete:f}),f=0;break;case"insert":(typeof h=="object"||h.length>0)&&(d={insert:h},i.size>0&&(d.attributes={},i.forEach((p,g)=>{p!==null&&(d.attributes[g]=p)}))),h="";break;case"retain":a>0&&(d={retain:a},Hi(l)||(d.attributes=zi({},l))),a=0;break}d&&n.push(d),c=null}};for(;s!==null;){switch(s.content.constructor){case he:case je:this.adds(s)?this.deletes(s)||(u(),c="insert",h=s.content.getContent()[0],u()):this.deletes(s)?(c!=="delete"&&(u(),c="delete"),f+=1):s.deleted||(c!=="retain"&&(u(),c="retain"),a+=1);break;case fe:this.adds(s)?this.deletes(s)||(c!=="insert"&&(u(),c="insert"),h+=s.content.str):this.deletes(s)?(c!=="delete"&&(u(),c="delete"),f+=s.length):s.deleted||(c!=="retain"&&(u(),c="retain"),a+=s.length);break;case U:{let{key:d,value:p}=s.content;if(this.adds(s)){if(!this.deletes(s)){let g=i.get(d)||null;de(g,p)?p!==null&&s.delete(r):(c==="retain"&&u(),de(p,o.get(d)||null)?delete l[d]:l[d]=p)}}else if(this.deletes(s)){o.set(d,p);let g=i.get(d)||null;de(g,p)||(c==="retain"&&u(),l[d]=g)}else if(!s.deleted){o.set(d,p);let g=l[d];g!==void 0&&(de(g,p)?g!==null&&s.delete(r):(c==="retain"&&u(),p===null?delete l[d]:l[d]=p))}s.deleted||(c==="insert"&&u(),$e(i,s.content));break}}s=s.right}for(u();n.length>0;){let d=n[n.length-1];if(d.retain!==void 0&&d.attributes===void 0)n.pop();else break}}),this._delta=n}return this._delta}},mr=class t extends D{constructor(e){super(),this._pending=e!==void 0?[()=>this.insert(0,e)]:[],this._searchMarker=[],this._hasFormatting=!1}get length(){return this._length}_integrate(e,n){super._integrate(e,n);try{this._pending.forEach(r=>r())}catch(r){console.error(r)}this._pending=null}_copy(){return new t}clone(){let e=new t;return e.applyDelta(this.toDelta()),e}_callObserver(e,n){super._callObserver(e,n);let r=new gr(this,e,n);on(this,e,r),!e.local&&this._hasFormatting&&(e._needFormattingCleanup=!0)}toString(){let e="",n=this._start;for(;n!==null;)!n.deleted&&n.countable&&n.content.constructor===fe&&(e+=n.content.str),n=n.right;return e}toJSON(){return this.toString()}applyDelta(e,{sanitize:n=!0}={}){this.doc!==null?I(this.doc,r=>{let i=new gt(null,this._start,0,new Map);for(let o=0;o<e.length;o++){let s=e[o];if(s.insert!==void 0){let c=!n&&typeof s.insert=="string"&&o===e.length-1&&i.right===null&&s.insert.slice(-1)===`
`?s.insert.slice(0,-1):s.insert;(typeof c!="string"||c.length>0)&&Qn(r,this,i,c,s.attributes||{})}else s.retain!==void 0?po(r,this,i,s.retain,s.attributes||{}):s.delete!==void 0&&go(r,i,s.delete)}}):this._pending.push(()=>this.applyDelta(e))}toDelta(e,n,r){let i=[],o=new Map,s=this.doc,c="",l=this._start;function h(){if(c.length>0){let f={},u=!1;o.forEach((p,g)=>{u=!0,f[g]=p});let d={insert:c};u&&(d.attributes=f),i.push(d),c=""}}let a=()=>{for(;l!==null;){if(lt(l,e)||n!==void 0&&lt(l,n))switch(l.content.constructor){case fe:{let f=o.get("ychange");e!==void 0&&!lt(l,e)?(f===void 0||f.user!==l.id.client||f.type!=="removed")&&(h(),o.set("ychange",r?r("removed",l.id):{type:"removed"})):n!==void 0&&!lt(l,n)?(f===void 0||f.user!==l.id.client||f.type!=="added")&&(h(),o.set("ychange",r?r("added",l.id):{type:"added"})):f!==void 0&&(h(),o.delete("ychange")),c+=l.content.str;break}case he:case je:{h();let f={insert:l.content.getContent()[0]};if(o.size>0){let u={};f.attributes=u,o.forEach((d,p)=>{u[p]=d})}i.push(f);break}case U:lt(l,e)&&(h(),$e(o,l.content));break}l=l.right}h()};return e||n?I(s,f=>{e&&cr(f,e),n&&cr(f,n),a()},"cleanup"):a(),i}insert(e,n,r){if(n.length<=0)return;let i=this.doc;i!==null?I(i,o=>{let s=Kt(o,this,e);r||(r={},s.currentAttributes.forEach((c,l)=>{r[l]=c})),Qn(o,this,s,n,r)}):this._pending.push(()=>this.insert(e,n,r))}insertEmbed(e,n,r={}){let i=this.doc;i!==null?I(i,o=>{let s=Kt(o,this,e);Qn(o,this,s,n,r)}):this._pending.push(()=>this.insertEmbed(e,n,r))}delete(e,n){if(n===0)return;let r=this.doc;r!==null?I(r,i=>{go(i,Kt(i,this,e),n)}):this._pending.push(()=>this.delete(e,n))}format(e,n,r){if(n===0)return;let i=this.doc;i!==null?I(i,o=>{let s=Kt(o,this,e);s.right!==null&&po(o,this,s,n,r)}):this._pending.push(()=>this.format(e,n,r))}removeAttribute(e){this.doc!==null?I(this.doc,n=>{Qt(n,this,e)}):this._pending.push(()=>this.removeAttribute(e))}setAttribute(e,n){this.doc!==null?I(this.doc,r=>{kr(r,this,e,n)}):this._pending.push(()=>this.setAttribute(e,n))}getAttribute(e){return vr(this,e)}getAttributes(){return Mo(this)}_write(e){e.writeTypeRef(Za)}};var dt=class{constructor(e,n=()=>!0){this._filter=n,this._root=e,this._currentNode=e._start,this._firstCall=!0}[Symbol.iterator](){return this}next(){let e=this._currentNode,n=e&&e.content&&e.content.type;if(e!==null&&(!this._firstCall||e.deleted||!this._filter(n)))do if(n=e.content.type,!e.deleted&&(n.constructor===wr||n.constructor===mt)&&n._start!==null)e=n._start;else for(;e!==null;)if(e.right!==null){e=e.right;break}else e.parent===this._root?e=null:e=e.parent._item;while(e!==null&&(e.deleted||!this._filter(e.content.type)));return this._firstCall=!1,e===null?{value:void 0,done:!0}:(this._currentNode=e,{value:e.content.type,done:!1})}},mt=class t extends D{constructor(){super(),this._prelimContent=[]}get firstChild(){let e=this._first;return e?e.content.getContent()[0]:null}_integrate(e,n){super._integrate(e,n),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new t}clone(){let e=new t;return e.insert(0,this.toArray().map(n=>n instanceof D?n.clone():n)),e}get length(){return this._prelimContent===null?this._length:this._prelimContent.length}createTreeWalker(e){return new dt(this,e)}querySelector(e){e=e.toUpperCase();let r=new dt(this,i=>i.nodeName&&i.nodeName.toUpperCase()===e).next();return r.done?null:r.value}querySelectorAll(e){return e=e.toUpperCase(),ce(new dt(this,n=>n.nodeName&&n.nodeName.toUpperCase()===e))}_callObserver(e,n){on(this,e,new yr(this,n,e))}toString(){return To(this,e=>e.toString()).join("")}toJSON(){return this.toString()}toDOM(e=document,n={},r){let i=e.createDocumentFragment();return r!==void 0&&r._createAssociation(i,this),ht(this,o=>{i.insertBefore(o.toDOM(e,n,r),null)}),i}insert(e,n){this.doc!==null?I(this.doc,r=>{Ao(r,this,e,n)}):this._prelimContent.splice(e,0,...n)}insertAfter(e,n){if(this.doc!==null)I(this.doc,r=>{let i=e&&e instanceof D?e._item:e;Zt(r,this,i,n)});else{let r=this._prelimContent,i=e===null?0:r.findIndex(o=>o===e)+1;if(i===0&&e!==null)throw ke("Reference item not found");r.splice(i,0,...n)}}delete(e,n=1){this.doc!==null?I(this.doc,r=>{Uo(r,this,e,n)}):this._prelimContent.splice(e,n)}toArray(){return No(this)}push(e){this.insert(this.length,e)}unshift(e){this.insert(0,e)}get(e){return Do(this,e)}slice(e=0,n=this.length){return Eo(this,e,n)}forEach(e){ht(this,e)}_write(e){e.writeTypeRef(el)}};var wr=class t extends mt{constructor(e="UNDEFINED"){super(),this.nodeName=e,this._prelimAttrs=new Map}get nextSibling(){let e=this._item?this._item.next:null;return e?e.content.type:null}get prevSibling(){let e=this._item?this._item.prev:null;return e?e.content.type:null}_integrate(e,n){super._integrate(e,n),this._prelimAttrs.forEach((r,i)=>{this.setAttribute(i,r)}),this._prelimAttrs=null}_copy(){return new t(this.nodeName)}clone(){let e=new t(this.nodeName),n=this.getAttributes();return qi(n,(r,i)=>{typeof r=="string"&&e.setAttribute(i,r)}),e.insert(0,this.toArray().map(r=>r instanceof D?r.clone():r)),e}toString(){let e=this.getAttributes(),n=[],r=[];for(let c in e)r.push(c);r.sort();let i=r.length;for(let c=0;c<i;c++){let l=r[c];n.push(l+'="'+e[l]+'"')}let o=this.nodeName.toLocaleLowerCase(),s=n.length>0?" "+n.join(" "):"";return`<${o}${s}>${super.toString()}</${o}>`}removeAttribute(e){this.doc!==null?I(this.doc,n=>{Qt(n,this,e)}):this._prelimAttrs.delete(e)}setAttribute(e,n){this.doc!==null?I(this.doc,r=>{kr(r,this,e,n)}):this._prelimAttrs.set(e,n)}getAttribute(e){return vr(this,e)}hasAttribute(e){return Lo(this,e)}getAttributes(){return Mo(this)}toDOM(e=document,n={},r){let i=e.createElement(this.nodeName),o=this.getAttributes();for(let s in o){let c=o[s];typeof c=="string"&&i.setAttribute(s,c)}return ht(this,s=>{i.appendChild(s.toDOM(e,n,r))}),r!==void 0&&r._createAssociation(i,this),i}_write(e){e.writeTypeRef(Qa),e.writeKey(this.nodeName)}};var yr=class extends Be{constructor(e,n,r){super(e,r),this.childListChanged=!1,this.attributesChanged=new Set,n.forEach(i=>{i===null?this.childListChanged=!0:this.attributesChanged.add(i)})}};var en=class{constructor(e,n){this.id=e,this.length=n}get deleted(){throw z()}mergeWith(e){return!1}write(e,n,r){throw z()}integrate(e,n){throw z()}},Ja=0,Q=class extends en{get deleted(){return!0}delete(){}mergeWith(e){return this.constructor!==e.constructor?!1:(this.length+=e.length,!0)}integrate(e,n){n>0&&(this.id.clock+=n,this.length-=n),ko(e.doc.store,this)}write(e,n){e.writeInfo(Ja),e.writeLen(this.length-n)}getMissing(e,n){return null}},tn=class t{constructor(e){this.content=e}getLength(){return 1}getContent(){return[this.content]}isCountable(){return!0}copy(){return new t(this.content)}splice(e){throw z()}mergeWith(e){return!1}integrate(e,n){}delete(e){}gc(e){}write(e,n){e.writeBuf(this.content)}getRef(){return 3}};var br=class t{constructor(e){this.len=e}getLength(){return this.len}getContent(){return[]}isCountable(){return!1}copy(){return new t(this.len)}splice(e){let n=new t(this.len-e);return this.len=e,n}mergeWith(e){return this.len+=e.len,!0}integrate(e,n){bo(e.deleteSet,n.id.client,n.id.clock,this.len),n.markDeleted()}delete(e){}gc(e){}write(e,n){e.writeLen(this.len-n)}getRef(){return 1}};var Ka=(t,e)=>new ut({guid:t,...e,shouldLoad:e.shouldLoad||e.autoLoad||!1}),nn=class t{constructor(e){e._item&&console.error("This document was already integrated as a sub-document. You should create a second instance instead with the same guid."),this.doc=e;let n={};this.opts=n,e.gc||(n.gc=!1),e.autoLoad&&(n.autoLoad=!0),e.meta!==null&&(n.meta=e.meta)}getLength(){return 1}getContent(){return[this.doc]}isCountable(){return!0}copy(){return new t(Ka(this.doc.guid,this.opts))}splice(e){throw z()}mergeWith(e){return!1}integrate(e,n){this.doc._item=n,e.subdocsAdded.add(this.doc),this.doc.shouldLoad&&e.subdocsLoaded.add(this.doc)}delete(e){e.subdocsAdded.has(this.doc)?e.subdocsAdded.delete(this.doc):e.subdocsRemoved.add(this.doc)}gc(e){}write(e,n){e.writeString(this.doc.guid),e.writeAny(this.opts)}getRef(){return 9}};var je=class t{constructor(e){this.embed=e}getLength(){return 1}getContent(){return[this.embed]}isCountable(){return!0}copy(){return new t(this.embed)}splice(e){throw z()}mergeWith(e){return!1}integrate(e,n){}delete(e){}gc(e){}write(e,n){e.writeJSON(this.embed)}getRef(){return 5}};var U=class t{constructor(e,n){this.key=e,this.value=n}getLength(){return 1}getContent(){return[]}isCountable(){return!1}copy(){return new t(this.key,this.value)}splice(e){throw z()}mergeWith(e){return!1}integrate(e,n){let r=n.parent;r._searchMarker=null,r._hasFormatting=!0}delete(e){}gc(e){}write(e,n){e.writeKey(this.key),e.writeJSON(this.value)}getRef(){return 6}};var wt=class t{constructor(e){this.arr=e}getLength(){return this.arr.length}getContent(){return this.arr}isCountable(){return!0}copy(){return new t(this.arr)}splice(e){let n=new t(this.arr.slice(e));return this.arr=this.arr.slice(0,e),n}mergeWith(e){return this.arr=this.arr.concat(e.arr),!0}integrate(e,n){}delete(e){}gc(e){}write(e,n){let r=this.arr.length;e.writeLen(r-n);for(let i=n;i<r;i++){let o=this.arr[i];e.writeAny(o)}}getRef(){return 8}};var fe=class t{constructor(e){this.str=e}getLength(){return this.str.length}getContent(){return this.str.split("")}isCountable(){return!0}copy(){return new t(this.str)}splice(e){let n=new t(this.str.slice(e));this.str=this.str.slice(0,e);let r=this.str.charCodeAt(e-1);return r>=55296&&r<=56319&&(this.str=this.str.slice(0,e-1)+"\uFFFD",n.str="\uFFFD"+n.str.slice(1)),n}mergeWith(e){return this.str+=e.str,!0}integrate(e,n){}delete(e){}gc(e){}write(e,n){e.writeString(n===0?this.str:this.str.slice(n))}getRef(){return 4}};var Ya=0,Xa=1,Za=2,Qa=3,el=4;var he=class t{constructor(e){this.type=e}getLength(){return 1}getContent(){return[this.type]}isCountable(){return!0}copy(){return new t(this.type._copy())}splice(e){throw z()}mergeWith(e){return!1}integrate(e,n){this.type._integrate(e.doc,n)}delete(e){let n=this.type._start;for(;n!==null;)n.deleted?n.id.clock<(e.beforeState.get(n.id.client)||0)&&e._mergeStructs.push(n):n.delete(e),n=n.right;this.type._map.forEach(r=>{r.deleted?r.id.clock<(e.beforeState.get(r.id.client)||0)&&e._mergeStructs.push(r):r.delete(e)}),e.changed.delete(this.type)}gc(e){let n=this.type._start;for(;n!==null;)n.gc(e,!0),n=n.right;this.type._start=null,this.type._map.forEach(r=>{for(;r!==null;)r.gc(e,!0),r=r.left}),this.type._map=new Map}write(e,n){this.type._write(e)}getRef(){return 7}};var Bo=(t,e,n)=>{let{client:r,clock:i}=e.id,o=new O(E(r,i+n),e,E(r,i+n-1),e.right,e.rightOrigin,e.parent,e.parentSub,e.content.splice(n));return e.deleted&&o.markDeleted(),e.keep&&(o.keep=!0),e.redone!==null&&(o.redone=E(e.redone.client,e.redone.clock+n)),e.right=o,o.right!==null&&(o.right.left=o),t._mergeStructs.push(o),o.parentSub!==null&&o.right===null&&o.parent._map.set(o.parentSub,o),e.length=n,o};var O=class t extends en{constructor(e,n,r,i,o,s,c,l){super(e,l.getLength()),this.origin=r,this.left=n,this.right=i,this.rightOrigin=o,this.parent=s,this.parentSub=c,this.redone=null,this.content=l,this.info=this.content.isCountable()?2:0}set marker(e){(this.info&8)>0!==e&&(this.info^=8)}get marker(){return(this.info&8)>0}get keep(){return(this.info&1)>0}set keep(e){this.keep!==e&&(this.info^=1)}get countable(){return(this.info&2)>0}get deleted(){return(this.info&4)>0}set deleted(e){this.deleted!==e&&(this.info^=4)}markDeleted(){this.info|=4}getMissing(e,n){if(this.origin&&this.origin.client!==this.id.client&&this.origin.clock>=B(n,this.origin.client))return this.origin.client;if(this.rightOrigin&&this.rightOrigin.client!==this.id.client&&this.rightOrigin.clock>=B(n,this.rightOrigin.client))return this.rightOrigin.client;if(this.parent&&this.parent.constructor===Fe&&this.id.client!==this.parent.client&&this.parent.clock>=B(n,this.parent.client))return this.parent.client;if(this.origin&&(this.left=ao(e,n,this.origin),this.origin=this.left.lastId),this.rightOrigin&&(this.right=ue(e,this.rightOrigin),this.rightOrigin=this.right.id),this.left&&this.left.constructor===Q||this.right&&this.right.constructor===Q)this.parent=null;else if(!this.parent)this.left&&this.left.constructor===t&&(this.parent=this.left.parent,this.parentSub=this.left.parentSub),this.right&&this.right.constructor===t&&(this.parent=this.right.parent,this.parentSub=this.right.parentSub);else if(this.parent.constructor===Fe){let r=Zn(n,this.parent);r.constructor===Q?this.parent=null:this.parent=r.content.type}return null}integrate(e,n){if(n>0&&(this.id.clock+=n,this.left=ao(e,e.doc.store,E(this.id.client,this.id.clock-1)),this.origin=this.left.lastId,this.content=this.content.splice(n),this.length-=n),this.parent){if(!this.left&&(!this.right||this.right.left!==null)||this.left&&this.left.right!==this.right){let r=this.left,i;if(r!==null)i=r.right;else if(this.parentSub!==null)for(i=this.parent._map.get(this.parentSub)||null;i!==null&&i.left!==null;)i=i.left;else i=this.parent._start;let o=new Set,s=new Set;for(;i!==null&&i!==this.right;){if(s.add(i),o.add(i),Wt(this.origin,i.origin)){if(i.id.client<this.id.client)r=i,o.clear();else if(Wt(this.rightOrigin,i.rightOrigin))break}else if(i.origin!==null&&s.has(Zn(e.doc.store,i.origin)))o.has(Zn(e.doc.store,i.origin))||(r=i,o.clear());else break;i=i.right}this.left=r}if(this.left!==null){let r=this.left.right;this.right=r,this.left.right=this}else{let r;if(this.parentSub!==null)for(r=this.parent._map.get(this.parentSub)||null;r!==null&&r.left!==null;)r=r.left;else r=this.parent._start,this.parent._start=this;this.right=r}this.right!==null?this.right.left=this:this.parentSub!==null&&(this.parent._map.set(this.parentSub,this),this.left!==null&&this.left.delete(e)),this.parentSub===null&&this.countable&&!this.deleted&&(this.parent._length+=this.length),ko(e.doc.store,this),this.content.integrate(e,this),uo(e,this.parent,this.parentSub),(this.parent._item!==null&&this.parent._item.deleted||this.parentSub!==null&&this.right!==null)&&this.delete(e)}else new Q(this.id,this.length).integrate(e,0)}get next(){let e=this.right;for(;e!==null&&e.deleted;)e=e.right;return e}get prev(){let e=this.left;for(;e!==null&&e.deleted;)e=e.left;return e}get lastId(){return this.length===1?this.id:E(this.id.client,this.id.clock+this.length-1)}mergeWith(e){if(this.constructor===e.constructor&&Wt(e.origin,this.lastId)&&this.right===e&&Wt(this.rightOrigin,e.rightOrigin)&&this.id.client===e.id.client&&this.id.clock+this.length===e.id.clock&&this.deleted===e.deleted&&this.redone===null&&e.redone===null&&this.content.constructor===e.content.constructor&&this.content.mergeWith(e.content)){let n=this.parent._searchMarker;return n&&n.forEach(r=>{r.p===e&&(r.p=this,!this.deleted&&this.countable&&(r.index-=this.length))}),e.keep&&(this.keep=!0),this.right=e.right,this.right!==null&&(this.right.left=this),this.length+=e.length,!0}return!1}delete(e){if(!this.deleted){let n=this.parent;this.countable&&this.parentSub===null&&(n._length-=this.length),this.markDeleted(),bo(e.deleteSet,this.id.client,this.id.clock,this.length),uo(e,n,this.parentSub),this.content.delete(e)}}gc(e,n){if(!this.deleted)throw le();this.content.gc(e),n?Pa(e,this,new Q(this.id,this.length)):this.content=new br(this.length)}write(e,n){let r=n>0?E(this.id.client,this.id.clock+n-1):this.origin,i=this.rightOrigin,o=this.parentSub,s=this.content.getRef()&31|(r===null?0:128)|(i===null?0:64)|(o===null?0:32);if(e.writeInfo(s),r!==null&&e.writeLeftID(r),i!==null&&e.writeRightID(i),r===null&&i===null){let c=this.parent;if(c._item!==void 0){let l=c._item;if(l===null){let h=Ma(c);e.writeParentInfo(!0),e.writeString(h)}else e.writeParentInfo(!1),e.writeLeftID(l.id)}else c.constructor===String?(e.writeParentInfo(!0),e.writeString(c)):c.constructor===Fe?(e.writeParentInfo(!1),e.writeLeftID(c)):le();o!==null&&e.writeString(o)}this.content.write(e,n)}};var jo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:{},$o="__ $YJS$ __";jo[$o]===!0&&console.error("Yjs was already imported. This breaks constructor checks and will lead to issues! - https://github.com/yjs/yjs/issues/438");jo[$o]=!0;var Cr=v(Dn()),sn=(t,e,n)=>{let r=(n||0)+1;if(e?e(t)&&(t.id=(0,Cr.createId)()):t.id=(0,Cr.createId)(),t.type==="item"&&t.component&&t.component.id&&t.component.props)for(let i of Object.values(t.component.props))i.meta?.type==="content-element"&&i.content&&sn(i.content,e,r);if(t.type!=="text"&&t.childs&&Array.isArray(t.childs))for(let i of t.childs)sn(i,e,r);return t};var Sr=(t,e)=>{let n=e||new Set;if(!t)return n;if(t.type==="item"&&t.component?.id&&(n.add(t.component.id),t.component.props))for(let r of Object.values(t.component.props))r.meta?.type==="content-element"&&r.content&&Sr(r.content,n);if(t.type!=="text"&&t.childs)for(let r of t.childs)Sr(r,n);return n},Ge=async(t,e)=>{let n=new Set,r=null;typeof e!="string"?r=e:await Go(t,e),Sr(r,n);let i=[...n].filter(o=>!t.comps.all[o]&&!t.comps.pending[o]).map(async o=>{let s=await Go(t,o);await Ge(t,s.content_tree)});i.length>0&&await Promise.all(i)},Go=async(t,e)=>{if(t.comps.pending[e])return await t.comps.pending[e];let n=t.loader.comp(t,e);return t.comps.pending[e]=n,t.comps.all[e]=await n,t.comps.all[e]},qo=(t,e,n,r)=>{let i=e.component,o=null,s={};if(n.type==="m"){let h=n.item;s=h.get("component")?.get("props")?.toJSON(),s||(h.get("component")?.set("props",new pt),s=h.get("component")?.get("props")?.toJSON()),o=h.toJSON()}else o=structuredClone(n.item.content_tree),s=o.component.props||{};let c={};c=sn(o,h=>{h.originalId||(h.originalId=h.id);let a=h.id;return r[h.originalId]?a=r[h.originalId]:a=(0,zo.createId)(),h.id=a,r[h.originalId]=a,!1});let l={};for(let[h,a]of Object.entries(s))l[h]=a,i.props[h]&&(l[h].value=i.props[h].value,l[h].valueBuilt=i.props[h].valueBuilt,l[h].content=i.props[h].content);return{...c,id:e.id,originalId:e.originalId||c.originalId,component:{...i,props:l}}};var Ho=async(t,e)=>{t.page?.content_tree&&(t.treePending=new Promise(async n=>{let r=t.treeMeta;if(t.page){let i=Object.values(t.page.content_tree?.childs||[]);t.layout.section&&t.layout.content&&!t.page?.name.startsWith("layout:")&&(i=[t.layout.section],t.layout.content.type="item",t.layout.content.type==="item"&&(t.layout.content.childs=t.page.content_tree?.childs.map(o=>({...o,type:"item"})))),await Promise.all(i.map(async(o,s)=>{await cn(t,{treeMeta:r,item:o,parent_id:"root",idx:s,isLayout:!!(t.layout.section&&t.layout.content)})})||[])}n(),t.treePending=null,e.render!==!1&&t.render()}),await t.treePending)},cn=async(t,e)=>{let n=e.treeMeta,r=e.item;if(r.hidden!=="all"){if(e.parent_comp){let i=e.parent_comp.comp?.child_ids;i&&r.originalId&&i[r.originalId]&&(r.id=i[r.originalId])}if(r){let i;r.type==="item"&&r.component?.id&&(i={id:r.component.id,child_ids:{}});let o={item:r,parent_id:t.cachedParentID[r.id]||e.parent_id,parent_comp:e.parent_comp,className:Ze(r,{mode:t.mode}),comp:i,indexedScope:n[r.id]?n[r.id].indexedScope:{},isLayout:e.isLayout};if(n[o.item.id]=o,r.type==="item"&&r.component?.id){let s=r.component.id,c=t.comps.all[s];if(c||(await Ge(t,s),c=t.comps.all[s]),c){t.compInstance[r.id]||(t.compInstance[r.id]={});let l=t.compInstance[r.id],h=qo(t,r,{type:"i",item:c},l);for(let[u,d]of Object.entries(h))u!=="id"&&(r[u]=d);let a=c.content_tree.component?.props,f=r.component.props;if(a&&f)for(let[u,d]of Object.entries(a)){let p=f[u];if(p&&d.meta?.type==="content-element"){let g=p.content;g&&await cn(t,{treeMeta:n,item:g,parent_id:r.id,parent_comp:e.parent_comp,idx:d.idx,isLayout:o.isLayout})}}}await Promise.all(r.childs.map(async(l,h)=>await cn(t,{treeMeta:n,item:l,parent_comp:o,parent_id:r.id,idx:h,isLayout:o.isLayout})))}else r.type!=="text"&&Array.isArray(r.childs)&&await Promise.all(r.childs.map(async(s,c)=>{let l=!1;return o.isLayout&&r.name!=="content"&&(l=!0),await cn(t,{treeMeta:n,idx:c,item:s,parent_comp:e.parent_comp,parent_id:r.id||"",isLayout:l})}))}}};var Yo=(t,e)=>{if(t.status!=="loading"&&t.status!=="not-found"){let n=params.page_id;if(!n){let r=t.route.lookup(e);if(!r)t.status="not-found";else{if(Lt.params||(Lt.params={}),r.params)for(let[i,o]of Object.entries(r.params))Lt.params[i]=o;n=r.id}}if(n){window.pageid=n;let r=[];n!==t.page?.id&&(t.page=t.pages[n],t.treeMeta={},t.portal={}),(!t.page||!t.page.content_tree)&&(r.push(Xo(t,n)),r.push(nl(t,n))),r.length>0?(t.status="loading",Promise.all(r).then(async()=>{t.page=t.pages[n],t.page&&(await Ir(t),t.render())})):Wo[n]?Ir(t):(Wo[n]=!0,Ir(t).then(t.render))}}},Wo={},Ir=async t=>{t.page?(await Ho(t,{render:!1,note:"render",reset:!1}),t.status="ready"):t.status="not-found"},pe=async(t,e)=>{let n=t.route.lookup(e);if(n&&(!t.pages[n.id]||t.pages[n.id]&&!t.pages[n.id].content_tree)&&!t.pagePreload[n.id]){t.pagePreload[n.id]=!0;let r=await t.loader.page(t,n.id);if(r){t.pages[r.id]=r;let i=t.pages[r.id];i&&i.content_tree&&await Ge(t,i.content_tree),delete t.pagePreload[n.id],await Xo(t,r.id)}}},Jo={},Xo=async(t,e)=>{try{Jo[e]||(Jo[e]=!0,typeof window.exports>"u"&&(window.exports={}),await Me(t.loader.npm(t,"page",e)))}catch(n){console.error(n)}},Er={},nl=async(t,e)=>{Er[e]||(Er[e]=t.loader.page(t,e));let n=await Er[e];if(n){t.pages[n.id]={id:n.id,url:n.url,name:n.name,content_tree:n.content_tree,js:n.js_compiled};let r=t.pages[n.id];r&&r.content_tree&&await Ge(t,r.content_tree)}},an=t=>[...Ko(t,"navigate(",")"),...Ko(t,"href = ",";")],Ko=(t,e,n)=>{let r=0,i=0,o=[];for(;;){let s=t.indexOf(e,r);if(i=r,s>=0){let c=t[s+e.length];if(c==='"'||c==="'"||c==="`"){let l=t.indexOf(`${c}${n}`,s+e.length+1),h=t.substring(s+e.length+1,l);r=l+2+n.length,o.push(h)}}if(i===r)break}return o};var bt=v(Ke());var R=v(Ke()),Nr=class extends R.Component{displayName="ReactUseErrorBoundary";componentDidCatch(...e){this.setState({}),this.props.onError(...e)}render(){return this.props.children}},rl=()=>!1,Zo=(0,R.createContext)({componentDidCatch:{current:void 0},error:void 0,setError:rl});function Qo({children:t}){let[e,n]=(0,R.useState)(),r=(0,R.useRef)(),i=(0,R.useMemo)(()=>({componentDidCatch:r,error:e,setError:n}),[e]);return R.default.createElement(Zo.Provider,{value:i},R.default.createElement(Nr,{error:e,onError:(o,s)=>{n(o),r.current?.(o,s)}},t))}Qo.displayName="ReactUseErrorBoundaryContext";function es(t){function e(n){return R.default.createElement(Qo,null,R.default.createElement(t,{key:"WrappedComponent",...n}))}return e.displayName=`WithErrorBoundary(${t.displayName??t.name??"Component"})`,e}function ts(t){let e=(0,R.useContext)(Zo);e.componentDidCatch.current=t;let n=(0,R.useCallback)(()=>{e.setError(void 0)},[]);return[e.error,n]}var ns={mode:"",status:"init",focused:"",pendingRebuild:!1,localReloading:{},manager:{page:!1,site:!1,comp:!1,compActionLabel:"Pick",compCallback:t=>{},compPreviewRendered:new Set},script:{siteActive:!1,siteTypes:{},prop:null,toolbar:null,active:!1,type:"js",db:null,api:null,onClose:void 0,doEdit:null},item:{active:"",activeOriginalId:"",hover:"",sideHover:!1,selectMode:"single",selection:[],copy:{mode:"single"}},preventTreeScroll:!1,softRender:{tree:()=>{},page:()=>{},side:()=>{},addEl:()=>{},topR:()=>{},all(){this.tree(),this.page(),this.side(),this.addEl(),this.topR()}},session:{id:"",data:{user:{id:"",username:""}}},lsite:null,site:{id:"",api_url:"",api_prasi:{port:"",db:""},responsive:"all",domain:"",name:"",js:"",js_compiled:""},layout:{section:null,content:null},site_dts:"",page:null,treeFlat:[],treeFlatTemp:[],treePending:null,treeMeta:{},cachedParentID:{},compInstance:{},comp:null,comps:{pending:{},resolve:{},doc:{}},compProp:{backToInstance:!1,edit:!1,inherit:!0},compDirectEdit:!1,compLoading:{},pagePreload:{},route:Re(),mpage:null,mpageLoaded:null,ws:null,wsPing:-1,wsPingTs:0,wsPingInterval:null,wsRetry:{fast:!1,localIP:!1,disabled:!1,reconnecting:!1},ui:{loading:null,preload:null,notfound:null,error:null}};var G=v(T()),rs=es(({children:t,meta:e,id:n})=>{let r=Ee({retrying:!1}),[i,o]=ts((c,l)=>{console.warn(c)}),s=e;return n&&(s=ee(ns,"EDITOR").treeMeta[n]),i?(0,G.jsxs)("div",{className:"bg-red-100 border border-red-300 rounded-sm text-xs flex flex-col items-center",children:[(0,G.jsxs)("div",{className:"text-[10px] font-bold text-red-900 self-stretch px-1",children:["ERROR ",s?.item.name?"["+s.item.name+"]:":""]}),(0,G.jsx)("p",{className:"border-b border-red-300 px-1 pb-1 min-w-[100px]",children:r.retrying?(0,G.jsx)(G.Fragment,{children:"Retrying..."}):(0,G.jsx)(G.Fragment,{children:i.message})}),(0,G.jsx)("div",{className:"p-1",children:(0,G.jsx)("button",{onClick:()=>{r.retrying=!0,r.render(),setTimeout(()=>{r.retrying=!1,r.render(),o()},100)},className:"bg-white border border-white hover:border-red-400 hover:bg-red-50 rounded px-2",children:"Try again"})})]}):t});var dn=v(T());var Tr=(t,e,n,r,i)=>{let o=t.treeMeta[e],s=o.className,c=o.item,l=c.adv,h={};try{if(o.memoize||(o.memoize={Local:ol(t,e),PassProp:il(t,e,i)}),typeof l?.js=="string"){let g=an(l.js||"");g.length>0&&g.map(N=>pe(t,N))}t.site.api_url&&(t.script.db||(t.script.db=Te(t.site.api_url)),t.script.api||(t.script.api=Ne(t.site.api_url)));let a=window,f=Dr(t,e,{_scopeIndex:i});for(let[g,N]of Object.entries(f))if(N&&typeof N=="object"){let m=N;m._jsx&&m.Comp&&(f[g]=(0,dn.jsx)(m.Comp,{parent_id:o.item.id,_scopeIndex:i}))}if(o.item.name==="label"&&t.treeMeta[o.parent_id].item.name==="tree_lv_2"&&!f.lv2_item){let g=t.treeMeta[o.parent_id];console.log("final_scope",o,t.treeMeta[g.parent_id])}let u={jsx:null};h={...a.exports,...f,...o.memoize,db:t.script.db,api:t.script.api,children:n,props:{className:s},useEffect:bt.useEffect,render:g=>{u.jsx=(0,dn.jsx)(rs,{children:(0,dn.jsx)(bt.Suspense,{children:g})})}};let p=new Function(...Object.keys(h),r)(...Object.values(h));return p instanceof Promise&&p.catch(g=>{console.warn(g),console.warn((`ERROR in ${c.type} [${c.name}]:
`+(l?.js||"")).trim()),console.warn("Available var:",h,`
`)}),u.jsx}catch(a){console.warn(a),console.warn((`ERROR in ${c.type} [${c.name}]:
`+(l?.js||"")).trim()),console.warn("Available var:",h,`
`)}},Dr=(t,e,n)=>{let r=t.treeMeta[e];r.scope||(r.scope={});let i=r,o={};for(;i;){let s=null,c=null;if(i.indexedScope&&n?._scopeIndex){let l=n._scopeIndex[i.item.id];typeof l<"u"&&i.indexedScope[l]&&(c=i.indexedScope[l])}if(c||i.scope||i.comp?.propval){s={...i.scope,...c,...i.comp?.propval};for(let[l,h]of Object.entries(s))typeof o[l]>"u"&&(o[l]=h);if(n?.each&&!n.each(i,s))break}i=t.treeMeta[i.parent_id]}return o},is=(t,e)=>{if(Array.isArray(t)){let n=[];for(let r of t)n.push(is(r,e));return n}return typeof t=="object"&&t?{...t,props:{...t.props,_scopeIndex:e}}:t},il=(t,e,n)=>function(r){let i=t.treeMeta[e];if(typeof r.idx<"u"&&i&&i.item&&i.item.id){i.indexedScope[r.idx]={};for(let[s,c]of Object.entries(r))s!=="children"&&(i.indexedScope[r.idx][s]=c);let o={...n,[i.item.id]:r.idx};return is(r.children,o)}i.scope||(i.scope={});for(let[o,s]of Object.entries(r))o!=="children"&&(i.scope[o]=s);return r.children},ge={},yt={},ln={},ol=(t,e)=>({name:r,value:i,effect:o,children:s,hook:c,deps:l,cache:h})=>{let a=t.treeMeta[e];a.scope||(a.scope={});let f=()=>{try{let p=Wr(i),g=()=>{a.render?a.render():t.render()};if(!a.scope[r])a.scope[r]={...p,render:g};else{for(let[N,m]of Object.entries(p))a.scope[r][N]=m;a.scope[r].render=g}}catch(p){console.warn(p)}},u=t.page?.id||"",d=a.item.id;if(a.isLayout&&(u="layout",ln[a.item.id]&&(a.scope[r]=ge[u][d],a.scope[r].render=()=>{a.render?a.render():t.render()})),(u!=="layout"||u==="layout"&&!ln[a.item.id])&&(ge[u]||(ge[u]={}),yt[u]||(yt[u]={}),ge[u][d]?h===!1?yt[u][d]!==location.href?(yt[u][d]=location.href,f(),ge[u][d]=a.scope[r]):(a.scope[r]=ge[u][d],a.scope[r].render=()=>{a.render?a.render():t.render()}):(a.scope[r]=ge[u][d],a.scope[r].render=()=>{a.render?a.render():t.render()}):(f(),ge[u][d]=a.scope[r],yt[u][d]=location.href)),typeof c=="function")try{c(a.scope[r])}catch(p){console.warn(p)}return(0,bt.useEffect)(()=>{if(o){if(a.isLayout){if(ln[a.item.id])return;ln[a.item.id]=!0}try{o(a.scope[r])}catch(p){console.warn(p)}}},[...l||[],location.href]),s};var xt=v(T()),Rr={},os=(t,e,n,r)=>{let i=t.treeMeta[e];if(i.item.type==="item"&&i.item.component){t.site.api_url&&(t.script.db||(t.script.db=Te(t.site.api_url)),t.script.api||(t.script.api=Ne(t.site.api_url)));let o=i.item.component.props,s=window,c=Dr(t,e,{_scopeIndex:r}),l={...s.exports,...c,db:t.script.db,api:t.script.api},h={};for(let[a,f]of n){let u=o[a]||f,d=null;if(u.valueBuilt){let p=new Function(...Object.keys(l),`return ${u.valueBuilt}`);try{d=p(...Object.values(l))||null;let g=an(u.valueBuilt||"");g.length>0&&g.map(N=>pe(t,N))}catch(g){let N=i.item.name;console.warn(g),console.warn(`ERROR in Component [${N}], in prop [${a}]:
`+u.value)}}if(u.meta?.type==="content-element"&&!(typeof d=="object"&&d&&d._jsx)){let p=`${i.item.id}-${a}`;Rr[p]||(Rr[p]={_jsx:!0,Comp:({parent_id:g,_scopeIndex:N})=>{if(u.content){let m=t.treeMeta[u.content.id];if(m)return m.parent_id=g,t.cachedParentID[u.content.id]=g,(0,xt.jsx)(_t,{id:u.content.id,fromProp:!0,_scopeIndex:N})}return(0,xt.jsx)(xt.Fragment,{})}}),d=Rr[p]}h[a]=d}return h}};var Ar=v(T()),ss=({id:t,fromProp:e,_scopeIndex:n})=>(0,Ar.jsx)(ze,{id:t,fromProp:e,_scopeIndex:n}),cs=({className:t,item:e,_children:n})=>(0,Ar.jsx)("div",{id:`text-${e.id}`,className:cx(t,css`
outline: none;
min-width: 3px !important;
min-height: 10px !important;
`),dangerouslySetInnerHTML:{__html:n||""}});var re=v(T()),ze=({id:t,children:e,fromProp:n,_scopeIndex:r})=>{let i=ee(me,"LIVE"),o=i.treeMeta[t];return o&&o.item.name.startsWith("::")?o.isLayout?(o.className=Ze(o.item,{mode:i.mode}),(0,re.jsx)(cl,{name:o.item.name})):(i.portal[o.item.name]&&(i.portal[o.item.name].el=(0,re.jsx)(as,{p:i,id:t,children:e,fromProp:n,meta:o,_scopeIndex:r})),null):(0,re.jsx)(as,{p:i,id:t,children:e,fromProp:n,meta:o,_scopeIndex:r})},as=({id:t,children:e,meta:n,p:r,_scopeIndex:i})=>{let[o,s]=(0,un.useState)({});if((0,un.useEffect)(()=>{n&&(n.mounted=!0,n.pendingRender&&(n.pendingRender=!1,s({})))}),!n)return null;n.render=()=>{n&&(n.mounted?s({}):n.pendingRender=!0)};let c=n.item;if(n.comp?.id){let d=n.comp,p={},g={};n.comp.mcomp?(p=n.comp.mcomp.get("component")?.get("props")?.toJSON(),g=Object.entries(p).sort((N,m)=>N[1].idx-m[1].idx)):(p=structuredClone(r.comps.all[n.comp.id]?.content_tree.component?.props||{}),g=Object.entries(p)),d.propval=os(r,t,g,i)}let l=null;e&&(c.type==="text"?l=e([]):l=e(c.childs.filter(d=>d.hidden==="all"?!1:r.treeMeta[d.id]?!0:(r.treePending&&r.treePending.then(n.render),!1))||[])),n.className=Ze(c,{mode:r.mode});let h=n.className,a=c.adv;if(!(a?.jsBuilt&&a?.js)&&n.comp)return Tr(r,t,l,'render(React.createElement("div",{...props},children));',i);if(a){if(a.html){let d=sl(h,a);if(d)return d}else if(a.jsBuilt&&a.js)return Tr(r,t,l,a.jsBuilt,i)}let f=M(c,"linktag",r.mode,{}),u=c.type==="item"&&c.component?.id;if(f&&f.link&&!u){let d=f.link||"";if(d.startsWith("/")&&(pe(r,d),(location.pathname.startsWith("/preview/")||location.pathname.startsWith("/site/"))&&["localhost","127.0.0.1","prasi.app"].includes(location.hostname))){let g=location.pathname.split("/");g.length>=3&&(d=`/${g[1]}/${g[2]}${d}`)}let p={className:h,href:d,onClick:g=>{g.preventDefault(),d.startsWith("/")?navigate(d):location.href=d}};return c.type==="text"?(0,re.jsx)("a",{...p,dangerouslySetInnerHTML:{__html:c.html||c.text}}):(0,re.jsx)("a",{...p,children:l})}return c.type==="text"?(0,re.jsx)(cs,{className:h,item:c,p:r,_children:c.html||c.text},c.id):(0,re.jsx)("div",{className:h,children:l})},sl=(t,e)=>e.html?(0,re.jsx)("div",{className:t,dangerouslySetInnerHTML:{__html:e.html}}):null,cl=({name:t})=>{let e=ee(me,"LIVE"),n=Ee({});return e.portal[t]?e.portal[t].render=n.render:e.portal[t]={render:n.render,el:null},e.portal[t].el};var fn=v(T()),_t=({id:t,fromProp:e,_scopeIndex:n})=>(0,fn.jsx)(ze,{id:t,_scopeIndex:n,children:r=>r.map(i=>i.type==="item"?(0,fn.jsx)(_t,{id:i.id,fromProp:e,_scopeIndex:n},i.id):(0,fn.jsx)(ss,{id:i.id,fromProp:e,_scopeIndex:n},i.id))});var Ur=v(T()),ls=({id:t})=>(0,Ur.jsx)(ze,{id:t,children:e=>e.map(n=>(0,Ur.jsx)(_t,{id:n.id},n.id))});var us=v(Ke());var L=v(T()),ds=window,fs=({children:t,className:e,show:n,backdrop:r,note:i,alt:o})=>{let s=Ee({icon:(0,L.jsx)("div",{className:"px-4 py-1",children:"Loading..."}),value:.111,ival:null},()=>{});return(0,us.useEffect)(()=>(s.ival=setInterval(()=>{s.value+=.1333,s.value>=1.3&&(s.value=0),s.render()},200),ds.loadingIcon&&(s.icon=(0,L.jsx)("img",{alt:"loading",src:ds.loadingIcon,className:css`
width: 42px;
height: 42px;
`}),s.render()),()=>{clearInterval(s.ival)}),[]),(0,L.jsxs)(L.Fragment,{children:[r!==!1&&(0,L.jsx)("div",{className:cx("flex items-center z-40 bg-white pointer-events-none","w-full h-full fixed transition-all duration-1000",typeof n<"u"?n?"opacity-50":"opacity-0":"opacity-50"),onContextMenuCapture:c=>{c.preventDefault()}}),t?(0,L.jsx)("div",{onContextMenuCapture:c=>{c.preventDefault()},className:cx("flex flex-1 items-center justify-center z-40 transition-all",e||(r!==!1?"w-full h-full fixed":""),typeof n<"u"?n?"":"hidden":""),children:(0,L.jsx)("div",{className:"flex items-center justify-center flex-col space-y-3 bg-white p-4 rounded-lg select-none",children:(0,L.jsx)("div",{className:"text-sm",children:t})})}):(0,L.jsx)("div",{className:cx("flex flex-1 items-center justify-center z-40 pointer-events-none transition-all",e||(r!==!1?"w-full h-full fixed":""),typeof n<"u"?n?"":"hidden":""),children:(0,L.jsxs)("div",{className:cx("w-1/6 flex flex-col items-center justify-center",css`
min-width: 30px;
.pr-outer {
background: rgba(0, 0, 0, 0.1) !important;
}
`),children:[(0,L.jsx)("div",{className:"text-[10px] text-slate-400 whitespace-nowrap",children:i}),(0,L.jsx)("div",{className:"pr-outer w-full h-[3px] flex items-stretch rounded-sm overflow-hidden",children:(0,L.jsx)("div",{className:cx("bg-blue-800 transition-all duration-200 rounded-sm w-full",css`
transform: translate(${-100+s.value*200}%);
`)})}),o]})})]})};var kt=v(T()),hs=()=>{let t=ee(me,"LIVE"),e=t.mode,n=Object.values(t.page?.content_tree?.childs||[]);t.layout.section&&t.layout.content&&(n=[t.layout.section]);let r=Object.values(n).map(i=>i.id);return(0,kt.jsx)("div",{className:cx("relative flex flex-1 items-center justify-center"),children:(0,kt.jsx)("div",{className:cx("absolute flex flex-col items-stretch flex-1 bg-white ",e==="mobile"?css`
@media (min-width: 768px) {
border-left: 1px solid #ccc;
border-right: 1px solid #ccc;
width: 375px;
top: 0px;
overflow-x: hidden;
overflow-y: auto;
bottom: 0px;
}
@media (max-width: 767px) {
left: 0px;
right: 0px;
top: 0px;
bottom: 0px;
overflow-y: auto;
}
`:"inset-0 overflow-auto",css`
contain: content;
`),children:t.status==="ready"||t.status==="tree-rebuild"?r?.map(i=>(0,kt.jsx)(ls,{id:i},i)):(0,kt.jsx)(fs,{})})})},Fu=css`
background-color: white;
background-image: linear-gradient(45deg, #fafafa 25%, transparent 25%),
linear-gradient(-45deg, #fafafa 25%, transparent 25%),
linear-gradient(45deg, transparent 75%, #fafafa 75%),
linear-gradient(-45deg, transparent 75%, #fafafa 75%);
background-size: 20px 20px;
background-position:
0 0,
0 10px,
10px -10px,
-10px 0px;
`;var ps=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function al(t){return typeof t=="string"&&ps.test(t)}var Mr=al;var gs=async t=>{if(t.site.layout){t.layout.section=t.site.layout;for(let e of t.layout.section.childs){let n=await ms(e);if(n){t.layout.content=n;break}}}},ms=async t=>{if(t.name==="content")return t;if(t.type==="item"&&!t.component?.id)for(let e of t.childs){let n=await ms(e);if(n)return n}};var P=window,ws=async(t,e)=>{if(t.status==="init"){t.status="loading",P.isEditor=!1,P.isLayout=!0,P.isMobile=t.mode==="mobile",P.isDesktop=t.mode==="desktop",P.apiHeaders={},P.navigateOverride=r=>(r&&r.startsWith("/")&&(P.basepath.length>1&&(r=`${P.basepath}${r}`),(location.hostname==="prasi.app"||location.hostname==="prasi.web.andromedia.co.id"||location.hostname==="localhost"||location.hostname==="127.0.0.1"||location.hostname==="10.0.2.2")&&location.pathname.startsWith("/live")&&!r.startsWith("/live")&&(r=`/live/${location.pathname.split("/")[2]}${r}`)),r);let n=null;if(n=await t.loader.site(t,Mr(e)?{type:"siteid",id:e}:{type:"domain",domain:e}),n){if(P.exports={},n.cgroup_ids)for(let s of n.cgroup_ids)await Me(t.loader.npm(t,"site",s));await Me(t.loader.npm(t,"site",n.id)),t.site.id=n.id,t.site.layout=n.layout,t.site.js=n.js_compiled||"",t.site.responsive=n.responsive,await gs(t),t.site.api_url=await Jr(n.config,"prod"),P.apiurl=t.site.api_url;let r=await t.loader.pages(t,n.id),i=(s,c)=>t?(t.site.api_url&&(c.api=Ne(t.site.api_url),c.db=Te(t.site.api_url)),c.params=P.params,c.module={},new Function(...Object.keys(c),s)(...Object.values(c))):null,o={types:{},exports:P.exports,load:Me,render:t.render,module:{exports:{}}};if(i(t.site.js,o),o.module.exports)for(let[s,c]of Object.entries(o.module.exports))P.exports[s]=c;if(t.pages={},t.route=Re({strictTrailingSlash:!1}),r&&r.length>0)for(let s of r)t.pages[s.id]=s,t.route.insert(s.url,s);t.status="ready",t.render()}else t.status="not-found",t.render()}};var qe=v(T()),cf=({domain_or_siteid:t,pathname:e,loader:n,liveSync:r})=>{let i=ee(me,"LIVE");if(i.loader=n,P.preload=s=>{pe(i,s)},i.site.id&&!i.mode&&i.site.responsive)if(i.site.responsive==="all"){let s=(0,ys.default)();i.mode=s.device.type==="mobile"?"mobile":"desktop",localStorage.getItem("prasi-editor-mode")&&(i.mode=localStorage.getItem("prasi-editor-mode"))}else i.site.responsive==="mobile-only"?i.mode="mobile":i.site.responsive==="desktop-only"&&(i.mode="desktop");let o=(0,hn.useCallback)(()=>{let s=i.mode;window.innerWidth<600?s="mobile":s="desktop",s!==i.mode&&(i.mode=s,i.render())},[i]);return(0,hn.useEffect)(()=>{i.site.id&&(window.removeEventListener("resize",o),i.site.responsive==="all"&&window.addEventListener("resize",o))},[i.site.responsive]),i.status==="init"&&ws(i,t),i.site.id&&Yo(i,e),i.status==="not-found"?(0,qe.jsxs)("div",{className:"absolute inset-0 flex items-center justify-center flex-col",children:[(0,qe.jsx)("div",{className:"text-[40px]",children:"404"}),(0,qe.jsx)("div",{children:"NOT FOUND"})]}):(0,qe.jsx)(hs,{})};export{cf as Live};
//# sourceMappingURL=live-4QMOJQZB.js.map