"use strict";function _asyncToGenerator(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(a,o){try{var i=e[a](o),s=i.value}catch(t){return void n(t)}if(!i.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}_asyncToGenerator(regeneratorRuntime.mark(function t(){var e,n,r,a,o,i;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,load("data -r");case 2:return e=t.sent,t.next=5,load("xque");case 5:return t.next=7,load("common/data");case 7:return n=t.sent,window.pageRunner={v:"10300",data:e,commonData:n},window.beforeInit&&beforeInit(n,e),t.next=12,load("util/dataUtil");case 12:if(r=t.sent,!$("[p-custom]").length){t.next=16;break}return t.next=16,load("task/initCustomEle");case 16:return r.addLength(e),t.next=19,load("task/fixActive").post(e);case 19:return r.transPos(e),a=$(".p_main"),t.next=23,load("task/renderPage").post({target:a,data:e});case 23:$(".mainLoading").hide(),o=e.mainPage,i=0,Array.from(o).some(function(t,e){if(t.active)return i=e,!0}),a.attr("h5-mode",o.type||"h5"),t.t0=o.type,t.next="scroll"===t.t0?31:"ppt"===t.t0?34:(t.t0,37);break;case 31:return t.next=33,load("task/scroll/initScrollMode").post({initActiveId:i});case 33:return t.abrupt("break",39);case 34:return t.next=36,load("task/ppt/initPPTMode").post({initActiveId:i});case 36:return t.abrupt("break",39);case 37:return t.next=39,load("task/h5/initH5").post({initActiveId:i});case 39:top!==window&&top.postMessage({type:"initBack"},"*");case 40:case"end":return t.stop()}},t,void 0)}))();