"use weex:vue";

if (typeof Promise !== 'undefined' && !Promise.prototype.finally) {
  Promise.prototype.finally = function(callback) {
    const promise = this.constructor
    return this.then(
      value => promise.resolve(callback()).then(() => value),
      reason => promise.resolve(callback()).then(() => {
        throw reason
      })
    )
  }
};

if (typeof uni !== 'undefined' && uni && uni.requireGlobal) {
  const global = uni.requireGlobal()
  ArrayBuffer = global.ArrayBuffer
  Int8Array = global.Int8Array
  Uint8Array = global.Uint8Array
  Uint8ClampedArray = global.Uint8ClampedArray
  Int16Array = global.Int16Array
  Uint16Array = global.Uint16Array
  Int32Array = global.Int32Array
  Uint32Array = global.Uint32Array
  Float32Array = global.Float32Array
  Float64Array = global.Float64Array
  BigInt64Array = global.BigInt64Array
  BigUint64Array = global.BigUint64Array
};


(()=>{var b=Object.create;var d=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var w=Object.getOwnPropertyNames;var h=Object.getPrototypeOf,m=Object.prototype.hasOwnProperty;var x=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var _=(t,e,i,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of w(e))!m.call(t,r)&&r!==i&&d(t,r,{get:()=>e[r],enumerable:!(s=g(e,r))||s.enumerable});return t};var y=(t,e,i)=>(i=t!=null?b(h(t)):{},_(e||!t||!t.__esModule?d(i,"default",{value:t,enumerable:!0}):i,t));var f=x((W,p)=>{p.exports=Vue});var o=y(f());var u=(t,e)=>{let i=t.__vccOpts||t;for(let[s,r]of e)i[s]=r;return i};var k={toptool:{"":{alignItems:"center",justifyContent:"center",position:"relative",height:"88rpx"}},back_btn:{".toptool ":{position:"absolute",left:"32rpx",top:"32rpx",height:"24rpx",width:"24rpx",borderLeftWidth:"3rpx",borderLeftStyle:"solid",borderLeftColor:"#ffffff",borderBottomWidth:"3rpx",borderBottomStyle:"solid",borderBottomColor:"#ffffff",transform:"rotate(45deg)"}},back:{".toptool ":{fontFamily:"uniicons",fontWeight:"normal",color:"#ffffff",position:"absolute",left:"32rpx",top:"20rpx",fontSize:"40rpx"}},main_tit:{".toptool ":{color:"#ffffff",fontSize:"36rpx",fontWeight:"bold",textAlign:"center"}},txt:{".toptool .main_tit ":{fontSize:"36rpx",fontWeight:"bold"},".toptool .back_black ":{color:"#333333"},".toptool .main_tit_black ":{color:"#333333"}},back_btn_black:{".toptool ":{borderLeftWidth:"3rpx",borderLeftStyle:"solid",borderLeftColor:"#333333",borderBottomWidth:"3rpx",borderBottomStyle:"solid",borderBottomColor:"#333333"}},back_black:{".toptool ":{color:"#333333"}},main_tit_black:{".toptool ":{color:"#333333"}},bigbox:{"":{flex:1,width:"750rpx"}},box:{"":{backgroundColor:"#ffffff"}}},v=weex.requireModule("dom");v.addRule("fontFace",{fontFamily:"uniicons",src:"url('/static/uni.ttf')"});var S={data(){return{webviewStyles:{progress:{color:"#FF3333"}},theUrl:"",iStatusBarHeight:0,scrollHeight:0,windowHeight:0,windowWidth:0,windowScale:1,webViewTop:0,webViewHeight:0}},onLoad(t){let e=uni.getSystemInfoSync();this.iStatusBarHeight=e.statusBarHeight,this.windowHeight=e.windowHeight,this.windowWidth=e.windowWidth,this.windowScale=750/this.windowWidth,this.scrollHeight=this.windowHeight-88/this.windowScale-this.iStatusBarHeight,e.platform=="ios"?(this.webViewHeight=e.windowHeight+e.statusBarHeight,this.webViewTop=-e.statusBarHeight):this.webViewHeight=e.windowHeight,this.theUrl=decodeURIComponent(t.page)},methods:{navigateBack(){uni.navigateBack({delta:1})},postMessage(t){switch(t.detail.data[0].type){case"bseries":uni.navigateTo({url:"/pages/bseries/index?id="+t.detail.data[0].id});break;case"video":uni.navigateTo({url:"/pages/video/index?id="+t.detail.data[0].id});break;case"news":uni.navigateTo({url:"/pages/news/index?id="+t.detail.data[0].id});break;case"compare":var e=[{id:t.detail.data[0].id,seriesName:t.detail.data[0].info.name,title:t.detail.data[0].info.product_name,price:t.detail.data[0].info.minmsrp}];uni.setStorageSync("pkLocal",e),uni.navigateTo({url:"/pages/pk/index"});break;case"inquiry":uni.navigateTo({url:"/pages/inquiry/index?detail="+encodeURIComponent(JSON.stringify({bseriesId:t.detail.data[0].id}))});break;case"back":uni.navigateBack();break}}}};function B(t,e,i,s,r,l){return(0,o.openBlock)(),(0,o.createElementBlock)("scroll-view",{scrollY:!0,showScrollbar:!0,enableBackToTop:!0,bubble:"true",style:{flexDirection:"column"}},[(0,o.createElementVNode)("view",{class:"bigbox"},[(0,o.createElementVNode)("view",{style:(0,o.normalizeStyle)("height: "+r.iStatusBarHeight+"px")},null,4),(0,o.createElementVNode)("view",{class:"toptool"},[(0,o.createElementVNode)("u-text",{class:"back back_black",onClick:e[0]||(e[0]=c=>l.navigateBack())},"\uE582"),(0,o.createElementVNode)("view",{class:"main_tit main_tit_black"},[(0,o.createElementVNode)("u-text",{class:"txt"},"\u4E09\u6B65\u9009\u8F66")])]),(0,o.createElementVNode)("u-web-view",{class:"box",updateTitle:"true",style:(0,o.normalizeStyle)({height:r.scrollHeight+"px"}),webviewStyles:r.webviewStyles,src:"/hybrid/html/select_step1.html",onOnPostMessage:e[1]||(e[1]=(...c)=>l.postMessage&&l.postMessage(...c))},null,44,["webviewStyles"])])])}var a=u(S,[["render",B],["styles",[k]]]);var n=plus.webview.currentWebview();if(n){let t=parseInt(n.id),e="pages/select/select_step3",i={};try{i=JSON.parse(n.__query__)}catch(r){}a.mpType="page";let s=Vue.createPageApp(a,{$store:getApp({allowDefault:!0}).$store,__pageId:t,__pagePath:e,__pageQuery:i});s.provide("__globalStyles",Vue.useCssStyles([...__uniConfig.styles,...a.styles||[]])),s.mount("#root")}})();
