@micrio/client 5.2.0 → 5.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/micrio.min.js CHANGED
@@ -1,5 +1,5 @@
1
- /* Micrio Client 5.2.0
2
- * Copyright © 2025 Q42 Internet B.V., Micrio <https://micr.io>
1
+ /* Micrio Client 5.2.1
2
+ * Copyright © 2015 - 2025 Q42 Internet B.V., Micrio <https://micr.io>
3
3
  *
4
4
  * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
5
5
  * and associated documentation files (the “Software”), to deal in the Software without
@@ -21,6 +21,6 @@
21
21
  if(!(typeof window !== undefined && typeof window !== 'undefined')) return;M='H4sIAAAAAAACCt19e4BdRXn4zJxz7j13527ubLILSzbI3JNUr2wCq2DcRGDvWTZhIxEWCBgtml2yG7Kb1ya7gaAbdi0YU8Ua8AUp1ftI1EpbodpCeZhQH4VKW6wvrK2NYv2JWI1WK1ZLfn7fN+ec#Xc3ENrfX78N3HNm5ps58$zmm+81bGhiG2eM8b93w0E+zQbF9DQb5NN8etCZnsbwFEbyaYidGvSmp6amptggn+JTg4xPD7rTGBbTEJHB1GmGmfn0oJiCWHcai3KmKQXAswRowqYYyAHlY1aFEBAwL3x6sMm8UkgmIQjit7EWuWmTE+vIBr1pqoCPz6h+e$F3ig1mpk2bn#m904xqwqLiIBe+UAGmRsx8g8p1TZfcDJ1EjaHmmw$ie4E+bTdHT#$l04PZ6b34hxEQ3RrBESyWASW0zRUf91nUBUl3xp0yRXUx$QlDS4l8mu$Fsd2LPUEPGGQz#tB9Jhu+F6I#py$PjpqCzA58Y0r8lM9zRrbf4A1dt2PXJCu424ZGtzdNjExeMzoxet3WEcYxJju0fbRvx$YRxjDoD20fDTEDheUNoyM3ju$YNXnVyCTLUlRSxqtNIfMmRibXjW4duXx8a#Po5E1spQVI2dkrMCo3MTL5hqHJXaN7ou8N7xq68YrdQ8PslVTS9emSuhMoiGadVGmoFdSIQQsz20a27dh1k2DceZp$hzPhvVb6vDnnN#dyQji8yeWu63L#HS5Ehmf#YvlMJuNwNs9nrFzymxj35$n+At933SafvUxwJRjLzMu8jvUsFC$3mC#bskIskZwtZ4x54tWtCzzJRbMunL3Ic$i5z#HLVmThE8xhHnPwH3P#FCKXy4ml2dP4q7pEm2hr#f3017Sex9vbz58$P9vEmchkssHvL#QZxoTnZVw3k8m2uC4TbDHLXnTGGRdcyLJQr#BC5P#q6PDTzmGsw3X5#GvKrJbTPGRz$7CwC37a5RTvY+Yv9X4z7zWw2W$lrvImRq6fW#94+HyTk3FHhiZG2Hy5ccf2iclduzd#7tjFzihcPzJ5zciuyZE9vbs3bRrZxRb#b4g5b3kX68h#jEyGu0aG2CIY$96hXS#9ML3#bJkYmTxvedflu0ZHtk8#TY7u2M5edsbEy#Qlu0aH1+0a2j4xCnF9u3dR2llnzUpbN7ptdPv1q3dv34gQunViZPLiXTsmJjYNDY$EGYsQvWrbdSPDq+3oAL7ft2vo+lVbhyYmR3FyLYa4q7aMjvc#TYysHblhZ#sEW9I8MTJ52Y6B0e0bNw8MbWe$A0tmzcRVN46#j7CXQ2L$0ES4a+Pm0RtG2CvmIfDV24dHdr1tx45trCSvH5m8bPc2mKsT7JVNE5t37N463Ldr6Eb2e9yFWczex71dIxMjk+x2Dmvvqskd4+wDPLNrZGL0bSPsQzy$we71Gvc3XE$LiNV5Ft4v3rGDfYyiceH8Mc$A+$o3sT$hTfBmFtinKHT5tu2j69$E7uX+hmhk$pw3w$uabUPXj2DEp3lLHHHlDjM6n+FtceQ1o8Mj#wa2Dt00uv169heYfftwvLb$kkv40oD58P1UzzcN3cge4DlMGZ3cuJn9FVdQIFToqpHJydHt10+wB6kqfa#7RmhUH6J6YoMf5ll4hwY$wiW8rh3dNjo5Msw+y1ug3HVDu6CFBlcc4dkNMBXWbGdHuY+vl++eZI9yuWF04s07dmwbGV6znf01z8dBSP48z2#njW6$auPQ1hH2BZ6HL8XhL9KXIQwD9Dd8Hg3CDS#7C#AxaiMFHue5uJ7sb6lbz1vedeXQ9utHKPJLPLdhaPvowNDuiRH2BG+CwJUjE7u3jbC$4$6GaEr8PW$aMDpx6ej2kcnRjewfeG7D+ND2qyaHdk2yJ7kLAfZl7lPkjnH2j9SPCIB99xWe2bBp603rdrCvcm8DTs6nuNwwDv#aivkmz1CQfYs3RQk7xtm$8HnU6zeM7KIqf9tqM8X8K28CmDev2T48socd4$M2D#0aGQq3j24bgnFl3+HzIUe4cXL0hhGcQWuG97DvUues3rFx9wT7nhmtdTvYv$EmGjgAZN$nBZypSV72f+yotUM3jexiP4BuHB6m9GcocPHm0a3D7Ic8u2HXyLYdN4ywH3Ff$DvPnc5ZyGXu7TP83fw2$gf8AL+D38E$yJv++Sfi#3wtF9#a9bBAhGoyLIyF4zsDfqlb1kIzzbeEJ044Y+HMzNT#UN0QcM216#8os5D1u2XNzQuTUmq2hMkQCwt$c+LECedStxxW$PCYHxbDMxVjcjEr8sUsdMcCoVm4AL4UulsCNqaaNddsuWBayEuphB+lS$g6C18GRWgWqjE1L3AgowjZcuFqfPhaaL5c5KHWy4XSTqjG5LcF59PhUyx0VCFwYuy$wmHaDvmpkEqF2lMhnQqVtB#ylaxL#5qtcLpTaWXtaL7C6de#FiucAXjEqUMhg27ERyqSJaG#jg4q2el0uk20X65h1SGuHx#qSQqEWdVuzPEeioNfv4oNg9eyXVo7xQ1gQkNp7VW7wVRa#5amq9h4+Sku+LQ3pdky1uV#ae5pXnScshbhCb4z9Na4ZVHW7Ld1KHrw8IsZeKhiFi#h2zodP3C1W8F4+$#1Sq0SuEl$NG#7tacdndG#zkJ6Tf#qduvVoqNFyMeKIi9gHmKx7fTQ9CghuJQ+W8w1Uy3yIZgZoqz5qmamGYwig9k+ZqbVSuZoHoo3RImcHkIL68E1DzMxiE#RTPPQN5GabQmdnYEYC1iIsxuHfUs4BXHhoi0Bh+h2LeIcMJ0ZTWdMU$Ro1SJsj0Hy9FD0aKVH#0Eyerj0MKXkNeR0d4btYwEfKzJYKluK3ClrHurL3bJmvey1Dq#HTw9FDyhWbylC+$VYkeW5lFJuZbBEV7nlMB8KVSjCspSmhQ1tQESgxQ2wko$nwkpT#D9cgQuZazEJHaAKgdBcLdBMC+ojgSXAavY1kx$ksIYfZ2FGFQIW5s#sKoRuKFQrQqeWMUstY5Zaxiy1jFlqGduhrjh0vAcWtR0q01D3aybvFVzABBJFr#vqZhzdNYATw+x#zcLsztVuGXNkd7pl7a5qdrUb8i0AH+B0ZZoHDrxwLbSzjMHsgQ52ytoNfRwXzV$p4NC4oY85Qx$zwYPjYAAwQJ68SPNVgPZmVU67Y1b9CDZwxzTX7tjcNYKaRBBUuVQ9TlKClLKXELuYDFwYdVi0LmBJoV11mgyV5qoQc#3gJIaHC2XgNNI4ibn8L#Lz$Tz0YC6oNppx+dBXhXA+TQk3jpipcYryYdTC9vBYkzp9jtVzMYxut2insV3U#FFMcil+WxpDPNljT5djNF0W8+WA9KzI$lRoIDWj1tNXB+kxBMt0Jbu#QhvpMUyPEXpsStVvcyo0ngrt0ayvBf9u71nhzHDNpMtUu8wyzUrCNU9ftu#TaX4$LgV4FfevcLpkDqf0SjYsT8c3$BzsZu#aaWeFs8dArHC6ZYlptthd7CwWiwEtnjjh7AxYyFd3wIjjr7#6Y7kox1m64reB+G19$MmN8dum+G1EKvM2CNVYyYbkPBh+Hrqad6xk15kWKbmIwY7U706HDPedctzhG6V8BcMNAX66h92pJFBF2G6MqEpZwI8pTp9cL$ux0Ic5ZCmJ1gDx34wMj8rwQ274SiJ##mGHgjo0JF8QJTMp51P$ax46k2PQnUyWaQhCqpo6h0IcQl1RSGDtohDuamUTWijfLbgzpT23LKZgPWlRDbLxnKtVirBl8mrg62w92c6Z6jxkhTod3Ku7qofqcebnemrD7jRAan$YC5l0p3RG+zpbS0oP3GpR6Ix2K552pSy6Evc5toy51L3tXnLuDjIVnGXQ7i6YRhoiugFvIHo1w6E6rdojZseqWZVMpSvN1LkwFVYyT67ifBq6RRd5qq2adzqf4DXNS2JRp+PXrcIg6d44SdUP13FCl4S#RrzT8b256ibluY2AynuBukp5myfENE0iHTgwVVwzVWby4W08nIdTxQUyydNMvaqY0WJVyLSXTGJ3WjdmPMDDVsyYgaz+RhirDjeZ+NqrBxkccSLFTM2AEotrF3$iWE+tSq#ELfYq9j54rEdndPZQkAbuikYIgMsFqaEzGiv5YR6+BiqZ1IpqCyTlkxzAF3U65frh+uGksZLqux5++qs4jl7tEFGQg$AzULUHEtJ8zd1pq7+G3emQe1pE3caTGt3Nw+Wm23jUbRLn#c5F9erA09ZCCjKmX7x42jJ1XuBpvwGmK4YpS9jmCjLGM$0bXTPP+60+zkJxCQJaPxwBrTefgYQsfF3KeHoNxEUNWCPgw1eTQR6MixqMV1hZw3mgS0pEldD0Evx0wU83$JRDprrkuzgX#KXHk+YVESuV+tqX9a37dTFXthABtile6ga39ltDWSsKU5MUlKCx5JVDmlc9LQ6acPWw5hW5whmUvxA8e7Pmd8VFDVGb$qiq2cdgsj0S#L3n7+89UbgFpssjgejt2V$MhnBa5deFXAuTGri9JwpXaKeX7wsyAx0dRGPVgt$uXvUCzAIBKf6bMT6j$SsfqBWkdgfcmyEFEGtvft9NewN37z5Pi94T9Je9pXeG$vxbZVFoD+CdXg6nFYL3AN6ZG94RQIm52rsaz9z#m+Fj2rmiGUgjZ6+nhezl+4pCu718L9Fx4mYCLIsUqCwKqeG$XrnvpsDBPNrZGzi97GpsQfTVvdrpPX$frR42ytm7X+psb8++W4$ANI2HpiaXAH1NA31GWb02fq1YkfKjcAZ0GqcJoLc7AZ0GsK5gSqk6Dn+yG8dTpGxNkWReAbXb6azH86QTR29yk9AZ5WrRge6A3U#Lw1pUtXtQi4#HtKho5$Ah1Q00xd#cpUiu$$0x4XiK7mPMRo909rdD$anQLPLPSht8SbRdUsoMl$c4QuAoPNKr9388cEKcZzvDT3ziQyecywMXKAPTbc$0ANuiH87rB2E1H$Q0k9W+7LWt5738Y++44Ldn6kox+ZYscuhfVoPtowZ4V3PYAHRGZ2qBp82$vomrBr$1pd3$8dla38fueG1l$82tPZVaHx$52c+e6rsYXkv#NY8H27bB62u$nrn158Mfgte3Pa9aWloe7anojE7K+urbjky#n$3ri2p9z3z8+KsLD8wH0M3qvQt$+fIueG275djzj33rjfD6$lu3P$P0y38PXp8PP93xYPWeHmIMVGoVne3beDX8fa2nVgm8SpGbIwrXsNdrcX$AK3XtVatFZjE5wpftDsX#+6tAw2hWqQIGECFfDUe7Qrx3HdG8HmQfwSU1fsuRgLqEJxG8FpdJre#aVavAh5Cfch0+3XQzn9IsQgknTrBbAEd90IflmnnXx0NnMjyeHwvgAFjMwDnQL7rwUEWhnd6eW2BVX4kYIK#dfdrtPcpgrXv7by1mYNnv00JDwAXUsA9ytkMYcQSbCxMFhJ8KtwRZ7Uav$s1FT$va6dX7A$9mDSl6f5C9WXu9ev9UkDNwU0VXZ7V$s85BNAJNLclBtndp0av33xwI7RlYSN03NRV4Wqz708U5IAFvnpoK$F6xT3u9F+2HivS8KxC9$F3aeWeQuanoAp2A7ekV+94Z5KCp7t79twaZuMa9n7m1$h4Blc1ABZtMWGd7a39x5LF8VF8Z1zerm6IkiXX#mjrH1cxCNQNPZx7su7Vj$Ion7uzuqemcdvc9aBbSip5a5b4gA40Isr1y$9SDS2A#ZHtfAw2R+2+dejCaAq+rLfEXZ6#+fuoC7faev28v0L$vjCJnZqZvufVIkK8tyS72db62xNd+70Xv0mLvx+V$CEdM85txfQc#rnAennVDUeBRCxZ6wMNff+7QCecNyICYmZn5mQP8WZbC6CFXr4PdMpyZ#XoiexntodWCFNM4wB+3y$re77tr8DjBw1Zg+wI#veWxx7d1bfheT+0jSP2V1$26+KueWjUA4vRVG69b#PSZJy8E+idwEQuFrTeEJwo7t4TqUizJ65sYd8559xn119Wg#KTQBk0mtxqwqnarVZjrsPf#KuRVl7pQxKNr9#8cv#XtK5IiGBWZKgIKiE8jrlwCaMut6kx1ia+9T+a5DJl21AUB3wJ4oEMW+eLsYh$ohZDvDPnkFvU6+V7YN9RKC9PG3NpjPTV1YT3gWtTpcMLNaaZv2cWLnv3u8oU9lThTHKWdaj3gNRvpHz+CSB84m5UYrqYBaE8K389wea$Hz6SDSIDbaFfgIMWlAtwoS4FXqwbzcc8MkM06w4MsQgwGPjz2BLlaNVhQI3qr#2jCxPZAasjZimRkkNfZmkbw8aC5Vg3aalWCLwfzEF4HBYQ$Ted1rqYzGqB#r1W0q5tqWmqnVg3akfALVFzW5qClVg3#QKh5NV1AqIVaUQmQ1lGraklpTbVqsEgr3VzTeUw7s1YJ+C#9fF+v2Nv7PCGuHdcQUa0dvaCmmzTUc54+vVaxBot6G4ZH6raadvWCWlUX9#m1Kvaw0kw360WwphfWqjqr22sVTGhH2m8hfH5Rrap93W5yaM10kz6jpj0sap7uMAl4oIWKSH0GfqPDFAWTIqdPq+kWLCqrW00#o#kVfDyjT8NvtJocZTw5tNW0g0XN02eahH6kcs6A4WvDb5xpihrQTLdAdZuxqKyeb3Ks10zn4eMKG+jr+SYHTbk#aAd0RlNcFPJ3ftuL2tU0INHHx7GvWqEd0Bm5uKg92I526CtoWib++AyXX+VwC#TAhMdp69TwaGEmLcCZI1x74FFohlcCMcdIx4#Kmxce1TSVVtKmoH5tythcSVZlJ8g8anS0MXADEdw4wSmCazdw3RHc+ghuD8G1E89Cy4ddQ2kVHUNtJWhzZuZoxSU2Kbu#0K$ZK37Vo52PGdx7$HlnTYKm1xBc#F0UnmZ3IXd3ZuaJE84a6LxwZuZ#egVaJ#6HaoIdypW6F3IgredIPd5TqSPXd2bmD2bcNe5UKCzI5yzI53oseqXuhU5RJKQ#q0uJXH6gA73frn9kenvajf71tfxT8PTKPz3QU+t7tvmGJZe+$Y+BIrviwicrm5rvg9fteu0X$m7V$fB64hZ2x5I1fw2vzYY8q9Ssos7d#ra07z#1I7W+g$$97SuXfftPj1Rqfds#Tn7qZ$d+Gl53nrb4+S$ufBheP$$snXfdddfjR4DkK6IgsJ940LCplZN$WsxzGRe#K$suf2jIu$5P$qVHu33fHTk3m#582wVVIMyKL#$KhEJ2Y3o4SnVk3x$+5zv+UU78BFIf+dLxt+3PjsepwhroK#$tcSqX2Hn#x+T1LyTyc6figAfTsq7C+#ATvRy1cgx3xK9WqRs7KpI2r+RfX+6X$938nQtFT61v$5$z3cd+sga6$3Xv2$wXpd87BD15dd$+eVc$+jjE7t3xrDP$61$FWPz7AoxPVNDv3XH#fV944NM9tb438fd2bM18H+Aee$eb7v63s1m5Uuu7dNm7F71ipX#0Yk8n+aAQYlrExx#RWjInHFwyj3zcUCb#ll2rICLu0aio8e5KTICjvI5V62ZNzZyI19RRdnlIi+joz5w1HREVRP9q6uJaUsixHs3usvhYgfPRIhAGFw#pHX76+w9D1aaSkYUi3FolwLUYD3LVS+YNpGi3FidqRBLRmcCBjQ8mQqW#ZVSr1plM#5VqtSpBPBeedQNU+yDUW37FRcFJSewHdkZ8rgahLpAg3MIKiPYQUABPTTWmH0R8BwDW6bF9VoxGBnXgIHM5AA4dipWRKUliZLfTaSfhsdvpaBQTw1sJxcLw1gV7H751o2Qc3sokFXeR89VPbwMkG3eR0bWe3gZhh8K3zbAl4ds47EH4tgc2HXyb4STWKAlX9Zh2Y6BMAewiFH6j#FvhT62CYmz8AbrCYkZY3FL+0Tqce1E27msiIxwqhEgHh0ox5EJJ3Mbpm53RCHQ67QdVb7x868ksi99Q6H2AV8yo3catWUlFKNWXlIBUXr1qhvA25MPp1#fz5uv531atYoaR4JB9#lAxAp7buHzSwx#Fe+oniqPxVmVWEtCdBm$37X3+vjc+febfXFTr+9rQo2dU+NmAFT72HBzu39FTIaBaTbt9U1$7hzev$#a$XVjre$buznd$$9$e$FnA3X1rCNEAIk8#KJf$bw4omfQBJWMdULyTHVAyDQeUzJwHFDzJa2$uA0qm4YCSmf#A4mEBcxxQPDigZE5yQCm6i0GDAo4o8U5xvAe7NmAWA9pLhD$He3QWSo3R94G2L51R4f91Ua3vxisePW3ro9fAQK3F3j9s0Dzt8Aj91e79n33mvz7xSK3v8$d95pGP$Lh4UaXW96dX3j1z+c134MBpV2dq1UrFM7XQbq0I76bhhhfoYWEvMkdoUtU0#8kcqdZ0pqq9eKrUqlUZsI#wT4ZiZ4e8PfPSZvRHHj2IMzruqYIll6D5ne7TjCW2wD6NCJYX61PsGuxTgH7xPrVYsNXK$6v18P$hgR3Xg2fWgzUBMzgBLfmUzvw$moBeVWfsCei9wCrMNK7CzEtchcBgPeVV6MFUidcDH8Ml8Xn#c1#aq9WwCNQlJLrpKqLsuJv462USrw2QZtZ6I1crGoFrKcgBqxRP801a1Izs1oHIDIW78FjKazpL4W48GHA4+G#4jGdmDqdsAYLCfjxcczjfYhh#r1kIuxSGQyvsuNqj8#DcrVDUinZqhX7BVvgNrSAyKWkFbalJK6p02otbUaWTPzQAm1KhVkADsCkVagU0AJtSoVZAA7ApFWjFnUSQd8IZm2gKEvyJGpIB$aDxVqET#DBfsI0GqCsCGjBA4wS0h$TcCKg7AlpvgPYQ0AzRCQaqHEENGqgZTlKeaKKq1yZkuxUp$1YIBwl4kFoL0H+wpKj$xcIW0ukCGVBCsMD5vB64WpDEPTnpWNuXh6kxqabqH03WkKxpcbYYAL2bng88VMdtE47msfynrkWnc4xX1aXxgX+QvjpbbGXTYKQyQAPhpbA8lGSEskq7KSWHWMTqa68CcN0xHM3zRKvEiFm7k74EHZlIQSFRABGgANItmHy#2xog$l+qN1gqICo#IieuPQ6ShmMcJD5gHCQ1hDiIS6M7DuISKcdBZNP1x8EcTrc42IQTKw6iBHowDuZxWsfBZpzAcXAeTtU4WKBJGYXlF0BwxafoXAMza1HR0RzPf6CJhGshmRymQ8+Pdu03lbUAzYs#dZGkN5MRsER8botejmC9Dx+C8wX27KDqp5f1ao1uJKFVREqr12M1ANWUhB9wtVJbmiVumifswkzkoM3SZZ3Jk0NrdBDptk4E6vWm#gft+iTEe+MMntkUid1nbiir18KMFXBSi5bk0Xz4DRa6tCTVWm9W6reYUTMhxS$16rgu1Y#45B6qaa7#S2KJccdtZZYjNfV6KkBdtlA+JAQ3+#F#DrgZW#LjpHMBw+KFXEbLYk+Cl8ZhMMYlwDz#SU0jrUSAmdRy2Sg4htgV0p4jgEUEjJ6wJkrJmii#mSiaJYdokaAlX#SY2UYIahWoLXNbCMDiIQfJXkICVBA2SBIt5ox2hzsqmlfr9GlQRKrjrhJydblsZaQPDYu7$pe$RXczPYPyLUavuPwCIukXEl6ntVobNGXlg9wwZACfc1o4cLJTr4LlB1oyIsHvR3m4EKeLgFng1EELx1JqAmZJg17No1E#5Mw6tq6VndGJ1F$cRN+oSzsJqu1G3Nodaa04qFAD+FN1WkXWUREQTqMg2a18FJW3UhDq6sZR#d6jrq7LZzjD#QrdUBJL7Ub$hIWnR40uWVvXNER0JRGoLYSRCbq3IsvpSKNbxNVVmqmrZKx6030o2T8#Ve8iljVW$a5KAnQ4ATpsErCB5epdlVgntaaZukZzdU31LpsFdzl#+3HlNGo7w6YU0ly7#J5yRiMeHooefWmlBvmfUrjIBy+Bai4wnDTo9XbpedCfy1hfpEZVQg3eJB0iQlD8Pl97BUnpEjTcoHq4RlcyRLXjgQK81WLG5EAh$B4Lmy#85Rfx4RYLQDGuZC2WAmoeLFnU7sBHDVQfNVB90kBdqlVJVDgU7NvjC#x60JtM1rmPylSATKr1YEEK97h6QaXoeiDzqYBIwrd7VEKmUqpgUL7EWPjx67WG4hwoxgG+woIKsJ3s4kpSF3QLZG2B+rTAmmgxClpapjpWmf2voF6tpXp1NeFswkcK9gQFpU5pR2w0oyUhumTTLSWKa6RlZGNxhbmKK0B0Q3GFNCgWJ6X#wdfVVVqGD#aGpFk3QI8r6XEFPa5K5EELYKq1uGVq$Cos49XFVi3VecU2LdU6XVDrhrFhE#yEoK272oq4BhJbSW1#6lZoWxl+uqqN4G1V6pBW3Ub1JthCp1MeDvyQYbdg+4aDPAW7INi1MZhPwRL2yMag0NHRsSoECg$EzvmQ6$ka4pBfHfJQ6EIHNR$e8x3UB$A+v4M6At79jqQ3nuspLvDSU0JKPQ$aHnKdW6X#Nwy#$Z8zSGnt35W1gr2IfmvwuJfTb61iEeKHDltSo2M9fQfvgr9nenSLljrR7t0Y+#qNAZ+1AZrR6ahVD5P0m$L$cU$f3z0Bfz8CyTrFPR4V$lc9JlP10GGSWPogD4Mzlep0nuJ1vaBm65Fm4lqMdNQ97UncNkpiHDF73rz+iG+jUyGGJpeLzWQGsFU3hez17rRugqTNl8QqoBTeAhCsJLaGTPtbQrGNxExIKW4dWy62IiraCphm2+uJzMHgFkoyap0lsTXww7N2Bznt69zYxP1W$e43FMv4$eWa#SwkiwS2nbJWNH1wSuE0k4gGAJWGTF1L2F1oppDZ2427+XpC7waTp7G8wrmB6X0S5bt4Jug26rwQX06fYnS2Wp#f8MxJcBm7cFVUwEXw9W6g+Xx6E4ZN3Q2GAu2aqd9dGDemIKH#wEK$DkDWBTkY6KCpwzKgG4J1kFPLio7UTfgZPAMchnCuJPKBNLvCk$PCW53QwV1BqithHLHkDncKAJkNuM8xevpSdVqsG0#e1GQxPzs7S7K$y0nU$A1dMauU$gRbJElNHTVZdHQTbHJuqonC4uPmLTzTDNpnXDcnZ$DhjoDr5mqy1tyynaPILe6lky5JaNFQkkiXNGXnAH1TVBLLwWHHav4BJ8xR8zVPVTYPn7C$6UDt8xWIBd5$giBgpobTIQddsZCpNxX5rK$cEQ0moMaMLSztgAncCP7+GNwCHYY5DjI#4U4bFdNYlj3026yMyI51dKJbB8PsJEVWuSEy3GXsMb4qAGVyFw9+CUydhwHRt8vgoM1B67cR5jAPsxFMH9miCDrizAH5ygjyYoJ04UAkJSAhJ9oQHdUJhhxICEfK+51#P7JFUEPHB5A6aB3HMPVDQPsLIskuWGXoUqauSJTcUZQHzW2o1Z$z0G+oP5YhTS#whlERyD9QyGNih7E4wA9xW$42gSxhKp7zWF1n7e#AR2K1EikNsbr#VGfp3iNEl$aqJGCEk7TRxSfjVjJAmPPr#NSpJh7h4RJqImwRjnrN7F54dPYoxi2PR4Y1HE9Xsgu1AxYpy9hFrqGmzbmz2zAYug2DobvTaZ$NJoCC44B688IQkab8sWdEwUTA5mwClujSNAkLAPADJGwl4l80JZZJ73TDJxi2ron2h1yakM3ZhCxRqkjKQjz8+PVapejMKnafG37hpMWWJNgpUZ5ckuddbljALDnMQkd7G+D3XbPSczprDggsyCbp747Ssymi2A#k63cYtlDgJRne4xqTci8exgaI26IiPaiTqz#roopbQ#91wwUEVBL5okeFZFLpZ1#6zsAEY0BqpTkZCd8qZVZ2ICrZsCusuuXD+yIsxbRnzoQHeFV7KeukhIGT6NWjSoDhU#NKwkXTYKY0V0ayoyZaDLk4Vs4GoEMhVwPGEM7qqtvdME9doX53jvbe7oaLDepn6nIwGVU2pxS4hb$kxniKCAe#bC#y4U#MoiWy32CBLGMjtFx5SUyaNwCP8BdEh+z1iGI5qDsIa6vjZjKK2GyM2CKNUMuivYcMx4iBVEY#QWRUFnj1y#QsyACVkNFuHSzZ68MdwImJ8CdHGyge2UCRDAJrvJINyMc4JzbF3dwwK5Ck$RHftrWYQbUKE9tPHau1o95SdEG5eovmWwJYcnNxpoT2LgPjspBd1tGxwjkAiN3SBDnAyRB70qiCJIP1tBN6tEsSU1uj2bExx2gwgPx+vEmrt8rfB$qR7N+WIhE1t1hgTi4a2XgBTVo$fEgGGdVS5ET3Lg#yfhkr03Ji1AkunFqAU+CQPAhn5FL71ADc1foh1QJbaZLEQETlWXjUq9YPqxbKP44MIdqn4K2q2VI2EICtYxZU4oDlABRBrYLTgLYrmhBsKbviZIDdtJXBGwJeeTLAMm1z8IaAVwXCAIoEMH0s2ErdsRnf72$shEQB8JBqqX1yjDptXIs5j0+BM6bR$0E$kJH#ZcDl0s4WoBpDpjZI3PgVfXAcFrhI2De$4mb#kBzDUrep1iIpVQXyl9SA1Im8fRMVly9GVUrotQ#F8L952G5KddRrrGMQ1AV0pWFaTAMPfFwt02Tjt5L16oy8n3##yEM36pyuj0z2V#oIhmbPStq1Ryumvh9d8cDL3nlPV9n4nqjWbQNGsGMX6mpQC4vEF8NRYSWz$hmJH$oAc4EGN0oNWYQbBEkRfcrTLv8TbK74lLEQjLTCAg$5ytiguoXwMzpTSdn5jh8#MpGUEmWBAtD4vb#zEjbXCGzQ$no0qtLe$5Bh76T6E7ZMe1P7Txa2mb0SdimYaBXtqqFoSwiYPSZkCRtxzo3x5geEMf9dZ8s8npwXfpknvMN1QNmbPcHwVvtpuc$cek5Y++T98Xs9#SbFxpHrXwx0+BKzxRiTyoFTKhvlK4MvXraMu52I9xfNIaX8mCs4IN0M8lnVRlPEMnYBWAkDbanduGM6ij5tr+4y9nPYXt2SeI7HNM2T88J$5WEHmc3idtWNRxp4kcUcvDIb+FjU8RnsatDcM7#U1XWuFjRVinlI6wLL9XgaUpqsFH#Q1q2bKsUmeCtrWSkikrkACd68zukmLeE8SQjP01lq5DAQfW7DefEn3MjFWJzTTMmj15W1MwsPdMxNm4fT8Ks97a9Sb1rozfrMz+LPqPUNcx5IVoDP2$D$GZlvJ8dYVa7FLoPg3YNl0NBenYX2Nn78Vzw+qDe08WTNgLP4QiC4TohYLNRnI+8nC+GrjYyfklRyYi6E5xlqyWDaNNokyZ+lZYVIpgGtclKxi#Y0GgyoaiLSCNz6bAF#DFkyk#Ud5fqhauDVLFG9W9cQ7jaH5K6+1j+75Dtva$1xTwLUbcd1J+bV3epq#jP1GQJdJEkWVaKu8wjtN6SgEjII+EakLS1+#37s1p4RoIHUlZbGtyur8i#C+9#E0P0gE6LjHKPAxiIf#iqcF3bF4ttiFsnjwGl0mfV05DIrGypwNeRuCWBpFr3FsNl4Y6uLPnrJCnKxKy6wXdY5UPP0gf3W6Mbr$LAYue4Bl10u#uwBKYgX8kmgfbV7aYeaB$58tKd#06LIpYdFQY4lz#SQoNHmbgEXL+DfSI0FXGfGkFRVCzTX2UtoThiPScsFepRwlgufvHKETF1vPCHJT$GIfNZebchMPqhRLZLB0Y4chUhdKAqRwX0UQnKwHIXAg0jILtHZkF2ymrglxDjCT9FmLPBNoTKQZyyHXHyD2eyR5DJDSlDZlaw$5HINbk8wcos6SXeXzvKwudRNtNZ2yE+FFIWUKz8LhLQ3ZU5CsRINCZeB9DfA9$I6zBH4iHV4+QEzfA2xjGUMX4PaD40nztJQJK2EzR76gi1jAyG7BMdHvVVibxi$HVlSiopYo$2H4hVN4cPAvGmsxM9Z#D+Ssa4ven#ln2XoAQFb9Bwgv7CKGARdxNnpUREZgBmoBpl60Z8F90tmzijoxSsDzMeEzLCdb+Cuor#g1+THmj4loNPr9RV4DKWIjHZrde#vQb0VdVhmU5nT#Eqz4qMpaDhWFnNyhocaq+kQrgUfTwC9KhqqBmbm#6KNiENBIpWgqCCgjPPqNZpHEjTe8M1bos3JWcZC#geniro1JuuNkEH97kICsjalfREQ0w7wd6R8j+A#tnFJSeQjoUm8GPwVIJciG64Vzr0cd5efk2LQSfglDzo2vwSXBKgM2pvV0Xz4t9wMtK#22E5NRLJcDtFhnDTuaxY5LHAhwtGrRqYHSE1bzA6e1#bh6IDM4TsNVX0kSoxYHR9pEr45FWMXwIEU2hv4FPkcj3v8qAyfFNGkV8ssEUQWqieLUs+Z6cvCKP0IwBAeQPsg8pgT+B8t4HsJWMlis6CdIQJv5qRalFnVzLEHum3#11cE7RdyFvPgq8KwluEomgy#DL9mJZRs1tHXrYQuu6LfiBPU2UH#Lac0dWz1C+raCJNW0NqwXjmE2Is6nVQpVEuxCdB5dL7Ht6puqlWIXyYM06wrjqNT#77FcXRAxzeMI82HlDoIzeQ15FkAWcRrENEhk9DGTkdl+Iwwy1gYbgsrifNtgB+JCH2hHQ79ZCJGRZUEA67qrFU#Gy#QVPZ$T2Xvxuwpv4+GPZFB9RQsrUrFHcJNLkIdWK41bD+J6t34wZ8IcglqCYewt5PaWaUcP1kpxxtL#Y7ruPsQ0XEN0D+LG5l8E0yVDuMvHUFQaGLLT9BwCQGq2Hdds4r9j8ZigczrdMqHMFeqFw3vBo4xh1JfqaY+g5PSTynJZvFwhXqYR0lXcKMRyZTEIhgPLWs6X7PKhIjmGvGpMjgH8jWIc6K2ViFZgkrzrE+VAYVg8dllrF+qUdxacIDVmJmdFqr7VTQ+HGenZmrrLHT46xhmDnT4m3iAER3qXEEm#ATx0HdATTSDi#ra1M6twq$ESkHL2Btp17yWCCdQB48CijTFS8UsuTRqt$zBbkSnMrFCCsiYHamzsLsLSzdyY6#a14jZdJ#8VVDjyVpFZSUpkNGR+lpbcfpJFX6TGdaVb0kvUxqloFIIHq3gu8R$bCzjnwzPREyLaeSbZGYVcNhSSgSf#75VX9$i96IFhnY2YvEgo90I2khcGvm7Rpw2THHut#bG0RlgxI3SuEeDxo7EHIp2rPimhGVB0CNJBBW6SUr5fuTGidmih6#GDxV46hJiAaKBI490vI$WAq5W17RbS+wfPbUawyoBV5cQyFz2jo5BXmRByFRZUkiex$lUZEW8uCkUW+Y5XDhMgr9TmCdkg0CnAhQ6qR3yk9ywoFDHt#iEYkkTAYRMjS9sMBecpW8PBiux0WJ3PbY#jI0CD54si4qznNREEArQB2PbQDnB7#P48SMbk4GJvfEaLptvrZcICI8b$nAynMnBf6MViVTcMBGpUj7nGLk8rNcysfW7USyF#+RhdB51LeolgWJ5vWZ4BiTkzth+DbPRAqeD#q4NL1kb3+KRRCnBCVybmZmNKXy3XA$8qtoJ6sDa4lmS27hUy2XKRptj6iEJPvq0q3atWoXeV9FPMbl101AuJHWAv9M5iqcioFzN03uhf1jqTLWY03aRUG2$8sJFnmKNZ9U0KhacN9sGhv+TauvcYRq8Q5bzR9mJ4mvk5a#$2sCBk3wJfXiDLYQ58jtwsl$CxTT4NQD6L#DgwpZpZMKEfLIoUM4k5Lc5lIgzu30LGSwv2Y4uj2j$MX6gS2LJ#KXqrQ+gkwg0TukmprogHxWulT6#6WXyLSnIQQRJ1UI+FhUR99ChuLD2qDAEdmPg8QZgLFmTy3JgI7BlrHW5KAEKARVVAX5vu7SQ$4cLD$lxajtJJErIMjnBd6q3BH5JLAFnu$bWQRzhw7Sk3Drom7JA1u++JwAzvUx$RzGRxdPQa4Iug5wStF#DfP3ue4pNtojQl#nWNZRUzFjWDFEJXl1jvqwDG0cTmFhmyM#0zr3BKMtxnVV70DqNfBfrLLxm0T3wh4XRbFiL7oM1nttg7HhJLNk6Bh7jkbtUdEJWFKIcPoHaWW7I1gLvusMtgwMNsBP8fA6ZXECBa7cfdRY8ml4lwVY3i8hV#JfocwNPrZchD$xoTjtqEnUcTEVWG0w0qDKklU$H1HP5upCPvY6vQxb6VEyIXbuM3YnyZThLt+KghuBAn+9cEx3PqexrS6Jd3YDeEDkCjenYdAF+cNvU6kYp5W1geEVq1tcGwG4HKY8fa1DWsMdzCUniJkKXog9kpJ0E$PrW+CD2pAItAmLdutZyv1$7qFr#apZ7W#d+ncNYv3ZI7USnADp70#wEGPIwqhJtBuAsACDsoIdxlWGiKGjLVHtCXkh0np$sqRR9nB25uJGVYg6Hi8kfoxhcaGcMJ8a#wC#XH8gXWjJW9CRNDGLwLAnFtmIW3Uwj10676qaFXvy+R5JrbJCfZ3ASmKSMugn6CtPIpTysZIKDckv9s0HHIlCfanAJoiqms1tAvi5CtrYjanPItyCl8DY4bmXXUvJlVvKYSQZ2ZziNfsXh59I#8MjpTe#q8kjP1DMTu5gBJuwW8paIbREoYYySs0iEgJM6#LC3eCxkl4FL$QB7wCG$3W#IhLPLBa#mMER3GJkBP#VBMz1cr193eGZa8$CssdC7AdjPQs2DZQsMXKseUEkHcbgI+U7g$4aZG0ydIGr3DSEHV+T4brA6JQDzm6ou7HZ42A7g#B9oiRrSjxw5hyoyFmR1lkznnMkJs5+QoR0FsFztAR8amrfF6CxYtRaXWUZkUXYwTaMbKhBnhxyxmwNWo+bDaEoF7YGyIAM0XhCqQ1f72BssahJ$8SZFJYMEl5rEoyZxu0nUGA5dSIg1addi2BNc4P0DV2kMnRguYcZygtNezGJ$+0x+wxeZaToh7U$2lZGI9x2y1$F1EeFGDrIngpTi5TWQes0qyuARcefX0Ink2aIfXaj$rlsGXGtwrJqM3sKEJleZhZ75TA#ohX1J12DKkJkG$RrWfWt0VqrwpWxjyMdADD8nsi6TtmCrdgFRg7gFX9TuB7TlwnETSu1g$ru4NpDzvZK1QdY26G0qEyUsCe9Uhc+xyPd3SQzH6oMPRwqJSnu0mRcdE##liNdfsXCp4Vy7KQNaoPYpRtkHPdwYwMdlSnCH5RxjsVRdoJ6Y0SUIGWFtuCakfvcnCT+jY5m7P6neZqpKeIYYCY7hkSA7qKxuxKqdb3$tv5nR8cJTL58rvSMSInU63RtJubYRpDMqomvuIlYmRZQjW5NGs#eZEYPG+jqH5yjseWYY6rGyzmE4E8+Gem0ERaywQyTpboT6exYp5Wk#Wv6Jxs4h2M6tpWNN45ic8UK+tpkZEsYB5A4L1oG16sGDFQUiCyBo0sjCoVszHMIFeQ46izPCkD$hgRY1BUJKT+0FXERfoy5bW$TMx0XI+91yeG8LSBgfE8RVoLoEDm0xjnZCdwx3sABIqiCrToPLWMbw8o$wiRxhJNgWJ3HHPppTm7GpcqYgPDz0qbNjv$xHecquLuUY2ojhzNJear#SnogVk2NlRyzgJLCviAwR0wasjA2RfjVbxtYTB1YtRZEWhKMqDiYYQJKxg1oqjR1w8pWneHiGmZHISz5btD+kBm01FV#3vJ3rm7FqsZVrk3VXQaylMb5KkqLbWrUZnVpDZbd1FLmRhUQ4LcU1$Q4PTzPalp2zju6zYUmiPEsbFE6Qks4ey9i4GSUav#to4YnpWTz2ccv6Lfoex#9J4mUk7AAX4dFbl7SZ8+gWJD1NhqkChgW6CSoQcPusirXLVKxTp4mqHpaow7TYGH63oK+Fl1Ddso5lTlbH$Xuk3#J1#gMHkeIWkTwhT+qYIhYw5LVQbwE03TDxvZRHdIP#vIYv$TQi1ZHSHiAq2b73SDYsIPvcv5inu6iqWmbpUxzRH#xUMrPa+MtYdGe6RWeijVGXa8UcqnHFfZlKDLIHo4TNDRpp2q8EGbUaeXZYQA7#2viW1Rl1CXLqvEjz2TJe$1wkwDPcZg95xiEnT9X2FR1WG2aE4QR5yRUd6eTlUTI1FLRw6XDlWqq1YprsVLV21VsCBxhGD6RnJ8YAPwipD2Vv6E8zoy+cwc$gQDezhUD$L2N7De+mJIaN5bBFf1n2xAcaYqEAlMINmk9#ro5LupaQA6YS762ZLdRCbQeyB47NZPMmiGAj2dI1oHS3jF2jPImYhqoGD5RKo36pmAa6Fvr6B4k#oIXuZNELUXJ7gAd4scJ+PtTMFlr6noY0QzcASWCgVi$mNJ9D9dcD3TVPm8KG8RYSfNW5yiEvCVQPSwkuBcBVXqoHN0nAlk4qbtg1KzNCv0thL1M3f$q#brFUetgNdIpLdYuM6ECj6pzkR8nV2pLI$$kd3RSw0gzpa0ta4s9GMB98SBrWbMo#4U#RhMlT54as6EaTckmi770EJqSatqvGo+bBsC6SMgNKcdPyMiN1z2M5gkrKg2tC7b6+wxTnxhyTohM6S5rwmiZUc2ctDrNYKHJz7Fmg$L7yxYy5vbA9nS3a3$+hh+pGSM7xdqXk+qTkSiVz41JJ5MNjLeod#KcWzWJB4709KVuAswWTf+MKdzpnro8o1WY52HuyB1XFu0CF0DDjAQmbS+jai4nNWn+5Xmwi3tkc5XSX60U4wPlh+xo41hQZ3urVhf4mwUD0gVrFEkU46hItakUwJ1oNL80EBNx#b07IeRFkQedAsS8NpNQlRYcSQj6WTmtRl6BvdKb9sGvrWDh$awAsueYaeFfJwM1LwEnIx8EcHI5dK90ZA5aAuoWbcDMAtGBtIpCmBhC3ISypz#QjXgNAAQAcXYgBMg0AHABU6q#qASTbEG6hMufFGfwGgPyYdq1PzhtDx9MQ9#gS#+xNYjS9BAdTXTR3usnyrjzbwVQpcpPlN7jJUg1ustob3GTpBjdZpQY3WV0NbrK6G9xkleVYrC0eeb1mibtKFrmKoi8bXftYRasUe7FGER23dCNjb9WoyYUequVPs8I1mmfX0qJyi04sf7E#RH8VUUfA04xdMtWIxmAky3#ph9tt5clIthMJfexofy5Bz8PcKMTY1$UY5u0xXq3CcJv41rLaAT4K1UpQ1T#MS2RNgq#fJKrd8t6JgqkKr6g12rXu+rHsntRqvLXmTl5V$YRJPsEPqndyer$Xdhy$j5MDa3AJB9QTeqn2Lb86EN1kKSmgjCLl9UWkvL64o#SbWAu+HmVRsEXkDuqmg3YCHPiF8S$lhHh8VvQucIjg$aV8N2lHkC#5R0M7gl#tV86qF5wyc7SWnbDJqiQw+ZqiBBnX2Ak9CFPCS6x+u1199T+ufsGqPkjWClEtlVX9LISjhBar+qCH2$K$qn527t7PzFX97EGdaah+3qp+s1XjeVEl5V84wpnme1HQhvxcHluZlcTay9EY1rb$IvszBwHh0i0gT0pi0eUJFw35lCbFSPDUDQtj5T7RoGPyASc6LAMjzaRbKiQfTKzThXoXneFS#iYfcKIbh#eQtfhVlLhgZFXdCmrL5szmBjyan#iH7v1A3AwE3gfUG+AGP82jqcpR3zs#KISmvnw$xoCetoqSuR1ojmG1gW2C2CjZtQMFGhJTF1#NPCREEJk4IPFuR2vWH#WRohlclah+n6PSxTT5cBgnjc#YmZDio$x1z#GImQnHe4aMkmojZPfcHJfIL1JyHg5n5qt3cJm6z#goB6Y1aMaBbGzNpUgNhnjuiuLWdEj5177TNM33kv3Wiz#SjPDUt7UQDxkeF7A5QZfWNbq0pEuQUs82xtrAcq1GStrVWD$bpKgsTTqrM$5YmA0QCgHFErRSfIYj11nMstkE9gDoahXzs3Ss$ixS+cyjyZJRsckAhTIncGcCH#vfgNbX3NCfZwl4rJ2TAbpnTvB$scDLm4w0L2#Y9Ps55DzAVW6htE8KhDsAJXjR#ak$Uvtdqz31liALeZ2SKAFt3vDVB0X4#0ZDkRPLHRjnq4NI7RAMfg2D$eQlPM2sIlYjw8Bp0LR8SISLjBm5MEJguBA6RMGczqqmQKIo+Hc17+igGwVTXzkiwgujEQcPpFiZHDyWgl5pSQANKR9C5Qg8JTTkPxq1M08nWAMzV4##ish639dZNPTJ6Lx2G3pISXMX5Kz8jwrDIEz4j92in$iNq#r3HsDRidCPGFlLAjRe4siqBg6yiy6WkVMtSKoEuLnoIqcamAyV+TanGnUbXCNGQ041ZK$MV1#gUuVF0yN1tvXUW9R7uVWVWRrFj4kwE61ldC+g8gbI2gIeF7FvEQZatIgE38tlM6mkhEcRGw0yUDixDbS#yvBziQnzlWnd9qMy$HySuB4SdcjUW4LomJu+$21$8rlj+DmsxPu5XGqUxlKM5T+LPBBwc#UDEu2ZBZApKqKCITzZb8WbbVEI+YAWD4DA3r0frR6yanShaSCCP4M3av+AhU1w4XKYDyXeq#3QjdqcfB3gw6NHxrr4C#3rrZCyNBeBLMG7mnUqspQKdWmeul+bp+7X5qmL83jq4jyeujjPDg1q23c+kvxYF3kXXhj9c5BJQVPN$exzXJD#ySMSPloam5Tyv4ggJc3hnuelJ2kZXQnIyZceJwd7G#qlx8X06GtsLnk84+TqjJPjM3xclYJcnwoNah5#gycrTp6scATG4aE+z#kWbXrz4ze4S3sj9ExXWDC3qqfmAEsNN0sNN0tfHfFC1yXKE9zc191ivgL3cqvGu9v$f72UUTN5NbS$FM5$oU4+9avrzd0c8l4Hzb$h9loF81odRDUyerrm6Wuu$pDGGp$KxLfGk2dJeY7ZbX3q1NYt9e2prNs5p27spBf61g6Np0J7UiHgGm#jgM+r7vptK2$jqYIPcFoGd3IbM3DyvYrYASGQRW3JJcDeHGsMg#YgwqNs98Zvn7C#83W7n4C1nZijguEqutHh8pYM0NVHwZCqEBSw6kwXzHgVUh#hELLwtPDYArirXkFoJWulR1sKsj0V0nGIRq6QWhWF1MgVUhi3EG9TBcAfa+#IAYgAdY8CMcDx8UZdAHS2Xhege6$VBdjGB3UBBL$DcLEbDGMBjALHdQGE0Xt0QWdWsildAAvIvbqg$eVihqcqv5$rAoh$DsCzaYVzJzzlCqcCzzwaghV0M1iB6YKet8J5gKPijQNede8pZnUh4LqQiDvghBiyS8jPwxuBNoEu9EgNSWcjavG6rcTBNRp4AGPplhqgwdiS35bzyCSjE0E#bdmykrXKRlDrEyY9pHCAd9ev6UjqhkqDKtJCUaSFAq3Zs5UMHxXZNypg3o#XIx$Zvd4D9T+8JygA6wrfWra#BT4MJAfp$vxwadimCoGXcgbspaacpxE$eDBCrUB+LRft2tPzl4tFwF+E$dzTheVAi#kWUFP1gMBAHVgszITGUVc9oz01aXpSK6DYFIkj5EfQBT5P7lIzLjDIiJTuT5zL64tDvpPNNfFaV#N7rDf$Jfka$yDMVoYnc2T6nS0G3kpCQEuNnJwbeib2XvI$Hbn+A08874z09i#pDRzmoAWAN#Gau8jxDhJVqN1hwBQa2ed1s56nC+qPeBD7oFIfMYySL#k5VThop62F7jalxfZf6D5FZ+VrjNXz3UY9axISZtGy37D85AEt+$486Ev$BjgQhaAN9TF0G1E6bUTptBGlgw9Fj9bw$HCBKgSnEfxpqVlxWmpH#i2Fek5LoR7MXqLHUnp06TZ9GkyjNtUG06gtZ#Hp4UwrYDWNofawgqElVJUSPZbSo4se59#jW7elUFYbYKJ+eqzBwtzwKBa2VrfF2Auzri#o9XEJt#20pbZ0BBnXbUBGTabS9qRCMzwV3J8#HuBU0J2cPn03122wlCrw5IjF2mDa3wtPZ7l4AJ7uSvYwPL2V7BF4Zlayz8Izi8yaNnBs$Bg8cyvZ4$BsWsn+Fp5yBXiLagPs+BQ8m1c4x+A5byX7ATwLK9kz8FQr2Q$h2bKSPQvP+cvFj+C5YLk4Ds$Wleznpr7PYX1JbQE6rtWcrP#6TU2Ch1z+l1rQUmvTbUhHsvjNxbc7ge4IHw#DrELgpzC#n5pbfmpu+am55afmVsoXctrRcirUDR4xgNz2ddty0Qddt1zkw+Pg6T6pC8wfpv0U4WmHVCrUngrpVKikfSQ8uszzfPM09biAHhfS46Ik65EVtlL2EaCWfFjBA1Txdam09anQYCq0WbcZCgXzXyipyQoH4m4k9KLBKcVvS+#3rvjt$PitG+$Hbms4Wj$HGnTEn0SaYg6wxSmwH8BalTSN2sBKkVBY5CsyFvpo4x63kxQx++G02taA7X4T3TCCJnxyrvSXRenA4pojvTNK7y42z5V#TMs2g8cZ+dY1PmV0m9pKbgvbEIW3md3B7A02dtqcCg3qNmKtLiDt3za9QFWAu9w22yHLHA5#aBPJgBr5SeFnZ2RMfZQvlLpNnssSwzRr17I2K610i54P1VNVuui9oWdmX#MiE2$r+DCKAaZid0GBt4w9YnRAPPAdJDtAE50MsjzjPshDa$Fs4gtgiVEBzcbeg9C61de##0UWyLoKTCW8ZrAKGifGI5Bf0+TjCqy4GjwddIbnGmYWqHrCZe8ilQvcYIhZuZYavTe8L7GrQiLJ83UG7ZoI2k2gz4mm#Lhd9edIPs+w41x0y3XosDTWe1SimF3iuUmJA1GjUsnnmUa56KcLS1RUIjT#2PadL9+Quj9GnWNfHx#FyJAnCpHpThQi5QcTktewSLFwlhjl144xWcWJpVZ5s7z9$doJX5VAIBF0iEt1mMs7+P9KRi1sGbWwZdTCllGLWkwf9sd#SQbojiZm7pkkrUC4l+l9vvDQviYtoVYkmm4iQXVzYs05L3ptjT1LH82HdxjuP#rKSLLiU#PFvJ4HjZ0HRplwT0FJtBZlHKfqxRbdpFZqN#seUGt0k8b7Z$DyGXPzTBKVFkj7FYQXJxNGZ0EQ3aRzKIRuQpXcj3NyZ35nxKKERQHiaBrBU2ZHAFfXSd2aBD5hVS0AJSE35bE38UYLEkmV3KmHgkemm1RZN2nnoHYPph#aFbjsZyezjy3g9CEPfQdPAqFb0BCWbEcPNrKRXryJXsU0i+s5a83$R7XWp1LrUlLrrpdYawGqlY29Lk5Sf$HS6999KvUvJ$Xvf0n1d7Q4yQT5H1R14FSquj6p6qCW6jL5KpbGecdawy7L8XnDXqo+weWjnsiYK6zWoYkeeKqDIqwt74sREZUl5y6Y7qfSSU$dBxvtoq8zZvPM4#aZSyD$hhmfF7lo92zC3TMP+kBIz5LzfZ8876cp2KxaqT2SkmU6nT2zHA9JtPvPoI4vXAMV354E92tlQB41h6fMuYgTAoYbolAW#GcuSpqdF3IllZzhJ6$lDFf96IQQj+UZclCag5e7+dYiyPDcKBXoL+zNSbCvk1vu17n7Yx+JRy0nP5a9MqBYX2fpPuGuYhbtY5NL5IoczbLswflW5G0KGAA59LqRoas1YLeu6XwdVVmb#p12+zuGSjCfUC$4iX9u+EQXfuLe#T6h05$ALQ1vtNEHaXiqRtm0S$6aCzeewmBbBJdoprw$ekkNui#nK9EEzBjyDZvgkQNIa+6vsJx6ZrFPXLtP$DrSfZmT9cnsAlfGBQoosKtKfiNnFzh3D6CXQb9uaKcueQ8$#bnzvBMJjYne2Yk33Q4RpGqAfC9v8#EIN6dZ#7S1j2gP$l3XoR31Se7NVdhT3MY56h4ukYb6J4+7U5HaoSCDXMRygY#8Z7resT1A9aB+CukA#ZibI8VEzAb#IlDcX6uQLtEAeC5CPl6ksEiG7wau#4JbH8HtiRQZyebdwJUjuMEIboZHGo6oIWlVuitV6e5UpctWpUunW#muU6x096lW#qIj7UoPpCq9PlXpQavS$adY6YFTrPT6U6208dS72a70eKrSe1KVnuFWrTefYq3HT7HWe0611jNcvsMBDzCudq8jhzPkWQVudF9pPBv0rV3znnse+uq55Rrc#mcvLZhaCRKvBfIFfcUkjmKkWt3oJcYgBje+D9Kt0dV80cWQB5MY5GW0Qz$SXZFxChApWAZR9lF5dE#8W4uduVjvkDn#1niZfIr4z1QailRwJWk$RWWB4se3nG4Coh$fnfRF8u11Q$jTpRDqTykg38C5sVDY$5UyqbHW6aK1FFqsumFTiiSStTSHQf0ZV5fJ81gasx1rDZenaSnLW6r6JAcE9zg3txX1R$dEpBzBvdMxrqK8xkvlltpg++YE8xolwsvYmvg#ozVy1t0#74lLSS6l6Epd$hBx4RtqozNq20K5oIH9ou7j6MDUEg7IhUYmcicnoQjIHoBy+wSX#UxaydaTgscYur9uIE17wp6Y#wMn937jGNzWQzvWGh5l4asjpbz1tC5SxRxl4VGWuGYfqBhWUAroURaeHzHRBmXRVHy$qfgeqjcafLjADZf3GS$lQovr8D5xZnuf#CrDu12ja+VigUL#gvijWP8FDGAjuy6WAojrtNna7cHSVyNjaaBKHstdq#SgJSW+ztjYM$De6JIfxtNmMcyA$Yd8tIZ5$Dg72aFAvVk2mZG7k0vfmDCSns97eKx5ud#MlE14WJo$H3aN9Tcg3MYRo$QvWiM2w0dmUxEfdsPvGuJFXSFlb+Jg2dfm2gxl#aqvvZgn8RG5k79Ale90w9e9UJXvdM#vWVXes2l2je90w5$G5Jb6HLmDa#z6JyNjbGiIWRQpgC9H3FycoH#C$GNcBoCouT7zFRauiHn#tASXyS9G7uUTA61jreHXWeTrEziN$YY8bAQ5w$hb9Tqd9U#Ji9dGsGWmi8DK8wXAHqV+Qo#FwZSSawryGywUEYYCmsSDZTAA9vzoxh+W6iAo1pElJQdlr5Rx5LHW8Km4CHLdl+qlb0aJ7AU41NZlRnjz54i8kc3txvVYKxxw5iVDUybs0m9d5wy4RqSt+#JrhfdoUbMutFjh7JGWl1YpL2aE7PsJ11tT7+MRqknfZ7Aqcs5p3JT3S7kr3qAay7hnzjKGEu93lu35qqjeXeQko79aaeT29Jtb+KR8uZl1eRup$2s0V7i6knQIFxvfWlZvHmPGshWcs4fsEnk7j7eIVGnfjQYSSzNm5bzBry3BLY5WuTHhaUx$TaRl2+n4m6I7Y#1KfZeFj0eIab2U1558MnzPmgyIZj1wt944Cb8XucqwkDFKbkakvJ+nE#1cTfq+dX$9XE36ftTkxialYV4baWrKWaPwfRbdiBW5z+eJ+$zFRnWVq40xMVKWcnWsEGqtxR$EaxFtIU1jyf9qgPddWdftargC9PZIqyHVY8$G2xec+AsNzpqfidTWC9C#QpLww0iDtqCuj#+UnEPCFMmXmvC#v$jySU4X830NvbbR7ZTJPcMXE4AizyolugE4C$Mhk1z28mUeCQLhfD8eiwpA8RQ#$MAP+ASyGe7l6urkwpV6HY+grlFVRwZXdAm5BothLclje3LzpYVjNpHwJpZYRlfrlt9XrmmnjneNCnD#FPl9LNoqszWQRaXIjkwKb+TDP4hcNVh9qb7Gi8I40NHERSJGT7pZxcgLNbhPd#HeHCH$IkNe4xJaZy#ZT1xgjDvUFaAQbl3ISdchZkN#ytfmGpAm3eB5IWTqczzakuyLWDYlTvMvAPfx4DAeLn6gbcn+EMj8ij6yQW2u1j4z4$pe9vEf9J9z4idHQL0p4bYN9tRqNLTmcpAgH19BefwItM5qa+B1dBSbk5LyiRf6ej1INAIpIwDn0Xlq0yq8JiuL1z4WPak99G4BdfVt$tcBETnmWcZCGQHaN3tCXNawz7LIPrNuIb1dGPGnjPhnPvLPY#R9EHiCqj+y6apgVak2Bng7trXjdaCYFK+S1jxmWB7rgVsoEdZJwzp0jXUDLKeGWUzou6LV7YM+Sjgr$WDkFNynGwCbwfaULhnMa06v3brZciVXrVUgMrmqlC57qlidZd+X0WRfM2kuJwF9sjdFlbVwVDVW5gd1#EYzykulnx754lGvmZW9FmfXTatQP1t+KtkZk2Yfaw3$PcK5Pinh5xsSlUm8MvIbAQbnth8KC+$+mEU+6oF7W4+Qpvo6n72r$ZgZkTZhhRzcGodZIMM3uJyLrv0Ji64GASx2gfyoS7f1cu0cigUU5GQfbFyr6PClHsCW4RzWVpT2q4Fv292icA9BdAQitHvIjghEtUjcFiufoDuqfM0PB7kqMbTzNjf3r6KRyEIPplyhEBtoUDtVMhLerEWVZCNILGRSVsDzwCDGs66PegE69HiP+jpf#KuAR5MCXEu7KJFME#2xjjQ+N8VeguhMRXdfpXL#JnxxMDn5iK+l5F0G8T7LVyXf+wZVMoV+vphUMs4BM1h6s0Afj5zje0iUAM0$SPQ0sPlyK5z18pWz59BxFtmDJZyKf+LyfdF9Dessb++Nl+d+I0IRDtFRuJPE9+ymrpX4ZuT029Fw1Z3A#xyF8SHdf1hGsV0e+eaCyzuS2G6PfHHBzSGH4tiyF1$A#HhIxhc7veDtRzzkcPtRomV$xDYBIMUrllK8QnLlgrmW308j12RwfP1nLkuGEfA4nwX6s8RZmHqrlLg$4y0rso0c$PExrNwJvrMDmFN4AD0b2QclMSk$5RiHqa595cIPnYiWRJ$v5iDaCHKm6faMdfnNHGDnG5oXzAZfA#xL0UE0E9+egwdR1KYMmXGbaZk6Go3YDFj8dTqlTUSU#7C$t0e2hyTYiQwXXQjpEZmSNdJtldnG2yozy8WkjDxyGk3uVJV$GvHsMo0cRGWD$SwGU2$VnpnuKadBP4+5g3DhSS#34xd#yqe9bEmxltTT3DCbUNFTRLdgDUp5BouCD6G5mHk7wA1bSQu1wfAGQZfsd15Ux0t9NLbzRe017yGdeQjeH+ChfdPw8R68NjLtKuopnl4z#E+f5SFdbVUFVWfSHUW3m+si070xUGXMav6QFg9p5yHtPgQlq$s4GfSBNnRWfhm8mZLjNaqasSwXtu8sCGiu3qLZanRaJNBbDXqQBuZdPyj8azEWYNVC9vo#YsVyLfo7ZMC2AMEX8td3BGSgzfCtPWTqdGSLw+RwwVXK5BhIQUIxCRdXQZe#BejEFe9FIm+bmm3BdLw0R$Mty0Ue7BeNR2P0wYXcvWe5vIWz8La2Jazv#2+D+77+qafvfX$9i9K17$tuot2n1BKeJM9S$lNqSbI3zJnbeQG#i1JLXCn$fJ5m4W2+LF$Akj$#GCvhcG5lW9k#tpENsUk2ynaw7UyzSbaD7WCabWVDbBe7no2YsX9ijlJexhi7mW1lo+w6di7bxSbZuWyCTbLd7Dp2DptkE6zhL7wtJ$Ui9iJ$4Z$kZNdSK8KFBv12h6y49P$cuf65IRfUEL61hm1nN7Ahr#cwtmyEbWfXs0m2GWrUNLtdL0+1C$phFxtiN7Hr2G62iW1iI2xXun3hE02n0q4fNc3dh7vZdjbC9rBxNsI2skk2gvXcznbjCM3qHTm7lCWMsQm2i21k57Ib2RCbYNvYuTiy1PaJxvEIf3TKpUywzdgHUKvGUv4kP7uUYM5SbmQj7Dp2Pds6e2aEx$PyKN9+y69qEPryG1$xm1e29V121wev+9bRfzn$F$dsv#L58MDFF6zcvuT+oS889#0fnrMmc+wf39C76Nkzn190x5dzv3jN7$3goo+$8r6Xj9$9zK19D52z4uu3rwhv3vCZ92y49e6fr7jqlhMffu6s15V+9ch7Ws79SeF#79v$cPPybWdta3rzpp7Vl9+f+9Ir$ubBV+xe9sMNH$nliuyFb$$pvz1734Zfb$nhHVe+e3WXc43$lveepR$+h+P3bHn7b4Zuf$qPz1z+84Mb3nnXiN$x$bf#PHXiveXNldY3tmUyr3rFxBtY+PC8lzIw23AaDc3q0t$MUcrSUygFhno0Ki18uCAH1jaUcv4plLKFjeJkBISwcVbdbl#zl9jCkyyW#G$4sDrVSTLKtrEhRDqzJ8lvVHqJwXd9U1oCdXfL3Eggj#ul2SiDWy9G2DY2zibZTbB8W9Jld5iyRXr5ngTKSa#4+WmoRQbKTS$i+X#X5aWgnjgJVCZdr5NAZdP1WjA3lJ+u10mgcul6LTgldHdKULe1ntKWcEpQT7T#jcxnzzRCtztw00ojx$8LpbzCEpHIAAA=',I=window.DecompressionStream,C=(b,t,d,a)=>(a=atob(b.replace(/\$/g,'/').replace(/#/g,'O')).split('').map(x=>x.charCodeAt(0)),d=I?new Response(new Blob([new Uint8Array(a)]).stream().pipeThrough(new I('gzip'))):(new Zlib.Gunzip(a)).decompress())&&(I?t?d.arrayBuffer():d.text():t?d:new self.TextDecoder('utf-8').decode(d));(I?new Promise(a=>a()):fetch('https://r2.micr.io/gunzip.min.js').then(r=>r.text()).then(js=>Function(js)())).then(()=>(function(){const [_c,_u,_b]=arguments,_css=document.createElement('style');
22
22
  _css.className='micrio-interface';_css.textContent=_c;
23
23
  document.head.insertBefore(_css,document.head.firstChild);
24
- var __defProp=Object.defineProperty,__defNormalProp=(t,e,i)=>e in t?__defProp(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,__publicField=(t,e,i)=>__defNormalProp(t,"symbol"!=typeof e?e+"":e,i);!function(){"use strict";function t(){}const e=t=>t;function i(t,e){for(const i in e)t[i]=e[i];return t}function n(t){return t()}function s(){return Object.create(null)}function r(t){t.forEach(n)}function o(t){return"function"==typeof t}function a(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}let l;function c(t,e){return t===e||(l||(l=document.createElement("a")),l.href=e,t===l.href)}function d(e,...i){if(null==e){for(const t of i)t(void 0);return t}const n=e.subscribe(...i);return n.unsubscribe?()=>n.unsubscribe():n}function u(t){let e;return d(t,(t=>e=t))(),e}function h(t,e,i){t.$$.on_destroy.push(d(e,i))}function m(t,e,i,n){if(t){const s=p(t,e,i,n);return t[0](s)}}function p(t,e,n,s){return t[1]&&s?i(n.ctx.slice(),t[1](s(e))):n.ctx}function f(t,e,i,n){if(t[2]&&n){const s=t[2](n(i));if(void 0===e.dirty)return s;if("object"==typeof s){const t=[],i=Math.max(e.dirty.length,s.length);for(let n=0;n<i;n+=1)t[n]=e.dirty[n]|s[n];return t}return e.dirty|s}return e.dirty}function g(t,e,i,n,s,r){if(s){const o=p(e,i,n,r);t.p(o,s)}}function v(t){if(t.ctx.length>32){const e=[],i=t.ctx.length/32;for(let t=0;t<i;t++)e[t]=-1;return e}return-1}function $(t){return null==t?"":t}function w(t){const e="string"==typeof t&&t.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return e?[parseFloat(e[1]),e[2]||"px"]:[t,"px"]}const y="undefined"!=typeof window;let b=y?()=>window.performance.now():()=>Date.now(),k=y?t=>requestAnimationFrame(t):t;const T=new Set;function x(t){T.forEach((e=>{e.c(t)||(T.delete(e),e.f())})),0!==T.size&&k(x)}function _(t){let e;return 0===T.size&&k(x),{promise:new Promise((i=>{T.add(e={c:t,f:i})})),abort(){T.delete(e)}}}const E="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function S(t,e){t.appendChild(e)}function M(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}function A(t){const e=N("style");return e.textContent="/* empty */",function(t,e){S(t.head||t,e),e.sheet}(M(t),e),e.sheet}function I(t,e,i){t.insertBefore(e,i||null)}function L(t){t.parentNode&&t.parentNode.removeChild(t)}function P(t,e){for(let i=0;i<t.length;i+=1)t[i]&&t[i].d(e)}function N(t){return document.createElement(t)}function C(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function z(t){return document.createTextNode(t)}function D(){return z(" ")}function O(){return z("")}function R(t,e,i,n){return t.addEventListener(e,i,n),()=>t.removeEventListener(e,i,n)}function F(t){return function(e){return e.preventDefault(),t.call(this,e)}}function U(t){return function(e){return e.stopPropagation(),t.call(this,e)}}function V(t,e,i){null==i?t.removeAttribute(e):t.getAttribute(e)!==i&&t.setAttribute(e,i)}const B=["width","height"];function q(t,e){const i=Object.getOwnPropertyDescriptors(t.__proto__);for(const n in e)null==e[n]?t.removeAttribute(n):"style"===n?t.style.cssText=e[n]:"__value"===n?t.value=t[n]=e[n]:i[n]&&i[n].set&&-1===B.indexOf(n)?t[n]=e[n]:V(t,n,e[n])}function W(t,e){Object.keys(e).forEach((i=>{X(t,i,e[i])}))}function X(t,e,i){const n=e.toLowerCase();n in t?t[n]="boolean"==typeof t[n]&&""===i||i:e in t?t[e]="boolean"==typeof t[e]&&""===i||i:V(t,e,i)}function G(t){return/-/.test(t)?W:q}function Y(t,e){e=""+e,t.data!==e&&(t.data=e)}function j(t,e,i,n){null==i?t.style.removeProperty(e):t.style.setProperty(e,i,"")}function H(t,e,i){t.classList.toggle(e,!!i)}function Z(t,e,{bubbles:i=!1,cancelable:n=!1}={}){return new CustomEvent(t,{detail:e,bubbles:i,cancelable:n})}class K{constructor(t=!1){__publicField(this,"is_svg",!1),__publicField(this,"e"),__publicField(this,"n"),__publicField(this,"t"),__publicField(this,"a"),this.is_svg=t,this.e=this.n=null}c(t){this.h(t)}m(t,e,i=null){this.e||(this.is_svg?this.e=C(e.nodeName):this.e=N(11===e.nodeType?"TEMPLATE":e.nodeName),this.t="TEMPLATE"!==e.tagName?e:e.content,this.c(t)),this.i(i)}h(t){this.e.innerHTML=t,this.n=Array.from("TEMPLATE"===this.e.nodeName?this.e.content.childNodes:this.e.childNodes)}i(t){for(let e=0;e<this.n.length;e+=1)I(this.t,this.n[e],t)}p(t){this.d(),this.h(t),this.i(this.a)}d(){this.n.forEach(L)}}const J=new Map;let Q,tt=0;function et(t,e,i,n,s,r,o,a=0){const l=16.666/n;let c="{\n";for(let g=0;g<=1;g+=l){const t=e+(i-e)*r(g);c+=100*g+`%{${o(t,1-t)}}\n`}const d=c+`100% {${o(i,1-i)}}\n}`,u=`__svelte_${function(t){let e=5381,i=t.length;for(;i--;)e=(e<<5)-e^t.charCodeAt(i);return e>>>0}(d)}_${a}`,h=M(t),{stylesheet:m,rules:p}=J.get(h)||function(t,e){const i={stylesheet:A(e),rules:{}};return J.set(t,i),i}(h,t);p[u]||(p[u]=!0,m.insertRule(`@keyframes ${u} ${d}`,m.cssRules.length));const f=t.style.animation||"";return t.style.animation=`${f?`${f}, `:""}${u} ${n}ms linear ${s}ms 1 both`,tt+=1,u}function it(t,e){const i=(t.style.animation||"").split(", "),n=i.filter(e?t=>t.indexOf(e)<0:t=>-1===t.indexOf("__svelte")),s=i.length-n.length;s&&(t.style.animation=n.join(", "),tt-=s,tt||k((()=>{tt||(J.forEach((t=>{const{ownerNode:e}=t.stylesheet;e&&L(e)})),J.clear())})))}function nt(t){Q=t}function st(){if(!Q)throw new Error("Function called outside component initialization");return Q}function rt(t){st().$$.on_mount.push(t)}function ot(){const t=st();return(e,i,{cancelable:n=!1}={})=>{const s=t.$$.callbacks[e];if(s){const r=Z(e,i,{cancelable:n});return s.slice().forEach((e=>{e.call(t,r)})),!r.defaultPrevented}return!0}}function at(t,e){return st().$$.context.set(t,e),e}function lt(t){return st().$$.context.get(t)}function ct(t,e){const i=t.$$.callbacks[e.type];i&&i.slice().forEach((t=>t.call(this,e)))}const dt=[],ut=[];let ht=[];const mt=[],pt=Promise.resolve();let ft=!1;function gt(){ft||(ft=!0,pt.then(Tt))}function vt(){return gt(),pt}function $t(t){ht.push(t)}function wt(t){mt.push(t)}const yt=new Set;let bt,kt=0;function Tt(){if(0!==kt)return;const t=Q;do{try{for(;kt<dt.length;){const t=dt[kt];kt++,nt(t),xt(t.$$)}}catch(e){throw dt.length=0,kt=0,e}for(nt(null),dt.length=0,kt=0;ut.length;)ut.pop()();for(let t=0;t<ht.length;t+=1){const e=ht[t];yt.has(e)||(yt.add(e),e())}ht.length=0}while(dt.length);for(;mt.length;)mt.pop()();ft=!1,yt.clear(),nt(t)}function xt(t){if(null!==t.fragment){t.update(),r(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach($t)}}function _t(){return bt||(bt=Promise.resolve(),bt.then((()=>{bt=null}))),bt}function Et(t,e,i){t.dispatchEvent(Z(`${e?"intro":"outro"}${i}`))}const St=new Set;let Mt;function At(){Mt={r:0,c:[],p:Mt}}function It(){Mt.r||r(Mt.c),Mt=Mt.p}function Lt(t,e){t&&t.i&&(St.delete(t),t.i(e))}function Pt(t,e,i,n){if(t&&t.o){if(St.has(t))return;St.add(t),Mt.c.push((()=>{St.delete(t),n&&(i&&t.d(1),n())})),t.o(e)}else n&&n()}const Nt={duration:0};function Ct(i,n,s){const r={direction:"in"};let a,l,c=n(i,s,r),d=!1,u=0;function h(){a&&it(i,a)}function m(){const{delay:n=0,duration:s=300,easing:r=e,tick:o=t,css:m}=c||Nt;m&&(a=et(i,0,1,s,n,r,m,u++)),o(0,1);const p=b()+n,f=p+s;l&&l.abort(),d=!0,$t((()=>Et(i,!0,"start"))),l=_((t=>{if(d){if(t>=f)return o(1,0),Et(i,!0,"end"),h(),d=!1;if(t>=p){const e=r((t-p)/s);o(e,1-e)}}return d}))}let p=!1;return{start(){p||(p=!0,it(i),o(c)?(c=c(r),_t().then(m)):m())},invalidate(){p=!1},end(){d&&(h(),d=!1)}}}function zt(i,n,s,a){let l,c=n(i,s,{direction:"both"}),d=a?0:1,u=null,h=null,m=null;function p(){m&&it(i,m)}function f(t,e){const i=t.b-d;return e*=Math.abs(i),{a:d,b:t.b,d:i,duration:e,start:t.start,end:t.start+e,group:t.group}}function g(n){const{delay:s=0,duration:o=300,easing:a=e,tick:g=t,css:v}=c||Nt,$={start:b()+s,b:n};n||($.group=Mt,Mt.r+=1),"inert"in i&&(n?void 0!==l&&(i.inert=l):(l=i.inert,i.inert=!0)),u||h?h=$:(v&&(p(),m=et(i,d,n,o,s,a,v)),n&&g(0,1),u=f($,o),$t((()=>Et(i,n,"start"))),_((t=>{if(h&&t>h.start&&(u=f(h,o),h=null,Et(i,u.b,"start"),v&&(p(),m=et(i,d,u.b,u.duration,0,a,c.css))),u)if(t>=u.end)g(d=u.b,1-d),Et(i,u.b,"end"),h||(u.b?p():--u.group.r||r(u.group.c)),u=null;else if(t>=u.start){const e=t-u.start;d=u.a+u.d*a(e/u.duration),g(d,1-d)}return!(!u&&!h)})))}return{run(t){o(c)?_t().then((()=>{c=c({direction:t?"in":"out"}),g(t)})):g(t)},end(){p(),u=h=null}}}function Dt(t){return void 0!==(null==t?void 0:t.length)?t:Array.from(t)}function Ot(t,e){t.d(1),e.delete(t.key)}function Rt(t,e){Pt(t,1,1,(()=>{e.delete(t.key)}))}function Ft(t,e,i,n,s,o,a,l,c,d,u,h){let m=t.length,p=o.length,f=m;const g={};for(;f--;)g[t[f].key]=f;const v=[],$=new Map,w=new Map,y=[];for(f=p;f--;){const t=h(s,o,f),n=i(t);let r=a.get(n);r?y.push((()=>r.p(t,e))):(r=d(n,t),r.c()),$.set(n,v[f]=r),n in g&&w.set(n,Math.abs(f-g[n]))}const b=new Set,k=new Set;function T(t){Lt(t,1),t.m(l,u),a.set(t.key,t),u=t.first,p--}for(;m&&p;){const e=v[p-1],i=t[m-1],n=e.key,s=i.key;e===i?(u=e.first,m--,p--):$.has(s)?!a.has(n)||b.has(n)?T(e):k.has(s)?m--:w.get(n)>w.get(s)?(k.add(n),T(e)):(b.add(s),m--):(c(i,a),m--)}for(;m--;){const e=t[m];$.has(e.key)||c(e,a)}for(;p;)T(v[p-1]);return r(y),v}function Ut(t,e){const i={},n={},s={$$scope:1};let r=t.length;for(;r--;){const o=t[r],a=e[r];if(a){for(const t in o)t in a||(n[t]=1);for(const t in a)s[t]||(i[t]=a[t],s[t]=1);t[r]=a}else for(const t in o)s[t]=1}for(const o in n)o in i||(i[o]=void 0);return i}function Vt(t){return"object"==typeof t&&null!==t?t:{}}function Bt(t,e,i){const n=t.$$.props[e];void 0!==n&&(t.$$.bound[n]=i,i(t.$$.ctx[n]))}function qt(t){t&&t.c()}function Wt(t,e,i){const{fragment:s,after_update:a}=t.$$;s&&s.m(e,i),$t((()=>{const e=t.$$.on_mount.map(n).filter(o);t.$$.on_destroy?t.$$.on_destroy.push(...e):r(e),t.$$.on_mount=[]})),a.forEach($t)}function Xt(t,e){const i=t.$$;null!==i.fragment&&(!function(t){const e=[],i=[];ht.forEach((n=>-1===t.indexOf(n)?e.push(n):i.push(n))),i.forEach((t=>t())),ht=e}(i.after_update),r(i.on_destroy),i.fragment&&i.fragment.d(e),i.on_destroy=i.fragment=null,i.ctx=[])}function Gt(e,i,n,o,a,l,c=null,d=[-1]){const u=Q;nt(e);const h=e.$$={fragment:null,ctx:[],props:l,update:t,not_equal:a,bound:s(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(i.context||(u?u.$$.context:[])),callbacks:s(),dirty:d,skip_bound:!1,root:i.target||u.$$.root};c&&c(h.root);let m=!1;if(h.ctx=n?n(e,i.props||{},((t,i,...n)=>{const s=n.length?n[0]:i;return h.ctx&&a(h.ctx[t],h.ctx[t]=s)&&(!h.skip_bound&&h.bound[t]&&h.bound[t](s),m&&function(t,e){-1===t.$$.dirty[0]&&(dt.push(t),gt(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}(e,t)),i})):[],h.update(),m=!0,r(h.before_update),h.fragment=!!o&&o(h.ctx),i.target){if(i.hydrate){const t=(p=i.target,Array.from(p.childNodes));h.fragment&&h.fragment.l(t),t.forEach(L)}else h.fragment&&h.fragment.c();i.intro&&Lt(e.$$.fragment),Wt(e,i.target,i.anchor),Tt()}var p;nt(u)}class Yt{constructor(){__publicField(this,"$$"),__publicField(this,"$$set")}$destroy(){Xt(this,1),this.$destroy=t}$on(e,i){if(!o(i))return t;const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(i),()=>{const t=n.indexOf(i);-1!==t&&n.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}"undefined"!=typeof window&&(window.__svelte||(window.__svelte={v:new Set})).v.add("4");const jt=[];function Ht(e,i=t){let n;const s=new Set;function r(t){if(a(e,t)&&(e=t,n)){const t=!jt.length;for(const i of s)i[1](),jt.push(i,e);if(t){for(let t=0;t<jt.length;t+=2)jt[t][0](jt[t+1]);jt.length=0}}}function o(t){r(t(e))}return{set:r,update:o,subscribe:function(a,l=t){const c=[a,l];return s.add(c),1===s.size&&(n=i(r,o)||t),a(e),()=>{s.delete(c),0===s.size&&n&&(n(),n=null)}}}}const Zt=(t,e)=>Math.sqrt(t*t+e*e),Kt=(t,e=1)=>(t%e+e)%e,Jt=()=>Qt()+Qt()+"-"+Qt()+"-"+Qt()+"-"+Qt()+"-"+Qt()+Qt()+Qt(),Qt=()=>Math.floor(65536*(1+Math.random())).toString(16).substring(1),te=t=>new Promise((e=>t?setTimeout(e,t):e())),ee=navigator.userAgent,ie={iOS:/ipad|iphone|ipod/i.test(ee),firefox:/firefox/i.test(ee),OSX:/macintosh/i.test(ee)&&/os\ x/i.test(ee),hasTouch:"TouchEvent"in self,safari:!1};function ne(t,e,i={}){for(let n in t)t[n]&&null!=t[n].constructor&&"Object"==t[n].constructor.name?(e[n]&&"object"==typeof e[n]||(e[n]={}),ne(t[n],e[n],i)):i.mergeArrays&&e[n]instanceof Array&&t[n]instanceof Array?e[n].push(...t[n]):i.noOverwrite&&n in e||(e[n]=t[n]);return e}ie.safari=(ie.OSX||ie.iOS)&&(/safari/i.test(ee)||/instagram/i.test(ee))&&!/chrome/i.test(ee),ie.OSX&&ie.safari&&"TouchEvent"in self&&(ie.iOS=!0,ie.OSX=!1);const se=t=>{if(void 0===t)return t;t=(t=t.replace(/^\s+|\s+$/g,"")).toLowerCase();const e="àáäâèéëêìíïîòóöôùúüûñç·/_,:;";for(var i=0;i<28;i++)t=t.replace(new RegExp(e.charAt(i),"g"),"aaaaeeeeiiiioooouuuunc------".charAt(i));return t=t.replace(/[^a-z0-9 -]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-")},re=[],oe=(t,e,i)=>new Promise(((n,s)=>{if(i||re.indexOf(t)>=0)return n();const r=document.createElement("script"),o=()=>{re.push(t),n()};e?self[e]=o:r.onload=o,r.onerror=()=>s&&s(),r.async=!0,r.defer=!0,self.crossOriginIsolated&&(r.crossOrigin="anonymous"),r.src=t,document.head.appendChild(r)}));function ae(t){const e=t<0;e&&(t*=-1);let i=[0,0,Math.ceil(t)];for(let n of[0,1])for(;i[2-n]>=60&&(i[2-n]-=60,++i[1-n]););return(e?"-":"")+i.filter(((t,e)=>e>0||t)).map(((t,e)=>(t<10&&e?"0":"")+t)).join(":")}const le=(t,e={})=>new Promise((i=>{let n,s=!0;n=t.subscribe((t=>{s&&e.allowUndefined&&void 0===t||(s=!1,(void 0!==e.targetValue?t===e.targetValue:e.allowUndefined||void 0!==t)&&(n?n():vt().then((()=>n())),i(t)))}))})),ce=new Map,de=new Map,ue=async(t,e)=>{if(ce.has(t))return ce.get(t);if(de.has(t))return de.get(t);const i=fetch(t+(e?"?"+Math.random():"")).then((async t=>{if(200==t.status)return t.json();throw await t.text()})).then((e=>(ce.set(t,e),de.delete(t),e)));return de.set(t,i),i},he=t=>"MICRIO_DATA"in self?(null==self?void 0:self.MICRIO_DATA).find((e=>e[0]==t)):void 0,me=(t,e,i)=>{var n;const s=null==(n=he(t))?void 0:n[1];return s?Promise.resolve(s):ue(`${e??"https://i.micr.io/"}${t}/info.json`,i).then((t=>(t&&("Height"in t&&(t.height=t.Height,t.version=1,t.tileSize=512),"Width"in t&&(t.width=t.Width)),ge(t),t)))},pe={"micrio-cdn.azureedge.net":"micrio.vangoghmuseum.nl/micrio","micrio-cdn.vangoghmuseum.nl":"micrio.vangoghmuseum.nl/micrio","rijks-micrio.azureedge.net":"micrio.rijksmuseum.nl"},fe=t=>{if(t instanceof Object&&"fileUrl"in t&&!t.src&&(t.src=t.fileUrl),null==t?void 0:t.src)for(let e in pe)t.src.includes(e)&&(t.src=t.src.replace(e,pe[e]))},ge=t=>{var e,i,n,s,r,o,a,l;t&&(fe(null==(e=t.organisation)?void 0:e.logo),fe(null==(n=null==(i=t.settings)?void 0:i._markers)?void 0:n.markerIcon),null==(o=null==(r=null==(s=t.settings)?void 0:s._markers)?void 0:r.customIcons)||o.forEach(fe),fe(null==(l=null==(a=t.settings)?void 0:a._360)?void 0:l.video))},ve=t=>{var e;fe(t.image),null==(e=t.children)||e.forEach(ve)},$e=(t,e,i)=>{var n,s,r,o;t.data||(t.data={}),t.id||(t.id=Jt()),t.tags||(t.tags=[]),"type"in t||(t.type="default"),t.popupType||(t.popupType="popup"),"string"==typeof t.data.icon&&(t.data.icon={title:"",size:0,uploaded:0,width:-1,height:-1,src:t.data.icon}),null==(n=t.images)||n.forEach(fe),fe(t.positionalAudio),fe(null==(s=t.data)?void 0:s.icon),Object.values(t.i18n??{}).forEach((t=>fe(t.audio)));const a="embedImages"in t?t.embedImages:void 0;a&&a.forEach((t=>fe(t)));const l=null==(o=null==(r=t.data)?void 0:r._meta)?void 0:o.secondary;l&&(t.data.micrioSplitLink=l),i&&"class"in t&&t.tags.push(...t.class.split(" ").map((t=>t.trim())).filter((e=>!!e&&!t.tags.includes(e)))),t.tags.includes("default")&&(t.type="default"),e&&t.view&&t.view[2]<t.view[0]&&t.view[2]++};async function we(t,e,i,n){if(!("steps"in e)||e.stepInfo)return;let s=e.steps.map((t=>t.split(",")[1])).filter((e=>!!e&&e!=t.id));s=s.filter(((t,e)=>s.indexOf(t)==e));const r=await Promise.all(s.map((e=>ue(t.dataPath+(t.isV5?e+"/data/pub.json":e+"/data."+i+".json")))));r.forEach((e=>{var i;return null==(i=null==e?void 0:e.markers)?void 0:i.forEach((e=>$e(e,t.is360,!t.isV5)))})),fe(e.image);let o=-1;const a=[];e.stepInfo=e.steps.map(((e,l)=>{var c,d,u,h,m,p,f,g,v,$;const[w,y]=e.split(","),b=r[s.indexOf(y)]??n,k=null==(c=null==b?void 0:b.markers)?void 0:c.find((t=>t.id==w)),T=(null==(d=null==k?void 0:k.i18n)?void 0:d[i])??k;(null==T?void 0:T.title)&&(o=l);const x=(null==k?void 0:k.videoTour)?"timeline"in k.videoTour?k:(null==(u=k.videoTour.i18n)?void 0:u[i])??void 0:void 0;return fe(null==x?void 0:x.audio),fe(null==x?void 0:x.subtitle),k||(console.warn(`[Micrio] Warning: tour step ${l+1} with id [${w}] not found! Removing it from the tour`),a.push(l)),fe(null==T?void 0:T.audio),k?{markerId:w,marker:k,micrioId:y||t.id,duration:Number((null==x?void 0:x.duration)||(null==(h=null==T?void 0:T.audio)?void 0:h.duration)||0),startView:(null==(m=null==x?void 0:x.timeline)?void 0:m.length)?x.timeline[0].rect:null==k?void 0:k.view,imageHasOtherMarkers:!!y&&!!(null==(p=null==b?void 0:b.markers)?void 0:p.find((t=>t.id!=w&&!t.noMarker))),gridView:!(!(null==(g=null==(f=k.data)?void 0:f._meta)?void 0:g.gridView)&&!(null==($=null==(v=k.data)?void 0:v._meta)?void 0:$.gridAction)),chapter:o}:void 0})).filter((t=>"object"==typeof t)),a.reverse().forEach((t=>e.steps.splice(t,1))),e.initialStep=0,e.duration=e.stepInfo.reduce(((t,e)=>t+(e.duration||0)),0)}const ye=t=>{let e=t.charCodeAt(0),i=e<91;return(e-=i?65:97)-(e>7?1:0)+(i?24:e>10?-1:0)},be=t=>6==t.length||7==t.length;function ke(t,e){var i,n,s,r;const o=t.$current;if(!o)return;const a=null==(i=t.spaceData)?void 0:i.images.find((t=>t.id==o.id)),l=null==(n=t.spaceData)?void 0:n.images.find((t=>t.id==e));if(!a||!l)return;const c=[(l.x??.5)-(a.x??.5),(a.y??.5)-(l.y??.5),(l.z??.5)-(a.z??.5)];let d=c[0]*c[0]+c[1]*c[1]+c[2]*c[2];d>0&&(d=1/Math.sqrt(d));const u=[c[0]*d,c[1]*d,c[2]*d],h=.5-((null==(r=null==(s=o.$settings)?void 0:s._360)?void 0:r.trueNorth)??.5),m=Kt(Math.atan2(-u[0],u[2])/Math.PI/2);return{v:c,vN:u,directionX:m,vector:{direction:m%1-h,distanceX:Math.max(0,Math.min(.4,Math.sqrt(u[0]*u[0]+u[2]*u[2]))),distanceY:-c[1]}}}const Te=t=>!(!(null==t?void 0:t.canPlayType("application/vnd.apple.mpegurl"))&&!(null==t?void 0:t.canPlayType("application/x-mpegURL")));function xe(t){const e=t-1;return e*e*e+1}function _e(t,{delay:i=0,duration:n=400,easing:s=e}={}){const r=+getComputedStyle(t).opacity;return{delay:i,duration:n,easing:s,css:t=>"opacity: "+t*r}}function Ee(t,{delay:e=0,duration:i=400,easing:n=xe,x:s=0,y:r=0,opacity:o=0}={}){const a=getComputedStyle(t),l=+a.opacity,c="none"===a.transform?"":a.transform,d=l*(1-o),[u,h]=w(s),[m,p]=w(r);return{delay:e,duration:i,easing:n,css:(t,e)=>`\n\t\t\ttransform: ${c} translate(${(1-t)*u}${h}, ${(1-t)*m}${p});\n\t\t\topacity: ${l-d*e}`}}function Se(t){let e,i,n;return{c(){e=N("a"),V(e,"rel","noopener"),V(e,"href","https://micr.io/"),V(e,"title","Powered by Micrio"),V(e,"aria-label","Micrio homepage"),V(e,"target",t[4]),V(e,"class","micrio-logo"),H(e,"loading",t[0])},m(t,i){I(t,e,i),n=!0},p(t,i){(!n||1&i)&&H(e,"loading",t[0])},i(t){n||(t&&$t((()=>{n&&(i||(i=zt(e,_e,{duration:200},!0)),i.run(1))})),n=!0)},o(t){t&&(i||(i=zt(e,_e,{duration:200},!1)),i.run(0)),n=!1},d(t){t&&L(e),t&&i&&i.end()}}}function Me(t){let e,i=!t[1]&&Se(t);return{c(){i&&i.c(),e=O()},m(t,n){i&&i.m(t,n),I(t,e,n)},p(t,[n]){t[1]?i&&(At(),Pt(i,1,1,(()=>{i=null})),It()):i?(i.p(t,n),2&n&&Lt(i,1)):(i=Se(t),i.c(),Lt(i,1),i.m(e.parentNode,e))},i(t){Lt(i)},o(t){Pt(i)},d(t){t&&L(e),i&&i.d(t)}}}function Ae(t,e,i){let n,s,r;const o=lt("micrio"),{tour:a,marker:l}=o.state;h(t,a,(t=>i(6,r=t))),h(t,l,(t=>i(5,s=t)));const c=/micr\.io/.test(location.origin)&&self.parent==self?void 0:"_blank";let d,u=!1;return rt((()=>o.loading.subscribe((t=>{clearTimeout(d),t?u||(d=setTimeout((()=>i(0,u=!0)),750)):i(0,u=!1)})))),t.$$.update=()=>{96&t.$$.dirty&&i(1,n=!!r||!!s)},[u,n,a,l,c,s,r]}class Ie extends Yt{constructor(t){super(),Gt(this,t,Ae,Me,a,{})}}function Le(t){let e,i,n,s,r,o,a,l;return{c(){e=N("a"),i=N("img"),c(i.src,n=Ne(t[0].logo))||V(i,"src",n),V(i,"alt","Logo"),V(i,"class","micrio-logo-org"),V(e,"rel","noopener"),V(e,"href",s=t[0].href??"#"),V(e,"title",r=t[0].name),V(e,"aria-label",o=t[0].name+" homepage"),V(e,"target","_blank"),V(e,"class","micrio-logo-org")},m(t,n){I(t,e,n),S(e,i),l=!0},p(t,a){(!l||1&a&&!c(i.src,n=Ne(t[0].logo)))&&V(i,"src",n),(!l||1&a&&s!==(s=t[0].href??"#"))&&V(e,"href",s),(!l||1&a&&r!==(r=t[0].name))&&V(e,"title",r),(!l||1&a&&o!==(o=t[0].name+" homepage"))&&V(e,"aria-label",o)},i(t){l||(t&&$t((()=>{l&&(a||(a=zt(e,_e,{duration:200},!0)),a.run(1))})),l=!0)},o(t){t&&(a||(a=zt(e,_e,{duration:200},!1)),a.run(0)),l=!1},d(t){t&&L(e),t&&a&&a.end()}}}function Pe(t){let e,i=!t[1]&&t[0].logo&&Le(t);return{c(){i&&i.c(),e=O()},m(t,n){i&&i.m(t,n),I(t,e,n)},p(t,[n]){!t[1]&&t[0].logo?i?(i.p(t,n),3&n&&Lt(i,1)):(i=Le(t),i.c(),Lt(i,1),i.m(e.parentNode,e)):i&&(At(),Pt(i,1,1,(()=>{i=null})),It())},i(t){Lt(i)},o(t){Pt(i)},d(t){t&&L(e),i&&i.d(t)}}}function Ne(t){if("string"==typeof t)return t;let e=0,i=Math.max(t.width,t.height);for(;i>1024;)e++,i/=2;return t.micrioId&&t.width>1024?"https://r2.micr.io/"+t.micrioId+"/"+e+"/0-0."+(t.isPng?"png":t.isWebP?"webp":"jpg"):t.src}function Ce(t,e,i){let n,s,r,o,{organisation:a}=e;const l=lt("micrio"),{tour:c,marker:d,popover:u}=l.state;return h(t,c,(t=>i(7,o=t))),h(t,d,(t=>i(6,r=t))),h(t,u,(t=>i(5,s=t))),t.$$set=t=>{"organisation"in t&&i(0,a=t.organisation)},t.$$.update=()=>{224&t.$$.dirty&&i(1,n=!!o||!!r||!!s)},[a,n,c,d,u,s,r,o]}class ze extends Yt{constructor(t){super(),Gt(this,t,Ce,Pe,a,{organisation:0})}}const De={en:{close:"Close",zoomIn:"Zoom in",zoomOut:"Zoom out",fullscreenToggle:"Toggle fullscreen",switchLanguage:"Switch language",share:"Share",audioMute:"Mute audio",audioUnmute:"Unmute audio",closeMarker:"Close this marker",tourStepNext:"Next step",tourStepPrev:"Previous step",tourStop:"Stop this tour",minimize:"Minimize",play:"Play",pause:"Pause",stop:"Stop",subtitlesToggle:"Toggle subtitles",galleryPrev:"Previous image",galleryNext:"Next image",menuToggle:"Toggle menu",waypointFollow:"Go this way"},nl:{close:"Sluit",zoomIn:"Zoom in",zoomOut:"Zoom uit",fullscreenToggle:"Volledig scherm aan / uit",switchLanguage:"Kies taal",share:"Deel",audioMute:"Geluid uit",audioUnmute:"Geluid aan",closeMarker:"Sluit deze marker",tourStepNext:"Volgende stap",tourStepPrev:"Vorige stap",tourStop:"Stop deze tour",minimize:"Minimaliseer",play:"Start",pause:"Pauzeer",stop:"Stop",subtitlesToggle:"Ondertitels aan / uit",galleryPrev:"Vorige afbeelding",galleryNext:"Volgende afbeelding",menuToggle:"Menu openen / sluiten",waypointFollow:"Ga deze richting"}},Oe=Ht(De.en),Re={prefix:"fas",iconName:"bars",icon:[448,512,["navicon"],"f0c9","M0 96C0 78.3 14.3 64 32 64l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 128C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 288c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32L32 448c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"]},Fe={prefix:"fas",iconName:"circle-exclamation",icon:[512,512,["exclamation-circle"],"f06a","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm0-384c13.3 0 24 10.7 24 24l0 112c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-112c0-13.3 10.7-24 24-24zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z"]},Ue={prefix:"fas",iconName:"compress",icon:[448,512,[],"f066","M160 64c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 64-64 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l96 0c17.7 0 32-14.3 32-32l0-96zM32 320c-17.7 0-32 14.3-32 32s14.3 32 32 32l64 0 0 64c0 17.7 14.3 32 32 32s32-14.3 32-32l0-96c0-17.7-14.3-32-32-32l-96 0zM352 64c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 96c0 17.7 14.3 32 32 32l96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-64 0 0-64zM320 320c-17.7 0-32 14.3-32 32l0 96c0 17.7 14.3 32 32 32s32-14.3 32-32l0-64 64 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-96 0z"]},Ve={prefix:"fas",iconName:"globe",icon:[512,512,[127760],"f0ac","M352 256c0 22.2-1.2 43.6-3.3 64l-185.3 0c-2.2-20.4-3.3-41.8-3.3-64s1.2-43.6 3.3-64l185.3 0c2.2 20.4 3.3 41.8 3.3 64zm28.8-64l123.1 0c5.3 20.5 8.1 41.9 8.1 64s-2.8 43.5-8.1 64l-123.1 0c2.1-20.6 3.2-42 3.2-64s-1.1-43.4-3.2-64zm112.6-32l-116.7 0c-10-63.9-29.8-117.4-55.3-151.6c78.3 20.7 142 77.5 171.9 151.6zm-149.1 0l-176.6 0c6.1-36.4 15.5-68.6 27-94.7c10.5-23.6 22.2-40.7 33.5-51.5C239.4 3.2 248.7 0 256 0s16.6 3.2 27.8 13.8c11.3 10.8 23 27.9 33.5 51.5c11.6 26 20.9 58.2 27 94.7zm-209 0L18.6 160C48.6 85.9 112.2 29.1 190.6 8.4C165.1 42.6 145.3 96.1 135.3 160zM8.1 192l123.1 0c-2.1 20.6-3.2 42-3.2 64s1.1 43.4 3.2 64L8.1 320C2.8 299.5 0 278.1 0 256s2.8-43.5 8.1-64zM194.7 446.6c-11.6-26-20.9-58.2-27-94.6l176.6 0c-6.1 36.4-15.5 68.6-27 94.6c-10.5 23.6-22.2 40.7-33.5 51.5C272.6 508.8 263.3 512 256 512s-16.6-3.2-27.8-13.8c-11.3-10.8-23-27.9-33.5-51.5zM135.3 352c10 63.9 29.8 117.4 55.3 151.6C112.2 482.9 48.6 426.1 18.6 352l116.7 0zm358.1 0c-30 74.1-93.6 130.9-171.9 151.6c25.5-34.2 45.2-87.7 55.3-151.6l116.7 0z"]},Be={prefix:"fas",iconName:"image",icon:[512,512,[],"f03e","M0 96C0 60.7 28.7 32 64 32l384 0c35.3 0 64 28.7 64 64l0 320c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 96zM323.8 202.5c-4.5-6.6-11.9-10.5-19.8-10.5s-15.4 3.9-19.8 10.5l-87 127.6L170.7 297c-4.6-5.7-11.5-9-18.7-9s-14.2 3.3-18.7 9l-64 80c-5.8 7.2-6.9 17.1-2.9 25.4s12.4 13.6 21.6 13.6l96 0 32 0 208 0c8.9 0 17.1-4.9 21.2-12.8s3.6-17.4-1.4-24.7l-120-176zM112 192a48 48 0 1 0 0-96 48 48 0 1 0 0 96z"]},qe={prefix:"fas",iconName:"circle-play",icon:[512,512,[61469,"play-circle"],"f144","M0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zM188.3 147.1c-7.6 4.2-12.3 12.3-12.3 20.9l0 176c0 8.7 4.7 16.7 12.3 20.9s16.8 4.1 24.3-.5l144-88c7.1-4.4 11.5-12.1 11.5-20.5s-4.4-16.1-11.5-20.5l-144-88c-7.4-4.5-16.7-4.7-24.3-.5z"]},We={prefix:"fas",iconName:"pause",icon:[320,512,[9208],"f04c","M48 64C21.5 64 0 85.5 0 112L0 400c0 26.5 21.5 48 48 48l32 0c26.5 0 48-21.5 48-48l0-288c0-26.5-21.5-48-48-48L48 64zm192 0c-26.5 0-48 21.5-48 48l0 288c0 26.5 21.5 48 48 48l32 0c26.5 0 48-21.5 48-48l0-288c0-26.5-21.5-48-48-48l-32 0z"]},Xe={prefix:"fas",iconName:"layer-group",icon:[576,512,[],"f5fd","M264.5 5.2c14.9-6.9 32.1-6.9 47 0l218.6 101c8.5 3.9 13.9 12.4 13.9 21.8s-5.4 17.9-13.9 21.8l-218.6 101c-14.9 6.9-32.1 6.9-47 0L45.9 149.8C37.4 145.8 32 137.3 32 128s5.4-17.9 13.9-21.8L264.5 5.2zM476.9 209.6l53.2 24.6c8.5 3.9 13.9 12.4 13.9 21.8s-5.4 17.9-13.9 21.8l-218.6 101c-14.9 6.9-32.1 6.9-47 0L45.9 277.8C37.4 273.8 32 265.3 32 256s5.4-17.9 13.9-21.8l53.2-24.6 152 70.2c23.4 10.8 50.4 10.8 73.8 0l152-70.2zm-152 198.2l152-70.2 53.2 24.6c8.5 3.9 13.9 12.4 13.9 21.8s-5.4 17.9-13.9 21.8l-218.6 101c-14.9 6.9-32.1 6.9-47 0L45.9 405.8C37.4 401.8 32 393.3 32 384s5.4-17.9 13.9-21.8l53.2-24.6 152 70.2c23.4 10.8 50.4 10.8 73.8 0z"]},Ge={prefix:"fas",iconName:"arrow-up-right-from-square",icon:[512,512,["external-link"],"f08e","M320 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l82.7 0L201.4 265.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L448 109.3l0 82.7c0 17.7 14.3 32 32 32s32-14.3 32-32l0-160c0-17.7-14.3-32-32-32L320 0zM80 32C35.8 32 0 67.8 0 112L0 432c0 44.2 35.8 80 80 80l320 0c44.2 0 80-35.8 80-80l0-112c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 112c0 8.8-7.2 16-16 16L80 448c-8.8 0-16-7.2-16-16l0-320c0-8.8 7.2-16 16-16l112 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L80 32z"]},Ye={prefix:"fas",iconName:"arrow-right",icon:[448,512,[8594],"f061","M438.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L338.8 224 32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l306.7 0L233.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l160-160z"]},je={prefix:"fas",iconName:"volume-high",icon:[640,512,[128266,"volume-up"],"f028","M533.6 32.5C598.5 85.2 640 165.8 640 256s-41.5 170.7-106.4 223.5c-10.3 8.4-25.4 6.8-33.8-3.5s-6.8-25.4 3.5-33.8C557.5 398.2 592 331.2 592 256s-34.5-142.2-88.7-186.3c-10.3-8.4-11.8-23.5-3.5-33.8s23.5-11.8 33.8-3.5zM473.1 107c43.2 35.2 70.9 88.9 70.9 149s-27.7 113.8-70.9 149c-10.3 8.4-25.4 6.8-33.8-3.5s-6.8-25.4 3.5-33.8C475.3 341.3 496 301.1 496 256s-20.7-85.3-53.2-111.8c-10.3-8.4-11.8-23.5-3.5-33.8s23.5-11.8 33.8-3.5zm-60.5 74.5C434.1 199.1 448 225.9 448 256s-13.9 56.9-35.4 74.5c-10.3 8.4-25.4 6.8-33.8-3.5s-6.8-25.4 3.5-33.8C393.1 284.4 400 271 400 256s-6.9-28.4-17.7-37.3c-10.3-8.4-11.8-23.5-3.5-33.8s23.5-11.8 33.8-3.5zM301.1 34.8C312.6 40 320 51.4 320 64l0 384c0 12.6-7.4 24-18.9 29.2s-25 3.1-34.4-5.3L131.8 352 64 352c-35.3 0-64-28.7-64-64l0-64c0-35.3 28.7-64 64-64l67.8 0L266.7 40.1c9.4-8.4 22.9-10.4 34.4-5.3z"]},He={prefix:"fas",iconName:"arrow-left",icon:[448,512,[8592],"f060","M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.2 288 416 288c17.7 0 32-14.3 32-32s-14.3-32-32-32l-306.7 0L214.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160z"]},Ze={prefix:"fas",iconName:"minus",icon:[448,512,[8211,8722,10134,"subtract"],"f068","M432 256c0 17.7-14.3 32-32 32L48 288c-17.7 0-32-14.3-32-32s14.3-32 32-32l352 0c17.7 0 32 14.3 32 32z"]},Ke={prefix:"fas",iconName:"ellipsis-vertical",icon:[128,512,["ellipsis-v"],"f142","M64 360a56 56 0 1 0 0 112 56 56 0 1 0 0-112zm0-160a56 56 0 1 0 0 112 56 56 0 1 0 0-112zM120 96A56 56 0 1 0 8 96a56 56 0 1 0 112 0z"]},Je={prefix:"fas",iconName:"closed-captioning",icon:[576,512,[],"f20a","M0 96C0 60.7 28.7 32 64 32l448 0c35.3 0 64 28.7 64 64l0 320c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 96zM200 208c14.2 0 27 6.1 35.8 16c8.8 9.9 24 10.7 33.9 1.9s10.7-24 1.9-33.9c-17.5-19.6-43.1-32-71.5-32c-53 0-96 43-96 96s43 96 96 96c28.4 0 54-12.4 71.5-32c8.8-9.9 8-25-1.9-33.9s-25-8-33.9 1.9c-8.8 9.9-21.6 16-35.8 16c-26.5 0-48-21.5-48-48s21.5-48 48-48zm144 48c0-26.5 21.5-48 48-48c14.2 0 27 6.1 35.8 16c8.8 9.9 24 10.7 33.9 1.9s10.7-24 1.9-33.9c-17.5-19.6-43.1-32-71.5-32c-53 0-96 43-96 96s43 96 96 96c28.4 0 54-12.4 71.5-32c8.8-9.9 8-25-1.9-33.9s-25-8-33.9 1.9c-8.8 9.9-21.6 16-35.8 16c-26.5 0-48-21.5-48-48z"]},Qe={prefix:"fas",iconName:"arrow-down",icon:[384,512,[8595],"f063","M169.4 470.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 370.8 224 64c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 306.7L54.6 265.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z"]},ti={prefix:"fas",iconName:"link",icon:[640,512,[128279,"chain"],"f0c1","M579.8 267.7c56.5-56.5 56.5-148 0-204.5c-50-50-128.8-56.5-186.3-15.4l-1.6 1.1c-14.4 10.3-17.7 30.3-7.4 44.6s30.3 17.7 44.6 7.4l1.6-1.1c32.1-22.9 76-19.3 103.8 8.6c31.5 31.5 31.5 82.5 0 114L422.3 334.8c-31.5 31.5-82.5 31.5-114 0c-27.9-27.9-31.5-71.8-8.6-103.8l1.1-1.6c10.3-14.4 6.9-34.4-7.4-44.6s-34.4-6.9-44.6 7.4l-1.1 1.6C206.5 251.2 213 330 263 380c56.5 56.5 148 56.5 204.5 0L579.8 267.7zM60.2 244.3c-56.5 56.5-56.5 148 0 204.5c50 50 128.8 56.5 186.3 15.4l1.6-1.1c14.4-10.3 17.7-30.3 7.4-44.6s-30.3-17.7-44.6-7.4l-1.6 1.1c-32.1 22.9-76 19.3-103.8-8.6C74 372 74 321 105.5 289.5L217.7 177.2c31.5-31.5 82.5-31.5 114 0c27.9 27.9 31.5 71.8 8.6 103.9l-1.1 1.6c-10.3 14.4-6.9 34.4 7.4 44.6s34.4 6.9 44.6-7.4l1.1-1.6C433.5 260.8 427 182 377 132c-56.5-56.5-148-56.5-204.5 0L60.2 244.3z"]},ei={prefix:"fas",iconName:"play",icon:[384,512,[9654],"f04b","M73 39c-14.8-9.1-33.4-9.4-48.5-.9S0 62.6 0 80L0 432c0 17.4 9.4 33.4 24.5 41.9s33.7 8.1 48.5-.9L361 297c14.3-8.7 23-24.2 23-41s-8.7-32.2-23-41L73 39z"]},ii={prefix:"fas",iconName:"chevron-down",icon:[512,512,[],"f078","M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"]},ni={prefix:"fas",iconName:"arrow-up",icon:[384,512,[8593],"f062","M214.6 41.4c-12.5-12.5-32.8-12.5-45.3 0l-160 160c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 141.2 160 448c0 17.7 14.3 32 32 32s32-14.3 32-32l0-306.7L329.4 246.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-160-160z"]},si={prefix:"fas",iconName:"volume-xmark",icon:[576,512,["volume-mute","volume-times"],"f6a9","M301.1 34.8C312.6 40 320 51.4 320 64l0 384c0 12.6-7.4 24-18.9 29.2s-25 3.1-34.4-5.3L131.8 352 64 352c-35.3 0-64-28.7-64-64l0-64c0-35.3 28.7-64 64-64l67.8 0L266.7 40.1c9.4-8.4 22.9-10.4 34.4-5.3zM425 167l55 55 55-55c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-55 55 55 55c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-55-55-55 55c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l55-55-55-55c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0z"]},ri={prefix:"fas",iconName:"plus",icon:[448,512,[10133,61543,"add"],"2b","M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 144L48 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l144 0 0 144c0 17.7 14.3 32 32 32s32-14.3 32-32l0-144 144 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-144 0 0-144z"]},oi={prefix:"fas",iconName:"expand",icon:[448,512,[],"f065","M32 32C14.3 32 0 46.3 0 64l0 96c0 17.7 14.3 32 32 32s32-14.3 32-32l0-64 64 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 32zM64 352c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 96c0 17.7 14.3 32 32 32l96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-64 0 0-64zM320 32c-17.7 0-32 14.3-32 32s14.3 32 32 32l64 0 0 64c0 17.7 14.3 32 32 32s32-14.3 32-32l0-96c0-17.7-14.3-32-32-32l-96 0zM448 352c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 64-64 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l96 0c17.7 0 32-14.3 32-32l0-96z"]},ai={prefix:"fas",iconName:"xmark",icon:[384,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"]},li={prefix:"fas",iconName:"share",icon:[512,512,["mail-forward"],"f064","M307 34.8c-11.5 5.1-19 16.6-19 29.2l0 64-112 0C78.8 128 0 206.8 0 304C0 417.3 81.5 467.9 100.2 478.1c2.5 1.4 5.3 1.9 8.1 1.9c10.9 0 19.7-8.9 19.7-19.7c0-7.5-4.3-14.4-9.8-19.5C108.8 431.9 96 414.4 96 384c0-53 43-96 96-96l96 0 0 64c0 12.6 7.4 24.1 19 29.2s25 3 34.4-5.4l160-144c6.7-6.1 10.6-14.7 10.6-23.8s-3.8-17.7-10.6-23.8l-160-144c-9.4-8.5-22.9-10.6-34.4-5.4z"]},ci={prefix:"fas",iconName:"video",icon:[576,512,["video-camera"],"f03d","M0 128C0 92.7 28.7 64 64 64l256 0c35.3 0 64 28.7 64 64l0 256c0 35.3-28.7 64-64 64L64 448c-35.3 0-64-28.7-64-64L0 128zM559.1 99.8c10.4 5.6 16.9 16.4 16.9 28.2l0 256c0 11.8-6.5 22.6-16.9 28.2s-23 5-32.9-1.6l-96-64L416 337.1l0-17.1 0-128 0-17.1 14.2-9.5 96-64c9.8-6.5 22.4-7.2 32.9-1.6z"]};function di(t){let e,i,n,s,r,o,a,l=t[3]&&ui(t);function c(t,e){return"string"==typeof t[17][4]?mi:hi}let d=c(t),u=d(t);return{c(){e=C("svg"),l&&l.c(),i=C("g"),n=C("g"),u.c(),V(n,"transform",t[16]),V(i,"transform",s="translate("+t[17][0]/2+" "+t[17][1]/2+")"),V(i,"transform-origin",r=t[17][0]/4+" 0"),V(e,"id",t[1]),V(e,"class",o="svelte-fa svelte-fa-base "+t[0]+" micrio-fa"),V(e,"style",t[2]),V(e,"viewBox",a="0 0 "+t[17][0]+" "+t[17][1]),V(e,"aria-hidden","true"),V(e,"role","img"),V(e,"xmlns","http://www.w3.org/2000/svg"),H(e,"pulse",t[9]),H(e,"svelte-fa-size-lg","lg"===t[4]),H(e,"svelte-fa-size-sm","sm"===t[4]),H(e,"svelte-fa-size-xs","xs"===t[4]),H(e,"svelte-fa-fw",t[6]),H(e,"svelte-fa-pull-left","left"===t[7]),H(e,"svelte-fa-pull-right","right"===t[7]),H(e,"spin",t[8])},m(s,r){I(s,e,r),l&&l.m(e,null),S(e,i),S(i,n),u.m(n,null),t[24](e)},p(t,h){t[3]?l?l.p(t,h):(l=ui(t),l.c(),l.m(e,i)):l&&(l.d(1),l=null),d===(d=c(t))&&u?u.p(t,h):(u.d(1),u=d(t),u&&(u.c(),u.m(n,null))),65536&h&&V(n,"transform",t[16]),131072&h&&s!==(s="translate("+t[17][0]/2+" "+t[17][1]/2+")")&&V(i,"transform",s),131072&h&&r!==(r=t[17][0]/4+" 0")&&V(i,"transform-origin",r),2&h&&V(e,"id",t[1]),1&h&&o!==(o="svelte-fa svelte-fa-base "+t[0]+" micrio-fa")&&V(e,"class",o),4&h&&V(e,"style",t[2]),131072&h&&a!==(a="0 0 "+t[17][0]+" "+t[17][1])&&V(e,"viewBox",a),513&h&&H(e,"pulse",t[9]),17&h&&H(e,"svelte-fa-size-lg","lg"===t[4]),17&h&&H(e,"svelte-fa-size-sm","sm"===t[4]),17&h&&H(e,"svelte-fa-size-xs","xs"===t[4]),65&h&&H(e,"svelte-fa-fw",t[6]),129&h&&H(e,"svelte-fa-pull-left","left"===t[7]),129&h&&H(e,"svelte-fa-pull-right","right"===t[7]),257&h&&H(e,"spin",t[8])},d(i){i&&L(e),l&&l.d(),u.d(),t[24](null)}}}function ui(t){let e,i;return{c(){e=C("title"),i=z(t[3])},m(t,n){I(t,e,n),S(e,i)},p(t,e){8&e&&Y(i,t[3])},d(t){t&&L(e)}}}function hi(t){let e,i,n,s,r,o,a,l,c,d;return{c(){e=C("path"),o=C("path"),V(e,"d",i=t[17][4][0]),V(e,"fill",n=t[11]||t[5]||"currentColor"),V(e,"fill-opacity",s=0!=t[14]?t[12]:t[13]),V(e,"transform",r="translate("+t[17][0]/-2+" "+t[17][1]/-2+")"),V(o,"d",a=t[17][4][1]),V(o,"fill",l=t[10]||t[5]||"currentColor"),V(o,"fill-opacity",c=0!=t[14]?t[13]:t[12]),V(o,"transform",d="translate("+t[17][0]/-2+" "+t[17][1]/-2+")")},m(t,i){I(t,e,i),I(t,o,i)},p(t,u){131072&u&&i!==(i=t[17][4][0])&&V(e,"d",i),2080&u&&n!==(n=t[11]||t[5]||"currentColor")&&V(e,"fill",n),28672&u&&s!==(s=0!=t[14]?t[12]:t[13])&&V(e,"fill-opacity",s),131072&u&&r!==(r="translate("+t[17][0]/-2+" "+t[17][1]/-2+")")&&V(e,"transform",r),131072&u&&a!==(a=t[17][4][1])&&V(o,"d",a),1056&u&&l!==(l=t[10]||t[5]||"currentColor")&&V(o,"fill",l),28672&u&&c!==(c=0!=t[14]?t[13]:t[12])&&V(o,"fill-opacity",c),131072&u&&d!==(d="translate("+t[17][0]/-2+" "+t[17][1]/-2+")")&&V(o,"transform",d)},d(t){t&&(L(e),L(o))}}}function mi(t){let e,i,n,s;return{c(){e=C("path"),V(e,"d",i=t[17][4]),V(e,"fill",n=t[5]||t[10]||"currentColor"),V(e,"transform",s="translate("+t[17][0]/-2+" "+t[17][1]/-2+")")},m(t,i){I(t,e,i)},p(t,r){131072&r&&i!==(i=t[17][4])&&V(e,"d",i),1056&r&&n!==(n=t[5]||t[10]||"currentColor")&&V(e,"fill",n),131072&r&&s!==(s="translate("+t[17][0]/-2+" "+t[17][1]/-2+")")&&V(e,"transform",s)},d(t){t&&L(e)}}}function pi(e){let i,n=e[17][4]&&di(e);return{c(){n&&n.c(),i=O()},m(t,e){n&&n.m(t,e),I(t,i,e)},p(t,[e]){t[17][4]?n?n.p(t,e):(n=di(t),n.c(),n.m(i.parentNode,i)):n&&(n.d(1),n=null)},i:t,o:t,d(t){t&&L(i),n&&n.d(t)}}}function fi(t,e,i){let n,s,r,{class:o}=e,{id:a}=e,{style:l}=e,{icon:c}=e,{title:d}=e,{size:u}=e,{color:h}=e,{fw:m=!1}=e,{pull:p}=e,{scale:f=1}=e,{translateX:g=0}=e,{translateY:v=0}=e,{rotate:$}=e,{flip:w}=e,{spin:y=!1}=e,{pulse:b=!1}=e,{primaryColor:k=""}=e,{secondaryColor:T=""}=e,{primaryOpacity:x=1}=e,{secondaryOpacity:_=.4}=e,{swapOpacity:E=!1}=e;return t.$$set=t=>{"class"in t&&i(0,o=t.class),"id"in t&&i(1,a=t.id),"style"in t&&i(2,l=t.style),"icon"in t&&i(18,c=t.icon),"title"in t&&i(3,d=t.title),"size"in t&&i(4,u=t.size),"color"in t&&i(5,h=t.color),"fw"in t&&i(6,m=t.fw),"pull"in t&&i(7,p=t.pull),"scale"in t&&i(19,f=t.scale),"translateX"in t&&i(20,g=t.translateX),"translateY"in t&&i(21,v=t.translateY),"rotate"in t&&i(22,$=t.rotate),"flip"in t&&i(23,w=t.flip),"spin"in t&&i(8,y=t.spin),"pulse"in t&&i(9,b=t.pulse),"primaryColor"in t&&i(10,k=t.primaryColor),"secondaryColor"in t&&i(11,T=t.secondaryColor),"primaryOpacity"in t&&i(12,x=t.primaryOpacity),"secondaryOpacity"in t&&i(13,_=t.secondaryOpacity),"swapOpacity"in t&&i(14,E=t.swapOpacity)},t.$$.update=()=>{32784&t.$$.dirty&&r&&u&&function(t,e){t.style.fontSize=e&&"lg"!==e&&"sm"!==e&&"xs"!==e?e.replace("x","em"):""}(r,u),262144&t.$$.dirty&&i(17,n=c&&c.icon||[0,0,"",[],""]),16252928&t.$$.dirty&&i(16,s=function(t,e,i,n,s,r=1,o="",a=""){let l=1,c=1;s&&("horizontal"==s?l=-1:"vertical"==s?c=-1:l=c=-1),"string"==typeof t&&(t=parseFloat(t)),"string"==typeof e&&(e=parseFloat(e)),"string"==typeof i&&(i=parseFloat(i));let d=`translate(${e*r}${o},${i*r}${o}) scale(${l*t},${c*t})`;return n&&(d+=` rotate(${n}${a})`),d}(f,g,v,$,w,512))},[o,a,l,d,u,h,m,p,y,b,k,T,x,_,E,r,s,n,c,f,g,v,$,w,function(t){ut[t?"unshift":"push"]((()=>{r=t,i(15,r)}))}]}class gi extends Yt{constructor(t){super(),Gt(this,t,fi,pi,a,{class:0,id:1,style:2,icon:18,title:3,size:4,color:5,fw:6,pull:7,scale:19,translateX:20,translateY:21,rotate:22,flip:23,spin:8,pulse:9,primaryColor:10,secondaryColor:11,primaryOpacity:12,secondaryOpacity:13,swapOpacity:14})}}function vi(t){let e,i;return e=new gi({props:{icon:t[4].get(t[1]),size:t[3]?"14":"24",style:t[0]}}),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};2&i&&(n.icon=t[4].get(t[1])),1&i&&(n.style=t[0]),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function $i(e){let i,n;return{c(){i=new K(!1),n=O(),i.a=n},m(t,s){i.m(e[2],t,s),I(t,n,s)},p(t,e){4&e&&i.p(t[2])},i:t,o:t,d(t){t&&(L(n),i.d())}}}function wi(t){let e,i,n,s,r;const o=[$i,vi],a=[];function l(t,i){return 2&i&&(e=null),t[2]?0:(null==e&&(e=!!t[4].has(t[1])),e?1:-1)}return~(i=l(t,-1))&&(n=a[i]=o[i](t)),{c(){n&&n.c(),s=O()},m(t,e){~i&&a[i].m(t,e),I(t,s,e),r=!0},p(t,[e]){let r=i;i=l(t,e),i===r?~i&&a[i].p(t,e):(n&&(At(),Pt(a[r],1,1,(()=>{a[r]=null})),It()),~i?(n=a[i],n?n.p(t,e):(n=a[i]=o[i](t),n.c()),Lt(n,1),n.m(s.parentNode,s)):n=null)},i(t){r||(Lt(n),r=!0)},o(t){Pt(n),r=!1},d(t){t&&L(s),~i&&a[i].d(t)}}}function yi(t,e,i){var n,s;let r,{style:o=null}=e,{name:a}=e;const l=lt("micrio"),c="chevron-down"==a||"link-ext"==a,d=null==(s=null==(n=l.defaultSettings)?void 0:n.ui)?void 0:s.icons,u=new Map([["play",ei],["pause",We],["close",ai],["play-filled",qe],["a11y",Ve],["menu",Re],["zoom-in",ri],["zoom-out",Ze],["maximize",oi],["minimize",Ue],["volume-off",si],["volume-up",je],["subtitles",Je],["subtitles-off",Je],["arrow-left",He],["arrow-up",ni],["arrow-right",Ye],["arrow-down",Qe],["video",ci],["audio",je],["image",Be],["share",li],["error",Fe],["chevron-down",ii],["link",ti],["link-ext",Ge],["ellipsis-vertical",Ke]]);return t.$$set=t=>{"style"in t&&i(0,o=t.style),"name"in t&&i(1,a=t.name)},t.$$.update=()=>{2&t.$$.dirty&&i(2,r=d&&("zoom-in"==a?d.zoomIn:"zoom-out"==a?d.zoomOut:"maximize"==a?d.fullscreenEnter:"minimize"==a?d.fullscreenLeave:"close"==a?d.close:"arrow-right"==a?d.next:"arrow-left"==a?d.prev:"arrow-up"==a?d.up:"arrow-down"==a?d.down:"play"==a?d.play:"pause"==a?d.pause:"subtitles"==a?d.subtitles:"subtitles-off"==a?d.subtitlesOff:"volume-off"==a?d.muted:"volume-up"==a?d.unmuted:null))},[o,a,r,c,u]}class bi extends Yt{constructor(t){super(),Gt(this,t,yi,wi,a,{style:0,name:1})}}function ki(t,e,i){const n=t.slice();return n[17]=e[i],n[19]=i,n}function Ti(t){var e;let i,n,s,r,o,a,l,c=((null==(e=t[4])?void 0:e.title)??"(Unknown)")+"",d=t[0].icon&&_i(t),u=t[0].children&&t[0].children.length&&Ei();return{c(){i=N("button"),d&&d.c(),n=D(),s=N("strong"),r=z(c),u&&u.c(),V(s,"class","micrio-menu"),V(i,"class","micrio-menu-action micrio-menu"),V(i,"type","button")},m(e,c){I(e,i,c),d&&d.m(i,null),S(i,n),S(i,s),S(s,r),u&&u.m(s,null),t[9](i),o=!0,a||(l=R(i,"click",t[6]),a=!0)},p(t,e){var a;t[0].icon?d?(d.p(t,e),1&e&&Lt(d,1)):(d=_i(t),d.c(),Lt(d,1),d.m(i,n)):d&&(At(),Pt(d,1,1,(()=>{d=null})),It()),(!o||16&e)&&c!==(c=((null==(a=t[4])?void 0:a.title)??"(Unknown)")+"")&&Y(r,c),t[0].children&&t[0].children.length?u?1&e&&Lt(u,1):(u=Ei(),u.c(),Lt(u,1),u.m(s,null)):u&&(At(),Pt(u,1,1,(()=>{u=null})),It())},i(t){o||(Lt(d),Lt(u),o=!0)},o(t){Pt(d),Pt(u),o=!1},d(e){e&&L(i),d&&d.d(),u&&u.d(),t[9](null),a=!1,l()}}}function xi(t){var e;let i,n,s,r,o,a,l,c,d,u=((null==(e=t[4])?void 0:e.title)??"(Unknown)")+"";return r=new bi({props:{style:"opacity:.75",name:"link-ext"}}),{c(){i=N("a"),n=N("strong"),s=z(u),qt(r.$$.fragment),V(n,"class","micrio-menu"),V(i,"class","micrio-menu-action micrio-menu"),V(i,"href",o=t[0].link),V(i,"target",a=t[0].linkTargetBlank?"_blank":void 0)},m(e,o){I(e,i,o),S(i,n),S(n,s),Wt(r,n,null),l=!0,c||(d=R(i,"click",t[6]),c=!0)},p(t,e){var n;(!l||16&e)&&u!==(u=((null==(n=t[4])?void 0:n.title)??"(Unknown)")+"")&&Y(s,u),(!l||1&e&&o!==(o=t[0].link))&&V(i,"href",o),(!l||1&e&&a!==(a=t[0].linkTargetBlank?"_blank":void 0))&&V(i,"target",a)},i(t){l||(Lt(r.$$.fragment,t),l=!0)},o(t){Pt(r.$$.fragment,t),l=!1},d(t){t&&L(i),Xt(r),c=!1,d()}}}function _i(t){let e,i;return e=new gi({props:{icon:t[0].icon,style:"margin-right:10px;"}}),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};1&i&&(n.icon=t[0].icon),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function Ei(t){let e,i;return e=new bi({props:{name:"chevron-down"}}),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function Si(t){let e,i,n=[],s=new Map,r=Dt(t[0].children);const o=t=>t[19]+t[17].id;for(let a=0;a<r.length;a+=1){let e=ki(t,r,a),i=o(e);s.set(i,n[a]=Mi(i,e))}return{c(){e=N("div");for(let t=0;t<n.length;t+=1)n[t].c();V(e,"class","items micrio-menu")},m(t,s){I(t,e,s);for(let i=0;i<n.length;i+=1)n[i]&&n[i].m(e,null);i=!0},p(t,i){3&i&&(r=Dt(t[0].children),At(),n=Ft(n,i,o,0,t,r,s,e,Rt,Mi,null,ki),It())},i(t){if(!i){for(let t=0;t<r.length;t+=1)Lt(n[t]);i=!0}},o(t){for(let e=0;e<n.length;e+=1)Pt(n[e]);i=!1},d(t){t&&L(e);for(let e=0;e<n.length;e+=1)n[e].d()}}}function Mi(t,e){let i,n,s,r;return n=new Ci({props:{menu:e[17],originalId:e[1]}}),n.$on("close",e[10]),{key:t,first:null,c(){i=O(),qt(n.$$.fragment),s=D(),this.first=i},m(t,e){I(t,i,e),Wt(n,t,e),I(t,s,e),r=!0},p(t,i){e=t;const s={};1&i&&(s.menu=e[17]),2&i&&(s.originalId=e[1]),n.$set(s)},i(t){r||(Lt(n.$$.fragment,t),r=!0)},o(t){Pt(n.$$.fragment,t),r=!1},d(t){t&&(L(i),L(s)),Xt(n,t)}}}function Ai(t){let e,i,n,s,r,o;const a=[xi,Ti],l=[];function c(t,e){return t[0].link?0:1}i=c(t),n=l[i]=a[i](t);let d=t[0].children&&t[0].children.length&&Si(t);return{c(){var i,o;e=N("menu"),n.c(),s=D(),d&&d.c(),V(e,"data-title",r=null==(o=null==(i=t[4])?void 0:i.title)?void 0:o.toLowerCase()),V(e,"class","micrio-menu"),H(e,"opened",t[3])},m(t,n){I(t,e,n),l[i].m(e,null),S(e,s),d&&d.m(e,null),o=!0},p(t,[u]){var h,m;let p=i;i=c(t),i===p?l[i].p(t,u):(At(),Pt(l[p],1,1,(()=>{l[p]=null})),It(),n=l[i],n?n.p(t,u):(n=l[i]=a[i](t),n.c()),Lt(n,1),n.m(e,s)),t[0].children&&t[0].children.length?d?(d.p(t,u),1&u&&Lt(d,1)):(d=Si(t),d.c(),Lt(d,1),d.m(e,null)):d&&(At(),Pt(d,1,1,(()=>{d=null})),It()),(!o||16&u&&r!==(r=null==(m=null==(h=t[4])?void 0:h.title)?void 0:m.toLowerCase()))&&V(e,"data-title",r),(!o||8&u)&&H(e,"opened",t[3])},i(t){o||(Lt(n),Lt(d),o=!0)},o(t){Pt(n),Pt(d),o=!1},d(t){t&&L(e),l[i].d(),d&&d.d()}}}const Ii=Ht(void 0),Li=()=>Ii.set(void 0);let Pi=!1;function Ni(t,e,i){let n,s,r,o;h(t,Ii,(t=>i(7,r=t)));let{menu:a}=e,{originalId:l=null}=e;const c=ot(),d=lt("micrio"),{events:u,state:m,_lang:p}=d;let f;h(t,p,(t=>i(8,o=t)));rt((()=>{var t;(null==n?void 0:n.title)||1!=(null==(t=a.children)?void 0:t.length)||i(0,a=a.children[0]),a.action||(a.markerId?i(0,a.action=()=>{var t,e;l&&(null==(t=d.$current)?void 0:t.id)!=l&&d.open(l),null==(e=d.$current)||e.state.marker.set(a.markerId)},a):((null==n?void 0:n.content)||(null==n?void 0:n.embed)||a.image)&&i(0,a.action=()=>{u.dispatch("page-open",a),m.popover.set({contentPage:a})},a)),i(0,a._button=f,a)}));const g=t=>{var e;return t==r||!!(null==(e=t.children)?void 0:e.some(g))};return t.$$set=t=>{"menu"in t&&i(0,a=t.menu),"originalId"in t&&i(1,l=t.originalId)},t.$$.update=()=>{var e,l,c;257&t.$$.dirty&&i(4,(l=o,n=(null==(c=(e=a).i18n)?void 0:c[l])??e)),129&t.$$.dirty&&i(3,s=r&&g(a))},[a,l,f,s,n,p,function(t){a.link||t.preventDefault(),a.action&&a.action();const e=!!(s||a.action||a.link);Ii.set(e?void 0:a),e&&c("close")},r,o,function(t){ut[t?"unshift":"push"]((()=>{f=t,i(2,f)}))},function(e){ct.call(this,t,e)}]}Ii.subscribe((t=>{t?!Pi&&window.addEventListener("click",Li):Pi&&window.removeEventListener("click",Li),Pi=!!t}));class Ci extends Yt{constructor(t){super(),Gt(this,t,Ni,Ai,a,{menu:0,originalId:1})}}function zi(e){let i,n;return{c(){i=N("img"),c(i.src,n=e[1].src)||V(i,"src",n),V(i,"alt","Icon"),V(i,"class","micrio-button")},m(t,e){I(t,i,e)},p(t,e){2&e&&!c(i.src,n=t[1].src)&&V(i,"src",n)},i:t,o:t,d(t){t&&L(i)}}}function Di(t){let e,i;return e=new bi({props:{name:t[0]}}),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};1&i&&(n.name=t[0]),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function Oi(t){let e,n,s,o,a,l,c,d,u,h,p,$;const w=[Di,zi],y=[];function b(t,e){return t[0]?0:t[1]?1:-1}~(n=b(t))&&(s=y[n]=w[n](t));const k=t[10].default,T=m(k,t,t[9],null);let x=[{href:t[6]},{target:a=t[7]?"_blank":void 0},{disabled:l=!!t[3]||void 0},{title:t[2]},{"aria-label":t[2]},{role:c=t[6]?void 0:"button"},{tabindex:d=t[6]?void 0:0},{class:u="micrio-button "+(t[0]??"")+" "+t[5]+" micrio-button"}],_={};for(let r=0;r<x.length;r+=1)_=i(_,x[r]);return{c(){e=N(t[6]?"a":"button"),s&&s.c(),o=O(),T&&T.c(),G(t[6]?"a":"button")(e,_),H(e,"active",t[4]),H(e,"no-click",t[8])},m(i,s){I(i,e,s),~n&&y[n].m(e,null),S(e,o),T&&T.m(e,null),h=!0,p||($=[R(e,"click",t[11]),R(e,"focus",t[12]),R(e,"pointerdown",t[13])],p=!0)},p(t,i){let r=n;n=b(t),n===r?~n&&y[n].p(t,i):(s&&(At(),Pt(y[r],1,1,(()=>{y[r]=null})),It()),~n?(s=y[n],s?s.p(t,i):(s=y[n]=w[n](t),s.c()),Lt(s,1),s.m(e,o)):s=null),T&&T.p&&(!h||512&i)&&g(T,k,t,t[9],h?f(k,t[9],i,null):v(t[9]),null),G(t[6]?"a":"button")(e,_=Ut(x,[(!h||64&i)&&{href:t[6]},(!h||128&i&&a!==(a=t[7]?"_blank":void 0))&&{target:a},(!h||8&i&&l!==(l=!!t[3]||void 0))&&{disabled:l},(!h||4&i)&&{title:t[2]},(!h||4&i)&&{"aria-label":t[2]},(!h||64&i&&c!==(c=t[6]?void 0:"button"))&&{role:c},(!h||64&i&&d!==(d=t[6]?void 0:0))&&{tabindex:d},(!h||33&i&&u!==(u="micrio-button "+(t[0]??"")+" "+t[5]+" micrio-button"))&&{class:u}])),H(e,"active",t[4]),H(e,"no-click",t[8])},i(t){h||(Lt(s),Lt(T,t),h=!0)},o(t){Pt(s),Pt(T,t),h=!1},d(t){t&&L(e),~n&&y[n].d(),T&&T.d(t),p=!1,r($)}}}function Ri(t){let e,i,n=t[6]?"a":"button",s=(t[6]?"a":"button")&&Oi(t);return{c(){s&&s.c(),e=O()},m(t,n){s&&s.m(t,n),I(t,e,n),i=!0},p(t,[i]){t[6]||"button"?n?a(n,t[6]?"a":"button")?(s.d(1),s=Oi(t),n=t[6]?"a":"button",s.c(),s.m(e.parentNode,e)):s.p(t,i):(s=Oi(t),n=t[6]?"a":"button",s.c(),s.m(e.parentNode,e)):n&&(s.d(1),s=null,n=t[6]?"a":"button")},i(t){i||(Lt(s,t),i=!0)},o(t){Pt(s,t),i=!1},d(t){t&&L(e),s&&s.d(t)}}}function Fi(t,e,i){let{$$slots:n={},$$scope:s}=e,{type:r}=e,{icon:o}=e,{title:a=null}=e,{disabled:l=!1}=e,{active:c=!1}=e,{className:d=""}=e,{href:u}=e,{blankTarget:h=!1}=e,{noClick:m=!1}=e;return t.$$set=t=>{"type"in t&&i(0,r=t.type),"icon"in t&&i(1,o=t.icon),"title"in t&&i(2,a=t.title),"disabled"in t&&i(3,l=t.disabled),"active"in t&&i(4,c=t.active),"className"in t&&i(5,d=t.className),"href"in t&&i(6,u=t.href),"blankTarget"in t&&i(7,h=t.blankTarget),"noClick"in t&&i(8,m=t.noClick),"$$scope"in t&&i(9,s=t.$$scope)},[r,o,a,l,c,d,u,h,m,s,n,function(e){ct.call(this,t,e)},function(e){ct.call(this,t,e)},function(e){ct.call(this,t,e)}]}class Ui extends Yt{constructor(t){super(),Gt(this,t,Fi,Ri,a,{type:0,icon:1,title:2,disabled:3,active:4,className:5,href:6,blankTarget:7,noClick:8})}}function Vi(t,e,i){const n=t.slice();return n[33]=e[i],n}function Bi(t){let e,i,n,s,r,o,a,l=t[1]&&qi(t),c=t[3]&&Xi(t),d=t[2]&&Gi(t),u=t[7]&&Yi(t);return{c(){e=N("menu"),l&&l.c(),i=D(),c&&c.c(),n=D(),d&&d.c(),r=D(),u&&u.c(),o=O(),V(e,"class","micrio-toolbar micrio-toolbar"),H(e,"shown",!t[10]&&t[5]),H(e,"indent",t[6])},m(t,s){I(t,e,s),l&&l.m(e,null),S(e,i),c&&c.m(e,null),S(e,n),d&&d.m(e,null),I(t,r,s),u&&u.m(t,s),I(t,o,s),a=!0},p(t,s){t[1]?l?(l.p(t,s),2&s[0]&&Lt(l,1)):(l=qi(t),l.c(),Lt(l,1),l.m(e,i)):l&&(At(),Pt(l,1,1,(()=>{l=null})),It()),t[3]?c?(c.p(t,s),8&s[0]&&Lt(c,1)):(c=Xi(t),c.c(),Lt(c,1),c.m(e,n)):c&&(At(),Pt(c,1,1,(()=>{c=null})),It()),t[2]?d?(d.p(t,s),4&s[0]&&Lt(d,1)):(d=Gi(t),d.c(),Lt(d,1),d.m(e,null)):d&&(At(),Pt(d,1,1,(()=>{d=null})),It()),(!a||1056&s[0])&&H(e,"shown",!t[10]&&t[5]),(!a||64&s[0])&&H(e,"indent",t[6]),t[7]?u?(u.p(t,s),128&s[0]&&Lt(u,1)):(u=Yi(t),u.c(),Lt(u,1),u.m(o.parentNode,o)):u&&(At(),Pt(u,1,1,(()=>{u=null})),It())},i(t){a||(Lt(l),Lt(c),Lt(d),t&&$t((()=>{a&&(s||(s=zt(e,_e,{duration:200},!0)),s.run(1))})),Lt(u),a=!0)},o(t){Pt(l),Pt(c),Pt(d),t&&(s||(s=zt(e,_e,{duration:200},!1)),s.run(0)),Pt(u),a=!1},d(t){t&&(L(e),L(r),L(o)),l&&l.d(),c&&c.d(),d&&d.d(),t&&s&&s.end(),u&&u.d(t)}}}function qi(t){let e,i,n=[],s=new Map,r=Dt(t[1]);const o=t=>t[33].id;for(let a=0;a<r.length;a+=1){let e=Vi(t,r,a),i=o(e);s.set(i,n[a]=Wi(i,e))}return{c(){for(let t=0;t<n.length;t+=1)n[t].c();e=O()},m(t,s){for(let e=0;e<n.length;e+=1)n[e]&&n[e].m(t,s);I(t,e,s),i=!0},p(t,i){3145730&i[0]&&(r=Dt(t[1]),At(),n=Ft(n,i,o,0,t,r,s,e.parentNode,Rt,Wi,e,Vi),It())},i(t){if(!i){for(let t=0;t<r.length;t+=1)Lt(n[t]);i=!0}},o(t){for(let e=0;e<n.length;e+=1)Pt(n[e]);i=!1},d(t){t&&L(e);for(let e=0;e<n.length;e+=1)n[e].d(t)}}}function Wi(t,e){let i,n,s;return n=new Ci({props:{menu:e[33],originalId:e[20]}}),n.$on("close",e[21]),{key:t,first:null,c(){i=O(),qt(n.$$.fragment),this.first=i},m(t,e){I(t,i,e),Wt(n,t,e),s=!0},p(t,i){e=t;const s={};2&i[0]&&(s.menu=e[33]),n.$set(s)},i(t){s||(Lt(n.$$.fragment,t),s=!0)},o(t){Pt(n.$$.fragment,t),s=!1},d(t){t&&L(i),Xt(n,t)}}}function Xi(t){let e,i;return e=new Ci({props:{menu:{id:Jt(),i18n:{[t[12]]:{title:t[9]?"Marker tours":"Tours"}},children:t[4].map(t[26])}}}),e.$on("close",t[21]),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};4624&i[0]&&(n.menu={id:Jt(),i18n:{[t[12]]:{title:t[9]?"Marker tours":"Tours"}},children:t[4].map(t[26])}),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function Gi(t){let e,i;return e=new Ci({props:{menu:{id:Jt(),i18n:{[t[12]]:{title:t[9]?"Video tours":"Tours"}},children:t[0]&&t[0].tours?t[0].tours.map(t[27]):[]}}}),e.$on("close",t[21]),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};6657&i[0]&&(n.menu={id:Jt(),i18n:{[t[12]]:{title:t[9]?"Video tours":"Tours"}},children:t[0]&&t[0].tours?t[0].tours.map(t[27]):[]}),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function Yi(t){let e,i;return e=new Ui({props:{title:t[13].menuToggle,type:t[5]?"close":"ellipsis-vertical",className:"toggle transparent"+(t[6]?" indent":"")}}),e.$on("click",t[28]),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};8192&i[0]&&(n.title=t[13].menuToggle),32&i[0]&&(n.type=t[5]?"close":"ellipsis-vertical"),64&i[0]&&(n.className="toggle transparent"+(t[6]?" indent":"")),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function ji(t){let e,i,n=!t[8]&&!t[10]&&Bi(t);return{c(){n&&n.c(),e=O()},m(t,s){n&&n.m(t,s),I(t,e,s),i=!0},p(t,i){t[8]||t[10]?n&&(At(),Pt(n,1,1,(()=>{n=null})),It()):n?(n.p(t,i),1280&i[0]&&Lt(n,1)):(n=Bi(t),n.c(),Lt(n,1),n.m(e.parentNode,e))},i(t){i||(Lt(n),i=!0)},o(t){Pt(n),i=!1},d(t){t&&L(e),n&&n.d(t)}}}function Hi(t,e,i){let n,s,r,o,a,l,c,d,u,m,p,f,g;h(t,Oe,(t=>i(13,f=t)));const v=lt("micrio"),{state:$,current:w,_lang:y,spaceData:b}=v;h(t,w,(t=>i(11,m=t))),h(t,y,(t=>i(12,p=t)));const{tour:k,marker:T,popover:x}=$;h(t,k,(t=>i(25,u=t))),h(t,T,(t=>i(24,d=t))),h(t,x,(t=>i(23,c=t)));let _=!1,E=!1;const S=m.id;let M,A;const I=()=>i(7,A=window.innerWidth<=500);I();const L=[],P=(t,e)=>{var i,n;return("title"in t?t.title:null==(n=null==(i=t.i18n)?void 0:i[e])?void 0:n.title)??"(Untitled)"};rt((()=>{const t=v.current.subscribe((t=>{var e;if(t){for(;L.length;)null==(e=L.shift())||e();le(t.info).then((()=>i(6,E=!t.$settings.noLogo))),L.push(t.data.subscribe((t=>{i(0,g=t),vt().then((()=>{var e,n;if(!(null==t?void 0:t.pages))return;M||i(1,M=null==(e=t.pages)?void 0:e.filter((t=>{var e;return!(null==(e=t.id)?void 0:e.startsWith("_"))})));const s=null==(n=t.pages)?void 0:n.filter((t=>{var e;return null==(e=t.id)?void 0:e.startsWith("_")}));s.length&&i(1,M=[...M.filter((t=>{var e;return!(null==(e=t.id)?void 0:e.startsWith("_"))})),...s])}))})))}}));return window.addEventListener("resize",I),()=>{var e;for(window.removeEventListener("resize",I);L.length;)null==(e=L.shift())||e();t()}}));return t.$$.update=()=>{var e;58720256&t.$$.dirty[0]&&i(10,n=!!u||!!d||!!c),1&t.$$.dirty[0]&&i(4,s=((null==g?void 0:g.markerTours)??[]).concat((null==b?void 0:b.markerTours)??[])),16&t.$$.dirty[0]&&i(3,r=null==s?void 0:s.length),1&t.$$.dirty[0]&&i(2,o=null==(e=null==g?void 0:g.tours)?void 0:e.length),12&t.$$.dirty[0]&&i(9,a=r&&o),14&t.$$.dirty[0]&&i(8,l=!((null==M?void 0:M.length)||r||o))},[g,M,o,r,s,_,E,A,l,a,n,m,p,f,v,w,y,k,T,x,S,()=>{A&&i(5,_=!1)},P,c,d,u,t=>({id:Jt(),i18n:{[p]:{title:P(t,p)}},action:()=>{t.initialStep=0,k.set(t)}}),t=>({id:Jt(),i18n:{[p]:{title:P(t,p)}},action:()=>{m&&m.id!=S&&v.open(S),k.set(t)}}),()=>i(5,_=!_)]}class Zi extends Yt{constructor(t){super(),Gt(this,t,Hi,ji,a,{},null,[-1,-1])}}function Ki(e){let i,n,s;return{c(){i=N("canvas"),V(i,"width",e[11]),V(i,"height",e[12]),V(i,"style",e[6]),V(i,"class","micrio-minimap"),H(i,"hidden",!e[5]||e[7]!=e[0]||e[9]&&(e[3]||e[2])),H(i,"dragging",e[4]),H(i,"controls",!e[10])},m(t,r){I(t,i,r),e[16](i),n||(s=[R(i,"wheel",e[13]),R(i,"mousedown",e[14])],n=!0)},p(t,e){64&e[0]&&V(i,"style",t[6]),685&e[0]&&H(i,"hidden",!t[5]||t[7]!=t[0]||t[9]&&(t[3]||t[2])),16&e[0]&&H(i,"dragging",t[4])},i:t,o:t,d(t){t&&L(i),e[16](null),n=!1,r(s)}}}function Ji(t,e,i){let n,s,{image:r}=e;const o=r.$info,a=r.camera,l=r.$settings,c=lt("micrio"),d=c.current;h(t,d,(t=>i(7,s=t)));const u=c.canvas.viewport,m=l.minimapWidth??200,p=l.minimapHeight??160,f=!l.alwaysShowMinimap,g=!!l.noControls,v=o.width/o.height,$=m/v>p?Math.round(p*v):m,w=m/v<=p?Math.round(m/v):p;let y,b,k=!1,T=!o.is360&&a.isZoomedOut();function x(t){if(t&&b){if(L(),b.clearRect(0,0,$,w),r.thumbSrc?(b.globalCompositeOperation="source-over",b.fillStyle="rgba(0,0,0,.5)",b.fillRect(0,0,$,w),b.globalAlpha=1,b.globalCompositeOperation="destination-out"):(b.fillStyle="rgba(0,0,0,.5)",b.fillRect(0,0,$,w)),b.beginPath(),b.fillStyle="white",o.is360){const t=function(){const t=[],e=u.width*u.ratio,i=u.height*u.ratio,n=a.getCoo(e/2,i/2).slice(0),s=[];for(let r=0;r<8;r++)s.push(r/8*e,0);for(let r=0;r<8;r++)s.push(e,r/8*i);for(let r=0;r<8;r++)s.push((1-r/8)*e,i);for(let r=0;r<8;r++)s.push(0,(1-r/8)*i);for(let r=0;r<s.length;r+=2){const e=a.getCoo(s[r],s[r+1]);(r>40||r<8)&&e[0]>n[0]?e[0]-=1:r>8&&r<40&&e[0]<n[0]&&(e[0]+=1),t.push(e[0],e[1])}return t}();b.moveTo(t[0]*$,t[1]*w);for(let e=2;e<t.length;e+=2)b.lineTo(t[e]*$,t[e+1]*w);b.closePath()}else i(3,T=a.isZoomedOut()),b.rect(Math.floor(t[0]*$),Math.floor(t[1]*w),Math.ceil((t[2]-t[0])*$),Math.ceil((t[3]-t[1])*w));r.thumbSrc&&(b.fill(),b.globalCompositeOperation="source-over"),b.stroke()}}const _=-1!=navigator.userAgent.indexOf("Firefox");let E,S,M=!1;function A(t){E&&a.setCoo(Math.max(0,Math.min(1,(t.clientX-E.left)/E.width)),Math.max(0,Math.min(1,(t.clientY-E.top)/E.height)))}function I(){window.removeEventListener("mousemove",A),window.removeEventListener("mouseup",I),i(4,M=!1)}function L(){i(2,k=!1),clearTimeout(S),S=setTimeout((()=>i(2,k=!0)),2500)}const P=.5-r.camera.trueNorth,N=self.crossOriginIsolated;let C=N?void 0:r.thumbSrc;const z={passive:!0};let D=!1;return rt((()=>{let t;b=y.getContext("2d"),b&&(b.lineWidth=1,b.strokeStyle="white"),N&&r.thumbSrc&&fetch(r.thumbSrc).then((t=>t.blob())).then((e=>i(15,C=t=URL.createObjectURL(e)))),c.canvas.element.addEventListener("mousemove",L,z);const e=r.state.view.subscribe(x);return setTimeout((()=>i(5,D=!0)),10),()=>{t&&URL.revokeObjectURL(t),c.canvas.element.removeEventListener("mousemove",L,z),I(),e()}})),t.$$set=t=>{"image"in t&&i(0,r=t.image)},t.$$.update=()=>{32768&t.$$.dirty[0]&&i(6,n=C?`background-image: url('${C}')`+(0!=P?`;background-position-x:${$*P}px`:""):null)},[r,y,k,T,M,D,n,s,d,f,g,$,w,function(t){a.zoom(t.deltaY*(_?50:1))},function(t){0==t.button&&(window.addEventListener("mousemove",A),window.addEventListener("mouseup",I),E=y.getClientRects()[0],A(t),i(4,M=!0))},C,function(t){ut[t?"unshift":"push"]((()=>{y=t,i(1,y)}))}]}class Qi extends Yt{constructor(t){super(),Gt(this,t,Ji,Ki,a,{image:0},null,[-1,-1])}}const tn=(null==navigator?void 0:navigator.language)??"en-EN",en="Intl"in self&&Intl.DisplayNames?new Intl.DisplayNames([tn],{type:"language"}):void 0,nn=["ar","ar-AE","ar-BH","ar-DJ","ar-DZ","ar-EG","ar-IQ","ar-JO","ar-KW","ar-LB","ar-LY","ar-MA","ar-OM","ar-QA","ar-SA","ar-SD","ar-SY","ar-TN","ar-YE","dv-MV","fa-AF","fa-IR","he","he-IL","iw","iw-PS","kd","ku-IQ","ku-IR","ku-SY","ku-TR","pk-PK","ps","ps-AF","sd-PK","syr-SY","ug","ug-CN","ur","ur-IN","ur-PK","yi","yi-IL","yi-US"];function sn(t){let e,i,n;const s=t[2].default,r=m(s,t,t[1],null);return{c(){e=N("div"),r&&r.c(),V(e,"class",i=$(t[0])+" micrio-button-group")},m(t,i){I(t,e,i),r&&r.m(e,null),n=!0},p(t,[o]){r&&r.p&&(!n||2&o)&&g(r,s,t,t[1],n?f(s,t[1],o,null):v(t[1]),null),(!n||1&o&&i!==(i=$(t[0])+" micrio-button-group"))&&V(e,"class",i)},i(t){n||(Lt(r,t),n=!0)},o(t){Pt(r,t),n=!1},d(t){t&&L(e),r&&r.d(t)}}}function rn(t,e,i){let{$$slots:n={},$$scope:s}=e,{className:r=""}=e;return t.$$set=t=>{"className"in t&&i(0,r=t.className),"$$scope"in t&&i(1,s=t.$$scope)},[r,s,n]}class on extends Yt{constructor(t){super(),Gt(this,t,rn,sn,a,{className:0})}}function an(t){let e,i,n=t[2]&&function(t){let e,i;return e=new Ui({props:{type:t[0]?"minimize":"maximize",title:t[1].fullscreenToggle}}),e.$on("click",t[3]),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};1&i&&(n.type=t[0]?"minimize":"maximize"),2&i&&(n.title=t[1].fullscreenToggle),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}(t);return{c(){n&&n.c(),e=O()},m(t,s){n&&n.m(t,s),I(t,e,s),i=!0},p(t,[e]){t[2]&&n.p(t,e)},i(t){i||(Lt(n),i=!0)},o(t){Pt(n),i=!1},d(t){t&&L(e),n&&n.d(t)}}}function ln(t,e,i){let n;h(t,Oe,(t=>i(1,n=t)));let{el:s}=e;const r="requestFullscreen"in s,o="webkitRequestFullscreen"in s,a=lt("micrio"),l=()=>r?document.fullscreenElement:document.webkitFullscreenElement;let c=l()==s;const d=r||o&&!l(),u=()=>new Promise((t=>setTimeout(t,500)));let m;const p=s==a&&!a.events.scrollHooked,f=()=>{i(0,c=l()==s),p&&(c?a.events.hookScroll():a.events.unhookScroll())};return d&&rt((()=>{const t=r?"fullscreenchange":"webkitfullscreenchange";return document.addEventListener(t,f),()=>document.removeEventListener(t,f)})),t.$$set=t=>{"el"in t&&i(4,s=t.el)},[c,n,d,function(){c?async function(){r?(await document.exitFullscreen().then(u),m&&m.requestFullscreen(),m=void 0):"webkitExitFullscreen"in document&&document.webkitExitFullscreen()}():async function(){r?(ie.safari&&(m=l())&&await document.exitFullscreen().then(u),s.requestFullscreen()):"webkitRequestFullscreen"in s&&s.webkitRequestFullscreen()}()},s]}class cn extends Yt{constructor(t){super(),Gt(this,t,ln,an,a,{el:4})}}function dn(t){let e,i,n,s;return e=new Ui({props:{type:"zoom-in",title:t[3].zoomIn,disabled:t[2]||t[0]}}),e.$on("click",t[4]),n=new Ui({props:{type:"zoom-out",title:t[3].zoomOut,disabled:t[2]||t[1]}}),n.$on("click",t[5]),{c(){qt(e.$$.fragment),i=D(),qt(n.$$.fragment)},m(t,r){Wt(e,t,r),I(t,i,r),Wt(n,t,r),s=!0},p(t,i){const s={};8&i&&(s.title=t[3].zoomIn),5&i&&(s.disabled=t[2]||t[0]),e.$set(s);const r={};8&i&&(r.title=t[3].zoomOut),6&i&&(r.disabled=t[2]||t[1]),n.$set(r)},i(t){s||(Lt(e.$$.fragment,t),Lt(n.$$.fragment,t),s=!0)},o(t){Pt(e.$$.fragment,t),Pt(n.$$.fragment,t),s=!1},d(t){t&&L(i),Xt(e,t),Xt(n,t)}}}function un(t){let e,i,n=(!t[0]||!t[1])&&dn(t);return{c(){n&&n.c(),e=O()},m(t,s){n&&n.m(t,s),I(t,e,s),i=!0},p(t,[i]){t[0]&&t[1]?n&&(At(),Pt(n,1,1,(()=>{n=null})),It()):n?(n.p(t,i),3&i&&Lt(n,1)):(n=dn(t),n.c(),Lt(n,1),n.m(e.parentNode,e))},i(t){i||(Lt(n),i=!0)},o(t){Pt(n),i=!1},d(t){t&&L(e),n&&n.d(t)}}}function hn(t,e,i){let n;h(t,Oe,(t=>i(3,n=t)));let{image:s}=e;const r=lt("micrio");let o=!1,a=!1;const l=()=>{r.events.clicked=!0};function c(){i(0,o=(null==s?void 0:s.camera.isZoomedIn())??!0),i(1,a=(null==s?void 0:s.camera.isZoomedOut(!0))??!0)}let d,u,m=!1;return rt((()=>(s?s.state.view.subscribe(c):u=r.current.subscribe((t=>{d&&(d(),d=void 0),i(2,m=!0),i(6,s=t)&&le(t.info).then((()=>{s&&(d=s.state.view.subscribe(c)),i(2,m=!1)}))})),()=>{u&&u(),d&&d()}))),t.$$set=t=>{"image"in t&&i(6,s=t.image)},[o,a,m,n,()=>{l(),null==s||s.camera.zoomIn().then((()=>r.events.clicked=!1))},()=>{l(),null==s||s.camera.zoomOut().then((()=>r.events.clicked=!1))},s]}class mn extends Yt{constructor(t){super(),Gt(this,t,hn,un,a,{image:6})}}function pn(t,e,i){const n=t.slice();return n[38]=e[i],n}function fn(t){let e,i,n,s,r,o,a,l,c=t[3]&&gn(t),d=t[0]&&t[4].length>1&&vn(t),u=t[1]&&"share"in navigator&&yn(t);r=new on({props:{$$slots:{default:[_n]},$$scope:{ctx:t}}});let h=t[5]&&t[8]&&En(t);return{c(){e=N("aside"),c&&c.c(),i=D(),d&&d.c(),n=D(),u&&u.c(),s=D(),qt(r.$$.fragment),o=D(),h&&h.c(),a=O(),V(e,"class","micrio-controls")},m(t,m){I(t,e,m),c&&c.m(e,null),S(e,i),d&&d.m(e,null),S(e,n),u&&u.m(e,null),S(e,s),Wt(r,e,null),S(e,o),h&&h.m(t,m),I(t,a,m),l=!0},p(t,o){t[3]?c?(c.p(t,o),8&o[0]&&Lt(c,1)):(c=gn(t),c.c(),Lt(c,1),c.m(e,i)):c&&(At(),Pt(c,1,1,(()=>{c=null})),It()),t[0]&&t[4].length>1?d?(d.p(t,o),17&o[0]&&Lt(d,1)):(d=vn(t),d.c(),Lt(d,1),d.m(e,n)):d&&(At(),Pt(d,1,1,(()=>{d=null})),It()),t[1]&&"share"in navigator?u?(u.p(t,o),2&o[0]&&Lt(u,1)):(u=yn(t),u.c(),Lt(u,1),u.m(e,s)):u&&(At(),Pt(u,1,1,(()=>{u=null})),It());const l={};420&o[0]|1024&o[1]&&(l.$$scope={dirty:o,ctx:t}),r.$set(l),t[5]&&t[8]?h?(h.p(t,o),288&o[0]&&Lt(h,1)):(h=En(t),h.c(),Lt(h,1),h.m(a.parentNode,a)):h&&(At(),Pt(h,1,1,(()=>{h=null})),It())},i(t){l||(Lt(c),Lt(d),Lt(u),Lt(r.$$.fragment,t),Lt(h),l=!0)},o(t){Pt(c),Pt(d),Pt(u),Pt(r.$$.fragment,t),Pt(h),l=!1},d(t){t&&(L(e),L(a)),c&&c.d(),d&&d.d(),u&&u.d(),Xt(r),h&&h.d(t)}}}function gn(t){let e,i;return e=new Ui({props:{type:t[12]?"volume-off":"volume-up",title:t[12]?t[13].audioUnmute:t[13].audioMute}}),e.$on("click",t[32]),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};4096&i[0]&&(n.type=t[12]?"volume-off":"volume-up"),12288&i[0]&&(n.title=t[12]?t[13].audioUnmute:t[13].audioMute),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function vn(t){let e,i,n;i=new Ui({props:{title:t[13].switchLanguage,type:"a11y"}});let s=Dt(t[4]),r=[];for(let a=0;a<s.length;a+=1)r[a]=wn(pn(t,s,a));const o=t=>Pt(r[t],1,1,(()=>{r[t]=null}));return{c(){e=N("menu"),qt(i.$$.fragment);for(let t=0;t<r.length;t+=1)r[t].c();V(e,"class","popout micrio-controls")},m(t,s){I(t,e,s),Wt(i,e,null);for(let i=0;i<r.length;i+=1)r[i]&&r[i].m(e,null);n=!0},p(t,n){const a={};if(8192&n[0]&&(a.title=t[13].switchLanguage),i.$set(a),208&n[0]){let i;for(s=Dt(t[4]),i=0;i<s.length;i+=1){const o=pn(t,s,i);r[i]?(r[i].p(o,n),Lt(r[i],1)):(r[i]=wn(o),r[i].c(),Lt(r[i],1),r[i].m(e,null))}for(At(),i=s.length;i<r.length;i+=1)o(i);It()}},i(t){if(!n){Lt(i.$$.fragment,t);for(let t=0;t<s.length;t+=1)Lt(r[t]);n=!0}},o(t){Pt(i.$$.fragment,t),r=r.filter(Boolean);for(let e=0;e<r.length;e+=1)Pt(r[e]);n=!1},d(t){t&&L(e),Xt(i),P(r,t)}}}function $n(t){let e,i=t[38].toUpperCase()+"";return{c(){e=z(i)},m(t,i){I(t,e,i)},p(t,n){16&n[0]&&i!==(i=t[38].toUpperCase()+"")&&Y(e,i)},d(t){t&&L(e)}}}function wn(t){let e,i;return e=new Ui({props:{title:(null==en?void 0:en.of(t[38]))??t[38],active:t[38]==t[6],$$slots:{default:[$n]},$$scope:{ctx:t}}}),e.$on("click",(function(){return t[33](t[38])})),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(i,n){t=i;const s={};16&n[0]&&(s.title=(null==en?void 0:en.of(t[38]))??t[38]),80&n[0]&&(s.active=t[38]==t[6]),16&n[0]|1024&n[1]&&(s.$$scope={dirty:n,ctx:t}),e.$set(s)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function yn(t){let e,i;return e=new Ui({props:{type:"share",title:t[13].share}}),e.$on("click",t[21]),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};8192&i[0]&&(n.title=t[13].share),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function bn(t){let e,i,n,s;const r=[Tn,kn],o=[];function a(t,e){return t[8]?0:1}return e=a(t),i=o[e]=r[e](t),{c(){i.c(),n=D()},m(t,i){o[e].m(t,i),I(t,n,i),s=!0},p(t,s){let l=e;e=a(t),e===l?o[e].p(t,s):(At(),Pt(o[l],1,1,(()=>{o[l]=null})),It(),i=o[e],i?i.p(t,s):(i=o[e]=r[e](t),i.c()),Lt(i,1),i.m(n.parentNode,n))},i(t){s||(Lt(i),s=!0)},o(t){Pt(i),s=!1},d(t){t&&L(n),o[e].d(t)}}}function kn(e){let i,n;return i=new mn({}),{c(){qt(i.$$.fragment)},m(t,e){Wt(i,t,e),n=!0},p:t,i(t){n||(Lt(i.$$.fragment,t),n=!0)},o(t){Pt(i.$$.fragment,t),n=!1},d(t){Xt(i,t)}}}function Tn(t){let e,i;return e=new mn({props:{image:t[8]}}),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};256&i[0]&&(n.image=t[8]),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function xn(t){let e,i;return e=new cn({props:{el:t[7]}}),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};128&i[0]&&(n.el=t[7]),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function _n(t){let e,i,n,s=t[5]&&bn(t),r=t[2]&&xn(t);return{c(){s&&s.c(),e=O(),r&&r.c(),i=O()},m(t,o){s&&s.m(t,o),I(t,e,o),r&&r.m(t,o),I(t,i,o),n=!0},p(t,n){t[5]?s?(s.p(t,n),32&n[0]&&Lt(s,1)):(s=bn(t),s.c(),Lt(s,1),s.m(e.parentNode,e)):s&&(At(),Pt(s,1,1,(()=>{s=null})),It()),t[2]?r?(r.p(t,n),4&n[0]&&Lt(r,1)):(r=xn(t),r.c(),Lt(r,1),r.m(i.parentNode,i)):r&&(At(),Pt(r,1,1,(()=>{r=null})),It())},i(t){n||(Lt(s),Lt(r),n=!0)},o(t){Pt(s),Pt(r),n=!1},d(t){t&&(L(e),L(i)),s&&s.d(t),r&&r.d(t)}}}function En(t){let e,i,n,s;return i=new on({props:{$$slots:{default:[Sn]},$$scope:{ctx:t}}}),{c(){e=N("aside"),qt(i.$$.fragment),V(e,"class","primary micrio-controls"),H(e,"portrait",t[9])},m(t,n){I(t,e,n),Wt(i,e,null),s=!0},p(t,n){const r={};1024&n[1]&&(r.$$scope={dirty:n,ctx:t}),i.$set(r),(!s||512&n[0])&&H(e,"portrait",t[9])},i(t){s||(Lt(i.$$.fragment,t),t&&$t((()=>{s&&(n||(n=zt(e,_e,{},!0)),n.run(1))})),s=!0)},o(t){Pt(i.$$.fragment,t),t&&(n||(n=zt(e,_e,{},!1)),n.run(0)),s=!1},d(t){t&&L(e),Xt(i),t&&n&&n.end()}}}function Sn(t){let e,i;return e=new mn({}),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function Mn(t){let e,i,n=t[10]&&fn(t);return{c(){n&&n.c(),e=O()},m(t,s){n&&n.m(t,s),I(t,e,s),i=!0},p(t,i){t[10]?n?(n.p(t,i),1024&i[0]&&Lt(n,1)):(n=fn(t),n.c(),Lt(n,1),n.m(e.parentNode,e)):n&&(At(),Pt(n,1,1,(()=>{n=null})),It())},i(t){i||(Lt(n),i=!0)},o(t){Pt(n),i=!1},d(t){t&&L(e),n&&n.d(t)}}}function An(e,i,n){let s,r,o,a,l,c,u,m,p,f,g,v,$,w,y,b,k,T=t;h(e,Oe,(t=>n(13,k=t))),e.$$.on_destroy.push((()=>T()));let{hasAudio:x=!1}=i;const _=lt("micrio"),{current:E,state:S,isMuted:M,_lang:A}=_;h(e,E,(t=>n(30,$=t))),h(e,M,(t=>n(12,b=t))),h(e,A,(t=>n(6,w=t)));const I=S.tour;h(e,I,(t=>n(29,v=t)));const{controls:L,zoom:P,hidden:N}=_.state.ui;let C,z;function D(t){const e=t.detail;n(9,z=_.canvas.viewport.portrait),e.opts.isPassive||n(8,C=e)}function O(){n(8,C=null)}h(e,L,(t=>n(28,g=t))),h(e,P,(t=>n(5,p=t))),h(e,N,(t=>n(27,f=t)));let R=!1,F=!1,U=!1;function V(t){var e,i;P.set(!t.noZoom),L.set(!t.noControls),n(0,R=!!(null==(i=null==(e=t.ui)?void 0:e.controls)?void 0:i.cultureSwitch)),n(1,F=!!t.social),n(2,U=!!t.fullscreen)}$&&V($.$settings),rt((()=>{let t;_.addEventListener("splitscreen-start",D),_.addEventListener("splitscreen-stop",O);const e=_.current.subscribe((e=>{e&&le(e.info).then((i=>{!i||v&&"steps"in v||(null==t||t(),t=e.settings.subscribe(V))}))}));return()=>{_.removeEventListener("splitscreen-start",D),_.removeEventListener("splitscreen-stop",O),null==t||t(),e()}}));return e.$$set=t=>{"hasAudio"in t&&n(22,x=t.hasAudio)},e.$$.update=()=>{var t;1073741824&e.$$.dirty[0]&&(n(11,s=null==$?void 0:$.info),T(),T=d(s,(t=>n(31,y=t)))),1073741888&e.$$.dirty[0]|1&e.$$.dirty[1]&&n(4,r=y&&$?$.isV5?Object.keys(y.revision??{[w]:0}):(null==(t="cultures"in y?y.cultures:"")?void 0:t.split(","))??[]:[]),536870912&e.$$.dirty[0]&&n(26,o=v&&"steps"in v&&v.isSerialTour),4194304&e.$$.dirty[0]&&n(3,a="micrioAudioContext"in window||x),17&e.$$.dirty[0]&&n(25,l=R&&r.length>1),2&e.$$.dirty[0]&&n(24,c=F&&"share"in navigator),67108868&e.$$.dirty[0]&&n(23,u=U&&!o),461373480&e.$$.dirty[0]&&n(10,m=g&&!f&&(a||l||c||p||u))},[R,F,U,a,r,p,w,_,C,z,m,s,b,k,E,M,A,I,L,P,N,function(){var t,e;if(navigator.share&&(null==$?void 0:$.$info)){const i=$.$data?(null==(t=$.$data)?void 0:t.i18n)?$.$data.i18n[w]:$.$data:void 0;navigator.share({title:null==(e=$.$info)?void 0:e.title,text:(null==i?void 0:i.description)||`${$.$info.width} x ${$.$info.height} | Micrio`,url:location.href})}},x,u,c,l,o,f,g,v,$,y,()=>M.set(!b),t=>n(7,_.lang=t,_)]}class In extends Yt{constructor(t){super(),Gt(this,t,An,Mn,a,{hasAudio:22},null,[-1,-1])}}class Ln{constructor(t,e){var i;this.image=t,this.data=e,this.timeline=[],this.playing=!1,this._paused=!0,this.wasPaused=!1,this.unhookEvents=!1,this.micrio=t.wasm.micrio,this.initialView=t.camera.getView();const n="timeline"in e?e:(null==(i=e.i18n)?void 0:i[u(this.micrio._lang)])??void 0;if(!n)throw new Error("No valid content for video tour!");this.content=n,this.unhookEvents=!e.keepInteraction&&this.micrio.events.$enabled,e.instance=this,this.read(),this.micrio.events.dispatch("videotour-start",this.data)}destroy(){this.unhookEvents&&this.micrio.events.enabled.set(!0),this.playing&&(this.image.camera.stop(),this.micrio.removeAttribute("data-videotour-playing"),this.micrio.events.dispatch("videotour-stop",this.data),this.playing=!1,delete this.startedAt,delete this.data.instance,this.startAt=void 0,clearTimeout(this._to))}read(){const t=!!this.data.i18n?1:this.content.duration,e=this.content.timeline;this.timeline.length=0;for(let i=0;i<e.length;i++){const n=e[i],s=e[i-1],r=s&&s.end*t||0;this.timeline.push({view:n.rect,start:1e3*r,duration:1e3*(n.start*t-r),pauseDuration:(n.end-n.start)*t*1e3})}this.startedAt&&!this.playing&&(this.progress=this.currentTime)}get duration(){return Number(this.content.duration)}set duration(t){this.content.duration=t}get paused(){return this._paused}get ended(){return this.currentTime>=this.duration}get currentTime(){return(this.pausedAt?this.pausedAt:this.startedAt?Date.now()-this.startedAt:0)/1e3}set currentTime(t){this.setProgress(t/this.content.duration)}get progress(){return this.currentTime/this.content.duration}set progress(t){this.setProgress(t)}play(){this.startedPlaying(),this.wasPaused=!1,this.pausedAt?(this.startedAt=Date.now()-this.pausedAt,this._paused=!1,this.gotoTime(this.pausedAt),this.pausedAt=void 0):this.playing||(this.startedAt=Date.now(),void 0===this.startAt?this.gotoStep(0,0):this.gotoTime(this.duration*this.startAt*1e3),this.startAt=void 0),this._paused=!1,this.playing=!0}pause(){this._paused||null==this.currentIndex||null==this.startedAt||(this._paused=!0,this.stoppedPlaying(),clearTimeout(this._to),this.currentIndex>=0&&this.image.camera.stop(),this.ended?this.reset():this.pausedAt=Date.now()-this.startedAt)}reset(){this.stoppedPlaying(),this.pausedAt=void 0,this.playing=!1,this.read()}gotoStep(t,e){if(null==this.startedAt)return;if(clearTimeout(this._to),!this.timeline[t])return void(this.paused&&this.wasPaused||(this._to=setTimeout((()=>this.pause()),Math.round(1e3*this.duration-(Date.now()-this.startedAt)))));const i=this.timeline[t],n=Math.round(i.start-(Date.now()-this.startedAt));this.currentIndex=t,this.image.camera.stop(),n>0?this._paused||(this._to=setTimeout((()=>this.startAni(e)),n)):this.startAni(e)}nextStep(){null!=this.currentIndex&&this.gotoStep(this.currentIndex+1)}getView(t){const e=this.timeline[t];return null==e?this.initialView??this.image.camera.getView():e.view}startAni(t=0){var e;if(null==this.currentIndex||isNaN(t))return;const i=this.timeline[this.currentIndex];if(null==i)return;const n=i.view,s=this.getView(this.currentIndex-1),r=null==(e=this.image.opts)?void 0:e.area;if(this.wasPaused&&s){const e=this.micrio.wasm.e.ease(t);this.image.camera.setView([s[0]*(1-e)+n[0]*e,s[1]*(1-e)+n[1]*e,s[2]*(1-e)+n[2]*e,s[3]*(1-e)+n[3]*e],{noLimit:!0,area:r}),this.nextStep()}else this.image.camera.flyToView(n,{duration:i.duration,progress:t,prevView:s,area:r}).then((()=>{null!=this.currentIndex&&i==this.timeline[this.currentIndex]&&this.nextStep()})).catch((()=>{}))}startedPlaying(){this.micrio.setAttribute("data-videotour-playing",""),this.micrio.events.dispatch("videotour-play"),this.unhookEvents&&this.micrio.events.enabled.set(!1)}stoppedPlaying(){this.micrio.removeAttribute("data-videotour-playing"),this.micrio.events.dispatch("videotour-pause"),this.unhookEvents&&this.micrio.events.enabled.set(!0)}setProgress(t){t=Math.max(0,Math.min(1,t)),this.wasPaused=!!this.paused||!this.playing,this.pause(),this.wasPaused||(this._paused=!1,this.startedPlaying());const e=this.duration*t*1e3;this.pausedAt=e,this.gotoTime(e),this.wasPaused?this.pause():(this.pausedAt=0,this._paused=!1)}gotoTime(t){let e=null,i=0;for(;i<this.timeline.length&&!(this.timeline[i].start>t);i++)e=this.timeline[i];if(i--,e||!(i>0))if(e){this.image.camera.stop();const n=e.duration>0?(t-e.start)/e.duration:0;this.startedAt=Date.now()-e.start-e.duration*n,isNaN(this.startedAt)&&(this.startedAt=Date.now()-t),n>1?(this.gotoStep(i+1),null!=e.view&&this.image.camera.setView(e.view,{noLimit:!0})):(i>0&&this.image.camera.setView(this.timeline[i-1].view,{noLimit:!0}),this.gotoStep(i,n))}else this.timeline.length&&this.image.camera.stop(),this.paused||this.gotoStep(0)}}function Pn(t,e,i){const n=t.slice();return n[8]=e[i],n}function Nn(t){let e,i,n=[],s=new Map,r=Dt(t[1]);const o=t=>t[8];for(let a=0;a<r.length;a+=1){let e=Pn(t,r,a),i=o(e);s.set(i,n[a]=Cn(i,e))}return{c(){for(let t=0;t<n.length;t+=1)n[t].c();e=O()},m(t,s){for(let e=0;e<n.length;e+=1)n[e]&&n[e].m(t,s);I(t,e,s),i=!0},p(t,i){3&i&&(r=Dt(t[1]),At(),n=Ft(n,i,o,0,t,r,s,e.parentNode,Rt,Cn,e,Pn),It())},i(t){if(!i){for(let t=0;t<r.length;t+=1)Lt(n[t]);i=!0}},o(t){for(let e=0;e<n.length;e+=1)Pt(n[e]);i=!1},d(t){t&&L(e);for(let e=0;e<n.length;e+=1)n[e].d(t)}}}function Cn(t,e){let i,n,s,r,o,a=e[8].data+"";return{key:t,first:null,c(){i=N("div"),n=N("p"),s=z(a),V(n,"class","micrio-subtitles"),V(i,"class","micrio-subtitles"),H(i,"raised",e[0]),this.first=i},m(t,e){I(t,i,e),S(i,n),S(n,s),o=!0},p(t,n){e=t,(!o||2&n)&&a!==(a=e[8].data+"")&&Y(s,a),(!o||1&n)&&H(i,"raised",e[0])},i(t){o||(t&&$t((()=>{o&&(r||(r=zt(i,_e,{},!0)),r.run(1))})),o=!0)},o(t){t&&(r||(r=zt(i,_e,{},!1)),r.run(0)),o=!1},d(t){t&&L(i),t&&r&&r.end()}}}function zn(t){let e,i,n=t[2]&&Nn(t);return{c(){n&&n.c(),e=O()},m(t,s){n&&n.m(t,s),I(t,e,s),i=!0},p(t,[i]){t[2]?n?(n.p(t,i),4&i&&Lt(n,1)):(n=Nn(t),n.c(),Lt(n,1),n.m(e.parentNode,e)):n&&(At(),Pt(n,1,1,(()=>{n=null})),It())},i(t){i||(Lt(n),i=!0)},o(t){Pt(n),i=!1},d(t){t&&L(e),n&&n.d(t)}}}window.MicrioVideoTour=Ln;const Dn="micrio-captions-disable",On=Ht("1"!=localStorage.getItem(Dn));function Rn(e,i,n){let s,r,o=t;h(e,On,(t=>n(2,r=t))),e.$$.on_destroy.push((()=>o()));let{src:a}=i,{raised:l=!1}=i;const c=[];fetch(a).then((t=>t.text())).then((t=>{const e=t.split("\n");for(let i=0;i<e.length;i++)if(/-->/.test(e[i])){let t=i+1;const n=[];for(;!e[t]&&t<e.length;)t++;for(;e[t]&&e[t].trim();)n.push(e[t++]);const[s,r]=e[i].split(" --\x3e ").map((t=>t.trim().replace(",",".").split(":").map(Number))).map((t=>3600*t[0]+60*t[1]+t[2]));c.push({start:s,end:r,data:n.join("\n")}),i+=n.length+1}}));const d=lt("micrio");let u=0;const m=t=>n(4,u=t.detail);return rt((()=>(d.addEventListener("timeupdate",m),()=>d.removeEventListener("timeupdate",m)))),e.$$set=t=>{"src"in t&&n(3,a=t.src),"raised"in t&&n(0,l=t.raised)},e.$$.update=()=>{16&e.$$.dirty&&n(1,s=c.filter((t=>t.start<=u&&t.end>=u)))},[l,s,r,a,u]}On.subscribe((t=>{t?localStorage.removeItem(Dn):localStorage.setItem(Dn,"1")}));class Fn extends Yt{constructor(t){super(),Gt(this,t,Rn,zn,a,{src:3,raised:0})}}function Un(t){let e,i,n,s,o,a,l,c,d=ae(t[2]||t[0]<=0?t[1]:(t[0]||0)-t[1])+"";const u=t[4].default,h=m(u,t,t[3],null);return{c(){e=N("div"),i=N("div"),h&&h.c(),n=N("div"),s=z(d),V(i,"class","bars micrio-progress-bar"),V(n,"class","time micrio-progress-bar"),V(e,"class","container micrio-progress-bar"),V(e,"style",o=`--progress: ${Math.round((t[0]||0)/t[1]*1e4)/100}%;--time: '${ae(t[0]||0)}';`)},m(r,o){I(r,e,o),S(e,i),h&&h.m(i,null),S(e,n),S(n,s),a=!0,l||(c=[R(e,"click",U(t[5])),R(e,"keydown",U(t[6]))],l=!0)},p(t,[i]){h&&h.p&&(!a||8&i)&&g(h,u,t,t[3],a?f(u,t[3],i,null):v(t[3]),null),(!a||7&i)&&d!==(d=ae(t[2]||t[0]<=0?t[1]:(t[0]||0)-t[1])+"")&&Y(s,d),(!a||3&i&&o!==(o=`--progress: ${Math.round((t[0]||0)/t[1]*1e4)/100}%;--time: '${ae(t[0]||0)}';`))&&V(e,"style",o)},i(t){a||(Lt(h,t),a=!0)},o(t){Pt(h,t),a=!1},d(t){t&&L(e),h&&h.d(t),l=!1,r(c)}}}function Vn(t,e,i){let{$$slots:n={},$$scope:s}=e,{currentTime:r=0}=e,{duration:o}=e,{ended:a=!1}=e;return t.$$set=t=>{"currentTime"in t&&i(0,r=t.currentTime),"duration"in t&&i(1,o=t.duration),"ended"in t&&i(2,a=t.ended),"$$scope"in t&&i(3,s=t.$$scope)},[r,o,a,s,n,function(e){ct.call(this,t,e)},function(e){ct.call(this,t,e)}]}class Bn extends Yt{constructor(t){super(),Gt(this,t,Vn,Un,a,{currentTime:0,duration:1,ended:2})}}function qn(t){let e,i,n;return{c(){e=C("svg"),i=C("circle"),V(i,"r","19"),V(i,"cx","21"),V(i,"cy","21"),V(i,"stroke-dashoffset",n=119.4*(1-t[0]/t[2])),V(i,"class","micrio-media-controls"),V(e,"height","42"),V(e,"width","42"),V(e,"class","micrio-media-controls")},m(t,n){I(t,e,n),S(e,i)},p(t,e){5&e&&n!==(n=119.4*(1-t[0]/t[2]))&&V(i,"stroke-dashoffset",n)},d(t){t&&L(e)}}}function Wn(t){let e,i=t[5]&&t[0]>0&&qn(t);return{c(){i&&i.c(),e=O()},m(t,n){i&&i.m(t,n),I(t,e,n)},p(t,n){t[5]&&t[0]>0?i?i.p(t,n):(i=qn(t),i.c(),i.m(e.parentNode,e)):i&&(i.d(1),i=null)},d(t){t&&L(e),i&&i.d(t)}}}function Xn(t){let e,i,n,s,r=t[10]&&Gn(t),o=t[8]&&Yn(t),a=!!t[7]&&jn(t);return{c(){r&&r.c(),e=D(),o&&o.c(),i=D(),a&&a.c(),n=O()},m(t,l){r&&r.m(t,l),I(t,e,l),o&&o.m(t,l),I(t,i,l),a&&a.m(t,l),I(t,n,l),s=!0},p(t,s){t[10]?r?(r.p(t,s),1024&s&&Lt(r,1)):(r=Gn(t),r.c(),Lt(r,1),r.m(e.parentNode,e)):r&&(At(),Pt(r,1,1,(()=>{r=null})),It()),t[8]?o?(o.p(t,s),256&s&&Lt(o,1)):(o=Yn(t),o.c(),Lt(o,1),o.m(i.parentNode,i)):o&&(At(),Pt(o,1,1,(()=>{o=null})),It()),t[7]?a?(a.p(t,s),128&s&&Lt(a,1)):(a=jn(t),a.c(),Lt(a,1),a.m(n.parentNode,n)):a&&(At(),Pt(a,1,1,(()=>{a=null})),It())},i(t){s||(Lt(r),Lt(o),Lt(a),s=!0)},o(t){Pt(r),Pt(o),Pt(a),s=!1},d(t){t&&(L(e),L(i),L(n)),r&&r.d(t),o&&o.d(t),a&&a.d(t)}}}function Gn(t){let e,i;return e=new Ui({props:{disabled:t[3],type:t[4]?"volume-off":"volume-up",title:t[4]?t[11].audioUnmute:t[11].audioMute}}),e.$on("click",t[19]),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};8&i&&(n.disabled=t[3]),16&i&&(n.type=t[4]?"volume-off":"volume-up"),2064&i&&(n.title=t[4]?t[11].audioUnmute:t[11].audioMute),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function Yn(t){let e,i;return e=new Ui({props:{type:t[12]?"subtitles":"subtitles-off",active:t[12],title:t[11].subtitlesToggle}}),e.$on("click",t[20]),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};4096&i&&(n.type=t[12]?"subtitles":"subtitles-off"),4096&i&&(n.active=t[12]),2048&i&&(n.title=t[11].subtitlesToggle),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function jn(t){let e,i;return e=new cn({props:{el:t[7]}}),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};128&i&&(n.el=t[7]),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function Hn(t){let e,i,n,s;function r(e){t[22](e)}function o(e){t[23](e)}let a={duration:t[2],$$slots:{default:[Zn]},$$scope:{ctx:t}};return void 0!==t[0]&&(a.currentTime=t[0]),void 0!==t[1]&&(a.ended=t[1]),e=new Bn({props:a}),ut.push((()=>Bt(e,"currentTime",r))),ut.push((()=>Bt(e,"ended",o))),{c(){qt(e.$$.fragment)},m(t,i){Wt(e,t,i),s=!0},p(t,s){const r={};4&s&&(r.duration=t[2]),134218245&s&&(r.$$scope={dirty:s,ctx:t}),!i&&1&s&&(i=!0,r.currentTime=t[0],wt((()=>i=!1))),!n&&2&s&&(n=!0,r.ended=t[1],wt((()=>n=!1))),e.$set(r)},i(t){s||(Lt(e.$$.fragment,t),s=!0)},o(t){Pt(e.$$.fragment,t),s=!1},d(t){Xt(e,t)}}}function Zn(t){let e,i,n,s;return{c(){e=N("div"),V(e,"class","bar active"),V(e,"style",i=`--perc:${t[0]/t[2]*100}%;`)},m(i,r){I(i,e,r),t[21](e),n||(s=R(e,"mousedown",t[14]),n=!0)},p(t,n){5&n&&i!==(i=`--perc:${t[0]/t[2]*100}%;`)&&V(e,"style",i)},d(i){i&&L(e),t[21](null),n=!1,s()}}}function Kn(t){let e,i,n,s,o,a,l,c;i=new Ui({props:{type:t[6]?"play":"pause",title:t[6]?t[11].play:t[11].pause,$$slots:{default:[Wn]},$$scope:{ctx:t}}}),i.$on("click",t[18]);let d=!t[5]&&Xn(t),u=!t[5]&&Hn(t);return{c(){e=N("aside"),qt(i.$$.fragment),n=D(),d&&d.c(),s=D(),u&&u.c(),o=O(),V(e,"class","micrio-media-controls")},m(r,h){I(r,e,h),Wt(i,e,null),S(e,n),d&&d.m(e,null),I(r,s,h),u&&u.m(r,h),I(r,o,h),a=!0,l||(c=[R(e,"click",U(t[16])),R(e,"keydown",U(t[17]))],l=!0)},p(t,[n]){const s={};64&n&&(s.type=t[6]?"play":"pause"),2112&n&&(s.title=t[6]?t[11].play:t[11].pause),134217765&n&&(s.$$scope={dirty:n,ctx:t}),i.$set(s),t[5]?d&&(At(),Pt(d,1,1,(()=>{d=null})),It()):d?(d.p(t,n),32&n&&Lt(d,1)):(d=Xn(t),d.c(),Lt(d,1),d.m(e,null)),t[5]?u&&(At(),Pt(u,1,1,(()=>{u=null})),It()):u?(u.p(t,n),32&n&&Lt(u,1)):(u=Hn(t),u.c(),Lt(u,1),u.m(o.parentNode,o))},i(t){a||(Lt(i.$$.fragment,t),Lt(d),Lt(u),a=!0)},o(t){Pt(i.$$.fragment,t),Pt(d),Pt(u),a=!1},d(t){t&&(L(e),L(s),L(o)),Xt(i),d&&d.d(),u&&u.d(t),l=!1,r(c)}}}function Jn(t,e,i){let n,s,r;h(t,Oe,(t=>i(11,s=t))),h(t,On,(t=>i(12,r=t)));let{currentTime:o=0}=e,{duration:a=0}=e,{seeking:l=!0}=e,{muted:c=!1}=e,{minimal:d=!1}=e,{volume:u}=e,{paused:m}=e,{ended:p}=e,{fullscreen:f}=e,{subtitles:g=!1}=e;const v=ot();let $;function w(t){const e=$.getClientRects()[0],i=Math.min(1,Math.max(0,(t.clientX-e.left)/e.width));v("seek",i*a)}function y(){window.removeEventListener("mousemove",w),window.removeEventListener("mouseup",y)}return t.$$set=t=>{"currentTime"in t&&i(0,o=t.currentTime),"duration"in t&&i(2,a=t.duration),"seeking"in t&&i(3,l=t.seeking),"muted"in t&&i(4,c=t.muted),"minimal"in t&&i(5,d=t.minimal),"volume"in t&&i(15,u=t.volume),"paused"in t&&i(6,m=t.paused),"ended"in t&&i(1,p=t.ended),"fullscreen"in t&&i(7,f=t.fullscreen),"subtitles"in t&&i(8,g=t.subtitles)},t.$$.update=()=>{32768&t.$$.dirty&&i(10,n=!isNaN(u))},[o,p,a,l,c,d,m,f,g,$,n,s,r,v,function(t){0==t.button&&(window.addEventListener("mousemove",w),window.addEventListener("mouseup",y),w(t))},u,function(e){ct.call(this,t,e)},function(e){ct.call(this,t,e)},()=>v("playpause"),()=>v("mute"),()=>On.set(!r),function(t){ut[t?"unshift":"push"]((()=>{$=t,i(9,$)}))},function(t){o=t,i(0,o)},function(t){p=t,i(1,p)}]}class Qn extends Yt{constructor(t){super(),Gt(this,t,Jn,Kn,a,{currentTime:0,duration:2,seeking:3,muted:4,minimal:5,volume:15,paused:6,ended:1,fullscreen:7,subtitles:8})}}function ts(t,e,i){let{events:n}=e,{currentTime:s=0}=e,{duration:r}=e;const o=lt("micrio");n.forEach((t=>{t.start=Number(t.start||0),t.end=Math.min(Number(t.end||0),r)}));const a=t=>n.forEach((e=>{const i=e.start<=t&&e.end>=t;i!=!!e.active&&(e.active=i,o.events.dispatch("tour-event",{...e}))}));var l;return l=()=>a(1/0),st().$$.on_destroy.push(l),t.$$set=t=>{"events"in t&&i(0,n=t.events),"currentTime"in t&&i(1,s=t.currentTime),"duration"in t&&i(2,r=t.duration)},t.$$.update=()=>{2&t.$$.dirty&&a(s)},[n,s,r]}let es=class extends Yt{constructor(t){super(),Gt(this,t,ts,null,a,{events:0,currentTime:1,duration:2})}};function is(t){var e;let i,n,s,r,o,a,l,c,d,u,h,m;let p=(f=t)[42]==f[40].IFrame?os:f[42]==f[40].Video?rs:f[42]!=f[40].Audio||f[44]?f[42]==f[40].Micrio&&f[43]?ns:void 0:ss;var f;let g=p&&p(t),v=(null==(e=t[33])?void 0:e.length)&&t[7]>0&&!t[34]&&cs(t),w=t[4]&&ds(t),y=t[14]&&us(t),b=t[26]&&hs(t);return{c(){i=N("figure"),n=N("div"),g&&g.c(),s=D(),v&&v.c(),r=D(),w&&w.c(),a=D(),y&&y.c(),c=D(),b&&b.c(),d=O(),V(n,"style",o=1==t[22]||t[42]!=t[40].Video&&t[37].is360?"":`transform:scale(${t[22]})`),V(n,"class","micrio-media"),H(n,"videotour",!!t[21]),V(i,"class",l=$(t[17])+" micrio-media"),V(i,"style",null),H(i,"paused",t[5]),H(i,"is360",t[15]),H(i,"media-video",t[42]==t[40].IFrame||t[42]==t[40].Video),H(i,"media-micrio",t[42]==t[40].Micrio)},m(e,o){var l;I(e,i,o),S(i,n),g&&g.m(n,null),S(n,s),v&&v.m(n,null),S(n,r),w&&w.m(n,null),S(i,a),y&&y.m(i,null),t[84](i),I(e,c,o),b&&b.m(e,o),I(e,d,o),u=!0,h||(m=R(n,"pointerup",(l=t[47],function(t){t.target===this&&l.call(this,t)})),h=!0)},p(t,e){var s;g&&g.p(t,e),(null==(s=t[33])?void 0:s.length)&&t[7]>0&&!t[34]?v?(v.p(t,e),128&e[0]|12&e[1]&&Lt(v,1)):(v=cs(t),v.c(),Lt(v,1),v.m(n,r)):v&&(At(),Pt(v,1,1,(()=>{v=null})),It()),t[4]?w?(w.p(t,e),16&e[0]&&Lt(w,1)):(w=ds(t),w.c(),Lt(w,1),w.m(n,null)):w&&(At(),Pt(w,1,1,(()=>{w=null})),It()),(!u||4194304&e[0]&&o!==(o=1==t[22]||t[42]!=t[40].Video&&t[37].is360?"":`transform:scale(${t[22]})`))&&V(n,"style",o),(!u||2097152&e[0])&&H(n,"videotour",!!t[21]),t[14]?y?y.p(t,e):(y=us(t),y.c(),y.m(i,null)):y&&(y.d(1),y=null),(!u||131072&e[0]&&l!==(l=$(t[17])+" micrio-media"))&&V(i,"class",l),(!u||131104&e[0])&&H(i,"paused",t[5]),(!u||163840&e[0])&&H(i,"is360",t[15]),(!u||131072&e[0]|2560&e[1])&&H(i,"media-video",t[42]==t[40].IFrame||t[42]==t[40].Video),(!u||131072&e[0]|2560&e[1])&&H(i,"media-micrio",t[42]==t[40].Micrio),t[26]?b?(b.p(t,e),67108864&e[0]&&Lt(b,1)):(b=hs(t),b.c(),Lt(b,1),b.m(d.parentNode,d)):b&&(At(),Pt(b,1,1,(()=>{b=null})),It())},i(t){u||(Lt(v),Lt(w),Lt(b),u=!0)},o(t){Pt(v),Pt(w),Pt(b),u=!1},d(e){e&&(L(i),L(c),L(d)),g&&g.d(),v&&v.d(),w&&w.d(),y&&y.d(),t[84](null),b&&b.d(e),h=!1,m()}}}function ns(e){let i;return{c(){i=N("micr-io"),X(i,"data-logo","false"),X(i,"id",e[43][0]),X(i,"width",e[43][1]),X(i,"height",e[43][2]),X(i,"lang",e[43][3]),X(i,"data-path",e[37].path)},m(t,e){I(t,i,e)},p:t,d(t){t&&L(i)}}}function ss(t){let e,i,n,s,o,a=!1,l=!0;function d(){cancelAnimationFrame(n),e.paused||(n=k(d),a=!0),t[69].call(e)}return{c(){e=N("audio"),c(e.src,i=t[23])||V(e,"src",i),e.controls=!1,void 0===t[7]&&$t((()=>t[67].call(e))),void 0===t[6]&&$t((()=>t[70].call(e)))},m(i,n){I(i,e,n),t[66](e),e.muted=t[1],s||(o=[R(e,"durationchange",t[67]),R(e,"volumechange",t[68]),R(e,"timeupdate",d),R(e,"seeking",t[70]),R(e,"seeked",t[70]),R(e,"play",t[71]),R(e,"pause",t[71]),R(e,"canplay",t[72]),R(e,"ended",t[50])],s=!0)},p(t,n){8388608&n[0]&&!c(e.src,i=t[23])&&V(e,"src",i),2&n[0]&&(e.muted=t[1]),!a&&256&n[0]&&!isNaN(t[8])&&(e.currentTime=t[8]),a=!1,32&n[0]&&l!==(l=t[5])&&e[l?"pause":"play"]()},d(i){i&&L(e),t[66](null),s=!1,r(o)}}}function rs(t){let e,i,n,s,o,a,l,c=!1,d=!0,u=t[23]&&as(t);function h(){cancelAnimationFrame(o),e.paused||(o=k(h),c=!0),t[63].call(e)}return{c(){e=N("video"),u&&u.c(),e.controls=!1,e.loop=i=t[11]&&(null==t[12]||t[12]<=0),e.playsInline=!0,V(e,"width",t[9]),V(e,"height",t[10]),V(e,"style",n=t[29]?"opacity: 0":void 0),e.autoplay=s=!!t[3],V(e,"class","micrio-media"),void 0===t[7]&&$t((()=>t[61].call(e))),void 0===t[6]&&$t((()=>t[64].call(e)))},m(i,n){I(i,e,n),u&&u.m(e,null),t[60](e),e.muted=t[1],a||(l=[R(e,"durationchange",t[61]),R(e,"volumechange",t[62]),R(e,"timeupdate",h),R(e,"seeking",t[64]),R(e,"seeked",t[64]),R(e,"play",t[65]),R(e,"pause",t[65]),R(e,"canplay",t[46]),R(e,"ended",t[50])],a=!0)},p(t,r){t[23]?u?u.p(t,r):(u=as(t),u.c(),u.m(e,null)):u&&(u.d(1),u=null),6144&r[0]&&i!==(i=t[11]&&(null==t[12]||t[12]<=0))&&(e.loop=i),512&r[0]&&V(e,"width",t[9]),1024&r[0]&&V(e,"height",t[10]),536870912&r[0]&&n!==(n=t[29]?"opacity: 0":void 0)&&V(e,"style",n),8&r[0]&&s!==(s=!!t[3])&&(e.autoplay=s),2&r[0]&&(e.muted=t[1]),!c&&256&r[0]&&!isNaN(t[8])&&(e.currentTime=t[8]),c=!1,32&r[0]&&d!==(d=t[5])&&e[d?"pause":"play"]()},d(i){i&&L(e),u&&u.d(),t[60](null),a=!1,r(l)}}}function os(t){let e,n,s=[{credentialless:!0},{title:t[13]},{src:n=t[23]},{width:t[32]},{height:t[31]},{frameborder:"0"},{allow:"fullscreen *;autoplay *;encrypted-media *"}],r={};for(let o=0;o<s.length;o+=1)r=i(r,s[o]);return{c(){e=N("iframe"),q(e,r),H(e,"hooked",t[24]&&!t[27]),H(e,"micrio-media",!0)},m(i,n){I(i,e,n),t[59](e)},p(t,i){q(e,r=Ut(s,[{credentialless:!0},8192&i[0]&&{title:t[13]},8388608&i[0]&&!c(e.src,n=t[23])&&{src:n},2&i[1]&&{width:t[32]},1&i[1]&&{height:t[31]},{frameborder:"0"},{allow:"fullscreen *;autoplay *;encrypted-media *"}])),H(e,"hooked",t[24]&&!t[27]),H(e,"micrio-media",!0)},d(i){i&&L(e),t[59](null)}}}function as(t){let e,i,n=t[19]&&t[23].endsWith(".webm"),s=n&&ls(t);return{c(){s&&s.c(),e=N("source"),c(e.src,i=t[23])||V(e,"src",i),V(e,"type",t[41]?"application/x-mpegURL":void 0)},m(t,i){s&&s.m(t,i),I(t,e,i)},p(t,r){8912896&r[0]&&(n=t[19]&&t[23].endsWith(".webm")),n?s?s.p(t,r):(s=ls(t),s.c(),s.m(e.parentNode,e)):s&&(s.d(1),s=null),8388608&r[0]&&!c(e.src,i=t[23])&&V(e,"src",i)},d(t){t&&L(e),s&&s.d(t)}}}function ls(t){let e,i;return{c(){e=N("source"),c(e.src,i=t[23].replace(".webm",".mp4"))||V(e,"src",i),V(e,"type","video/mp4;codecs=hvc1")},m(t,i){I(t,e,i)},p(t,n){8388608&n[0]&&!c(e.src,i=t[23].replace(".webm",".mp4"))&&V(e,"src",i)},d(t){t&&L(e)}}}function cs(t){let e,i,n,s;function r(e){t[73](e)}function o(e){t[74](e)}let a={events:t[33]};return void 0!==t[8]&&(a.currentTime=t[8]),void 0!==t[7]&&(a.duration=t[7]),e=new es({props:a}),ut.push((()=>Bt(e,"currentTime",r))),ut.push((()=>Bt(e,"duration",o))),{c(){qt(e.$$.fragment)},m(t,i){Wt(e,t,i),s=!0},p(t,s){const r={};4&s[1]&&(r.events=t[33]),!i&&256&s[0]&&(i=!0,r.currentTime=t[8],wt((()=>i=!1))),!n&&128&s[0]&&(n=!0,r.duration=t[7],wt((()=>n=!1))),e.$set(r)},i(t){s||(Lt(e.$$.fragment,t),s=!0)},o(t){Pt(e.$$.fragment,t),s=!1},d(t){Xt(e,t)}}}function ds(t){let e,i,n,s,r,o,a,l,c,d;function u(e){t[75](e)}function h(e){t[76](e)}function m(e){t[77](e)}function p(e){t[78](e)}function f(e){t[79](e)}function g(e){t[80](e)}function v(e){t[81](e)}let $={subtitles:!!t[45],fullscreen:t[15]||t[42]!=t[40].IFrame&&t[42]!=t[40].Video?t[16]:t[30]};return void 0!==t[5]&&($.paused=t[5]),void 0!==t[6]&&($.seeking=t[6]),void 0!==t[7]&&($.duration=t[7]),void 0!==t[8]&&($.currentTime=t[8]),void 0!==t[1]&&($.muted=t[1]),void 0!==t[0]&&($.volume=t[0]),void 0!==t[28]&&($.ended=t[28]),i=new Qn({props:$}),ut.push((()=>Bt(i,"paused",u))),ut.push((()=>Bt(i,"seeking",h))),ut.push((()=>Bt(i,"duration",m))),ut.push((()=>Bt(i,"currentTime",p))),ut.push((()=>Bt(i,"muted",f))),ut.push((()=>Bt(i,"volume",g))),ut.push((()=>Bt(i,"ended",v))),i.$on("playpause",t[47]),i.$on("mute",t[82]),i.$on("seek",t[83]),{c(){e=N("aside"),qt(i.$$.fragment),V(e,"class","micrio-media"),H(e,"inside","inside"==t[4])},m(t,n){I(t,e,n),Wt(i,e,null),d=!0},p(t,u){const h={};1073840128&u[0]&&(h.fullscreen=t[15]||t[42]!=t[40].IFrame&&t[42]!=t[40].Video?t[16]:t[30]),!n&&32&u[0]&&(n=!0,h.paused=t[5],wt((()=>n=!1))),!s&&64&u[0]&&(s=!0,h.seeking=t[6],wt((()=>s=!1))),!r&&128&u[0]&&(r=!0,h.duration=t[7],wt((()=>r=!1))),!o&&256&u[0]&&(o=!0,h.currentTime=t[8],wt((()=>o=!1))),!a&&2&u[0]&&(a=!0,h.muted=t[1],wt((()=>a=!1))),!l&&1&u[0]&&(l=!0,h.volume=t[0],wt((()=>l=!1))),!c&&268435456&u[0]&&(c=!0,h.ended=t[28],wt((()=>c=!1))),i.$set(h),(!d||16&u[0])&&H(e,"inside","inside"==t[4])},i(t){d||(Lt(i.$$.fragment,t),d=!0)},o(t){Pt(i.$$.fragment,t),d=!1},d(t){t&&L(e),Xt(i)}}}function us(t){let e;return{c(){e=N("figcaption"),V(e,"class","micrio-media")},m(i,n){I(i,e,n),e.innerHTML=t[14]},p(t,i){16384&i[0]&&(e.innerHTML=t[14])},d(t){t&&L(e)}}}function hs(t){let e,i,n,s,r;return i=new Ui({props:{title:t[35].play,type:"play"}}),{c(){e=N("div"),qt(i.$$.fragment),V(e,"class","show-play micrio-media")},m(o,a){I(o,e,a),Wt(i,e,null),n=!0,s||(r=R(e,"pointerup",t[48]),s=!0)},p(t,e){const n={};16&e[1]&&(n.title=t[35].play),i.$set(n)},i(t){n||(Lt(i.$$.fragment,t),n=!0)},o(t){Pt(i.$$.fragment,t),n=!1},d(t){t&&L(e),Xt(i),s=!1,r()}}}function ms(t){let e,i,n=!t[20].$settings.noUI&&is(t);return{c(){n&&n.c(),e=O()},m(t,s){n&&n.m(t,s),I(t,e,s),i=!0},p(t,i){t[20].$settings.noUI?n&&(At(),Pt(n,1,1,(()=>{n=null})),It()):n?(n.p(t,i),1048576&i[0]&&Lt(n,1)):(n=is(t),n.c(),Lt(n,1),n.m(e.parentNode,e))},i(t){i||(Lt(n),i=!0)},o(t){Pt(n),i=!1},d(t){t&&L(e),n&&n.d(t)}}}const ps=new Audio,fs=/((?:https?:)?\/\/)?((?:www|m)\.)?((?:youtube\.com|youtu.be|youtube-nocookie\.com))(\/(?:[\w\-]+\?v=|embed\/|v\/)?)([\w\-]+)(\S+)?/,gs="https://www.youtube-nocookie.com",vs=/vimeo\.com/,$s=/^.*t=(\d+).*$/;function ws(e,i,n){var s,r,o,a;let l,c,m,p,f,g,v,$,w=t,y=()=>(w(),w=d(W,(t=>n(34,v=t))),W);h(e,Oe,(t=>n(35,$=t))),e.$$.on_destroy.push((()=>w()));let{src:b}=i,{volume:k=1}=i,{width:T=640}=i,{height:x=380}=i,{frameScale:_=1}=i,{autoplay:E=!1}=i,{loop:S=!1}=i,{loopDelay:M}=i,{controls:A=!1}=i,{title:I}=i,{figcaption:L=null}=i,{paused:P=!0}=i,{forcePause:N}=i,{seeking:C=!0}=i,{duration:z=-1}=i,{currentTime:D=0}=i,{muted:O=0==k}=i;const R=O;let{is360:F=!1}=i,{tour:U=null}=i,{secondary:V=!1}=i,{fullscreen:B}=i,{className:q=null}=i,{destroying:W}=i;y();let{hasTransparentH265:X=!1}=i,{noPlayOverlay:G=!1}=i,{uuid:Y=""}=i;Y+=b??(null==U?void 0:U.id);const j=lt("micrio");let{image:H=u(j.current)}=i;const Z=H.$info,K=ot(),{events:J,state:Q,_lang:tt}=j;h(e,tt,(t=>n(58,f=t)));const et=lt("volume");h(e,et,(t=>n(96,g=t)));const it=0==g;let nt;const st=Q.mediaState.get(Y);st&&(D=st.currentTime,E=!(P=st.paused)),Q.mediaState.set(Y,{get currentTime(){return D},set currentTime(t){Vt(t)},get paused(){return P},set paused(t){t?Ut():Ft()}}),b&&/<iframe /.test(b)&&(b=b.replace(/^.* src="([^"]+)".*$/,"$1")),(null==b?void 0:b.startsWith("video://"))&&(b=b.replace("video:","https:"));var at=(t=>(t[t.None=0]="None",t[t.IFrame=1]="IFrame",t[t.Video=2]="Video",t[t.Audio=3]="Audio",t[t.VideoTour=4]="VideoTour",t[t.Micrio=5]="Micrio",t))(at||{});let ct=b;const dt=b&&b.startsWith("cfvid://"),ht=b&&b.toLowerCase(),mt=ht?ht.endsWith("mp3")?3:ht.endsWith(".mp4")||ht.endsWith(".webm")||dt?2:ht.startsWith("micrio://")?5:ht.startsWith("http")?1:0:U?4:0,pt=5==mt?null==b?void 0:b.slice(9).split(","):null;let ft,gt,vt,$t;pt&&(P=!1);let wt=-1,yt=!1;const bt=3==mt&&ie.iOS;let kt,{_media:Tt}=i;const xt=j.hasAttribute("data-native-frame"),_t=b&&fs.exec(b);if(b&&!xt&&_t&&_t[5])if("playlist"==_t[5]){const t=/list=([^&]+)/.exec(b);(null==t?void 0:t[1])&&(ct=`${gs}/embed/videoseries?list=${t[1]}`)}else{ft=1;const t=Math.round(($s.test(b)?Number(b.replace($s,"$1")):D)??0);ct=`${gs}/embed/${_t[5]}?autoplay=0&enablejsapi=1&controls=0&start=${t}`,yt=!0}if(!xt&&b&&vs.test(b)){const t=b.match(/\/(\d+)/);if(t&&t[1]){const e=b.slice(b.indexOf(t[1])+t[1].length+1).replace(/\?.*$/,"");ft=2,ct=`https://player.vimeo.com/video/${t[1]}?${e?`h=${e}&`:""}title=0&portrait=0&sidedock=0&byline=0&controls=0#t=`+Math.round(D)+"s",yt=!0}}let Et,St;dt&&b&&(Et=`https://videodelivery.net/${b.slice(8)}/manifest/video.m3u8`,ct=void 0),U&&(St=new Ln(H,U),D>0&&(St.currentTime=D),4==mt&&(z="duration"in U?Number(U.duration):(null==(r=null==(s=U.i18n)?void 0:s[f])?void 0:r.duration)??0,k=NaN)),(5==mt||1==mt&&!ft)&&(A=!1);const Mt=U&&!("steps"in U)?"subtitle"in U?U.subtitle:null==(a=null==(o=U.i18n)?void 0:o[j.lang])?void 0:a.subtitle:void 0,At=Mt&&("fileUrl"in Mt?Mt.fileUrl:Mt.src),It=lt("srt");function Lt(){n(6,C=!1),F&&H&&!H._video&&H.video.set(Tt)}let Pt=!1;function Nt(){n(26,Pt=!1),n(5,P=!1),St&&Tt&&(n(21,St.duration=Tt.duration,St),n(21,St.currentTime=Tt.currentTime,St),St.play())}const Ct=async()=>Tt?Tt.paused:St?P:gt?[-1,0,2].indexOf(gt.getPlayerState())>=0:1==ft?P:!!vt&&await vt.getPaused();let zt=!1,Dt=!1;const Ot=lt("mediaPaused");let Rt;async function Ft(t){if(!(t&&t instanceof PointerEvent&&0!=t.button)&&(!Dt||await Ct())){switch(n(28,Wt=!1),z>0&&D>=z&&n(8,D=0),!V&&At&&It.set(At),mt){case 4:n(5,P=n(6,C=!1)),St.play(),Gt();break;case 3:case 2:null==Tt||Tt.addEventListener("play",Nt,{once:!0}),null==Tt||Tt.play().catch((t=>{G?n(5,P=!0):/pause\(\)/.test(t.toString())||(n(26,Pt=!0),K("blocked"))}));break;case 1:switch(ft){case 1:gt&&gt.playVideo();break;case 2:vt&&vt.play()}break;default:return}Dt=!0,J.dispatch("media-play"),Ot.set(!1),K("play"),F||it||St&&!Tt||et.set(H.$settings.mutedVolume||0)}}function Ut(){J.dispatch("media-pause"),Ot.set(!0),Tt?(Tt.pause(),bt&&n(5,P=!0)):St?(St.pause(),n(5,P=!0),Yt()):(null==gt?void 0:gt.pauseVideo)&&!Kt?gt.pauseVideo():(null==vt?void 0:vt.pause)&&vt.pause()}function Vt(t){n(6,C=!0),Tt?n(2,Tt.currentTime=t,Tt):St?(n(8,D=n(21,St.currentTime=t,St)),n(6,C=!1)):(null==gt?void 0:gt.seekTo)?gt.seekTo(t):(null==vt?void 0:vt.setCurrentTime)&&vt.setCurrentTime(t)}function Bt(){St?(n(8,D=St.currentTime),St.ended&&Xt()):(null==gt?void 0:gt.getCurrentTime)&&n(8,D=gt.getCurrentTime()),qt()}function qt(){V||J.dispatch("timeupdate",D)}let Wt=!1;function Xt(){Wt||(St?Ut():(n(5,P=!0),Yt()),n(28,Wt=!0),J.dispatch("media-ended"),K("ended"),Zt())}function Gt(){wt>=0||(wt=setInterval(Bt,250),Bt())}function Yt(){clearInterval(wt),wt=-1}async function jt(){if(dt&&!Te(Tt))return oe("https://i.micr.io/hls-1.5.17.min.js",void 0,"Hls"in window?{}:void 0).then((()=>{$t=new window.Hls,$t.loadSource(Et),Tt&&$t.attachMedia(Tt)}));if(1==mt){if(1==ft)return async function(){if(!gt){if(window.YT||await oe("https://i.micr.io/youtube.js","onYouTubeIframeAPIReady"),window.YT)return n(6,C=!0),new Promise(((t,e)=>{gt=new window.YT.Player(kt,{host:gs,width:m.toString(),height:p.toString(),playerVars:{controls:0},events:{onError:e,onReady:()=>{Kt?e():(n(1,O=gt.isMuted()),n(7,z=gt.getDuration()),n(6,C=!1),t())},onStateChange:t=>{switch(t.data){case-1:n(27,zt=n(5,P=!0)),Yt();break;case 0:Xt();break;case 1:Gt(),n(27,zt=n(5,P=n(6,C=!1)));break;case 2:n(5,P=!0),Yt();break;case 3:Bt(),n(6,C=!0),Yt()}}}})}));n(24,yt=!1)}}();if(2==ft)return async function(){if(!vt){if(window.Vimeo||await oe("https://i.micr.io/vimeo.min.js"),window.Vimeo)return n(6,C=!0),new Promise(((t,e)=>{const i=vt=new window.Vimeo.Player(kt,{width:m.toString(),height:p.toString(),title:!1,autoplay:!1});i.on("error",e),i.on("loaded",(()=>i.getVolume().then((i=>{Kt?e():(n(1,O=0==n(0,k=i)),t())})))),i.on("play",(()=>n(5,P=n(6,C=!1)))),i.on("bufferstart",(()=>n(6,C=!0))),i.on("seeked",(()=>{n(6,C=!1)})),i.on("pause",(()=>n(5,P=!0))),i.on("volumechange",(t=>{t&&n(1,O=0==n(0,k=t.volume))})),i.on("timeupdate",(t=>{t&&(n(7,z=t.duration),n(8,D=t.seconds))})),i.on("ended",Xt)}));n(24,yt=!1)}}()}else Tt&&(dt&&n(23,ct=Et),function(){if(!Tt)return;n(2,Tt.ontimeupdate=qt,Tt),St&&(n(2,Tt.onpause=()=>St.pause(),Tt),n(2,Tt.onseeked=()=>{Tt&&!Tt.ended&&(n(21,St.currentTime=Tt.currentTime,St),Ht&&(Tt.pause(),Ht=!1))},Tt));D>0&&(Tt.duration>0?n(2,Tt.currentTime=D,Tt):n(2,Tt.oncanplay=()=>{Tt&&(n(2,Tt.oncanplay=null,Tt),E||(Tt.play(),Ht=!0),n(2,Tt.currentTime=nt,Tt))},Tt));const t=S&&void 0!==M?M:-1;t>0&&n(2,Tt.onended=()=>{clearTimeout(Rt),Rt=setTimeout((()=>{N||null==Tt||Tt.play()}),1e3*t)},Tt)}())}let Ht=!1;function Zt(){it||et.set(1)}let Kt=!1;const Jt=W&&W.subscribe((t=>t&&te())),Qt=()=>n(8,D=(null==Tt?void 0:Tt.currentTime)??0);function te(){if(!Kt)if(Kt=!0,Jt&&Jt(),F&&H&&H.video.set(void 0),Q.mediaState.delete(Y),Yt(),Ut(),Zt(),At&&It.set(void 0),Tt&&(n(2,Tt.onended=null,Tt),bt&&(n(2,Tt.onloadedmetadata=n(2,Tt.onplay=n(2,Tt.onseeking=n(2,Tt.onseeked=null,Tt),Tt),Tt),Tt),Tt.removeEventListener("timeupdate",Qt)),n(2,Tt.ontimeupdate=n(2,Tt.onpause=n(2,Tt.onseeked=n(2,Tt.oncanplay=null,Tt),Tt),Tt),Tt)),St)St.destroy();else if(vt)for(let t of["error","loaded","play","bufferstart","seeked","pause","volumechange","timeupdate","ended"])vt.off(t)}const ee=2==mt;let ne,se=ee&&dt&&1!=_&&ie.iOS;rt((()=>{K("id",Y),b&&bt&&(n(2,Tt=ps),n(2,Tt.controls=!1,Tt),n(2,Tt.onloadedmetadata=()=>n(7,z=(null==Tt?void 0:Tt.duration)??0),Tt),n(2,Tt.src=b,Tt),n(2,Tt.oncanplay=Lt,Tt),n(2,Tt.onended=Xt,Tt),Tt.addEventListener("timeupdate",Qt),n(2,Tt.onseeking=()=>n(6,C=!0),Tt),n(2,Tt.onseeked=()=>n(6,C=!1),Tt)),nt=D||0,n(24,yt=1==ft||2==ft),jt().then((()=>{E&&Ft()})).catch((()=>{})),se&&(null==Tt||Tt.addEventListener("playing",(()=>n(29,se=!1)),{once:!0}));const t=j.isMuted.subscribe((t=>function(t){R||(n(1,O=t),Tt?n(2,Tt.muted=t,Tt):(null==gt?void 0:gt.mute)?(t?gt.mute():gt.unMute(),setTimeout((()=>{gt&&n(1,O=gt.isMuted())}),50)):vt&&vt.setVolume(t?0:1))}(t)));return()=>{te(),t(),bt&&n(2,Tt=void 0),$t?$t.destroy():gt?gt.destroy():vt&&vt.destroy()}}));const re=Z.is360?Math.PI/2:1;return e.$$set=t=>{"src"in t&&n(51,b=t.src),"volume"in t&&n(0,k=t.volume),"width"in t&&n(9,T=t.width),"height"in t&&n(10,x=t.height),"frameScale"in t&&n(53,_=t.frameScale),"autoplay"in t&&n(3,E=t.autoplay),"loop"in t&&n(11,S=t.loop),"loopDelay"in t&&n(12,M=t.loopDelay),"controls"in t&&n(4,A=t.controls),"title"in t&&n(13,I=t.title),"figcaption"in t&&n(14,L=t.figcaption),"paused"in t&&n(5,P=t.paused),"forcePause"in t&&n(54,N=t.forcePause),"seeking"in t&&n(6,C=t.seeking),"duration"in t&&n(7,z=t.duration),"currentTime"in t&&n(8,D=t.currentTime),"muted"in t&&n(1,O=t.muted),"is360"in t&&n(15,F=t.is360),"tour"in t&&n(55,U=t.tour),"secondary"in t&&n(56,V=t.secondary),"fullscreen"in t&&n(16,B=t.fullscreen),"className"in t&&n(17,q=t.className),"destroying"in t&&y(n(18,W=t.destroying)),"hasTransparentH265"in t&&n(19,X=t.hasTransparentH265),"noPlayOverlay"in t&&n(57,G=t.noPlayOverlay),"uuid"in t&&n(52,Y=t.uuid),"image"in t&&n(20,H=t.image),"_media"in t&&n(2,Tt=t._media)},e.$$.update=()=>{var t,i;7&e.$$.dirty[0]&&Tt&&2==mt&&!O&&n(2,Tt.muted=0==k,Tt),8388608&e.$$.dirty[1]&&void 0!==N&&n(5,P=N),6144&e.$$.dirty[0]&&S&&void 0!==M&&clearTimeout(Rt),2097152&e.$$.dirty[0]|150994944&e.$$.dirty[1]&&n(33,l=St&&U?"events"in U?U.events:(null==(i=null==(t=U.i18n)?void 0:t[f])?void 0:i.events)??void 0:void 0),1536&e.$$.dirty[0]|4194304&e.$$.dirty[1]&&n(22,c=ee?_*re:1==mt?Math.max(_,Math.min(T/512,x/512)):1),4194816&e.$$.dirty[0]&&n(32,m=ee?T:Math.round(T/c*re)),4195328&e.$$.dirty[0]&&n(31,p=ee?x:Math.round(x/c*re))},[k,O,Tt,E,A,P,C,z,D,T,x,S,M,I,L,F,B,q,W,X,H,St,c,ct,yt,kt,Pt,zt,Wt,se,ne,p,m,l,v,$,j,Z,tt,et,at,dt,mt,pt,bt,At,Lt,function(t){t&&"button"in t&&0!=t.button||(P?Ft():Ut())},Ft,Vt,Xt,b,Y,_,N,U,V,G,f,function(t){ut[t?"unshift":"push"]((()=>{kt=t,n(25,kt)}))},function(t){ut[t?"unshift":"push"]((()=>{Tt=t,n(2,Tt),n(1,O),n(0,k)}))},function(){z=this.duration,n(7,z)},function(){O=this.muted,n(1,O)},function(){D=this.currentTime,n(8,D)},function(){C=this.seeking,n(6,C)},function(){P=this.paused,n(5,P),n(54,N)},function(t){ut[t?"unshift":"push"]((()=>{Tt=t,n(2,Tt),n(1,O),n(0,k)}))},function(){z=this.duration,n(7,z)},function(){O=this.muted,n(1,O)},function(){D=this.currentTime,n(8,D)},function(){C=this.seeking,n(6,C)},function(){P=this.paused,n(5,P),n(54,N)},()=>n(6,C=!1),function(t){D=t,n(8,D)},function(t){z=t,n(7,z)},function(t){P=t,n(5,P),n(54,N)},function(t){C=t,n(6,C)},function(t){z=t,n(7,z)},function(t){D=t,n(8,D)},function(t){O=t,n(1,O)},function(t){k=t,n(0,k)},function(t){Wt=t,n(28,Wt)},()=>j.isMuted.set(!O),t=>Vt(t.detail),function(t){ut[t?"unshift":"push"]((()=>{ne=t,n(30,ne)}))}]}class ys extends Yt{constructor(t){super(),Gt(this,t,ws,ms,a,{src:51,volume:0,width:9,height:10,frameScale:53,autoplay:3,loop:11,loopDelay:12,controls:4,title:13,figcaption:14,paused:5,forcePause:54,seeking:6,duration:7,currentTime:8,muted:1,is360:15,tour:55,secondary:56,fullscreen:16,className:17,destroying:18,hasTransparentH265:19,noPlayOverlay:57,uuid:52,image:20,_media:2},null,[-1,-1,-1,-1,-1])}}function bs(t){let e,i,n,s,o;const a=t[2].default,l=m(a,t,t[1],null);return{c(){e=N("article"),l&&l.c(),V(e,"class",i=$(t[0])+" micrio-article")},m(i,r){I(i,e,r),l&&l.m(e,null),n=!0,s||(o=[R(e,"click",U(t[3])),R(e,"keydown",ks),R(e,"pointerdown",ks)],s=!0)},p(t,[s]){l&&l.p&&(!n||2&s)&&g(l,a,t,t[1],n?f(a,t[1],s,null):v(t[1]),null),(!n||1&s&&i!==(i=$(t[0])+" micrio-article"))&&V(e,"class",i)},i(t){n||(Lt(l,t),n=!0)},o(t){Pt(l,t),n=!1},d(t){t&&L(e),l&&l.d(t),s=!1,r(o)}}}function ks(t){var e;t.target&&t.target instanceof HTMLAnchorElement&&!(null==(e=t.target.getAttribute("href"))?void 0:e.startsWith("#"))&&(t.target.target="_blank")}function Ts(t,e,i){let{$$slots:n={},$$scope:s}=e,{cn:r=null}=e;return t.$$set=t=>{"cn"in t&&i(0,r=t.cn),"$$scope"in t&&i(1,s=t.$$scope)},[r,s,n,function(e){ct.call(this,t,e)}]}class xs extends Yt{constructor(t){super(),Gt(this,t,Ts,bs,a,{cn:0})}}function _s(t,e,i){const n=t.slice();return n[23]=e[i],n}function Es(t){let e,i,n,s,r,o,a,l,c=t[6].title&&Ss(t),d=t[6].body&&t[14].primaryBodyFirst&&Ms(t),u=!t[13]&&((!t[6]||!t[6].embedUrl)&&t[2].videoTour||t[6]&&t[6].audio)&&Is(t),h=!t[5]&&t[2].images&&Ls(t),m=t[6].embedUrl&&!t[4]&&Cs(t),p=t[6].body&&!t[14].primaryBodyFirst&&Ds(t),f=t[6].bodySecondary&&Rs(t);return{c(){e=N("main"),c&&c.c(),i=D(),d&&d.c(),n=D(),u&&u.c(),s=D(),h&&h.c(),r=D(),m&&m.c(),o=D(),p&&p.c(),a=D(),f&&f.c(),V(e,"class","micrio-marker-content"),H(e,"empty",t[10])},m(g,v){I(g,e,v),c&&c.m(e,null),S(e,i),d&&d.m(e,null),S(e,n),u&&u.m(e,null),S(e,s),h&&h.m(e,null),S(e,r),m&&m.m(e,null),S(e,o),p&&p.m(e,null),S(e,a),f&&f.m(e,null),t[31](e),l=!0},p(t,g){t[6].title?c?c.p(t,g):(c=Ss(t),c.c(),c.m(e,i)):c&&(c.d(1),c=null),t[6].body&&t[14].primaryBodyFirst?d?(d.p(t,g),64&g[0]&&Lt(d,1)):(d=Ms(t),d.c(),Lt(d,1),d.m(e,n)):d&&(At(),Pt(d,1,1,(()=>{d=null})),It()),!t[13]&&((!t[6]||!t[6].embedUrl)&&t[2].videoTour||t[6]&&t[6].audio)?u?(u.p(t,g),68&g[0]&&Lt(u,1)):(u=Is(t),u.c(),Lt(u,1),u.m(e,s)):u&&(At(),Pt(u,1,1,(()=>{u=null})),It()),!t[5]&&t[2].images?h?h.p(t,g):(h=Ls(t),h.c(),h.m(e,r)):h&&(h.d(1),h=null),t[6].embedUrl&&!t[4]?m?(m.p(t,g),80&g[0]&&Lt(m,1)):(m=Cs(t),m.c(),Lt(m,1),m.m(e,o)):m&&(At(),Pt(m,1,1,(()=>{m=null})),It()),t[6].body&&!t[14].primaryBodyFirst?p?(p.p(t,g),64&g[0]&&Lt(p,1)):(p=Ds(t),p.c(),Lt(p,1),p.m(e,a)):p&&(At(),Pt(p,1,1,(()=>{p=null})),It()),t[6].bodySecondary?f?(f.p(t,g),64&g[0]&&Lt(f,1)):(f=Rs(t),f.c(),Lt(f,1),f.m(e,null)):f&&(At(),Pt(f,1,1,(()=>{f=null})),It()),(!l||1024&g[0])&&H(e,"empty",t[10])},i(t){l||(Lt(d),Lt(u),Lt(m),Lt(p),Lt(f),l=!0)},o(t){Pt(d),Pt(u),Pt(m),Pt(p),Pt(f),l=!1},d(i){i&&L(e),c&&c.d(),d&&d.d(),u&&u.d(),h&&h.d(),m&&m.d(),p&&p.d(),f&&f.d(),t[31](null)}}}function Ss(t){let e,i,n=t[6].title+"";return{c(){e=N("h1"),i=z(n),V(e,"class","micrio-marker-content")},m(n,s){I(n,e,s),S(e,i),t[27](e)},p(t,e){64&e[0]&&n!==(n=t[6].title+"")&&Y(i,n)},d(i){i&&L(e),t[27](null)}}}function Ms(t){let e,i;return e=new xs({props:{$$slots:{default:[As]},$$scope:{ctx:t}}}),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};64&i[0]|256&i[1]&&(n.$$scope={dirty:i,ctx:t}),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function As(t){let e,i,n=t[6].body+"";return{c(){e=new K(!1),i=O(),e.a=i},m(t,s){e.m(n,t,s),I(t,i,s)},p(t,i){64&i[0]&&n!==(n=t[6].body+"")&&e.p(n)},d(t){t&&(L(i),e.d())}}}function Is(t){let e,i,n;function s(e){t[28](e)}let r={src:t[9],destroying:t[3],noPlayOverlay:!0,image:t[23],uuid:t[2].id,tour:t[2].videoTour,autoplay:t[2].audioAutoPlay||!t[6].audio&&!!t[2].videoTour,controls:!t[2].videoTour||!t[6]||!t[6].embedUrl};return void 0!==t[7].audio&&(r.paused=t[7].audio),e=new ys({props:r}),ut.push((()=>Bt(e,"paused",s))),e.$on("ended",t[18]),{c(){qt(e.$$.fragment)},m(t,i){Wt(e,t,i),n=!0},p(t,n){const s={};512&n[0]&&(s.src=t[9]),8&n[0]&&(s.destroying=t[3]),4&n[0]&&(s.uuid=t[2].id),4&n[0]&&(s.tour=t[2].videoTour),68&n[0]&&(s.autoplay=t[2].audioAutoPlay||!t[6].audio&&!!t[2].videoTour),68&n[0]&&(s.controls=!t[2].videoTour||!t[6]||!t[6].embedUrl),!i&&128&n[0]&&(i=!0,s.paused=t[7].audio,wt((()=>i=!1))),e.$set(s)},i(t){n||(Lt(e.$$.fragment,t),n=!0)},o(t){Pt(e.$$.fragment,t),n=!1},d(t){Xt(e,t)}}}function Ls(t){let e,i=Dt(t[2].images),n=[];for(let s=0;s<i.length;s+=1)n[s]=Ns(_s(t,i,s));return{c(){e=N("section");for(let t=0;t<n.length;t+=1)n[t].c();V(e,"class","micrio-marker-content")},m(t,i){I(t,e,i);for(let s=0;s<n.length;s+=1)n[s]&&n[s].m(e,null)},p(t,s){if(7536900&s[0]){let r;for(i=Dt(t[2].images),r=0;r<i.length;r+=1){const o=_s(t,i,r);n[r]?n[r].p(o,s):(n[r]=Ns(o),n[r].c(),n[r].m(e,null))}for(;r<n.length;r+=1)n[r].d(1);n.length=i.length}},d(t){t&&L(e),P(n,t)}}}function Ps(t){let e,i;return{c(){e=N("figcaption"),i=z(t[8]),V(e,"class","micrio-marker-content")},m(t,n){I(t,e,n),S(e,i)},p(t,e){256&e[0]&&Y(i,t[8])},d(t){t&&L(e)}}}function Ns(t){let e,i,n,s,r,a,l,d,u,h,m=t[8]&&Ps(t);function p(){return t[29](t[23])}return{c(){e=N("button"),i=N("figure"),n=N("img"),a=D(),m&&m.c(),d=D(),V(n,"alt",s=t[22](t[23])),c(n.src,r=t[23].micrioId?`https://iiif.${t[21]?"micrio.dev":"micr.io"}/${t[23].micrioId}/full/${t[17]?"^"+Math.min(t[23].width,640)+",":"^,320"}/0/default.webp`:t[23].src)||V(n,"src",r),V(n,"class","micrio-marker-content"),V(i,"class","micrio-marker-content"),V(e,"title",l=t[22](t[23])),V(e,"class","micrio-marker-content")},m(s,r){I(s,e,r),S(e,i),S(i,n),S(i,a),m&&m.m(i,null),I(s,d,r),u||(h=R(e,"click",(function(){o(t[16]?p:void 0)&&(t[16]?p:void 0).apply(this,arguments)})),u=!0)},p(o,a){t=o,4&a[0]&&s!==(s=t[22](t[23]))&&V(n,"alt",s),4&a[0]&&!c(n.src,r=t[23].micrioId?`https://iiif.${t[21]?"micrio.dev":"micr.io"}/${t[23].micrioId}/full/${t[17]?"^"+Math.min(t[23].width,640)+",":"^,320"}/0/default.webp`:t[23].src)&&V(n,"src",r),t[8]?m?m.p(t,a):(m=Ps(t),m.c(),m.m(i,null)):m&&(m.d(1),m=null),4&a[0]&&l!==(l=t[22](t[23]))&&V(e,"title",l)},d(t){t&&(L(e),L(d)),m&&m.d(),u=!1,h()}}}function Cs(t){let e,i,n,s,r=!t[6].audio&&t[2].videoTour&&zs(t);function o(e){t[30](e)}let a={image:t[23],src:t[6].embedUrl,uuid:t[2].id,width:400,height:240,controls:!0,title:t[6].embedTitle,figcaption:t[6].embedDescription,autoplay:t[19],destroying:t[3]};return void 0!==t[7].video&&(a.paused=t[7].video),i=new ys({props:a}),ut.push((()=>Bt(i,"paused",o))),i.$on("ended",t[18]),{c(){r&&r.c(),e=D(),qt(i.$$.fragment)},m(t,n){r&&r.m(t,n),I(t,e,n),Wt(i,t,n),s=!0},p(t,s){!t[6].audio&&t[2].videoTour?r?(r.p(t,s),68&s[0]&&Lt(r,1)):(r=zs(t),r.c(),Lt(r,1),r.m(e.parentNode,e)):r&&(At(),Pt(r,1,1,(()=>{r=null})),It());const o={};64&s[0]&&(o.src=t[6].embedUrl),4&s[0]&&(o.uuid=t[2].id),64&s[0]&&(o.title=t[6].embedTitle),64&s[0]&&(o.figcaption=t[6].embedDescription),8&s[0]&&(o.destroying=t[3]),!n&&128&s[0]&&(n=!0,o.paused=t[7].video,wt((()=>n=!1))),i.$set(o)},i(t){s||(Lt(r),Lt(i.$$.fragment,t),s=!0)},o(t){Pt(r),Pt(i.$$.fragment,t),s=!1},d(t){t&&L(e),r&&r.d(t),Xt(i,t)}}}function zs(t){let e,i;return e=new ys({props:{image:t[23],className:"hidden",uuid:t[2].id,tour:t[2].videoTour,autoplay:t[15],secondary:!0,destroying:t[3]}}),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};4&i[0]&&(n.uuid=t[2].id),4&i[0]&&(n.tour=t[2].videoTour),8&i[0]&&(n.destroying=t[3]),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function Ds(t){let e,i;return e=new xs({props:{$$slots:{default:[Os]},$$scope:{ctx:t}}}),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};64&i[0]|256&i[1]&&(n.$$scope={dirty:i,ctx:t}),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function Os(t){let e,i,n=t[6].body+"";return{c(){e=new K(!1),i=O(),e.a=i},m(t,s){e.m(n,t,s),I(t,i,s)},p(t,i){64&i[0]&&n!==(n=t[6].body+"")&&e.p(n)},d(t){t&&(L(i),e.d())}}}function Rs(t){let e,i;return e=new xs({props:{cn:"secondary",$$slots:{default:[Fs]},$$scope:{ctx:t}}}),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};64&i[0]|256&i[1]&&(n.$$scope={dirty:i,ctx:t}),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function Fs(t){let e,i,n=t[6].bodySecondary+"";return{c(){e=new K(!1),i=O(),e.a=i},m(t,s){e.m(n,t,s),I(t,i,s)},p(t,i){64&i[0]&&n!==(n=t[6].bodySecondary+"")&&e.p(n)},d(t){t&&(L(i),e.d())}}}function Us(t){let e,i,n=t[6]&&Es(t);return{c(){n&&n.c(),e=O()},m(t,s){n&&n.m(t,s),I(t,e,s),i=!0},p(t,i){t[6]?n?(n.p(t,i),64&i[0]&&Lt(n,1)):(n=Es(t),n.c(),Lt(n,1),n.m(e.parentNode,e)):n&&(At(),Pt(n,1,1,(()=>{n=null})),It())},i(t){i||(Lt(n),i=!0)},o(t){Pt(n),i=!1},d(t){t&&L(e),n&&n.d(t)}}}function Vs(t,e,i){var n,s,r,o;let a,l,c,d,u,m,p,{marker:f}=e,{destroying:g}=e,{noEmbed:v=!1}=e,{noImages:$=!1}=e,{noGallery:w=!1}=e,{_content:y=null}=e,{_title:b=null}=e;const k=ot(),T=lt("micrio"),x=T._lang;h(t,x,(t=>i(26,m=t)));const _=T.state.tour;h(t,_,(t=>i(32,p=t)));const E=p&&"steps"in p&&p.isSerialTour,S=lt("markerImages").get(f),M=S.$settings._markers??{},A=!M.preventAutoPlay,I=!(null==(n=f.data)?void 0:n.preventImageOpen)&&!w,L=1==(null==(s=f.images)?void 0:s.length);null==(r=f.images)||r.length;const P={audio:!A||!f.audioAutoPlay,video:!1===f.embedAutoPlay||!A||!(!(null==a?void 0:a.audio)||!f.audioAutoPlay)},N=!P.video;function C(t){I&&T.state.popover.set({gallery:f.images,galleryStart:t,image:S})}const z=null==(o=S.tileBase)?void 0:o.includes("micrio.dev");return t.$$set=t=>{"marker"in t&&i(2,f=t.marker),"destroying"in t&&i(3,g=t.destroying),"noEmbed"in t&&i(4,v=t.noEmbed),"noImages"in t&&i(5,$=t.noImages),"noGallery"in t&&i(24,w=t.noGallery),"_content"in t&&i(0,y=t._content),"_title"in t&&i(1,b=t._title)},t.$$.update=()=>{var e,n,s,r,o,h,p;67108868&t.$$.dirty[0]&&i(6,a=f.i18n?f.i18n[m]:f),68&t.$$.dirty[0]&&i(10,l=!((null==a?void 0:a.title)||(null==a?void 0:a.audio)||f.images&&f.images.length||(null==a?void 0:a.embedUrl)||f.videoTour||(null==a?void 0:a.body)||(null==a?void 0:a.bodySecondary))),67108932&t.$$.dirty[0]&&i(25,c=(null==(s=null==(n=null==(e=f.videoTour)?void 0:e.i18n)?void 0:n[m])?void 0:s.audio)??(null==a?void 0:a.audio)),33554432&t.$$.dirty[0]&&i(9,d=c?"fileUrl"in c?c.fileUrl:c.src:void 0),67108868&t.$$.dirty[0]&&i(8,u=L&&(null==(p=null==(h=null==(o=null==(r=f.images)?void 0:r[0])?void 0:o.i18n)?void 0:h[m])?void 0:p.description))},[y,b,f,g,v,$,a,P,u,d,l,x,_,E,M,A,I,L,()=>{p&&"steps"in p&&(p.isSerialTour||M.tourAutoProgress)&&k("close")},N,C,z,t=>{var e,i;return null==(i=null==(e=t.i18n)?void 0:e[m])?void 0:i.title},S,w,c,m,function(t){ut[t?"unshift":"push"]((()=>{b=t,i(1,b)}))},function(e){t.$$.not_equal(P.audio,e)&&(P.audio=e,i(7,P))},t=>C(t.micrioId),function(e){t.$$.not_equal(P.video,e)&&(P.video=e,i(7,P))},function(t){ut[t?"unshift":"push"]((()=>{y=t,i(0,y)}))}]}class Bs extends Yt{constructor(t){super(),Gt(this,t,Vs,Us,a,{marker:2,destroying:3,noEmbed:4,noImages:5,noGallery:24,_content:0,_title:1},null,[-1,-1])}}function qs(t){let e,i,n,s,r;return s=new on({props:{className:"micrio-tour-controls",$$slots:{default:[Ws]},$$scope:{ctx:t}}}),{c(){e=N("progress"),n=D(),qt(s.$$.fragment),V(e,"aria-hidden",!0),e.value=i=(t[10]+1)/t[3].steps.length,V(e,"class","progress micrio-marker-popup")},m(t,i){I(t,e,i),I(t,n,i),Wt(s,t,i),r=!0},p(t,n){(!r||1032&n[0]&&i!==(i=(t[10]+1)/t[3].steps.length))&&(e.value=i);const o={};5160&n[0]|1&n[1]&&(o.$$scope={dirty:n,ctx:t}),s.$set(o)},i(t){r||(Lt(s.$$.fragment,t),r=!0)},o(t){Pt(s.$$.fragment,t),r=!1},d(t){t&&(L(e),L(n)),Xt(s,t)}}}function Ws(t){let e,i,n,s,r;e=new Ui({props:{type:"arrow-left",disabled:t[5]||0==t[10],title:t[12].tourStepPrev}}),e.$on("click",t[19]);let o=t[15].tourControlsInPopup&&function(t){let e,i,n,s,r=t[10]+1+"",o=t[3].steps.length+"";return{c(){e=N("button"),i=z(r),n=z(" / "),s=z(o),V(e,"class","micrio-button tour-step micrio-marker-popup"),e.disabled=!0},m(t,r){I(t,e,r),S(e,i),S(e,n),S(e,s)},p(t,e){1024&e[0]&&r!==(r=t[10]+1+"")&&Y(i,r),8&e[0]&&o!==(o=t[3].steps.length+"")&&Y(s,o)},d(t){t&&L(e)}}}(t);return s=new Ui({props:{type:"arrow-right",disabled:t[5]||t[10]+1==t[3].steps.length,title:t[12].tourStepNext}}),s.$on("click",t[20]),{c(){qt(e.$$.fragment),i=D(),o&&o.c(),n=D(),qt(s.$$.fragment)},m(t,a){Wt(e,t,a),I(t,i,a),o&&o.m(t,a),I(t,n,a),Wt(s,t,a),r=!0},p(t,i){const n={};1056&i[0]&&(n.disabled=t[5]||0==t[10]),4096&i[0]&&(n.title=t[12].tourStepPrev),e.$set(n),t[15].tourControlsInPopup&&o.p(t,i);const r={};1064&i[0]&&(r.disabled=t[5]||t[10]+1==t[3].steps.length),4096&i[0]&&(r.title=t[12].tourStepNext),s.$set(r)},i(t){r||(Lt(e.$$.fragment,t),Lt(s.$$.fragment,t),r=!0)},o(t){Pt(e.$$.fragment,t),Pt(s.$$.fragment,t),r=!1},d(t){t&&(L(i),L(n)),Xt(e,t),o&&o.d(t),Xt(s,t)}}}function Xs(t){let e,i,n,s,r,o,a,l,c,d,u=!t[16].alwaysOpen&&function(t){let e,i;return e=new Ui({props:{type:!t[2]||t[9]?"close":"arrow-right",title:!t[2]||t[9]?t[12].closeMarker:t[12].tourStepNext,disabled:t[5]}}),e.$on("click",t[18]),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};516&i[0]&&(n.type=!t[2]||t[9]?"close":"arrow-right"),4612&i[0]&&(n.title=!t[2]||t[9]?t[12].closeMarker:t[12].tourStepNext),32&i[0]&&(n.disabled=t[5]),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}(t),h=t[17]&&function(t){let e,i;return e=new Ui({props:{type:"arrow-down",title:t[12].minimize}}),e.$on("click",t[21]),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};4096&i[0]&&(n.title=t[12].minimize),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}(t),m=t[1]&&t[3]&&"steps"in t[3]&&qs(t);function p(e){t[23](e)}function f(e){t[24](e)}let g={marker:t[0],destroying:t[22]};return void 0!==t[7]&&(g._content=t[7]),void 0!==t[8]&&(g._title=t[8]),o=new Bs({props:g}),ut.push((()=>Bt(o,"_content",p))),ut.push((()=>Bt(o,"_title",f))),o.$on("close",t[18]),{c(){e=N("div"),i=N("aside"),u&&u.c(),n=D(),h&&h.c(),s=D(),m&&m.c(),r=D(),qt(o.$$.fragment),V(i,"class","micrio-marker-popup"),V(e,"class","micrio-marker-popup"),H(e,"destroying",t[11]),H(e,"minimized",t[6])},m(a,l){I(a,e,l),S(e,i),u&&u.m(i,null),S(i,n),h&&h.m(i,null),S(i,s),m&&m.m(i,null),S(e,r),Wt(o,e,null),t[25](e),d=!0},p(n,s){(t=n)[16].alwaysOpen||u.p(t,s),t[17]&&h.p(t,s),t[1]&&t[3]&&"steps"in t[3]?m?(m.p(t,s),10&s[0]&&Lt(m,1)):(m=qs(t),m.c(),Lt(m,1),m.m(i,null)):m&&(At(),Pt(m,1,1,(()=>{m=null})),It());const r={};1&s[0]&&(r.marker=t[0]),!a&&128&s[0]&&(a=!0,r._content=t[7],wt((()=>a=!1))),!l&&256&s[0]&&(l=!0,r._title=t[8],wt((()=>l=!1))),o.$set(r),(!d||2048&s[0])&&H(e,"destroying",t[11]),(!d||64&s[0])&&H(e,"minimized",t[6])},i(i){d||(Lt(u),Lt(h),Lt(m),Lt(o.$$.fragment,i),i&&$t((()=>{d&&(c||(c=zt(e,Ee,t[15].popupAnimation,!0)),c.run(1))})),d=!0)},o(i){Pt(u),Pt(h),Pt(m),Pt(o.$$.fragment,i),i&&(c||(c=zt(e,Ee,t[15].popupAnimation,!1)),c.run(0)),d=!1},d(i){i&&L(e),u&&u.d(),h&&h.d(),m&&m.d(),Xt(o),t[25](null),i&&c&&c.end()}}}function Gs(t,e,i){let n,s,r,o,a,l,c,d;h(t,Oe,(t=>i(12,d=t)));let{marker:u}=e;const m=lt("micrio"),{current:p}=m;h(t,p,(t=>i(26,l=t)));const f=m.state.tour;h(t,f,(t=>i(3,a=t)));const g=lt("markerImages").get(u),v=g.$settings._markers??{},$=u.data||{},w=v.canMinimizePopup;let y;let b=!1;let k,T,x=!1;const _=new WeakMap,E=Ht(!1);return h(t,E,(t=>i(11,c=t))),rt((()=>{var t;u.tags.forEach((t=>y.classList.add(t))),setTimeout((()=>{var t;return null==(t=y.querySelector("button"))?void 0:t.focus()}),500);const e="embedImages"in u?u.embedImages:void 0;return e&&(null==(t=m.$current)||t.data.update((t=>(t||(t={embeds:[]}),t.embeds=[...t.embeds??[],...e],t)))),()=>{var t;m.state.popup.subscribe((t=>E.set(t!=u))),e&&(null==(t=m.$current)||t.data.update((t=>(null==t?void 0:t.embeds)?(t.embeds=t.embeds.filter((t=>!e.find((e=>e.id==t.id)))),t):t)))}})),t.$$set=t=>{"marker"in t&&i(0,u=t.marker)},t.$$.update=()=>{9&t.$$.dirty[0]&&i(2,n=a&&"steps"in a&&a.steps.findIndex((t=>t.startsWith(u.id)))>=0),12&t.$$.dirty[0]&&i(1,s=a&&"steps"in a&&n&&!a.isSerialTour&&v.tourControlsInPopup),8&t.$$.dirty[0]&&i(10,r=(a&&"steps"in a?a.currentStep:void 0)??-1),10&t.$$.dirty[0]&&i(9,o=s||a&&"steps"in a&&a.currentStep==a.steps.length-1)},[u,s,n,a,y,b,x,k,T,o,r,c,d,p,f,v,$,w,function(t){var e,i;a&&n&&"steps"in a?t instanceof Event&&o?f.set(void 0):null==(e=a.next)||e.call(a):l&&!g.opts.secondaryTo&&l.id!=g.id&&(null==(i=$.micrioLink)?void 0:i.id)==l.id?(m.open(g.id),g.state.marker.set(void 0),m.state.popup.set(void 0)):g.state.marker.set(void 0)},()=>{var t;a&&"steps"in a&&(null==(t=a.prev)||t.call(a),i(5,b=!0))},()=>{var t;a&&"steps"in a&&(null==(t=a.next)||t.call(a),i(5,b=!0))},()=>{i(6,x=!x);for(let t=0;t<k.children.length;t++){const e=k.children[t];e instanceof HTMLElement&&e!=T&&(_.has(e)||(_.set(e,e.offsetHeight),e.style.height=e.offsetHeight+"px"),setTimeout((()=>{e.style.height=x?"0px":_.get(e)+"px"}),100))}},E,function(t){k=t,i(7,k)},function(t){T=t,i(8,T)},function(t){ut[t?"unshift":"push"]((()=>{y=t,i(4,y)}))}]}class Ys extends Yt{constructor(t){super(),Gt(this,t,Gs,Xs,a,{marker:0},null,[-1,-1])}}function js(t,e,i){const n=t.slice();return n[46]=e[i],n[48]=i,n}function Hs(t,e,i){const n=t.slice();return n[49]=e[i],n[48]=i,n}function Zs(t){let e,i=Dt(t[13]),n=[];for(let s=0;s<i.length;s+=1)n[s]=Ks(Hs(t,i,s));return{c(){e=N("ol");for(let t=0;t<n.length;t+=1)n[t].c();V(e,"class","micrio-serial-tour")},m(t,i){I(t,e,i);for(let s=0;s<n.length;s+=1)n[s]&&n[s].m(e,null)},p(t,s){if(8921120&s[0]){let r;for(i=Dt(t[13]),r=0;r<i.length;r+=1){const o=Hs(t,i,r);n[r]?n[r].p(o,s):(n[r]=Ks(o),n[r].c(),n[r].m(e,null))}for(;r<n.length;r+=1)n[r].d(1);n.length=i.length}},d(t){t&&L(e),P(n,t)}}}function Ks(t){let e,i=t[23](t[49].marker),n=i&&function(t){let e,i,n,s;function r(){return t[27](t[48])}return{c(){e=N("li"),i=N("button"),i.textContent=`${t[23](t[49].marker)}`,V(i,"class","micrio-serial-tour"),V(e,"class","micrio-serial-tour"),H(e,"active",t[5]&&t[5].chapter==t[48]),H(e,"enriched",t[49].imageHasOtherMarkers)},m(t,o){I(t,e,o),S(e,i),n||(s=R(i,"click",r),n=!0)},p(i,n){t=i,32&n[0]&&H(e,"active",t[5]&&t[5].chapter==t[48])},d(t){t&&L(e),n=!1,s()}}}(t);return{c(){n&&n.c(),e=D()},m(t,i){n&&n.m(t,i),I(t,e,i)},p(t,e){i&&n.p(t,e)},d(t){t&&L(e),n&&n.d(t)}}}function Js(t){let e,i,n,s;function r(e){t[28](e)}function o(e){t[29](e)}let a={tour:t[1],src:t[9],autoplay:!t[2]};return void 0!==t[4]&&(a.muted=t[4]),void 0!==t[5].currentTime&&(a.currentTime=t[5].currentTime),e=new ys({props:a}),ut.push((()=>Bt(e,"muted",r))),ut.push((()=>Bt(e,"currentTime",o))),e.$on("id",t[30]),e.$on("ended",t[21]),e.$on("play",t[31]),e.$on("blocked",t[32]),{c(){qt(e.$$.fragment)},m(t,i){Wt(e,t,i),s=!0},p(t,s){const r={};2&s[0]&&(r.tour=t[1]),512&s[0]&&(r.src=t[9]),4&s[0]&&(r.autoplay=!t[2]),!i&&16&s[0]&&(i=!0,r.muted=t[4],wt((()=>i=!1))),!n&&32&s[0]&&(n=!0,r.currentTime=t[5].currentTime,wt((()=>n=!1))),e.$set(r)},i(t){s||(Lt(e.$$.fragment,t),s=!0)},o(t){Pt(e.$$.fragment,t),s=!1},d(t){Xt(e,t)}}}function Qs(t){let e,i;return e=new Ui({props:{type:t[11]?"subtitles":"subtitles-off",active:t[11],title:t[10].subtitlesToggle}}),e.$on("click",t[33]),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};2048&i[0]&&(n.type=t[11]?"subtitles":"subtitles-off"),2048&i[0]&&(n.active=t[11]),1024&i[0]&&(n.title=t[10].subtitlesToggle),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function tr(t){let e,i=t[46].duration>0&&function(t){let e,i,n,s;function o(...e){return t[34](t[48],...e)}function a(...e){return t[35](t[48],...e)}return{c(){e=N("div"),V(e,"class","bar"),V(e,"title",t[23](t[46].marker)),V(e,"role","progressbar"),V(e,"style",i=`width:${t[46].duration/t[16]*100}%; --perc: ${t[12][t[48]]||0}%`),H(e,"active",t[48]==t[0].currentStep)},m(t,i){I(t,e,i),n||(s=[R(e,"click",o),R(e,"keypress",a)],n=!0)},p(n,s){t=n,4096&s[0]&&i!==(i=`width:${t[46].duration/t[16]*100}%; --perc: ${t[12][t[48]]||0}%`)&&V(e,"style",i),1&s[0]&&H(e,"active",t[48]==t[0].currentStep)},d(t){t&&L(e),n=!1,r(s)}}}(t);return{c(){i&&i.c(),e=O()},m(t,n){i&&i.m(t,n),I(t,e,n)},p(t,e){t[46].duration>0&&i.p(t,e)},d(t){t&&L(e),i&&i.d(t)}}}function er(t){let e,i=Dt(t[13]),n=[];for(let s=0;s<i.length;s+=1)n[s]=tr(js(t,i,s));return{c(){for(let t=0;t<n.length;t+=1)n[t].c();e=O()},m(t,i){for(let e=0;e<n.length;e+=1)n[e]&&n[e].m(t,i);I(t,e,i)},p(t,s){if(8990721&s[0]){let r;for(i=Dt(t[13]),r=0;r<i.length;r+=1){const o=js(t,i,r);n[r]?n[r].p(o,s):(n[r]=tr(o),n[r].c(),n[r].m(e.parentNode,e))}for(;r<n.length;r+=1)n[r].d(1);n.length=i.length}},d(t){t&&L(e),P(n,t)}}}function ir(t){let e,i,n,s,r,o,a=t[0].printChapters&&Zs(t),l=t[1]&&t[5]&&Js(t),c=t[17]&&function(t){let e,i,n,s,r,o,a;e=new Ui({props:{type:t[2]?"play":"pause",title:t[2]?t[10].play:t[10].pause}}),e.$on("click",t[18]),n=new Ui({props:{type:t[4]?"volume-off":"volume-up",title:t[4]?t[10].audioUnmute:t[10].audioMute}}),n.$on("click",t[20]);let l=t[8]&&Qs(t);return o=new cn({props:{el:t[14]}}),{c(){qt(e.$$.fragment),i=D(),qt(n.$$.fragment),s=D(),l&&l.c(),r=D(),qt(o.$$.fragment)},m(t,c){Wt(e,t,c),I(t,i,c),Wt(n,t,c),I(t,s,c),l&&l.m(t,c),I(t,r,c),Wt(o,t,c),a=!0},p(t,i){const s={};4&i[0]&&(s.type=t[2]?"play":"pause"),1028&i[0]&&(s.title=t[2]?t[10].play:t[10].pause),e.$set(s);const o={};16&i[0]&&(o.type=t[4]?"volume-off":"volume-up"),1040&i[0]&&(o.title=t[4]?t[10].audioUnmute:t[10].audioMute),n.$set(o),t[8]?l?(l.p(t,i),256&i[0]&&Lt(l,1)):(l=Qs(t),l.c(),Lt(l,1),l.m(r.parentNode,r)):l&&(At(),Pt(l,1,1,(()=>{l=null})),It())},i(t){a||(Lt(e.$$.fragment,t),Lt(n.$$.fragment,t),Lt(l),Lt(o.$$.fragment,t),a=!0)},o(t){Pt(e.$$.fragment,t),Pt(n.$$.fragment,t),Pt(l),Pt(o.$$.fragment,t),a=!1},d(t){t&&(L(i),L(s),L(r)),Xt(e,t),Xt(n,t),l&&l.d(t),Xt(o,t)}}}(t),d=t[17]&&function(t){let e,i,n,s;function r(e){t[36](e)}function o(e){t[37](e)}let a={duration:t[16],$$slots:{default:[er]},$$scope:{ctx:t}};return void 0!==t[6]&&(a.currentTime=t[6]),void 0!==t[3]&&(a.ended=t[3]),e=new Bn({props:a}),ut.push((()=>Bt(e,"currentTime",r))),ut.push((()=>Bt(e,"ended",o))),{c(){qt(e.$$.fragment)},m(t,i){Wt(e,t,i),s=!0},p(t,s){const r={};4097&s[0]|1048576&s[1]&&(r.$$scope={dirty:s,ctx:t}),!i&&64&s[0]&&(i=!0,r.currentTime=t[6],wt((()=>i=!1))),!n&&8&s[0]&&(n=!0,r.ended=t[3],wt((()=>n=!1))),e.$set(r)},i(t){s||(Lt(e.$$.fragment,t),s=!0)},o(t){Pt(e.$$.fragment,t),s=!1},d(t){Xt(e,t)}}}(t);return{c(){a&&a.c(),e=D(),i=N("aside"),l&&l.c(),n=D(),c&&c.c(),s=D(),d&&d.c(),r=O(),V(i,"class","micrio-media-controls micrio-serial-tour")},m(t,u){a&&a.m(t,u),I(t,e,u),I(t,i,u),l&&l.m(i,null),S(i,n),c&&c.m(i,null),I(t,s,u),d&&d.m(t,u),I(t,r,u),o=!0},p(t,s){t[0].printChapters?a?a.p(t,s):(a=Zs(t),a.c(),a.m(e.parentNode,e)):a&&(a.d(1),a=null),t[1]&&t[5]?l?(l.p(t,s),34&s[0]&&Lt(l,1)):(l=Js(t),l.c(),Lt(l,1),l.m(i,n)):l&&(At(),Pt(l,1,1,(()=>{l=null})),It()),t[17]&&c.p(t,s),t[17]&&d.p(t,s)},i(t){o||(Lt(l),Lt(c),Lt(d),o=!0)},o(t){Pt(l),Pt(c),Pt(d),o=!1},d(t){t&&(L(e),L(i),L(s),L(r)),a&&a.d(t),l&&l.d(),c&&c.d(),d&&d.d(t)}}}function nr(t,e,i){var n,s;let r,o,a,l,c,d,m,p;h(t,Oe,(t=>i(10,d=t))),h(t,On,(t=>i(11,m=t)));let{tour:f}=e;const g=f.stepInfo,v=ot(),$=lt("micrio"),w=$._lang;h(t,w,(t=>i(26,c=t)));const y=$.$current,b=$.state.marker,k=y.$settings,T=!!(null==(s=null==(n=null==k?void 0:k.ui)?void 0:n.controls)?void 0:s.serialTourNoTimeScrub),x=g.reduce(((t,e)=>t+e.duration),0)??0,_="controls"in f?!1!==f.controls:!f.noControls;let E,S,M,A=!1,I=!1,L=u($.isMuted),P=0;function N(t,e){if(!f.goto)return;const n=t==f.currentStep;if(T&&n)return;n||f.goto(t);const s=!T&&e?e.offsetX/e.target.offsetWidth:0;g.forEach(((i,n)=>i.ended=!e&&n<t)),C();const r=g[t];r.currentTime=s*r.duration,n&&(null==E?void 0:E.instance)&&i(1,E.instance.currentTime=r.currentTime,E),D(t)}function C(){var t;null==(t=f.stepInfo)||t.forEach((t=>t.currentTime=0))}const z=Ht([]);function D(t=f.currentStep??0){const e=g.map(((e,i)=>i<t||e.ended||I?100:i==t?Math.round((e.currentTime||0)/e.duration*1e4)/100:0));i(6,P=e.reduce(((t,e,i)=>t+e/100*g[i].duration),0)),z.set(e)}function O(t){const e=t&&!!f.steps.find((e=>e.startsWith(t.id)));i(1,E=void 0),e&&t.videoTour&&setTimeout((()=>{const e=g[f.currentStep??0];e.markerId==t.id&&(e.ended=!1,i(5,S=e),i(1,E=t.videoTour),D())}),10)}h(t,z,(t=>i(12,p=t)));rt((()=>{const t=()=>D();$.addEventListener("timeupdate",t);const e=b.subscribe(O);return()=>{e(),$.removeEventListener("timeupdate",t),C()}}));return t.$$set=t=>{"tour"in t&&i(0,f=t.tour)},t.$$.update=()=>{var e,n,s,d;67108866&t.$$.dirty[0]&&i(25,r=E?"audio"in E?E.audio:null==(n=null==(e=E.i18n)?void 0:e[c])?void 0:n.audio:void 0),33554432&t.$$.dirty[0]&&i(9,o=r?"fileUrl"in r?r.fileUrl:r.src:void 0),67108866&t.$$.dirty[0]&&i(24,a=E?"subtitle"in E?E.subtitle:null==(d=null==(s=E.i18n)?void 0:s[c])?void 0:d.subtitle:void 0),16777216&t.$$.dirty[0]&&i(8,l=a?"fileUrl"in a?a.fileUrl:a.src:void 0)},[f,E,A,I,L,S,P,M,l,o,d,m,p,g,$,w,x,_,function(){const t=$.state.mediaState.get(M);t&&i(2,A=t.paused=!t.paused),A?($.events.dispatch("serialtour-pause",f),$.events.enabled.set(!0)):($.events.dispatch("serialtour-play",f),$.events.enabled.set(!1))},N,function(){$.isMuted.set(i(4,L=!L))},function(){const t=S;t&&(t.ended=!0),null!=f.currentStep&&f.currentStep<f.steps.length-1&&f.next?f.next():(i(2,A=i(3,I=!0)),v("ended")),vt().then((()=>{C(),t&&(t.ended=!1)}))},z,t=>{var e;return t.i18n?null==(e=t.i18n[c])?void 0:e.title:t.title},a,r,c,t=>N(t),function(t){L=t,i(4,L)},function(e){t.$$.not_equal(S.currentTime,e)&&(S.currentTime=e,i(5,S))},t=>i(7,M=t.detail),()=>i(2,A=!1),()=>i(2,A=!0),()=>On.set(!m),(t,e)=>N(t,e),(t,e)=>{"Enter"===e.key&&N(t)},function(t){P=t,i(6,P)},function(t){I=t,i(3,I)}]}class sr extends Yt{constructor(t){super(),Gt(this,t,nr,ir,a,{tour:0},null,[-1,-1])}}function rr(t,e,i){const n=t.slice();return n[54]=e[i],n}function or(t){let e,i,n;function s(e){t[31](e)}let r={tour:t[2],src:t[8],autoplay:!0};return void 0!==t[6]&&(r.currentTime=t[6]),e=new ys({props:r}),ut.push((()=>Bt(e,"currentTime",s))),e.$on("ended",t[22]),{c(){qt(e.$$.fragment)},m(t,i){Wt(e,t,i),n=!0},p(t,n){const s={};4&n[0]&&(s.tour=t[2]),256&n[0]&&(s.src=t[8]),!i&&64&n[0]&&(i=!0,s.currentTime=t[6],wt((()=>i=!1))),e.$set(s)},i(t){n||(Lt(e.$$.fragment,t),n=!0)},o(t){Pt(e.$$.fragment,t),n=!1},d(t){Xt(e,t)}}}function ar(t){let e,i,n,s;const r=[dr,cr,lr],o=[];function a(t,e){return t[16]&&"steps"in t[0]?0:t[18]?1:t[2]?2:-1}return~(e=a(t))&&(i=o[e]=r[e](t)),{c(){i&&i.c(),n=O()},m(t,i){~e&&o[e].m(t,i),I(t,n,i),s=!0},p(t,s){let l=e;e=a(t),e===l?~e&&o[e].p(t,s):(i&&(At(),Pt(o[l],1,1,(()=>{o[l]=null})),It()),~e?(i=o[e],i?i.p(t,s):(i=o[e]=r[e](t),i.c()),Lt(i,1),i.m(n.parentNode,n)):i=null)},i(t){s||(Lt(i),s=!0)},o(t){Pt(i),s=!1},d(t){t&&L(n),~e&&o[e].d(t)}}}function lr(t){let e,i,n;function s(e){t[30](e)}let r={tour:t[2],src:t[8],autoplay:!0};return void 0!==t[6]&&(r.currentTime=t[6]),e=new ys({props:r}),ut.push((()=>Bt(e,"currentTime",s))),e.$on("ended",t[22]),{c(){qt(e.$$.fragment)},m(t,i){Wt(e,t,i),n=!0},p(t,n){const s={};4&n[0]&&(s.tour=t[2]),256&n[0]&&(s.src=t[8]),!i&&64&n[0]&&(i=!0,s.currentTime=t[6],wt((()=>i=!1))),e.$set(s)},i(t){n||(Lt(e.$$.fragment,t),n=!0)},o(t){Pt(e.$$.fragment,t),n=!1},d(t){Xt(e,t)}}}function cr(t){let e,i,n,s,r,o;const a=[hr,ur],l=[];function c(t,e){return"steps"in t[0]?0:1}i=c(t),n=l[i]=a[i](t);let d=!t[0].cannotClose&&gr(t);return{c(){e=N("div"),n.c(),s=D(),d&&d.c(),V(e,"class","micrio-tour"),H(e,"left",t[14]),H(e,"serial-tour",t[14]),H(e,"video-tour",t[15]),H(e,"no-controls",t[17]),H(e,"minimized",!t[7]&&(t[10]||t[5]))},m(t,n){I(t,e,n),l[i].m(e,null),S(e,s),d&&d.m(e,null),o=!0},p(t,r){let u=i;i=c(t),i===u?l[i].p(t,r):(At(),Pt(l[u],1,1,(()=>{l[u]=null})),It(),n=l[i],n?n.p(t,r):(n=l[i]=a[i](t),n.c()),Lt(n,1),n.m(e,s)),t[0].cannotClose?d&&(At(),Pt(d,1,1,(()=>{d=null})),It()):d?(d.p(t,r),1&r[0]&&Lt(d,1)):(d=gr(t),d.c(),Lt(d,1),d.m(e,null)),(!o||1184&r[0])&&H(e,"minimized",!t[7]&&(t[10]||t[5]))},i(t){o||(Lt(n),Lt(d),t&&(r||$t((()=>{r=Ct(e,_e,{duration:200}),r.start()}))),o=!0)},o(t){Pt(n),Pt(d),o=!1},d(t){t&&L(e),l[i].d(),d&&d.d()}}}function dr(t){let e,i,n,s,r=Dt(t[0].steps.map(t[26])),o=[];for(let c=0;c<r.length;c+=1)o[c]=$r(rr(t,r,c));const a=t=>Pt(o[t],1,1,(()=>{o[t]=null}));let l=!t[0].cannotClose&&wr(t);return{c(){e=N("article");for(let t=0;t<o.length;t+=1)o[t].c();i=D(),l&&l.c(),n=O(),V(e,"class","scroll-tour micrio-tour")},m(r,a){I(r,e,a);for(let t=0;t<o.length;t+=1)o[t]&&o[t].m(e,null);t[27](e),I(r,i,a),l&&l.m(r,a),I(r,n,a),s=!0},p(t,i){if(8193&i[0]){let n;for(r=Dt(t[0].steps.map(t[26])),n=0;n<r.length;n+=1){const s=rr(t,r,n);o[n]?(o[n].p(s,i),Lt(o[n],1)):(o[n]=$r(s),o[n].c(),Lt(o[n],1),o[n].m(e,null))}for(At(),n=r.length;n<o.length;n+=1)a(n);It()}t[0].cannotClose?l&&(At(),Pt(l,1,1,(()=>{l=null})),It()):l?(l.p(t,i),1&i[0]&&Lt(l,1)):(l=wr(t),l.c(),Lt(l,1),l.m(n.parentNode,n))},i(t){if(!s){for(let t=0;t<r.length;t+=1)Lt(o[t]);Lt(l),s=!0}},o(t){o=o.filter(Boolean);for(let e=0;e<o.length;e+=1)Pt(o[e]);Pt(l),s=!1},d(s){s&&(L(e),L(i),L(n)),P(o,s),t[27](null),l&&l.d(s)}}}function ur(t){let e,i,n,s;function r(e){t[28](e)}function o(e){t[29](e)}let a={tour:t[0],src:t[8],fullscreen:t[11],controls:!0,autoplay:!0};return void 0!==t[7]&&(a.paused=t[7]),void 0!==t[6]&&(a.currentTime=t[6]),e=new ys({props:a}),ut.push((()=>Bt(e,"paused",r))),ut.push((()=>Bt(e,"currentTime",o))),e.$on("ended",t[22]),{c(){qt(e.$$.fragment)},m(t,i){Wt(e,t,i),s=!0},p(t,s){const r={};1&s[0]&&(r.tour=t[0]),256&s[0]&&(r.src=t[8]),!i&&128&s[0]&&(i=!0,r.paused=t[7],wt((()=>i=!1))),!n&&64&s[0]&&(n=!0,r.currentTime=t[6],wt((()=>n=!1))),e.$set(r)},i(t){s||(Lt(e.$$.fragment,t),s=!0)},o(t){Pt(e.$$.fragment,t),s=!1},d(t){Xt(e,t)}}}function hr(t){let e,i,n,s;const r=[pr,mr],o=[];return e=t[14]?0:1,i=o[e]=r[e](t),{c(){i.c(),n=O()},m(t,i){o[e].m(t,i),I(t,n,i),s=!0},p(t,e){i.p(t,e)},i(t){s||(Lt(i),s=!0)},o(t){Pt(i),s=!1},d(t){t&&L(n),o[e].d(t)}}}function mr(t){let e,i,n,s,r,o;return e=new Ui({props:{type:"arrow-left",title:t[9].tourStepPrev,disabled:0==t[4]}}),e.$on("click",t[19]),n=new Ui({props:{noClick:!0,$$slots:{default:[fr]},$$scope:{ctx:t}}}),r=new Ui({props:{type:"arrow-right",title:t[9].tourStepNext,disabled:t[4]==t[0].steps.length-1}}),r.$on("click",t[20]),{c(){qt(e.$$.fragment),i=D(),qt(n.$$.fragment),s=D(),qt(r.$$.fragment)},m(t,a){Wt(e,t,a),I(t,i,a),Wt(n,t,a),I(t,s,a),Wt(r,t,a),o=!0},p(t,i){const s={};512&i[0]&&(s.title=t[9].tourStepPrev),16&i[0]&&(s.disabled=0==t[4]),e.$set(s);const o={};17&i[0]|67108864&i[1]&&(o.$$scope={dirty:i,ctx:t}),n.$set(o);const a={};512&i[0]&&(a.title=t[9].tourStepNext),17&i[0]&&(a.disabled=t[4]==t[0].steps.length-1),r.$set(a)},i(t){o||(Lt(e.$$.fragment,t),Lt(n.$$.fragment,t),Lt(r.$$.fragment,t),o=!0)},o(t){Pt(e.$$.fragment,t),Pt(n.$$.fragment,t),Pt(r.$$.fragment,t),o=!1},d(t){t&&(L(i),L(s)),Xt(e,t),Xt(n,t),Xt(r,t)}}}function pr(t){let e,i;return e=new sr({props:{tour:t[0]}}),e.$on("ended",t[22]),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};1&i[0]&&(n.tour=t[0]),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function fr(t){let e,i,n,s=t[4]+1+"",r=t[0].steps.length+"";return{c(){e=z(s),i=z(" / "),n=z(r)},m(t,s){I(t,e,s),I(t,i,s),I(t,n,s)},p(t,i){16&i[0]&&s!==(s=t[4]+1+"")&&Y(e,s),1&i[0]&&r!==(r=t[0].steps.length+"")&&Y(n,r)},d(t){t&&(L(e),L(i),L(n))}}}function gr(t){let e,i;return e=new Ui({props:{type:"close",title:t[9].close}}),e.$on("click",t[21]),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};512&i[0]&&(n.title=t[9].close),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function vr(t){let e,i,n;return e=new Ys({props:{marker:t[54]}}),{c(){qt(e.$$.fragment),i=D()},m(t,s){Wt(e,t,s),I(t,i,s),n=!0},p(t,i){const n={};1&i[0]&&(n.marker=t[54]),e.$set(n)},i(t){n||(Lt(e.$$.fragment,t),n=!0)},o(t){Pt(e.$$.fragment,t),n=!1},d(t){t&&L(i),Xt(e,t)}}}function $r(t){let e,i,n=t[54]&&vr(t);return{c(){n&&n.c(),e=O()},m(t,s){n&&n.m(t,s),I(t,e,s),i=!0},p(t,i){t[54]?n?(n.p(t,i),1&i[0]&&Lt(n,1)):(n=vr(t),n.c(),Lt(n,1),n.m(e.parentNode,e)):n&&(At(),Pt(n,1,1,(()=>{n=null})),It())},i(t){i||(Lt(n),i=!0)},o(t){Pt(n),i=!1},d(t){t&&L(e),n&&n.d(t)}}}function wr(t){let e,i;return e=new Ui({props:{type:"close",title:t[9].tourStop,className:"scroll-tour-end"}}),e.$on("click",t[21]),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};512&i[0]&&(n.title=t[9].tourStop),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function yr(t){let e,i,n,s;const r=[ar,or],o=[];function a(t,e){return t[1]?t[2]?1:-1:0}return~(e=a(t))&&(i=o[e]=r[e](t)),{c(){i&&i.c(),n=O()},m(t,i){~e&&o[e].m(t,i),I(t,n,i),s=!0},p(t,s){let l=e;e=a(t),e===l?~e&&o[e].p(t,s):(i&&(At(),Pt(o[l],1,1,(()=>{o[l]=null})),It()),~e?(i=o[e],i?i.p(t,s):(i=o[e]=r[e](t),i.c()),Lt(i,1),i.m(n.parentNode,n)):i=null)},i(t){s||(Lt(i),s=!0)},o(t){Pt(i),s=!1},d(t){t&&L(n),~e&&o[e].d(t)}}}function br(t,e,i){var n,s;let r,o,a,l,c,d;h(t,Oe,(t=>i(9,c=t)));let{tour:u}=e,{noHTML:m=!1}=e;const p=ot(),f=lt("micrio"),{events:g,state:v,_lang:$}=f;h(t,$,(t=>i(25,l=t)));const w=f.$current,y=w.$data,b=w.$settings,k=f.canvases[0].grid,T=w.state.marker,x="steps"in u&&u.isSerialTour,_=!("steps"in u),E="scrollable"in u&&u.scrollable,S="steps"in u&&("controls"in u?!1!==u.controls:!u.noControls),M=!(!x&&"steps"in u&&(null==(n=b._markers)?void 0:n.tourControlsInPopup)),A=M&&(_||x),I=!!(null==(s=b._markers)?void 0:s.keepPopupsDuringTourTransitions),L=()=>z(X-1),P=()=>z(X+1),N=()=>g.enabled.set(!0);let C;function z(t){var e,i,n,s;if(!("steps"in u)||!u.stepInfo)return;const r=u.stepInfo[t];if(r&&r.markerId==(null==(e=f.state.$marker)?void 0:e.id))return D(r);const o=null==(n=null==(i=u.stepInfo[X])?void 0:i.micrioImage)?void 0:n.state;o&&o.marker.set(void 0),null==(s=f.$current)||s.state.marker.set(void 0),I||f.state.popup.set(void 0),f.removeEventListener("marker-opened",N),T.set(void 0),r&&(C=setTimeout(O,200,r))}async function D(t){var e,n,s,r,o,a,l;let c=w,d=!1;if(k&&!t.gridView&&k.images.find((e=>e.id==t.micrioId))){const i=!!("steps"in u&&u.stepInfo&&t)&&(null==(e=u.stepInfo)?void 0:e.indexOf(t))<X,o=(null==(n=t.marker.data)?void 0:n.gridTourTransition)??(null==(r=null==(s=t.marker.data)?void 0:s._meta)?void 0:r.gridTourTransition),a=(null==o?void 0:o.startsWith("slide"))?"slide":"swipe";await vt().then((()=>{const e=k.focus(c=k.images.find((e=>e.id==t.micrioId)),{view:t.startView,transition:o==a||o==`${a}-horiz`?i?`${a}-left`:`${a}-right`:o==`${a}-vert`?i?`${a}-up`:`${a}-down`:"behind"==o?i?"behind-left":"behind-right":o}).catch((()=>d=!0));return f.events.enabled.set(!1),e}))}else if((null==(o=f.$current)?void 0:o.id)!=t.micrioId){if(t.gridView&&(null==(l=null==(a=t.marker.data)?void 0:a._meta)?void 0:l.gridAction)&&k){t.micrioImage||(t.micrioImage=k.images.find((e=>e.id==t.micrioId))),c=t.micrioImage;const e=t.marker.data._meta.gridAction.split("|");k.action(e.shift(),e.join("|"))}else"steps"in u&&u.stepInfo&&i(4,X=u.stepInfo.indexOf(t)),c=f.open(t.micrioId,{gridView:t.gridView,startView:t.startView});await vt()}else c=f.$current;return[c,d]}async function O(t){let e=w,i=!1;t.micrioId&&([e,i]=await D(t)),i||(t.micrioImage||(t.micrioImage=e),g.enabled.set(!1),e.state.marker.set(t.markerId),f.addEventListener("marker-opened",N,{once:!0}),await vt(),g.dispatch("tour-step",u))}function R(){v.tour.set(void 0)}"steps"in u&&(u.prev=L,u.next=P,u.goto=z,Object.defineProperty(u,"currentStep",{configurable:!0,get:()=>X}));const F=Ht(!1);let U,V,B;function q(){F.set(!1),clearTimeout(U),U=setTimeout((()=>F.set(!0)),5e3)}function W(t){var e,i;if(!("steps"in u))return;const n=u.steps,s=t.filter((t=>t.isIntersecting)).map((t=>t.target))[0];if(s)for(let r=0;r<V.children.length;r++)if(V.children[r]==s){const t=null==(e=y.markers)?void 0:e.find((t=>t.id==n[r].split(",")[0]));return void(t&&(null==(i=f.$current)||i.camera.flyToView(t.view).catch((()=>{}))))}}h(t,F,(t=>i(10,d=t))),F.subscribe((t=>g.dispatch("tour-minimize",t)));let X=-1,G=!1;const Y=w.camera.getView(),j=b._markers;let H=[];rt((()=>("steps"in u&&we(w,u,l,w.$data).then((()=>function(t){var e;if(E||(null==(e=f.$current)?void 0:e.state.$marker)||void 0!==t.initialStep&&z(t.initialStep),E&&V){B=new IntersectionObserver(W,{root:V,threshold:1});for(let t=0;t<V.children.length;t++)B.observe(V.children[t])}H.push(f.state.marker.subscribe((e=>{if(!e)return void i(5,G=!1);const n="string"==typeof e?e:e.id,s=t.steps.findIndex((t=>t.startsWith(n)));if(s>=0&&t.stepInfo){const e=t.stepInfo[i(4,X=s)];e&&!e.micrioImage&&(e.micrioImage=f.canvases.find((t=>t.id==e.micrioId))??(null==k?void 0:k.images.find((t=>t.id==e.micrioId)))??f.$current)}i(5,G=s<0)})))}(u))),S||H.push(F.subscribe((t=>p("minimize",t)))),m||"steps"in u&&!x||!1===u.minimize||(f.addEventListener("pointermove",q),f.addEventListener("touchstart",q),q()),A&&f.setAttribute("data-tour-active",""),()=>{var t,e;for(clearTimeout(U),clearTimeout(C);H.length;)null==(t=H.shift())||t();f.removeEventListener("pointermove",q),f.removeEventListener("touchstart",q),f.removeEventListener("marker-opened",N),A&&f.removeAttribute("data-tour-active"),N(),B&&B.disconnect();const i=f.state.$marker;if("steps"in u&&u.stepInfo&&null!=u.currentStep){const t=u.stepInfo[u.currentStep];delete u.goto,delete u.next,delete u.prev,i&&(null==t?void 0:t.markerId)==i.id&&(null==(e=t.micrioImage)||e.state.marker.set(void 0),f.state.marker.set(void 0))}w.camera.aniDone=void 0,k||"steps"in u&&u.keepLastStep||f.$current==w||f.open(w.id),vt().then((()=>{g.dispatch("tour-stop",u),"steps"in u&&delete u.currentStep,!("steps"in u)&&(null==j?void 0:j.zoomOutAfterClose)&&!i&&Y&&w.camera.flyToView(Y,{speed:null==j?void 0:j.zoomOutAfterCloseSpeed,noTrueNorth:!0})}))}))),g.dispatch("tour-start",u);let Z=0,K=!1;return t.$$set=t=>{"tour"in t&&i(0,u=t.tour),"noHTML"in t&&i(1,m=t.noHTML)},t.$$.update=()=>{var e,n;1&t.$$.dirty[0]&&i(2,r="steps"in u?void 0:u),33554437&t.$$.dirty[0]&&i(24,o=r?"audio"in u?u.audio:null==(n=null==(e=r.i18n)?void 0:e[l])?void 0:n.audio:void 0),16777216&t.$$.dirty[0]&&i(8,a=o?"fileUrl"in o?o.fileUrl:o.src:void 0)},[u,m,r,V,X,G,Z,K,a,c,d,f,$,y,x,_,E,S,M,L,P,R,function(){g.dispatch("tour-ended",u),u.closeOnFinish&&R()},F,o,l,t=>y.markers&&y.markers.find((e=>e.id==t.split(",")[0])),function(t){ut[t?"unshift":"push"]((()=>{V=t,i(3,V)}))},function(t){K=t,i(7,K)},function(t){Z=t,i(6,Z)},function(t){Z=t,i(6,Z)},function(t){Z=t,i(6,Z)}]}class kr extends Yt{constructor(t){super(),Gt(this,t,br,yr,a,{tour:0,noHTML:1},null,[-1,-1])}}class Tr{constructor(t,e,i,n={}){this.micrio=t,this.length=e,this.goto=i,this.opts=n,this.hitTresh=!1,this.snapTo=[],this.pointers=new Map,this.isFullWidth=!1,this.startedWithShift=!1,this.isDragging=()=>2==this.pointers.size||(this.isFullWidth||this.startedWithShift)&&1==this.pointers.size,n.sensitivity||(n.sensitivity=Number(t.getAttribute("data-swipe-sensitivity")??1));const s=t.getAttribute("data-swipe-snap");s&&(this.snapTo=s.split(",").map(Number)),this.micrio.setAttribute("data-hooked",""),this.dStart=this.dStart.bind(this),this.dMove=this.dMove.bind(this),this.dStop=this.dStop.bind(this),this.mouseleave=this.mouseleave.bind(this),this.image=t.$current,this.image.state.view.subscribe((t=>this.isFullWidth=n.coverLimit?this.image.camera.isZoomedOut():!t||Math.round(1e3*(t[2]-t[0]))/1e3>=1));const r=t.wasm.getPtr();t.wasm.e.setNoPinchPan(r,!0),t.wasm.e.setIsSwipe(r,!0),this.micrio.canvas.element.addEventListener("pointerdown",this.dStart)}get currentIndex(){return this.micrio.wasm.e._getActiveImageIdx(this.image.ptr)}destroy(){this.micrio.canvas.element.removeEventListener("pointerdown",this.dStart),this.mouseleave()}dStart(t){this.startedWithShift=t.shiftKey;const e=!this.isDragging();this.pointers.set(t.pointerId,!0),this.pointers.size>2&&this.mouseleave(),e&&(this.hitTresh=!1,this.micrio.setAttribute("data-panning",""),this.startIndex=this.currentIndex,this.startX=t.clientX,this.firstTouchId=t.pointerId,this.micrio.addEventListener("pointermove",this.dMove),this.micrio.addEventListener("pointerup",this.dStop),this.micrio.setPointerCapture(t.pointerId))}dMove(t){if(!this.isDragging()||t.pointerId!=this.firstTouchId||void 0===this.startX||void 0===this.startIndex)return;if(!this.hitTresh&&void 0!==this.startX&&(this.hitTresh=2!=this.pointers.size||Math.abs(t.clientX-this.startX)>(this.micrio.events.pinchFactor&&this.micrio.events.pinchFactor>1.25?.3:.15)*this.micrio.offsetWidth)&&(this.startX=t.clientX),!this.hitTresh)return;const e=this.micrio.$current.camera,i=this.opts.continuous?Math.max(.1,(e.getXY(1,.5)[0]-e.getXY(0,.5)[0])/this.micrio.offsetWidth):1,n=Math.round((t.clientX-this.startX)/(this.micrio.offsetWidth*i)*this.length);let s=this.startIndex-n;if(this.opts.continuous){for(;s<0;)s+=this.length;for(;s>this.length-1;)s-=this.length}s=Math.max(0,Math.min(this.length-1,s)),s!=this.currentIndex&&this.goto(s)}dStop(t){this.pointers.delete(t.pointerId),t.pointerId==this.firstTouchId&&(this.micrio.releasePointerCapture(this.firstTouchId),this.firstTouchId=void 0),this.pointers.size||this.swipeEnd()}mouseleave(){this.pointers.clear(),this.swipeEnd()}swipeEnd(){if(this.micrio.removeAttribute("data-panning"),this.micrio.removeEventListener("pointermove",this.dMove),this.micrio.removeEventListener("pointerup",this.dStop),this.hitTresh=!1,this.snapTo.length){const t=this.snapTo[this.snapTo.map(((t,e)=>[e,Math.abs(t-this.currentIndex)])).sort(((t,e)=>t[1]>e[1]?1:t[1]<e[1]?-1:0))[0][0]];t!=this.currentIndex&&this.animateTo(t)}}animateTo(t){this.raf&&cancelAnimationFrame(this.raf);const e=performance.now(),i=this.currentIndex,n=i-t,s=t=>{const r=Math.min(1,(t-e)/250);r<1&&(this.raf=requestAnimationFrame(s));const o=i-Math.round(this.micrio.wasm.e.ease(r)*n);o!=this.currentIndex&&this.goto(o)};s(e)}}function xr(t){let e,i,n,s=Math.round(10*t[0])/10+"";return{c(){e=N("span"),i=z(s),n=z("º"),V(e,"class","micrio-dial")},m(t,s){I(t,e,s),S(e,i),S(e,n)},p(t,e){1&e&&s!==(s=Math.round(10*t[0])/10+"")&&Y(i,s)},d(t){t&&L(e)}}}function _r(e){let i,n,s,r=e[1]&&xr(e);return{c(){i=N("div"),r&&r.c(),j(i,"--micrio-dial-offset",e[3]+"px"),V(i,"data-scroll-through",""),V(i,"class","micrio-dial")},m(t,o){I(t,i,o),r&&r.m(i,null),e[6](i),n||(s=R(i,"pointerdown",U(F(e[4])),!0),n=!0)},p(t,[e]){t[1]?r?r.p(t,e):(r=xr(t),r.c(),r.m(i,null)):r&&(r.d(1),r=null),8&e&&j(i,"--micrio-dial-offset",t[3]+"px")},i:t,o:t,d(t){t&&L(i),r&&r.d(),e[6](null),n=!1,s()}}}function Er(t,e,i){let n,{currentRotation:s}=e,{frames:r}=e,{degrees:o}=e;const a=ot(),l=lt("micrio"),c=l.$current.camera;let d,u,h=0,m=0;function p(t){const e=Math.max(1,(c.getXY(1,.5)[0]-c.getXY(0,.5)[0])/l.offsetWidth);a("turn",(m/360+(h-t.clientX)/(d.offsetWidth*e))*r)}function f(){u&&l.releasePointerCapture(u),l.removeAttribute("data-panning"),l.removeEventListener("pointermove",p),l.removeEventListener("pointerup",f)}return t.$$set=t=>{"currentRotation"in t&&i(0,s=t.currentRotation),"frames"in t&&i(5,r=t.frames),"degrees"in t&&i(1,o=t.degrees)},t.$$.update=()=>{5&t.$$.dirty&&i(3,n=-s/360*((null==d?void 0:d.offsetWidth)??0))},[s,o,d,n,function(t){0==t.button&&(l.addEventListener("pointermove",p),l.addEventListener("pointerup",f),l.setAttribute("data-panning",""),l.setPointerCapture(u=t.pointerId),m=s,h=t.clientX)},r,function(t){ut[t?"unshift":"push"]((()=>{d=t,i(2,d)}))}]}class Sr extends Yt{constructor(t){super(),Gt(this,t,Er,_r,a,{currentRotation:0,frames:5,degrees:1})}}const{window:Mr}=E;function Ar(t,e,i){const n=t.slice();return n[90]=e[i],n[92]=i,n}function Ir(t){let e,i,n,s,o,a,l,c,d,u,h,m;i=new Ui({props:{type:"arrow-left",title:t[11].galleryPrev,className:"gallery-btn",disabled:0==t[1]}}),i.$on("pointerdown",t[32]);let p=Dt(t[21]),f=[];for(let r=0;r<p.length;r+=1)f[r]=Nr(Ar(t,p,r));return d=new Ui({props:{type:"arrow-right",title:t[11].galleryNext,className:"gallery-btn",disabled:t[1]==t[0].length-1}}),d.$on("pointerdown",t[37]),{c(){e=N("div"),qt(i.$$.fragment),n=D(),s=N("ul");for(let t=0;t<f.length;t+=1)f[t].c();o=D(),a=N("button"),c=D(),qt(d.$$.fragment),V(a,"style",l=`left: ${t[8]}px`),V(a,"class","micrio-gallery"),H(a,"dragging",t[2]),V(s,"class","micrio-gallery"),V(e,"class","micrio-gallery"),H(e,"hidden",t[5]||t[10]&&!t[2]&&!t[4])},m(r,l){I(r,e,l),Wt(i,e,null),S(e,n),S(e,s);for(let t=0;t<f.length;t+=1)f[t]&&f[t].m(s,null);S(s,o),S(s,a),t[35](s),S(e,c),Wt(d,e,null),u=!0,h||(m=[R(a,"pointerdown",U(F(t[24])),!0),R(a,"touchstart",U(F(t[24])),!0),R(s,"pointermove",t[25]),R(s,"pointerleave",t[36])],h=!0)},p(t,n){const r={};if(2048&n[0]&&(r.title=t[11].galleryPrev),2&n[0]&&(r.disabled=0==t[1]),i.$set(r),8388738&n[0]){let e;for(p=Dt(t[21]),e=0;e<p.length;e+=1){const i=Ar(t,p,e);f[e]?f[e].p(i,n):(f[e]=Nr(i),f[e].c(),f[e].m(s,o))}for(;e<f.length;e+=1)f[e].d(1);f.length=p.length}(!u||256&n[0]&&l!==(l=`left: ${t[8]}px`))&&V(a,"style",l),(!u||4&n[0])&&H(a,"dragging",t[2]);const c={};2048&n[0]&&(c.title=t[11].galleryNext),3&n[0]&&(c.disabled=t[1]==t[0].length-1),d.$set(c),(!u||1076&n[0])&&H(e,"hidden",t[5]||t[10]&&!t[2]&&!t[4])},i(t){u||(Lt(i.$$.fragment,t),Lt(d.$$.fragment,t),u=!0)},o(t){Pt(i.$$.fragment,t),Pt(d.$$.fragment,t),u=!1},d(n){n&&L(e),Xt(i),P(f,n),t[35](null),Xt(d),h=!1,r(m)}}}function Lr(t){var e;let i,n;return i=new Sr({props:{currentRotation:t[6],frames:t[22],degrees:null==(e=t[9].omni)?void 0:e.showDegrees}}),i.$on("turn",t[31]),{c(){qt(i.$$.fragment)},m(t,e){Wt(i,t,e),n=!0},p(t,e){var n;const s={};64&e[0]&&(s.currentRotation=t[6]),512&e[0]&&(s.degrees=null==(n=t[9].omni)?void 0:n.showDegrees),i.$set(s)},i(t){n||(Lt(i.$$.fragment,t),n=!0)},o(t){Pt(i.$$.fragment,t),n=!1},d(t){Xt(i,t)}}}function Pr(e){let i,n,s;return{c(){i=N("button"),i.textContent="✥",V(i,"class","angular micrio-gallery"),H(i,"dragging",e[2])},m(t,r){I(t,i,r),n||(s=R(i,"pointerdown",U(F(e[26])),!0),n=!0)},p(t,e){4&e[0]&&H(i,"dragging",t[2])},i:t,o:t,d(t){t&&L(i),n=!1,s()}}}function Nr(t){let e,i,n,s;function o(){return t[33](t[92])}function a(...e){return t[34](t[92],...e)}return{c(){e=N("li"),i=N("button"),i.textContent="•",V(i,"class","bullet micrio-gallery"),V(e,"class","micrio-gallery"),H(e,"active",t[92]==t[1]),H(e,"hover",t[92]==t[7])},m(t,r){I(t,e,r),S(e,i),n||(s=[R(i,"click",o),R(i,"keypress",a)],n=!0)},p(i,n){t=i,2&n[0]&&H(e,"active",t[92]==t[1]),128&n[0]&&H(e,"hover",t[92]==t[7])},d(t){t&&L(e),n=!1,r(s)}}}function Cr(t){let e,i,n,s,r=!t[20]&&function(t){let e,i,n,s;const r=[Pr,Lr,Ir],o=[];function a(t,e){return t[19]?0:t[18]&&!t[18].noDial&&t[16]?1:!t[17]&&t[0].length>1?2:-1}return~(e=a(t))&&(i=o[e]=r[e](t)),{c(){i&&i.c(),n=O()},m(t,i){~e&&o[e].m(t,i),I(t,n,i),s=!0},p(t,s){let l=e;e=a(t),e===l?~e&&o[e].p(t,s):(i&&(At(),Pt(o[l],1,1,(()=>{o[l]=null})),It()),~e?(i=o[e],i?i.p(t,s):(i=o[e]=r[e](t),i.c()),Lt(i,1),i.m(n.parentNode,n)):i=null)},i(t){s||(Lt(i),s=!0)},o(t){Pt(i),s=!1},d(t){t&&L(n),~e&&o[e].d(t)}}}(t);return{c(){r&&r.c(),e=O()},m(o,a){r&&r.m(o,a),I(o,e,a),i=!0,n||(s=R(Mr,"keydown",t[27]),n=!0)},p(t,e){t[20]||r.p(t,e)},i(t){i||(Lt(r),i=!0)},o(t){Pt(r),i=!1},d(t){t&&L(e),r&&r.d(t),n=!1,s()}}}function zr(t,e,i){var n,s,r,o,a;let l,c,d,u,m,p,f;h(t,Oe,(t=>i(11,f=t)));let{images:g=[]}=e,{omni:v=null}=e;const $=lt("micrio"),{wasm:w,current:y,events:b,_lang:k}=$;h(t,y,(t=>i(54,m=t))),h(t,k,(t=>i(53,u=t)));const T=m,x=T.$info,_=T.state.layer;h(t,_,(t=>i(52,c=t)));const E=T.settings;h(t,E,(t=>i(9,d=t)));const S=T.camera;if(v)for(let h=0;h<v.frames;h++)g.push({id:x.id+"/"+h,image:T,visible:Ht(!1),frame:h,opts:{area:[0,0,1,1]},ptr:-1,baseTileIdx:-1,thumbSrc:T.getTileSrc(T.levels,0,0,h)});const M=d.gallery,A="omni"==M.type,I=A||"swipe-full"==M.type,L=I||"switch"==M.type,P=A,N=!!M.isSpreads,C=M.coverPages??0,z=d.omni,D=A&&!!(null==z?void 0:z.twoAxes),O=M.startId||$.getAttribute("data-gallery-start-id"),R=M.archive,F=!!d.limitToCoverScale,U=!!d.noUI,V=(null==z?void 0:z.frontIndex)??0,B=(null==(n=null==z?void 0:z.layers)?void 0:n.length)??1,q=$.hasAttribute("data-gallery-start")?Number($.getAttribute("data-gallery-start")):null==(s=null==d?void 0:d.omni)?void 0:s.startIndex;let W=null==q||isNaN(q)?O?g.findIndex((t=>t.id==O)):0:q;W<0&&(W=0);const X=[],G=[];if(g)for(let h=0;h<g.length;h++){let t=null==(r=g[h].opts)?void 0:r.area;if(!t)continue;const e=t.slice(0);if(G.push([h]),N&&h-C>=0&&(h-C)%2==0&&g[h+1]){if(t=null==(o=g[++h].opts)?void 0:o.area,!t)continue;G[G.length-1].push(h),e[2]=t[2],e[3]=t[3]}X.push(e)}const Y=X.length/B,j=(null==(a=null==z?void 0:z.layers)?void 0:a.map((t=>({i18n:Object.fromEntries(Object.entries(t.i18n).map((([t,e],i)=>[t,{title:e??"Layer "+(i+1)}])))}))))??[];Object.keys(x.revision??{[u]:0}).forEach((t=>j.forEach(((e,i)=>{e.i18n[t]||(e.i18n[t]={title:"Layer "+(i+1)})}))));let H=-1,Z=L,K=!0,J=!1,Q=!0,tt=!1,et=0;function it(t,e=!1,n=150,s=!1){if(P){for(;t<0;)t+=Y;t%=Y}const r=t=Math.round(Math.max(0,Math.min(Y-1,t))),o=s||r!=H;if(i(1,H=r),o&&nt(),L)o&&(w.setActiveImage(T.ptr,G[H][0],G[H].length-1),A?w.render():(S.flyToView(X[H],{duration:n,speed:2}).then((()=>dt(X[H],!0))).catch((()=>{})),zt()));else{const s=S.getView(),r=X[t],a=tt&&(Z&&!J||o||s[0]<r[0]!=s[2]>r[2]);i(4,J=!1),a?S.flyToView(r,{duration:n,speed:1,progress:e?.5:0}).then((()=>dt(r,!0))).catch((()=>{})):(r&&0==n&&S.setView(r),dt(r,!0))}T.album.hooked=tt=!0}function nt(t){if(Nt&&t){if(Nt.currentIndex==H)return;i(1,H=Nt.currentIndex)}!function(t){const e=[];N&&t>=C&&(t=2*t-C);const i=Math.floor(t/st);for(let n=-ot;n<=ot;n++)if(n){let s=t+n;if(D){const t=Math.floor(s/st);t<i&&(s+=st),t>i&&(s-=st)}if(P){for(;s<0;)s+=g.length;for(;s>=g.length;)s-=g.length}e.push(s)}if(D)for(let n=-ot;n<=ot;n++)n&&e.push(t+n*st);e.filter(((t,i)=>e.indexOf(t)==i)).map((t=>g[t])).filter((t=>!!t&&!at.has(t.id))).forEach((t=>at.set(t.id,ct((()=>w.getTexture(t.baseTileIdx,t.thumbSrc,!1,{force:!!R}))))))}(H),b.dispatch("gallery-show",H),A&&i(6,et=(H-V)/Y*360)}const st=g.length,ot="requestIdleCallback"in self?A?Math.max(36,2*Math.floor(g.length/8)):100:50,at=new Map,ct=self.requestIdleCallback??self.requestAnimationFrame;function dt(t,e){Z=S.isZoomedOut(),S.setLimit(!e&&Z?[-1,t[1],2,t[3]]:t)}function ht(t){const e=null==mt?void 0:mt.childNodes[t];return e?-2+e.offsetLeft+e.offsetWidth/2:0}let mt,pt,ft=0,gt=!1;function vt(t){const e=pt??mt.getClientRects()[0],i="button"in t?t.clientX:t.touches[0].clientX,n=Math.min(1,Math.max(0,(i-e.left-14)/(e.width-32)));return[n,Math.max(0,Math.min(Y-1,Math.floor(n*Y)))]}function $t(t){const[e,n]=vt(t);i(30,ft=16+e*(pt.width-32)),n!=H&&it(n,!0)}let wt,yt,bt=-1;function kt(){window.removeEventListener(gt?"pointermove":"touchmove",$t),window.removeEventListener(gt?"pointerup":"touchend",kt),i(2,K=$.keepRendering=!1),it(H)}function Tt(){Z&&(yt=wt=H,i(4,J=Z),dt(X[H],!1))}function xt(t){const e=t.detail;"panend"!=t.type||e?it(yt!=H?yt:H+(wt==H&&J&&e?Math.round(Math.min(1,Math.max(-1,-e.movedX/e.duration))):0)):i(4,J=!1)}function _t(t){if(!t)return;const e=t[0]+(t[2]-t[0])/2,i=X.map(((i,n)=>(1-Math.min(Math.abs(e-i[0]),Math.abs(e-i[2])))*Math.max(0,(Math.min(t[2],i[2])-Math.max(t[0],i[0]))/(i[2]-i[0]))*(1-.1*Math.abs(H-n))));w.setFocus(T.ptr,X[yt=i.every((t=>!t))?H:i.indexOf(Math.max(...i))],J),Z=S.isZoomedOut()}let Et=0,St=[0,0,0,0];function Mt(t){Et=Math.max(0,Math.min(0,St[3]+Math.round((St[1]-t.clientY)/360*1)));let e=(St[2]+Math.round((St[0]-t.clientX)/360*st))%st;for(;e<0;)e+=st;it(Et*st+e)}function At(){removeEventListener("pointermove",Mt),removeEventListener("pointerup",At),i(2,K=!1)}let It=-1;const Lt=()=>{j.length&&T.data.update((t=>{t||(t={}),t.pages||(t.pages=[]);const e={id:"_omni-layers",i18n:j[c].i18n,icon:Xe,children:j.map(((t,e)=>({id:"omni-layer-"+e,i18n:t.i18n,action:()=>T.state.layer.set(e)}))).filter((t=>t.id!="omni-layer-"+c))};return It>=0?t.pages.splice(It,1,e):t.pages.push(e),It=t.pages.length-1,t}))};let Pt,Nt,Ct=$.state.ui.hidden;function zt(){Ct.set(!1),clearTimeout(Pt),Pt=setTimeout((()=>Ct.set(!0)),2e3)}h(t,Ct,(t=>i(10,p=t))),T.album={numPages:X.length,get currentIndex(){return H},info:T.$settings.album,prev:()=>it(H-1),next:()=>it(H+1),goto:it},rt((()=>{Promise.all(g.map((t=>("state"in t&&!("image"in t)&&(t.camera=T.camera),w.addEmbed(t,T,{opacity:0,asImage:"camera"in t}))))).then((()=>{w.setActiveImage(T.ptr,W),it(W,!1,0),i(2,K=!1)})),A&&B>1&&Lt(),i(5,Q=!1),$.goto=it;const t=[],e=[];return A&&T.state.layer.subscribe(Lt),I&&(Nt=T.swiper=new Tr($,Y,it,{continuous:P,coverLimit:F})),e.push((()=>{$.canvas.element.removeEventListener("pointermove",zt),$.canvas.element.removeEventListener("pointerdown",zt)})),A||D||I||($.canvas.element.addEventListener("pointermove",zt),$.canvas.element.addEventListener("pointerdown",zt),zt()),L&&t.push(T.state.view.subscribe((()=>{Z=S.isZoomedOut()}))),L||I||g.length<=1||(D||i(30,ft=ht(W)),t.push(T.state.view.subscribe(_t)),$.addEventListener("panstart",Tt),$.addEventListener("panend",xt),$.addEventListener("pinchend",xt),e.push((()=>{$.removeEventListener("panstart",Tt),$.removeEventListener("panend",xt),$.removeEventListener("pinchend",xt)}))),A&&$.addEventListener("move",nt),()=>{var i,n;for(Nt&&Nt.destroy();t.length;)null==(i=t.shift())||i();for(;e.length;)null==(n=e.shift())||n();A&&$.removeEventListener("move",nt)}}));return t.$$set=t=>{"images"in t&&i(0,g=t.images),"omni"in t&&i(29,v=t.omni)},t.$$.update=()=>{1073741838&t.$$.dirty[0]&&i(8,l=!mt||K?ft:ht(H))},[g,H,K,mt,J,Q,et,bt,l,d,p,f,y,k,_,E,A,I,z,D,U,X,Y,it,function(t){K||(gt="button"in t)&&0!=t.button||(pt=mt.getClientRects()[0],$.keepRendering=i(2,K=!0),i(7,bt=-1),window.addEventListener(gt?"pointermove":"touchmove",$t),window.addEventListener(gt?"pointerup":"touchend",kt),$t(t))},function(t){K||i(7,bt=vt(t)[1])},function(t){0==t.button&&(i(2,K=!0),St=[t.clientX,t.clientY,H,Et],window.addEventListener("pointermove",Mt),window.addEventListener("pointerup",At))},function(t){var e;if(!(null==(e=d.omni)?void 0:e.noKeys)){switch(t.key){case"PageUp":case"ArrowLeft":it(H-(A?-1:1),!0);break;case"PageDown":case"ArrowRight":it(H+(A?-1:1),!0);break;case"ArrowUp":D&&it(H+st);break;case"ArrowDown":D&&it(H-st);break;case"Home":it(0);break;case"End":it(Y);break;default:return}zt()}},Ct,v,ft,t=>it(t.detail),()=>it(H-1),t=>it(t,!0),(t,e)=>{"Enter"===e.key&&it(t,!0)},function(t){ut[t?"unshift":"push"]((()=>{mt=t,i(3,mt)}))},()=>i(7,bt=-1),()=>it(H+1)]}class Dr extends Yt{constructor(t){super(),Gt(this,t,zr,Cr,a,{images:0,omni:29},null,[-1,-1,-1])}}function Or(t,e,i){let{list:n}=e,{loop:s=!0}=e,{volume:r=1}=e;const o=new Audio;o.preload="none",o.loop=!1,o.onended=l;let a=-1;function l(){if(!s&&a+1==n.length)return;const t=n[++a%n.length];o.src="fileUrl"in t?t.fileUrl:t.src,o.play()}return rt((()=>(l(),()=>o.pause()))),t.$$set=t=>{"list"in t&&i(0,n=t.list),"loop"in t&&i(1,s=t.loop),"volume"in t&&i(2,r=t.volume)},t.$$.update=()=>{4&t.$$.dirty&&(o.volume=r)},[n,s,r]}class Rr extends Yt{constructor(t){super(),Gt(this,t,Or,null,a,{list:0,loop:1,volume:2})}}function Fr(t){let e,i;return e=new Rr({props:{list:t[1].music.items,loop:t[1].music.loop,volume:t[0]*(t[1].music.volume??1)}}),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};2&i&&(n.list=t[1].music.items),2&i&&(n.loop=t[1].music.loop),3&i&&(n.volume=t[0]*(t[1].music.volume??1)),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function Ur(t){var e;let i,n,s=t[2]&&t[3]&&(null==(e=t[1].music)?void 0:e.items.length)&&Fr(t);return{c(){s&&s.c(),i=O()},m(t,e){s&&s.m(t,e),I(t,i,e),n=!0},p(t,[e]){var n;t[2]&&t[3]&&(null==(n=t[1].music)?void 0:n.items.length)?s?(s.p(t,e),14&e&&Lt(s,1)):(s=Fr(t),s.c(),Lt(s,1),s.m(i.parentNode,i)):s&&(At(),Pt(s,1,1,(()=>{s=null})),It())},i(t){n||(Lt(s),n=!0)},o(t){Pt(s),n=!1},d(t){t&&L(i),s&&s.d(t)}}}let Vr;const Br={},qr=Ht();let Wr,Xr;const Gr=Ht(!1);function Yr(t,e,i){Xr.setPosition?Xr.setPosition(t,e,i):"positionX"in Xr&&(Xr.positionX.value=t,Xr.positionY.value=e,Xr.positionZ.value=i)}function jr(e,i,n){let s,r,o,a=t;h(e,Gr,(t=>n(2,r=t))),h(e,qr,(t=>n(3,o=t))),e.$$.on_destroy.push((()=>a()));let{volume:l=1}=i,{data:c}=i,{is360:d}=i;const{events:u,current:m}=lt("micrio");h(e,m,(t=>n(7,s=t)));const p=s,f=p.$info,g=f.height/f.width,v="AudioContext"in window||"webkitAudioContext"in window;function $(t,e,i){if(d){t*=2*-Math.PI,e-=.5,e*=-Math.PI;const n=10*(1-i),s=Math.cos(e)*Math.sin(t)*n,r=Math.sin(e)*n,o=Math.cos(e)*Math.cos(t)*n;Yr(s,r,o);let a=s*s+r*r+o*o;a>0&&(a=1/Math.sqrt(a)),function(t,e,i){Xr.setOrientation?Xr.setOrientation(t,e,i,0,1,0):"forwardX"in Xr&&(Xr.forwardX.value=t,Xr.forwardY.value=e,Xr.forwardZ.value=i)}(s*a,r*a,o*a)}else Yr(2*(t-.5),2*(.5-e)*g,i)}const w=()=>Gr.set(!0),y=new Audio("data:audio/mpeg;base64,/+MYxAAAAANIAUAAAASEEB/jwOFM/0MM/90b/+RhST//w4NFwOjf///PZu////9lns5GFDv//l9GlUIEEIAAAgIg8Ir/JGq3/+MYxDsLIj5QMYcoAP0dv9HIjUcH//yYSg+CIbkGP//8w0bLVjUP///3Z0x5QCAv/yLjwtGKTEFNRTMuOTeqqqqqqqqqqqqq/+MYxEkNmdJkUYc4AKqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq");return y.volume=ie.iOS?0:1,v&&rt((()=>{let t;return t=Gr.subscribe((e=>{var i;e&&(Wr||(!function(t){if(!Vr){if(Wr||(Wr="micrioAudioContext"in window?window.micrioAudioContext:"AudioContext"in window?new window.AudioContext:"webkitAudioContext"in window?new window.webkitAudioContext:null),!Wr)return console.warn("[Micrio] Your browser does not support the Web Audio API");Vr=Wr.createGain(),Vr.connect(Wr.destination),Vr.gain.value=t,qr.set(Wr),Xr=Wr.listener,"upX"in Xr&&(Xr.upX.value=0,Xr.upY.value=1,Xr.upZ.value=0)}}(l),u.dispatch("audio-init")),t&&(t(),t=null),(null==(i=c.markers)?void 0:i.filter((t=>!!t.positionalAudio)).length)&&(t=p.state.view.subscribe((t=>{if(!t)return;const e=t[2]-t[0],i=t[3]-t[1],n=Math.max(0,1.05-p.camera.getScale());$(t[0]+e/2,t[1]+i/2,n*(d?1:1.5))}))))})),Wr||y.play().then(w).catch((()=>{u.dispatch("autoplay-blocked"),addEventListener("pointerup",w,{once:!0})})),()=>{t&&t()}})),e.$$set=t=>{"volume"in t&&n(0,l=t.volume),"data"in t&&n(1,c=t.data),"is360"in t&&n(5,d=t.is360)},e.$$.update=()=>{1&e.$$.dirty&&Vr&&(Vr.gain.value=l)},[l,c,r,o,m,d]}class Hr extends Yt{constructor(t){super(),Gt(this,t,jr,Ur,a,{volume:0,data:1,is360:5})}}function Zr(t){let e,i,n,s,r,o,a=(t[8]||t[4])&&Kr(t),l=t[7]&&to(t),c=t[6]&&eo(t),d=t[2]&&io(t);return{c(){e=N("details"),a&&a.c(),i=D(),l&&l.c(),n=D(),c&&c.c(),s=D(),d&&d.c(),V(e,"class","micrio-details"),H(e,"opened",t[2])},m(r,u){I(r,e,u),a&&a.m(e,null),S(e,i),l&&l.m(e,null),S(e,n),c&&c.m(e,null),S(e,s),d&&d.m(e,null),t[20](e),o=!0},p(t,r){t[8]||t[4]?a?a.p(t,r):(a=Kr(t),a.c(),a.m(e,i)):a&&(a.d(1),a=null),t[7]?l?l.p(t,r):(l=to(t),l.c(),l.m(e,n)):l&&(l.d(1),l=null),t[6]?c?c.p(t,r):(c=eo(t),c.c(),c.m(e,s)):c&&(c.d(1),c=null),t[2]?d?(d.p(t,r),4&r&&Lt(d,1)):(d=io(t),d.c(),Lt(d,1),d.m(e,null)):d&&(At(),Pt(d,1,1,(()=>{d=null})),It()),(!o||4&r)&&H(e,"opened",t[2])},i(t){o||(Lt(d),t&&$t((()=>{o&&(r||(r=zt(e,_e,{duration:200},!0)),r.run(1))})),o=!0)},o(t){Pt(d),t&&(r||(r=zt(e,_e,{duration:200},!1)),r.run(0)),o=!1},d(i){i&&L(e),a&&a.d(),l&&l.d(),c&&c.d(),d&&d.d(),t[20](null),i&&r&&r.end()}}}function Kr(t){let e,i,n=t[8]&&Jr(t),s=t[4]&&Qr(t);return{c(){e=N("summary"),n&&n.c(),i=O(),s&&s.c(),V(e,"class","micrio-details")},m(t,r){I(t,e,r),n&&n.m(e,null),S(e,i),s&&s.m(e,null)},p(t,r){t[8]?n?n.p(t,r):(n=Jr(t),n.c(),n.m(e,i)):n&&(n.d(1),n=null),t[4]?s?s.p(t,r):(s=Qr(t),s.c(),s.m(e,null)):s&&(s.d(1),s=null)},d(t){t&&L(e),n&&n.d(),s&&s.d()}}}function Jr(t){let e,i;return{c(){e=N("cite"),i=z(t[8]),V(e,"class","micrio-details")},m(t,n){I(t,e,n),S(e,i)},p(t,e){256&e&&Y(i,t[8])},d(t){t&&L(e)}}}function Qr(t){let e,i;return{c(){e=N("small"),i=z(t[4]),V(e,"class","micrio-details")},m(t,n){I(t,e,n),S(e,i)},p(t,e){16&e&&Y(i,t[4])},d(t){t&&L(e)}}}function to(t){let e,i;return{c(){e=new K(!1),i=O(),e.a=i},m(n,s){e.m(t[7],n,s),I(n,i,s)},p(t,i){128&i&&e.p(t[7])},d(t){t&&(L(i),e.d())}}}function eo(t){let e,i,n,s=(t[5]||t[6])+"";return{c(){e=N("p"),i=N("a"),n=z(s),V(i,"rel","noopener noreferrer"),V(i,"href",t[6]),V(i,"target","_blank"),V(e,"class","micrio-details")},m(t,s){I(t,e,s),S(e,i),S(i,n)},p(t,e){96&e&&s!==(s=(t[5]||t[6])+"")&&Y(n,s),64&e&&V(i,"href",t[6])},d(t){t&&L(e)}}}function io(t){let e,i;return e=new Ui({props:{type:"close",title:t[9].close}}),e.$on("click",t[19]),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};512&i&&(n.title=t[9].close),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function no(t){let e,i,n=(t[8]||t[7]||t[6])&&Zr(t);return{c(){n&&n.c(),e=O()},m(t,s){n&&n.m(t,s),I(t,e,s),i=!0},p(t,[i]){t[8]||t[7]||t[6]?n?(n.p(t,i),448&i&&Lt(n,1)):(n=Zr(t),n.c(),Lt(n,1),n.m(e.parentNode,e)):n&&(At(),Pt(n,1,1,(()=>{n=null})),It())},i(t){i||(Lt(n),i=!0)},o(t){Pt(n),i=!1},d(t){t&&L(e),n&&n.d(t)}}}function so(t){let e="cm";return t>=1e5?(e="km",t/=1e5):t>=100?(e="m",t/=100):t<1e-6?(e="nm",t*=1e7):t<.001?(e="µm",t*=1e4):t<1&&(e="mm",t*=10),t.toFixed(2)+" "+e}function ro(e,i,n){let s,r,o,a,l,c,u,m,p,f,g,v,$,w=t,y=()=>(w(),w=d(T,(t=>n(15,p=t))),T),b=t,k=()=>(b(),b=d(x,(t=>n(16,f=t))),x);h(e,Oe,(t=>n(9,$=t))),e.$$.on_destroy.push((()=>w())),e.$$.on_destroy.push((()=>b()));let{info:T}=i;y();let{data:x}=i;k();const{_lang:_,current:E}=lt("micrio");h(e,_,(t=>n(17,g=t))),h(e,E,(t=>n(18,v=t)));let S,M=!1;rt((()=>{n(3,S.ontoggle=()=>{n(2,M=S.open)},S)}));return e.$$set=t=>{"info"in t&&y(n(0,T=t.info)),"data"in t&&k(n(1,x=t.data))},e.$$.update=()=>{262144&e.$$.dirty&&n(13,s=null==v?void 0:v.$settings.cmWidth),262144&e.$$.dirty&&n(12,r=null==v?void 0:v.$settings.cmHeight),196608&e.$$.dirty&&n(14,o=f?(null==f?void 0:f.i18n)?f.i18n[g]:f:void 0),49152&e.$$.dirty&&n(8,a=(null==o?void 0:o.title)??(null==p?void 0:p.title)??""),16384&e.$$.dirty&&n(7,l=null==o?void 0:o.description),16384&e.$$.dirty&&n(6,c=null==o?void 0:o.sourceUrl),16384&e.$$.dirty&&n(5,u=null==o?void 0:o.copyright),12288&e.$$.dirty&&n(4,m=s&&r?so(s)+" x "+so(r):null)},[T,x,M,S,m,u,c,l,a,$,_,E,r,s,o,p,f,g,v,()=>n(3,S.open=!1,S),function(t){ut[t?"unshift":"push"]((()=>{S=t,n(3,S)}))}]}class oo extends Yt{constructor(t){super(),Gt(this,t,ro,no,a,{info:0,data:1})}}function ao(t){let e,i,n,s;return i=new bi({props:{name:"error"}}),{c(){e=N("div"),qt(i.$$.fragment),n=z(t[0]),V(e,"class","micrio-error")},m(t,r){I(t,e,r),Wt(i,e,null),S(e,n),s=!0},p(t,[e]){(!s||1&e)&&Y(n,t[0])},i(t){s||(Lt(i.$$.fragment,t),s=!0)},o(t){Pt(i.$$.fragment,t),s=!1},d(t){t&&L(e),Xt(i)}}}function lo(t,e,i){let{message:n}=e;return t.$$set=t=>{"message"in t&&i(0,n=t.message)},[n]}let co=class extends Yt{constructor(t){super(),Gt(this,t,lo,ao,a,{message:0})}};function uo(t){let e;return{c(){e=N("figcaption")},m(i,n){I(i,e,n),e.innerHTML=t[2]},p(t,i){4&i&&(e.innerHTML=t[2])},d(t){t&&L(e)}}}function ho(e){let i,n,s,r,o,a,l,c=e[2]&&uo(e);return{c(){i=N("figure"),n=N("micr-io"),o=D(),c&&c.c(),X(n,"data-gallery",s=e[0].map(e[10]).join(";")),X(n,"data-start",e[1]),X(n,"data-path",r=e[3]&&e[3].$info&&e[3].$info.path),X(n,"data-logo","false"),X(n,"class","micrio-micrio-gallery")},m(t,s){I(t,i,s),S(i,n),S(i,o),c&&c.m(i,null),a||(l=R(n,"gallery-show",e[6]),a=!0)},p(t,[e]){9&e&&s!==(s=t[0].map(t[10]).join(";"))&&X(n,"data-gallery",s),2&e&&X(n,"data-start",t[1]),8&e&&r!==(r=t[3]&&t[3].$info&&t[3].$info.path)&&X(n,"data-path",r),t[2]?c?c.p(t,e):(c=uo(t),c.c(),c.m(i,null)):c&&(c.d(1),c=null)},i:t,o:t,d(t){t&&L(i),c&&c.d(),a=!1,l()}}}function mo(t,e,i){let n,s,r,o,{gallery:a}=e,{startId:l}=e;const c=lt("micrio"),{_lang:d,current:u}=c;let m;h(t,d,(t=>i(9,r=t))),h(t,u,(t=>i(3,o=t)));return t.$$set=t=>{"gallery"in t&&i(0,a=t.gallery),"startId"in t&&i(1,l=t.startId)},t.$$.update=()=>{var e,o;129&t.$$.dirty&&i(8,n=a[m]),768&t.$$.dirty&&i(2,s=(null==(o=null==(e=null==n?void 0:n.i18n)?void 0:e[r])?void 0:o.description)??void 0)},[a,l,s,o,d,u,t=>{i(7,m=t.detail)},m,n,r,t=>{var e;return`${t.micrioId},${t.width},${t.height},${t.isDeepZoom?"d":""}${t.isWebP?",w":t.isPng||!(null==o?void 0:o.isV5)&&(null==(e=t.src)?void 0:e.endsWith(".png"))?",p":""}`}]}class po extends Yt{constructor(t){super(),Gt(this,t,mo,ho,a,{gallery:0,startId:1})}}function fo(t,e,i){const n=t.slice();return n[37]=e[i],n}function go(t,e,i){const n=t.slice();return n[40]=e[i],n}function vo(t){let e,i,n,s=!t[2]&&$o(t),r=t[1]&&null!=t[1].currentStep&&wo(t);return{c(){e=N("aside"),s&&s.c(),i=D(),r&&r.c(),V(e,"class","micrio-popover"),H(e,"inside",!t[14])},m(t,o){I(t,e,o),s&&s.m(e,null),S(e,i),r&&r.m(e,null),n=!0},p(t,o){t[2]?s&&(At(),Pt(s,1,1,(()=>{s=null})),It()):s?(s.p(t,o),4&o[0]&&Lt(s,1)):(s=$o(t),s.c(),Lt(s,1),s.m(e,i)),t[1]&&null!=t[1].currentStep?r?(r.p(t,o),2&o[0]&&Lt(r,1)):(r=wo(t),r.c(),Lt(r,1),r.m(e,null)):r&&(At(),Pt(r,1,1,(()=>{r=null})),It()),(!n||16384&o[0])&&H(e,"inside",!t[14])},i(t){n||(Lt(s),Lt(r),n=!0)},o(t){Pt(s),Pt(r),n=!1},d(t){t&&L(e),s&&s.d(),r&&r.d()}}}function $o(t){let e,i;return e=new Ui({props:{type:"close",title:t[17].close,className:"close-popover"}}),e.$on("click",t[21]),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};131072&i[0]&&(n.title=t[17].close),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function wo(t){let e,i,n,s=t[1].currentStep>0&&yo(t),r=t[1].currentStep<t[1].steps.length-1&&bo(t);return{c(){s&&s.c(),e=D(),r&&r.c(),i=O()},m(t,o){s&&s.m(t,o),I(t,e,o),r&&r.m(t,o),I(t,i,o),n=!0},p(t,n){t[1].currentStep>0?s?(s.p(t,n),2&n[0]&&Lt(s,1)):(s=yo(t),s.c(),Lt(s,1),s.m(e.parentNode,e)):s&&(At(),Pt(s,1,1,(()=>{s=null})),It()),t[1].currentStep<t[1].steps.length-1?r?(r.p(t,n),2&n[0]&&Lt(r,1)):(r=bo(t),r.c(),Lt(r,1),r.m(i.parentNode,i)):r&&(At(),Pt(r,1,1,(()=>{r=null})),It())},i(t){n||(Lt(s),Lt(r),n=!0)},o(t){Pt(s),Pt(r),n=!1},d(t){t&&(L(e),L(i)),s&&s.d(t),r&&r.d(t)}}}function yo(t){let e,i;return e=new Ui({props:{type:"arrow-left",title:t[17].tourStepPrev,className:"prev-tour-step"}}),e.$on("click",t[26]),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};131072&i[0]&&(n.title=t[17].tourStepPrev),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function bo(t){let e,i;return e=new Ui({props:{type:"arrow-right",title:t[17].tourStepNext,className:"next-tour-step"}}),e.$on("click",t[27]),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};131072&i[0]&&(n.title=t[17].tourStepNext),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function ko(t){let e,i,n,s,r,o,a=t[20].length>1&&function(t){let e,i,n=Dt(t[20]),s=[];for(let o=0;o<n.length;o+=1)s[o]=Eo(go(t,n,o));const r=t=>Pt(s[t],1,1,(()=>{s[t]=null}));return{c(){e=N("menu");for(let t=0;t<s.length;t+=1)s[t].c();V(e,"class","micrio-popover")},m(t,n){I(t,e,n);for(let i=0;i<s.length;i+=1)s[i]&&s[i].m(e,null);i=!0},p(t,i){if(1049344&i[0]){let o;for(n=Dt(t[20]),o=0;o<n.length;o+=1){const r=go(t,n,o);s[o]?(s[o].p(r,i),Lt(s[o],1)):(s[o]=Eo(r),s[o].c(),Lt(s[o],1),s[o].m(e,null))}for(At(),o=n.length;o<s.length;o+=1)r(o);It()}},i(t){if(!i){for(let t=0;t<n.length;t+=1)Lt(s[t]);i=!0}},o(t){s=s.filter(Boolean);for(let e=0;e<s.length;e+=1)Pt(s[e]);i=!1},d(t){t&&L(e),P(s,t)}}}(t);const l=[Mo,So],c=[];function d(t,e){return t[16]?0:1}i=d(t),n=c[i]=l[i](t);let u=t[5].buttons&&t[5].buttons.length&&zo(t);return{c(){a&&a.c(),e=D(),n.c(),s=D(),u&&u.c(),r=O()},m(t,n){a&&a.m(t,n),I(t,e,n),c[i].m(t,n),I(t,s,n),u&&u.m(t,n),I(t,r,n),o=!0},p(t,e){t[20].length>1&&a.p(t,e);let o=i;i=d(t),i===o?c[i].p(t,e):(At(),Pt(c[o],1,1,(()=>{c[o]=null})),It(),n=c[i],n?n.p(t,e):(n=c[i]=l[i](t),n.c()),Lt(n,1),n.m(s.parentNode,s)),t[5].buttons&&t[5].buttons.length?u?(u.p(t,e),32&e[0]&&Lt(u,1)):(u=zo(t),u.c(),Lt(u,1),u.m(r.parentNode,r)):u&&(At(),Pt(u,1,1,(()=>{u=null})),It())},i(t){o||(Lt(a),Lt(n),Lt(u),o=!0)},o(t){Pt(a),Pt(n),Pt(u),o=!1},d(t){t&&(L(e),L(s),L(r)),a&&a.d(t),c[i].d(t),u&&u.d(t)}}}function To(t){let e,i;return e=new po({props:{gallery:t[0].gallery,startId:t[0].galleryStart}}),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};1&i[0]&&(n.gallery=t[0].gallery),1&i[0]&&(n.startId=t[0].galleryStart),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function xo(t){let e,i,n,s,r;const o=[Fo,Ro],a=[];function l(t,e){return t[4]&&t[4].embedUrl?0:t[7].images&&t[7].images.length?1:-1}~(e=l(t))&&(i=a[e]=o[e](t));let c=t[13]&&Uo(t);return{c(){i&&i.c(),n=D(),c&&c.c(),s=O()},m(t,i){~e&&a[e].m(t,i),I(t,n,i),c&&c.m(t,i),I(t,s,i),r=!0},p(t,r){let d=e;e=l(t),e===d?~e&&a[e].p(t,r):(i&&(At(),Pt(a[d],1,1,(()=>{a[d]=null})),It()),~e?(i=a[e],i?i.p(t,r):(i=a[e]=o[e](t),i.c()),Lt(i,1),i.m(n.parentNode,n)):i=null),t[13]?c?(c.p(t,r),8192&r[0]&&Lt(c,1)):(c=Uo(t),c.c(),Lt(c,1),c.m(s.parentNode,s)):c&&(At(),Pt(c,1,1,(()=>{c=null})),It())},i(t){r||(Lt(i),Lt(c),r=!0)},o(t){Pt(i),Pt(c),r=!1},d(t){t&&(L(n),L(s)),~e&&a[e].d(t),c&&c.d(t)}}}function _o(e){let i,n=e[40].toUpperCase()+"";return{c(){i=z(n)},m(t,e){I(t,i,e)},p:t,d(t){t&&L(i)}}}function Eo(t){let e,i,n;return e=new Ui({props:{title:(null==en?void 0:en.of(t[40]))??t[40],active:t[40]==t[8],$$slots:{default:[_o]},$$scope:{ctx:t}}}),e.$on("click",(function(){return t[28](t[40])})),{c(){qt(e.$$.fragment),i=D()},m(t,s){Wt(e,t,s),I(t,i,s),n=!0},p(i,n){t=i;const s={};256&n[0]&&(s.active=t[40]==t[8]),4096&n[1]&&(s.$$scope={dirty:n,ctx:t}),e.$set(s)},i(t){n||(Lt(e.$$.fragment,t),n=!0)},o(t){Pt(e.$$.fragment,t),n=!1},d(t){t&&L(i),Xt(e,t)}}}function So(t){let e,i;return e=new xs({props:{$$slots:{default:[No]},$$scope:{ctx:t}}}),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};1096&i[0]|4096&i[1]&&(n.$$scope={dirty:i,ctx:t}),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function Mo(t){let e,i,n=t[10]&&Co(t);return{c(){n&&n.c(),e=O()},m(t,s){n&&n.m(t,s),I(t,e,s),i=!0},p(t,i){t[10]?n?(n.p(t,i),1024&i[0]&&Lt(n,1)):(n=Co(t),n.c(),Lt(n,1),n.m(e.parentNode,e)):n&&(At(),Pt(n,1,1,(()=>{n=null})),It())},i(t){i||(Lt(n),i=!0)},o(t){Pt(n),i=!1},d(t){t&&L(e),n&&n.d(t)}}}function Ao(t){let e,i,n=t[3].title+"";return{c(){e=N("h2"),i=z(n),V(e,"class","micrio-popover")},m(t,n){I(t,e,n),S(e,i)},p(t,e){8&e[0]&&n!==(n=t[3].title+"")&&Y(i,n)},d(t){t&&L(e)}}}function Io(t){let e,i;return e=new ys({props:{src:t[3].embed,controls:!0}}),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};8&i[0]&&(n.src=t[3].embed),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function Lo(t){let e,i;return{c(){e=N("img"),c(e.src,i=t[6])||V(e,"src",i),V(e,"alt","")},m(t,i){I(t,e,i)},p(t,n){64&n[0]&&!c(e.src,i=t[6])&&V(e,"src",i)},d(t){t&&L(e)}}}function Po(t){let e,i,n=t[3].content+"";return{c(){e=new K(!1),i=O(),e.a=i},m(t,s){e.m(n,t,s),I(t,i,s)},p(t,i){8&i[0]&&n!==(n=t[3].content+"")&&e.p(n)},d(t){t&&(L(i),e.d())}}}function No(t){let e,i,n,s,r,o=t[3].title&&Ao(t),a=t[3].embed&&t[10]&&Io(t),l=t[6]&&Lo(t),c=t[3].content&&Po(t);return{c(){o&&o.c(),e=D(),a&&a.c(),i=D(),l&&l.c(),n=D(),c&&c.c(),s=O()},m(t,d){o&&o.m(t,d),I(t,e,d),a&&a.m(t,d),I(t,i,d),l&&l.m(t,d),I(t,n,d),c&&c.m(t,d),I(t,s,d),r=!0},p(t,r){t[3].title?o?o.p(t,r):(o=Ao(t),o.c(),o.m(e.parentNode,e)):o&&(o.d(1),o=null),t[3].embed&&t[10]?a?(a.p(t,r),1032&r[0]&&Lt(a,1)):(a=Io(t),a.c(),Lt(a,1),a.m(i.parentNode,i)):a&&(At(),Pt(a,1,1,(()=>{a=null})),It()),t[6]?l?l.p(t,r):(l=Lo(t),l.c(),l.m(n.parentNode,n)):l&&(l.d(1),l=null),t[3].content?c?c.p(t,r):(c=Po(t),c.c(),c.m(s.parentNode,s)):c&&(c.d(1),c=null)},i(t){r||(Lt(a),r=!0)},o(t){Pt(a),r=!1},d(t){t&&(L(e),L(i),L(n),L(s)),o&&o.d(t),a&&a.d(t),l&&l.d(t),c&&c.d(t)}}}function Co(t){let e,i;return e=new ys({props:{src:t[3].embed,figcaption:t[3].content,controls:!0,autoplay:!0,destroying:t[24]}}),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};8&i[0]&&(n.src=t[3].embed),8&i[0]&&(n.figcaption=t[3].content),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function zo(t){let e,i,n=Dt(t[5].buttons),s=[];for(let o=0;o<n.length;o+=1)s[o]=Oo(fo(t,n,o));const r=t=>Pt(s[t],1,1,(()=>{s[t]=null}));return{c(){e=N("menu");for(let t=0;t<s.length;t+=1)s[t].c();V(e,"class","right micrio-popover")},m(t,n){I(t,e,n);for(let i=0;i<s.length;i+=1)s[i]&&s[i].m(e,null);i=!0},p(t,i){if(8388896&i[0]){let o;for(n=Dt(t[5].buttons),o=0;o<n.length;o+=1){const r=fo(t,n,o);s[o]?(s[o].p(r,i),Lt(s[o],1)):(s[o]=Oo(r),s[o].c(),Lt(s[o],1),s[o].m(e,null))}for(At(),o=n.length;o<s.length;o+=1)r(o);It()}},i(t){if(!i){for(let t=0;t<n.length;t+=1)Lt(s[t]);i=!0}},o(t){s=s.filter(Boolean);for(let e=0;e<s.length;e+=1)Pt(s[e]);i=!1},d(t){t&&L(e),P(s,t)}}}function Do(t){let e,i=t[37].i18nTitle[t[8]]+"";return{c(){e=z(i)},m(t,i){I(t,e,i)},p(t,n){288&n[0]&&i!==(i=t[37].i18nTitle[t[8]]+"")&&Y(e,i)},d(t){t&&L(e)}}}function Oo(t){let e,i,n;return e=new Ui({props:{href:"link"==t[37].type?t[37].action:void 0,blankTarget:t[37].blankTarget,$$slots:{default:[Do]},$$scope:{ctx:t}}}),e.$on("click",(function(){return t[29](t[37])})),{c(){qt(e.$$.fragment),i=D()},m(t,s){Wt(e,t,s),I(t,i,s),n=!0},p(i,n){t=i;const s={};32&n[0]&&(s.href="link"==t[37].type?t[37].action:void 0),32&n[0]&&(s.blankTarget=t[37].blankTarget),288&n[0]|4096&n[1]&&(s.$$scope={dirty:n,ctx:t}),e.$set(s)},i(t){n||(Lt(e.$$.fragment,t),n=!0)},o(t){Pt(e.$$.fragment,t),n=!1},d(t){t&&L(i),Xt(e,t)}}}function Ro(t){let e,i;return e=new po({props:{gallery:t[7].images}}),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};128&i[0]&&(n.gallery=t[7].images),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function Fo(t){let e,i;return e=new ys({props:{src:t[4]?t[4].embedUrl:void 0,uuid:t[7].id,figcaption:t[4]?t[4].embedDescription:void 0,controls:!0,autoplay:t[7].embedAutoPlay,destroying:t[24]}}),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};16&i[0]&&(n.src=t[4]?t[4].embedUrl:void 0),128&i[0]&&(n.uuid=t[7].id),16&i[0]&&(n.figcaption=t[4]?t[4].embedDescription:void 0),128&i[0]&&(n.autoplay=t[7].embedAutoPlay),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function Uo(t){let e,i;return e=new Bs({props:{marker:t[7],destroying:t[24],noEmbed:!0,noGallery:!0,noImages:!t[4]||!t[4].embedUrl}}),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};128&i[0]&&(n.marker=t[7]),16&i[0]&&(n.noImages=!t[4]||!t[4].embedUrl),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function Vo(t){let e,i,n,s,o,a,l,c=t[12]&&vo(t);const d=[xo,To,ko],u=[];function h(t,e){return t[7]?0:t[0].gallery?1:t[5]&&t[3]?2:-1}return~(n=h(t))&&(s=u[n]=d[n](t)),{c(){e=N("dialog"),c&&c.c(),i=D(),s&&s.c(),V(e,"class","micrio-popover"),H(e,"page",!!t[5]),H(e,"article",!!t[5]&&!t[16]),H(e,"has-media",t[15])},m(s,r){I(s,e,r),c&&c.m(e,null),S(e,i),~n&&u[n].m(e,null),t[30](e),o=!0,a||(l=[R(e,"close",t[22]),R(e,"outrostart",t[31])],a=!0)},p(t,r){t[12]?c?(c.p(t,r),4096&r[0]&&Lt(c,1)):(c=vo(t),c.c(),Lt(c,1),c.m(e,i)):c&&(At(),Pt(c,1,1,(()=>{c=null})),It());let a=n;n=h(t),n===a?~n&&u[n].p(t,r):(s&&(At(),Pt(u[a],1,1,(()=>{u[a]=null})),It()),~n?(s=u[n],s?s.p(t,r):(s=u[n]=d[n](t),s.c()),Lt(s,1),s.m(e,null)):s=null),(!o||32&r[0])&&H(e,"page",!!t[5]),(!o||65568&r[0])&&H(e,"article",!!t[5]&&!t[16]),(!o||32768&r[0])&&H(e,"has-media",t[15])},i(t){o||(Lt(c),Lt(s),o=!0)},o(t){Pt(c),Pt(s),o=!1},d(i){i&&L(e),c&&c.d(),~n&&u[n].d(),t[30](null),a=!1,r(l)}}}function Bo(t,e,i){let n,s,r,o,a,l,c,d,u,m,p,f,g,v,$,w;h(t,Oe,(t=>i(17,w=t)));let{popover:y}=e;const b=lt("micrio"),{events:k,state:T,current:x,_lang:_}=b;h(t,x,(t=>i(33,$=t))),h(t,_,(t=>i(8,v=t)));const E=null==$?void 0:$.$data,S=Object.keys((null==E?void 0:E.revision)??[]);function M(){L.close()}function A(t){M(),"close"!=t.type&&setTimeout((()=>{var e,i;switch(t.type){case"marker":null==$||$.state.marker.set(t.action);break;case"mtour":b.state.tour.set(null==(e=null==E?void 0:E.markerTours)?void 0:e.find((e=>e.id==t.action)));break;case"vtour":b.state.tour.set(null==(i=null==E?void 0:E.tours)?void 0:i.find((e=>e.id==t.action)))}}),200)}const I=Ht(!1);let L,P=!0,N=v;rt((()=>(L.showModal(),vt().then((()=>{const t=L.querySelector("button.active")??L.querySelector("button");null==t||t.focus()})),_.subscribe((t=>{t&&t!=N&&(i(10,P=!1),N=t,setTimeout((()=>i(10,P=!0)),200))})))));return t.$$set=t=>{"popover"in t&&i(0,y=t.popover)},t.$$.update=()=>{var e,h,$,w;1&t.$$.dirty[0]&&i(7,n=y.marker),384&t.$$.dirty[0]&&i(4,s=n?n.i18n?n.i18n[v]:n:void 0),1&t.$$.dirty[0]&&i(1,r=y.markerTour),1&t.$$.dirty[0]&&i(5,o=y.contentPage),288&t.$$.dirty[0]&&i(3,a=o?(null==(e=o.i18n)?void 0:e[v])??o:void 0),40&t.$$.dirty[0]&&i(16,l=o&&a&&!(null==(h=null==o?void 0:o.buttons)?void 0:h.length)?!(!a.embed||a.content&&!(a.content.length<250)||o.image):void 0),32&t.$$.dirty[0]&&i(6,c=(null==o?void 0:o.image)?"string"==typeof o.image?o.image:o.image.src:void 0),72&t.$$.dirty[0]&&i(15,d=!!(null==a?void 0:a.embed)||!!c),32&t.$$.dirty[0]&&i(2,u=!!(null==($=null==o?void 0:o.buttons)?void 0:$.find((t=>"close"==t.type)))),1&t.$$.dirty[0]&&i(25,m=!!(null==(w=y.marker)?void 0:w.images)&&y.marker.images.length>0),33554448&t.$$.dirty[0]&&i(14,p=s&&s.body||m),33554456&t.$$.dirty[0]&&i(13,f=s&&s.body||m&&(null==a?void 0:a.embed)),6&t.$$.dirty[0]&&i(12,g=!u||r&&null!=r.currentStep)},[y,r,u,a,s,o,c,n,v,b,P,L,g,f,p,d,l,w,x,_,S,M,function(){var t;y.contentPage?k.dispatch("page-closed"):r?T.tour.set(void 0):y.marker&&(null==(t=y.image)||t.state.marker.set(void 0)),T.popover.set(void 0)},A,I,m,()=>r&&r.prev&&r.prev(),()=>r&&r.next&&r.next(),t=>i(9,b.lang=t,b),t=>A(t),function(t){ut[t?"unshift":"push"]((()=>{L=t,i(11,L)}))},()=>I.set(!0)]}class qo extends Yt{constructor(t){super(),Gt(this,t,Bo,Vo,a,{popover:0},null,[-1,-1])}}function Wo(t,e,i){let n,{marker:s}=e,{ctx:r}=e,{is360:o}=e;const a=r.createGain();a.connect(Vr);const l=lt("micrio"),c=l.$current.$info,d=c.width,u=c.height,h=r.createPanner();function m(){if(a.gain.value=n.volume??1,o){h.refDistance=2.75*n.radius,h.maxDistance=n.radius*(11/3);const t=s.x*-Math.PI*2,e=(s.y-.5)*-Math.PI,i=h.positionX.value=Math.cos(e)*Math.sin(t)*11,r=h.positionY.value=11*Math.sin(e),o=h.positionZ.value=Math.cos(e)*Math.cos(t)*11;let a=i*i+r*r+o*o;a>0&&(a=1/Math.sqrt(a)),h.orientationX.value=i*a,h.orientationY.value=r*a,h.orientationZ.value=o*a}else h.distanceModel="linear",h.positionX.value=2*(s.x-.5),h.positionY.value=2*(.5-s.y)*(u/d),h.positionZ.value=-.2,h.rolloffFactor=2,h.refDistance=n.radius*n.radius*10,h.maxDistance=5*n.radius}let p,f;function g(){p&&p.disconnect(),p=r.createBufferSource(),n.loop&&(n.repeatAfter>0?p.onended=()=>{f=setTimeout(g,1e3*n.repeatAfter)}:p.loop=!0),a.gain.value=n.volume??1,p.buffer=Br[n.src],p.connect(h),p.start()}h.panningModel="equalpower",h.rolloffFactor=1,h.coneOuterGain=0;let v=JSON.stringify(n);return rt((()=>(m(),h.connect(a),async function(){n.src&&(Br[n.src]||(Br[n.src]=await fetch(n.src).then((t=>t.arrayBuffer())).then((t=>r.decodeAudioData(t)))),n.alwaysPlay&&n.repeatAfter>0?f=setTimeout(g,1e3*n.repeatAfter):g())}(),l.addEventListener("audio-update",m),()=>{l.removeEventListener("audio-update",m),p&&p.disconnect(),clearTimeout(f),h.disconnect(),a.disconnect()}))),t.$$set=t=>{"marker"in t&&i(0,s=t.marker),"ctx"in t&&i(1,r=t.ctx),"is360"in t&&i(2,o=t.is360)},t.$$.update=()=>{if(1&t.$$.dirty&&i(4,n=s.positionalAudio),24&t.$$.dirty){const t=JSON.stringify(n);v!=t&&i(3,v=t)&&m()}},[s,r,o,v,n]}class Xo extends Yt{constructor(t){super(),Gt(this,t,Wo,null,a,{marker:0,ctx:1,is360:2})}}function Go(t){let e,i,n,s,r,o,a=!t[0].htmlElement&&Yo(t);return{c(){e=N("div"),a&&a.c(),V(e,"id",i=`m-${t[0].id}`),V(e,"class",$(t[30])+" micrio-marker"),V(e,"style",n=t[11]?`--mat:matrix3d(${t[11]})`:t[12]?`--x:${t[12]}px;--y:${t[13]}px${t[32]?`;--scale:${t[14]}`:""}`:null),H(e,"overlapped",t[2]&&!t[3]),H(e,"cluster",t[31]),H(e,"behind",t[10]),H(e,"hovered",t[21]==t[0].id),H(e,"default",t[19]),H(e,"mat3d",!!t[11]),H(e,"opened",t[3]),H(e,"micrio-link",!!t[29].micrioLink),H(e,"has-icon",t[5]),H(e,"has-custom-icon",!!t[6])},m(i,n){I(i,e,n),a&&a.m(e,null),t[50](e),s=!0,r||(o=R(e,"change",t[40]),r=!0)},p(t,r){t[0].htmlElement?a&&(At(),Pt(a,1,1,(()=>{a=null})),It()):a?(a.p(t,r),1&r[0]&&Lt(a,1)):(a=Yo(t),a.c(),Lt(a,1),a.m(e,null)),(!s||1&r[0]&&i!==(i=`m-${t[0].id}`))&&V(e,"id",i),(!s||30720&r[0]&&n!==(n=t[11]?`--mat:matrix3d(${t[11]})`:t[12]?`--x:${t[12]}px;--y:${t[13]}px${t[32]?`;--scale:${t[14]}`:""}`:null))&&V(e,"style",n),(!s||12&r[0])&&H(e,"overlapped",t[2]&&!t[3]),(!s||1024&r[0])&&H(e,"behind",t[10]),(!s||2097153&r[0])&&H(e,"hovered",t[21]==t[0].id),(!s||524288&r[0])&&H(e,"default",t[19]),(!s||2048&r[0])&&H(e,"mat3d",!!t[11]),(!s||8&r[0])&&H(e,"opened",t[3]),(!s||32&r[0])&&H(e,"has-icon",t[5]),(!s||64&r[0])&&H(e,"has-custom-icon",!!t[6])},i(t){s||(Lt(a),s=!0)},o(t){Pt(a),s=!1},d(i){i&&L(e),a&&a.d(),t[50](null),r=!1,o()}}}function Yo(t){let e,i,n,s,o,a,l,c,d;const u=[Ho,jo],h=[];function m(t,e){return t[6]?0:t[7]?1:-1}~(i=m(t))&&(n=h[i]=u[i](t));let p=t[18]&&Zo(t);return{c(){e=N("button"),n&&n.c(),s=D(),p&&p.c(),V(e,"title",o=t[34]||t[31]?null:t[4]?t[4].label||t[4].title:null),V(e,"id",a=t[0].id),V(e,"data-scroll-through",""),V(e,"class","micrio-marker")},m(n,r){I(n,e,r),~i&&h[i].m(e,null),S(e,s),p&&p.m(e,null),t[49](e),l=!0,c||(d=[R(e,"click",t[35]),R(e,"focus",t[36]),R(e,"blur",t[37]),R(e,"mouseenter",t[38]),R(e,"mouseleave",t[39])],c=!0)},p(t,r){let c=i;i=m(t),i===c?~i&&h[i].p(t,r):(n&&(At(),Pt(h[c],1,1,(()=>{h[c]=null})),It()),~i?(n=h[i],n?n.p(t,r):(n=h[i]=u[i](t),n.c()),Lt(n,1),n.m(e,s)):n=null),t[18]?p?p.p(t,r):(p=Zo(t),p.c(),p.m(e,null)):p&&(p.d(1),p=null),(!l||16&r[0]&&o!==(o=t[34]||t[31]?null:t[4]?t[4].label||t[4].title:null))&&V(e,"title",o),(!l||1&r[0]&&a!==(a=t[0].id))&&V(e,"id",a)},i(t){l||(Lt(n),l=!0)},o(t){Pt(n),l=!1},d(n){n&&L(e),~i&&h[i].d(),p&&p.d(),t[49](null),c=!1,r(d)}}}function jo(t){let e,i;return e=new bi({props:{name:t[7]}}),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};128&i[0]&&(n.name=t[7]),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function Ho(e){let i,n;return{c(){i=N("img"),c(i.src,n=e[6].src)||V(i,"src",n),V(i,"alt",""),V(i,"class","micrio-marker")},m(t,e){I(t,i,e)},p(t,e){64&e[0]&&!c(i.src,n=t[6].src)&&V(i,"src",n)},i:t,o:t,d(t){t&&L(i)}}}function Zo(t){let e,i,n,s=(t[4].label||t[4].title)+"";return{c(){e=N("label"),i=z(s),V(e,"for",n=t[0].id),V(e,"data-scroll-through",""),V(e,"class","micrio-marker"),H(e,"static",t[33])},m(n,s){I(n,e,s),S(e,i),t[48](e)},p(t,r){16&r[0]&&s!==(s=(t[4].label||t[4].title)+"")&&Y(i,s),1&r[0]&&n!==(n=t[0].id)&&V(e,"for",n)},d(i){i&&L(e),t[48](null)}}}function Ko(t){let e,i;return e=new Xo({props:{marker:t[0],ctx:t[22],is360:t[1].is360}}),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};1&i[0]&&(n.marker=t[0]),4194304&i[0]&&(n.ctx=t[22]),2&i[0]&&(n.is360=t[1].is360),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function Jo(t){let e,i,n,s=!t[20]&&t[1]&&!t[8]&&Go(t),r=t[0].positionalAudio&&t[22]&&(!t[0].positionalAudio.noMobile||t[9])&&(t[0].positionalAudio.alwaysPlay||t[3])&&Ko(t);return{c(){s&&s.c(),e=D(),r&&r.c(),i=O()},m(t,o){s&&s.m(t,o),I(t,e,o),r&&r.m(t,o),I(t,i,o),n=!0},p(t,n){t[20]||!t[1]||t[8]?s&&(At(),Pt(s,1,1,(()=>{s=null})),It()):s?(s.p(t,n),1048834&n[0]&&Lt(s,1)):(s=Go(t),s.c(),Lt(s,1),s.m(e.parentNode,e)),t[0].positionalAudio&&t[22]&&(!t[0].positionalAudio.noMobile||t[9])&&(t[0].positionalAudio.alwaysPlay||t[3])?r?(r.p(t,n),4194825&n[0]&&Lt(r,1)):(r=Ko(t),r.c(),Lt(r,1),r.m(i.parentNode,i)):r&&(At(),Pt(r,1,1,(()=>{r=null})),It())},i(t){n||(Lt(s),Lt(r),n=!0)},o(t){Pt(s),Pt(r),n=!1},d(t){t&&(L(e),L(i)),s&&s.d(t),r&&r.d(t)}}}function Qo(t,e,i){var n,s,r,o,a,l,c,d,m,p,f;let g,v,$,w,y,b,k,T,x,_,E,S,M,A,I,L,P,N,C,z;h(t,qr,(t=>i(22,z=t)));const D=lt("micrio"),{current:O,events:R,state:F,_lang:U,spaceData:V}=D;h(t,O,(t=>i(67,N=t))),h(t,U,(t=>i(47,L=t)));const B=D.canvas.isMobile;h(t,B,(t=>i(9,M=t)));let{marker:q}=e,{image:W=N}=e,{forceHidden:X=!1}=e,{coords:G}=e,{overlapped:Y=!1}=e;q.tags||(q.tags=[]);const j=F.markerHoverId;h(t,j,(t=>i(21,C=t)));const H=lt("inView"),Z=lt("markerImages"),K=Z.has(q);!K&&W&&Z.set(q,W);const J=D.state.popup;h(t,J,(t=>i(66,P=t)));const Q=!(!W.isOmni||!(null==(n=W.$settings.omni)?void 0:n.sideLabels)||(null==(s=W.$settings._markers)?void 0:s.noTitles)),tt=F.tour;h(t,tt,(t=>i(46,I=t)));const et=t=>t.steps.findIndex((t=>t.startsWith(q.id)))>=0,it=q.data??{},nt=it._meta||{},st=W.$settings.omni;q.imageLayer&&q.imageLayer>((null==(r=null==st?void 0:st.layers)?void 0:r.length)??1)-1&&delete q.imageLayer,(null==(a=null==(o=null==N?void 0:N.$data)?void 0:o.markers)?void 0:a.find((t=>{var e,i;return(null==(i=null==(e=t.data)?void 0:e._micrioSplitLink)?void 0:i.markerId)==q.id&&"none"!=t.popupType})))&&(q.popupType="none",q.noMarker=!0),"embedUrl"in q&&q.embedUrl&&"embedInPopover"in q&&q.embedInPopover&&(q.popupType="popover");const ot=W.$settings._markers??{},at=!!W.$settings.doTourJumps,ct=q.tags.join(" "),dt="cluster"==q.type,ht=!!ot.noTitles||!!(null==st?void 0:st.sideLabels);!ht&&ot.showTitles;const mt=!!it.scales||!!W.$settings.markersScale,pt=mt&&!!ot.titlesNoScale,ft=it._micrioSplitLink,gt=!!ot.keepPopupsDuringTourTransitions,$t=/[?&]micrioNoTooltips/.test(location.search)||!!(null==st?void 0:st.sideLabels),wt=nt.gridAction,yt=(null==(c=null==(l=W.$settings)?void 0:l._markers)?void 0:c.autoStartTour)?D.wasm.images.map((t=>{var e,i;return"camera"in t?null==(i=null==(e=t.$data)?void 0:e.markerTours)?void 0:i.find(et):void 0})).filter((t=>!!t))[0]??(null==(d=null==V?void 0:V.markerTours)?void 0:d.find(et)):void 0,bt=null==yt?void 0:yt.steps.findIndex((t=>t.startsWith(q.id))),kt=!!(null==(p=null==(m=W.$settings)?void 0:m._markers)?void 0:p.autoStartTourAtBeginning);let Tt,xt,_t,Et,St,Mt,At,It=!K&&(!!it.alwaysOpen||F.$marker==q)||(null==(f=F.$tour)?void 0:f.id)==(null==yt?void 0:yt.id)&&(null==yt?void 0:yt.currentStep)==(bt??0),Lt=K&&W.state.$marker==q,Pt=!1,Nt=!1;function Ct(){clearTimeout(At)}const zt=()=>j.set(void 0);let Dt;async function Ot(){var t,e,n,s;if(dt)return;if(W.state.$marker!=q)return W.state.marker.set(q);if(ot.noMarkerActions)return;if(yt&&yt!=I){yt.initialStep=kt?0:bt;const i=null==(t=yt.stepInfo)?void 0:t[0];if(kt&&i&&i.micrioId!=W.id){const t=null==(e=D.canvases[0])?void 0:e.grid;(null==t?void 0:t.images.find((t=>t.id==i.micrioId)))?D.current.set(t.image):D.open(i.micrioId)}if(tt.set(yt),setTimeout((()=>nt.gridAction=wt),100),kt&&null!=bt&&bt>0)return W.state.marker.set(void 0),void Rt();await vt()}It=!1,R.dispatch("marker-opened",q);const r=I&&"steps"in I&&I.isSerialTour&&I.printChapters&&I.steps.findIndex((t=>t.startsWith(q.id)))>=0&&q.videoTour;var o;r||(w?"popover"==q.popupType?(await vt(),D.state.popover.set({marker:q,image:W,markerTour:I&&"steps"in I?I:void 0})):q.videoTour&&!I&&(tt.set(q.videoTour),(o=tt,new Promise((t=>{let e;e=o.subscribe((i=>{null==i&&(e?e():vt().then((()=>e())),t(i))}))}))).then((()=>W.state.marker.set(void 0)))):vt().then((()=>J.set(q))));const a=null==(n=it.micrioLink)?void 0:n.id;if(a&&vt().then((()=>{W.camera.stop();const t=ke(D,a);t&&(i(1,W.openedView=void 0,W),W.state.marker.set(void 0)),D.open(a,{vector:null==t?void 0:t.vector})})),ft&&!Nt&&!W.opts.secondaryTo){const t=null==(s=D.canvases[0])?void 0:s.grid;(null==t?void 0:t.lastPromise)&&await t.lastPromise,Dt=setTimeout((()=>{ft&&(Mt=D.open(ft.micrioId,{splitScreen:!0,splitTo:W,isPassive:!(!ft.follows||D.state.$tour),startView:ft.view}),Nt=!0)}),200)}}function Rt(){if(clearTimeout(Dt),R.dispatch("marker-closed",q),q.videoTour&&W.openedView?setTimeout((()=>W.camera.aniDoneAdd.push((()=>null==Vt?void 0:Vt.focus()))),10):null==Vt||Vt.focus(),D.state.popover.set(void 0),!w){P!=q||I&&"steps"in I&&gt||J.set(void 0);const t=D.canvases.find((t=>t!=W&&t.state.$marker));t&&vt().then((()=>{const e=t.state.$marker;e&&"popup"==e.popupType&&J.set(e)}))}ft&&Mt&&setTimeout((()=>{var t,e;const i=u(D.state.marker);Mt&&ft.micrioId!=(null==(e=null==(t=null==i?void 0:i.data)?void 0:t._micrioSplitLink)?void 0:e.micrioId)&&D.close(Mt)}),210)}let Ft,Ut,Vt,Bt,qt,Wt=!1;function Xt(){var t,e;if(W.is360&&mt)i(11,Tt=W.camera.getMatrix(q.x,q.y,1,1,0,0,0).join(","));else{let n=xt,s=_t;if(i(12,[xt,_t,Et,St]=W.camera.getXYDirect(q.x,q.y,{radius:q.radius,rotation:q.rotation}),xt,i(13,_t),i(14,Et)),W.is360)i(10,Pt=St>0);else if(W.isOmni&&st){if(b[0]&&b[1]&&null!=q.rotation){const n=st.frames/((null==(t=st.layers)?void 0:t.length)??1);let s=((null==(e=W.swiper)?void 0:e.currentIndex)??0)-(y??0);s>n/2&&(s-=n),s<-n/2&&(s+=n),i(10,Pt=s<=b[0]||s>=b[1])}else st.distance&&i(10,Pt=St<0);st.sideLabels&&!ot.noTitles&&(null==g?void 0:g.title)&&H&&(n!=xt||s!=_t)&&function(t,e){const i=D.canvas.element.offsetWidth,n=D.canvas.element.offsetHeight,s=!(t<0||t>i||e<0||e>n||Pt);(s||Wt)&&H.update((n=>(s?Wt?n[n.findIndex((([t])=>t==q))]=[q,t/i,e]:n.push([q,t/i,e]):Wt&&n.splice(n.findIndex((([t])=>t==q)),1),Wt=s,n)))}(xt,_t)}W.$settings.clusterMarkers&&G&&G.set(q.id,[xt,_t,Y?Ft:Ft=null==qt?void 0:qt.offsetWidth,Y?Ut:Ut=null==qt?void 0:qt.offsetHeight])}}const Gt=lt("mediaPaused");return h(t,Gt,(t=>i(45,A=t))),rt((()=>{var t,e;if(q.videoTour){const n="timeline"in q.videoTour?q.videoTour.timeline:null==(e=null==(t=q.videoTour.i18n)?void 0:t[L])?void 0:e.timeline;(null==n?void 0:n.length)&&i(0,q.view=n[0].rect,q)}const n=[W.state.marker.subscribe((t=>{"string"==typeof t&&t==q.id?W.state.marker.set(q):t==q?async function(){var t,e;if(Lt)return;if(i(3,Lt=!0),Ct(),ot.noMarkerActions)return;R.dispatch("marker-open",q),!I||"steps"in I&&(et(I)||I.cannotClose)||(tt.set(void 0),await vt()),w||I&&"steps"in I&&gt||(J.set(void 0),D.state.popover.set(void 0)),zt(),(null==ft?void 0:ft.markerId)&&(Mt||(Mt=D.canvases.find((t=>t.id==ft.micrioId))),Mt&&(Nt=u(Mt.visible),Nt&&(null==ft?void 0:ft.view)&&Mt.camera.flyToView(ft.view,{isJump:!0}).catch((()=>{})))),void 0!==q.imageLayer&&W.state.layer.set(q.imageLayer);const n=yt&&kt&&yt!=I&&null!=bt&&bt>0;n&&delete nt.gridAction,n||!q.view||it.noAnimate||q.videoTour||nt.gridView?Ot():It?(W.camera.setView(q.view,{area:null==(t=W.opts)?void 0:t.area}),Ot()):W.camera.flyToView(q.view,{omniIndex:y,noTrueNorth:!0,area:null==(e=W.opts)?void 0:e.area,isJump:!!it.doJump||at&&!!F.$tour}).then(Ot).catch((()=>{I||W.state.marker.set(void 0)}))}():it.alwaysOpen||(Lt&&Rt(),i(3,Lt=!1))}))];return $||(n.push(W.camera.image.state.view.subscribe(Xt)),Xt()),X||vt().then((()=>{Lt&&!q.noMarker&&P&&P!=q&&!I?W.state.marker.set(void 0):(It||it.alwaysOpen)&&Ot()})),q.htmlElement&&Bt&&Bt.appendChild(q.htmlElement),()=>{var t;for(clearTimeout(Dt);n.length;)null==(t=n.shift())||t()}})),t.$$set=t=>{"marker"in t&&i(0,q=t.marker),"image"in t&&i(1,W=t.image),"forceHidden"in t&&i(42,X=t.forceHidden),"coords"in t&&i(43,G=t.coords),"overlapped"in t&&i(2,Y=t.overlapped)},t.$$.update=()=>{var e,n,s,r,o;1&t.$$.dirty[0]|65536&t.$$.dirty[1]&&i(4,g=q.i18n?q.i18n[L]:q),17&t.$$.dirty[0]&&i(44,v=!((null==g?void 0:g.title)||(null==g?void 0:g.body)||(null==g?void 0:g.bodySecondary)||(null==g?void 0:g.embedUrl)||q.images&&q.images.length)),1&t.$$.dirty[0]|2048&t.$$.dirty[1]&&i(20,$=X||q.noMarker),1&t.$$.dirty[0]|8192&t.$$.dirty[1]&&(w="popup"!=q.popupType||v),3&t.$$.dirty[0]&&(y=W.camera.getOmniFrame((q.rotation??0)+(q.backside?Math.PI:0))),3&t.$$.dirty[0]&&(b=q.visibleArc?[W.camera.getOmniFrame(q.visibleArc[0]),W.camera.getOmniFrame(q.visibleArc[1])]:[]),8&t.$$.dirty[0]|49152&t.$$.dirty[1]&&i(8,k=I&&(!("steps"in I)&&!I.keepMarkers||ot.hideMarkersDuringTour&&!A)&&!Lt),257&t.$$.dirty[0]&&k&&H.update((t=>{const e=t.findIndex((t=>t[0]==q));return e>=0&&t.splice(e,1),t})),1&t.$$.dirty[0]&&i(7,T="default"==q.type?void 0:"link"==q.type?"link":"media"==q.type?"play":"cluster"==q.type?void 0:q.type??void 0),3&t.$$.dirty[0]&&i(6,x=(null!=(null==(e=q.data)?void 0:e.customIconIdx)?null==(r=null==(n=W.$settings._markers)?void 0:n.customIcons)?void 0:r[null==(s=q.data)?void 0:s.customIconIdx]:void 0)??(null==(o=q.data)?void 0:o.icon)??ot.markerIcon??void 0),192&t.$$.dirty[0]&&i(5,_=!!T||!!x),33&t.$$.dirty[0]&&i(19,E=!("class"in q&&""===q.class||!_&&"default"!=q.type)),528&t.$$.dirty[0]&&i(18,S=g&&(!ht||M&&Q)&&(g.label||g.title))},[q,W,Y,Lt,g,_,x,T,k,M,Pt,Tt,xt,_t,Et,Vt,Bt,qt,S,E,$,C,z,O,U,B,j,J,tt,it,ct,dt,mt,pt,$t,function(){var t;if(Ct(),q.onclick)return q.onclick(q);if(!ot.noMarkerActions)if("cluster"==q.type){if(q.view&&(null==N?void 0:N.$info)){const e=N.camera.getScale(),i=[20/N.$info.width*e,20/N.$info.height*e];W.camera.flyToView([q.view[0]-i[0],q.view[1]-i[1],q.view[2]+i[0],q.view[3]+i[1]],{area:null==(t=W.opts)?void 0:t.area,limitZoom:!0})}}else W.state.marker.set(q)},function(){ot.noMarkerActions||(Bt.parentNode.scrollTo(0,0),Ct(),At=setTimeout((()=>{const t=W.camera.getXY(q.x,q.y);!Lt&&(t[0]<0||t[0]>=D.offsetWidth||t[1]<0||t[1]>=D.offsetHeight||W.is360&&t[3]>4)&&W.camera.flyToCoo([q.x,q.y],{speed:2,limit:!0}).catch((()=>{}))}),150))},Ct,()=>j.set(q.id),zt,function(t){const e=t.detail;i(0,q.x=e.x,q),i(0,q.y=e.y,q),Xt()},Gt,X,G,v,A,I,L,function(t){ut[t?"unshift":"push"]((()=>{qt=t,i(17,qt)}))},function(t){ut[t?"unshift":"push"]((()=>{Vt=t,i(15,Vt)}))},function(t){ut[t?"unshift":"push"]((()=>{Bt=t,i(16,Bt)}))}]}class ta extends Yt{constructor(t){super(),Gt(this,t,Qo,Jo,a,{marker:0,image:1,forceHidden:42,coords:43,overlapped:2},null,[-1,-1,-1])}}function ea(t){let e,i,n,s,r;return i=new Ui({props:{type:t[5]?void 0:"arrow-up",icon:t[5],title:t[6]??t[7].waypointFollow}}),i.$on("click",t[11]),i.$on("focus",t[10]),{c(){e=N("div"),qt(i.$$.fragment),j(e,"--matrix","matrix3d("+t[2]+")"),V(e,"id",n=`w-${t[0]}`),V(e,"class","micrio-waypoint"),H(e,"clicked",t[3]),H(e,"active",t[3]),H(e,"direction-up",t[9][1]<0),H(e,"direction-down",t[9][1]>0)},m(n,s){I(n,e,s),Wt(i,e,null),t[15](e),r=!0},p(t,s){const o={};32&s[0]&&(o.type=t[5]?void 0:"arrow-up"),32&s[0]&&(o.icon=t[5]),192&s[0]&&(o.title=t[6]??t[7].waypointFollow),i.$set(o),(!r||4&s[0])&&j(e,"--matrix","matrix3d("+t[2]+")"),(!r||1&s[0]&&n!==(n=`w-${t[0]}`))&&V(e,"id",n),(!r||8&s[0])&&H(e,"clicked",t[3]),(!r||8&s[0])&&H(e,"active",t[3])},i(t){r||(Lt(i.$$.fragment,t),t&&$t((()=>{r&&(s||(s=zt(e,_e,{},!0)),s.run(1))})),r=!0)},o(t){Pt(i.$$.fragment,t),t&&(s||(s=zt(e,_e,{},!1)),s.run(0)),r=!1},d(n){n&&L(e),Xt(i),t[15](null),n&&s&&s.end()}}}function ia(t){let e,i,n=!t[4]&&ea(t);return{c(){n&&n.c(),e=O()},m(t,s){n&&n.m(t,s),I(t,e,s),i=!0},p(t,i){t[4]?n&&(At(),Pt(n,1,1,(()=>{n=null})),It()):n?(n.p(t,i),16&i[0]&&Lt(n,1)):(n=ea(t),n.c(),Lt(n,1),n.m(e.parentNode,e))},i(t){i||(Lt(n),i=!0)},o(t){Pt(n),i=!1},d(t){t&&L(e),n&&n.d(t)}}}function na(t,e,i){var n;let s,r,o,a;h(t,Oe,(t=>i(7,a=t)));let{targetId:l}=e,{settings:c={i18n:{}}}=e,{image:d}=e;const u=lt("micrio"),m=u._lang;h(t,m,(t=>i(14,o=t)));const p=d.$info,f=u.spaceData,g=d.$settings,v=null==(n=he(l))?void 0:n[2],{directionX:$,v:w,vN:y,vector:b}=ke(u,l);let k;const T=Math.abs(y[1])<.3,x=T?.65:.5+y[1]/10,_={x:$,y:x,baseScale:p.width/1024,scale:1,rotX:(1+(T?-(1-x):y[1]))*Math.PI/2,rotY:0,rotZ:0},E=(null==c?void 0:c.coords)??(S=_,JSON.parse(JSON.stringify(S)));var S;let M,A,I=E.custom,L=I?E:_;let P=c.customIconIdx;const N=()=>{D.deleted?i(4,z=!0):(P!=D.settings.customIconIdx&&(i(12,c.customIconIdx=D.settings.customIconIdx,c),P=c.customIconIdx),E.custom!=I&&(I=E.custom,L=I?E:_),i(2,A=d.camera.getMatrix(L.x,L.y,L.baseScale*L.scale,1,L.rotX,L.rotY,L.rotZ).join(",")))};let C=!1;let z=!1;const D={coords:E,settings:c};return N(),rt((()=>(D.el=k,i(1,k._iface=D,k),u.dispatchEvent(new CustomEvent("wp-print",{detail:D})),d.state.view.subscribe(N)))),t.$$set=t=>{"targetId"in t&&i(0,l=t.targetId),"settings"in t&&i(12,c=t.settings),"image"in t&&i(13,d=t.image)},t.$$.update=()=>{var e,n,a,l,d;20480&t.$$.dirty[0]&&i(6,s=(null==(n=null==(e=c.i18n)?void 0:e[o])?void 0:n.title)||(null==(l=null==(a=null==v?void 0:v.i18n)?void 0:a[o])?void 0:l.title)),4096&t.$$.dirty[0]&&i(5,r=null==(d=f.icons)?void 0:d[c.customIconIdx??-1])},[l,k,A,C,z,r,s,a,m,w,function(){var t;(null==(t=g._markers)?void 0:t.noMarkerActions)||(k.parentNode.scrollTo(0,0),clearTimeout(M),M=setTimeout((()=>{const t=d.camera.getXY(L.x,L.y);!C&&(t[0]<0||t[0]>=u.offsetWidth||t[1]<0||t[1]>=u.offsetHeight||d.is360&&t[3]>4)&&d.camera.flyToCoo([L.x,L.y],{speed:2,limit:!0}).catch((()=>{}))}),150))},function(){var t;(null==(t=g._markers)?void 0:t.noMarkerActions)||(i(3,C=!0),i(13,d.openedView=void 0,d),d.state.marker.set(void 0),u.open(l,{vector:b}))},c,d,o,function(t){ut[t?"unshift":"push"]((()=>{k=t,i(1,k)}))}]}class sa extends Yt{constructor(t){super(),Gt(this,t,na,ia,a,{targetId:0,settings:12,image:13},null,[-1,-1])}}const{Map:ra}=E;function oa(t,e,i){const n=t.slice();return n[60]=e[i],n}function aa(t,e,i){const n=t.slice();return n[60]=e[i],n}function la(t,e,i){const n=t.slice();return n[60]=e[i],n[66]=i,n}function ca(t,e,i){const n=t.slice();return n[67]=e[i],n}function da(t,e,i){const n=t.slice();return n[70]=e[i],n}function ua(t,e,i){const n=t.slice();return n[70]=e[i],n}function ha(t,e,i){const n=t.slice();return n[75]=e[i],n}function ma(t){let e,i,n,s,r,o=[],a=new ra,l=[],c=new ra,d=Dt(t[11]),u=[];for(let g=0;g<d.length;g+=1)u[g]=pa(ha(t,d,g));let h=Dt(t[12].filter(Ea));const m=t=>t[70][0].id;for(let g=0;g<h.length;g+=1){let e=ua(t,h,g),i=m(e);a.set(i,o[g]=fa(i,e))}let p=Dt(t[12].filter(Sa));const f=t=>t[70][0].id;for(let g=0;g<p.length;g+=1){let e=da(t,p,g),i=f(e);c.set(i,l[g]=ga(i,e))}return{c(){e=C("svg");for(let t=0;t<u.length;t+=1)u[t].c();i=D(),n=N("aside"),s=N("section");for(let t=0;t<o.length;t+=1)o[t].c();r=N("section");for(let t=0;t<l.length;t+=1)l[t].c();V(e,"class","micrio-markers"),V(s,"class","micrio-markers"),V(r,"class","micrio-markers"),V(n,"class","micrio-markers")},m(a,c){I(a,e,c);for(let t=0;t<u.length;t+=1)u[t]&&u[t].m(e,null);I(a,i,c),I(a,n,c),S(n,s);for(let t=0;t<o.length;t+=1)o[t]&&o[t].m(s,null);S(n,r);for(let t=0;t<l.length;t+=1)l[t]&&l[t].m(r,null);t[36](n)},p(t,i){if(2048&i[0]){let n;for(d=Dt(t[11]),n=0;n<d.length;n+=1){const s=ha(t,d,n);u[n]?u[n].p(s,i):(u[n]=pa(s),u[n].c(),u[n].m(e,null))}for(;n<u.length;n+=1)u[n].d(1);u.length=d.length}285380608&i[0]&&(h=Dt(t[12].filter(Ea)),o=Ft(o,i,m,0,t,h,a,s,Ot,fa,null,ua)),285380608&i[0]&&(p=Dt(t[12].filter(Sa)),l=Ft(l,i,f,0,t,p,c,r,Ot,ga,null,da))},d(s){s&&(L(e),L(i),L(n)),P(u,s);for(let t=0;t<o.length;t+=1)o[t].d();for(let t=0;t<l.length;t+=1)l[t].d();t[36](null)}}}function pa(t){let e,i,n,s,r;return{c(){e=C("line"),V(e,"x1",i=t[75][0]),V(e,"y1",n=t[75][1]),V(e,"x2",s=t[75][2]),V(e,"y2",r=t[75][3]),V(e,"class","micrio-markers"),H(e,"hovered",t[75][4])},m(t,i){I(t,e,i)},p(t,o){2048&o[0]&&i!==(i=t[75][0])&&V(e,"x1",i),2048&o[0]&&n!==(n=t[75][1])&&V(e,"y1",n),2048&o[0]&&s!==(s=t[75][2])&&V(e,"x2",s),2048&o[0]&&r!==(r=t[75][3])&&V(e,"y2",r),2048&o[0]&&H(e,"hovered",t[75][4])},d(t){t&&L(e)}}}function fa(t,e){let i,n,s,o,a,l,c,d=e[28](e[70][0],e[17])+"";function u(){return e[32](e[70])}return{key:t,first:null,c(){i=N("article"),n=N("label"),s=z(d),a=D(),V(n,"for",o=e[70][0].id),V(n,"class","micrio-markers"),H(n,"hover",e[15]==e[70][0].id),V(i,"class","micrio-markers"),this.first=i},m(t,r){I(t,i,r),S(i,n),S(n,s),I(t,a,r),l||(c=[R(n,"mouseenter",u),R(n,"mouseleave",e[33])],l=!0)},p(t,i){e=t,135168&i[0]&&d!==(d=e[28](e[70][0],e[17])+"")&&Y(s,d),4096&i[0]&&o!==(o=e[70][0].id)&&V(n,"for",o),36864&i[0]&&H(n,"hover",e[15]==e[70][0].id)},d(t){t&&(L(i),L(a)),l=!1,r(c)}}}function ga(t,e){let i,n,s,o,a,l,c,d=e[28](e[70][0],e[17])+"";function u(){return e[34](e[70])}return{key:t,first:null,c(){i=N("article"),n=N("label"),s=z(d),a=D(),V(n,"for",o=e[70][0].id),V(n,"class","micrio-markers"),H(n,"hover",e[15]==e[70][0].id),V(i,"class","micrio-markers"),this.first=i},m(t,r){I(t,i,r),S(i,n),S(n,s),I(t,a,r),l||(c=[R(n,"mouseenter",u),R(n,"mouseleave",e[35])],l=!0)},p(t,i){e=t,135168&i[0]&&d!==(d=e[28](e[70][0],e[17])+"")&&Y(s,d),4096&i[0]&&o!==(o=e[70][0].id)&&V(n,"for",o),36864&i[0]&&H(n,"hover",e[15]==e[70][0].id)},d(t){t&&(L(i),L(a)),l=!1,r(c)}}}function va(t){let e,i,n,s,r=t[1]&&t[1].length&&$a(t),o=t[2]&&ya(t);return{c(){e=N("div"),r&&r.c(),i=O(),o&&o.c(),V(e,"style",n=t[13]?t[5]:null),V(e,"class","micrio-markers"),H(e,"show-titles",t[26]),H(e,"is360",t[6]),H(e,"inactive",t[3]||t[6]&&t[4])},m(t,n){I(t,e,n),r&&r.m(e,null),S(e,i),o&&o.m(e,null),s=!0},p(t,a){t[1]&&t[1].length?r?(r.p(t,a),2&a[0]&&Lt(r,1)):(r=$a(t),r.c(),Lt(r,1),r.m(e,i)):r&&(At(),Pt(r,1,1,(()=>{r=null})),It()),t[2]?o?(o.p(t,a),4&a[0]&&Lt(o,1)):(o=ya(t),o.c(),Lt(o,1),o.m(e,null)):o&&(At(),Pt(o,1,1,(()=>{o=null})),It()),(!s||8224&a[0]&&n!==(n=t[13]?t[5]:null))&&V(e,"style",n),(!s||64&a[0])&&H(e,"is360",t[6]),(!s||88&a[0])&&H(e,"inactive",t[3]||t[6]&&t[4])},i(t){s||(Lt(r),Lt(o),s=!0)},o(t){Pt(r),Pt(o),s=!1},d(t){t&&L(e),r&&r.d(),o&&o.d()}}}function $a(t){let e,i,n=[],s=new ra,r=Dt(t[1]);const o=t=>t[67];for(let a=0;a<r.length;a+=1){let e=ca(t,r,a),i=o(e);s.set(i,n[a]=wa(i,e))}return{c(){for(let t=0;t<n.length;t+=1)n[t].c();e=O()},m(t,s){for(let e=0;e<n.length;e+=1)n[e]&&n[e].m(t,s);I(t,e,s),i=!0},p(t,i){3&i[0]&&(r=Dt(t[1]),At(),n=Ft(n,i,o,0,t,r,s,e.parentNode,Rt,wa,e,ca),It())},i(t){if(!i){for(let t=0;t<r.length;t+=1)Lt(n[t]);i=!0}},o(t){for(let e=0;e<n.length;e+=1)Pt(n[e]);i=!1},d(t){t&&L(e);for(let e=0;e<n.length;e+=1)n[e].d(t)}}}function wa(t,e){let n,s,r;const o=[{image:e[0]},e[67]];let a={};for(let l=0;l<o.length;l+=1)a=i(a,o[l]);return s=new sa({props:a}),{key:t,first:null,c(){n=O(),qt(s.$$.fragment),this.first=n},m(t,e){I(t,n,e),Wt(s,t,e),r=!0},p(t,i){e=t;const n=3&i[0]?Ut(o,[1&i[0]&&{image:e[0]},2&i[0]&&Vt(e[67])]):{};s.$set(n)},i(t){r||(Lt(s.$$.fragment,t),r=!0)},o(t){Pt(s.$$.fragment,t),r=!1},d(t){t&&L(n),Xt(s,t)}}}function ya(t){let e,i,n,s=[],r=new ra,o=[],a=new ra,l=Dt(t[2]);const c=t=>t[60].id;for(let h=0;h<l.length;h+=1){let e=la(t,l,h),i=c(e);r.set(i,s[h]=ba(i,e))}let d=Dt(t[9]);const u=t=>t[60].id;for(let h=0;h<d.length;h+=1){let e=aa(t,d,h),i=u(e);a.set(i,o[h]=ka(i,e))}return{c(){for(let t=0;t<s.length;t+=1)s[t].c();e=O();for(let t=0;t<o.length;t+=1)o[t].c();i=O()},m(t,r){for(let e=0;e<s.length;e+=1)s[e]&&s[e].m(t,r);I(t,e,r);for(let e=0;e<o.length;e+=1)o[e]&&o[e].m(t,r);I(t,i,r),n=!0},p(t,n){134217989&n[0]&&(l=Dt(t[2]),At(),s=Ft(s,n,c,0,t,l,r,e.parentNode,Rt,ba,e,la),It()),513&n[0]&&(d=Dt(t[9]),At(),o=Ft(o,n,u,0,t,d,a,i.parentNode,Rt,ka,i,aa),It())},i(t){if(!n){for(let t=0;t<l.length;t+=1)Lt(s[t]);for(let t=0;t<d.length;t+=1)Lt(o[t]);n=!0}},o(t){for(let e=0;e<s.length;e+=1)Pt(s[e]);for(let e=0;e<o.length;e+=1)Pt(o[e]);n=!1},d(t){t&&(L(e),L(i));for(let e=0;e<s.length;e+=1)s[e].d(t);for(let e=0;e<o.length;e+=1)o[e].d(t)}}}function ba(t,e){let i,n,s;return n=new ta({props:{marker:e[60],image:e[0],coords:e[27],overlapped:e[8].includes(e[66])}}),{key:t,first:null,c(){i=O(),qt(n.$$.fragment),this.first=i},m(t,e){I(t,i,e),Wt(n,t,e),s=!0},p(t,i){e=t;const s={};4&i[0]&&(s.marker=e[60]),1&i[0]&&(s.image=e[0]),260&i[0]&&(s.overlapped=e[8].includes(e[66])),n.$set(s)},i(t){s||(Lt(n.$$.fragment,t),s=!0)},o(t){Pt(n.$$.fragment,t),s=!1},d(t){t&&L(i),Xt(n,t)}}}function ka(t,e){let i,n,s;return n=new ta({props:{marker:e[60],image:e[0]}}),{key:t,first:null,c(){i=O(),qt(n.$$.fragment),this.first=i},m(t,e){I(t,i,e),Wt(n,t,e),s=!0},p(t,i){e=t;const s={};512&i[0]&&(s.marker=e[60]),1&i[0]&&(s.image=e[0]),n.$set(s)},i(t){s||(Lt(n.$$.fragment,t),s=!0)},o(t){Pt(n.$$.fragment,t),s=!1},d(t){t&&L(i),Xt(n,t)}}}function Ta(t){let e,i,n=[],s=new ra,r=Dt(t[14]);const o=t=>t[60].id;for(let a=0;a<r.length;a+=1){let e=oa(t,r,a),i=o(e);s.set(i,n[a]=xa(i,e))}return{c(){for(let t=0;t<n.length;t+=1)n[t].c();e=O()},m(t,s){for(let e=0;e<n.length;e+=1)n[e]&&n[e].m(t,s);I(t,e,s),i=!0},p(t,i){16385&i[0]&&(r=Dt(t[14]),At(),n=Ft(n,i,o,0,t,r,s,e.parentNode,Rt,xa,e,oa),It())},i(t){if(!i){for(let t=0;t<r.length;t+=1)Lt(n[t]);i=!0}},o(t){for(let e=0;e<n.length;e+=1)Pt(n[e]);i=!1},d(t){t&&L(e);for(let e=0;e<n.length;e+=1)n[e].d(t)}}}function xa(t,e){let i,n,s;return n=new ta({props:{marker:e[60],image:e[0],forceHidden:!0}}),{key:t,first:null,c(){i=O(),qt(n.$$.fragment),this.first=i},m(t,e){I(t,i,e),Wt(n,t,e),s=!0},p(t,i){e=t;const s={};16384&i[0]&&(s.marker=e[60]),1&i[0]&&(s.image=e[0]),n.$set(s)},i(t){s||(Lt(n.$$.fragment,t),s=!0)},o(t){Pt(n.$$.fragment,t),s=!1},d(t){t&&L(i),Xt(n,t)}}}function _a(t){let e,i,n,s,r=t[7]&&t[12].length&&!t[16]&&ma(t),o=t[13]&&va(t),a=t[14]&&Ta(t);return{c(){r&&r.c(),e=D(),o&&o.c(),i=D(),a&&a.c(),n=O()},m(t,l){r&&r.m(t,l),I(t,e,l),o&&o.m(t,l),I(t,i,l),a&&a.m(t,l),I(t,n,l),s=!0},p(t,s){t[7]&&t[12].length&&!t[16]?r?r.p(t,s):(r=ma(t),r.c(),r.m(e.parentNode,e)):r&&(r.d(1),r=null),t[13]?o?(o.p(t,s),8192&s[0]&&Lt(o,1)):(o=va(t),o.c(),Lt(o,1),o.m(i.parentNode,i)):o&&(At(),Pt(o,1,1,(()=>{o=null})),It()),t[14]?a?(a.p(t,s),16384&s[0]&&Lt(a,1)):(a=Ta(t),a.c(),Lt(a,1),a.m(n.parentNode,n)):a&&(At(),Pt(a,1,1,(()=>{a=null})),It())},i(t){s||(Lt(o),Lt(a),s=!0)},o(t){Pt(o),Pt(a),s=!1},d(t){t&&(L(e),L(i),L(n)),r&&r.d(t),o&&o.d(t),a&&a.d(t)}}}const Ea=([,t])=>t<.5,Sa=([,t])=>t>=.5;function Ma(t,e,i){var n;let s,r,o,a,l,c,d,m,p,f,g,v,$,w,{image:y}=e;const{data:b,info:k,settings:T}=y;h(t,b,(t=>i(30,m=t))),h(t,T,(t=>i(39,v=t)));const x=y.state.marker;h(t,x,(t=>i(16,$=t)));const _=y.wasm.micrio,{switching:E,_lang:S,state:M}=_;h(t,E,(t=>i(4,p=t))),h(t,S,(t=>i(17,w=t)));const A=_.canvas.isMobile,I=null==(n=_.canvases[0])?void 0:n.grid,L=null==I?void 0:I.focussed;h(t,L,(t=>i(31,f=t)));const P=null==I?void 0:I.markersShown,N=v.clusterMarkerRadius??16,C=M.markerHoverId;h(t,C,(t=>i(15,g=t)));const z=Ht([]);h(t,z,(t=>i(29,d=t))),at("inView",z);const D=v._markers??{},O=v.omni,R=!(!!D.noTitles||!!(null==O?void 0:O.sideLabels))&&!!D.showTitles;function F(t){var e;t?"string"==typeof t||y.openedView||t.noMarker||!t.view||i(0,y.openedView=_.state.$tour||null==(e=y.state.$view)?void 0:e.slice(0),y):y.openedView&&!_.state.$tour&&vt().then((()=>{var t,e;s||y.camera.aniDone||!y.openedView||y.camera.flyToView((e=y.openedView,[Math.max(0,e[0]),Math.max(0,e[1]),Math.min(1,e[2]),Math.min(1,e[3])]),{speed:null==(t=v._markers)?void 0:t.zoomOutAfterCloseSpeed,noTrueNorth:!0}).catch((()=>{})),i(0,y.openedView=void 0,y)}))}M.tour.subscribe((t=>{t&&"steps"in t&&t.keepLastStep&&i(0,y.openedView=void 0,y)}));const U=[];let V="",B=!1,q=!1;const W=t=>(t=null==t?void 0:t.map((t=>Math.round(100*t)/100)))&&i(5,V=[...U,t[0]?`left: ${t[0]}px`:null,t[1]?`top: ${t[1]}px`:null,`width: ${t[2]}px`,`height: ${t[3]}px`].filter((t=>!!t)).join(";")+";");let X=[],G=N,Y=[];const j=new Map,H=([t,e,i=0,n=0],[s,r,o=0,a=0])=>{const l=Math.max(n/2,G),c=Math.max(a/2,G);return!(t+i+G<s-G||t-G>s+o+G||e+l<r-c||e-l>r+c)},Z=()=>{var t,e;if(!o)return void i(8,X=i(9,Y=[]));const n=o,s=[],r=n.length;let a=0,l=0;for(i(8,X=[]);a<r;a++)for(l=a+1;l<r;l++){if(null==(t=n[l].tags)?void 0:t.includes("no-cluster"))continue;const i=j.get(n[a].id),r=j.get(n[l].id);i&&r&&H(i,r)&&(X.push(a,l),(null==(e=s.find((t=>t.findIndex((t=>t==a||t==l))>-1)))?void 0:e.push(a,l))??s.push([a,l]))}i(9,Y=s.map((t=>t.filter(((e,i)=>t.indexOf(e)==i)))).map(((t,e)=>({title:t.length+"",type:"cluster",view:e=[0,1,2,3].map((e=>(e<2?Math.min:Math.max)(...t.map((t=>{var i;return(null==(i=n[t].view)?void 0:i[e])??(e%2==0?n[t].x:n[t].y)}))))),x:e[0]+(e[2]-e[0])/2,y:e[1]+(e[3]-e[1])/2,id:""+t,data:{},popupType:"none",tags:[]}))))},K=[];rt((()=>{const t=[];return le(k).then((e=>{var n,s,r;if(!e)return;i(6,B=!!e.is360);const o=v._markers;if(!o)return;const a=Number(e.version)>=4.2;o.markerIcon&&U.push(`--micrio-marker-icon: url("${o.markerIcon}")`),o.markerColor&&o.markerColor!=(a?"#ffffff":"#ffbb00")&&U.push("--micrio-marker-color: "+o.markerColor),o.markerSize&&o.markerSize!=(a?"16":"25")&&U.push("--micrio-marker-size: "+(G=Number(o.markerSize))+"px"),t.push(y.viewport.subscribe(W)),v.clusterMarkers&&(t.push(y.state.view.subscribe(Z)),t.push(y.data.subscribe((()=>vt().then(Z))))),!y.grid&&(null==(n=v._markers)?void 0:n.zoomOutAfterClose)&&t.push(y.state.marker.subscribe(F));!(!y.isOmni||!(null==(s=v.omni)?void 0:s.sideLabels)||(null==(r=v._markers)?void 0:r.noTitles))&&t.push(A.subscribe((t=>{t&&q?function(){for(var t;K.length;)null==(t=K.shift())||t()}():t||q||(K.push(y.state.view.subscribe(et)),K.push(C.subscribe(et)),K.push(x.subscribe(et))),i(7,q=!t)})))})),()=>{for(var e;t.length;)null==(e=t.shift())||e()}}));const J=t=>!t.noMarker;let Q,tt=[];function et(){vt().then((()=>{if(!Q)return;const t=_.canvas,e=t.element.offsetWidth,n=[];d.forEach((([i,s,r])=>{var o;const a=null==(o=Q.querySelector('label[for="'+i.id+'"]'))?void 0:o.getBoundingClientRect();(null==a?void 0:a.width)&&a.width>0&&n.push([s*e,r,(s>=.5?a.left:a.right)-t.viewport.left,a.top+a.height/2-t.viewport.top,g==i.id])})),i(11,tt=n)}))}return t.$$set=t=>{"image"in t&&i(0,y=t.image)},t.$$.update=()=>{var e,n;1&t.$$.dirty[0]|1&t.$$.dirty[1]&&i(3,s=I&&f!=y&&P&&u(P).indexOf(y)<0),17&t.$$.dirty[0]&&i(1,r=!p&&_.spaceData?_.spaceData.links.filter((t=>t[0]==y.id||t[1]==y.id)).map((t=>{var e;return{targetId:t[0]==y.id?t[1]:t[0],settings:null==(e=t[2])?void 0:e[y.id]}})):void 0),1073741832&t.$$.dirty[0]&&i(2,o=s?[]:null==(e=null==m?void 0:m.markers)?void 0:e.filter(J)),1073741832&t.$$.dirty[0]&&i(14,a=s?null==m?void 0:m.markers:null==(n=null==m?void 0:m.markers)?void 0:n.filter((t=>!J(t)))),6&t.$$.dirty[0]&&i(13,l=!(!(null==o?void 0:o.length)&&!(null==r?void 0:r.length))),536870912&t.$$.dirty[0]&&i(12,c=d.sort((([,,t],[,,e])=>t>e?1:t<e?-1:0)))},[y,r,o,s,p,V,B,q,X,Y,Q,tt,c,l,a,g,$,w,b,T,x,E,S,L,C,z,R,j,(t,e)=>{var i;return t.i18n?null==(i=t.i18n[e])?void 0:i.title:t.title},d,m,f,t=>C.set(t[0].id),()=>C.set(void 0),t=>C.set(t[0].id),()=>C.set(void 0),function(t){ut[t?"unshift":"push"]((()=>{Q=t,i(10,Q)}))}]}class Aa extends Yt{constructor(t){super(),Gt(this,t,Ma,_a,a,{image:0},null,[-1,-1,-1])}}const Ia="5.2.0",La="https://b.micr.io/",Pa="https://r2.micr.io/",Na=["ttBWO","IicaE","KLTce","xjQrB","pfhXT","rNIPa","rdFIY","mvRXc"],Ca={b64:_b,ugz:_u},za="micrio-muted",Da={id:"",version:Number(Ia.replace(/(\d+)\.(\d+).*/,"$1.$2")),path:La,width:0,height:0,tileSize:1024,lang:"en",settings:{camspeed:1,view:[0,0,1,1],restrict:[0,0,1,1],focus:[.5,.5],zoomLimit:1,fullscreen:!0,crossfadeDuration:.25,hookEvents:!0,hookScroll:!0,hookPinch:!0,hookDrag:!0,minimap:!0,doTourJumps:!0,audio:!0,startVolume:1,mutedVolume:0,_markers:{showTitles:!1,popupAnimation:{duration:200,x:-50},zoomOutAfterClose:!0},ui:{controls:{cultureSwitch:!0}},_360:{},_meta:{}}},Oa={STRINGS:{id:{r:!0},lang:{r:!0},"data-thumb":{f:"thumbSrc"},"data-title":{r:!0},"data-format":{r:!0},"data-extension":{r:!0,f:"tileExtension"},"data-tiles":{r:!0,f:"tilesId"},"data-path":{r:!0},"data-sources":{r:!0},"data-inittype":{f:"initType"},"data-type":{},"data-start":{f:"gallery.startId"},"data-gallery":{f:"gallery.archive"},"data-gallery-sort":{f:"gallery.sort"},"data-iiif":{r:!0,f:"iiifManifest"},"data-grid":{r:!0},"data-gallery-type":{f:"gallery.type"}},BOOLEANS:{"data-static":{},muted:{f:"audio",n:!0},"data-png":{r:!0,f:"isPng"},"data-webp":{r:!0,f:"isWebP"},"data-dz":{r:!0,f:"isDeepZoom"},"data-is360":{r:!0},"data-no-externals":{f:"noExternals"},"data-skipmeta":{f:"skipMeta"},"data-force-data-refresh":{f:"forceDataRefresh"},"data-keeprendering":{f:"keepRendering"},"data-coverlimit":{f:"limitToCoverScale"},"data-events":{f:"hookEvents"},"data-keys":{f:"hookKeys"},"data-zooming":{f:"noZoom",n:!0},"data-scroll-zoom":{f:"hookScroll"},"data-pinch-zoom":{f:"hookPinch"},"data-dragging":{f:"hookDrag"},"data-two-finger-pan":{f:"twoFingerPan"},"data-control-zoom":{f:"controlZoom"},"data-ui":{f:"noUI",n:!0},"data-gtag":{f:"noGTag",n:!0},"data-controls":{f:"noControls",n:!0},"data-logo":{f:"noLogo",n:!0},"data-logo-org":{f:"noOrgLogo",n:!0},"data-toolbar":{f:"noToolbar",n:!0},"data-show-info":{f:"showInfo"},"data-social":{},"data-fullscreen":{},"data-minimap":{},"data-minimap-hide":{f:"alwaysShowMinimap",n:!0},"data-omni-y":{f:"OmniTwoAxes"},"data-normalize-dpr":{f:"zoomLimitDPRFix"},"data-grid-clickable":{f:"gridClickable"},"data-gallery-spreads":{f:"gallery.isSpreads"},"data-freemove":{f:"freeMove"},"data-force-path":{f:"forceInfoPath",r:!0}},NUMBERS:{"data-version":{r:!0},height:{r:!0},width:{r:!0},volume:{f:"startVolume"},"data-tilesize":{r:!0,f:"tileSize"},"data-camspeed":{},"data-zoomlimit":{f:"zoomLimit"},"data-minimap-height":{f:"minimapHeight"},"data-minimap-width":{f:"minimapWidth"},"data-mutedvolume":{f:"mutedVolume"},"data-width-cm":{f:"cmWidth"},"data-height-cm":{f:"cmHeight"},"data-gallery-cover-pages":{f:"gallery.coverPages"},lazyload:{dN:0},"data-elasticity":{f:"dragElasticity"},"data-skip-base-levels":{f:"skipBaseLevels"}},ARRAYS:{"data-focus":{},"data-view":{}}};var Ra,Fa,Ua,Va,Ba,qa,Wa;Fa=Ra||(Ra={}),Ua=Fa.Grid||(Fa.Grid={}),(Va=Ua.GridActionType||(Ua.GridActionType={}))[Va.focus=0]="focus",Va[Va.flyTo=1]="flyTo",Va[Va.focusWithTagged=2]="focusWithTagged",Va[Va.focusTagged=3]="focusTagged",Va[Va.reset=4]="reset",Va[Va.back=5]="back",Va[Va.switchToGrid=6]="switchToGrid",Va[Va.filterTourImages=7]="filterTourImages",Va[Va.nextFadeDuration=8]="nextFadeDuration",Ba=Fa.Camera||(Fa.Camera={}),(qa=Ba.TimingFunction||(Ba.TimingFunction={}))[qa.ease=0]="ease",qa[qa["ease-in"]=1]="ease-in",qa[qa["ease-out"]=2]="ease-out",qa[qa.linear=3]="linear";class Xa{constructor(t){var e;if(this.image=t,this.center=[0,0,1],this.trueNorth=.5,this.aniDoneAdd=[],this.cooToArea=(t,e,i)=>({x:i[0]+t*(i[2]-i[0]),y:i[1]+e*(i[3]-i[1])}),this.viewToArea=(t,e)=>[...Object.values(this.cooToArea(t[0],t[1],e)),...Object.values(this.cooToArea(t[2],t[3],e))],this.getView=()=>{var t;return null==(t=this._view)?void 0:t.slice(0)},this.getCoo=(t,e,i=!1,n=!1)=>this.getCooDirect(t,e,i,n).slice(0).map((t=>Math.round(1e6*t)/1e6)),this.getXY=(t,e,i=!1,n,s,r)=>this.getXYDirect(t,e,{abs:i,radius:n,rotation:s,noTrueNorth:r}).slice(0),this.getScale=()=>this.center[2]??1,this.setScale=t=>this.setCoo(this.center[0],this.center[1],t),this.getCoverScale=()=>this.e._getCoverScale(this.image.ptr),this.getMinScale=()=>this.e._getMinScale(this.image.ptr),this.isZoomedIn=()=>{var t;return 1==(null==(t=this.e)?void 0:t._isZoomedIn(this.image.ptr))},this.isZoomedOut=(t=!1)=>{var e;return 1==(null==(e=this.e)?void 0:e._isZoomedOut(this.image.ptr,t))},this.getCoverLimit=()=>!!this.e._getCoverLimit(this.image.ptr),this.flyToView=(t,e={})=>new Promise(((i,n)=>{var s,r;if(e.area&&(t=this.viewToArea(t,e.area)),e.prevView){const t=e.prevView;this.e._setStartView(this.image.ptr,t[0],t[1],t[2],t[3])}if(null==(s=this.image.$settings.omni)?void 0:s.frames){const i=(null==(r=this.image.$settings.omni.layers)?void 0:r.length)??1,n=this.image.$settings.omni.frames/i;null==e.omniIndex&&void 0!==t[5]&&(e.omniIndex=Math.round(Kt(t[5]/(2*Math.PI))*n)),e.omniIndex&&(e.omniIndex=Kt(e.omniIndex,n))}const o=this.e._flyTo(this.image.ptr,t[0],t[1],t[2],t[3],e.duration??-1,e.speed??-1,e.progress??0,!!e.isJump,!!e.limit,!!e.limitZoom,e.omniIndex??0,!!e.noTrueNorth,Ra.Camera.TimingFunction[e.timingFunction??"ease"],performance.now());this.image.wasm.render(),0==o?i():this.setAniPromises(i,n)})),this.flyToFullView=(t={})=>this.flyToCoo([.5,.5,this.getMinScale()],t),this.flyToCoverView=(t={})=>{const e=this.image.$settings.focus??[.5,.5];return e[2]=this.getCoverScale(),this.flyToCoo(e,t)},this.flyToCoo=(t,e={})=>new Promise(((i,n)=>{e.duration=this.e._setCoo(this.image.ptr,t[0],t[1],t[2]||this.center[2],e.duration??-1,e.speed??-1,e.limit??!1,Ra.Camera.TimingFunction[e.timingFunction??"ease"],performance.now()),this.image.wasm.render(),0==e.duration?i():this.setAniPromises(i,n)})),this.zoom=(t,e=0,i=void 0,n=void 0,s=1,r=!1)=>new Promise(((o,a)=>{const l=this.getXY(this.center[0],this.center[1]);null==i&&(i=l[0]),null==n&&(n=l[1]),this.image.album&&!this.image.album.hooked||(e=this.e._zoom(this.image.ptr,t,i,n,e,s,r,performance.now()),this.image.wasm.render(),0==e?o():this.setAniPromises(o,a))})),this.zoomIn=(t=1,e=250,i=1)=>this.zoom(200*-t,e,void 0,void 0,i).catch((()=>{})),this.zoomOut=(t=1,e=250,i=1)=>{const n=this.image.wasm.micrio.canvas.viewport,s=n.width/n.height,r=this.image.$info.width/this.image.$info.height;return this.zoom(t*(400/Math.max(1,s/r/2)),e,void 0,void 0,i).catch((()=>{}))},this.getDirection=()=>this.image.wasm.e._getYaw(this.image.ptr),this.getPitch=()=>this.e._getPitch(this.image.ptr),!t.is360){const i=t.state.$view;i&&(null==(e=t.$info)?void 0:e.width)&&vt().then((()=>this.setView(i)))}}assign(t,e,i,n,s,r){this.e=t,this._view=e,this._xy=i,this._coo=n,this._mat=s,this._quad=r}viewChanged(){var t;const e=this._view,i=this.center.join(","),n=this.getCoo(0,0);this.center[0]=e[0]+(e[2]-e[0])/2,this.center[1]=e[1]+(e[3]-e[1])/2,this.center[2]=n[2],this.image.is360&&(this.center[3]=n[3],this.center[4]=n[4]),this.image.isOmni&&(this.center[5]=null==(t=this.image.swiper)?void 0:t.currentIndex),(this.center.join(",")!=i||this.image.wasm.micrio.canvas.resizing||this.image.wasm.e._areaAnimating(this.image.ptr))&&this.image.state.view.set(this._view)}getXYDirect(t,e,i={}){var n;const s=i.noTrueNorth?0:.5-((null==(n=this.image.$settings._360)?void 0:n.trueNorth)??.5);return this.e._getXY(this.image.ptr,t-s,e,!0===i.abs,i.radius,i.rotation),this._xy}getCooDirect(t,e,i=!1,n=!1){if(i){const i=this.image.wasm.micrio.getBoundingClientRect();t-=i.left,e-=i.top}return this.e._getCoo(this.image.ptr,t,e,!0===i,!0===n),this._coo}setView(t,e={}){e.area&&(t=this.viewToArea(t,e.area)),this.e._setView(this.image.ptr,t[0],t[1],t[2],t[3],!!e.noLimit,!1,e.correctNorth),e.noRender||this.image.wasm.render()}setCoo(t,e,i=this.center[2]??1){this.e._setCoo(this.image.ptr,t,e,i,0,0),this.image.wasm.render()}getQuad(t,e,i,n,s=0,r=0,o=0,a=1,l=1){return this.e._getQuad(this.image.ptr,t,e,i,n,a,l,s,r,o),this._quad}getMatrix(t,e,i,n,s,r,o,a,l,c){return this.e._getMatrix(this.image.ptr,t,e,i,n,s||0,r||0,o||0,a||0,l??1,c??1),this._mat}setMinScale(t){var e;null==(e=this.e)||e._setMinScale(this.image.ptr,t)}setMinScreenSize(t){var e;this.image.album||null==(e=this.e)||e._setMinSize(this.image.ptr,Math.max(0,Math.min(1,t??1)))}setLimit(t){this.e._setLimit(this.image.ptr,t[0],t[1],t[2],t[3]),this.image.wasm.render()}setCoverLimit(t){this.e._setCoverLimit(this.image.ptr,!!t)}set360RangeLimit(t=0,e=0){this.e._set360RangeLimit(this.image.ptr,t,e),this.image.wasm.render()}setAniPromises(t,e){this.aniDone=t,this.aniAbort=e}pan(t,e,i=0,n={}){this.e._pan(this.image.ptr,t,e,i,!!n.noLimit,performance.now()),n.render&&this.image.wasm.render()}stop(){this.e._aniStop(this.image.ptr)}pause(){this.e._aniPause(this.image.ptr,performance.now())}resume(){this.e._aniResume(this.image.ptr,performance.now()),this.image.wasm.render()}aniIsKinetic(){return!!this.e._isKinetic(this.image.ptr)}setDirection(t,e){const i=this.image.wasm;i.e._setDirection(this.image.ptr,t,e),i.render()}setArea(t,e={}){const i=this.image.wasm.e;this.image.opts.isEmbed?this.image.ptr>0&&(this.image.opts.area=t,i._setImageArea(this.image.ptr,t[0],t[1],t[2],t[3])):(this.image.opts.area=t,i._setArea(this.image.ptr,t[0],t[1],t[2],t[3],!!e.direct,!!e.noDispatch)),e.noRender||this.image.wasm.render()}setRotation(t=0,e=0,i=0){!this.image.opts.isEmbed||this.image.ptr<=0||(this.image.wasm.e._setImageRotation(this.image.ptr,t,e,i),this.image.wasm.render())}getOmniRotation(){var t,e;const i=this.image.$settings.omni;return((null==(t=this.image.swiper)?void 0:t.currentIndex)??0)/(((null==i?void 0:i.frames)??1)/((null==(e=null==i?void 0:i.layers)?void 0:e.length)??1))*Math.PI*2}getOmniFrame(t){var e;const i=this.image.$settings.omni;if(!i||null==t)return;const n=i.frames/((null==(e=i.layers)?void 0:e.length)??1);return Math.floor(t/(2*Math.PI)*n)}getOmniXY(t,e,i){return this.e._getOmniXY(this.image.ptr,t,e,i),this._xy}setOmniSettings(){const t=this.image,e=t.$settings.omni;e&&(t.wasm.e._setOmniSettings(t.ptr,-e.distance||0,e.fieldOfView??0,e.verticalAngle??0,e.offsetX??0),this.image.state.view.set(this._view))}}(t=>{t.Main=class{constructor(t){this.micrio=t,this.tour=Ht(),this.marker=Ht(),this.markerHoverId=Ht(),this.popup=Ht(),this.popover=Ht(),this.ui={controls:Ht(!0),zoom:Ht(!0),hidden:Ht(!1)},this.mediaState=new Map,this.tour.subscribe((t=>{"string"!=typeof t&&(this._tour=t)})),this.marker.subscribe((t=>{"string"!=typeof t&&(this._marker=t)}))}get $tour(){return this._tour}get $marker(){return this._marker}get(){if(this.micrio.$current)return this.value={id:this.micrio.$current.id,c:this.micrio.canvases.map((t=>t.state.get()))},this._tour&&(this.value.t=[this._tour.id],"instance"in this._tour&&this._tour.instance&&this.value.t.push(this._tour.instance.currentTime,this._tour.instance.paused?"p":void 0)),this.value}async set(t){var e,i;if(this.value=t){if(t.t){const e=this.mediaState.get(t.t[0]);t.t[1]&&(e?(e.currentTime=t.t[1],e.paused="p"==t.t[2]):this.mediaState.set(t.t[0],{currentTime:t.t[1],paused:"p"==t.t[2]})),await this.setTour(t.t[0])}if(this.micrio.canvases.forEach((e=>e.state.set(t.c.find((t=>t[0]==e.id))))),(null==(e=this.micrio.$current)?void 0:e.id)!=t.id&&this.micrio.open(t.id),t.t)return this.setTour(t.t[0]);{const e=t.c.find((e=>e[0]==t.id));e&&!e[5]&&(null==(i=this.micrio.$current)||i.camera.flyToView(e.slice(1,5),{speed:2}).catch((()=>{})))}}}async setTour(t){var e,i,n;if(!this.micrio.$current||(null==(e=this._tour)?void 0:e.id)==t)return;const s=await le(this.micrio.$current.data,{allowUndefined:!0});s&&this.tour.set((null==(i=s.markerTours)?void 0:i.find((e=>e.id==t)))||(null==(n=s.tours)?void 0:n.find((e=>e.id==t))))}};t.Image=class{constructor(t){this.image=t,this.view=Ht(void 0),this.marker=Ht(void 0),this.layer=Ht(0);const e=t.wasm.micrio;let i,n,s;this.view.subscribe((r=>{const o=null==r?void 0:r.toString(),a={image:t,view:r};if(r&&o&&i!=o){i=o;const t=r[2]-r[0],l=r[3]-r[1];(!n||!s||Math.abs(t-n+(l-s))>1e-5)&&(e.events.dispatch("zoom",a),n=t,s=l),e.events.dispatch("move",a),this._view||(this._view=r)}})),this.marker.subscribe((t=>{const i=this._marker;(this._marker=t&&"string"!=typeof t?t:void 0)?e.state.marker.set(this._marker):t||e.state.$marker!=i||e.state.marker.set(void 0)}))}get $view(){return this._view}get $marker(){return this._marker}hookOmni(){const t=this.image;this.layer.subscribe((e=>{t.ptr<0||!t.wasm.e||(t.wasm.setActiveLayer(t.ptr,e),t.wasm.render())}))}get(){const t="string"!=typeof this._marker&&this._marker,e=t?Array.from(this.image.wasm.micrio.state.mediaState).reverse().find((e=>e[0].startsWith(t.id))):null;return[this.image.id,...[].slice.call(this._view),...t?[t.id,...e?[e[0],e[1].currentTime,e[1].paused?"p":void 0]:[]]:[this._marker]].filter((t=>void 0!==t))}set(t){var e;if((null==t?void 0:t.length)&&(this.view.set([t[1],t[2],t[3],t[4]]),t[5]&&((null==(e=this._marker)?void 0:e.id)!=t[5]&&this.marker.set(t[5]),t[6]))){const e=this.image.wasm.micrio.state.mediaState,i=e.get(t[6]);t[7]&&(i?(i.currentTime=t[7],i.paused="p"==t[8]):e.set(t[6],{currentTime:t[7],paused:"p"==t[8]}))}}}})(Wa||(Wa={}));const Ga=new class{constructor(){this.data=new Map,this.db=new Map,this.images=[],this.get=t=>new Promise((e=>{const i=this.db.get(t);if(!i||!this.data.has(i[0]))throw new Error("Could no get blob: "+t);const n=new FileReader;n.onload=()=>e(JSON.parse(n.result)),n.readAsText(new Blob([new Uint8Array(this.data.get(i[0]),i[1],i[2])]))})),this.getImage=async t=>new Promise((e=>{const i=this.db.get(t);if(!i||!this.data.has(i[0]))throw new Error("Could no get blob");const n=new Blob([new Uint8Array(this.data.get(i[0]),i[1],i[2])]);if(window.createImageBitmap)e(self.createImageBitmap(n));else{let t=this.images.find((t=>!t.src));t||this.images.push(t=new Image),t.onload=()=>{t&&(e(t),requestAnimationFrame((()=>{t&&(URL.revokeObjectURL(t.src),t.src=null)})))},t.src=URL.createObjectURL(n)}}))}async load(t,e,i){if(this.data.has(e))return;const n=e.replace(/^.*\//,"").split(".")[0],s=/\/base$/.test(e),r=s||be(n),o=new XMLHttpRequest,a=await new Promise(((n,s)=>{let a=0;o.responseType="arraybuffer",o.onprogress=t=>{a||(a=Number(o.getResponseHeader("Content-Length"))),null==i||i(Math.min(1,t.loaded/a))},o.onload=()=>{4===o.readyState&&200===o.status?(null==i||i(1),n(o.response)):s()},o.open("GET",t+e+(r?".bin":".mdp")),o.send()}));if(!a)return;this.data.set(e,a);const l=s?e.split("/")[0]+"/":"";let c=0;for(;c<a.byteLength;){const i=this.parseHeader(new Uint8Array(a,c,32));i.name&&i.size>0&&this.db.set(t+l+i.name.replace("./",""),[e,c+32,i.size]),c+=32+i.size}}parseHeader(t){const e=(new TextDecoder).decode(t),i=t=>e.slice(n,n+=t).replace(/\x00/g,"").trim();let n=0;return{name:i(20),size:parseInt(i(12),8)}}},Ya=[];class ja{constructor(t,e,i={}){this.wasm=t,this.attr=e,this.opts=i,this.uuid=Jt(),this.__info=JSON.parse(JSON.stringify(Da)),this.settings=Ht({}),this.data=Ht(void 0),this.video=Ht(void 0),this.visible=Ht(!1),this.ptr=-1,this.baseTileIdx=-1,this.is360=!1,this.isVideo=!1,this.isOmni=!1,this.levels=1,this.dzLevels=0,this.noImage=!1,this.opacity=1,this.viewport=Ht(),this.embeds=[],this.isV5=!1,this._loadedData=!1,this.embedElements=new Map,this.state=new Wa.Image(this),i.useParentCamera||(this.camera=new Xa(this)),this.id=(e.id??"").replace("https://i.micr.io/",""),this.isV5=be(this.id.split("/")[0]),this.infoBasePath=e.path&&e.forceInfoPath?e.path:void 0,this.dataPath=e.path||this.__info.path,this.isV5&&!e.path&&(this.dataPath=Pa),i.secondaryTo?(this.opacity=0,i.area=this.wasm.micrio.canvas.viewport.portrait?[0,1,1,1]:[1,0,1,1],void 0===i.isPassive&&(i.isPassive=!0)):i.area||(i.area=[0,0,1,1]),this.preset=he(this.id);let n=!1;this.info={subscribe:Ht(void 0,(t=>{n?t(this.__info):this.load().then(t),n=!0})).subscribe};const s=this.wasm.micrio,r=!!this.attr.revision;let o,a=u(this.visible);i.isEmbed&&!r||this.visible.subscribe((t=>{t!=a&&(a=t,t&&!this._loadedData&&(!r&&this.isV5?(this._loadedData=!0,this.data.set(void 0)):this.loadData()),i.secondaryTo&&(i.isPassive&&(o?(o(),o=null):t&&(o=i.secondaryTo.state.view.subscribe((t=>{t&&!this.camera.aniDone&&this.camera.setView(t,{noLimit:!0})})))),t?s.events.dispatch("splitscreen-start",this):s.events.dispatch("splitscreen-stop",this)),s.visible.update((e=>(t?e.push(this):e.splice(e.indexOf(this),1),e))),t&&s.$current==this&&s.switching.set(!1))})),this.video.subscribe((t=>this._video=t)),this.data.subscribe((t=>((t,e,i)=>{var n,s,r,o,a;t&&(t.revision&&(t.revision=Object.fromEntries(Object.entries(t.revision??{}).filter((t=>Number(t[1])>0)))),null==(n=t.embeds)||n.forEach((t=>{t.uuid||(t.uuid=(t.id??t.micrioId)+"-"+Math.random()),fe(t.video),fe(t)})),null==(s=t.markers)||s.forEach((t=>$e(t,e,!i))),null==(o=null==(r=t.music)?void 0:r.items)||o.forEach(fe),null==(a=t.pages)||a.forEach(ve))})(t,this.is360,this.isV5)))}get $info(){return this.__info}get $settings(){return u(this.settings)}get $data(){return u(this.data)}setError(t,e){throw this.wasm.micrio.printError(this.error=e??(null==t?void 0:t.message)??(null==t?void 0:t.toString())??"An unknown error has occurred"),this.wasm.micrio.loading.set(!1),t}async load(){var t,e,i,n,s,r,o,a,l,c,d,h,m,p,f,g,v,$,w,y;let b=this.__info;const k=this.attr,T=this.wasm.micrio;k.id&&k.width&&(k.settings&&ne(Da.settings,k.settings,{noOverwrite:!0}),this.__info=b=k);let x=b.iiifManifest||k.iiifManifest;b.isIIIF=this.id.startsWith("http")||"iiif"==b.format;const _=!!(null==(t=k.settings)?void 0:t.forceDataRefresh);if(!this.id||k.width&&k.height&&!x)(null==(o=this.preset)?void 0:o[1])&&ne(this.preset[1],b);else{const t=t=>this.setError(t,'Image with id "'+this.id+'" not found, published, or embeddable.');ne((null==(e=this.preset)?void 0:e[1])||await(b.isIIIF?ue(this.id):me(this.id,this.infoBasePath,_)).catch(t),b),!x&&b.iiifManifest&&(x=b.iiifManifest),b.isIIIF||(b.isIIIF=!!x),x&&ne(await ue(x).catch(t),b),(null==(n=null==(i=b.settings)?void 0:i._meta)?void 0:n.noLogo)&&(b.settings.noLogo=!0),(null==(r=null==(s=b.settings)?void 0:s._meta)?void 0:r.noSmoothing)&&(b.settings.noSmoothing=!0)}const E="https://iiif.micr.io/";if(b.id.startsWith(E)&&(b.id=b.id.slice(21)),7==(null==(a=this.id)?void 0:a.length)){const t=ye(this.id[1+ye(this.id)%6]);b.is360=!!(t>>4&1),b.isWebP=!(3&t),b.isPng=2==(3&t),t>>3&1&&be(b.tilesId??this.id)&&(b.format="dz"),b.path||(b.path=`https://${t>>2&1?"eu":"r2"}.micr.io/`)}const S=this.isV5&&this.id.startsWith("i")&&!this.id.includes("/");S&&!b.tilesId&&(b.tilesId=this.id.slice(1));const M=Na.indexOf(b.id)>=0||b.tilesId&&Na.indexOf(b.tilesId)>=0;ne(k,b);const A=S&&!(null==(l=b.tileBasePath)?void 0:l.includes("micr.io"));if(this.tileBase=A?b.tileBasePath??La:M||S?La:b.tileBasePath??b.path??(this.isV5?Pa:La),(null==(c=b.organisation)?void 0:c.baseUrl)&&!k.path?(this.dataPath=b.path=b.organisation.baseUrl,S&&!M||(this.tileBase=this.dataPath)):"https://eu.micr.io/"==b.path&&(this.dataPath=b.path),(null==(d=b.settings)?void 0:d.omni)&&(this.isOmni=!0,b.version>=5&&(await Ga.load(this.tileBase??this.dataPath,(b.tilesId??b.id)+"/base",(t=>{var e;return null==(e=T._ui)?void 0:e.$set({loadingProgress:t})})).catch((t=>this.setError(t,"Could not find object base package."))),b.settings.gallery||(b.settings.gallery={}),b.settings.gallery.type="omni",b.settings.gallery.archive=b.id)),!(null==(h=b.organisation)?void 0:h.branding)||b.settings&&b.settings.noUI||this.loadStyle(this.dataPath+"style/"+b.organisation.slug+".css").then((()=>{var t;const e=null==(t=getComputedStyle(this.wasm.micrio).getPropertyValue("--micrio-font-family"))?void 0:t.replace(/^'([^']+)'.*$/,"$1");e&&document.fonts.ready.then((()=>{document.fonts.check("16px "+e)||this.loadStyle(`https://fonts.googleapis.com/css2?family=${e}:ital,wght@0,300;0,400;0,500;0,600;0,800;1,300;1,400;1,500;1,600;1,800&display=swap`)}))})),b.isIIIF)if(b.sequences&&b.sequences.length)this.parseIIIFSequence(b,!!x);else{const t=(x||("@id"in b?b["@id"]:b.id)).replace("/info.json","");b.path=t.replace(/\/[^/]*$/,""),b.id=t.replace(/^.*\/([^/]*)$/,"$1")}if(b.spacesId&&!T.spaceData&&(T.spaceData="MICRIO_SPACE_DATA"in self?self.MICRIO_SPACE_DATA:await ue("https://i.micr.io/spaces/"+b.spacesId+".json")),null==(m=b.settings)?void 0:m._360){const t=(null==(f=null==(p=T.spaceData)?void 0:p.images.find((t=>t.id==this.id)))?void 0:f.rotationY)??0;b.settings._360.trueNorth=.5+t/Math.PI/2}this.noImage=this.noImage||this.isOmni||!b.id&&!b.tilesId,this.extension=b.tileExtension||b.isPng&&"png"||b.isWebP&&"webp"||"jpg","dz"==b.format&&(b.isDeepZoom=!0),this.is360=!!b.is360,this.isVideo=!!b.isVideo;let I=this.isV5?u(T._lang):("cultures"in b?void 0:k.lang)??void 0;if(this.isV5){if(b.revision){const t=Object.keys(b.revision);t.length&&t.indexOf(I)<0&&(T.lang=t[0])}}else if(!(null==(g=b.settings)?void 0:g.skipMeta)&&"cultures"in b){const t=(b.cultures||"").split(","),e=this.opts.isEmbed||!!this.opts.area,i=(null==(v=b.settings)?void 0:v.onlyPreferredLang)||e;I=b.lang&&t.indexOf(b.lang)>=0?b.lang:i?void 0:t[0],I&&!e&&(T.lang=I)}const L=b.settings;L&&!(null==L?void 0:L.noExternals)&&await Promise.all([L.css?this.loadStyle(L.css.href):null,L.js?this.loadScript(L.js.href,I):null].filter((t=>!!t)));for(let u=b.tileSize;u<Math.max(b.width,b.height);u*=2,this.levels++);let P=Math.max(b.width,b.height);do{this.dzLevels++}while((P/=2)>1);return(null==($=null==L?void 0:L.gallery)?void 0:$.archive)&&(this.levels-=1-(L.gallery.archiveLayerOffset??0)),this.noImage||(this.thumbSrc=this.getTileSrc(this.levels,0,0)),T.events.dispatch("pre-info",b),this.isV5&&null!=b.revision&&!this.opts.isEmbed?await this.loadData():(null==(w=b.settings)?void 0:w.skipMeta)||this.opts.isEmbed||this.isV5||T._lang.subscribe((t=>{var e,i;t&&this.id&&(!("cultures"in this.__info)||(this.__info.cultures||"").split(",").indexOf(t)<0)&&(t=void 0),this.data.set(void 0),!t&&(null==(e=this.preset)?void 0:e[2])&&(t="preset"),t&&this.id&&((null==(i=this.preset)?void 0:i[2])?this.enrichData(this.preset[2]).then((t=>{var e;this.data.set(t),(null==(e=this.preset)?void 0:e[2])&&(this.preset[2]=void 0)})):ue(this.dataPath+this.id+"/data."+t+".json").catch((()=>{})).then((t=>t&&this.enrichData(t).then((t=>this.data.update((e=>(ne(t,e||(e={}),{mergeArrays:!0}),e))))))))})),(null==(y=b.settings)?void 0:y.micrioSplitLink)&&!this.opts.secondaryTo&&T.open({id:b.settings.micrioSplitLink,settings:{hookEvents:!1!==b.settings.secondaryInteractive}},{splitScreen:!0,isPassive:!b.settings.noFollow}),b.settings&&this.settings.set(b.settings),delete b.settings,this.isOmni&&this.state.hookOmni(),b}async loadData(){var t,e,i,n;const s=(null==(t=this.$settings)?void 0:t.skipMeta)||(null==(e=this.__info.settings)?void 0:e.skipMeta);if(this._loadedData||s)return Promise.resolve();this._loadedData=!0;const r=(null==(i=this.preset)?void 0:i[2])??(this.isV5&&await ue(this.dataPath+this.id+"/data/pub.json",null==(n=this.__info.settings)?void 0:n.forceDataRefresh).catch((()=>{})));r&&this.enrichData(r).then((t=>this.data.set(t)))}getTileSrc(t,e,i,n){var s,r,o;const a=this.__info;if(a){if(a.isDeepZoom&&(t=this.dzLevels-t),a.isIIIF){const n=a.tileSize,s=Math.pow(2,t)*n,r=Math.min(a.width,e*s),o=Math.min(a.height,i*s);return`${a.path}/${a.id}/${[r,o,Math.min(a.width-r,s),Math.min(a.height-o,s)].join(",")}/${[Math.round(Math.min(n,(a.width-s*e)/s*n)),Math.round(Math.min(n,(a.height-s*i)/s*n))].join(",")}/0/default.jpg`}if(null==(o=null==(r=null==(s=a.settings)?void 0:s._360)?void 0:r.video)?void 0:o.src)throw"Video thumb";return`${this.tileBase}${a.tilesId||a.id}/${void 0!==n?n+"/":""}${t}/${e}${a.isDeepZoom?"_":"-"}${i}.${this.extension}`}}loadScript(t,e=""){return new Promise((i=>{if(Ya.indexOf(t)>=0||document.querySelector('script[src="'+t+'"]'))i();else{Ya.push(t);const n=document.createElement("script");n.type="text/javascript",n.async=!0,n.defer=!0,n.micrioElement=this,n.src=t.replace("$lang",e),n.onload=i,document.head.appendChild(n)}}))}loadStyle(t){return new Promise((e=>{if(Ya.indexOf(t)>=0||document.head.querySelector('link[href="'+t+'"]'))e();else{Ya.push(t);const i=document.createElement("link");i.setAttribute("type","text/css"),i.setAttribute("rel","stylesheet"),i.setAttribute("href",t),i.onload=e,document.head.appendChild(i)}}))}async enrichData(t){var e,i,n,s,r;if(!t)return t;"error"in t&&(this.__info.error="403"==t.status?"Could not load image data. Are you logged in and do you have the right credentials?":t.error);const o=this.wasm.micrio.lang,a=[];null==(e=t.markers)||e.forEach((t=>{var e;if($e(t,this.is360,!this.isV5),null==(e=t.data)?void 0:e.micrioSplitLink){const e=t.data.micrioSplitLink.split(",").map((t=>t.trim())),i=t.data._micrioSplitLink={micrioId:e[0],markerId:e[1],follows:!!e[2]&&"false"!=e[2]};i.markerId&&a.push(i.micrioId)}})),(null==(i=t.markerTours)?void 0:i.length)&&a.push(...[].concat.apply([],t.markerTours.map((t=>t.steps))).map((t=>t.split(",")[1])).filter((t=>!!t&&t!=this.id)));const l=t=>"autostart"in t&&t.autostart,c=(null==(n=t.markerTours)?void 0:n.find(l))||(null==(s=t.tours)?void 0:s.find(l));c&&(this.$settings.start={type:"steps"in c?"markerTour":"tour",id:c.id});const d=a.filter(((t,e)=>a.indexOf(t)==e));Promise.all(d.map((t=>me(t,this.infoBasePath))));const u=t=>this.dataPath+(this.isV5?t+"/data/pub.json":t+"/data."+o+".json"),h=await Promise.all(d.map((t=>ue(u(t)))));h.forEach(((t,e)=>{var i;return null==(i=null==t?void 0:t.markers)?void 0:i.forEach((t=>$e(t,this.is360,5==d[e].length)))}));const m=this.wasm.micrio.spaceData;return t.markerTours&&(await Promise.all(t.markerTours.map((e=>we(this,e,o,t)))),m&&(t.markerTours=t.markerTours.filter((t=>!t.steps.find((t=>t.includes(","))))))),(null==m?void 0:m.markerTours)&&await Promise.all(m.markerTours.filter((t=>!t.stepInfo)).map((e=>we(this,e,o,t)))),null==(r=t.markers)||r.forEach((t=>{var e,i,n,s,r;if(!(null==(e=t.data)?void 0:e._micrioSplitLink))return;const o=null==(n=null==(i=t.data)?void 0:i._micrioSplitLink)?void 0:n.markerId;if(o)for(let a=0;a<h.length;a++){const e=null==(r=null==(s=h[a])?void 0:s.markers)?void 0:r.find((t=>t.id==o));if(e)return void(t.data._micrioSplitLink.view=e.view)}})),this.wasm.micrio.events.dispatch("pre-data",{[this.id]:t,...Object.fromEntries(d.map(((t,e)=>[t,h[e]])))}),h.forEach(((t,e)=>{if(t){const n=this.wasm.images.find((t=>t.id==d[e]));n&&n instanceof ja&&!n.$data&&(i=u(n.id),!ce.has(i))&&n.data.set(t)}var i})),t}parseIIIFSequence(t,e=!1){var i;const n=null==(i=t.sequences)?void 0:i[0];if(!n)return;const s="top-to-bottom"==n.viewingDirection,r=n.canvases.map((t=>t.images[0])).map((t=>t.resource));this.noImage=!0,t.width=s?Math.max(...r.map((t=>t.width))):r.reduce(((t,e)=>t+e.width),0),t.height=s?r.reduce(((t,e)=>t+e.height),0):Math.max(...r.map((t=>t.height)));let o=0,a=this.embeds;t.settings||(t.settings={}),e&&r.length>10&&(a=t.gallery=[],t.settings.gallery||(t.settings.gallery={})),r.forEach((e=>{const i=[(1-e.width/t.width)/2,(1-e.height/t.height)/2];a.push(new ja(this.wasm,{id:e.service["@id"],width:e.width,height:e.height,isPng:"image/png"==e.format,settings:{}},{area:s?[i[0],o/t.height,1-i[0],(o+e.height)/t.height]:[o/t.width,i[1],(o+e.width)/t.width,1-i[1]]})),o+=s?e.height:e.width}))}addEmbed(t,e,i={}){const n=e.slice(0),s=new ja(this.wasm,t,{area:n,isEmbed:!0,useParentCamera:i.asImage});return s.camera||(s.camera=this.camera),this.embeds.push(s),void 0===i.opacity&&(i.opacity=1),le(s.info).then((t=>{if(t){if("cover"==i.fit||"contain"==i.fit){const e=this.is360?2:1,s="cover"==i.fit,r=n[2]-n[0],o=n[3]-n[1],a=n[0]+r/2,l=n[1]+o/2,c=r/o*e,d=t.width/t.height;if(s&&d<c||!s&&d>=c){const t=r/d*e;n[1]=l-t/2,n[3]=l+t/2}else{const t=o*d/e;n[0]=a-t/2,n[2]=a+t/2}}this.wasm.addEmbed(s,this,i),this.wasm.render()}})),s}setEmbedMediaElement(t,e){e?this.embedElements.set(t,e):this.embedElements.delete(t)}getEmbedMediaElement(t){return this.embedElements.get(t)}splitStart(){var t,e,i;const n=this.wasm.micrio.canvas.viewport.portrait;null==(t=this.opts.secondaryTo)||t.camera.setArea(n?[0,0,1,.5]:[0,0,.5,1],{noRender:!0}),this.camera.setArea(n?[0,.5,1,1]:[.5,0,1,1],{noRender:!0}),this.camera.setView((null==(i=null==(e=this.__info)?void 0:e.settings)?void 0:i.view)??[0,0,1,1]),this.wasm.render()}splitEnd(){var t,e;const i=this.opts.area;if(!i)return;const n=i[2]-i[0],s=i[3]-i[1];if(Math.round(1e3*n)/1e3==0||Math.round(1e3*s)/1e3==0)return;const r=n>s;this.camera.setArea(r?[0,1,1,1]:[1,0,1,1],{noRender:!0}),(null==(t=this.opts.secondaryTo)?void 0:t.grid)&&this.opts.secondaryTo.camera.aniDone||null==(e=this.opts.secondaryTo)||e.camera.setArea([0,0,1,1],{noRender:!0}),this.wasm.render()}fadeIn(t=!1){this.wasm.fadeImage(this.ptr,1,t),this.wasm.render()}fadeOut(t=!1){this.wasm.fadeImage(this.ptr,0,t),this.wasm.render()}}class Ha{constructor(t,e,i,n,s){var r,o,a;this.wasm=t,this.image=e,this.embed=i,this.paused=n,this.moved=s,this.ism3u=!1,this.hlsPlayer=void 0,this.usVid=void 0,this.vidRepeatTo=void 0,this.placeTo=void 0,this.autoplay=!0,this._vid=void 0,this.isMounted=!0,this.events={play:()=>this.setPlaying(!0),pause:()=>this.setPlaying(!1),playing:()=>{this.image._video||this.image.video.set(this._vid)},canplayEvt:ie.iOS?"loadedmetadata":"canplay",canplay:()=>{this._vid&&this.isMounted&&(this.autoplay&&!this.paused?(this._vid.play(),this.moved()):this.embed.hideWhenPaused||(this.setPlaying(!0),vt().then((()=>{this.setPlaying(!1),setTimeout((()=>{var t;return null==(t=this._vid)?void 0:t.remove()}),50)}))))}},this.ism3u=!!(null==(r=i.video)?void 0:r.streamId)&&!(null==(o=i.video)?void 0:o.transparent),this._vid=e._video,this.autoplay=(null==(a=i.video)?void 0:a.autoplay)??!0;let l=!0;this.usVid=this.image.visible.subscribe((t=>{clearTimeout(this.placeTo),this.placeTo=t?setTimeout((()=>{this.isMounted&&(this._vid?(this.hook(),this.autoplay&&this._vid.play()):this.load())}),l?0:100):setTimeout((()=>{var t;return null==(t=this._vid)?void 0:t.pause()}),0),l=!1}))}unmount(){var t,e;this.isMounted=!1,clearTimeout(this.placeTo),clearTimeout(this.vidRepeatTo),null==(t=this._vid)||t.pause(),this.unhook(),null==(e=this.usVid)||e.call(this)}setPlaying(t){this._vid&&(this.paused=!t,this._vid.dataset.playing=t?"1":void 0,this.wasm.e._setImageVideoPlaying(this.image.ptr,t),this.embed.hideWhenPaused&&this.wasm.fadeImage(this.image.ptr,t?1:0),t&&this.wasm.render())}load(){if(!this.embed.video||this._vid)return;const t=this.ism3u?`https://videodelivery.net/${this.embed.video.streamId}/manifest/video.m3u8`:this.embed.video.src;this._vid=document.createElement("video"),this._vid.crossOrigin="true",this._vid.playsInline=!0,this._vid.width=.5*this.embed.width,this._vid.height=.5*this.embed.height,this._vid.muted=this.embed.video.muted,this.hook(),!this.ism3u||Te(this._vid)?this._vid.src=t:oe("https://i.micr.io/hls-1.5.17.min.js",void 0,"Hls"in window?{}:void 0).then((()=>{this.hlsPlayer=new window.Hls,this.hlsPlayer.loadSource(t),this._vid&&this.hlsPlayer.attachMedia(this._vid)}))}hook(){if(!this.embed.video||!this._vid)return;const t=this.embed.video.loopAfter;this.embed.video.loop&&t?(this._vid.onended=()=>{this.setPlaying(!1),this.vidRepeatTo=setTimeout((()=>{var t;return null==(t=this._vid)?void 0:t.play()}),1e3*t)},this._vid.onplay=()=>this.setPlaying(!0)):this._vid.loop=this.embed.video.loop,this._vid.parentNode||this.autoplay||this.ism3u||(this._vid.setAttribute("style","opacity:0;position:absolute;top:0;left:0;transform-origin:left top;transform:scale(0.1);pointer-events:none;"),document.body.appendChild(this._vid)),this._vid.addEventListener("play",this.events.play),this._vid.addEventListener("pause",this.events.pause),this._vid.addEventListener("playing",this.events.playing,{once:!0}),this._vid.addEventListener(this.events.canplayEvt,this.events.canplay,{once:!0})}unhook(){this._vid&&(this._vid.removeEventListener("play",this.events.play),this._vid.removeEventListener("pause",this.events.pause),this._vid.removeEventListener("playing",this.events.playing),this._vid.removeEventListener(this.events.canplayEvt,this.events.canplay))}}function Za(e){let n=(e[18]?"a":"div")&&function(t){let e,n,s,o,a,l,c,d,u;const h=[tl,Qa,Ja,Ka],m=[];function p(t,e){return t[0].video&&!t[16]?0:t[0].frameSrc?1:!t[16]&&t[0].src?2:3}n=p(t),s=m[n]=h[n](t);let f=[{id:o=t[0].id?"e-"+t[0].id:void 0},{style:t[10]},{role:a=t[18]?void 0:"figure"},{href:t[18]},{target:l=t[18]&&t[19]?"_blank":null},{class:"micrio-embed"}],g={};for(let r=0;r<f.length;r+=1)g=i(g,f[r]);return{c(){e=N(t[18]?"a":"div"),s.c(),G(t[18]?"a":"div")(e,g),H(e,"embed-container",!0),H(e,"embed3d",t[14]),H(e,"no-events",t[17])},m(i,s){I(i,e,s),m[n].m(e,null),c=!0,d||(u=[R(e,"click",t[20]),R(e,"keypress",t[20]),R(e,"change",t[21])],d=!0)},p(t,i){let r=n;n=p(t),n===r?m[n].p(t,i):(At(),Pt(m[r],1,1,(()=>{m[r]=null})),It(),s=m[n],s?s.p(t,i):(s=m[n]=h[n](t),s.c()),Lt(s,1),s.m(e,null)),G(t[18]?"a":"div")(e,g=Ut(f,[(!c||1&i[0]&&o!==(o=t[0].id?"e-"+t[0].id:void 0))&&{id:o},(!c||1024&i[0])&&{style:t[10]},{role:a},{href:t[18]},{target:l},{class:"micrio-embed"}])),H(e,"embed-container",!0),H(e,"embed3d",t[14]),H(e,"no-events",t[17])},i(t){c||(Lt(s),c=!0)},o(t){Pt(s),c=!1},d(t){t&&L(e),m[n].d(),d=!1,r(u)}}}(e);return{c(){n&&n.c()},m(t,e){n&&n.m(t,e)},p(t,e){(t[18]||"div")&&n.p(t,e)},i:t,o(t){Pt(n,t)},d(t){n&&n.d(t)}}}function Ka(e){let i,n;return{c(){i=N("button"),V(i,"style",e[5]),V(i,"title",n=e[0].title),V(i,"data-scroll-through",""),V(i,"class","micrio-embed")},m(t,e){I(t,i,e)},p(t,e){32&e[0]&&V(i,"style",t[5]),1&e[0]&&n!==(n=t[0].title)&&V(i,"title",n)},i:t,o:t,d(t){t&&L(i)}}}function Ja(e){let i,n,s,r;return{c(){i=N("img"),c(i.src,n=e[0].src)||V(i,"src",n),V(i,"style",e[5]),V(i,"width",s=e[15]?e[0].width:void 0),V(i,"height",r=e[15]?e[0].height:void 0),V(i,"alt","Embed"),V(i,"data-scroll-through",""),V(i,"class","micrio-embed")},m(t,e){I(t,i,e)},p(t,e){1&e[0]&&!c(i.src,n=t[0].src)&&V(i,"src",n),32&e[0]&&V(i,"style",t[5]),1&e[0]&&s!==(s=t[15]?t[0].width:void 0)&&V(i,"width",s),1&e[0]&&r!==(r=t[15]?t[0].height:void 0)&&V(i,"height",r)},i:t,o:t,d(t){t&&L(i)}}}function Qa(t){let e,i;return e=new ys({props:{src:t[0].frameSrc,width:t[3],height:t[4],frameScale:t[0].scale,autoplay:t[0].autoplayFrame,destroying:t[22]}}),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};1&i[0]&&(n.src=t[0].frameSrc),8&i[0]&&(n.width=t[3]),16&i[0]&&(n.height=t[4]),1&i[0]&&(n.frameScale=t[0].scale),1&i[0]&&(n.autoplay=t[0].autoplayFrame),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function tl(t){let e,i,n;function s(e){t[28](e)}let r={forcePause:t[6],src:t[0].video.streamId&&!t[0].video.transparent?"cfvid://"+t[0].video.streamId:t[0].video.src,width:t[2],height:t[12],frameScale:t[11],controls:t[0].video.controls,destroying:t[22],loop:t[0].video.loop,loopDelay:t[0].video.loopAfter,muted:t[0].video.muted,autoplay:!t[6]&&t[0].video.autoplay,hasTransparentH265:t[0].video.transparent&&t[0].video.hasH265};return void 0!==t[1]&&(r._media=t[1]),e=new ys({props:r}),ut.push((()=>Bt(e,"_media",s))),{c(){qt(e.$$.fragment)},m(t,i){Wt(e,t,i),n=!0},p(t,n){const s={};64&n[0]&&(s.forcePause=t[6]),1&n[0]&&(s.src=t[0].video.streamId&&!t[0].video.transparent?"cfvid://"+t[0].video.streamId:t[0].video.src),4&n[0]&&(s.width=t[2]),4096&n[0]&&(s.height=t[12]),2048&n[0]&&(s.frameScale=t[11]),1&n[0]&&(s.controls=t[0].video.controls),1&n[0]&&(s.loop=t[0].video.loop),1&n[0]&&(s.loopDelay=t[0].video.loopAfter),1&n[0]&&(s.muted=t[0].video.muted),65&n[0]&&(s.autoplay=!t[6]&&t[0].video.autoplay),1&n[0]&&(s.hasTransparentH265=t[0].video.transparent&&t[0].video.hasH265),!i&&2&n[0]&&(i=!0,s._media=t[1],wt((()=>i=!1))),e.$set(s)},i(t){n||(Lt(e.$$.fragment,t),n=!0)},o(t){Pt(e.$$.fragment,t),n=!1},d(t){Xt(e,t)}}}function el(t){let e,i,n=t[23]&&(t[9]||t[7]||t[8])&&Za(t);return{c(){n&&n.c(),e=O()},m(t,s){n&&n.m(t,s),I(t,e,s),i=!0},p(t,i){t[23]&&(t[9]||t[7]||t[8])?n?(n.p(t,i),896&i[0]&&Lt(n,1)):(n=Za(t),n.c(),Lt(n,1),n.m(e.parentNode,e)):n&&(At(),Pt(n,1,1,(()=>{n=null})),It())},i(t){i||(Lt(n),i=!0)},o(t){Pt(n),i=!1},d(t){t&&L(e),n&&n.d(t)}}}const il="data-embeds-inside-gl";function nl(t,e,i){var n,s;let r,o,a,l,c,d;const u=lt("micrio"),{current:m,wasm:p,canvas:f}=u;h(t,m,(t=>i(27,d=t)));let{embed:g}=e;const v=d,$=v.$info;g.uuid||(g.uuid=Jt());const w=g.uuid,y=v.is360,b=(null==(n=g.video)?void 0:n.autoplay)??!0;let k=v.embeds.find((t=>{var e;return t.uuid==w||(null==(e=t.$info)?void 0:e.title)==w}));const T=window.matchMedia("(dynamic-range: high)").matches||ie.OSX,x=g.area,_=null==(s=g.src)?void 0:s.toLowerCase().endsWith(".svg"),E=!(!g.width||!g.height)&&g.width*g.height<Math.pow(1024,2),S=/iPhone OS 14_/i.test(navigator.userAgent),M=u.getAttribute(il),A=!(_||S||!T&&!u.hasAttribute(il)||"false"==M||(!g.micrioId||E&&g.src)&&(!g.video||g.video.controls||g.video.transparent)),I=!g.clickAction&&!g.frameSrc,L="href"==g.clickAction?g.clickTarget:void 0,P=L&&g.clickTargetBlank;let N,C=x[2]-x[0],z=x[3]-x[1],D=x[0]+C/2,O=x[1]+z/2,R=g.scale||1,F=g.rotX??0,U=g.rotY??0,V=g.rotZ??0,B=g.scaleX??1,q=g.scaleY??1;function W(){const t=g.area;y&&t[0]>t[2]&&t[0]--,i(24,C=t[2]-t[0]),i(25,z=t[3]-t[1]),D=t[0]+C/2,O=t[1]+z/2,R=g.scale||1,F=g.rotX??0,U=g.rotY??0,V=g.rotZ??0,B=g.scaleX??1,q=g.scaleY??1,i(5,N=`--ratio:${C/z*$.width/$.height};--scale:${C*$.width/(g.width??100)/(A?1:R)*(y?Math.PI/2:1)};`),_&&i(5,N+=`height:${g.height}px`),A&&g.micrioId&&g.width&&i(5,N+=`width:${g.width}px`)}W();let X,G,Y=!1,j=0,H=0,Z="";function K(){var t,e,n;if(v.camera.e&&(i(7,[j,H,X]=v.camera.getXYDirect(D,O),j,i(8,H)),y&&i(9,G=v.camera.getMatrix(D,O,R,1,F,U,V,void 0,B,q).join(",")),i(10,Z=(y?`transform:matrix3d(${G});`:`--x:${j}px;--y:${H}px;--s:${X};`)+(void 0!==g.opacity&&1!==g.opacity?`--opacity:${g.opacity};`:"")),((null==(t=g.video)?void 0:t.pauseWhenSmallerThan)||(null==(e=g.video)?void 0:e.pauseWhenLargerThan))&&r)){const t=Y;i(6,Y=function(){var t,e;if(!(null==(t=g.video)?void 0:t.pauseWhenSmallerThan)&&!(null==(e=g.video)?void 0:e.pauseWhenLargerThan))return!b;const i=X?Math.max(r*X/f.viewport.width,o*X/f.viewport.height):0;return!!(g.video.pauseWhenSmallerThan&&i<g.video.pauseWhenSmallerThan||g.video.pauseWhenLargerThan&&i>g.video.pauseWhenLargerThan)}()),(null==tt?void 0:tt._vid)&&Y!=t&&(Y?tt._vid.pause():((null==(n=null==v?void 0:v.$settings)?void 0:n.embedRestartWhenShown)&&i(26,tt._vid.currentTime=0,tt),tt._vid.play()))}}const J=Ht(!1);g.video&&(g.video.controls||(g.video.muted=!0));const Q=A&&!!g.video;let tt;const et=!A||!!g.clickAction;let it;return rt((()=>{var t,e;const n=[];return A&&function(){const t=g.hideWhenPaused?.01:g.opacity||1;k&&k.ptr>=0?(k.camera.setArea(g.area),k.camera.setRotation(g.rotX,g.rotY,g.rotZ),p.fadeImage(k.ptr,t)):k=v.addEmbed({id:g.video?g.id:g.micrioId,title:w,width:g.width,height:g.height,isPng:g.isPng,isWebP:g.isWebP,isDeepZoom:g.isDeepZoom,path:$.tileBasePath??$.path,isSingle:!!g.video,isVideo:!!g.video,settings:{_360:{rotX:F,rotY:U,rotZ:V}}},g.area,{opacity:t,asImage:!1}),Q&&le(k.visible,{targetValue:!0}).then((()=>{i(26,tt=new Ha(p,k,g,Y,K))})),p.render()}(),(et||(null==(t=g.video)?void 0:t.pauseWhenSmallerThan)||(null==(e=g.video)?void 0:e.pauseWhenLargerThan))&&n.push(v.state.view.subscribe(K)),()=>{var t;for(null==tt||tt.unmount(),k&&(p.fadeImage(k.ptr,0),p.render()),g.video&&g.id&&d&&d.setEmbedMediaElement(g.id);n.length;)null==(t=n.shift())||t()}})),t.$$set=t=>{"embed"in t&&i(0,g=t.embed)},t.$$.update=()=>{16777216&t.$$.dirty[0]&&i(3,r=Math.round(C*$.width)),33554432&t.$$.dirty[0]&&i(4,o=Math.round(z*$.height)),201326595&t.$$.dirty[0]&&g.video&&g.id&&d&&d.setEmbedMediaElement(g.id,it??(null==tt?void 0:tt._vid)),9&t.$$.dirty[0]&&i(2,a=g.video?Math.min(g.video.width,r):r),17&t.$$.dirty[0]&&i(12,l=g.video?Math.min(g.video.height,o):o),12&t.$$.dirty[0]&&i(11,c=r/a)},[g,it,a,r,o,N,Y,j,H,G,Z,c,l,m,y,_,A,I,L,P,function(){d&&"markerId"==g.clickAction&&g.clickTarget&&d.state.marker.set(g.clickTarget)},function(t){if(t&&"detail"in t){const e=t.detail;for(const t in e)i(0,g[t]=e[t],g)}W(),K()},J,et,C,z,tt,d,function(t){it=t,i(1,it)}]}class sl extends Yt{constructor(t){super(),Gt(this,t,nl,el,a,{embed:0},null,[-1,-1])}}function rl(i){let n,s,a,l,c,d,u;return{c(){n=C("svg"),s=C("circle"),a=C("circle"),V(s,"r",al),V(s,"cx",ol/2),V(s,"cy",ol/2),V(s,"fill","transparent"),V(s,"stroke","#e0e0e0"),V(s,"stroke-width","8px"),V(s,"class","micrio-progress-circle"),V(a,"r",al),V(a,"cx",ol/2),V(a,"cy",ol/2),V(a,"fill","transparent"),V(a,"stroke","#00d4ee"),V(a,"stroke-width","8px"),V(a,"stroke-dasharray",i[1]+"px"),V(a,"stroke-dashoffset",l=i[0]+"px"),V(a,"class","micrio-progress-circle"),V(n,"width","100"),V(n,"height","100"),V(n,"viewBox","0 0 "+ol+" "+ol),V(n,"class","micrio-progress-circle")},m(t,e){I(t,n,e),S(n,s),S(n,a),u=!0},p(t,[e]){(!u||1&e&&l!==(l=t[0]+"px"))&&V(a,"stroke-dashoffset",l)},i(t){u||(t&&$t((()=>{u&&(d&&d.end(1),c=Ct(n,_e,{delay:500}),c.start())})),u=!0)},o(i){c&&c.invalidate(),i&&(d=function(i,n,s){const a={direction:"out"};let l,c=n(i,s,a),d=!0;const u=Mt;let h;function m(){const{delay:n=0,duration:s=300,easing:o=e,tick:a=t,css:m}=c||Nt;m&&(l=et(i,1,0,s,n,o,m));const p=b()+n,f=p+s;$t((()=>Et(i,!1,"start"))),"inert"in i&&(h=i.inert,i.inert=!0),_((t=>{if(d){if(t>=f)return a(0,1),Et(i,!1,"end"),--u.r||r(u.c),!1;if(t>=p){const e=o((t-p)/s);a(1-e,e)}}return d}))}return u.r+=1,o(c)?_t().then((()=>{c=c(a),m()})):m(),{end(t){t&&"inert"in i&&(i.inert=h),t&&c.tick&&c.tick(1,0),d&&(l&&it(i,l),d=!1)}}}(n,_e,{})),u=!1},d(t){t&&L(n),t&&d&&d.end()}}}const ol=100,al=40;function ll(t,e,i){let n,{progress:s}=e;const r=2*Math.PI*al;return t.$$set=t=>{"progress"in t&&i(2,s=t.progress)},t.$$.update=()=>{4&t.$$.dirty&&i(0,n=r*(1-s))},[n,r,s]}class cl extends Yt{constructor(t){super(),Gt(this,t,ll,rl,a,{progress:2})}}function dl(t,e,i){const n=t.slice();return n[51]=e[i],n}function ul(t,e,i){const n=t.slice();return n[34]=e[i],n}function hl(t,e,i){const n=t.slice();return n[56]=e[i],n}function ml(t,e,i){const n=t.slice();return n[56]=e[i],n}function pl(t,e,i){const n=t.slice();return n[61]=e[i],n}function fl(t){let e,i;return e=new Hr({props:{volume:t[25],data:t[9],is360:!!t[7].is360}}),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};33554432&i[0]&&(n.volume=t[25]),512&i[0]&&(n.data=t[9]),128&i[0]&&(n.is360=!!t[7].is360),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function gl(t){let e,n;const s=[{src:t[24]},{volume:t[25]},{is360:!0},{width:t[7].width},{height:t[7].height},t[6]];let r={};for(let o=0;o<s.length;o+=1)r=i(r,s[o]);return e=new ys({props:r}),{c(){qt(e.$$.fragment)},m(t,i){Wt(e,t,i),n=!0},p(t,i){const n=50331840&i[0]?Ut(s,[16777216&i[0]&&{src:t[24]},33554432&i[0]&&{volume:t[25]},s[2],128&i[0]&&{width:t[7].width},128&i[0]&&{height:t[7].height},64&i[0]&&Vt(t[6])]):{};e.$set(n)},i(t){n||(Lt(e.$$.fragment,t),n=!0)},o(t){Pt(e.$$.fragment,t),n=!1},d(t){Xt(e,t)}}}function vl(t){let e,i,n=[],s=new Map,r=Dt(t[9].embeds);const o=t=>t[61].uuid;for(let a=0;a<r.length;a+=1){let e=pl(t,r,a),i=o(e);s.set(i,n[a]=$l(i,e))}return{c(){for(let t=0;t<n.length;t+=1)n[t].c();e=O()},m(t,s){for(let e=0;e<n.length;e+=1)n[e]&&n[e].m(t,s);I(t,e,s),i=!0},p(t,i){512&i[0]&&(r=Dt(t[9].embeds),At(),n=Ft(n,i,o,0,t,r,s,e.parentNode,Rt,$l,e,pl),It())},i(t){if(!i){for(let t=0;t<r.length;t+=1)Lt(n[t]);i=!0}},o(t){for(let e=0;e<n.length;e+=1)Pt(n[e]);i=!1},d(t){t&&L(e);for(let e=0;e<n.length;e+=1)n[e].d(t)}}}function $l(t,e){let i,n,s;return n=new sl({props:{embed:e[61]}}),{key:t,first:null,c(){i=O(),qt(n.$$.fragment),this.first=i},m(t,e){I(t,i,e),Wt(n,t,e),s=!0},p(t,i){e=t;const s={};512&i[0]&&(s.embed=e[61]),n.$set(s)},i(t){s||(Lt(n.$$.fragment,t),s=!0)},o(t){Pt(n.$$.fragment,t),s=!1},d(t){t&&L(i),Xt(n,t)}}}function wl(t){let e,i;return e=new Ie({}),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function yl(t){let e,i;return e=new Zi({}),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function bl(t){let e,i,n=[],s=new Map,r=Dt(t[26]);const o=t=>t[56].uuid;for(let a=0;a<r.length;a+=1){let e=ml(t,r,a),i=o(e);s.set(i,n[a]=kl(i,e))}return{c(){for(let t=0;t<n.length;t+=1)n[t].c();e=O()},m(t,s){for(let e=0;e<n.length;e+=1)n[e]&&n[e].m(t,s);I(t,e,s),i=!0},p(t,i){67108864&i[0]&&(r=Dt(t[26]),At(),n=Ft(n,i,o,0,t,r,s,e.parentNode,Rt,kl,e,ml),It())},i(t){if(!i){for(let t=0;t<r.length;t+=1)Lt(n[t]);i=!0}},o(t){for(let e=0;e<n.length;e+=1)Pt(n[e]);i=!1},d(t){t&&L(e);for(let e=0;e<n.length;e+=1)n[e].d(t)}}}function kl(t,e){let i,n,s;return n=new Aa({props:{image:e[56]}}),{key:t,first:null,c(){i=O(),qt(n.$$.fragment),this.first=i},m(t,e){I(t,i,e),Wt(n,t,e),s=!0},p(t,i){e=t;const s={};67108864&i[0]&&(s.image=e[56]),n.$set(s)},i(t){s||(Lt(n.$$.fragment,t),s=!0)},o(t){Pt(n.$$.fragment,t),s=!1},d(t){t&&L(i),Xt(n,t)}}}function Tl(t){let e,i,n=[],s=new Map,r=Dt(t[26].filter(Ol));const o=t=>t[56].uuid;for(let a=0;a<r.length;a+=1){let e=hl(t,r,a),i=o(e);s.set(i,n[a]=xl(i,e))}return{c(){for(let t=0;t<n.length;t+=1)n[t].c();e=O()},m(t,s){for(let e=0;e<n.length;e+=1)n[e]&&n[e].m(t,s);I(t,e,s),i=!0},p(t,i){67108864&i[0]&&(r=Dt(t[26].filter(Ol)),At(),n=Ft(n,i,o,0,t,r,s,e.parentNode,Rt,xl,e,hl),It())},i(t){if(!i){for(let t=0;t<r.length;t+=1)Lt(n[t]);i=!0}},o(t){for(let e=0;e<n.length;e+=1)Pt(n[e]);i=!1},d(t){t&&L(e);for(let e=0;e<n.length;e+=1)n[e].d(t)}}}function xl(t,e){let i,n,s;return n=new Qi({props:{image:e[56]}}),{key:t,first:null,c(){i=O(),qt(n.$$.fragment),this.first=i},m(t,e){I(t,i,e),Wt(n,t,e),s=!0},p(t,i){e=t;const s={};67108864&i[0]&&(s.image=e[56]),n.$set(s)},i(t){s||(Lt(n.$$.fragment,t),s=!0)},o(t){Pt(n.$$.fragment,t),s=!1},d(t){t&&L(i),Xt(n,t)}}}function _l(t){let e,i;return e=new In({props:{hasAudio:t[23]||!(!t[24]||!t[6]||t[6].muted)}}),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};25165888&i[0]&&(n.hasAudio=t[23]||!(!t[24]||!t[6]||t[6].muted)),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function El(t){let e,i;return e=new Dr({props:{images:t[4],omni:t[3]}}),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};16&i[0]&&(n.images=t[4]),8&i[0]&&(n.omni=t[3]),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function Sl(t){let e,i;return e=new ze({props:{organisation:t[21]}}),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};2097152&i[0]&&(n.organisation=t[21]),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function Ml(t){let e,i;return e=new oo({props:{info:t[11],data:t[12]}}),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};2048&i[0]&&(n.info=t[11]),4096&i[0]&&(n.data=t[12]),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function Al(t,e){let i,n,s;return n=new Ys({props:{marker:e[34]}}),{key:t,first:null,c(){i=O(),qt(n.$$.fragment),this.first=i},m(t,e){I(t,i,e),Wt(n,t,e),s=!0},p(t,i){e=t;const s={};1024&i[0]&&(s.marker=e[34]),n.$set(s)},i(t){s||(Lt(n.$$.fragment,t),s=!0)},o(t){Pt(n.$$.fragment,t),s=!1},d(t){t&&L(i),Xt(n,t)}}}function Il(t){let e,i;return e=new kr({props:{tour:t[8],noHTML:t[0]}}),e.$on("minimize",t[43]),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};256&i[0]&&(n.tour=t[8]),1&i[0]&&(n.noHTML=t[0]),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function Ll(t){let e,i;return e=new qo({props:{popover:t[27]}}),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};134217728&i[0]&&(n.popover=t[27]),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function Pl(t,e){let i,n,s;return n=new Fn({props:{src:e[51],raised:e[14]}}),{key:t,first:null,c(){i=O(),qt(n.$$.fragment),this.first=i},m(t,e){I(t,i,e),Wt(n,t,e),s=!0},p(t,i){e=t;const s={};32768&i[0]&&(s.src=e[51]),16384&i[0]&&(s.raised=e[14]),n.$set(s)},i(t){s||(Lt(n.$$.fragment,t),s=!0)},o(t){Pt(n.$$.fragment,t),s=!1},d(t){t&&L(i),Xt(n,t)}}}function Nl(t){let e,i;return e=new co({props:{message:t[2]}}),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};4&i[0]&&(n.message=t[2]),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function Cl(t){let e,i;return e=new cl({props:{progress:t[1]}}),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};2&i[0]&&(n.progress=t[1]),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function zl(t){let e,i,n,s,r,o,a,l,c,d,u,h,m,p,f,g,v,$,w=[],y=new Map,b=[],k=new Map,T=t[23]&&t[9]&&t[7]&&fl(t),x=t[24]&&t[7]&&gl(t),_=t[28]&&t[9]&&t[9].embeds&&vl(t),E=t[5]&&wl(),S=t[16]&&yl(),M=t[22]&&bl(t),A=t[20]&&Tl(t),P=t[18]&&_l(t),N=t[19]&&El(t),C=t[21]&&Sl(t),z=t[17]&&Ml(t),R=Dt(t[10]);const F=t=>t[34].id;for(let I=0;I<R.length;I+=1){let e=ul(t,R,I),i=F(e);y.set(i,w[I]=Al(i,e))}let U=t[8]&&Il(t),V=t[27]&&Ll(t),B=Dt(t[15]);const q=t=>t[51];for(let I=0;I<B.length;I+=1){let e=dl(t,B,I),i=q(e);k.set(i,b[I]=Pl(i,e))}let W=t[2]&&Nl(t),X=t[1]<1&&Cl(t);return{c(){T&&T.c(),e=D(),x&&x.c(),i=D(),_&&_.c(),n=D(),E&&E.c(),s=D(),S&&S.c(),r=D(),M&&M.c(),o=D(),A&&A.c(),a=D(),P&&P.c(),l=D(),N&&N.c(),c=D(),C&&C.c(),d=D(),z&&z.c(),u=D();for(let t=0;t<w.length;t+=1)w[t].c();h=D(),U&&U.c(),m=D(),V&&V.c(),p=D();for(let t=0;t<b.length;t+=1)b[t].c();f=D(),W&&W.c(),g=D(),X&&X.c(),v=O()},m(t,y){T&&T.m(t,y),I(t,e,y),x&&x.m(t,y),I(t,i,y),_&&_.m(t,y),I(t,n,y),E&&E.m(t,y),I(t,s,y),S&&S.m(t,y),I(t,r,y),M&&M.m(t,y),I(t,o,y),A&&A.m(t,y),I(t,a,y),P&&P.m(t,y),I(t,l,y),N&&N.m(t,y),I(t,c,y),C&&C.m(t,y),I(t,d,y),z&&z.m(t,y),I(t,u,y);for(let e=0;e<w.length;e+=1)w[e]&&w[e].m(t,y);I(t,h,y),U&&U.m(t,y),I(t,m,y),V&&V.m(t,y),I(t,p,y);for(let e=0;e<b.length;e+=1)b[e]&&b[e].m(t,y);I(t,f,y),W&&W.m(t,y),I(t,g,y),X&&X.m(t,y),I(t,v,y),$=!0},p(t,$){t[23]&&t[9]&&t[7]?T?(T.p(t,$),8389248&$[0]&&Lt(T,1)):(T=fl(t),T.c(),Lt(T,1),T.m(e.parentNode,e)):T&&(At(),Pt(T,1,1,(()=>{T=null})),It()),t[24]&&t[7]?x?(x.p(t,$),16777344&$[0]&&Lt(x,1)):(x=gl(t),x.c(),Lt(x,1),x.m(i.parentNode,i)):x&&(At(),Pt(x,1,1,(()=>{x=null})),It()),t[28]&&t[9]&&t[9].embeds?_?(_.p(t,$),512&$[0]&&Lt(_,1)):(_=vl(t),_.c(),Lt(_,1),_.m(n.parentNode,n)):_&&(At(),Pt(_,1,1,(()=>{_=null})),It()),t[5]?E?32&$[0]&&Lt(E,1):(E=wl(),E.c(),Lt(E,1),E.m(s.parentNode,s)):E&&(At(),Pt(E,1,1,(()=>{E=null})),It()),t[16]?S?65536&$[0]&&Lt(S,1):(S=yl(),S.c(),Lt(S,1),S.m(r.parentNode,r)):S&&(At(),Pt(S,1,1,(()=>{S=null})),It()),t[22]?M?(M.p(t,$),4194304&$[0]&&Lt(M,1)):(M=bl(t),M.c(),Lt(M,1),M.m(o.parentNode,o)):M&&(At(),Pt(M,1,1,(()=>{M=null})),It()),t[20]?A?(A.p(t,$),1048576&$[0]&&Lt(A,1)):(A=Tl(t),A.c(),Lt(A,1),A.m(a.parentNode,a)):A&&(At(),Pt(A,1,1,(()=>{A=null})),It()),t[18]?P?(P.p(t,$),262144&$[0]&&Lt(P,1)):(P=_l(t),P.c(),Lt(P,1),P.m(l.parentNode,l)):P&&(At(),Pt(P,1,1,(()=>{P=null})),It()),t[19]?N?(N.p(t,$),524288&$[0]&&Lt(N,1)):(N=El(t),N.c(),Lt(N,1),N.m(c.parentNode,c)):N&&(At(),Pt(N,1,1,(()=>{N=null})),It()),t[21]?C?(C.p(t,$),2097152&$[0]&&Lt(C,1)):(C=Sl(t),C.c(),Lt(C,1),C.m(d.parentNode,d)):C&&(At(),Pt(C,1,1,(()=>{C=null})),It()),t[17]?z?(z.p(t,$),131072&$[0]&&Lt(z,1)):(z=Ml(t),z.c(),Lt(z,1),z.m(u.parentNode,u)):z&&(At(),Pt(z,1,1,(()=>{z=null})),It()),1024&$[0]&&(R=Dt(t[10]),At(),w=Ft(w,$,F,0,t,R,y,h.parentNode,Rt,Al,h,ul),It()),t[8]?U?(U.p(t,$),256&$[0]&&Lt(U,1)):(U=Il(t),U.c(),Lt(U,1),U.m(m.parentNode,m)):U&&(At(),Pt(U,1,1,(()=>{U=null})),It()),t[27]?V?(V.p(t,$),134217728&$[0]&&Lt(V,1)):(V=Ll(t),V.c(),Lt(V,1),V.m(p.parentNode,p)):V&&(At(),Pt(V,1,1,(()=>{V=null})),It()),49152&$[0]&&(B=Dt(t[15]),At(),b=Ft(b,$,q,0,t,B,k,f.parentNode,Rt,Pl,f,dl),It()),t[2]?W?(W.p(t,$),4&$[0]&&Lt(W,1)):(W=Nl(t),W.c(),Lt(W,1),W.m(g.parentNode,g)):W&&(At(),Pt(W,1,1,(()=>{W=null})),It()),t[1]<1?X?(X.p(t,$),2&$[0]&&Lt(X,1)):(X=Cl(t),X.c(),Lt(X,1),X.m(v.parentNode,v)):X&&(At(),Pt(X,1,1,(()=>{X=null})),It())},i(t){if(!$){Lt(T),Lt(x),Lt(_),Lt(E),Lt(S),Lt(M),Lt(A),Lt(P),Lt(N),Lt(C),Lt(z);for(let t=0;t<R.length;t+=1)Lt(w[t]);Lt(U),Lt(V);for(let t=0;t<B.length;t+=1)Lt(b[t]);Lt(W),Lt(X),$=!0}},o(t){Pt(T),Pt(x),Pt(_),Pt(E),Pt(S),Pt(M),Pt(A),Pt(P),Pt(N),Pt(C),Pt(z);for(let e=0;e<w.length;e+=1)Pt(w[e]);Pt(U),Pt(V);for(let e=0;e<b.length;e+=1)Pt(b[e]);Pt(W),Pt(X),$=!1},d(t){t&&(L(e),L(i),L(n),L(s),L(r),L(o),L(a),L(l),L(c),L(d),L(u),L(h),L(m),L(p),L(f),L(g),L(v)),T&&T.d(t),x&&x.d(t),_&&_.d(t),E&&E.d(t),S&&S.d(t),M&&M.d(t),A&&A.d(t),P&&P.d(t),N&&N.d(t),C&&C.d(t),z&&z.d(t);for(let e=0;e<w.length;e+=1)w[e].d(t);U&&U.d(t),V&&V.d(t);for(let e=0;e<b.length;e+=1)b[e].d(t);W&&W.d(t),X&&X.d(t)}}}function Dl(t,e){if(e)for(let i,n=0;n<e.length;n++)if(e[n].id==t||(i=Dl(t,e[n].children)))return i??e[n]}const Ol=t=>t.$settings.minimap;function Rl(e,i,n){let s,r,o,a,l,c,m,p,f,g,v,$,w,y,b,k,T,x,_,E,S,M,A,I,L=t,P=()=>(L(),L=d(Y,(t=>n(41,k=t))),Y),N=t,C=t;e.$$.on_destroy.push((()=>L())),e.$$.on_destroy.push((()=>N())),e.$$.on_destroy.push((()=>C()));let{micrio:z}=i;at("micrio",z);at("markerImages",new WeakMap);let{noHTML:D}=i;const O="markers"==z.getAttribute("data-ui");O&&(D=!0);let{noLogo:R=D}=i,{loadingProgress:F=1}=i,{error:U}=i;const V="false"!=z.getAttribute("data-embeds"),B=z.visible;h(e,B,(t=>n(26,A=t)));const q=z.state.popup,W=z.state.popover;h(e,W,(t=>n(27,I=t)));let X,G,Y,j=[];q.subscribe((t=>setTimeout((()=>n(10,j=t?[t]:[])),20)));const{tour:H,marker:Z}=z.state;h(e,H,(t=>n(8,x=t))),h(e,Z,(t=>n(42,_=t)));let K,J=!1;const Q=[];z.current.subscribe((t=>{t&&(n(11,X=t.info),N(),N=d(X,(t=>n(7,T=t))),P(n(13,Y=void 0)),X&&le(X).then((e=>{var i;e&&(n(37,J=!0),P(n(13,Y=t.settings)),!K&&(null==(i=e.organisation)?void 0:i.logo)&&n(38,K=e.organisation))})),n(12,G=t.data),C(),C=d(G,(t=>n(9,E=t))),G&&Q.indexOf(t.id)<0&&le(G).then((async e=>{var i,n;if(!e)return;if(Q.push(t.id),await vt().then(vt),u(z.state.popover)||u(z.state.marker)||u(z.state.tour))return;const s=t.$settings.start;if(s)switch(s.type){case"marker":t.state.marker.set(s.id);break;case"markerTour":const r=null==(i=e.markerTours)?void 0:i.find((t=>t.id==s.id));r&&z.state.tour.set(r);break;case"tour":const o=null==(n=e.tours)?void 0:n.find((t=>t.id==s.id));o&&z.state.tour.set(o);break;case"page":const a=Dl(s.id,e.pages);a&&z.state.popover.set({contentPage:a,showLangSelect:!0})}})))}));const tt=z.isMuted;h(e,tt,(t=>n(44,S=t)));const et=Ht(S?0:1);h(e,et,(t=>n(25,M=t))),at("volume",et),z.isMuted.subscribe((t=>et.set(t?0:1))),at("mediaPaused",Ht(!1));let it=!1,nt=[];at("srt",Ht()).subscribe((t=>setTimeout((()=>{n(15,nt=t?[t]:[])}),20)));return e.$$set=t=>{"micrio"in t&&n(35,z=t.micrio),"noHTML"in t&&n(0,D=t.noHTML),"noLogo"in t&&n(36,R=t.noLogo),"loadingProgress"in t&&n(1,F=t.loadingProgress),"error"in t&&n(2,U=t.error)},e.$$.update=()=>{var t,i,d;1024&e.$$.dirty[1]&&n(6,s=null==(t=null==k?void 0:k._360)?void 0:t.video),64&e.$$.dirty[0]&&n(24,r=null==s?void 0:s.src),1024&e.$$.dirty[1]&&n(3,o=null==k?void 0:k.omni),128&e.$$.dirty[0]&&n(4,a=null==T?void 0:T.gallery),512&e.$$.dirty[0]&&n(40,l=null==(i=null==E?void 0:E.markers)?void 0:i.filter((t=>!!t.positionalAudio))),512&e.$$.dirty[0]|512&e.$$.dirty[1]&&n(23,c=!!(null==(d=null==E?void 0:E.music)?void 0:d.items.length)||!!(null==l?void 0:l.length)),256&e.$$.dirty[0]|2048&e.$$.dirty[1]&&n(39,m=x||_),1&e.$$.dirty[0]&&n(22,p=!D||O),129&e.$$.dirty[0]|1056&e.$$.dirty[1]&&n(5,f=!(R||T&&D||(null==k?void 0:k.noLogo))),33&e.$$.dirty[0]|1152&e.$$.dirty[1]&&n(21,g=D||!f||(null==k?void 0:k.noOrgLogo)?void 0:K),393&e.$$.dirty[0]|16&e.$$.dirty[1]&&n(20,v=!(D||o||z.spaceData||x||(null==T?void 0:T.gallery))),24&e.$$.dirty[0]&&n(19,$=!!a||!!o),129&e.$$.dirty[0]&&n(18,w=!D&&!!T),1&e.$$.dirty[0]|1280&e.$$.dirty[1]&&n(17,y=!D&&!m&&(null==k?void 0:k.showInfo)),1&e.$$.dirty[0]|1088&e.$$.dirty[1]&&n(16,b=!D&&J&&!(null==k?void 0:k.noToolbar))},[D,F,U,o,a,f,s,T,x,E,j,X,G,Y,it,nt,b,y,w,$,v,g,p,c,r,M,A,I,V,B,W,H,tt,et,Z,z,R,J,K,m,l,k,_,t=>n(14,it=!t.detail)]}const Fl=!self.createImageBitmap,Ul=URL.createObjectURL(new Blob(["let controller = null, prevUri = null;\nself.addEventListener('message', e => {\n\tif(e.data == 'abort') return controller && controller.abort();\n\tcontroller = new AbortController();\n\tfetch(e.data.src, { signal: controller.signal })\n\t\t.then(r => r.blob())"+(Fl?"\n\t\t.then(blob => {\n\t\t\tURL.revokeObjectURL(prevUri);\n\t\t\tself.postMessage({src: (prevUri = URL.createObjectURL(blob, {type: e.data.type}))})\n\t\t})":"\n\t\t.then(blob => self.createImageBitmap(blob))\n\t\t.then(data => self.postMessage({data:data, src:e.data.src}, [data]))")+"\n\t\t.catch(err => self.postMessage({error: e.data.src+': '+err.message, type: err.name}))\n})"],{type:"text/javascript"})),Vl=Math.max(2,Math.min(6,(navigator.hardwareConcurrency||2)-1)),Bl=[],ql=new Map,Wl=new Map,Xl=[],Gl=new Map;for(let bc=0;bc<Vl;bc++){const t=new Worker(Ul);t.onmessage=t=>jl(bc,t.data.src,t.data.data,t.data.error,t.data.type),ql.set(bc,t),Wl.set(bc,new Image)}const Yl=t=>new Promise(((e,i)=>{Xl.push([t,e,i]),function(){if(!Xl.length)return;let t=0;for(;t<Vl&&!(Bl.indexOf(t)<0);t++);if(t>=Vl&&!Fl)return void console.warn("All download threads taken!");Bl.push(t);const e=Xl.shift();if(!e)return;Gl.set(t,e);const i=ql.get(t);if(!i)return;i.postMessage({src:e[0],type:"image/"+e[0].split(".").reverse()[0]})}()}));function jl(t,e,i,n,s){const r=Gl.get(t);if(null!=r)if(Gl.delete(t),setTimeout((()=>{Bl.splice(Bl.indexOf(t),1)}),50),n)r[2](n),"AbortError"!=s&&console.error(s,n);else if(i)r[1](i);else if(e){const i=Wl.get(t);if(!i)return;i.onload=()=>{r[1](i)},i.src=e}}function Hl(){return Bl.length}function Zl(t){const e=[...Gl.entries()].find((e=>e[1][0]==t));if(null==e)return;const i=ql.get(e[0]);i&&i.postMessage("abort")}const Kl=Ca.ugz?Ca.ugz(Ca.b64,!0):fetch("http://localhost:2000/build/optimized.wasm").then((t=>t.arrayBuffer())),Jl=class t{constructor(t){this.micrio=t,this.ready=!1,this.memory=new self.WebAssembly.Memory({initial:100,maximum:100}),this.b=this.memory.buffer,this.i=-1,this.c=-1,this.now=-1,this.raf=-1,this.drawing=!1,this.images=[],this.bareBone=!1,this.baseTiles=[],this.drawn=[],this.prevDrawn=[],this.toDelete={},this.textures={},this.requests=new Map,this.timeouts={},this.tileLoaded={},this.tileOpacity={},this.loadStates={},this.unsubscribe=[],this.cameras=new Map,this.preventDirectionSet=!1,this._pMatrices={},this.isGallery=!1,this.imports={env:{memory:this.memory,abort:console.error},main:{"console.log":console.log,"console.log2":console.log,"console.log3":console.log,"console.log4":console.log,drawTile:this.drawTile.bind(this),drawQuad:t=>this.micrio.webgl.drawTile(void 0,t),aniAbort:t=>{const e=this.cameras.get(t);e&&(e.aniAbort&&e.aniAbort(),e.aniDoneAdd.length=0,e.aniAbort=e.aniDone=void 0)},aniDone:t=>{var e;const i=this.cameras.get(t);if(i){for(i.aniDone&&i.aniDone();i.aniDoneAdd.length;)null==(e=i.aniDoneAdd.shift())||e();i.aniAbort=i.aniDone=void 0}},getTileOpacity:t=>this.tileOpacity[t],setTileOpacity:(t,e=!1,i=1)=>{const n=this.tileOpacity,s=this.tileLoaded;return(!n[t]||n[t]<1)&&(n[t]=e?1:s[t]>0?Math.min(1,(this.now-s[t])/250)*i:0),n[t]||0},setMatrix:t=>this.micrio.webgl.gl.uniformMatrix4fv(this.micrio.webgl.pmLoc,!1,this._pMatrices[t]),setViewport:(t,e,i,n)=>this.micrio.webgl.gl.viewport(Math.floor(t),Math.floor(e),Math.ceil(i),Math.ceil(n)),viewSet:t=>{var e;return null==(e=this.cameras.get(t))?void 0:e.viewChanged()},viewportSet:(t,e,i,n,s)=>{const r=this.images.find((e=>e.ptr==t));r&&"camera"in r&&r.viewport.set([e,i,n,s])},setVisible:(t,e)=>{var i;return null==(i=this.images.find((e=>e.ptr==t)))?void 0:i.visible.set(1===e)},setVisible2:(t,e)=>{var i;return null==(i=this.images.find((e=>e.ptr==t)))?void 0:i.visible.set(1===e)}}},this.addImage=async(t,e,i=!1,n=1)=>le(t.info).then((s=>{if(!s)return;this.images.push(t);const r=t.opts.area??[0,0,1,1],o=t.$settings._360??{};if(t.ptr=i?this.e._addImage(e.ptr,r[0],r[1],r[2],r[3],s.width,s.height,s.tileSize||1024,s.isSingle??!1,s.isVideo??!1,n,o.rotX??0,o.rotY??0,o.rotZ??0,o.scale??1,0):this.e._addChild(e.ptr,r[0],r[1],r[2],r[3],s.width,s.height),!i){this.bindCamera(t),t.$settings.focus&&this.e._setCoo(t.ptr,t.$settings.focus[0],t.$settings.focus[1],0,0,performance.now());const e=this.e._getPMatrix(t.ptr);this._pMatrices[e]=new Float32Array(this.b,e+32,16);const i=t.$info.view;i&&"0,0,1,1"!=i.toString()&&this.e._setView(t.ptr,i[0],i[1],i[2],i[3]),this.e._sendViewport(t.ptr)}this.tileOpacity[t.baseTileIdx=this.e.getNumTiles(this.i)-1]=1,this.baseTiles.push(t.baseTileIdx)})),this.addEmbed=(t,e,i={})=>{if("camera"in t&&i.asImage)return this.addImage(t,e,!0,i.opacity??1);{const n="$info"in t?t.$info:e.$info;if(!n)return;this.images.push(t);const s=t.opts.area??[0,0,1,1],r=t instanceof ja?t.$settings._360??{}:{};t.ptr=this.e._addImage(e.ptr,s[0],s[1],s[2],s[3],n.width,n.height,n.tileSize||1024,n.isSingle??!1,n.isVideo??!1,i.opacity??1,r.rotX??0,r.rotY??0,r.rotZ??0,r.scale??1,i.fromScale??0),this.tileOpacity[t.baseTileIdx=this.e.getNumTiles(this.i)-1]=1,this.baseTiles.push(t.baseTileIdx)}},this.addChild=(t,e)=>this.addImage(t,e),this.render=this.render.bind(this),this.draw=this.draw.bind(this),this.unsubscribe.push(t.current.subscribe(this.setCanvas.bind(this)))}static getTextureBuffer(t,e){const i=new Float32Array(12*t*e),n=1/t,s=1/e;for(let r=0,o=0;o<e;o++)for(let e=0;e<t;e++,r+=12)i[r+3]=i[r+7]=i[r+9]=(i[r+1]=i[r+5]=i[r+11]=o*s)+s,i[r+4]=i[r+8]=i[r+10]=(i[r+0]=i[r+2]=i[r+6]=e*n)+n;return i}async load(){if(this.i>=0)return;this.i=0;const e=await Kl;if(!(e instanceof Uint8Array||e instanceof ArrayBuffer))throw"Wasm binary is no array buffer!";const i=this.e=(await self.WebAssembly.instantiate(e,this.imports)).instance.exports;this.i=i.constructor(),t.segsX=this.e.segsX.value,t.segsY=this.e.segsY.value,t._textureBuffer360=t.getTextureBuffer(t.segsX,t.segsY),this._vertexBuffer=new Float32Array(this.b,i.getVertexBuffer(this.i)+32,18),this._vertexBuffer360=new Float32Array(this.b,i.getVertexBuffer360(this.i)+32,18*t.segsX*t.segsY),this.unsubscribe.push(this.micrio.barebone.subscribe((t=>i.setBareBone(this.i,this.bareBone=t))))}unbind(){var t;for(this.stop();this.unsubscribe.length;)null==(t=this.unsubscribe.shift())||t();this.requests.forEach((t=>Zl(t))),this.requests.clear();for(let e in this.timeouts)clearTimeout(this.timeouts[e]);this.timeouts={},this.loadStates={},this.tileLoaded={},this.tileOpacity={};for(let e in this.tileLoaded)this.deleteTile(Number(e));this.i>0&&this.e.reset(this.i)}getPtr(){return this.i}addCanvas(t){var e,i,n,s,r,o,a,l,c,d,h;const m=t.$info;if(!m)return;if(t.error)return void this.micrio.loading.set(!1);if(!(t.noImage||m.width&&m.height))throw"Invalid Micrio image size";const p=t.$settings;this.isGallery=!!m.gallery||t.isOmni,(null==(e=p.gallery)?void 0:e.archive)&&this.e.setHasArchive(this.i,!0,p.gallery.archiveLayerOffset??0),m.version&&Number(m.version)<=3.1&&this.e.setNoUnderzoom(this.i,!0);const f=!!p.limitToCoverScale,g=f||"cover"==p.initType;t.noImage&&this.micrio.loading.set(!1);const v=[.5,.5],$=p.focus,w=!!m.spacesId;$&&(isNaN($[0])||null===$[0]||(v[0]=$[0]),isNaN($[1])||null===$[1]||(v[1]=$[1])),m.is360&&(t.camera.trueNorth=(null==(i=p._360)?void 0:i.trueNorth)??.5);const y=null==(n=p._360)?void 0:n.video,b=m.is360&&y&&(y.src||"video"in y&&y.video),k=!!this.isGallery&&("switch"==(null==(s=p.gallery)?void 0:s.type)||"omni"==(null==(r=p.gallery)?void 0:r.type)||"swipe-full"==(null==(o=p.gallery)?void 0:o.type)),T=(null==(l=null==(a=p.omni)?void 0:a.layers)?void 0:l.length)??1;p.omni&&(p.omni.layerStartIndex=Math.min(T-1,(null==(c=p.omni)?void 0:c.layerStartIndex)??0)),t.ptr=this.e._constructor(this.i,m.width,m.height,m.tileSize??1024,m.is360??!1,t.noImage,!(!m.isSingle&&!b),t.opacity,p.freeMove??!1,f,g,(p.zoomLimit||1)*(!1!==p.zoomLimitDPRFix?this.micrio.canvas.getRatio(t.$settings):1),p.camspeed??1,t.camera.trueNorth,k,!!(null==(d=p.gallery)?void 0:d.isSpreads)&&"swipe"==p.gallery.type,t.isOmni,p.pinchZoomOutLimit??!1,T,(null==(h=p.omni)?void 0:h.layerStartIndex)??0),this.bindCamera(t),t.opts.area&&t.camera.setArea(t.opts.area,{direct:!0,noDispatch:!0,noRender:!0}),(null==p?void 0:p.crossfadeDuration)&&this.e.setCrossfadeDuration(this.i,p.crossfadeDuration),(null==p?void 0:p.embedFadeDuration)&&this.e.setEmbedFadeDuration(this.i,p.embedFadeDuration),void 0!==(null==p?void 0:p.dragElasticity)&&this.e.setDragElasticity(this.i,p.dragElasticity),(null==p?void 0:p.skipBaseLevels)&&this.e.setSkipBaseLevels(this.i,p.skipBaseLevels),(null==p?void 0:p.omni)&&t.camera.setOmniSettings(),this.micrio.hasAttribute("data-limited")&&this.e._setLimited(t.ptr,!0),this.images.push(t),this.e._sendViewport(t.ptr);const x=this.e.getNumTiles(this.i);x>0&&(this.tileOpacity[x-1]=1,this.baseTiles.push(x-1));const _=this.e._getPMatrix(t.ptr);this._pMatrices[_]=new Float32Array(this.b,_+32,16);const E=u(t.state.view)||p.view;E&&"0,0,1,1"!=E.toString()?this.e._setView(t.ptr,E[0],E[1],E[2],E[3],!1,!1,!1):!w&&m.is360||!v||"0.5,0.5"==v.toString()||(this.e._setCoo(t.ptr,v[0],v[1],0,0,performance.now()),p.focus=void 0),t.video.subscribe((t=>t&&t.addEventListener("play",this.render))),t.noImage&&t.visible.set(!0),this.setCanvas(t)}bindCamera(t){this.cameras.set(t.ptr,t.camera),t.camera.assign(this.e,new Float64Array(this.b,this.e._getView(t.ptr)+32,4),new Float64Array(this.b,this.e._getXY(t.ptr,0,0)+32,5),new Float64Array(this.b,this.e._getCoo(t.ptr,0,0)+32,5),new Float32Array(this.b,this.e._getMatrix(t.ptr)+32,16),new Float32Array(this.b,this.e._getQuad(t.ptr,0,0,0,0,0,0)+32,16))}setCanvas(t){var e;if(t&&!(t.ptr>0&&t.ptr==this.c))if(t.ptr<0)le(t.info).then((e=>{e&&this.micrio.$current&&(e.isIIIF||t.opts.secondaryTo||e.id==this.micrio.$current.id)&&(this.addCanvas(t),t.embeds.length&&t.embeds.forEach((e=>this.addEmbed(e,t))))}));else if(this.c!=t.ptr){const i=t.is360&&this.c>=0?this.e._getYaw(this.c):0,n=t.is360&&this.c>=0?this.e._getPitch(this.c):0;this.c=t.ptr,t.is360&&!this.preventDirectionSet&&i&&n&&this.e._setDirection(this.c,i,n,!0),0==this.e._getTargetOpacity(t.ptr)&&this.e._fadeIn(t.ptr),(null==(e=t.$settings.omni)?void 0:e.layerStartIndex)&&t.state.layer.set(t.$settings.omni.layerStartIndex),this.preventDirectionSet=!1,this.ready=!0,this.render()}}removeCanvas(t){if(t.ptr<0)throw"Canvas is not placed yet";this.e._remove(t.ptr),this.render()}render(){this.raf<0&&(this.raf=this.micrio.webgl.display.requestAnimationFrame(this.draw))}draw(t=performance.now()){var e,i;this.micrio.isConnected&&(this.raf=-1,this.drawing=!1,this.now=t,(1==this.e.shouldDraw(this.i,t)||this.micrio.keepRendering||this.micrio.events.isNavigating||!1===(null==(i=null==(e=this.micrio._current)?void 0:e._video)?void 0:i.paused))&&this.render(),this.isGallery&&this.drawStart(),this.drawn.length=0,this.e.draw(this.i),this.micrio.events.dispatch("draw"),this.cleanup(),this.micrio.webgl.drawEnd())}stop(){this.raf<0||(this.micrio.webgl.display.cancelAnimationFrame(this.raf),this.raf=-1)}drawTile(t,e,i,n,s,r,o,a){this.drawn.push(e),e in this.toDelete&&delete this.toDelete[e];const l=Hl(),c=this.images[t],d="camera"in c&&c.isVideo,u="camera"in c&&c.is360,h="camera"in c?c:c.image,m="frame"in c?c.frame:void 0;if(!this.loadStates[e]&&l<Vl){if(this.bareBone?l>2&&o:a&&o&&l>0)return!1;if(d&&!u)this.loadStates[e]=2,this.textures[e]=this.micrio.webgl.getTexture();else{this.loadStates[e]=1;const t=h.getTileSrc(i,n,s,m);t&&this.getTexture(e,t,o,{noSmoothing:"$info"in c&&c.$settings.noSmoothing})}}else if(this.loadStates[e]>=2){this.drawing||this.drawStart();const t=this.textures[e];if(null!=t){if(d){if(!h._video||!h._video.dataset.playing)return!1;this.micrio.webgl.updateTexture(t,h._video)}this.micrio.webgl.drawTile(t,r,u)}if(2==this.loadStates[e])return this.loadStates[e]=3,this.tileLoaded[e]=this.now,!0}return!1}drawStart(){this.drawing||(this.micrio.webgl.drawStart(),this.drawing=!0)}getTexture(t,e,i,n={}){if(this.textures[t]||this.requests.has(t)||!n.force&&Hl()>=Vl)return;const s=Ga.db.has(e);s||this.micrio.loading.set(!0),this.requests.set(t,e),(s?Ga.getImage(e):Yl(e)).then((e=>this.gotTexture(t,e,i,n.noSmoothing))).catch((()=>this.deleteRequest(t)))}gotTexture(t,e,i,n){this.textures[t]=this.micrio.webgl.getTexture(e,n),null!=self.ImageBitmap&&e instanceof ImageBitmap&&e.close instanceof Function&&e.close(),this.loadStates[t]=2,this.timeouts[t]=setTimeout((()=>{this.deleteRequest(t)}),i?150:50)}deleteRequest(t){this.requests.delete(t),clearTimeout(this.timeouts[t]),delete this.timeouts[t],this.requests.size||this.micrio.loading.set(!1)}deleteTile(t){const e=this.textures[t];e&&(this.micrio.webgl.gl.deleteTexture(e),delete this.textures[t],delete this.toDelete[t],delete this.loadStates[t],delete this.tileOpacity[t],delete this.tileLoaded[t])}cleanup(){const t=this.prevDrawn.filter((t=>this.drawn.indexOf(t)<0&&this.loadStates[t]>0&&this.baseTiles.indexOf(t)<0)),e=performance.now();for(let n=0;n<t.length;n++){const i=t[n];switch(this.tileOpacity[n]=0,this.loadStates[i]){case 1:const t=this.requests.get(i);t&&Zl(t),delete this.loadStates[i];break;case 2:this.requests.has(i)&&this.deleteRequest(i),delete this.loadStates[i],this.deleteTile(i);break;case 3:i in this.toDelete||(this.toDelete[i]=e)}}this.prevDrawn=this.drawn.slice(0);const i=ie.iOS?5:30;for(let n in this.toDelete)(e-this.toDelete[n])/1e3>i&&this.deleteTile(Number(n))}resize(t){this.e.resize(this.i,t.width,t.height,t.left,t.top,t.ratio,t.scale,t.portrait),this.ready&&(this.stop(),this.draw())}setActiveImage(t,e,i){this.e._setActiveImage(t,e,i??0)}setActiveLayer(t,e){this.e._setActiveLayer(t,e)}fadeImage(t,e,i=!1){this.cameras.has(t)?this.e._fadeTo(t,e,i):this.e._fadeImage(t,e,i),this.render()}setFocus(t,e,i=!1){this.e._setFocus(t,e[0],e[1],e[2],e[3],i)}};Jl._textureBuffer=Jl.getTextureBuffer(1,1);let Ql=Jl;const tc=new Float32Array([-1,-1,0,0,1,-1,1,0,-1,1,0,1,1,1,1,1]);class ec{constructor(t,e,i){if(this.gl=t,this.program=t.createProgram(),e.webgl.getShader(this.program,t.VERTEX_SHADER,"\nattribute vec2 a_position;\nattribute vec2 a_texCoord;\n\nvarying vec2 v_texCoord;\n\nvoid main() {\n\tv_texCoord = a_texCoord;\n\tgl_Position = vec4(a_position, 0.0, 1.0);\n}"),e.webgl.getShader(this.program,t.FRAGMENT_SHADER,i),t.linkProgram(this.program),t.useProgram(this.program),this.ppPositionLoc=t.getAttribLocation(this.program,"a_position"),this.ppTexCoordLoc=t.getAttribLocation(this.program,"a_texCoord"),this.ppTimeLoc=t.getUniformLocation(this.program,"u_time"),this.texture=t.createTexture(),t.bindTexture(t.TEXTURE_2D,this.texture),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,this.gl.drawingBufferWidth,this.gl.drawingBufferHeight,0,t.RGBA,t.UNSIGNED_BYTE,null),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),this.frameBuffer=t.createFramebuffer(),t.bindFramebuffer(t.FRAMEBUFFER,this.frameBuffer),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,this.texture,0),!this.frameBuffer||t.checkFramebufferStatus(t.FRAMEBUFFER)!==t.FRAMEBUFFER_COMPLETE)throw new Error("Framebuffer not complete");t.bindFramebuffer(t.FRAMEBUFFER,null),this.quad=t.createBuffer(),t.bindBuffer(t.ARRAY_BUFFER,this.quad),t.bufferData(t.ARRAY_BUFFER,tc,t.STATIC_DRAW)}render(){const t=this.gl;t.bindFramebuffer(t.FRAMEBUFFER,null),t.useProgram(this.program),t.bindBuffer(t.ARRAY_BUFFER,this.quad),t.enableVertexAttribArray(this.ppPositionLoc),t.vertexAttribPointer(this.ppPositionLoc,2,t.FLOAT,!1,4*Float32Array.BYTES_PER_ELEMENT,0),t.enableVertexAttribArray(this.ppTexCoordLoc),t.vertexAttribPointer(this.ppTexCoordLoc,2,t.FLOAT,!1,4*Float32Array.BYTES_PER_ELEMENT,2*Float32Array.BYTES_PER_ELEMENT),t.bindTexture(t.TEXTURE_2D,this.texture),t.uniform1f(this.ppTimeLoc,performance.now()/1e3),t.drawArrays(t.TRIANGLE_STRIP,0,4)}resize(){const t=this.gl;t.bindTexture(t.TEXTURE_2D,this.texture),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,this.gl.drawingBufferWidth,this.gl.drawingBufferHeight,0,t.RGBA,t.UNSIGNED_BYTE,null)}}const ic=/firefox/i.test(navigator.userAgent),nc=`\nprecision mediump float;\n\nvarying highp vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform float opacity;\nuniform int noTexture;\n\nvoid main() {\n\tif(noTexture==1) {\n\t\tgl_FragColor = vec4(.1,.1,.1,.1);\n\t} else {\n\t${ic?"\n\t\tvec4 textureColor = texture2D(uSampler, vTextureCoord);\n\t\tfloat newAlpha = min(1., textureColor.a * opacity);\n\t\tgl_FragColor = vec4(textureColor.rgb * newAlpha, newAlpha);":"\n\t\tgl_FragColor = texture2D(uSampler, vTextureCoord) * opacity;"}\n\t\t//gl_FragColor = vec4(1.,0.,0.,1.);\n\t}\n}`;class sc{constructor(t){this.micrio=t,this.display=self,this.txtAttr=-1,this.posAttr=-1,this.was360=!1}init(){var t;const e="WebGL2RenderingContext"in window,i=this.micrio.canvas.element.getContext(e?"webgl2":"webgl",{alpha:!0,preserveDrawingBuffer:this.micrio.hasAttribute("data-preserve-drawing-buffer"),stencil:!1,antialias:!1,depth:!1,desynchronized:!1,powerPreference:"high-performance"});if(e?!(i instanceof window.WebGL2RenderingContext):!(i instanceof window.WebGLRenderingContext))throw"Error creating WebGL context. Does your browser support WebGL?";this.gl=i;const n=null==(t=this.micrio.$current)?void 0:t.$settings.postProcessingFragmentShader;n&&(this.postpocessor=new ec(i,this.micrio,n),this.micrio.keepRendering=!0);const s=i.createProgram();if(!(s instanceof WebGLProgram))throw"Could not compile shaders";this.program=s,this.getShader(this.program,i.VERTEX_SHADER,"\nuniform mat4 GLMatrix;\n\nattribute vec3 pos;\nattribute vec2 aTextureCoord;\n\nvarying highp vec2 vTextureCoord;\n\nvoid main()\n{\n\tgl_Position = GLMatrix * vec4(pos, 1.0);\n\tvTextureCoord = aTextureCoord;\n}"),this.getShader(this.program,i.FRAGMENT_SHADER,nc),i.linkProgram(this.program),i.useProgram(this.program),i.blendFunc(i.ONE,i.ONE_MINUS_SRC_ALPHA),i.enable(i.BLEND),i.disable(i.DEPTH_TEST),this.gl.clearColor(0,0,0,0);const r=i.getUniformLocation(this.program,"opacity");if(!r)throw"Could not create opacity WebGL binding!";this.opaLoc=r,i.useProgram(this.program);const o=i.getUniformLocation(this.program,"GLMatrix");if(!o)throw"Could not create matrix WebGL binding!";this.pmLoc=o;const a=i.getUniformLocation(this.program,"noTexture");if(!a)throw"Could not bind noTexture uniform";this.noTxtLoc=a,this.txtAttr=i.getAttribLocation(this.program,"aTextureCoord");const l=i.createBuffer();if(!l)throw"Could not connect texture buffer";this.txtBuffer=l,i.bindBuffer(i.ARRAY_BUFFER,this.txtBuffer),i.bufferData(i.ARRAY_BUFFER,Ql._textureBuffer,i.STATIC_DRAW);const c=i.createBuffer();if(!c)throw"Could not bind geometry buffer";this.geomBuffer=c,this.posAttr=i.getAttribLocation(this.program,"pos"),this.linkBuffers(),i.viewport(0,0,this.gl.drawingBufferWidth,this.gl.drawingBufferHeight)}linkBuffers(){const t=this.gl;t.bindBuffer(t.ARRAY_BUFFER,this.geomBuffer),t.bufferData(t.ARRAY_BUFFER,this.micrio.wasm._vertexBuffer,t.STATIC_DRAW),t.enableVertexAttribArray(this.txtAttr),t.bindBuffer(t.ARRAY_BUFFER,this.txtBuffer),t.vertexAttribPointer(this.txtAttr,2,t.FLOAT,!1,0,0),t.enableVertexAttribArray(this.posAttr),t.bindBuffer(t.ARRAY_BUFFER,this.geomBuffer),t.vertexAttribPointer(this.posAttr,3,t.FLOAT,!1,0,0)}dispose(t=!1){const e=this.gl;if(e.bindBuffer(e.ARRAY_BUFFER,null),e.bindTexture(e.TEXTURE_2D,null),e.deleteBuffer(this.txtBuffer),e.deleteBuffer(this.geomBuffer),t){const t=e.getExtension("WEBGL_lose_context");t instanceof Object&&t.loseContext instanceof Function&&t.loseContext()}}getShader(t,e,i){const n=this.gl.createShader(e);if(!n)throw"Could not create shader!";if(this.gl.shaderSource(n,i),this.gl.compileShader(n),!this.gl.getShaderParameter(n,this.gl.COMPILE_STATUS))return console.error("Error compiling shader",this.gl.getShaderInfoLog(n)),void this.gl.deleteProgram(t);this.gl.attachShader(t,n),this.gl.deleteShader(n)}getTexture(t,e){const i=this.gl,n=i.createTexture();if(!n)throw"Could not create texture!";return i.bindTexture(i.TEXTURE_2D,n),t&&i.texImage2D(i.TEXTURE_2D,0,i.RGBA,i.RGBA,i.UNSIGNED_BYTE,t),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,i.LINEAR),e&&i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,i.NEAREST),n}updateTexture(t,e){const i=this.gl;i.bindTexture(i.TEXTURE_2D,t),i.texImage2D(i.TEXTURE_2D,0,i.RGBA,i.RGBA,i.UNSIGNED_BYTE,e)}drawStart(){const t=this.gl;this.postpocessor&&t.bindFramebuffer(t.FRAMEBUFFER,this.postpocessor.frameBuffer),this.gl.clear(this.gl.COLOR_BUFFER_BIT)}drawEnd(){this.postpocessor&&(this.postpocessor.render(),this.gl.useProgram(this.program),this.linkBuffers())}drawTile(t,e=1,i=!1){this.gl.uniform1i(this.noTxtLoc,t?0:1),this.gl.uniform1f(this.opaLoc,e),t&&this.gl.bindTexture(this.gl.TEXTURE_2D,t);const n=i?6*Ql.segsX*Ql.segsY:6;i!=this.was360&&(this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.txtBuffer),this.gl.bufferData(this.gl.ARRAY_BUFFER,i?Ql._textureBuffer360:Ql._textureBuffer,this.gl.STATIC_DRAW),this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.geomBuffer),this.was360=i),this.gl.bufferData(this.gl.ARRAY_BUFFER,i?this.micrio.wasm._vertexBuffer360:this.micrio.wasm._vertexBuffer,this.gl.STATIC_DRAW),this.gl.drawArrays(this.gl.TRIANGLES,0,n)}}const rc={passive:!0},oc={passive:!0,capture:!0},ac={passive:!1};function lc(t){t.stopPropagation(),t.preventDefault()}const cc=["move","marker-open","marker-opened","marker-closed","tour-start","tour-step","tour-stop","tour-event","media-play","media-pause","splitscreen-start","splitscreen-stop"];class dc{constructor(t){this.micrio=t,this.enabled=Ht(!1),this.hooked=!1,this.hookedDrag=!1,this.panning=!1,this.pinching=!1,this.clicked=!1,this.wheeling=!1,this.controlZoom=!1,this.twoFingerPan=!1,this.pScale=1,this.wheelEndTo=-1,this.hasTouch=ie.hasTouch&&"ontouchstart"in self,this.hasUsedCtrl=!1,this.vars={drag:{prev:void 0,start:[0,0,0]},dbltap:{lastTapped:0},pinch:{image:void 0,sDst:0,wasPanning:!1},updates:{to:-1,stack:[]}},this.scrollHooked=!1,this.el=t.canvas.element,this.dStart=this.dStart.bind(this),this.dMove=this.dMove.bind(this),this.dStop=this.dStop.bind(this),this.pStart=this.pStart.bind(this),this.pMove=this.pMove.bind(this),this.pStop=this.pStop.bind(this),this.gesture=this.gesture.bind(this),this.keydown=this.keydown.bind(this),this.wheel=this.wheel.bind(this),this.wheelEnd=this.wheelEnd.bind(this),this.dbltap=this.dbltap.bind(this),this.dblclick=this.dblclick.bind(this),this.updateEvent=this.updateEvent.bind(this),this.dispatchUpdate=this.dispatchUpdate.bind(this),this.enabled.subscribe((t=>{t?this.hook():this.unhook()})),t.visible.subscribe((t=>this.visible=t)),t.current.subscribe((t=>{t&&!this.settings&&le(t.info).then((e=>{e&&(this.settings=t.$settings,!t.error&&this.settings.hookEvents&&this.enabled.set(!0))}))}))}get $enabled(){return u(this.enabled)}get isNavigating(){return this.panning||this.pinching||this.wheeling||this.clicked}dispatch(t,e){this.micrio.dispatchEvent(new CustomEvent(t,void 0!==e?{detail:e}:void 0))}getImage(t){var e;if(!this.visible)return;const i=this.micrio.offsetWidth,n=this.micrio.offsetHeight,s=Math.max(0,Math.min(1,t.x/i)),r=Math.max(0,Math.min(1,t.y/n)),o=null==(e=this.visible)?void 0:e.find((t=>!!t.opts.secondaryTo)),a=1==this.visible.length?this.visible[0]:this.visible.find((({grid:t,opts:{area:e}})=>(!o||!t)&&(!!e&&(s>=e[0]&&s<=e[2]&&r>=e[1]&&r<=e[3]))));return a&&a.opts.secondaryTo&&a.opts.isPassive&&a.opts.area&&(t.x-=a.opts.area[0]*i,t.y-=a.opts.area[1]*n),!a||a.grid||a.opts.secondaryTo&&a.opts.isPassive?this.micrio.$current:a}hook(){if(this.hooked)return;this.hooked=!0;const t=this.settings;t&&(this.twoFingerPan=!!t.twoFingerPan,this.twoFingerPan?this.micrio.setAttribute("data-can-pan",""):this.micrio.removeAttribute("data-can-pan"),(null==t?void 0:t.hookKeys)&&this.hookKeys(),t.hookDrag&&this.hookDrag(),t.noZoom||this.hookZoom(),this.hookUpdate())}unhook(){this.hooked&&(this.hooked=!1,this.unhookDrag(),this.unhookZoom(),this.unhookKeys(),this.unhookUpdate())}hookKeys(){document.addEventListener("keydown",this.keydown)}unhookKeys(){document.removeEventListener("keydown",this.keydown)}hookZoom(){const t=this.settings;this.controlZoom=!!(null==t?void 0:t.controlZoom),t&&!t.hookPinch||this.hookPinch(),(!t||t.hookScroll||this.controlZoom)&&this.hookScroll(),this.micrio.canvas.$isMobile?this.el.addEventListener("touchstart",this.dbltap):this.el.addEventListener("dblclick",this.dblclick)}unhookZoom(){this.unhookPinch(),this.unhookScroll(),this.micrio.canvas.$isMobile?this.el.removeEventListener("touchstart",this.dbltap):this.el.removeEventListener("dblclick",this.dblclick)}hookScroll(){this.scrollHooked||(this.micrio.addEventListener("wheel",this.wheel,ac),this.scrollHooked=!0)}unhookScroll(){this.micrio.removeEventListener("wheel",this.wheel,ac),this.scrollHooked=!1}hookPinch(){this.hasTouch&&this.el.addEventListener("touchstart",this.pStart,rc),ie.OSX&&(this.micrio.addEventListener("gesturestart",this.gesture,ac),this.micrio.addEventListener("gesturechange",this.gesture,ac),this.micrio.addEventListener("gestureend",this.gesture,ac))}unhookPinch(){this.el.removeEventListener("touchstart",this.pStart,rc),ie.OSX&&(this.micrio.removeEventListener("gesturestart",this.gesture,ac),this.micrio.removeEventListener("gesturechange",this.gesture,ac),this.micrio.removeEventListener("gestureend",this.gesture,ac))}hookDrag(){this.hookedDrag||(this.hookedDrag=!0,this.micrio.addEventListener("dragstart",lc),this.micrio.addEventListener("pointerdown",this.dStart,rc),this.micrio.setAttribute("data-hooked",""))}unhookDrag(){this.hookedDrag&&(this.hookedDrag=!1,this.micrio.removeEventListener("pointerdown",this.dStart,rc),this.micrio.removeEventListener("dragstart",lc),this.micrio.removeAttribute("data-hooked"))}dStart(t,e=!1){var i;if(0!=t.button||"touch"==t.pointerType&&this.twoFingerPan)return;if(!e&&t.target!=this.el)return;if((null==(i=this.micrio.$current)?void 0:i.isOmni)&&t.shiftKey)return;if(this.panning)return void(t instanceof TouchEvent&&t.touches.length>1&&this.dStop());const n=this.getImage({x:t.clientX,y:t.clientY});n&&(this.panning=!0,this.vars.drag.start=[t.clientX,t.clientY,performance.now()],this.micrio.addEventListener("pointermove",this.dMove,rc),this.micrio.addEventListener("pointerup",this.dStop,rc),this.micrio.setAttribute("data-panning",""),this.micrio.wasm.e._panStart(n.ptr),this.micrio.wasm.render(),this.dispatch("panstart"))}dMove(t){var e;const i=t.clientX,n=t.clientY,s=Zt(this.vars.drag.start[0]-t.clientX,this.vars.drag.start[1]-t.clientY);!this.capturedPointerId&&s>10&&this.micrio.setPointerCapture(this.capturedPointerId=t.pointerId),this.vars.drag.prev&&(null==(e=this.getImage({x:i,y:n}))||e.camera.pan(this.vars.drag.prev[0]-i,this.vars.drag.prev[1]-n)),this.vars.drag.prev=[i,n]}dStop(t,e=!1,i=!1){if(this.panning){if(this.panning=!1,this.vars.drag.prev=void 0,this.micrio.removeEventListener("pointermove",this.dMove,rc),this.micrio.removeEventListener("pointerup",this.dStop,rc),this.capturedPointerId&&this.micrio.releasePointerCapture(this.capturedPointerId),this.capturedPointerId=void 0,this.micrio.removeAttribute("data-panning"),t&&0==e){const e=this.getImage({x:t.clientX,y:t.clientY});e&&(this.micrio.wasm.e._panStop(e.ptr),this.micrio.wasm.render())}i||this.dispatch("panend",t?{duration:performance.now()-this.vars.drag.start[2],movedX:t.clientX-this.vars.drag.start[0],movedY:t.clientY-this.vars.drag.start[1]}:void 0)}}pStart(t){if(!(ie.hasTouch&&t instanceof TouchEvent))return;if(this.twoFingerPan&&t.touches.length<2)return;if(this.pinching||2!=t.touches.length)return void this.pStop(t);t.stopPropagation(),this.vars.pinch.wasPanning=this.panning,this.dStop(void 0,!1,!0);const e=t.touches;this.pinching=!0,self.addEventListener("touchmove",this.pMove,oc),self.addEventListener("touchend",this.pStop,oc),this.micrio.setAttribute("data-pinching",""),this.vars.pinch.image=this.getImage({x:e[0].clientX,y:e[0].clientY}),this.vars.pinch.sDst=Zt(e[0].clientX-e[1].clientX,e[0].clientY-e[1].clientY),this.pinchFactor=void 0,this.vars.pinch.image&&this.micrio.wasm.e._pinchStart(this.vars.pinch.image.ptr),this.micrio.wasm.render(),this.dispatch("pinchstart"),this.twoFingerPan&&this.dispatch("panstart")}pMove(t){if(!(ie.hasTouch&&t instanceof TouchEvent))return;const e=t.touches;if((null==e?void 0:e.length)<2)return;const i={x:e[0].clientX,y:e[0].clientY},n={x:e[1].clientX,y:e[1].clientY},s=this.vars.pinch,r=s.image;if(r){if((null==r?void 0:r.opts.secondaryTo)&&r.opts.isPassive&&r.opts.area){const t=r.opts.area[0]*this.micrio.offsetWidth,e=r.opts.area[1]*this.micrio.offsetHeight;i.x-=t,n.x-=t,i.y-=e,n.y-=e}this.pinchFactor=Zt(e[0].clientX-e[1].clientX,e[0].clientY-e[1].clientY)/s.sDst,this.micrio.wasm.e._pinch(r.ptr,i.x,i.y,n.x,n.y)}}pStop(t){this.pinching&&this.vars.pinch.image&&(this.pinching=!1,t.stopPropagation(),self.removeEventListener("touchmove",this.pMove,oc),self.removeEventListener("touchend",this.pStop,oc),this.micrio.removeAttribute("data-pinching"),this.micrio.wasm.e._pinchStop(this.vars.pinch.image.ptr,performance.now()),this.micrio.wasm.render(),this.vars.pinch.image=void 0,this.pinchFactor=void 0,this.dispatch("pinchend"),(this.twoFingerPan||this.vars.pinch.wasPanning)&&this.dispatch("panend"))}gesture(t){var e;const i=t.scale;if(1==i)return;const n=this.pScale-i;if(this.pScale=i,t.stopPropagation(),t.preventDefault(),"gesturechange"==t.type){const i=t;null==(e=this.getImage({x:i.clientX,y:i.clientY}))||e.camera.zoom(n*this.micrio.canvas.viewport.height,0,i.clientX,i.clientY)}}wheel(t,e=!1,i=0){var n;if(!(t instanceof WheelEvent))return;if(this.controlZoom&&!t.ctrlKey)return;if(!e&&t.target instanceof Element&&t.target!=this.el&&!t.target.classList.contains("marker")&&!t.target.hasAttribute("data-scroll-through"))return;let s=t.deltaY;t.ctrlKey&&(this.hasUsedCtrl=!0);const r=this.controlZoom&&10*s%1==0,o=this.hasUsedCtrl&&!r,a=ie.firefox||t.ctrlKey||!o;if(this.twoFingerPan&&(null==(n=this.micrio.$current)?void 0:n.camera.isZoomedOut()))return;t.stopPropagation(),t.preventDefault(),(ie.OSX||o)&&t.ctrlKey&&(s*=10);const l={x:t.clientX,y:t.clientY},c=this.getImage(l);if(c){if(a){const t=this.micrio.canvas.viewport;let e=0;const n=this.micrio.getBoundingClientRect();c.camera.zoom(1*s/Math.sqrt(t.scale),0,l.x-i-n.left,l.y-n.top-e)}else c.camera.pan(t.deltaX,t.deltaY);this.wheeling=!0,clearTimeout(this.wheelEndTo),this.wheelEndTo=setTimeout(this.wheelEnd,50)}}wheelEnd(){this.wheeling=!1}dbltap(t){ie.hasTouch&&t instanceof TouchEvent&&(1==t.touches.length&&Date.now()-this.vars.dbltap.lastTapped<250&&(t.stopPropagation(),t.preventDefault(),this.dblclick(t)),this.vars.dbltap.lastTapped=Date.now())}dblclick(t){var e,i;const n=t instanceof MouseEvent?t:t.touches[0];null==(i=this.getImage({x:n.clientX,y:n.clientY}))||i.camera.zoom(-300,500,n.clientX,n.clientY,1,!(null==(e=this.micrio.$current)?void 0:e.album)).catch((()=>{}))}keydown(t){var e;if(this.panning||this.pinching)return;const i=this.micrio.offsetWidth/2,n=this.micrio.offsetHeight/2;let s=0,r=0,o=!1;const a=null==(e=this.micrio.$current)?void 0:e.camera;if(a){switch(t.keyCode){case 37:s=-i,o=!0;break;case 39:s=i,o=!0;break;case 38:r=-n,o=!0;break;case 40:r=n,o=!0;break;case 32:a.zoom(t.shiftKey?200:-200,150);break;case 187:case 61:t.shiftKey&&a.zoom(-200,150);break;case 189:case 173:a.zoom(200,150);break;default:return}o&&a.pan(s,r,150)}}hookUpdate(){cc.forEach((t=>this.micrio.addEventListener(t,this.updateEvent)))}unhookUpdate(){cc.forEach((t=>this.micrio.removeEventListener(t,this.updateEvent)))}updateEvent(t){if("move"==t.type&&!this.isNavigating)return;const e=this.vars.updates.stack;e[e.length-1]!=t.type&&e.push(t.type),this.vars.updates.to<0&&(this.vars.updates.to=setTimeout(this.dispatchUpdate))}dispatchUpdate(){const t=this.vars.updates;clearTimeout(t.to),t.to=-1,t.stack.length&&(this.dispatch("update",t.stack),t.stack.length=0,t.to=setTimeout(this.dispatchUpdate,500))}}const uc=class t{constructor(t){this.micrio=t,this.isStatic=!1,this.loaded=!1,this.inited=!1,this.setting=!1,this.writeTitle=!1}hook(){this.isStatic="static"==this.micrio.getAttribute("data-router"),this.read=this.read.bind(this),this.write=this.write.bind(this),this.writeDeferred=this.writeDeferred.bind(this),le(this.micrio.current).then((()=>{this.loaded=!0,this.read()})),t.events.forEach((t=>this.micrio.addEventListener(t,this.write))),"i.micr.io"==location.hostname&&(this.writeTitle=!0),window.addEventListener(this.isStatic?"popstate":"hashchange",this.read)}unhook(){t.events.forEach((t=>this.micrio.removeEventListener(t,this.write))),window.removeEventListener(this.isStatic?"popstate":"hashchange",this.read)}findPage(t,e,i){var n,s;if(e)for(let r=0;r<e.length;r++){const o=(null==(s=null==(n=e[r])?void 0:n.i18n)?void 0:s[i])??e[r];let a=se(o.title)==t?e[r]:this.findPage(t,e[r].children,i);if(a)return a}}read(){if(!this.loaded||this.setting)return;this.route=(this.isStatic?location.pathname:location.hash).slice(1);const[t,e,i,n,s]=this.route.split("/"),r=this.micrio.$current,o=t&&(null==r?void 0:r.id)!=t?this.micrio.open(t):void 0;r&&Promise.all([le(r.data,{allowUndefined:!0}),o?le(o.data,{allowUndefined:!0}):void 0]).then((t=>{var i,a;if(!t[0])return this.inited=!0;if(void 0===this.prevLang&&(this.prevLang=this.micrio.lang),!1===(null==o?void 0:o.$settings.routerMarkerTours))return;if((null==(i=t[0].pages)?void 0:i.length)&&n){const i=this.findPage(n.toLowerCase(),t[0].pages,e);if(i)return this.micrio.state.popover.set({contentPage:i})}const l=n?s?t.map((t=>{var i;return null==(i=null==t?void 0:t.markerTours)?void 0:i.find((t=>{var i,s;return se(null==(s=null==(i=t.i18n)?void 0:i[e])?void 0:s.slug)==n}))}))[0]:t.map((t=>{var i;return null==(i=null==t?void 0:t.tours)?void 0:i.find((t=>{var i,s;return se(null==(s=null==(i=t.i18n)?void 0:i[e])?void 0:s.slug)==n}))}))[0]:void 0,c=s||!l&&n,d=c?null==(a=(t[1]??t[0]).markers)?void 0:a.find((t=>{var i,n,s;return((null==(n=null==(i=t.i18n)?void 0:i[e])?void 0:n.slug)??t.title)==c||l&&"steps"in l&&(null==(s=l.stepInfo)?void 0:s.map((t=>t.marker)).find((t=>{var i,n;return(null==(n=null==(i=t.i18n)?void 0:i[e])?void 0:n.slug)==c})))})):void 0;d&&l&&"steps"in l?l.initialStep=l.steps.findIndex((t=>t.startsWith(d.id))):(d||this.micrio.state.popup.set(void 0),(o??r).state.marker.set(d)),this.micrio.state.tour.set(l),this.writeTitle&&this.setTitle(),this.inited=!0}))}setTitle(){var t,e,i,n,s,r,o,a,l,c;const d=u(this.micrio._lang),h=this.micrio.$current;if(!h)return;const m=[(null==(i=null==(e=null==(t=h.$data)?void 0:t.i18n)?void 0:e[d])?void 0:i.title)??(null==(n=null==h?void 0:h.$info)?void 0:n.title),null==(o=null==(r=null==(s=this.micrio.state.$tour)?void 0:s.i18n)?void 0:r[d])?void 0:o.title,null==(c=null==(l=null==(a=this.micrio.state.$marker)?void 0:a.i18n)?void 0:l[d])?void 0:c.title].filter((t=>!!t)).reverse();document.title=m.join(" - ")+" | Micrio"}write(t){if(this.micrio.$current&&this.loaded&&this.inited){if("marker-open"===t.type){const t=this.micrio.state.$marker;if(t&&t.data&&t.data.micrioLink)return}clearTimeout(this._to),this._to=setTimeout((()=>this.writeDeferred("load"==t.type)),50)}}writeDeferred(t){var e,i,n,s,r,o,a,l,c;const d=this.micrio.state.$tour;let h=this.micrio.$current,m=null==h?void 0:h.state.$marker;const p=this.micrio.lang;p!=this.prevLang&&(t=!0,this.prevLang=p);const f=(null==(n=null==(i=null==(e=null==h?void 0:h.$data)?void 0:e.i18n)?void 0:i[p])?void 0:n.title)??(null==(s=null==h?void 0:h.$info)?void 0:s.title)??"",g=!1===(null==h?void 0:h.$settings.routerMarkerTours),v=m&&"string"!=typeof m?(null==(r=m.i18n)?void 0:r[p])??m:void 0,$=null==(o=u(this.micrio.state.popover))?void 0:o.contentPage,w=$?(null==(a=$.i18n)?void 0:a[p])??$:void 0;let y=null==h?void 0:h.id;if(d&&"steps"in d&&d.steps.length&&d.stepInfo){const t=d.stepInfo.find((t=>t.markerId==d.steps.find((t=>!t.includes(",")))));t&&(y=t.micrioId,h=this.micrio.wasm.images.find((t=>t.id==y)),!m&&d.initialStep&&(m=d.stepInfo[d.initialStep].marker))}const b=[y,p,se(f)??"",...g?[]:w?[se(w.title)]:[(null==(c=null==(l=null==d?void 0:d.i18n)?void 0:l[p])?void 0:c.slug)??null,(null==v?void 0:v.slug)??null]].filter((t=>!!t)).join("/");b!=this.route&&(this.setting=!0,this.isStatic?t?history.replaceState(null,"","/"+b+location.search):history.pushState(null,"","/"+b+location.search):location.hash=b,this.route=b,this.writeTitle&&this.setTitle(),setTimeout((()=>this.setting=!1),250))}};uc.events=["load","tour-start","tour-stop","marker-open","marker-closed","page-open","page-closed","lang-switch"];let hc=uc;const mc=class t{constructor(t){this.micrio=t,this.gtag=window.gtag,this.hooked=!1,this.tag=this.tag.bind(this)}hook(){!this.hooked&&this.gtag&&(this.hooked=!0,this.tag(new CustomEvent("init")),t.events.forEach((t=>this.micrio.addEventListener(t,this.tag))))}unhook(){this.hooked&&(this.hooked=!1,this.tag(new CustomEvent("hide")),t.events.forEach((t=>this.micrio.removeEventListener(t,this.tag))))}tag(t){const e=t.detail,i=this.micrio.$current,n={event_category:"Micrio",event_action:t.type};this.micrio.lang&&(n.culture=this.micrio.lang),"init"==t.type&&(n.micrio_version=Number(Ia)),"load"==t.type&&(null==i?void 0:i.$info)&&(n.image_version=i.$info.version);const s=null!==e&&"object"==typeof e&&"currentStep"in e?e.currentStep:null;null!=s&&(n.event_value=s);const r=e&&e.title?e.title:i&&i.$info&&i.$info.title;n.event_label=this.micrio.id+(r?" - "+r:""),this.gtag("event",t.type,n)}};mc.events=["load","show","hide","marker-open","marker-opened","marker-closed","tour-start","tour-stop","tour-step","tour-ended"];let pc=mc;const fc=t=>Math.round(1e5*t)/1e5,gc=class t{constructor(e,i){var n;this.micrio=e,this.image=i,this.images=[],this.current=[],this._grid=document.createElement("div"),this._buttons=new Map,this.clickable=!1,this.focussed=Ht(),this.markersShown=Ht([]),this.history=[],this.depth=Ht(0),this.aniDurationIn=1.5,this.aniDurationOut=.5,this.transitionDelay=.5,this.isHorizontal=!1,this.cellSizes=new Map,this.nextSize=new Map,this.timingFunction="ease",this.getString=(e,i={})=>{var n;return t.getString(e,{view:i.view,area:i.area,size:i.size??this.nextSize.get(e.id),cultures:null==(n="cultures"in e&&e.cultures?e.cultures:"")?void 0:n.replace(/,/g,"-")})},this.tourEvent=this.tourEvent.bind(this),this.updateGrid=this.updateGrid.bind(this);const s=i.$settings;this.clickable=!!s.gridClickable,void 0!==s.gridTransitionDuration&&(this.aniDurationIn=this.aniDurationOut=s.gridTransitionDuration),void 0!==s.gridTransitionDurationOut&&(this.aniDurationOut=s.gridTransitionDurationOut),this._grid.className="micrio-grid",this.set(null==(n=i.$info)?void 0:n.grid);const r=()=>vt().then((()=>{this.hook(),e.events.dispatch("grid-load")}));i.isV5||e._lang.subscribe((t=>{t?Promise.all(this.images.filter((e=>{var i;return(e.$info&&"cultures"in e.$info&&(null==(i=e.$info)?void 0:i.cultures)||"").indexOf(t)>=0})).map((t=>le(t.data)))).then(r):r()})),e.events.dispatch("grid-init",this)}get $focussed(){return u(this.focussed)}hook(){if(this.micrio.state.marker.subscribe((t=>{var e,i;if(t&&"string"!=typeof t){const n=null==(e=t.data)?void 0:e._meta;if(null==n?void 0:n.gridSize){const e="number"==typeof n.gridSize?[n.gridSize,n.gridSize]:n.gridSize.split(",").map(Number),s=null==(i=this.images.find((e=>{var i,n;return null==(n=null==(i=e.$data)?void 0:i.markers)?void 0:n.find((e=>e==t))})))?void 0:i.id;s&&this.nextSize.set(s,e)}vt().then((()=>{var t;const e=null==(t=null==n?void 0:n.gridAction)?void 0:t.split("|");(null==e?void 0:e.length)&&"string"==typeof e[0]&&this.action(e.shift(),e.join("|"))}))}})),this.clickable){this._grid.addEventListener("click",(t=>{const e=t.target.dataset.id;e&&this.focus(this.images.find((t=>t.id==e)))}));const t=t=>{t?this.removeGrid():this.placeGrid()};this.micrio.state.tour.subscribe(t),this.micrio.state.marker.subscribe(t),this.focussed.subscribe(t)}this.micrio.addEventListener("tour-event",this.tourEvent),this.micrio.addEventListener("serialtour-pause",(()=>this.images.forEach((t=>t.camera.pause())))),this.micrio.addEventListener("serialtour-play",(()=>this.images.forEach((t=>t.camera.resume()))))}clearTimeouts(){clearTimeout(this._to),clearTimeout(this._fadeTo)}set(t="",e={}){return this.lastPromise=new Promise(((i,n)=>{var s,r,o;null==(r=null==(s=this.image.$info)?void 0:s.settings)||delete r.focus,this.lastAction=void 0,!1===e.cover&&e.coverLimit&&(e.coverLimit=!1),e.coverLimit&&null==e.cover&&(e.cover=e.coverLimit),"string"!=typeof t&&(t=t.map((t=>t instanceof ja?{image:t}:t)).filter((t=>!!t.image.$info)).map((t=>this.getString(t.image.$info,t))).join(";"));const a=t.split(";").filter((t=>!!t)).map((t=>this.getImage(t))),l=this.$focussed,c=null==(o=e.transition)?void 0:o.endsWith("-delayed"),d="behind-delayed"==e.transition;switch(e.transition){case"crossfade":e.duration=0;break;case"behind":case"behind-delayed":const t=!0===e.coverLimit;e.forceAni=!0,e.coverLimit=t,e.forceAreaAni=!0;const i=c?1/a.length:1;let n=0;this.images.forEach((e=>{e.camera.setCoverLimit(t),a.find((t=>t.id==e.id))&&(e.camera.setArea([0,0,(null==l?void 0:l.id)==e.id?1:i,1],{noDispatch:!0,direct:!0}),e!=l&&e.camera.setView([0,0,1,1]),c&&this.micrio.wasm.e._setZIndex(e.ptr,a.length-n++))})),a.forEach((t=>t.view=[0,0,1,1]))}const u=this.image.ptr>=0,h=e.duration??(e.noHistory?this.aniDurationOut:this.aniDurationIn),m=this.nextCrossFadeDuration??this.image.$settings.crossfadeDuration??1,p=(h||this.aniDurationIn)/(d?2:1);if(this.nextCrossFadeDuration=void 0,u){const t=this.micrio.wasm.getPtr();this.micrio.wasm.e.setGridTransitionDuration(t,h),this.micrio.wasm.e.setCrossfadeDuration(t,p)}const f=!e.noBlur&&l;let g,v;f&&this.blur(),!e.noHistory&&this.current.length&&this.depth.set(this.history.push({layout:this.current.map((t=>this.getString(t.$info,{view:t.state.$view,size:this.cellSizes.get(t.id)}))).join(";"),horizontal:this.isHorizontal,view:this.image.camera.getView()})),this.isHorizontal=!!e.horizontal,this.removeImages(this.images.filter((t=>!a.find((e=>e.id==t.id))))),this.printGrid(a,{horizontal:e.horizontal,keepGrid:e.keepGrid,scale:e.scale,columns:e.columns}),this.clearTimeouts();let $=!1;const w=()=>{clearTimeout(g),clearTimeout(v),$||n()};u&&!e.noCamAni&&(e.view?this.image.camera.flyToView(e.view,{duration:1e3*h}).catch(w):this.image.camera.flyToFullView({duration:1e3*h}).catch(w)),this.nextSize.clear(),null==e.coverLimit&&(e.coverLimit=!0),e.coverLimit||a.forEach((t=>{var i;return null==(i=this.images.find((e=>e.id==t.id)))?void 0:i.camera.setCoverLimit(!!e.coverLimit)}));const y="appear-delayed"==e.transition,b=t=>t*this.transitionDelay+(t>0&&y?h:0);this.current=a.map(((t,i)=>this.placeImage(t,{duration:!e.forceAni&&f&&t.id!=l.id?0:h,delay:c?b(i):0,noCamAni:!!(y&&i>0)||!!e.noCamAni,forceAreaAni:!(y&&i>0)&&e.forceAreaAni,cover:e.cover}))),y&&this.current.slice(1).forEach((t=>this.micrio.wasm.e._fadeTo(t.ptr,.9999,!0)));const k=()=>this.current.forEach(((t,e)=>te(c?1e3*(b(e)+(d?h/2:0)):0).then((()=>this.micrio.wasm.e._fadeIn(t.ptr))))),T=()=>{this.clearTimeouts(),requestAnimationFrame((()=>this.micrio.wasm.e.setCrossfadeDuration(this.micrio.wasm.getPtr(),m))),c&&this.images.forEach((t=>this.micrio.wasm.e._setZIndex(t.ptr,0))),e.coverLimit&&a.forEach((t=>{var i;return null==(i=this.images.find((e=>e.id==t.id)))?void 0:i.camera.setCoverLimit(!!e.coverLimit)})),this.clickable&&this.placeGrid(),this.lastAction=void 0,$=!0,i(this.current)};h||p?(e.noFade||(this._fadeTo=v=setTimeout(k,Math.max(0,h/2))),this._to=g=setTimeout(T,1e3*(Math.max(p,h)+(c?(a.length-1)*this.transitionDelay:0)))):(e.noFade||k(),T())}))}hasChanged(){return this.current.map((t=>t.id)).join(",")!=this.images.map((t=>t.id)).join(",")}getImage(t){var e,i;const n=t.split("|"),s=n[0].split(","),r=n[1]?n[1].split(",").map(Number):[1];let o=0,a=0;return{path:null==(e=this.image.$info)?void 0:e.path,id:s[0],width:o=Number(s[1])||o,height:a=Number(s[2])||a,isDeepZoom:"d"==s[3],isPng:"p"==s[4],isWebP:"w"==s[4],size:r,view:s[5]?s[5].split("/").map(Number):void 0,area:s[6]?s[6].split("/").map(Number):void 0,settings:ne(this.image.$settings||{},{focus:s[7]?s[7].split("-").map(Number):null}),cultures:(null==(i=s[8])?void 0:i.replace(/\-/g,","))||void 0}}getCols(t,e){let i=Math.ceil(e/Math.ceil(Math.sqrt(e)));if(t==e){const e=Math.floor(Math.sqrt(t)),n=[];for(let s=e;s<i+e;s++)t%s||n.push(s);n.length&&(i=n[Math.floor(n.length/2)])}return i}printGrid(t,e){var i;e.keepGrid||this.removeGrid();const n=t.reduce(((t,e)=>t+e.size.reduce(((t,e)=>e*t),1)),0),s=e.columns??(e.horizontal?t.length:this.getCols(t.length,n));this._grid.style.gridTemplateColumns=`repeat(${s}, auto)`,this._grid.textContent="",this._grid.style.removeProperty("--translate"),this._grid.style.removeProperty("--scale"),t.forEach((t=>{if(!t.id)return;this._buttons.has(t.id)||this._buttons.set(t.id,document.createElement("button"));const e=this._buttons.get(t.id);"1"!=t.size.toString()?(e.style.gridArea=`auto / auto / span ${t.size[1]} / span ${t.size[0]||t.size[1]}`,this.cellSizes.set(t.id,t.size)):(e.style.removeProperty("grid-area"),this.cellSizes.delete(t.id)),e.dataset.id=t.id,this._grid.appendChild(e)})),e.keepGrid&&this._grid.parentNode||this.micrio.insertBefore(this._grid,(null==(i=this.micrio.firstChild)?void 0:i.nextSibling)??null),this.micrio.events.dispatch("grid-layout-set",this);const r=this.micrio.offsetWidth,o=this.micrio.offsetHeight,a=Math.max(0,Math.min(1,1-(e.scale??1)));this._grid.style.transform="",this._grid.childNodes.forEach((e=>{if(!e)return;const i=e,n=i.dataset.id,s=i.getBoundingClientRect(),l=t.find((t=>t.id==n)),c=[a/2*s.width,a/2*s.height];l&&!l.area&&(l.area=[(s.x+c[0])/r,(s.y+c[1])/o,(s.x+s.width-c[0])/r,(s.y+s.height-c[1])/o])})),e.keepGrid||this._grid.remove()}placeGrid(){var t;!this.clickable||this.micrio.state.$tour||this.micrio.state.$marker||this._grid.parentNode||(this.micrio.insertBefore(this._grid,(null==(t=this.micrio.firstChild)?void 0:t.nextSibling)??null),this.viewUnsub=this.image.state.view.subscribe(this.updateGrid))}removeGrid(){this._grid.parentNode&&(this.viewUnsub&&this.viewUnsub(),this._grid.remove())}updateGrid(){const t=this.image.camera.getXY(0,0,!0);this._grid.style.setProperty("--translate",`translate3d(${t[0]}px, ${t[1]}px, 0)`),this._grid.style.setProperty("--scale",this.image.camera.getScale().toString()),this._grid.dispatchEvent(new CustomEvent("update"))}placeImage(t,e){let i=this.images.find((e=>e.id==t.id));i&&t.area?te(1e3*e.delay).then((()=>{i.camera.setArea(t.area,{direct:0==e.duration||!e.forceAreaAni&&!u(i.visible)}),e.delay&&this.micrio.wasm.render()})):(t.lang=this.micrio.lang,this.micrio.wasm.addChild(i=new ja(this.micrio.wasm,t,{area:t.area}),this.image),this.images.push(i));const n={duration:1e3*e.duration,timingFunction:this.timingFunction,limit:!1};if(!e.noCamAni&&!i.camera.aniDone&&i.ptr>0){const s=!!e.cover||i.camera.getCoverLimit();if(t.view||!s)i.camera.flyToView(t.view??[0,0,1,1],n).catch((()=>{}));else if(t.area&&t.width&&t.height){const e=(t.area[2]-t.area[0])*this.micrio.offsetWidth/((t.area[3]-t.area[1])*this.micrio.offsetHeight);i.camera.flyToView(e<t.width/t.height?[.5,0,.5,1]:[0,.5,1,.5],n).catch((()=>{}))}else i.camera.flyToCoverView(n).catch((()=>{}))}return i}removeImages(t){t.forEach((t=>{t.ptr>=0&&this.micrio.wasm.e._fadeOut(t.ptr)})),this.micrio.wasm.render()}insideGrid(){const t=this.micrio.$current;return t==this.image||!!this.images.find((e=>e==t))}async reset(t,e,i){var n,s;const r=this.history[0];return this.images.forEach((t=>t.camera.stop())),this.image.camera.stop(),this.markersShown.set([]),await vt(),i||e||!(null==(n=this.micrio.camera)?void 0:n.isZoomedOut())||this.micrio.state.$tour||this.$focussed||this.hasChanged()||(t=0),this.set((null==r?void 0:r.layout)||(null==(s=this.image.$info)?void 0:s.grid),{noHistory:!0,duration:t,noCamAni:e,forceAni:i,horizontal:!!r&&r.horizontal}).then((t=>(this.depth.set(this.history.length=0),this.micrio.current.set(this.image),t)))}switchToGrid(){const t=this.$focussed;if(!t)return;const e=t.camera.getView();e&&this.reset(0,!0).then((()=>{t.opts.area&&this.image.camera.setView(t.opts.area,{noLimit:!0}),t.camera.setView(e,{noLimit:!0}),this.micrio.current.set(this.image)}))}async flyToMarkers(t,e,i){const n=null==t?void 0:t.split("|").map((t=>t.trim())),s=(null==n?void 0:n[0])??"",r=s?this.images.filter((t=>{var e,i;return!!(null==(i=null==(e=t.$data)?void 0:e.markers)?void 0:i.find((t=>t.tags.includes(s))))})):this.images;return this.set(r.map((t=>{var e,n;const r=null==(n=null==(e=t.$data)?void 0:e.markers)?void 0:n.find((t=>t.tags.indexOf(s)>=0));return this.getString(t.$info,{view:i||null==r?void 0:r.view})})).join(";"),{duration:e,horizontal:"h"==(null==n?void 0:n[1])})}async back(t){const e=this.history.pop();if(!e)return;this.depth.set(this.history.length),this.micrio.current.set(this.image);this.$focussed&&this.blur(),await this.set(e.layout,{duration:t,noHistory:!0,horizontal:e.horizontal,view:e.view})}setTimingFunction(t){const e=this.micrio.wasm.getPtr();this.micrio.wasm.e.setGridTransitionTimingFunction(e,Ra.Camera.TimingFunction[this.timingFunction=t])}async focus(t,e={}){var i;if(!t)return this.back();e.coverLimit&&(e.cover=!0);const n=!e.view&&!e.cover,s=this.micrio;u(s.visible).find((t=>t==this.image))||s.current.set(this.image);const r=this.$focussed;if(r==t)return;!(null==(i=e.transition)?void 0:i.startsWith("slide-"))&&(0==e.duration||r&&!s.wasm.e._areaAnimating(r.ptr)&&!this.current.find((e=>e==t)))&&t.camera.setArea([0,0,1,1],{noDispatch:!0,direct:!0}),r&&this.blur(),t.camera.setCoverLimit(!!e.cover),this.setTimingFunction("ease");const o=await this.transition(t,r,this.getString(t.$info,{view:e.view}),e);return s.wasm.e._setZIndex(t.ptr,3),this.focussed.set(t),u(t.visible)||"crossfade"!=e.transition&&e.transition||(e.duration=0),this.set(o,{noBlur:!0,duration:e.duration,forceAreaAni:"crossfade"!=e.transition,cover:!!e.cover,coverLimit:!!e.coverLimit}).then((()=>{s.events.dispatch("grid-focus",t);const e=t.$info;this.removeGrid(),s.$current!=t&&s.current.set(t);const i=s.offsetWidth/s.offsetHeight,r=(1-e.width/e.height/i)/2;!t.camera.aniDone&&n&&t.camera.flyToFullView({duration:1e3*this.aniDurationIn}).catch((()=>{})),this.image.camera.setLimit([r,0,1-r,1])})).catch((()=>{}))}async transition(t,e,i,{duration:n,view:s,transition:r,noViewAni:o,exitView:a,blur:l,cover:c}){if(!r)return i;if("crossfade"==r&&(t.camera.setArea([0,0,1,1]),o=!0),s&&o&&t.camera.setView(s,{noRender:!0,noLimit:!0}),!e||"crossfade"==r)return i;const d=r.startsWith("slide")||r.startsWith("swipe"),u=r.startsWith("behind"),h=d?r.endsWith("-up")?0:r.endsWith("-down")?180:r.endsWith("-left")?270:90:void 0;if((d||u)&&this.micrio.wasm.e._fadeTo(t.ptr,.9999,!0),r.startsWith("slide"))t.camera.setArea(0==h?[0,-.5,1,0]:180==h?[0,1,1,1.5]:270==h?[-.5,0,0,1]:[1,0,1.5,1],{noDispatch:!0,direct:!0});else if(r.startsWith("swipe"))t.camera.setArea(0==h?[0,-1,1,0]:180==h?[0,1,1,2]:270==h?[-1,0,0,1]:[1,0,2,1],{noDispatch:!0,direct:!0}),i=[this.getString(e.$info,{view:a??e.camera.getView(),area:0==h?[0,1,1,2]:180==h?[0,-1,1,0]:270==h?[1,0,2,1]:[-1,0,0,1]}),this.getString(t.$info,{view:s,area:[0,0,1,1]})].join(";");else if(u){t.camera.setArea([0,0,1,1]),t.camera.setView([0,0,1,1]);const i=[this.getString(e.$info,{view:[0,0,1,1]}),this.getString(t.$info,{view:[0,0,1,1]})];"behind-left"==r&&i.reverse(),await this.set(i.join(";"),{noBlur:!0,horizontal:!0,coverLimit:c}).then((()=>te(200)))}if(l&&!isNaN(l)&&l>0){const t=(n=n??this.nextCrossFadeDuration??this.aniDurationIn)/2,e=this.micrio.canvas.element.style;e.transition=`filter ${t}s ease`,e.filter=`blur(${l}px)`,setTimeout((()=>{e.filter="",setTimeout((()=>e.transform=""),1e3*t)}),1e3*t)}return i}blur(){const t=this.$focussed;t&&(this.micrio.wasm.e._setZIndex(t.ptr,2),this.micrio.events.dispatch("grid-blur"),this.focussed.set(void 0),this.image.camera.setLimit([0,0,1,1]),this.micrio.current.set(this.image))}tourEvent(t){var e;const i=t.detail;i&&(null==(e=i.action)?void 0:e.startsWith("grid:"))&&i.active&&this.action(i.action.slice(5),i.data,i.end-i.start)}action(t,e,i){"string"==typeof t&&(t=Ra.Grid.GridActionType[t]);const n=t+(e??"");if(this.lastAction!=n){switch(t){case Ra.Grid.GridActionType.focus:const t=null==e?void 0:e.split("|").map((t=>t.trim())),n=(null==t?void 0:t[0])??"",s=null==n?void 0:n.split(",").map((t=>this.images.find((e=>e.id==(null==t?void 0:t.trim()))))).filter((t=>void 0!==t));1==s.length?this.focus(s[0],{duration:i}):s.length>0&&this.set(s.map((t=>this.getString(t.$info))).join(";"),{duration:i,horizontal:"h"==(null==t?void 0:t[1])});break;case Ra.Grid.GridActionType.flyTo:const r=null==e?void 0:e.split(",").map((t=>this.current.find((e=>e.id==(null==t?void 0:t.trim())))));(null==r?void 0:r.length)?this.image.camera.flyToView([Math.min(...r.map((t=>{var e;return(null==(e=null==t?void 0:t.opts.area)?void 0:e[0])??0}))),Math.min(...r.map((t=>{var e;return(null==(e=null==t?void 0:t.opts.area)?void 0:e[1])??0}))),Math.max(...r.map((t=>{var e;return(null==(e=null==t?void 0:t.opts.area)?void 0:e[2])??1}))),Math.max(...r.map((t=>{var e;return(null==(e=null==t?void 0:t.opts.area)?void 0:e[3])??1})))],{duration:i?1e3*i:void 0}).catch((()=>{})):console.warn("Given image IDs gave no current displayed images",event);break;case Ra.Grid.GridActionType.focusTagged:this.flyToMarkers(e,i);break;case Ra.Grid.GridActionType.focusWithTagged:this.flyToMarkers(e,i,!0);break;case Ra.Grid.GridActionType.reset:this.reset(i);break;case Ra.Grid.GridActionType.back:this.back(i);break;case Ra.Grid.GridActionType.switchToGrid:this.switchToGrid();break;case Ra.Grid.GridActionType.nextFadeDuration:this.nextCrossFadeDuration=Number(e);break;case Ra.Grid.GridActionType.filterTourImages:le(this.micrio.state.tour).then((t=>{if(!t)return;if(!("steps"in t)||!t.stepInfo)return;const n=t.stepInfo.map((t=>t.micrioId)),s=n.filter(((t,e)=>n.indexOf(t)==e)).map((t=>this.images.find((e=>e.id==t)))).filter((t=>!!t)).map((t=>this.getString(t.$info))).join(";");s&&this.set(s,{duration:i,horizontal:"h"==e})}));break;default:console.warn("Warning: unknown grid tour event",event)}this.lastAction=n}}async enlarge(t,e,i=e){var n;return this.set(((null==(n=this.history[this.history.length-1])?void 0:n.layout)||this.image.$info.grid).split(";").map(((n,s)=>`${n}|${s==t?`${e},${i}`:1}`)).join(";"),{noHistory:!0,keepGrid:!0,duration:500})}getRelativeView(t,e){const i=t.opts.area??[0,0,1,1],n=i[2]-i[0],s=i[3]-i[1];return[i[0]+n*e[0],i[1]+s*e[1],i[0]+n*e[2],i[1]+s*e[3]]}};gc.getString=(t,e)=>{var i,n,s,r;return[t.id,t.width,t.height,t.isDeepZoom?"d":"",t.isPng?"p":t.isWebP?"w":"",null==(i=e.view)?void 0:i.map(fc).join("/"),null==(n=e.area)?void 0:n.map(fc).join("/"),null==(r=null==(s=t.settings)?void 0:s.focus)?void 0:r.map(fc).join("-"),e.cultures].join(",").replace(/,+$/,"")+(e.size?`|${e.size.join(",")}`:"")};let vc=gc;class $c{constructor(t){this.micrio=t,this.element=document.createElement("canvas"),this.resizing=!1,this.hasPerspective=!1,this.viewport={width:0,height:0,left:0,top:0,ratio:0,scale:0,portrait:!1},this.isMobile=Ht(!1),this.getRatio=(t=(t=>null==(t=this.micrio.$current)?void 0:t.$settings)()??{})=>!ie.iOS&&!(null==t?void 0:t.noRetina)&&self.devicePixelRatio&&Math.max(1,Math.min(2,self.devicePixelRatio))||1,this.onresize=this.onresize.bind(this),self.ResizeObserver&&(this.resizeObserver=new self.ResizeObserver(this.onresize)),this.element.className="micrio"}get $isMobile(){return u(this.isMobile)}place(){if(this.element.parentNode)return;const t=this.micrio.querySelector("img.preview");this.micrio.insertBefore(this.element,t?t.nextSibling:this.micrio.firstChild)}hook(){this.onresize(),this.resizeObserver?this.resizeObserver.observe(this.element):window.addEventListener("resize",this.onresize)}unhook(){this.resizeObserver?this.resizeObserver.unobserve(this.element):window.removeEventListener("resize",this.onresize)}onresize(){var t,e,i;const n=this.element.getBoundingClientRect();(null==(t=this.micrio.$current)?void 0:t.is360)&&(this.hasPerspective=!0);let s=n.width,r=n.height;if(!s||!r)return;const o=self.getComputedStyle(this.element),a=parseFloat(o.width);isNaN(a)||(r=parseFloat(o.height)*s/Math.max(1,a));const l=this.micrio.hasAttribute("data-static")?1:Math.floor(s)/this.micrio.offsetWidth;s/=l,r/=l;const c=1!=l?1:this.getRatio(),d=this.viewport;d.width==s&&d.height==r&&d.ratio==c&&d.scale==l||(this.hasPerspective&&(this.micrio.style.perspective=r/2+"px"),d.width=s,d.height=r,d.ratio=c,d.scale=l,d.top=n.top,d.left=n.left,d.portrait=null==(e=window.matchMedia("(orientation: portrait)"))?void 0:e.matches,this.resizing=!0,this.element.width=s*c,this.element.height=r*c,this.micrio.webgl.gl.viewport(0,0,d.width*d.ratio,d.height*d.ratio),null==(i=this.micrio.webgl.postpocessor)||i.resize(),this.micrio.wasm.resize(d),this.resizing=!1,this.micrio.events.dispatch("resize",n),setTimeout((()=>this.isMobile.set(/mobile/i.test(navigator.userAgent))),10))}setMargins(t,e){this.micrio.wasm.e.setArea(this.micrio.wasm.getPtr(),t,e)}}const wc=class t extends HTMLElement{constructor(){super(),this.printed=!1,this.canvases=[],this.current=Ht(),this.visible=Ht([]),this.canvas=new $c(this),this.events=new dc(this),this.state=new Wa.Main(this),this.analytics=new pc(this),this._router=new hc(this),this.barebone=Ht(!1),this.webgl=new sc(this),this.wasm=new Ql(this),this.defaultSettings=this.defaultSettings,this.loading=Ht(!0),this.switching=Ht(!1),this.isMuted=Ht("1"==localStorage.getItem(za)),this._lang=Ht(),this.keepRendering=!1,this.loadV5Album=(t,e)=>(t=>"MICRIO_ALBUM"in self?Promise.resolve(self.MICRIO_ALBUM):ue(`https://i.micr.io/album/${t}.json`))(t).then((t=>{var i;if(!t)return;const n=t.id+"."+t.revision,s=e.path=(null==(i=t.organisation)?void 0:i.baseUrl)??Pa;return e.organisation=t.organisation,e.settings.album=t,e.settings.gallery={archive:n,sort:t.sort,type:t.type,startId:e.id,isSpreads:t.isSpreads,coverPages:t.coverPages,revisions:t.published},delete e.id,this.loadArchiveBin(s,n).then((()=>this.loadGallery(e,s,!0)))}),(t=>this.printError((null==t?void 0:t.message)||t))),this.getArchiveIndex=async(t,e=La)=>Ga.get(`${e}${t}.json`).then((t=>(t.images.forEach((t=>ce.set(`${e}${t.id}/info.json`,t))),t))),this.current.subscribe((t=>this._current=t)),le(this.loading,{targetValue:!1}).then((()=>{this.setAttribute("data-loaded",""),this.switching.subscribe((t=>{t?this.setAttribute("data-switching",""):(vt().then((()=>this.events.dispatch("show",this))),this.removeAttribute("data-switching"))}));const t=this.querySelector("img.preview");t&&setTimeout((()=>t.remove()),500)}))}static get observedAttributes(){return["id","muted","data-grid","data-limited","lang"]}get $current(){return this._current}get camera(){var t;return null==(t=this._current)?void 0:t.camera}attributeChangedCallback(t,e,i){var n,s,r,o;switch(t){case"id":if(!this.isConnected||!i)return;this.printed?this.open(i):this.print();break;case"muted":this.isMuted.set(null!==i);break;case"data-grid":this.printed?null==(s=null==(n=this.$current)?void 0:n.grid)||s.set(i):this.print();break;case"data-limited":(null==(r=this.wasm)?void 0:r._vertexBuffer)&&(null==(o=this.$current)?void 0:o.ptr)&&this.wasm.e._setLimited(this.$current.ptr,!!i);break;case"lang":let t=u(this._lang);t!=i&&(this._lang.set(i),Oe.set(De[i]??De.en),i&&(nn.indexOf(i)>=0?this.setAttribute("dir","rtl"):this.removeAttribute("dir")),t&&this.events.dispatch("lang-switch",i))}}connectedCallback(){this.canvas.place(),(this.hasAttribute("data-router")||this.hasAttribute("data-space"))&&"false"!=this.getAttribute("data-router")&&this._router.hook(),!this.id&&!this.hasAttribute("data-gallery")||this.printed||this.print(),"muted"in this||(Object.defineProperty(this,"muted",{get(){return u(this.isMuted)},set(t){t?this.setAttribute("muted",""):this.removeAttribute("muted")}}),this.isMuted.subscribe((t=>{this.muted=t,t?(localStorage.setItem(za,"1"),this.events.dispatch("audio-mute")):(localStorage.removeItem(za),this.events.dispatch("audio-unmute"))})))}destroy(){var t;this.current.set(void 0),this._router.unhook(),this.events.enabled.set(!1),this.canvas.unhook(),this.analytics.unhook(),this.wasm.unbind(),this._ui&&(null==(t=this._ui)||t.$destroy()),delete this._ui,this.printed=!1}loadArchiveBin(t,e){return this.printUI(!0,!0),Ga.load(t,"g/"+e,(t=>{var e;return null==(e=this._ui)?void 0:e.$set({loadingProgress:t})}))}async print(){var t,e,i,n;if(this.printed)return;this.printed=!0,await vt();const s=this.getOptions();if(s.settings||(s.settings={}),s.settings.noControls&&this.state.ui.controls.set(!1),null==(t=s.settings.gallery)?void 0:t.archive){const t=null==(e=s.settings.gallery)?void 0:e.archive,i=/\.\d+$/.test(t),n=s.path||(be(t.replace(/\.\d+$/,""))?Pa:La);i&&await this.loadArchiveBin(n,t),s.settings.gallery.startId=s.id,s.grid?await this.setGrid(s,n):await this.loadGallery(s,n,i),i||delete s.settings.gallery.archive,s.path||(s.path=n),delete s.id}else(null==(i=s.id)?void 0:i.startsWith("album/"))?await this.loadV5Album(s.id.replace("album/",""),s):s.id&&be(s.id)&&!this.hasAttribute("width")&&!this.hasAttribute("height")&&await me(s.id,s.forceInfoPath?s.path:void 0,null==(n=s.settings)?void 0:n.forceDataRefresh).then((t=>(null==t?void 0:t.albumId)?this.loadV5Album(t.albumId,s):void 0));this.keepRendering=!!s.settings.keepRendering;const r=s.id||s.gallery||s.grid;if(this.events.dispatch("print",s),void 0!==s.settings.lazyload&&"IntersectionObserver"in window){const t=new IntersectionObserver((e=>{e[0]&&e[0].isIntersecting&&(t.unobserve(this),r&&this.open(s))}),{rootMargin:100*s.settings.lazyload+"% 0px"});t.observe(this)}else r&&requestAnimationFrame((()=>this.open(s)))}printUI(e,i){this._ui?this._ui.$set({noLogo:i,noHTML:e}):this._ui=new t.Svelte({target:this,props:{micrio:this,noHTML:e,noLogo:i}})}printError(t){var e;null==(e=this._ui)||e.$set({error:t??"An unknown error has occurred"})}open(t,e={}){var i,n,s,r;this.printed||this.print();const o="string"==typeof t,a=this.getOptions();let l=o?{...a,id:t}:t;if(this.$current&&l.id==(null==(i=this.$current)?void 0:i.id))return this.$current;l.settings||(l.settings={}),(null==(s=null==(n=a.settings)?void 0:n.gallery)?void 0:s.archive)&&(/\.\d+$/.test(a.settings.gallery.archive)||delete a.settings.gallery.archive),o||ne(a.settings,l.settings),this.defaultSettings&&ne(this.defaultSettings,l.settings),e.splitScreen||e.gridView||!this.$current||this.switching.set(!0),l.settings.noGTag||this.analytics.hook(),this.printed=!0,this.printUI(!!l.settings.noUI,!!l.settings.noLogo);let c=this.canvases.find((t=>l.id&&t.id==l.id)),d=!1;const u=null==(r=this.canvases[0])?void 0:r.grid;if(!c&&u){const t=l.id?u.images.find((t=>t.id==l.id)):void 0;d=!!t,c=l.id?t:this.canvases[0],d&&!u.insideGrid()&&this.current.set(this.canvases[0])}if(!c){if(this.canvases.length){const t=this.canvases[0];l.path=t.dataPath,l.lang=this.lang}this.canvases.push(c=new ja(this.wasm,l,e.splitScreen?{secondaryTo:e.splitTo??this._current,isPassive:e.isPassive}:void 0));const t=this.state.value&&this.state.value.c.find((t=>t[0]==l.id));t&&c.state.set(t)}e.startView&&(c.state.view.set(l.settings.view=e.startView),c.ptr&&c.camera.e&&c.camera.setView(l.settings.view,{noRender:!0})),this.lang||(this.lang="en");const h=()=>{var t,i,n,s;c&&(le(c.info).then((t=>{var i;if(t&&c){if(!this.webgl.gl)switch(this.webgl.init(),this.canvas.hook(),null==(i=t.settings)?void 0:i.theme){case"light":this.setAttribute("data-light-mode","");break;case"os":this.setAttribute("data-auto-scheme","")}t.grid&&!c.grid&&(c.grid=new vc(this,c)),vt().then((()=>this.dispatchEvent(new CustomEvent("load",{detail:c})))),e.splitScreen&&vt().then((()=>{c&&((null==u?void 0:u.image.camera.aniDone)?u.image.camera.aniDoneAdd.push((()=>null==c?void 0:c.splitStart())):c.splitStart())}))}})),this.wasm.e.set360Orientation(this.wasm.getPtr(),(null==(t=e.vector)?void 0:t.direction)??0,(null==(i=e.vector)?void 0:i.distanceX)??0,(null==(n=e.vector)?void 0:n.distanceY)??0),this.wasm.preventDirectionSet=!e.vector,!d||e.gridView&&(null==u?void 0:u.current.find((t=>t.id==l.id)))?e.splitScreen?this.wasm.setCanvas(c):this.current.set(c):null==u||u.focus(c,{view:null==(s=l.settings)?void 0:s.view}).then((()=>this.current.set(c))))};return this.wasm.ready?h():this.wasm.load().then(h),c.noImage&&this.loading.set(!1),c}close(t){t.opts.secondaryTo?t.splitEnd():this.wasm.removeCanvas(t)}getOptions(){const t={gallery:{}},e={settings:t,id:this.id},i=(t,e,i)=>{const n=e.split(".");for(let s=0;s<n.length-1;s++)t=t[n[s]];t[n[n.length-1]]=i};for(const n in Oa.STRINGS){const s=Oa.STRINGS[n],r=this.getAttribute(n),o=s.f||n.replace("data-","");r&&i(s.r?e:t,o,r)}for(const n in Oa.BOOLEANS){const s=Oa.BOOLEANS[n],r=this.getAttribute(n),o=s.f||n.replace("data-",""),a=null!=r&&""==r||"true"==r;(a||"false"==r)&&i(s.r?e:t,o,s.n?!a:!!a)}for(const n in Oa.NUMBERS){const s=Oa.NUMBERS[n],r=s.f||n.replace("data-","");let o=this.getAttribute(n);void 0!==s.dN&&null==o&&(o=s.dN),null==o||isNaN(Number(o))||i(s.r?e:t,r,Number(o))}for(const n in Oa.ARRAYS){const s=Oa.ARRAYS[n],r=this.getAttribute(n),o=s.f||n.replace("data-","");null!=r&&i(s.r?e:t,o,r.split(",").map((t=>Number(t))))}return t.static&&(t.noUI=t.skipMeta=!0,t.hookEvents=!1),e.settings&&e.grid&&e.grid.indexOf(".")>0&&(e.settings.gallery.archive=e.grid),e}async loadGallery(t,e,i){var n;let s=null==(n=t.settings)?void 0:n.gallery,r=null==s?void 0:s.archive;if(!s||!r)return;const o=t.settings;if(i){const t=await this.getArchiveIndex(r.split(".")[0],e);s.archiveLayerOffset=t.delta,r=t.images.sort("name"==s.sort?(t,e)=>t.title&&e.title?t.title<e.title?-1:t.title>e.title?1:0:0:"-name"==s.sort?(t,e)=>t.title&&e.title?t.title<e.title?1:t.title>e.title?-1:0:0:"-created"==s.sort?(t,e)=>t.created&&e.created?t.created<e.created?1:t.created>e.created?-1:0:0:(t,e)=>t.created&&e.created?t.created<e.created?-1:t.created>e.created?1:0:0).map((t=>`${t.id},${t.width},${t.height},${t.isDeepZoom?"d":""},${t.isPng?"p":t.isWebP?"w":""},${t.tileSize||""}`.replace(/\,+$/,""))).join(";")}const a=r.split(";").map((t=>t.trim()));if(!i){const t=a.filter((t=>t.startsWith("http"))).map((t=>ue(t)));t.length&&await Promise.all(t).then((t=>t.forEach(((t,e)=>{t&&(a[e]=`${t["@id"]},${t.width},${t.height}`)}))))}const l=a.map((t=>t.split(",").map((t=>isNaN(t)?t:Number(t)))));l.forEach(((t,e)=>{e>0&&!t[2]&&t.push(...l[e-1].slice(1))}));const c=t.height=Math.max(...l.map((t=>t[2])));s.type||(s.type="swipe");const d="switch"==s.type||"swipe-full"==s.type||"omni"==s.type,u=s.isSpreads,h=u&&!d?Math.round(l[0][1]/20):0,m=u?s.coverPages??0:0,p=t.width=d?Math.max(...l.map((t=>t[1]*(u?2:1)))):l.reduce(((t,e)=>t+e[1]+h),0);let f=0;t.gallery=l.map(((t,i)=>{var n;return new ja(this.wasm,{id:t[0],path:e,width:t[1],height:t[2],isDeepZoom:"d"==t[3],isPng:"p"==t[4],isWebP:"w"==t[4],tileSize:t[5]||1024,revision:null==(n=null==s?void 0:s.revisions)?void 0:n[t[0]],settings:{skipMeta:!0,gallery:s}},{isEmbed:d,useParentCamera:d,area:d?u?i-m<0||i==l.length-1&&(i-m)%2==0?[.25,0,.75,1]:(i-m)%2==0?[0,0,.5,1]:[.5,0,1,1]:[0,0,1,1]:[(f+=i>0&&(i<m||(i-m)%2==0)?h:0)/p,(c-t[2])/2/c,(f+=t[1])/p,((c-t[2])/2+t[2])/c]})})),o.pinchZoomOutLimit=!0,t.gallery.length&&(o.view=t.gallery[Math.max(0,t.gallery.findIndex((t=>t.id==s.startId)))].opts.area)}async setGrid(t,e){var i;t.settings&&t.grid&&((null==(i=t.settings.gallery)?void 0:i.archive)==t.grid&&(t.grid=(this.gridInfoData=await this.getArchiveIndex(t.grid.split(".")[0],e)).images.map((t=>vc.getString(t,{cultures:"cultures"in t?t.cultures.join("-"):void 0}))).join(";")),t.width=this.offsetWidth*this.canvas.getRatio(),t.height=this.offsetHeight*this.canvas.getRatio(),t.settings.zoomLimit=15,t.settings.minimap=!1,t.settings.initType="cover",this.removeAttribute("data-grid"))}};wc.jsonCache=ce;let yc=wc;yc.Svelte=class extends Yt{constructor(t){super(),Gt(this,t,Rl,zl,a,{micrio:35,noHTML:0,noLogo:36,loadingProgress:1,error:2},null,[-1,-1,-1])}},yc.VERSION=Ia,customElements.define("micr-io",yc),console.log("%c◈%c Micrio %cv5.2.0 - https://micr.io/","color: #00d4ee","color: #c5ff5b","color: inherit")}();
24
+ var __defProp=Object.defineProperty,__defNormalProp=(t,e,i)=>e in t?__defProp(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,__publicField=(t,e,i)=>__defNormalProp(t,"symbol"!=typeof e?e+"":e,i);!function(){"use strict";function t(){}const e=t=>t;function i(t,e){for(const i in e)t[i]=e[i];return t}function n(t){return t()}function s(){return Object.create(null)}function r(t){t.forEach(n)}function o(t){return"function"==typeof t}function a(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}let l;function c(t,e){return t===e||(l||(l=document.createElement("a")),l.href=e,t===l.href)}function d(e,...i){if(null==e){for(const t of i)t(void 0);return t}const n=e.subscribe(...i);return n.unsubscribe?()=>n.unsubscribe():n}function u(t){let e;return d(t,(t=>e=t))(),e}function h(t,e,i){t.$$.on_destroy.push(d(e,i))}function m(t,e,i,n){if(t){const s=p(t,e,i,n);return t[0](s)}}function p(t,e,n,s){return t[1]&&s?i(n.ctx.slice(),t[1](s(e))):n.ctx}function f(t,e,i,n){if(t[2]&&n){const s=t[2](n(i));if(void 0===e.dirty)return s;if("object"==typeof s){const t=[],i=Math.max(e.dirty.length,s.length);for(let n=0;n<i;n+=1)t[n]=e.dirty[n]|s[n];return t}return e.dirty|s}return e.dirty}function g(t,e,i,n,s,r){if(s){const o=p(e,i,n,r);t.p(o,s)}}function v(t){if(t.ctx.length>32){const e=[],i=t.ctx.length/32;for(let t=0;t<i;t++)e[t]=-1;return e}return-1}function $(t){return null==t?"":t}function w(t){const e="string"==typeof t&&t.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return e?[parseFloat(e[1]),e[2]||"px"]:[t,"px"]}const y="undefined"!=typeof window;let b=y?()=>window.performance.now():()=>Date.now(),k=y?t=>requestAnimationFrame(t):t;const T=new Set;function x(t){T.forEach((e=>{e.c(t)||(T.delete(e),e.f())})),0!==T.size&&k(x)}function _(t){let e;return 0===T.size&&k(x),{promise:new Promise((i=>{T.add(e={c:t,f:i})})),abort(){T.delete(e)}}}const E="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function S(t,e){t.appendChild(e)}function M(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}function A(t){const e=N("style");return e.textContent="/* empty */",function(t,e){S(t.head||t,e),e.sheet}(M(t),e),e.sheet}function I(t,e,i){t.insertBefore(e,i||null)}function L(t){t.parentNode&&t.parentNode.removeChild(t)}function P(t,e){for(let i=0;i<t.length;i+=1)t[i]&&t[i].d(e)}function N(t){return document.createElement(t)}function C(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function z(t){return document.createTextNode(t)}function D(){return z(" ")}function O(){return z("")}function R(t,e,i,n){return t.addEventListener(e,i,n),()=>t.removeEventListener(e,i,n)}function F(t){return function(e){return e.preventDefault(),t.call(this,e)}}function U(t){return function(e){return e.stopPropagation(),t.call(this,e)}}function V(t,e,i){null==i?t.removeAttribute(e):t.getAttribute(e)!==i&&t.setAttribute(e,i)}const B=["width","height"];function q(t,e){const i=Object.getOwnPropertyDescriptors(t.__proto__);for(const n in e)null==e[n]?t.removeAttribute(n):"style"===n?t.style.cssText=e[n]:"__value"===n?t.value=t[n]=e[n]:i[n]&&i[n].set&&-1===B.indexOf(n)?t[n]=e[n]:V(t,n,e[n])}function W(t,e){Object.keys(e).forEach((i=>{X(t,i,e[i])}))}function X(t,e,i){const n=e.toLowerCase();n in t?t[n]="boolean"==typeof t[n]&&""===i||i:e in t?t[e]="boolean"==typeof t[e]&&""===i||i:V(t,e,i)}function G(t){return/-/.test(t)?W:q}function Y(t,e){e=""+e,t.data!==e&&(t.data=e)}function j(t,e,i,n){null==i?t.style.removeProperty(e):t.style.setProperty(e,i,"")}function H(t,e,i){t.classList.toggle(e,!!i)}function Z(t,e,{bubbles:i=!1,cancelable:n=!1}={}){return new CustomEvent(t,{detail:e,bubbles:i,cancelable:n})}class K{constructor(t=!1){__publicField(this,"is_svg",!1),__publicField(this,"e"),__publicField(this,"n"),__publicField(this,"t"),__publicField(this,"a"),this.is_svg=t,this.e=this.n=null}c(t){this.h(t)}m(t,e,i=null){this.e||(this.is_svg?this.e=C(e.nodeName):this.e=N(11===e.nodeType?"TEMPLATE":e.nodeName),this.t="TEMPLATE"!==e.tagName?e:e.content,this.c(t)),this.i(i)}h(t){this.e.innerHTML=t,this.n=Array.from("TEMPLATE"===this.e.nodeName?this.e.content.childNodes:this.e.childNodes)}i(t){for(let e=0;e<this.n.length;e+=1)I(this.t,this.n[e],t)}p(t){this.d(),this.h(t),this.i(this.a)}d(){this.n.forEach(L)}}const J=new Map;let Q,tt=0;function et(t,e,i,n,s,r,o,a=0){const l=16.666/n;let c="{\n";for(let g=0;g<=1;g+=l){const t=e+(i-e)*r(g);c+=100*g+`%{${o(t,1-t)}}\n`}const d=c+`100% {${o(i,1-i)}}\n}`,u=`__svelte_${function(t){let e=5381,i=t.length;for(;i--;)e=(e<<5)-e^t.charCodeAt(i);return e>>>0}(d)}_${a}`,h=M(t),{stylesheet:m,rules:p}=J.get(h)||function(t,e){const i={stylesheet:A(e),rules:{}};return J.set(t,i),i}(h,t);p[u]||(p[u]=!0,m.insertRule(`@keyframes ${u} ${d}`,m.cssRules.length));const f=t.style.animation||"";return t.style.animation=`${f?`${f}, `:""}${u} ${n}ms linear ${s}ms 1 both`,tt+=1,u}function it(t,e){const i=(t.style.animation||"").split(", "),n=i.filter(e?t=>t.indexOf(e)<0:t=>-1===t.indexOf("__svelte")),s=i.length-n.length;s&&(t.style.animation=n.join(", "),tt-=s,tt||k((()=>{tt||(J.forEach((t=>{const{ownerNode:e}=t.stylesheet;e&&L(e)})),J.clear())})))}function nt(t){Q=t}function st(){if(!Q)throw new Error("Function called outside component initialization");return Q}function rt(t){st().$$.on_mount.push(t)}function ot(){const t=st();return(e,i,{cancelable:n=!1}={})=>{const s=t.$$.callbacks[e];if(s){const r=Z(e,i,{cancelable:n});return s.slice().forEach((e=>{e.call(t,r)})),!r.defaultPrevented}return!0}}function at(t,e){return st().$$.context.set(t,e),e}function lt(t){return st().$$.context.get(t)}function ct(t,e){const i=t.$$.callbacks[e.type];i&&i.slice().forEach((t=>t.call(this,e)))}const dt=[],ut=[];let ht=[];const mt=[],pt=Promise.resolve();let ft=!1;function gt(){ft||(ft=!0,pt.then(Tt))}function vt(){return gt(),pt}function $t(t){ht.push(t)}function wt(t){mt.push(t)}const yt=new Set;let bt,kt=0;function Tt(){if(0!==kt)return;const t=Q;do{try{for(;kt<dt.length;){const t=dt[kt];kt++,nt(t),xt(t.$$)}}catch(e){throw dt.length=0,kt=0,e}for(nt(null),dt.length=0,kt=0;ut.length;)ut.pop()();for(let t=0;t<ht.length;t+=1){const e=ht[t];yt.has(e)||(yt.add(e),e())}ht.length=0}while(dt.length);for(;mt.length;)mt.pop()();ft=!1,yt.clear(),nt(t)}function xt(t){if(null!==t.fragment){t.update(),r(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach($t)}}function _t(){return bt||(bt=Promise.resolve(),bt.then((()=>{bt=null}))),bt}function Et(t,e,i){t.dispatchEvent(Z(`${e?"intro":"outro"}${i}`))}const St=new Set;let Mt;function At(){Mt={r:0,c:[],p:Mt}}function It(){Mt.r||r(Mt.c),Mt=Mt.p}function Lt(t,e){t&&t.i&&(St.delete(t),t.i(e))}function Pt(t,e,i,n){if(t&&t.o){if(St.has(t))return;St.add(t),Mt.c.push((()=>{St.delete(t),n&&(i&&t.d(1),n())})),t.o(e)}else n&&n()}const Nt={duration:0};function Ct(i,n,s){const r={direction:"in"};let a,l,c=n(i,s,r),d=!1,u=0;function h(){a&&it(i,a)}function m(){const{delay:n=0,duration:s=300,easing:r=e,tick:o=t,css:m}=c||Nt;m&&(a=et(i,0,1,s,n,r,m,u++)),o(0,1);const p=b()+n,f=p+s;l&&l.abort(),d=!0,$t((()=>Et(i,!0,"start"))),l=_((t=>{if(d){if(t>=f)return o(1,0),Et(i,!0,"end"),h(),d=!1;if(t>=p){const e=r((t-p)/s);o(e,1-e)}}return d}))}let p=!1;return{start(){p||(p=!0,it(i),o(c)?(c=c(r),_t().then(m)):m())},invalidate(){p=!1},end(){d&&(h(),d=!1)}}}function zt(i,n,s,a){let l,c=n(i,s,{direction:"both"}),d=a?0:1,u=null,h=null,m=null;function p(){m&&it(i,m)}function f(t,e){const i=t.b-d;return e*=Math.abs(i),{a:d,b:t.b,d:i,duration:e,start:t.start,end:t.start+e,group:t.group}}function g(n){const{delay:s=0,duration:o=300,easing:a=e,tick:g=t,css:v}=c||Nt,$={start:b()+s,b:n};n||($.group=Mt,Mt.r+=1),"inert"in i&&(n?void 0!==l&&(i.inert=l):(l=i.inert,i.inert=!0)),u||h?h=$:(v&&(p(),m=et(i,d,n,o,s,a,v)),n&&g(0,1),u=f($,o),$t((()=>Et(i,n,"start"))),_((t=>{if(h&&t>h.start&&(u=f(h,o),h=null,Et(i,u.b,"start"),v&&(p(),m=et(i,d,u.b,u.duration,0,a,c.css))),u)if(t>=u.end)g(d=u.b,1-d),Et(i,u.b,"end"),h||(u.b?p():--u.group.r||r(u.group.c)),u=null;else if(t>=u.start){const e=t-u.start;d=u.a+u.d*a(e/u.duration),g(d,1-d)}return!(!u&&!h)})))}return{run(t){o(c)?_t().then((()=>{c=c({direction:t?"in":"out"}),g(t)})):g(t)},end(){p(),u=h=null}}}function Dt(t){return void 0!==(null==t?void 0:t.length)?t:Array.from(t)}function Ot(t,e){t.d(1),e.delete(t.key)}function Rt(t,e){Pt(t,1,1,(()=>{e.delete(t.key)}))}function Ft(t,e,i,n,s,o,a,l,c,d,u,h){let m=t.length,p=o.length,f=m;const g={};for(;f--;)g[t[f].key]=f;const v=[],$=new Map,w=new Map,y=[];for(f=p;f--;){const t=h(s,o,f),n=i(t);let r=a.get(n);r?y.push((()=>r.p(t,e))):(r=d(n,t),r.c()),$.set(n,v[f]=r),n in g&&w.set(n,Math.abs(f-g[n]))}const b=new Set,k=new Set;function T(t){Lt(t,1),t.m(l,u),a.set(t.key,t),u=t.first,p--}for(;m&&p;){const e=v[p-1],i=t[m-1],n=e.key,s=i.key;e===i?(u=e.first,m--,p--):$.has(s)?!a.has(n)||b.has(n)?T(e):k.has(s)?m--:w.get(n)>w.get(s)?(k.add(n),T(e)):(b.add(s),m--):(c(i,a),m--)}for(;m--;){const e=t[m];$.has(e.key)||c(e,a)}for(;p;)T(v[p-1]);return r(y),v}function Ut(t,e){const i={},n={},s={$$scope:1};let r=t.length;for(;r--;){const o=t[r],a=e[r];if(a){for(const t in o)t in a||(n[t]=1);for(const t in a)s[t]||(i[t]=a[t],s[t]=1);t[r]=a}else for(const t in o)s[t]=1}for(const o in n)o in i||(i[o]=void 0);return i}function Vt(t){return"object"==typeof t&&null!==t?t:{}}function Bt(t,e,i){const n=t.$$.props[e];void 0!==n&&(t.$$.bound[n]=i,i(t.$$.ctx[n]))}function qt(t){t&&t.c()}function Wt(t,e,i){const{fragment:s,after_update:a}=t.$$;s&&s.m(e,i),$t((()=>{const e=t.$$.on_mount.map(n).filter(o);t.$$.on_destroy?t.$$.on_destroy.push(...e):r(e),t.$$.on_mount=[]})),a.forEach($t)}function Xt(t,e){const i=t.$$;null!==i.fragment&&(!function(t){const e=[],i=[];ht.forEach((n=>-1===t.indexOf(n)?e.push(n):i.push(n))),i.forEach((t=>t())),ht=e}(i.after_update),r(i.on_destroy),i.fragment&&i.fragment.d(e),i.on_destroy=i.fragment=null,i.ctx=[])}function Gt(e,i,n,o,a,l,c=null,d=[-1]){const u=Q;nt(e);const h=e.$$={fragment:null,ctx:[],props:l,update:t,not_equal:a,bound:s(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(i.context||(u?u.$$.context:[])),callbacks:s(),dirty:d,skip_bound:!1,root:i.target||u.$$.root};c&&c(h.root);let m=!1;if(h.ctx=n?n(e,i.props||{},((t,i,...n)=>{const s=n.length?n[0]:i;return h.ctx&&a(h.ctx[t],h.ctx[t]=s)&&(!h.skip_bound&&h.bound[t]&&h.bound[t](s),m&&function(t,e){-1===t.$$.dirty[0]&&(dt.push(t),gt(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}(e,t)),i})):[],h.update(),m=!0,r(h.before_update),h.fragment=!!o&&o(h.ctx),i.target){if(i.hydrate){const t=(p=i.target,Array.from(p.childNodes));h.fragment&&h.fragment.l(t),t.forEach(L)}else h.fragment&&h.fragment.c();i.intro&&Lt(e.$$.fragment),Wt(e,i.target,i.anchor),Tt()}var p;nt(u)}class Yt{constructor(){__publicField(this,"$$"),__publicField(this,"$$set")}$destroy(){Xt(this,1),this.$destroy=t}$on(e,i){if(!o(i))return t;const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(i),()=>{const t=n.indexOf(i);-1!==t&&n.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}"undefined"!=typeof window&&(window.__svelte||(window.__svelte={v:new Set})).v.add("4");const jt=[];function Ht(e,i=t){let n;const s=new Set;function r(t){if(a(e,t)&&(e=t,n)){const t=!jt.length;for(const i of s)i[1](),jt.push(i,e);if(t){for(let t=0;t<jt.length;t+=2)jt[t][0](jt[t+1]);jt.length=0}}}function o(t){r(t(e))}return{set:r,update:o,subscribe:function(a,l=t){const c=[a,l];return s.add(c),1===s.size&&(n=i(r,o)||t),a(e),()=>{s.delete(c),0===s.size&&n&&(n(),n=null)}}}}const Zt=(t,e)=>Math.sqrt(t*t+e*e),Kt=(t,e=1)=>(t%e+e)%e,Jt=()=>Qt()+Qt()+"-"+Qt()+"-"+Qt()+"-"+Qt()+"-"+Qt()+Qt()+Qt(),Qt=()=>Math.floor(65536*(1+Math.random())).toString(16).substring(1),te=t=>new Promise((e=>t?setTimeout(e,t):e())),ee=navigator.userAgent,ie={iOS:/ipad|iphone|ipod/i.test(ee),firefox:/firefox/i.test(ee),OSX:/macintosh/i.test(ee)&&/os\ x/i.test(ee),hasTouch:"TouchEvent"in self,safari:!1};function ne(t,e,i={}){for(let n in t)t[n]&&null!=t[n].constructor&&"Object"==t[n].constructor.name?(e[n]&&"object"==typeof e[n]||(e[n]={}),ne(t[n],e[n],i)):i.mergeArrays&&e[n]instanceof Array&&t[n]instanceof Array?e[n].push(...t[n]):i.noOverwrite&&n in e||(e[n]=t[n]);return e}ie.safari=(ie.OSX||ie.iOS)&&(/safari/i.test(ee)||/instagram/i.test(ee))&&!/chrome/i.test(ee),ie.OSX&&ie.safari&&"TouchEvent"in self&&(ie.iOS=!0,ie.OSX=!1);const se=t=>{if(void 0===t)return t;t=(t=t.replace(/^\s+|\s+$/g,"")).toLowerCase();const e="àáäâèéëêìíïîòóöôùúüûñç·/_,:;";for(var i=0;i<28;i++)t=t.replace(new RegExp(e.charAt(i),"g"),"aaaaeeeeiiiioooouuuunc------".charAt(i));return t=t.replace(/[^a-z0-9 -]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-")},re=[],oe=(t,e,i)=>new Promise(((n,s)=>{if(i||re.indexOf(t)>=0)return n();const r=document.createElement("script"),o=()=>{re.push(t),n()};e?self[e]=o:r.onload=o,r.onerror=()=>s&&s(),r.async=!0,r.defer=!0,self.crossOriginIsolated&&(r.crossOrigin="anonymous"),r.src=t,document.head.appendChild(r)}));function ae(t){const e=t<0;e&&(t*=-1);let i=[0,0,Math.ceil(t)];for(let n of[0,1])for(;i[2-n]>=60&&(i[2-n]-=60,++i[1-n]););return(e?"-":"")+i.filter(((t,e)=>e>0||t)).map(((t,e)=>(t<10&&e?"0":"")+t)).join(":")}const le=(t,e={})=>new Promise((i=>{let n,s=!0;n=t.subscribe((t=>{s&&e.allowUndefined&&void 0===t||(s=!1,(void 0!==e.targetValue?t===e.targetValue:e.allowUndefined||void 0!==t)&&(n?n():vt().then((()=>n())),i(t)))}))})),ce=new Map,de=new Map,ue=async(t,e)=>{if(ce.has(t))return ce.get(t);if(de.has(t))return de.get(t);const i=fetch(t+(e?"?"+Math.random():"")).then((async t=>{if(200==t.status)return t.json();throw await t.text()})).then((e=>(ce.set(t,e),de.delete(t),e)));return de.set(t,i),i},he=t=>"MICRIO_DATA"in self?(null==self?void 0:self.MICRIO_DATA).find((e=>e[0]==t)):void 0,me=(t,e,i)=>{var n;const s=null==(n=he(t))?void 0:n[1];return s?Promise.resolve(s):ue(`${e??"https://i.micr.io/"}${t}/info.json`,i).then((t=>(t&&("Height"in t&&(t.height=t.Height,t.version=1,t.tileSize=512),"Width"in t&&(t.width=t.Width)),ge(t),t)))},pe={"micrio-cdn.azureedge.net":"micrio.vangoghmuseum.nl/micrio","micrio-cdn.vangoghmuseum.nl":"micrio.vangoghmuseum.nl/micrio","rijks-micrio.azureedge.net":"micrio.rijksmuseum.nl"},fe=t=>{if(t instanceof Object&&"fileUrl"in t&&!t.src&&(t.src=t.fileUrl),null==t?void 0:t.src)for(let e in pe)t.src.includes(e)&&(t.src=t.src.replace(e,pe[e]))},ge=t=>{var e,i,n,s,r,o,a,l;t&&(fe(null==(e=t.organisation)?void 0:e.logo),fe(null==(n=null==(i=t.settings)?void 0:i._markers)?void 0:n.markerIcon),null==(o=null==(r=null==(s=t.settings)?void 0:s._markers)?void 0:r.customIcons)||o.forEach(fe),fe(null==(l=null==(a=t.settings)?void 0:a._360)?void 0:l.video))},ve=t=>{var e;fe(t.image),null==(e=t.children)||e.forEach(ve)},$e=(t,e,i)=>{var n,s,r,o;t.data||(t.data={}),t.id||(t.id=Jt()),t.tags||(t.tags=[]),"type"in t||(t.type="default"),t.popupType||(t.popupType="popup"),"string"==typeof t.data.icon&&(t.data.icon={title:"",size:0,uploaded:0,width:-1,height:-1,src:t.data.icon}),null==(n=t.images)||n.forEach(fe),fe(t.positionalAudio),fe(null==(s=t.data)?void 0:s.icon),Object.values(t.i18n??{}).forEach((t=>fe(t.audio)));const a="embedImages"in t?t.embedImages:void 0;a&&a.forEach((t=>fe(t)));const l=null==(o=null==(r=t.data)?void 0:r._meta)?void 0:o.secondary;l&&(t.data.micrioSplitLink=l),i&&"class"in t&&t.tags.push(...t.class.split(" ").map((t=>t.trim())).filter((e=>!!e&&!t.tags.includes(e)))),t.tags.includes("default")&&(t.type="default"),e&&t.view&&t.view[2]<t.view[0]&&t.view[2]++};async function we(t,e,i,n){if(!("steps"in e)||e.stepInfo)return;let s=e.steps.map((t=>t.split(",")[1])).filter((e=>!!e&&e!=t.id));s=s.filter(((t,e)=>s.indexOf(t)==e));const r=await Promise.all(s.map((e=>ue(t.dataPath+(t.isV5?e+"/data/pub.json":e+"/data."+i+".json")))));r.forEach((e=>{var i;return null==(i=null==e?void 0:e.markers)?void 0:i.forEach((e=>$e(e,t.is360,!t.isV5)))})),fe(e.image);let o=-1;const a=[];e.stepInfo=e.steps.map(((e,l)=>{var c,d,u,h,m,p,f,g,v,$;const[w,y]=e.split(","),b=r[s.indexOf(y)]??n,k=null==(c=null==b?void 0:b.markers)?void 0:c.find((t=>t.id==w)),T=(null==(d=null==k?void 0:k.i18n)?void 0:d[i])??k;(null==T?void 0:T.title)&&(o=l);const x=(null==k?void 0:k.videoTour)?"timeline"in k.videoTour?k:(null==(u=k.videoTour.i18n)?void 0:u[i])??void 0:void 0;return fe(null==x?void 0:x.audio),fe(null==x?void 0:x.subtitle),k||(console.warn(`[Micrio] Warning: tour step ${l+1} with id [${w}] not found! Removing it from the tour`),a.push(l)),fe(null==T?void 0:T.audio),k?{markerId:w,marker:k,micrioId:y||t.id,duration:Number((null==x?void 0:x.duration)||(null==(h=null==T?void 0:T.audio)?void 0:h.duration)||0),startView:(null==(m=null==x?void 0:x.timeline)?void 0:m.length)?x.timeline[0].rect:null==k?void 0:k.view,imageHasOtherMarkers:!!y&&!!(null==(p=null==b?void 0:b.markers)?void 0:p.find((t=>t.id!=w&&!t.noMarker))),gridView:!(!(null==(g=null==(f=k.data)?void 0:f._meta)?void 0:g.gridView)&&!(null==($=null==(v=k.data)?void 0:v._meta)?void 0:$.gridAction)),chapter:o}:void 0})).filter((t=>"object"==typeof t)),a.reverse().forEach((t=>e.steps.splice(t,1))),e.initialStep=0,e.duration=e.stepInfo.reduce(((t,e)=>t+(e.duration||0)),0)}const ye=t=>{let e=t.charCodeAt(0),i=e<91;return(e-=i?65:97)-(e>7?1:0)+(i?24:e>10?-1:0)},be=t=>6==t.length||7==t.length;function ke(t,e){var i,n,s,r;const o=t.$current;if(!o)return;const a=null==(i=t.spaceData)?void 0:i.images.find((t=>t.id==o.id)),l=null==(n=t.spaceData)?void 0:n.images.find((t=>t.id==e));if(!a||!l)return;const c=[(l.x??.5)-(a.x??.5),(a.y??.5)-(l.y??.5),(l.z??.5)-(a.z??.5)];let d=c[0]*c[0]+c[1]*c[1]+c[2]*c[2];d>0&&(d=1/Math.sqrt(d));const u=[c[0]*d,c[1]*d,c[2]*d],h=.5-((null==(r=null==(s=o.$settings)?void 0:s._360)?void 0:r.trueNorth)??.5),m=Kt(Math.atan2(-u[0],u[2])/Math.PI/2);return{v:c,vN:u,directionX:m,vector:{direction:m%1-h,distanceX:Math.max(0,Math.min(.4,Math.sqrt(u[0]*u[0]+u[2]*u[2]))),distanceY:-c[1]}}}const Te=t=>!(!(null==t?void 0:t.canPlayType("application/vnd.apple.mpegurl"))&&!(null==t?void 0:t.canPlayType("application/x-mpegURL")));function xe(t){const e=t-1;return e*e*e+1}function _e(t,{delay:i=0,duration:n=400,easing:s=e}={}){const r=+getComputedStyle(t).opacity;return{delay:i,duration:n,easing:s,css:t=>"opacity: "+t*r}}function Ee(t,{delay:e=0,duration:i=400,easing:n=xe,x:s=0,y:r=0,opacity:o=0}={}){const a=getComputedStyle(t),l=+a.opacity,c="none"===a.transform?"":a.transform,d=l*(1-o),[u,h]=w(s),[m,p]=w(r);return{delay:e,duration:i,easing:n,css:(t,e)=>`\n\t\t\ttransform: ${c} translate(${(1-t)*u}${h}, ${(1-t)*m}${p});\n\t\t\topacity: ${l-d*e}`}}function Se(t){let e,i,n;return{c(){e=N("a"),V(e,"rel","noopener"),V(e,"href","https://micr.io/"),V(e,"title","Powered by Micrio"),V(e,"aria-label","Micrio homepage"),V(e,"target",t[4]),V(e,"class","micrio-logo"),H(e,"loading",t[0])},m(t,i){I(t,e,i),n=!0},p(t,i){(!n||1&i)&&H(e,"loading",t[0])},i(t){n||(t&&$t((()=>{n&&(i||(i=zt(e,_e,{duration:200},!0)),i.run(1))})),n=!0)},o(t){t&&(i||(i=zt(e,_e,{duration:200},!1)),i.run(0)),n=!1},d(t){t&&L(e),t&&i&&i.end()}}}function Me(t){let e,i=!t[1]&&Se(t);return{c(){i&&i.c(),e=O()},m(t,n){i&&i.m(t,n),I(t,e,n)},p(t,[n]){t[1]?i&&(At(),Pt(i,1,1,(()=>{i=null})),It()):i?(i.p(t,n),2&n&&Lt(i,1)):(i=Se(t),i.c(),Lt(i,1),i.m(e.parentNode,e))},i(t){Lt(i)},o(t){Pt(i)},d(t){t&&L(e),i&&i.d(t)}}}function Ae(t,e,i){let n,s,r;const o=lt("micrio"),{tour:a,marker:l}=o.state;h(t,a,(t=>i(6,r=t))),h(t,l,(t=>i(5,s=t)));const c=/micr\.io/.test(location.origin)&&self.parent==self?void 0:"_blank";let d,u=!1;return rt((()=>o.loading.subscribe((t=>{clearTimeout(d),t?u||(d=setTimeout((()=>i(0,u=!0)),750)):i(0,u=!1)})))),t.$$.update=()=>{96&t.$$.dirty&&i(1,n=!!r||!!s)},[u,n,a,l,c,s,r]}class Ie extends Yt{constructor(t){super(),Gt(this,t,Ae,Me,a,{})}}function Le(t){let e,i,n,s,r,o,a,l;return{c(){e=N("a"),i=N("img"),c(i.src,n=Ne(t[0].logo))||V(i,"src",n),V(i,"alt","Logo"),V(i,"class","micrio-logo-org"),V(e,"rel","noopener"),V(e,"href",s=t[0].href??"#"),V(e,"title",r=t[0].name),V(e,"aria-label",o=t[0].name+" homepage"),V(e,"target","_blank"),V(e,"class","micrio-logo-org")},m(t,n){I(t,e,n),S(e,i),l=!0},p(t,a){(!l||1&a&&!c(i.src,n=Ne(t[0].logo)))&&V(i,"src",n),(!l||1&a&&s!==(s=t[0].href??"#"))&&V(e,"href",s),(!l||1&a&&r!==(r=t[0].name))&&V(e,"title",r),(!l||1&a&&o!==(o=t[0].name+" homepage"))&&V(e,"aria-label",o)},i(t){l||(t&&$t((()=>{l&&(a||(a=zt(e,_e,{duration:200},!0)),a.run(1))})),l=!0)},o(t){t&&(a||(a=zt(e,_e,{duration:200},!1)),a.run(0)),l=!1},d(t){t&&L(e),t&&a&&a.end()}}}function Pe(t){let e,i=!t[1]&&t[0].logo&&Le(t);return{c(){i&&i.c(),e=O()},m(t,n){i&&i.m(t,n),I(t,e,n)},p(t,[n]){!t[1]&&t[0].logo?i?(i.p(t,n),3&n&&Lt(i,1)):(i=Le(t),i.c(),Lt(i,1),i.m(e.parentNode,e)):i&&(At(),Pt(i,1,1,(()=>{i=null})),It())},i(t){Lt(i)},o(t){Pt(i)},d(t){t&&L(e),i&&i.d(t)}}}function Ne(t){if("string"==typeof t)return t;let e=0,i=Math.max(t.width,t.height);for(;i>1024;)e++,i/=2;return t.micrioId&&t.width>1024?"https://r2.micr.io/"+t.micrioId+"/"+e+"/0-0."+(t.isPng?"png":t.isWebP?"webp":"jpg"):t.src}function Ce(t,e,i){let n,s,r,o,{organisation:a}=e;const l=lt("micrio"),{tour:c,marker:d,popover:u}=l.state;return h(t,c,(t=>i(7,o=t))),h(t,d,(t=>i(6,r=t))),h(t,u,(t=>i(5,s=t))),t.$$set=t=>{"organisation"in t&&i(0,a=t.organisation)},t.$$.update=()=>{224&t.$$.dirty&&i(1,n=!!o||!!r||!!s)},[a,n,c,d,u,s,r,o]}class ze extends Yt{constructor(t){super(),Gt(this,t,Ce,Pe,a,{organisation:0})}}const De={en:{close:"Close",zoomIn:"Zoom in",zoomOut:"Zoom out",fullscreenToggle:"Toggle fullscreen",switchLanguage:"Switch language",share:"Share",audioMute:"Mute audio",audioUnmute:"Unmute audio",closeMarker:"Close this marker",tourStepNext:"Next step",tourStepPrev:"Previous step",tourStop:"Stop this tour",minimize:"Minimize",play:"Play",pause:"Pause",stop:"Stop",subtitlesToggle:"Toggle subtitles",galleryPrev:"Previous image",galleryNext:"Next image",menuToggle:"Toggle menu",waypointFollow:"Go this way"},nl:{close:"Sluit",zoomIn:"Zoom in",zoomOut:"Zoom uit",fullscreenToggle:"Volledig scherm aan / uit",switchLanguage:"Kies taal",share:"Deel",audioMute:"Geluid uit",audioUnmute:"Geluid aan",closeMarker:"Sluit deze marker",tourStepNext:"Volgende stap",tourStepPrev:"Vorige stap",tourStop:"Stop deze tour",minimize:"Minimaliseer",play:"Start",pause:"Pauzeer",stop:"Stop",subtitlesToggle:"Ondertitels aan / uit",galleryPrev:"Vorige afbeelding",galleryNext:"Volgende afbeelding",menuToggle:"Menu openen / sluiten",waypointFollow:"Ga deze richting"}},Oe=Ht(De.en),Re={prefix:"fas",iconName:"bars",icon:[448,512,["navicon"],"f0c9","M0 96C0 78.3 14.3 64 32 64l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 128C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 288c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32L32 448c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"]},Fe={prefix:"fas",iconName:"circle-exclamation",icon:[512,512,["exclamation-circle"],"f06a","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm0-384c13.3 0 24 10.7 24 24l0 112c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-112c0-13.3 10.7-24 24-24zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z"]},Ue={prefix:"fas",iconName:"compress",icon:[448,512,[],"f066","M160 64c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 64-64 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l96 0c17.7 0 32-14.3 32-32l0-96zM32 320c-17.7 0-32 14.3-32 32s14.3 32 32 32l64 0 0 64c0 17.7 14.3 32 32 32s32-14.3 32-32l0-96c0-17.7-14.3-32-32-32l-96 0zM352 64c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 96c0 17.7 14.3 32 32 32l96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-64 0 0-64zM320 320c-17.7 0-32 14.3-32 32l0 96c0 17.7 14.3 32 32 32s32-14.3 32-32l0-64 64 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-96 0z"]},Ve={prefix:"fas",iconName:"globe",icon:[512,512,[127760],"f0ac","M352 256c0 22.2-1.2 43.6-3.3 64l-185.3 0c-2.2-20.4-3.3-41.8-3.3-64s1.2-43.6 3.3-64l185.3 0c2.2 20.4 3.3 41.8 3.3 64zm28.8-64l123.1 0c5.3 20.5 8.1 41.9 8.1 64s-2.8 43.5-8.1 64l-123.1 0c2.1-20.6 3.2-42 3.2-64s-1.1-43.4-3.2-64zm112.6-32l-116.7 0c-10-63.9-29.8-117.4-55.3-151.6c78.3 20.7 142 77.5 171.9 151.6zm-149.1 0l-176.6 0c6.1-36.4 15.5-68.6 27-94.7c10.5-23.6 22.2-40.7 33.5-51.5C239.4 3.2 248.7 0 256 0s16.6 3.2 27.8 13.8c11.3 10.8 23 27.9 33.5 51.5c11.6 26 20.9 58.2 27 94.7zm-209 0L18.6 160C48.6 85.9 112.2 29.1 190.6 8.4C165.1 42.6 145.3 96.1 135.3 160zM8.1 192l123.1 0c-2.1 20.6-3.2 42-3.2 64s1.1 43.4 3.2 64L8.1 320C2.8 299.5 0 278.1 0 256s2.8-43.5 8.1-64zM194.7 446.6c-11.6-26-20.9-58.2-27-94.6l176.6 0c-6.1 36.4-15.5 68.6-27 94.6c-10.5 23.6-22.2 40.7-33.5 51.5C272.6 508.8 263.3 512 256 512s-16.6-3.2-27.8-13.8c-11.3-10.8-23-27.9-33.5-51.5zM135.3 352c10 63.9 29.8 117.4 55.3 151.6C112.2 482.9 48.6 426.1 18.6 352l116.7 0zm358.1 0c-30 74.1-93.6 130.9-171.9 151.6c25.5-34.2 45.2-87.7 55.3-151.6l116.7 0z"]},Be={prefix:"fas",iconName:"image",icon:[512,512,[],"f03e","M0 96C0 60.7 28.7 32 64 32l384 0c35.3 0 64 28.7 64 64l0 320c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 96zM323.8 202.5c-4.5-6.6-11.9-10.5-19.8-10.5s-15.4 3.9-19.8 10.5l-87 127.6L170.7 297c-4.6-5.7-11.5-9-18.7-9s-14.2 3.3-18.7 9l-64 80c-5.8 7.2-6.9 17.1-2.9 25.4s12.4 13.6 21.6 13.6l96 0 32 0 208 0c8.9 0 17.1-4.9 21.2-12.8s3.6-17.4-1.4-24.7l-120-176zM112 192a48 48 0 1 0 0-96 48 48 0 1 0 0 96z"]},qe={prefix:"fas",iconName:"circle-play",icon:[512,512,[61469,"play-circle"],"f144","M0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zM188.3 147.1c-7.6 4.2-12.3 12.3-12.3 20.9l0 176c0 8.7 4.7 16.7 12.3 20.9s16.8 4.1 24.3-.5l144-88c7.1-4.4 11.5-12.1 11.5-20.5s-4.4-16.1-11.5-20.5l-144-88c-7.4-4.5-16.7-4.7-24.3-.5z"]},We={prefix:"fas",iconName:"pause",icon:[320,512,[9208],"f04c","M48 64C21.5 64 0 85.5 0 112L0 400c0 26.5 21.5 48 48 48l32 0c26.5 0 48-21.5 48-48l0-288c0-26.5-21.5-48-48-48L48 64zm192 0c-26.5 0-48 21.5-48 48l0 288c0 26.5 21.5 48 48 48l32 0c26.5 0 48-21.5 48-48l0-288c0-26.5-21.5-48-48-48l-32 0z"]},Xe={prefix:"fas",iconName:"layer-group",icon:[576,512,[],"f5fd","M264.5 5.2c14.9-6.9 32.1-6.9 47 0l218.6 101c8.5 3.9 13.9 12.4 13.9 21.8s-5.4 17.9-13.9 21.8l-218.6 101c-14.9 6.9-32.1 6.9-47 0L45.9 149.8C37.4 145.8 32 137.3 32 128s5.4-17.9 13.9-21.8L264.5 5.2zM476.9 209.6l53.2 24.6c8.5 3.9 13.9 12.4 13.9 21.8s-5.4 17.9-13.9 21.8l-218.6 101c-14.9 6.9-32.1 6.9-47 0L45.9 277.8C37.4 273.8 32 265.3 32 256s5.4-17.9 13.9-21.8l53.2-24.6 152 70.2c23.4 10.8 50.4 10.8 73.8 0l152-70.2zm-152 198.2l152-70.2 53.2 24.6c8.5 3.9 13.9 12.4 13.9 21.8s-5.4 17.9-13.9 21.8l-218.6 101c-14.9 6.9-32.1 6.9-47 0L45.9 405.8C37.4 401.8 32 393.3 32 384s5.4-17.9 13.9-21.8l53.2-24.6 152 70.2c23.4 10.8 50.4 10.8 73.8 0z"]},Ge={prefix:"fas",iconName:"arrow-up-right-from-square",icon:[512,512,["external-link"],"f08e","M320 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l82.7 0L201.4 265.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L448 109.3l0 82.7c0 17.7 14.3 32 32 32s32-14.3 32-32l0-160c0-17.7-14.3-32-32-32L320 0zM80 32C35.8 32 0 67.8 0 112L0 432c0 44.2 35.8 80 80 80l320 0c44.2 0 80-35.8 80-80l0-112c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 112c0 8.8-7.2 16-16 16L80 448c-8.8 0-16-7.2-16-16l0-320c0-8.8 7.2-16 16-16l112 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L80 32z"]},Ye={prefix:"fas",iconName:"arrow-right",icon:[448,512,[8594],"f061","M438.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L338.8 224 32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l306.7 0L233.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l160-160z"]},je={prefix:"fas",iconName:"volume-high",icon:[640,512,[128266,"volume-up"],"f028","M533.6 32.5C598.5 85.2 640 165.8 640 256s-41.5 170.7-106.4 223.5c-10.3 8.4-25.4 6.8-33.8-3.5s-6.8-25.4 3.5-33.8C557.5 398.2 592 331.2 592 256s-34.5-142.2-88.7-186.3c-10.3-8.4-11.8-23.5-3.5-33.8s23.5-11.8 33.8-3.5zM473.1 107c43.2 35.2 70.9 88.9 70.9 149s-27.7 113.8-70.9 149c-10.3 8.4-25.4 6.8-33.8-3.5s-6.8-25.4 3.5-33.8C475.3 341.3 496 301.1 496 256s-20.7-85.3-53.2-111.8c-10.3-8.4-11.8-23.5-3.5-33.8s23.5-11.8 33.8-3.5zm-60.5 74.5C434.1 199.1 448 225.9 448 256s-13.9 56.9-35.4 74.5c-10.3 8.4-25.4 6.8-33.8-3.5s-6.8-25.4 3.5-33.8C393.1 284.4 400 271 400 256s-6.9-28.4-17.7-37.3c-10.3-8.4-11.8-23.5-3.5-33.8s23.5-11.8 33.8-3.5zM301.1 34.8C312.6 40 320 51.4 320 64l0 384c0 12.6-7.4 24-18.9 29.2s-25 3.1-34.4-5.3L131.8 352 64 352c-35.3 0-64-28.7-64-64l0-64c0-35.3 28.7-64 64-64l67.8 0L266.7 40.1c9.4-8.4 22.9-10.4 34.4-5.3z"]},He={prefix:"fas",iconName:"arrow-left",icon:[448,512,[8592],"f060","M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.2 288 416 288c17.7 0 32-14.3 32-32s-14.3-32-32-32l-306.7 0L214.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160z"]},Ze={prefix:"fas",iconName:"minus",icon:[448,512,[8211,8722,10134,"subtract"],"f068","M432 256c0 17.7-14.3 32-32 32L48 288c-17.7 0-32-14.3-32-32s14.3-32 32-32l352 0c17.7 0 32 14.3 32 32z"]},Ke={prefix:"fas",iconName:"ellipsis-vertical",icon:[128,512,["ellipsis-v"],"f142","M64 360a56 56 0 1 0 0 112 56 56 0 1 0 0-112zm0-160a56 56 0 1 0 0 112 56 56 0 1 0 0-112zM120 96A56 56 0 1 0 8 96a56 56 0 1 0 112 0z"]},Je={prefix:"fas",iconName:"closed-captioning",icon:[576,512,[],"f20a","M0 96C0 60.7 28.7 32 64 32l448 0c35.3 0 64 28.7 64 64l0 320c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 96zM200 208c14.2 0 27 6.1 35.8 16c8.8 9.9 24 10.7 33.9 1.9s10.7-24 1.9-33.9c-17.5-19.6-43.1-32-71.5-32c-53 0-96 43-96 96s43 96 96 96c28.4 0 54-12.4 71.5-32c8.8-9.9 8-25-1.9-33.9s-25-8-33.9 1.9c-8.8 9.9-21.6 16-35.8 16c-26.5 0-48-21.5-48-48s21.5-48 48-48zm144 48c0-26.5 21.5-48 48-48c14.2 0 27 6.1 35.8 16c8.8 9.9 24 10.7 33.9 1.9s10.7-24 1.9-33.9c-17.5-19.6-43.1-32-71.5-32c-53 0-96 43-96 96s43 96 96 96c28.4 0 54-12.4 71.5-32c8.8-9.9 8-25-1.9-33.9s-25-8-33.9 1.9c-8.8 9.9-21.6 16-35.8 16c-26.5 0-48-21.5-48-48z"]},Qe={prefix:"fas",iconName:"arrow-down",icon:[384,512,[8595],"f063","M169.4 470.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 370.8 224 64c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 306.7L54.6 265.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z"]},ti={prefix:"fas",iconName:"link",icon:[640,512,[128279,"chain"],"f0c1","M579.8 267.7c56.5-56.5 56.5-148 0-204.5c-50-50-128.8-56.5-186.3-15.4l-1.6 1.1c-14.4 10.3-17.7 30.3-7.4 44.6s30.3 17.7 44.6 7.4l1.6-1.1c32.1-22.9 76-19.3 103.8 8.6c31.5 31.5 31.5 82.5 0 114L422.3 334.8c-31.5 31.5-82.5 31.5-114 0c-27.9-27.9-31.5-71.8-8.6-103.8l1.1-1.6c10.3-14.4 6.9-34.4-7.4-44.6s-34.4-6.9-44.6 7.4l-1.1 1.6C206.5 251.2 213 330 263 380c56.5 56.5 148 56.5 204.5 0L579.8 267.7zM60.2 244.3c-56.5 56.5-56.5 148 0 204.5c50 50 128.8 56.5 186.3 15.4l1.6-1.1c14.4-10.3 17.7-30.3 7.4-44.6s-30.3-17.7-44.6-7.4l-1.6 1.1c-32.1 22.9-76 19.3-103.8-8.6C74 372 74 321 105.5 289.5L217.7 177.2c31.5-31.5 82.5-31.5 114 0c27.9 27.9 31.5 71.8 8.6 103.9l-1.1 1.6c-10.3 14.4-6.9 34.4 7.4 44.6s34.4 6.9 44.6-7.4l1.1-1.6C433.5 260.8 427 182 377 132c-56.5-56.5-148-56.5-204.5 0L60.2 244.3z"]},ei={prefix:"fas",iconName:"play",icon:[384,512,[9654],"f04b","M73 39c-14.8-9.1-33.4-9.4-48.5-.9S0 62.6 0 80L0 432c0 17.4 9.4 33.4 24.5 41.9s33.7 8.1 48.5-.9L361 297c14.3-8.7 23-24.2 23-41s-8.7-32.2-23-41L73 39z"]},ii={prefix:"fas",iconName:"chevron-down",icon:[512,512,[],"f078","M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"]},ni={prefix:"fas",iconName:"arrow-up",icon:[384,512,[8593],"f062","M214.6 41.4c-12.5-12.5-32.8-12.5-45.3 0l-160 160c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 141.2 160 448c0 17.7 14.3 32 32 32s32-14.3 32-32l0-306.7L329.4 246.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-160-160z"]},si={prefix:"fas",iconName:"volume-xmark",icon:[576,512,["volume-mute","volume-times"],"f6a9","M301.1 34.8C312.6 40 320 51.4 320 64l0 384c0 12.6-7.4 24-18.9 29.2s-25 3.1-34.4-5.3L131.8 352 64 352c-35.3 0-64-28.7-64-64l0-64c0-35.3 28.7-64 64-64l67.8 0L266.7 40.1c9.4-8.4 22.9-10.4 34.4-5.3zM425 167l55 55 55-55c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-55 55 55 55c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-55-55-55 55c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l55-55-55-55c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0z"]},ri={prefix:"fas",iconName:"plus",icon:[448,512,[10133,61543,"add"],"2b","M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 144L48 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l144 0 0 144c0 17.7 14.3 32 32 32s32-14.3 32-32l0-144 144 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-144 0 0-144z"]},oi={prefix:"fas",iconName:"expand",icon:[448,512,[],"f065","M32 32C14.3 32 0 46.3 0 64l0 96c0 17.7 14.3 32 32 32s32-14.3 32-32l0-64 64 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 32zM64 352c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 96c0 17.7 14.3 32 32 32l96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-64 0 0-64zM320 32c-17.7 0-32 14.3-32 32s14.3 32 32 32l64 0 0 64c0 17.7 14.3 32 32 32s32-14.3 32-32l0-96c0-17.7-14.3-32-32-32l-96 0zM448 352c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 64-64 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l96 0c17.7 0 32-14.3 32-32l0-96z"]},ai={prefix:"fas",iconName:"xmark",icon:[384,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"]},li={prefix:"fas",iconName:"share",icon:[512,512,["mail-forward"],"f064","M307 34.8c-11.5 5.1-19 16.6-19 29.2l0 64-112 0C78.8 128 0 206.8 0 304C0 417.3 81.5 467.9 100.2 478.1c2.5 1.4 5.3 1.9 8.1 1.9c10.9 0 19.7-8.9 19.7-19.7c0-7.5-4.3-14.4-9.8-19.5C108.8 431.9 96 414.4 96 384c0-53 43-96 96-96l96 0 0 64c0 12.6 7.4 24.1 19 29.2s25 3 34.4-5.4l160-144c6.7-6.1 10.6-14.7 10.6-23.8s-3.8-17.7-10.6-23.8l-160-144c-9.4-8.5-22.9-10.6-34.4-5.4z"]},ci={prefix:"fas",iconName:"video",icon:[576,512,["video-camera"],"f03d","M0 128C0 92.7 28.7 64 64 64l256 0c35.3 0 64 28.7 64 64l0 256c0 35.3-28.7 64-64 64L64 448c-35.3 0-64-28.7-64-64L0 128zM559.1 99.8c10.4 5.6 16.9 16.4 16.9 28.2l0 256c0 11.8-6.5 22.6-16.9 28.2s-23 5-32.9-1.6l-96-64L416 337.1l0-17.1 0-128 0-17.1 14.2-9.5 96-64c9.8-6.5 22.4-7.2 32.9-1.6z"]};function di(t){let e,i,n,s,r,o,a,l=t[3]&&ui(t);function c(t,e){return"string"==typeof t[17][4]?mi:hi}let d=c(t),u=d(t);return{c(){e=C("svg"),l&&l.c(),i=C("g"),n=C("g"),u.c(),V(n,"transform",t[16]),V(i,"transform",s="translate("+t[17][0]/2+" "+t[17][1]/2+")"),V(i,"transform-origin",r=t[17][0]/4+" 0"),V(e,"id",t[1]),V(e,"class",o="svelte-fa svelte-fa-base "+t[0]+" micrio-fa"),V(e,"style",t[2]),V(e,"viewBox",a="0 0 "+t[17][0]+" "+t[17][1]),V(e,"aria-hidden","true"),V(e,"role","img"),V(e,"xmlns","http://www.w3.org/2000/svg"),H(e,"pulse",t[9]),H(e,"svelte-fa-size-lg","lg"===t[4]),H(e,"svelte-fa-size-sm","sm"===t[4]),H(e,"svelte-fa-size-xs","xs"===t[4]),H(e,"svelte-fa-fw",t[6]),H(e,"svelte-fa-pull-left","left"===t[7]),H(e,"svelte-fa-pull-right","right"===t[7]),H(e,"spin",t[8])},m(s,r){I(s,e,r),l&&l.m(e,null),S(e,i),S(i,n),u.m(n,null),t[24](e)},p(t,h){t[3]?l?l.p(t,h):(l=ui(t),l.c(),l.m(e,i)):l&&(l.d(1),l=null),d===(d=c(t))&&u?u.p(t,h):(u.d(1),u=d(t),u&&(u.c(),u.m(n,null))),65536&h&&V(n,"transform",t[16]),131072&h&&s!==(s="translate("+t[17][0]/2+" "+t[17][1]/2+")")&&V(i,"transform",s),131072&h&&r!==(r=t[17][0]/4+" 0")&&V(i,"transform-origin",r),2&h&&V(e,"id",t[1]),1&h&&o!==(o="svelte-fa svelte-fa-base "+t[0]+" micrio-fa")&&V(e,"class",o),4&h&&V(e,"style",t[2]),131072&h&&a!==(a="0 0 "+t[17][0]+" "+t[17][1])&&V(e,"viewBox",a),513&h&&H(e,"pulse",t[9]),17&h&&H(e,"svelte-fa-size-lg","lg"===t[4]),17&h&&H(e,"svelte-fa-size-sm","sm"===t[4]),17&h&&H(e,"svelte-fa-size-xs","xs"===t[4]),65&h&&H(e,"svelte-fa-fw",t[6]),129&h&&H(e,"svelte-fa-pull-left","left"===t[7]),129&h&&H(e,"svelte-fa-pull-right","right"===t[7]),257&h&&H(e,"spin",t[8])},d(i){i&&L(e),l&&l.d(),u.d(),t[24](null)}}}function ui(t){let e,i;return{c(){e=C("title"),i=z(t[3])},m(t,n){I(t,e,n),S(e,i)},p(t,e){8&e&&Y(i,t[3])},d(t){t&&L(e)}}}function hi(t){let e,i,n,s,r,o,a,l,c,d;return{c(){e=C("path"),o=C("path"),V(e,"d",i=t[17][4][0]),V(e,"fill",n=t[11]||t[5]||"currentColor"),V(e,"fill-opacity",s=0!=t[14]?t[12]:t[13]),V(e,"transform",r="translate("+t[17][0]/-2+" "+t[17][1]/-2+")"),V(o,"d",a=t[17][4][1]),V(o,"fill",l=t[10]||t[5]||"currentColor"),V(o,"fill-opacity",c=0!=t[14]?t[13]:t[12]),V(o,"transform",d="translate("+t[17][0]/-2+" "+t[17][1]/-2+")")},m(t,i){I(t,e,i),I(t,o,i)},p(t,u){131072&u&&i!==(i=t[17][4][0])&&V(e,"d",i),2080&u&&n!==(n=t[11]||t[5]||"currentColor")&&V(e,"fill",n),28672&u&&s!==(s=0!=t[14]?t[12]:t[13])&&V(e,"fill-opacity",s),131072&u&&r!==(r="translate("+t[17][0]/-2+" "+t[17][1]/-2+")")&&V(e,"transform",r),131072&u&&a!==(a=t[17][4][1])&&V(o,"d",a),1056&u&&l!==(l=t[10]||t[5]||"currentColor")&&V(o,"fill",l),28672&u&&c!==(c=0!=t[14]?t[13]:t[12])&&V(o,"fill-opacity",c),131072&u&&d!==(d="translate("+t[17][0]/-2+" "+t[17][1]/-2+")")&&V(o,"transform",d)},d(t){t&&(L(e),L(o))}}}function mi(t){let e,i,n,s;return{c(){e=C("path"),V(e,"d",i=t[17][4]),V(e,"fill",n=t[5]||t[10]||"currentColor"),V(e,"transform",s="translate("+t[17][0]/-2+" "+t[17][1]/-2+")")},m(t,i){I(t,e,i)},p(t,r){131072&r&&i!==(i=t[17][4])&&V(e,"d",i),1056&r&&n!==(n=t[5]||t[10]||"currentColor")&&V(e,"fill",n),131072&r&&s!==(s="translate("+t[17][0]/-2+" "+t[17][1]/-2+")")&&V(e,"transform",s)},d(t){t&&L(e)}}}function pi(e){let i,n=e[17][4]&&di(e);return{c(){n&&n.c(),i=O()},m(t,e){n&&n.m(t,e),I(t,i,e)},p(t,[e]){t[17][4]?n?n.p(t,e):(n=di(t),n.c(),n.m(i.parentNode,i)):n&&(n.d(1),n=null)},i:t,o:t,d(t){t&&L(i),n&&n.d(t)}}}function fi(t,e,i){let n,s,r,{class:o}=e,{id:a}=e,{style:l}=e,{icon:c}=e,{title:d}=e,{size:u}=e,{color:h}=e,{fw:m=!1}=e,{pull:p}=e,{scale:f=1}=e,{translateX:g=0}=e,{translateY:v=0}=e,{rotate:$}=e,{flip:w}=e,{spin:y=!1}=e,{pulse:b=!1}=e,{primaryColor:k=""}=e,{secondaryColor:T=""}=e,{primaryOpacity:x=1}=e,{secondaryOpacity:_=.4}=e,{swapOpacity:E=!1}=e;return t.$$set=t=>{"class"in t&&i(0,o=t.class),"id"in t&&i(1,a=t.id),"style"in t&&i(2,l=t.style),"icon"in t&&i(18,c=t.icon),"title"in t&&i(3,d=t.title),"size"in t&&i(4,u=t.size),"color"in t&&i(5,h=t.color),"fw"in t&&i(6,m=t.fw),"pull"in t&&i(7,p=t.pull),"scale"in t&&i(19,f=t.scale),"translateX"in t&&i(20,g=t.translateX),"translateY"in t&&i(21,v=t.translateY),"rotate"in t&&i(22,$=t.rotate),"flip"in t&&i(23,w=t.flip),"spin"in t&&i(8,y=t.spin),"pulse"in t&&i(9,b=t.pulse),"primaryColor"in t&&i(10,k=t.primaryColor),"secondaryColor"in t&&i(11,T=t.secondaryColor),"primaryOpacity"in t&&i(12,x=t.primaryOpacity),"secondaryOpacity"in t&&i(13,_=t.secondaryOpacity),"swapOpacity"in t&&i(14,E=t.swapOpacity)},t.$$.update=()=>{32784&t.$$.dirty&&r&&u&&function(t,e){t.style.fontSize=e&&"lg"!==e&&"sm"!==e&&"xs"!==e?e.replace("x","em"):""}(r,u),262144&t.$$.dirty&&i(17,n=c&&c.icon||[0,0,"",[],""]),16252928&t.$$.dirty&&i(16,s=function(t,e,i,n,s,r=1,o="",a=""){let l=1,c=1;s&&("horizontal"==s?l=-1:"vertical"==s?c=-1:l=c=-1),"string"==typeof t&&(t=parseFloat(t)),"string"==typeof e&&(e=parseFloat(e)),"string"==typeof i&&(i=parseFloat(i));let d=`translate(${e*r}${o},${i*r}${o}) scale(${l*t},${c*t})`;return n&&(d+=` rotate(${n}${a})`),d}(f,g,v,$,w,512))},[o,a,l,d,u,h,m,p,y,b,k,T,x,_,E,r,s,n,c,f,g,v,$,w,function(t){ut[t?"unshift":"push"]((()=>{r=t,i(15,r)}))}]}class gi extends Yt{constructor(t){super(),Gt(this,t,fi,pi,a,{class:0,id:1,style:2,icon:18,title:3,size:4,color:5,fw:6,pull:7,scale:19,translateX:20,translateY:21,rotate:22,flip:23,spin:8,pulse:9,primaryColor:10,secondaryColor:11,primaryOpacity:12,secondaryOpacity:13,swapOpacity:14})}}function vi(t){let e,i;return e=new gi({props:{icon:t[4].get(t[1]),size:t[3]?"14":"24",style:t[0]}}),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};2&i&&(n.icon=t[4].get(t[1])),1&i&&(n.style=t[0]),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function $i(e){let i,n;return{c(){i=new K(!1),n=O(),i.a=n},m(t,s){i.m(e[2],t,s),I(t,n,s)},p(t,e){4&e&&i.p(t[2])},i:t,o:t,d(t){t&&(L(n),i.d())}}}function wi(t){let e,i,n,s,r;const o=[$i,vi],a=[];function l(t,i){return 2&i&&(e=null),t[2]?0:(null==e&&(e=!!t[4].has(t[1])),e?1:-1)}return~(i=l(t,-1))&&(n=a[i]=o[i](t)),{c(){n&&n.c(),s=O()},m(t,e){~i&&a[i].m(t,e),I(t,s,e),r=!0},p(t,[e]){let r=i;i=l(t,e),i===r?~i&&a[i].p(t,e):(n&&(At(),Pt(a[r],1,1,(()=>{a[r]=null})),It()),~i?(n=a[i],n?n.p(t,e):(n=a[i]=o[i](t),n.c()),Lt(n,1),n.m(s.parentNode,s)):n=null)},i(t){r||(Lt(n),r=!0)},o(t){Pt(n),r=!1},d(t){t&&L(s),~i&&a[i].d(t)}}}function yi(t,e,i){var n,s;let r,{style:o=null}=e,{name:a}=e;const l=lt("micrio"),c="chevron-down"==a||"link-ext"==a,d=null==(s=null==(n=l.defaultSettings)?void 0:n.ui)?void 0:s.icons,u=new Map([["play",ei],["pause",We],["close",ai],["play-filled",qe],["a11y",Ve],["menu",Re],["zoom-in",ri],["zoom-out",Ze],["maximize",oi],["minimize",Ue],["volume-off",si],["volume-up",je],["subtitles",Je],["subtitles-off",Je],["arrow-left",He],["arrow-up",ni],["arrow-right",Ye],["arrow-down",Qe],["video",ci],["audio",je],["image",Be],["share",li],["error",Fe],["chevron-down",ii],["link",ti],["link-ext",Ge],["ellipsis-vertical",Ke]]);return t.$$set=t=>{"style"in t&&i(0,o=t.style),"name"in t&&i(1,a=t.name)},t.$$.update=()=>{2&t.$$.dirty&&i(2,r=d&&("zoom-in"==a?d.zoomIn:"zoom-out"==a?d.zoomOut:"maximize"==a?d.fullscreenEnter:"minimize"==a?d.fullscreenLeave:"close"==a?d.close:"arrow-right"==a?d.next:"arrow-left"==a?d.prev:"arrow-up"==a?d.up:"arrow-down"==a?d.down:"play"==a?d.play:"pause"==a?d.pause:"subtitles"==a?d.subtitles:"subtitles-off"==a?d.subtitlesOff:"volume-off"==a?d.muted:"volume-up"==a?d.unmuted:null))},[o,a,r,c,u]}class bi extends Yt{constructor(t){super(),Gt(this,t,yi,wi,a,{style:0,name:1})}}function ki(t,e,i){const n=t.slice();return n[17]=e[i],n[19]=i,n}function Ti(t){var e;let i,n,s,r,o,a,l,c=((null==(e=t[4])?void 0:e.title)??"(Unknown)")+"",d=t[0].icon&&_i(t),u=t[0].children&&t[0].children.length&&Ei();return{c(){i=N("button"),d&&d.c(),n=D(),s=N("strong"),r=z(c),u&&u.c(),V(s,"class","micrio-menu"),V(i,"class","micrio-menu-action micrio-menu"),V(i,"type","button")},m(e,c){I(e,i,c),d&&d.m(i,null),S(i,n),S(i,s),S(s,r),u&&u.m(s,null),t[9](i),o=!0,a||(l=R(i,"click",t[6]),a=!0)},p(t,e){var a;t[0].icon?d?(d.p(t,e),1&e&&Lt(d,1)):(d=_i(t),d.c(),Lt(d,1),d.m(i,n)):d&&(At(),Pt(d,1,1,(()=>{d=null})),It()),(!o||16&e)&&c!==(c=((null==(a=t[4])?void 0:a.title)??"(Unknown)")+"")&&Y(r,c),t[0].children&&t[0].children.length?u?1&e&&Lt(u,1):(u=Ei(),u.c(),Lt(u,1),u.m(s,null)):u&&(At(),Pt(u,1,1,(()=>{u=null})),It())},i(t){o||(Lt(d),Lt(u),o=!0)},o(t){Pt(d),Pt(u),o=!1},d(e){e&&L(i),d&&d.d(),u&&u.d(),t[9](null),a=!1,l()}}}function xi(t){var e;let i,n,s,r,o,a,l,c,d,u=((null==(e=t[4])?void 0:e.title)??"(Unknown)")+"";return r=new bi({props:{style:"opacity:.75",name:"link-ext"}}),{c(){i=N("a"),n=N("strong"),s=z(u),qt(r.$$.fragment),V(n,"class","micrio-menu"),V(i,"class","micrio-menu-action micrio-menu"),V(i,"href",o=t[0].link),V(i,"target",a=t[0].linkTargetBlank?"_blank":void 0)},m(e,o){I(e,i,o),S(i,n),S(n,s),Wt(r,n,null),l=!0,c||(d=R(i,"click",t[6]),c=!0)},p(t,e){var n;(!l||16&e)&&u!==(u=((null==(n=t[4])?void 0:n.title)??"(Unknown)")+"")&&Y(s,u),(!l||1&e&&o!==(o=t[0].link))&&V(i,"href",o),(!l||1&e&&a!==(a=t[0].linkTargetBlank?"_blank":void 0))&&V(i,"target",a)},i(t){l||(Lt(r.$$.fragment,t),l=!0)},o(t){Pt(r.$$.fragment,t),l=!1},d(t){t&&L(i),Xt(r),c=!1,d()}}}function _i(t){let e,i;return e=new gi({props:{icon:t[0].icon,style:"margin-right:10px;"}}),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};1&i&&(n.icon=t[0].icon),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function Ei(t){let e,i;return e=new bi({props:{name:"chevron-down"}}),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function Si(t){let e,i,n=[],s=new Map,r=Dt(t[0].children);const o=t=>t[19]+t[17].id;for(let a=0;a<r.length;a+=1){let e=ki(t,r,a),i=o(e);s.set(i,n[a]=Mi(i,e))}return{c(){e=N("div");for(let t=0;t<n.length;t+=1)n[t].c();V(e,"class","items micrio-menu")},m(t,s){I(t,e,s);for(let i=0;i<n.length;i+=1)n[i]&&n[i].m(e,null);i=!0},p(t,i){3&i&&(r=Dt(t[0].children),At(),n=Ft(n,i,o,0,t,r,s,e,Rt,Mi,null,ki),It())},i(t){if(!i){for(let t=0;t<r.length;t+=1)Lt(n[t]);i=!0}},o(t){for(let e=0;e<n.length;e+=1)Pt(n[e]);i=!1},d(t){t&&L(e);for(let e=0;e<n.length;e+=1)n[e].d()}}}function Mi(t,e){let i,n,s,r;return n=new Ci({props:{menu:e[17],originalId:e[1]}}),n.$on("close",e[10]),{key:t,first:null,c(){i=O(),qt(n.$$.fragment),s=D(),this.first=i},m(t,e){I(t,i,e),Wt(n,t,e),I(t,s,e),r=!0},p(t,i){e=t;const s={};1&i&&(s.menu=e[17]),2&i&&(s.originalId=e[1]),n.$set(s)},i(t){r||(Lt(n.$$.fragment,t),r=!0)},o(t){Pt(n.$$.fragment,t),r=!1},d(t){t&&(L(i),L(s)),Xt(n,t)}}}function Ai(t){let e,i,n,s,r,o;const a=[xi,Ti],l=[];function c(t,e){return t[0].link?0:1}i=c(t),n=l[i]=a[i](t);let d=t[0].children&&t[0].children.length&&Si(t);return{c(){var i,o;e=N("menu"),n.c(),s=D(),d&&d.c(),V(e,"data-title",r=null==(o=null==(i=t[4])?void 0:i.title)?void 0:o.toLowerCase()),V(e,"class","micrio-menu"),H(e,"opened",t[3])},m(t,n){I(t,e,n),l[i].m(e,null),S(e,s),d&&d.m(e,null),o=!0},p(t,[u]){var h,m;let p=i;i=c(t),i===p?l[i].p(t,u):(At(),Pt(l[p],1,1,(()=>{l[p]=null})),It(),n=l[i],n?n.p(t,u):(n=l[i]=a[i](t),n.c()),Lt(n,1),n.m(e,s)),t[0].children&&t[0].children.length?d?(d.p(t,u),1&u&&Lt(d,1)):(d=Si(t),d.c(),Lt(d,1),d.m(e,null)):d&&(At(),Pt(d,1,1,(()=>{d=null})),It()),(!o||16&u&&r!==(r=null==(m=null==(h=t[4])?void 0:h.title)?void 0:m.toLowerCase()))&&V(e,"data-title",r),(!o||8&u)&&H(e,"opened",t[3])},i(t){o||(Lt(n),Lt(d),o=!0)},o(t){Pt(n),Pt(d),o=!1},d(t){t&&L(e),l[i].d(),d&&d.d()}}}const Ii=Ht(void 0),Li=()=>Ii.set(void 0);let Pi=!1;function Ni(t,e,i){let n,s,r,o;h(t,Ii,(t=>i(7,r=t)));let{menu:a}=e,{originalId:l=null}=e;const c=ot(),d=lt("micrio"),{events:u,state:m,_lang:p}=d;let f;h(t,p,(t=>i(8,o=t)));rt((()=>{var t;(null==n?void 0:n.title)||1!=(null==(t=a.children)?void 0:t.length)||i(0,a=a.children[0]),a.action||(a.markerId?i(0,a.action=()=>{var t,e;l&&(null==(t=d.$current)?void 0:t.id)!=l&&d.open(l),null==(e=d.$current)||e.state.marker.set(a.markerId)},a):((null==n?void 0:n.content)||(null==n?void 0:n.embed)||a.image)&&i(0,a.action=()=>{u.dispatch("page-open",a),m.popover.set({contentPage:a})},a)),i(0,a._button=f,a)}));const g=t=>{var e;return t==r||!!(null==(e=t.children)?void 0:e.some(g))};return t.$$set=t=>{"menu"in t&&i(0,a=t.menu),"originalId"in t&&i(1,l=t.originalId)},t.$$.update=()=>{var e,l,c;257&t.$$.dirty&&i(4,(l=o,n=(null==(c=(e=a).i18n)?void 0:c[l])??e)),129&t.$$.dirty&&i(3,s=r&&g(a))},[a,l,f,s,n,p,function(t){a.link||t.preventDefault(),a.action&&a.action();const e=!!(s||a.action||a.link);Ii.set(e?void 0:a),e&&c("close")},r,o,function(t){ut[t?"unshift":"push"]((()=>{f=t,i(2,f)}))},function(e){ct.call(this,t,e)}]}Ii.subscribe((t=>{t?!Pi&&window.addEventListener("click",Li):Pi&&window.removeEventListener("click",Li),Pi=!!t}));class Ci extends Yt{constructor(t){super(),Gt(this,t,Ni,Ai,a,{menu:0,originalId:1})}}function zi(e){let i,n;return{c(){i=N("img"),c(i.src,n=e[1].src)||V(i,"src",n),V(i,"alt","Icon"),V(i,"class","micrio-button")},m(t,e){I(t,i,e)},p(t,e){2&e&&!c(i.src,n=t[1].src)&&V(i,"src",n)},i:t,o:t,d(t){t&&L(i)}}}function Di(t){let e,i;return e=new bi({props:{name:t[0]}}),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};1&i&&(n.name=t[0]),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function Oi(t){let e,n,s,o,a,l,c,d,u,h,p,$;const w=[Di,zi],y=[];function b(t,e){return t[0]?0:t[1]?1:-1}~(n=b(t))&&(s=y[n]=w[n](t));const k=t[10].default,T=m(k,t,t[9],null);let x=[{href:t[6]},{target:a=t[7]?"_blank":void 0},{disabled:l=!!t[3]||void 0},{title:t[2]},{"aria-label":t[2]},{role:c=t[6]?void 0:"button"},{tabindex:d=t[6]?void 0:0},{class:u="micrio-button "+(t[0]??"")+" "+t[5]+" micrio-button"}],_={};for(let r=0;r<x.length;r+=1)_=i(_,x[r]);return{c(){e=N(t[6]?"a":"button"),s&&s.c(),o=O(),T&&T.c(),G(t[6]?"a":"button")(e,_),H(e,"active",t[4]),H(e,"no-click",t[8])},m(i,s){I(i,e,s),~n&&y[n].m(e,null),S(e,o),T&&T.m(e,null),h=!0,p||($=[R(e,"click",t[11]),R(e,"focus",t[12]),R(e,"pointerdown",t[13])],p=!0)},p(t,i){let r=n;n=b(t),n===r?~n&&y[n].p(t,i):(s&&(At(),Pt(y[r],1,1,(()=>{y[r]=null})),It()),~n?(s=y[n],s?s.p(t,i):(s=y[n]=w[n](t),s.c()),Lt(s,1),s.m(e,o)):s=null),T&&T.p&&(!h||512&i)&&g(T,k,t,t[9],h?f(k,t[9],i,null):v(t[9]),null),G(t[6]?"a":"button")(e,_=Ut(x,[(!h||64&i)&&{href:t[6]},(!h||128&i&&a!==(a=t[7]?"_blank":void 0))&&{target:a},(!h||8&i&&l!==(l=!!t[3]||void 0))&&{disabled:l},(!h||4&i)&&{title:t[2]},(!h||4&i)&&{"aria-label":t[2]},(!h||64&i&&c!==(c=t[6]?void 0:"button"))&&{role:c},(!h||64&i&&d!==(d=t[6]?void 0:0))&&{tabindex:d},(!h||33&i&&u!==(u="micrio-button "+(t[0]??"")+" "+t[5]+" micrio-button"))&&{class:u}])),H(e,"active",t[4]),H(e,"no-click",t[8])},i(t){h||(Lt(s),Lt(T,t),h=!0)},o(t){Pt(s),Pt(T,t),h=!1},d(t){t&&L(e),~n&&y[n].d(),T&&T.d(t),p=!1,r($)}}}function Ri(t){let e,i,n=t[6]?"a":"button",s=(t[6]?"a":"button")&&Oi(t);return{c(){s&&s.c(),e=O()},m(t,n){s&&s.m(t,n),I(t,e,n),i=!0},p(t,[i]){t[6]||"button"?n?a(n,t[6]?"a":"button")?(s.d(1),s=Oi(t),n=t[6]?"a":"button",s.c(),s.m(e.parentNode,e)):s.p(t,i):(s=Oi(t),n=t[6]?"a":"button",s.c(),s.m(e.parentNode,e)):n&&(s.d(1),s=null,n=t[6]?"a":"button")},i(t){i||(Lt(s,t),i=!0)},o(t){Pt(s,t),i=!1},d(t){t&&L(e),s&&s.d(t)}}}function Fi(t,e,i){let{$$slots:n={},$$scope:s}=e,{type:r}=e,{icon:o}=e,{title:a=null}=e,{disabled:l=!1}=e,{active:c=!1}=e,{className:d=""}=e,{href:u}=e,{blankTarget:h=!1}=e,{noClick:m=!1}=e;return t.$$set=t=>{"type"in t&&i(0,r=t.type),"icon"in t&&i(1,o=t.icon),"title"in t&&i(2,a=t.title),"disabled"in t&&i(3,l=t.disabled),"active"in t&&i(4,c=t.active),"className"in t&&i(5,d=t.className),"href"in t&&i(6,u=t.href),"blankTarget"in t&&i(7,h=t.blankTarget),"noClick"in t&&i(8,m=t.noClick),"$$scope"in t&&i(9,s=t.$$scope)},[r,o,a,l,c,d,u,h,m,s,n,function(e){ct.call(this,t,e)},function(e){ct.call(this,t,e)},function(e){ct.call(this,t,e)}]}class Ui extends Yt{constructor(t){super(),Gt(this,t,Fi,Ri,a,{type:0,icon:1,title:2,disabled:3,active:4,className:5,href:6,blankTarget:7,noClick:8})}}function Vi(t,e,i){const n=t.slice();return n[33]=e[i],n}function Bi(t){let e,i,n,s,r,o,a,l=t[1]&&qi(t),c=t[3]&&Xi(t),d=t[2]&&Gi(t),u=t[7]&&Yi(t);return{c(){e=N("menu"),l&&l.c(),i=D(),c&&c.c(),n=D(),d&&d.c(),r=D(),u&&u.c(),o=O(),V(e,"class","micrio-toolbar micrio-toolbar"),H(e,"shown",!t[10]&&t[5]),H(e,"indent",t[6])},m(t,s){I(t,e,s),l&&l.m(e,null),S(e,i),c&&c.m(e,null),S(e,n),d&&d.m(e,null),I(t,r,s),u&&u.m(t,s),I(t,o,s),a=!0},p(t,s){t[1]?l?(l.p(t,s),2&s[0]&&Lt(l,1)):(l=qi(t),l.c(),Lt(l,1),l.m(e,i)):l&&(At(),Pt(l,1,1,(()=>{l=null})),It()),t[3]?c?(c.p(t,s),8&s[0]&&Lt(c,1)):(c=Xi(t),c.c(),Lt(c,1),c.m(e,n)):c&&(At(),Pt(c,1,1,(()=>{c=null})),It()),t[2]?d?(d.p(t,s),4&s[0]&&Lt(d,1)):(d=Gi(t),d.c(),Lt(d,1),d.m(e,null)):d&&(At(),Pt(d,1,1,(()=>{d=null})),It()),(!a||1056&s[0])&&H(e,"shown",!t[10]&&t[5]),(!a||64&s[0])&&H(e,"indent",t[6]),t[7]?u?(u.p(t,s),128&s[0]&&Lt(u,1)):(u=Yi(t),u.c(),Lt(u,1),u.m(o.parentNode,o)):u&&(At(),Pt(u,1,1,(()=>{u=null})),It())},i(t){a||(Lt(l),Lt(c),Lt(d),t&&$t((()=>{a&&(s||(s=zt(e,_e,{duration:200},!0)),s.run(1))})),Lt(u),a=!0)},o(t){Pt(l),Pt(c),Pt(d),t&&(s||(s=zt(e,_e,{duration:200},!1)),s.run(0)),Pt(u),a=!1},d(t){t&&(L(e),L(r),L(o)),l&&l.d(),c&&c.d(),d&&d.d(),t&&s&&s.end(),u&&u.d(t)}}}function qi(t){let e,i,n=[],s=new Map,r=Dt(t[1]);const o=t=>t[33].id;for(let a=0;a<r.length;a+=1){let e=Vi(t,r,a),i=o(e);s.set(i,n[a]=Wi(i,e))}return{c(){for(let t=0;t<n.length;t+=1)n[t].c();e=O()},m(t,s){for(let e=0;e<n.length;e+=1)n[e]&&n[e].m(t,s);I(t,e,s),i=!0},p(t,i){3145730&i[0]&&(r=Dt(t[1]),At(),n=Ft(n,i,o,0,t,r,s,e.parentNode,Rt,Wi,e,Vi),It())},i(t){if(!i){for(let t=0;t<r.length;t+=1)Lt(n[t]);i=!0}},o(t){for(let e=0;e<n.length;e+=1)Pt(n[e]);i=!1},d(t){t&&L(e);for(let e=0;e<n.length;e+=1)n[e].d(t)}}}function Wi(t,e){let i,n,s;return n=new Ci({props:{menu:e[33],originalId:e[20]}}),n.$on("close",e[21]),{key:t,first:null,c(){i=O(),qt(n.$$.fragment),this.first=i},m(t,e){I(t,i,e),Wt(n,t,e),s=!0},p(t,i){e=t;const s={};2&i[0]&&(s.menu=e[33]),n.$set(s)},i(t){s||(Lt(n.$$.fragment,t),s=!0)},o(t){Pt(n.$$.fragment,t),s=!1},d(t){t&&L(i),Xt(n,t)}}}function Xi(t){let e,i;return e=new Ci({props:{menu:{id:Jt(),i18n:{[t[12]]:{title:t[9]?"Marker tours":"Tours"}},children:t[4].map(t[26])}}}),e.$on("close",t[21]),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};4624&i[0]&&(n.menu={id:Jt(),i18n:{[t[12]]:{title:t[9]?"Marker tours":"Tours"}},children:t[4].map(t[26])}),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function Gi(t){let e,i;return e=new Ci({props:{menu:{id:Jt(),i18n:{[t[12]]:{title:t[9]?"Video tours":"Tours"}},children:t[0]&&t[0].tours?t[0].tours.map(t[27]):[]}}}),e.$on("close",t[21]),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};6657&i[0]&&(n.menu={id:Jt(),i18n:{[t[12]]:{title:t[9]?"Video tours":"Tours"}},children:t[0]&&t[0].tours?t[0].tours.map(t[27]):[]}),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function Yi(t){let e,i;return e=new Ui({props:{title:t[13].menuToggle,type:t[5]?"close":"ellipsis-vertical",className:"toggle transparent"+(t[6]?" indent":"")}}),e.$on("click",t[28]),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};8192&i[0]&&(n.title=t[13].menuToggle),32&i[0]&&(n.type=t[5]?"close":"ellipsis-vertical"),64&i[0]&&(n.className="toggle transparent"+(t[6]?" indent":"")),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function ji(t){let e,i,n=!t[8]&&!t[10]&&Bi(t);return{c(){n&&n.c(),e=O()},m(t,s){n&&n.m(t,s),I(t,e,s),i=!0},p(t,i){t[8]||t[10]?n&&(At(),Pt(n,1,1,(()=>{n=null})),It()):n?(n.p(t,i),1280&i[0]&&Lt(n,1)):(n=Bi(t),n.c(),Lt(n,1),n.m(e.parentNode,e))},i(t){i||(Lt(n),i=!0)},o(t){Pt(n),i=!1},d(t){t&&L(e),n&&n.d(t)}}}function Hi(t,e,i){let n,s,r,o,a,l,c,d,u,m,p,f,g;h(t,Oe,(t=>i(13,f=t)));const v=lt("micrio"),{state:$,current:w,_lang:y,spaceData:b}=v;h(t,w,(t=>i(11,m=t))),h(t,y,(t=>i(12,p=t)));const{tour:k,marker:T,popover:x}=$;h(t,k,(t=>i(25,u=t))),h(t,T,(t=>i(24,d=t))),h(t,x,(t=>i(23,c=t)));let _=!1,E=!1;const S=m.id;let M,A;const I=()=>i(7,A=window.innerWidth<=500);I();const L=[],P=(t,e)=>{var i,n;return("title"in t?t.title:null==(n=null==(i=t.i18n)?void 0:i[e])?void 0:n.title)??"(Untitled)"};rt((()=>{const t=v.current.subscribe((t=>{var e;if(t){for(;L.length;)null==(e=L.shift())||e();le(t.info).then((()=>i(6,E=!t.$settings.noLogo))),L.push(t.data.subscribe((t=>{i(0,g=t),vt().then((()=>{var e,n;if(!(null==t?void 0:t.pages))return;M||i(1,M=null==(e=t.pages)?void 0:e.filter((t=>{var e;return!(null==(e=t.id)?void 0:e.startsWith("_"))})));const s=null==(n=t.pages)?void 0:n.filter((t=>{var e;return null==(e=t.id)?void 0:e.startsWith("_")}));s.length&&i(1,M=[...M.filter((t=>{var e;return!(null==(e=t.id)?void 0:e.startsWith("_"))})),...s])}))})))}}));return window.addEventListener("resize",I),()=>{var e;for(window.removeEventListener("resize",I);L.length;)null==(e=L.shift())||e();t()}}));return t.$$.update=()=>{var e;58720256&t.$$.dirty[0]&&i(10,n=!!u||!!d||!!c),1&t.$$.dirty[0]&&i(4,s=((null==g?void 0:g.markerTours)??[]).concat((null==b?void 0:b.markerTours)??[])),16&t.$$.dirty[0]&&i(3,r=null==s?void 0:s.length),1&t.$$.dirty[0]&&i(2,o=null==(e=null==g?void 0:g.tours)?void 0:e.length),12&t.$$.dirty[0]&&i(9,a=r&&o),14&t.$$.dirty[0]&&i(8,l=!((null==M?void 0:M.length)||r||o))},[g,M,o,r,s,_,E,A,l,a,n,m,p,f,v,w,y,k,T,x,S,()=>{A&&i(5,_=!1)},P,c,d,u,t=>({id:Jt(),i18n:{[p]:{title:P(t,p)}},action:()=>{t.initialStep=0,k.set(t)}}),t=>({id:Jt(),i18n:{[p]:{title:P(t,p)}},action:()=>{m&&m.id!=S&&v.open(S),k.set(t)}}),()=>i(5,_=!_)]}class Zi extends Yt{constructor(t){super(),Gt(this,t,Hi,ji,a,{},null,[-1,-1])}}function Ki(e){let i,n,s;return{c(){i=N("canvas"),V(i,"width",e[11]),V(i,"height",e[12]),V(i,"style",e[6]),V(i,"class","micrio-minimap"),H(i,"hidden",!e[5]||e[7]!=e[0]||e[9]&&(e[3]||e[2])),H(i,"dragging",e[4]),H(i,"controls",!e[10])},m(t,r){I(t,i,r),e[16](i),n||(s=[R(i,"wheel",e[13]),R(i,"mousedown",e[14])],n=!0)},p(t,e){64&e[0]&&V(i,"style",t[6]),685&e[0]&&H(i,"hidden",!t[5]||t[7]!=t[0]||t[9]&&(t[3]||t[2])),16&e[0]&&H(i,"dragging",t[4])},i:t,o:t,d(t){t&&L(i),e[16](null),n=!1,r(s)}}}function Ji(t,e,i){let n,s,{image:r}=e;const o=r.$info,a=r.camera,l=r.$settings,c=lt("micrio"),d=c.current;h(t,d,(t=>i(7,s=t)));const u=c.canvas.viewport,m=l.minimapWidth??200,p=l.minimapHeight??160,f=!l.alwaysShowMinimap,g=!!l.noControls,v=o.width/o.height,$=m/v>p?Math.round(p*v):m,w=m/v<=p?Math.round(m/v):p;let y,b,k=!1,T=!o.is360&&a.isZoomedOut();function x(t){if(t&&b){if(L(),b.clearRect(0,0,$,w),r.thumbSrc?(b.globalCompositeOperation="source-over",b.fillStyle="rgba(0,0,0,.5)",b.fillRect(0,0,$,w),b.globalAlpha=1,b.globalCompositeOperation="destination-out"):(b.fillStyle="rgba(0,0,0,.5)",b.fillRect(0,0,$,w)),b.beginPath(),b.fillStyle="white",o.is360){const t=function(){const t=[],e=u.width*u.ratio,i=u.height*u.ratio,n=a.getCoo(e/2,i/2).slice(0),s=[];for(let r=0;r<8;r++)s.push(r/8*e,0);for(let r=0;r<8;r++)s.push(e,r/8*i);for(let r=0;r<8;r++)s.push((1-r/8)*e,i);for(let r=0;r<8;r++)s.push(0,(1-r/8)*i);for(let r=0;r<s.length;r+=2){const e=a.getCoo(s[r],s[r+1]);(r>40||r<8)&&e[0]>n[0]?e[0]-=1:r>8&&r<40&&e[0]<n[0]&&(e[0]+=1),t.push(e[0],e[1])}return t}();b.moveTo(t[0]*$,t[1]*w);for(let e=2;e<t.length;e+=2)b.lineTo(t[e]*$,t[e+1]*w);b.closePath()}else i(3,T=a.isZoomedOut()),b.rect(Math.floor(t[0]*$),Math.floor(t[1]*w),Math.ceil((t[2]-t[0])*$),Math.ceil((t[3]-t[1])*w));r.thumbSrc&&(b.fill(),b.globalCompositeOperation="source-over"),b.stroke()}}const _=-1!=navigator.userAgent.indexOf("Firefox");let E,S,M=!1;function A(t){E&&a.setCoo(Math.max(0,Math.min(1,(t.clientX-E.left)/E.width)),Math.max(0,Math.min(1,(t.clientY-E.top)/E.height)))}function I(){window.removeEventListener("mousemove",A),window.removeEventListener("mouseup",I),i(4,M=!1)}function L(){i(2,k=!1),clearTimeout(S),S=setTimeout((()=>i(2,k=!0)),2500)}const P=.5-r.camera.trueNorth,N=self.crossOriginIsolated;let C=N?void 0:r.thumbSrc;const z={passive:!0};let D=!1;return rt((()=>{let t;b=y.getContext("2d"),b&&(b.lineWidth=1,b.strokeStyle="white"),N&&r.thumbSrc&&fetch(r.thumbSrc).then((t=>t.blob())).then((e=>i(15,C=t=URL.createObjectURL(e)))),c.canvas.element.addEventListener("mousemove",L,z);const e=r.state.view.subscribe(x);return setTimeout((()=>i(5,D=!0)),10),()=>{t&&URL.revokeObjectURL(t),c.canvas.element.removeEventListener("mousemove",L,z),I(),e()}})),t.$$set=t=>{"image"in t&&i(0,r=t.image)},t.$$.update=()=>{32768&t.$$.dirty[0]&&i(6,n=C?`background-image: url('${C}')`+(0!=P?`;background-position-x:${$*P}px`:""):null)},[r,y,k,T,M,D,n,s,d,f,g,$,w,function(t){a.zoom(t.deltaY*(_?50:1))},function(t){0==t.button&&(window.addEventListener("mousemove",A),window.addEventListener("mouseup",I),E=y.getClientRects()[0],A(t),i(4,M=!0))},C,function(t){ut[t?"unshift":"push"]((()=>{y=t,i(1,y)}))}]}class Qi extends Yt{constructor(t){super(),Gt(this,t,Ji,Ki,a,{image:0},null,[-1,-1])}}const tn=(null==navigator?void 0:navigator.language)??"en-EN",en="Intl"in self&&Intl.DisplayNames?new Intl.DisplayNames([tn],{type:"language"}):void 0,nn=["ar","ar-AE","ar-BH","ar-DJ","ar-DZ","ar-EG","ar-IQ","ar-JO","ar-KW","ar-LB","ar-LY","ar-MA","ar-OM","ar-QA","ar-SA","ar-SD","ar-SY","ar-TN","ar-YE","dv-MV","fa-AF","fa-IR","he","he-IL","iw","iw-PS","kd","ku-IQ","ku-IR","ku-SY","ku-TR","pk-PK","ps","ps-AF","sd-PK","syr-SY","ug","ug-CN","ur","ur-IN","ur-PK","yi","yi-IL","yi-US"];function sn(t){let e,i,n;const s=t[2].default,r=m(s,t,t[1],null);return{c(){e=N("div"),r&&r.c(),V(e,"class",i=$(t[0])+" micrio-button-group")},m(t,i){I(t,e,i),r&&r.m(e,null),n=!0},p(t,[o]){r&&r.p&&(!n||2&o)&&g(r,s,t,t[1],n?f(s,t[1],o,null):v(t[1]),null),(!n||1&o&&i!==(i=$(t[0])+" micrio-button-group"))&&V(e,"class",i)},i(t){n||(Lt(r,t),n=!0)},o(t){Pt(r,t),n=!1},d(t){t&&L(e),r&&r.d(t)}}}function rn(t,e,i){let{$$slots:n={},$$scope:s}=e,{className:r=""}=e;return t.$$set=t=>{"className"in t&&i(0,r=t.className),"$$scope"in t&&i(1,s=t.$$scope)},[r,s,n]}class on extends Yt{constructor(t){super(),Gt(this,t,rn,sn,a,{className:0})}}function an(t){let e,i,n=t[2]&&function(t){let e,i;return e=new Ui({props:{type:t[0]?"minimize":"maximize",title:t[1].fullscreenToggle}}),e.$on("click",t[3]),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};1&i&&(n.type=t[0]?"minimize":"maximize"),2&i&&(n.title=t[1].fullscreenToggle),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}(t);return{c(){n&&n.c(),e=O()},m(t,s){n&&n.m(t,s),I(t,e,s),i=!0},p(t,[e]){t[2]&&n.p(t,e)},i(t){i||(Lt(n),i=!0)},o(t){Pt(n),i=!1},d(t){t&&L(e),n&&n.d(t)}}}function ln(t,e,i){let n;h(t,Oe,(t=>i(1,n=t)));let{el:s}=e;const r="requestFullscreen"in s,o="webkitRequestFullscreen"in s,a=lt("micrio"),l=()=>r?document.fullscreenElement:document.webkitFullscreenElement;let c=l()==s;const d=r||o&&!l(),u=()=>new Promise((t=>setTimeout(t,500)));let m;const p=s==a&&!a.events.scrollHooked,f=()=>{i(0,c=l()==s),p&&(c?a.events.hookScroll():a.events.unhookScroll())};return d&&rt((()=>{const t=r?"fullscreenchange":"webkitfullscreenchange";return document.addEventListener(t,f),()=>document.removeEventListener(t,f)})),t.$$set=t=>{"el"in t&&i(4,s=t.el)},[c,n,d,function(){c?async function(){r?(await document.exitFullscreen().then(u),m&&m.requestFullscreen(),m=void 0):"webkitExitFullscreen"in document&&document.webkitExitFullscreen()}():async function(){r?(ie.safari&&(m=l())&&await document.exitFullscreen().then(u),s.requestFullscreen()):"webkitRequestFullscreen"in s&&s.webkitRequestFullscreen()}()},s]}class cn extends Yt{constructor(t){super(),Gt(this,t,ln,an,a,{el:4})}}function dn(t){let e,i,n,s;return e=new Ui({props:{type:"zoom-in",title:t[3].zoomIn,disabled:t[2]||t[0]}}),e.$on("click",t[4]),n=new Ui({props:{type:"zoom-out",title:t[3].zoomOut,disabled:t[2]||t[1]}}),n.$on("click",t[5]),{c(){qt(e.$$.fragment),i=D(),qt(n.$$.fragment)},m(t,r){Wt(e,t,r),I(t,i,r),Wt(n,t,r),s=!0},p(t,i){const s={};8&i&&(s.title=t[3].zoomIn),5&i&&(s.disabled=t[2]||t[0]),e.$set(s);const r={};8&i&&(r.title=t[3].zoomOut),6&i&&(r.disabled=t[2]||t[1]),n.$set(r)},i(t){s||(Lt(e.$$.fragment,t),Lt(n.$$.fragment,t),s=!0)},o(t){Pt(e.$$.fragment,t),Pt(n.$$.fragment,t),s=!1},d(t){t&&L(i),Xt(e,t),Xt(n,t)}}}function un(t){let e,i,n=(!t[0]||!t[1])&&dn(t);return{c(){n&&n.c(),e=O()},m(t,s){n&&n.m(t,s),I(t,e,s),i=!0},p(t,[i]){t[0]&&t[1]?n&&(At(),Pt(n,1,1,(()=>{n=null})),It()):n?(n.p(t,i),3&i&&Lt(n,1)):(n=dn(t),n.c(),Lt(n,1),n.m(e.parentNode,e))},i(t){i||(Lt(n),i=!0)},o(t){Pt(n),i=!1},d(t){t&&L(e),n&&n.d(t)}}}function hn(t,e,i){let n;h(t,Oe,(t=>i(3,n=t)));let{image:s}=e;const r=lt("micrio");let o=!1,a=!1;const l=()=>{r.events.clicked=!0};function c(){i(0,o=(null==s?void 0:s.camera.isZoomedIn())??!0),i(1,a=(null==s?void 0:s.camera.isZoomedOut(!0))??!0)}let d,u,m=!1;return rt((()=>(s?s.state.view.subscribe(c):u=r.current.subscribe((t=>{d&&(d(),d=void 0),i(2,m=!0),i(6,s=t)&&le(t.info).then((()=>{s&&(d=s.state.view.subscribe(c)),i(2,m=!1)}))})),()=>{u&&u(),d&&d()}))),t.$$set=t=>{"image"in t&&i(6,s=t.image)},[o,a,m,n,()=>{l(),null==s||s.camera.zoomIn().then((()=>r.events.clicked=!1))},()=>{l(),null==s||s.camera.zoomOut().then((()=>r.events.clicked=!1))},s]}class mn extends Yt{constructor(t){super(),Gt(this,t,hn,un,a,{image:6})}}function pn(t,e,i){const n=t.slice();return n[38]=e[i],n}function fn(t){let e,i,n,s,r,o,a,l,c=t[3]&&gn(t),d=t[0]&&t[4].length>1&&vn(t),u=t[1]&&"share"in navigator&&yn(t);r=new on({props:{$$slots:{default:[_n]},$$scope:{ctx:t}}});let h=t[5]&&t[8]&&En(t);return{c(){e=N("aside"),c&&c.c(),i=D(),d&&d.c(),n=D(),u&&u.c(),s=D(),qt(r.$$.fragment),o=D(),h&&h.c(),a=O(),V(e,"class","micrio-controls")},m(t,m){I(t,e,m),c&&c.m(e,null),S(e,i),d&&d.m(e,null),S(e,n),u&&u.m(e,null),S(e,s),Wt(r,e,null),S(e,o),h&&h.m(t,m),I(t,a,m),l=!0},p(t,o){t[3]?c?(c.p(t,o),8&o[0]&&Lt(c,1)):(c=gn(t),c.c(),Lt(c,1),c.m(e,i)):c&&(At(),Pt(c,1,1,(()=>{c=null})),It()),t[0]&&t[4].length>1?d?(d.p(t,o),17&o[0]&&Lt(d,1)):(d=vn(t),d.c(),Lt(d,1),d.m(e,n)):d&&(At(),Pt(d,1,1,(()=>{d=null})),It()),t[1]&&"share"in navigator?u?(u.p(t,o),2&o[0]&&Lt(u,1)):(u=yn(t),u.c(),Lt(u,1),u.m(e,s)):u&&(At(),Pt(u,1,1,(()=>{u=null})),It());const l={};420&o[0]|1024&o[1]&&(l.$$scope={dirty:o,ctx:t}),r.$set(l),t[5]&&t[8]?h?(h.p(t,o),288&o[0]&&Lt(h,1)):(h=En(t),h.c(),Lt(h,1),h.m(a.parentNode,a)):h&&(At(),Pt(h,1,1,(()=>{h=null})),It())},i(t){l||(Lt(c),Lt(d),Lt(u),Lt(r.$$.fragment,t),Lt(h),l=!0)},o(t){Pt(c),Pt(d),Pt(u),Pt(r.$$.fragment,t),Pt(h),l=!1},d(t){t&&(L(e),L(a)),c&&c.d(),d&&d.d(),u&&u.d(),Xt(r),h&&h.d(t)}}}function gn(t){let e,i;return e=new Ui({props:{type:t[12]?"volume-off":"volume-up",title:t[12]?t[13].audioUnmute:t[13].audioMute}}),e.$on("click",t[32]),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};4096&i[0]&&(n.type=t[12]?"volume-off":"volume-up"),12288&i[0]&&(n.title=t[12]?t[13].audioUnmute:t[13].audioMute),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function vn(t){let e,i,n;i=new Ui({props:{title:t[13].switchLanguage,type:"a11y"}});let s=Dt(t[4]),r=[];for(let a=0;a<s.length;a+=1)r[a]=wn(pn(t,s,a));const o=t=>Pt(r[t],1,1,(()=>{r[t]=null}));return{c(){e=N("menu"),qt(i.$$.fragment);for(let t=0;t<r.length;t+=1)r[t].c();V(e,"class","popout micrio-controls")},m(t,s){I(t,e,s),Wt(i,e,null);for(let i=0;i<r.length;i+=1)r[i]&&r[i].m(e,null);n=!0},p(t,n){const a={};if(8192&n[0]&&(a.title=t[13].switchLanguage),i.$set(a),208&n[0]){let i;for(s=Dt(t[4]),i=0;i<s.length;i+=1){const o=pn(t,s,i);r[i]?(r[i].p(o,n),Lt(r[i],1)):(r[i]=wn(o),r[i].c(),Lt(r[i],1),r[i].m(e,null))}for(At(),i=s.length;i<r.length;i+=1)o(i);It()}},i(t){if(!n){Lt(i.$$.fragment,t);for(let t=0;t<s.length;t+=1)Lt(r[t]);n=!0}},o(t){Pt(i.$$.fragment,t),r=r.filter(Boolean);for(let e=0;e<r.length;e+=1)Pt(r[e]);n=!1},d(t){t&&L(e),Xt(i),P(r,t)}}}function $n(t){let e,i=t[38].toUpperCase()+"";return{c(){e=z(i)},m(t,i){I(t,e,i)},p(t,n){16&n[0]&&i!==(i=t[38].toUpperCase()+"")&&Y(e,i)},d(t){t&&L(e)}}}function wn(t){let e,i;return e=new Ui({props:{title:(null==en?void 0:en.of(t[38]))??t[38],active:t[38]==t[6],$$slots:{default:[$n]},$$scope:{ctx:t}}}),e.$on("click",(function(){return t[33](t[38])})),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(i,n){t=i;const s={};16&n[0]&&(s.title=(null==en?void 0:en.of(t[38]))??t[38]),80&n[0]&&(s.active=t[38]==t[6]),16&n[0]|1024&n[1]&&(s.$$scope={dirty:n,ctx:t}),e.$set(s)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function yn(t){let e,i;return e=new Ui({props:{type:"share",title:t[13].share}}),e.$on("click",t[21]),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};8192&i[0]&&(n.title=t[13].share),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function bn(t){let e,i,n,s;const r=[Tn,kn],o=[];function a(t,e){return t[8]?0:1}return e=a(t),i=o[e]=r[e](t),{c(){i.c(),n=D()},m(t,i){o[e].m(t,i),I(t,n,i),s=!0},p(t,s){let l=e;e=a(t),e===l?o[e].p(t,s):(At(),Pt(o[l],1,1,(()=>{o[l]=null})),It(),i=o[e],i?i.p(t,s):(i=o[e]=r[e](t),i.c()),Lt(i,1),i.m(n.parentNode,n))},i(t){s||(Lt(i),s=!0)},o(t){Pt(i),s=!1},d(t){t&&L(n),o[e].d(t)}}}function kn(e){let i,n;return i=new mn({}),{c(){qt(i.$$.fragment)},m(t,e){Wt(i,t,e),n=!0},p:t,i(t){n||(Lt(i.$$.fragment,t),n=!0)},o(t){Pt(i.$$.fragment,t),n=!1},d(t){Xt(i,t)}}}function Tn(t){let e,i;return e=new mn({props:{image:t[8]}}),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};256&i[0]&&(n.image=t[8]),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function xn(t){let e,i;return e=new cn({props:{el:t[7]}}),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};128&i[0]&&(n.el=t[7]),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function _n(t){let e,i,n,s=t[5]&&bn(t),r=t[2]&&xn(t);return{c(){s&&s.c(),e=O(),r&&r.c(),i=O()},m(t,o){s&&s.m(t,o),I(t,e,o),r&&r.m(t,o),I(t,i,o),n=!0},p(t,n){t[5]?s?(s.p(t,n),32&n[0]&&Lt(s,1)):(s=bn(t),s.c(),Lt(s,1),s.m(e.parentNode,e)):s&&(At(),Pt(s,1,1,(()=>{s=null})),It()),t[2]?r?(r.p(t,n),4&n[0]&&Lt(r,1)):(r=xn(t),r.c(),Lt(r,1),r.m(i.parentNode,i)):r&&(At(),Pt(r,1,1,(()=>{r=null})),It())},i(t){n||(Lt(s),Lt(r),n=!0)},o(t){Pt(s),Pt(r),n=!1},d(t){t&&(L(e),L(i)),s&&s.d(t),r&&r.d(t)}}}function En(t){let e,i,n,s;return i=new on({props:{$$slots:{default:[Sn]},$$scope:{ctx:t}}}),{c(){e=N("aside"),qt(i.$$.fragment),V(e,"class","primary micrio-controls"),H(e,"portrait",t[9])},m(t,n){I(t,e,n),Wt(i,e,null),s=!0},p(t,n){const r={};1024&n[1]&&(r.$$scope={dirty:n,ctx:t}),i.$set(r),(!s||512&n[0])&&H(e,"portrait",t[9])},i(t){s||(Lt(i.$$.fragment,t),t&&$t((()=>{s&&(n||(n=zt(e,_e,{},!0)),n.run(1))})),s=!0)},o(t){Pt(i.$$.fragment,t),t&&(n||(n=zt(e,_e,{},!1)),n.run(0)),s=!1},d(t){t&&L(e),Xt(i),t&&n&&n.end()}}}function Sn(t){let e,i;return e=new mn({}),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function Mn(t){let e,i,n=t[10]&&fn(t);return{c(){n&&n.c(),e=O()},m(t,s){n&&n.m(t,s),I(t,e,s),i=!0},p(t,i){t[10]?n?(n.p(t,i),1024&i[0]&&Lt(n,1)):(n=fn(t),n.c(),Lt(n,1),n.m(e.parentNode,e)):n&&(At(),Pt(n,1,1,(()=>{n=null})),It())},i(t){i||(Lt(n),i=!0)},o(t){Pt(n),i=!1},d(t){t&&L(e),n&&n.d(t)}}}function An(e,i,n){let s,r,o,a,l,c,u,m,p,f,g,v,$,w,y,b,k,T=t;h(e,Oe,(t=>n(13,k=t))),e.$$.on_destroy.push((()=>T()));let{hasAudio:x=!1}=i;const _=lt("micrio"),{current:E,state:S,isMuted:M,_lang:A}=_;h(e,E,(t=>n(30,$=t))),h(e,M,(t=>n(12,b=t))),h(e,A,(t=>n(6,w=t)));const I=S.tour;h(e,I,(t=>n(29,v=t)));const{controls:L,zoom:P,hidden:N}=_.state.ui;let C,z;function D(t){const e=t.detail;n(9,z=_.canvas.viewport.portrait),e.opts.isPassive||n(8,C=e)}function O(){n(8,C=null)}h(e,L,(t=>n(28,g=t))),h(e,P,(t=>n(5,p=t))),h(e,N,(t=>n(27,f=t)));let R=!1,F=!1,U=!1;function V(t){var e,i;P.set(!t.noZoom),L.set(!t.noControls),n(0,R=!!(null==(i=null==(e=t.ui)?void 0:e.controls)?void 0:i.cultureSwitch)),n(1,F=!!t.social),n(2,U=!!t.fullscreen)}$&&V($.$settings),rt((()=>{let t;_.addEventListener("splitscreen-start",D),_.addEventListener("splitscreen-stop",O);const e=_.current.subscribe((e=>{e&&le(e.info).then((i=>{!i||v&&"steps"in v||(null==t||t(),t=e.settings.subscribe(V))}))}));return()=>{_.removeEventListener("splitscreen-start",D),_.removeEventListener("splitscreen-stop",O),null==t||t(),e()}}));return e.$$set=t=>{"hasAudio"in t&&n(22,x=t.hasAudio)},e.$$.update=()=>{var t;1073741824&e.$$.dirty[0]&&(n(11,s=null==$?void 0:$.info),T(),T=d(s,(t=>n(31,y=t)))),1073741888&e.$$.dirty[0]|1&e.$$.dirty[1]&&n(4,r=y&&$?$.isV5?Object.keys(y.revision??{[w]:0}):(null==(t="cultures"in y?y.cultures:"")?void 0:t.split(","))??[]:[]),536870912&e.$$.dirty[0]&&n(26,o=v&&"steps"in v&&v.isSerialTour),4194304&e.$$.dirty[0]&&n(3,a="micrioAudioContext"in window||x),17&e.$$.dirty[0]&&n(25,l=R&&r.length>1),2&e.$$.dirty[0]&&n(24,c=F&&"share"in navigator),67108868&e.$$.dirty[0]&&n(23,u=U&&!o),461373480&e.$$.dirty[0]&&n(10,m=g&&!f&&(a||l||c||p||u))},[R,F,U,a,r,p,w,_,C,z,m,s,b,k,E,M,A,I,L,P,N,function(){var t,e;if(navigator.share&&(null==$?void 0:$.$info)){const i=$.$data?(null==(t=$.$data)?void 0:t.i18n)?$.$data.i18n[w]:$.$data:void 0;navigator.share({title:null==(e=$.$info)?void 0:e.title,text:(null==i?void 0:i.description)||`${$.$info.width} x ${$.$info.height} | Micrio`,url:location.href})}},x,u,c,l,o,f,g,v,$,y,()=>M.set(!b),t=>n(7,_.lang=t,_)]}class In extends Yt{constructor(t){super(),Gt(this,t,An,Mn,a,{hasAudio:22},null,[-1,-1])}}class Ln{constructor(t,e){var i;this.image=t,this.data=e,this.timeline=[],this.playing=!1,this._paused=!0,this.wasPaused=!1,this.unhookEvents=!1,this.micrio=t.wasm.micrio,this.initialView=t.camera.getView();const n="timeline"in e?e:(null==(i=e.i18n)?void 0:i[u(this.micrio._lang)])??void 0;if(!n)throw new Error("No valid content for video tour!");this.content=n,this.unhookEvents=!e.keepInteraction&&this.micrio.events.$enabled,e.instance=this,this.read(),this.micrio.events.dispatch("videotour-start",this.data)}destroy(){this.unhookEvents&&this.micrio.events.enabled.set(!0),this.playing&&(this.image.camera.stop(),this.micrio.removeAttribute("data-videotour-playing"),this.micrio.events.dispatch("videotour-stop",this.data),this.playing=!1,delete this.startedAt,delete this.data.instance,this.startAt=void 0,clearTimeout(this._to))}read(){const t=!!this.data.i18n?1:this.content.duration,e=this.content.timeline;this.timeline.length=0;for(let i=0;i<e.length;i++){const n=e[i],s=e[i-1],r=s&&s.end*t||0;this.timeline.push({view:n.rect,start:1e3*r,duration:1e3*(n.start*t-r),pauseDuration:(n.end-n.start)*t*1e3})}this.startedAt&&!this.playing&&(this.progress=this.currentTime)}get duration(){return Number(this.content.duration)}set duration(t){this.content.duration=t}get paused(){return this._paused}get ended(){return this.currentTime>=this.duration}get currentTime(){return(this.pausedAt?this.pausedAt:this.startedAt?Date.now()-this.startedAt:0)/1e3}set currentTime(t){this.setProgress(t/this.content.duration)}get progress(){return this.currentTime/this.content.duration}set progress(t){this.setProgress(t)}play(){this.startedPlaying(),this.wasPaused=!1,this.pausedAt?(this.startedAt=Date.now()-this.pausedAt,this._paused=!1,this.gotoTime(this.pausedAt),this.pausedAt=void 0):this.playing||(this.startedAt=Date.now(),void 0===this.startAt?this.gotoStep(0,0):this.gotoTime(this.duration*this.startAt*1e3),this.startAt=void 0),this._paused=!1,this.playing=!0}pause(){this._paused||null==this.currentIndex||null==this.startedAt||(this._paused=!0,this.stoppedPlaying(),clearTimeout(this._to),this.currentIndex>=0&&this.image.camera.stop(),this.ended?this.reset():this.pausedAt=Date.now()-this.startedAt)}reset(){this.stoppedPlaying(),this.pausedAt=void 0,this.playing=!1,this.read()}gotoStep(t,e){if(null==this.startedAt)return;if(clearTimeout(this._to),!this.timeline[t])return void(this.paused&&this.wasPaused||(this._to=setTimeout((()=>this.pause()),Math.round(1e3*this.duration-(Date.now()-this.startedAt)))));const i=this.timeline[t],n=Math.round(i.start-(Date.now()-this.startedAt));this.currentIndex=t,this.image.camera.stop(),n>0?this._paused||(this._to=setTimeout((()=>this.startAni(e)),n)):this.startAni(e)}nextStep(){null!=this.currentIndex&&this.gotoStep(this.currentIndex+1)}getView(t){const e=this.timeline[t];return null==e?this.initialView??this.image.camera.getView():e.view}startAni(t=0){var e;if(null==this.currentIndex||isNaN(t))return;const i=this.timeline[this.currentIndex];if(null==i)return;const n=i.view,s=this.getView(this.currentIndex-1),r=null==(e=this.image.opts)?void 0:e.area;if(this.wasPaused&&s){const e=this.micrio.wasm.e.ease(t);this.image.camera.setView([s[0]*(1-e)+n[0]*e,s[1]*(1-e)+n[1]*e,s[2]*(1-e)+n[2]*e,s[3]*(1-e)+n[3]*e],{noLimit:!0,area:r}),this.nextStep()}else this.image.camera.flyToView(n,{duration:i.duration,progress:t,prevView:s,area:r}).then((()=>{null!=this.currentIndex&&i==this.timeline[this.currentIndex]&&this.nextStep()})).catch((()=>{}))}startedPlaying(){this.micrio.setAttribute("data-videotour-playing",""),this.micrio.events.dispatch("videotour-play"),this.unhookEvents&&this.micrio.events.enabled.set(!1)}stoppedPlaying(){this.micrio.removeAttribute("data-videotour-playing"),this.micrio.events.dispatch("videotour-pause"),this.unhookEvents&&this.micrio.events.enabled.set(!0)}setProgress(t){t=Math.max(0,Math.min(1,t)),this.wasPaused=!!this.paused||!this.playing,this.pause(),this.wasPaused||(this._paused=!1,this.startedPlaying());const e=this.duration*t*1e3;this.pausedAt=e,this.gotoTime(e),this.wasPaused?this.pause():(this.pausedAt=0,this._paused=!1)}gotoTime(t){let e=null,i=0;for(;i<this.timeline.length&&!(this.timeline[i].start>t);i++)e=this.timeline[i];if(i--,e||!(i>0))if(e){this.image.camera.stop();const n=e.duration>0?(t-e.start)/e.duration:0;this.startedAt=Date.now()-e.start-e.duration*n,isNaN(this.startedAt)&&(this.startedAt=Date.now()-t),n>1?(this.gotoStep(i+1),null!=e.view&&this.image.camera.setView(e.view,{noLimit:!0})):(i>0&&this.image.camera.setView(this.timeline[i-1].view,{noLimit:!0}),this.gotoStep(i,n))}else this.timeline.length&&this.image.camera.stop(),this.paused||this.gotoStep(0)}}function Pn(t,e,i){const n=t.slice();return n[8]=e[i],n}function Nn(t){let e,i,n=[],s=new Map,r=Dt(t[1]);const o=t=>t[8];for(let a=0;a<r.length;a+=1){let e=Pn(t,r,a),i=o(e);s.set(i,n[a]=Cn(i,e))}return{c(){for(let t=0;t<n.length;t+=1)n[t].c();e=O()},m(t,s){for(let e=0;e<n.length;e+=1)n[e]&&n[e].m(t,s);I(t,e,s),i=!0},p(t,i){3&i&&(r=Dt(t[1]),At(),n=Ft(n,i,o,0,t,r,s,e.parentNode,Rt,Cn,e,Pn),It())},i(t){if(!i){for(let t=0;t<r.length;t+=1)Lt(n[t]);i=!0}},o(t){for(let e=0;e<n.length;e+=1)Pt(n[e]);i=!1},d(t){t&&L(e);for(let e=0;e<n.length;e+=1)n[e].d(t)}}}function Cn(t,e){let i,n,s,r,o,a=e[8].data+"";return{key:t,first:null,c(){i=N("div"),n=N("p"),s=z(a),V(n,"class","micrio-subtitles"),V(i,"class","micrio-subtitles"),H(i,"raised",e[0]),this.first=i},m(t,e){I(t,i,e),S(i,n),S(n,s),o=!0},p(t,n){e=t,(!o||2&n)&&a!==(a=e[8].data+"")&&Y(s,a),(!o||1&n)&&H(i,"raised",e[0])},i(t){o||(t&&$t((()=>{o&&(r||(r=zt(i,_e,{},!0)),r.run(1))})),o=!0)},o(t){t&&(r||(r=zt(i,_e,{},!1)),r.run(0)),o=!1},d(t){t&&L(i),t&&r&&r.end()}}}function zn(t){let e,i,n=t[2]&&Nn(t);return{c(){n&&n.c(),e=O()},m(t,s){n&&n.m(t,s),I(t,e,s),i=!0},p(t,[i]){t[2]?n?(n.p(t,i),4&i&&Lt(n,1)):(n=Nn(t),n.c(),Lt(n,1),n.m(e.parentNode,e)):n&&(At(),Pt(n,1,1,(()=>{n=null})),It())},i(t){i||(Lt(n),i=!0)},o(t){Pt(n),i=!1},d(t){t&&L(e),n&&n.d(t)}}}window.MicrioVideoTour=Ln;const Dn="micrio-captions-disable",On=Ht("1"!=localStorage.getItem(Dn));function Rn(e,i,n){let s,r,o=t;h(e,On,(t=>n(2,r=t))),e.$$.on_destroy.push((()=>o()));let{src:a}=i,{raised:l=!1}=i;const c=[];fetch(a).then((t=>t.text())).then((t=>{const e=t.split("\n");for(let i=0;i<e.length;i++)if(/-->/.test(e[i])){let t=i+1;const n=[];for(;!e[t]&&t<e.length;)t++;for(;e[t]&&e[t].trim();)n.push(e[t++]);const[s,r]=e[i].split(" --\x3e ").map((t=>t.trim().replace(",",".").split(":").map(Number))).map((t=>3600*t[0]+60*t[1]+t[2]));c.push({start:s,end:r,data:n.join("\n")}),i+=n.length+1}}));const d=lt("micrio");let u=0;const m=t=>n(4,u=t.detail);return rt((()=>(d.addEventListener("timeupdate",m),()=>d.removeEventListener("timeupdate",m)))),e.$$set=t=>{"src"in t&&n(3,a=t.src),"raised"in t&&n(0,l=t.raised)},e.$$.update=()=>{16&e.$$.dirty&&n(1,s=c.filter((t=>t.start<=u&&t.end>=u)))},[l,s,r,a,u]}On.subscribe((t=>{t?localStorage.removeItem(Dn):localStorage.setItem(Dn,"1")}));class Fn extends Yt{constructor(t){super(),Gt(this,t,Rn,zn,a,{src:3,raised:0})}}function Un(t){let e,i,n,s,o,a,l,c,d=ae(t[2]||t[0]<=0?t[1]:(t[0]||0)-t[1])+"";const u=t[4].default,h=m(u,t,t[3],null);return{c(){e=N("div"),i=N("div"),h&&h.c(),n=N("div"),s=z(d),V(i,"class","bars micrio-progress-bar"),V(n,"class","time micrio-progress-bar"),V(e,"class","container micrio-progress-bar"),V(e,"style",o=`--progress: ${Math.round((t[0]||0)/t[1]*1e4)/100}%;--time: '${ae(t[0]||0)}';`)},m(r,o){I(r,e,o),S(e,i),h&&h.m(i,null),S(e,n),S(n,s),a=!0,l||(c=[R(e,"click",U(t[5])),R(e,"keydown",U(t[6]))],l=!0)},p(t,[i]){h&&h.p&&(!a||8&i)&&g(h,u,t,t[3],a?f(u,t[3],i,null):v(t[3]),null),(!a||7&i)&&d!==(d=ae(t[2]||t[0]<=0?t[1]:(t[0]||0)-t[1])+"")&&Y(s,d),(!a||3&i&&o!==(o=`--progress: ${Math.round((t[0]||0)/t[1]*1e4)/100}%;--time: '${ae(t[0]||0)}';`))&&V(e,"style",o)},i(t){a||(Lt(h,t),a=!0)},o(t){Pt(h,t),a=!1},d(t){t&&L(e),h&&h.d(t),l=!1,r(c)}}}function Vn(t,e,i){let{$$slots:n={},$$scope:s}=e,{currentTime:r=0}=e,{duration:o}=e,{ended:a=!1}=e;return t.$$set=t=>{"currentTime"in t&&i(0,r=t.currentTime),"duration"in t&&i(1,o=t.duration),"ended"in t&&i(2,a=t.ended),"$$scope"in t&&i(3,s=t.$$scope)},[r,o,a,s,n,function(e){ct.call(this,t,e)},function(e){ct.call(this,t,e)}]}class Bn extends Yt{constructor(t){super(),Gt(this,t,Vn,Un,a,{currentTime:0,duration:1,ended:2})}}function qn(t){let e,i,n;return{c(){e=C("svg"),i=C("circle"),V(i,"r","19"),V(i,"cx","21"),V(i,"cy","21"),V(i,"stroke-dashoffset",n=119.4*(1-t[0]/t[2])),V(i,"class","micrio-media-controls"),V(e,"height","42"),V(e,"width","42"),V(e,"class","micrio-media-controls")},m(t,n){I(t,e,n),S(e,i)},p(t,e){5&e&&n!==(n=119.4*(1-t[0]/t[2]))&&V(i,"stroke-dashoffset",n)},d(t){t&&L(e)}}}function Wn(t){let e,i=t[5]&&t[0]>0&&qn(t);return{c(){i&&i.c(),e=O()},m(t,n){i&&i.m(t,n),I(t,e,n)},p(t,n){t[5]&&t[0]>0?i?i.p(t,n):(i=qn(t),i.c(),i.m(e.parentNode,e)):i&&(i.d(1),i=null)},d(t){t&&L(e),i&&i.d(t)}}}function Xn(t){let e,i,n,s,r=t[10]&&Gn(t),o=t[8]&&Yn(t),a=!!t[7]&&jn(t);return{c(){r&&r.c(),e=D(),o&&o.c(),i=D(),a&&a.c(),n=O()},m(t,l){r&&r.m(t,l),I(t,e,l),o&&o.m(t,l),I(t,i,l),a&&a.m(t,l),I(t,n,l),s=!0},p(t,s){t[10]?r?(r.p(t,s),1024&s&&Lt(r,1)):(r=Gn(t),r.c(),Lt(r,1),r.m(e.parentNode,e)):r&&(At(),Pt(r,1,1,(()=>{r=null})),It()),t[8]?o?(o.p(t,s),256&s&&Lt(o,1)):(o=Yn(t),o.c(),Lt(o,1),o.m(i.parentNode,i)):o&&(At(),Pt(o,1,1,(()=>{o=null})),It()),t[7]?a?(a.p(t,s),128&s&&Lt(a,1)):(a=jn(t),a.c(),Lt(a,1),a.m(n.parentNode,n)):a&&(At(),Pt(a,1,1,(()=>{a=null})),It())},i(t){s||(Lt(r),Lt(o),Lt(a),s=!0)},o(t){Pt(r),Pt(o),Pt(a),s=!1},d(t){t&&(L(e),L(i),L(n)),r&&r.d(t),o&&o.d(t),a&&a.d(t)}}}function Gn(t){let e,i;return e=new Ui({props:{disabled:t[3],type:t[4]?"volume-off":"volume-up",title:t[4]?t[11].audioUnmute:t[11].audioMute}}),e.$on("click",t[19]),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};8&i&&(n.disabled=t[3]),16&i&&(n.type=t[4]?"volume-off":"volume-up"),2064&i&&(n.title=t[4]?t[11].audioUnmute:t[11].audioMute),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function Yn(t){let e,i;return e=new Ui({props:{type:t[12]?"subtitles":"subtitles-off",active:t[12],title:t[11].subtitlesToggle}}),e.$on("click",t[20]),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};4096&i&&(n.type=t[12]?"subtitles":"subtitles-off"),4096&i&&(n.active=t[12]),2048&i&&(n.title=t[11].subtitlesToggle),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function jn(t){let e,i;return e=new cn({props:{el:t[7]}}),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};128&i&&(n.el=t[7]),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function Hn(t){let e,i,n,s;function r(e){t[22](e)}function o(e){t[23](e)}let a={duration:t[2],$$slots:{default:[Zn]},$$scope:{ctx:t}};return void 0!==t[0]&&(a.currentTime=t[0]),void 0!==t[1]&&(a.ended=t[1]),e=new Bn({props:a}),ut.push((()=>Bt(e,"currentTime",r))),ut.push((()=>Bt(e,"ended",o))),{c(){qt(e.$$.fragment)},m(t,i){Wt(e,t,i),s=!0},p(t,s){const r={};4&s&&(r.duration=t[2]),134218245&s&&(r.$$scope={dirty:s,ctx:t}),!i&&1&s&&(i=!0,r.currentTime=t[0],wt((()=>i=!1))),!n&&2&s&&(n=!0,r.ended=t[1],wt((()=>n=!1))),e.$set(r)},i(t){s||(Lt(e.$$.fragment,t),s=!0)},o(t){Pt(e.$$.fragment,t),s=!1},d(t){Xt(e,t)}}}function Zn(t){let e,i,n,s;return{c(){e=N("div"),V(e,"class","bar active"),V(e,"style",i=`--perc:${t[0]/t[2]*100}%;`)},m(i,r){I(i,e,r),t[21](e),n||(s=R(e,"mousedown",t[14]),n=!0)},p(t,n){5&n&&i!==(i=`--perc:${t[0]/t[2]*100}%;`)&&V(e,"style",i)},d(i){i&&L(e),t[21](null),n=!1,s()}}}function Kn(t){let e,i,n,s,o,a,l,c;i=new Ui({props:{type:t[6]?"play":"pause",title:t[6]?t[11].play:t[11].pause,$$slots:{default:[Wn]},$$scope:{ctx:t}}}),i.$on("click",t[18]);let d=!t[5]&&Xn(t),u=!t[5]&&Hn(t);return{c(){e=N("aside"),qt(i.$$.fragment),n=D(),d&&d.c(),s=D(),u&&u.c(),o=O(),V(e,"class","micrio-media-controls")},m(r,h){I(r,e,h),Wt(i,e,null),S(e,n),d&&d.m(e,null),I(r,s,h),u&&u.m(r,h),I(r,o,h),a=!0,l||(c=[R(e,"click",U(t[16])),R(e,"keydown",U(t[17]))],l=!0)},p(t,[n]){const s={};64&n&&(s.type=t[6]?"play":"pause"),2112&n&&(s.title=t[6]?t[11].play:t[11].pause),134217765&n&&(s.$$scope={dirty:n,ctx:t}),i.$set(s),t[5]?d&&(At(),Pt(d,1,1,(()=>{d=null})),It()):d?(d.p(t,n),32&n&&Lt(d,1)):(d=Xn(t),d.c(),Lt(d,1),d.m(e,null)),t[5]?u&&(At(),Pt(u,1,1,(()=>{u=null})),It()):u?(u.p(t,n),32&n&&Lt(u,1)):(u=Hn(t),u.c(),Lt(u,1),u.m(o.parentNode,o))},i(t){a||(Lt(i.$$.fragment,t),Lt(d),Lt(u),a=!0)},o(t){Pt(i.$$.fragment,t),Pt(d),Pt(u),a=!1},d(t){t&&(L(e),L(s),L(o)),Xt(i),d&&d.d(),u&&u.d(t),l=!1,r(c)}}}function Jn(t,e,i){let n,s,r;h(t,Oe,(t=>i(11,s=t))),h(t,On,(t=>i(12,r=t)));let{currentTime:o=0}=e,{duration:a=0}=e,{seeking:l=!0}=e,{muted:c=!1}=e,{minimal:d=!1}=e,{volume:u}=e,{paused:m}=e,{ended:p}=e,{fullscreen:f}=e,{subtitles:g=!1}=e;const v=ot();let $;function w(t){const e=$.getClientRects()[0],i=Math.min(1,Math.max(0,(t.clientX-e.left)/e.width));v("seek",i*a)}function y(){window.removeEventListener("mousemove",w),window.removeEventListener("mouseup",y)}return t.$$set=t=>{"currentTime"in t&&i(0,o=t.currentTime),"duration"in t&&i(2,a=t.duration),"seeking"in t&&i(3,l=t.seeking),"muted"in t&&i(4,c=t.muted),"minimal"in t&&i(5,d=t.minimal),"volume"in t&&i(15,u=t.volume),"paused"in t&&i(6,m=t.paused),"ended"in t&&i(1,p=t.ended),"fullscreen"in t&&i(7,f=t.fullscreen),"subtitles"in t&&i(8,g=t.subtitles)},t.$$.update=()=>{32768&t.$$.dirty&&i(10,n=!isNaN(u))},[o,p,a,l,c,d,m,f,g,$,n,s,r,v,function(t){0==t.button&&(window.addEventListener("mousemove",w),window.addEventListener("mouseup",y),w(t))},u,function(e){ct.call(this,t,e)},function(e){ct.call(this,t,e)},()=>v("playpause"),()=>v("mute"),()=>On.set(!r),function(t){ut[t?"unshift":"push"]((()=>{$=t,i(9,$)}))},function(t){o=t,i(0,o)},function(t){p=t,i(1,p)}]}class Qn extends Yt{constructor(t){super(),Gt(this,t,Jn,Kn,a,{currentTime:0,duration:2,seeking:3,muted:4,minimal:5,volume:15,paused:6,ended:1,fullscreen:7,subtitles:8})}}function ts(t,e,i){let{events:n}=e,{currentTime:s=0}=e,{duration:r}=e;const o=lt("micrio");n.forEach((t=>{t.start=Number(t.start||0),t.end=Math.min(Number(t.end||0),r)}));const a=t=>n.forEach((e=>{const i=e.start<=t&&e.end>=t;i!=!!e.active&&(e.active=i,o.events.dispatch("tour-event",{...e}))}));var l;return l=()=>a(1/0),st().$$.on_destroy.push(l),t.$$set=t=>{"events"in t&&i(0,n=t.events),"currentTime"in t&&i(1,s=t.currentTime),"duration"in t&&i(2,r=t.duration)},t.$$.update=()=>{2&t.$$.dirty&&a(s)},[n,s,r]}let es=class extends Yt{constructor(t){super(),Gt(this,t,ts,null,a,{events:0,currentTime:1,duration:2})}};function is(t){var e;let i,n,s,r,o,a,l,c,d,u,h,m;let p=(f=t)[42]==f[40].IFrame?os:f[42]==f[40].Video?rs:f[42]!=f[40].Audio||f[44]?f[42]==f[40].Micrio&&f[43]?ns:void 0:ss;var f;let g=p&&p(t),v=(null==(e=t[33])?void 0:e.length)&&t[7]>0&&!t[34]&&cs(t),w=t[4]&&ds(t),y=t[14]&&us(t),b=t[26]&&hs(t);return{c(){i=N("figure"),n=N("div"),g&&g.c(),s=D(),v&&v.c(),r=D(),w&&w.c(),a=D(),y&&y.c(),c=D(),b&&b.c(),d=O(),V(n,"style",o=1==t[22]||t[42]!=t[40].Video&&t[37].is360?"":`transform:scale(${t[22]})`),V(n,"class","micrio-media"),H(n,"videotour",!!t[21]),V(i,"class",l=$(t[17])+" micrio-media"),V(i,"style",null),H(i,"paused",t[5]),H(i,"is360",t[15]),H(i,"media-video",t[42]==t[40].IFrame||t[42]==t[40].Video),H(i,"media-micrio",t[42]==t[40].Micrio)},m(e,o){var l;I(e,i,o),S(i,n),g&&g.m(n,null),S(n,s),v&&v.m(n,null),S(n,r),w&&w.m(n,null),S(i,a),y&&y.m(i,null),t[84](i),I(e,c,o),b&&b.m(e,o),I(e,d,o),u=!0,h||(m=R(n,"pointerup",(l=t[47],function(t){t.target===this&&l.call(this,t)})),h=!0)},p(t,e){var s;g&&g.p(t,e),(null==(s=t[33])?void 0:s.length)&&t[7]>0&&!t[34]?v?(v.p(t,e),128&e[0]|12&e[1]&&Lt(v,1)):(v=cs(t),v.c(),Lt(v,1),v.m(n,r)):v&&(At(),Pt(v,1,1,(()=>{v=null})),It()),t[4]?w?(w.p(t,e),16&e[0]&&Lt(w,1)):(w=ds(t),w.c(),Lt(w,1),w.m(n,null)):w&&(At(),Pt(w,1,1,(()=>{w=null})),It()),(!u||4194304&e[0]&&o!==(o=1==t[22]||t[42]!=t[40].Video&&t[37].is360?"":`transform:scale(${t[22]})`))&&V(n,"style",o),(!u||2097152&e[0])&&H(n,"videotour",!!t[21]),t[14]?y?y.p(t,e):(y=us(t),y.c(),y.m(i,null)):y&&(y.d(1),y=null),(!u||131072&e[0]&&l!==(l=$(t[17])+" micrio-media"))&&V(i,"class",l),(!u||131104&e[0])&&H(i,"paused",t[5]),(!u||163840&e[0])&&H(i,"is360",t[15]),(!u||131072&e[0]|2560&e[1])&&H(i,"media-video",t[42]==t[40].IFrame||t[42]==t[40].Video),(!u||131072&e[0]|2560&e[1])&&H(i,"media-micrio",t[42]==t[40].Micrio),t[26]?b?(b.p(t,e),67108864&e[0]&&Lt(b,1)):(b=hs(t),b.c(),Lt(b,1),b.m(d.parentNode,d)):b&&(At(),Pt(b,1,1,(()=>{b=null})),It())},i(t){u||(Lt(v),Lt(w),Lt(b),u=!0)},o(t){Pt(v),Pt(w),Pt(b),u=!1},d(e){e&&(L(i),L(c),L(d)),g&&g.d(),v&&v.d(),w&&w.d(),y&&y.d(),t[84](null),b&&b.d(e),h=!1,m()}}}function ns(e){let i;return{c(){i=N("micr-io"),X(i,"data-logo","false"),X(i,"id",e[43][0]),X(i,"width",e[43][1]),X(i,"height",e[43][2]),X(i,"lang",e[43][3]),X(i,"data-path",e[37].path)},m(t,e){I(t,i,e)},p:t,d(t){t&&L(i)}}}function ss(t){let e,i,n,s,o,a=!1,l=!0;function d(){cancelAnimationFrame(n),e.paused||(n=k(d),a=!0),t[69].call(e)}return{c(){e=N("audio"),c(e.src,i=t[23])||V(e,"src",i),e.controls=!1,void 0===t[7]&&$t((()=>t[67].call(e))),void 0===t[6]&&$t((()=>t[70].call(e)))},m(i,n){I(i,e,n),t[66](e),e.muted=t[1],s||(o=[R(e,"durationchange",t[67]),R(e,"volumechange",t[68]),R(e,"timeupdate",d),R(e,"seeking",t[70]),R(e,"seeked",t[70]),R(e,"play",t[71]),R(e,"pause",t[71]),R(e,"canplay",t[72]),R(e,"ended",t[50])],s=!0)},p(t,n){8388608&n[0]&&!c(e.src,i=t[23])&&V(e,"src",i),2&n[0]&&(e.muted=t[1]),!a&&256&n[0]&&!isNaN(t[8])&&(e.currentTime=t[8]),a=!1,32&n[0]&&l!==(l=t[5])&&e[l?"pause":"play"]()},d(i){i&&L(e),t[66](null),s=!1,r(o)}}}function rs(t){let e,i,n,s,o,a,l,c=!1,d=!0,u=t[23]&&as(t);function h(){cancelAnimationFrame(o),e.paused||(o=k(h),c=!0),t[63].call(e)}return{c(){e=N("video"),u&&u.c(),e.controls=!1,e.loop=i=t[11]&&(null==t[12]||t[12]<=0),e.playsInline=!0,V(e,"width",t[9]),V(e,"height",t[10]),V(e,"style",n=t[29]?"opacity: 0":void 0),e.autoplay=s=!!t[3],V(e,"class","micrio-media"),void 0===t[7]&&$t((()=>t[61].call(e))),void 0===t[6]&&$t((()=>t[64].call(e)))},m(i,n){I(i,e,n),u&&u.m(e,null),t[60](e),e.muted=t[1],a||(l=[R(e,"durationchange",t[61]),R(e,"volumechange",t[62]),R(e,"timeupdate",h),R(e,"seeking",t[64]),R(e,"seeked",t[64]),R(e,"play",t[65]),R(e,"pause",t[65]),R(e,"canplay",t[46]),R(e,"ended",t[50])],a=!0)},p(t,r){t[23]?u?u.p(t,r):(u=as(t),u.c(),u.m(e,null)):u&&(u.d(1),u=null),6144&r[0]&&i!==(i=t[11]&&(null==t[12]||t[12]<=0))&&(e.loop=i),512&r[0]&&V(e,"width",t[9]),1024&r[0]&&V(e,"height",t[10]),536870912&r[0]&&n!==(n=t[29]?"opacity: 0":void 0)&&V(e,"style",n),8&r[0]&&s!==(s=!!t[3])&&(e.autoplay=s),2&r[0]&&(e.muted=t[1]),!c&&256&r[0]&&!isNaN(t[8])&&(e.currentTime=t[8]),c=!1,32&r[0]&&d!==(d=t[5])&&e[d?"pause":"play"]()},d(i){i&&L(e),u&&u.d(),t[60](null),a=!1,r(l)}}}function os(t){let e,n,s=[{credentialless:!0},{title:t[13]},{src:n=t[23]},{width:t[32]},{height:t[31]},{frameborder:"0"},{allow:"fullscreen *;autoplay *;encrypted-media *"}],r={};for(let o=0;o<s.length;o+=1)r=i(r,s[o]);return{c(){e=N("iframe"),q(e,r),H(e,"hooked",t[24]&&!t[27]),H(e,"micrio-media",!0)},m(i,n){I(i,e,n),t[59](e)},p(t,i){q(e,r=Ut(s,[{credentialless:!0},8192&i[0]&&{title:t[13]},8388608&i[0]&&!c(e.src,n=t[23])&&{src:n},2&i[1]&&{width:t[32]},1&i[1]&&{height:t[31]},{frameborder:"0"},{allow:"fullscreen *;autoplay *;encrypted-media *"}])),H(e,"hooked",t[24]&&!t[27]),H(e,"micrio-media",!0)},d(i){i&&L(e),t[59](null)}}}function as(t){let e,i,n=t[19]&&t[23].endsWith(".webm"),s=n&&ls(t);return{c(){s&&s.c(),e=N("source"),c(e.src,i=t[23])||V(e,"src",i),V(e,"type",t[41]?"application/x-mpegURL":void 0)},m(t,i){s&&s.m(t,i),I(t,e,i)},p(t,r){8912896&r[0]&&(n=t[19]&&t[23].endsWith(".webm")),n?s?s.p(t,r):(s=ls(t),s.c(),s.m(e.parentNode,e)):s&&(s.d(1),s=null),8388608&r[0]&&!c(e.src,i=t[23])&&V(e,"src",i)},d(t){t&&L(e),s&&s.d(t)}}}function ls(t){let e,i;return{c(){e=N("source"),c(e.src,i=t[23].replace(".webm",".mp4"))||V(e,"src",i),V(e,"type","video/mp4;codecs=hvc1")},m(t,i){I(t,e,i)},p(t,n){8388608&n[0]&&!c(e.src,i=t[23].replace(".webm",".mp4"))&&V(e,"src",i)},d(t){t&&L(e)}}}function cs(t){let e,i,n,s;function r(e){t[73](e)}function o(e){t[74](e)}let a={events:t[33]};return void 0!==t[8]&&(a.currentTime=t[8]),void 0!==t[7]&&(a.duration=t[7]),e=new es({props:a}),ut.push((()=>Bt(e,"currentTime",r))),ut.push((()=>Bt(e,"duration",o))),{c(){qt(e.$$.fragment)},m(t,i){Wt(e,t,i),s=!0},p(t,s){const r={};4&s[1]&&(r.events=t[33]),!i&&256&s[0]&&(i=!0,r.currentTime=t[8],wt((()=>i=!1))),!n&&128&s[0]&&(n=!0,r.duration=t[7],wt((()=>n=!1))),e.$set(r)},i(t){s||(Lt(e.$$.fragment,t),s=!0)},o(t){Pt(e.$$.fragment,t),s=!1},d(t){Xt(e,t)}}}function ds(t){let e,i,n,s,r,o,a,l,c,d;function u(e){t[75](e)}function h(e){t[76](e)}function m(e){t[77](e)}function p(e){t[78](e)}function f(e){t[79](e)}function g(e){t[80](e)}function v(e){t[81](e)}let $={subtitles:!!t[45],fullscreen:t[15]||t[42]!=t[40].IFrame&&t[42]!=t[40].Video?t[16]:t[30]};return void 0!==t[5]&&($.paused=t[5]),void 0!==t[6]&&($.seeking=t[6]),void 0!==t[7]&&($.duration=t[7]),void 0!==t[8]&&($.currentTime=t[8]),void 0!==t[1]&&($.muted=t[1]),void 0!==t[0]&&($.volume=t[0]),void 0!==t[28]&&($.ended=t[28]),i=new Qn({props:$}),ut.push((()=>Bt(i,"paused",u))),ut.push((()=>Bt(i,"seeking",h))),ut.push((()=>Bt(i,"duration",m))),ut.push((()=>Bt(i,"currentTime",p))),ut.push((()=>Bt(i,"muted",f))),ut.push((()=>Bt(i,"volume",g))),ut.push((()=>Bt(i,"ended",v))),i.$on("playpause",t[47]),i.$on("mute",t[82]),i.$on("seek",t[83]),{c(){e=N("aside"),qt(i.$$.fragment),V(e,"class","micrio-media"),H(e,"inside","inside"==t[4])},m(t,n){I(t,e,n),Wt(i,e,null),d=!0},p(t,u){const h={};1073840128&u[0]&&(h.fullscreen=t[15]||t[42]!=t[40].IFrame&&t[42]!=t[40].Video?t[16]:t[30]),!n&&32&u[0]&&(n=!0,h.paused=t[5],wt((()=>n=!1))),!s&&64&u[0]&&(s=!0,h.seeking=t[6],wt((()=>s=!1))),!r&&128&u[0]&&(r=!0,h.duration=t[7],wt((()=>r=!1))),!o&&256&u[0]&&(o=!0,h.currentTime=t[8],wt((()=>o=!1))),!a&&2&u[0]&&(a=!0,h.muted=t[1],wt((()=>a=!1))),!l&&1&u[0]&&(l=!0,h.volume=t[0],wt((()=>l=!1))),!c&&268435456&u[0]&&(c=!0,h.ended=t[28],wt((()=>c=!1))),i.$set(h),(!d||16&u[0])&&H(e,"inside","inside"==t[4])},i(t){d||(Lt(i.$$.fragment,t),d=!0)},o(t){Pt(i.$$.fragment,t),d=!1},d(t){t&&L(e),Xt(i)}}}function us(t){let e;return{c(){e=N("figcaption"),V(e,"class","micrio-media")},m(i,n){I(i,e,n),e.innerHTML=t[14]},p(t,i){16384&i[0]&&(e.innerHTML=t[14])},d(t){t&&L(e)}}}function hs(t){let e,i,n,s,r;return i=new Ui({props:{title:t[35].play,type:"play"}}),{c(){e=N("div"),qt(i.$$.fragment),V(e,"class","show-play micrio-media")},m(o,a){I(o,e,a),Wt(i,e,null),n=!0,s||(r=R(e,"pointerup",t[48]),s=!0)},p(t,e){const n={};16&e[1]&&(n.title=t[35].play),i.$set(n)},i(t){n||(Lt(i.$$.fragment,t),n=!0)},o(t){Pt(i.$$.fragment,t),n=!1},d(t){t&&L(e),Xt(i),s=!1,r()}}}function ms(t){let e,i,n=!t[20].$settings.noUI&&is(t);return{c(){n&&n.c(),e=O()},m(t,s){n&&n.m(t,s),I(t,e,s),i=!0},p(t,i){t[20].$settings.noUI?n&&(At(),Pt(n,1,1,(()=>{n=null})),It()):n?(n.p(t,i),1048576&i[0]&&Lt(n,1)):(n=is(t),n.c(),Lt(n,1),n.m(e.parentNode,e))},i(t){i||(Lt(n),i=!0)},o(t){Pt(n),i=!1},d(t){t&&L(e),n&&n.d(t)}}}const ps=new Audio,fs=/((?:https?:)?\/\/)?((?:www|m)\.)?((?:youtube\.com|youtu.be|youtube-nocookie\.com))(\/(?:[\w\-]+\?v=|embed\/|v\/)?)([\w\-]+)(\S+)?/,gs="https://www.youtube-nocookie.com",vs=/vimeo\.com/,$s=/^.*t=(\d+).*$/;function ws(e,i,n){var s,r,o,a;let l,c,m,p,f,g,v,$,w=t,y=()=>(w(),w=d(W,(t=>n(34,v=t))),W);h(e,Oe,(t=>n(35,$=t))),e.$$.on_destroy.push((()=>w()));let{src:b}=i,{volume:k=1}=i,{width:T=640}=i,{height:x=380}=i,{frameScale:_=1}=i,{autoplay:E=!1}=i,{loop:S=!1}=i,{loopDelay:M}=i,{controls:A=!1}=i,{title:I}=i,{figcaption:L=null}=i,{paused:P=!0}=i,{forcePause:N}=i,{seeking:C=!0}=i,{duration:z=-1}=i,{currentTime:D=0}=i,{muted:O=0==k}=i;const R=O;let{is360:F=!1}=i,{tour:U=null}=i,{secondary:V=!1}=i,{fullscreen:B}=i,{className:q=null}=i,{destroying:W}=i;y();let{hasTransparentH265:X=!1}=i,{noPlayOverlay:G=!1}=i,{uuid:Y=""}=i;Y+=b??(null==U?void 0:U.id);const j=lt("micrio");let{image:H=u(j.current)}=i;const Z=H.$info,K=ot(),{events:J,state:Q,_lang:tt}=j;h(e,tt,(t=>n(58,f=t)));const et=lt("volume");h(e,et,(t=>n(96,g=t)));const it=0==g;let nt;const st=Q.mediaState.get(Y);st&&(D=st.currentTime,E=!(P=st.paused)),Q.mediaState.set(Y,{get currentTime(){return D},set currentTime(t){Vt(t)},get paused(){return P},set paused(t){t?Ut():Ft()}}),b&&/<iframe /.test(b)&&(b=b.replace(/^.* src="([^"]+)".*$/,"$1")),(null==b?void 0:b.startsWith("video://"))&&(b=b.replace("video:","https:"));var at=(t=>(t[t.None=0]="None",t[t.IFrame=1]="IFrame",t[t.Video=2]="Video",t[t.Audio=3]="Audio",t[t.VideoTour=4]="VideoTour",t[t.Micrio=5]="Micrio",t))(at||{});let ct=b;const dt=b&&b.startsWith("cfvid://"),ht=b&&b.toLowerCase(),mt=ht?ht.endsWith("mp3")?3:ht.endsWith(".mp4")||ht.endsWith(".webm")||dt?2:ht.startsWith("micrio://")?5:ht.startsWith("http")?1:0:U?4:0,pt=5==mt?null==b?void 0:b.slice(9).split(","):null;let ft,gt,vt,$t;pt&&(P=!1);let wt=-1,yt=!1;const bt=3==mt&&ie.iOS;let kt,{_media:Tt}=i;const xt=j.hasAttribute("data-native-frame"),_t=b&&fs.exec(b);if(b&&!xt&&_t&&_t[5])if("playlist"==_t[5]){const t=/list=([^&]+)/.exec(b);(null==t?void 0:t[1])&&(ct=`${gs}/embed/videoseries?list=${t[1]}`)}else{ft=1;const t=Math.round(($s.test(b)?Number(b.replace($s,"$1")):D)??0);ct=`${gs}/embed/${_t[5]}?autoplay=0&enablejsapi=1&controls=0&start=${t}`,yt=!0}if(!xt&&b&&vs.test(b)){const t=b.match(/\/(\d+)/);if(t&&t[1]){const e=b.slice(b.indexOf(t[1])+t[1].length+1).replace(/\?.*$/,"");ft=2,ct=`https://player.vimeo.com/video/${t[1]}?${e?`h=${e}&`:""}title=0&portrait=0&sidedock=0&byline=0&controls=0#t=`+Math.round(D)+"s",yt=!0}}let Et,St;dt&&b&&(Et=`https://videodelivery.net/${b.slice(8)}/manifest/video.m3u8`,ct=void 0),U&&(St=new Ln(H,U),D>0&&(St.currentTime=D),4==mt&&(z="duration"in U?Number(U.duration):(null==(r=null==(s=U.i18n)?void 0:s[f])?void 0:r.duration)??0,k=NaN)),(5==mt||1==mt&&!ft)&&(A=!1);const Mt=U&&!("steps"in U)?"subtitle"in U?U.subtitle:null==(a=null==(o=U.i18n)?void 0:o[j.lang])?void 0:a.subtitle:void 0,At=Mt&&("fileUrl"in Mt?Mt.fileUrl:Mt.src),It=lt("srt");function Lt(){n(6,C=!1),F&&H&&!H._video&&H.video.set(Tt)}let Pt=!1;function Nt(){n(26,Pt=!1),n(5,P=!1),St&&Tt&&(n(21,St.duration=Tt.duration,St),n(21,St.currentTime=Tt.currentTime,St),St.play())}const Ct=async()=>Tt?Tt.paused:St?P:gt?[-1,0,2].indexOf(gt.getPlayerState())>=0:1==ft?P:!!vt&&await vt.getPaused();let zt=!1,Dt=!1;const Ot=lt("mediaPaused");let Rt;async function Ft(t){if(!(t&&t instanceof PointerEvent&&0!=t.button)&&(!Dt||await Ct())){switch(n(28,Wt=!1),z>0&&D>=z&&n(8,D=0),!V&&At&&It.set(At),mt){case 4:n(5,P=n(6,C=!1)),St.play(),Gt();break;case 3:case 2:null==Tt||Tt.addEventListener("play",Nt,{once:!0}),null==Tt||Tt.play().catch((t=>{G?n(5,P=!0):/pause\(\)/.test(t.toString())||(n(26,Pt=!0),K("blocked"))}));break;case 1:switch(ft){case 1:gt&&gt.playVideo();break;case 2:vt&&vt.play()}break;default:return}Dt=!0,J.dispatch("media-play"),Ot.set(!1),K("play"),F||it||St&&!Tt||et.set(H.$settings.mutedVolume||0)}}function Ut(){J.dispatch("media-pause"),Ot.set(!0),Tt?(Tt.pause(),bt&&n(5,P=!0)):St?(St.pause(),n(5,P=!0),Yt()):(null==gt?void 0:gt.pauseVideo)&&!Kt?gt.pauseVideo():(null==vt?void 0:vt.pause)&&vt.pause()}function Vt(t){n(6,C=!0),Tt?n(2,Tt.currentTime=t,Tt):St?(n(8,D=n(21,St.currentTime=t,St)),n(6,C=!1)):(null==gt?void 0:gt.seekTo)?gt.seekTo(t):(null==vt?void 0:vt.setCurrentTime)&&vt.setCurrentTime(t)}function Bt(){St?(n(8,D=St.currentTime),St.ended&&Xt()):(null==gt?void 0:gt.getCurrentTime)&&n(8,D=gt.getCurrentTime()),qt()}function qt(){V||J.dispatch("timeupdate",D)}let Wt=!1;function Xt(){Wt||(St?Ut():(n(5,P=!0),Yt()),n(28,Wt=!0),J.dispatch("media-ended"),K("ended"),Zt())}function Gt(){wt>=0||(wt=setInterval(Bt,250),Bt())}function Yt(){clearInterval(wt),wt=-1}async function jt(){if(dt&&!Te(Tt))return oe("https://i.micr.io/hls-1.5.17.min.js",void 0,"Hls"in window?{}:void 0).then((()=>{$t=new window.Hls,$t.loadSource(Et),Tt&&$t.attachMedia(Tt)}));if(1==mt){if(1==ft)return async function(){if(!gt){if(window.YT||await oe("https://i.micr.io/youtube.js","onYouTubeIframeAPIReady"),window.YT)return n(6,C=!0),new Promise(((t,e)=>{gt=new window.YT.Player(kt,{host:gs,width:m.toString(),height:p.toString(),playerVars:{controls:0},events:{onError:e,onReady:()=>{Kt?e():(n(1,O=gt.isMuted()),n(7,z=gt.getDuration()),n(6,C=!1),t())},onStateChange:t=>{switch(t.data){case-1:n(27,zt=n(5,P=!0)),Yt();break;case 0:Xt();break;case 1:Gt(),n(27,zt=n(5,P=n(6,C=!1)));break;case 2:n(5,P=!0),Yt();break;case 3:Bt(),n(6,C=!0),Yt()}}}})}));n(24,yt=!1)}}();if(2==ft)return async function(){if(!vt){if(window.Vimeo||await oe("https://i.micr.io/vimeo.min.js"),window.Vimeo)return n(6,C=!0),new Promise(((t,e)=>{const i=vt=new window.Vimeo.Player(kt,{width:m.toString(),height:p.toString(),title:!1,autoplay:!1});i.on("error",e),i.on("loaded",(()=>i.getVolume().then((i=>{Kt?e():(n(1,O=0==n(0,k=i)),t())})))),i.on("play",(()=>n(5,P=n(6,C=!1)))),i.on("bufferstart",(()=>n(6,C=!0))),i.on("seeked",(()=>{n(6,C=!1)})),i.on("pause",(()=>n(5,P=!0))),i.on("volumechange",(t=>{t&&n(1,O=0==n(0,k=t.volume))})),i.on("timeupdate",(t=>{t&&(n(7,z=t.duration),n(8,D=t.seconds))})),i.on("ended",Xt)}));n(24,yt=!1)}}()}else Tt&&(dt&&n(23,ct=Et),function(){if(!Tt)return;n(2,Tt.ontimeupdate=qt,Tt),St&&(n(2,Tt.onpause=()=>St.pause(),Tt),n(2,Tt.onseeked=()=>{Tt&&!Tt.ended&&(n(21,St.currentTime=Tt.currentTime,St),Ht&&(Tt.pause(),Ht=!1))},Tt));D>0&&(Tt.duration>0?n(2,Tt.currentTime=D,Tt):n(2,Tt.oncanplay=()=>{Tt&&(n(2,Tt.oncanplay=null,Tt),E||(Tt.play(),Ht=!0),n(2,Tt.currentTime=nt,Tt))},Tt));const t=S&&void 0!==M?M:-1;t>0&&n(2,Tt.onended=()=>{clearTimeout(Rt),Rt=setTimeout((()=>{N||null==Tt||Tt.play()}),1e3*t)},Tt)}())}let Ht=!1;function Zt(){it||et.set(1)}let Kt=!1;const Jt=W&&W.subscribe((t=>t&&te())),Qt=()=>n(8,D=(null==Tt?void 0:Tt.currentTime)??0);function te(){if(!Kt)if(Kt=!0,Jt&&Jt(),F&&H&&H.video.set(void 0),Q.mediaState.delete(Y),Yt(),Ut(),Zt(),At&&It.set(void 0),Tt&&(n(2,Tt.onended=null,Tt),bt&&(n(2,Tt.onloadedmetadata=n(2,Tt.onplay=n(2,Tt.onseeking=n(2,Tt.onseeked=null,Tt),Tt),Tt),Tt),Tt.removeEventListener("timeupdate",Qt)),n(2,Tt.ontimeupdate=n(2,Tt.onpause=n(2,Tt.onseeked=n(2,Tt.oncanplay=null,Tt),Tt),Tt),Tt)),St)St.destroy();else if(vt)for(let t of["error","loaded","play","bufferstart","seeked","pause","volumechange","timeupdate","ended"])vt.off(t)}const ee=2==mt;let ne,se=ee&&dt&&1!=_&&ie.iOS;rt((()=>{K("id",Y),b&&bt&&(n(2,Tt=ps),n(2,Tt.controls=!1,Tt),n(2,Tt.onloadedmetadata=()=>n(7,z=(null==Tt?void 0:Tt.duration)??0),Tt),n(2,Tt.src=b,Tt),n(2,Tt.oncanplay=Lt,Tt),n(2,Tt.onended=Xt,Tt),Tt.addEventListener("timeupdate",Qt),n(2,Tt.onseeking=()=>n(6,C=!0),Tt),n(2,Tt.onseeked=()=>n(6,C=!1),Tt)),nt=D||0,n(24,yt=1==ft||2==ft),jt().then((()=>{E&&Ft()})).catch((()=>{})),se&&(null==Tt||Tt.addEventListener("playing",(()=>n(29,se=!1)),{once:!0}));const t=j.isMuted.subscribe((t=>function(t){R||(n(1,O=t),Tt?n(2,Tt.muted=t,Tt):(null==gt?void 0:gt.mute)?(t?gt.mute():gt.unMute(),setTimeout((()=>{gt&&n(1,O=gt.isMuted())}),50)):vt&&vt.setVolume(t?0:1))}(t)));return()=>{te(),t(),bt&&n(2,Tt=void 0),$t?$t.destroy():gt?gt.destroy():vt&&vt.destroy()}}));const re=Z.is360?Math.PI/2:1;return e.$$set=t=>{"src"in t&&n(51,b=t.src),"volume"in t&&n(0,k=t.volume),"width"in t&&n(9,T=t.width),"height"in t&&n(10,x=t.height),"frameScale"in t&&n(53,_=t.frameScale),"autoplay"in t&&n(3,E=t.autoplay),"loop"in t&&n(11,S=t.loop),"loopDelay"in t&&n(12,M=t.loopDelay),"controls"in t&&n(4,A=t.controls),"title"in t&&n(13,I=t.title),"figcaption"in t&&n(14,L=t.figcaption),"paused"in t&&n(5,P=t.paused),"forcePause"in t&&n(54,N=t.forcePause),"seeking"in t&&n(6,C=t.seeking),"duration"in t&&n(7,z=t.duration),"currentTime"in t&&n(8,D=t.currentTime),"muted"in t&&n(1,O=t.muted),"is360"in t&&n(15,F=t.is360),"tour"in t&&n(55,U=t.tour),"secondary"in t&&n(56,V=t.secondary),"fullscreen"in t&&n(16,B=t.fullscreen),"className"in t&&n(17,q=t.className),"destroying"in t&&y(n(18,W=t.destroying)),"hasTransparentH265"in t&&n(19,X=t.hasTransparentH265),"noPlayOverlay"in t&&n(57,G=t.noPlayOverlay),"uuid"in t&&n(52,Y=t.uuid),"image"in t&&n(20,H=t.image),"_media"in t&&n(2,Tt=t._media)},e.$$.update=()=>{var t,i;7&e.$$.dirty[0]&&Tt&&2==mt&&!O&&n(2,Tt.muted=0==k,Tt),8388608&e.$$.dirty[1]&&void 0!==N&&n(5,P=N),6144&e.$$.dirty[0]&&S&&void 0!==M&&clearTimeout(Rt),2097152&e.$$.dirty[0]|150994944&e.$$.dirty[1]&&n(33,l=St&&U?"events"in U?U.events:(null==(i=null==(t=U.i18n)?void 0:t[f])?void 0:i.events)??void 0:void 0),1536&e.$$.dirty[0]|4194304&e.$$.dirty[1]&&n(22,c=ee?_*re:1==mt?Math.max(_,Math.min(T/512,x/512)):1),4194816&e.$$.dirty[0]&&n(32,m=ee?T:Math.round(T/c*re)),4195328&e.$$.dirty[0]&&n(31,p=ee?x:Math.round(x/c*re))},[k,O,Tt,E,A,P,C,z,D,T,x,S,M,I,L,F,B,q,W,X,H,St,c,ct,yt,kt,Pt,zt,Wt,se,ne,p,m,l,v,$,j,Z,tt,et,at,dt,mt,pt,bt,At,Lt,function(t){t&&"button"in t&&0!=t.button||(P?Ft():Ut())},Ft,Vt,Xt,b,Y,_,N,U,V,G,f,function(t){ut[t?"unshift":"push"]((()=>{kt=t,n(25,kt)}))},function(t){ut[t?"unshift":"push"]((()=>{Tt=t,n(2,Tt),n(1,O),n(0,k)}))},function(){z=this.duration,n(7,z)},function(){O=this.muted,n(1,O)},function(){D=this.currentTime,n(8,D)},function(){C=this.seeking,n(6,C)},function(){P=this.paused,n(5,P),n(54,N)},function(t){ut[t?"unshift":"push"]((()=>{Tt=t,n(2,Tt),n(1,O),n(0,k)}))},function(){z=this.duration,n(7,z)},function(){O=this.muted,n(1,O)},function(){D=this.currentTime,n(8,D)},function(){C=this.seeking,n(6,C)},function(){P=this.paused,n(5,P),n(54,N)},()=>n(6,C=!1),function(t){D=t,n(8,D)},function(t){z=t,n(7,z)},function(t){P=t,n(5,P),n(54,N)},function(t){C=t,n(6,C)},function(t){z=t,n(7,z)},function(t){D=t,n(8,D)},function(t){O=t,n(1,O)},function(t){k=t,n(0,k)},function(t){Wt=t,n(28,Wt)},()=>j.isMuted.set(!O),t=>Vt(t.detail),function(t){ut[t?"unshift":"push"]((()=>{ne=t,n(30,ne)}))}]}class ys extends Yt{constructor(t){super(),Gt(this,t,ws,ms,a,{src:51,volume:0,width:9,height:10,frameScale:53,autoplay:3,loop:11,loopDelay:12,controls:4,title:13,figcaption:14,paused:5,forcePause:54,seeking:6,duration:7,currentTime:8,muted:1,is360:15,tour:55,secondary:56,fullscreen:16,className:17,destroying:18,hasTransparentH265:19,noPlayOverlay:57,uuid:52,image:20,_media:2},null,[-1,-1,-1,-1,-1])}}function bs(t){let e,i,n,s,o;const a=t[2].default,l=m(a,t,t[1],null);return{c(){e=N("article"),l&&l.c(),V(e,"class",i=$(t[0])+" micrio-article")},m(i,r){I(i,e,r),l&&l.m(e,null),n=!0,s||(o=[R(e,"click",U(t[3])),R(e,"keydown",ks),R(e,"pointerdown",ks)],s=!0)},p(t,[s]){l&&l.p&&(!n||2&s)&&g(l,a,t,t[1],n?f(a,t[1],s,null):v(t[1]),null),(!n||1&s&&i!==(i=$(t[0])+" micrio-article"))&&V(e,"class",i)},i(t){n||(Lt(l,t),n=!0)},o(t){Pt(l,t),n=!1},d(t){t&&L(e),l&&l.d(t),s=!1,r(o)}}}function ks(t){var e;t.target&&t.target instanceof HTMLAnchorElement&&!(null==(e=t.target.getAttribute("href"))?void 0:e.startsWith("#"))&&(t.target.target="_blank")}function Ts(t,e,i){let{$$slots:n={},$$scope:s}=e,{cn:r=null}=e;return t.$$set=t=>{"cn"in t&&i(0,r=t.cn),"$$scope"in t&&i(1,s=t.$$scope)},[r,s,n,function(e){ct.call(this,t,e)}]}class xs extends Yt{constructor(t){super(),Gt(this,t,Ts,bs,a,{cn:0})}}function _s(t,e,i){const n=t.slice();return n[23]=e[i],n}function Es(t){let e,i,n,s,r,o,a,l,c=t[6].title&&Ss(t),d=t[6].body&&t[14].primaryBodyFirst&&Ms(t),u=!t[13]&&((!t[6]||!t[6].embedUrl)&&t[2].videoTour||t[6]&&t[6].audio)&&Is(t),h=!t[5]&&t[2].images&&Ls(t),m=t[6].embedUrl&&!t[4]&&Cs(t),p=t[6].body&&!t[14].primaryBodyFirst&&Ds(t),f=t[6].bodySecondary&&Rs(t);return{c(){e=N("main"),c&&c.c(),i=D(),d&&d.c(),n=D(),u&&u.c(),s=D(),h&&h.c(),r=D(),m&&m.c(),o=D(),p&&p.c(),a=D(),f&&f.c(),V(e,"class","micrio-marker-content"),H(e,"empty",t[10])},m(g,v){I(g,e,v),c&&c.m(e,null),S(e,i),d&&d.m(e,null),S(e,n),u&&u.m(e,null),S(e,s),h&&h.m(e,null),S(e,r),m&&m.m(e,null),S(e,o),p&&p.m(e,null),S(e,a),f&&f.m(e,null),t[31](e),l=!0},p(t,g){t[6].title?c?c.p(t,g):(c=Ss(t),c.c(),c.m(e,i)):c&&(c.d(1),c=null),t[6].body&&t[14].primaryBodyFirst?d?(d.p(t,g),64&g[0]&&Lt(d,1)):(d=Ms(t),d.c(),Lt(d,1),d.m(e,n)):d&&(At(),Pt(d,1,1,(()=>{d=null})),It()),!t[13]&&((!t[6]||!t[6].embedUrl)&&t[2].videoTour||t[6]&&t[6].audio)?u?(u.p(t,g),68&g[0]&&Lt(u,1)):(u=Is(t),u.c(),Lt(u,1),u.m(e,s)):u&&(At(),Pt(u,1,1,(()=>{u=null})),It()),!t[5]&&t[2].images?h?h.p(t,g):(h=Ls(t),h.c(),h.m(e,r)):h&&(h.d(1),h=null),t[6].embedUrl&&!t[4]?m?(m.p(t,g),80&g[0]&&Lt(m,1)):(m=Cs(t),m.c(),Lt(m,1),m.m(e,o)):m&&(At(),Pt(m,1,1,(()=>{m=null})),It()),t[6].body&&!t[14].primaryBodyFirst?p?(p.p(t,g),64&g[0]&&Lt(p,1)):(p=Ds(t),p.c(),Lt(p,1),p.m(e,a)):p&&(At(),Pt(p,1,1,(()=>{p=null})),It()),t[6].bodySecondary?f?(f.p(t,g),64&g[0]&&Lt(f,1)):(f=Rs(t),f.c(),Lt(f,1),f.m(e,null)):f&&(At(),Pt(f,1,1,(()=>{f=null})),It()),(!l||1024&g[0])&&H(e,"empty",t[10])},i(t){l||(Lt(d),Lt(u),Lt(m),Lt(p),Lt(f),l=!0)},o(t){Pt(d),Pt(u),Pt(m),Pt(p),Pt(f),l=!1},d(i){i&&L(e),c&&c.d(),d&&d.d(),u&&u.d(),h&&h.d(),m&&m.d(),p&&p.d(),f&&f.d(),t[31](null)}}}function Ss(t){let e,i,n=t[6].title+"";return{c(){e=N("h1"),i=z(n),V(e,"class","micrio-marker-content")},m(n,s){I(n,e,s),S(e,i),t[27](e)},p(t,e){64&e[0]&&n!==(n=t[6].title+"")&&Y(i,n)},d(i){i&&L(e),t[27](null)}}}function Ms(t){let e,i;return e=new xs({props:{$$slots:{default:[As]},$$scope:{ctx:t}}}),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};64&i[0]|256&i[1]&&(n.$$scope={dirty:i,ctx:t}),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function As(t){let e,i,n=t[6].body+"";return{c(){e=new K(!1),i=O(),e.a=i},m(t,s){e.m(n,t,s),I(t,i,s)},p(t,i){64&i[0]&&n!==(n=t[6].body+"")&&e.p(n)},d(t){t&&(L(i),e.d())}}}function Is(t){let e,i,n;function s(e){t[28](e)}let r={src:t[9],destroying:t[3],noPlayOverlay:!0,image:t[23],uuid:t[2].id,tour:t[2].videoTour,autoplay:t[2].audioAutoPlay||!t[6].audio&&!!t[2].videoTour,controls:!t[2].videoTour||!t[6]||!t[6].embedUrl};return void 0!==t[7].audio&&(r.paused=t[7].audio),e=new ys({props:r}),ut.push((()=>Bt(e,"paused",s))),e.$on("ended",t[18]),{c(){qt(e.$$.fragment)},m(t,i){Wt(e,t,i),n=!0},p(t,n){const s={};512&n[0]&&(s.src=t[9]),8&n[0]&&(s.destroying=t[3]),4&n[0]&&(s.uuid=t[2].id),4&n[0]&&(s.tour=t[2].videoTour),68&n[0]&&(s.autoplay=t[2].audioAutoPlay||!t[6].audio&&!!t[2].videoTour),68&n[0]&&(s.controls=!t[2].videoTour||!t[6]||!t[6].embedUrl),!i&&128&n[0]&&(i=!0,s.paused=t[7].audio,wt((()=>i=!1))),e.$set(s)},i(t){n||(Lt(e.$$.fragment,t),n=!0)},o(t){Pt(e.$$.fragment,t),n=!1},d(t){Xt(e,t)}}}function Ls(t){let e,i=Dt(t[2].images),n=[];for(let s=0;s<i.length;s+=1)n[s]=Ns(_s(t,i,s));return{c(){e=N("section");for(let t=0;t<n.length;t+=1)n[t].c();V(e,"class","micrio-marker-content")},m(t,i){I(t,e,i);for(let s=0;s<n.length;s+=1)n[s]&&n[s].m(e,null)},p(t,s){if(7536900&s[0]){let r;for(i=Dt(t[2].images),r=0;r<i.length;r+=1){const o=_s(t,i,r);n[r]?n[r].p(o,s):(n[r]=Ns(o),n[r].c(),n[r].m(e,null))}for(;r<n.length;r+=1)n[r].d(1);n.length=i.length}},d(t){t&&L(e),P(n,t)}}}function Ps(t){let e,i;return{c(){e=N("figcaption"),i=z(t[8]),V(e,"class","micrio-marker-content")},m(t,n){I(t,e,n),S(e,i)},p(t,e){256&e[0]&&Y(i,t[8])},d(t){t&&L(e)}}}function Ns(t){let e,i,n,s,r,a,l,d,u,h,m=t[8]&&Ps(t);function p(){return t[29](t[23])}return{c(){e=N("button"),i=N("figure"),n=N("img"),a=D(),m&&m.c(),d=D(),V(n,"alt",s=t[22](t[23])),c(n.src,r=t[23].micrioId?`https://iiif.${t[21]?"micrio.dev":"micr.io"}/${t[23].micrioId}/full/${t[17]?"^"+Math.min(t[23].width,640)+",":"^,320"}/0/default.webp`:t[23].src)||V(n,"src",r),V(n,"class","micrio-marker-content"),V(i,"class","micrio-marker-content"),V(e,"title",l=t[22](t[23])),V(e,"class","micrio-marker-content")},m(s,r){I(s,e,r),S(e,i),S(i,n),S(i,a),m&&m.m(i,null),I(s,d,r),u||(h=R(e,"click",(function(){o(t[16]?p:void 0)&&(t[16]?p:void 0).apply(this,arguments)})),u=!0)},p(o,a){t=o,4&a[0]&&s!==(s=t[22](t[23]))&&V(n,"alt",s),4&a[0]&&!c(n.src,r=t[23].micrioId?`https://iiif.${t[21]?"micrio.dev":"micr.io"}/${t[23].micrioId}/full/${t[17]?"^"+Math.min(t[23].width,640)+",":"^,320"}/0/default.webp`:t[23].src)&&V(n,"src",r),t[8]?m?m.p(t,a):(m=Ps(t),m.c(),m.m(i,null)):m&&(m.d(1),m=null),4&a[0]&&l!==(l=t[22](t[23]))&&V(e,"title",l)},d(t){t&&(L(e),L(d)),m&&m.d(),u=!1,h()}}}function Cs(t){let e,i,n,s,r=!t[6].audio&&t[2].videoTour&&zs(t);function o(e){t[30](e)}let a={image:t[23],src:t[6].embedUrl,uuid:t[2].id,width:400,height:240,controls:!0,title:t[6].embedTitle,figcaption:t[6].embedDescription,autoplay:t[19],destroying:t[3]};return void 0!==t[7].video&&(a.paused=t[7].video),i=new ys({props:a}),ut.push((()=>Bt(i,"paused",o))),i.$on("ended",t[18]),{c(){r&&r.c(),e=D(),qt(i.$$.fragment)},m(t,n){r&&r.m(t,n),I(t,e,n),Wt(i,t,n),s=!0},p(t,s){!t[6].audio&&t[2].videoTour?r?(r.p(t,s),68&s[0]&&Lt(r,1)):(r=zs(t),r.c(),Lt(r,1),r.m(e.parentNode,e)):r&&(At(),Pt(r,1,1,(()=>{r=null})),It());const o={};64&s[0]&&(o.src=t[6].embedUrl),4&s[0]&&(o.uuid=t[2].id),64&s[0]&&(o.title=t[6].embedTitle),64&s[0]&&(o.figcaption=t[6].embedDescription),8&s[0]&&(o.destroying=t[3]),!n&&128&s[0]&&(n=!0,o.paused=t[7].video,wt((()=>n=!1))),i.$set(o)},i(t){s||(Lt(r),Lt(i.$$.fragment,t),s=!0)},o(t){Pt(r),Pt(i.$$.fragment,t),s=!1},d(t){t&&L(e),r&&r.d(t),Xt(i,t)}}}function zs(t){let e,i;return e=new ys({props:{image:t[23],className:"hidden",uuid:t[2].id,tour:t[2].videoTour,autoplay:t[15],secondary:!0,destroying:t[3]}}),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};4&i[0]&&(n.uuid=t[2].id),4&i[0]&&(n.tour=t[2].videoTour),8&i[0]&&(n.destroying=t[3]),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function Ds(t){let e,i;return e=new xs({props:{$$slots:{default:[Os]},$$scope:{ctx:t}}}),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};64&i[0]|256&i[1]&&(n.$$scope={dirty:i,ctx:t}),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function Os(t){let e,i,n=t[6].body+"";return{c(){e=new K(!1),i=O(),e.a=i},m(t,s){e.m(n,t,s),I(t,i,s)},p(t,i){64&i[0]&&n!==(n=t[6].body+"")&&e.p(n)},d(t){t&&(L(i),e.d())}}}function Rs(t){let e,i;return e=new xs({props:{cn:"secondary",$$slots:{default:[Fs]},$$scope:{ctx:t}}}),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};64&i[0]|256&i[1]&&(n.$$scope={dirty:i,ctx:t}),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function Fs(t){let e,i,n=t[6].bodySecondary+"";return{c(){e=new K(!1),i=O(),e.a=i},m(t,s){e.m(n,t,s),I(t,i,s)},p(t,i){64&i[0]&&n!==(n=t[6].bodySecondary+"")&&e.p(n)},d(t){t&&(L(i),e.d())}}}function Us(t){let e,i,n=t[6]&&Es(t);return{c(){n&&n.c(),e=O()},m(t,s){n&&n.m(t,s),I(t,e,s),i=!0},p(t,i){t[6]?n?(n.p(t,i),64&i[0]&&Lt(n,1)):(n=Es(t),n.c(),Lt(n,1),n.m(e.parentNode,e)):n&&(At(),Pt(n,1,1,(()=>{n=null})),It())},i(t){i||(Lt(n),i=!0)},o(t){Pt(n),i=!1},d(t){t&&L(e),n&&n.d(t)}}}function Vs(t,e,i){var n,s,r,o;let a,l,c,d,u,m,p,{marker:f}=e,{destroying:g}=e,{noEmbed:v=!1}=e,{noImages:$=!1}=e,{noGallery:w=!1}=e,{_content:y=null}=e,{_title:b=null}=e;const k=ot(),T=lt("micrio"),x=T._lang;h(t,x,(t=>i(26,m=t)));const _=T.state.tour;h(t,_,(t=>i(32,p=t)));const E=p&&"steps"in p&&p.isSerialTour,S=lt("markerImages").get(f),M=S.$settings._markers??{},A=!M.preventAutoPlay,I=!(null==(n=f.data)?void 0:n.preventImageOpen)&&!w,L=1==(null==(s=f.images)?void 0:s.length);null==(r=f.images)||r.length;const P={audio:!A||!f.audioAutoPlay,video:!1===f.embedAutoPlay||!A||!(!(null==a?void 0:a.audio)||!f.audioAutoPlay)},N=!P.video;function C(t){I&&T.state.popover.set({gallery:f.images,galleryStart:t,image:S})}const z=null==(o=S.tileBase)?void 0:o.includes("micrio.dev");return t.$$set=t=>{"marker"in t&&i(2,f=t.marker),"destroying"in t&&i(3,g=t.destroying),"noEmbed"in t&&i(4,v=t.noEmbed),"noImages"in t&&i(5,$=t.noImages),"noGallery"in t&&i(24,w=t.noGallery),"_content"in t&&i(0,y=t._content),"_title"in t&&i(1,b=t._title)},t.$$.update=()=>{var e,n,s,r,o,h,p;67108868&t.$$.dirty[0]&&i(6,a=f.i18n?f.i18n[m]:f),68&t.$$.dirty[0]&&i(10,l=!((null==a?void 0:a.title)||(null==a?void 0:a.audio)||f.images&&f.images.length||(null==a?void 0:a.embedUrl)||f.videoTour||(null==a?void 0:a.body)||(null==a?void 0:a.bodySecondary))),67108932&t.$$.dirty[0]&&i(25,c=(null==(s=null==(n=null==(e=f.videoTour)?void 0:e.i18n)?void 0:n[m])?void 0:s.audio)??(null==a?void 0:a.audio)),33554432&t.$$.dirty[0]&&i(9,d=c?"fileUrl"in c?c.fileUrl:c.src:void 0),67108868&t.$$.dirty[0]&&i(8,u=L&&(null==(p=null==(h=null==(o=null==(r=f.images)?void 0:r[0])?void 0:o.i18n)?void 0:h[m])?void 0:p.description))},[y,b,f,g,v,$,a,P,u,d,l,x,_,E,M,A,I,L,()=>{p&&"steps"in p&&(p.isSerialTour||M.tourAutoProgress)&&k("close")},N,C,z,t=>{var e,i;return null==(i=null==(e=t.i18n)?void 0:e[m])?void 0:i.title},S,w,c,m,function(t){ut[t?"unshift":"push"]((()=>{b=t,i(1,b)}))},function(e){t.$$.not_equal(P.audio,e)&&(P.audio=e,i(7,P))},t=>C(t.micrioId),function(e){t.$$.not_equal(P.video,e)&&(P.video=e,i(7,P))},function(t){ut[t?"unshift":"push"]((()=>{y=t,i(0,y)}))}]}class Bs extends Yt{constructor(t){super(),Gt(this,t,Vs,Us,a,{marker:2,destroying:3,noEmbed:4,noImages:5,noGallery:24,_content:0,_title:1},null,[-1,-1])}}function qs(t){let e,i,n,s,r;return s=new on({props:{className:"micrio-tour-controls",$$slots:{default:[Ws]},$$scope:{ctx:t}}}),{c(){e=N("progress"),n=D(),qt(s.$$.fragment),V(e,"aria-hidden",!0),e.value=i=(t[10]+1)/t[3].steps.length,V(e,"class","progress micrio-marker-popup")},m(t,i){I(t,e,i),I(t,n,i),Wt(s,t,i),r=!0},p(t,n){(!r||1032&n[0]&&i!==(i=(t[10]+1)/t[3].steps.length))&&(e.value=i);const o={};5160&n[0]|1&n[1]&&(o.$$scope={dirty:n,ctx:t}),s.$set(o)},i(t){r||(Lt(s.$$.fragment,t),r=!0)},o(t){Pt(s.$$.fragment,t),r=!1},d(t){t&&(L(e),L(n)),Xt(s,t)}}}function Ws(t){let e,i,n,s,r;e=new Ui({props:{type:"arrow-left",disabled:t[5]||0==t[10],title:t[12].tourStepPrev}}),e.$on("click",t[19]);let o=t[15].tourControlsInPopup&&function(t){let e,i,n,s,r=t[10]+1+"",o=t[3].steps.length+"";return{c(){e=N("button"),i=z(r),n=z(" / "),s=z(o),V(e,"class","micrio-button tour-step micrio-marker-popup"),e.disabled=!0},m(t,r){I(t,e,r),S(e,i),S(e,n),S(e,s)},p(t,e){1024&e[0]&&r!==(r=t[10]+1+"")&&Y(i,r),8&e[0]&&o!==(o=t[3].steps.length+"")&&Y(s,o)},d(t){t&&L(e)}}}(t);return s=new Ui({props:{type:"arrow-right",disabled:t[5]||t[10]+1==t[3].steps.length,title:t[12].tourStepNext}}),s.$on("click",t[20]),{c(){qt(e.$$.fragment),i=D(),o&&o.c(),n=D(),qt(s.$$.fragment)},m(t,a){Wt(e,t,a),I(t,i,a),o&&o.m(t,a),I(t,n,a),Wt(s,t,a),r=!0},p(t,i){const n={};1056&i[0]&&(n.disabled=t[5]||0==t[10]),4096&i[0]&&(n.title=t[12].tourStepPrev),e.$set(n),t[15].tourControlsInPopup&&o.p(t,i);const r={};1064&i[0]&&(r.disabled=t[5]||t[10]+1==t[3].steps.length),4096&i[0]&&(r.title=t[12].tourStepNext),s.$set(r)},i(t){r||(Lt(e.$$.fragment,t),Lt(s.$$.fragment,t),r=!0)},o(t){Pt(e.$$.fragment,t),Pt(s.$$.fragment,t),r=!1},d(t){t&&(L(i),L(n)),Xt(e,t),o&&o.d(t),Xt(s,t)}}}function Xs(t){let e,i,n,s,r,o,a,l,c,d,u=!t[16].alwaysOpen&&function(t){let e,i;return e=new Ui({props:{type:!t[2]||t[9]?"close":"arrow-right",title:!t[2]||t[9]?t[12].closeMarker:t[12].tourStepNext,disabled:t[5]}}),e.$on("click",t[18]),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};516&i[0]&&(n.type=!t[2]||t[9]?"close":"arrow-right"),4612&i[0]&&(n.title=!t[2]||t[9]?t[12].closeMarker:t[12].tourStepNext),32&i[0]&&(n.disabled=t[5]),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}(t),h=t[17]&&function(t){let e,i;return e=new Ui({props:{type:"arrow-down",title:t[12].minimize}}),e.$on("click",t[21]),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};4096&i[0]&&(n.title=t[12].minimize),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}(t),m=t[1]&&t[3]&&"steps"in t[3]&&qs(t);function p(e){t[23](e)}function f(e){t[24](e)}let g={marker:t[0],destroying:t[22]};return void 0!==t[7]&&(g._content=t[7]),void 0!==t[8]&&(g._title=t[8]),o=new Bs({props:g}),ut.push((()=>Bt(o,"_content",p))),ut.push((()=>Bt(o,"_title",f))),o.$on("close",t[18]),{c(){e=N("div"),i=N("aside"),u&&u.c(),n=D(),h&&h.c(),s=D(),m&&m.c(),r=D(),qt(o.$$.fragment),V(i,"class","micrio-marker-popup"),V(e,"class","micrio-marker-popup"),H(e,"destroying",t[11]),H(e,"minimized",t[6])},m(a,l){I(a,e,l),S(e,i),u&&u.m(i,null),S(i,n),h&&h.m(i,null),S(i,s),m&&m.m(i,null),S(e,r),Wt(o,e,null),t[25](e),d=!0},p(n,s){(t=n)[16].alwaysOpen||u.p(t,s),t[17]&&h.p(t,s),t[1]&&t[3]&&"steps"in t[3]?m?(m.p(t,s),10&s[0]&&Lt(m,1)):(m=qs(t),m.c(),Lt(m,1),m.m(i,null)):m&&(At(),Pt(m,1,1,(()=>{m=null})),It());const r={};1&s[0]&&(r.marker=t[0]),!a&&128&s[0]&&(a=!0,r._content=t[7],wt((()=>a=!1))),!l&&256&s[0]&&(l=!0,r._title=t[8],wt((()=>l=!1))),o.$set(r),(!d||2048&s[0])&&H(e,"destroying",t[11]),(!d||64&s[0])&&H(e,"minimized",t[6])},i(i){d||(Lt(u),Lt(h),Lt(m),Lt(o.$$.fragment,i),i&&$t((()=>{d&&(c||(c=zt(e,Ee,t[15].popupAnimation,!0)),c.run(1))})),d=!0)},o(i){Pt(u),Pt(h),Pt(m),Pt(o.$$.fragment,i),i&&(c||(c=zt(e,Ee,t[15].popupAnimation,!1)),c.run(0)),d=!1},d(i){i&&L(e),u&&u.d(),h&&h.d(),m&&m.d(),Xt(o),t[25](null),i&&c&&c.end()}}}function Gs(t,e,i){let n,s,r,o,a,l,c,d;h(t,Oe,(t=>i(12,d=t)));let{marker:u}=e;const m=lt("micrio"),{current:p}=m;h(t,p,(t=>i(26,l=t)));const f=m.state.tour;h(t,f,(t=>i(3,a=t)));const g=lt("markerImages").get(u),v=g.$settings._markers??{},$=u.data||{},w=v.canMinimizePopup;let y;let b=!1;let k,T,x=!1;const _=new WeakMap,E=Ht(!1);return h(t,E,(t=>i(11,c=t))),rt((()=>{var t;u.tags.forEach((t=>y.classList.add(t))),setTimeout((()=>{var t;return null==(t=y.querySelector("button"))?void 0:t.focus()}),500);const e="embedImages"in u?u.embedImages:void 0;return e&&(null==(t=m.$current)||t.data.update((t=>(t||(t={embeds:[]}),t.embeds=[...t.embeds??[],...e],t)))),()=>{var t;m.state.popup.subscribe((t=>E.set(t!=u))),e&&(null==(t=m.$current)||t.data.update((t=>(null==t?void 0:t.embeds)?(t.embeds=t.embeds.filter((t=>!e.find((e=>e.id==t.id)))),t):t)))}})),t.$$set=t=>{"marker"in t&&i(0,u=t.marker)},t.$$.update=()=>{9&t.$$.dirty[0]&&i(2,n=a&&"steps"in a&&a.steps.findIndex((t=>t.startsWith(u.id)))>=0),12&t.$$.dirty[0]&&i(1,s=a&&"steps"in a&&n&&!a.isSerialTour&&v.tourControlsInPopup),8&t.$$.dirty[0]&&i(10,r=(a&&"steps"in a?a.currentStep:void 0)??-1),10&t.$$.dirty[0]&&i(9,o=s||a&&"steps"in a&&a.currentStep==a.steps.length-1)},[u,s,n,a,y,b,x,k,T,o,r,c,d,p,f,v,$,w,function(t){var e,i;a&&n&&"steps"in a?t instanceof Event&&o?f.set(void 0):null==(e=a.next)||e.call(a):l&&!g.opts.secondaryTo&&l.id!=g.id&&(null==(i=$.micrioLink)?void 0:i.id)==l.id?(m.open(g.id),g.state.marker.set(void 0),m.state.popup.set(void 0)):g.state.marker.set(void 0)},()=>{var t;a&&"steps"in a&&(null==(t=a.prev)||t.call(a),i(5,b=!0))},()=>{var t;a&&"steps"in a&&(null==(t=a.next)||t.call(a),i(5,b=!0))},()=>{i(6,x=!x);for(let t=0;t<k.children.length;t++){const e=k.children[t];e instanceof HTMLElement&&e!=T&&(_.has(e)||(_.set(e,e.offsetHeight),e.style.height=e.offsetHeight+"px"),setTimeout((()=>{e.style.height=x?"0px":_.get(e)+"px"}),100))}},E,function(t){k=t,i(7,k)},function(t){T=t,i(8,T)},function(t){ut[t?"unshift":"push"]((()=>{y=t,i(4,y)}))}]}class Ys extends Yt{constructor(t){super(),Gt(this,t,Gs,Xs,a,{marker:0},null,[-1,-1])}}function js(t,e,i){const n=t.slice();return n[46]=e[i],n[48]=i,n}function Hs(t,e,i){const n=t.slice();return n[49]=e[i],n[48]=i,n}function Zs(t){let e,i=Dt(t[13]),n=[];for(let s=0;s<i.length;s+=1)n[s]=Ks(Hs(t,i,s));return{c(){e=N("ol");for(let t=0;t<n.length;t+=1)n[t].c();V(e,"class","micrio-serial-tour")},m(t,i){I(t,e,i);for(let s=0;s<n.length;s+=1)n[s]&&n[s].m(e,null)},p(t,s){if(8921120&s[0]){let r;for(i=Dt(t[13]),r=0;r<i.length;r+=1){const o=Hs(t,i,r);n[r]?n[r].p(o,s):(n[r]=Ks(o),n[r].c(),n[r].m(e,null))}for(;r<n.length;r+=1)n[r].d(1);n.length=i.length}},d(t){t&&L(e),P(n,t)}}}function Ks(t){let e,i=t[23](t[49].marker),n=i&&function(t){let e,i,n,s;function r(){return t[27](t[48])}return{c(){e=N("li"),i=N("button"),i.textContent=`${t[23](t[49].marker)}`,V(i,"class","micrio-serial-tour"),V(e,"class","micrio-serial-tour"),H(e,"active",t[5]&&t[5].chapter==t[48]),H(e,"enriched",t[49].imageHasOtherMarkers)},m(t,o){I(t,e,o),S(e,i),n||(s=R(i,"click",r),n=!0)},p(i,n){t=i,32&n[0]&&H(e,"active",t[5]&&t[5].chapter==t[48])},d(t){t&&L(e),n=!1,s()}}}(t);return{c(){n&&n.c(),e=D()},m(t,i){n&&n.m(t,i),I(t,e,i)},p(t,e){i&&n.p(t,e)},d(t){t&&L(e),n&&n.d(t)}}}function Js(t){let e,i,n,s;function r(e){t[28](e)}function o(e){t[29](e)}let a={tour:t[1],src:t[9],autoplay:!t[2]};return void 0!==t[4]&&(a.muted=t[4]),void 0!==t[5].currentTime&&(a.currentTime=t[5].currentTime),e=new ys({props:a}),ut.push((()=>Bt(e,"muted",r))),ut.push((()=>Bt(e,"currentTime",o))),e.$on("id",t[30]),e.$on("ended",t[21]),e.$on("play",t[31]),e.$on("blocked",t[32]),{c(){qt(e.$$.fragment)},m(t,i){Wt(e,t,i),s=!0},p(t,s){const r={};2&s[0]&&(r.tour=t[1]),512&s[0]&&(r.src=t[9]),4&s[0]&&(r.autoplay=!t[2]),!i&&16&s[0]&&(i=!0,r.muted=t[4],wt((()=>i=!1))),!n&&32&s[0]&&(n=!0,r.currentTime=t[5].currentTime,wt((()=>n=!1))),e.$set(r)},i(t){s||(Lt(e.$$.fragment,t),s=!0)},o(t){Pt(e.$$.fragment,t),s=!1},d(t){Xt(e,t)}}}function Qs(t){let e,i;return e=new Ui({props:{type:t[11]?"subtitles":"subtitles-off",active:t[11],title:t[10].subtitlesToggle}}),e.$on("click",t[33]),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};2048&i[0]&&(n.type=t[11]?"subtitles":"subtitles-off"),2048&i[0]&&(n.active=t[11]),1024&i[0]&&(n.title=t[10].subtitlesToggle),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function tr(t){let e,i=t[46].duration>0&&function(t){let e,i,n,s;function o(...e){return t[34](t[48],...e)}function a(...e){return t[35](t[48],...e)}return{c(){e=N("div"),V(e,"class","bar"),V(e,"title",t[23](t[46].marker)),V(e,"role","progressbar"),V(e,"style",i=`width:${t[46].duration/t[16]*100}%; --perc: ${t[12][t[48]]||0}%`),H(e,"active",t[48]==t[0].currentStep)},m(t,i){I(t,e,i),n||(s=[R(e,"click",o),R(e,"keypress",a)],n=!0)},p(n,s){t=n,4096&s[0]&&i!==(i=`width:${t[46].duration/t[16]*100}%; --perc: ${t[12][t[48]]||0}%`)&&V(e,"style",i),1&s[0]&&H(e,"active",t[48]==t[0].currentStep)},d(t){t&&L(e),n=!1,r(s)}}}(t);return{c(){i&&i.c(),e=O()},m(t,n){i&&i.m(t,n),I(t,e,n)},p(t,e){t[46].duration>0&&i.p(t,e)},d(t){t&&L(e),i&&i.d(t)}}}function er(t){let e,i=Dt(t[13]),n=[];for(let s=0;s<i.length;s+=1)n[s]=tr(js(t,i,s));return{c(){for(let t=0;t<n.length;t+=1)n[t].c();e=O()},m(t,i){for(let e=0;e<n.length;e+=1)n[e]&&n[e].m(t,i);I(t,e,i)},p(t,s){if(8990721&s[0]){let r;for(i=Dt(t[13]),r=0;r<i.length;r+=1){const o=js(t,i,r);n[r]?n[r].p(o,s):(n[r]=tr(o),n[r].c(),n[r].m(e.parentNode,e))}for(;r<n.length;r+=1)n[r].d(1);n.length=i.length}},d(t){t&&L(e),P(n,t)}}}function ir(t){let e,i,n,s,r,o,a=t[0].printChapters&&Zs(t),l=t[1]&&t[5]&&Js(t),c=t[17]&&function(t){let e,i,n,s,r,o,a;e=new Ui({props:{type:t[2]?"play":"pause",title:t[2]?t[10].play:t[10].pause}}),e.$on("click",t[18]),n=new Ui({props:{type:t[4]?"volume-off":"volume-up",title:t[4]?t[10].audioUnmute:t[10].audioMute}}),n.$on("click",t[20]);let l=t[8]&&Qs(t);return o=new cn({props:{el:t[14]}}),{c(){qt(e.$$.fragment),i=D(),qt(n.$$.fragment),s=D(),l&&l.c(),r=D(),qt(o.$$.fragment)},m(t,c){Wt(e,t,c),I(t,i,c),Wt(n,t,c),I(t,s,c),l&&l.m(t,c),I(t,r,c),Wt(o,t,c),a=!0},p(t,i){const s={};4&i[0]&&(s.type=t[2]?"play":"pause"),1028&i[0]&&(s.title=t[2]?t[10].play:t[10].pause),e.$set(s);const o={};16&i[0]&&(o.type=t[4]?"volume-off":"volume-up"),1040&i[0]&&(o.title=t[4]?t[10].audioUnmute:t[10].audioMute),n.$set(o),t[8]?l?(l.p(t,i),256&i[0]&&Lt(l,1)):(l=Qs(t),l.c(),Lt(l,1),l.m(r.parentNode,r)):l&&(At(),Pt(l,1,1,(()=>{l=null})),It())},i(t){a||(Lt(e.$$.fragment,t),Lt(n.$$.fragment,t),Lt(l),Lt(o.$$.fragment,t),a=!0)},o(t){Pt(e.$$.fragment,t),Pt(n.$$.fragment,t),Pt(l),Pt(o.$$.fragment,t),a=!1},d(t){t&&(L(i),L(s),L(r)),Xt(e,t),Xt(n,t),l&&l.d(t),Xt(o,t)}}}(t),d=t[17]&&function(t){let e,i,n,s;function r(e){t[36](e)}function o(e){t[37](e)}let a={duration:t[16],$$slots:{default:[er]},$$scope:{ctx:t}};return void 0!==t[6]&&(a.currentTime=t[6]),void 0!==t[3]&&(a.ended=t[3]),e=new Bn({props:a}),ut.push((()=>Bt(e,"currentTime",r))),ut.push((()=>Bt(e,"ended",o))),{c(){qt(e.$$.fragment)},m(t,i){Wt(e,t,i),s=!0},p(t,s){const r={};4097&s[0]|1048576&s[1]&&(r.$$scope={dirty:s,ctx:t}),!i&&64&s[0]&&(i=!0,r.currentTime=t[6],wt((()=>i=!1))),!n&&8&s[0]&&(n=!0,r.ended=t[3],wt((()=>n=!1))),e.$set(r)},i(t){s||(Lt(e.$$.fragment,t),s=!0)},o(t){Pt(e.$$.fragment,t),s=!1},d(t){Xt(e,t)}}}(t);return{c(){a&&a.c(),e=D(),i=N("aside"),l&&l.c(),n=D(),c&&c.c(),s=D(),d&&d.c(),r=O(),V(i,"class","micrio-media-controls micrio-serial-tour")},m(t,u){a&&a.m(t,u),I(t,e,u),I(t,i,u),l&&l.m(i,null),S(i,n),c&&c.m(i,null),I(t,s,u),d&&d.m(t,u),I(t,r,u),o=!0},p(t,s){t[0].printChapters?a?a.p(t,s):(a=Zs(t),a.c(),a.m(e.parentNode,e)):a&&(a.d(1),a=null),t[1]&&t[5]?l?(l.p(t,s),34&s[0]&&Lt(l,1)):(l=Js(t),l.c(),Lt(l,1),l.m(i,n)):l&&(At(),Pt(l,1,1,(()=>{l=null})),It()),t[17]&&c.p(t,s),t[17]&&d.p(t,s)},i(t){o||(Lt(l),Lt(c),Lt(d),o=!0)},o(t){Pt(l),Pt(c),Pt(d),o=!1},d(t){t&&(L(e),L(i),L(s),L(r)),a&&a.d(t),l&&l.d(),c&&c.d(),d&&d.d(t)}}}function nr(t,e,i){var n,s;let r,o,a,l,c,d,m,p;h(t,Oe,(t=>i(10,d=t))),h(t,On,(t=>i(11,m=t)));let{tour:f}=e;const g=f.stepInfo,v=ot(),$=lt("micrio"),w=$._lang;h(t,w,(t=>i(26,c=t)));const y=$.$current,b=$.state.marker,k=y.$settings,T=!!(null==(s=null==(n=null==k?void 0:k.ui)?void 0:n.controls)?void 0:s.serialTourNoTimeScrub),x=g.reduce(((t,e)=>t+e.duration),0)??0,_="controls"in f?!1!==f.controls:!f.noControls;let E,S,M,A=!1,I=!1,L=u($.isMuted),P=0;function N(t,e){if(!f.goto)return;const n=t==f.currentStep;if(T&&n)return;n||f.goto(t);const s=!T&&e?e.offsetX/e.target.offsetWidth:0;g.forEach(((i,n)=>i.ended=!e&&n<t)),C();const r=g[t];r.currentTime=s*r.duration,n&&(null==E?void 0:E.instance)&&i(1,E.instance.currentTime=r.currentTime,E),D(t)}function C(){var t;null==(t=f.stepInfo)||t.forEach((t=>t.currentTime=0))}const z=Ht([]);function D(t=f.currentStep??0){const e=g.map(((e,i)=>i<t||e.ended||I?100:i==t?Math.round((e.currentTime||0)/e.duration*1e4)/100:0));i(6,P=e.reduce(((t,e,i)=>t+e/100*g[i].duration),0)),z.set(e)}function O(t){const e=t&&!!f.steps.find((e=>e.startsWith(t.id)));i(1,E=void 0),e&&t.videoTour&&setTimeout((()=>{const e=g[f.currentStep??0];e.markerId==t.id&&(e.ended=!1,i(5,S=e),i(1,E=t.videoTour),D())}),10)}h(t,z,(t=>i(12,p=t)));rt((()=>{const t=()=>D();$.addEventListener("timeupdate",t);const e=b.subscribe(O);return()=>{e(),$.removeEventListener("timeupdate",t),C()}}));return t.$$set=t=>{"tour"in t&&i(0,f=t.tour)},t.$$.update=()=>{var e,n,s,d;67108866&t.$$.dirty[0]&&i(25,r=E?"audio"in E?E.audio:null==(n=null==(e=E.i18n)?void 0:e[c])?void 0:n.audio:void 0),33554432&t.$$.dirty[0]&&i(9,o=r?"fileUrl"in r?r.fileUrl:r.src:void 0),67108866&t.$$.dirty[0]&&i(24,a=E?"subtitle"in E?E.subtitle:null==(d=null==(s=E.i18n)?void 0:s[c])?void 0:d.subtitle:void 0),16777216&t.$$.dirty[0]&&i(8,l=a?"fileUrl"in a?a.fileUrl:a.src:void 0)},[f,E,A,I,L,S,P,M,l,o,d,m,p,g,$,w,x,_,function(){const t=$.state.mediaState.get(M);t&&i(2,A=t.paused=!t.paused),A?($.events.dispatch("serialtour-pause",f),$.events.enabled.set(!0)):($.events.dispatch("serialtour-play",f),$.events.enabled.set(!1))},N,function(){$.isMuted.set(i(4,L=!L))},function(){const t=S;t&&(t.ended=!0),null!=f.currentStep&&f.currentStep<f.steps.length-1&&f.next?f.next():(i(2,A=i(3,I=!0)),v("ended")),vt().then((()=>{C(),t&&(t.ended=!1)}))},z,t=>{var e;return t.i18n?null==(e=t.i18n[c])?void 0:e.title:t.title},a,r,c,t=>N(t),function(t){L=t,i(4,L)},function(e){t.$$.not_equal(S.currentTime,e)&&(S.currentTime=e,i(5,S))},t=>i(7,M=t.detail),()=>i(2,A=!1),()=>i(2,A=!0),()=>On.set(!m),(t,e)=>N(t,e),(t,e)=>{"Enter"===e.key&&N(t)},function(t){P=t,i(6,P)},function(t){I=t,i(3,I)}]}class sr extends Yt{constructor(t){super(),Gt(this,t,nr,ir,a,{tour:0},null,[-1,-1])}}function rr(t,e,i){const n=t.slice();return n[54]=e[i],n}function or(t){let e,i,n;function s(e){t[31](e)}let r={tour:t[2],src:t[8],autoplay:!0};return void 0!==t[6]&&(r.currentTime=t[6]),e=new ys({props:r}),ut.push((()=>Bt(e,"currentTime",s))),e.$on("ended",t[22]),{c(){qt(e.$$.fragment)},m(t,i){Wt(e,t,i),n=!0},p(t,n){const s={};4&n[0]&&(s.tour=t[2]),256&n[0]&&(s.src=t[8]),!i&&64&n[0]&&(i=!0,s.currentTime=t[6],wt((()=>i=!1))),e.$set(s)},i(t){n||(Lt(e.$$.fragment,t),n=!0)},o(t){Pt(e.$$.fragment,t),n=!1},d(t){Xt(e,t)}}}function ar(t){let e,i,n,s;const r=[dr,cr,lr],o=[];function a(t,e){return t[16]&&"steps"in t[0]?0:t[18]?1:t[2]?2:-1}return~(e=a(t))&&(i=o[e]=r[e](t)),{c(){i&&i.c(),n=O()},m(t,i){~e&&o[e].m(t,i),I(t,n,i),s=!0},p(t,s){let l=e;e=a(t),e===l?~e&&o[e].p(t,s):(i&&(At(),Pt(o[l],1,1,(()=>{o[l]=null})),It()),~e?(i=o[e],i?i.p(t,s):(i=o[e]=r[e](t),i.c()),Lt(i,1),i.m(n.parentNode,n)):i=null)},i(t){s||(Lt(i),s=!0)},o(t){Pt(i),s=!1},d(t){t&&L(n),~e&&o[e].d(t)}}}function lr(t){let e,i,n;function s(e){t[30](e)}let r={tour:t[2],src:t[8],autoplay:!0};return void 0!==t[6]&&(r.currentTime=t[6]),e=new ys({props:r}),ut.push((()=>Bt(e,"currentTime",s))),e.$on("ended",t[22]),{c(){qt(e.$$.fragment)},m(t,i){Wt(e,t,i),n=!0},p(t,n){const s={};4&n[0]&&(s.tour=t[2]),256&n[0]&&(s.src=t[8]),!i&&64&n[0]&&(i=!0,s.currentTime=t[6],wt((()=>i=!1))),e.$set(s)},i(t){n||(Lt(e.$$.fragment,t),n=!0)},o(t){Pt(e.$$.fragment,t),n=!1},d(t){Xt(e,t)}}}function cr(t){let e,i,n,s,r,o;const a=[hr,ur],l=[];function c(t,e){return"steps"in t[0]?0:1}i=c(t),n=l[i]=a[i](t);let d=!t[0].cannotClose&&gr(t);return{c(){e=N("div"),n.c(),s=D(),d&&d.c(),V(e,"class","micrio-tour"),H(e,"left",t[14]),H(e,"serial-tour",t[14]),H(e,"video-tour",t[15]),H(e,"no-controls",t[17]),H(e,"minimized",!t[7]&&(t[10]||t[5]))},m(t,n){I(t,e,n),l[i].m(e,null),S(e,s),d&&d.m(e,null),o=!0},p(t,r){let u=i;i=c(t),i===u?l[i].p(t,r):(At(),Pt(l[u],1,1,(()=>{l[u]=null})),It(),n=l[i],n?n.p(t,r):(n=l[i]=a[i](t),n.c()),Lt(n,1),n.m(e,s)),t[0].cannotClose?d&&(At(),Pt(d,1,1,(()=>{d=null})),It()):d?(d.p(t,r),1&r[0]&&Lt(d,1)):(d=gr(t),d.c(),Lt(d,1),d.m(e,null)),(!o||1184&r[0])&&H(e,"minimized",!t[7]&&(t[10]||t[5]))},i(t){o||(Lt(n),Lt(d),t&&(r||$t((()=>{r=Ct(e,_e,{duration:200}),r.start()}))),o=!0)},o(t){Pt(n),Pt(d),o=!1},d(t){t&&L(e),l[i].d(),d&&d.d()}}}function dr(t){let e,i,n,s,r=Dt(t[0].steps.map(t[26])),o=[];for(let c=0;c<r.length;c+=1)o[c]=$r(rr(t,r,c));const a=t=>Pt(o[t],1,1,(()=>{o[t]=null}));let l=!t[0].cannotClose&&wr(t);return{c(){e=N("article");for(let t=0;t<o.length;t+=1)o[t].c();i=D(),l&&l.c(),n=O(),V(e,"class","scroll-tour micrio-tour")},m(r,a){I(r,e,a);for(let t=0;t<o.length;t+=1)o[t]&&o[t].m(e,null);t[27](e),I(r,i,a),l&&l.m(r,a),I(r,n,a),s=!0},p(t,i){if(8193&i[0]){let n;for(r=Dt(t[0].steps.map(t[26])),n=0;n<r.length;n+=1){const s=rr(t,r,n);o[n]?(o[n].p(s,i),Lt(o[n],1)):(o[n]=$r(s),o[n].c(),Lt(o[n],1),o[n].m(e,null))}for(At(),n=r.length;n<o.length;n+=1)a(n);It()}t[0].cannotClose?l&&(At(),Pt(l,1,1,(()=>{l=null})),It()):l?(l.p(t,i),1&i[0]&&Lt(l,1)):(l=wr(t),l.c(),Lt(l,1),l.m(n.parentNode,n))},i(t){if(!s){for(let t=0;t<r.length;t+=1)Lt(o[t]);Lt(l),s=!0}},o(t){o=o.filter(Boolean);for(let e=0;e<o.length;e+=1)Pt(o[e]);Pt(l),s=!1},d(s){s&&(L(e),L(i),L(n)),P(o,s),t[27](null),l&&l.d(s)}}}function ur(t){let e,i,n,s;function r(e){t[28](e)}function o(e){t[29](e)}let a={tour:t[0],src:t[8],fullscreen:t[11],controls:!0,autoplay:!0};return void 0!==t[7]&&(a.paused=t[7]),void 0!==t[6]&&(a.currentTime=t[6]),e=new ys({props:a}),ut.push((()=>Bt(e,"paused",r))),ut.push((()=>Bt(e,"currentTime",o))),e.$on("ended",t[22]),{c(){qt(e.$$.fragment)},m(t,i){Wt(e,t,i),s=!0},p(t,s){const r={};1&s[0]&&(r.tour=t[0]),256&s[0]&&(r.src=t[8]),!i&&128&s[0]&&(i=!0,r.paused=t[7],wt((()=>i=!1))),!n&&64&s[0]&&(n=!0,r.currentTime=t[6],wt((()=>n=!1))),e.$set(r)},i(t){s||(Lt(e.$$.fragment,t),s=!0)},o(t){Pt(e.$$.fragment,t),s=!1},d(t){Xt(e,t)}}}function hr(t){let e,i,n,s;const r=[pr,mr],o=[];return e=t[14]?0:1,i=o[e]=r[e](t),{c(){i.c(),n=O()},m(t,i){o[e].m(t,i),I(t,n,i),s=!0},p(t,e){i.p(t,e)},i(t){s||(Lt(i),s=!0)},o(t){Pt(i),s=!1},d(t){t&&L(n),o[e].d(t)}}}function mr(t){let e,i,n,s,r,o;return e=new Ui({props:{type:"arrow-left",title:t[9].tourStepPrev,disabled:0==t[4]}}),e.$on("click",t[19]),n=new Ui({props:{noClick:!0,$$slots:{default:[fr]},$$scope:{ctx:t}}}),r=new Ui({props:{type:"arrow-right",title:t[9].tourStepNext,disabled:t[4]==t[0].steps.length-1}}),r.$on("click",t[20]),{c(){qt(e.$$.fragment),i=D(),qt(n.$$.fragment),s=D(),qt(r.$$.fragment)},m(t,a){Wt(e,t,a),I(t,i,a),Wt(n,t,a),I(t,s,a),Wt(r,t,a),o=!0},p(t,i){const s={};512&i[0]&&(s.title=t[9].tourStepPrev),16&i[0]&&(s.disabled=0==t[4]),e.$set(s);const o={};17&i[0]|67108864&i[1]&&(o.$$scope={dirty:i,ctx:t}),n.$set(o);const a={};512&i[0]&&(a.title=t[9].tourStepNext),17&i[0]&&(a.disabled=t[4]==t[0].steps.length-1),r.$set(a)},i(t){o||(Lt(e.$$.fragment,t),Lt(n.$$.fragment,t),Lt(r.$$.fragment,t),o=!0)},o(t){Pt(e.$$.fragment,t),Pt(n.$$.fragment,t),Pt(r.$$.fragment,t),o=!1},d(t){t&&(L(i),L(s)),Xt(e,t),Xt(n,t),Xt(r,t)}}}function pr(t){let e,i;return e=new sr({props:{tour:t[0]}}),e.$on("ended",t[22]),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};1&i[0]&&(n.tour=t[0]),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function fr(t){let e,i,n,s=t[4]+1+"",r=t[0].steps.length+"";return{c(){e=z(s),i=z(" / "),n=z(r)},m(t,s){I(t,e,s),I(t,i,s),I(t,n,s)},p(t,i){16&i[0]&&s!==(s=t[4]+1+"")&&Y(e,s),1&i[0]&&r!==(r=t[0].steps.length+"")&&Y(n,r)},d(t){t&&(L(e),L(i),L(n))}}}function gr(t){let e,i;return e=new Ui({props:{type:"close",title:t[9].close}}),e.$on("click",t[21]),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};512&i[0]&&(n.title=t[9].close),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function vr(t){let e,i,n;return e=new Ys({props:{marker:t[54]}}),{c(){qt(e.$$.fragment),i=D()},m(t,s){Wt(e,t,s),I(t,i,s),n=!0},p(t,i){const n={};1&i[0]&&(n.marker=t[54]),e.$set(n)},i(t){n||(Lt(e.$$.fragment,t),n=!0)},o(t){Pt(e.$$.fragment,t),n=!1},d(t){t&&L(i),Xt(e,t)}}}function $r(t){let e,i,n=t[54]&&vr(t);return{c(){n&&n.c(),e=O()},m(t,s){n&&n.m(t,s),I(t,e,s),i=!0},p(t,i){t[54]?n?(n.p(t,i),1&i[0]&&Lt(n,1)):(n=vr(t),n.c(),Lt(n,1),n.m(e.parentNode,e)):n&&(At(),Pt(n,1,1,(()=>{n=null})),It())},i(t){i||(Lt(n),i=!0)},o(t){Pt(n),i=!1},d(t){t&&L(e),n&&n.d(t)}}}function wr(t){let e,i;return e=new Ui({props:{type:"close",title:t[9].tourStop,className:"scroll-tour-end"}}),e.$on("click",t[21]),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};512&i[0]&&(n.title=t[9].tourStop),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function yr(t){let e,i,n,s;const r=[ar,or],o=[];function a(t,e){return t[1]?t[2]?1:-1:0}return~(e=a(t))&&(i=o[e]=r[e](t)),{c(){i&&i.c(),n=O()},m(t,i){~e&&o[e].m(t,i),I(t,n,i),s=!0},p(t,s){let l=e;e=a(t),e===l?~e&&o[e].p(t,s):(i&&(At(),Pt(o[l],1,1,(()=>{o[l]=null})),It()),~e?(i=o[e],i?i.p(t,s):(i=o[e]=r[e](t),i.c()),Lt(i,1),i.m(n.parentNode,n)):i=null)},i(t){s||(Lt(i),s=!0)},o(t){Pt(i),s=!1},d(t){t&&L(n),~e&&o[e].d(t)}}}function br(t,e,i){var n,s;let r,o,a,l,c,d;h(t,Oe,(t=>i(9,c=t)));let{tour:u}=e,{noHTML:m=!1}=e;const p=ot(),f=lt("micrio"),{events:g,state:v,_lang:$}=f;h(t,$,(t=>i(25,l=t)));const w=f.$current,y=w.$data,b=w.$settings,k=f.canvases[0].grid,T=w.state.marker,x="steps"in u&&u.isSerialTour,_=!("steps"in u),E="scrollable"in u&&u.scrollable,S="steps"in u&&("controls"in u?!1!==u.controls:!u.noControls),M=!(!x&&"steps"in u&&(null==(n=b._markers)?void 0:n.tourControlsInPopup)),A=M&&(_||x),I=!!(null==(s=b._markers)?void 0:s.keepPopupsDuringTourTransitions),L=()=>z(X-1),P=()=>z(X+1),N=()=>g.enabled.set(!0);let C;function z(t){var e,i,n,s;if(!("steps"in u)||!u.stepInfo)return;const r=u.stepInfo[t];if(r&&r.markerId==(null==(e=f.state.$marker)?void 0:e.id))return D(r);const o=null==(n=null==(i=u.stepInfo[X])?void 0:i.micrioImage)?void 0:n.state;o&&o.marker.set(void 0),null==(s=f.$current)||s.state.marker.set(void 0),I||f.state.popup.set(void 0),f.removeEventListener("marker-opened",N),T.set(void 0),r&&(C=setTimeout(O,200,r))}async function D(t){var e,n,s,r,o,a,l;let c=w,d=!1;if(k&&!t.gridView&&k.images.find((e=>e.id==t.micrioId))){const i=!!("steps"in u&&u.stepInfo&&t)&&(null==(e=u.stepInfo)?void 0:e.indexOf(t))<X,o=(null==(n=t.marker.data)?void 0:n.gridTourTransition)??(null==(r=null==(s=t.marker.data)?void 0:s._meta)?void 0:r.gridTourTransition),a=(null==o?void 0:o.startsWith("slide"))?"slide":"swipe";await vt().then((()=>{const e=k.focus(c=k.images.find((e=>e.id==t.micrioId)),{view:t.startView,transition:o==a||o==`${a}-horiz`?i?`${a}-left`:`${a}-right`:o==`${a}-vert`?i?`${a}-up`:`${a}-down`:"behind"==o?i?"behind-left":"behind-right":o}).catch((()=>d=!0));return f.events.enabled.set(!1),e}))}else if((null==(o=f.$current)?void 0:o.id)!=t.micrioId){if(t.gridView&&(null==(l=null==(a=t.marker.data)?void 0:a._meta)?void 0:l.gridAction)&&k){t.micrioImage||(t.micrioImage=k.images.find((e=>e.id==t.micrioId))),c=t.micrioImage;const e=t.marker.data._meta.gridAction.split("|");k.action(e.shift(),e.join("|"))}else"steps"in u&&u.stepInfo&&i(4,X=u.stepInfo.indexOf(t)),c=f.open(t.micrioId,{gridView:t.gridView,startView:t.startView});await vt()}else c=f.$current;return[c,d]}async function O(t){let e=w,i=!1;t.micrioId&&([e,i]=await D(t)),i||(t.micrioImage||(t.micrioImage=e),g.enabled.set(!1),e.state.marker.set(t.markerId),f.addEventListener("marker-opened",N,{once:!0}),await vt(),g.dispatch("tour-step",u))}function R(){v.tour.set(void 0)}"steps"in u&&(u.prev=L,u.next=P,u.goto=z,Object.defineProperty(u,"currentStep",{configurable:!0,get:()=>X}));const F=Ht(!1);let U,V,B;function q(){F.set(!1),clearTimeout(U),U=setTimeout((()=>F.set(!0)),5e3)}function W(t){var e,i;if(!("steps"in u))return;const n=u.steps,s=t.filter((t=>t.isIntersecting)).map((t=>t.target))[0];if(s)for(let r=0;r<V.children.length;r++)if(V.children[r]==s){const t=null==(e=y.markers)?void 0:e.find((t=>t.id==n[r].split(",")[0]));return void(t&&(null==(i=f.$current)||i.camera.flyToView(t.view).catch((()=>{}))))}}h(t,F,(t=>i(10,d=t))),F.subscribe((t=>g.dispatch("tour-minimize",t)));let X=-1,G=!1;const Y=w.camera.getView(),j=b._markers;let H=[];rt((()=>("steps"in u&&we(w,u,l,w.$data).then((()=>function(t){var e;if(E||(null==(e=f.$current)?void 0:e.state.$marker)||void 0!==t.initialStep&&z(t.initialStep),E&&V){B=new IntersectionObserver(W,{root:V,threshold:1});for(let t=0;t<V.children.length;t++)B.observe(V.children[t])}H.push(f.state.marker.subscribe((e=>{if(!e)return void i(5,G=!1);const n="string"==typeof e?e:e.id,s=t.steps.findIndex((t=>t.startsWith(n)));if(s>=0&&t.stepInfo){const e=t.stepInfo[i(4,X=s)];e&&!e.micrioImage&&(e.micrioImage=f.canvases.find((t=>t.id==e.micrioId))??(null==k?void 0:k.images.find((t=>t.id==e.micrioId)))??f.$current)}i(5,G=s<0)})))}(u))),S||H.push(F.subscribe((t=>p("minimize",t)))),m||"steps"in u&&!x||!1===u.minimize||(f.addEventListener("pointermove",q),f.addEventListener("touchstart",q),q()),A&&f.setAttribute("data-tour-active",""),()=>{var t,e;for(clearTimeout(U),clearTimeout(C);H.length;)null==(t=H.shift())||t();f.removeEventListener("pointermove",q),f.removeEventListener("touchstart",q),f.removeEventListener("marker-opened",N),A&&f.removeAttribute("data-tour-active"),N(),B&&B.disconnect();const i=f.state.$marker;if("steps"in u&&u.stepInfo&&null!=u.currentStep){const t=u.stepInfo[u.currentStep];delete u.goto,delete u.next,delete u.prev,i&&(null==t?void 0:t.markerId)==i.id&&(null==(e=t.micrioImage)||e.state.marker.set(void 0),f.state.marker.set(void 0))}w.camera.aniDone=void 0,k||"steps"in u&&u.keepLastStep||f.$current==w||f.open(w.id),vt().then((()=>{g.dispatch("tour-stop",u),"steps"in u&&delete u.currentStep,!("steps"in u)&&(null==j?void 0:j.zoomOutAfterClose)&&!i&&Y&&w.camera.flyToView(Y,{speed:null==j?void 0:j.zoomOutAfterCloseSpeed,noTrueNorth:!0})}))}))),g.dispatch("tour-start",u);let Z=0,K=!1;return t.$$set=t=>{"tour"in t&&i(0,u=t.tour),"noHTML"in t&&i(1,m=t.noHTML)},t.$$.update=()=>{var e,n;1&t.$$.dirty[0]&&i(2,r="steps"in u?void 0:u),33554437&t.$$.dirty[0]&&i(24,o=r?"audio"in u?u.audio:null==(n=null==(e=r.i18n)?void 0:e[l])?void 0:n.audio:void 0),16777216&t.$$.dirty[0]&&i(8,a=o?"fileUrl"in o?o.fileUrl:o.src:void 0)},[u,m,r,V,X,G,Z,K,a,c,d,f,$,y,x,_,E,S,M,L,P,R,function(){g.dispatch("tour-ended",u),u.closeOnFinish&&R()},F,o,l,t=>y.markers&&y.markers.find((e=>e.id==t.split(",")[0])),function(t){ut[t?"unshift":"push"]((()=>{V=t,i(3,V)}))},function(t){K=t,i(7,K)},function(t){Z=t,i(6,Z)},function(t){Z=t,i(6,Z)},function(t){Z=t,i(6,Z)}]}class kr extends Yt{constructor(t){super(),Gt(this,t,br,yr,a,{tour:0,noHTML:1},null,[-1,-1])}}class Tr{constructor(t,e,i,n={}){this.micrio=t,this.length=e,this.goto=i,this.opts=n,this.hitTresh=!1,this.snapTo=[],this.pointers=new Map,this.isFullWidth=!1,this.startedWithShift=!1,this.isDragging=()=>2==this.pointers.size||(this.isFullWidth||this.startedWithShift)&&1==this.pointers.size,n.sensitivity||(n.sensitivity=Number(t.getAttribute("data-swipe-sensitivity")??1));const s=t.getAttribute("data-swipe-snap");s&&(this.snapTo=s.split(",").map(Number)),this.micrio.setAttribute("data-hooked",""),this.dStart=this.dStart.bind(this),this.dMove=this.dMove.bind(this),this.dStop=this.dStop.bind(this),this.mouseleave=this.mouseleave.bind(this),this.image=t.$current,this.image.state.view.subscribe((t=>this.isFullWidth=n.coverLimit?this.image.camera.isZoomedOut():!t||Math.round(1e3*(t[2]-t[0]))/1e3>=1));const r=t.wasm.getPtr();t.wasm.e.setNoPinchPan(r,!0),t.wasm.e.setIsSwipe(r,!0),this.micrio.canvas.element.addEventListener("pointerdown",this.dStart)}get currentIndex(){return this.micrio.wasm.e._getActiveImageIdx(this.image.ptr)}destroy(){this.micrio.canvas.element.removeEventListener("pointerdown",this.dStart),this.mouseleave()}dStart(t){this.startedWithShift=t.shiftKey;const e=!this.isDragging();this.pointers.set(t.pointerId,!0),this.pointers.size>2&&this.mouseleave(),e&&(this.hitTresh=!1,this.micrio.setAttribute("data-panning",""),this.startIndex=this.currentIndex,this.startX=t.clientX,this.firstTouchId=t.pointerId,this.micrio.addEventListener("pointermove",this.dMove),this.micrio.addEventListener("pointerup",this.dStop),this.micrio.setPointerCapture(t.pointerId))}dMove(t){if(!this.isDragging()||t.pointerId!=this.firstTouchId||void 0===this.startX||void 0===this.startIndex)return;if(!this.hitTresh&&void 0!==this.startX&&(this.hitTresh=2!=this.pointers.size||Math.abs(t.clientX-this.startX)>(this.micrio.events.pinchFactor&&this.micrio.events.pinchFactor>1.25?.3:.15)*this.micrio.offsetWidth)&&(this.startX=t.clientX),!this.hitTresh)return;const e=this.micrio.$current.camera,i=this.opts.continuous?Math.max(.1,(e.getXY(1,.5)[0]-e.getXY(0,.5)[0])/this.micrio.offsetWidth):1,n=Math.round((t.clientX-this.startX)/(this.micrio.offsetWidth*i)*this.length);let s=this.startIndex-n;if(this.opts.continuous){for(;s<0;)s+=this.length;for(;s>this.length-1;)s-=this.length}s=Math.max(0,Math.min(this.length-1,s)),s!=this.currentIndex&&this.goto(s)}dStop(t){this.pointers.delete(t.pointerId),t.pointerId==this.firstTouchId&&(this.micrio.releasePointerCapture(this.firstTouchId),this.firstTouchId=void 0),this.pointers.size||this.swipeEnd()}mouseleave(){this.pointers.clear(),this.swipeEnd()}swipeEnd(){if(this.micrio.removeAttribute("data-panning"),this.micrio.removeEventListener("pointermove",this.dMove),this.micrio.removeEventListener("pointerup",this.dStop),this.hitTresh=!1,this.snapTo.length){const t=this.snapTo[this.snapTo.map(((t,e)=>[e,Math.abs(t-this.currentIndex)])).sort(((t,e)=>t[1]>e[1]?1:t[1]<e[1]?-1:0))[0][0]];t!=this.currentIndex&&this.animateTo(t)}}animateTo(t){this.raf&&cancelAnimationFrame(this.raf);const e=performance.now(),i=this.currentIndex,n=i-t,s=t=>{const r=Math.min(1,(t-e)/250);r<1&&(this.raf=requestAnimationFrame(s));const o=i-Math.round(this.micrio.wasm.e.ease(r)*n);o!=this.currentIndex&&this.goto(o)};s(e)}}function xr(t){let e,i,n,s=Math.round(10*t[0])/10+"";return{c(){e=N("span"),i=z(s),n=z("º"),V(e,"class","micrio-dial")},m(t,s){I(t,e,s),S(e,i),S(e,n)},p(t,e){1&e&&s!==(s=Math.round(10*t[0])/10+"")&&Y(i,s)},d(t){t&&L(e)}}}function _r(e){let i,n,s,r=e[1]&&xr(e);return{c(){i=N("div"),r&&r.c(),j(i,"--micrio-dial-offset",e[3]+"px"),V(i,"data-scroll-through",""),V(i,"class","micrio-dial")},m(t,o){I(t,i,o),r&&r.m(i,null),e[6](i),n||(s=R(i,"pointerdown",U(F(e[4])),!0),n=!0)},p(t,[e]){t[1]?r?r.p(t,e):(r=xr(t),r.c(),r.m(i,null)):r&&(r.d(1),r=null),8&e&&j(i,"--micrio-dial-offset",t[3]+"px")},i:t,o:t,d(t){t&&L(i),r&&r.d(),e[6](null),n=!1,s()}}}function Er(t,e,i){let n,{currentRotation:s}=e,{frames:r}=e,{degrees:o}=e;const a=ot(),l=lt("micrio"),c=l.$current.camera;let d,u,h=0,m=0;function p(t){const e=Math.max(1,(c.getXY(1,.5)[0]-c.getXY(0,.5)[0])/l.offsetWidth);a("turn",(m/360+(h-t.clientX)/(d.offsetWidth*e))*r)}function f(){u&&l.releasePointerCapture(u),l.removeAttribute("data-panning"),l.removeEventListener("pointermove",p),l.removeEventListener("pointerup",f)}return t.$$set=t=>{"currentRotation"in t&&i(0,s=t.currentRotation),"frames"in t&&i(5,r=t.frames),"degrees"in t&&i(1,o=t.degrees)},t.$$.update=()=>{5&t.$$.dirty&&i(3,n=-s/360*((null==d?void 0:d.offsetWidth)??0))},[s,o,d,n,function(t){0==t.button&&(l.addEventListener("pointermove",p),l.addEventListener("pointerup",f),l.setAttribute("data-panning",""),l.setPointerCapture(u=t.pointerId),m=s,h=t.clientX)},r,function(t){ut[t?"unshift":"push"]((()=>{d=t,i(2,d)}))}]}class Sr extends Yt{constructor(t){super(),Gt(this,t,Er,_r,a,{currentRotation:0,frames:5,degrees:1})}}const{window:Mr}=E;function Ar(t,e,i){const n=t.slice();return n[90]=e[i],n[92]=i,n}function Ir(t){let e,i,n,s,o,a,l,c,d,u,h,m;i=new Ui({props:{type:"arrow-left",title:t[11].galleryPrev,className:"gallery-btn",disabled:0==t[1]}}),i.$on("pointerdown",t[32]);let p=Dt(t[21]),f=[];for(let r=0;r<p.length;r+=1)f[r]=Nr(Ar(t,p,r));return d=new Ui({props:{type:"arrow-right",title:t[11].galleryNext,className:"gallery-btn",disabled:t[1]==t[0].length-1}}),d.$on("pointerdown",t[37]),{c(){e=N("div"),qt(i.$$.fragment),n=D(),s=N("ul");for(let t=0;t<f.length;t+=1)f[t].c();o=D(),a=N("button"),c=D(),qt(d.$$.fragment),V(a,"style",l=`left: ${t[8]}px`),V(a,"class","micrio-gallery"),H(a,"dragging",t[2]),V(s,"class","micrio-gallery"),V(e,"class","micrio-gallery"),H(e,"hidden",t[5]||t[10]&&!t[2]&&!t[4])},m(r,l){I(r,e,l),Wt(i,e,null),S(e,n),S(e,s);for(let t=0;t<f.length;t+=1)f[t]&&f[t].m(s,null);S(s,o),S(s,a),t[35](s),S(e,c),Wt(d,e,null),u=!0,h||(m=[R(a,"pointerdown",U(F(t[24])),!0),R(a,"touchstart",U(F(t[24])),!0),R(s,"pointermove",t[25]),R(s,"pointerleave",t[36])],h=!0)},p(t,n){const r={};if(2048&n[0]&&(r.title=t[11].galleryPrev),2&n[0]&&(r.disabled=0==t[1]),i.$set(r),8388738&n[0]){let e;for(p=Dt(t[21]),e=0;e<p.length;e+=1){const i=Ar(t,p,e);f[e]?f[e].p(i,n):(f[e]=Nr(i),f[e].c(),f[e].m(s,o))}for(;e<f.length;e+=1)f[e].d(1);f.length=p.length}(!u||256&n[0]&&l!==(l=`left: ${t[8]}px`))&&V(a,"style",l),(!u||4&n[0])&&H(a,"dragging",t[2]);const c={};2048&n[0]&&(c.title=t[11].galleryNext),3&n[0]&&(c.disabled=t[1]==t[0].length-1),d.$set(c),(!u||1076&n[0])&&H(e,"hidden",t[5]||t[10]&&!t[2]&&!t[4])},i(t){u||(Lt(i.$$.fragment,t),Lt(d.$$.fragment,t),u=!0)},o(t){Pt(i.$$.fragment,t),Pt(d.$$.fragment,t),u=!1},d(n){n&&L(e),Xt(i),P(f,n),t[35](null),Xt(d),h=!1,r(m)}}}function Lr(t){var e;let i,n;return i=new Sr({props:{currentRotation:t[6],frames:t[22],degrees:null==(e=t[9].omni)?void 0:e.showDegrees}}),i.$on("turn",t[31]),{c(){qt(i.$$.fragment)},m(t,e){Wt(i,t,e),n=!0},p(t,e){var n;const s={};64&e[0]&&(s.currentRotation=t[6]),512&e[0]&&(s.degrees=null==(n=t[9].omni)?void 0:n.showDegrees),i.$set(s)},i(t){n||(Lt(i.$$.fragment,t),n=!0)},o(t){Pt(i.$$.fragment,t),n=!1},d(t){Xt(i,t)}}}function Pr(e){let i,n,s;return{c(){i=N("button"),i.textContent="✥",V(i,"class","angular micrio-gallery"),H(i,"dragging",e[2])},m(t,r){I(t,i,r),n||(s=R(i,"pointerdown",U(F(e[26])),!0),n=!0)},p(t,e){4&e[0]&&H(i,"dragging",t[2])},i:t,o:t,d(t){t&&L(i),n=!1,s()}}}function Nr(t){let e,i,n,s;function o(){return t[33](t[92])}function a(...e){return t[34](t[92],...e)}return{c(){e=N("li"),i=N("button"),i.textContent="•",V(i,"class","bullet micrio-gallery"),V(e,"class","micrio-gallery"),H(e,"active",t[92]==t[1]),H(e,"hover",t[92]==t[7])},m(t,r){I(t,e,r),S(e,i),n||(s=[R(i,"click",o),R(i,"keypress",a)],n=!0)},p(i,n){t=i,2&n[0]&&H(e,"active",t[92]==t[1]),128&n[0]&&H(e,"hover",t[92]==t[7])},d(t){t&&L(e),n=!1,r(s)}}}function Cr(t){let e,i,n,s,r=!t[20]&&function(t){let e,i,n,s;const r=[Pr,Lr,Ir],o=[];function a(t,e){return t[19]?0:t[18]&&!t[18].noDial&&t[16]?1:!t[17]&&t[0].length>1?2:-1}return~(e=a(t))&&(i=o[e]=r[e](t)),{c(){i&&i.c(),n=O()},m(t,i){~e&&o[e].m(t,i),I(t,n,i),s=!0},p(t,s){let l=e;e=a(t),e===l?~e&&o[e].p(t,s):(i&&(At(),Pt(o[l],1,1,(()=>{o[l]=null})),It()),~e?(i=o[e],i?i.p(t,s):(i=o[e]=r[e](t),i.c()),Lt(i,1),i.m(n.parentNode,n)):i=null)},i(t){s||(Lt(i),s=!0)},o(t){Pt(i),s=!1},d(t){t&&L(n),~e&&o[e].d(t)}}}(t);return{c(){r&&r.c(),e=O()},m(o,a){r&&r.m(o,a),I(o,e,a),i=!0,n||(s=R(Mr,"keydown",t[27]),n=!0)},p(t,e){t[20]||r.p(t,e)},i(t){i||(Lt(r),i=!0)},o(t){Pt(r),i=!1},d(t){t&&L(e),r&&r.d(t),n=!1,s()}}}function zr(t,e,i){var n,s,r,o,a;let l,c,d,u,m,p,f;h(t,Oe,(t=>i(11,f=t)));let{images:g=[]}=e,{omni:v=null}=e;const $=lt("micrio"),{wasm:w,current:y,events:b,_lang:k}=$;h(t,y,(t=>i(54,m=t))),h(t,k,(t=>i(53,u=t)));const T=m,x=T.$info,_=T.state.layer;h(t,_,(t=>i(52,c=t)));const E=T.settings;h(t,E,(t=>i(9,d=t)));const S=T.camera;if(v)for(let h=0;h<v.frames;h++)g.push({id:x.id+"/"+h,image:T,visible:Ht(!1),frame:h,opts:{area:[0,0,1,1]},ptr:-1,baseTileIdx:-1,thumbSrc:T.getTileSrc(T.levels,0,0,h)});const M=d.gallery,A="omni"==M.type,I=A||"swipe-full"==M.type,L=I||"switch"==M.type,P=A,N=!!M.isSpreads,C=M.coverPages??0,z=d.omni,D=A&&!!(null==z?void 0:z.twoAxes),O=M.startId||$.getAttribute("data-gallery-start-id"),R=M.archive,F=!!d.limitToCoverScale,U=!!d.noUI,V=(null==z?void 0:z.frontIndex)??0,B=(null==(n=null==z?void 0:z.layers)?void 0:n.length)??1,q=$.hasAttribute("data-gallery-start")?Number($.getAttribute("data-gallery-start")):null==(s=null==d?void 0:d.omni)?void 0:s.startIndex;let W=null==q||isNaN(q)?O?g.findIndex((t=>t.id==O)):0:q;W<0&&(W=0);const X=[],G=[];if(g)for(let h=0;h<g.length;h++){let t=null==(r=g[h].opts)?void 0:r.area;if(!t)continue;const e=t.slice(0);if(G.push([h]),N&&h-C>=0&&(h-C)%2==0&&g[h+1]){if(t=null==(o=g[++h].opts)?void 0:o.area,!t)continue;G[G.length-1].push(h),e[2]=t[2],e[3]=t[3]}X.push(e)}const Y=X.length/B,j=(null==(a=null==z?void 0:z.layers)?void 0:a.map((t=>({i18n:Object.fromEntries(Object.entries(t.i18n).map((([t,e],i)=>[t,{title:e??"Layer "+(i+1)}])))}))))??[];Object.keys(x.revision??{[u]:0}).forEach((t=>j.forEach(((e,i)=>{e.i18n[t]||(e.i18n[t]={title:"Layer "+(i+1)})}))));let H=-1,Z=L,K=!0,J=!1,Q=!0,tt=!1,et=0;function it(t,e=!1,n=150,s=!1){if(P){for(;t<0;)t+=Y;t%=Y}const r=t=Math.round(Math.max(0,Math.min(Y-1,t))),o=s||r!=H;if(i(1,H=r),o&&nt(),L)o&&(w.setActiveImage(T.ptr,G[H][0],G[H].length-1),A?w.render():(S.flyToView(X[H],{duration:n,speed:2}).then((()=>dt(X[H],!0))).catch((()=>{})),zt()));else{const s=S.getView(),r=X[t],a=tt&&(Z&&!J||o||s[0]<r[0]!=s[2]>r[2]);i(4,J=!1),a?S.flyToView(r,{duration:n,speed:1,progress:e?.5:0}).then((()=>dt(r,!0))).catch((()=>{})):(r&&0==n&&S.setView(r),dt(r,!0))}T.album.hooked=tt=!0}function nt(t){if(Nt&&t){if(Nt.currentIndex==H)return;i(1,H=Nt.currentIndex)}!function(t){const e=[];N&&t>=C&&(t=2*t-C);const i=Math.floor(t/st);for(let n=-ot;n<=ot;n++)if(n){let s=t+n;if(D){const t=Math.floor(s/st);t<i&&(s+=st),t>i&&(s-=st)}if(P){for(;s<0;)s+=g.length;for(;s>=g.length;)s-=g.length}e.push(s)}if(D)for(let n=-ot;n<=ot;n++)n&&e.push(t+n*st);e.filter(((t,i)=>e.indexOf(t)==i)).map((t=>g[t])).filter((t=>!!t&&!at.has(t.id))).forEach((t=>at.set(t.id,ct((()=>w.getTexture(t.baseTileIdx,t.thumbSrc,!1,{force:!!R}))))))}(H),b.dispatch("gallery-show",H),A&&i(6,et=(H-V)/Y*360)}const st=g.length,ot="requestIdleCallback"in self?A?Math.max(36,2*Math.floor(g.length/8)):100:50,at=new Map,ct=self.requestIdleCallback??self.requestAnimationFrame;function dt(t,e){Z=S.isZoomedOut(),S.setLimit(!e&&Z?[-1,t[1],2,t[3]]:t)}function ht(t){const e=null==mt?void 0:mt.childNodes[t];return e?-2+e.offsetLeft+e.offsetWidth/2:0}let mt,pt,ft=0,gt=!1;function vt(t){const e=pt??mt.getClientRects()[0],i="button"in t?t.clientX:t.touches[0].clientX,n=Math.min(1,Math.max(0,(i-e.left-14)/(e.width-32)));return[n,Math.max(0,Math.min(Y-1,Math.floor(n*Y)))]}function $t(t){const[e,n]=vt(t);i(30,ft=16+e*(pt.width-32)),n!=H&&it(n,!0)}let wt,yt,bt=-1;function kt(){window.removeEventListener(gt?"pointermove":"touchmove",$t),window.removeEventListener(gt?"pointerup":"touchend",kt),i(2,K=$.keepRendering=!1),it(H)}function Tt(){Z&&(yt=wt=H,i(4,J=Z),dt(X[H],!1))}function xt(t){const e=t.detail;"panend"!=t.type||e?it(yt!=H?yt:H+(wt==H&&J&&e?Math.round(Math.min(1,Math.max(-1,-e.movedX/e.duration))):0)):i(4,J=!1)}function _t(t){if(!t)return;const e=t[0]+(t[2]-t[0])/2,i=X.map(((i,n)=>(1-Math.min(Math.abs(e-i[0]),Math.abs(e-i[2])))*Math.max(0,(Math.min(t[2],i[2])-Math.max(t[0],i[0]))/(i[2]-i[0]))*(1-.1*Math.abs(H-n))));w.setFocus(T.ptr,X[yt=i.every((t=>!t))?H:i.indexOf(Math.max(...i))],J),Z=S.isZoomedOut()}let Et=0,St=[0,0,0,0];function Mt(t){Et=Math.max(0,Math.min(0,St[3]+Math.round((St[1]-t.clientY)/360*1)));let e=(St[2]+Math.round((St[0]-t.clientX)/360*st))%st;for(;e<0;)e+=st;it(Et*st+e)}function At(){removeEventListener("pointermove",Mt),removeEventListener("pointerup",At),i(2,K=!1)}let It=-1;const Lt=()=>{j.length&&T.data.update((t=>{t||(t={}),t.pages||(t.pages=[]);const e={id:"_omni-layers",i18n:j[c].i18n,icon:Xe,children:j.map(((t,e)=>({id:"omni-layer-"+e,i18n:t.i18n,action:()=>T.state.layer.set(e)}))).filter((t=>t.id!="omni-layer-"+c))};return It>=0?t.pages.splice(It,1,e):t.pages.push(e),It=t.pages.length-1,t}))};let Pt,Nt,Ct=$.state.ui.hidden;function zt(){Ct.set(!1),clearTimeout(Pt),Pt=setTimeout((()=>Ct.set(!0)),2e3)}h(t,Ct,(t=>i(10,p=t))),T.album={numPages:X.length,get currentIndex(){return H},info:T.$settings.album,prev:()=>it(H-1),next:()=>it(H+1),goto:it},rt((()=>{Promise.all(g.map((t=>("state"in t&&!("image"in t)&&(t.camera=T.camera),w.addEmbed(t,T,{opacity:0,asImage:"camera"in t}))))).then((()=>{w.setActiveImage(T.ptr,W),it(W,!1,0),i(2,K=!1)})),A&&B>1&&Lt(),i(5,Q=!1),$.goto=it;const t=[],e=[];return A&&T.state.layer.subscribe(Lt),I&&(Nt=T.swiper=new Tr($,Y,it,{continuous:P,coverLimit:F})),e.push((()=>{$.canvas.element.removeEventListener("pointermove",zt),$.canvas.element.removeEventListener("pointerdown",zt)})),A||D||I||($.canvas.element.addEventListener("pointermove",zt),$.canvas.element.addEventListener("pointerdown",zt),zt()),L&&t.push(T.state.view.subscribe((()=>{Z=S.isZoomedOut()}))),L||I||g.length<=1||(D||i(30,ft=ht(W)),t.push(T.state.view.subscribe(_t)),$.addEventListener("panstart",Tt),$.addEventListener("panend",xt),$.addEventListener("pinchend",xt),e.push((()=>{$.removeEventListener("panstart",Tt),$.removeEventListener("panend",xt),$.removeEventListener("pinchend",xt)}))),A&&$.addEventListener("move",nt),()=>{var i,n;for(Nt&&Nt.destroy();t.length;)null==(i=t.shift())||i();for(;e.length;)null==(n=e.shift())||n();A&&$.removeEventListener("move",nt)}}));return t.$$set=t=>{"images"in t&&i(0,g=t.images),"omni"in t&&i(29,v=t.omni)},t.$$.update=()=>{1073741838&t.$$.dirty[0]&&i(8,l=!mt||K?ft:ht(H))},[g,H,K,mt,J,Q,et,bt,l,d,p,f,y,k,_,E,A,I,z,D,U,X,Y,it,function(t){K||(gt="button"in t)&&0!=t.button||(pt=mt.getClientRects()[0],$.keepRendering=i(2,K=!0),i(7,bt=-1),window.addEventListener(gt?"pointermove":"touchmove",$t),window.addEventListener(gt?"pointerup":"touchend",kt),$t(t))},function(t){K||i(7,bt=vt(t)[1])},function(t){0==t.button&&(i(2,K=!0),St=[t.clientX,t.clientY,H,Et],window.addEventListener("pointermove",Mt),window.addEventListener("pointerup",At))},function(t){var e;if(!(null==(e=d.omni)?void 0:e.noKeys)){switch(t.key){case"PageUp":case"ArrowLeft":it(H-(A?-1:1),!0);break;case"PageDown":case"ArrowRight":it(H+(A?-1:1),!0);break;case"ArrowUp":D&&it(H+st);break;case"ArrowDown":D&&it(H-st);break;case"Home":it(0);break;case"End":it(Y);break;default:return}zt()}},Ct,v,ft,t=>it(t.detail),()=>it(H-1),t=>it(t,!0),(t,e)=>{"Enter"===e.key&&it(t,!0)},function(t){ut[t?"unshift":"push"]((()=>{mt=t,i(3,mt)}))},()=>i(7,bt=-1),()=>it(H+1)]}class Dr extends Yt{constructor(t){super(),Gt(this,t,zr,Cr,a,{images:0,omni:29},null,[-1,-1,-1])}}function Or(t,e,i){let{list:n}=e,{loop:s=!0}=e,{volume:r=1}=e;const o=new Audio;o.preload="none",o.loop=!1,o.onended=l;let a=-1;function l(){if(!s&&a+1==n.length)return;const t=n[++a%n.length];o.src="fileUrl"in t?t.fileUrl:t.src,o.play()}return rt((()=>(l(),()=>o.pause()))),t.$$set=t=>{"list"in t&&i(0,n=t.list),"loop"in t&&i(1,s=t.loop),"volume"in t&&i(2,r=t.volume)},t.$$.update=()=>{4&t.$$.dirty&&(o.volume=r)},[n,s,r]}class Rr extends Yt{constructor(t){super(),Gt(this,t,Or,null,a,{list:0,loop:1,volume:2})}}function Fr(t){let e,i;return e=new Rr({props:{list:t[1].music.items,loop:t[1].music.loop,volume:t[0]*(t[1].music.volume??1)}}),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};2&i&&(n.list=t[1].music.items),2&i&&(n.loop=t[1].music.loop),3&i&&(n.volume=t[0]*(t[1].music.volume??1)),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function Ur(t){var e;let i,n,s=t[2]&&t[3]&&(null==(e=t[1].music)?void 0:e.items.length)&&Fr(t);return{c(){s&&s.c(),i=O()},m(t,e){s&&s.m(t,e),I(t,i,e),n=!0},p(t,[e]){var n;t[2]&&t[3]&&(null==(n=t[1].music)?void 0:n.items.length)?s?(s.p(t,e),14&e&&Lt(s,1)):(s=Fr(t),s.c(),Lt(s,1),s.m(i.parentNode,i)):s&&(At(),Pt(s,1,1,(()=>{s=null})),It())},i(t){n||(Lt(s),n=!0)},o(t){Pt(s),n=!1},d(t){t&&L(i),s&&s.d(t)}}}let Vr;const Br={},qr=Ht();let Wr,Xr;const Gr=Ht(!1);function Yr(t,e,i){Xr.setPosition?Xr.setPosition(t,e,i):"positionX"in Xr&&(Xr.positionX.value=t,Xr.positionY.value=e,Xr.positionZ.value=i)}function jr(e,i,n){let s,r,o,a=t;h(e,Gr,(t=>n(2,r=t))),h(e,qr,(t=>n(3,o=t))),e.$$.on_destroy.push((()=>a()));let{volume:l=1}=i,{data:c}=i,{is360:d}=i;const{events:u,current:m}=lt("micrio");h(e,m,(t=>n(7,s=t)));const p=s,f=p.$info,g=f.height/f.width,v="AudioContext"in window||"webkitAudioContext"in window;function $(t,e,i){if(d){t*=2*-Math.PI,e-=.5,e*=-Math.PI;const n=10*(1-i),s=Math.cos(e)*Math.sin(t)*n,r=Math.sin(e)*n,o=Math.cos(e)*Math.cos(t)*n;Yr(s,r,o);let a=s*s+r*r+o*o;a>0&&(a=1/Math.sqrt(a)),function(t,e,i){Xr.setOrientation?Xr.setOrientation(t,e,i,0,1,0):"forwardX"in Xr&&(Xr.forwardX.value=t,Xr.forwardY.value=e,Xr.forwardZ.value=i)}(s*a,r*a,o*a)}else Yr(2*(t-.5),2*(.5-e)*g,i)}const w=()=>Gr.set(!0),y=new Audio("data:audio/mpeg;base64,/+MYxAAAAANIAUAAAASEEB/jwOFM/0MM/90b/+RhST//w4NFwOjf///PZu////9lns5GFDv//l9GlUIEEIAAAgIg8Ir/JGq3/+MYxDsLIj5QMYcoAP0dv9HIjUcH//yYSg+CIbkGP//8w0bLVjUP///3Z0x5QCAv/yLjwtGKTEFNRTMuOTeqqqqqqqqqqqqq/+MYxEkNmdJkUYc4AKqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq");return y.volume=ie.iOS?0:1,v&&rt((()=>{let t;return t=Gr.subscribe((e=>{var i;e&&(Wr||(!function(t){if(!Vr){if(Wr||(Wr="micrioAudioContext"in window?window.micrioAudioContext:"AudioContext"in window?new window.AudioContext:"webkitAudioContext"in window?new window.webkitAudioContext:null),!Wr)return console.warn("[Micrio] Your browser does not support the Web Audio API");Vr=Wr.createGain(),Vr.connect(Wr.destination),Vr.gain.value=t,qr.set(Wr),Xr=Wr.listener,"upX"in Xr&&(Xr.upX.value=0,Xr.upY.value=1,Xr.upZ.value=0)}}(l),u.dispatch("audio-init")),t&&(t(),t=null),(null==(i=c.markers)?void 0:i.filter((t=>!!t.positionalAudio)).length)&&(t=p.state.view.subscribe((t=>{if(!t)return;const e=t[2]-t[0],i=t[3]-t[1],n=Math.max(0,1.05-p.camera.getScale());$(t[0]+e/2,t[1]+i/2,n*(d?1:1.5))}))))})),Wr||y.play().then(w).catch((()=>{u.dispatch("autoplay-blocked"),addEventListener("pointerup",w,{once:!0})})),()=>{t&&t()}})),e.$$set=t=>{"volume"in t&&n(0,l=t.volume),"data"in t&&n(1,c=t.data),"is360"in t&&n(5,d=t.is360)},e.$$.update=()=>{1&e.$$.dirty&&Vr&&(Vr.gain.value=l)},[l,c,r,o,m,d]}class Hr extends Yt{constructor(t){super(),Gt(this,t,jr,Ur,a,{volume:0,data:1,is360:5})}}function Zr(t){let e,i,n,s,r,o,a=(t[8]||t[4])&&Kr(t),l=t[7]&&to(t),c=t[6]&&eo(t),d=t[2]&&io(t);return{c(){e=N("details"),a&&a.c(),i=D(),l&&l.c(),n=D(),c&&c.c(),s=D(),d&&d.c(),V(e,"class","micrio-details"),H(e,"opened",t[2])},m(r,u){I(r,e,u),a&&a.m(e,null),S(e,i),l&&l.m(e,null),S(e,n),c&&c.m(e,null),S(e,s),d&&d.m(e,null),t[20](e),o=!0},p(t,r){t[8]||t[4]?a?a.p(t,r):(a=Kr(t),a.c(),a.m(e,i)):a&&(a.d(1),a=null),t[7]?l?l.p(t,r):(l=to(t),l.c(),l.m(e,n)):l&&(l.d(1),l=null),t[6]?c?c.p(t,r):(c=eo(t),c.c(),c.m(e,s)):c&&(c.d(1),c=null),t[2]?d?(d.p(t,r),4&r&&Lt(d,1)):(d=io(t),d.c(),Lt(d,1),d.m(e,null)):d&&(At(),Pt(d,1,1,(()=>{d=null})),It()),(!o||4&r)&&H(e,"opened",t[2])},i(t){o||(Lt(d),t&&$t((()=>{o&&(r||(r=zt(e,_e,{duration:200},!0)),r.run(1))})),o=!0)},o(t){Pt(d),t&&(r||(r=zt(e,_e,{duration:200},!1)),r.run(0)),o=!1},d(i){i&&L(e),a&&a.d(),l&&l.d(),c&&c.d(),d&&d.d(),t[20](null),i&&r&&r.end()}}}function Kr(t){let e,i,n=t[8]&&Jr(t),s=t[4]&&Qr(t);return{c(){e=N("summary"),n&&n.c(),i=O(),s&&s.c(),V(e,"class","micrio-details")},m(t,r){I(t,e,r),n&&n.m(e,null),S(e,i),s&&s.m(e,null)},p(t,r){t[8]?n?n.p(t,r):(n=Jr(t),n.c(),n.m(e,i)):n&&(n.d(1),n=null),t[4]?s?s.p(t,r):(s=Qr(t),s.c(),s.m(e,null)):s&&(s.d(1),s=null)},d(t){t&&L(e),n&&n.d(),s&&s.d()}}}function Jr(t){let e,i;return{c(){e=N("cite"),i=z(t[8]),V(e,"class","micrio-details")},m(t,n){I(t,e,n),S(e,i)},p(t,e){256&e&&Y(i,t[8])},d(t){t&&L(e)}}}function Qr(t){let e,i;return{c(){e=N("small"),i=z(t[4]),V(e,"class","micrio-details")},m(t,n){I(t,e,n),S(e,i)},p(t,e){16&e&&Y(i,t[4])},d(t){t&&L(e)}}}function to(t){let e,i;return{c(){e=new K(!1),i=O(),e.a=i},m(n,s){e.m(t[7],n,s),I(n,i,s)},p(t,i){128&i&&e.p(t[7])},d(t){t&&(L(i),e.d())}}}function eo(t){let e,i,n,s=(t[5]||t[6])+"";return{c(){e=N("p"),i=N("a"),n=z(s),V(i,"rel","noopener noreferrer"),V(i,"href",t[6]),V(i,"target","_blank"),V(e,"class","micrio-details")},m(t,s){I(t,e,s),S(e,i),S(i,n)},p(t,e){96&e&&s!==(s=(t[5]||t[6])+"")&&Y(n,s),64&e&&V(i,"href",t[6])},d(t){t&&L(e)}}}function io(t){let e,i;return e=new Ui({props:{type:"close",title:t[9].close}}),e.$on("click",t[19]),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};512&i&&(n.title=t[9].close),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function no(t){let e,i,n=(t[8]||t[7]||t[6])&&Zr(t);return{c(){n&&n.c(),e=O()},m(t,s){n&&n.m(t,s),I(t,e,s),i=!0},p(t,[i]){t[8]||t[7]||t[6]?n?(n.p(t,i),448&i&&Lt(n,1)):(n=Zr(t),n.c(),Lt(n,1),n.m(e.parentNode,e)):n&&(At(),Pt(n,1,1,(()=>{n=null})),It())},i(t){i||(Lt(n),i=!0)},o(t){Pt(n),i=!1},d(t){t&&L(e),n&&n.d(t)}}}function so(t){let e="cm";return t>=1e5?(e="km",t/=1e5):t>=100?(e="m",t/=100):t<1e-6?(e="nm",t*=1e7):t<.001?(e="µm",t*=1e4):t<1&&(e="mm",t*=10),t.toFixed(2)+" "+e}function ro(e,i,n){let s,r,o,a,l,c,u,m,p,f,g,v,$,w=t,y=()=>(w(),w=d(T,(t=>n(15,p=t))),T),b=t,k=()=>(b(),b=d(x,(t=>n(16,f=t))),x);h(e,Oe,(t=>n(9,$=t))),e.$$.on_destroy.push((()=>w())),e.$$.on_destroy.push((()=>b()));let{info:T}=i;y();let{data:x}=i;k();const{_lang:_,current:E}=lt("micrio");h(e,_,(t=>n(17,g=t))),h(e,E,(t=>n(18,v=t)));let S,M=!1;rt((()=>{n(3,S.ontoggle=()=>{n(2,M=S.open)},S)}));return e.$$set=t=>{"info"in t&&y(n(0,T=t.info)),"data"in t&&k(n(1,x=t.data))},e.$$.update=()=>{262144&e.$$.dirty&&n(13,s=null==v?void 0:v.$settings.cmWidth),262144&e.$$.dirty&&n(12,r=null==v?void 0:v.$settings.cmHeight),196608&e.$$.dirty&&n(14,o=f?(null==f?void 0:f.i18n)?f.i18n[g]:f:void 0),49152&e.$$.dirty&&n(8,a=(null==o?void 0:o.title)??(null==p?void 0:p.title)??""),16384&e.$$.dirty&&n(7,l=null==o?void 0:o.description),16384&e.$$.dirty&&n(6,c=null==o?void 0:o.sourceUrl),16384&e.$$.dirty&&n(5,u=null==o?void 0:o.copyright),12288&e.$$.dirty&&n(4,m=s&&r?so(s)+" x "+so(r):null)},[T,x,M,S,m,u,c,l,a,$,_,E,r,s,o,p,f,g,v,()=>n(3,S.open=!1,S),function(t){ut[t?"unshift":"push"]((()=>{S=t,n(3,S)}))}]}class oo extends Yt{constructor(t){super(),Gt(this,t,ro,no,a,{info:0,data:1})}}function ao(t){let e,i,n,s;return i=new bi({props:{name:"error"}}),{c(){e=N("div"),qt(i.$$.fragment),n=z(t[0]),V(e,"class","micrio-error")},m(t,r){I(t,e,r),Wt(i,e,null),S(e,n),s=!0},p(t,[e]){(!s||1&e)&&Y(n,t[0])},i(t){s||(Lt(i.$$.fragment,t),s=!0)},o(t){Pt(i.$$.fragment,t),s=!1},d(t){t&&L(e),Xt(i)}}}function lo(t,e,i){let{message:n}=e;return t.$$set=t=>{"message"in t&&i(0,n=t.message)},[n]}let co=class extends Yt{constructor(t){super(),Gt(this,t,lo,ao,a,{message:0})}};function uo(t){let e;return{c(){e=N("figcaption")},m(i,n){I(i,e,n),e.innerHTML=t[2]},p(t,i){4&i&&(e.innerHTML=t[2])},d(t){t&&L(e)}}}function ho(e){let i,n,s,r,o,a,l,c=e[2]&&uo(e);return{c(){i=N("figure"),n=N("micr-io"),o=D(),c&&c.c(),X(n,"data-gallery",s=e[0].map(e[10]).join(";")),X(n,"data-start",e[1]),X(n,"data-path",r=e[3]&&e[3].$info&&e[3].$info.path),X(n,"data-logo","false"),X(n,"class","micrio-micrio-gallery")},m(t,s){I(t,i,s),S(i,n),S(i,o),c&&c.m(i,null),a||(l=R(n,"gallery-show",e[6]),a=!0)},p(t,[e]){9&e&&s!==(s=t[0].map(t[10]).join(";"))&&X(n,"data-gallery",s),2&e&&X(n,"data-start",t[1]),8&e&&r!==(r=t[3]&&t[3].$info&&t[3].$info.path)&&X(n,"data-path",r),t[2]?c?c.p(t,e):(c=uo(t),c.c(),c.m(i,null)):c&&(c.d(1),c=null)},i:t,o:t,d(t){t&&L(i),c&&c.d(),a=!1,l()}}}function mo(t,e,i){let n,s,r,o,{gallery:a}=e,{startId:l}=e;const c=lt("micrio"),{_lang:d,current:u}=c;let m;h(t,d,(t=>i(9,r=t))),h(t,u,(t=>i(3,o=t)));return t.$$set=t=>{"gallery"in t&&i(0,a=t.gallery),"startId"in t&&i(1,l=t.startId)},t.$$.update=()=>{var e,o;129&t.$$.dirty&&i(8,n=a[m]),768&t.$$.dirty&&i(2,s=(null==(o=null==(e=null==n?void 0:n.i18n)?void 0:e[r])?void 0:o.description)??void 0)},[a,l,s,o,d,u,t=>{i(7,m=t.detail)},m,n,r,t=>{var e;return`${t.micrioId},${t.width},${t.height},${t.isDeepZoom?"d":""}${t.isWebP?",w":t.isPng||!(null==o?void 0:o.isV5)&&(null==(e=t.src)?void 0:e.endsWith(".png"))?",p":""}`}]}class po extends Yt{constructor(t){super(),Gt(this,t,mo,ho,a,{gallery:0,startId:1})}}function fo(t,e,i){const n=t.slice();return n[37]=e[i],n}function go(t,e,i){const n=t.slice();return n[40]=e[i],n}function vo(t){let e,i,n,s=!t[2]&&$o(t),r=t[1]&&null!=t[1].currentStep&&wo(t);return{c(){e=N("aside"),s&&s.c(),i=D(),r&&r.c(),V(e,"class","micrio-popover"),H(e,"inside",!t[14])},m(t,o){I(t,e,o),s&&s.m(e,null),S(e,i),r&&r.m(e,null),n=!0},p(t,o){t[2]?s&&(At(),Pt(s,1,1,(()=>{s=null})),It()):s?(s.p(t,o),4&o[0]&&Lt(s,1)):(s=$o(t),s.c(),Lt(s,1),s.m(e,i)),t[1]&&null!=t[1].currentStep?r?(r.p(t,o),2&o[0]&&Lt(r,1)):(r=wo(t),r.c(),Lt(r,1),r.m(e,null)):r&&(At(),Pt(r,1,1,(()=>{r=null})),It()),(!n||16384&o[0])&&H(e,"inside",!t[14])},i(t){n||(Lt(s),Lt(r),n=!0)},o(t){Pt(s),Pt(r),n=!1},d(t){t&&L(e),s&&s.d(),r&&r.d()}}}function $o(t){let e,i;return e=new Ui({props:{type:"close",title:t[17].close,className:"close-popover"}}),e.$on("click",t[21]),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};131072&i[0]&&(n.title=t[17].close),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function wo(t){let e,i,n,s=t[1].currentStep>0&&yo(t),r=t[1].currentStep<t[1].steps.length-1&&bo(t);return{c(){s&&s.c(),e=D(),r&&r.c(),i=O()},m(t,o){s&&s.m(t,o),I(t,e,o),r&&r.m(t,o),I(t,i,o),n=!0},p(t,n){t[1].currentStep>0?s?(s.p(t,n),2&n[0]&&Lt(s,1)):(s=yo(t),s.c(),Lt(s,1),s.m(e.parentNode,e)):s&&(At(),Pt(s,1,1,(()=>{s=null})),It()),t[1].currentStep<t[1].steps.length-1?r?(r.p(t,n),2&n[0]&&Lt(r,1)):(r=bo(t),r.c(),Lt(r,1),r.m(i.parentNode,i)):r&&(At(),Pt(r,1,1,(()=>{r=null})),It())},i(t){n||(Lt(s),Lt(r),n=!0)},o(t){Pt(s),Pt(r),n=!1},d(t){t&&(L(e),L(i)),s&&s.d(t),r&&r.d(t)}}}function yo(t){let e,i;return e=new Ui({props:{type:"arrow-left",title:t[17].tourStepPrev,className:"prev-tour-step"}}),e.$on("click",t[26]),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};131072&i[0]&&(n.title=t[17].tourStepPrev),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function bo(t){let e,i;return e=new Ui({props:{type:"arrow-right",title:t[17].tourStepNext,className:"next-tour-step"}}),e.$on("click",t[27]),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};131072&i[0]&&(n.title=t[17].tourStepNext),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function ko(t){let e,i,n,s,r,o,a=t[20].length>1&&function(t){let e,i,n=Dt(t[20]),s=[];for(let o=0;o<n.length;o+=1)s[o]=Eo(go(t,n,o));const r=t=>Pt(s[t],1,1,(()=>{s[t]=null}));return{c(){e=N("menu");for(let t=0;t<s.length;t+=1)s[t].c();V(e,"class","micrio-popover")},m(t,n){I(t,e,n);for(let i=0;i<s.length;i+=1)s[i]&&s[i].m(e,null);i=!0},p(t,i){if(1049344&i[0]){let o;for(n=Dt(t[20]),o=0;o<n.length;o+=1){const r=go(t,n,o);s[o]?(s[o].p(r,i),Lt(s[o],1)):(s[o]=Eo(r),s[o].c(),Lt(s[o],1),s[o].m(e,null))}for(At(),o=n.length;o<s.length;o+=1)r(o);It()}},i(t){if(!i){for(let t=0;t<n.length;t+=1)Lt(s[t]);i=!0}},o(t){s=s.filter(Boolean);for(let e=0;e<s.length;e+=1)Pt(s[e]);i=!1},d(t){t&&L(e),P(s,t)}}}(t);const l=[Mo,So],c=[];function d(t,e){return t[16]?0:1}i=d(t),n=c[i]=l[i](t);let u=t[5].buttons&&t[5].buttons.length&&zo(t);return{c(){a&&a.c(),e=D(),n.c(),s=D(),u&&u.c(),r=O()},m(t,n){a&&a.m(t,n),I(t,e,n),c[i].m(t,n),I(t,s,n),u&&u.m(t,n),I(t,r,n),o=!0},p(t,e){t[20].length>1&&a.p(t,e);let o=i;i=d(t),i===o?c[i].p(t,e):(At(),Pt(c[o],1,1,(()=>{c[o]=null})),It(),n=c[i],n?n.p(t,e):(n=c[i]=l[i](t),n.c()),Lt(n,1),n.m(s.parentNode,s)),t[5].buttons&&t[5].buttons.length?u?(u.p(t,e),32&e[0]&&Lt(u,1)):(u=zo(t),u.c(),Lt(u,1),u.m(r.parentNode,r)):u&&(At(),Pt(u,1,1,(()=>{u=null})),It())},i(t){o||(Lt(a),Lt(n),Lt(u),o=!0)},o(t){Pt(a),Pt(n),Pt(u),o=!1},d(t){t&&(L(e),L(s),L(r)),a&&a.d(t),c[i].d(t),u&&u.d(t)}}}function To(t){let e,i;return e=new po({props:{gallery:t[0].gallery,startId:t[0].galleryStart}}),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};1&i[0]&&(n.gallery=t[0].gallery),1&i[0]&&(n.startId=t[0].galleryStart),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function xo(t){let e,i,n,s,r;const o=[Fo,Ro],a=[];function l(t,e){return t[4]&&t[4].embedUrl?0:t[7].images&&t[7].images.length?1:-1}~(e=l(t))&&(i=a[e]=o[e](t));let c=t[13]&&Uo(t);return{c(){i&&i.c(),n=D(),c&&c.c(),s=O()},m(t,i){~e&&a[e].m(t,i),I(t,n,i),c&&c.m(t,i),I(t,s,i),r=!0},p(t,r){let d=e;e=l(t),e===d?~e&&a[e].p(t,r):(i&&(At(),Pt(a[d],1,1,(()=>{a[d]=null})),It()),~e?(i=a[e],i?i.p(t,r):(i=a[e]=o[e](t),i.c()),Lt(i,1),i.m(n.parentNode,n)):i=null),t[13]?c?(c.p(t,r),8192&r[0]&&Lt(c,1)):(c=Uo(t),c.c(),Lt(c,1),c.m(s.parentNode,s)):c&&(At(),Pt(c,1,1,(()=>{c=null})),It())},i(t){r||(Lt(i),Lt(c),r=!0)},o(t){Pt(i),Pt(c),r=!1},d(t){t&&(L(n),L(s)),~e&&a[e].d(t),c&&c.d(t)}}}function _o(e){let i,n=e[40].toUpperCase()+"";return{c(){i=z(n)},m(t,e){I(t,i,e)},p:t,d(t){t&&L(i)}}}function Eo(t){let e,i,n;return e=new Ui({props:{title:(null==en?void 0:en.of(t[40]))??t[40],active:t[40]==t[8],$$slots:{default:[_o]},$$scope:{ctx:t}}}),e.$on("click",(function(){return t[28](t[40])})),{c(){qt(e.$$.fragment),i=D()},m(t,s){Wt(e,t,s),I(t,i,s),n=!0},p(i,n){t=i;const s={};256&n[0]&&(s.active=t[40]==t[8]),4096&n[1]&&(s.$$scope={dirty:n,ctx:t}),e.$set(s)},i(t){n||(Lt(e.$$.fragment,t),n=!0)},o(t){Pt(e.$$.fragment,t),n=!1},d(t){t&&L(i),Xt(e,t)}}}function So(t){let e,i;return e=new xs({props:{$$slots:{default:[No]},$$scope:{ctx:t}}}),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};1096&i[0]|4096&i[1]&&(n.$$scope={dirty:i,ctx:t}),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function Mo(t){let e,i,n=t[10]&&Co(t);return{c(){n&&n.c(),e=O()},m(t,s){n&&n.m(t,s),I(t,e,s),i=!0},p(t,i){t[10]?n?(n.p(t,i),1024&i[0]&&Lt(n,1)):(n=Co(t),n.c(),Lt(n,1),n.m(e.parentNode,e)):n&&(At(),Pt(n,1,1,(()=>{n=null})),It())},i(t){i||(Lt(n),i=!0)},o(t){Pt(n),i=!1},d(t){t&&L(e),n&&n.d(t)}}}function Ao(t){let e,i,n=t[3].title+"";return{c(){e=N("h2"),i=z(n),V(e,"class","micrio-popover")},m(t,n){I(t,e,n),S(e,i)},p(t,e){8&e[0]&&n!==(n=t[3].title+"")&&Y(i,n)},d(t){t&&L(e)}}}function Io(t){let e,i;return e=new ys({props:{src:t[3].embed,controls:!0}}),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};8&i[0]&&(n.src=t[3].embed),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function Lo(t){let e,i;return{c(){e=N("img"),c(e.src,i=t[6])||V(e,"src",i),V(e,"alt","")},m(t,i){I(t,e,i)},p(t,n){64&n[0]&&!c(e.src,i=t[6])&&V(e,"src",i)},d(t){t&&L(e)}}}function Po(t){let e,i,n=t[3].content+"";return{c(){e=new K(!1),i=O(),e.a=i},m(t,s){e.m(n,t,s),I(t,i,s)},p(t,i){8&i[0]&&n!==(n=t[3].content+"")&&e.p(n)},d(t){t&&(L(i),e.d())}}}function No(t){let e,i,n,s,r,o=t[3].title&&Ao(t),a=t[3].embed&&t[10]&&Io(t),l=t[6]&&Lo(t),c=t[3].content&&Po(t);return{c(){o&&o.c(),e=D(),a&&a.c(),i=D(),l&&l.c(),n=D(),c&&c.c(),s=O()},m(t,d){o&&o.m(t,d),I(t,e,d),a&&a.m(t,d),I(t,i,d),l&&l.m(t,d),I(t,n,d),c&&c.m(t,d),I(t,s,d),r=!0},p(t,r){t[3].title?o?o.p(t,r):(o=Ao(t),o.c(),o.m(e.parentNode,e)):o&&(o.d(1),o=null),t[3].embed&&t[10]?a?(a.p(t,r),1032&r[0]&&Lt(a,1)):(a=Io(t),a.c(),Lt(a,1),a.m(i.parentNode,i)):a&&(At(),Pt(a,1,1,(()=>{a=null})),It()),t[6]?l?l.p(t,r):(l=Lo(t),l.c(),l.m(n.parentNode,n)):l&&(l.d(1),l=null),t[3].content?c?c.p(t,r):(c=Po(t),c.c(),c.m(s.parentNode,s)):c&&(c.d(1),c=null)},i(t){r||(Lt(a),r=!0)},o(t){Pt(a),r=!1},d(t){t&&(L(e),L(i),L(n),L(s)),o&&o.d(t),a&&a.d(t),l&&l.d(t),c&&c.d(t)}}}function Co(t){let e,i;return e=new ys({props:{src:t[3].embed,figcaption:t[3].content,controls:!0,autoplay:!0,destroying:t[24]}}),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};8&i[0]&&(n.src=t[3].embed),8&i[0]&&(n.figcaption=t[3].content),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function zo(t){let e,i,n=Dt(t[5].buttons),s=[];for(let o=0;o<n.length;o+=1)s[o]=Oo(fo(t,n,o));const r=t=>Pt(s[t],1,1,(()=>{s[t]=null}));return{c(){e=N("menu");for(let t=0;t<s.length;t+=1)s[t].c();V(e,"class","right micrio-popover")},m(t,n){I(t,e,n);for(let i=0;i<s.length;i+=1)s[i]&&s[i].m(e,null);i=!0},p(t,i){if(8388896&i[0]){let o;for(n=Dt(t[5].buttons),o=0;o<n.length;o+=1){const r=fo(t,n,o);s[o]?(s[o].p(r,i),Lt(s[o],1)):(s[o]=Oo(r),s[o].c(),Lt(s[o],1),s[o].m(e,null))}for(At(),o=n.length;o<s.length;o+=1)r(o);It()}},i(t){if(!i){for(let t=0;t<n.length;t+=1)Lt(s[t]);i=!0}},o(t){s=s.filter(Boolean);for(let e=0;e<s.length;e+=1)Pt(s[e]);i=!1},d(t){t&&L(e),P(s,t)}}}function Do(t){let e,i=t[37].i18nTitle[t[8]]+"";return{c(){e=z(i)},m(t,i){I(t,e,i)},p(t,n){288&n[0]&&i!==(i=t[37].i18nTitle[t[8]]+"")&&Y(e,i)},d(t){t&&L(e)}}}function Oo(t){let e,i,n;return e=new Ui({props:{href:"link"==t[37].type?t[37].action:void 0,blankTarget:t[37].blankTarget,$$slots:{default:[Do]},$$scope:{ctx:t}}}),e.$on("click",(function(){return t[29](t[37])})),{c(){qt(e.$$.fragment),i=D()},m(t,s){Wt(e,t,s),I(t,i,s),n=!0},p(i,n){t=i;const s={};32&n[0]&&(s.href="link"==t[37].type?t[37].action:void 0),32&n[0]&&(s.blankTarget=t[37].blankTarget),288&n[0]|4096&n[1]&&(s.$$scope={dirty:n,ctx:t}),e.$set(s)},i(t){n||(Lt(e.$$.fragment,t),n=!0)},o(t){Pt(e.$$.fragment,t),n=!1},d(t){t&&L(i),Xt(e,t)}}}function Ro(t){let e,i;return e=new po({props:{gallery:t[7].images}}),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};128&i[0]&&(n.gallery=t[7].images),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function Fo(t){let e,i;return e=new ys({props:{src:t[4]?t[4].embedUrl:void 0,uuid:t[7].id,figcaption:t[4]?t[4].embedDescription:void 0,controls:!0,autoplay:t[7].embedAutoPlay,destroying:t[24]}}),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};16&i[0]&&(n.src=t[4]?t[4].embedUrl:void 0),128&i[0]&&(n.uuid=t[7].id),16&i[0]&&(n.figcaption=t[4]?t[4].embedDescription:void 0),128&i[0]&&(n.autoplay=t[7].embedAutoPlay),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function Uo(t){let e,i;return e=new Bs({props:{marker:t[7],destroying:t[24],noEmbed:!0,noGallery:!0,noImages:!t[4]||!t[4].embedUrl}}),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};128&i[0]&&(n.marker=t[7]),16&i[0]&&(n.noImages=!t[4]||!t[4].embedUrl),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function Vo(t){let e,i,n,s,o,a,l,c=t[12]&&vo(t);const d=[xo,To,ko],u=[];function h(t,e){return t[7]?0:t[0].gallery?1:t[5]&&t[3]?2:-1}return~(n=h(t))&&(s=u[n]=d[n](t)),{c(){e=N("dialog"),c&&c.c(),i=D(),s&&s.c(),V(e,"class","micrio-popover"),H(e,"page",!!t[5]),H(e,"article",!!t[5]&&!t[16]),H(e,"has-media",t[15])},m(s,r){I(s,e,r),c&&c.m(e,null),S(e,i),~n&&u[n].m(e,null),t[30](e),o=!0,a||(l=[R(e,"close",t[22]),R(e,"outrostart",t[31])],a=!0)},p(t,r){t[12]?c?(c.p(t,r),4096&r[0]&&Lt(c,1)):(c=vo(t),c.c(),Lt(c,1),c.m(e,i)):c&&(At(),Pt(c,1,1,(()=>{c=null})),It());let a=n;n=h(t),n===a?~n&&u[n].p(t,r):(s&&(At(),Pt(u[a],1,1,(()=>{u[a]=null})),It()),~n?(s=u[n],s?s.p(t,r):(s=u[n]=d[n](t),s.c()),Lt(s,1),s.m(e,null)):s=null),(!o||32&r[0])&&H(e,"page",!!t[5]),(!o||65568&r[0])&&H(e,"article",!!t[5]&&!t[16]),(!o||32768&r[0])&&H(e,"has-media",t[15])},i(t){o||(Lt(c),Lt(s),o=!0)},o(t){Pt(c),Pt(s),o=!1},d(i){i&&L(e),c&&c.d(),~n&&u[n].d(),t[30](null),a=!1,r(l)}}}function Bo(t,e,i){let n,s,r,o,a,l,c,d,u,m,p,f,g,v,$,w;h(t,Oe,(t=>i(17,w=t)));let{popover:y}=e;const b=lt("micrio"),{events:k,state:T,current:x,_lang:_}=b;h(t,x,(t=>i(33,$=t))),h(t,_,(t=>i(8,v=t)));const E=null==$?void 0:$.$data,S=Object.keys((null==E?void 0:E.revision)??[]);function M(){L.close()}function A(t){M(),"close"!=t.type&&setTimeout((()=>{var e,i;switch(t.type){case"marker":null==$||$.state.marker.set(t.action);break;case"mtour":b.state.tour.set(null==(e=null==E?void 0:E.markerTours)?void 0:e.find((e=>e.id==t.action)));break;case"vtour":b.state.tour.set(null==(i=null==E?void 0:E.tours)?void 0:i.find((e=>e.id==t.action)))}}),200)}const I=Ht(!1);let L,P=!0,N=v;rt((()=>(L.showModal(),vt().then((()=>{const t=L.querySelector("button.active")??L.querySelector("button");null==t||t.focus()})),_.subscribe((t=>{t&&t!=N&&(i(10,P=!1),N=t,setTimeout((()=>i(10,P=!0)),200))})))));return t.$$set=t=>{"popover"in t&&i(0,y=t.popover)},t.$$.update=()=>{var e,h,$,w;1&t.$$.dirty[0]&&i(7,n=y.marker),384&t.$$.dirty[0]&&i(4,s=n?n.i18n?n.i18n[v]:n:void 0),1&t.$$.dirty[0]&&i(1,r=y.markerTour),1&t.$$.dirty[0]&&i(5,o=y.contentPage),288&t.$$.dirty[0]&&i(3,a=o?(null==(e=o.i18n)?void 0:e[v])??o:void 0),40&t.$$.dirty[0]&&i(16,l=o&&a&&!(null==(h=null==o?void 0:o.buttons)?void 0:h.length)?!(!a.embed||a.content&&!(a.content.length<250)||o.image):void 0),32&t.$$.dirty[0]&&i(6,c=(null==o?void 0:o.image)?"string"==typeof o.image?o.image:o.image.src:void 0),72&t.$$.dirty[0]&&i(15,d=!!(null==a?void 0:a.embed)||!!c),32&t.$$.dirty[0]&&i(2,u=!!(null==($=null==o?void 0:o.buttons)?void 0:$.find((t=>"close"==t.type)))),1&t.$$.dirty[0]&&i(25,m=!!(null==(w=y.marker)?void 0:w.images)&&y.marker.images.length>0),33554448&t.$$.dirty[0]&&i(14,p=s&&s.body||m),33554456&t.$$.dirty[0]&&i(13,f=s&&s.body||m&&(null==a?void 0:a.embed)),6&t.$$.dirty[0]&&i(12,g=!u||r&&null!=r.currentStep)},[y,r,u,a,s,o,c,n,v,b,P,L,g,f,p,d,l,w,x,_,S,M,function(){var t;y.contentPage?k.dispatch("page-closed"):r?T.tour.set(void 0):y.marker&&(null==(t=y.image)||t.state.marker.set(void 0)),T.popover.set(void 0)},A,I,m,()=>r&&r.prev&&r.prev(),()=>r&&r.next&&r.next(),t=>i(9,b.lang=t,b),t=>A(t),function(t){ut[t?"unshift":"push"]((()=>{L=t,i(11,L)}))},()=>I.set(!0)]}class qo extends Yt{constructor(t){super(),Gt(this,t,Bo,Vo,a,{popover:0},null,[-1,-1])}}function Wo(t,e,i){let n,{marker:s}=e,{ctx:r}=e,{is360:o}=e;const a=r.createGain();a.connect(Vr);const l=lt("micrio"),c=l.$current.$info,d=c.width,u=c.height,h=r.createPanner();function m(){if(a.gain.value=n.volume??1,o){h.refDistance=2.75*n.radius,h.maxDistance=n.radius*(11/3);const t=s.x*-Math.PI*2,e=(s.y-.5)*-Math.PI,i=h.positionX.value=Math.cos(e)*Math.sin(t)*11,r=h.positionY.value=11*Math.sin(e),o=h.positionZ.value=Math.cos(e)*Math.cos(t)*11;let a=i*i+r*r+o*o;a>0&&(a=1/Math.sqrt(a)),h.orientationX.value=i*a,h.orientationY.value=r*a,h.orientationZ.value=o*a}else h.distanceModel="linear",h.positionX.value=2*(s.x-.5),h.positionY.value=2*(.5-s.y)*(u/d),h.positionZ.value=-.2,h.rolloffFactor=2,h.refDistance=n.radius*n.radius*10,h.maxDistance=5*n.radius}let p,f;function g(){p&&p.disconnect(),p=r.createBufferSource(),n.loop&&(n.repeatAfter>0?p.onended=()=>{f=setTimeout(g,1e3*n.repeatAfter)}:p.loop=!0),a.gain.value=n.volume??1,p.buffer=Br[n.src],p.connect(h),p.start()}h.panningModel="equalpower",h.rolloffFactor=1,h.coneOuterGain=0;let v=JSON.stringify(n);return rt((()=>(m(),h.connect(a),async function(){n.src&&(Br[n.src]||(Br[n.src]=await fetch(n.src).then((t=>t.arrayBuffer())).then((t=>r.decodeAudioData(t)))),n.alwaysPlay&&n.repeatAfter>0?f=setTimeout(g,1e3*n.repeatAfter):g())}(),l.addEventListener("audio-update",m),()=>{l.removeEventListener("audio-update",m),p&&p.disconnect(),clearTimeout(f),h.disconnect(),a.disconnect()}))),t.$$set=t=>{"marker"in t&&i(0,s=t.marker),"ctx"in t&&i(1,r=t.ctx),"is360"in t&&i(2,o=t.is360)},t.$$.update=()=>{if(1&t.$$.dirty&&i(4,n=s.positionalAudio),24&t.$$.dirty){const t=JSON.stringify(n);v!=t&&i(3,v=t)&&m()}},[s,r,o,v,n]}class Xo extends Yt{constructor(t){super(),Gt(this,t,Wo,null,a,{marker:0,ctx:1,is360:2})}}function Go(t){let e,i,n,s,r,o,a=!t[0].htmlElement&&Yo(t);return{c(){e=N("div"),a&&a.c(),V(e,"id",i=`m-${t[0].id}`),V(e,"class",$(t[30])+" micrio-marker"),V(e,"style",n=t[11]?`--mat:matrix3d(${t[11]})`:t[12]?`--x:${t[12]}px;--y:${t[13]}px${t[32]?`;--scale:${t[14]}`:""}`:null),H(e,"overlapped",t[2]&&!t[3]),H(e,"cluster",t[31]),H(e,"behind",t[10]),H(e,"hovered",t[21]==t[0].id),H(e,"default",t[19]),H(e,"mat3d",!!t[11]),H(e,"opened",t[3]),H(e,"micrio-link",!!t[29].micrioLink),H(e,"has-icon",t[5]),H(e,"has-custom-icon",!!t[6])},m(i,n){I(i,e,n),a&&a.m(e,null),t[50](e),s=!0,r||(o=R(e,"change",t[40]),r=!0)},p(t,r){t[0].htmlElement?a&&(At(),Pt(a,1,1,(()=>{a=null})),It()):a?(a.p(t,r),1&r[0]&&Lt(a,1)):(a=Yo(t),a.c(),Lt(a,1),a.m(e,null)),(!s||1&r[0]&&i!==(i=`m-${t[0].id}`))&&V(e,"id",i),(!s||30720&r[0]&&n!==(n=t[11]?`--mat:matrix3d(${t[11]})`:t[12]?`--x:${t[12]}px;--y:${t[13]}px${t[32]?`;--scale:${t[14]}`:""}`:null))&&V(e,"style",n),(!s||12&r[0])&&H(e,"overlapped",t[2]&&!t[3]),(!s||1024&r[0])&&H(e,"behind",t[10]),(!s||2097153&r[0])&&H(e,"hovered",t[21]==t[0].id),(!s||524288&r[0])&&H(e,"default",t[19]),(!s||2048&r[0])&&H(e,"mat3d",!!t[11]),(!s||8&r[0])&&H(e,"opened",t[3]),(!s||32&r[0])&&H(e,"has-icon",t[5]),(!s||64&r[0])&&H(e,"has-custom-icon",!!t[6])},i(t){s||(Lt(a),s=!0)},o(t){Pt(a),s=!1},d(i){i&&L(e),a&&a.d(),t[50](null),r=!1,o()}}}function Yo(t){let e,i,n,s,o,a,l,c,d;const u=[Ho,jo],h=[];function m(t,e){return t[6]?0:t[7]?1:-1}~(i=m(t))&&(n=h[i]=u[i](t));let p=t[18]&&Zo(t);return{c(){e=N("button"),n&&n.c(),s=D(),p&&p.c(),V(e,"title",o=t[34]||t[31]?null:t[4]?t[4].label||t[4].title:null),V(e,"id",a=t[0].id),V(e,"data-scroll-through",""),V(e,"class","micrio-marker")},m(n,r){I(n,e,r),~i&&h[i].m(e,null),S(e,s),p&&p.m(e,null),t[49](e),l=!0,c||(d=[R(e,"click",t[35]),R(e,"focus",t[36]),R(e,"blur",t[37]),R(e,"mouseenter",t[38]),R(e,"mouseleave",t[39])],c=!0)},p(t,r){let c=i;i=m(t),i===c?~i&&h[i].p(t,r):(n&&(At(),Pt(h[c],1,1,(()=>{h[c]=null})),It()),~i?(n=h[i],n?n.p(t,r):(n=h[i]=u[i](t),n.c()),Lt(n,1),n.m(e,s)):n=null),t[18]?p?p.p(t,r):(p=Zo(t),p.c(),p.m(e,null)):p&&(p.d(1),p=null),(!l||16&r[0]&&o!==(o=t[34]||t[31]?null:t[4]?t[4].label||t[4].title:null))&&V(e,"title",o),(!l||1&r[0]&&a!==(a=t[0].id))&&V(e,"id",a)},i(t){l||(Lt(n),l=!0)},o(t){Pt(n),l=!1},d(n){n&&L(e),~i&&h[i].d(),p&&p.d(),t[49](null),c=!1,r(d)}}}function jo(t){let e,i;return e=new bi({props:{name:t[7]}}),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};128&i[0]&&(n.name=t[7]),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function Ho(e){let i,n;return{c(){i=N("img"),c(i.src,n=e[6].src)||V(i,"src",n),V(i,"alt",""),V(i,"class","micrio-marker")},m(t,e){I(t,i,e)},p(t,e){64&e[0]&&!c(i.src,n=t[6].src)&&V(i,"src",n)},i:t,o:t,d(t){t&&L(i)}}}function Zo(t){let e,i,n,s=(t[4].label||t[4].title)+"";return{c(){e=N("label"),i=z(s),V(e,"for",n=t[0].id),V(e,"data-scroll-through",""),V(e,"class","micrio-marker"),H(e,"static",t[33])},m(n,s){I(n,e,s),S(e,i),t[48](e)},p(t,r){16&r[0]&&s!==(s=(t[4].label||t[4].title)+"")&&Y(i,s),1&r[0]&&n!==(n=t[0].id)&&V(e,"for",n)},d(i){i&&L(e),t[48](null)}}}function Ko(t){let e,i;return e=new Xo({props:{marker:t[0],ctx:t[22],is360:t[1].is360}}),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};1&i[0]&&(n.marker=t[0]),4194304&i[0]&&(n.ctx=t[22]),2&i[0]&&(n.is360=t[1].is360),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function Jo(t){let e,i,n,s=!t[20]&&t[1]&&!t[8]&&Go(t),r=t[0].positionalAudio&&t[22]&&(!t[0].positionalAudio.noMobile||t[9])&&(t[0].positionalAudio.alwaysPlay||t[3])&&Ko(t);return{c(){s&&s.c(),e=D(),r&&r.c(),i=O()},m(t,o){s&&s.m(t,o),I(t,e,o),r&&r.m(t,o),I(t,i,o),n=!0},p(t,n){t[20]||!t[1]||t[8]?s&&(At(),Pt(s,1,1,(()=>{s=null})),It()):s?(s.p(t,n),1048834&n[0]&&Lt(s,1)):(s=Go(t),s.c(),Lt(s,1),s.m(e.parentNode,e)),t[0].positionalAudio&&t[22]&&(!t[0].positionalAudio.noMobile||t[9])&&(t[0].positionalAudio.alwaysPlay||t[3])?r?(r.p(t,n),4194825&n[0]&&Lt(r,1)):(r=Ko(t),r.c(),Lt(r,1),r.m(i.parentNode,i)):r&&(At(),Pt(r,1,1,(()=>{r=null})),It())},i(t){n||(Lt(s),Lt(r),n=!0)},o(t){Pt(s),Pt(r),n=!1},d(t){t&&(L(e),L(i)),s&&s.d(t),r&&r.d(t)}}}function Qo(t,e,i){var n,s,r,o,a,l,c,d,m,p,f;let g,v,$,w,y,b,k,T,x,_,E,S,M,A,I,L,P,N,C,z;h(t,qr,(t=>i(22,z=t)));const D=lt("micrio"),{current:O,events:R,state:F,_lang:U,spaceData:V}=D;h(t,O,(t=>i(67,N=t))),h(t,U,(t=>i(47,L=t)));const B=D.canvas.isMobile;h(t,B,(t=>i(9,M=t)));let{marker:q}=e,{image:W=N}=e,{forceHidden:X=!1}=e,{coords:G}=e,{overlapped:Y=!1}=e;q.tags||(q.tags=[]);const j=F.markerHoverId;h(t,j,(t=>i(21,C=t)));const H=lt("inView"),Z=lt("markerImages"),K=Z.has(q);!K&&W&&Z.set(q,W);const J=D.state.popup;h(t,J,(t=>i(66,P=t)));const Q=!(!W.isOmni||!(null==(n=W.$settings.omni)?void 0:n.sideLabels)||(null==(s=W.$settings._markers)?void 0:s.noTitles)),tt=F.tour;h(t,tt,(t=>i(46,I=t)));const et=t=>t.steps.findIndex((t=>t.startsWith(q.id)))>=0,it=q.data??{},nt=it._meta||{},st=W.$settings.omni;q.imageLayer&&q.imageLayer>((null==(r=null==st?void 0:st.layers)?void 0:r.length)??1)-1&&delete q.imageLayer,(null==(a=null==(o=null==N?void 0:N.$data)?void 0:o.markers)?void 0:a.find((t=>{var e,i;return(null==(i=null==(e=t.data)?void 0:e._micrioSplitLink)?void 0:i.markerId)==q.id&&"none"!=t.popupType})))&&(q.popupType="none",q.noMarker=!0),"embedUrl"in q&&q.embedUrl&&"embedInPopover"in q&&q.embedInPopover&&(q.popupType="popover");const ot=W.$settings._markers??{},at=!!W.$settings.doTourJumps,ct=q.tags.join(" "),dt="cluster"==q.type,ht=!!ot.noTitles||!!(null==st?void 0:st.sideLabels);!ht&&ot.showTitles;const mt=!!it.scales||!!W.$settings.markersScale,pt=mt&&!!ot.titlesNoScale,ft=it._micrioSplitLink,gt=!!ot.keepPopupsDuringTourTransitions,$t=/[?&]micrioNoTooltips/.test(location.search)||!!(null==st?void 0:st.sideLabels),wt=nt.gridAction,yt=(null==(c=null==(l=W.$settings)?void 0:l._markers)?void 0:c.autoStartTour)?D.wasm.images.map((t=>{var e,i;return"camera"in t?null==(i=null==(e=t.$data)?void 0:e.markerTours)?void 0:i.find(et):void 0})).filter((t=>!!t))[0]??(null==(d=null==V?void 0:V.markerTours)?void 0:d.find(et)):void 0,bt=null==yt?void 0:yt.steps.findIndex((t=>t.startsWith(q.id))),kt=!!(null==(p=null==(m=W.$settings)?void 0:m._markers)?void 0:p.autoStartTourAtBeginning);let Tt,xt,_t,Et,St,Mt,At,It=!K&&(!!it.alwaysOpen||F.$marker==q)||(null==(f=F.$tour)?void 0:f.id)==(null==yt?void 0:yt.id)&&(null==yt?void 0:yt.currentStep)==(bt??0),Lt=K&&W.state.$marker==q,Pt=!1,Nt=!1;function Ct(){clearTimeout(At)}const zt=()=>j.set(void 0);let Dt;async function Ot(){var t,e,n,s;if(dt)return;if(W.state.$marker!=q)return W.state.marker.set(q);if(ot.noMarkerActions)return;if(yt&&yt!=I){yt.initialStep=kt?0:bt;const i=null==(t=yt.stepInfo)?void 0:t[0];if(kt&&i&&i.micrioId!=W.id){const t=null==(e=D.canvases[0])?void 0:e.grid;(null==t?void 0:t.images.find((t=>t.id==i.micrioId)))?D.current.set(t.image):D.open(i.micrioId)}if(tt.set(yt),setTimeout((()=>nt.gridAction=wt),100),kt&&null!=bt&&bt>0)return W.state.marker.set(void 0),void Rt();await vt()}It=!1,R.dispatch("marker-opened",q);const r=I&&"steps"in I&&I.isSerialTour&&I.printChapters&&I.steps.findIndex((t=>t.startsWith(q.id)))>=0&&q.videoTour;var o;r||(w?"popover"==q.popupType?(await vt(),D.state.popover.set({marker:q,image:W,markerTour:I&&"steps"in I?I:void 0})):q.videoTour&&!I&&(tt.set(q.videoTour),(o=tt,new Promise((t=>{let e;e=o.subscribe((i=>{null==i&&(e?e():vt().then((()=>e())),t(i))}))}))).then((()=>W.state.marker.set(void 0)))):vt().then((()=>J.set(q))));const a=null==(n=it.micrioLink)?void 0:n.id;if(a&&vt().then((()=>{W.camera.stop();const t=ke(D,a);t&&(i(1,W.openedView=void 0,W),W.state.marker.set(void 0)),D.open(a,{vector:null==t?void 0:t.vector})})),ft&&!Nt&&!W.opts.secondaryTo){const t=null==(s=D.canvases[0])?void 0:s.grid;(null==t?void 0:t.lastPromise)&&await t.lastPromise,Dt=setTimeout((()=>{ft&&(Mt=D.open(ft.micrioId,{splitScreen:!0,splitTo:W,isPassive:!(!ft.follows||D.state.$tour),startView:ft.view}),Nt=!0)}),200)}}function Rt(){if(clearTimeout(Dt),R.dispatch("marker-closed",q),q.videoTour&&W.openedView?setTimeout((()=>W.camera.aniDoneAdd.push((()=>null==Vt?void 0:Vt.focus()))),10):null==Vt||Vt.focus(),D.state.popover.set(void 0),!w){P!=q||I&&"steps"in I&&gt||J.set(void 0);const t=D.canvases.find((t=>t!=W&&t.state.$marker));t&&vt().then((()=>{const e=t.state.$marker;e&&"popup"==e.popupType&&J.set(e)}))}ft&&Mt&&setTimeout((()=>{var t,e;const i=u(D.state.marker);Mt&&ft.micrioId!=(null==(e=null==(t=null==i?void 0:i.data)?void 0:t._micrioSplitLink)?void 0:e.micrioId)&&D.close(Mt)}),210)}let Ft,Ut,Vt,Bt,qt,Wt=!1;function Xt(){var t,e;if(W.is360&&mt)i(11,Tt=W.camera.getMatrix(q.x,q.y,1,1,0,0,0).join(","));else{let n=xt,s=_t;if(i(12,[xt,_t,Et,St]=W.camera.getXYDirect(q.x,q.y,{radius:q.radius,rotation:q.rotation}),xt,i(13,_t),i(14,Et)),W.is360)i(10,Pt=St>0);else if(W.isOmni&&st){if(b[0]&&b[1]&&null!=q.rotation){const n=st.frames/((null==(t=st.layers)?void 0:t.length)??1);let s=((null==(e=W.swiper)?void 0:e.currentIndex)??0)-(y??0);s>n/2&&(s-=n),s<-n/2&&(s+=n),i(10,Pt=s<=b[0]||s>=b[1])}else st.distance&&i(10,Pt=St<0);st.sideLabels&&!ot.noTitles&&(null==g?void 0:g.title)&&H&&(n!=xt||s!=_t)&&function(t,e){const i=D.canvas.element.offsetWidth,n=D.canvas.element.offsetHeight,s=!(t<0||t>i||e<0||e>n||Pt);(s||Wt)&&H.update((n=>(s?Wt?n[n.findIndex((([t])=>t==q))]=[q,t/i,e]:n.push([q,t/i,e]):Wt&&n.splice(n.findIndex((([t])=>t==q)),1),Wt=s,n)))}(xt,_t)}W.$settings.clusterMarkers&&G&&G.set(q.id,[xt,_t,Y?Ft:Ft=null==qt?void 0:qt.offsetWidth,Y?Ut:Ut=null==qt?void 0:qt.offsetHeight])}}const Gt=lt("mediaPaused");return h(t,Gt,(t=>i(45,A=t))),rt((()=>{var t,e;if(q.videoTour){const n="timeline"in q.videoTour?q.videoTour.timeline:null==(e=null==(t=q.videoTour.i18n)?void 0:t[L])?void 0:e.timeline;(null==n?void 0:n.length)&&i(0,q.view=n[0].rect,q)}const n=[W.state.marker.subscribe((t=>{"string"==typeof t&&t==q.id?W.state.marker.set(q):t==q?async function(){var t,e;if(Lt)return;if(i(3,Lt=!0),Ct(),ot.noMarkerActions)return;R.dispatch("marker-open",q),!I||"steps"in I&&(et(I)||I.cannotClose)||(tt.set(void 0),await vt()),w||I&&"steps"in I&&gt||(J.set(void 0),D.state.popover.set(void 0)),zt(),(null==ft?void 0:ft.markerId)&&(Mt||(Mt=D.canvases.find((t=>t.id==ft.micrioId))),Mt&&(Nt=u(Mt.visible),Nt&&(null==ft?void 0:ft.view)&&Mt.camera.flyToView(ft.view,{isJump:!0}).catch((()=>{})))),void 0!==q.imageLayer&&W.state.layer.set(q.imageLayer);const n=yt&&kt&&yt!=I&&null!=bt&&bt>0;n&&delete nt.gridAction,n||!q.view||it.noAnimate||q.videoTour||nt.gridView?Ot():It?(W.camera.setView(q.view,{area:null==(t=W.opts)?void 0:t.area}),Ot()):W.camera.flyToView(q.view,{omniIndex:y,noTrueNorth:!0,area:null==(e=W.opts)?void 0:e.area,isJump:!!it.doJump||at&&!!F.$tour}).then(Ot).catch((()=>{I||W.state.marker.set(void 0)}))}():it.alwaysOpen||(Lt&&Rt(),i(3,Lt=!1))}))];return $||(n.push(W.camera.image.state.view.subscribe(Xt)),Xt()),X||vt().then((()=>{Lt&&!q.noMarker&&P&&P!=q&&!I?W.state.marker.set(void 0):(It||it.alwaysOpen)&&Ot()})),q.htmlElement&&Bt&&Bt.appendChild(q.htmlElement),()=>{var t;for(clearTimeout(Dt);n.length;)null==(t=n.shift())||t()}})),t.$$set=t=>{"marker"in t&&i(0,q=t.marker),"image"in t&&i(1,W=t.image),"forceHidden"in t&&i(42,X=t.forceHidden),"coords"in t&&i(43,G=t.coords),"overlapped"in t&&i(2,Y=t.overlapped)},t.$$.update=()=>{var e,n,s,r,o;1&t.$$.dirty[0]|65536&t.$$.dirty[1]&&i(4,g=q.i18n?q.i18n[L]:q),17&t.$$.dirty[0]&&i(44,v=!((null==g?void 0:g.title)||(null==g?void 0:g.body)||(null==g?void 0:g.bodySecondary)||(null==g?void 0:g.embedUrl)||q.images&&q.images.length)),1&t.$$.dirty[0]|2048&t.$$.dirty[1]&&i(20,$=X||q.noMarker),1&t.$$.dirty[0]|8192&t.$$.dirty[1]&&(w="popup"!=q.popupType||v),3&t.$$.dirty[0]&&(y=W.camera.getOmniFrame((q.rotation??0)+(q.backside?Math.PI:0))),3&t.$$.dirty[0]&&(b=q.visibleArc?[W.camera.getOmniFrame(q.visibleArc[0]),W.camera.getOmniFrame(q.visibleArc[1])]:[]),8&t.$$.dirty[0]|49152&t.$$.dirty[1]&&i(8,k=I&&(!("steps"in I)&&!I.keepMarkers||ot.hideMarkersDuringTour&&!A)&&!Lt),257&t.$$.dirty[0]&&k&&H.update((t=>{const e=t.findIndex((t=>t[0]==q));return e>=0&&t.splice(e,1),t})),1&t.$$.dirty[0]&&i(7,T="default"==q.type?void 0:"link"==q.type?"link":"media"==q.type?"play":"cluster"==q.type?void 0:q.type??void 0),3&t.$$.dirty[0]&&i(6,x=(null!=(null==(e=q.data)?void 0:e.customIconIdx)?null==(r=null==(n=W.$settings._markers)?void 0:n.customIcons)?void 0:r[null==(s=q.data)?void 0:s.customIconIdx]:void 0)??(null==(o=q.data)?void 0:o.icon)??ot.markerIcon??void 0),192&t.$$.dirty[0]&&i(5,_=!!T||!!x),33&t.$$.dirty[0]&&i(19,E=!("class"in q&&""===q.class||!_&&"default"!=q.type)),528&t.$$.dirty[0]&&i(18,S=g&&(!ht||M&&Q)&&(g.label||g.title))},[q,W,Y,Lt,g,_,x,T,k,M,Pt,Tt,xt,_t,Et,Vt,Bt,qt,S,E,$,C,z,O,U,B,j,J,tt,it,ct,dt,mt,pt,$t,function(){var t;if(Ct(),q.onclick)return q.onclick(q);if(!ot.noMarkerActions)if("cluster"==q.type){if(q.view&&(null==N?void 0:N.$info)){const e=N.camera.getScale(),i=[20/N.$info.width*e,20/N.$info.height*e];W.camera.flyToView([q.view[0]-i[0],q.view[1]-i[1],q.view[2]+i[0],q.view[3]+i[1]],{area:null==(t=W.opts)?void 0:t.area,limitZoom:!0})}}else W.state.marker.set(q)},function(){ot.noMarkerActions||(Bt.parentNode.scrollTo(0,0),Ct(),At=setTimeout((()=>{const t=W.camera.getXY(q.x,q.y);!Lt&&(t[0]<0||t[0]>=D.offsetWidth||t[1]<0||t[1]>=D.offsetHeight||W.is360&&t[3]>4)&&W.camera.flyToCoo([q.x,q.y],{speed:2,limit:!0}).catch((()=>{}))}),150))},Ct,()=>j.set(q.id),zt,function(t){const e=t.detail;i(0,q.x=e.x,q),i(0,q.y=e.y,q),Xt()},Gt,X,G,v,A,I,L,function(t){ut[t?"unshift":"push"]((()=>{qt=t,i(17,qt)}))},function(t){ut[t?"unshift":"push"]((()=>{Vt=t,i(15,Vt)}))},function(t){ut[t?"unshift":"push"]((()=>{Bt=t,i(16,Bt)}))}]}class ta extends Yt{constructor(t){super(),Gt(this,t,Qo,Jo,a,{marker:0,image:1,forceHidden:42,coords:43,overlapped:2},null,[-1,-1,-1])}}function ea(t){let e,i,n,s,r;return i=new Ui({props:{type:t[5]?void 0:"arrow-up",icon:t[5],title:t[6]??t[7].waypointFollow}}),i.$on("click",t[11]),i.$on("focus",t[10]),{c(){e=N("div"),qt(i.$$.fragment),j(e,"--matrix","matrix3d("+t[2]+")"),V(e,"id",n=`w-${t[0]}`),V(e,"class","micrio-waypoint"),H(e,"clicked",t[3]),H(e,"active",t[3]),H(e,"direction-up",t[9][1]<0),H(e,"direction-down",t[9][1]>0)},m(n,s){I(n,e,s),Wt(i,e,null),t[15](e),r=!0},p(t,s){const o={};32&s[0]&&(o.type=t[5]?void 0:"arrow-up"),32&s[0]&&(o.icon=t[5]),192&s[0]&&(o.title=t[6]??t[7].waypointFollow),i.$set(o),(!r||4&s[0])&&j(e,"--matrix","matrix3d("+t[2]+")"),(!r||1&s[0]&&n!==(n=`w-${t[0]}`))&&V(e,"id",n),(!r||8&s[0])&&H(e,"clicked",t[3]),(!r||8&s[0])&&H(e,"active",t[3])},i(t){r||(Lt(i.$$.fragment,t),t&&$t((()=>{r&&(s||(s=zt(e,_e,{},!0)),s.run(1))})),r=!0)},o(t){Pt(i.$$.fragment,t),t&&(s||(s=zt(e,_e,{},!1)),s.run(0)),r=!1},d(n){n&&L(e),Xt(i),t[15](null),n&&s&&s.end()}}}function ia(t){let e,i,n=!t[4]&&ea(t);return{c(){n&&n.c(),e=O()},m(t,s){n&&n.m(t,s),I(t,e,s),i=!0},p(t,i){t[4]?n&&(At(),Pt(n,1,1,(()=>{n=null})),It()):n?(n.p(t,i),16&i[0]&&Lt(n,1)):(n=ea(t),n.c(),Lt(n,1),n.m(e.parentNode,e))},i(t){i||(Lt(n),i=!0)},o(t){Pt(n),i=!1},d(t){t&&L(e),n&&n.d(t)}}}function na(t,e,i){var n;let s,r,o,a;h(t,Oe,(t=>i(7,a=t)));let{targetId:l}=e,{settings:c={i18n:{}}}=e,{image:d}=e;const u=lt("micrio"),m=u._lang;h(t,m,(t=>i(14,o=t)));const p=d.$info,f=u.spaceData,g=d.$settings,v=null==(n=he(l))?void 0:n[2],{directionX:$,v:w,vN:y,vector:b}=ke(u,l);let k;const T=Math.abs(y[1])<.3,x=T?.65:.5+y[1]/10,_={x:$,y:x,baseScale:p.width/1024,scale:1,rotX:(1+(T?-(1-x):y[1]))*Math.PI/2,rotY:0,rotZ:0},E=(null==c?void 0:c.coords)??(S=_,JSON.parse(JSON.stringify(S)));var S;let M,A,I=E.custom,L=I?E:_;let P=c.customIconIdx;const N=()=>{D.deleted?i(4,z=!0):(P!=D.settings.customIconIdx&&(i(12,c.customIconIdx=D.settings.customIconIdx,c),P=c.customIconIdx),E.custom!=I&&(I=E.custom,L=I?E:_),i(2,A=d.camera.getMatrix(L.x,L.y,L.baseScale*L.scale,1,L.rotX,L.rotY,L.rotZ).join(",")))};let C=!1;let z=!1;const D={coords:E,settings:c};return N(),rt((()=>(D.el=k,i(1,k._iface=D,k),u.dispatchEvent(new CustomEvent("wp-print",{detail:D})),d.state.view.subscribe(N)))),t.$$set=t=>{"targetId"in t&&i(0,l=t.targetId),"settings"in t&&i(12,c=t.settings),"image"in t&&i(13,d=t.image)},t.$$.update=()=>{var e,n,a,l,d;20480&t.$$.dirty[0]&&i(6,s=(null==(n=null==(e=c.i18n)?void 0:e[o])?void 0:n.title)||(null==(l=null==(a=null==v?void 0:v.i18n)?void 0:a[o])?void 0:l.title)),4096&t.$$.dirty[0]&&i(5,r=null==(d=f.icons)?void 0:d[c.customIconIdx??-1])},[l,k,A,C,z,r,s,a,m,w,function(){var t;(null==(t=g._markers)?void 0:t.noMarkerActions)||(k.parentNode.scrollTo(0,0),clearTimeout(M),M=setTimeout((()=>{const t=d.camera.getXY(L.x,L.y);!C&&(t[0]<0||t[0]>=u.offsetWidth||t[1]<0||t[1]>=u.offsetHeight||d.is360&&t[3]>4)&&d.camera.flyToCoo([L.x,L.y],{speed:2,limit:!0}).catch((()=>{}))}),150))},function(){var t;(null==(t=g._markers)?void 0:t.noMarkerActions)||(i(3,C=!0),i(13,d.openedView=void 0,d),d.state.marker.set(void 0),u.open(l,{vector:b}))},c,d,o,function(t){ut[t?"unshift":"push"]((()=>{k=t,i(1,k)}))}]}class sa extends Yt{constructor(t){super(),Gt(this,t,na,ia,a,{targetId:0,settings:12,image:13},null,[-1,-1])}}const{Map:ra}=E;function oa(t,e,i){const n=t.slice();return n[60]=e[i],n}function aa(t,e,i){const n=t.slice();return n[60]=e[i],n}function la(t,e,i){const n=t.slice();return n[60]=e[i],n[66]=i,n}function ca(t,e,i){const n=t.slice();return n[67]=e[i],n}function da(t,e,i){const n=t.slice();return n[70]=e[i],n}function ua(t,e,i){const n=t.slice();return n[70]=e[i],n}function ha(t,e,i){const n=t.slice();return n[75]=e[i],n}function ma(t){let e,i,n,s,r,o=[],a=new ra,l=[],c=new ra,d=Dt(t[11]),u=[];for(let g=0;g<d.length;g+=1)u[g]=pa(ha(t,d,g));let h=Dt(t[12].filter(Ea));const m=t=>t[70][0].id;for(let g=0;g<h.length;g+=1){let e=ua(t,h,g),i=m(e);a.set(i,o[g]=fa(i,e))}let p=Dt(t[12].filter(Sa));const f=t=>t[70][0].id;for(let g=0;g<p.length;g+=1){let e=da(t,p,g),i=f(e);c.set(i,l[g]=ga(i,e))}return{c(){e=C("svg");for(let t=0;t<u.length;t+=1)u[t].c();i=D(),n=N("aside"),s=N("section");for(let t=0;t<o.length;t+=1)o[t].c();r=N("section");for(let t=0;t<l.length;t+=1)l[t].c();V(e,"class","micrio-markers"),V(s,"class","micrio-markers"),V(r,"class","micrio-markers"),V(n,"class","micrio-markers")},m(a,c){I(a,e,c);for(let t=0;t<u.length;t+=1)u[t]&&u[t].m(e,null);I(a,i,c),I(a,n,c),S(n,s);for(let t=0;t<o.length;t+=1)o[t]&&o[t].m(s,null);S(n,r);for(let t=0;t<l.length;t+=1)l[t]&&l[t].m(r,null);t[36](n)},p(t,i){if(2048&i[0]){let n;for(d=Dt(t[11]),n=0;n<d.length;n+=1){const s=ha(t,d,n);u[n]?u[n].p(s,i):(u[n]=pa(s),u[n].c(),u[n].m(e,null))}for(;n<u.length;n+=1)u[n].d(1);u.length=d.length}285380608&i[0]&&(h=Dt(t[12].filter(Ea)),o=Ft(o,i,m,0,t,h,a,s,Ot,fa,null,ua)),285380608&i[0]&&(p=Dt(t[12].filter(Sa)),l=Ft(l,i,f,0,t,p,c,r,Ot,ga,null,da))},d(s){s&&(L(e),L(i),L(n)),P(u,s);for(let t=0;t<o.length;t+=1)o[t].d();for(let t=0;t<l.length;t+=1)l[t].d();t[36](null)}}}function pa(t){let e,i,n,s,r;return{c(){e=C("line"),V(e,"x1",i=t[75][0]),V(e,"y1",n=t[75][1]),V(e,"x2",s=t[75][2]),V(e,"y2",r=t[75][3]),V(e,"class","micrio-markers"),H(e,"hovered",t[75][4])},m(t,i){I(t,e,i)},p(t,o){2048&o[0]&&i!==(i=t[75][0])&&V(e,"x1",i),2048&o[0]&&n!==(n=t[75][1])&&V(e,"y1",n),2048&o[0]&&s!==(s=t[75][2])&&V(e,"x2",s),2048&o[0]&&r!==(r=t[75][3])&&V(e,"y2",r),2048&o[0]&&H(e,"hovered",t[75][4])},d(t){t&&L(e)}}}function fa(t,e){let i,n,s,o,a,l,c,d=e[28](e[70][0],e[17])+"";function u(){return e[32](e[70])}return{key:t,first:null,c(){i=N("article"),n=N("label"),s=z(d),a=D(),V(n,"for",o=e[70][0].id),V(n,"class","micrio-markers"),H(n,"hover",e[15]==e[70][0].id),V(i,"class","micrio-markers"),this.first=i},m(t,r){I(t,i,r),S(i,n),S(n,s),I(t,a,r),l||(c=[R(n,"mouseenter",u),R(n,"mouseleave",e[33])],l=!0)},p(t,i){e=t,135168&i[0]&&d!==(d=e[28](e[70][0],e[17])+"")&&Y(s,d),4096&i[0]&&o!==(o=e[70][0].id)&&V(n,"for",o),36864&i[0]&&H(n,"hover",e[15]==e[70][0].id)},d(t){t&&(L(i),L(a)),l=!1,r(c)}}}function ga(t,e){let i,n,s,o,a,l,c,d=e[28](e[70][0],e[17])+"";function u(){return e[34](e[70])}return{key:t,first:null,c(){i=N("article"),n=N("label"),s=z(d),a=D(),V(n,"for",o=e[70][0].id),V(n,"class","micrio-markers"),H(n,"hover",e[15]==e[70][0].id),V(i,"class","micrio-markers"),this.first=i},m(t,r){I(t,i,r),S(i,n),S(n,s),I(t,a,r),l||(c=[R(n,"mouseenter",u),R(n,"mouseleave",e[35])],l=!0)},p(t,i){e=t,135168&i[0]&&d!==(d=e[28](e[70][0],e[17])+"")&&Y(s,d),4096&i[0]&&o!==(o=e[70][0].id)&&V(n,"for",o),36864&i[0]&&H(n,"hover",e[15]==e[70][0].id)},d(t){t&&(L(i),L(a)),l=!1,r(c)}}}function va(t){let e,i,n,s,r=t[1]&&t[1].length&&$a(t),o=t[2]&&ya(t);return{c(){e=N("div"),r&&r.c(),i=O(),o&&o.c(),V(e,"style",n=t[13]?t[5]:null),V(e,"class","micrio-markers"),H(e,"show-titles",t[26]),H(e,"is360",t[6]),H(e,"inactive",t[3]||t[6]&&t[4])},m(t,n){I(t,e,n),r&&r.m(e,null),S(e,i),o&&o.m(e,null),s=!0},p(t,a){t[1]&&t[1].length?r?(r.p(t,a),2&a[0]&&Lt(r,1)):(r=$a(t),r.c(),Lt(r,1),r.m(e,i)):r&&(At(),Pt(r,1,1,(()=>{r=null})),It()),t[2]?o?(o.p(t,a),4&a[0]&&Lt(o,1)):(o=ya(t),o.c(),Lt(o,1),o.m(e,null)):o&&(At(),Pt(o,1,1,(()=>{o=null})),It()),(!s||8224&a[0]&&n!==(n=t[13]?t[5]:null))&&V(e,"style",n),(!s||64&a[0])&&H(e,"is360",t[6]),(!s||88&a[0])&&H(e,"inactive",t[3]||t[6]&&t[4])},i(t){s||(Lt(r),Lt(o),s=!0)},o(t){Pt(r),Pt(o),s=!1},d(t){t&&L(e),r&&r.d(),o&&o.d()}}}function $a(t){let e,i,n=[],s=new ra,r=Dt(t[1]);const o=t=>t[67];for(let a=0;a<r.length;a+=1){let e=ca(t,r,a),i=o(e);s.set(i,n[a]=wa(i,e))}return{c(){for(let t=0;t<n.length;t+=1)n[t].c();e=O()},m(t,s){for(let e=0;e<n.length;e+=1)n[e]&&n[e].m(t,s);I(t,e,s),i=!0},p(t,i){3&i[0]&&(r=Dt(t[1]),At(),n=Ft(n,i,o,0,t,r,s,e.parentNode,Rt,wa,e,ca),It())},i(t){if(!i){for(let t=0;t<r.length;t+=1)Lt(n[t]);i=!0}},o(t){for(let e=0;e<n.length;e+=1)Pt(n[e]);i=!1},d(t){t&&L(e);for(let e=0;e<n.length;e+=1)n[e].d(t)}}}function wa(t,e){let n,s,r;const o=[{image:e[0]},e[67]];let a={};for(let l=0;l<o.length;l+=1)a=i(a,o[l]);return s=new sa({props:a}),{key:t,first:null,c(){n=O(),qt(s.$$.fragment),this.first=n},m(t,e){I(t,n,e),Wt(s,t,e),r=!0},p(t,i){e=t;const n=3&i[0]?Ut(o,[1&i[0]&&{image:e[0]},2&i[0]&&Vt(e[67])]):{};s.$set(n)},i(t){r||(Lt(s.$$.fragment,t),r=!0)},o(t){Pt(s.$$.fragment,t),r=!1},d(t){t&&L(n),Xt(s,t)}}}function ya(t){let e,i,n,s=[],r=new ra,o=[],a=new ra,l=Dt(t[2]);const c=t=>t[60].id;for(let h=0;h<l.length;h+=1){let e=la(t,l,h),i=c(e);r.set(i,s[h]=ba(i,e))}let d=Dt(t[9]);const u=t=>t[60].id;for(let h=0;h<d.length;h+=1){let e=aa(t,d,h),i=u(e);a.set(i,o[h]=ka(i,e))}return{c(){for(let t=0;t<s.length;t+=1)s[t].c();e=O();for(let t=0;t<o.length;t+=1)o[t].c();i=O()},m(t,r){for(let e=0;e<s.length;e+=1)s[e]&&s[e].m(t,r);I(t,e,r);for(let e=0;e<o.length;e+=1)o[e]&&o[e].m(t,r);I(t,i,r),n=!0},p(t,n){134217989&n[0]&&(l=Dt(t[2]),At(),s=Ft(s,n,c,0,t,l,r,e.parentNode,Rt,ba,e,la),It()),513&n[0]&&(d=Dt(t[9]),At(),o=Ft(o,n,u,0,t,d,a,i.parentNode,Rt,ka,i,aa),It())},i(t){if(!n){for(let t=0;t<l.length;t+=1)Lt(s[t]);for(let t=0;t<d.length;t+=1)Lt(o[t]);n=!0}},o(t){for(let e=0;e<s.length;e+=1)Pt(s[e]);for(let e=0;e<o.length;e+=1)Pt(o[e]);n=!1},d(t){t&&(L(e),L(i));for(let e=0;e<s.length;e+=1)s[e].d(t);for(let e=0;e<o.length;e+=1)o[e].d(t)}}}function ba(t,e){let i,n,s;return n=new ta({props:{marker:e[60],image:e[0],coords:e[27],overlapped:e[8].includes(e[66])}}),{key:t,first:null,c(){i=O(),qt(n.$$.fragment),this.first=i},m(t,e){I(t,i,e),Wt(n,t,e),s=!0},p(t,i){e=t;const s={};4&i[0]&&(s.marker=e[60]),1&i[0]&&(s.image=e[0]),260&i[0]&&(s.overlapped=e[8].includes(e[66])),n.$set(s)},i(t){s||(Lt(n.$$.fragment,t),s=!0)},o(t){Pt(n.$$.fragment,t),s=!1},d(t){t&&L(i),Xt(n,t)}}}function ka(t,e){let i,n,s;return n=new ta({props:{marker:e[60],image:e[0]}}),{key:t,first:null,c(){i=O(),qt(n.$$.fragment),this.first=i},m(t,e){I(t,i,e),Wt(n,t,e),s=!0},p(t,i){e=t;const s={};512&i[0]&&(s.marker=e[60]),1&i[0]&&(s.image=e[0]),n.$set(s)},i(t){s||(Lt(n.$$.fragment,t),s=!0)},o(t){Pt(n.$$.fragment,t),s=!1},d(t){t&&L(i),Xt(n,t)}}}function Ta(t){let e,i,n=[],s=new ra,r=Dt(t[14]);const o=t=>t[60].id;for(let a=0;a<r.length;a+=1){let e=oa(t,r,a),i=o(e);s.set(i,n[a]=xa(i,e))}return{c(){for(let t=0;t<n.length;t+=1)n[t].c();e=O()},m(t,s){for(let e=0;e<n.length;e+=1)n[e]&&n[e].m(t,s);I(t,e,s),i=!0},p(t,i){16385&i[0]&&(r=Dt(t[14]),At(),n=Ft(n,i,o,0,t,r,s,e.parentNode,Rt,xa,e,oa),It())},i(t){if(!i){for(let t=0;t<r.length;t+=1)Lt(n[t]);i=!0}},o(t){for(let e=0;e<n.length;e+=1)Pt(n[e]);i=!1},d(t){t&&L(e);for(let e=0;e<n.length;e+=1)n[e].d(t)}}}function xa(t,e){let i,n,s;return n=new ta({props:{marker:e[60],image:e[0],forceHidden:!0}}),{key:t,first:null,c(){i=O(),qt(n.$$.fragment),this.first=i},m(t,e){I(t,i,e),Wt(n,t,e),s=!0},p(t,i){e=t;const s={};16384&i[0]&&(s.marker=e[60]),1&i[0]&&(s.image=e[0]),n.$set(s)},i(t){s||(Lt(n.$$.fragment,t),s=!0)},o(t){Pt(n.$$.fragment,t),s=!1},d(t){t&&L(i),Xt(n,t)}}}function _a(t){let e,i,n,s,r=t[7]&&t[12].length&&!t[16]&&ma(t),o=t[13]&&va(t),a=t[14]&&Ta(t);return{c(){r&&r.c(),e=D(),o&&o.c(),i=D(),a&&a.c(),n=O()},m(t,l){r&&r.m(t,l),I(t,e,l),o&&o.m(t,l),I(t,i,l),a&&a.m(t,l),I(t,n,l),s=!0},p(t,s){t[7]&&t[12].length&&!t[16]?r?r.p(t,s):(r=ma(t),r.c(),r.m(e.parentNode,e)):r&&(r.d(1),r=null),t[13]?o?(o.p(t,s),8192&s[0]&&Lt(o,1)):(o=va(t),o.c(),Lt(o,1),o.m(i.parentNode,i)):o&&(At(),Pt(o,1,1,(()=>{o=null})),It()),t[14]?a?(a.p(t,s),16384&s[0]&&Lt(a,1)):(a=Ta(t),a.c(),Lt(a,1),a.m(n.parentNode,n)):a&&(At(),Pt(a,1,1,(()=>{a=null})),It())},i(t){s||(Lt(o),Lt(a),s=!0)},o(t){Pt(o),Pt(a),s=!1},d(t){t&&(L(e),L(i),L(n)),r&&r.d(t),o&&o.d(t),a&&a.d(t)}}}const Ea=([,t])=>t<.5,Sa=([,t])=>t>=.5;function Ma(t,e,i){var n;let s,r,o,a,l,c,d,m,p,f,g,v,$,w,{image:y}=e;const{data:b,info:k,settings:T}=y;h(t,b,(t=>i(30,m=t))),h(t,T,(t=>i(39,v=t)));const x=y.state.marker;h(t,x,(t=>i(16,$=t)));const _=y.wasm.micrio,{switching:E,_lang:S,state:M}=_;h(t,E,(t=>i(4,p=t))),h(t,S,(t=>i(17,w=t)));const A=_.canvas.isMobile,I=null==(n=_.canvases[0])?void 0:n.grid,L=null==I?void 0:I.focussed;h(t,L,(t=>i(31,f=t)));const P=null==I?void 0:I.markersShown,N=v.clusterMarkerRadius??16,C=M.markerHoverId;h(t,C,(t=>i(15,g=t)));const z=Ht([]);h(t,z,(t=>i(29,d=t))),at("inView",z);const D=v._markers??{},O=v.omni,R=!(!!D.noTitles||!!(null==O?void 0:O.sideLabels))&&!!D.showTitles;function F(t){var e;t?"string"==typeof t||y.openedView||t.noMarker||!t.view||i(0,y.openedView=_.state.$tour||null==(e=y.state.$view)?void 0:e.slice(0),y):y.openedView&&!_.state.$tour&&vt().then((()=>{var t,e;s||y.camera.aniDone||!y.openedView||y.camera.flyToView((e=y.openedView,[Math.max(0,e[0]),Math.max(0,e[1]),Math.min(1,e[2]),Math.min(1,e[3])]),{speed:null==(t=v._markers)?void 0:t.zoomOutAfterCloseSpeed,noTrueNorth:!0}).catch((()=>{})),i(0,y.openedView=void 0,y)}))}M.tour.subscribe((t=>{t&&"steps"in t&&t.keepLastStep&&i(0,y.openedView=void 0,y)}));const U=[];let V="",B=!1,q=!1;const W=t=>(t=null==t?void 0:t.map((t=>Math.round(100*t)/100)))&&i(5,V=[...U,t[0]?`left: ${t[0]}px`:null,t[1]?`top: ${t[1]}px`:null,`width: ${t[2]}px`,`height: ${t[3]}px`].filter((t=>!!t)).join(";")+";");let X=[],G=N,Y=[];const j=new Map,H=([t,e,i=0,n=0],[s,r,o=0,a=0])=>{const l=Math.max(n/2,G),c=Math.max(a/2,G);return!(t+i+G<s-G||t-G>s+o+G||e+l<r-c||e-l>r+c)},Z=()=>{var t,e;if(!o)return void i(8,X=i(9,Y=[]));const n=o,s=[],r=n.length;let a=0,l=0;for(i(8,X=[]);a<r;a++)for(l=a+1;l<r;l++){if(null==(t=n[l].tags)?void 0:t.includes("no-cluster"))continue;const i=j.get(n[a].id),r=j.get(n[l].id);i&&r&&H(i,r)&&(X.push(a,l),(null==(e=s.find((t=>t.findIndex((t=>t==a||t==l))>-1)))?void 0:e.push(a,l))??s.push([a,l]))}i(9,Y=s.map((t=>t.filter(((e,i)=>t.indexOf(e)==i)))).map(((t,e)=>({title:t.length+"",type:"cluster",view:e=[0,1,2,3].map((e=>(e<2?Math.min:Math.max)(...t.map((t=>{var i;return(null==(i=n[t].view)?void 0:i[e])??(e%2==0?n[t].x:n[t].y)}))))),x:e[0]+(e[2]-e[0])/2,y:e[1]+(e[3]-e[1])/2,id:""+t,data:{},popupType:"none",tags:[]}))))},K=[];rt((()=>{const t=[];return le(k).then((e=>{var n,s,r;if(!e)return;i(6,B=!!e.is360);const o=v._markers;if(!o)return;const a=Number(e.version)>=4.2;o.markerIcon&&U.push(`--micrio-marker-icon: url("${o.markerIcon}")`),o.markerColor&&o.markerColor!=(a?"#ffffff":"#ffbb00")&&U.push("--micrio-marker-color: "+o.markerColor),o.markerSize&&o.markerSize!=(a?"16":"25")&&U.push("--micrio-marker-size: "+(G=Number(o.markerSize))+"px"),t.push(y.viewport.subscribe(W)),v.clusterMarkers&&(t.push(y.state.view.subscribe(Z)),t.push(y.data.subscribe((()=>vt().then(Z))))),!y.grid&&(null==(n=v._markers)?void 0:n.zoomOutAfterClose)&&t.push(y.state.marker.subscribe(F));!(!y.isOmni||!(null==(s=v.omni)?void 0:s.sideLabels)||(null==(r=v._markers)?void 0:r.noTitles))&&t.push(A.subscribe((t=>{t&&q?function(){for(var t;K.length;)null==(t=K.shift())||t()}():t||q||(K.push(y.state.view.subscribe(et)),K.push(C.subscribe(et)),K.push(x.subscribe(et))),i(7,q=!t)})))})),()=>{for(var e;t.length;)null==(e=t.shift())||e()}}));const J=t=>!t.noMarker;let Q,tt=[];function et(){vt().then((()=>{if(!Q)return;const t=_.canvas,e=t.element.offsetWidth,n=[];d.forEach((([i,s,r])=>{var o;const a=null==(o=Q.querySelector('label[for="'+i.id+'"]'))?void 0:o.getBoundingClientRect();(null==a?void 0:a.width)&&a.width>0&&n.push([s*e,r,(s>=.5?a.left:a.right)-t.viewport.left,a.top+a.height/2-t.viewport.top,g==i.id])})),i(11,tt=n)}))}return t.$$set=t=>{"image"in t&&i(0,y=t.image)},t.$$.update=()=>{var e,n;1&t.$$.dirty[0]|1&t.$$.dirty[1]&&i(3,s=I&&f!=y&&P&&u(P).indexOf(y)<0),17&t.$$.dirty[0]&&i(1,r=!p&&_.spaceData?_.spaceData.links.filter((t=>t[0]==y.id||t[1]==y.id)).map((t=>{var e;return{targetId:t[0]==y.id?t[1]:t[0],settings:null==(e=t[2])?void 0:e[y.id]}})):void 0),1073741832&t.$$.dirty[0]&&i(2,o=s?[]:null==(e=null==m?void 0:m.markers)?void 0:e.filter(J)),1073741832&t.$$.dirty[0]&&i(14,a=s?null==m?void 0:m.markers:null==(n=null==m?void 0:m.markers)?void 0:n.filter((t=>!J(t)))),6&t.$$.dirty[0]&&i(13,l=!(!(null==o?void 0:o.length)&&!(null==r?void 0:r.length))),536870912&t.$$.dirty[0]&&i(12,c=d.sort((([,,t],[,,e])=>t>e?1:t<e?-1:0)))},[y,r,o,s,p,V,B,q,X,Y,Q,tt,c,l,a,g,$,w,b,T,x,E,S,L,C,z,R,j,(t,e)=>{var i;return t.i18n?null==(i=t.i18n[e])?void 0:i.title:t.title},d,m,f,t=>C.set(t[0].id),()=>C.set(void 0),t=>C.set(t[0].id),()=>C.set(void 0),function(t){ut[t?"unshift":"push"]((()=>{Q=t,i(10,Q)}))}]}class Aa extends Yt{constructor(t){super(),Gt(this,t,Ma,_a,a,{image:0},null,[-1,-1,-1])}}const Ia="5.2.1",La="https://b.micr.io/",Pa="https://r2.micr.io/",Na=["ttBWO","IicaE","KLTce","xjQrB","pfhXT","rNIPa","rdFIY","mvRXc"],Ca={b64:_b,ugz:_u},za="micrio-muted",Da={id:"",version:Number(Ia.replace(/(\d+)\.(\d+).*/,"$1.$2")),path:La,width:0,height:0,tileSize:1024,lang:"en",settings:{camspeed:1,view:[0,0,1,1],restrict:[0,0,1,1],focus:[.5,.5],zoomLimit:1,fullscreen:!0,crossfadeDuration:.25,hookEvents:!0,hookScroll:!0,hookPinch:!0,hookDrag:!0,minimap:!0,doTourJumps:!0,audio:!0,startVolume:1,mutedVolume:0,_markers:{showTitles:!1,popupAnimation:{duration:200,x:-50},zoomOutAfterClose:!0},ui:{controls:{cultureSwitch:!0}},_360:{},_meta:{}}},Oa={STRINGS:{id:{r:!0},lang:{r:!0},"data-thumb":{f:"thumbSrc"},"data-title":{r:!0},"data-format":{r:!0},"data-extension":{r:!0,f:"tileExtension"},"data-tiles":{r:!0,f:"tilesId"},"data-path":{r:!0},"data-sources":{r:!0},"data-inittype":{f:"initType"},"data-type":{},"data-start":{f:"gallery.startId"},"data-gallery":{f:"gallery.archive"},"data-gallery-sort":{f:"gallery.sort"},"data-iiif":{r:!0,f:"iiifManifest"},"data-grid":{r:!0},"data-gallery-type":{f:"gallery.type"}},BOOLEANS:{"data-static":{},muted:{f:"audio",n:!0},"data-png":{r:!0,f:"isPng"},"data-webp":{r:!0,f:"isWebP"},"data-dz":{r:!0,f:"isDeepZoom"},"data-is360":{r:!0},"data-no-externals":{f:"noExternals"},"data-skipmeta":{f:"skipMeta"},"data-force-data-refresh":{f:"forceDataRefresh"},"data-keeprendering":{f:"keepRendering"},"data-coverlimit":{f:"limitToCoverScale"},"data-events":{f:"hookEvents"},"data-keys":{f:"hookKeys"},"data-zooming":{f:"noZoom",n:!0},"data-scroll-zoom":{f:"hookScroll"},"data-pinch-zoom":{f:"hookPinch"},"data-dragging":{f:"hookDrag"},"data-two-finger-pan":{f:"twoFingerPan"},"data-control-zoom":{f:"controlZoom"},"data-ui":{f:"noUI",n:!0},"data-gtag":{f:"noGTag",n:!0},"data-controls":{f:"noControls",n:!0},"data-logo":{f:"noLogo",n:!0},"data-logo-org":{f:"noOrgLogo",n:!0},"data-toolbar":{f:"noToolbar",n:!0},"data-show-info":{f:"showInfo"},"data-social":{},"data-fullscreen":{},"data-minimap":{},"data-minimap-hide":{f:"alwaysShowMinimap",n:!0},"data-omni-y":{f:"OmniTwoAxes"},"data-normalize-dpr":{f:"zoomLimitDPRFix"},"data-grid-clickable":{f:"gridClickable"},"data-gallery-spreads":{f:"gallery.isSpreads"},"data-freemove":{f:"freeMove"},"data-force-path":{f:"forceInfoPath",r:!0}},NUMBERS:{"data-version":{r:!0},height:{r:!0},width:{r:!0},volume:{f:"startVolume"},"data-tilesize":{r:!0,f:"tileSize"},"data-camspeed":{},"data-zoomlimit":{f:"zoomLimit"},"data-minimap-height":{f:"minimapHeight"},"data-minimap-width":{f:"minimapWidth"},"data-mutedvolume":{f:"mutedVolume"},"data-width-cm":{f:"cmWidth"},"data-height-cm":{f:"cmHeight"},"data-gallery-cover-pages":{f:"gallery.coverPages"},lazyload:{dN:0},"data-elasticity":{f:"dragElasticity"},"data-skip-base-levels":{f:"skipBaseLevels"}},ARRAYS:{"data-focus":{},"data-view":{}}};var Ra,Fa,Ua,Va,Ba,qa,Wa;Fa=Ra||(Ra={}),Ua=Fa.Grid||(Fa.Grid={}),(Va=Ua.GridActionType||(Ua.GridActionType={}))[Va.focus=0]="focus",Va[Va.flyTo=1]="flyTo",Va[Va.focusWithTagged=2]="focusWithTagged",Va[Va.focusTagged=3]="focusTagged",Va[Va.reset=4]="reset",Va[Va.back=5]="back",Va[Va.switchToGrid=6]="switchToGrid",Va[Va.filterTourImages=7]="filterTourImages",Va[Va.nextFadeDuration=8]="nextFadeDuration",Ba=Fa.Camera||(Fa.Camera={}),(qa=Ba.TimingFunction||(Ba.TimingFunction={}))[qa.ease=0]="ease",qa[qa["ease-in"]=1]="ease-in",qa[qa["ease-out"]=2]="ease-out",qa[qa.linear=3]="linear";class Xa{constructor(t){var e;if(this.image=t,this.center=[0,0,1],this.trueNorth=.5,this.aniDoneAdd=[],this.cooToArea=(t,e,i)=>({x:i[0]+t*(i[2]-i[0]),y:i[1]+e*(i[3]-i[1])}),this.viewToArea=(t,e)=>[...Object.values(this.cooToArea(t[0],t[1],e)),...Object.values(this.cooToArea(t[2],t[3],e))],this.getView=()=>{var t;return null==(t=this._view)?void 0:t.slice(0)},this.getCoo=(t,e,i=!1,n=!1)=>this.getCooDirect(t,e,i,n).slice(0).map((t=>Math.round(1e6*t)/1e6)),this.getXY=(t,e,i=!1,n,s,r)=>this.getXYDirect(t,e,{abs:i,radius:n,rotation:s,noTrueNorth:r}).slice(0),this.getScale=()=>this.center[2]??1,this.setScale=t=>this.setCoo(this.center[0],this.center[1],t),this.getCoverScale=()=>this.e._getCoverScale(this.image.ptr),this.getMinScale=()=>this.e._getMinScale(this.image.ptr),this.isZoomedIn=()=>{var t;return 1==(null==(t=this.e)?void 0:t._isZoomedIn(this.image.ptr))},this.isZoomedOut=(t=!1)=>{var e;return 1==(null==(e=this.e)?void 0:e._isZoomedOut(this.image.ptr,t))},this.getCoverLimit=()=>!!this.e._getCoverLimit(this.image.ptr),this.flyToView=(t,e={})=>new Promise(((i,n)=>{var s,r;if(e.area&&(t=this.viewToArea(t,e.area)),e.prevView){const t=e.prevView;this.e._setStartView(this.image.ptr,t[0],t[1],t[2],t[3])}if(null==(s=this.image.$settings.omni)?void 0:s.frames){const i=(null==(r=this.image.$settings.omni.layers)?void 0:r.length)??1,n=this.image.$settings.omni.frames/i;null==e.omniIndex&&void 0!==t[5]&&(e.omniIndex=Math.round(Kt(t[5]/(2*Math.PI))*n)),e.omniIndex&&(e.omniIndex=Kt(e.omniIndex,n))}const o=this.e._flyTo(this.image.ptr,t[0],t[1],t[2],t[3],e.duration??-1,e.speed??-1,e.progress??0,!!e.isJump,!!e.limit,!!e.limitZoom,e.omniIndex??0,!!e.noTrueNorth,Ra.Camera.TimingFunction[e.timingFunction??"ease"],performance.now());this.image.wasm.render(),0==o?i():this.setAniPromises(i,n)})),this.flyToFullView=(t={})=>this.flyToCoo([.5,.5,this.getMinScale()],t),this.flyToCoverView=(t={})=>{const e=this.image.$settings.focus??[.5,.5];return e[2]=this.getCoverScale(),this.flyToCoo(e,t)},this.flyToCoo=(t,e={})=>new Promise(((i,n)=>{e.duration=this.e._setCoo(this.image.ptr,t[0],t[1],t[2]||this.center[2],e.duration??-1,e.speed??-1,e.limit??!1,Ra.Camera.TimingFunction[e.timingFunction??"ease"],performance.now()),this.image.wasm.render(),0==e.duration?i():this.setAniPromises(i,n)})),this.zoom=(t,e=0,i=void 0,n=void 0,s=1,r=!1)=>new Promise(((o,a)=>{const l=this.getXY(this.center[0],this.center[1]);null==i&&(i=l[0]),null==n&&(n=l[1]),this.image.album&&!this.image.album.hooked||(e=this.e._zoom(this.image.ptr,t,i,n,e,s,r,performance.now()),this.image.wasm.render(),0==e?o():this.setAniPromises(o,a))})),this.zoomIn=(t=1,e=250,i=1)=>this.zoom(200*-t,e,void 0,void 0,i).catch((()=>{})),this.zoomOut=(t=1,e=250,i=1)=>{const n=this.image.wasm.micrio.canvas.viewport,s=n.width/n.height,r=this.image.$info.width/this.image.$info.height;return this.zoom(t*(400/Math.max(1,s/r/2)),e,void 0,void 0,i).catch((()=>{}))},this.getDirection=()=>this.image.wasm.e._getYaw(this.image.ptr),this.getPitch=()=>this.e._getPitch(this.image.ptr),!t.is360){const i=t.state.$view;i&&(null==(e=t.$info)?void 0:e.width)&&vt().then((()=>this.setView(i)))}}assign(t,e,i,n,s,r){this.e=t,this._view=e,this._xy=i,this._coo=n,this._mat=s,this._quad=r}viewChanged(){var t;const e=this._view,i=this.center.join(","),n=this.getCoo(0,0);this.center[0]=e[0]+(e[2]-e[0])/2,this.center[1]=e[1]+(e[3]-e[1])/2,this.center[2]=n[2],this.image.is360&&(this.center[3]=n[3],this.center[4]=n[4]),this.image.isOmni&&(this.center[5]=null==(t=this.image.swiper)?void 0:t.currentIndex),(this.center.join(",")!=i||this.image.wasm.micrio.canvas.resizing||this.image.wasm.e._areaAnimating(this.image.ptr))&&this.image.state.view.set(this._view)}getXYDirect(t,e,i={}){var n;const s=i.noTrueNorth?0:.5-((null==(n=this.image.$settings._360)?void 0:n.trueNorth)??.5);return this.e._getXY(this.image.ptr,t-s,e,!0===i.abs,i.radius,i.rotation),this._xy}getCooDirect(t,e,i=!1,n=!1){if(i){const i=this.image.wasm.micrio.getBoundingClientRect();t-=i.left,e-=i.top}return this.e._getCoo(this.image.ptr,t,e,!0===i,!0===n),this._coo}setView(t,e={}){e.area&&(t=this.viewToArea(t,e.area)),this.e._setView(this.image.ptr,t[0],t[1],t[2],t[3],!!e.noLimit,!1,e.correctNorth),e.noRender||this.image.wasm.render()}setCoo(t,e,i=this.center[2]??1){this.e._setCoo(this.image.ptr,t,e,i,0,0),this.image.wasm.render()}getQuad(t,e,i,n,s=0,r=0,o=0,a=1,l=1){return this.e._getQuad(this.image.ptr,t,e,i,n,a,l,s,r,o),this._quad}getMatrix(t,e,i,n,s,r,o,a,l,c){return this.e._getMatrix(this.image.ptr,t,e,i,n,s||0,r||0,o||0,a||0,l??1,c??1),this._mat}setMinScale(t){var e;null==(e=this.e)||e._setMinScale(this.image.ptr,t)}setMinScreenSize(t){var e;this.image.album||null==(e=this.e)||e._setMinSize(this.image.ptr,Math.max(0,Math.min(1,t??1)))}setLimit(t){this.e._setLimit(this.image.ptr,t[0],t[1],t[2],t[3]),this.image.wasm.render()}setCoverLimit(t){this.e._setCoverLimit(this.image.ptr,!!t)}set360RangeLimit(t=0,e=0){this.e._set360RangeLimit(this.image.ptr,t,e),this.image.wasm.render()}setAniPromises(t,e){this.aniDone=t,this.aniAbort=e}pan(t,e,i=0,n={}){this.e._pan(this.image.ptr,t,e,i,!!n.noLimit,performance.now()),n.render&&this.image.wasm.render()}stop(){this.e._aniStop(this.image.ptr)}pause(){this.e._aniPause(this.image.ptr,performance.now())}resume(){this.e._aniResume(this.image.ptr,performance.now()),this.image.wasm.render()}aniIsKinetic(){return!!this.e._isKinetic(this.image.ptr)}setDirection(t,e){const i=this.image.wasm;i.e._setDirection(this.image.ptr,t,e),i.render()}setArea(t,e={}){const i=this.image.wasm.e;this.image.opts.isEmbed?this.image.ptr>0&&(this.image.opts.area=t,i._setImageArea(this.image.ptr,t[0],t[1],t[2],t[3])):(this.image.opts.area=t,i._setArea(this.image.ptr,t[0],t[1],t[2],t[3],!!e.direct,!!e.noDispatch)),e.noRender||this.image.wasm.render()}setRotation(t=0,e=0,i=0){!this.image.opts.isEmbed||this.image.ptr<=0||(this.image.wasm.e._setImageRotation(this.image.ptr,t,e,i),this.image.wasm.render())}getOmniRotation(){var t,e;const i=this.image.$settings.omni;return((null==(t=this.image.swiper)?void 0:t.currentIndex)??0)/(((null==i?void 0:i.frames)??1)/((null==(e=null==i?void 0:i.layers)?void 0:e.length)??1))*Math.PI*2}getOmniFrame(t){var e;const i=this.image.$settings.omni;if(!i||null==t)return;const n=i.frames/((null==(e=i.layers)?void 0:e.length)??1);return Math.floor(t/(2*Math.PI)*n)}getOmniXY(t,e,i){return this.e._getOmniXY(this.image.ptr,t,e,i),this._xy}setOmniSettings(){const t=this.image,e=t.$settings.omni;e&&(t.wasm.e._setOmniSettings(t.ptr,-e.distance||0,e.fieldOfView??0,e.verticalAngle??0,e.offsetX??0),this.image.state.view.set(this._view))}}(t=>{t.Main=class{constructor(t){this.micrio=t,this.tour=Ht(),this.marker=Ht(),this.markerHoverId=Ht(),this.popup=Ht(),this.popover=Ht(),this.ui={controls:Ht(!0),zoom:Ht(!0),hidden:Ht(!1)},this.mediaState=new Map,this.tour.subscribe((t=>{"string"!=typeof t&&(this._tour=t)})),this.marker.subscribe((t=>{"string"!=typeof t&&(this._marker=t)}))}get $tour(){return this._tour}get $marker(){return this._marker}get(){if(this.micrio.$current)return this.value={id:this.micrio.$current.id,c:this.micrio.canvases.map((t=>t.state.get()))},this._tour&&(this.value.t=[this._tour.id],"instance"in this._tour&&this._tour.instance&&this.value.t.push(this._tour.instance.currentTime,this._tour.instance.paused?"p":void 0)),this.value}async set(t){var e,i;if(this.value=t){if(t.t){const e=this.mediaState.get(t.t[0]);t.t[1]&&(e?(e.currentTime=t.t[1],e.paused="p"==t.t[2]):this.mediaState.set(t.t[0],{currentTime:t.t[1],paused:"p"==t.t[2]})),await this.setTour(t.t[0])}if(this.micrio.canvases.forEach((e=>e.state.set(t.c.find((t=>t[0]==e.id))))),(null==(e=this.micrio.$current)?void 0:e.id)!=t.id&&this.micrio.open(t.id),t.t)return this.setTour(t.t[0]);{const e=t.c.find((e=>e[0]==t.id));e&&!e[5]&&(null==(i=this.micrio.$current)||i.camera.flyToView(e.slice(1,5),{speed:2}).catch((()=>{})))}}}async setTour(t){var e,i,n;if(!this.micrio.$current||(null==(e=this._tour)?void 0:e.id)==t)return;const s=await le(this.micrio.$current.data,{allowUndefined:!0});s&&this.tour.set((null==(i=s.markerTours)?void 0:i.find((e=>e.id==t)))||(null==(n=s.tours)?void 0:n.find((e=>e.id==t))))}};t.Image=class{constructor(t){this.image=t,this.view=Ht(void 0),this.marker=Ht(void 0),this.layer=Ht(0);const e=t.wasm.micrio;let i,n,s;this.view.subscribe((r=>{const o=null==r?void 0:r.toString(),a={image:t,view:r};if(r&&o&&i!=o){i=o;const t=r[2]-r[0],l=r[3]-r[1];(!n||!s||Math.abs(t-n+(l-s))>1e-5)&&(e.events.dispatch("zoom",a),n=t,s=l),e.events.dispatch("move",a),this._view||(this._view=r)}})),this.marker.subscribe((t=>{const i=this._marker;(this._marker=t&&"string"!=typeof t?t:void 0)?e.state.marker.set(this._marker):t||e.state.$marker!=i||e.state.marker.set(void 0)}))}get $view(){return this._view}get $marker(){return this._marker}hookOmni(){const t=this.image;this.layer.subscribe((e=>{t.ptr<0||!t.wasm.e||(t.wasm.setActiveLayer(t.ptr,e),t.wasm.render())}))}get(){const t="string"!=typeof this._marker&&this._marker,e=t?Array.from(this.image.wasm.micrio.state.mediaState).reverse().find((e=>e[0].startsWith(t.id))):null;return[this.image.id,...[].slice.call(this._view),...t?[t.id,...e?[e[0],e[1].currentTime,e[1].paused?"p":void 0]:[]]:[this._marker]].filter((t=>void 0!==t))}set(t){var e;if((null==t?void 0:t.length)&&(this.view.set([t[1],t[2],t[3],t[4]]),t[5]&&((null==(e=this._marker)?void 0:e.id)!=t[5]&&this.marker.set(t[5]),t[6]))){const e=this.image.wasm.micrio.state.mediaState,i=e.get(t[6]);t[7]&&(i?(i.currentTime=t[7],i.paused="p"==t[8]):e.set(t[6],{currentTime:t[7],paused:"p"==t[8]}))}}}})(Wa||(Wa={}));const Ga=new class{constructor(){this.data=new Map,this.db=new Map,this.images=[],this.get=t=>new Promise((e=>{const i=this.db.get(t);if(!i||!this.data.has(i[0]))throw new Error("Could no get blob: "+t);const n=new FileReader;n.onload=()=>e(JSON.parse(n.result)),n.readAsText(new Blob([new Uint8Array(this.data.get(i[0]),i[1],i[2])]))})),this.getImage=async t=>new Promise((e=>{const i=this.db.get(t);if(!i||!this.data.has(i[0]))throw new Error("Could no get blob");const n=new Blob([new Uint8Array(this.data.get(i[0]),i[1],i[2])]);if(window.createImageBitmap)e(self.createImageBitmap(n));else{let t=this.images.find((t=>!t.src));t||this.images.push(t=new Image),t.onload=()=>{t&&(e(t),requestAnimationFrame((()=>{t&&(URL.revokeObjectURL(t.src),t.src=null)})))},t.src=URL.createObjectURL(n)}}))}async load(t,e,i){if(this.data.has(e))return;const n=e.replace(/^.*\//,"").split(".")[0],s=/\/base$/.test(e),r=s||be(n),o=new XMLHttpRequest,a=await new Promise(((n,s)=>{let a=0;o.responseType="arraybuffer",o.onprogress=t=>{a||(a=Number(o.getResponseHeader("Content-Length"))),null==i||i(Math.min(1,t.loaded/a))},o.onload=()=>{4===o.readyState&&200===o.status?(null==i||i(1),n(o.response)):s()},o.open("GET",t+e+(r?".bin":".mdp")),o.send()}));if(!a)return;this.data.set(e,a);const l=s?e.split("/")[0]+"/":"";let c=0;for(;c<a.byteLength;){const i=this.parseHeader(new Uint8Array(a,c,32));i.name&&i.size>0&&this.db.set(t+l+i.name.replace("./",""),[e,c+32,i.size]),c+=32+i.size}}parseHeader(t){const e=(new TextDecoder).decode(t),i=t=>e.slice(n,n+=t).replace(/\x00/g,"").trim();let n=0;return{name:i(20),size:parseInt(i(12),8)}}},Ya=[];class ja{constructor(t,e,i={}){this.wasm=t,this.attr=e,this.opts=i,this.uuid=Jt(),this.__info=JSON.parse(JSON.stringify(Da)),this.settings=Ht({}),this.data=Ht(void 0),this.video=Ht(void 0),this.visible=Ht(!1),this.ptr=-1,this.baseTileIdx=-1,this.is360=!1,this.isVideo=!1,this.isOmni=!1,this.levels=1,this.dzLevels=0,this.noImage=!1,this.opacity=1,this.viewport=Ht(),this.embeds=[],this.isV5=!1,this._loadedData=!1,this.embedElements=new Map,this.state=new Wa.Image(this),i.useParentCamera||(this.camera=new Xa(this)),this.id=(e.id??"").replace("https://i.micr.io/",""),this.isV5=be(this.id.split("/")[0]),this.infoBasePath=e.path&&e.forceInfoPath?e.path:void 0,this.dataPath=e.path||this.__info.path,this.isV5&&!e.path&&(this.dataPath=Pa),i.secondaryTo?(this.opacity=0,i.area=this.wasm.micrio.canvas.viewport.portrait?[0,1,1,1]:[1,0,1,1],void 0===i.isPassive&&(i.isPassive=!0)):i.area||(i.area=[0,0,1,1]),this.preset=he(this.id);let n=!1;this.info={subscribe:Ht(void 0,(t=>{n?t(this.__info):this.load().then(t),n=!0})).subscribe};const s=this.wasm.micrio,r=!!this.attr.revision;let o,a=u(this.visible);i.isEmbed&&!r||this.visible.subscribe((t=>{t!=a&&(a=t,t&&!this._loadedData&&(!r&&this.isV5?(this._loadedData=!0,this.data.set(void 0)):this.loadData()),i.secondaryTo&&(i.isPassive&&(o?(o(),o=null):t&&(o=i.secondaryTo.state.view.subscribe((t=>{t&&!this.camera.aniDone&&this.camera.setView(t,{noLimit:!0})})))),t?s.events.dispatch("splitscreen-start",this):s.events.dispatch("splitscreen-stop",this)),s.visible.update((e=>(t?e.push(this):e.splice(e.indexOf(this),1),e))),t&&s.$current==this&&s.switching.set(!1))})),this.video.subscribe((t=>this._video=t)),this.data.subscribe((t=>((t,e,i)=>{var n,s,r,o,a;t&&(t.revision&&(t.revision=Object.fromEntries(Object.entries(t.revision??{}).filter((t=>Number(t[1])>0)))),null==(n=t.embeds)||n.forEach((t=>{t.uuid||(t.uuid=(t.id??t.micrioId)+"-"+Math.random()),fe(t.video),fe(t)})),null==(s=t.markers)||s.forEach((t=>$e(t,e,!i))),null==(o=null==(r=t.music)?void 0:r.items)||o.forEach(fe),null==(a=t.pages)||a.forEach(ve))})(t,this.is360,this.isV5)))}get $info(){return this.__info}get $settings(){return u(this.settings)}get $data(){return u(this.data)}setError(t,e){throw this.wasm.micrio.printError(this.error=e??(null==t?void 0:t.message)??(null==t?void 0:t.toString())??"An unknown error has occurred"),this.wasm.micrio.loading.set(!1),t}async load(){var t,e,i,n,s,r,o,a,l,c,d,h,m,p,f,g,v,$,w,y;let b=this.__info;const k=this.attr,T=this.wasm.micrio;k.id&&k.width&&(k.settings&&ne(Da.settings,k.settings,{noOverwrite:!0}),this.__info=b=k);let x=b.iiifManifest||k.iiifManifest;b.isIIIF=this.id.startsWith("http")||"iiif"==b.format;const _=!!(null==(t=k.settings)?void 0:t.forceDataRefresh);if(!this.id||k.width&&k.height&&!x)(null==(o=this.preset)?void 0:o[1])&&ne(this.preset[1],b);else{const t=t=>this.setError(t,'Image with id "'+this.id+'" not found, published, or embeddable.');ne((null==(e=this.preset)?void 0:e[1])||await(b.isIIIF?ue(this.id):me(this.id,this.infoBasePath,_)).catch(t),b),!x&&b.iiifManifest&&(x=b.iiifManifest),b.isIIIF||(b.isIIIF=!!x),x&&ne(await ue(x).catch(t),b),(null==(n=null==(i=b.settings)?void 0:i._meta)?void 0:n.noLogo)&&(b.settings.noLogo=!0),(null==(r=null==(s=b.settings)?void 0:s._meta)?void 0:r.noSmoothing)&&(b.settings.noSmoothing=!0)}const E="https://iiif.micr.io/";if(b.id.startsWith(E)&&(b.id=b.id.slice(21)),7==(null==(a=this.id)?void 0:a.length)){const t=ye(this.id[1+ye(this.id)%6]);b.is360=!!(t>>4&1),b.isWebP=!(3&t),b.isPng=2==(3&t),t>>3&1&&be(b.tilesId??this.id)&&(b.format="dz"),b.path||(b.path=`https://${t>>2&1?"eu":"r2"}.micr.io/`)}const S=this.isV5&&this.id.startsWith("i")&&!this.id.includes("/");S&&!b.tilesId&&(b.tilesId=this.id.slice(1));const M=Na.indexOf(b.id)>=0||b.tilesId&&Na.indexOf(b.tilesId)>=0;ne(k,b);const A=S&&!(null==(l=b.tileBasePath)?void 0:l.includes("micr.io"));if(this.tileBase=A?b.tileBasePath??La:M||S?La:b.tileBasePath??b.path??(this.isV5?Pa:La),(null==(c=b.organisation)?void 0:c.baseUrl)&&!k.path?(this.dataPath=b.path=b.organisation.baseUrl,S&&!M||(this.tileBase=this.dataPath)):"https://eu.micr.io/"==b.path&&(this.dataPath=b.path),(null==(d=b.settings)?void 0:d.omni)&&(this.isOmni=!0,b.version>=5&&(await Ga.load(this.tileBase??this.dataPath,(b.tilesId??b.id)+"/base",(t=>{var e;return null==(e=T._ui)?void 0:e.$set({loadingProgress:t})})).catch((t=>this.setError(t,"Could not find object base package."))),b.settings.gallery||(b.settings.gallery={}),b.settings.gallery.type="omni",b.settings.gallery.archive=b.id)),!(null==(h=b.organisation)?void 0:h.branding)||b.settings&&b.settings.noUI||this.loadStyle(this.dataPath+"style/"+b.organisation.slug+".css").then((()=>{var t;const e=null==(t=getComputedStyle(this.wasm.micrio).getPropertyValue("--micrio-font-family"))?void 0:t.replace(/^'([^']+)'.*$/,"$1");e&&document.fonts.ready.then((()=>{document.fonts.check("16px "+e)||this.loadStyle(`https://fonts.googleapis.com/css2?family=${e}:ital,wght@0,300;0,400;0,500;0,600;0,800;1,300;1,400;1,500;1,600;1,800&display=swap`)}))})),b.isIIIF)if(b.sequences&&b.sequences.length)this.parseIIIFSequence(b,!!x);else{const t=(x||("@id"in b?b["@id"]:b.id)).replace("/info.json","");b.path=t.replace(/\/[^/]*$/,""),b.id=t.replace(/^.*\/([^/]*)$/,"$1")}if(b.spacesId&&!T.spaceData&&(T.spaceData="MICRIO_SPACE_DATA"in self?self.MICRIO_SPACE_DATA:await ue("https://i.micr.io/spaces/"+b.spacesId+".json")),null==(m=b.settings)?void 0:m._360){const t=(null==(f=null==(p=T.spaceData)?void 0:p.images.find((t=>t.id==this.id)))?void 0:f.rotationY)??0;b.settings._360.trueNorth=.5+t/Math.PI/2}this.noImage=this.noImage||this.isOmni||!b.id&&!b.tilesId,this.extension=b.tileExtension||b.isPng&&"png"||b.isWebP&&"webp"||"jpg","dz"==b.format&&(b.isDeepZoom=!0),this.is360=!!b.is360,this.isVideo=!!b.isVideo;let I=this.isV5?u(T._lang):("cultures"in b?void 0:k.lang)??void 0;if(this.isV5){if(b.revision){const t=Object.keys(b.revision);t.length&&t.indexOf(I)<0&&(T.lang=t[0])}}else if(!(null==(g=b.settings)?void 0:g.skipMeta)&&"cultures"in b){const t=(b.cultures||"").split(","),e=this.opts.isEmbed||!!this.opts.area,i=(null==(v=b.settings)?void 0:v.onlyPreferredLang)||e;I=b.lang&&t.indexOf(b.lang)>=0?b.lang:i?void 0:t[0],I&&!e&&(T.lang=I)}const L=b.settings;L&&!(null==L?void 0:L.noExternals)&&await Promise.all([L.css?this.loadStyle(L.css.href):null,L.js?this.loadScript(L.js.href,I):null].filter((t=>!!t)));for(let u=b.tileSize;u<Math.max(b.width,b.height);u*=2,this.levels++);let P=Math.max(b.width,b.height);do{this.dzLevels++}while((P/=2)>1);return(null==($=null==L?void 0:L.gallery)?void 0:$.archive)&&(this.levels-=1-(L.gallery.archiveLayerOffset??0)),this.noImage||(this.thumbSrc=this.getTileSrc(this.levels,0,0)),T.events.dispatch("pre-info",b),this.isV5&&null!=b.revision&&!this.opts.isEmbed?await this.loadData():(null==(w=b.settings)?void 0:w.skipMeta)||this.opts.isEmbed||this.isV5||T._lang.subscribe((t=>{var e,i;t&&this.id&&(!("cultures"in this.__info)||(this.__info.cultures||"").split(",").indexOf(t)<0)&&(t=void 0),this.data.set(void 0),!t&&(null==(e=this.preset)?void 0:e[2])&&(t="preset"),t&&this.id&&((null==(i=this.preset)?void 0:i[2])?this.enrichData(this.preset[2]).then((t=>{var e;this.data.set(t),(null==(e=this.preset)?void 0:e[2])&&(this.preset[2]=void 0)})):ue(this.dataPath+this.id+"/data."+t+".json").catch((()=>{})).then((t=>t&&this.enrichData(t).then((t=>this.data.update((e=>(ne(t,e||(e={}),{mergeArrays:!0}),e))))))))})),(null==(y=b.settings)?void 0:y.micrioSplitLink)&&!this.opts.secondaryTo&&T.open({id:b.settings.micrioSplitLink,settings:{hookEvents:!1!==b.settings.secondaryInteractive}},{splitScreen:!0,isPassive:!b.settings.noFollow}),b.settings&&this.settings.set(b.settings),delete b.settings,this.isOmni&&this.state.hookOmni(),b}async loadData(){var t,e,i,n;const s=(null==(t=this.$settings)?void 0:t.skipMeta)||(null==(e=this.__info.settings)?void 0:e.skipMeta);if(this._loadedData||s)return Promise.resolve();this._loadedData=!0;const r=(null==(i=this.preset)?void 0:i[2])??(this.isV5&&await ue(this.dataPath+this.id+"/data/pub.json",null==(n=this.__info.settings)?void 0:n.forceDataRefresh).catch((()=>{})));r&&this.enrichData(r).then((t=>this.data.set(t)))}getTileSrc(t,e,i,n){var s,r,o;const a=this.__info;if(a){if(a.isDeepZoom&&(t=this.dzLevels-t),a.isIIIF){const n=a.tileSize,s=Math.pow(2,t)*n,r=Math.min(a.width,e*s),o=Math.min(a.height,i*s);return`${a.path}/${a.id}/${[r,o,Math.min(a.width-r,s),Math.min(a.height-o,s)].join(",")}/${[Math.round(Math.min(n,(a.width-s*e)/s*n)),Math.round(Math.min(n,(a.height-s*i)/s*n))].join(",")}/0/default.jpg`}if(null==(o=null==(r=null==(s=a.settings)?void 0:s._360)?void 0:r.video)?void 0:o.src)throw"Video thumb";return`${this.tileBase}${a.tilesId||a.id}/${void 0!==n?n+"/":""}${t}/${e}${a.isDeepZoom?"_":"-"}${i}.${this.extension}`}}loadScript(t,e=""){return new Promise((i=>{if(Ya.indexOf(t)>=0||document.querySelector('script[src="'+t+'"]'))i();else{Ya.push(t);const n=document.createElement("script");n.type="text/javascript",n.async=!0,n.defer=!0,n.micrioElement=this,n.src=t.replace("$lang",e),n.onload=i,document.head.appendChild(n)}}))}loadStyle(t){return new Promise((e=>{if(Ya.indexOf(t)>=0||document.head.querySelector('link[href="'+t+'"]'))e();else{Ya.push(t);const i=document.createElement("link");i.setAttribute("type","text/css"),i.setAttribute("rel","stylesheet"),i.setAttribute("href",t),i.onload=e,document.head.appendChild(i)}}))}async enrichData(t){var e,i,n,s,r;if(!t)return t;"error"in t&&(this.__info.error="403"==t.status?"Could not load image data. Are you logged in and do you have the right credentials?":t.error);const o=this.wasm.micrio.lang,a=[];null==(e=t.markers)||e.forEach((t=>{var e;if($e(t,this.is360,!this.isV5),null==(e=t.data)?void 0:e.micrioSplitLink){const e=t.data.micrioSplitLink.split(",").map((t=>t.trim())),i=t.data._micrioSplitLink={micrioId:e[0],markerId:e[1],follows:!!e[2]&&"false"!=e[2]};i.markerId&&a.push(i.micrioId)}})),(null==(i=t.markerTours)?void 0:i.length)&&a.push(...[].concat.apply([],t.markerTours.map((t=>t.steps))).map((t=>t.split(",")[1])).filter((t=>!!t&&t!=this.id)));const l=t=>"autostart"in t&&t.autostart,c=(null==(n=t.markerTours)?void 0:n.find(l))||(null==(s=t.tours)?void 0:s.find(l));c&&(this.$settings.start={type:"steps"in c?"markerTour":"tour",id:c.id});const d=a.filter(((t,e)=>a.indexOf(t)==e));Promise.all(d.map((t=>me(t,this.infoBasePath))));const u=t=>this.dataPath+(this.isV5?t+"/data/pub.json":t+"/data."+o+".json"),h=await Promise.all(d.map((t=>ue(u(t)))));h.forEach(((t,e)=>{var i;return null==(i=null==t?void 0:t.markers)?void 0:i.forEach((t=>$e(t,this.is360,5==d[e].length)))}));const m=this.wasm.micrio.spaceData;return t.markerTours&&(await Promise.all(t.markerTours.map((e=>we(this,e,o,t)))),m&&(t.markerTours=t.markerTours.filter((t=>!t.steps.find((t=>t.includes(","))))))),(null==m?void 0:m.markerTours)&&await Promise.all(m.markerTours.filter((t=>!t.stepInfo)).map((e=>we(this,e,o,t)))),null==(r=t.markers)||r.forEach((t=>{var e,i,n,s,r;if(!(null==(e=t.data)?void 0:e._micrioSplitLink))return;const o=null==(n=null==(i=t.data)?void 0:i._micrioSplitLink)?void 0:n.markerId;if(o)for(let a=0;a<h.length;a++){const e=null==(r=null==(s=h[a])?void 0:s.markers)?void 0:r.find((t=>t.id==o));if(e)return void(t.data._micrioSplitLink.view=e.view)}})),this.wasm.micrio.events.dispatch("pre-data",{[this.id]:t,...Object.fromEntries(d.map(((t,e)=>[t,h[e]])))}),h.forEach(((t,e)=>{if(t){const n=this.wasm.images.find((t=>t.id==d[e]));n&&n instanceof ja&&!n.$data&&(i=u(n.id),!ce.has(i))&&n.data.set(t)}var i})),t}parseIIIFSequence(t,e=!1){var i;const n=null==(i=t.sequences)?void 0:i[0];if(!n)return;const s="top-to-bottom"==n.viewingDirection,r=n.canvases.map((t=>t.images[0])).map((t=>t.resource));this.noImage=!0,t.width=s?Math.max(...r.map((t=>t.width))):r.reduce(((t,e)=>t+e.width),0),t.height=s?r.reduce(((t,e)=>t+e.height),0):Math.max(...r.map((t=>t.height)));let o=0,a=this.embeds;t.settings||(t.settings={}),e&&r.length>10&&(a=t.gallery=[],t.settings.gallery||(t.settings.gallery={})),r.forEach((e=>{const i=[(1-e.width/t.width)/2,(1-e.height/t.height)/2];a.push(new ja(this.wasm,{id:e.service["@id"],width:e.width,height:e.height,isPng:"image/png"==e.format,settings:{}},{area:s?[i[0],o/t.height,1-i[0],(o+e.height)/t.height]:[o/t.width,i[1],(o+e.width)/t.width,1-i[1]]})),o+=s?e.height:e.width}))}addEmbed(t,e,i={}){const n=e.slice(0),s=new ja(this.wasm,t,{area:n,isEmbed:!0,useParentCamera:i.asImage});return s.camera||(s.camera=this.camera),this.embeds.push(s),void 0===i.opacity&&(i.opacity=1),le(s.info).then((t=>{if(t){if("cover"==i.fit||"contain"==i.fit){const e=this.is360?2:1,s="cover"==i.fit,r=n[2]-n[0],o=n[3]-n[1],a=n[0]+r/2,l=n[1]+o/2,c=r/o*e,d=t.width/t.height;if(s&&d<c||!s&&d>=c){const t=r/d*e;n[1]=l-t/2,n[3]=l+t/2}else{const t=o*d/e;n[0]=a-t/2,n[2]=a+t/2}}this.wasm.addEmbed(s,this,i),this.wasm.render()}})),s}setEmbedMediaElement(t,e){e?this.embedElements.set(t,e):this.embedElements.delete(t)}getEmbedMediaElement(t){return this.embedElements.get(t)}splitStart(){var t,e,i;const n=this.wasm.micrio.canvas.viewport.portrait;null==(t=this.opts.secondaryTo)||t.camera.setArea(n?[0,0,1,.5]:[0,0,.5,1],{noRender:!0}),this.camera.setArea(n?[0,.5,1,1]:[.5,0,1,1],{noRender:!0}),this.camera.setView((null==(i=null==(e=this.__info)?void 0:e.settings)?void 0:i.view)??[0,0,1,1]),this.wasm.render()}splitEnd(){var t,e;const i=this.opts.area;if(!i)return;const n=i[2]-i[0],s=i[3]-i[1];if(Math.round(1e3*n)/1e3==0||Math.round(1e3*s)/1e3==0)return;const r=n>s;this.camera.setArea(r?[0,1,1,1]:[1,0,1,1],{noRender:!0}),(null==(t=this.opts.secondaryTo)?void 0:t.grid)&&this.opts.secondaryTo.camera.aniDone||null==(e=this.opts.secondaryTo)||e.camera.setArea([0,0,1,1],{noRender:!0}),this.wasm.render()}fadeIn(t=!1){this.wasm.fadeImage(this.ptr,1,t),this.wasm.render()}fadeOut(t=!1){this.wasm.fadeImage(this.ptr,0,t),this.wasm.render()}}class Ha{constructor(t,e,i,n,s){var r,o,a;this.wasm=t,this.image=e,this.embed=i,this.paused=n,this.moved=s,this.ism3u=!1,this.hlsPlayer=void 0,this.usVid=void 0,this.vidRepeatTo=void 0,this.placeTo=void 0,this.autoplay=!0,this._vid=void 0,this.isMounted=!0,this.events={play:()=>this.setPlaying(!0),pause:()=>this.setPlaying(!1),playing:()=>{this.image._video||this.image.video.set(this._vid)},canplayEvt:ie.iOS?"loadedmetadata":"canplay",canplay:()=>{this._vid&&this.isMounted&&(this.autoplay&&!this.paused?(this._vid.play(),this.moved()):this.embed.hideWhenPaused||(this.setPlaying(!0),vt().then((()=>{this.setPlaying(!1),setTimeout((()=>{var t;return null==(t=this._vid)?void 0:t.remove()}),50)}))))}},this.ism3u=!!(null==(r=i.video)?void 0:r.streamId)&&!(null==(o=i.video)?void 0:o.transparent),this._vid=e._video,this.autoplay=(null==(a=i.video)?void 0:a.autoplay)??!0;let l=!0;this.usVid=this.image.visible.subscribe((t=>{clearTimeout(this.placeTo),this.placeTo=t?setTimeout((()=>{this.isMounted&&(this._vid?(this.hook(),this.autoplay&&this._vid.play()):this.load())}),l?0:100):setTimeout((()=>{var t;return null==(t=this._vid)?void 0:t.pause()}),0),l=!1}))}unmount(){var t,e;this.isMounted=!1,clearTimeout(this.placeTo),clearTimeout(this.vidRepeatTo),null==(t=this._vid)||t.pause(),this.unhook(),null==(e=this.usVid)||e.call(this)}setPlaying(t){this._vid&&(this.paused=!t,this._vid.dataset.playing=t?"1":void 0,this.wasm.e._setImageVideoPlaying(this.image.ptr,t),this.embed.hideWhenPaused&&this.wasm.fadeImage(this.image.ptr,t?1:0),t&&this.wasm.render())}load(){if(!this.embed.video||this._vid)return;const t=this.ism3u?`https://videodelivery.net/${this.embed.video.streamId}/manifest/video.m3u8`:this.embed.video.src;this._vid=document.createElement("video"),this._vid.crossOrigin="true",this._vid.playsInline=!0,this._vid.width=.5*this.embed.width,this._vid.height=.5*this.embed.height,this._vid.muted=this.embed.video.muted,this.hook(),!this.ism3u||Te(this._vid)?this._vid.src=t:oe("https://i.micr.io/hls-1.5.17.min.js",void 0,"Hls"in window?{}:void 0).then((()=>{this.hlsPlayer=new window.Hls,this.hlsPlayer.loadSource(t),this._vid&&this.hlsPlayer.attachMedia(this._vid)}))}hook(){if(!this.embed.video||!this._vid)return;const t=this.embed.video.loopAfter;this.embed.video.loop&&t?(this._vid.onended=()=>{this.setPlaying(!1),this.vidRepeatTo=setTimeout((()=>{var t;return null==(t=this._vid)?void 0:t.play()}),1e3*t)},this._vid.onplay=()=>this.setPlaying(!0)):this._vid.loop=this.embed.video.loop,this._vid.parentNode||this.autoplay||this.ism3u||(this._vid.setAttribute("style","opacity:0;position:absolute;top:0;left:0;transform-origin:left top;transform:scale(0.1);pointer-events:none;"),document.body.appendChild(this._vid)),this._vid.addEventListener("play",this.events.play),this._vid.addEventListener("pause",this.events.pause),this._vid.addEventListener("playing",this.events.playing,{once:!0}),this._vid.addEventListener(this.events.canplayEvt,this.events.canplay,{once:!0})}unhook(){this._vid&&(this._vid.removeEventListener("play",this.events.play),this._vid.removeEventListener("pause",this.events.pause),this._vid.removeEventListener("playing",this.events.playing),this._vid.removeEventListener(this.events.canplayEvt,this.events.canplay))}}function Za(e){let n=(e[18]?"a":"div")&&function(t){let e,n,s,o,a,l,c,d,u;const h=[tl,Qa,Ja,Ka],m=[];function p(t,e){return t[0].video&&!t[16]?0:t[0].frameSrc?1:!t[16]&&t[0].src?2:3}n=p(t),s=m[n]=h[n](t);let f=[{id:o=t[0].id?"e-"+t[0].id:void 0},{style:t[10]},{role:a=t[18]?void 0:"figure"},{href:t[18]},{target:l=t[18]&&t[19]?"_blank":null},{class:"micrio-embed"}],g={};for(let r=0;r<f.length;r+=1)g=i(g,f[r]);return{c(){e=N(t[18]?"a":"div"),s.c(),G(t[18]?"a":"div")(e,g),H(e,"embed-container",!0),H(e,"embed3d",t[14]),H(e,"no-events",t[17])},m(i,s){I(i,e,s),m[n].m(e,null),c=!0,d||(u=[R(e,"click",t[20]),R(e,"keypress",t[20]),R(e,"change",t[21])],d=!0)},p(t,i){let r=n;n=p(t),n===r?m[n].p(t,i):(At(),Pt(m[r],1,1,(()=>{m[r]=null})),It(),s=m[n],s?s.p(t,i):(s=m[n]=h[n](t),s.c()),Lt(s,1),s.m(e,null)),G(t[18]?"a":"div")(e,g=Ut(f,[(!c||1&i[0]&&o!==(o=t[0].id?"e-"+t[0].id:void 0))&&{id:o},(!c||1024&i[0])&&{style:t[10]},{role:a},{href:t[18]},{target:l},{class:"micrio-embed"}])),H(e,"embed-container",!0),H(e,"embed3d",t[14]),H(e,"no-events",t[17])},i(t){c||(Lt(s),c=!0)},o(t){Pt(s),c=!1},d(t){t&&L(e),m[n].d(),d=!1,r(u)}}}(e);return{c(){n&&n.c()},m(t,e){n&&n.m(t,e)},p(t,e){(t[18]||"div")&&n.p(t,e)},i:t,o(t){Pt(n,t)},d(t){n&&n.d(t)}}}function Ka(e){let i,n;return{c(){i=N("button"),V(i,"style",e[5]),V(i,"title",n=e[0].title),V(i,"data-scroll-through",""),V(i,"class","micrio-embed")},m(t,e){I(t,i,e)},p(t,e){32&e[0]&&V(i,"style",t[5]),1&e[0]&&n!==(n=t[0].title)&&V(i,"title",n)},i:t,o:t,d(t){t&&L(i)}}}function Ja(e){let i,n,s,r;return{c(){i=N("img"),c(i.src,n=e[0].src)||V(i,"src",n),V(i,"style",e[5]),V(i,"width",s=e[15]?e[0].width:void 0),V(i,"height",r=e[15]?e[0].height:void 0),V(i,"alt","Embed"),V(i,"data-scroll-through",""),V(i,"class","micrio-embed")},m(t,e){I(t,i,e)},p(t,e){1&e[0]&&!c(i.src,n=t[0].src)&&V(i,"src",n),32&e[0]&&V(i,"style",t[5]),1&e[0]&&s!==(s=t[15]?t[0].width:void 0)&&V(i,"width",s),1&e[0]&&r!==(r=t[15]?t[0].height:void 0)&&V(i,"height",r)},i:t,o:t,d(t){t&&L(i)}}}function Qa(t){let e,i;return e=new ys({props:{src:t[0].frameSrc,width:t[3],height:t[4],frameScale:t[0].scale,autoplay:t[0].autoplayFrame,destroying:t[22]}}),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};1&i[0]&&(n.src=t[0].frameSrc),8&i[0]&&(n.width=t[3]),16&i[0]&&(n.height=t[4]),1&i[0]&&(n.frameScale=t[0].scale),1&i[0]&&(n.autoplay=t[0].autoplayFrame),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function tl(t){let e,i,n;function s(e){t[28](e)}let r={forcePause:t[6],src:t[0].video.streamId&&!t[0].video.transparent?"cfvid://"+t[0].video.streamId:t[0].video.src,width:t[2],height:t[12],frameScale:t[11],controls:t[0].video.controls,destroying:t[22],loop:t[0].video.loop,loopDelay:t[0].video.loopAfter,muted:t[0].video.muted,autoplay:!t[6]&&t[0].video.autoplay,hasTransparentH265:t[0].video.transparent&&t[0].video.hasH265};return void 0!==t[1]&&(r._media=t[1]),e=new ys({props:r}),ut.push((()=>Bt(e,"_media",s))),{c(){qt(e.$$.fragment)},m(t,i){Wt(e,t,i),n=!0},p(t,n){const s={};64&n[0]&&(s.forcePause=t[6]),1&n[0]&&(s.src=t[0].video.streamId&&!t[0].video.transparent?"cfvid://"+t[0].video.streamId:t[0].video.src),4&n[0]&&(s.width=t[2]),4096&n[0]&&(s.height=t[12]),2048&n[0]&&(s.frameScale=t[11]),1&n[0]&&(s.controls=t[0].video.controls),1&n[0]&&(s.loop=t[0].video.loop),1&n[0]&&(s.loopDelay=t[0].video.loopAfter),1&n[0]&&(s.muted=t[0].video.muted),65&n[0]&&(s.autoplay=!t[6]&&t[0].video.autoplay),1&n[0]&&(s.hasTransparentH265=t[0].video.transparent&&t[0].video.hasH265),!i&&2&n[0]&&(i=!0,s._media=t[1],wt((()=>i=!1))),e.$set(s)},i(t){n||(Lt(e.$$.fragment,t),n=!0)},o(t){Pt(e.$$.fragment,t),n=!1},d(t){Xt(e,t)}}}function el(t){let e,i,n=t[23]&&(t[9]||t[7]||t[8])&&Za(t);return{c(){n&&n.c(),e=O()},m(t,s){n&&n.m(t,s),I(t,e,s),i=!0},p(t,i){t[23]&&(t[9]||t[7]||t[8])?n?(n.p(t,i),896&i[0]&&Lt(n,1)):(n=Za(t),n.c(),Lt(n,1),n.m(e.parentNode,e)):n&&(At(),Pt(n,1,1,(()=>{n=null})),It())},i(t){i||(Lt(n),i=!0)},o(t){Pt(n),i=!1},d(t){t&&L(e),n&&n.d(t)}}}const il="data-embeds-inside-gl";function nl(t,e,i){var n,s;let r,o,a,l,c,d;const u=lt("micrio"),{current:m,wasm:p,canvas:f}=u;h(t,m,(t=>i(27,d=t)));let{embed:g}=e;const v=d,$=v.$info;g.uuid||(g.uuid=Jt());const w=g.uuid,y=v.is360,b=(null==(n=g.video)?void 0:n.autoplay)??!0;let k=v.embeds.find((t=>{var e;return t.uuid==w||(null==(e=t.$info)?void 0:e.title)==w}));const T=window.matchMedia("(dynamic-range: high)").matches||ie.OSX,x=g.area,_=null==(s=g.src)?void 0:s.toLowerCase().endsWith(".svg"),E=!(!g.width||!g.height)&&g.width*g.height<Math.pow(1024,2),S=/iPhone OS 14_/i.test(navigator.userAgent),M=u.getAttribute(il),A=!(_||S||!T&&!u.hasAttribute(il)||"false"==M||(!g.micrioId||E&&g.src)&&(!g.video||g.video.controls||g.video.transparent)),I=!g.clickAction&&!g.frameSrc,L="href"==g.clickAction?g.clickTarget:void 0,P=L&&g.clickTargetBlank;let N,C=x[2]-x[0],z=x[3]-x[1],D=x[0]+C/2,O=x[1]+z/2,R=g.scale||1,F=g.rotX??0,U=g.rotY??0,V=g.rotZ??0,B=g.scaleX??1,q=g.scaleY??1;function W(){const t=g.area;y&&t[0]>t[2]&&t[0]--,i(24,C=t[2]-t[0]),i(25,z=t[3]-t[1]),D=t[0]+C/2,O=t[1]+z/2,R=g.scale||1,F=g.rotX??0,U=g.rotY??0,V=g.rotZ??0,B=g.scaleX??1,q=g.scaleY??1,i(5,N=`--ratio:${C/z*$.width/$.height};--scale:${C*$.width/(g.width??100)/(A?1:R)*(y?Math.PI/2:1)};`),_&&i(5,N+=`height:${g.height}px`),A&&g.micrioId&&g.width&&i(5,N+=`width:${g.width}px`)}W();let X,G,Y=!1,j=0,H=0,Z="";function K(){var t,e,n;if(v.camera.e&&(i(7,[j,H,X]=v.camera.getXYDirect(D,O),j,i(8,H)),y&&i(9,G=v.camera.getMatrix(D,O,R,1,F,U,V,void 0,B,q).join(",")),i(10,Z=(y?`transform:matrix3d(${G});`:`--x:${j}px;--y:${H}px;--s:${X};`)+(void 0!==g.opacity&&1!==g.opacity?`--opacity:${g.opacity};`:"")),((null==(t=g.video)?void 0:t.pauseWhenSmallerThan)||(null==(e=g.video)?void 0:e.pauseWhenLargerThan))&&r)){const t=Y;i(6,Y=function(){var t,e;if(!(null==(t=g.video)?void 0:t.pauseWhenSmallerThan)&&!(null==(e=g.video)?void 0:e.pauseWhenLargerThan))return!b;const i=X?Math.max(r*X/f.viewport.width,o*X/f.viewport.height):0;return!!(g.video.pauseWhenSmallerThan&&i<g.video.pauseWhenSmallerThan||g.video.pauseWhenLargerThan&&i>g.video.pauseWhenLargerThan)}()),(null==tt?void 0:tt._vid)&&Y!=t&&(Y?tt._vid.pause():((null==(n=null==v?void 0:v.$settings)?void 0:n.embedRestartWhenShown)&&i(26,tt._vid.currentTime=0,tt),tt._vid.play()))}}const J=Ht(!1);g.video&&(g.video.controls||(g.video.muted=!0));const Q=A&&!!g.video;let tt;const et=!A||!!g.clickAction;let it;return rt((()=>{var t,e;const n=[];return A&&function(){const t=g.hideWhenPaused?.01:g.opacity||1;k&&k.ptr>=0?(k.camera.setArea(g.area),k.camera.setRotation(g.rotX,g.rotY,g.rotZ),p.fadeImage(k.ptr,t)):k=v.addEmbed({id:g.video?g.id:g.micrioId,title:w,width:g.width,height:g.height,isPng:g.isPng,isWebP:g.isWebP,isDeepZoom:g.isDeepZoom,path:$.tileBasePath??$.path,isSingle:!!g.video,isVideo:!!g.video,settings:{_360:{rotX:F,rotY:U,rotZ:V}}},g.area,{opacity:t,asImage:!1}),Q&&le(k.visible,{targetValue:!0}).then((()=>{i(26,tt=new Ha(p,k,g,Y,K))})),p.render()}(),(et||(null==(t=g.video)?void 0:t.pauseWhenSmallerThan)||(null==(e=g.video)?void 0:e.pauseWhenLargerThan))&&n.push(v.state.view.subscribe(K)),()=>{var t;for(null==tt||tt.unmount(),k&&(p.fadeImage(k.ptr,0),p.render()),g.video&&g.id&&d&&d.setEmbedMediaElement(g.id);n.length;)null==(t=n.shift())||t()}})),t.$$set=t=>{"embed"in t&&i(0,g=t.embed)},t.$$.update=()=>{16777216&t.$$.dirty[0]&&i(3,r=Math.round(C*$.width)),33554432&t.$$.dirty[0]&&i(4,o=Math.round(z*$.height)),201326595&t.$$.dirty[0]&&g.video&&g.id&&d&&d.setEmbedMediaElement(g.id,it??(null==tt?void 0:tt._vid)),9&t.$$.dirty[0]&&i(2,a=g.video?Math.min(g.video.width,r):r),17&t.$$.dirty[0]&&i(12,l=g.video?Math.min(g.video.height,o):o),12&t.$$.dirty[0]&&i(11,c=r/a)},[g,it,a,r,o,N,Y,j,H,G,Z,c,l,m,y,_,A,I,L,P,function(){d&&"markerId"==g.clickAction&&g.clickTarget&&d.state.marker.set(g.clickTarget)},function(t){if(t&&"detail"in t){const e=t.detail;for(const t in e)i(0,g[t]=e[t],g)}W(),K()},J,et,C,z,tt,d,function(t){it=t,i(1,it)}]}class sl extends Yt{constructor(t){super(),Gt(this,t,nl,el,a,{embed:0},null,[-1,-1])}}function rl(i){let n,s,a,l,c,d,u;return{c(){n=C("svg"),s=C("circle"),a=C("circle"),V(s,"r",al),V(s,"cx",ol/2),V(s,"cy",ol/2),V(s,"fill","transparent"),V(s,"stroke","#e0e0e0"),V(s,"stroke-width","8px"),V(s,"class","micrio-progress-circle"),V(a,"r",al),V(a,"cx",ol/2),V(a,"cy",ol/2),V(a,"fill","transparent"),V(a,"stroke","#00d4ee"),V(a,"stroke-width","8px"),V(a,"stroke-dasharray",i[1]+"px"),V(a,"stroke-dashoffset",l=i[0]+"px"),V(a,"class","micrio-progress-circle"),V(n,"width","100"),V(n,"height","100"),V(n,"viewBox","0 0 "+ol+" "+ol),V(n,"class","micrio-progress-circle")},m(t,e){I(t,n,e),S(n,s),S(n,a),u=!0},p(t,[e]){(!u||1&e&&l!==(l=t[0]+"px"))&&V(a,"stroke-dashoffset",l)},i(t){u||(t&&$t((()=>{u&&(d&&d.end(1),c=Ct(n,_e,{delay:500}),c.start())})),u=!0)},o(i){c&&c.invalidate(),i&&(d=function(i,n,s){const a={direction:"out"};let l,c=n(i,s,a),d=!0;const u=Mt;let h;function m(){const{delay:n=0,duration:s=300,easing:o=e,tick:a=t,css:m}=c||Nt;m&&(l=et(i,1,0,s,n,o,m));const p=b()+n,f=p+s;$t((()=>Et(i,!1,"start"))),"inert"in i&&(h=i.inert,i.inert=!0),_((t=>{if(d){if(t>=f)return a(0,1),Et(i,!1,"end"),--u.r||r(u.c),!1;if(t>=p){const e=o((t-p)/s);a(1-e,e)}}return d}))}return u.r+=1,o(c)?_t().then((()=>{c=c(a),m()})):m(),{end(t){t&&"inert"in i&&(i.inert=h),t&&c.tick&&c.tick(1,0),d&&(l&&it(i,l),d=!1)}}}(n,_e,{})),u=!1},d(t){t&&L(n),t&&d&&d.end()}}}const ol=100,al=40;function ll(t,e,i){let n,{progress:s}=e;const r=2*Math.PI*al;return t.$$set=t=>{"progress"in t&&i(2,s=t.progress)},t.$$.update=()=>{4&t.$$.dirty&&i(0,n=r*(1-s))},[n,r,s]}class cl extends Yt{constructor(t){super(),Gt(this,t,ll,rl,a,{progress:2})}}function dl(t,e,i){const n=t.slice();return n[51]=e[i],n}function ul(t,e,i){const n=t.slice();return n[34]=e[i],n}function hl(t,e,i){const n=t.slice();return n[56]=e[i],n}function ml(t,e,i){const n=t.slice();return n[56]=e[i],n}function pl(t,e,i){const n=t.slice();return n[61]=e[i],n}function fl(t){let e,i;return e=new Hr({props:{volume:t[25],data:t[9],is360:!!t[7].is360}}),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};33554432&i[0]&&(n.volume=t[25]),512&i[0]&&(n.data=t[9]),128&i[0]&&(n.is360=!!t[7].is360),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function gl(t){let e,n;const s=[{src:t[24]},{volume:t[25]},{is360:!0},{width:t[7].width},{height:t[7].height},t[6]];let r={};for(let o=0;o<s.length;o+=1)r=i(r,s[o]);return e=new ys({props:r}),{c(){qt(e.$$.fragment)},m(t,i){Wt(e,t,i),n=!0},p(t,i){const n=50331840&i[0]?Ut(s,[16777216&i[0]&&{src:t[24]},33554432&i[0]&&{volume:t[25]},s[2],128&i[0]&&{width:t[7].width},128&i[0]&&{height:t[7].height},64&i[0]&&Vt(t[6])]):{};e.$set(n)},i(t){n||(Lt(e.$$.fragment,t),n=!0)},o(t){Pt(e.$$.fragment,t),n=!1},d(t){Xt(e,t)}}}function vl(t){let e,i,n=[],s=new Map,r=Dt(t[9].embeds);const o=t=>t[61].uuid;for(let a=0;a<r.length;a+=1){let e=pl(t,r,a),i=o(e);s.set(i,n[a]=$l(i,e))}return{c(){for(let t=0;t<n.length;t+=1)n[t].c();e=O()},m(t,s){for(let e=0;e<n.length;e+=1)n[e]&&n[e].m(t,s);I(t,e,s),i=!0},p(t,i){512&i[0]&&(r=Dt(t[9].embeds),At(),n=Ft(n,i,o,0,t,r,s,e.parentNode,Rt,$l,e,pl),It())},i(t){if(!i){for(let t=0;t<r.length;t+=1)Lt(n[t]);i=!0}},o(t){for(let e=0;e<n.length;e+=1)Pt(n[e]);i=!1},d(t){t&&L(e);for(let e=0;e<n.length;e+=1)n[e].d(t)}}}function $l(t,e){let i,n,s;return n=new sl({props:{embed:e[61]}}),{key:t,first:null,c(){i=O(),qt(n.$$.fragment),this.first=i},m(t,e){I(t,i,e),Wt(n,t,e),s=!0},p(t,i){e=t;const s={};512&i[0]&&(s.embed=e[61]),n.$set(s)},i(t){s||(Lt(n.$$.fragment,t),s=!0)},o(t){Pt(n.$$.fragment,t),s=!1},d(t){t&&L(i),Xt(n,t)}}}function wl(t){let e,i;return e=new Ie({}),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function yl(t){let e,i;return e=new Zi({}),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function bl(t){let e,i,n=[],s=new Map,r=Dt(t[26]);const o=t=>t[56].uuid;for(let a=0;a<r.length;a+=1){let e=ml(t,r,a),i=o(e);s.set(i,n[a]=kl(i,e))}return{c(){for(let t=0;t<n.length;t+=1)n[t].c();e=O()},m(t,s){for(let e=0;e<n.length;e+=1)n[e]&&n[e].m(t,s);I(t,e,s),i=!0},p(t,i){67108864&i[0]&&(r=Dt(t[26]),At(),n=Ft(n,i,o,0,t,r,s,e.parentNode,Rt,kl,e,ml),It())},i(t){if(!i){for(let t=0;t<r.length;t+=1)Lt(n[t]);i=!0}},o(t){for(let e=0;e<n.length;e+=1)Pt(n[e]);i=!1},d(t){t&&L(e);for(let e=0;e<n.length;e+=1)n[e].d(t)}}}function kl(t,e){let i,n,s;return n=new Aa({props:{image:e[56]}}),{key:t,first:null,c(){i=O(),qt(n.$$.fragment),this.first=i},m(t,e){I(t,i,e),Wt(n,t,e),s=!0},p(t,i){e=t;const s={};67108864&i[0]&&(s.image=e[56]),n.$set(s)},i(t){s||(Lt(n.$$.fragment,t),s=!0)},o(t){Pt(n.$$.fragment,t),s=!1},d(t){t&&L(i),Xt(n,t)}}}function Tl(t){let e,i,n=[],s=new Map,r=Dt(t[26].filter(Ol));const o=t=>t[56].uuid;for(let a=0;a<r.length;a+=1){let e=hl(t,r,a),i=o(e);s.set(i,n[a]=xl(i,e))}return{c(){for(let t=0;t<n.length;t+=1)n[t].c();e=O()},m(t,s){for(let e=0;e<n.length;e+=1)n[e]&&n[e].m(t,s);I(t,e,s),i=!0},p(t,i){67108864&i[0]&&(r=Dt(t[26].filter(Ol)),At(),n=Ft(n,i,o,0,t,r,s,e.parentNode,Rt,xl,e,hl),It())},i(t){if(!i){for(let t=0;t<r.length;t+=1)Lt(n[t]);i=!0}},o(t){for(let e=0;e<n.length;e+=1)Pt(n[e]);i=!1},d(t){t&&L(e);for(let e=0;e<n.length;e+=1)n[e].d(t)}}}function xl(t,e){let i,n,s;return n=new Qi({props:{image:e[56]}}),{key:t,first:null,c(){i=O(),qt(n.$$.fragment),this.first=i},m(t,e){I(t,i,e),Wt(n,t,e),s=!0},p(t,i){e=t;const s={};67108864&i[0]&&(s.image=e[56]),n.$set(s)},i(t){s||(Lt(n.$$.fragment,t),s=!0)},o(t){Pt(n.$$.fragment,t),s=!1},d(t){t&&L(i),Xt(n,t)}}}function _l(t){let e,i;return e=new In({props:{hasAudio:t[23]||!(!t[24]||!t[6]||t[6].muted)}}),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};25165888&i[0]&&(n.hasAudio=t[23]||!(!t[24]||!t[6]||t[6].muted)),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function El(t){let e,i;return e=new Dr({props:{images:t[4],omni:t[3]}}),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};16&i[0]&&(n.images=t[4]),8&i[0]&&(n.omni=t[3]),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function Sl(t){let e,i;return e=new ze({props:{organisation:t[21]}}),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};2097152&i[0]&&(n.organisation=t[21]),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function Ml(t){let e,i;return e=new oo({props:{info:t[11],data:t[12]}}),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};2048&i[0]&&(n.info=t[11]),4096&i[0]&&(n.data=t[12]),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function Al(t,e){let i,n,s;return n=new Ys({props:{marker:e[34]}}),{key:t,first:null,c(){i=O(),qt(n.$$.fragment),this.first=i},m(t,e){I(t,i,e),Wt(n,t,e),s=!0},p(t,i){e=t;const s={};1024&i[0]&&(s.marker=e[34]),n.$set(s)},i(t){s||(Lt(n.$$.fragment,t),s=!0)},o(t){Pt(n.$$.fragment,t),s=!1},d(t){t&&L(i),Xt(n,t)}}}function Il(t){let e,i;return e=new kr({props:{tour:t[8],noHTML:t[0]}}),e.$on("minimize",t[43]),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};256&i[0]&&(n.tour=t[8]),1&i[0]&&(n.noHTML=t[0]),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function Ll(t){let e,i;return e=new qo({props:{popover:t[27]}}),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};134217728&i[0]&&(n.popover=t[27]),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function Pl(t,e){let i,n,s;return n=new Fn({props:{src:e[51],raised:e[14]}}),{key:t,first:null,c(){i=O(),qt(n.$$.fragment),this.first=i},m(t,e){I(t,i,e),Wt(n,t,e),s=!0},p(t,i){e=t;const s={};32768&i[0]&&(s.src=e[51]),16384&i[0]&&(s.raised=e[14]),n.$set(s)},i(t){s||(Lt(n.$$.fragment,t),s=!0)},o(t){Pt(n.$$.fragment,t),s=!1},d(t){t&&L(i),Xt(n,t)}}}function Nl(t){let e,i;return e=new co({props:{message:t[2]}}),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};4&i[0]&&(n.message=t[2]),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function Cl(t){let e,i;return e=new cl({props:{progress:t[1]}}),{c(){qt(e.$$.fragment)},m(t,n){Wt(e,t,n),i=!0},p(t,i){const n={};2&i[0]&&(n.progress=t[1]),e.$set(n)},i(t){i||(Lt(e.$$.fragment,t),i=!0)},o(t){Pt(e.$$.fragment,t),i=!1},d(t){Xt(e,t)}}}function zl(t){let e,i,n,s,r,o,a,l,c,d,u,h,m,p,f,g,v,$,w=[],y=new Map,b=[],k=new Map,T=t[23]&&t[9]&&t[7]&&fl(t),x=t[24]&&t[7]&&gl(t),_=t[28]&&t[9]&&t[9].embeds&&vl(t),E=t[5]&&wl(),S=t[16]&&yl(),M=t[22]&&bl(t),A=t[20]&&Tl(t),P=t[18]&&_l(t),N=t[19]&&El(t),C=t[21]&&Sl(t),z=t[17]&&Ml(t),R=Dt(t[10]);const F=t=>t[34].id;for(let I=0;I<R.length;I+=1){let e=ul(t,R,I),i=F(e);y.set(i,w[I]=Al(i,e))}let U=t[8]&&Il(t),V=t[27]&&Ll(t),B=Dt(t[15]);const q=t=>t[51];for(let I=0;I<B.length;I+=1){let e=dl(t,B,I),i=q(e);k.set(i,b[I]=Pl(i,e))}let W=t[2]&&Nl(t),X=t[1]<1&&Cl(t);return{c(){T&&T.c(),e=D(),x&&x.c(),i=D(),_&&_.c(),n=D(),E&&E.c(),s=D(),S&&S.c(),r=D(),M&&M.c(),o=D(),A&&A.c(),a=D(),P&&P.c(),l=D(),N&&N.c(),c=D(),C&&C.c(),d=D(),z&&z.c(),u=D();for(let t=0;t<w.length;t+=1)w[t].c();h=D(),U&&U.c(),m=D(),V&&V.c(),p=D();for(let t=0;t<b.length;t+=1)b[t].c();f=D(),W&&W.c(),g=D(),X&&X.c(),v=O()},m(t,y){T&&T.m(t,y),I(t,e,y),x&&x.m(t,y),I(t,i,y),_&&_.m(t,y),I(t,n,y),E&&E.m(t,y),I(t,s,y),S&&S.m(t,y),I(t,r,y),M&&M.m(t,y),I(t,o,y),A&&A.m(t,y),I(t,a,y),P&&P.m(t,y),I(t,l,y),N&&N.m(t,y),I(t,c,y),C&&C.m(t,y),I(t,d,y),z&&z.m(t,y),I(t,u,y);for(let e=0;e<w.length;e+=1)w[e]&&w[e].m(t,y);I(t,h,y),U&&U.m(t,y),I(t,m,y),V&&V.m(t,y),I(t,p,y);for(let e=0;e<b.length;e+=1)b[e]&&b[e].m(t,y);I(t,f,y),W&&W.m(t,y),I(t,g,y),X&&X.m(t,y),I(t,v,y),$=!0},p(t,$){t[23]&&t[9]&&t[7]?T?(T.p(t,$),8389248&$[0]&&Lt(T,1)):(T=fl(t),T.c(),Lt(T,1),T.m(e.parentNode,e)):T&&(At(),Pt(T,1,1,(()=>{T=null})),It()),t[24]&&t[7]?x?(x.p(t,$),16777344&$[0]&&Lt(x,1)):(x=gl(t),x.c(),Lt(x,1),x.m(i.parentNode,i)):x&&(At(),Pt(x,1,1,(()=>{x=null})),It()),t[28]&&t[9]&&t[9].embeds?_?(_.p(t,$),512&$[0]&&Lt(_,1)):(_=vl(t),_.c(),Lt(_,1),_.m(n.parentNode,n)):_&&(At(),Pt(_,1,1,(()=>{_=null})),It()),t[5]?E?32&$[0]&&Lt(E,1):(E=wl(),E.c(),Lt(E,1),E.m(s.parentNode,s)):E&&(At(),Pt(E,1,1,(()=>{E=null})),It()),t[16]?S?65536&$[0]&&Lt(S,1):(S=yl(),S.c(),Lt(S,1),S.m(r.parentNode,r)):S&&(At(),Pt(S,1,1,(()=>{S=null})),It()),t[22]?M?(M.p(t,$),4194304&$[0]&&Lt(M,1)):(M=bl(t),M.c(),Lt(M,1),M.m(o.parentNode,o)):M&&(At(),Pt(M,1,1,(()=>{M=null})),It()),t[20]?A?(A.p(t,$),1048576&$[0]&&Lt(A,1)):(A=Tl(t),A.c(),Lt(A,1),A.m(a.parentNode,a)):A&&(At(),Pt(A,1,1,(()=>{A=null})),It()),t[18]?P?(P.p(t,$),262144&$[0]&&Lt(P,1)):(P=_l(t),P.c(),Lt(P,1),P.m(l.parentNode,l)):P&&(At(),Pt(P,1,1,(()=>{P=null})),It()),t[19]?N?(N.p(t,$),524288&$[0]&&Lt(N,1)):(N=El(t),N.c(),Lt(N,1),N.m(c.parentNode,c)):N&&(At(),Pt(N,1,1,(()=>{N=null})),It()),t[21]?C?(C.p(t,$),2097152&$[0]&&Lt(C,1)):(C=Sl(t),C.c(),Lt(C,1),C.m(d.parentNode,d)):C&&(At(),Pt(C,1,1,(()=>{C=null})),It()),t[17]?z?(z.p(t,$),131072&$[0]&&Lt(z,1)):(z=Ml(t),z.c(),Lt(z,1),z.m(u.parentNode,u)):z&&(At(),Pt(z,1,1,(()=>{z=null})),It()),1024&$[0]&&(R=Dt(t[10]),At(),w=Ft(w,$,F,0,t,R,y,h.parentNode,Rt,Al,h,ul),It()),t[8]?U?(U.p(t,$),256&$[0]&&Lt(U,1)):(U=Il(t),U.c(),Lt(U,1),U.m(m.parentNode,m)):U&&(At(),Pt(U,1,1,(()=>{U=null})),It()),t[27]?V?(V.p(t,$),134217728&$[0]&&Lt(V,1)):(V=Ll(t),V.c(),Lt(V,1),V.m(p.parentNode,p)):V&&(At(),Pt(V,1,1,(()=>{V=null})),It()),49152&$[0]&&(B=Dt(t[15]),At(),b=Ft(b,$,q,0,t,B,k,f.parentNode,Rt,Pl,f,dl),It()),t[2]?W?(W.p(t,$),4&$[0]&&Lt(W,1)):(W=Nl(t),W.c(),Lt(W,1),W.m(g.parentNode,g)):W&&(At(),Pt(W,1,1,(()=>{W=null})),It()),t[1]<1?X?(X.p(t,$),2&$[0]&&Lt(X,1)):(X=Cl(t),X.c(),Lt(X,1),X.m(v.parentNode,v)):X&&(At(),Pt(X,1,1,(()=>{X=null})),It())},i(t){if(!$){Lt(T),Lt(x),Lt(_),Lt(E),Lt(S),Lt(M),Lt(A),Lt(P),Lt(N),Lt(C),Lt(z);for(let t=0;t<R.length;t+=1)Lt(w[t]);Lt(U),Lt(V);for(let t=0;t<B.length;t+=1)Lt(b[t]);Lt(W),Lt(X),$=!0}},o(t){Pt(T),Pt(x),Pt(_),Pt(E),Pt(S),Pt(M),Pt(A),Pt(P),Pt(N),Pt(C),Pt(z);for(let e=0;e<w.length;e+=1)Pt(w[e]);Pt(U),Pt(V);for(let e=0;e<b.length;e+=1)Pt(b[e]);Pt(W),Pt(X),$=!1},d(t){t&&(L(e),L(i),L(n),L(s),L(r),L(o),L(a),L(l),L(c),L(d),L(u),L(h),L(m),L(p),L(f),L(g),L(v)),T&&T.d(t),x&&x.d(t),_&&_.d(t),E&&E.d(t),S&&S.d(t),M&&M.d(t),A&&A.d(t),P&&P.d(t),N&&N.d(t),C&&C.d(t),z&&z.d(t);for(let e=0;e<w.length;e+=1)w[e].d(t);U&&U.d(t),V&&V.d(t);for(let e=0;e<b.length;e+=1)b[e].d(t);W&&W.d(t),X&&X.d(t)}}}function Dl(t,e){if(e)for(let i,n=0;n<e.length;n++)if(e[n].id==t||(i=Dl(t,e[n].children)))return i??e[n]}const Ol=t=>t.$settings.minimap;function Rl(e,i,n){let s,r,o,a,l,c,m,p,f,g,v,$,w,y,b,k,T,x,_,E,S,M,A,I,L=t,P=()=>(L(),L=d(Y,(t=>n(41,k=t))),Y),N=t,C=t;e.$$.on_destroy.push((()=>L())),e.$$.on_destroy.push((()=>N())),e.$$.on_destroy.push((()=>C()));let{micrio:z}=i;at("micrio",z);at("markerImages",new WeakMap);let{noHTML:D}=i;const O="markers"==z.getAttribute("data-ui");O&&(D=!0);let{noLogo:R=D}=i,{loadingProgress:F=1}=i,{error:U}=i;const V="false"!=z.getAttribute("data-embeds"),B=z.visible;h(e,B,(t=>n(26,A=t)));const q=z.state.popup,W=z.state.popover;h(e,W,(t=>n(27,I=t)));let X,G,Y,j=[];q.subscribe((t=>setTimeout((()=>n(10,j=t?[t]:[])),20)));const{tour:H,marker:Z}=z.state;h(e,H,(t=>n(8,x=t))),h(e,Z,(t=>n(42,_=t)));let K,J=!1;const Q=[];z.current.subscribe((t=>{t&&(n(11,X=t.info),N(),N=d(X,(t=>n(7,T=t))),P(n(13,Y=void 0)),X&&le(X).then((e=>{var i;e&&(n(37,J=!0),P(n(13,Y=t.settings)),!K&&(null==(i=e.organisation)?void 0:i.logo)&&n(38,K=e.organisation))})),n(12,G=t.data),C(),C=d(G,(t=>n(9,E=t))),G&&Q.indexOf(t.id)<0&&le(G).then((async e=>{var i,n;if(!e)return;if(Q.push(t.id),await vt().then(vt),u(z.state.popover)||u(z.state.marker)||u(z.state.tour))return;const s=t.$settings.start;if(s)switch(s.type){case"marker":t.state.marker.set(s.id);break;case"markerTour":const r=null==(i=e.markerTours)?void 0:i.find((t=>t.id==s.id));r&&z.state.tour.set(r);break;case"tour":const o=null==(n=e.tours)?void 0:n.find((t=>t.id==s.id));o&&z.state.tour.set(o);break;case"page":const a=Dl(s.id,e.pages);a&&z.state.popover.set({contentPage:a,showLangSelect:!0})}})))}));const tt=z.isMuted;h(e,tt,(t=>n(44,S=t)));const et=Ht(S?0:1);h(e,et,(t=>n(25,M=t))),at("volume",et),z.isMuted.subscribe((t=>et.set(t?0:1))),at("mediaPaused",Ht(!1));let it=!1,nt=[];at("srt",Ht()).subscribe((t=>setTimeout((()=>{n(15,nt=t?[t]:[])}),20)));return e.$$set=t=>{"micrio"in t&&n(35,z=t.micrio),"noHTML"in t&&n(0,D=t.noHTML),"noLogo"in t&&n(36,R=t.noLogo),"loadingProgress"in t&&n(1,F=t.loadingProgress),"error"in t&&n(2,U=t.error)},e.$$.update=()=>{var t,i,d;1024&e.$$.dirty[1]&&n(6,s=null==(t=null==k?void 0:k._360)?void 0:t.video),64&e.$$.dirty[0]&&n(24,r=null==s?void 0:s.src),1024&e.$$.dirty[1]&&n(3,o=null==k?void 0:k.omni),128&e.$$.dirty[0]&&n(4,a=null==T?void 0:T.gallery),512&e.$$.dirty[0]&&n(40,l=null==(i=null==E?void 0:E.markers)?void 0:i.filter((t=>!!t.positionalAudio))),512&e.$$.dirty[0]|512&e.$$.dirty[1]&&n(23,c=!!(null==(d=null==E?void 0:E.music)?void 0:d.items.length)||!!(null==l?void 0:l.length)),256&e.$$.dirty[0]|2048&e.$$.dirty[1]&&n(39,m=x||_),1&e.$$.dirty[0]&&n(22,p=!D||O),129&e.$$.dirty[0]|1056&e.$$.dirty[1]&&n(5,f=!(R||T&&D||(null==k?void 0:k.noLogo))),33&e.$$.dirty[0]|1152&e.$$.dirty[1]&&n(21,g=D||!f||(null==k?void 0:k.noOrgLogo)?void 0:K),393&e.$$.dirty[0]|16&e.$$.dirty[1]&&n(20,v=!(D||o||z.spaceData||x||(null==T?void 0:T.gallery))),24&e.$$.dirty[0]&&n(19,$=!!a||!!o),129&e.$$.dirty[0]&&n(18,w=!D&&!!T),1&e.$$.dirty[0]|1280&e.$$.dirty[1]&&n(17,y=!D&&!m&&(null==k?void 0:k.showInfo)),1&e.$$.dirty[0]|1088&e.$$.dirty[1]&&n(16,b=!D&&J&&!(null==k?void 0:k.noToolbar))},[D,F,U,o,a,f,s,T,x,E,j,X,G,Y,it,nt,b,y,w,$,v,g,p,c,r,M,A,I,V,B,W,H,tt,et,Z,z,R,J,K,m,l,k,_,t=>n(14,it=!t.detail)]}const Fl=!self.createImageBitmap,Ul=URL.createObjectURL(new Blob(["let controller = null, prevUri = null;\nself.addEventListener('message', e => {\n\tif(e.data == 'abort') return controller && controller.abort();\n\tcontroller = new AbortController();\n\tfetch(e.data.src, { signal: controller.signal })\n\t\t.then(r => r.blob())"+(Fl?"\n\t\t.then(blob => {\n\t\t\tURL.revokeObjectURL(prevUri);\n\t\t\tself.postMessage({src: (prevUri = URL.createObjectURL(blob, {type: e.data.type}))})\n\t\t})":"\n\t\t.then(blob => self.createImageBitmap(blob))\n\t\t.then(data => self.postMessage({data:data, src:e.data.src}, [data]))")+"\n\t\t.catch(err => self.postMessage({error: e.data.src+': '+err.message, type: err.name}))\n})"],{type:"text/javascript"})),Vl=Math.max(2,Math.min(6,(navigator.hardwareConcurrency||2)-1)),Bl=[],ql=new Map,Wl=new Map,Xl=[],Gl=new Map;for(let bc=0;bc<Vl;bc++){const t=new Worker(Ul);t.onmessage=t=>jl(bc,t.data.src,t.data.data,t.data.error,t.data.type),ql.set(bc,t),Wl.set(bc,new Image)}const Yl=t=>new Promise(((e,i)=>{Xl.push([t,e,i]),function(){if(!Xl.length)return;let t=0;for(;t<Vl&&!(Bl.indexOf(t)<0);t++);if(t>=Vl&&!Fl)return void console.warn("All download threads taken!");Bl.push(t);const e=Xl.shift();if(!e)return;Gl.set(t,e);const i=ql.get(t);if(!i)return;i.postMessage({src:e[0],type:"image/"+e[0].split(".").reverse()[0]})}()}));function jl(t,e,i,n,s){const r=Gl.get(t);if(null!=r)if(Gl.delete(t),setTimeout((()=>{Bl.splice(Bl.indexOf(t),1)}),50),n)r[2](n),"AbortError"!=s&&console.error(s,n);else if(i)r[1](i);else if(e){const i=Wl.get(t);if(!i)return;i.onload=()=>{r[1](i)},i.src=e}}function Hl(){return Bl.length}function Zl(t){const e=[...Gl.entries()].find((e=>e[1][0]==t));if(null==e)return;const i=ql.get(e[0]);i&&i.postMessage("abort")}const Kl=Ca.ugz?Ca.ugz(Ca.b64,!0):fetch("http://localhost:2000/build/optimized.wasm").then((t=>t.arrayBuffer())),Jl=class t{constructor(t){this.micrio=t,this.ready=!1,this.memory=new self.WebAssembly.Memory({initial:100,maximum:100}),this.b=this.memory.buffer,this.i=-1,this.c=-1,this.now=-1,this.raf=-1,this.drawing=!1,this.images=[],this.bareBone=!1,this.baseTiles=[],this.drawn=[],this.prevDrawn=[],this.toDelete={},this.textures={},this.requests=new Map,this.timeouts={},this.tileLoaded={},this.tileOpacity={},this.loadStates={},this.unsubscribe=[],this.cameras=new Map,this.preventDirectionSet=!1,this._pMatrices={},this.isGallery=!1,this.imports={env:{memory:this.memory,abort:console.error},main:{"console.log":console.log,"console.log2":console.log,"console.log3":console.log,"console.log4":console.log,drawTile:this.drawTile.bind(this),drawQuad:t=>this.micrio.webgl.drawTile(void 0,t),aniAbort:t=>{const e=this.cameras.get(t);e&&(e.aniAbort&&e.aniAbort(),e.aniDoneAdd.length=0,e.aniAbort=e.aniDone=void 0)},aniDone:t=>{var e;const i=this.cameras.get(t);if(i){for(i.aniDone&&i.aniDone();i.aniDoneAdd.length;)null==(e=i.aniDoneAdd.shift())||e();i.aniAbort=i.aniDone=void 0}},getTileOpacity:t=>this.tileOpacity[t],setTileOpacity:(t,e=!1,i=1)=>{const n=this.tileOpacity,s=this.tileLoaded;return(!n[t]||n[t]<1)&&(n[t]=e?1:s[t]>0?Math.min(1,(this.now-s[t])/250)*i:0),n[t]||0},setMatrix:t=>this.micrio.webgl.gl.uniformMatrix4fv(this.micrio.webgl.pmLoc,!1,this._pMatrices[t]),setViewport:(t,e,i,n)=>this.micrio.webgl.gl.viewport(Math.floor(t),Math.floor(e),Math.ceil(i),Math.ceil(n)),viewSet:t=>{var e;return null==(e=this.cameras.get(t))?void 0:e.viewChanged()},viewportSet:(t,e,i,n,s)=>{const r=this.images.find((e=>e.ptr==t));r&&"camera"in r&&r.viewport.set([e,i,n,s])},setVisible:(t,e)=>{var i;return null==(i=this.images.find((e=>e.ptr==t)))?void 0:i.visible.set(1===e)},setVisible2:(t,e)=>{var i;return null==(i=this.images.find((e=>e.ptr==t)))?void 0:i.visible.set(1===e)}}},this.addImage=async(t,e,i=!1,n=1)=>le(t.info).then((s=>{if(!s)return;this.images.push(t);const r=t.opts.area??[0,0,1,1],o=t.$settings._360??{};if(t.ptr=i?this.e._addImage(e.ptr,r[0],r[1],r[2],r[3],s.width,s.height,s.tileSize||1024,s.isSingle??!1,s.isVideo??!1,n,o.rotX??0,o.rotY??0,o.rotZ??0,o.scale??1,0):this.e._addChild(e.ptr,r[0],r[1],r[2],r[3],s.width,s.height),!i){this.bindCamera(t),t.$settings.focus&&this.e._setCoo(t.ptr,t.$settings.focus[0],t.$settings.focus[1],0,0,performance.now());const e=this.e._getPMatrix(t.ptr);this._pMatrices[e]=new Float32Array(this.b,e+32,16);const i=t.$info.view;i&&"0,0,1,1"!=i.toString()&&this.e._setView(t.ptr,i[0],i[1],i[2],i[3]),this.e._sendViewport(t.ptr)}this.tileOpacity[t.baseTileIdx=this.e.getNumTiles(this.i)-1]=1,this.baseTiles.push(t.baseTileIdx)})),this.addEmbed=(t,e,i={})=>{if("camera"in t&&i.asImage)return this.addImage(t,e,!0,i.opacity??1);{const n="$info"in t?t.$info:e.$info;if(!n)return;this.images.push(t);const s=t.opts.area??[0,0,1,1],r=t instanceof ja?t.$settings._360??{}:{};t.ptr=this.e._addImage(e.ptr,s[0],s[1],s[2],s[3],n.width,n.height,n.tileSize||1024,n.isSingle??!1,n.isVideo??!1,i.opacity??1,r.rotX??0,r.rotY??0,r.rotZ??0,r.scale??1,i.fromScale??0),this.tileOpacity[t.baseTileIdx=this.e.getNumTiles(this.i)-1]=1,this.baseTiles.push(t.baseTileIdx)}},this.addChild=(t,e)=>this.addImage(t,e),this.render=this.render.bind(this),this.draw=this.draw.bind(this),this.unsubscribe.push(t.current.subscribe(this.setCanvas.bind(this)))}static getTextureBuffer(t,e){const i=new Float32Array(12*t*e),n=1/t,s=1/e;for(let r=0,o=0;o<e;o++)for(let e=0;e<t;e++,r+=12)i[r+3]=i[r+7]=i[r+9]=(i[r+1]=i[r+5]=i[r+11]=o*s)+s,i[r+4]=i[r+8]=i[r+10]=(i[r+0]=i[r+2]=i[r+6]=e*n)+n;return i}async load(){if(this.i>=0)return;this.i=0;const e=await Kl;if(!(e instanceof Uint8Array||e instanceof ArrayBuffer))throw"Wasm binary is no array buffer!";const i=this.e=(await self.WebAssembly.instantiate(e,this.imports)).instance.exports;this.i=i.constructor(),t.segsX=this.e.segsX.value,t.segsY=this.e.segsY.value,t._textureBuffer360=t.getTextureBuffer(t.segsX,t.segsY),this._vertexBuffer=new Float32Array(this.b,i.getVertexBuffer(this.i)+32,18),this._vertexBuffer360=new Float32Array(this.b,i.getVertexBuffer360(this.i)+32,18*t.segsX*t.segsY),this.unsubscribe.push(this.micrio.barebone.subscribe((t=>i.setBareBone(this.i,this.bareBone=t))))}unbind(){var t;for(this.stop();this.unsubscribe.length;)null==(t=this.unsubscribe.shift())||t();this.requests.forEach((t=>Zl(t))),this.requests.clear();for(let e in this.timeouts)clearTimeout(this.timeouts[e]);this.timeouts={},this.loadStates={},this.tileLoaded={},this.tileOpacity={};for(let e in this.tileLoaded)this.deleteTile(Number(e));this.i>0&&this.e.reset(this.i)}getPtr(){return this.i}addCanvas(t){var e,i,n,s,r,o,a,l,c,d,h;const m=t.$info;if(!m)return;if(t.error)return void this.micrio.loading.set(!1);if(!(t.noImage||m.width&&m.height))throw"Invalid Micrio image size";const p=t.$settings;this.isGallery=!!m.gallery||t.isOmni,(null==(e=p.gallery)?void 0:e.archive)&&this.e.setHasArchive(this.i,!0,p.gallery.archiveLayerOffset??0),m.version&&Number(m.version)<=3.1&&this.e.setNoUnderzoom(this.i,!0);const f=!!p.limitToCoverScale,g=f||"cover"==p.initType;t.noImage&&this.micrio.loading.set(!1);const v=[.5,.5],$=p.focus,w=!!m.spacesId;$&&(isNaN($[0])||null===$[0]||(v[0]=$[0]),isNaN($[1])||null===$[1]||(v[1]=$[1])),m.is360&&(t.camera.trueNorth=(null==(i=p._360)?void 0:i.trueNorth)??.5);const y=null==(n=p._360)?void 0:n.video,b=m.is360&&y&&(y.src||"video"in y&&y.video),k=!!this.isGallery&&("switch"==(null==(s=p.gallery)?void 0:s.type)||"omni"==(null==(r=p.gallery)?void 0:r.type)||"swipe-full"==(null==(o=p.gallery)?void 0:o.type)),T=(null==(l=null==(a=p.omni)?void 0:a.layers)?void 0:l.length)??1;p.omni&&(p.omni.layerStartIndex=Math.min(T-1,(null==(c=p.omni)?void 0:c.layerStartIndex)??0)),t.ptr=this.e._constructor(this.i,m.width,m.height,m.tileSize??1024,m.is360??!1,t.noImage,!(!m.isSingle&&!b),t.opacity,p.freeMove??!1,f,g,(p.zoomLimit||1)*(!1!==p.zoomLimitDPRFix?this.micrio.canvas.getRatio(t.$settings):1),p.camspeed??1,t.camera.trueNorth,k,!!(null==(d=p.gallery)?void 0:d.isSpreads)&&"swipe"==p.gallery.type,t.isOmni,p.pinchZoomOutLimit??!1,T,(null==(h=p.omni)?void 0:h.layerStartIndex)??0),this.bindCamera(t),t.opts.area&&t.camera.setArea(t.opts.area,{direct:!0,noDispatch:!0,noRender:!0}),(null==p?void 0:p.crossfadeDuration)&&this.e.setCrossfadeDuration(this.i,p.crossfadeDuration),(null==p?void 0:p.embedFadeDuration)&&this.e.setEmbedFadeDuration(this.i,p.embedFadeDuration),void 0!==(null==p?void 0:p.dragElasticity)&&this.e.setDragElasticity(this.i,p.dragElasticity),(null==p?void 0:p.skipBaseLevels)&&this.e.setSkipBaseLevels(this.i,p.skipBaseLevels),(null==p?void 0:p.omni)&&t.camera.setOmniSettings(),this.micrio.hasAttribute("data-limited")&&this.e._setLimited(t.ptr,!0),this.images.push(t),this.e._sendViewport(t.ptr);const x=this.e.getNumTiles(this.i);x>0&&(this.tileOpacity[x-1]=1,this.baseTiles.push(x-1));const _=this.e._getPMatrix(t.ptr);this._pMatrices[_]=new Float32Array(this.b,_+32,16);const E=u(t.state.view)||p.view;E&&"0,0,1,1"!=E.toString()?this.e._setView(t.ptr,E[0],E[1],E[2],E[3],!1,!1,!1):!w&&m.is360||!v||"0.5,0.5"==v.toString()||(this.e._setCoo(t.ptr,v[0],v[1],0,0,performance.now()),p.focus=void 0),t.video.subscribe((t=>t&&t.addEventListener("play",this.render))),t.noImage&&t.visible.set(!0),this.setCanvas(t)}bindCamera(t){this.cameras.set(t.ptr,t.camera),t.camera.assign(this.e,new Float64Array(this.b,this.e._getView(t.ptr)+32,4),new Float64Array(this.b,this.e._getXY(t.ptr,0,0)+32,5),new Float64Array(this.b,this.e._getCoo(t.ptr,0,0)+32,5),new Float32Array(this.b,this.e._getMatrix(t.ptr)+32,16),new Float32Array(this.b,this.e._getQuad(t.ptr,0,0,0,0,0,0)+32,16))}setCanvas(t){var e;if(t&&!(t.ptr>0&&t.ptr==this.c))if(t.ptr<0)le(t.info).then((e=>{e&&this.micrio.$current&&(e.isIIIF||t.opts.secondaryTo||e.id==this.micrio.$current.id)&&(this.addCanvas(t),t.embeds.length&&t.embeds.forEach((e=>this.addEmbed(e,t))))}));else if(this.c!=t.ptr){const i=t.is360&&this.c>=0?this.e._getYaw(this.c):0,n=t.is360&&this.c>=0?this.e._getPitch(this.c):0;this.c=t.ptr,t.is360&&!this.preventDirectionSet&&i&&n&&this.e._setDirection(this.c,i,n,!0),0==this.e._getTargetOpacity(t.ptr)&&this.e._fadeIn(t.ptr),(null==(e=t.$settings.omni)?void 0:e.layerStartIndex)&&t.state.layer.set(t.$settings.omni.layerStartIndex),this.preventDirectionSet=!1,this.ready=!0,this.render()}}removeCanvas(t){if(t.ptr<0)throw"Canvas is not placed yet";this.e._remove(t.ptr),this.render()}render(){this.raf<0&&(this.raf=this.micrio.webgl.display.requestAnimationFrame(this.draw))}draw(t=performance.now()){var e,i;this.micrio.isConnected&&(this.raf=-1,this.drawing=!1,this.now=t,(1==this.e.shouldDraw(this.i,t)||this.micrio.keepRendering||this.micrio.events.isNavigating||!1===(null==(i=null==(e=this.micrio._current)?void 0:e._video)?void 0:i.paused))&&this.render(),this.isGallery&&this.drawStart(),this.drawn.length=0,this.e.draw(this.i),this.micrio.events.dispatch("draw"),this.cleanup(),this.micrio.webgl.drawEnd())}stop(){this.raf<0||(this.micrio.webgl.display.cancelAnimationFrame(this.raf),this.raf=-1)}drawTile(t,e,i,n,s,r,o,a){this.drawn.push(e),e in this.toDelete&&delete this.toDelete[e];const l=Hl(),c=this.images[t],d="camera"in c&&c.isVideo,u="camera"in c&&c.is360,h="camera"in c?c:c.image,m="frame"in c?c.frame:void 0;if(!this.loadStates[e]&&l<Vl){if(this.bareBone?l>2&&o:a&&o&&l>0)return!1;if(d&&!u)this.loadStates[e]=2,this.textures[e]=this.micrio.webgl.getTexture();else{this.loadStates[e]=1;const t=h.getTileSrc(i,n,s,m);t&&this.getTexture(e,t,o,{noSmoothing:"$info"in c&&c.$settings.noSmoothing})}}else if(this.loadStates[e]>=2){this.drawing||this.drawStart();const t=this.textures[e];if(null!=t){if(d){if(!h._video||!h._video.dataset.playing)return!1;this.micrio.webgl.updateTexture(t,h._video)}this.micrio.webgl.drawTile(t,r,u)}if(2==this.loadStates[e])return this.loadStates[e]=3,this.tileLoaded[e]=this.now,!0}return!1}drawStart(){this.drawing||(this.micrio.webgl.drawStart(),this.drawing=!0)}getTexture(t,e,i,n={}){if(this.textures[t]||this.requests.has(t)||!n.force&&Hl()>=Vl)return;const s=Ga.db.has(e);s||this.micrio.loading.set(!0),this.requests.set(t,e),(s?Ga.getImage(e):Yl(e)).then((e=>this.gotTexture(t,e,i,n.noSmoothing))).catch((()=>this.deleteRequest(t)))}gotTexture(t,e,i,n){this.textures[t]=this.micrio.webgl.getTexture(e,n),null!=self.ImageBitmap&&e instanceof ImageBitmap&&e.close instanceof Function&&e.close(),this.loadStates[t]=2,this.timeouts[t]=setTimeout((()=>{this.deleteRequest(t)}),i?150:50)}deleteRequest(t){this.requests.delete(t),clearTimeout(this.timeouts[t]),delete this.timeouts[t],this.requests.size||this.micrio.loading.set(!1)}deleteTile(t){const e=this.textures[t];e&&(this.micrio.webgl.gl.deleteTexture(e),delete this.textures[t],delete this.toDelete[t],delete this.loadStates[t],delete this.tileOpacity[t],delete this.tileLoaded[t])}cleanup(){const t=this.prevDrawn.filter((t=>this.drawn.indexOf(t)<0&&this.loadStates[t]>0&&this.baseTiles.indexOf(t)<0)),e=performance.now();for(let n=0;n<t.length;n++){const i=t[n];switch(this.tileOpacity[n]=0,this.loadStates[i]){case 1:const t=this.requests.get(i);t&&Zl(t),delete this.loadStates[i];break;case 2:this.requests.has(i)&&this.deleteRequest(i),delete this.loadStates[i],this.deleteTile(i);break;case 3:i in this.toDelete||(this.toDelete[i]=e)}}this.prevDrawn=this.drawn.slice(0);const i=ie.iOS?5:30;for(let n in this.toDelete)(e-this.toDelete[n])/1e3>i&&this.deleteTile(Number(n))}resize(t){this.e.resize(this.i,t.width,t.height,t.left,t.top,t.ratio,t.scale,t.portrait),this.ready&&(this.stop(),this.draw())}setActiveImage(t,e,i){this.e._setActiveImage(t,e,i??0)}setActiveLayer(t,e){this.e._setActiveLayer(t,e)}fadeImage(t,e,i=!1){this.cameras.has(t)?this.e._fadeTo(t,e,i):this.e._fadeImage(t,e,i),this.render()}setFocus(t,e,i=!1){this.e._setFocus(t,e[0],e[1],e[2],e[3],i)}};Jl._textureBuffer=Jl.getTextureBuffer(1,1);let Ql=Jl;const tc=new Float32Array([-1,-1,0,0,1,-1,1,0,-1,1,0,1,1,1,1,1]);class ec{constructor(t,e,i){if(this.gl=t,this.program=t.createProgram(),e.webgl.getShader(this.program,t.VERTEX_SHADER,"\nattribute vec2 a_position;\nattribute vec2 a_texCoord;\n\nvarying vec2 v_texCoord;\n\nvoid main() {\n\tv_texCoord = a_texCoord;\n\tgl_Position = vec4(a_position, 0.0, 1.0);\n}"),e.webgl.getShader(this.program,t.FRAGMENT_SHADER,i),t.linkProgram(this.program),t.useProgram(this.program),this.ppPositionLoc=t.getAttribLocation(this.program,"a_position"),this.ppTexCoordLoc=t.getAttribLocation(this.program,"a_texCoord"),this.ppTimeLoc=t.getUniformLocation(this.program,"u_time"),this.texture=t.createTexture(),t.bindTexture(t.TEXTURE_2D,this.texture),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,this.gl.drawingBufferWidth,this.gl.drawingBufferHeight,0,t.RGBA,t.UNSIGNED_BYTE,null),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),this.frameBuffer=t.createFramebuffer(),t.bindFramebuffer(t.FRAMEBUFFER,this.frameBuffer),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,this.texture,0),!this.frameBuffer||t.checkFramebufferStatus(t.FRAMEBUFFER)!==t.FRAMEBUFFER_COMPLETE)throw new Error("Framebuffer not complete");t.bindFramebuffer(t.FRAMEBUFFER,null),this.quad=t.createBuffer(),t.bindBuffer(t.ARRAY_BUFFER,this.quad),t.bufferData(t.ARRAY_BUFFER,tc,t.STATIC_DRAW)}render(){const t=this.gl;t.bindFramebuffer(t.FRAMEBUFFER,null),t.useProgram(this.program),t.bindBuffer(t.ARRAY_BUFFER,this.quad),t.enableVertexAttribArray(this.ppPositionLoc),t.vertexAttribPointer(this.ppPositionLoc,2,t.FLOAT,!1,4*Float32Array.BYTES_PER_ELEMENT,0),t.enableVertexAttribArray(this.ppTexCoordLoc),t.vertexAttribPointer(this.ppTexCoordLoc,2,t.FLOAT,!1,4*Float32Array.BYTES_PER_ELEMENT,2*Float32Array.BYTES_PER_ELEMENT),t.bindTexture(t.TEXTURE_2D,this.texture),t.uniform1f(this.ppTimeLoc,performance.now()/1e3),t.drawArrays(t.TRIANGLE_STRIP,0,4)}resize(){const t=this.gl;t.bindTexture(t.TEXTURE_2D,this.texture),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,this.gl.drawingBufferWidth,this.gl.drawingBufferHeight,0,t.RGBA,t.UNSIGNED_BYTE,null)}}const ic=/firefox/i.test(navigator.userAgent),nc=`\nprecision mediump float;\n\nvarying highp vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform float opacity;\nuniform int noTexture;\n\nvoid main() {\n\tif(noTexture==1) {\n\t\tgl_FragColor = vec4(.1,.1,.1,.1);\n\t} else {\n\t${ic?"\n\t\tvec4 textureColor = texture2D(uSampler, vTextureCoord);\n\t\tfloat newAlpha = min(1., textureColor.a * opacity);\n\t\tgl_FragColor = vec4(textureColor.rgb * newAlpha, newAlpha);":"\n\t\tgl_FragColor = texture2D(uSampler, vTextureCoord) * opacity;"}\n\t\t//gl_FragColor = vec4(1.,0.,0.,1.);\n\t}\n}`;class sc{constructor(t){this.micrio=t,this.display=self,this.txtAttr=-1,this.posAttr=-1,this.was360=!1}init(){var t;const e="WebGL2RenderingContext"in window,i=this.micrio.canvas.element.getContext(e?"webgl2":"webgl",{alpha:!0,preserveDrawingBuffer:this.micrio.hasAttribute("data-preserve-drawing-buffer"),stencil:!1,antialias:!1,depth:!1,desynchronized:!1,powerPreference:"high-performance"});if(e?!(i instanceof window.WebGL2RenderingContext):!(i instanceof window.WebGLRenderingContext))throw"Error creating WebGL context. Does your browser support WebGL?";this.gl=i;const n=null==(t=this.micrio.$current)?void 0:t.$settings.postProcessingFragmentShader;n&&(this.postpocessor=new ec(i,this.micrio,n),this.micrio.keepRendering=!0);const s=i.createProgram();if(!(s instanceof WebGLProgram))throw"Could not compile shaders";this.program=s,this.getShader(this.program,i.VERTEX_SHADER,"\nuniform mat4 GLMatrix;\n\nattribute vec3 pos;\nattribute vec2 aTextureCoord;\n\nvarying highp vec2 vTextureCoord;\n\nvoid main()\n{\n\tgl_Position = GLMatrix * vec4(pos, 1.0);\n\tvTextureCoord = aTextureCoord;\n}"),this.getShader(this.program,i.FRAGMENT_SHADER,nc),i.linkProgram(this.program),i.useProgram(this.program),i.blendFunc(i.ONE,i.ONE_MINUS_SRC_ALPHA),i.enable(i.BLEND),i.disable(i.DEPTH_TEST),this.gl.clearColor(0,0,0,0);const r=i.getUniformLocation(this.program,"opacity");if(!r)throw"Could not create opacity WebGL binding!";this.opaLoc=r,i.useProgram(this.program);const o=i.getUniformLocation(this.program,"GLMatrix");if(!o)throw"Could not create matrix WebGL binding!";this.pmLoc=o;const a=i.getUniformLocation(this.program,"noTexture");if(!a)throw"Could not bind noTexture uniform";this.noTxtLoc=a,this.txtAttr=i.getAttribLocation(this.program,"aTextureCoord");const l=i.createBuffer();if(!l)throw"Could not connect texture buffer";this.txtBuffer=l,i.bindBuffer(i.ARRAY_BUFFER,this.txtBuffer),i.bufferData(i.ARRAY_BUFFER,Ql._textureBuffer,i.STATIC_DRAW);const c=i.createBuffer();if(!c)throw"Could not bind geometry buffer";this.geomBuffer=c,this.posAttr=i.getAttribLocation(this.program,"pos"),this.linkBuffers(),i.viewport(0,0,this.gl.drawingBufferWidth,this.gl.drawingBufferHeight)}linkBuffers(){const t=this.gl;t.bindBuffer(t.ARRAY_BUFFER,this.geomBuffer),t.bufferData(t.ARRAY_BUFFER,this.micrio.wasm._vertexBuffer,t.STATIC_DRAW),t.enableVertexAttribArray(this.txtAttr),t.bindBuffer(t.ARRAY_BUFFER,this.txtBuffer),t.vertexAttribPointer(this.txtAttr,2,t.FLOAT,!1,0,0),t.enableVertexAttribArray(this.posAttr),t.bindBuffer(t.ARRAY_BUFFER,this.geomBuffer),t.vertexAttribPointer(this.posAttr,3,t.FLOAT,!1,0,0)}dispose(t=!1){const e=this.gl;if(e.bindBuffer(e.ARRAY_BUFFER,null),e.bindTexture(e.TEXTURE_2D,null),e.deleteBuffer(this.txtBuffer),e.deleteBuffer(this.geomBuffer),t){const t=e.getExtension("WEBGL_lose_context");t instanceof Object&&t.loseContext instanceof Function&&t.loseContext()}}getShader(t,e,i){const n=this.gl.createShader(e);if(!n)throw"Could not create shader!";if(this.gl.shaderSource(n,i),this.gl.compileShader(n),!this.gl.getShaderParameter(n,this.gl.COMPILE_STATUS))return console.error("Error compiling shader",this.gl.getShaderInfoLog(n)),void this.gl.deleteProgram(t);this.gl.attachShader(t,n),this.gl.deleteShader(n)}getTexture(t,e){const i=this.gl,n=i.createTexture();if(!n)throw"Could not create texture!";return i.bindTexture(i.TEXTURE_2D,n),t&&i.texImage2D(i.TEXTURE_2D,0,i.RGBA,i.RGBA,i.UNSIGNED_BYTE,t),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,i.LINEAR),e&&i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,i.NEAREST),n}updateTexture(t,e){const i=this.gl;i.bindTexture(i.TEXTURE_2D,t),i.texImage2D(i.TEXTURE_2D,0,i.RGBA,i.RGBA,i.UNSIGNED_BYTE,e)}drawStart(){const t=this.gl;this.postpocessor&&t.bindFramebuffer(t.FRAMEBUFFER,this.postpocessor.frameBuffer),this.gl.clear(this.gl.COLOR_BUFFER_BIT)}drawEnd(){this.postpocessor&&(this.postpocessor.render(),this.gl.useProgram(this.program),this.linkBuffers())}drawTile(t,e=1,i=!1){this.gl.uniform1i(this.noTxtLoc,t?0:1),this.gl.uniform1f(this.opaLoc,e),t&&this.gl.bindTexture(this.gl.TEXTURE_2D,t);const n=i?6*Ql.segsX*Ql.segsY:6;i!=this.was360&&(this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.txtBuffer),this.gl.bufferData(this.gl.ARRAY_BUFFER,i?Ql._textureBuffer360:Ql._textureBuffer,this.gl.STATIC_DRAW),this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.geomBuffer),this.was360=i),this.gl.bufferData(this.gl.ARRAY_BUFFER,i?this.micrio.wasm._vertexBuffer360:this.micrio.wasm._vertexBuffer,this.gl.STATIC_DRAW),this.gl.drawArrays(this.gl.TRIANGLES,0,n)}}const rc={passive:!0},oc={passive:!0,capture:!0},ac={passive:!1};function lc(t){t.stopPropagation(),t.preventDefault()}const cc=["move","marker-open","marker-opened","marker-closed","tour-start","tour-step","tour-stop","tour-event","media-play","media-pause","splitscreen-start","splitscreen-stop"];class dc{constructor(t){this.micrio=t,this.enabled=Ht(!1),this.hooked=!1,this.hookedDrag=!1,this.panning=!1,this.pinching=!1,this.clicked=!1,this.wheeling=!1,this.controlZoom=!1,this.twoFingerPan=!1,this.pScale=1,this.wheelEndTo=-1,this.hasTouch=ie.hasTouch&&"ontouchstart"in self,this.hasUsedCtrl=!1,this.vars={drag:{prev:void 0,start:[0,0,0]},dbltap:{lastTapped:0},pinch:{image:void 0,sDst:0,wasPanning:!1},updates:{to:-1,stack:[]}},this.scrollHooked=!1,this.el=t.canvas.element,this.dStart=this.dStart.bind(this),this.dMove=this.dMove.bind(this),this.dStop=this.dStop.bind(this),this.pStart=this.pStart.bind(this),this.pMove=this.pMove.bind(this),this.pStop=this.pStop.bind(this),this.gesture=this.gesture.bind(this),this.keydown=this.keydown.bind(this),this.wheel=this.wheel.bind(this),this.wheelEnd=this.wheelEnd.bind(this),this.dbltap=this.dbltap.bind(this),this.dblclick=this.dblclick.bind(this),this.updateEvent=this.updateEvent.bind(this),this.dispatchUpdate=this.dispatchUpdate.bind(this),this.enabled.subscribe((t=>{t?this.hook():this.unhook()})),t.visible.subscribe((t=>this.visible=t)),t.current.subscribe((t=>{t&&!this.settings&&le(t.info).then((e=>{e&&(this.settings=t.$settings,!t.error&&this.settings.hookEvents&&this.enabled.set(!0))}))}))}get $enabled(){return u(this.enabled)}get isNavigating(){return this.panning||this.pinching||this.wheeling||this.clicked}dispatch(t,e){this.micrio.dispatchEvent(new CustomEvent(t,void 0!==e?{detail:e}:void 0))}getImage(t){var e;if(!this.visible)return;const i=this.micrio.offsetWidth,n=this.micrio.offsetHeight,s=Math.max(0,Math.min(1,t.x/i)),r=Math.max(0,Math.min(1,t.y/n)),o=null==(e=this.visible)?void 0:e.find((t=>!!t.opts.secondaryTo)),a=1==this.visible.length?this.visible[0]:this.visible.find((({grid:t,opts:{area:e}})=>(!o||!t)&&(!!e&&(s>=e[0]&&s<=e[2]&&r>=e[1]&&r<=e[3]))));return a&&a.opts.secondaryTo&&a.opts.isPassive&&a.opts.area&&(t.x-=a.opts.area[0]*i,t.y-=a.opts.area[1]*n),!a||a.grid||a.opts.secondaryTo&&a.opts.isPassive?this.micrio.$current:a}hook(){if(this.hooked)return;this.hooked=!0;const t=this.settings;t&&(this.twoFingerPan=!!t.twoFingerPan,this.twoFingerPan?this.micrio.setAttribute("data-can-pan",""):this.micrio.removeAttribute("data-can-pan"),(null==t?void 0:t.hookKeys)&&this.hookKeys(),t.hookDrag&&this.hookDrag(),t.noZoom||this.hookZoom(),this.hookUpdate())}unhook(){this.hooked&&(this.hooked=!1,this.unhookDrag(),this.unhookZoom(),this.unhookKeys(),this.unhookUpdate())}hookKeys(){document.addEventListener("keydown",this.keydown)}unhookKeys(){document.removeEventListener("keydown",this.keydown)}hookZoom(){const t=this.settings;this.controlZoom=!!(null==t?void 0:t.controlZoom),t&&!t.hookPinch||this.hookPinch(),(!t||t.hookScroll||this.controlZoom)&&this.hookScroll(),this.micrio.canvas.$isMobile?this.el.addEventListener("touchstart",this.dbltap):this.el.addEventListener("dblclick",this.dblclick)}unhookZoom(){this.unhookPinch(),this.unhookScroll(),this.micrio.canvas.$isMobile?this.el.removeEventListener("touchstart",this.dbltap):this.el.removeEventListener("dblclick",this.dblclick)}hookScroll(){this.scrollHooked||(this.micrio.addEventListener("wheel",this.wheel,ac),this.scrollHooked=!0)}unhookScroll(){this.micrio.removeEventListener("wheel",this.wheel,ac),this.scrollHooked=!1}hookPinch(){this.hasTouch&&this.el.addEventListener("touchstart",this.pStart,rc),ie.OSX&&(this.micrio.addEventListener("gesturestart",this.gesture,ac),this.micrio.addEventListener("gesturechange",this.gesture,ac),this.micrio.addEventListener("gestureend",this.gesture,ac))}unhookPinch(){this.el.removeEventListener("touchstart",this.pStart,rc),ie.OSX&&(this.micrio.removeEventListener("gesturestart",this.gesture,ac),this.micrio.removeEventListener("gesturechange",this.gesture,ac),this.micrio.removeEventListener("gestureend",this.gesture,ac))}hookDrag(){this.hookedDrag||(this.hookedDrag=!0,this.micrio.addEventListener("dragstart",lc),this.micrio.addEventListener("pointerdown",this.dStart,rc),this.micrio.setAttribute("data-hooked",""))}unhookDrag(){this.hookedDrag&&(this.hookedDrag=!1,this.micrio.removeEventListener("pointerdown",this.dStart,rc),this.micrio.removeEventListener("dragstart",lc),this.micrio.removeAttribute("data-hooked"))}dStart(t,e=!1){var i;if(0!=t.button||"touch"==t.pointerType&&this.twoFingerPan)return;if(!e&&t.target!=this.el)return;if((null==(i=this.micrio.$current)?void 0:i.isOmni)&&t.shiftKey)return;if(this.panning)return void(t instanceof TouchEvent&&t.touches.length>1&&this.dStop());const n=this.getImage({x:t.clientX,y:t.clientY});n&&(this.panning=!0,this.vars.drag.start=[t.clientX,t.clientY,performance.now()],this.micrio.addEventListener("pointermove",this.dMove,rc),this.micrio.addEventListener("pointerup",this.dStop,rc),this.micrio.setAttribute("data-panning",""),this.micrio.wasm.e._panStart(n.ptr),this.micrio.wasm.render(),this.dispatch("panstart"))}dMove(t){var e;const i=t.clientX,n=t.clientY,s=Zt(this.vars.drag.start[0]-t.clientX,this.vars.drag.start[1]-t.clientY);!this.capturedPointerId&&s>10&&this.micrio.setPointerCapture(this.capturedPointerId=t.pointerId),this.vars.drag.prev&&(null==(e=this.getImage({x:i,y:n}))||e.camera.pan(this.vars.drag.prev[0]-i,this.vars.drag.prev[1]-n)),this.vars.drag.prev=[i,n]}dStop(t,e=!1,i=!1){if(this.panning){if(this.panning=!1,this.vars.drag.prev=void 0,this.micrio.removeEventListener("pointermove",this.dMove,rc),this.micrio.removeEventListener("pointerup",this.dStop,rc),this.capturedPointerId&&this.micrio.releasePointerCapture(this.capturedPointerId),this.capturedPointerId=void 0,this.micrio.removeAttribute("data-panning"),t&&0==e){const e=this.getImage({x:t.clientX,y:t.clientY});e&&(this.micrio.wasm.e._panStop(e.ptr),this.micrio.wasm.render())}i||this.dispatch("panend",t?{duration:performance.now()-this.vars.drag.start[2],movedX:t.clientX-this.vars.drag.start[0],movedY:t.clientY-this.vars.drag.start[1]}:void 0)}}pStart(t){if(!(ie.hasTouch&&t instanceof TouchEvent))return;if(this.twoFingerPan&&t.touches.length<2)return;if(this.pinching||2!=t.touches.length)return void this.pStop(t);t.stopPropagation(),this.vars.pinch.wasPanning=this.panning,this.dStop(void 0,!1,!0);const e=t.touches;this.pinching=!0,self.addEventListener("touchmove",this.pMove,oc),self.addEventListener("touchend",this.pStop,oc),this.micrio.setAttribute("data-pinching",""),this.vars.pinch.image=this.getImage({x:e[0].clientX,y:e[0].clientY}),this.vars.pinch.sDst=Zt(e[0].clientX-e[1].clientX,e[0].clientY-e[1].clientY),this.pinchFactor=void 0,this.vars.pinch.image&&this.micrio.wasm.e._pinchStart(this.vars.pinch.image.ptr),this.micrio.wasm.render(),this.dispatch("pinchstart"),this.twoFingerPan&&this.dispatch("panstart")}pMove(t){if(!(ie.hasTouch&&t instanceof TouchEvent))return;const e=t.touches;if((null==e?void 0:e.length)<2)return;const i={x:e[0].clientX,y:e[0].clientY},n={x:e[1].clientX,y:e[1].clientY},s=this.vars.pinch,r=s.image;if(r){if((null==r?void 0:r.opts.secondaryTo)&&r.opts.isPassive&&r.opts.area){const t=r.opts.area[0]*this.micrio.offsetWidth,e=r.opts.area[1]*this.micrio.offsetHeight;i.x-=t,n.x-=t,i.y-=e,n.y-=e}this.pinchFactor=Zt(e[0].clientX-e[1].clientX,e[0].clientY-e[1].clientY)/s.sDst,this.micrio.wasm.e._pinch(r.ptr,i.x,i.y,n.x,n.y)}}pStop(t){this.pinching&&this.vars.pinch.image&&(this.pinching=!1,t.stopPropagation(),self.removeEventListener("touchmove",this.pMove,oc),self.removeEventListener("touchend",this.pStop,oc),this.micrio.removeAttribute("data-pinching"),this.micrio.wasm.e._pinchStop(this.vars.pinch.image.ptr,performance.now()),this.micrio.wasm.render(),this.vars.pinch.image=void 0,this.pinchFactor=void 0,this.dispatch("pinchend"),(this.twoFingerPan||this.vars.pinch.wasPanning)&&this.dispatch("panend"))}gesture(t){var e;const i=t.scale;if(1==i)return;const n=this.pScale-i;if(this.pScale=i,t.stopPropagation(),t.preventDefault(),"gesturechange"==t.type){const i=t;null==(e=this.getImage({x:i.clientX,y:i.clientY}))||e.camera.zoom(n*this.micrio.canvas.viewport.height,0,i.clientX,i.clientY)}}wheel(t,e=!1,i=0){var n;if(!(t instanceof WheelEvent))return;if(this.controlZoom&&!t.ctrlKey)return;if(!e&&t.target instanceof Element&&t.target!=this.el&&!t.target.classList.contains("marker")&&!t.target.hasAttribute("data-scroll-through"))return;let s=t.deltaY;t.ctrlKey&&(this.hasUsedCtrl=!0);const r=this.controlZoom&&10*s%1==0,o=this.hasUsedCtrl&&!r,a=ie.firefox||t.ctrlKey||!o;if(this.twoFingerPan&&(null==(n=this.micrio.$current)?void 0:n.camera.isZoomedOut()))return;t.stopPropagation(),t.preventDefault(),(ie.OSX||o)&&t.ctrlKey&&(s*=10);const l={x:t.clientX,y:t.clientY},c=this.getImage(l);if(c){if(a){const t=this.micrio.canvas.viewport;let e=0;const n=this.micrio.getBoundingClientRect();c.camera.zoom(1*s/Math.sqrt(t.scale),0,l.x-i-n.left,l.y-n.top-e)}else c.camera.pan(t.deltaX,t.deltaY);this.wheeling=!0,clearTimeout(this.wheelEndTo),this.wheelEndTo=setTimeout(this.wheelEnd,50)}}wheelEnd(){this.wheeling=!1}dbltap(t){ie.hasTouch&&t instanceof TouchEvent&&(1==t.touches.length&&Date.now()-this.vars.dbltap.lastTapped<250&&(t.stopPropagation(),t.preventDefault(),this.dblclick(t)),this.vars.dbltap.lastTapped=Date.now())}dblclick(t){var e,i;const n=t instanceof MouseEvent?t:t.touches[0];null==(i=this.getImage({x:n.clientX,y:n.clientY}))||i.camera.zoom(-300,500,n.clientX,n.clientY,1,!(null==(e=this.micrio.$current)?void 0:e.album)).catch((()=>{}))}keydown(t){var e;if(this.panning||this.pinching)return;const i=this.micrio.offsetWidth/2,n=this.micrio.offsetHeight/2;let s=0,r=0,o=!1;const a=null==(e=this.micrio.$current)?void 0:e.camera;if(a){switch(t.keyCode){case 37:s=-i,o=!0;break;case 39:s=i,o=!0;break;case 38:r=-n,o=!0;break;case 40:r=n,o=!0;break;case 32:a.zoom(t.shiftKey?200:-200,150);break;case 187:case 61:t.shiftKey&&a.zoom(-200,150);break;case 189:case 173:a.zoom(200,150);break;default:return}o&&a.pan(s,r,150)}}hookUpdate(){cc.forEach((t=>this.micrio.addEventListener(t,this.updateEvent)))}unhookUpdate(){cc.forEach((t=>this.micrio.removeEventListener(t,this.updateEvent)))}updateEvent(t){if("move"==t.type&&!this.isNavigating)return;const e=this.vars.updates.stack;e[e.length-1]!=t.type&&e.push(t.type),this.vars.updates.to<0&&(this.vars.updates.to=setTimeout(this.dispatchUpdate))}dispatchUpdate(){const t=this.vars.updates;clearTimeout(t.to),t.to=-1,t.stack.length&&(this.dispatch("update",t.stack),t.stack.length=0,t.to=setTimeout(this.dispatchUpdate,500))}}const uc=class t{constructor(t){this.micrio=t,this.isStatic=!1,this.loaded=!1,this.inited=!1,this.setting=!1,this.writeTitle=!1}hook(){this.isStatic="static"==this.micrio.getAttribute("data-router"),this.read=this.read.bind(this),this.write=this.write.bind(this),this.writeDeferred=this.writeDeferred.bind(this),le(this.micrio.current).then((()=>{this.loaded=!0,this.read()})),t.events.forEach((t=>this.micrio.addEventListener(t,this.write))),"i.micr.io"==location.hostname&&(this.writeTitle=!0),window.addEventListener(this.isStatic?"popstate":"hashchange",this.read)}unhook(){t.events.forEach((t=>this.micrio.removeEventListener(t,this.write))),window.removeEventListener(this.isStatic?"popstate":"hashchange",this.read)}findPage(t,e,i){var n,s;if(e)for(let r=0;r<e.length;r++){const o=(null==(s=null==(n=e[r])?void 0:n.i18n)?void 0:s[i])??e[r];let a=se(o.title)==t?e[r]:this.findPage(t,e[r].children,i);if(a)return a}}read(){if(!this.loaded||this.setting)return;this.route=(this.isStatic?location.pathname:location.hash).slice(1);const[t,e,i,n,s]=this.route.split("/"),r=this.micrio.$current,o=t&&(null==r?void 0:r.id)!=t?this.micrio.open(t):void 0;r&&Promise.all([le(r.data,{allowUndefined:!0}),o?le(o.data,{allowUndefined:!0}):void 0]).then((t=>{var i,a;if(!t[0])return this.inited=!0;if(void 0===this.prevLang&&(this.prevLang=this.micrio.lang),!1===(null==o?void 0:o.$settings.routerMarkerTours))return;if((null==(i=t[0].pages)?void 0:i.length)&&n){const i=this.findPage(n.toLowerCase(),t[0].pages,e);if(i)return this.micrio.state.popover.set({contentPage:i})}const l=n?s?t.map((t=>{var i;return null==(i=null==t?void 0:t.markerTours)?void 0:i.find((t=>{var i,s;return se(null==(s=null==(i=t.i18n)?void 0:i[e])?void 0:s.slug)==n}))}))[0]:t.map((t=>{var i;return null==(i=null==t?void 0:t.tours)?void 0:i.find((t=>{var i,s;return se(null==(s=null==(i=t.i18n)?void 0:i[e])?void 0:s.slug)==n}))}))[0]:void 0,c=s||!l&&n,d=c?null==(a=(t[1]??t[0]).markers)?void 0:a.find((t=>{var i,n,s;return((null==(n=null==(i=t.i18n)?void 0:i[e])?void 0:n.slug)??t.title)==c||l&&"steps"in l&&(null==(s=l.stepInfo)?void 0:s.map((t=>t.marker)).find((t=>{var i,n;return(null==(n=null==(i=t.i18n)?void 0:i[e])?void 0:n.slug)==c})))})):void 0;d&&l&&"steps"in l?l.initialStep=l.steps.findIndex((t=>t.startsWith(d.id))):(d||this.micrio.state.popup.set(void 0),(o??r).state.marker.set(d)),this.micrio.state.tour.set(l),this.writeTitle&&this.setTitle(),this.inited=!0}))}setTitle(){var t,e,i,n,s,r,o,a,l,c;const d=u(this.micrio._lang),h=this.micrio.$current;if(!h)return;const m=[(null==(i=null==(e=null==(t=h.$data)?void 0:t.i18n)?void 0:e[d])?void 0:i.title)??(null==(n=null==h?void 0:h.$info)?void 0:n.title),null==(o=null==(r=null==(s=this.micrio.state.$tour)?void 0:s.i18n)?void 0:r[d])?void 0:o.title,null==(c=null==(l=null==(a=this.micrio.state.$marker)?void 0:a.i18n)?void 0:l[d])?void 0:c.title].filter((t=>!!t)).reverse();document.title=m.join(" - ")+" | Micrio"}write(t){if(this.micrio.$current&&this.loaded&&this.inited){if("marker-open"===t.type){const t=this.micrio.state.$marker;if(t&&t.data&&t.data.micrioLink)return}clearTimeout(this._to),this._to=setTimeout((()=>this.writeDeferred("load"==t.type)),50)}}writeDeferred(t){var e,i,n,s,r,o,a,l,c;const d=this.micrio.state.$tour;let h=this.micrio.$current,m=null==h?void 0:h.state.$marker;const p=this.micrio.lang;p!=this.prevLang&&(t=!0,this.prevLang=p);const f=(null==(n=null==(i=null==(e=null==h?void 0:h.$data)?void 0:e.i18n)?void 0:i[p])?void 0:n.title)??(null==(s=null==h?void 0:h.$info)?void 0:s.title)??"",g=!1===(null==h?void 0:h.$settings.routerMarkerTours),v=m&&"string"!=typeof m?(null==(r=m.i18n)?void 0:r[p])??m:void 0,$=null==(o=u(this.micrio.state.popover))?void 0:o.contentPage,w=$?(null==(a=$.i18n)?void 0:a[p])??$:void 0;let y=null==h?void 0:h.id;if(d&&"steps"in d&&d.steps.length&&d.stepInfo){const t=d.stepInfo.find((t=>t.markerId==d.steps.find((t=>!t.includes(",")))));t&&(y=t.micrioId,h=this.micrio.wasm.images.find((t=>t.id==y)),!m&&d.initialStep&&(m=d.stepInfo[d.initialStep].marker))}const b=[y,p,se(f)??"",...g?[]:w?[se(w.title)]:[(null==(c=null==(l=null==d?void 0:d.i18n)?void 0:l[p])?void 0:c.slug)??null,(null==v?void 0:v.slug)??null]].filter((t=>!!t)).join("/");b!=this.route&&(this.setting=!0,this.isStatic?t?history.replaceState(null,"","/"+b+location.search):history.pushState(null,"","/"+b+location.search):location.hash=b,this.route=b,this.writeTitle&&this.setTitle(),setTimeout((()=>this.setting=!1),250))}};uc.events=["load","tour-start","tour-stop","marker-open","marker-closed","page-open","page-closed","lang-switch"];let hc=uc;const mc=class t{constructor(t){this.micrio=t,this.gtag=window.gtag,this.hooked=!1,this.tag=this.tag.bind(this)}hook(){!this.hooked&&this.gtag&&(this.hooked=!0,this.tag(new CustomEvent("init")),t.events.forEach((t=>this.micrio.addEventListener(t,this.tag))))}unhook(){this.hooked&&(this.hooked=!1,this.tag(new CustomEvent("hide")),t.events.forEach((t=>this.micrio.removeEventListener(t,this.tag))))}tag(t){const e=t.detail,i=this.micrio.$current,n={event_category:"Micrio",event_action:t.type};this.micrio.lang&&(n.culture=this.micrio.lang),"init"==t.type&&(n.micrio_version=Number(Ia)),"load"==t.type&&(null==i?void 0:i.$info)&&(n.image_version=i.$info.version);const s=null!==e&&"object"==typeof e&&"currentStep"in e?e.currentStep:null;null!=s&&(n.event_value=s);const r=e&&e.title?e.title:i&&i.$info&&i.$info.title;n.event_label=this.micrio.id+(r?" - "+r:""),this.gtag("event",t.type,n)}};mc.events=["load","show","hide","marker-open","marker-opened","marker-closed","tour-start","tour-stop","tour-step","tour-ended"];let pc=mc;const fc=t=>Math.round(1e5*t)/1e5,gc=class t{constructor(e,i){var n;this.micrio=e,this.image=i,this.images=[],this.current=[],this._grid=document.createElement("div"),this._buttons=new Map,this.clickable=!1,this.focussed=Ht(),this.markersShown=Ht([]),this.history=[],this.depth=Ht(0),this.aniDurationIn=1.5,this.aniDurationOut=.5,this.transitionDelay=.5,this.isHorizontal=!1,this.cellSizes=new Map,this.nextSize=new Map,this.timingFunction="ease",this.getString=(e,i={})=>{var n;return t.getString(e,{view:i.view,area:i.area,size:i.size??this.nextSize.get(e.id),cultures:null==(n="cultures"in e&&e.cultures?e.cultures:"")?void 0:n.replace(/,/g,"-")})},this.tourEvent=this.tourEvent.bind(this),this.updateGrid=this.updateGrid.bind(this);const s=i.$settings;this.clickable=!!s.gridClickable,void 0!==s.gridTransitionDuration&&(this.aniDurationIn=this.aniDurationOut=s.gridTransitionDuration),void 0!==s.gridTransitionDurationOut&&(this.aniDurationOut=s.gridTransitionDurationOut),this._grid.className="micrio-grid",this.set(null==(n=i.$info)?void 0:n.grid);const r=()=>vt().then((()=>{this.hook(),e.events.dispatch("grid-load")}));i.isV5||e._lang.subscribe((t=>{t?Promise.all(this.images.filter((e=>{var i;return(e.$info&&"cultures"in e.$info&&(null==(i=e.$info)?void 0:i.cultures)||"").indexOf(t)>=0})).map((t=>le(t.data)))).then(r):r()})),e.events.dispatch("grid-init",this)}get $focussed(){return u(this.focussed)}hook(){if(this.micrio.state.marker.subscribe((t=>{var e,i;if(t&&"string"!=typeof t){const n=null==(e=t.data)?void 0:e._meta;if(null==n?void 0:n.gridSize){const e="number"==typeof n.gridSize?[n.gridSize,n.gridSize]:n.gridSize.split(",").map(Number),s=null==(i=this.images.find((e=>{var i,n;return null==(n=null==(i=e.$data)?void 0:i.markers)?void 0:n.find((e=>e==t))})))?void 0:i.id;s&&this.nextSize.set(s,e)}vt().then((()=>{var t;const e=null==(t=null==n?void 0:n.gridAction)?void 0:t.split("|");(null==e?void 0:e.length)&&"string"==typeof e[0]&&this.action(e.shift(),e.join("|"))}))}})),this.clickable){this._grid.addEventListener("click",(t=>{const e=t.target.dataset.id;e&&this.focus(this.images.find((t=>t.id==e)))}));const t=t=>{t?this.removeGrid():this.placeGrid()};this.micrio.state.tour.subscribe(t),this.micrio.state.marker.subscribe(t),this.focussed.subscribe(t)}this.micrio.addEventListener("tour-event",this.tourEvent),this.micrio.addEventListener("serialtour-pause",(()=>this.images.forEach((t=>t.camera.pause())))),this.micrio.addEventListener("serialtour-play",(()=>this.images.forEach((t=>t.camera.resume()))))}clearTimeouts(){clearTimeout(this._to),clearTimeout(this._fadeTo)}set(t="",e={}){return this.lastPromise=new Promise(((i,n)=>{var s,r,o;null==(r=null==(s=this.image.$info)?void 0:s.settings)||delete r.focus,this.lastAction=void 0,!1===e.cover&&e.coverLimit&&(e.coverLimit=!1),e.coverLimit&&null==e.cover&&(e.cover=e.coverLimit),"string"!=typeof t&&(t=t.map((t=>t instanceof ja?{image:t}:t)).filter((t=>!!t.image.$info)).map((t=>this.getString(t.image.$info,t))).join(";"));const a=t.split(";").filter((t=>!!t)).map((t=>this.getImage(t))),l=this.$focussed,c=null==(o=e.transition)?void 0:o.endsWith("-delayed"),d="behind-delayed"==e.transition;switch(e.transition){case"crossfade":e.duration=0;break;case"behind":case"behind-delayed":const t=!0===e.coverLimit;e.forceAni=!0,e.coverLimit=t,e.forceAreaAni=!0;const i=c?1/a.length:1;let n=0;this.images.forEach((e=>{e.camera.setCoverLimit(t),a.find((t=>t.id==e.id))&&(e.camera.setArea([0,0,(null==l?void 0:l.id)==e.id?1:i,1],{noDispatch:!0,direct:!0}),e!=l&&e.camera.setView([0,0,1,1]),c&&this.micrio.wasm.e._setZIndex(e.ptr,a.length-n++))})),a.forEach((t=>t.view=[0,0,1,1]))}const u=this.image.ptr>=0,h=e.duration??(e.noHistory?this.aniDurationOut:this.aniDurationIn),m=this.nextCrossFadeDuration??this.image.$settings.crossfadeDuration??1,p=(h||this.aniDurationIn)/(d?2:1);if(this.nextCrossFadeDuration=void 0,u){const t=this.micrio.wasm.getPtr();this.micrio.wasm.e.setGridTransitionDuration(t,h),this.micrio.wasm.e.setCrossfadeDuration(t,p)}const f=!e.noBlur&&l;let g,v;f&&this.blur(),!e.noHistory&&this.current.length&&this.depth.set(this.history.push({layout:this.current.map((t=>this.getString(t.$info,{view:t.state.$view,size:this.cellSizes.get(t.id)}))).join(";"),horizontal:this.isHorizontal,view:this.image.camera.getView()})),this.isHorizontal=!!e.horizontal,this.removeImages(this.images.filter((t=>!a.find((e=>e.id==t.id))))),this.printGrid(a,{horizontal:e.horizontal,keepGrid:e.keepGrid,scale:e.scale,columns:e.columns}),this.clearTimeouts();let $=!1;const w=()=>{clearTimeout(g),clearTimeout(v),$||n()};u&&!e.noCamAni&&(e.view?this.image.camera.flyToView(e.view,{duration:1e3*h}).catch(w):this.image.camera.flyToFullView({duration:1e3*h}).catch(w)),this.nextSize.clear(),null==e.coverLimit&&(e.coverLimit=!0),e.coverLimit||a.forEach((t=>{var i;return null==(i=this.images.find((e=>e.id==t.id)))?void 0:i.camera.setCoverLimit(!!e.coverLimit)}));const y="appear-delayed"==e.transition,b=t=>t*this.transitionDelay+(t>0&&y?h:0);this.current=a.map(((t,i)=>this.placeImage(t,{duration:!e.forceAni&&f&&t.id!=l.id?0:h,delay:c?b(i):0,noCamAni:!!(y&&i>0)||!!e.noCamAni,forceAreaAni:!(y&&i>0)&&e.forceAreaAni,cover:e.cover}))),y&&this.current.slice(1).forEach((t=>this.micrio.wasm.e._fadeTo(t.ptr,.9999,!0)));const k=()=>this.current.forEach(((t,e)=>te(c?1e3*(b(e)+(d?h/2:0)):0).then((()=>this.micrio.wasm.e._fadeIn(t.ptr))))),T=()=>{this.clearTimeouts(),requestAnimationFrame((()=>this.micrio.wasm.e.setCrossfadeDuration(this.micrio.wasm.getPtr(),m))),c&&this.images.forEach((t=>this.micrio.wasm.e._setZIndex(t.ptr,0))),e.coverLimit&&a.forEach((t=>{var i;return null==(i=this.images.find((e=>e.id==t.id)))?void 0:i.camera.setCoverLimit(!!e.coverLimit)})),this.clickable&&this.placeGrid(),this.lastAction=void 0,$=!0,i(this.current)};h||p?(e.noFade||(this._fadeTo=v=setTimeout(k,Math.max(0,h/2))),this._to=g=setTimeout(T,1e3*(Math.max(p,h)+(c?(a.length-1)*this.transitionDelay:0)))):(e.noFade||k(),T())}))}hasChanged(){return this.current.map((t=>t.id)).join(",")!=this.images.map((t=>t.id)).join(",")}getImage(t){var e,i;const n=t.split("|"),s=n[0].split(","),r=n[1]?n[1].split(",").map(Number):[1];let o=0,a=0;return{path:null==(e=this.image.$info)?void 0:e.path,id:s[0],width:o=Number(s[1])||o,height:a=Number(s[2])||a,isDeepZoom:"d"==s[3],isPng:"p"==s[4],isWebP:"w"==s[4],size:r,view:s[5]?s[5].split("/").map(Number):void 0,area:s[6]?s[6].split("/").map(Number):void 0,settings:ne(this.image.$settings||{},{focus:s[7]?s[7].split("-").map(Number):null}),cultures:(null==(i=s[8])?void 0:i.replace(/\-/g,","))||void 0}}getCols(t,e){let i=Math.ceil(e/Math.ceil(Math.sqrt(e)));if(t==e){const e=Math.floor(Math.sqrt(t)),n=[];for(let s=e;s<i+e;s++)t%s||n.push(s);n.length&&(i=n[Math.floor(n.length/2)])}return i}printGrid(t,e){var i;e.keepGrid||this.removeGrid();const n=t.reduce(((t,e)=>t+e.size.reduce(((t,e)=>e*t),1)),0),s=e.columns??(e.horizontal?t.length:this.getCols(t.length,n));this._grid.style.gridTemplateColumns=`repeat(${s}, auto)`,this._grid.textContent="",this._grid.style.removeProperty("--translate"),this._grid.style.removeProperty("--scale"),t.forEach((t=>{if(!t.id)return;this._buttons.has(t.id)||this._buttons.set(t.id,document.createElement("button"));const e=this._buttons.get(t.id);"1"!=t.size.toString()?(e.style.gridArea=`auto / auto / span ${t.size[1]} / span ${t.size[0]||t.size[1]}`,this.cellSizes.set(t.id,t.size)):(e.style.removeProperty("grid-area"),this.cellSizes.delete(t.id)),e.dataset.id=t.id,this._grid.appendChild(e)})),e.keepGrid&&this._grid.parentNode||this.micrio.insertBefore(this._grid,(null==(i=this.micrio.firstChild)?void 0:i.nextSibling)??null),this.micrio.events.dispatch("grid-layout-set",this);const r=this.micrio.offsetWidth,o=this.micrio.offsetHeight,a=Math.max(0,Math.min(1,1-(e.scale??1)));this._grid.style.transform="",this._grid.childNodes.forEach((e=>{if(!e)return;const i=e,n=i.dataset.id,s=i.getBoundingClientRect(),l=t.find((t=>t.id==n)),c=[a/2*s.width,a/2*s.height];l&&!l.area&&(l.area=[(s.x+c[0])/r,(s.y+c[1])/o,(s.x+s.width-c[0])/r,(s.y+s.height-c[1])/o])})),e.keepGrid||this._grid.remove()}placeGrid(){var t;!this.clickable||this.micrio.state.$tour||this.micrio.state.$marker||this._grid.parentNode||(this.micrio.insertBefore(this._grid,(null==(t=this.micrio.firstChild)?void 0:t.nextSibling)??null),this.viewUnsub=this.image.state.view.subscribe(this.updateGrid))}removeGrid(){this._grid.parentNode&&(this.viewUnsub&&this.viewUnsub(),this._grid.remove())}updateGrid(){const t=this.image.camera.getXY(0,0,!0);this._grid.style.setProperty("--translate",`translate3d(${t[0]}px, ${t[1]}px, 0)`),this._grid.style.setProperty("--scale",this.image.camera.getScale().toString()),this._grid.dispatchEvent(new CustomEvent("update"))}placeImage(t,e){let i=this.images.find((e=>e.id==t.id));i&&t.area?te(1e3*e.delay).then((()=>{i.camera.setArea(t.area,{direct:0==e.duration||!e.forceAreaAni&&!u(i.visible)}),e.delay&&this.micrio.wasm.render()})):(t.lang=this.micrio.lang,this.micrio.wasm.addChild(i=new ja(this.micrio.wasm,t,{area:t.area}),this.image),this.images.push(i));const n={duration:1e3*e.duration,timingFunction:this.timingFunction,limit:!1};if(!e.noCamAni&&!i.camera.aniDone&&i.ptr>0){const s=!!e.cover||i.camera.getCoverLimit();if(t.view||!s)i.camera.flyToView(t.view??[0,0,1,1],n).catch((()=>{}));else if(t.area&&t.width&&t.height){const e=(t.area[2]-t.area[0])*this.micrio.offsetWidth/((t.area[3]-t.area[1])*this.micrio.offsetHeight);i.camera.flyToView(e<t.width/t.height?[.5,0,.5,1]:[0,.5,1,.5],n).catch((()=>{}))}else i.camera.flyToCoverView(n).catch((()=>{}))}return i}removeImages(t){t.forEach((t=>{t.ptr>=0&&this.micrio.wasm.e._fadeOut(t.ptr)})),this.micrio.wasm.render()}insideGrid(){const t=this.micrio.$current;return t==this.image||!!this.images.find((e=>e==t))}async reset(t,e,i){var n,s;const r=this.history[0];return this.images.forEach((t=>t.camera.stop())),this.image.camera.stop(),this.markersShown.set([]),await vt(),i||e||!(null==(n=this.micrio.camera)?void 0:n.isZoomedOut())||this.micrio.state.$tour||this.$focussed||this.hasChanged()||(t=0),this.set((null==r?void 0:r.layout)||(null==(s=this.image.$info)?void 0:s.grid),{noHistory:!0,duration:t,noCamAni:e,forceAni:i,horizontal:!!r&&r.horizontal}).then((t=>(this.depth.set(this.history.length=0),this.micrio.current.set(this.image),t)))}switchToGrid(){const t=this.$focussed;if(!t)return;const e=t.camera.getView();e&&this.reset(0,!0).then((()=>{t.opts.area&&this.image.camera.setView(t.opts.area,{noLimit:!0}),t.camera.setView(e,{noLimit:!0}),this.micrio.current.set(this.image)}))}async flyToMarkers(t,e,i){const n=null==t?void 0:t.split("|").map((t=>t.trim())),s=(null==n?void 0:n[0])??"",r=s?this.images.filter((t=>{var e,i;return!!(null==(i=null==(e=t.$data)?void 0:e.markers)?void 0:i.find((t=>t.tags.includes(s))))})):this.images;return this.set(r.map((t=>{var e,n;const r=null==(n=null==(e=t.$data)?void 0:e.markers)?void 0:n.find((t=>t.tags.indexOf(s)>=0));return this.getString(t.$info,{view:i||null==r?void 0:r.view})})).join(";"),{duration:e,horizontal:"h"==(null==n?void 0:n[1])})}async back(t){const e=this.history.pop();if(!e)return;this.depth.set(this.history.length),this.micrio.current.set(this.image);this.$focussed&&this.blur(),await this.set(e.layout,{duration:t,noHistory:!0,horizontal:e.horizontal,view:e.view})}setTimingFunction(t){const e=this.micrio.wasm.getPtr();this.micrio.wasm.e.setGridTransitionTimingFunction(e,Ra.Camera.TimingFunction[this.timingFunction=t])}async focus(t,e={}){var i;if(!t)return this.back();e.coverLimit&&(e.cover=!0);const n=!e.view&&!e.cover,s=this.micrio;u(s.visible).find((t=>t==this.image))||s.current.set(this.image);const r=this.$focussed;if(r==t)return;!(null==(i=e.transition)?void 0:i.startsWith("slide-"))&&(0==e.duration||r&&!s.wasm.e._areaAnimating(r.ptr)&&!this.current.find((e=>e==t)))&&t.camera.setArea([0,0,1,1],{noDispatch:!0,direct:!0}),r&&this.blur(),t.camera.setCoverLimit(!!e.cover),this.setTimingFunction("ease");const o=await this.transition(t,r,this.getString(t.$info,{view:e.view}),e);return s.wasm.e._setZIndex(t.ptr,3),this.focussed.set(t),u(t.visible)||"crossfade"!=e.transition&&e.transition||(e.duration=0),this.set(o,{noBlur:!0,duration:e.duration,forceAreaAni:"crossfade"!=e.transition,cover:!!e.cover,coverLimit:!!e.coverLimit}).then((()=>{s.events.dispatch("grid-focus",t);const e=t.$info;this.removeGrid(),s.$current!=t&&s.current.set(t);const i=s.offsetWidth/s.offsetHeight,r=(1-e.width/e.height/i)/2;!t.camera.aniDone&&n&&t.camera.flyToFullView({duration:1e3*this.aniDurationIn}).catch((()=>{})),this.image.camera.setLimit([r,0,1-r,1])})).catch((()=>{}))}async transition(t,e,i,{duration:n,view:s,transition:r,noViewAni:o,exitView:a,blur:l,cover:c}){if(!r)return i;if("crossfade"==r&&(t.camera.setArea([0,0,1,1]),o=!0),s&&o&&t.camera.setView(s,{noRender:!0,noLimit:!0}),!e||"crossfade"==r)return i;const d=r.startsWith("slide")||r.startsWith("swipe"),u=r.startsWith("behind"),h=d?r.endsWith("-up")?0:r.endsWith("-down")?180:r.endsWith("-left")?270:90:void 0;if((d||u)&&this.micrio.wasm.e._fadeTo(t.ptr,.9999,!0),r.startsWith("slide"))t.camera.setArea(0==h?[0,-.5,1,0]:180==h?[0,1,1,1.5]:270==h?[-.5,0,0,1]:[1,0,1.5,1],{noDispatch:!0,direct:!0});else if(r.startsWith("swipe"))t.camera.setArea(0==h?[0,-1,1,0]:180==h?[0,1,1,2]:270==h?[-1,0,0,1]:[1,0,2,1],{noDispatch:!0,direct:!0}),i=[this.getString(e.$info,{view:a??e.camera.getView(),area:0==h?[0,1,1,2]:180==h?[0,-1,1,0]:270==h?[1,0,2,1]:[-1,0,0,1]}),this.getString(t.$info,{view:s,area:[0,0,1,1]})].join(";");else if(u){t.camera.setArea([0,0,1,1]),t.camera.setView([0,0,1,1]);const i=[this.getString(e.$info,{view:[0,0,1,1]}),this.getString(t.$info,{view:[0,0,1,1]})];"behind-left"==r&&i.reverse(),await this.set(i.join(";"),{noBlur:!0,horizontal:!0,coverLimit:c}).then((()=>te(200)))}if(l&&!isNaN(l)&&l>0){const t=(n=n??this.nextCrossFadeDuration??this.aniDurationIn)/2,e=this.micrio.canvas.element.style;e.transition=`filter ${t}s ease`,e.filter=`blur(${l}px)`,setTimeout((()=>{e.filter="",setTimeout((()=>e.transform=""),1e3*t)}),1e3*t)}return i}blur(){const t=this.$focussed;t&&(this.micrio.wasm.e._setZIndex(t.ptr,2),this.micrio.events.dispatch("grid-blur"),this.focussed.set(void 0),this.image.camera.setLimit([0,0,1,1]),this.micrio.current.set(this.image))}tourEvent(t){var e;const i=t.detail;i&&(null==(e=i.action)?void 0:e.startsWith("grid:"))&&i.active&&this.action(i.action.slice(5),i.data,i.end-i.start)}action(t,e,i){"string"==typeof t&&(t=Ra.Grid.GridActionType[t]);const n=t+(e??"");if(this.lastAction!=n){switch(t){case Ra.Grid.GridActionType.focus:const t=null==e?void 0:e.split("|").map((t=>t.trim())),n=(null==t?void 0:t[0])??"",s=null==n?void 0:n.split(",").map((t=>this.images.find((e=>e.id==(null==t?void 0:t.trim()))))).filter((t=>void 0!==t));1==s.length?this.focus(s[0],{duration:i}):s.length>0&&this.set(s.map((t=>this.getString(t.$info))).join(";"),{duration:i,horizontal:"h"==(null==t?void 0:t[1])});break;case Ra.Grid.GridActionType.flyTo:const r=null==e?void 0:e.split(",").map((t=>this.current.find((e=>e.id==(null==t?void 0:t.trim())))));(null==r?void 0:r.length)?this.image.camera.flyToView([Math.min(...r.map((t=>{var e;return(null==(e=null==t?void 0:t.opts.area)?void 0:e[0])??0}))),Math.min(...r.map((t=>{var e;return(null==(e=null==t?void 0:t.opts.area)?void 0:e[1])??0}))),Math.max(...r.map((t=>{var e;return(null==(e=null==t?void 0:t.opts.area)?void 0:e[2])??1}))),Math.max(...r.map((t=>{var e;return(null==(e=null==t?void 0:t.opts.area)?void 0:e[3])??1})))],{duration:i?1e3*i:void 0}).catch((()=>{})):console.warn("Given image IDs gave no current displayed images",event);break;case Ra.Grid.GridActionType.focusTagged:this.flyToMarkers(e,i);break;case Ra.Grid.GridActionType.focusWithTagged:this.flyToMarkers(e,i,!0);break;case Ra.Grid.GridActionType.reset:this.reset(i);break;case Ra.Grid.GridActionType.back:this.back(i);break;case Ra.Grid.GridActionType.switchToGrid:this.switchToGrid();break;case Ra.Grid.GridActionType.nextFadeDuration:this.nextCrossFadeDuration=Number(e);break;case Ra.Grid.GridActionType.filterTourImages:le(this.micrio.state.tour).then((t=>{if(!t)return;if(!("steps"in t)||!t.stepInfo)return;const n=t.stepInfo.map((t=>t.micrioId)),s=n.filter(((t,e)=>n.indexOf(t)==e)).map((t=>this.images.find((e=>e.id==t)))).filter((t=>!!t)).map((t=>this.getString(t.$info))).join(";");s&&this.set(s,{duration:i,horizontal:"h"==e})}));break;default:console.warn("Warning: unknown grid tour event",event)}this.lastAction=n}}async enlarge(t,e,i=e){var n;return this.set(((null==(n=this.history[this.history.length-1])?void 0:n.layout)||this.image.$info.grid).split(";").map(((n,s)=>`${n}|${s==t?`${e},${i}`:1}`)).join(";"),{noHistory:!0,keepGrid:!0,duration:500})}getRelativeView(t,e){const i=t.opts.area??[0,0,1,1],n=i[2]-i[0],s=i[3]-i[1];return[i[0]+n*e[0],i[1]+s*e[1],i[0]+n*e[2],i[1]+s*e[3]]}};gc.getString=(t,e)=>{var i,n,s,r;return[t.id,t.width,t.height,t.isDeepZoom?"d":"",t.isPng?"p":t.isWebP?"w":"",null==(i=e.view)?void 0:i.map(fc).join("/"),null==(n=e.area)?void 0:n.map(fc).join("/"),null==(r=null==(s=t.settings)?void 0:s.focus)?void 0:r.map(fc).join("-"),e.cultures].join(",").replace(/,+$/,"")+(e.size?`|${e.size.join(",")}`:"")};let vc=gc;class $c{constructor(t){this.micrio=t,this.element=document.createElement("canvas"),this.resizing=!1,this.hasPerspective=!1,this.viewport={width:0,height:0,left:0,top:0,ratio:0,scale:0,portrait:!1},this.isMobile=Ht(!1),this.getRatio=(t=(t=>null==(t=this.micrio.$current)?void 0:t.$settings)()??{})=>!ie.iOS&&!(null==t?void 0:t.noRetina)&&self.devicePixelRatio&&Math.max(1,Math.min(2,self.devicePixelRatio))||1,this.onresize=this.onresize.bind(this),self.ResizeObserver&&(this.resizeObserver=new self.ResizeObserver(this.onresize)),this.element.className="micrio"}get $isMobile(){return u(this.isMobile)}place(){if(this.element.parentNode)return;const t=this.micrio.querySelector("img.preview");this.micrio.insertBefore(this.element,t?t.nextSibling:this.micrio.firstChild)}hook(){this.onresize(),this.resizeObserver?this.resizeObserver.observe(this.element):window.addEventListener("resize",this.onresize)}unhook(){this.resizeObserver?this.resizeObserver.unobserve(this.element):window.removeEventListener("resize",this.onresize)}onresize(){var t,e,i;const n=this.element.getBoundingClientRect();(null==(t=this.micrio.$current)?void 0:t.is360)&&(this.hasPerspective=!0);let s=n.width,r=n.height;if(!s||!r)return;const o=self.getComputedStyle(this.element),a=parseFloat(o.width);isNaN(a)||(r=parseFloat(o.height)*s/Math.max(1,a));const l=this.micrio.hasAttribute("data-static")?1:Math.floor(s)/this.micrio.offsetWidth;s/=l,r/=l;const c=1!=l?1:this.getRatio(),d=this.viewport;d.width==s&&d.height==r&&d.ratio==c&&d.scale==l||(this.hasPerspective&&(this.micrio.style.perspective=r/2+"px"),d.width=s,d.height=r,d.ratio=c,d.scale=l,d.top=n.top,d.left=n.left,d.portrait=null==(e=window.matchMedia("(orientation: portrait)"))?void 0:e.matches,this.resizing=!0,this.element.width=s*c,this.element.height=r*c,this.micrio.webgl.gl.viewport(0,0,d.width*d.ratio,d.height*d.ratio),null==(i=this.micrio.webgl.postpocessor)||i.resize(),this.micrio.wasm.resize(d),this.resizing=!1,this.micrio.events.dispatch("resize",n),setTimeout((()=>this.isMobile.set(/mobile/i.test(navigator.userAgent))),10))}setMargins(t,e){this.micrio.wasm.e.setArea(this.micrio.wasm.getPtr(),t,e)}}const wc=class t extends HTMLElement{constructor(){super(),this.printed=!1,this.canvases=[],this.current=Ht(),this.visible=Ht([]),this.canvas=new $c(this),this.events=new dc(this),this.state=new Wa.Main(this),this.analytics=new pc(this),this._router=new hc(this),this.barebone=Ht(!1),this.webgl=new sc(this),this.wasm=new Ql(this),this.defaultSettings=this.defaultSettings,this.loading=Ht(!0),this.switching=Ht(!1),this.isMuted=Ht("1"==localStorage.getItem(za)),this._lang=Ht(),this.keepRendering=!1,this.loadV5Album=(t,e)=>(t=>"MICRIO_ALBUM"in self?Promise.resolve(self.MICRIO_ALBUM):ue(`https://i.micr.io/album/${t}.json`))(t).then((t=>{var i;if(!t)return;const n=t.id+"."+t.revision,s=e.path=(null==(i=t.organisation)?void 0:i.baseUrl)??Pa;return e.organisation=t.organisation,e.settings.album=t,e.settings.gallery={archive:n,sort:t.sort,type:t.type,startId:e.id,isSpreads:t.isSpreads,coverPages:t.coverPages,revisions:t.published},delete e.id,this.loadArchiveBin(s,n).then((()=>this.loadGallery(e,s,!0)))}),(t=>this.printError((null==t?void 0:t.message)||t))),this.getArchiveIndex=async(t,e=La)=>Ga.get(`${e}${t}.json`).then((t=>(t.images.forEach((t=>ce.set(`${e}${t.id}/info.json`,t))),t))),this.current.subscribe((t=>this._current=t)),le(this.loading,{targetValue:!1}).then((()=>{this.setAttribute("data-loaded",""),this.switching.subscribe((t=>{t?this.setAttribute("data-switching",""):(vt().then((()=>this.events.dispatch("show",this))),this.removeAttribute("data-switching"))}));const t=this.querySelector("img.preview");t&&setTimeout((()=>t.remove()),500)}))}static get observedAttributes(){return["id","muted","data-grid","data-limited","lang"]}get $current(){return this._current}get camera(){var t;return null==(t=this._current)?void 0:t.camera}attributeChangedCallback(t,e,i){var n,s,r,o;switch(t){case"id":if(!this.isConnected||!i)return;this.printed?this.open(i):this.print();break;case"muted":this.isMuted.set(null!==i);break;case"data-grid":this.printed?null==(s=null==(n=this.$current)?void 0:n.grid)||s.set(i):this.print();break;case"data-limited":(null==(r=this.wasm)?void 0:r._vertexBuffer)&&(null==(o=this.$current)?void 0:o.ptr)&&this.wasm.e._setLimited(this.$current.ptr,!!i);break;case"lang":let t=u(this._lang);t!=i&&(this._lang.set(i),Oe.set(De[i]??De.en),i&&(nn.indexOf(i)>=0?this.setAttribute("dir","rtl"):this.removeAttribute("dir")),t&&this.events.dispatch("lang-switch",i))}}connectedCallback(){this.canvas.place(),(this.hasAttribute("data-router")||this.hasAttribute("data-space"))&&"false"!=this.getAttribute("data-router")&&this._router.hook(),!this.id&&!this.hasAttribute("data-gallery")||this.printed||this.print(),"muted"in this||(Object.defineProperty(this,"muted",{get(){return u(this.isMuted)},set(t){t?this.setAttribute("muted",""):this.removeAttribute("muted")}}),this.isMuted.subscribe((t=>{this.muted=t,t?(localStorage.setItem(za,"1"),this.events.dispatch("audio-mute")):(localStorage.removeItem(za),this.events.dispatch("audio-unmute"))})))}destroy(){var t;this.current.set(void 0),this._router.unhook(),this.events.enabled.set(!1),this.canvas.unhook(),this.analytics.unhook(),this.wasm.unbind(),this._ui&&(null==(t=this._ui)||t.$destroy()),delete this._ui,this.printed=!1}loadArchiveBin(t,e){return this.printUI(!0,!0),Ga.load(t,"g/"+e,(t=>{var e;return null==(e=this._ui)?void 0:e.$set({loadingProgress:t})}))}async print(){var t,e,i,n;if(this.printed)return;this.printed=!0,await vt();const s=this.getOptions();if(s.settings||(s.settings={}),s.settings.noControls&&this.state.ui.controls.set(!1),null==(t=s.settings.gallery)?void 0:t.archive){const t=null==(e=s.settings.gallery)?void 0:e.archive,i=/\.\d+$/.test(t),n=s.path||(be(t.replace(/\.\d+$/,""))?Pa:La);i&&await this.loadArchiveBin(n,t),s.settings.gallery.startId=s.id,s.grid?await this.setGrid(s,n):await this.loadGallery(s,n,i),i||delete s.settings.gallery.archive,s.path||(s.path=n),delete s.id}else(null==(i=s.id)?void 0:i.startsWith("album/"))?await this.loadV5Album(s.id.replace("album/",""),s):s.id&&be(s.id)&&!this.hasAttribute("width")&&!this.hasAttribute("height")&&await me(s.id,s.forceInfoPath?s.path:void 0,null==(n=s.settings)?void 0:n.forceDataRefresh).then((t=>(null==t?void 0:t.albumId)?this.loadV5Album(t.albumId,s):void 0));this.keepRendering=!!s.settings.keepRendering;const r=s.id||s.gallery||s.grid;if(this.events.dispatch("print",s),void 0!==s.settings.lazyload&&"IntersectionObserver"in window){const t=new IntersectionObserver((e=>{e[0]&&e[0].isIntersecting&&(t.unobserve(this),r&&this.open(s))}),{rootMargin:100*s.settings.lazyload+"% 0px"});t.observe(this)}else r&&requestAnimationFrame((()=>this.open(s)))}printUI(e,i){this._ui?this._ui.$set({noLogo:i,noHTML:e}):this._ui=new t.Svelte({target:this,props:{micrio:this,noHTML:e,noLogo:i}})}printError(t){var e;null==(e=this._ui)||e.$set({error:t??"An unknown error has occurred"})}open(t,e={}){var i,n,s,r;this.printed||this.print();const o="string"==typeof t,a=this.getOptions();let l=o?{...a,id:t}:t;if(this.$current&&l.id==(null==(i=this.$current)?void 0:i.id))return this.$current;l.settings||(l.settings={}),(null==(s=null==(n=a.settings)?void 0:n.gallery)?void 0:s.archive)&&(/\.\d+$/.test(a.settings.gallery.archive)||delete a.settings.gallery.archive),o||ne(a.settings,l.settings),this.defaultSettings&&ne(this.defaultSettings,l.settings),e.splitScreen||e.gridView||!this.$current||this.switching.set(!0),l.settings.noGTag||this.analytics.hook(),this.printed=!0,this.printUI(!!l.settings.noUI,!!l.settings.noLogo);let c=this.canvases.find((t=>l.id&&t.id==l.id)),d=!1;const u=null==(r=this.canvases[0])?void 0:r.grid;if(!c&&u){const t=l.id?u.images.find((t=>t.id==l.id)):void 0;d=!!t,c=l.id?t:this.canvases[0],d&&!u.insideGrid()&&this.current.set(this.canvases[0])}if(!c){if(this.canvases.length){const t=this.canvases[0];l.path=t.dataPath,l.lang=this.lang}this.canvases.push(c=new ja(this.wasm,l,e.splitScreen?{secondaryTo:e.splitTo??this._current,isPassive:e.isPassive}:void 0));const t=this.state.value&&this.state.value.c.find((t=>t[0]==l.id));t&&c.state.set(t)}e.startView&&(c.state.view.set(l.settings.view=e.startView),c.ptr&&c.camera.e&&c.camera.setView(l.settings.view,{noRender:!0})),this.lang||(this.lang="en");const h=()=>{var t,i,n,s;c&&(le(c.info).then((t=>{var i;if(t&&c){if(!this.webgl.gl)switch(this.webgl.init(),this.canvas.hook(),null==(i=t.settings)?void 0:i.theme){case"light":this.setAttribute("data-light-mode","");break;case"os":this.setAttribute("data-auto-scheme","")}t.grid&&!c.grid&&(c.grid=new vc(this,c)),vt().then((()=>this.dispatchEvent(new CustomEvent("load",{detail:c})))),e.splitScreen&&vt().then((()=>{c&&((null==u?void 0:u.image.camera.aniDone)?u.image.camera.aniDoneAdd.push((()=>null==c?void 0:c.splitStart())):c.splitStart())}))}})),this.wasm.e.set360Orientation(this.wasm.getPtr(),(null==(t=e.vector)?void 0:t.direction)??0,(null==(i=e.vector)?void 0:i.distanceX)??0,(null==(n=e.vector)?void 0:n.distanceY)??0),this.wasm.preventDirectionSet=!e.vector,!d||e.gridView&&(null==u?void 0:u.current.find((t=>t.id==l.id)))?e.splitScreen?this.wasm.setCanvas(c):this.current.set(c):null==u||u.focus(c,{view:null==(s=l.settings)?void 0:s.view}).then((()=>this.current.set(c))))};return this.wasm.ready?h():this.wasm.load().then(h),c.noImage&&this.loading.set(!1),c}close(t){t.opts.secondaryTo?t.splitEnd():this.wasm.removeCanvas(t)}getOptions(){const t={gallery:{}},e={settings:t,id:this.id},i=(t,e,i)=>{const n=e.split(".");for(let s=0;s<n.length-1;s++)t=t[n[s]];t[n[n.length-1]]=i};for(const n in Oa.STRINGS){const s=Oa.STRINGS[n],r=this.getAttribute(n),o=s.f||n.replace("data-","");r&&i(s.r?e:t,o,r)}for(const n in Oa.BOOLEANS){const s=Oa.BOOLEANS[n],r=this.getAttribute(n),o=s.f||n.replace("data-",""),a=null!=r&&""==r||"true"==r;(a||"false"==r)&&i(s.r?e:t,o,s.n?!a:!!a)}for(const n in Oa.NUMBERS){const s=Oa.NUMBERS[n],r=s.f||n.replace("data-","");let o=this.getAttribute(n);void 0!==s.dN&&null==o&&(o=s.dN),null==o||isNaN(Number(o))||i(s.r?e:t,r,Number(o))}for(const n in Oa.ARRAYS){const s=Oa.ARRAYS[n],r=this.getAttribute(n),o=s.f||n.replace("data-","");null!=r&&i(s.r?e:t,o,r.split(",").map((t=>Number(t))))}return t.static&&(t.noUI=t.skipMeta=!0,t.hookEvents=!1),e.settings&&e.grid&&e.grid.indexOf(".")>0&&(e.settings.gallery.archive=e.grid),e}async loadGallery(t,e,i){var n;let s=null==(n=t.settings)?void 0:n.gallery,r=null==s?void 0:s.archive;if(!s||!r)return;const o=t.settings;if(i){const t=await this.getArchiveIndex(r.split(".")[0],e);s.archiveLayerOffset=t.delta,r=t.images.sort("name"==s.sort?(t,e)=>t.title&&e.title?t.title<e.title?-1:t.title>e.title?1:0:0:"-name"==s.sort?(t,e)=>t.title&&e.title?t.title<e.title?1:t.title>e.title?-1:0:0:"-created"==s.sort?(t,e)=>t.created&&e.created?t.created<e.created?1:t.created>e.created?-1:0:0:(t,e)=>t.created&&e.created?t.created<e.created?-1:t.created>e.created?1:0:0).map((t=>`${t.id},${t.width},${t.height},${t.isDeepZoom?"d":""},${t.isPng?"p":t.isWebP?"w":""},${t.tileSize||""}`.replace(/\,+$/,""))).join(";")}const a=r.split(";").map((t=>t.trim()));if(!i){const t=a.filter((t=>t.startsWith("http"))).map((t=>ue(t)));t.length&&await Promise.all(t).then((t=>t.forEach(((t,e)=>{t&&(a[e]=`${t["@id"]},${t.width},${t.height}`)}))))}const l=a.map((t=>t.split(",").map((t=>isNaN(t)?t:Number(t)))));l.forEach(((t,e)=>{e>0&&!t[2]&&t.push(...l[e-1].slice(1))}));const c=t.height=Math.max(...l.map((t=>t[2])));s.type||(s.type="swipe");const d="switch"==s.type||"swipe-full"==s.type||"omni"==s.type,u=s.isSpreads,h=u&&!d?Math.round(l[0][1]/20):0,m=u?s.coverPages??0:0,p=t.width=d?Math.max(...l.map((t=>t[1]*(u?2:1)))):l.reduce(((t,e)=>t+e[1]+h),0);let f=0;t.gallery=l.map(((t,i)=>{var n;return new ja(this.wasm,{id:t[0],path:e,width:t[1],height:t[2],isDeepZoom:"d"==t[3],isPng:"p"==t[4],isWebP:"w"==t[4],tileSize:t[5]||1024,revision:null==(n=null==s?void 0:s.revisions)?void 0:n[t[0]],settings:{skipMeta:!0,gallery:s}},{isEmbed:d,useParentCamera:d,area:d?u?i-m<0||i==l.length-1&&(i-m)%2==0?[.25,0,.75,1]:(i-m)%2==0?[0,0,.5,1]:[.5,0,1,1]:[0,0,1,1]:[(f+=i>0&&(i<m||(i-m)%2==0)?h:0)/p,(c-t[2])/2/c,(f+=t[1])/p,((c-t[2])/2+t[2])/c]})})),o.pinchZoomOutLimit=!0,t.gallery.length&&(o.view=t.gallery[Math.max(0,t.gallery.findIndex((t=>t.id==s.startId)))].opts.area)}async setGrid(t,e){var i;t.settings&&t.grid&&((null==(i=t.settings.gallery)?void 0:i.archive)==t.grid&&(t.grid=(this.gridInfoData=await this.getArchiveIndex(t.grid.split(".")[0],e)).images.map((t=>vc.getString(t,{cultures:"cultures"in t?t.cultures.join("-"):void 0}))).join(";")),t.width=this.offsetWidth*this.canvas.getRatio(),t.height=this.offsetHeight*this.canvas.getRatio(),t.settings.zoomLimit=15,t.settings.minimap=!1,t.settings.initType="cover",this.removeAttribute("data-grid"))}};wc.jsonCache=ce;let yc=wc;yc.Svelte=class extends Yt{constructor(t){super(),Gt(this,t,Rl,zl,a,{micrio:35,noHTML:0,noLogo:36,loadingProgress:1,error:2},null,[-1,-1,-1])}},yc.VERSION=Ia,customElements.define("micr-io",yc),console.log("%c◈%c Micrio %cv5.2.1 - https://micr.io/","color: #00d4ee","color: #c5ff5b","color: inherit")}();
25
25
  })(`html{--micrio-color: #fff;--micrio-color-hover: #45A4E4;--micrio-border-radius: 4px;--micrio-background: rgba(41,41,41,.75);--micrio-background-filter: blur(8px);--micrio-popover-background: rgba(41,41,41,.75);--micrio-icon-size: 18px;--micrio-text-align: left;--micrio-line-height: 1.5em;--micrio-border-margin: 16px;--micrio-button-size: 48px;--micrio-button-shadow: 0 4px 8px rgba(0,0,0,.33);--micrio-marker-size: 16px;--micrio-marker-text-color: #fff;--micrio-marker-text-shadow: 0px 2px 4px rgba(0,0,0,.6);--micrio-marker-highlight: #00d4ee;--micrio-marker-color: #fff;--micrio-marker-border-radius: 100%;--micrio-marker-border-color: rgba(255,255,255,.2);--micrio-marker-border-size: 8px;--micrio-marker-icon: none;--micrio-marker-transition: background-color .25s ease, opacity .15s ease, border-width .15s ease, width .15s ease, height .15s ease;--micrio-popup-shadow: 0 8px 16px rgba(0,0,0,.33);--micrio-popup-padding: 16px;--micrio-progress-bar-background: rgba(255,255,255,.25);--micrio-progress-bar-height: 4px;--micrio-waypoint-size: 120px}micr-io[data-light-mode]{--micrio-color: #000;--micrio-color-hover: #196DA6;--micrio-background: rgba(255,255,255,.66);--micrio-progress-bar-background: rgba(0,0,0,.25);--micrio-popover-background: rgba(41,41,41,.75)}@media (prefers-color-scheme: light){micr-io[data-auto-scheme]{--micrio-color: #000;--micrio-color-hover: #196DA6;--micrio-background: rgba(255,255,255,.66);--micrio-progress-bar-background: rgba(0,0,0,.25)}}@media (max-width: 500px){html{--micrio-border-margin: 5px;--micrio-button-size: 48px}}micr-io{display:block;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;overflow:hidden;position:relative;width:100%;height:100%;min-height:200px;backface-visibility:hidden;-webkit-backface-visibility:hidden;background-repeat:no-repeat;background-position:center center;background-size:contain;container-type:size}micr-io,micr-io button{font-family:var(--micrio-font-family, inherit);font-size:var(--micrio-font-size, inherit);background-color:var(--micrio-background-color, transparent)}micr-io h3{font-weight:600}micr-io[dir=rtl]{--micrio-text-align: right}canvas.micrio{display:block;position:absolute;top:0;left:0;width:100%!important;height:100%!important;backface-visibility:hidden;user-select:none;-webkit-touch-callout:none;-webkit-user-select:none}micr-io:not([static]){overscroll-behavior:none}micr-io[data-hooked]:not([data-panning])>canvas.micrio{cursor:move;cursor:-webkit-grab;cursor:-moz-grab;cursor:-ms-grab;cursor:grab;-ms-content-zooming:none;-ms-touch-action:none;touch-action:none}micr-io[data-panning]{cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:-ms-grabbing;cursor:grabbing}micr-io[data-hooked][data-can-pan]>canvas.micrio{-ms-touch-action:pan-y;touch-action:pan-y;overscroll-behavior:initial}micr-io>.micrio-grid{position:absolute;top:0;left:0;width:100%;height:100%;display:grid;grid-auto-flow:row dense;grid-gap:0;will-change:transform;transform-origin:left top;--translate: none;--scale: 1;transform:var(--translate) scale3d(var(--scale),var(--scale),1)}micr-io>.micrio-grid>button{background:transparent;border:none;padding:0;margin:0;cursor:pointer;grid-area:auto / auto / span 1 / span 1}a.micrio-logo{position:absolute;top:calc(var(--micrio-border-margin) * 2);left:calc(var(--micrio-border-margin) * 2);width:22px;height:22px;transition:transform .25s ease;z-index:2;display:block}a.micrio-logo:hover{transform:rotate3d(0,0,1,-90deg)}a.micrio-logo:before,a.micrio-logo:after{display:block;content:"";position:absolute;transform:rotate3d(0,0,1,45deg);will-change:transform;box-sizing:unset}a.micrio-logo:before{border:3px solid #00d4ee;width:16px;height:16px}a.loading.micrio-logo:before{animation:micrio-logo-spin 1s infinite ease-out}a.micrio-logo:after{top:8px;left:8px;width:6px;height:6px;background:#c5ff5b;outline:1px solid #c5ff5b}a.loading.micrio-logo:after{animation:micrio-logo-spin .5s infinite ease-out}@keyframes micrio-logo-spin{0%{transform:rotate3d(0,0,1,45deg)}to{transform:rotate3d(0,0,1,135deg)}}a.micrio-logo-org{position:absolute;top:calc(var(--micrio-border-margin) * 2);right:calc(var(--micrio-border-margin) * 2);z-index:1}img.micrio-logo-org{max-height:64px}.svelte-fa-base{height:1em;overflow:visible;transform-origin:center;vertical-align:-.125em}.svelte-fa-fw{text-align:center;width:1.25em}.svelte-fa-pull-left.micrio-fa{float:left}.svelte-fa-pull-right.micrio-fa{float:right}.svelte-fa-size-lg.micrio-fa{font-size:1.33333em;line-height:.75em;vertical-align:-.225em}.svelte-fa-size-sm.micrio-fa{font-size:.875em}.svelte-fa-size-xs.micrio-fa{font-size:.75em}.spin.micrio-fa{animation:micrio-fa-spin 2s 0s infinite linear}.pulse.micrio-fa{animation:micrio-fa-spin 1s infinite steps(8)}@keyframes micrio-fa-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.svelte-fa-layers.micrio-fa-_layers{display:inline-block;position:relative}.svelte-fa-layers.micrio-fa-_layers .svelte-fa{position:absolute;bottom:0;left:0;right:0;top:0;margin:auto;text-align:center}.svelte-fa-layers.micrio-fa-_layers .svelte-fa-layers-text{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.svelte-fa-layers.micrio-fa-_layers .svelte-fa-layers-text span{display:inline-block}.svelte-fa-pull-left.micrio-fa-_layers{float:left}.svelte-fa-pull-right.micrio-fa-_layers{float:right}.svelte-fa-size-lg.micrio-fa-_layers{font-size:1.33333em;line-height:.75em;vertical-align:-.225em}.svelte-fa-size-sm.micrio-fa-_layers{font-size:.875em}.svelte-fa-size-xs.micrio-fa-_layers{font-size:.75em}.container.micrio-fa-_layers-_text{display:inline-block;height:auto}.svelte-fa-size-lg.micrio-fa-_layers-_text{font-size:1.33333em;line-height:.75em;vertical-align:-.225em}.svelte-fa-size-sm.micrio-fa-_layers-_text{font-size:.875em}.svelte-fa-size-xs.micrio-fa-_layers-_text{font-size:.75em}menu.micrio-menu{padding:0;margin:0;transition:background .2s ease,box-shadow .2s ease}.micrio-menu-action.micrio-menu{font-family:inherit;background:transparent;display:block;border:none;padding:0 24px;font-size:.9em;cursor:pointer;text-decoration:none;border-radius:0;color:inherit;text-shadow:inherit;box-sizing:border-box;text-align:center}@media (max-width: 500px){menu.micrio-menu{font-size:1em}.micrio-menu-action.micrio-menu{width:100%;margin-bottom:10px;padding:6px 0}strong.micrio-menu>svg{display:none}.items>menu.micrio-menu>.micrio-menu-action.micrio-menu{font-size:1em}menu.micrio-toolbar>menu.micrio-menu>.micrio-menu-action.micrio-menu{font-size:1.5em;border-bottom:1px solid rgba(255,255,255,.5);margin-top:24px}}@media (min-width: 501px){div.items.micrio-menu{max-height:calc(100vh - 160px);overflow-y:auto;overflow-x:hidden}menu.micrio-toolbar>menu.micrio-menu{color:#fff;margin-right:var(--micrio-border-margin);border-radius:var(--micrio-border-radius);overflow:hidden}menu.micrio-toolbar>menu.micrio-menu:hover,menu.micrio-toolbar>menu.micrio-menu:focus-within{-webkit-backdrop-filter:var(--micrio-background-filter);backdrop-filter:var(--micrio-background-filter);background:var(--micrio-background);box-shadow:var(--micrio-button-shadow)}menu.micrio-toolbar>menu.micrio-menu>.micrio-menu-action.micrio-menu{position:relative}menu.micrio-toolbar>menu.micrio-menu>.micrio-menu-action.micrio-menu>strong.micrio-menu{padding:5px;margin:0 -5px}menu.micrio-toolbar>menu.micrio-menu:hover .micrio-menu-action.micrio-menu,menu.micrio-toolbar>menu.micrio-menu:focus-within .micrio-menu-action.micrio-menu{text-shadow:none;color:var(--micrio-color)}strong.micrio-menu>svg{margin-left:10px;line-height:2px}menu.micrio-menu{float:left}menu.micrio-menu:not(:focus-within):not(:hover) .items.micrio-menu{display:none}.micrio-menu-action.micrio-menu{height:var(--micrio-button-size);line-height:var(--micrio-button-size);width:100%;text-align:var(--micrio-text-align);white-space:pre;font-weight:600}.items menu.micrio-menu{float:none}.items .micrio-menu-action.micrio-menu{width:100%}.micrio-menu-action.micrio-menu:hover{text-shadow:none!important}.micrio-menu-action.micrio-menu:hover{color:var(--micrio-color-hover)!important}}.micrio-button{margin:0;padding:0 8px;cursor:pointer;box-sizing:border-box;display:inline-block;vertical-align:bottom;transition:opacity .25s ease;font:inherit;font-size:90%;position:relative;touch-action:none;color:var(--micrio-color);background:var(--micrio-button-background, var(--micrio-background, none)) var(--background, none) center center no-repeat;background-size:24px;min-width:var(--micrio-button-size);height:var(--micrio-button-size);line-height:var(--micrio-button-size);border:none;border-radius:var(--micrio-border-radius);box-shadow:var(--micrio-button-shadow);-webkit-backdrop-filter:var(--micrio-background-filter);backdrop-filter:var(--micrio-background-filter);text-decoration:none}.micrio-button:hover{outline:none}.micrio-button.transparent.micrio-button,.micrio-button.transparent.micrio-button:hover{background-color:transparent;-webkit-backdrop-filter:none;backdrop-filter:none}.micrio-button>*{transition:opacity .25s ease}.micrio-button:disabled{pointer-events:none}.micrio-button:disabled>*{opacity:.4}.micrio-button.no-click.micrio-button{pointer-events:none}img.micrio-button{display:block;margin:0 auto;pointer-events:none}.micrio-button>*{height:var(--micrio-icon-size)!important;width:var(--micrio-icon-size);font-size:var(--micrio-icon-size);fill:var(--micrio-color);display:block;margin:0 auto}.micrio-button.active.micrio-button{color:var(--micrio-color-hover)}.micrio-button.active.micrio-button svg{fill:var(--micrio-color-hover)}@media (hover: hover){.micrio-button:hover{background-color:var(--micrio-button-background-hover, var(--micrio-button-background, var(--micrio-background)));color:var(--micrio-color-hover)}.micrio-button:hover svg{fill:var(--micrio-color-hover);stroke:var(--micrio-color-hover)}.micrio-button:focus{outline:1px solid var(--micrio-color-hover)}}menu.micrio-toolbar{position:absolute;top:calc(var(--micrio-border-margin) - (var(--micrio-button-size) / 2 - 27px));left:var(--micrio-border-margin);margin:0;padding:0;color:#fff;text-shadow:1px 1px 2px #000;transition:transform .25s ease;z-index:1}@media (max-width: 500px){.micrio-button.toggle{position:absolute;top:var(--micrio-border-margin);left:0;height:34px;width:34px;box-shadow:none;z-index:2}.micrio-button.toggle.indent{left:35px}menu.micrio-toolbar{transform:translateZ(0);width:100%;height:100%;background:#000000bf;top:0;left:0;padding:32px 0;overflow-y:auto;overflow-x:hidden;box-sizing:border-box;-webkit-backdrop-filter:var(--micrio-background-filter);backdrop-filter:var(--micrio-background-filter);z-index:1}menu.micrio-toolbar:not(.shown){transform:translate3d(calc(-100% - var(--micrio-border-margin) * 2),0,0)}}@media (min-width: 501px){menu.indent.micrio-toolbar{margin-left:calc(var(--micrio-border-margin) * 2 + 25px)}menu.micrio-toolbar>.micrio-menu:not(:hover)>button.micrio-menu{margin-bottom:-15px}}canvas.micrio-minimap{position:absolute;bottom:var(--micrio-border-margin);right:5px;transform-origin:right bottom;display:block;background-size:100%;transition:opacity .2s ease;cursor:move;cursor:-webkit-grab;cursor:-moz-grab;cursor:-ms-grab;cursor:grab;-ms-content-zooming:none;-ms-touch-action:none;touch-action:none;border-radius:var(--micrio-border-radius)}canvas:not(:hover).hidden.micrio-minimap{opacity:0;pointer-events:none}canvas.dragging.micrio-minimap{cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:-ms-grabbing;cursor:grabbing}canvas.controls.micrio-minimap{right:calc(var(--micrio-border-margin) + var(--micrio-button-size) + 8px)}@media (max-width: 800px){canvas.micrio-minimap{transform:scale3d(.5,.5,1);pointer-events:none;right:65px}}div.micrio-button-group{box-shadow:var(--micrio-button-shadow);border-radius:var(--micrio-border-radius);-webkit-backdrop-filter:var(--micrio-background-filter);backdrop-filter:var(--micrio-background-filter);background:var(--micrio-button-background, var(--micrio-background, none))}div.micrio-button-group:empty{display:none}div.micrio-button-group>.micrio-button{display:block;box-shadow:none;--micrio-background-filter:none;--micrio-button-background:none}div.micrio-button-group .micrio-button{border-radius:0}div.micrio-button-group .micrio-button:first-child{border-radius:var(--micrio-border-radius) var(--micrio-border-radius) 0 0}div.micrio-button-group .micrio-button:last-child{border-radius:0 0 var(--micrio-border-radius) var(--micrio-border-radius)}@media (max-width: 500px){div.micrio-button-group>*{height:calc(var(--micrio-button-size) - 4px)}div.micrio-button-group .micrio-button:first-child{padding-top:0}div.micrio-button-group .micrio-button:last-child{padding-bottom:0}}aside.micrio-controls{position:absolute;right:var(--micrio-border-margin);bottom:var(--micrio-border-margin);padding:0;margin:0;transition:transform .5s ease,opacity .5s ease;direction:rtl}aside.primary.micrio-controls:not(.portrait){right:calc(50% + var(--micrio-border-margin))}aside.primary.portrait.micrio-controls{bottom:calc(50% + var(--micrio-border-margin))}micr-io[data-switching]>aside.micrio-controls,micr-io[data-tour-active]>aside.micrio-controls{opacity:0;pointer-events:none}aside.micrio-controls>menu,aside.micrio-controls>button{padding:0;margin:8px 0;display:block;width:var(--micrio-button-size)}menu.popout.micrio-controls{padding:0;width:var(--micrio-button-size);height:var(--micrio-button-size);white-space:pre;direction:rtl;pointer-events:none;box-shadow:var(--micrio-button-shadow);border-radius:var(--micrio-border-radius);-webkit-backdrop-filter:var(--micrio-background-filter);backdrop-filter:var(--micrio-background-filter)}menu.popout.micrio-controls:focus-within{pointer-events:all}menu.popout.micrio-controls button{pointer-events:all;transition:border-radius .2s ease,opacity .2s ease;--micrio-button-shadow:none;--micrio-background-filter:none}menu.popout.micrio-controls:hover>button:first-child{border-radius:0 var(--micrio-border-radius) var(--micrio-border-radius) 0}menu.popout.micrio-controls>*:not(:nth-child(1)){display:inline-block;padding:0;transition:opacity .2s ease;border-radius:0}menu.popout.micrio-controls>button:last-child{border-radius:var(--micrio-border-radius) 0 0 var(--micrio-border-radius)}menu.popout.micrio-controls:not(:focus-within)>*:not(:nth-child(1)){pointer-events:none;opacity:0}menu.popout.micrio-controls>*:nth-child(4){background-size:24px}div.micrio-subtitles{position:absolute;bottom:50px;left:50vw;left:50cqw;transform:translate3d(-50%,0,0);text-align:center;color:#fff;width:100vw;width:100cqw;pointer-events:none;transition:transform .2s ease}div.raised.micrio-subtitles{transform:translate3d(-50%,calc(-1 * var(--micrio-button-size)),0)}div.micrio-subtitles p.micrio-subtitles{margin:.5em 0;background-color:#0009;padding:0 14px;-webkit-box-decoration-break:clone;box-decoration-break:clone;white-space:pre-wrap;display:inline;text-shadow:2px 2px 1px #0005;font-size:2.5em;line-height:inherit}@media (max-width: 640px){div.micrio-subtitles{width:95vw;width:95cqw;font-size:.7em}}div.container.micrio-progress-bar{display:flex;width:auto;color:var(--micrio-color);background:var(--micrio-background);line-height:8px;flex:1;align-items:center;cursor:default}div.bars.micrio-progress-bar{flex:1;display:flex;height:var(--micrio-progress-bar-height);background:var(--micrio-progress-bar-background);position:relative}div.bars.micrio-progress-bar>*{height:100%;width:100%;display:block;box-sizing:border-box;position:relative;overflow:hidden;cursor:pointer}div.bars.micrio-progress-bar>*:before{display:block;position:absolute;content:" ";background:var(--micrio-color);height:100%;pointer-events:none;width:var(--perc, 0);will-change:width}div.bars.micrio-progress-bar:after{content:"";position:absolute;display:block;width:16px;height:16px;left:var(--progress);top:50%;transform:translate3d(-50%,-50%,0);background-color:var(--micrio-color);pointer-events:none;border-radius:8px}div.time.micrio-progress-bar{display:block;font-size:90%;min-width:50px;text-align:center;padding:0 10px}aside.micrio-media-controls{cursor:default;position:relative;display:flex;align-items:center;margin:0;background:var(--micrio-background)}aside.micrio-media-controls>button{border-radius:0;margin:0;border:none}aside.micrio-media-controls>button:last-child{margin-right:16px}aside.micrio-media-controls>*{--micrio-button-background:none;--micrio-background-filter:none;--micrio-button-shadow:none}:fullscreen>aside.micrio-media-controls{position:absolute;bottom:5px;left:50%;transform:translate(-50%);width:430px;max-width:90vw;max-width:90cqw}svg.micrio-media-controls{pointer-events:none;position:absolute;left:-1px;top:-1px;width:42px;height:42px;transform:rotate(-90deg)}circle.micrio-media-controls{stroke-width:2;stroke:#fff;fill:transparent;stroke-dasharray:119.4 119.4;transition:stroke-dashoffset .25s linear;transform-origin:center center}figure.micrio-media{display:block;margin:0;width:100%}figure.micrio-media div.micrio-media{cursor:pointer}figure.micrio-media div.videotour.micrio-media{display:flex}figure.micrio-media:fullscreen div.micrio-media{width:100vw;height:100vh;display:flex;flex-direction:column}figure.micrio-media:fullscreen div.micrio-media>:first-child{flex:1}.marker-popup>figure.micrio-media>div.micrio-media{width:100%}iframe.micrio-media,video.micrio-media{display:block;max-width:unset}figure.is360.micrio-media{position:absolute;bottom:5px;width:360px;left:50%;transform:translate(-50%)}figure.is360.micrio-media video.micrio-media{display:none;width:200px;height:200px}iframe.hooked.micrio-media{pointer-events:none}figcaption.micrio-media{font-style:italic;margin:.5em 1em;text-align:center;font-size:90%;color:var(--micrio-color)}:not(.micrio-popover)>figure.micrio-media>figcaption.micrio-media>*{margin:0}.micrio-popover figure.micrio-media{margin:0}aside.micrio-media{width:100%;display:flex}aside.inside.micrio-media{position:absolute;transform:translateY(-100%)}figure.paused>aside.inside.micrio-media{display:none}div.show-play.micrio-media{position:fixed;top:0;left:0;width:100%;height:100%;cursor:pointer;background:#0008;display:flex;align-items:center;justify-content:center}div.show-play.micrio-media>button.micrio-button{transform:scale(2)}figure.micrio-media:not(.media-micrio) button.micrio-button{margin:0;border:none;border-radius:0;white-space:pre;--micrio-background-filter:none;--micrio-button-shadow:none}figure.media-micrio.micrio-media{text-align:var(--micrio-text-align)}article.micrio-article{text-align:var(--micrio-text-align);line-height:var(--micrio-line-height, 1.5em)}article.micrio-article>*:first-child{margin-top:0}article.micrio-article>*:last-child{margin-bottom:0}article.micrio-article p a{color:var(--micrio-color-hover, inherit);word-wrap:break-word}main.micrio-marker-content{position:relative;padding:var(--micrio-popup-padding);padding-bottom:0;overflow-y:auto;-webkit-user-select:text;user-select:text;color:var(--micrio-color);background:var(--micrio-background);-webkit-backdrop-filter:var(--micrio-background-filter);backdrop-filter:var(--micrio-background-filter);box-shadow:var(--micrio-popup-shadow);border-radius:var(--micrio-border-radius);box-sizing:border-box;text-align:var(--micrio-text-align)}main.micrio-marker-content>*{--micrio-button-background:none;--micrio-background-filter:none;--micrio-button-shadow:none}main.micrio-marker-content .micrio-progress-bar.container{background:transparent;-webkit-backdrop-filter:none;backdrop-filter:none}main.micrio-marker-content::-webkit-scrollbar{background-color:transparent;width:10px}main.micrio-marker-content::-webkit-scrollbar-thumb{background:var(--micrio-color);border-radius:var(--micrio-border-radius);margin-top:10px}main.empty.micrio-marker-content{width:auto}main.micrio-marker-content h1.micrio-marker-content{font-size:1.5em;font-weight:600;margin:0 0 1.25em}main.micrio-marker-content>figure.micrio-media{margin:calc(-1 * var(--micrio-popup-padding));margin-bottom:0;width:auto}main.micrio-marker-content>figure.micrio-media:not(.media-video):not(:last-child)>*:last-child:not(figcaption){margin-bottom:var(--micrio-popup-padding);background:var(--micrio-background);padding:0 var(--micrio-popup-padding)}main.micrio-marker-content>figure.micrio-media.media-video{margin-bottom:var(--micrio-popup-padding)}main.micrio-marker-content>figure.micrio-media>div>aside.micrio-media{--micrio-background:transparent}main.micrio-marker-content>article:last-child{margin-bottom:var(--micrio-popup-padding)}main.micrio-marker-content p{white-space:pre-line}main.micrio-marker-content figure.hidden{display:none}main.micrio-marker-content figure>div.micrio-media>*:first-child{width:100%}button.micrio-marker-content{padding:0;margin:0 calc(-1 * var(--micrio-popup-padding)) var(--micrio-popup-padding) calc(-1 * var(--micrio-popup-padding))}figcaption.micrio-marker-content{padding:10px;font-style:italic;font-size:.9em;margin-bottom:var(--micrio-popup-padding);text-align:center}section.micrio-marker-content{display:grid;grid-template-columns:repeat(3,auto);column-gap:5px;row-gap:5px;justify-items:center}section.micrio-marker-content button.micrio-marker-content{color:inherit;border:none;display:block;width:100%;cursor:pointer}section.micrio-marker-content figure.micrio-marker-content{padding:0;margin:0}section.micrio-marker-content img.micrio-marker-content{width:100%;display:block;object-fit:cover}div.micrio-marker-popup{display:block;cursor:auto;pointer-events:all;position:absolute;top:var(--micrio-border-margin);left:var(--micrio-border-margin)}div.destroying.micrio-marker-popup{pointer-events:none}div.micrio-marker-popup>main{max-height:80cqh}aside.micrio-marker-popup{padding:var(--micrio-border-margin)}aside.micrio-marker-popup progress.micrio-marker-popup{display:none}@media (min-width: 501px){div.micrio-marker-popup{width:440px;min-width:20%}aside.micrio-marker-popup{position:absolute;left:100%;top:0;padding-top:0}aside.micrio-marker-popup>.micrio-button{padding:0;margin:0 0 8px;display:block}}@media (max-width: 500px){aside.micrio-marker-popup{position:relative;padding:0;display:flex;flex-direction:row-reverse;margin-bottom:var(--micrio-border-margin)}aside.micrio-marker-popup progress.micrio-marker-popup{display:block;flex:1;opacity:0;pointer-events:none}aside.micrio-marker-popup .micrio-tour-controls{margin-bottom:0!important;display:flex}aside.micrio-marker-popup .micrio-button{display:block!important;height:var(--micrio-button-size);padding:0!important}div.micrio-marker-popup{top:var(--micrio-border-margin);right:var(--micrio-border-margin);left:var(--micrio-border-margin)}div.micrio-marker-popup>main{max-height:calc(100cqh - var(--micrio-button-size) - 3 * var(--micrio-border-margin));box-sizing:border-box}}div.micrio-marker-popup>main>*:not(h3){transition-property:margin-top,margin-bottom,height,opacity;transition-duration:.5s;transition-timing-function:ease;overflow:hidden}div.minimized.micrio-marker-popup>main>*:not(h3){margin-top:0;margin-bottom:0;opacity:0}button.tour-step.micrio-marker-popup{height:auto;line-height:normal;vertical-align:middle}ol.micrio-serial-tour{position:absolute;left:0;bottom:75px;color:var(--micrio-color);text-shadow:var(--micrio-marker-text-shadow);list-style-type:decimal-leading-zero;margin:0}ol.micrio-serial-tour>li.micrio-serial-tour{height:1.5em;white-space:pre;transition:height .25s ease,opacity .25s .25s ease}ol.micrio-serial-tour li.active.micrio-serial-tour{font-weight:700}.minimized>ol.micrio-serial-tour>li.micrio-serial-tour:not(.active){height:0em;opacity:0;transition:height .25s .25s ease,opacity .25s ease}ol.micrio-serial-tour li button.micrio-serial-tour{font:inherit;background:none;border:none;display:inline;color:inherit;text-shadow:inherit;cursor:pointer}ol.micrio-serial-tour li button.micrio-serial-tour:hover{text-decoration:underline}aside.micrio-media-controls.micrio-serial-tour>figure.micrio-media{display:none}div.micrio-tour{position:absolute;bottom:var(--micrio-border-margin);left:50%;max-width:calc(100% - var(--micrio-border-margin) * 2);transform:translate(-50%);box-sizing:border-box;display:flex;border-radius:var(--micrio-border-radius);box-shadow:var(--micrio-button-shadow);-webkit-backdrop-filter:var(--micrio-background-filter);backdrop-filter:var(--micrio-background-filter);background-color:var(--micrio-button-background, var(--micrio-background, none));padding:0;transition:transform .2s ease}div:not(:hover).minimized.micrio-tour{transform:translate3d(-50%,calc(100% + var(--micrio-border-margin)),0);pointer-events:none}.serial-tour.micrio-tour>*{--micrio-background:none}.serial-tour.minimized.micrio-tour{transform:translate3d(0,calc(100% + var(--micrio-border-margin)),0)}.serial-tour.micrio-tour,.video-tour.micrio-tour{width:500px}div.micrio-tour>*{--micrio-button-background:none}div.micrio-tour button{margin:0;border:none;border-radius:0;white-space:pre;--micrio-background-filter:none;--micrio-button-shadow:none}article.scroll-tour.micrio-tour{position:absolute;top:0;left:0;width:100%;height:100%;overflow-x:hidden;overflow-y:scroll}button.micrio-button.scroll-tour-end{position:absolute;top:5px;right:5px}article.micrio-tour>div.micrio-marker-popup{margin:20vh 50px 50vh;margin:20cqh 50px 50cqh;display:flex}article.micrio-tour>div.micrio-marker-popup:nth-child(odd){justify-content:right}div.micrio-dial{position:absolute;bottom:var(--micrio-border-margin);width:320px;max-width:calc(100vw - calc(2 * (var(--micrio-button-size) + 4 * var(--micrio-border-margin))));left:50%;transform:translate(-50%);height:calc(var(--micrio-button-size) * .6);touch-action:none;background-color:transparent;cursor:w-resize}div.micrio-dial:before,div.micrio-dial:after{content:"";display:block;width:100%;position:absolute;background-position:var(--micrio-dial-offset, 0px)}div.micrio-dial:before{height:50%;top:25%;background-image:repeating-linear-gradient(to right,#8888 0%,#8888 .5%,transparent 1%,transparent 2.5%)}div.micrio-dial:after{height:100%;background-image:repeating-linear-gradient(to right,#fff8 0%,#fff8 .5%,transparent 1%,transparent 20%)}span.micrio-dial{position:absolute;display:block;bottom:0;line-height:calc(var(--micrio-button-size) * .6);left:50%;transform:translate(calc(-50% + 5px));color:var(--micrio-color);opacity:.85;pointer-events:none;text-shadow:1px 1px 3px #000,-1px -1px 3px #000}ul.micrio-gallery{position:absolute;bottom:var(--micrio-border-margin);left:50%;transform:translate(-50%);display:flex;list-style-type:none;background:var(--micrio-background);border-radius:var(--micrio-border-radius);padding:0 16px;margin:0;color:var(--micrio-color);transition:opacity .25s ease;max-width:calc(100vw - 50px);max-width:calc(100cqw - 50px);width:520px;touch-action:none}@media (max-width: 500px){ul.micrio-gallery{left:5px;right:52px;width:auto;transform:none}div.hidden.micrio-gallery>ul.micrio-gallery{transition-delay:.25s}}li.micrio-gallery{flex:1;transition:none;padding:0;line-height:var(--micrio-button-size);font-size:32px;text-align:center;width:0;transition:opacity .25s ease;opacity:.25;display:block;height:48px;position:relative}li.active.micrio-gallery{transition-duration:0s;opacity:1}li.micrio-gallery>button.micrio-gallery{border:none;color:inherit;cursor:pointer;position:absolute;left:50%;transform:translate3d(-50%,0,0);height:48px;width:100%;min-width:48px;pointer-events:none}li.hover.micrio-gallery>button.micrio-gallery{pointer-events:all}@media (hover: hover){li.hover.micrio-gallery{transition-duration:0s;opacity:1}}button.micrio-gallery:not(.bullet){position:absolute;width:var(--micrio-button-size);height:var(--micrio-button-size);box-sizing:border-box;background:#eee3;border:none;border-radius:var(--micrio-border-radius);touch-action:none;transition:left .15s ease,background-color .2s ease;transform:translate(-50%)}ul.micrio-gallery>button.micrio-gallery{top:0;left:0;cursor:ew-resize}button.angular.micrio-gallery{bottom:42px;left:50%;color:#444;font-size:32px;line-height:42px;padding:0;cursor:move}button.micrio-gallery:not(.bullet):hover{background:#eee8}button:not(.bullet).dragging.micrio-gallery{transition:none}div.micrio-gallery{display:contents;transition:opacity .5s ease}div.hidden.micrio-gallery:not(:hover)>*,div.micrio-gallery>button.gallery-btn:disabled{opacity:0;pointer-events:none}div.micrio-gallery>button.gallery-btn{position:absolute;top:50%;transform:translateY(-50%)}div.micrio-gallery>button.gallery-btn.arrow-left{left:var(--micrio-border-margin)}div.micrio-gallery>button.gallery-btn.arrow-right{right:var(--micrio-border-margin)}details.micrio-details{position:absolute;bottom:var(--micrio-border-margin);left:var(--micrio-border-margin);padding:var(--micrio-popup-padding);font-size:.9em;max-width:410px;-webkit-user-select:text;user-select:text;white-space:normal;transition:all .5s ease;box-sizing:border-box;transition:transform .5s ease;color:var(--micrio-color);background:var(--micrio-background);-webkit-backdrop-filter:var(--micrio-background-filter);backdrop-filter:var(--micrio-background-filter);box-shadow:var(--micrio-popup-shadow);border-radius:var(--micrio-border-radius)}details.micrio-details summary.micrio-details{cursor:pointer}details.micrio-details small.micrio-details{display:block;font-style:italic;font-weight:400}details.micrio-details>.micrio-details{margin:0;overflow:hidden;text-overflow:ellipsis}details.micrio-details a{color:#23b9f5}details.micrio-details button{position:absolute;top:0;left:calc(100% + 8px)}@media (max-width: 600px){details.micrio-details{max-width:calc(100% - 10px)}details.micrio-details:not([open]) cite.micrio-details{display:none}details.micrio-details:not([open]) summary.micrio-details::marker{content:"?";font-size:20px;font-weight:700;line-height:20px}details.micrio-details button{position:absolute;top:auto;left:auto;right:0;bottom:calc(100% + 8px)}}div.micrio-error{position:absolute;background:#000000bf none 10px center no-repeat;text-align:center;border-radius:5px;top:50%;left:50%;transform:translate(-50%,-50%);color:#fff;border:1px solid white;padding:10px;white-space:pre-wrap;-webkit-user-select:text;user-select:text;line-height:24px}div.micrio-error *{vertical-align:middle;height:24px;width:24px;fill:var(--micrio-color);margin-right:10px}@media screen and (max-width: 520px){div.micrio-error{box-sizing:border-box;width:90%}}micr-io.micrio-micrio-gallery{background:#1118}micr-io.micrio-micrio-gallery ul.micrio-gallery{--micrio-border-margin:16px}@media (min-width: 501px){micr-io.micrio-micrio-gallery:not(:fullscreen)>aside{position:fixed}}dialog.micrio-popover::backdrop{color:#fff;animation:micrio-popover-fadeInBg .2s forwards;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}@keyframes micrio-popover-fadeInBg{0%{background:#0000}to{background:var(--micrio-popover-background)}}@keyframes micrio-popover-fadeIn{0%{opacity:0}to{opacity:1}}dialog.micrio-popover{animation:micrio-popover-fadeIn .5s forwards;background:transparent;border:none;overflow:visible;padding:0;pointer-events:all}dialog.micrio-popover div.micrio-media>*:first-child{border-radius:var(--micrio-border-radius);overflow:hidden}dialog.micrio-popover div.micrio-media>aside{--micrio-background:none;--micrio-button-background:none}dialog.page.article.micrio-popover figure.media-video iframe{width:100%}aside.micrio-popover{--micrio-background-filter:none;position:absolute;z-index:1}dialog.micrio-popover:not(.article){display:flex}dialog.micrio-popover:not(.article) figure>div.micrio-media{height:100%}@media (min-width: 640px){aside.micrio-popover{display:block;left:100%;margin-left:var(--micrio-border-margin);top:0}aside.inside.micrio-popover{right:0;left:auto}aside.micrio-popover:not(.inside){position:absolute;top:0;left:100%;z-index:2}aside.micrio-popover>.micrio-button{padding:0;margin:0 0 8px;display:block}dialog.micrio-popover:not(.article){width:calc(85vw - 56px);height:47.8125vw;width:calc(85cqw - 56px);height:47.8125cqw}dialog.micrio-popover>main{width:25vw;width:25cqw;min-width:unset;max-width:320px}dialog.micrio-popover>main>h3{margin-right:55px}}@media (max-width: 640px){aside.micrio-popover{position:fixed;top:var(--micrio-border-margin);right:var(--micrio-border-margin)}aside.micrio-popover .micrio-button{display:inline-block!important;border-radius:var(--micrio-border-radius)!important;height:var(--micrio-button-size);box-shadow:var(--micrio-button-shadow);padding:0!important;margin-bottom:8px}dialog.micrio-popover:not(.article){width:100%;height:100%;flex-direction:column}dialog.micrio-popover:not(.article) figure.micrio-media{flex:1}}dialog.micrio-popover>figure{flex:1;position:relative;margin:0}dialog.micrio-popover>figure>figcaption{position:absolute;width:100%;bottom:100%;font-style:italic;text-align:center;font-size:90%;padding:0;margin:var(--micrio-border-margin);color:var(--micrio-color)}dialog.micrio-popover>figure>div.micrio-media>*:first-child{width:100%;height:calc(100% - var(--micrio-button-size))}dialog.micrio-popover>figure>div.micrio-media>micr-io{height:100%!important}@media (min-aspect-ratio: 16/9){dialog.micrio-popover:not(.article){height:75vh;width:calc(16 / 9 * 75vh);height:75cqh;width:calc(16 / 9 * 75cqh)}}@media (max-width: 640px){dialog.micrio-popover div.micrio-media>*:first-child{border-radius:none}dialog.micrio-popover:not(.article)>*:first-child{height:50vh;height:50cqh;flex-direction:column;justify-content:center}dialog.micrio-popover:not(.article)>figure:first-child{flex:none;display:flex;flex-direction:column}}dialog.article.micrio-popover>article{text-shadow:none;color:var(--micrio-color);background:var(--micrio-background);padding:20px;box-sizing:border-box;max-height:calc(90cqh - 48px);max-height:calc(90vh - 48px);overflow-x:hidden;overflow-y:auto}@media (min-width: 640px){dialog.article.micrio-popover{width:540px}}dialog.article.micrio-popover h2.micrio-popover{text-align:center}dialog.article.micrio-popover article img{width:100%}menu.micrio-popover{margin:10px 0;padding:0}menu.micrio-popover>.micrio-button{margin-right:10px}menu.right.micrio-popover{text-align:right}menu.right.micrio-popover>.micrio-button{margin:0 0 0 10px}div.micrio-marker{position:absolute;display:block;transform:translate3d(calc(var(--x, 0) - 50%),calc(var(--y, 0) - 50%),0) scale3d(var(--scale, 1),var(--scale, 1),1);top:0;left:0}div.micrio-marker:not(.cluster):not(.no-fade){animation:micrio-marker-fadeIn .25s;animation-fill-mode:forwards}div.overlapped.micrio-marker{display:none}@keyframes micrio-marker-fadeIn{0%{opacity:0}to{opacity:1}}div.behind.micrio-marker{pointer-events:none;visibility:hidden}div.mat3d.micrio-marker{transform:var(--mat);top:50%;left:50%;transform-style:preserve-3d}div.mat3d.micrio-marker>button.micrio-marker{position:absolute;transform:translate3d(-50%,-50%,0)}button.micrio-marker{display:block;width:var(--micrio-marker-size);height:var(--micrio-marker-size);color:var(--micrio-marker-text-color);position:relative;cursor:pointer;font:inherit;padding:0;margin:0;background:transparent none center center no-repeat;background-image:var(--micrio-marker-icon);background-size:contain;border:none}div.micrio-marker:not(.cluster) label.micrio-marker{position:absolute;top:50%;left:100%;text-align:var(--micrio-text-align);cursor:pointer;transform:translateY(-50%);padding-left:10px;max-width:170px;width:max-content;white-space:pre-wrap;font-size:90%;font-weight:600;line-height:1em;text-shadow:var(--micrio-marker-text-shadow);opacity:0;pointer-events:none;transition:opacity .1s ease}div.micrio-marker:hover{z-index:2}.show-titles>div.micrio-marker label.micrio-marker,div.micrio-marker:hover label.micrio-marker{opacity:1}@media (max-width: 640px){div.micrio-marker:not(.cluster) label.micrio-marker{font-size:12px}}.show-titles>div.micrio-marker label.micrio-marker{pointer-events:all}label.static.micrio-marker{transform:translate(-50%,4px) scale3d(calc(1 / var(--scale, 1)),calc(1 / var(--scale, 1)),1)}div.default.micrio-marker button.micrio-marker{box-sizing:content-box;background-clip:content-box;border-radius:var(--micrio-marker-border-radius);border:var(--micrio-marker-border-size) solid var(--micrio-marker-border-color);transition:var(--micrio-marker-transition);background-color:var(--micrio-marker-color)}div.default.micrio-marker:hover,div.default.hovered.micrio-marker,div.default.opened.micrio-marker{z-index:1}div.default.micrio-marker:hover button.micrio-marker,div.default.hovered.micrio-marker button.micrio-marker,div.default.opened.micrio-marker button.micrio-marker{background-color:var(--micrio-marker-highlight);border-width:0;width:calc(var(--micrio-marker-size) + var(--micrio-marker-border-size) * 2);height:calc(var(--micrio-marker-size) + var(--micrio-marker-border-size) * 2)}div.has-icon.micrio-marker button.micrio-marker{--micrio-marker-icon:none}div.default.has-icon.micrio-marker button.micrio-marker{color:#fff;width:calc(var(--micrio-marker-size) + 24px);height:calc(var(--micrio-marker-size) + 24px);background-color:var(--micrio-marker-border-color);border:none}div.default.has-icon.micrio-marker button.micrio-marker>svg{margin:0 auto}div.default.has-icon.opened.micrio-marker button.micrio-marker>svg,div.default.has-icon.hovered.micrio-marker button.micrio-marker>svg,div.default.has-icon.micrio-marker:hover button.micrio-marker>svg{color:var(--micrio-marker-highlight)}div.default.has-custom-icon.micrio-marker button.micrio-marker{background-color:var(--micrio-marker-color)}div.default.has-custom-icon.opened.micrio-marker button.micrio-marker,div.default.has-custom-icon.hovered.micrio-marker button.micrio-marker,div.default.has-custom-icon.micrio-marker:hover button.micrio-marker{background-color:var(--micrio-marker-highlight, var(--micrio-marker-color))}div.cluster.micrio-marker button.micrio-marker{border:2px solid var(--micrio-marker-color);background:var(--micrio-cluster-marker-background, #fff);color:var(--micrio-cluster-marker-color, #000);width:calc(var(--micrio-marker-size) + 12px);height:calc(var(--micrio-marker-size) + 12px);border-radius:100%;box-sizing:content-box}div.cluster.micrio-marker:hover button.micrio-marker{background:var(--micrio-marker-highlight, #fff);border-color:var(--micrio-marker-highlight, #fff)}div.cluster.micrio-marker label.micrio-marker{pointer-events:none}div.micrio-marker img.micrio-marker{max-width:100%;max-height:100%}div.micrio-waypoint{display:block;position:absolute;transform-style:preserve-3d;transform:var(--matrix);width:0;height:0;top:50%;left:50%;--micrio-bb:var(--micrio-button-background);--micrio-bbh:var(--micrio-button-background-hover)}div.micrio-waypoint>button{--micrio-button-background:var(--micrio-waypoint-background, var(--micrio-bb));--micrio-button-background-hover:var(--micrio-waypoint-background-hover, var(--micrio-bbh));--micrio-button-size:var(--micrio-waypoint-size);--micrio-border-radius:var(--micrio-waypoint-border-radius, 100%);--micrio-icon-size:var(--micrio-waypoint-icon-size, calc(var(--micrio-button-size) - 50px));transform:translate3d(-50%,-50%,0) scale3d(.5,.5,1);pointer-events:all;transition:background-color .25s ease,opacity .25s ease,border-color .25s ease;border:var(--micrio-waypoint-border-size, var(--micrio-marker-border-size)) solid var(--micrio-waypoint-border-color, var(--micrio-marker-border-color));margin:0}div.micrio-waypoint>button>svg{pointer-events:none;margin:0 auto}div.micrio-waypoint:hover>button,div.active.micrio-waypoint>button{transition:background-color .25s ease,opacity .25s ease}div.clicked.micrio-waypoint>button{animation:micrio-waypoint-pulse .75s ease infinite alternate}@keyframes micrio-waypoint-pulse{0%{transform:translate3d(-50%,-50%,0) scale3d(.5,.5,1)}to{transform:translate3d(-50%,-50%,0) scale3d(.75,.75,1)}}div.micrio-markers{pointer-events:none;position:absolute;top:0;left:0;width:100%;height:100%;overflow:hidden;will-change:width,height,top,left,opacity;perspective:inherit}div.micrio-markers:empty{display:none}div.micrio-markers>*{pointer-events:all}div.inactive.micrio-markers>*{pointer-events:none}div.is360.micrio-markers{transition:opacity .25s}div.is360.inactive.micrio-markers{opacity:0}aside.micrio-markers{pointer-events:none}aside.micrio-markers section.micrio-markers{position:absolute;top:0;bottom:0;width:10vw;width:10cqw;min-width:200px;font-size:1em;font-weight:500;line-height:1em;color:var(--micrio-marker-color);display:flex;flex-direction:column}aside.micrio-markers section.micrio-markers:nth-child(1){left:10px}aside.micrio-markers section.micrio-markers:nth-child(2){right:10px}aside.micrio-markers section article.micrio-markers{flex:1;padding:10px;max-height:30vh;max-height:30cqh;display:flex;align-items:center}aside.micrio-markers section label.micrio-markers{pointer-events:all;cursor:pointer;padding:10px;max-width:160px;opacity:.75;transition:opacity .25s ease,color .25s ease}label.hover.micrio-markers{color:var(--micrio-marker-highlight);opacity:1}aside.micrio-markers section:nth-child(1) article.micrio-markers{justify-content:right}aside.micrio-markers section:nth-child(1) label.micrio-markers{text-align:right}svg.micrio-markers{width:100%;height:100%;pointer-events:none;position:absolute}svg.micrio-markers line.micrio-markers{stroke:var(--micrio-marker-highlight);stroke-width:2}svg.micrio-markers line.micrio-markers:not(.hovered){stroke:var(--micrio-marker-color);stroke-dasharray:10px;stroke-width:1;opacity:.75}.embed-container.micrio-embed{position:absolute;display:block;top:0;left:0;transform:translate3d(calc(var(--x, 0) - 50%),calc(var(--y, 0) - 50%),0) scale3d(var(--s),var(--s),1);opacity:var(--opacity, 1);direction:ltr}.embed3d.micrio-embed{top:50%;left:50%}.embed-container.no-events.micrio-embed{pointer-events:none}.embed-container.micrio-embed>.micrio-embed{cursor:pointer}.embed-container.micrio-embed>*{position:absolute;transform:translate3d(-50%,-50%,0) scale3d(var(--scale, 1),var(--scale, 1),1)}.embed-container.micrio-embed>*:not(button){width:auto!important}.embed-container.micrio-embed:not(.no-events)>*{pointer-events:all}.embed-container.micrio-embed>img.micrio-embed{max-width:none}.embed-container.micrio-embed>button{--scale:1;--ratio:1;padding:0;margin:0;background:transparent;border:none;width:100px;aspect-ratio:var(--ratio)}svg.micrio-progress-circle{position:absolute;top:50%;left:50%;pointer-events:none;transform:translate(-50%,-50%) rotate(-90deg)}circle.micrio-progress-circle{transition:stroke-dashoffset .25s ease}
26
26
  `,C,M))})();