Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mui
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
mui
Commits
0dbd43c9
Commit
0dbd43c9
authored
Sep 05, 2014
by
hbcui1984
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
解决二级选项卡点出菜单后,需要多次按返回才能关闭的问题
parent
3a48a5dd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
15 deletions
+14
-15
dist/js/mui.js
dist/js/mui.js
+10
-11
dist/js/mui.min.js
dist/js/mui.min.js
+2
-2
examples/hello-mui/js/mui.min.js
examples/hello-mui/js/mui.min.js
+2
-2
No files found.
dist/js/mui.js
View file @
0dbd43c9
...
...
@@ -1072,7 +1072,6 @@ window.mui = mui;
* @param {object} options 可选:参数,等待,窗口,显示配置{params:{},waiting:{},styles:{},show:{}}
*/
$
.
openWindow
=
function
(
url
,
id
,
options
)
{
if
(
!
window
.
plus
)
{
return
;
}
...
...
@@ -2472,7 +2471,7 @@ window.mui = mui;
window
.
addEventListener
(
'
tap
'
,
function
(
e
)
{
var
targetTab
=
$
.
targets
[
name
]
;
var
targetTab
=
$
.
targets
.
tab
;
if
(
!
targetTab
)
{
return
;
}
...
...
@@ -2502,24 +2501,23 @@ window.mui = mui;
if
(
!
targetBody
)
{
return
;
}
//选项卡含二级菜单的情况,再次点击要隐藏子菜单
if
(
!
targetBody
.
classList
.
contains
(
CLASS_CONTROL_CONTENT
))
{
if
(
!
targetBody
.
classList
.
contains
(
CLASS_CONTROL_CONTENT
))
{
//tab bar popover
targetTab
.
classList
[
isLastActive
?
'
remove
'
:
'
add
'
](
className
);
return
;
}
if
(
isLastActive
)
{
//same
return
;
}
//隐藏之前显示内容区
activeBodies
=
targetBody
.
parentNode
.
getElementsByClassName
(
className
);
for
(
var
i
=
0
;
i
<
activeBodies
.
length
;
i
++
)
{
activeBodies
[
i
].
classList
.
remove
(
className
);
}
//显示目标内容区
targetBody
.
classList
.
add
(
className
);
var
contents
=
targetBody
.
parentNode
.
querySelectorAll
(
'
.
'
+
CLASS_CONTROL_CONTENT
);
//触发可拖动式选项卡的切换事件
$
.
trigger
(
targetBody
,
$
.
eventName
(
'
shown
'
,
name
),
{
tabNumber
:
Array
.
prototype
.
indexOf
.
call
(
contents
,
targetBody
)
})
...
...
@@ -3804,9 +3802,10 @@ window.mui = mui;
var
wobj
=
$
.
currentWebview
;
var
parent
=
wobj
.
parent
();
wobj
.
canBack
(
function
(
e
)
{
if
(
e
.
canBack
)
{
//webview history back
window
.
history
.
back
();
}
else
{
//webview close or hide
//by chb 暂时注释,在碰到类似popover之类的锚点的时候,需多次点击才能返回;
// if (e.canBack) {//webview history back
// window.history.back();
// } else {//webview close or hide
//TODO 会不会存在多层嵌套?如果存在需要递归找到最顶层
if
(
parent
)
{
wobj
=
parent
;
...
...
@@ -3830,7 +3829,7 @@ window.mui = mui;
//这个交给项目具体实现,框架暂不处理;
//plus.runtime.quit();
}
}
//
}
});
}
else
if
(
window
.
history
.
length
>
1
)
{
...
...
dist/js/mui.min.js
View file @
0dbd43c9
...
...
@@ -3,5 +3,5 @@
* Mui v0.5.5 (https://github.com/dcloudio/mui)
* =====================================================
*/
var
mui
=
function
(
a
,
b
){
var
c
=
/complete|loaded|interactive/
,
d
=
/^#
([\w
-
]
*
)
$/
,
e
=
/^
\.([\w
-
]
+
)
$/
,
f
=
/^
[\w
-
]
+$/
,
g
=
/translate
(?:
3d
)?\((
.+
?)\)
/
,
h
=
/matrix
(
3d
)?\((
.+
?)\)
/
,
i
=
function
(
b
,
c
){
if
(
c
=
c
||
a
,
!
b
)
return
j
();
if
(
"
object
"
==
typeof
b
)
return
j
([
b
],
null
);
try
{
if
(
d
.
test
(
b
)){
var
e
=
c
.
getElementById
(
RegExp
.
$1
);
return
j
(
e
?[
e
]:[])}
return
j
(
i
.
qsa
(
b
,
c
),
b
)}
catch
(
f
){}
return
j
()},
j
=
function
(
a
,
b
){
return
a
=
a
||
[],
a
.
__proto__
=
i
.
fn
,
a
.
selector
=
b
||
""
,
a
};
return
i
.
uuid
=
0
,
i
.
data
=
{},
i
.
extend
=
function
(
a
,
c
,
d
){
a
||
(
a
=
{}),
c
||
(
c
=
{});
for
(
var
e
in
c
)
c
[
e
]
!==
b
&&
(
d
&&
"
object
"
==
typeof
a
[
e
]?
i
.
extend
(
a
[
e
],
c
[
e
],
d
):
a
[
e
]
=
c
[
e
]);
return
a
},
i
.
slice
=
[].
slice
,
i
.
qsa
=
function
(
b
,
c
){
return
c
=
c
||
a
,
i
.
slice
.
call
(
e
.
test
(
b
)?
c
.
getElementsByClassName
(
RegExp
.
$1
):
f
.
test
(
b
)?
c
.
getElementsByTagName
(
b
):
c
.
querySelectorAll
(
b
))},
i
.
ready
=
function
(
b
){
return
c
.
test
(
a
.
readyState
)?
b
(
i
):
a
.
addEventListener
(
"
DOMContentLoaded
"
,
function
(){
b
(
i
)},
!
1
),
this
},
i
.
each
=
function
(
a
,
b
){
return
[].
every
.
call
(
a
,
function
(
a
,
c
){
return
b
.
call
(
a
,
c
,
a
)
!==!
1
}),
this
},
i
.
trigger
=
function
(
a
,
b
,
c
){
return
a
.
dispatchEvent
(
new
CustomEvent
(
b
,{
detail
:
c
,
bubbles
:
!
0
,
cancelable
:
!
0
})),
this
},
i
.
getStyles
=
function
(
a
,
b
){
var
c
=
a
.
ownerDocument
.
defaultView
.
getComputedStyle
(
a
,
null
);
return
b
?
c
.
getPropertyValue
(
b
)
||
c
[
b
]:
c
},
i
.
parseTranslate
=
function
(
a
,
b
){
var
c
=
a
.
match
(
g
||
""
);
return
c
&&
c
[
1
]
||
(
c
=
[
""
,
"
0,0,0
"
]),
c
=
c
[
1
].
split
(
"
,
"
),
c
=
{
x
:
parseFloat
(
c
[
0
]),
y
:
parseFloat
(
c
[
1
]),
z
:
parseFloat
(
c
[
2
])},
b
&&
c
.
hasOwnProperty
(
b
)?
c
[
b
]:
c
},
i
.
parseTranslateMatrix
=
function
(
a
,
b
){
var
c
=
a
.
match
(
h
),
d
=
c
&&
c
[
1
];
c
?(
c
=
c
[
2
].
split
(
"
,
"
),
"
3d
"
===
d
?
c
=
c
.
slice
(
12
,
15
):(
c
.
push
(
0
),
c
=
c
.
slice
(
4
,
7
))):
c
=
[
0
,
0
,
0
];
var
e
=
{
x
:
parseFloat
(
c
[
0
]),
y
:
parseFloat
(
c
[
1
]),
z
:
parseFloat
(
c
[
2
])};
return
b
&&
e
.
hasOwnProperty
(
b
)?
e
[
b
]:
e
},
i
.
fn
=
{
each
:
function
(
a
){
return
[].
every
.
call
(
this
,
function
(
b
,
c
){
return
a
.
call
(
b
,
c
,
b
)
!==!
1
}),
this
}},
i
}(
document
);
window
.
mui
=
mui
,
"
$
"
in
window
||
(
window
.
$
=
mui
),
function
(
a
,
b
,
c
){
a
.
targets
=
{},
a
.
targetHandles
=
[],
a
.
registerTarget
=
function
(
b
){
return
b
.
index
=
b
.
index
||
1
e3
,
a
.
targetHandles
.
push
(
b
),
a
.
targetHandles
.
sort
(
function
(
a
,
b
){
return
a
.
index
-
b
.
index
}),
a
.
targetHandles
},
b
.
addEventListener
(
"
touchstart
"
,
function
(
b
){
for
(
var
d
=
b
.
target
,
e
=
{};
d
&&
d
!==
c
;
d
=
d
.
parentNode
){
var
f
=!
1
;
if
(
a
.
each
(
a
.
targetHandles
,
function
(
c
,
g
){
var
h
=
g
.
name
;
f
||
e
[
h
]
||!
g
.
hasOwnProperty
(
"
handle
"
)?
e
[
h
]
||
g
.
isReset
!==!
1
&&
(
a
.
targets
[
h
]
=!
1
):(
a
.
targets
[
h
]
=
g
.
handle
(
b
,
d
),
a
.
targets
[
h
]
&&
(
e
[
h
]
=!
0
,
g
.
isContinue
!==!
0
&&
(
f
=!
0
)))}),
f
)
break
}})}(
mui
,
window
,
document
),
function
(
a
){
String
.
prototype
.
trim
===
a
&&
(
String
.
prototype
.
trim
=
function
(){
return
this
.
replace
(
/^
\s
+|
\s
+$/g
,
""
)})}(),
function
(){
function
a
(
a
,
b
){
b
=
b
||
{
bubbles
:
!
1
,
cancelable
:
!
1
,
detail
:
void
0
};
var
c
=
document
.
createEvent
(
"
Events
"
),
d
=!
0
;
if
(
b
)
for
(
var
e
in
b
)
"
bubbles
"
===
e
?
d
=!!
b
[
e
]:
c
[
e
]
=
b
[
e
];
return
c
.
initEvent
(
a
,
d
,
!
0
),
c
}
"
undefined
"
==
typeof
window
.
CustomEvent
&&
(
a
.
prototype
=
window
.
Event
.
prototype
,
window
.
CustomEvent
=
a
)}(),
function
(
a
){
"
classList
"
in
a
.
documentElement
||!
Object
.
defineProperty
||
"
undefined
"
==
typeof
HTMLElement
||
Object
.
defineProperty
(
HTMLElement
.
prototype
,
"
classList
"
,{
get
:
function
(){
function
a
(
a
){
return
function
(
c
){
var
d
=
b
.
className
.
split
(
/
\s
+/
),
e
=
d
.
indexOf
(
c
);
a
(
d
,
e
,
c
),
b
.
className
=
d
.
join
(
"
"
)}}
var
b
=
this
,
c
=
{
add
:
a
(
function
(
a
,
b
,
c
){
~
b
||
a
.
push
(
c
)}),
remove
:
a
(
function
(
a
,
b
){
~
b
&&
a
.
splice
(
b
,
1
)}),
toggle
:
a
(
function
(
a
,
b
,
c
){
~
b
?
a
.
splice
(
b
,
1
):
a
.
push
(
c
)}),
contains
:
function
(
a
){
return
!!~
b
.
className
.
split
(
/
\s
+/
).
indexOf
(
a
)},
item
:
function
(
a
){
return
b
.
className
.
split
(
/
\s
+/
)[
a
]
||
null
}};
return
Object
.
defineProperty
(
c
,
"
length
"
,{
get
:
function
(){
return
b
.
className
.
split
(
/
\s
+/
).
length
}}),
c
}})}(
document
),
function
(
a
){
var
b
=
0
;
a
.
requestAnimationFrame
||
(
a
.
requestAnimationFrame
=
a
.
webkitRequestAnimationFrame
,
a
.
cancelAnimationFrame
=
a
.
webkitCancelAnimationFrame
||
a
.
webkitCancelRequestAnimationFrame
),
a
.
requestAnimationFrame
||
(
a
.
requestAnimationFrame
=
function
(
c
){
var
d
=
(
new
Date
).
getTime
(),
e
=
Math
.
max
(
0
,
16.7
-
(
d
-
b
)),
f
=
a
.
setTimeout
(
function
(){
c
(
d
+
e
)},
e
);
return
b
=
d
+
e
,
f
}),
a
.
cancelAnimationFrame
||
(
a
.
cancelAnimationFrame
=
function
(
a
){
clearTimeout
(
a
)})}(
window
),
function
(
a
,
b
,
c
){
if
(
!
b
.
FastClick
){
var
d
=
function
(
a
,
b
){
return
!
b
.
type
||
"
radio
"
!==
b
.
type
&&
"
checkbox
"
!==
b
.
type
?
!
1
:
b
};
a
.
registerTarget
({
name
:
c
,
index
:
40
,
handle
:
d
,
target
:
!
1
});
var
e
=
function
(
c
){
var
d
=
a
.
targets
.
click
;
if
(
d
){
var
e
,
f
;
document
.
activeElement
&&
document
.
activeElement
!==
d
&&
document
.
activeElement
.
blur
(),
f
=
c
.
detail
.
gesture
.
changedTouches
[
0
],
e
=
document
.
createEvent
(
"
MouseEvents
"
),
e
.
initMouseEvent
(
"
click
"
,
!
0
,
!
0
,
b
,
1
,
f
.
screenX
,
f
.
screenY
,
f
.
clientX
,
f
.
clientY
,
!
1
,
!
1
,
!
1
,
!
1
,
0
,
null
),
e
.
forwardedTouchEvent
=!
0
,
d
.
dispatchEvent
(
e
)}};
b
.
addEventListener
(
"
tap
"
,
e
),
b
.
addEventListener
(
"
doubletap
"
,
e
),
b
.
addEventListener
(
"
click
"
,
function
(
b
){
return
a
.
targets
.
click
&&!
b
.
forwardedTouchEvent
?(
b
.
stopImmediatePropagation
?
b
.
stopImmediatePropagation
():
b
.
propagationStopped
=!
0
,
b
.
stopPropagation
(),
b
.
preventDefault
(),
!
1
):
void
0
},
!
0
)}}(
mui
,
window
,
"
click
"
),
function
(
a
){
a
.
namespace
=
"
mui
"
,
a
.
classNamePrefix
=
a
.
namespace
+
"
-
"
,
a
.
classSelectorPrefix
=
"
.
"
+
a
.
classNamePrefix
,
a
.
className
=
function
(
b
){
return
a
.
classNamePrefix
+
b
},
a
.
classSelector
=
function
(
b
){
return
b
.
replace
(
/
\.
/g
,
a
.
classSelectorPrefix
)},
a
.
eventName
=
function
(
b
,
c
){
return
b
+
(
a
.
namespace
?
"
.
"
+
a
.
namespace
:
""
)
+
(
c
?
"
.
"
+
c
:
""
)}}(
mui
),
function
(
a
,
b
){
a
.
EVENT_START
=
"
touchstart
"
,
a
.
EVENT_MOVE
=
"
touchmove
"
,
a
.
EVENT_END
=
"
touchend
"
,
a
.
EVENT_CANCEL
=
"
touchcancel
"
,
a
.
EVENT_CLICK
=
"
click
"
,
a
.
preventDefault
=
function
(
a
){
a
.
preventDefault
()},
a
.
stopPropagation
=
function
(
a
){
a
.
stopPropagation
()},
a
.
gestures
=
[],
a
.
registerGesture
=
function
(
b
){
return
b
.
index
=
b
.
index
||
1
e3
,
a
.
gestures
.
push
(
b
),
a
.
gestures
.
sort
(
function
(
a
,
b
){
return
a
.
index
-
b
.
index
}),
a
.
gestures
};
var
c
=
function
(
a
,
b
){
var
c
=
b
.
x
-
a
.
x
,
d
=
b
.
y
-
a
.
y
;
return
Math
.
sqrt
(
c
*
c
+
d
*
d
)},
d
=
function
(
a
,
b
){
return
180
*
Math
.
atan2
(
b
.
y
-
a
.
y
,
b
.
x
-
a
.
x
)
/
Math
.
PI
},
e
=
function
(
a
){
return
-
45
>
a
&&
a
>-
135
?
"
up
"
:
a
>=
45
&&
135
>
a
?
"
down
"
:
a
>=
135
||-
135
>=
a
?
"
left
"
:
a
>=-
45
&&
45
>=
a
?
"
right
"
:
null
},
f
=
function
(
b
,
c
){
a
.
gestures
.
stoped
||
a
.
each
(
a
.
gestures
,
function
(
d
,
e
){
a
.
gestures
.
stoped
||
a
.
options
.
gestureConfig
[
e
.
name
]
&&
e
.
hasOwnProperty
(
"
handle
"
)
&&
e
.
handle
(
b
,
c
)})},
g
=
{},
h
=
function
(
b
){
a
.
gestures
.
stoped
=!
1
,
g
=
{
target
:
b
.
target
,
lastTarget
:
g
.
lastTarget
?
g
.
lastTarget
:
null
,
startTime
:
Date
.
now
(),
touchTime
:
0
,
lastTapTime
:
g
.
lastTapTime
?
g
.
lastTapTime
:
0
,
start
:{
x
:
b
.
touches
[
0
].
pageX
,
y
:
b
.
touches
[
0
].
pageY
},
move
:{
x
:
0
,
y
:
0
},
deltaX
:
0
,
deltaY
:
0
,
lastDeltaX
:
0
,
lastDeltaY
:
0
,
angle
:
""
,
direction
:
""
,
distance
:
0
,
drag
:
!
1
,
swipe
:
!
1
,
gesture
:
b
},
f
(
b
,
g
)},
i
=
function
(
b
){
a
.
gestures
.
stoped
||
(
g
.
touchTime
=
Date
.
now
()
-
g
.
startTime
,
g
.
move
=
{
x
:
b
.
touches
[
0
].
pageX
,
y
:
b
.
touches
[
0
].
pageY
},
g
.
distance
=
c
(
g
.
start
,
g
.
move
),
g
.
angle
=
d
(
g
.
start
,
g
.
move
),
g
.
direction
=
e
(
g
.
angle
),
g
.
lastDeltaX
=
g
.
deltaX
,
g
.
lastDeltaY
=
g
.
deltaY
,
g
.
deltaX
=
g
.
move
.
x
-
g
.
start
.
x
,
g
.
deltaY
=
g
.
move
.
y
-
g
.
start
.
y
,
g
.
gesture
=
b
,
f
(
b
,
g
))},
j
=
function
(
b
){
a
.
gestures
.
stoped
||
(
g
.
touchTime
=
Date
.
now
()
-
g
.
startTime
,
g
.
gesture
=
b
,
f
(
b
,
g
))};
b
.
addEventListener
(
a
.
EVENT_START
,
h
),
b
.
addEventListener
(
a
.
EVENT_MOVE
,
i
),
b
.
addEventListener
(
a
.
EVENT_END
,
j
),
b
.
addEventListener
(
a
.
EVENT_CANCEL
,
j
),
a
.
fn
.
on
=
function
(
b
,
c
,
d
){
this
.
each
(
function
(){
var
e
=
this
;
e
.
addEventListener
(
b
,
function
(
b
){
var
f
=
a
.
qsa
(
c
,
e
),
g
=
b
.
target
;
if
(
f
&&
f
.
length
>
0
)
for
(;
g
&&
g
!==
document
&&
g
!==
e
;
g
=
g
.
parentNode
)
g
&&~
f
.
indexOf
(
g
)
&&
(
b
.
detail
?
b
.
detail
.
currentTarget
=
g
:
b
.
detail
=
{
currentTarget
:
g
},
d
.
call
(
g
,
b
))}),
e
.
removeEventListener
(
a
.
EVENT_CLICK
,
k
),
e
.
addEventListener
(
a
.
EVENT_CLICK
,
k
)})};
var
k
=
function
(
a
){
a
.
target
&&
"
INPUT
"
!==
a
.
target
.
tagName
&&
a
.
preventDefault
()}}(
mui
,
window
),
function
(
a
,
b
){
var
c
=
function
(
c
,
d
){
if
(
c
.
type
===
a
.
EVENT_END
||
c
.
type
===
a
.
EVENT_CANCEL
){
var
e
=
this
.
options
;
d
.
direction
&&
e
.
swipeMaxTime
>
d
.
touchTime
&&
d
.
distance
>
e
.
swipeMinDistince
&&
"
range
"
!==
c
.
target
.
type
&&
(
d
.
swipe
=!
0
,
a
.
trigger
(
c
.
target
,
b
+
d
.
direction
,
d
))}};
a
.
registerGesture
({
name
:
b
,
index
:
10
,
handle
:
c
,
options
:{
swipeMaxTime
:
300
,
swipeMinDistince
:
18
}})}(
mui
,
"
swipe
"
),
function
(
a
,
b
){
var
c
=
function
(
c
,
d
){
switch
(
c
.
type
){
case
a
.
EVENT_MOVE
:
d
.
direction
&&
(
d
.
drag
||
(
d
.
drag
=!
0
,
a
.
trigger
(
c
.
target
,
b
+
"
start
"
,
d
)),
a
.
trigger
(
c
.
target
,
b
,
d
),
a
.
trigger
(
c
.
target
,
b
+
d
.
direction
,
d
));
break
;
case
a
.
EVENT_END
:
case
a
.
EVENT_CANCEL
:
d
.
drag
&&
a
.
trigger
(
c
.
target
,
b
+
"
end
"
,
d
)}};
a
.
registerGesture
({
name
:
b
,
index
:
20
,
handle
:
c
,
options
:{}})}(
mui
,
"
drag
"
),
function
(
a
,
b
){
var
c
=
function
(
c
,
d
){
if
(
c
.
type
===
a
.
EVENT_END
||
c
.
type
===
a
.
EVENT_CANCEL
){
var
e
=
this
.
options
;
if
(
d
.
distance
<
e
.
tabMaxDistance
&&
d
.
touchTime
<
e
.
tapMaxTime
){
if
(
a
.
options
.
gestureConfig
.
doubletap
&&
d
.
lastTarget
&&
d
.
lastTarget
===
c
.
target
&&
d
.
lastTapTime
&&
d
.
startTime
-
d
.
lastTapTime
<
e
.
tabMaxInterval
)
return
a
.
trigger
(
c
.
target
,
"
doubletap
"
,
d
),
d
.
lastTapTime
=
Date
.
now
(),
void
(
d
.
lastTarget
=
c
.
target
);
a
.
trigger
(
c
.
target
,
b
,
d
),
d
.
lastTapTime
=
Date
.
now
(),
d
.
lastTarget
=
c
.
target
}}};
a
.
registerGesture
({
name
:
b
,
index
:
30
,
handle
:
c
,
options
:{
tabMaxInterval
:
300
,
tabMaxDistance
:
5
,
tapMaxTime
:
250
}})}(
mui
,
"
tap
"
),
function
(
a
,
b
){
var
c
,
d
=
function
(
d
,
e
){
var
f
=
this
.
options
;
switch
(
d
.
type
){
case
a
.
EVENT_START
:
clearTimeout
(
c
),
c
=
setTimeout
(
function
(){
e
.
drag
||
a
.
trigger
(
d
.
target
,
b
,
e
)},
f
.
holdTimeout
);
break
;
case
a
.
EVENT_MOVE
:
e
.
distance
>
f
.
holdThreshold
&&
clearTimeout
(
c
);
break
;
case
a
.
EVENT_END
:
case
a
.
EVENT_CANCEL
:
clearTimeout
(
c
)}};
a
.
registerGesture
({
name
:
b
,
index
:
10
,
handle
:
d
,
options
:{
holdTimeout
:
500
,
holdThreshold
:
2
}})}(
mui
,
"
longtap
"
),
function
(
a
){
function
b
(
b
){
this
.
os
=
{};
var
c
=
[
function
(){
var
a
=
b
.
match
(
/
(
Android
)
;
?[\s\/]
+
([\d
.
]
+
)?
/
);
return
a
&&
(
this
.
os
.
android
=!
0
,
this
.
os
.
version
=
a
[
2
]),
this
.
os
.
android
===!
0
},
function
(){
var
a
=
b
.
match
(
/
(
iPhone
\s
OS
)\s([\d
_
]
+
)
/
);
if
(
a
)
this
.
os
.
ios
=
this
.
os
.
iphone
=!
0
,
this
.
os
.
version
=
a
[
2
].
replace
(
/_/g
,
"
.
"
);
else
{
var
c
=
b
.
match
(
/
(
iPad
)
.*OS
\s([\d
_
]
+
)
/
);
c
&&
(
this
.
os
.
ios
=
this
.
os
.
ipad
=!
0
,
this
.
os
.
version
=
c
[
2
].
replace
(
/_/g
,
"
.
"
))}
return
this
.
os
.
ios
===!
0
}];[].
every
.
call
(
c
,
function
(
b
){
return
!
b
.
call
(
a
)})}
b
.
call
(
a
,
navigator
.
userAgent
)}(
mui
),
function
(
a
){
function
b
(
a
){
this
.
os
=
this
.
os
||
{};
var
b
=
a
.
match
(
/Html5Plus/i
);
b
&&
(
this
.
os
.
plus
=!
0
)}
b
.
call
(
a
,
navigator
.
userAgent
)}(
mui
),
function
(
a
){
var
b
=
[];
a
.
global
=
a
.
options
=
{
gestureConfig
:{
tap
:
!
0
,
doubletap
:
!
0
,
longtap
:
!
0
,
swipe
:
!
0
,
drag
:
!
0
}},
a
.
initGlobal
=
function
(
b
){
return
a
.
options
=
a
.
extend
(
a
.
global
,
b
,
!
0
),
this
},
a
.
init
=
function
(
c
){
return
a
.
options
=
a
.
extend
(
a
.
global
,
c
||
{},
!
0
),
a
.
ready
(
function
(){
for
(
var
c
=
0
,
d
=
b
.
length
;
d
>
c
;
c
++
)
b
[
c
].
call
(
a
)}),
this
},
a
.
init
.
add
=
function
(
a
){
b
.
push
(
a
)}}(
mui
),
function
(
a
){
var
b
=
{
optimize
:
!
0
,
swipeBack
:
!
1
,
preloadPages
:[],
preloadLimit
:
10
},
c
=
{
duration
:
a
.
os
.
ios
?
200
:
100
,
aniShow
:
"
slide-in-right
"
};
a
.
options
.
show
&&
(
c
=
a
.
extend
(
c
,
a
.
options
.
show
,
!
0
)),
a
.
currentWebview
=
null
,
a
.
isHomePage
=!
1
,
a
.
extend
(
a
.
global
,
b
),
a
.
extend
(
a
.
options
,
b
),
a
.
waitingOptions
=
function
(
b
){
return
a
.
extend
({},
b
)},
a
.
showOptions
=
function
(
b
){
return
a
.
extend
(
c
,
b
)},
a
.
windowOptions
=
function
(
b
){
return
a
.
extend
({
scalable
:
!
1
,
bounce
:
""
},
b
)},
a
.
plusReady
=
function
(
a
){
return
window
.
plus
?
a
():
document
.
addEventListener
(
"
plusready
"
,
function
(){
a
()},
!
1
),
this
},
a
.
fire
=
function
(
a
,
b
,
c
){
a
&&
a
.
evalJS
(
"
mui&&mui.receive('
"
+
b
+
"
','
"
+
JSON
.
stringify
(
c
||
{})
+
"
')
"
)},
a
.
receive
=
function
(
b
,
c
){
b
&&
(
c
=
JSON
.
parse
(
c
),
a
.
trigger
(
document
,
b
,
c
))};
var
d
=
function
(
b
){
if
(
!
b
.
preloaded
){
a
.
fire
(
b
,
"
preload
"
);
for
(
var
c
=
b
.
children
(),
d
=
0
;
d
<
c
.
length
;
d
++
)
a
.
fire
(
c
[
d
],
"
preload
"
);
b
.
preloaded
=!
0
}},
e
=
function
(
b
,
c
,
d
){
if
(
d
){
if
(
!
b
[
c
+
"
ed
"
]){
a
.
fire
(
b
,
c
);
for
(
var
e
=
b
.
children
(),
f
=
0
;
f
<
e
.
length
;
f
++
)
a
.
fire
(
e
[
f
],
c
);
b
[
c
+
"
ed
"
]
=!
0
}}
else
{
a
.
fire
(
b
,
c
);
for
(
var
e
=
b
.
children
(),
f
=
0
;
f
<
e
.
length
;
f
++
)
a
.
fire
(
e
[
f
],
c
)}};
a
.
openWindow
=
function
(
b
,
c
,
f
){
if
(
window
.
plus
){
"
object
"
==
typeof
b
?(
f
=
b
,
b
=
f
.
url
,
c
=
f
.
id
||
b
):
"
object
"
==
typeof
c
?(
f
=
c
,
c
=
b
):
c
=
c
||
b
,
f
=
f
||
{};
var
g
,
h
,
i
=
f
.
params
||
{};
if
(
a
.
webviews
[
c
]){
var
j
=
a
.
webviews
[
c
];
if
(
j
.
preload
)
return
g
=
j
.
webview
,
g
&&
g
.
getURL
()
||
(
f
=
a
.
extend
(
f
,{
id
:
c
,
url
:
b
,
showAfterLoad
:
f
.
showAfterLoad
===!
1
?
!
1
:
!
0
,
preload
:
!
0
}),
g
=
a
.
createWindow
(
f
)),
h
=
j
.
show
,
h
=
f
.
show
?
a
.
extend
(
h
,
f
.
show
):
h
,
g
.
show
(
h
.
aniShow
,
h
.
duration
,
function
(){
d
(
g
),
e
(
g
,
"
pagebeforeshow
"
,
!
1
)}),
j
.
afterShowMethodName
&&
g
.
evalJS
(
j
.
afterShowMethodName
+
"
('
"
+
JSON
.
stringify
(
i
)
+
"
')
"
),
this
;
f
=
a
.
extend
(
j
,
a
.
extend
(
f
,{
id
:
c
,
url
:
b
,
showAfterLoad
:
f
.
showAfterLoad
===!
1
?
!
1
:
!
0
})),
g
=
a
.
createWindow
(
f
)}
else
f
=
a
.
extend
(
f
,{
id
:
c
,
url
:
b
,
showAfterLoad
:
f
.
showAfterLoad
===!
1
?
!
1
:
!
0
}),
g
=
a
.
createWindow
(
f
);
if
(
f
.
showAfterLoad
){
var
k
=
a
.
waitingOptions
(
f
.
waiting
),
l
=
plus
.
nativeUI
.
showWaiting
(
k
.
title
||
""
,
k
.
options
);
h
=
a
.
showOptions
(
f
.
show
),
g
.
addEventListener
(
"
loaded
"
,
function
(){
l
.
close
(),
g
.
show
(
h
.
aniShow
,
h
.
duration
,
function
(){
d
(
g
),
e
(
g
,
"
pagebeforeshow
"
,
!
1
)}),
g
.
showed
=!
0
,
f
.
afterShowMethodName
&&
g
.
evalJS
(
f
.
afterShowMethodName
+
"
('
"
+
JSON
.
stringify
(
i
)
+
"
')
"
)},
!
1
)}
return
g
}},
a
.
createWindow
=
function
(
b
,
c
){
if
(
window
.
plus
){
var
d
,
e
=
b
.
id
||
b
.
url
;
if
(
b
.
preload
){
a
.
webviews
[
e
]
&&
a
.
webviews
[
e
].
webview
.
getURL
()?
d
=
a
.
webviews
[
e
].
webview
:(
d
=
plus
.
webview
.
create
(
b
.
url
,
e
,
a
.
windowOptions
(
b
.
styles
),{
preload
:
!
0
}),
b
.
subpages
&&
a
.
each
(
b
.
subpages
,
function
(
b
,
c
){
var
e
=
plus
.
webview
.
create
(
c
.
url
,
c
.
id
||
c
.
url
,
a
.
windowOptions
(
c
.
styles
),{
preload
:
!
0
});
d
.
append
(
e
)})),
a
.
webviews
[
e
]
=
{
webview
:
d
,
preload
:
!
0
,
show
:
a
.
showOptions
(
b
.
show
),
afterShowMethodName
:
b
.
afterShowMethodName
};
var
f
=
a
.
data
.
preloads
,
g
=
f
.
indexOf
(
e
);
if
(
~
g
&&
f
.
splice
(
g
,
1
),
f
.
push
(
e
),
f
.
length
>
a
.
options
.
preloadLimit
){
var
h
=
a
.
data
.
preloads
.
shift
(),
i
=
a
.
webviews
[
h
];
i
&&
i
.
webview
&&
a
.
closeAll
(
i
.
webview
),
delete
a
.
webviews
[
h
]}}
else
c
!==!
1
&&
(
d
=
plus
.
webview
.
create
(
b
.
url
,
e
,
a
.
windowOptions
(
b
.
styles
)),
b
.
subpages
&&
a
.
each
(
b
.
subpages
,
function
(
b
,
c
){
var
e
=
plus
.
webview
.
create
(
c
.
url
,
c
.
id
||
c
.
url
,
a
.
windowOptions
(
c
.
styles
));
d
.
append
(
e
)}));
return
d
}},
a
.
closeOpened
=
function
(
b
){
var
c
=
b
.
opened
();
if
(
c
)
for
(
var
d
=
0
,
e
=
c
.
length
;
e
>
d
;
d
++
){
var
f
=
c
[
d
],
g
=
f
.
opened
();
g
&&
g
.
length
>
0
?
a
.
closeOpened
(
f
):
f
.
parent
()
!==
b
&&
f
.
close
(
"
none
"
)}},
a
.
closeAll
=
function
(
b
,
c
){
a
.
closeOpened
(
b
),
c
?
b
.
close
(
c
):
b
.
close
()},
a
.
createWindows
=
function
(
b
){
a
.
each
(
b
,
function
(
b
,
c
){
a
.
createWindow
(
c
,
!
1
)})},
a
.
appendWebview
=
function
(
b
){
if
(
window
.
plus
){
var
c
,
d
=
b
.
id
||
b
.
url
;
return
a
.
webviews
[
d
]
||
(
c
=
plus
.
webview
.
create
(
b
.
url
,
d
,
b
.
styles
),
c
.
addEventListener
(
"
loaded
"
,
function
(){
a
.
currentWebview
.
append
(
c
)}),
a
.
webviews
[
d
]
=
b
),
c
}},
a
.
webviews
=
{},
a
.
data
.
preloads
=
[],
a
.
init
.
add
(
function
(){
var
b
=
a
.
options
,
c
=
b
.
subpages
||
[];
a
.
plusReady
(
function
(){
a
.
currentWebview
=
plus
.
webview
.
currentWebview
(),
a
.
each
(
c
,
function
(
b
,
c
){
a
.
appendWebview
(
c
)}),
a
.
currentWebview
==
plus
.
webview
.
getWebviewById
(
plus
.
runtime
.
appid
)
&&
(
a
.
isHomePage
=!
0
,
setTimeout
(
function
(){
d
(
a
.
currentWebview
)},
300
))})}),
window
.
addEventListener
(
"
preload
"
,
function
(){
var
b
=
a
.
options
.
preloadPages
||
[];
a
.
plusReady
(
function
(){
a
.
each
(
b
,
function
(
b
,
c
){
a
.
createWindow
(
a
.
extend
(
c
,{
preload
:
!
0
}))})})})}(
mui
),
function
(
a
){
a
.
init
.
add
(
function
(){
var
b
=
a
.
options
;
b
.
titleBar
&&
a
.
titleBar
(
b
.
titleBar
),
a
.
os
.
ios
&&
a
.
plusReady
(
function
(){
var
b
=
a
.
options
.
statusBarBackground
?
a
.
options
.
statusBarBackground
:
"
#f7f7f7
"
;
plus
.
navigator
.
setStatusBarBackground
(
b
)})})}(
mui
),
function
(
a
){
a
.
init
.
add
(
function
(){
var
b
=
a
.
options
,
c
=
b
.
pullRefresh
||
{};
if
(
a
.
os
.
plus
&&
a
.
os
.
android
)
c
.
down
&&
a
.
plus_pulldownRefresh
(
c
.
down
);
else
{
var
d
=
c
.
container
;
if
(
d
){
var
e
=
a
(
d
);
1
===
e
.
length
&&
e
.
pullRefresh
(
c
)}}})}(
mui
),
function
(
a
,
b
,
c
){
a
.
titleBar
=
function
(
b
){
return
b
=
a
.
extend
({
template
:
"
top.html
"
,
height
:
"
48px
"
},
b
),
a
.
options
.
optimize
&&
a
.
os
.
plus
?
a
.
plusReady
(
function
(){
var
c
=
plus
.
webview
.
create
(
b
.
template
,
null
,{
scalable
:
!
1
,
position
:
"
dock
"
,
dock
:
"
top
"
,
height
:
b
.
height
});
c
.
addEventListener
(
"
loaded
"
,
function
(){
c
.
evalJS
(
'
document.querySelector(".mui-title").innerHTML="
'
+
b
.
title
+
'
"
'
)});
var
d
=
b
.
pulldownRefresh
||
{},
e
=
d
.
container
;
e
?
c
.
append
(
a
.
currentWebview
):
a
.
currentWebview
.
append
(
c
)}):
a
.
get
(
b
.
template
,
function
(
a
){
var
d
=
a
.
match
(
/<body
[^
>
]
*>
([\s\S
.
]
*
)
<
\/
body>/i
)[
0
],
e
=
c
.
createElement
(
"
div
"
);
for
(
e
.
innerHTML
=
d
;
e
.
firstChild
;)
c
.
body
.
insertBefore
(
e
.
firstChild
,
c
.
body
.
firstChild
);
if
(
b
.
title
){
var
f
=
c
.
body
.
querySelector
(
"
.mui-bar .mui-title
"
);
f
&&
(
f
.
innerHTML
=
b
.
title
)}}),
this
}}(
mui
,
window
,
document
),
function
(
a
){
a
.
get
=
function
(
a
,
c
,
d
){
b
(
"
GET
"
,
a
,
c
,
d
)},
a
.
post
=
function
(
a
,
c
,
d
){
b
(
"
POST
"
,
a
,
c
,
d
)};
var
b
=
function
(
a
,
b
,
c
,
d
){
var
e
=
new
XMLHttpRequest
,
f
=
/^
([\w
-
]
+:
)\/\/
/
.
test
(
b
)?
RegExp
.
$1
:
window
.
location
.
protocol
;
e
.
onreadystatechange
=
function
(){
4
===
e
.
readyState
&&
(
e
.
status
>=
200
&&
e
.
status
<
300
||
304
===
e
.
status
||
0
===
e
.
status
&&
"
file:
"
===
f
?
c
&&
c
(
e
.
responseText
):
d
&&
d
())},
e
.
open
(
a
,
b
,
!
0
),
e
.
send
()}}(
mui
),
function
(
a
,
b
,
c
){
a
.
offset
=
function
(
a
){
var
d
=
{
top
:
0
,
left
:
0
};
return
typeof
a
.
getBoundingClientRect
!==
c
&&
(
d
=
a
.
getBoundingClientRect
()),{
top
:
d
.
top
+
b
.
pageYOffset
-
a
.
clientTop
,
left
:
d
.
left
+
b
.
pageXOffset
-
a
.
clientLeft
}}}(
mui
,
window
),
function
(
a
,
b
){
a
.
scrollTo
=
function
(
a
,
c
,
d
){
c
=
c
||
1
e3
;
var
e
=
function
(
c
){
if
(
0
>=
c
)
return
void
(
d
&&
d
());
var
f
=
a
-
b
.
scrollY
;
setTimeout
(
function
(){
b
.
scrollTo
(
0
,
b
.
scrollY
+
f
/
c
*
10
),
e
(
c
-
10
)},
16.7
)};
e
(
c
)}}(
mui
,
window
),
function
(
a
,
b
,
c
){
var
d
=
"
mui-pull-top-pocket
"
,
e
=
"
mui-pull-bottom-pocket
"
,
f
=
"
mui-pull
"
,
g
=
"
mui-pull-loading
"
,
h
=
"
mui-pull-caption
"
,
i
=
h
+
"
-down
"
,
j
=
h
+
"
-over
"
,
k
=
h
+
"
-refresh
"
,
l
=
"
mui-icon
"
,
m
=
"
mui-icon-spinner
"
,
n
=
"
mui-icon-pulldown
"
,
o
=
"
mui-spin
"
,
p
=
"
mui-in
"
,
q
=
"
mui-reverse
"
,
r
=
g
+
"
"
+
l
+
"
"
+
n
+
"
"
+
q
,
s
=
g
+
"
"
+
l
+
"
"
+
n
,
t
=
g
+
"
"
+
l
+
"
"
+
m
+
"
"
+
o
,
u
=
{
down
:{
height
:
50
,
contentdown
:
"
下拉可以刷新
"
,
contentover
:
"
释放立即刷新
"
,
contentrefresh
:
"
正在刷新...
"
},
up
:{
height
:
50
,
contentdown
:
"
上拉显示更多
"
,
contentover
:
"
释放立即刷新
"
,
contentrefresh
:
"
正在刷新...
"
,
duration
:
300
}},
v
=
[
'
<div class="
'
+
f
+
'
">
'
,
'
<div class="
'
+
s
+
'
"></div>
'
,
'
<div class="
'
+
h
+
'
">
'
,
'
<span class="
'
+
i
+
"
"
+
p
+
'
">{downCaption}</span>
'
,
'
<span class="
'
+
j
+
'
">{overCaption}</span>
'
,
'
<span class="
'
+
k
+
'
">{refreshCaption}</span>
'
,
"
</div>
"
,
"
</div>
"
],
w
=
function
(
b
,
c
){
this
.
element
=
b
,
this
.
options
=
a
.
extend
(
u
,
c
,
!
0
),
this
.
options
.
up
.
height
=-
this
.
options
.
up
.
height
,
this
.
pullOptions
=
null
,
this
.
init
()};
w
.
prototype
.
init
=
function
(){
this
.
element
.
style
.
webkitTransform
=
"
translate3d(0,0,0)
"
,
this
.
element
.
style
.
position
=
"
relative
"
,
this
.
element
.
style
[
"
-webkit-backface-visibility
"
]
=
"
hidden
"
,
this
.
translateY
=
0
,
this
.
lastTranslateY
=
0
,
this
.
initPocket
(),
this
.
initEvent
()},
w
.
prototype
.
initPocket
=
function
(){
var
a
=
this
.
options
;
a
.
down
&&
a
.
down
.
hasOwnProperty
(
"
callback
"
)
&&
(
this
.
topPocket
=
this
.
element
.
querySelector
(
"
.
"
+
d
),
this
.
topPocket
||
(
this
.
topPocket
=
this
.
createPocket
(
d
,
a
.
down
),
this
.
element
.
insertBefore
(
this
.
topPocket
,
this
.
element
.
firstChild
))),
a
.
up
&&
a
.
up
.
hasOwnProperty
(
"
callback
"
)
&&
(
this
.
bottomPocket
=
this
.
element
.
querySelector
(
"
.
"
+
e
),
this
.
bottomPocket
||
(
this
.
bottomPocket
=
this
.
createPocket
(
e
,
a
.
up
),
this
.
element
.
appendChild
(
this
.
bottomPocket
)))},
w
.
prototype
.
createPocket
=
function
(
a
,
b
){
var
d
=
c
.
createElement
(
"
div
"
);
return
d
.
className
=
a
,
d
.
innerHTML
=
v
.
join
(
""
).
replace
(
"
{downCaption}
"
,
b
.
contentdown
).
replace
(
"
{overCaption}
"
,
b
.
contentover
).
replace
(
"
{refreshCaption}
"
,
b
.
contentrefresh
),
d
},
w
.
prototype
.
initEvent
=
function
(){
var
a
=
this
;
a
.
bottomPocket
&&
a
.
element
.
addEventListener
(
"
dragup
"
,
function
(
b
){
a
.
dragUp
(
b
)}),
a
.
topPocket
&&
a
.
element
.
addEventListener
(
"
dragdown
"
,
function
(
b
){
a
.
dragDown
(
b
)}),(
a
.
bottomPocket
||
a
.
topPocket
)
&&
(
a
.
element
.
addEventListener
(
"
dragstart
"
,
function
(
b
){
a
.
dragStart
(
b
)}),
a
.
element
.
addEventListener
(
"
drag
"
,
function
(
b
){
var
c
=
b
.
detail
.
direction
;
a
.
dragDirection
&&
"
up
"
!==
c
&&
"
down
"
!==
c
&&
a
.
pullOptions
&&
(
a
.
pullOptions
.
height
>
0
?
a
.
dragDown
(
b
):
a
.
dragUp
(
b
))}),
a
.
element
.
addEventListener
(
"
dragend
"
,
function
(
b
){
a
.
dragEnd
(
b
)}))},
w
.
prototype
.
dragStart
=
function
(
a
){
var
b
=
a
.
detail
;(
"
up
"
===
b
.
direction
||
"
down
"
===
b
.
direction
)
&&
(
this
.
element
.
style
.
webkitTransitionDuration
=
"
0s
"
,
this
.
isLoading
=
this
.
dragDirection
=!
1
)},
w
.
prototype
.
dragUp
=
function
(
a
){
var
d
=
this
;
if
(
!
d
.
isLoading
&&
"
down
"
!==
d
.
dragDirection
){
var
e
=
c
.
body
.
scrollHeight
;
!
d
.
dragDirection
&&
b
.
innerHeight
+
b
.
scrollY
+
40
<
e
||
(
b
.
scrollTo
(
0
,
e
),
d
.
pullOptions
=
d
.
options
.
up
,
d
.
loading
=
d
.
bottomPocket
.
querySelector
(
"
.
"
+
g
),
d
.
drag
(
a
))}},
w
.
prototype
.
dragDown
=
function
(
a
){
var
c
=
this
;
if
(
!
c
.
isLoading
&&
"
up
"
!==
c
.
dragDirection
){
var
d
=
b
.
scrollY
;
!
c
.
dragDirection
&&
d
>
5
||
(
0
!==
d
&&
b
.
scrollTo
(
0
,
0
),
c
.
pullOptions
=
c
.
options
.
down
,
c
.
loading
=
c
.
topPocket
.
querySelector
(
"
.
"
+
g
),
c
.
drag
(
a
))}},
w
.
prototype
.
drag
=
function
(
a
){
this
.
pullOptions
&&
(
this
.
pullOptions
.
height
>
0
&&
a
.
detail
.
deltaY
<
0
||
(
this
.
dragDirection
=
this
.
pullOptions
.
height
>
0
?
"
down
"
:
"
up
"
,
this
.
requestAnimationFrame
||
this
.
updateTranslate
(),
a
.
detail
.
gesture
.
preventDefault
(),
this
.
translateY
=
.
4
*
a
.
detail
.
deltaY
))},
w
.
prototype
.
dragEnd
=
function
(
b
){
var
c
=
this
;
c
.
pullOptions
&&
(
cancelAnimationFrame
(
c
.
requestAnimationFrame
),
Math
.
abs
(.
4
*
b
.
detail
.
deltaY
)
>=
Math
.
abs
(
c
.
pullOptions
.
height
)?
c
.
load
():
this
.
hide
(),
a
.
gestures
.
stoped
=!
0
)},
w
.
prototype
.
hide
=
function
(){
this
.
translateY
=
0
,
this
.
requestAnimationFrame
&&
(
cancelAnimationFrame
(
this
.
requestAnimationFrame
),
this
.
requestAnimationFrame
=
null
),
this
.
element
.
style
.
webkitTransitionDuration
=
"
0.5s
"
,
this
.
setTranslate
(
0
),
this
.
setCaption
(
i
),
this
.
pullOptions
.
height
>
0
&&
this
.
loading
.
classList
.
remove
(
q
),
this
.
pullOptions
=
null
},
w
.
prototype
.
updateTranslate
=
function
(){
var
a
=
this
;
a
.
translateY
!==
a
.
lastTranslateY
&&
(
a
.
translateY
=
Math
.
abs
(
a
.
translateY
)
<
2
?
0
:
a
.
translateY
,
a
.
setTranslate
(
a
.
translateY
),
Math
.
abs
(
a
.
translateY
)
>=
Math
.
abs
(
a
.
pullOptions
.
height
)?
a
.
showLoading
(
j
):
a
.
hideLoading
(
i
),
a
.
lastTranslateY
=
a
.
translateY
),
a
.
requestAnimationFrame
=
requestAnimationFrame
(
function
(){
a
.
updateTranslate
()})},
w
.
prototype
.
setTranslate
=
function
(
a
){
this
.
element
.
style
.
webkitTransform
=
"
translate3d(0,
"
+
a
+
"
px,0)
"
,
this
.
bottomPocket
&&
(
0
>
a
?
this
.
bottomPocket
.
style
.
bottom
=
(
a
>
this
.
pullOptions
.
height
?
a
:
this
.
pullOptions
.
height
)
+
"
px
"
:
0
===
a
&&
this
.
bottomPocket
.
setAttribute
(
"
style
"
,
""
))},
w
.
prototype
.
load
=
function
(){
var
d
=
this
;
d
.
isLoading
=!
0
,
d
.
showLoading
(
k
),
d
.
setTranslate
(
d
.
pullOptions
.
height
);
var
e
=
d
.
pullOptions
.
callback
;
e
&&
e
(
function
(){
if
(
d
.
pullOptions
&&
d
.
pullOptions
.
height
<
0
){
var
e
=
Math
.
min
(
1
e3
,
d
.
pullOptions
.
duration
);
setTimeout
(
function
(){
a
.
scrollTo
(
c
.
body
.
scrollHeight
-
b
.
innerHeight
,
e
,
function
(){
d
.
isLoading
=!
1
})},
100
)}
else
d
.
isLoading
=!
1
;
d
.
hide
()})},
w
.
prototype
.
showLoading
=
function
(
a
){
this
.
setCaption
(
a
)},
w
.
prototype
.
hideLoading
=
function
(
a
){
this
.
setCaption
(
a
)},
w
.
prototype
.
setCaption
=
function
(
a
){
var
b
=
this
.
pullOptions
&&
this
.
pullOptions
.
height
>
0
?
this
.
topPocket
:
this
.
bottomPocket
;
if
(
b
){
var
c
=
b
.
querySelector
(
"
.
"
+
h
),
d
=
c
.
querySelector
(
"
.
"
+
p
);
d
&&
d
.
classList
.
remove
(
p
);
var
e
=
c
.
querySelector
(
"
.
"
+
a
);
e
&&
e
.
classList
.
add
(
p
),
this
.
loading
.
className
=
this
.
pullOptions
&&
this
.
pullOptions
.
height
>
0
?
a
===
k
?
t
:
a
===
j
?
r
:
s
:
t
}},
a
.
fn
.
pullRefresh
=
function
(
b
){
this
.
each
(
function
(){
var
c
=
this
.
getAttribute
(
"
data-pullrefresh
"
);
if
(
!
c
){
var
d
=++
a
.
uuid
;
a
.
data
[
d
]
=
new
w
(
this
,
b
),
this
.
setAttribute
(
"
data-pullrefresh
"
,
d
)}})}}(
mui
,
window
,
document
),
function
(
a
){
var
b
=
{
height
:
50
,
contentdown
:
"
下拉可以刷新
"
,
contentover
:
"
释放立即刷新
"
,
contentrefresh
:
"
正在刷新...
"
};
a
.
plus_pulldownRefresh
=
function
(
c
){
c
=
a
.
extend
(
b
,
c
,
!
0
),
a
.
plusReady
(
function
(){
var
b
=
document
.
body
,
d
=
b
.
getAttribute
(
"
data-pullrefresh-plus
"
);
if
(
!
d
){
d
=++
a
.
uuid
,
b
.
setAttribute
(
"
data-pullrefresh-plus
"
,
d
);
var
e
=
a
.
currentWebview
;
e
.
setPullToRefresh
({
support
:
!
0
,
height
:
c
.
height
+
"
px
"
,
range
:
"
200px
"
,
contentdown
:{
caption
:
c
.
contentdown
},
contentover
:{
caption
:
c
.
contentover
},
contentrefresh
:{
caption
:
c
.
contentrefresh
}},
function
(){
c
.
callback
&&
c
.
callback
(
function
(){
e
.
endPullToRefresh
()})})}})}}(
mui
),
function
(
a
,
b
,
c
,
d
){
var
e
=
"
mui-off-canvas-left
"
,
f
=
"
mui-off-canvas-right
"
,
g
=
"
mui-off-canvas-backdrop
"
,
h
=
"
mui-off-canvas-wrap
"
,
i
=
"
mui-off-canvas-height-fixed
"
,
j
=
"
mui-left
"
,
k
=
"
mui-right
"
,
l
=
"
mui-sliding
"
,
m
=
"
.mui-inner-wrap
"
,
n
=
function
(
a
){
if
(
parentNode
=
a
.
parentNode
){
if
(
parentNode
.
classList
.
contains
(
h
))
return
parentNode
;
if
(
parentNode
=
parentNode
.
parentNode
,
parentNode
.
classList
.
contains
(
h
))
return
parentNode
}},
o
=
function
(
b
,
d
){
if
(
d
.
classList
&&
d
.
classList
.
contains
(
g
)){
var
e
=
n
(
d
);
if
(
e
)
return
a
.
targets
.
_container
=
e
,
d
}
else
if
(
"
A
"
===
d
.
tagName
&&
d
.
hash
){
var
f
=
c
.
getElementById
(
d
.
hash
.
replace
(
"
#
"
,
""
));
if
(
f
){
var
e
=
n
(
f
);
if
(
e
)
return
a
.
targets
.
_container
=
e
,
f
}}
return
!
1
};
a
.
registerTarget
({
name
:
d
,
index
:
60
,
handle
:
o
,
target
:
!
1
,
isReset
:
!
1
,
isContinue
:
!
0
});
var
p
=
function
(
a
,
b
){
var
d
=
a
.
querySelector
(
"
.mui-content
"
),
e
=
c
.
getElementsByTagName
(
"
html
"
)[
0
],
f
=
c
.
body
;
b
?(
e
.
classList
.
add
(
i
),
f
.
classList
.
add
(
i
),
d
&&
d
.
classList
.
add
(
i
)):(
e
.
classList
.
remove
(
i
),
f
.
classList
.
remove
(
i
),
d
&&
d
.
classList
.
remove
(
i
))},
q
=
function
(){
var
a
=
this
.
parentNode
;
a
.
classList
.
remove
(
l
),
this
.
removeEventListener
(
"
webkitTransitionEnd
"
,
q
),
a
.
classList
.
contains
(
k
)
||
a
.
classList
.
contains
(
j
)
||
p
(
a
,
!
1
)},
r
=
function
(
a
,
b
){
if
(
a
&&
b
){
var
c
=
b
.
classList
;
a
.
querySelector
(
m
).
addEventListener
(
"
webkitTransitionEnd
"
,
q
),
a
.
classList
.
contains
(
k
)
||
a
.
classList
.
contains
(
j
)
||
p
(
a
,
!
0
),
c
.
contains
(
e
)?
a
.
classList
.
toggle
(
k
):
c
.
contains
(
f
)?
a
.
classList
.
toggle
(
j
):
c
.
contains
(
g
)
&&
(
a
.
classList
.
remove
(
k
),
a
.
classList
.
remove
(
j
)),
a
.
classList
.
add
(
l
)}};
b
.
addEventListener
(
"
tap
"
,
function
(){
a
.
targets
.
offcanvas
&&
r
(
a
.
targets
.
_container
,
a
.
targets
.
offcanvas
)}),
a
.
fn
.
offCanvas
=
function
(){
var
a
=
arguments
;
this
.
each
(
function
(){
if
(
"
show
"
===
a
[
0
]
||
"
hide
"
===
a
[
0
]
||
"
toggle
"
===
a
[
0
]){
var
b
=
this
.
classList
;
if
(
b
.
contains
(
e
)
||
b
.
contains
(
f
)){
var
c
=
n
(
this
);
c
&&
r
(
c
,
this
)}}})}}(
mui
,
window
,
document
,
"
offcanvas
"
),
function
(
a
,
b
,
c
){
if
(
!
a
.
os
.
android
){
var
d
,
e
,
f
,
g
,
h
=
"
mui-slider
"
,
i
=
"
mui-switch
"
,
j
=
"
mui-table-view-cell
"
,
k
=
"
mui-slider-handle
"
,
l
=
"
mui-off-canvas-left
"
,
m
=
"
mui-off-canvas-right
"
,
n
=
"
mui-off-canvas-wrap
"
,
o
=
"
mui-off-canvas-height-fixed
"
,
p
=
"
mui-left
"
,
q
=
"
mui-right
"
,
r
=
"
mui-sliding
"
,
s
=
"
mui-draggable
"
,
t
=
"
.mui-inner-wrap
"
,
u
=
"
.
"
+
l
,
v
=
"
.
"
+
m
,
w
=!
1
,
x
=
1
,
y
=
0
,
z
=
0
,
A
=
0
,
B
=
0
,
C
=
function
(){
y
!==
z
&&
(
e
.
style
[
"
-webkit-transition-duration
"
]
=
"
0s
"
,
"
right
"
===
g
&&
y
>
0
?(
y
=
Math
.
min
(
y
,
B
),
0
>
A
?
D
(
e
,
A
+
y
):
D
(
e
,
y
)):
"
left
"
===
g
&&
0
>
y
&&
(
y
=
Math
.
max
(
y
,
-
B
),
A
>
0
?
D
(
e
,
A
+
y
):
D
(
e
,
y
)),
z
=
y
),
f
=
requestAnimationFrame
(
function
(){
C
()})},
D
=
function
(
a
,
b
){
a
&&
(
a
.
style
.
webkitTransform
=
"
translate3d(
"
+
b
+
"
px,0,0)
"
)},
E
=
function
(
a
,
b
){
var
d
=
a
.
querySelector
(
"
.mui-content
"
),
e
=
c
.
getElementsByTagName
(
"
html
"
)[
0
],
f
=
c
.
body
;
b
?(
e
.
classList
.
add
(
o
),
f
.
classList
.
add
(
o
),
d
&&
d
.
classList
.
add
(
o
)):(
e
.
classList
.
remove
(
o
),
f
.
classList
.
remove
(
o
),
d
&&
d
.
classList
.
remove
(
o
))},
F
=
function
(){
var
a
=
this
.
parentNode
,
b
=
a
.
classList
;
b
.
remove
(
r
),
this
.
removeEventListener
(
"
webkitTransitionEnd
"
,
F
),
b
.
contains
(
q
)
||
b
.
contains
(
p
)
||
E
(
a
,
!
1
)};
b
.
addEventListener
(
"
touchstart
"
,
function
(
a
){
var
b
=
a
.
target
;
for
(
w
=!
1
,
d
=
e
=
null
;
b
&&
b
!==
c
;
b
=
b
.
parentNode
){
var
f
=
b
.
classList
;
if
(
f
){
if
(
f
.
contains
(
i
))
break
;
if
(
f
.
contains
(
j
)
&&
b
.
querySelector
(
"
.
"
+
k
))
break
;
if
(
f
.
contains
(
h
))
break
;
if
(
f
.
contains
(
n
)
&&
f
.
contains
(
s
)){
if
(
d
=
b
,
e
=
d
.
querySelector
(
t
),
!
e
)
return
;
break
}}}}),
b
.
addEventListener
(
"
dragstart
"
,
function
(
b
){
if
(
d
){
var
c
=
b
.
detail
;
if
(
"
left
"
===
c
.
direction
?
d
.
classList
.
contains
(
q
)?
w
=!
0
:
d
.
querySelector
(
v
)
&&!
d
.
classList
.
contains
(
p
)
&&
(
w
=!
0
):
"
right
"
===
c
.
direction
&&
(
d
.
classList
.
contains
(
p
)?
w
=!
0
:
d
.
querySelector
(
u
)
&&!
d
.
classList
.
contains
(
q
)
&&
(
w
=!
0
)),
w
){
g
=
c
.
direction
,
B
=
.
8
*
d
.
offsetWidth
;
var
f
=
a
.
getStyles
(
e
,
"
webkitTransform
"
),
h
=
a
.
parseTranslateMatrix
(
f
);
A
=
y
=
h
?
h
.
x
:
0
;
var
i
=
d
.
classList
;
i
.
add
(
r
),
i
.
contains
(
q
)
||
i
.
contains
(
p
)
||
E
(
d
,
!
0
),
c
.
gesture
.
preventDefault
()}}}),
b
.
addEventListener
(
"
drag
"
,
function
(
a
){
if
(
w
){
var
b
=
a
.
detail
;
f
||
C
(),
y
=
b
.
deltaX
*
x
}}),
b
.
addEventListener
(
"
dragend
"
,
function
(){
if
(
w
){
f
&&
(
cancelAnimationFrame
(
f
),
f
=
null
),
e
.
setAttribute
(
"
style
"
,
""
),
e
.
addEventListener
(
"
webkitTransitionEnd
"
,
F
);
var
a
,
b
=
d
.
classList
,
c
=
[
"
add
"
,
"
remove
"
];
"
right
"
===
g
&&
y
>
0
?(
a
=
q
,
0
>
A
&&
(
c
.
reverse
(),
a
=
p
),
y
>
B
/
2
?
b
[
c
[
0
]](
a
):
b
[
c
[
1
]](
a
)):
"
left
"
===
g
&&
0
>
y
&&
(
a
=
p
,
A
>
0
&&
(
c
.
reverse
(),
a
=
q
),
-
y
>
B
/
2
?
b
[
c
[
0
]](
a
):
b
[
c
[
1
]](
a
))}})}}(
mui
,
window
,
document
,
"
offcanvas
"
),
function
(
a
,
b
,
c
,
d
){
var
e
=
"
mui-action
"
,
f
=
function
(
a
,
b
){
return
b
.
className
&&~
b
.
className
.
indexOf
(
e
)?
b
:
!
1
};
a
.
registerTarget
({
name
:
d
,
index
:
50
,
handle
:
f
,
target
:
!
1
})}(
mui
,
window
,
document
,
"
action
"
),
function
(
a
,
b
,
c
,
d
){
var
e
=
"
mui-modal
"
,
f
=
function
(
a
,
b
){
if
(
"
A
"
===
b
.
tagName
&&
b
.
hash
){
var
d
=
c
.
getElementById
(
b
.
hash
.
replace
(
"
#
"
,
""
));
if
(
d
&&
d
.
classList
.
contains
(
e
))
return
d
}
return
!
1
};
a
.
registerTarget
({
name
:
d
,
index
:
50
,
handle
:
f
,
target
:
!
1
,
isReset
:
!
1
,
isContinue
:
!
0
}),
b
.
addEventListener
(
"
tap
"
,
function
(){
a
.
targets
.
modal
&&
a
.
targets
.
modal
.
classList
.
toggle
(
"
mui-active
"
)})}(
mui
,
window
,
document
,
"
modal
"
),
function
(
a
,
b
,
c
,
d
){
var
e
=
"
mui-popover
"
,
f
=
"
mui-bar-popover
"
,
g
=
"
mui-popover-action
"
,
h
=
"
mui-backdrop
"
,
i
=
"
mui-bar-backdrop
"
,
j
=
"
mui-backdrop-action
"
,
k
=
"
mui-active
"
,
l
=
function
(
b
,
d
){
return
"
A
"
===
d
.
tagName
&&
d
.
hash
&&
(
a
.
targets
.
_popover
=
c
.
getElementById
(
d
.
hash
.
replace
(
"
#
"
,
""
)),
a
.
targets
.
_popover
&&
a
.
targets
.
_popover
.
classList
.
contains
(
e
))?
d
:
!
1
};
a
.
registerTarget
({
name
:
d
,
index
:
60
,
handle
:
l
,
target
:
!
1
,
isReset
:
!
1
,
isContinue
:
!
0
});
var
m
=
function
(
a
){
a
?
c
.
body
.
setAttribute
(
"
style
"
,
"
position:fixed;width:100%;height:100%;overflow:hidden;
"
):
c
.
body
.
setAttribute
(
"
style
"
,
""
)},
n
=
function
(){
this
.
style
.
display
=
"
none
"
,
this
.
removeEventListener
(
"
webkitTransitionEnd
"
,
n
),
m
(
!
1
)},
o
=
function
(){
var
b
=
c
.
createElement
(
"
div
"
);
return
b
.
classList
.
add
(
h
),
b
.
addEventListener
(
"
tap
"
,
function
(){
var
b
=
a
.
targets
.
_popover
;
b
&&
(
b
.
addEventListener
(
"
webkitTransitionEnd
"
,
n
),
b
.
classList
.
remove
(
k
),
b
.
parentNode
.
removeChild
(
o
))}),
b
}();
b
.
addEventListener
(
"
tap
"
,
function
(){
a
.
targets
.
popover
&&
p
(
a
.
targets
.
_popover
,
a
.
targets
.
popover
)});
var
p
=
function
(
a
,
d
){
o
.
classList
.
remove
(
i
),
o
.
classList
.
remove
(
j
);
var
e
=
c
.
querySelector
(
"
.mui-popover.mui-active
"
);
if
(
!
e
||
(
e
.
style
.
display
=
"
none
"
,
e
.
classList
.
remove
(
k
),
e
.
removeEventListener
(
"
webkitTransitionEnd
"
,
n
),
m
(
!
1
),
e
.
parentNode
.
removeChild
(
o
),
a
!==
e
)){
if
(
a
.
classList
.
contains
(
f
)
||
a
.
classList
.
contains
(
g
))
if
(
a
.
classList
.
contains
(
g
))
o
.
classList
.
add
(
j
);
else
if
(
o
.
classList
.
add
(
i
),
d
&&
d
.
parentNode
){
var
h
=
d
.
offsetWidth
,
l
=
d
.
offsetLeft
,
p
=
b
.
innerWidth
;
a
.
style
.
left
=
Math
.
min
(
Math
.
max
(
l
,
5
),
p
-
h
-
5
)
+
"
px
"
}
a
.
style
.
display
=
"
block
"
,
a
.
offsetHeight
,
a
.
classList
.
add
(
k
),
a
.
parentNode
.
appendChild
(
o
),
m
(
!
0
),
o
.
classList
.
add
(
k
)}};
a
.
fn
.
popover
=
function
(){
var
b
=
arguments
;
this
.
each
(
function
(){
a
.
targets
.
_popover
=
this
,(
"
show
"
===
b
[
0
]
||
"
hide
"
===
b
[
0
]
||
"
toggle
"
===
b
[
0
])
&&
p
(
this
,
b
[
1
])})}}(
mui
,
window
,
document
,
"
popover
"
),
function
(
a
,
b
,
c
,
d
){
var
e
=
"
mui-control-item
"
,
f
=
"
mui-control-content
"
,
g
=
"
mui-tab-item
"
,
h
=
function
(
a
,
b
){
return
b
.
classList
&&
(
b
.
classList
.
contains
(
e
)
||
b
.
classList
.
contains
(
g
))?
b
:
!
1
};
a
.
registerTarget
({
name
:
d
,
index
:
80
,
handle
:
h
,
target
:
!
1
}),
b
.
addEventListener
(
"
tap
"
,
function
(){
var
b
=
a
.
targets
[
d
];
if
(
b
){
var
e
,
g
,
h
,
i
=
"
mui-active
"
,
j
=
"
.
"
+
i
;
e
=
b
.
parentNode
.
querySelector
(
j
),
e
&&
e
.
classList
.
remove
(
i
);
var
k
=
b
===
e
;
if
(
b
&&
b
.
classList
.
add
(
i
),
b
.
hash
&&
(
h
=
c
.
getElementById
(
b
.
hash
.
replace
(
"
#
"
,
""
)))){
if
(
!
h
.
classList
.
contains
(
f
))
return
void
b
.
classList
[
k
?
"
remove
"
:
"
add
"
](
i
);
if
(
!
k
){
g
=
h
.
parentNode
.
getElementsByClassName
(
i
);
for
(
var
l
=
0
;
l
<
g
.
length
;
l
++
)
g
[
l
].
classList
.
remove
(
i
);
h
.
classList
.
add
(
i
);
var
m
=
h
.
parentNode
.
querySelectorAll
(
"
.
"
+
f
);
a
.
trigger
(
h
,
a
.
eventName
(
"
shown
"
,
d
),{
tabNumber
:
Array
.
prototype
.
indexOf
.
call
(
m
,
h
)})}}}})}(
mui
,
window
,
document
,
"
tab
"
),
function
(
a
,
b
){
var
c
=
"
mui-slider
"
,
d
=
"
mui-slider-group
"
,
e
=
"
mui-slider-loop
"
,
f
=
"
mui-slider-indicator
"
,
g
=
"
mui-action-previous
"
,
h
=
"
mui-action-next
"
,
i
=
"
mui-slider-item
"
,
j
=
"
.
"
+
i
,
k
=
"
.
"
+
f
,
l
=
"
.mui-slider-progress-bar
"
,
m
=
function
(
b
,
c
){
this
.
element
=
b
,
this
.
options
=
a
.
extend
({
slideshowDelay
:
0
,
factor
:
1
},
c
),
this
.
init
()};
m
.
prototype
.
init
=
function
(){
this
.
initEvent
(),
this
.
initTimer
()},
m
.
prototype
.
refresh
=
function
(
b
){
var
c
=
a
.
extend
({
slideshowDelay
:
0
,
factor
:
1
},
b
);
this
.
options
.
slideshowDelay
!=
c
.
slideshowDelay
&&
(
this
.
options
.
slideshowDelay
=
c
.
slideshowDelay
,
this
.
options
.
slideshowDelay
&&
this
.
nextItem
())},
m
.
prototype
.
initEvent
=
function
(){
var
b
=
this
,
c
=
b
.
element
,
d
=
c
.
parentNode
;
b
.
translateX
=
0
,
b
.
sliderWidth
=
c
.
offsetWidth
,
b
.
isLoop
=
c
.
classList
.
contains
(
e
),
b
.
sliderLength
=
c
.
querySelectorAll
(
j
).
length
,
b
.
progressBarWidth
=
0
,
b
.
progressBar
=
d
.
querySelector
(
l
),
b
.
progressBar
&&
(
b
.
progressBarWidth
=
b
.
progressBar
.
offsetWidth
);
var
f
=!
1
;
b
.
isSwipeable
=!
1
,
d
.
addEventListener
(
"
dragstart
"
,
function
(
a
){
var
d
=
a
.
detail
,
g
=
d
.
direction
;(
"
left
"
==
g
||
"
right
"
==
g
)
&&
(
f
=!
0
,
b
.
translateX
=
b
.
lastTranslateX
=
0
,
b
.
scrollX
=
b
.
getScroll
(),
b
.
sliderWidth
=
c
.
offsetWidth
,
b
.
isLoop
=
c
.
classList
.
contains
(
e
),
b
.
sliderLength
=
c
.
querySelectorAll
(
j
).
length
,
b
.
progressBar
&&
(
b
.
progressBarWidth
=
b
.
progressBar
.
offsetWidth
),
b
.
maxTranslateX
=
(
b
.
sliderLength
-
1
)
*
b
.
sliderWidth
,
a
.
detail
.
gesture
.
preventDefault
())}),
d
.
addEventListener
(
"
drag
"
,
function
(
a
){
f
&&
b
.
dragItem
(
a
)}),
d
.
addEventListener
(
"
dragend
"
,
function
(){
f
&&
(
b
.
gotoItem
(
b
.
getSlideNumber
()),
f
=
b
.
isSwipeable
=!
1
)}),
d
.
addEventListener
(
"
swipeleft
"
,
function
(
c
){
b
.
isSwipeable
&&
(
a
.
gestures
.
stoped
=!
0
,
b
.
nextItem
(),
f
=
b
.
isSwipeable
=!
1
,
c
.
stopImmediatePropagation
())}),
d
.
addEventListener
(
"
swiperight
"
,
function
(
c
){
b
.
isSwipeable
&&
(
a
.
gestures
.
stoped
=!
0
,
b
.
prevItem
(),
f
=
b
.
isSwipeable
=!
1
,
c
.
stopImmediatePropagation
())}),
d
.
addEventListener
(
"
slide
"
,
function
(
a
){
var
b
=
a
.
detail
;
b
.
slideNumber
=
b
.
slideNumber
||
0
;
var
c
=
d
.
querySelector
(
"
.mui-slider-indicator .mui-number span
"
);
c
&&
(
c
.
innerText
=
b
.
slideNumber
+
1
);
for
(
var
e
=
d
.
querySelectorAll
(
"
.mui-slider-indicator .mui-indicator
"
),
f
=
0
,
g
=
e
.
length
;
g
>
f
;
f
++
)
e
[
f
].
classList
[
f
===
b
.
slideNumber
?
"
add
"
:
"
remove
"
](
"
mui-active
"
);
for
(
var
h
=
d
.
querySelectorAll
(
"
.mui-control-item
"
),
f
=
0
,
g
=
h
.
length
;
g
>
f
;
f
++
)
h
[
f
].
classList
[
f
===
b
.
slideNumber
?
"
add
"
:
"
remove
"
](
"
mui-active
"
)}),
d
.
addEventListener
(
a
.
eventName
(
"
shown
"
,
"
tab
"
),
function
(
a
){
b
.
gotoItem
(
-
(
a
.
detail
.
tabNumber
||
0
))});
var
i
=
c
.
parentNode
.
querySelector
(
k
);
i
&&
i
.
addEventListener
(
"
tap
"
,
function
(
a
){
var
c
=
a
.
target
;(
c
.
classList
.
contains
(
g
)
||
c
.
classList
.
contains
(
h
))
&&
(
b
[
c
.
classList
.
contains
(
g
)?
"
prevItem
"
:
"
nextItem
"
](),
a
.
stopPropagation
())})},
m
.
prototype
.
dragItem
=
function
(
a
){
var
b
=
this
,
c
=
a
.
detail
;
if
(
c
.
deltaX
!==
c
.
lastDeltaX
){
var
d
=
c
.
deltaX
*
b
.
options
.
factor
+
b
.
scrollX
;
b
.
element
.
style
[
"
-webkit-transition-duration
"
]
=
"
0
"
;
var
e
=
0
,
f
=-
b
.
maxTranslateX
;
if
(
b
.
isLoop
&&
(
e
=
b
.
sliderWidth
,
f
+=
e
),
d
>
e
||
f
>
d
)
return
void
(
b
.
isSwipeable
=!
1
);
b
.
requestAnimationFrame
||
b
.
updateTranslate
(),
b
.
isSwipeable
=!
0
,
b
.
translateX
=
d
}
b
.
timer
&&
clearTimeout
(
b
.
timer
),
b
.
timer
=
setTimeout
(
function
(){
b
.
initTimer
()},
100
)},
m
.
prototype
.
updateTranslate
=
function
(){
var
a
=
this
;
a
.
lastTranslateX
!==
a
.
translateX
&&
(
a
.
setTranslate
(
a
.
translateX
),
a
.
lastTranslateX
=
a
.
translateX
),
a
.
requestAnimationFrame
=
requestAnimationFrame
(
function
(){
a
.
updateTranslate
()})},
m
.
prototype
.
setTranslate
=
function
(
a
){
this
.
element
.
style
.
webkitTransform
=
"
translate3d(
"
+
a
+
"
px,0,0)
"
,
this
.
updateProcess
(
a
)},
m
.
prototype
.
updateProcess
=
function
(
a
){
var
b
=
this
.
progressBarWidth
;
b
&&
(
a
=
Math
.
abs
(
a
),
this
.
setProcess
(
a
*
(
b
/
this
.
sliderWidth
)))},
m
.
prototype
.
setProcess
=
function
(
a
){
var
b
=
this
.
progressBar
;
b
&&
(
b
.
style
.
webkitTransform
=
"
translate3d(
"
+
a
+
"
px,0,0)
"
)},
m
.
prototype
.
nextItem
=
function
(){
this
.
gotoItem
(
this
.
getCurrentSlideNumber
(
"
next
"
)
-
1
)},
m
.
prototype
.
prevItem
=
function
(){
this
.
gotoItem
(
this
.
getCurrentSlideNumber
(
"
prev
"
)
+
1
)},
m
.
prototype
.
gotoItem
=
function
(
b
){
var
c
=
this
,
d
=
c
.
element
,
e
=
c
.
sliderLength
;
c
.
isLoop
?
e
-=
2
:(
e
-=
1
,
b
=
Math
.
min
(
0
,
b
),
b
=
Math
.
max
(
b
,
-
e
)),
c
.
requestAnimationFrame
&&
(
cancelAnimationFrame
(
c
.
requestAnimationFrame
),
c
.
requestAnimationFrame
=
null
);
var
f
=
Math
.
max
(
b
,
-
e
)
*
d
.
offsetWidth
;
d
.
style
[
"
-webkit-transition-duration
"
]
=
"
.2s
"
,
c
.
setTranslate
(
f
);
var
g
=
function
(){
d
.
style
[
"
-webkit-transition-duration
"
]
=
"
0
"
,
d
.
style
.
webkitTransform
=
"
translate3d(
"
+
b
*
d
.
offsetWidth
+
"
px,0,0)
"
,
d
.
removeEventListener
(
"
webkitTransitionEnd
"
,
g
)};
d
.
removeEventListener
(
"
webkitTransitionEnd
"
,
g
),
c
.
isLoop
&&
(
1
===
b
||
b
===-
e
)
&&
(
b
=
1
===
b
?
-
e
+
1
:
0
,
d
.
addEventListener
(
"
webkitTransitionEnd
"
,
g
)),
a
.
trigger
(
d
.
parentNode
,
"
slide
"
,{
slideNumber
:
Math
.
abs
(
b
)}),
this
.
initTimer
()},
m
.
prototype
.
getSlideNumber
=
function
(){
return
Math
.
round
(
this
.
getScroll
()
/
this
.
sliderWidth
)},
m
.
prototype
.
getCurrentSlideNumber
=
function
(
a
){
return
Math
[
"
next
"
===
a
?
"
ceil
"
:
"
floor
"
](
this
.
getScroll
()
/
this
.
sliderWidth
)},
m
.
prototype
.
getScroll
=
function
(){
var
b
=
this
.
element
,
c
=
0
;
if
(
"
webkitTransform
"
in
b
.
style
){
var
d
=
a
.
parseTranslate
(
b
.
style
.
webkitTransform
);
c
=
d
?
d
.
x
:
0
}
return
c
},
m
.
prototype
.
initTimer
=
function
(){
var
a
=
this
,
c
=
a
.
options
.
slideshowDelay
;
if
(
c
){
var
d
=
a
.
element
,
e
=
d
.
getAttribute
(
"
data-slidershowTimer
"
);
e
&&
b
.
clearTimeout
(
e
),
e
=
b
.
setTimeout
(
function
(){
d
&&
((
d
.
offsetWidth
||
d
.
offsetHeight
)
&&
a
.
nextItem
(),
a
.
initTimer
())},
c
),
d
.
setAttribute
(
"
data-slidershowTimer
"
,
e
)}},
a
.
fn
.
slider
=
function
(
b
){
this
.
each
(
function
(){
var
e
=
this
;
this
.
classList
.
contains
(
c
)
&&
(
e
=
this
.
querySelector
(
"
.
"
+
d
));
var
f
=
e
.
getAttribute
(
"
data-slider
"
);
if
(
f
){
var
g
=
a
.
data
[
f
];
g
&&
g
.
refresh
(
b
)}
else
f
=++
a
.
uuid
,
a
.
data
[
f
]
=
new
m
(
e
,
b
),
e
.
setAttribute
(
"
data-slider
"
,
f
)})},
a
.
ready
(
function
(){
a
(
"
.mui-slider-group
"
).
slider
()})}(
mui
,
window
),
function
(
a
,
b
,
c
,
d
){
var
e
=
"
mui-switch
"
,
f
=
"
mui-switch-handle
"
,
g
=
"
mui-active
"
,
h
=
"
.
"
+
f
,
i
=
function
(
a
,
b
){
return
b
.
classList
&&
b
.
classList
.
contains
(
e
)?
b
:
!
1
};
a
.
registerTarget
({
name
:
d
,
index
:
100
,
handle
:
i
,
target
:
!
1
});
var
j
,
i
,
k
,
l
,
m
,
n
=
function
(
b
){
if
(
j
){
var
c
=
b
.
detail
;
a
.
gestures
.
stoped
=!
0
;
var
d
=!
c
.
drag
&&!
j
.
classList
.
contains
(
g
)
||
c
.
drag
&&
c
.
deltaX
>
k
/
2
-
l
/
2
;
i
.
style
[
"
-webkit-transition-duration
"
]
=
"
.2s
"
,
d
?(
i
.
style
.
webkitTransform
=
"
translate3d(
"
+
m
+
"
px,0,0)
"
,
j
.
classList
.
add
(
g
)):(
i
.
style
.
webkitTransform
=
"
translate3d(0,0,0)
"
,
j
.
classList
.
remove
(
g
)),
a
.
trigger
(
j
,
"
toggle
"
,{
isActive
:
d
})}},
o
=
function
(
a
){
if
(
j
){
var
b
=
a
.
detail
.
deltaX
;
if
(
0
>
b
)
return
i
.
style
.
webkitTransform
=
"
translate3d(0,0,0)
"
;
if
(
b
>
m
)
return
i
.
style
.
webkitTransform
=
"
translate3d(
"
+
m
+
"
px,0,0)
"
;
i
.
style
[
"
-webkit-transition-duration
"
]
=
"
0s
"
,
i
.
style
.
webkitTransform
=
"
translate3d(
"
+
b
+
"
px,0,0)
"
,
j
.
classList
[
b
>
k
/
2
-
l
/
2
?
"
add
"
:
"
remove
"
](
g
)}};
b
.
addEventListener
(
a
.
EVENT_START
,
function
(
b
){
j
=
a
.
targets
.
toggle
,
j
&&
(
i
=
j
.
querySelector
(
h
),
k
=
j
.
clientWidth
,
l
=
i
.
clientWidth
,
m
=
k
-
l
+
3
,
b
.
preventDefault
())}),
b
.
addEventListener
(
"
tap
"
,
n
),
b
.
addEventListener
(
"
drag
"
,
o
),
b
.
addEventListener
(
"
dragend
"
,
n
)}(
mui
,
window
,
document
,
"
toggle
"
),
function
(
a
,
b
,
c
){
var
d
,
e
,
f
,
g
,
h
,
i
,
j
,
k
,
l
,
m
,
n
,
o
,
p
,
q
,
r
,
s
,
t
,
u
=
"
mui-active
"
,
v
=
"
mui-selected
"
,
w
=
"
mui-table-view-cell
"
,
x
=
"
mui-disabled
"
,
y
=
"
mui-switch
"
,
z
=
"
mui-btn
"
,
A
=
"
mui-slider-cell
"
,
B
=
"
mui-slider-handle
"
,
C
=
"
mui-slider-left
"
,
D
=
"
mui-slider-right
"
,
E
=
"
mui-bounce
"
,
F
=
"
.
"
+
A
,
G
=
"
.
"
+
B
,
H
=
"
.
"
+
C
,
I
=
"
.
"
+
D
,
J
=
.
4
,
K
=
1
,
L
=
1
,
M
=
function
(
a
){
a
?
e
?
e
.
classList
.
add
(
u
):
d
&&
d
.
classList
.
add
(
u
):
e
?
e
.
classList
.
remove
(
u
):
d
&&
d
.
classList
.
remove
(
u
)},
N
=
function
(){
s
!==
t
&&
(
k
||
n
?(
k
&&
n
?
0
===
h
?
O
(
g
,
s
):
O
(
g
,
h
+
s
):
k
?
0
===
h
?
O
(
g
,
Math
.
max
(
s
,
0
)):
O
(
g
,
Math
.
max
(
h
+
s
,
0
)):
n
&&
(
0
===
h
?
O
(
g
,
Math
.
min
(
s
,
0
)):
O
(
g
,
Math
.
min
(
h
+
s
,
0
))),
k
&&
(
0
===
h
?
s
>
m
&&
(
f
.
style
.
backgroundColor
=
l
,
O
(
k
,
Math
.
max
(
s
-
m
,
0
))):(
f
.
style
.
backgroundColor
=
s
>
0
?
l
:
""
,
O
(
k
,
Math
.
max
(
s
,
0
)))),
n
&&
(
0
===
h
?
-
s
>
p
&&
(
f
.
style
.
backgroundColor
=
o
,
O
(
n
,
Math
.
min
(
-
(
-
s
-
p
),
0
))):(
f
.
style
.
backgroundColor
=
s
>
0
&&!
k
?
""
:
o
,
O
(
n
,
Math
.
min
(
s
,
0
))))):
g
&&
(
0
===
h
&&
s
>
0
||
h
===
i
&&
0
>
s
)
&&
Math
.
abs
(
s
)
<=
i
&&
O
(
g
,
h
+
s
),
t
=
s
),
r
=
requestAnimationFrame
(
function
(){
N
()})},
O
=
function
(
a
,
b
){
a
&&
(
a
.
style
.
webkitTransform
=
"
translate3d(
"
+
b
+
"
px,0,0)
"
)},
P
=
function
(
b
,
c
){
k
&&
(
k
.
setAttribute
(
"
style
"
,
""
),
n
&&
n
.
setAttribute
(
"
style
"
,
""
),
b
?(
O
(
g
,
m
),
c
&&
a
.
trigger
(
g
,
"
slideright
"
),
d
.
classList
.
add
(
v
)):(
O
(
g
,
0
),
d
.
classList
.
remove
(
v
)))},
Q
=
function
(
b
,
c
){
n
&&
(
n
.
setAttribute
(
"
style
"
,
""
),
k
&&
k
.
setAttribute
(
"
style
"
,
""
),
b
?(
O
(
g
,
-
p
),
c
&&
a
.
trigger
(
g
,
"
slideleft
"
),
d
.
classList
.
add
(
v
)):(
O
(
g
,
0
),
d
.
classList
.
remove
(
v
)))},
R
=
function
(
a
){
g
&&
(
a
?(
O
(
g
,
0
),
d
.
classList
.
add
(
v
)):(
O
(
g
,
i
),
d
.
classList
.
remove
(
v
)))},
S
=
function
(
b
,
c
){
q
=!
1
,
r
&&
(
cancelAnimationFrame
(
r
),
r
=
null
),
f
.
setAttribute
(
"
style
"
,
""
);
var
d
=
Math
.
abs
(
s
);
if
(
b
||!
k
&&!
n
)
k
||
n
||
R
(
0
===
h
?
!
(
d
>
i
/
2
):
d
>
i
/
2
);
else
if
(
s
>
0
){
var
e
=
m
/
2
;
if
(
0
!==
h
&&
n
&&
(
Q
(
!
(
d
>=
p
/
2
),
!
1
),
e
=
m
/
2
+
p
),
k
){
var
j
=
d
>=
e
;
k
.
classList
.
contains
(
E
)?(
k
.
setAttribute
(
"
style
"
,
""
),
O
(
g
,
0
),
j
&&!
c
.
swipe
&&
a
.
trigger
(
g
,
"
slideright
"
)):
P
(
j
,
!
0
)}}
else
{
var
e
=
m
/
2
;
if
(
0
!==
h
&&
k
&&
(
P
(
!
(
d
>=
m
/
2
),
!
1
),
e
=
p
/
2
+
m
),
n
){
var
j
=
d
>=
e
;
n
.
classList
.
contains
(
E
)?(
n
.
setAttribute
(
"
style
"
,
""
),
O
(
g
,
0
),
j
&&!
c
.
swipe
&&
a
.
trigger
(
g
,
"
slideleft
"
)):
Q
(
j
,
!
0
)}}};
b
.
addEventListener
(
"
touchstart
"
,
function
(
b
){
d
=
e
=
g
=
k
=
n
=
q
=
r
=!
1
,
s
=
t
=
h
=
i
=
m
=
p
=
0
,
l
=
o
=
""
;
for
(
var
u
=
b
.
target
,
A
=!
1
;
u
&&
u
!==
c
;
u
=
u
.
parentNode
)
if
(
u
.
classList
){
var
B
=
u
.
classList
;
if
((
"
INPUT
"
===
u
.
tagName
&&
"
radio
"
!==
u
.
type
&&
"
checkbox
"
!==
u
.
type
||
"
BUTTON
"
===
u
.
tagName
||
B
.
contains
(
y
)
||
B
.
contains
(
z
)
||
B
.
contains
(
x
))
&&
(
A
=!
0
),
B
.
contains
(
w
)){
d
=
u
;
var
C
=
d
.
parentNode
.
querySelector
(
"
.
"
+
v
);
if
(
C
&&
C
!=
d
){
C
.
classList
.
remove
(
v
);
var
D
=
C
.
querySelector
(
G
);
if
(
D
){
var
E
=
C
.
querySelector
(
H
);
E
&&
E
.
setAttribute
(
"
style
"
,
""
);
var
N
=
C
.
querySelector
(
I
);
N
&&
N
.
setAttribute
(
"
style
"
,
""
),
E
||
N
?
O
(
D
,
0
):
O
(
D
,
D
.
offsetWidth
)}}
var
P
=
d
.
querySelector
(
"
a
"
);
if
(
P
&&
P
.
parentNode
===
d
&&
(
e
=
P
),
f
=
d
.
querySelector
(
F
),
f
&&
f
.
parentNode
===
d
){
var
Q
=
f
.
querySelector
(
G
);
if
(
Q
){
g
=
Q
,
i
=
g
.
offsetWidth
,
j
=
a
.
getStyles
(
g
,
"
margin-left
"
),
L
=
K
;
var
R
=
f
.
querySelector
(
H
);
R
&&
(
k
=
R
,
l
=
a
.
getStyles
(
R
,
"
background-color
"
),
m
=
R
.
offsetWidth
);
var
S
=
f
.
querySelector
(
I
);
S
&&
(
n
=
S
,
o
=
a
.
getStyles
(
S
,
"
background-color
"
),
p
=
S
.
offsetWidth
),(
k
||
n
)
&&
(
L
=
J
);
var
T
=
a
.
getStyles
(
g
,
"
webkitTransform
"
),
U
=
a
.
parseTranslateMatrix
(
T
);
h
=
U
?
U
.
x
:
0
}}
A
||
M
(
!
0
);
break
}}}),
b
.
addEventListener
(
"
touchmove
"
,
function
(){
M
(
!
1
)}),
b
.
addEventListener
(
"
dragstart
"
,
function
(
a
){
if
(
g
){
var
b
=
a
.
detail
,
c
=
b
.
direction
,
d
=
b
.
angle
;
if
(
"
left
"
===
c
){
if
((
n
||
g
)
&&
(
d
>
150
||-
150
>
d
)){
if
(
!
n
&&
k
&&
0
===
h
)
return
;
if
(
g
&&!
n
&&!
k
&&
0
===
h
)
return
;
q
=!
0
}}
else
if
(
"
right
"
===
c
&&
(
k
||
g
)
&&
d
>-
30
&&
30
>
d
){
if
(
!
k
&&
n
&&
0
===
h
)
return
;
if
(
g
&&!
n
&&!
k
&&
h
===
i
)
return
;
q
=!
0
}}}),
b
.
addEventListener
(
"
drag
"
,
function
(
a
){
q
&&
(
r
||
N
(),
s
=
a
.
detail
.
deltaX
*
L
,
a
.
detail
.
gesture
.
preventDefault
())}),
b
.
addEventListener
(
"
dragend
"
,
function
(
a
){
q
&&
S
(
!
1
,
a
.
detail
)}),
b
.
addEventListener
(
"
swiperight
"
,
function
(
b
){
if
(
g
){
var
c
=!
1
;
k
&&!
k
.
classList
.
contains
(
E
)
&&
0
===
h
?(
P
(
!
0
,
!
0
),
c
=!
0
):
n
&&
0
>
h
?(
Q
(
!
1
,
!
1
),
c
=!
0
):
k
||
n
||
(
c
=!
0
),
c
&&
(
a
.
gestures
.
stoped
=!
0
,
b
.
stopImmediatePropagation
(),
S
(
!
0
,
b
.
detail
))}}),
b
.
addEventListener
(
"
swipeleft
"
,
function
(
b
){
if
(
g
){
var
c
=!
1
;
n
&&!
n
.
classList
.
contains
(
E
)
&&
0
===
h
?(
Q
(
!
0
,
!
0
),
c
=!
0
):
k
&&
h
>
0
?(
P
(
!
1
,
!
1
),
c
=!
0
):
k
||
n
||
(
c
=!
0
),
c
&&
(
a
.
gestures
.
stoped
=!
0
,
b
.
stopImmediatePropagation
(),
S
(
!
0
,
b
.
detail
))}}),
b
.
addEventListener
(
"
touchend
"
,
function
(){
d
&&
M
(
!
1
)}),
b
.
addEventListener
(
"
touchcancel
"
,
function
(){
d
&&
M
(
!
1
)});
var
T
=
function
(){
var
a
=
d
.
classList
;
if
(
a
.
contains
(
"
mui-radio
"
)){
var
b
=
d
.
querySelector
(
"
input[type=radio]
"
);
b
&&
b
.
click
()}
else
if
(
a
.
contains
(
"
mui-checkbox
"
)){
var
b
=
d
.
querySelector
(
"
input[type=checkbox]
"
);
b
&&
b
.
click
()}};
b
.
addEventListener
(
"
doubletap
"
,
function
(){
d
&&
T
()}),
b
.
addEventListener
(
"
tap
"
,
function
(){
if
(
d
){
var
b
=!
1
,
c
=
d
.
classList
;
if
(
c
.
contains
(
"
mui-collapse
"
)){
if
(
!
c
.
contains
(
u
)){
var
e
=
d
.
parentNode
.
querySelector
(
"
.mui-collapse.mui-active
"
);
e
&&
e
.
classList
.
remove
(
u
),
b
=!
0
}
c
.
toggle
(
u
),
b
&&
a
.
trigger
(
d
,
"
expand
"
)}
T
()}})}(
mui
,
window
,
document
),
function
(
a
,
b
){
a
.
alert
=
function
(
c
,
d
,
e
,
f
){
if
(
a
.
os
.
plus
){
if
(
void
0
===
typeof
c
)
return
;
"
function
"
==
typeof
d
?(
f
=
d
,
d
=
null
,
e
=
"
确定
"
):
"
function
"
==
typeof
e
&&
(
f
=
e
,
e
=
null
),
plus
.
nativeUI
.
alert
(
c
,
f
,
d
,
e
)}
else
b
.
alert
(
c
)}}(
mui
,
window
),
function
(
a
,
b
){
a
.
confirm
=
function
(
c
,
d
,
e
,
f
){
if
(
a
.
os
.
plus
){
if
(
void
0
===
typeof
c
)
return
;
"
function
"
==
typeof
d
?(
f
=
d
,
d
=
null
,
e
=
null
):
"
function
"
==
typeof
e
&&
(
f
=
e
,
e
=
null
),
plus
.
nativeUI
.
confirm
(
c
,
f
,
d
,
e
)}
else
b
.
confirm
(
c
)}}(
mui
,
window
),
function
(
a
,
b
){
a
.
prompt
=
function
(
c
,
d
,
e
,
f
,
g
){
if
(
a
.
os
.
plus
){
if
(
void
0
===
typeof
message
)
return
;
"
function
"
==
typeof
d
?(
g
=
d
,
d
=
null
,
e
=
null
,
f
=
null
):
"
function
"
==
typeof
e
?(
g
=
e
,
e
=
null
,
f
=
null
):
"
function
"
==
typeof
f
&&
(
g
=
f
,
f
=
null
),
plus
.
nativeUI
.
prompt
(
c
,
g
,
e
,
d
,
f
)}
else
b
.
prompt
(
c
)}}(
mui
,
window
),
function
(
a
){
a
.
toast
=
function
(
b
){
if
(
a
.
os
.
plus
&&
a
.
os
.
android
)
plus
.
nativeUI
.
toast
(
b
,{
verticalAlign
:
"
bottom
"
});
else
{
var
c
=
document
.
createElement
(
"
div
"
);
c
.
classList
.
add
(
"
mui-toast-container
"
),
c
.
innerHTML
=
'
<div class="mui-toast-message">
'
+
b
+
"
</div>
"
,
document
.
body
.
appendChild
(
c
),
setTimeout
(
function
(){
document
.
body
.
removeChild
(
c
)},
2
e3
)}}}(
mui
,
window
),
function
(
a
,
b
,
c
){
var
d
=
"
mui-icon
"
,
e
=
"
mui-icon-clear
"
,
f
=
"
mui-icon-speech
"
,
g
=
"
mui-icon-search
"
,
h
=
"
mui-input-row
"
,
i
=
"
mui-placeholder
"
,
j
=
"
mui-tooltip
"
,
k
=
"
mui-hidden
"
,
l
=
"
.
"
+
e
,
m
=
"
.
"
+
f
,
n
=
"
.
"
+
i
,
o
=
"
.
"
+
j
,
p
=
function
(
a
){
for
(;
a
&&
a
!==
c
;
a
=
a
.
parentNode
)
if
(
a
.
classList
&&
a
.
classList
.
contains
(
h
))
return
a
;
return
null
},
q
=
function
(
a
,
b
){
this
.
element
=
a
,
this
.
options
=
b
||
{
actions
:
"
clear
"
},
~
this
.
options
.
actions
.
indexOf
(
"
slider
"
)?(
this
.
sliderActionClass
=
j
+
"
"
+
k
,
this
.
sliderActionSelector
=
o
):(
~
this
.
options
.
actions
.
indexOf
(
"
clear
"
)
&&
(
this
.
clearActionClass
=
d
+
"
"
+
e
+
(
a
.
value
?
""
:
"
"
+
k
),
this
.
clearActionSelector
=
l
),
~
this
.
options
.
actions
.
indexOf
(
"
speech
"
)
&&
(
this
.
speechActionClass
=
d
+
"
"
+
f
,
this
.
speechActionSelector
=
m
),
~
this
.
options
.
actions
.
indexOf
(
"
search
"
)
&&
(
this
.
searchActionClass
=
i
,
this
.
searchActionSelector
=
n
)),
this
.
init
()};
q
.
prototype
.
init
=
function
(){
this
.
initAction
(),
this
.
initElementEvent
()},
q
.
prototype
.
initAction
=
function
(){
var
a
=
this
,
b
=
a
.
element
.
parentNode
;
b
&&
(
a
.
sliderActionClass
?
a
.
sliderAction
=
a
.
createAction
(
b
,
a
.
sliderActionClass
,
a
.
sliderActionSelector
):(
a
.
searchActionClass
&&
(
a
.
searchAction
=
a
.
createAction
(
b
,
a
.
searchActionClass
,
a
.
searchActionSelector
),
a
.
searchAction
.
addEventListener
(
"
tap
"
,
function
(){
setTimeout
(
function
(){
a
.
element
.
focus
()},
0
)})),
a
.
speechActionClass
&&
(
a
.
speechAction
=
a
.
createAction
(
b
,
a
.
speechActionClass
,
a
.
speechActionSelector
),
a
.
speechAction
.
addEventListener
(
"
click
"
,
function
(
a
){
a
.
stopPropagation
()}),
a
.
speechAction
.
addEventListener
(
"
tap
"
,
function
(
b
){
a
.
speechActionClick
(
b
)})),
a
.
clearActionClass
&&
(
a
.
clearAction
=
a
.
createAction
(
b
,
a
.
clearActionClass
,
a
.
clearActionSelector
),
a
.
clearAction
.
addEventListener
(
"
tap
"
,
function
(
b
){
a
.
clearActionClick
(
b
)}))))},
q
.
prototype
.
createAction
=
function
(
a
,
b
,
e
){
var
f
=
a
.
querySelector
(
e
);
if
(
!
f
){
var
f
=
c
.
createElement
(
"
span
"
);
f
.
className
=
b
,
b
===
this
.
searchActionClass
&&
(
f
.
innerHTML
=
'
<span class="
'
+
d
+
"
"
+
g
+
'
"></span>
'
+
this
.
element
.
getAttribute
(
"
placeholder
"
),
this
.
element
.
setAttribute
(
"
placeholder
"
,
""
)),
a
.
insertBefore
(
f
,
this
.
element
.
nextSibling
)}
return
f
},
q
.
prototype
.
initElementEvent
=
function
(){
var
b
=
this
.
element
;
if
(
this
.
sliderActionClass
){
var
c
=
this
.
sliderAction
,
d
=
b
.
offsetLeft
,
e
=
b
.
offsetWidth
-
28
,
f
=
c
.
offsetWidth
,
g
=
Math
.
abs
(
b
.
max
-
b
.
min
),
h
=
null
,
i
=
function
(){
c
.
classList
.
remove
(
k
),
f
=
f
||
c
.
offsetWidth
;
var
a
=
Math
.
abs
(
b
.
value
)
/
g
*
e
;
c
.
style
.
left
=
14
+
d
+
a
-
f
/
2
+
"
px
"
,
c
.
innerText
=
b
.
value
,
h
&&
clearTimeout
(
h
),
h
=
setTimeout
(
function
(){
c
.
classList
.
add
(
k
)},
1
e3
)};
b
.
addEventListener
(
"
input
"
,
i
),
b
.
addEventListener
(
"
tap
"
,
i
)}
else
{
if
(
this
.
clearActionClass
){
var
j
=
this
.
clearAction
;
if
(
!
j
)
return
;
a
.
each
([
"
keyup
"
,
"
change
"
,
"
input
"
,
"
focus
"
,
"
blur
"
,
"
cut
"
,
"
paste
"
],
function
(
a
,
c
){
!
function
(
a
){
b
.
addEventListener
(
a
,
function
(){
j
.
classList
[
b
.
value
.
trim
()?
"
remove
"
:
"
add
"
](
k
)})}(
c
)})}
this
.
searchActionClass
&&
(
b
.
addEventListener
(
"
focus
"
,
function
(){
b
.
parentNode
.
classList
.
add
(
"
mui-active
"
)}),
b
.
addEventListener
(
"
blur
"
,
function
(){
b
.
value
.
trim
()
||
b
.
parentNode
.
classList
.
remove
(
"
mui-active
"
)}))}},
q
.
prototype
.
clearActionClick
=
function
(
a
){
this
.
element
.
value
=
""
,
this
.
element
.
focus
(),
this
.
clearAction
.
classList
.
add
(
k
),
a
.
preventDefault
()},
q
.
prototype
.
speechActionClick
=
function
(
a
){
if
(
b
.
plus
){
var
c
=
this
;
c
.
element
.
value
=
""
,
plus
.
speech
.
startRecognize
({
engine
:
"
iFly
"
},
function
(
a
){
c
.
element
.
value
+=
a
,
setTimeout
(
function
(){
c
.
element
.
focus
()},
0
),
plus
.
speech
.
stopRecognize
()},
function
(){})}
else
alert
(
"
only for 5+
"
);
a
.
preventDefault
()},
a
.
fn
.
input
=
function
(){
this
.
each
(
function
(){
var
b
=
[],
c
=
p
(
this
.
parentNode
);
if
(
"
range
"
===
this
.
type
&&
c
.
classList
.
contains
(
"
mui-input-range
"
))
b
.
push
(
"
slider
"
);
else
{
var
d
=
this
.
classList
;
d
.
contains
(
"
mui-input-clear
"
)
&&
b
.
push
(
"
clear
"
),
d
.
contains
(
"
mui-input-speech
"
)
&&
b
.
push
(
"
speech
"
),
"
search
"
===
this
.
type
&&
c
.
classList
.
contains
(
"
mui-search
"
)
&&
b
.
push
(
"
search
"
)}
var
e
=
this
.
getAttribute
(
"
data-input-
"
+
b
[
0
]);
if
(
!
e
){
e
=++
a
.
uuid
,
a
.
data
[
e
]
=
new
q
(
this
,{
actions
:
b
.
join
(
"
,
"
)});
for
(
var
f
=
0
,
g
=
b
.
length
;
g
>
f
;
f
++
)
this
.
setAttribute
(
"
data-input-
"
+
b
[
f
],
e
)}})},
a
.
ready
(
function
(){
a
(
"
.mui-input-row input
"
).
input
()})}(
mui
,
window
,
document
),
function
(
a
,
b
){
a
.
back
=
function
(){
b
.
history
.
length
>
1
&&
(
"
function
"
==
typeof
a
.
options
.
back
?
a
.
options
.
back
()
!==!
1
&&
b
.
history
.
back
():
b
.
history
.
back
())},
b
.
addEventListener
(
"
tap
"
,
function
(){
var
b
=
a
.
targets
.
action
;
b
&&
b
.
classList
.
contains
(
"
mui-action-back
"
)
&&
a
.
back
()}),
b
.
addEventListener
(
"
swiperight
"
,
function
(
b
){
var
c
=
b
.
detail
;
c
.
angle
>-
15
&&
c
.
angle
<
15
&&
a
.
options
.
swipeBack
===!
0
&&
a
.
back
()})}(
mui
,
window
),
function
(
a
,
b
){
a
.
back
=
function
(){
var
c
=!
0
,
d
=!
1
;
if
(
"
function
"
==
typeof
a
.
options
.
back
&&
(
d
=
a
.
options
.
back
(),
d
===!
1
&&
(
c
=!
1
)),
c
)
if
(
b
.
plus
){
var
e
=
a
.
currentWebview
,
f
=
e
.
parent
();
e
.
canBack
(
function
(
c
){
if
(
c
.
canBack
)
b
.
history
.
back
();
else
{
f
&&
(
e
=
f
);
var
d
=
e
.
opener
();
if
(
d
){
var
g
=
d
.
parent
();
g
&&
(
d
=
g
),
e
.
preload
?
e
.
hide
(
"
auto
"
):
a
.
closeAll
(
e
)}}})}
else
b
.
history
.
length
>
1
?
b
.
history
.
back
():
b
.
close
()},
a
.
menu
=
function
(){
var
c
=
document
.
querySelector
(
"
.mui-action-menu
"
);
if
(
c
)
a
.
trigger
(
c
,
"
tap
"
);
else
if
(
b
.
plus
){
var
d
=
a
.
currentWebview
,
e
=
d
.
parent
();
e
&&
e
.
evalJS
(
"
mui&&mui.menu();
"
)}},
a
.
plusReady
(
function
(){
plus
.
key
.
addEventListener
(
"
backbutton
"
,
function
(){
a
.
back
()},
!
1
),
plus
.
key
.
addEventListener
(
"
menubutton
"
,
function
(){
a
.
menu
()},
!
1
)})}(
mui
,
window
);
\ No newline at end of file
var
mui
=
function
(
a
,
b
){
var
c
=
/complete|loaded|interactive/
,
d
=
/^#
([\w
-
]
*
)
$/
,
e
=
/^
\.([\w
-
]
+
)
$/
,
f
=
/^
[\w
-
]
+$/
,
g
=
/translate
(?:
3d
)?\((
.+
?)\)
/
,
h
=
/matrix
(
3d
)?\((
.+
?)\)
/
,
i
=
function
(
b
,
c
){
if
(
c
=
c
||
a
,
!
b
)
return
j
();
if
(
"
object
"
==
typeof
b
)
return
j
([
b
],
null
);
try
{
if
(
d
.
test
(
b
)){
var
e
=
c
.
getElementById
(
RegExp
.
$1
);
return
j
(
e
?[
e
]:[])}
return
j
(
i
.
qsa
(
b
,
c
),
b
)}
catch
(
f
){}
return
j
()},
j
=
function
(
a
,
b
){
return
a
=
a
||
[],
a
.
__proto__
=
i
.
fn
,
a
.
selector
=
b
||
""
,
a
};
return
i
.
uuid
=
0
,
i
.
data
=
{},
i
.
extend
=
function
(
a
,
c
,
d
){
a
||
(
a
=
{}),
c
||
(
c
=
{});
for
(
var
e
in
c
)
c
[
e
]
!==
b
&&
(
d
&&
"
object
"
==
typeof
a
[
e
]?
i
.
extend
(
a
[
e
],
c
[
e
],
d
):
a
[
e
]
=
c
[
e
]);
return
a
},
i
.
slice
=
[].
slice
,
i
.
qsa
=
function
(
b
,
c
){
return
c
=
c
||
a
,
i
.
slice
.
call
(
e
.
test
(
b
)?
c
.
getElementsByClassName
(
RegExp
.
$1
):
f
.
test
(
b
)?
c
.
getElementsByTagName
(
b
):
c
.
querySelectorAll
(
b
))},
i
.
ready
=
function
(
b
){
return
c
.
test
(
a
.
readyState
)?
b
(
i
):
a
.
addEventListener
(
"
DOMContentLoaded
"
,
function
(){
b
(
i
)},
!
1
),
this
},
i
.
each
=
function
(
a
,
b
){
return
[].
every
.
call
(
a
,
function
(
a
,
c
){
return
b
.
call
(
a
,
c
,
a
)
!==!
1
}),
this
},
i
.
trigger
=
function
(
a
,
b
,
c
){
return
a
.
dispatchEvent
(
new
CustomEvent
(
b
,{
detail
:
c
,
bubbles
:
!
0
,
cancelable
:
!
0
})),
this
},
i
.
getStyles
=
function
(
a
,
b
){
var
c
=
a
.
ownerDocument
.
defaultView
.
getComputedStyle
(
a
,
null
);
return
b
?
c
.
getPropertyValue
(
b
)
||
c
[
b
]:
c
},
i
.
parseTranslate
=
function
(
a
,
b
){
var
c
=
a
.
match
(
g
||
""
);
return
c
&&
c
[
1
]
||
(
c
=
[
""
,
"
0,0,0
"
]),
c
=
c
[
1
].
split
(
"
,
"
),
c
=
{
x
:
parseFloat
(
c
[
0
]),
y
:
parseFloat
(
c
[
1
]),
z
:
parseFloat
(
c
[
2
])},
b
&&
c
.
hasOwnProperty
(
b
)?
c
[
b
]:
c
},
i
.
parseTranslateMatrix
=
function
(
a
,
b
){
var
c
=
a
.
match
(
h
),
d
=
c
&&
c
[
1
];
c
?(
c
=
c
[
2
].
split
(
"
,
"
),
"
3d
"
===
d
?
c
=
c
.
slice
(
12
,
15
):(
c
.
push
(
0
),
c
=
c
.
slice
(
4
,
7
))):
c
=
[
0
,
0
,
0
];
var
e
=
{
x
:
parseFloat
(
c
[
0
]),
y
:
parseFloat
(
c
[
1
]),
z
:
parseFloat
(
c
[
2
])};
return
b
&&
e
.
hasOwnProperty
(
b
)?
e
[
b
]:
e
},
i
.
fn
=
{
each
:
function
(
a
){
return
[].
every
.
call
(
this
,
function
(
b
,
c
){
return
a
.
call
(
b
,
c
,
b
)
!==!
1
}),
this
}},
i
}(
document
);
window
.
mui
=
mui
,
"
$
"
in
window
||
(
window
.
$
=
mui
),
function
(
a
,
b
,
c
){
a
.
targets
=
{},
a
.
targetHandles
=
[],
a
.
registerTarget
=
function
(
b
){
return
b
.
index
=
b
.
index
||
1
e3
,
a
.
targetHandles
.
push
(
b
),
a
.
targetHandles
.
sort
(
function
(
a
,
b
){
return
a
.
index
-
b
.
index
}),
a
.
targetHandles
},
b
.
addEventListener
(
"
touchstart
"
,
function
(
b
){
for
(
var
d
=
b
.
target
,
e
=
{};
d
&&
d
!==
c
;
d
=
d
.
parentNode
){
var
f
=!
1
;
if
(
a
.
each
(
a
.
targetHandles
,
function
(
c
,
g
){
var
h
=
g
.
name
;
f
||
e
[
h
]
||!
g
.
hasOwnProperty
(
"
handle
"
)?
e
[
h
]
||
g
.
isReset
!==!
1
&&
(
a
.
targets
[
h
]
=!
1
):(
a
.
targets
[
h
]
=
g
.
handle
(
b
,
d
),
a
.
targets
[
h
]
&&
(
e
[
h
]
=!
0
,
g
.
isContinue
!==!
0
&&
(
f
=!
0
)))}),
f
)
break
}})}(
mui
,
window
,
document
),
function
(
a
){
String
.
prototype
.
trim
===
a
&&
(
String
.
prototype
.
trim
=
function
(){
return
this
.
replace
(
/^
\s
+|
\s
+$/g
,
""
)})}(),
function
(){
function
a
(
a
,
b
){
b
=
b
||
{
bubbles
:
!
1
,
cancelable
:
!
1
,
detail
:
void
0
};
var
c
=
document
.
createEvent
(
"
Events
"
),
d
=!
0
;
if
(
b
)
for
(
var
e
in
b
)
"
bubbles
"
===
e
?
d
=!!
b
[
e
]:
c
[
e
]
=
b
[
e
];
return
c
.
initEvent
(
a
,
d
,
!
0
),
c
}
"
undefined
"
==
typeof
window
.
CustomEvent
&&
(
a
.
prototype
=
window
.
Event
.
prototype
,
window
.
CustomEvent
=
a
)}(),
function
(
a
){
"
classList
"
in
a
.
documentElement
||!
Object
.
defineProperty
||
"
undefined
"
==
typeof
HTMLElement
||
Object
.
defineProperty
(
HTMLElement
.
prototype
,
"
classList
"
,{
get
:
function
(){
function
a
(
a
){
return
function
(
c
){
var
d
=
b
.
className
.
split
(
/
\s
+/
),
e
=
d
.
indexOf
(
c
);
a
(
d
,
e
,
c
),
b
.
className
=
d
.
join
(
"
"
)}}
var
b
=
this
,
c
=
{
add
:
a
(
function
(
a
,
b
,
c
){
~
b
||
a
.
push
(
c
)}),
remove
:
a
(
function
(
a
,
b
){
~
b
&&
a
.
splice
(
b
,
1
)}),
toggle
:
a
(
function
(
a
,
b
,
c
){
~
b
?
a
.
splice
(
b
,
1
):
a
.
push
(
c
)}),
contains
:
function
(
a
){
return
!!~
b
.
className
.
split
(
/
\s
+/
).
indexOf
(
a
)},
item
:
function
(
a
){
return
b
.
className
.
split
(
/
\s
+/
)[
a
]
||
null
}};
return
Object
.
defineProperty
(
c
,
"
length
"
,{
get
:
function
(){
return
b
.
className
.
split
(
/
\s
+/
).
length
}}),
c
}})}(
document
),
function
(
a
){
var
b
=
0
;
a
.
requestAnimationFrame
||
(
a
.
requestAnimationFrame
=
a
.
webkitRequestAnimationFrame
,
a
.
cancelAnimationFrame
=
a
.
webkitCancelAnimationFrame
||
a
.
webkitCancelRequestAnimationFrame
),
a
.
requestAnimationFrame
||
(
a
.
requestAnimationFrame
=
function
(
c
){
var
d
=
(
new
Date
).
getTime
(),
e
=
Math
.
max
(
0
,
16.7
-
(
d
-
b
)),
f
=
a
.
setTimeout
(
function
(){
c
(
d
+
e
)},
e
);
return
b
=
d
+
e
,
f
}),
a
.
cancelAnimationFrame
||
(
a
.
cancelAnimationFrame
=
function
(
a
){
clearTimeout
(
a
)})}(
window
),
function
(
a
,
b
,
c
){
if
(
!
b
.
FastClick
){
var
d
=
function
(
a
,
b
){
return
!
b
.
type
||
"
radio
"
!==
b
.
type
&&
"
checkbox
"
!==
b
.
type
?
!
1
:
b
};
a
.
registerTarget
({
name
:
c
,
index
:
40
,
handle
:
d
,
target
:
!
1
});
var
e
=
function
(
c
){
var
d
=
a
.
targets
.
click
;
if
(
d
){
var
e
,
f
;
document
.
activeElement
&&
document
.
activeElement
!==
d
&&
document
.
activeElement
.
blur
(),
f
=
c
.
detail
.
gesture
.
changedTouches
[
0
],
e
=
document
.
createEvent
(
"
MouseEvents
"
),
e
.
initMouseEvent
(
"
click
"
,
!
0
,
!
0
,
b
,
1
,
f
.
screenX
,
f
.
screenY
,
f
.
clientX
,
f
.
clientY
,
!
1
,
!
1
,
!
1
,
!
1
,
0
,
null
),
e
.
forwardedTouchEvent
=!
0
,
d
.
dispatchEvent
(
e
)}};
b
.
addEventListener
(
"
tap
"
,
e
),
b
.
addEventListener
(
"
doubletap
"
,
e
),
b
.
addEventListener
(
"
click
"
,
function
(
b
){
return
a
.
targets
.
click
&&!
b
.
forwardedTouchEvent
?(
b
.
stopImmediatePropagation
?
b
.
stopImmediatePropagation
():
b
.
propagationStopped
=!
0
,
b
.
stopPropagation
(),
b
.
preventDefault
(),
!
1
):
void
0
},
!
0
)}}(
mui
,
window
,
"
click
"
),
function
(
a
){
a
.
namespace
=
"
mui
"
,
a
.
classNamePrefix
=
a
.
namespace
+
"
-
"
,
a
.
classSelectorPrefix
=
"
.
"
+
a
.
classNamePrefix
,
a
.
className
=
function
(
b
){
return
a
.
classNamePrefix
+
b
},
a
.
classSelector
=
function
(
b
){
return
b
.
replace
(
/
\.
/g
,
a
.
classSelectorPrefix
)},
a
.
eventName
=
function
(
b
,
c
){
return
b
+
(
a
.
namespace
?
"
.
"
+
a
.
namespace
:
""
)
+
(
c
?
"
.
"
+
c
:
""
)}}(
mui
),
function
(
a
,
b
){
a
.
EVENT_START
=
"
touchstart
"
,
a
.
EVENT_MOVE
=
"
touchmove
"
,
a
.
EVENT_END
=
"
touchend
"
,
a
.
EVENT_CANCEL
=
"
touchcancel
"
,
a
.
EVENT_CLICK
=
"
click
"
,
a
.
preventDefault
=
function
(
a
){
a
.
preventDefault
()},
a
.
stopPropagation
=
function
(
a
){
a
.
stopPropagation
()},
a
.
gestures
=
[],
a
.
registerGesture
=
function
(
b
){
return
b
.
index
=
b
.
index
||
1
e3
,
a
.
gestures
.
push
(
b
),
a
.
gestures
.
sort
(
function
(
a
,
b
){
return
a
.
index
-
b
.
index
}),
a
.
gestures
};
var
c
=
function
(
a
,
b
){
var
c
=
b
.
x
-
a
.
x
,
d
=
b
.
y
-
a
.
y
;
return
Math
.
sqrt
(
c
*
c
+
d
*
d
)},
d
=
function
(
a
,
b
){
return
180
*
Math
.
atan2
(
b
.
y
-
a
.
y
,
b
.
x
-
a
.
x
)
/
Math
.
PI
},
e
=
function
(
a
){
return
-
45
>
a
&&
a
>-
135
?
"
up
"
:
a
>=
45
&&
135
>
a
?
"
down
"
:
a
>=
135
||-
135
>=
a
?
"
left
"
:
a
>=-
45
&&
45
>=
a
?
"
right
"
:
null
},
f
=
function
(
b
,
c
){
a
.
gestures
.
stoped
||
a
.
each
(
a
.
gestures
,
function
(
d
,
e
){
a
.
gestures
.
stoped
||
a
.
options
.
gestureConfig
[
e
.
name
]
&&
e
.
hasOwnProperty
(
"
handle
"
)
&&
e
.
handle
(
b
,
c
)})},
g
=
{},
h
=
function
(
b
){
a
.
gestures
.
stoped
=!
1
,
g
=
{
target
:
b
.
target
,
lastTarget
:
g
.
lastTarget
?
g
.
lastTarget
:
null
,
startTime
:
Date
.
now
(),
touchTime
:
0
,
lastTapTime
:
g
.
lastTapTime
?
g
.
lastTapTime
:
0
,
start
:{
x
:
b
.
touches
[
0
].
pageX
,
y
:
b
.
touches
[
0
].
pageY
},
move
:{
x
:
0
,
y
:
0
},
deltaX
:
0
,
deltaY
:
0
,
lastDeltaX
:
0
,
lastDeltaY
:
0
,
angle
:
""
,
direction
:
""
,
distance
:
0
,
drag
:
!
1
,
swipe
:
!
1
,
gesture
:
b
},
f
(
b
,
g
)},
i
=
function
(
b
){
a
.
gestures
.
stoped
||
(
g
.
touchTime
=
Date
.
now
()
-
g
.
startTime
,
g
.
move
=
{
x
:
b
.
touches
[
0
].
pageX
,
y
:
b
.
touches
[
0
].
pageY
},
g
.
distance
=
c
(
g
.
start
,
g
.
move
),
g
.
angle
=
d
(
g
.
start
,
g
.
move
),
g
.
direction
=
e
(
g
.
angle
),
g
.
lastDeltaX
=
g
.
deltaX
,
g
.
lastDeltaY
=
g
.
deltaY
,
g
.
deltaX
=
g
.
move
.
x
-
g
.
start
.
x
,
g
.
deltaY
=
g
.
move
.
y
-
g
.
start
.
y
,
g
.
gesture
=
b
,
f
(
b
,
g
))},
j
=
function
(
b
){
a
.
gestures
.
stoped
||
(
g
.
touchTime
=
Date
.
now
()
-
g
.
startTime
,
g
.
gesture
=
b
,
f
(
b
,
g
))};
b
.
addEventListener
(
a
.
EVENT_START
,
h
),
b
.
addEventListener
(
a
.
EVENT_MOVE
,
i
),
b
.
addEventListener
(
a
.
EVENT_END
,
j
),
b
.
addEventListener
(
a
.
EVENT_CANCEL
,
j
),
a
.
fn
.
on
=
function
(
b
,
c
,
d
){
this
.
each
(
function
(){
var
e
=
this
;
e
.
addEventListener
(
b
,
function
(
b
){
var
f
=
a
.
qsa
(
c
,
e
),
g
=
b
.
target
;
if
(
f
&&
f
.
length
>
0
)
for
(;
g
&&
g
!==
document
&&
g
!==
e
;
g
=
g
.
parentNode
)
g
&&~
f
.
indexOf
(
g
)
&&
(
b
.
detail
?
b
.
detail
.
currentTarget
=
g
:
b
.
detail
=
{
currentTarget
:
g
},
d
.
call
(
g
,
b
))}),
e
.
removeEventListener
(
a
.
EVENT_CLICK
,
k
),
e
.
addEventListener
(
a
.
EVENT_CLICK
,
k
)})};
var
k
=
function
(
a
){
a
.
target
&&
"
INPUT
"
!==
a
.
target
.
tagName
&&
a
.
preventDefault
()}}(
mui
,
window
),
function
(
a
,
b
){
var
c
=
function
(
c
,
d
){
if
(
c
.
type
===
a
.
EVENT_END
||
c
.
type
===
a
.
EVENT_CANCEL
){
var
e
=
this
.
options
;
d
.
direction
&&
e
.
swipeMaxTime
>
d
.
touchTime
&&
d
.
distance
>
e
.
swipeMinDistince
&&
"
range
"
!==
c
.
target
.
type
&&
(
d
.
swipe
=!
0
,
a
.
trigger
(
c
.
target
,
b
+
d
.
direction
,
d
))}};
a
.
registerGesture
({
name
:
b
,
index
:
10
,
handle
:
c
,
options
:{
swipeMaxTime
:
300
,
swipeMinDistince
:
18
}})}(
mui
,
"
swipe
"
),
function
(
a
,
b
){
var
c
=
function
(
c
,
d
){
switch
(
c
.
type
){
case
a
.
EVENT_MOVE
:
d
.
direction
&&
(
d
.
drag
||
(
d
.
drag
=!
0
,
a
.
trigger
(
c
.
target
,
b
+
"
start
"
,
d
)),
a
.
trigger
(
c
.
target
,
b
,
d
),
a
.
trigger
(
c
.
target
,
b
+
d
.
direction
,
d
));
break
;
case
a
.
EVENT_END
:
case
a
.
EVENT_CANCEL
:
d
.
drag
&&
a
.
trigger
(
c
.
target
,
b
+
"
end
"
,
d
)}};
a
.
registerGesture
({
name
:
b
,
index
:
20
,
handle
:
c
,
options
:{}})}(
mui
,
"
drag
"
),
function
(
a
,
b
){
var
c
=
function
(
c
,
d
){
if
(
c
.
type
===
a
.
EVENT_END
||
c
.
type
===
a
.
EVENT_CANCEL
){
var
e
=
this
.
options
;
if
(
d
.
distance
<
e
.
tabMaxDistance
&&
d
.
touchTime
<
e
.
tapMaxTime
){
if
(
a
.
options
.
gestureConfig
.
doubletap
&&
d
.
lastTarget
&&
d
.
lastTarget
===
c
.
target
&&
d
.
lastTapTime
&&
d
.
startTime
-
d
.
lastTapTime
<
e
.
tabMaxInterval
)
return
a
.
trigger
(
c
.
target
,
"
doubletap
"
,
d
),
d
.
lastTapTime
=
Date
.
now
(),
void
(
d
.
lastTarget
=
c
.
target
);
a
.
trigger
(
c
.
target
,
b
,
d
),
d
.
lastTapTime
=
Date
.
now
(),
d
.
lastTarget
=
c
.
target
}}};
a
.
registerGesture
({
name
:
b
,
index
:
30
,
handle
:
c
,
options
:{
tabMaxInterval
:
300
,
tabMaxDistance
:
5
,
tapMaxTime
:
250
}})}(
mui
,
"
tap
"
),
function
(
a
,
b
){
var
c
,
d
=
function
(
d
,
e
){
var
f
=
this
.
options
;
switch
(
d
.
type
){
case
a
.
EVENT_START
:
clearTimeout
(
c
),
c
=
setTimeout
(
function
(){
e
.
drag
||
a
.
trigger
(
d
.
target
,
b
,
e
)},
f
.
holdTimeout
);
break
;
case
a
.
EVENT_MOVE
:
e
.
distance
>
f
.
holdThreshold
&&
clearTimeout
(
c
);
break
;
case
a
.
EVENT_END
:
case
a
.
EVENT_CANCEL
:
clearTimeout
(
c
)}};
a
.
registerGesture
({
name
:
b
,
index
:
10
,
handle
:
d
,
options
:{
holdTimeout
:
500
,
holdThreshold
:
2
}})}(
mui
,
"
longtap
"
),
function
(
a
){
function
b
(
b
){
this
.
os
=
{};
var
c
=
[
function
(){
var
a
=
b
.
match
(
/
(
Android
)
;
?[\s\/]
+
([\d
.
]
+
)?
/
);
return
a
&&
(
this
.
os
.
android
=!
0
,
this
.
os
.
version
=
a
[
2
]),
this
.
os
.
android
===!
0
},
function
(){
var
a
=
b
.
match
(
/
(
iPhone
\s
OS
)\s([\d
_
]
+
)
/
);
if
(
a
)
this
.
os
.
ios
=
this
.
os
.
iphone
=!
0
,
this
.
os
.
version
=
a
[
2
].
replace
(
/_/g
,
"
.
"
);
else
{
var
c
=
b
.
match
(
/
(
iPad
)
.*OS
\s([\d
_
]
+
)
/
);
c
&&
(
this
.
os
.
ios
=
this
.
os
.
ipad
=!
0
,
this
.
os
.
version
=
c
[
2
].
replace
(
/_/g
,
"
.
"
))}
return
this
.
os
.
ios
===!
0
}];[].
every
.
call
(
c
,
function
(
b
){
return
!
b
.
call
(
a
)})}
b
.
call
(
a
,
navigator
.
userAgent
)}(
mui
),
function
(
a
){
function
b
(
a
){
this
.
os
=
this
.
os
||
{};
var
b
=
a
.
match
(
/Html5Plus/i
);
b
&&
(
this
.
os
.
plus
=!
0
)}
b
.
call
(
a
,
navigator
.
userAgent
)}(
mui
),
function
(
a
){
var
b
=
[];
a
.
global
=
a
.
options
=
{
gestureConfig
:{
tap
:
!
0
,
doubletap
:
!
0
,
longtap
:
!
0
,
swipe
:
!
0
,
drag
:
!
0
}},
a
.
initGlobal
=
function
(
b
){
return
a
.
options
=
a
.
extend
(
a
.
global
,
b
,
!
0
),
this
},
a
.
init
=
function
(
c
){
return
a
.
options
=
a
.
extend
(
a
.
global
,
c
||
{},
!
0
),
a
.
ready
(
function
(){
for
(
var
c
=
0
,
d
=
b
.
length
;
d
>
c
;
c
++
)
b
[
c
].
call
(
a
)}),
this
},
a
.
init
.
add
=
function
(
a
){
b
.
push
(
a
)}}(
mui
),
function
(
a
){
var
b
=
{
optimize
:
!
0
,
swipeBack
:
!
1
,
preloadPages
:[],
preloadLimit
:
10
},
c
=
{
duration
:
a
.
os
.
ios
?
200
:
100
,
aniShow
:
"
slide-in-right
"
};
a
.
options
.
show
&&
(
c
=
a
.
extend
(
c
,
a
.
options
.
show
,
!
0
)),
a
.
currentWebview
=
null
,
a
.
isHomePage
=!
1
,
a
.
extend
(
a
.
global
,
b
),
a
.
extend
(
a
.
options
,
b
),
a
.
waitingOptions
=
function
(
b
){
return
a
.
extend
({},
b
)},
a
.
showOptions
=
function
(
b
){
return
a
.
extend
(
c
,
b
)},
a
.
windowOptions
=
function
(
b
){
return
a
.
extend
({
scalable
:
!
1
,
bounce
:
""
},
b
)},
a
.
plusReady
=
function
(
a
){
return
window
.
plus
?
a
():
document
.
addEventListener
(
"
plusready
"
,
function
(){
a
()},
!
1
),
this
},
a
.
fire
=
function
(
a
,
b
,
c
){
a
&&
a
.
evalJS
(
"
mui&&mui.receive('
"
+
b
+
"
','
"
+
JSON
.
stringify
(
c
||
{})
+
"
')
"
)},
a
.
receive
=
function
(
b
,
c
){
b
&&
(
c
=
JSON
.
parse
(
c
),
a
.
trigger
(
document
,
b
,
c
))};
var
d
=
function
(
b
){
if
(
!
b
.
preloaded
){
a
.
fire
(
b
,
"
preload
"
);
for
(
var
c
=
b
.
children
(),
d
=
0
;
d
<
c
.
length
;
d
++
)
a
.
fire
(
c
[
d
],
"
preload
"
);
b
.
preloaded
=!
0
}},
e
=
function
(
b
,
c
,
d
){
if
(
d
){
if
(
!
b
[
c
+
"
ed
"
]){
a
.
fire
(
b
,
c
);
for
(
var
e
=
b
.
children
(),
f
=
0
;
f
<
e
.
length
;
f
++
)
a
.
fire
(
e
[
f
],
c
);
b
[
c
+
"
ed
"
]
=!
0
}}
else
{
a
.
fire
(
b
,
c
);
for
(
var
e
=
b
.
children
(),
f
=
0
;
f
<
e
.
length
;
f
++
)
a
.
fire
(
e
[
f
],
c
)}};
a
.
openWindow
=
function
(
b
,
c
,
f
){
if
(
window
.
plus
){
"
object
"
==
typeof
b
?(
f
=
b
,
b
=
f
.
url
,
c
=
f
.
id
||
b
):
"
object
"
==
typeof
c
?(
f
=
c
,
c
=
b
):
c
=
c
||
b
,
f
=
f
||
{};
var
g
,
h
,
i
=
f
.
params
||
{};
if
(
a
.
webviews
[
c
]){
var
j
=
a
.
webviews
[
c
];
if
(
j
.
preload
)
return
g
=
j
.
webview
,
g
&&
g
.
getURL
()
||
(
f
=
a
.
extend
(
f
,{
id
:
c
,
url
:
b
,
showAfterLoad
:
f
.
showAfterLoad
===!
1
?
!
1
:
!
0
,
preload
:
!
0
}),
g
=
a
.
createWindow
(
f
)),
h
=
j
.
show
,
h
=
f
.
show
?
a
.
extend
(
h
,
f
.
show
):
h
,
g
.
show
(
h
.
aniShow
,
h
.
duration
,
function
(){
d
(
g
),
e
(
g
,
"
pagebeforeshow
"
,
!
1
)}),
j
.
afterShowMethodName
&&
g
.
evalJS
(
j
.
afterShowMethodName
+
"
('
"
+
JSON
.
stringify
(
i
)
+
"
')
"
),
this
;
f
=
a
.
extend
(
j
,
a
.
extend
(
f
,{
id
:
c
,
url
:
b
,
showAfterLoad
:
f
.
showAfterLoad
===!
1
?
!
1
:
!
0
})),
g
=
a
.
createWindow
(
f
)}
else
f
=
a
.
extend
(
f
,{
id
:
c
,
url
:
b
,
showAfterLoad
:
f
.
showAfterLoad
===!
1
?
!
1
:
!
0
}),
g
=
a
.
createWindow
(
f
);
if
(
f
.
showAfterLoad
){
var
k
=
a
.
waitingOptions
(
f
.
waiting
),
l
=
plus
.
nativeUI
.
showWaiting
(
k
.
title
||
""
,
k
.
options
);
h
=
a
.
showOptions
(
f
.
show
),
g
.
addEventListener
(
"
loaded
"
,
function
(){
l
.
close
(),
g
.
show
(
h
.
aniShow
,
h
.
duration
,
function
(){
d
(
g
),
e
(
g
,
"
pagebeforeshow
"
,
!
1
)}),
g
.
showed
=!
0
,
f
.
afterShowMethodName
&&
g
.
evalJS
(
f
.
afterShowMethodName
+
"
('
"
+
JSON
.
stringify
(
i
)
+
"
')
"
)},
!
1
)}
return
g
}},
a
.
createWindow
=
function
(
b
,
c
){
if
(
window
.
plus
){
var
d
,
e
=
b
.
id
||
b
.
url
;
if
(
b
.
preload
){
a
.
webviews
[
e
]
&&
a
.
webviews
[
e
].
webview
.
getURL
()?
d
=
a
.
webviews
[
e
].
webview
:(
d
=
plus
.
webview
.
create
(
b
.
url
,
e
,
a
.
windowOptions
(
b
.
styles
),{
preload
:
!
0
}),
b
.
subpages
&&
a
.
each
(
b
.
subpages
,
function
(
b
,
c
){
var
e
=
plus
.
webview
.
create
(
c
.
url
,
c
.
id
||
c
.
url
,
a
.
windowOptions
(
c
.
styles
),{
preload
:
!
0
});
d
.
append
(
e
)})),
a
.
webviews
[
e
]
=
{
webview
:
d
,
preload
:
!
0
,
show
:
a
.
showOptions
(
b
.
show
),
afterShowMethodName
:
b
.
afterShowMethodName
};
var
f
=
a
.
data
.
preloads
,
g
=
f
.
indexOf
(
e
);
if
(
~
g
&&
f
.
splice
(
g
,
1
),
f
.
push
(
e
),
f
.
length
>
a
.
options
.
preloadLimit
){
var
h
=
a
.
data
.
preloads
.
shift
(),
i
=
a
.
webviews
[
h
];
i
&&
i
.
webview
&&
a
.
closeAll
(
i
.
webview
),
delete
a
.
webviews
[
h
]}}
else
c
!==!
1
&&
(
d
=
plus
.
webview
.
create
(
b
.
url
,
e
,
a
.
windowOptions
(
b
.
styles
)),
b
.
subpages
&&
a
.
each
(
b
.
subpages
,
function
(
b
,
c
){
var
e
=
plus
.
webview
.
create
(
c
.
url
,
c
.
id
||
c
.
url
,
a
.
windowOptions
(
c
.
styles
));
d
.
append
(
e
)}));
return
d
}},
a
.
closeOpened
=
function
(
b
){
var
c
=
b
.
opened
();
if
(
c
)
for
(
var
d
=
0
,
e
=
c
.
length
;
e
>
d
;
d
++
){
var
f
=
c
[
d
],
g
=
f
.
opened
();
g
&&
g
.
length
>
0
?
a
.
closeOpened
(
f
):
f
.
parent
()
!==
b
&&
f
.
close
(
"
none
"
)}},
a
.
closeAll
=
function
(
b
,
c
){
a
.
closeOpened
(
b
),
c
?
b
.
close
(
c
):
b
.
close
()},
a
.
createWindows
=
function
(
b
){
a
.
each
(
b
,
function
(
b
,
c
){
a
.
createWindow
(
c
,
!
1
)})},
a
.
appendWebview
=
function
(
b
){
if
(
window
.
plus
){
var
c
,
d
=
b
.
id
||
b
.
url
;
return
a
.
webviews
[
d
]
||
(
c
=
plus
.
webview
.
create
(
b
.
url
,
d
,
b
.
styles
),
c
.
addEventListener
(
"
loaded
"
,
function
(){
a
.
currentWebview
.
append
(
c
)}),
a
.
webviews
[
d
]
=
b
),
c
}},
a
.
webviews
=
{},
a
.
data
.
preloads
=
[],
a
.
init
.
add
(
function
(){
var
b
=
a
.
options
,
c
=
b
.
subpages
||
[];
a
.
plusReady
(
function
(){
a
.
currentWebview
=
plus
.
webview
.
currentWebview
(),
a
.
each
(
c
,
function
(
b
,
c
){
a
.
appendWebview
(
c
)}),
a
.
currentWebview
==
plus
.
webview
.
getWebviewById
(
plus
.
runtime
.
appid
)
&&
(
a
.
isHomePage
=!
0
,
setTimeout
(
function
(){
d
(
a
.
currentWebview
)},
300
))})}),
window
.
addEventListener
(
"
preload
"
,
function
(){
var
b
=
a
.
options
.
preloadPages
||
[];
a
.
plusReady
(
function
(){
a
.
each
(
b
,
function
(
b
,
c
){
a
.
createWindow
(
a
.
extend
(
c
,{
preload
:
!
0
}))})})})}(
mui
),
function
(
a
){
a
.
init
.
add
(
function
(){
var
b
=
a
.
options
;
b
.
titleBar
&&
a
.
titleBar
(
b
.
titleBar
),
a
.
os
.
ios
&&
a
.
plusReady
(
function
(){
var
b
=
a
.
options
.
statusBarBackground
?
a
.
options
.
statusBarBackground
:
"
#f7f7f7
"
;
plus
.
navigator
.
setStatusBarBackground
(
b
)})})}(
mui
),
function
(
a
){
a
.
init
.
add
(
function
(){
var
b
=
a
.
options
,
c
=
b
.
pullRefresh
||
{};
if
(
a
.
os
.
plus
&&
a
.
os
.
android
)
c
.
down
&&
a
.
plus_pulldownRefresh
(
c
.
down
);
else
{
var
d
=
c
.
container
;
if
(
d
){
var
e
=
a
(
d
);
1
===
e
.
length
&&
e
.
pullRefresh
(
c
)}}})}(
mui
),
function
(
a
,
b
,
c
){
a
.
titleBar
=
function
(
b
){
return
b
=
a
.
extend
({
template
:
"
top.html
"
,
height
:
"
48px
"
},
b
),
a
.
options
.
optimize
&&
a
.
os
.
plus
?
a
.
plusReady
(
function
(){
var
c
=
plus
.
webview
.
create
(
b
.
template
,
null
,{
scalable
:
!
1
,
position
:
"
dock
"
,
dock
:
"
top
"
,
height
:
b
.
height
});
c
.
addEventListener
(
"
loaded
"
,
function
(){
c
.
evalJS
(
'
document.querySelector(".mui-title").innerHTML="
'
+
b
.
title
+
'
"
'
)});
var
d
=
b
.
pulldownRefresh
||
{},
e
=
d
.
container
;
e
?
c
.
append
(
a
.
currentWebview
):
a
.
currentWebview
.
append
(
c
)}):
a
.
get
(
b
.
template
,
function
(
a
){
var
d
=
a
.
match
(
/<body
[^
>
]
*>
([\s\S
.
]
*
)
<
\/
body>/i
)[
0
],
e
=
c
.
createElement
(
"
div
"
);
for
(
e
.
innerHTML
=
d
;
e
.
firstChild
;)
c
.
body
.
insertBefore
(
e
.
firstChild
,
c
.
body
.
firstChild
);
if
(
b
.
title
){
var
f
=
c
.
body
.
querySelector
(
"
.mui-bar .mui-title
"
);
f
&&
(
f
.
innerHTML
=
b
.
title
)}}),
this
}}(
mui
,
window
,
document
),
function
(
a
){
a
.
get
=
function
(
a
,
c
,
d
){
b
(
"
GET
"
,
a
,
c
,
d
)},
a
.
post
=
function
(
a
,
c
,
d
){
b
(
"
POST
"
,
a
,
c
,
d
)};
var
b
=
function
(
a
,
b
,
c
,
d
){
var
e
=
new
XMLHttpRequest
,
f
=
/^
([\w
-
]
+:
)\/\/
/
.
test
(
b
)?
RegExp
.
$1
:
window
.
location
.
protocol
;
e
.
onreadystatechange
=
function
(){
4
===
e
.
readyState
&&
(
e
.
status
>=
200
&&
e
.
status
<
300
||
304
===
e
.
status
||
0
===
e
.
status
&&
"
file:
"
===
f
?
c
&&
c
(
e
.
responseText
):
d
&&
d
())},
e
.
open
(
a
,
b
,
!
0
),
e
.
send
()}}(
mui
),
function
(
a
,
b
,
c
){
a
.
offset
=
function
(
a
){
var
d
=
{
top
:
0
,
left
:
0
};
return
typeof
a
.
getBoundingClientRect
!==
c
&&
(
d
=
a
.
getBoundingClientRect
()),{
top
:
d
.
top
+
b
.
pageYOffset
-
a
.
clientTop
,
left
:
d
.
left
+
b
.
pageXOffset
-
a
.
clientLeft
}}}(
mui
,
window
),
function
(
a
,
b
){
a
.
scrollTo
=
function
(
a
,
c
,
d
){
c
=
c
||
1
e3
;
var
e
=
function
(
c
){
if
(
0
>=
c
)
return
void
(
d
&&
d
());
var
f
=
a
-
b
.
scrollY
;
setTimeout
(
function
(){
b
.
scrollTo
(
0
,
b
.
scrollY
+
f
/
c
*
10
),
e
(
c
-
10
)},
16.7
)};
e
(
c
)}}(
mui
,
window
),
function
(
a
,
b
,
c
){
var
d
=
"
mui-pull-top-pocket
"
,
e
=
"
mui-pull-bottom-pocket
"
,
f
=
"
mui-pull
"
,
g
=
"
mui-pull-loading
"
,
h
=
"
mui-pull-caption
"
,
i
=
h
+
"
-down
"
,
j
=
h
+
"
-over
"
,
k
=
h
+
"
-refresh
"
,
l
=
"
mui-icon
"
,
m
=
"
mui-icon-spinner
"
,
n
=
"
mui-icon-pulldown
"
,
o
=
"
mui-spin
"
,
p
=
"
mui-in
"
,
q
=
"
mui-reverse
"
,
r
=
g
+
"
"
+
l
+
"
"
+
n
+
"
"
+
q
,
s
=
g
+
"
"
+
l
+
"
"
+
n
,
t
=
g
+
"
"
+
l
+
"
"
+
m
+
"
"
+
o
,
u
=
{
down
:{
height
:
50
,
contentdown
:
"
下拉可以刷新
"
,
contentover
:
"
释放立即刷新
"
,
contentrefresh
:
"
正在刷新...
"
},
up
:{
height
:
50
,
contentdown
:
"
上拉显示更多
"
,
contentover
:
"
释放立即刷新
"
,
contentrefresh
:
"
正在刷新...
"
,
duration
:
300
}},
v
=
[
'
<div class="
'
+
f
+
'
">
'
,
'
<div class="
'
+
s
+
'
"></div>
'
,
'
<div class="
'
+
h
+
'
">
'
,
'
<span class="
'
+
i
+
"
"
+
p
+
'
">{downCaption}</span>
'
,
'
<span class="
'
+
j
+
'
">{overCaption}</span>
'
,
'
<span class="
'
+
k
+
'
">{refreshCaption}</span>
'
,
"
</div>
"
,
"
</div>
"
],
w
=
function
(
b
,
c
){
this
.
element
=
b
,
this
.
options
=
a
.
extend
(
u
,
c
,
!
0
),
this
.
options
.
up
.
height
=-
this
.
options
.
up
.
height
,
this
.
pullOptions
=
null
,
this
.
init
()};
w
.
prototype
.
init
=
function
(){
this
.
element
.
style
.
webkitTransform
=
"
translate3d(0,0,0)
"
,
this
.
element
.
style
.
position
=
"
relative
"
,
this
.
element
.
style
[
"
-webkit-backface-visibility
"
]
=
"
hidden
"
,
this
.
translateY
=
0
,
this
.
lastTranslateY
=
0
,
this
.
initPocket
(),
this
.
initEvent
()},
w
.
prototype
.
initPocket
=
function
(){
var
a
=
this
.
options
;
a
.
down
&&
a
.
down
.
hasOwnProperty
(
"
callback
"
)
&&
(
this
.
topPocket
=
this
.
element
.
querySelector
(
"
.
"
+
d
),
this
.
topPocket
||
(
this
.
topPocket
=
this
.
createPocket
(
d
,
a
.
down
),
this
.
element
.
insertBefore
(
this
.
topPocket
,
this
.
element
.
firstChild
))),
a
.
up
&&
a
.
up
.
hasOwnProperty
(
"
callback
"
)
&&
(
this
.
bottomPocket
=
this
.
element
.
querySelector
(
"
.
"
+
e
),
this
.
bottomPocket
||
(
this
.
bottomPocket
=
this
.
createPocket
(
e
,
a
.
up
),
this
.
element
.
appendChild
(
this
.
bottomPocket
)))},
w
.
prototype
.
createPocket
=
function
(
a
,
b
){
var
d
=
c
.
createElement
(
"
div
"
);
return
d
.
className
=
a
,
d
.
innerHTML
=
v
.
join
(
""
).
replace
(
"
{downCaption}
"
,
b
.
contentdown
).
replace
(
"
{overCaption}
"
,
b
.
contentover
).
replace
(
"
{refreshCaption}
"
,
b
.
contentrefresh
),
d
},
w
.
prototype
.
initEvent
=
function
(){
var
a
=
this
;
a
.
bottomPocket
&&
a
.
element
.
addEventListener
(
"
dragup
"
,
function
(
b
){
a
.
dragUp
(
b
)}),
a
.
topPocket
&&
a
.
element
.
addEventListener
(
"
dragdown
"
,
function
(
b
){
a
.
dragDown
(
b
)}),(
a
.
bottomPocket
||
a
.
topPocket
)
&&
(
a
.
element
.
addEventListener
(
"
dragstart
"
,
function
(
b
){
a
.
dragStart
(
b
)}),
a
.
element
.
addEventListener
(
"
drag
"
,
function
(
b
){
var
c
=
b
.
detail
.
direction
;
a
.
dragDirection
&&
"
up
"
!==
c
&&
"
down
"
!==
c
&&
a
.
pullOptions
&&
(
a
.
pullOptions
.
height
>
0
?
a
.
dragDown
(
b
):
a
.
dragUp
(
b
))}),
a
.
element
.
addEventListener
(
"
dragend
"
,
function
(
b
){
a
.
dragEnd
(
b
)}))},
w
.
prototype
.
dragStart
=
function
(
a
){
var
b
=
a
.
detail
;(
"
up
"
===
b
.
direction
||
"
down
"
===
b
.
direction
)
&&
(
this
.
element
.
style
.
webkitTransitionDuration
=
"
0s
"
,
this
.
isLoading
=
this
.
dragDirection
=!
1
)},
w
.
prototype
.
dragUp
=
function
(
a
){
var
d
=
this
;
if
(
!
d
.
isLoading
&&
"
down
"
!==
d
.
dragDirection
){
var
e
=
c
.
body
.
scrollHeight
;
!
d
.
dragDirection
&&
b
.
innerHeight
+
b
.
scrollY
+
40
<
e
||
(
b
.
scrollTo
(
0
,
e
),
d
.
pullOptions
=
d
.
options
.
up
,
d
.
loading
=
d
.
bottomPocket
.
querySelector
(
"
.
"
+
g
),
d
.
drag
(
a
))}},
w
.
prototype
.
dragDown
=
function
(
a
){
var
c
=
this
;
if
(
!
c
.
isLoading
&&
"
up
"
!==
c
.
dragDirection
){
var
d
=
b
.
scrollY
;
!
c
.
dragDirection
&&
d
>
5
||
(
0
!==
d
&&
b
.
scrollTo
(
0
,
0
),
c
.
pullOptions
=
c
.
options
.
down
,
c
.
loading
=
c
.
topPocket
.
querySelector
(
"
.
"
+
g
),
c
.
drag
(
a
))}},
w
.
prototype
.
drag
=
function
(
a
){
this
.
pullOptions
&&
(
this
.
pullOptions
.
height
>
0
&&
a
.
detail
.
deltaY
<
0
||
(
this
.
dragDirection
=
this
.
pullOptions
.
height
>
0
?
"
down
"
:
"
up
"
,
this
.
requestAnimationFrame
||
this
.
updateTranslate
(),
a
.
detail
.
gesture
.
preventDefault
(),
this
.
translateY
=
.
4
*
a
.
detail
.
deltaY
))},
w
.
prototype
.
dragEnd
=
function
(
b
){
var
c
=
this
;
c
.
pullOptions
&&
(
cancelAnimationFrame
(
c
.
requestAnimationFrame
),
Math
.
abs
(.
4
*
b
.
detail
.
deltaY
)
>=
Math
.
abs
(
c
.
pullOptions
.
height
)?
c
.
load
():
this
.
hide
(),
a
.
gestures
.
stoped
=!
0
)},
w
.
prototype
.
hide
=
function
(){
this
.
translateY
=
0
,
this
.
requestAnimationFrame
&&
(
cancelAnimationFrame
(
this
.
requestAnimationFrame
),
this
.
requestAnimationFrame
=
null
),
this
.
element
.
style
.
webkitTransitionDuration
=
"
0.5s
"
,
this
.
setTranslate
(
0
),
this
.
setCaption
(
i
),
this
.
pullOptions
.
height
>
0
&&
this
.
loading
.
classList
.
remove
(
q
),
this
.
pullOptions
=
null
},
w
.
prototype
.
updateTranslate
=
function
(){
var
a
=
this
;
a
.
translateY
!==
a
.
lastTranslateY
&&
(
a
.
translateY
=
Math
.
abs
(
a
.
translateY
)
<
2
?
0
:
a
.
translateY
,
a
.
setTranslate
(
a
.
translateY
),
Math
.
abs
(
a
.
translateY
)
>=
Math
.
abs
(
a
.
pullOptions
.
height
)?
a
.
showLoading
(
j
):
a
.
hideLoading
(
i
),
a
.
lastTranslateY
=
a
.
translateY
),
a
.
requestAnimationFrame
=
requestAnimationFrame
(
function
(){
a
.
updateTranslate
()})},
w
.
prototype
.
setTranslate
=
function
(
a
){
this
.
element
.
style
.
webkitTransform
=
"
translate3d(0,
"
+
a
+
"
px,0)
"
,
this
.
bottomPocket
&&
(
0
>
a
?
this
.
bottomPocket
.
style
.
bottom
=
(
a
>
this
.
pullOptions
.
height
?
a
:
this
.
pullOptions
.
height
)
+
"
px
"
:
0
===
a
&&
this
.
bottomPocket
.
setAttribute
(
"
style
"
,
""
))},
w
.
prototype
.
load
=
function
(){
var
d
=
this
;
d
.
isLoading
=!
0
,
d
.
showLoading
(
k
),
d
.
setTranslate
(
d
.
pullOptions
.
height
);
var
e
=
d
.
pullOptions
.
callback
;
e
&&
e
(
function
(){
if
(
d
.
pullOptions
&&
d
.
pullOptions
.
height
<
0
){
var
e
=
Math
.
min
(
1
e3
,
d
.
pullOptions
.
duration
);
setTimeout
(
function
(){
a
.
scrollTo
(
c
.
body
.
scrollHeight
-
b
.
innerHeight
,
e
,
function
(){
d
.
isLoading
=!
1
})},
100
)}
else
d
.
isLoading
=!
1
;
d
.
hide
()})},
w
.
prototype
.
showLoading
=
function
(
a
){
this
.
setCaption
(
a
)},
w
.
prototype
.
hideLoading
=
function
(
a
){
this
.
setCaption
(
a
)},
w
.
prototype
.
setCaption
=
function
(
a
){
var
b
=
this
.
pullOptions
&&
this
.
pullOptions
.
height
>
0
?
this
.
topPocket
:
this
.
bottomPocket
;
if
(
b
){
var
c
=
b
.
querySelector
(
"
.
"
+
h
),
d
=
c
.
querySelector
(
"
.
"
+
p
);
d
&&
d
.
classList
.
remove
(
p
);
var
e
=
c
.
querySelector
(
"
.
"
+
a
);
e
&&
e
.
classList
.
add
(
p
),
this
.
loading
.
className
=
this
.
pullOptions
&&
this
.
pullOptions
.
height
>
0
?
a
===
k
?
t
:
a
===
j
?
r
:
s
:
t
}},
a
.
fn
.
pullRefresh
=
function
(
b
){
this
.
each
(
function
(){
var
c
=
this
.
getAttribute
(
"
data-pullrefresh
"
);
if
(
!
c
){
var
d
=++
a
.
uuid
;
a
.
data
[
d
]
=
new
w
(
this
,
b
),
this
.
setAttribute
(
"
data-pullrefresh
"
,
d
)}})}}(
mui
,
window
,
document
),
function
(
a
){
var
b
=
{
height
:
50
,
contentdown
:
"
下拉可以刷新
"
,
contentover
:
"
释放立即刷新
"
,
contentrefresh
:
"
正在刷新...
"
};
a
.
plus_pulldownRefresh
=
function
(
c
){
c
=
a
.
extend
(
b
,
c
,
!
0
),
a
.
plusReady
(
function
(){
var
b
=
document
.
body
,
d
=
b
.
getAttribute
(
"
data-pullrefresh-plus
"
);
if
(
!
d
){
d
=++
a
.
uuid
,
b
.
setAttribute
(
"
data-pullrefresh-plus
"
,
d
);
var
e
=
a
.
currentWebview
;
e
.
setPullToRefresh
({
support
:
!
0
,
height
:
c
.
height
+
"
px
"
,
range
:
"
200px
"
,
contentdown
:{
caption
:
c
.
contentdown
},
contentover
:{
caption
:
c
.
contentover
},
contentrefresh
:{
caption
:
c
.
contentrefresh
}},
function
(){
c
.
callback
&&
c
.
callback
(
function
(){
e
.
endPullToRefresh
()})})}})}}(
mui
),
function
(
a
,
b
,
c
,
d
){
var
e
=
"
mui-off-canvas-left
"
,
f
=
"
mui-off-canvas-right
"
,
g
=
"
mui-off-canvas-backdrop
"
,
h
=
"
mui-off-canvas-wrap
"
,
i
=
"
mui-off-canvas-height-fixed
"
,
j
=
"
mui-left
"
,
k
=
"
mui-right
"
,
l
=
"
mui-sliding
"
,
m
=
"
.mui-inner-wrap
"
,
n
=
function
(
a
){
if
(
parentNode
=
a
.
parentNode
){
if
(
parentNode
.
classList
.
contains
(
h
))
return
parentNode
;
if
(
parentNode
=
parentNode
.
parentNode
,
parentNode
.
classList
.
contains
(
h
))
return
parentNode
}},
o
=
function
(
b
,
d
){
if
(
d
.
classList
&&
d
.
classList
.
contains
(
g
)){
var
e
=
n
(
d
);
if
(
e
)
return
a
.
targets
.
_container
=
e
,
d
}
else
if
(
"
A
"
===
d
.
tagName
&&
d
.
hash
){
var
f
=
c
.
getElementById
(
d
.
hash
.
replace
(
"
#
"
,
""
));
if
(
f
){
var
e
=
n
(
f
);
if
(
e
)
return
a
.
targets
.
_container
=
e
,
f
}}
return
!
1
};
a
.
registerTarget
({
name
:
d
,
index
:
60
,
handle
:
o
,
target
:
!
1
,
isReset
:
!
1
,
isContinue
:
!
0
});
var
p
=
function
(
a
,
b
){
var
d
=
a
.
querySelector
(
"
.mui-content
"
),
e
=
c
.
getElementsByTagName
(
"
html
"
)[
0
],
f
=
c
.
body
;
b
?(
e
.
classList
.
add
(
i
),
f
.
classList
.
add
(
i
),
d
&&
d
.
classList
.
add
(
i
)):(
e
.
classList
.
remove
(
i
),
f
.
classList
.
remove
(
i
),
d
&&
d
.
classList
.
remove
(
i
))},
q
=
function
(){
var
a
=
this
.
parentNode
;
a
.
classList
.
remove
(
l
),
this
.
removeEventListener
(
"
webkitTransitionEnd
"
,
q
),
a
.
classList
.
contains
(
k
)
||
a
.
classList
.
contains
(
j
)
||
p
(
a
,
!
1
)},
r
=
function
(
a
,
b
){
if
(
a
&&
b
){
var
c
=
b
.
classList
;
a
.
querySelector
(
m
).
addEventListener
(
"
webkitTransitionEnd
"
,
q
),
a
.
classList
.
contains
(
k
)
||
a
.
classList
.
contains
(
j
)
||
p
(
a
,
!
0
),
c
.
contains
(
e
)?
a
.
classList
.
toggle
(
k
):
c
.
contains
(
f
)?
a
.
classList
.
toggle
(
j
):
c
.
contains
(
g
)
&&
(
a
.
classList
.
remove
(
k
),
a
.
classList
.
remove
(
j
)),
a
.
classList
.
add
(
l
)}};
b
.
addEventListener
(
"
tap
"
,
function
(){
a
.
targets
.
offcanvas
&&
r
(
a
.
targets
.
_container
,
a
.
targets
.
offcanvas
)}),
a
.
fn
.
offCanvas
=
function
(){
var
a
=
arguments
;
this
.
each
(
function
(){
if
(
"
show
"
===
a
[
0
]
||
"
hide
"
===
a
[
0
]
||
"
toggle
"
===
a
[
0
]){
var
b
=
this
.
classList
;
if
(
b
.
contains
(
e
)
||
b
.
contains
(
f
)){
var
c
=
n
(
this
);
c
&&
r
(
c
,
this
)}}})}}(
mui
,
window
,
document
,
"
offcanvas
"
),
function
(
a
,
b
,
c
){
if
(
!
a
.
os
.
android
){
var
d
,
e
,
f
,
g
,
h
=
"
mui-slider
"
,
i
=
"
mui-switch
"
,
j
=
"
mui-table-view-cell
"
,
k
=
"
mui-slider-handle
"
,
l
=
"
mui-off-canvas-left
"
,
m
=
"
mui-off-canvas-right
"
,
n
=
"
mui-off-canvas-wrap
"
,
o
=
"
mui-off-canvas-height-fixed
"
,
p
=
"
mui-left
"
,
q
=
"
mui-right
"
,
r
=
"
mui-sliding
"
,
s
=
"
mui-draggable
"
,
t
=
"
.mui-inner-wrap
"
,
u
=
"
.
"
+
l
,
v
=
"
.
"
+
m
,
w
=!
1
,
x
=
1
,
y
=
0
,
z
=
0
,
A
=
0
,
B
=
0
,
C
=
function
(){
y
!==
z
&&
(
e
.
style
[
"
-webkit-transition-duration
"
]
=
"
0s
"
,
"
right
"
===
g
&&
y
>
0
?(
y
=
Math
.
min
(
y
,
B
),
0
>
A
?
D
(
e
,
A
+
y
):
D
(
e
,
y
)):
"
left
"
===
g
&&
0
>
y
&&
(
y
=
Math
.
max
(
y
,
-
B
),
A
>
0
?
D
(
e
,
A
+
y
):
D
(
e
,
y
)),
z
=
y
),
f
=
requestAnimationFrame
(
function
(){
C
()})},
D
=
function
(
a
,
b
){
a
&&
(
a
.
style
.
webkitTransform
=
"
translate3d(
"
+
b
+
"
px,0,0)
"
)},
E
=
function
(
a
,
b
){
var
d
=
a
.
querySelector
(
"
.mui-content
"
),
e
=
c
.
getElementsByTagName
(
"
html
"
)[
0
],
f
=
c
.
body
;
b
?(
e
.
classList
.
add
(
o
),
f
.
classList
.
add
(
o
),
d
&&
d
.
classList
.
add
(
o
)):(
e
.
classList
.
remove
(
o
),
f
.
classList
.
remove
(
o
),
d
&&
d
.
classList
.
remove
(
o
))},
F
=
function
(){
var
a
=
this
.
parentNode
,
b
=
a
.
classList
;
b
.
remove
(
r
),
this
.
removeEventListener
(
"
webkitTransitionEnd
"
,
F
),
b
.
contains
(
q
)
||
b
.
contains
(
p
)
||
E
(
a
,
!
1
)};
b
.
addEventListener
(
"
touchstart
"
,
function
(
a
){
var
b
=
a
.
target
;
for
(
w
=!
1
,
d
=
e
=
null
;
b
&&
b
!==
c
;
b
=
b
.
parentNode
){
var
f
=
b
.
classList
;
if
(
f
){
if
(
f
.
contains
(
i
))
break
;
if
(
f
.
contains
(
j
)
&&
b
.
querySelector
(
"
.
"
+
k
))
break
;
if
(
f
.
contains
(
h
))
break
;
if
(
f
.
contains
(
n
)
&&
f
.
contains
(
s
)){
if
(
d
=
b
,
e
=
d
.
querySelector
(
t
),
!
e
)
return
;
break
}}}}),
b
.
addEventListener
(
"
dragstart
"
,
function
(
b
){
if
(
d
){
var
c
=
b
.
detail
;
if
(
"
left
"
===
c
.
direction
?
d
.
classList
.
contains
(
q
)?
w
=!
0
:
d
.
querySelector
(
v
)
&&!
d
.
classList
.
contains
(
p
)
&&
(
w
=!
0
):
"
right
"
===
c
.
direction
&&
(
d
.
classList
.
contains
(
p
)?
w
=!
0
:
d
.
querySelector
(
u
)
&&!
d
.
classList
.
contains
(
q
)
&&
(
w
=!
0
)),
w
){
g
=
c
.
direction
,
B
=
.
8
*
d
.
offsetWidth
;
var
f
=
a
.
getStyles
(
e
,
"
webkitTransform
"
),
h
=
a
.
parseTranslateMatrix
(
f
);
A
=
y
=
h
?
h
.
x
:
0
;
var
i
=
d
.
classList
;
i
.
add
(
r
),
i
.
contains
(
q
)
||
i
.
contains
(
p
)
||
E
(
d
,
!
0
),
c
.
gesture
.
preventDefault
()}}}),
b
.
addEventListener
(
"
drag
"
,
function
(
a
){
if
(
w
){
var
b
=
a
.
detail
;
f
||
C
(),
y
=
b
.
deltaX
*
x
}}),
b
.
addEventListener
(
"
dragend
"
,
function
(){
if
(
w
){
f
&&
(
cancelAnimationFrame
(
f
),
f
=
null
),
e
.
setAttribute
(
"
style
"
,
""
),
e
.
addEventListener
(
"
webkitTransitionEnd
"
,
F
);
var
a
,
b
=
d
.
classList
,
c
=
[
"
add
"
,
"
remove
"
];
"
right
"
===
g
&&
y
>
0
?(
a
=
q
,
0
>
A
&&
(
c
.
reverse
(),
a
=
p
),
y
>
B
/
2
?
b
[
c
[
0
]](
a
):
b
[
c
[
1
]](
a
)):
"
left
"
===
g
&&
0
>
y
&&
(
a
=
p
,
A
>
0
&&
(
c
.
reverse
(),
a
=
q
),
-
y
>
B
/
2
?
b
[
c
[
0
]](
a
):
b
[
c
[
1
]](
a
))}})}}(
mui
,
window
,
document
,
"
offcanvas
"
),
function
(
a
,
b
,
c
,
d
){
var
e
=
"
mui-action
"
,
f
=
function
(
a
,
b
){
return
b
.
className
&&~
b
.
className
.
indexOf
(
e
)?
b
:
!
1
};
a
.
registerTarget
({
name
:
d
,
index
:
50
,
handle
:
f
,
target
:
!
1
})}(
mui
,
window
,
document
,
"
action
"
),
function
(
a
,
b
,
c
,
d
){
var
e
=
"
mui-modal
"
,
f
=
function
(
a
,
b
){
if
(
"
A
"
===
b
.
tagName
&&
b
.
hash
){
var
d
=
c
.
getElementById
(
b
.
hash
.
replace
(
"
#
"
,
""
));
if
(
d
&&
d
.
classList
.
contains
(
e
))
return
d
}
return
!
1
};
a
.
registerTarget
({
name
:
d
,
index
:
50
,
handle
:
f
,
target
:
!
1
,
isReset
:
!
1
,
isContinue
:
!
0
}),
b
.
addEventListener
(
"
tap
"
,
function
(){
a
.
targets
.
modal
&&
a
.
targets
.
modal
.
classList
.
toggle
(
"
mui-active
"
)})}(
mui
,
window
,
document
,
"
modal
"
),
function
(
a
,
b
,
c
,
d
){
var
e
=
"
mui-popover
"
,
f
=
"
mui-bar-popover
"
,
g
=
"
mui-popover-action
"
,
h
=
"
mui-backdrop
"
,
i
=
"
mui-bar-backdrop
"
,
j
=
"
mui-backdrop-action
"
,
k
=
"
mui-active
"
,
l
=
function
(
b
,
d
){
return
"
A
"
===
d
.
tagName
&&
d
.
hash
&&
(
a
.
targets
.
_popover
=
c
.
getElementById
(
d
.
hash
.
replace
(
"
#
"
,
""
)),
a
.
targets
.
_popover
&&
a
.
targets
.
_popover
.
classList
.
contains
(
e
))?
d
:
!
1
};
a
.
registerTarget
({
name
:
d
,
index
:
60
,
handle
:
l
,
target
:
!
1
,
isReset
:
!
1
,
isContinue
:
!
0
});
var
m
=
function
(
a
){
a
?
c
.
body
.
setAttribute
(
"
style
"
,
"
position:fixed;width:100%;height:100%;overflow:hidden;
"
):
c
.
body
.
setAttribute
(
"
style
"
,
""
)},
n
=
function
(){
this
.
style
.
display
=
"
none
"
,
this
.
removeEventListener
(
"
webkitTransitionEnd
"
,
n
),
m
(
!
1
)},
o
=
function
(){
var
b
=
c
.
createElement
(
"
div
"
);
return
b
.
classList
.
add
(
h
),
b
.
addEventListener
(
"
tap
"
,
function
(){
var
b
=
a
.
targets
.
_popover
;
b
&&
(
b
.
addEventListener
(
"
webkitTransitionEnd
"
,
n
),
b
.
classList
.
remove
(
k
),
b
.
parentNode
.
removeChild
(
o
))}),
b
}();
b
.
addEventListener
(
"
tap
"
,
function
(){
a
.
targets
.
popover
&&
p
(
a
.
targets
.
_popover
,
a
.
targets
.
popover
)});
var
p
=
function
(
a
,
d
){
o
.
classList
.
remove
(
i
),
o
.
classList
.
remove
(
j
);
var
e
=
c
.
querySelector
(
"
.mui-popover.mui-active
"
);
if
(
!
e
||
(
e
.
style
.
display
=
"
none
"
,
e
.
classList
.
remove
(
k
),
e
.
removeEventListener
(
"
webkitTransitionEnd
"
,
n
),
m
(
!
1
),
e
.
parentNode
.
removeChild
(
o
),
a
!==
e
)){
if
(
a
.
classList
.
contains
(
f
)
||
a
.
classList
.
contains
(
g
))
if
(
a
.
classList
.
contains
(
g
))
o
.
classList
.
add
(
j
);
else
if
(
o
.
classList
.
add
(
i
),
d
&&
d
.
parentNode
){
var
h
=
d
.
offsetWidth
,
l
=
d
.
offsetLeft
,
p
=
b
.
innerWidth
;
a
.
style
.
left
=
Math
.
min
(
Math
.
max
(
l
,
5
),
p
-
h
-
5
)
+
"
px
"
}
a
.
style
.
display
=
"
block
"
,
a
.
offsetHeight
,
a
.
classList
.
add
(
k
),
a
.
parentNode
.
appendChild
(
o
),
m
(
!
0
),
o
.
classList
.
add
(
k
)}};
a
.
fn
.
popover
=
function
(){
var
b
=
arguments
;
this
.
each
(
function
(){
a
.
targets
.
_popover
=
this
,(
"
show
"
===
b
[
0
]
||
"
hide
"
===
b
[
0
]
||
"
toggle
"
===
b
[
0
])
&&
p
(
this
,
b
[
1
])})}}(
mui
,
window
,
document
,
"
popover
"
),
function
(
a
,
b
,
c
,
d
){
var
e
=
"
mui-control-item
"
,
f
=
"
mui-control-content
"
,
g
=
"
mui-tab-item
"
,
h
=
function
(
a
,
b
){
return
b
.
classList
&&
(
b
.
classList
.
contains
(
e
)
||
b
.
classList
.
contains
(
g
))?
b
:
!
1
};
a
.
registerTarget
({
name
:
d
,
index
:
80
,
handle
:
h
,
target
:
!
1
}),
b
.
addEventListener
(
"
tap
"
,
function
(){
var
b
=
a
.
targets
.
tab
;
if
(
b
){
var
e
,
g
,
h
,
i
=
"
mui-active
"
,
j
=
"
.
"
+
i
;
e
=
b
.
parentNode
.
querySelector
(
j
),
e
&&
e
.
classList
.
remove
(
i
);
var
k
=
b
===
e
;
if
(
b
&&
b
.
classList
.
add
(
i
),
b
.
hash
&&
(
h
=
c
.
getElementById
(
b
.
hash
.
replace
(
"
#
"
,
""
)))){
if
(
!
h
.
classList
.
contains
(
f
))
return
void
b
.
classList
[
k
?
"
remove
"
:
"
add
"
](
i
);
if
(
!
k
){
g
=
h
.
parentNode
.
getElementsByClassName
(
i
);
for
(
var
l
=
0
;
l
<
g
.
length
;
l
++
)
g
[
l
].
classList
.
remove
(
i
);
h
.
classList
.
add
(
i
);
var
m
=
h
.
parentNode
.
querySelectorAll
(
"
.
"
+
f
);
a
.
trigger
(
h
,
a
.
eventName
(
"
shown
"
,
d
),{
tabNumber
:
Array
.
prototype
.
indexOf
.
call
(
m
,
h
)})}}}})}(
mui
,
window
,
document
,
"
tab
"
),
function
(
a
,
b
){
var
c
=
"
mui-slider
"
,
d
=
"
mui-slider-group
"
,
e
=
"
mui-slider-loop
"
,
f
=
"
mui-slider-indicator
"
,
g
=
"
mui-action-previous
"
,
h
=
"
mui-action-next
"
,
i
=
"
mui-slider-item
"
,
j
=
"
.
"
+
i
,
k
=
"
.
"
+
f
,
l
=
"
.mui-slider-progress-bar
"
,
m
=
function
(
b
,
c
){
this
.
element
=
b
,
this
.
options
=
a
.
extend
({
slideshowDelay
:
0
,
factor
:
1
},
c
),
this
.
init
()};
m
.
prototype
.
init
=
function
(){
this
.
initEvent
(),
this
.
initTimer
()},
m
.
prototype
.
refresh
=
function
(
b
){
var
c
=
a
.
extend
({
slideshowDelay
:
0
,
factor
:
1
},
b
);
this
.
options
.
slideshowDelay
!=
c
.
slideshowDelay
&&
(
this
.
options
.
slideshowDelay
=
c
.
slideshowDelay
,
this
.
options
.
slideshowDelay
&&
this
.
nextItem
())},
m
.
prototype
.
initEvent
=
function
(){
var
b
=
this
,
c
=
b
.
element
,
d
=
c
.
parentNode
;
b
.
translateX
=
0
,
b
.
sliderWidth
=
c
.
offsetWidth
,
b
.
isLoop
=
c
.
classList
.
contains
(
e
),
b
.
sliderLength
=
c
.
querySelectorAll
(
j
).
length
,
b
.
progressBarWidth
=
0
,
b
.
progressBar
=
d
.
querySelector
(
l
),
b
.
progressBar
&&
(
b
.
progressBarWidth
=
b
.
progressBar
.
offsetWidth
);
var
f
=!
1
;
b
.
isSwipeable
=!
1
,
d
.
addEventListener
(
"
dragstart
"
,
function
(
a
){
var
d
=
a
.
detail
,
g
=
d
.
direction
;(
"
left
"
==
g
||
"
right
"
==
g
)
&&
(
f
=!
0
,
b
.
translateX
=
b
.
lastTranslateX
=
0
,
b
.
scrollX
=
b
.
getScroll
(),
b
.
sliderWidth
=
c
.
offsetWidth
,
b
.
isLoop
=
c
.
classList
.
contains
(
e
),
b
.
sliderLength
=
c
.
querySelectorAll
(
j
).
length
,
b
.
progressBar
&&
(
b
.
progressBarWidth
=
b
.
progressBar
.
offsetWidth
),
b
.
maxTranslateX
=
(
b
.
sliderLength
-
1
)
*
b
.
sliderWidth
,
a
.
detail
.
gesture
.
preventDefault
())}),
d
.
addEventListener
(
"
drag
"
,
function
(
a
){
f
&&
b
.
dragItem
(
a
)}),
d
.
addEventListener
(
"
dragend
"
,
function
(){
f
&&
(
b
.
gotoItem
(
b
.
getSlideNumber
()),
f
=
b
.
isSwipeable
=!
1
)}),
d
.
addEventListener
(
"
swipeleft
"
,
function
(
c
){
b
.
isSwipeable
&&
(
a
.
gestures
.
stoped
=!
0
,
b
.
nextItem
(),
f
=
b
.
isSwipeable
=!
1
,
c
.
stopImmediatePropagation
())}),
d
.
addEventListener
(
"
swiperight
"
,
function
(
c
){
b
.
isSwipeable
&&
(
a
.
gestures
.
stoped
=!
0
,
b
.
prevItem
(),
f
=
b
.
isSwipeable
=!
1
,
c
.
stopImmediatePropagation
())}),
d
.
addEventListener
(
"
slide
"
,
function
(
a
){
var
b
=
a
.
detail
;
b
.
slideNumber
=
b
.
slideNumber
||
0
;
var
c
=
d
.
querySelector
(
"
.mui-slider-indicator .mui-number span
"
);
c
&&
(
c
.
innerText
=
b
.
slideNumber
+
1
);
for
(
var
e
=
d
.
querySelectorAll
(
"
.mui-slider-indicator .mui-indicator
"
),
f
=
0
,
g
=
e
.
length
;
g
>
f
;
f
++
)
e
[
f
].
classList
[
f
===
b
.
slideNumber
?
"
add
"
:
"
remove
"
](
"
mui-active
"
);
for
(
var
h
=
d
.
querySelectorAll
(
"
.mui-control-item
"
),
f
=
0
,
g
=
h
.
length
;
g
>
f
;
f
++
)
h
[
f
].
classList
[
f
===
b
.
slideNumber
?
"
add
"
:
"
remove
"
](
"
mui-active
"
)}),
d
.
addEventListener
(
a
.
eventName
(
"
shown
"
,
"
tab
"
),
function
(
a
){
b
.
gotoItem
(
-
(
a
.
detail
.
tabNumber
||
0
))});
var
i
=
c
.
parentNode
.
querySelector
(
k
);
i
&&
i
.
addEventListener
(
"
tap
"
,
function
(
a
){
var
c
=
a
.
target
;(
c
.
classList
.
contains
(
g
)
||
c
.
classList
.
contains
(
h
))
&&
(
b
[
c
.
classList
.
contains
(
g
)?
"
prevItem
"
:
"
nextItem
"
](),
a
.
stopPropagation
())})},
m
.
prototype
.
dragItem
=
function
(
a
){
var
b
=
this
,
c
=
a
.
detail
;
if
(
c
.
deltaX
!==
c
.
lastDeltaX
){
var
d
=
c
.
deltaX
*
b
.
options
.
factor
+
b
.
scrollX
;
b
.
element
.
style
[
"
-webkit-transition-duration
"
]
=
"
0
"
;
var
e
=
0
,
f
=-
b
.
maxTranslateX
;
if
(
b
.
isLoop
&&
(
e
=
b
.
sliderWidth
,
f
+=
e
),
d
>
e
||
f
>
d
)
return
void
(
b
.
isSwipeable
=!
1
);
b
.
requestAnimationFrame
||
b
.
updateTranslate
(),
b
.
isSwipeable
=!
0
,
b
.
translateX
=
d
}
b
.
timer
&&
clearTimeout
(
b
.
timer
),
b
.
timer
=
setTimeout
(
function
(){
b
.
initTimer
()},
100
)},
m
.
prototype
.
updateTranslate
=
function
(){
var
a
=
this
;
a
.
lastTranslateX
!==
a
.
translateX
&&
(
a
.
setTranslate
(
a
.
translateX
),
a
.
lastTranslateX
=
a
.
translateX
),
a
.
requestAnimationFrame
=
requestAnimationFrame
(
function
(){
a
.
updateTranslate
()})},
m
.
prototype
.
setTranslate
=
function
(
a
){
this
.
element
.
style
.
webkitTransform
=
"
translate3d(
"
+
a
+
"
px,0,0)
"
,
this
.
updateProcess
(
a
)},
m
.
prototype
.
updateProcess
=
function
(
a
){
var
b
=
this
.
progressBarWidth
;
b
&&
(
a
=
Math
.
abs
(
a
),
this
.
setProcess
(
a
*
(
b
/
this
.
sliderWidth
)))},
m
.
prototype
.
setProcess
=
function
(
a
){
var
b
=
this
.
progressBar
;
b
&&
(
b
.
style
.
webkitTransform
=
"
translate3d(
"
+
a
+
"
px,0,0)
"
)},
m
.
prototype
.
nextItem
=
function
(){
this
.
gotoItem
(
this
.
getCurrentSlideNumber
(
"
next
"
)
-
1
)},
m
.
prototype
.
prevItem
=
function
(){
this
.
gotoItem
(
this
.
getCurrentSlideNumber
(
"
prev
"
)
+
1
)},
m
.
prototype
.
gotoItem
=
function
(
b
){
var
c
=
this
,
d
=
c
.
element
,
e
=
c
.
sliderLength
;
c
.
isLoop
?
e
-=
2
:(
e
-=
1
,
b
=
Math
.
min
(
0
,
b
),
b
=
Math
.
max
(
b
,
-
e
)),
c
.
requestAnimationFrame
&&
(
cancelAnimationFrame
(
c
.
requestAnimationFrame
),
c
.
requestAnimationFrame
=
null
);
var
f
=
Math
.
max
(
b
,
-
e
)
*
d
.
offsetWidth
;
d
.
style
[
"
-webkit-transition-duration
"
]
=
"
.2s
"
,
c
.
setTranslate
(
f
);
var
g
=
function
(){
d
.
style
[
"
-webkit-transition-duration
"
]
=
"
0
"
,
d
.
style
.
webkitTransform
=
"
translate3d(
"
+
b
*
d
.
offsetWidth
+
"
px,0,0)
"
,
d
.
removeEventListener
(
"
webkitTransitionEnd
"
,
g
)};
d
.
removeEventListener
(
"
webkitTransitionEnd
"
,
g
),
c
.
isLoop
&&
(
1
===
b
||
b
===-
e
)
&&
(
b
=
1
===
b
?
-
e
+
1
:
0
,
d
.
addEventListener
(
"
webkitTransitionEnd
"
,
g
)),
a
.
trigger
(
d
.
parentNode
,
"
slide
"
,{
slideNumber
:
Math
.
abs
(
b
)}),
this
.
initTimer
()},
m
.
prototype
.
getSlideNumber
=
function
(){
return
Math
.
round
(
this
.
getScroll
()
/
this
.
sliderWidth
)},
m
.
prototype
.
getCurrentSlideNumber
=
function
(
a
){
return
Math
[
"
next
"
===
a
?
"
ceil
"
:
"
floor
"
](
this
.
getScroll
()
/
this
.
sliderWidth
)},
m
.
prototype
.
getScroll
=
function
(){
var
b
=
this
.
element
,
c
=
0
;
if
(
"
webkitTransform
"
in
b
.
style
){
var
d
=
a
.
parseTranslate
(
b
.
style
.
webkitTransform
);
c
=
d
?
d
.
x
:
0
}
return
c
},
m
.
prototype
.
initTimer
=
function
(){
var
a
=
this
,
c
=
a
.
options
.
slideshowDelay
;
if
(
c
){
var
d
=
a
.
element
,
e
=
d
.
getAttribute
(
"
data-slidershowTimer
"
);
e
&&
b
.
clearTimeout
(
e
),
e
=
b
.
setTimeout
(
function
(){
d
&&
((
d
.
offsetWidth
||
d
.
offsetHeight
)
&&
a
.
nextItem
(),
a
.
initTimer
())},
c
),
d
.
setAttribute
(
"
data-slidershowTimer
"
,
e
)}},
a
.
fn
.
slider
=
function
(
b
){
this
.
each
(
function
(){
var
e
=
this
;
this
.
classList
.
contains
(
c
)
&&
(
e
=
this
.
querySelector
(
"
.
"
+
d
));
var
f
=
e
.
getAttribute
(
"
data-slider
"
);
if
(
f
){
var
g
=
a
.
data
[
f
];
g
&&
g
.
refresh
(
b
)}
else
f
=++
a
.
uuid
,
a
.
data
[
f
]
=
new
m
(
e
,
b
),
e
.
setAttribute
(
"
data-slider
"
,
f
)})},
a
.
ready
(
function
(){
a
(
"
.mui-slider-group
"
).
slider
()})}(
mui
,
window
),
function
(
a
,
b
,
c
,
d
){
var
e
=
"
mui-switch
"
,
f
=
"
mui-switch-handle
"
,
g
=
"
mui-active
"
,
h
=
"
.
"
+
f
,
i
=
function
(
a
,
b
){
return
b
.
classList
&&
b
.
classList
.
contains
(
e
)?
b
:
!
1
};
a
.
registerTarget
({
name
:
d
,
index
:
100
,
handle
:
i
,
target
:
!
1
});
var
j
,
i
,
k
,
l
,
m
,
n
=
function
(
b
){
if
(
j
){
var
c
=
b
.
detail
;
a
.
gestures
.
stoped
=!
0
;
var
d
=!
c
.
drag
&&!
j
.
classList
.
contains
(
g
)
||
c
.
drag
&&
c
.
deltaX
>
k
/
2
-
l
/
2
;
i
.
style
[
"
-webkit-transition-duration
"
]
=
"
.2s
"
,
d
?(
i
.
style
.
webkitTransform
=
"
translate3d(
"
+
m
+
"
px,0,0)
"
,
j
.
classList
.
add
(
g
)):(
i
.
style
.
webkitTransform
=
"
translate3d(0,0,0)
"
,
j
.
classList
.
remove
(
g
)),
a
.
trigger
(
j
,
"
toggle
"
,{
isActive
:
d
})}},
o
=
function
(
a
){
if
(
j
){
var
b
=
a
.
detail
.
deltaX
;
if
(
0
>
b
)
return
i
.
style
.
webkitTransform
=
"
translate3d(0,0,0)
"
;
if
(
b
>
m
)
return
i
.
style
.
webkitTransform
=
"
translate3d(
"
+
m
+
"
px,0,0)
"
;
i
.
style
[
"
-webkit-transition-duration
"
]
=
"
0s
"
,
i
.
style
.
webkitTransform
=
"
translate3d(
"
+
b
+
"
px,0,0)
"
,
j
.
classList
[
b
>
k
/
2
-
l
/
2
?
"
add
"
:
"
remove
"
](
g
)}};
b
.
addEventListener
(
a
.
EVENT_START
,
function
(
b
){
j
=
a
.
targets
.
toggle
,
j
&&
(
i
=
j
.
querySelector
(
h
),
k
=
j
.
clientWidth
,
l
=
i
.
clientWidth
,
m
=
k
-
l
+
3
,
b
.
preventDefault
())}),
b
.
addEventListener
(
"
tap
"
,
n
),
b
.
addEventListener
(
"
drag
"
,
o
),
b
.
addEventListener
(
"
dragend
"
,
n
)}(
mui
,
window
,
document
,
"
toggle
"
),
function
(
a
,
b
,
c
){
var
d
,
e
,
f
,
g
,
h
,
i
,
j
,
k
,
l
,
m
,
n
,
o
,
p
,
q
,
r
,
s
,
t
,
u
=
"
mui-active
"
,
v
=
"
mui-selected
"
,
w
=
"
mui-table-view-cell
"
,
x
=
"
mui-disabled
"
,
y
=
"
mui-switch
"
,
z
=
"
mui-btn
"
,
A
=
"
mui-slider-cell
"
,
B
=
"
mui-slider-handle
"
,
C
=
"
mui-slider-left
"
,
D
=
"
mui-slider-right
"
,
E
=
"
mui-bounce
"
,
F
=
"
.
"
+
A
,
G
=
"
.
"
+
B
,
H
=
"
.
"
+
C
,
I
=
"
.
"
+
D
,
J
=
.
4
,
K
=
1
,
L
=
1
,
M
=
function
(
a
){
a
?
e
?
e
.
classList
.
add
(
u
):
d
&&
d
.
classList
.
add
(
u
):
e
?
e
.
classList
.
remove
(
u
):
d
&&
d
.
classList
.
remove
(
u
)},
N
=
function
(){
s
!==
t
&&
(
k
||
n
?(
k
&&
n
?
0
===
h
?
O
(
g
,
s
):
O
(
g
,
h
+
s
):
k
?
0
===
h
?
O
(
g
,
Math
.
max
(
s
,
0
)):
O
(
g
,
Math
.
max
(
h
+
s
,
0
)):
n
&&
(
0
===
h
?
O
(
g
,
Math
.
min
(
s
,
0
)):
O
(
g
,
Math
.
min
(
h
+
s
,
0
))),
k
&&
(
0
===
h
?
s
>
m
&&
(
f
.
style
.
backgroundColor
=
l
,
O
(
k
,
Math
.
max
(
s
-
m
,
0
))):(
f
.
style
.
backgroundColor
=
s
>
0
?
l
:
""
,
O
(
k
,
Math
.
max
(
s
,
0
)))),
n
&&
(
0
===
h
?
-
s
>
p
&&
(
f
.
style
.
backgroundColor
=
o
,
O
(
n
,
Math
.
min
(
-
(
-
s
-
p
),
0
))):(
f
.
style
.
backgroundColor
=
s
>
0
&&!
k
?
""
:
o
,
O
(
n
,
Math
.
min
(
s
,
0
))))):
g
&&
(
0
===
h
&&
s
>
0
||
h
===
i
&&
0
>
s
)
&&
Math
.
abs
(
s
)
<=
i
&&
O
(
g
,
h
+
s
),
t
=
s
),
r
=
requestAnimationFrame
(
function
(){
N
()})},
O
=
function
(
a
,
b
){
a
&&
(
a
.
style
.
webkitTransform
=
"
translate3d(
"
+
b
+
"
px,0,0)
"
)},
P
=
function
(
b
,
c
){
k
&&
(
k
.
setAttribute
(
"
style
"
,
""
),
n
&&
n
.
setAttribute
(
"
style
"
,
""
),
b
?(
O
(
g
,
m
),
c
&&
a
.
trigger
(
g
,
"
slideright
"
),
d
.
classList
.
add
(
v
)):(
O
(
g
,
0
),
d
.
classList
.
remove
(
v
)))},
Q
=
function
(
b
,
c
){
n
&&
(
n
.
setAttribute
(
"
style
"
,
""
),
k
&&
k
.
setAttribute
(
"
style
"
,
""
),
b
?(
O
(
g
,
-
p
),
c
&&
a
.
trigger
(
g
,
"
slideleft
"
),
d
.
classList
.
add
(
v
)):(
O
(
g
,
0
),
d
.
classList
.
remove
(
v
)))},
R
=
function
(
a
){
g
&&
(
a
?(
O
(
g
,
0
),
d
.
classList
.
add
(
v
)):(
O
(
g
,
i
),
d
.
classList
.
remove
(
v
)))},
S
=
function
(
b
,
c
){
q
=!
1
,
r
&&
(
cancelAnimationFrame
(
r
),
r
=
null
),
f
.
setAttribute
(
"
style
"
,
""
);
var
d
=
Math
.
abs
(
s
);
if
(
b
||!
k
&&!
n
)
k
||
n
||
R
(
0
===
h
?
!
(
d
>
i
/
2
):
d
>
i
/
2
);
else
if
(
s
>
0
){
var
e
=
m
/
2
;
if
(
0
!==
h
&&
n
&&
(
Q
(
!
(
d
>=
p
/
2
),
!
1
),
e
=
m
/
2
+
p
),
k
){
var
j
=
d
>=
e
;
k
.
classList
.
contains
(
E
)?(
k
.
setAttribute
(
"
style
"
,
""
),
O
(
g
,
0
),
j
&&!
c
.
swipe
&&
a
.
trigger
(
g
,
"
slideright
"
)):
P
(
j
,
!
0
)}}
else
{
var
e
=
m
/
2
;
if
(
0
!==
h
&&
k
&&
(
P
(
!
(
d
>=
m
/
2
),
!
1
),
e
=
p
/
2
+
m
),
n
){
var
j
=
d
>=
e
;
n
.
classList
.
contains
(
E
)?(
n
.
setAttribute
(
"
style
"
,
""
),
O
(
g
,
0
),
j
&&!
c
.
swipe
&&
a
.
trigger
(
g
,
"
slideleft
"
)):
Q
(
j
,
!
0
)}}};
b
.
addEventListener
(
"
touchstart
"
,
function
(
b
){
d
=
e
=
g
=
k
=
n
=
q
=
r
=!
1
,
s
=
t
=
h
=
i
=
m
=
p
=
0
,
l
=
o
=
""
;
for
(
var
u
=
b
.
target
,
A
=!
1
;
u
&&
u
!==
c
;
u
=
u
.
parentNode
)
if
(
u
.
classList
){
var
B
=
u
.
classList
;
if
((
"
INPUT
"
===
u
.
tagName
&&
"
radio
"
!==
u
.
type
&&
"
checkbox
"
!==
u
.
type
||
"
BUTTON
"
===
u
.
tagName
||
B
.
contains
(
y
)
||
B
.
contains
(
z
)
||
B
.
contains
(
x
))
&&
(
A
=!
0
),
B
.
contains
(
w
)){
d
=
u
;
var
C
=
d
.
parentNode
.
querySelector
(
"
.
"
+
v
);
if
(
C
&&
C
!=
d
){
C
.
classList
.
remove
(
v
);
var
D
=
C
.
querySelector
(
G
);
if
(
D
){
var
E
=
C
.
querySelector
(
H
);
E
&&
E
.
setAttribute
(
"
style
"
,
""
);
var
N
=
C
.
querySelector
(
I
);
N
&&
N
.
setAttribute
(
"
style
"
,
""
),
E
||
N
?
O
(
D
,
0
):
O
(
D
,
D
.
offsetWidth
)}}
var
P
=
d
.
querySelector
(
"
a
"
);
if
(
P
&&
P
.
parentNode
===
d
&&
(
e
=
P
),
f
=
d
.
querySelector
(
F
),
f
&&
f
.
parentNode
===
d
){
var
Q
=
f
.
querySelector
(
G
);
if
(
Q
){
g
=
Q
,
i
=
g
.
offsetWidth
,
j
=
a
.
getStyles
(
g
,
"
margin-left
"
),
L
=
K
;
var
R
=
f
.
querySelector
(
H
);
R
&&
(
k
=
R
,
l
=
a
.
getStyles
(
R
,
"
background-color
"
),
m
=
R
.
offsetWidth
);
var
S
=
f
.
querySelector
(
I
);
S
&&
(
n
=
S
,
o
=
a
.
getStyles
(
S
,
"
background-color
"
),
p
=
S
.
offsetWidth
),(
k
||
n
)
&&
(
L
=
J
);
var
T
=
a
.
getStyles
(
g
,
"
webkitTransform
"
),
U
=
a
.
parseTranslateMatrix
(
T
);
h
=
U
?
U
.
x
:
0
}}
A
||
M
(
!
0
);
break
}}}),
b
.
addEventListener
(
"
touchmove
"
,
function
(){
M
(
!
1
)}),
b
.
addEventListener
(
"
dragstart
"
,
function
(
a
){
if
(
g
){
var
b
=
a
.
detail
,
c
=
b
.
direction
,
d
=
b
.
angle
;
if
(
"
left
"
===
c
){
if
((
n
||
g
)
&&
(
d
>
150
||-
150
>
d
)){
if
(
!
n
&&
k
&&
0
===
h
)
return
;
if
(
g
&&!
n
&&!
k
&&
0
===
h
)
return
;
q
=!
0
}}
else
if
(
"
right
"
===
c
&&
(
k
||
g
)
&&
d
>-
30
&&
30
>
d
){
if
(
!
k
&&
n
&&
0
===
h
)
return
;
if
(
g
&&!
n
&&!
k
&&
h
===
i
)
return
;
q
=!
0
}}}),
b
.
addEventListener
(
"
drag
"
,
function
(
a
){
q
&&
(
r
||
N
(),
s
=
a
.
detail
.
deltaX
*
L
,
a
.
detail
.
gesture
.
preventDefault
())}),
b
.
addEventListener
(
"
dragend
"
,
function
(
a
){
q
&&
S
(
!
1
,
a
.
detail
)}),
b
.
addEventListener
(
"
swiperight
"
,
function
(
b
){
if
(
g
){
var
c
=!
1
;
k
&&!
k
.
classList
.
contains
(
E
)
&&
0
===
h
?(
P
(
!
0
,
!
0
),
c
=!
0
):
n
&&
0
>
h
?(
Q
(
!
1
,
!
1
),
c
=!
0
):
k
||
n
||
(
c
=!
0
),
c
&&
(
a
.
gestures
.
stoped
=!
0
,
b
.
stopImmediatePropagation
(),
S
(
!
0
,
b
.
detail
))}}),
b
.
addEventListener
(
"
swipeleft
"
,
function
(
b
){
if
(
g
){
var
c
=!
1
;
n
&&!
n
.
classList
.
contains
(
E
)
&&
0
===
h
?(
Q
(
!
0
,
!
0
),
c
=!
0
):
k
&&
h
>
0
?(
P
(
!
1
,
!
1
),
c
=!
0
):
k
||
n
||
(
c
=!
0
),
c
&&
(
a
.
gestures
.
stoped
=!
0
,
b
.
stopImmediatePropagation
(),
S
(
!
0
,
b
.
detail
))}}),
b
.
addEventListener
(
"
touchend
"
,
function
(){
d
&&
M
(
!
1
)}),
b
.
addEventListener
(
"
touchcancel
"
,
function
(){
d
&&
M
(
!
1
)});
var
T
=
function
(){
var
a
=
d
.
classList
;
if
(
a
.
contains
(
"
mui-radio
"
)){
var
b
=
d
.
querySelector
(
"
input[type=radio]
"
);
b
&&
b
.
click
()}
else
if
(
a
.
contains
(
"
mui-checkbox
"
)){
var
b
=
d
.
querySelector
(
"
input[type=checkbox]
"
);
b
&&
b
.
click
()}};
b
.
addEventListener
(
"
doubletap
"
,
function
(){
d
&&
T
()}),
b
.
addEventListener
(
"
tap
"
,
function
(){
if
(
d
){
var
b
=!
1
,
c
=
d
.
classList
;
if
(
c
.
contains
(
"
mui-collapse
"
)){
if
(
!
c
.
contains
(
u
)){
var
e
=
d
.
parentNode
.
querySelector
(
"
.mui-collapse.mui-active
"
);
e
&&
e
.
classList
.
remove
(
u
),
b
=!
0
}
c
.
toggle
(
u
),
b
&&
a
.
trigger
(
d
,
"
expand
"
)}
T
()}})}(
mui
,
window
,
document
),
function
(
a
,
b
){
a
.
alert
=
function
(
c
,
d
,
e
,
f
){
if
(
a
.
os
.
plus
){
if
(
void
0
===
typeof
c
)
return
;
"
function
"
==
typeof
d
?(
f
=
d
,
d
=
null
,
e
=
"
确定
"
):
"
function
"
==
typeof
e
&&
(
f
=
e
,
e
=
null
),
plus
.
nativeUI
.
alert
(
c
,
f
,
d
,
e
)}
else
b
.
alert
(
c
)}}(
mui
,
window
),
function
(
a
,
b
){
a
.
confirm
=
function
(
c
,
d
,
e
,
f
){
if
(
a
.
os
.
plus
){
if
(
void
0
===
typeof
c
)
return
;
"
function
"
==
typeof
d
?(
f
=
d
,
d
=
null
,
e
=
null
):
"
function
"
==
typeof
e
&&
(
f
=
e
,
e
=
null
),
plus
.
nativeUI
.
confirm
(
c
,
f
,
d
,
e
)}
else
b
.
confirm
(
c
)}}(
mui
,
window
),
function
(
a
,
b
){
a
.
prompt
=
function
(
c
,
d
,
e
,
f
,
g
){
if
(
a
.
os
.
plus
){
if
(
void
0
===
typeof
message
)
return
;
"
function
"
==
typeof
d
?(
g
=
d
,
d
=
null
,
e
=
null
,
f
=
null
):
"
function
"
==
typeof
e
?(
g
=
e
,
e
=
null
,
f
=
null
):
"
function
"
==
typeof
f
&&
(
g
=
f
,
f
=
null
),
plus
.
nativeUI
.
prompt
(
c
,
g
,
e
,
d
,
f
)}
else
b
.
prompt
(
c
)}}(
mui
,
window
),
function
(
a
){
a
.
toast
=
function
(
b
){
if
(
a
.
os
.
plus
&&
a
.
os
.
android
)
plus
.
nativeUI
.
toast
(
b
,{
verticalAlign
:
"
bottom
"
});
else
{
var
c
=
document
.
createElement
(
"
div
"
);
c
.
classList
.
add
(
"
mui-toast-container
"
),
c
.
innerHTML
=
'
<div class="mui-toast-message">
'
+
b
+
"
</div>
"
,
document
.
body
.
appendChild
(
c
),
setTimeout
(
function
(){
document
.
body
.
removeChild
(
c
)},
2
e3
)}}}(
mui
,
window
),
function
(
a
,
b
,
c
){
var
d
=
"
mui-icon
"
,
e
=
"
mui-icon-clear
"
,
f
=
"
mui-icon-speech
"
,
g
=
"
mui-icon-search
"
,
h
=
"
mui-input-row
"
,
i
=
"
mui-placeholder
"
,
j
=
"
mui-tooltip
"
,
k
=
"
mui-hidden
"
,
l
=
"
.
"
+
e
,
m
=
"
.
"
+
f
,
n
=
"
.
"
+
i
,
o
=
"
.
"
+
j
,
p
=
function
(
a
){
for
(;
a
&&
a
!==
c
;
a
=
a
.
parentNode
)
if
(
a
.
classList
&&
a
.
classList
.
contains
(
h
))
return
a
;
return
null
},
q
=
function
(
a
,
b
){
this
.
element
=
a
,
this
.
options
=
b
||
{
actions
:
"
clear
"
},
~
this
.
options
.
actions
.
indexOf
(
"
slider
"
)?(
this
.
sliderActionClass
=
j
+
"
"
+
k
,
this
.
sliderActionSelector
=
o
):(
~
this
.
options
.
actions
.
indexOf
(
"
clear
"
)
&&
(
this
.
clearActionClass
=
d
+
"
"
+
e
+
(
a
.
value
?
""
:
"
"
+
k
),
this
.
clearActionSelector
=
l
),
~
this
.
options
.
actions
.
indexOf
(
"
speech
"
)
&&
(
this
.
speechActionClass
=
d
+
"
"
+
f
,
this
.
speechActionSelector
=
m
),
~
this
.
options
.
actions
.
indexOf
(
"
search
"
)
&&
(
this
.
searchActionClass
=
i
,
this
.
searchActionSelector
=
n
)),
this
.
init
()};
q
.
prototype
.
init
=
function
(){
this
.
initAction
(),
this
.
initElementEvent
()},
q
.
prototype
.
initAction
=
function
(){
var
a
=
this
,
b
=
a
.
element
.
parentNode
;
b
&&
(
a
.
sliderActionClass
?
a
.
sliderAction
=
a
.
createAction
(
b
,
a
.
sliderActionClass
,
a
.
sliderActionSelector
):(
a
.
searchActionClass
&&
(
a
.
searchAction
=
a
.
createAction
(
b
,
a
.
searchActionClass
,
a
.
searchActionSelector
),
a
.
searchAction
.
addEventListener
(
"
tap
"
,
function
(){
setTimeout
(
function
(){
a
.
element
.
focus
()},
0
)})),
a
.
speechActionClass
&&
(
a
.
speechAction
=
a
.
createAction
(
b
,
a
.
speechActionClass
,
a
.
speechActionSelector
),
a
.
speechAction
.
addEventListener
(
"
click
"
,
function
(
a
){
a
.
stopPropagation
()}),
a
.
speechAction
.
addEventListener
(
"
tap
"
,
function
(
b
){
a
.
speechActionClick
(
b
)})),
a
.
clearActionClass
&&
(
a
.
clearAction
=
a
.
createAction
(
b
,
a
.
clearActionClass
,
a
.
clearActionSelector
),
a
.
clearAction
.
addEventListener
(
"
tap
"
,
function
(
b
){
a
.
clearActionClick
(
b
)}))))},
q
.
prototype
.
createAction
=
function
(
a
,
b
,
e
){
var
f
=
a
.
querySelector
(
e
);
if
(
!
f
){
var
f
=
c
.
createElement
(
"
span
"
);
f
.
className
=
b
,
b
===
this
.
searchActionClass
&&
(
f
.
innerHTML
=
'
<span class="
'
+
d
+
"
"
+
g
+
'
"></span>
'
+
this
.
element
.
getAttribute
(
"
placeholder
"
),
this
.
element
.
setAttribute
(
"
placeholder
"
,
""
)),
a
.
insertBefore
(
f
,
this
.
element
.
nextSibling
)}
return
f
},
q
.
prototype
.
initElementEvent
=
function
(){
var
b
=
this
.
element
;
if
(
this
.
sliderActionClass
){
var
c
=
this
.
sliderAction
,
d
=
b
.
offsetLeft
,
e
=
b
.
offsetWidth
-
28
,
f
=
c
.
offsetWidth
,
g
=
Math
.
abs
(
b
.
max
-
b
.
min
),
h
=
null
,
i
=
function
(){
c
.
classList
.
remove
(
k
),
f
=
f
||
c
.
offsetWidth
;
var
a
=
Math
.
abs
(
b
.
value
)
/
g
*
e
;
c
.
style
.
left
=
14
+
d
+
a
-
f
/
2
+
"
px
"
,
c
.
innerText
=
b
.
value
,
h
&&
clearTimeout
(
h
),
h
=
setTimeout
(
function
(){
c
.
classList
.
add
(
k
)},
1
e3
)};
b
.
addEventListener
(
"
input
"
,
i
),
b
.
addEventListener
(
"
tap
"
,
i
)}
else
{
if
(
this
.
clearActionClass
){
var
j
=
this
.
clearAction
;
if
(
!
j
)
return
;
a
.
each
([
"
keyup
"
,
"
change
"
,
"
input
"
,
"
focus
"
,
"
blur
"
,
"
cut
"
,
"
paste
"
],
function
(
a
,
c
){
!
function
(
a
){
b
.
addEventListener
(
a
,
function
(){
j
.
classList
[
b
.
value
.
trim
()?
"
remove
"
:
"
add
"
](
k
)})}(
c
)})}
this
.
searchActionClass
&&
(
b
.
addEventListener
(
"
focus
"
,
function
(){
b
.
parentNode
.
classList
.
add
(
"
mui-active
"
)}),
b
.
addEventListener
(
"
blur
"
,
function
(){
b
.
value
.
trim
()
||
b
.
parentNode
.
classList
.
remove
(
"
mui-active
"
)}))}},
q
.
prototype
.
clearActionClick
=
function
(
a
){
this
.
element
.
value
=
""
,
this
.
element
.
focus
(),
this
.
clearAction
.
classList
.
add
(
k
),
a
.
preventDefault
()},
q
.
prototype
.
speechActionClick
=
function
(
a
){
if
(
b
.
plus
){
var
c
=
this
;
c
.
element
.
value
=
""
,
plus
.
speech
.
startRecognize
({
engine
:
"
iFly
"
},
function
(
a
){
c
.
element
.
value
+=
a
,
setTimeout
(
function
(){
c
.
element
.
focus
()},
0
),
plus
.
speech
.
stopRecognize
()},
function
(){})}
else
alert
(
"
only for 5+
"
);
a
.
preventDefault
()},
a
.
fn
.
input
=
function
(){
this
.
each
(
function
(){
var
b
=
[],
c
=
p
(
this
.
parentNode
);
if
(
"
range
"
===
this
.
type
&&
c
.
classList
.
contains
(
"
mui-input-range
"
))
b
.
push
(
"
slider
"
);
else
{
var
d
=
this
.
classList
;
d
.
contains
(
"
mui-input-clear
"
)
&&
b
.
push
(
"
clear
"
),
d
.
contains
(
"
mui-input-speech
"
)
&&
b
.
push
(
"
speech
"
),
"
search
"
===
this
.
type
&&
c
.
classList
.
contains
(
"
mui-search
"
)
&&
b
.
push
(
"
search
"
)}
var
e
=
this
.
getAttribute
(
"
data-input-
"
+
b
[
0
]);
if
(
!
e
){
e
=++
a
.
uuid
,
a
.
data
[
e
]
=
new
q
(
this
,{
actions
:
b
.
join
(
"
,
"
)});
for
(
var
f
=
0
,
g
=
b
.
length
;
g
>
f
;
f
++
)
this
.
setAttribute
(
"
data-input-
"
+
b
[
f
],
e
)}})},
a
.
ready
(
function
(){
a
(
"
.mui-input-row input
"
).
input
()})}(
mui
,
window
,
document
),
function
(
a
,
b
){
a
.
back
=
function
(){
b
.
history
.
length
>
1
&&
(
"
function
"
==
typeof
a
.
options
.
back
?
a
.
options
.
back
()
!==!
1
&&
b
.
history
.
back
():
b
.
history
.
back
())},
b
.
addEventListener
(
"
tap
"
,
function
(){
var
b
=
a
.
targets
.
action
;
b
&&
b
.
classList
.
contains
(
"
mui-action-back
"
)
&&
a
.
back
()}),
b
.
addEventListener
(
"
swiperight
"
,
function
(
b
){
var
c
=
b
.
detail
;
c
.
angle
>-
15
&&
c
.
angle
<
15
&&
a
.
options
.
swipeBack
===!
0
&&
a
.
back
()})}(
mui
,
window
),
function
(
a
,
b
){
a
.
back
=
function
(){
var
c
=!
0
,
d
=!
1
;
if
(
"
function
"
==
typeof
a
.
options
.
back
&&
(
d
=
a
.
options
.
back
(),
d
===!
1
&&
(
c
=!
1
)),
c
)
if
(
b
.
plus
){
var
e
=
a
.
currentWebview
,
f
=
e
.
parent
();
e
.
canBack
(
function
(){
f
&&
(
e
=
f
);
var
b
=
e
.
opener
();
if
(
b
){
var
c
=
b
.
parent
();
c
&&
(
b
=
c
),
e
.
preload
?
e
.
hide
(
"
auto
"
):
a
.
closeAll
(
e
)}})}
else
b
.
history
.
length
>
1
?
b
.
history
.
back
():
b
.
close
()},
a
.
menu
=
function
(){
var
c
=
document
.
querySelector
(
"
.mui-action-menu
"
);
if
(
c
)
a
.
trigger
(
c
,
"
tap
"
);
else
if
(
b
.
plus
){
var
d
=
a
.
currentWebview
,
e
=
d
.
parent
();
e
&&
e
.
evalJS
(
"
mui&&mui.menu();
"
)}},
a
.
plusReady
(
function
(){
plus
.
key
.
addEventListener
(
"
backbutton
"
,
function
(){
a
.
back
()},
!
1
),
plus
.
key
.
addEventListener
(
"
menubutton
"
,
function
(){
a
.
menu
()},
!
1
)})}(
mui
,
window
);
\ No newline at end of file
examples/hello-mui/js/mui.min.js
View file @
0dbd43c9
...
...
@@ -3,5 +3,5 @@
* Mui v0.5.5 (https://github.com/dcloudio/mui)
* =====================================================
*/
var
mui
=
function
(
a
,
b
){
var
c
=
/complete|loaded|interactive/
,
d
=
/^#
([\w
-
]
*
)
$/
,
e
=
/^
\.([\w
-
]
+
)
$/
,
f
=
/^
[\w
-
]
+$/
,
g
=
/translate
(?:
3d
)?\((
.+
?)\)
/
,
h
=
/matrix
(
3d
)?\((
.+
?)\)
/
,
i
=
function
(
b
,
c
){
if
(
c
=
c
||
a
,
!
b
)
return
j
();
if
(
"
object
"
==
typeof
b
)
return
j
([
b
],
null
);
try
{
if
(
d
.
test
(
b
)){
var
e
=
c
.
getElementById
(
RegExp
.
$1
);
return
j
(
e
?[
e
]:[])}
return
j
(
i
.
qsa
(
b
,
c
),
b
)}
catch
(
f
){}
return
j
()},
j
=
function
(
a
,
b
){
return
a
=
a
||
[],
a
.
__proto__
=
i
.
fn
,
a
.
selector
=
b
||
""
,
a
};
return
i
.
uuid
=
0
,
i
.
data
=
{},
i
.
extend
=
function
(
a
,
c
,
d
){
a
||
(
a
=
{}),
c
||
(
c
=
{});
for
(
var
e
in
c
)
c
[
e
]
!==
b
&&
(
d
&&
"
object
"
==
typeof
a
[
e
]?
i
.
extend
(
a
[
e
],
c
[
e
],
d
):
a
[
e
]
=
c
[
e
]);
return
a
},
i
.
slice
=
[].
slice
,
i
.
qsa
=
function
(
b
,
c
){
return
c
=
c
||
a
,
i
.
slice
.
call
(
e
.
test
(
b
)?
c
.
getElementsByClassName
(
RegExp
.
$1
):
f
.
test
(
b
)?
c
.
getElementsByTagName
(
b
):
c
.
querySelectorAll
(
b
))},
i
.
ready
=
function
(
b
){
return
c
.
test
(
a
.
readyState
)?
b
(
i
):
a
.
addEventListener
(
"
DOMContentLoaded
"
,
function
(){
b
(
i
)},
!
1
),
this
},
i
.
each
=
function
(
a
,
b
){
return
[].
every
.
call
(
a
,
function
(
a
,
c
){
return
b
.
call
(
a
,
c
,
a
)
!==!
1
}),
this
},
i
.
trigger
=
function
(
a
,
b
,
c
){
return
a
.
dispatchEvent
(
new
CustomEvent
(
b
,{
detail
:
c
,
bubbles
:
!
0
,
cancelable
:
!
0
})),
this
},
i
.
getStyles
=
function
(
a
,
b
){
var
c
=
a
.
ownerDocument
.
defaultView
.
getComputedStyle
(
a
,
null
);
return
b
?
c
.
getPropertyValue
(
b
)
||
c
[
b
]:
c
},
i
.
parseTranslate
=
function
(
a
,
b
){
var
c
=
a
.
match
(
g
||
""
);
return
c
&&
c
[
1
]
||
(
c
=
[
""
,
"
0,0,0
"
]),
c
=
c
[
1
].
split
(
"
,
"
),
c
=
{
x
:
parseFloat
(
c
[
0
]),
y
:
parseFloat
(
c
[
1
]),
z
:
parseFloat
(
c
[
2
])},
b
&&
c
.
hasOwnProperty
(
b
)?
c
[
b
]:
c
},
i
.
parseTranslateMatrix
=
function
(
a
,
b
){
var
c
=
a
.
match
(
h
),
d
=
c
&&
c
[
1
];
c
?(
c
=
c
[
2
].
split
(
"
,
"
),
"
3d
"
===
d
?
c
=
c
.
slice
(
12
,
15
):(
c
.
push
(
0
),
c
=
c
.
slice
(
4
,
7
))):
c
=
[
0
,
0
,
0
];
var
e
=
{
x
:
parseFloat
(
c
[
0
]),
y
:
parseFloat
(
c
[
1
]),
z
:
parseFloat
(
c
[
2
])};
return
b
&&
e
.
hasOwnProperty
(
b
)?
e
[
b
]:
e
},
i
.
fn
=
{
each
:
function
(
a
){
return
[].
every
.
call
(
this
,
function
(
b
,
c
){
return
a
.
call
(
b
,
c
,
b
)
!==!
1
}),
this
}},
i
}(
document
);
window
.
mui
=
mui
,
"
$
"
in
window
||
(
window
.
$
=
mui
),
function
(
a
,
b
,
c
){
a
.
targets
=
{},
a
.
targetHandles
=
[],
a
.
registerTarget
=
function
(
b
){
return
b
.
index
=
b
.
index
||
1
e3
,
a
.
targetHandles
.
push
(
b
),
a
.
targetHandles
.
sort
(
function
(
a
,
b
){
return
a
.
index
-
b
.
index
}),
a
.
targetHandles
},
b
.
addEventListener
(
"
touchstart
"
,
function
(
b
){
for
(
var
d
=
b
.
target
,
e
=
{};
d
&&
d
!==
c
;
d
=
d
.
parentNode
){
var
f
=!
1
;
if
(
a
.
each
(
a
.
targetHandles
,
function
(
c
,
g
){
var
h
=
g
.
name
;
f
||
e
[
h
]
||!
g
.
hasOwnProperty
(
"
handle
"
)?
e
[
h
]
||
g
.
isReset
!==!
1
&&
(
a
.
targets
[
h
]
=!
1
):(
a
.
targets
[
h
]
=
g
.
handle
(
b
,
d
),
a
.
targets
[
h
]
&&
(
e
[
h
]
=!
0
,
g
.
isContinue
!==!
0
&&
(
f
=!
0
)))}),
f
)
break
}})}(
mui
,
window
,
document
),
function
(
a
){
String
.
prototype
.
trim
===
a
&&
(
String
.
prototype
.
trim
=
function
(){
return
this
.
replace
(
/^
\s
+|
\s
+$/g
,
""
)})}(),
function
(){
function
a
(
a
,
b
){
b
=
b
||
{
bubbles
:
!
1
,
cancelable
:
!
1
,
detail
:
void
0
};
var
c
=
document
.
createEvent
(
"
Events
"
),
d
=!
0
;
if
(
b
)
for
(
var
e
in
b
)
"
bubbles
"
===
e
?
d
=!!
b
[
e
]:
c
[
e
]
=
b
[
e
];
return
c
.
initEvent
(
a
,
d
,
!
0
),
c
}
"
undefined
"
==
typeof
window
.
CustomEvent
&&
(
a
.
prototype
=
window
.
Event
.
prototype
,
window
.
CustomEvent
=
a
)}(),
function
(
a
){
"
classList
"
in
a
.
documentElement
||!
Object
.
defineProperty
||
"
undefined
"
==
typeof
HTMLElement
||
Object
.
defineProperty
(
HTMLElement
.
prototype
,
"
classList
"
,{
get
:
function
(){
function
a
(
a
){
return
function
(
c
){
var
d
=
b
.
className
.
split
(
/
\s
+/
),
e
=
d
.
indexOf
(
c
);
a
(
d
,
e
,
c
),
b
.
className
=
d
.
join
(
"
"
)}}
var
b
=
this
,
c
=
{
add
:
a
(
function
(
a
,
b
,
c
){
~
b
||
a
.
push
(
c
)}),
remove
:
a
(
function
(
a
,
b
){
~
b
&&
a
.
splice
(
b
,
1
)}),
toggle
:
a
(
function
(
a
,
b
,
c
){
~
b
?
a
.
splice
(
b
,
1
):
a
.
push
(
c
)}),
contains
:
function
(
a
){
return
!!~
b
.
className
.
split
(
/
\s
+/
).
indexOf
(
a
)},
item
:
function
(
a
){
return
b
.
className
.
split
(
/
\s
+/
)[
a
]
||
null
}};
return
Object
.
defineProperty
(
c
,
"
length
"
,{
get
:
function
(){
return
b
.
className
.
split
(
/
\s
+/
).
length
}}),
c
}})}(
document
),
function
(
a
){
var
b
=
0
;
a
.
requestAnimationFrame
||
(
a
.
requestAnimationFrame
=
a
.
webkitRequestAnimationFrame
,
a
.
cancelAnimationFrame
=
a
.
webkitCancelAnimationFrame
||
a
.
webkitCancelRequestAnimationFrame
),
a
.
requestAnimationFrame
||
(
a
.
requestAnimationFrame
=
function
(
c
){
var
d
=
(
new
Date
).
getTime
(),
e
=
Math
.
max
(
0
,
16.7
-
(
d
-
b
)),
f
=
a
.
setTimeout
(
function
(){
c
(
d
+
e
)},
e
);
return
b
=
d
+
e
,
f
}),
a
.
cancelAnimationFrame
||
(
a
.
cancelAnimationFrame
=
function
(
a
){
clearTimeout
(
a
)})}(
window
),
function
(
a
,
b
,
c
){
if
(
!
b
.
FastClick
){
var
d
=
function
(
a
,
b
){
return
!
b
.
type
||
"
radio
"
!==
b
.
type
&&
"
checkbox
"
!==
b
.
type
?
!
1
:
b
};
a
.
registerTarget
({
name
:
c
,
index
:
40
,
handle
:
d
,
target
:
!
1
});
var
e
=
function
(
c
){
var
d
=
a
.
targets
.
click
;
if
(
d
){
var
e
,
f
;
document
.
activeElement
&&
document
.
activeElement
!==
d
&&
document
.
activeElement
.
blur
(),
f
=
c
.
detail
.
gesture
.
changedTouches
[
0
],
e
=
document
.
createEvent
(
"
MouseEvents
"
),
e
.
initMouseEvent
(
"
click
"
,
!
0
,
!
0
,
b
,
1
,
f
.
screenX
,
f
.
screenY
,
f
.
clientX
,
f
.
clientY
,
!
1
,
!
1
,
!
1
,
!
1
,
0
,
null
),
e
.
forwardedTouchEvent
=!
0
,
d
.
dispatchEvent
(
e
)}};
b
.
addEventListener
(
"
tap
"
,
e
),
b
.
addEventListener
(
"
doubletap
"
,
e
),
b
.
addEventListener
(
"
click
"
,
function
(
b
){
return
a
.
targets
.
click
&&!
b
.
forwardedTouchEvent
?(
b
.
stopImmediatePropagation
?
b
.
stopImmediatePropagation
():
b
.
propagationStopped
=!
0
,
b
.
stopPropagation
(),
b
.
preventDefault
(),
!
1
):
void
0
},
!
0
)}}(
mui
,
window
,
"
click
"
),
function
(
a
){
a
.
namespace
=
"
mui
"
,
a
.
classNamePrefix
=
a
.
namespace
+
"
-
"
,
a
.
classSelectorPrefix
=
"
.
"
+
a
.
classNamePrefix
,
a
.
className
=
function
(
b
){
return
a
.
classNamePrefix
+
b
},
a
.
classSelector
=
function
(
b
){
return
b
.
replace
(
/
\.
/g
,
a
.
classSelectorPrefix
)},
a
.
eventName
=
function
(
b
,
c
){
return
b
+
(
a
.
namespace
?
"
.
"
+
a
.
namespace
:
""
)
+
(
c
?
"
.
"
+
c
:
""
)}}(
mui
),
function
(
a
,
b
){
a
.
EVENT_START
=
"
touchstart
"
,
a
.
EVENT_MOVE
=
"
touchmove
"
,
a
.
EVENT_END
=
"
touchend
"
,
a
.
EVENT_CANCEL
=
"
touchcancel
"
,
a
.
EVENT_CLICK
=
"
click
"
,
a
.
preventDefault
=
function
(
a
){
a
.
preventDefault
()},
a
.
stopPropagation
=
function
(
a
){
a
.
stopPropagation
()},
a
.
gestures
=
[],
a
.
registerGesture
=
function
(
b
){
return
b
.
index
=
b
.
index
||
1
e3
,
a
.
gestures
.
push
(
b
),
a
.
gestures
.
sort
(
function
(
a
,
b
){
return
a
.
index
-
b
.
index
}),
a
.
gestures
};
var
c
=
function
(
a
,
b
){
var
c
=
b
.
x
-
a
.
x
,
d
=
b
.
y
-
a
.
y
;
return
Math
.
sqrt
(
c
*
c
+
d
*
d
)},
d
=
function
(
a
,
b
){
return
180
*
Math
.
atan2
(
b
.
y
-
a
.
y
,
b
.
x
-
a
.
x
)
/
Math
.
PI
},
e
=
function
(
a
){
return
-
45
>
a
&&
a
>-
135
?
"
up
"
:
a
>=
45
&&
135
>
a
?
"
down
"
:
a
>=
135
||-
135
>=
a
?
"
left
"
:
a
>=-
45
&&
45
>=
a
?
"
right
"
:
null
},
f
=
function
(
b
,
c
){
a
.
gestures
.
stoped
||
a
.
each
(
a
.
gestures
,
function
(
d
,
e
){
a
.
gestures
.
stoped
||
a
.
options
.
gestureConfig
[
e
.
name
]
&&
e
.
hasOwnProperty
(
"
handle
"
)
&&
e
.
handle
(
b
,
c
)})},
g
=
{},
h
=
function
(
b
){
a
.
gestures
.
stoped
=!
1
,
g
=
{
target
:
b
.
target
,
lastTarget
:
g
.
lastTarget
?
g
.
lastTarget
:
null
,
startTime
:
Date
.
now
(),
touchTime
:
0
,
lastTapTime
:
g
.
lastTapTime
?
g
.
lastTapTime
:
0
,
start
:{
x
:
b
.
touches
[
0
].
pageX
,
y
:
b
.
touches
[
0
].
pageY
},
move
:{
x
:
0
,
y
:
0
},
deltaX
:
0
,
deltaY
:
0
,
lastDeltaX
:
0
,
lastDeltaY
:
0
,
angle
:
""
,
direction
:
""
,
distance
:
0
,
drag
:
!
1
,
swipe
:
!
1
,
gesture
:
b
},
f
(
b
,
g
)},
i
=
function
(
b
){
a
.
gestures
.
stoped
||
(
g
.
touchTime
=
Date
.
now
()
-
g
.
startTime
,
g
.
move
=
{
x
:
b
.
touches
[
0
].
pageX
,
y
:
b
.
touches
[
0
].
pageY
},
g
.
distance
=
c
(
g
.
start
,
g
.
move
),
g
.
angle
=
d
(
g
.
start
,
g
.
move
),
g
.
direction
=
e
(
g
.
angle
),
g
.
lastDeltaX
=
g
.
deltaX
,
g
.
lastDeltaY
=
g
.
deltaY
,
g
.
deltaX
=
g
.
move
.
x
-
g
.
start
.
x
,
g
.
deltaY
=
g
.
move
.
y
-
g
.
start
.
y
,
g
.
gesture
=
b
,
f
(
b
,
g
))},
j
=
function
(
b
){
a
.
gestures
.
stoped
||
(
g
.
touchTime
=
Date
.
now
()
-
g
.
startTime
,
g
.
gesture
=
b
,
f
(
b
,
g
))};
b
.
addEventListener
(
a
.
EVENT_START
,
h
),
b
.
addEventListener
(
a
.
EVENT_MOVE
,
i
),
b
.
addEventListener
(
a
.
EVENT_END
,
j
),
b
.
addEventListener
(
a
.
EVENT_CANCEL
,
j
),
a
.
fn
.
on
=
function
(
b
,
c
,
d
){
this
.
each
(
function
(){
var
e
=
this
;
e
.
addEventListener
(
b
,
function
(
b
){
var
f
=
a
.
qsa
(
c
,
e
),
g
=
b
.
target
;
if
(
f
&&
f
.
length
>
0
)
for
(;
g
&&
g
!==
document
&&
g
!==
e
;
g
=
g
.
parentNode
)
g
&&~
f
.
indexOf
(
g
)
&&
(
b
.
detail
?
b
.
detail
.
currentTarget
=
g
:
b
.
detail
=
{
currentTarget
:
g
},
d
.
call
(
g
,
b
))}),
e
.
removeEventListener
(
a
.
EVENT_CLICK
,
k
),
e
.
addEventListener
(
a
.
EVENT_CLICK
,
k
)})};
var
k
=
function
(
a
){
a
.
target
&&
"
INPUT
"
!==
a
.
target
.
tagName
&&
a
.
preventDefault
()}}(
mui
,
window
),
function
(
a
,
b
){
var
c
=
function
(
c
,
d
){
if
(
c
.
type
===
a
.
EVENT_END
||
c
.
type
===
a
.
EVENT_CANCEL
){
var
e
=
this
.
options
;
d
.
direction
&&
e
.
swipeMaxTime
>
d
.
touchTime
&&
d
.
distance
>
e
.
swipeMinDistince
&&
"
range
"
!==
c
.
target
.
type
&&
(
d
.
swipe
=!
0
,
a
.
trigger
(
c
.
target
,
b
+
d
.
direction
,
d
))}};
a
.
registerGesture
({
name
:
b
,
index
:
10
,
handle
:
c
,
options
:{
swipeMaxTime
:
300
,
swipeMinDistince
:
18
}})}(
mui
,
"
swipe
"
),
function
(
a
,
b
){
var
c
=
function
(
c
,
d
){
switch
(
c
.
type
){
case
a
.
EVENT_MOVE
:
d
.
direction
&&
(
d
.
drag
||
(
d
.
drag
=!
0
,
a
.
trigger
(
c
.
target
,
b
+
"
start
"
,
d
)),
a
.
trigger
(
c
.
target
,
b
,
d
),
a
.
trigger
(
c
.
target
,
b
+
d
.
direction
,
d
));
break
;
case
a
.
EVENT_END
:
case
a
.
EVENT_CANCEL
:
d
.
drag
&&
a
.
trigger
(
c
.
target
,
b
+
"
end
"
,
d
)}};
a
.
registerGesture
({
name
:
b
,
index
:
20
,
handle
:
c
,
options
:{}})}(
mui
,
"
drag
"
),
function
(
a
,
b
){
var
c
=
function
(
c
,
d
){
if
(
c
.
type
===
a
.
EVENT_END
||
c
.
type
===
a
.
EVENT_CANCEL
){
var
e
=
this
.
options
;
if
(
d
.
distance
<
e
.
tabMaxDistance
&&
d
.
touchTime
<
e
.
tapMaxTime
){
if
(
a
.
options
.
gestureConfig
.
doubletap
&&
d
.
lastTarget
&&
d
.
lastTarget
===
c
.
target
&&
d
.
lastTapTime
&&
d
.
startTime
-
d
.
lastTapTime
<
e
.
tabMaxInterval
)
return
a
.
trigger
(
c
.
target
,
"
doubletap
"
,
d
),
d
.
lastTapTime
=
Date
.
now
(),
void
(
d
.
lastTarget
=
c
.
target
);
a
.
trigger
(
c
.
target
,
b
,
d
),
d
.
lastTapTime
=
Date
.
now
(),
d
.
lastTarget
=
c
.
target
}}};
a
.
registerGesture
({
name
:
b
,
index
:
30
,
handle
:
c
,
options
:{
tabMaxInterval
:
300
,
tabMaxDistance
:
5
,
tapMaxTime
:
250
}})}(
mui
,
"
tap
"
),
function
(
a
,
b
){
var
c
,
d
=
function
(
d
,
e
){
var
f
=
this
.
options
;
switch
(
d
.
type
){
case
a
.
EVENT_START
:
clearTimeout
(
c
),
c
=
setTimeout
(
function
(){
e
.
drag
||
a
.
trigger
(
d
.
target
,
b
,
e
)},
f
.
holdTimeout
);
break
;
case
a
.
EVENT_MOVE
:
e
.
distance
>
f
.
holdThreshold
&&
clearTimeout
(
c
);
break
;
case
a
.
EVENT_END
:
case
a
.
EVENT_CANCEL
:
clearTimeout
(
c
)}};
a
.
registerGesture
({
name
:
b
,
index
:
10
,
handle
:
d
,
options
:{
holdTimeout
:
500
,
holdThreshold
:
2
}})}(
mui
,
"
longtap
"
),
function
(
a
){
function
b
(
b
){
this
.
os
=
{};
var
c
=
[
function
(){
var
a
=
b
.
match
(
/
(
Android
)
;
?[\s\/]
+
([\d
.
]
+
)?
/
);
return
a
&&
(
this
.
os
.
android
=!
0
,
this
.
os
.
version
=
a
[
2
]),
this
.
os
.
android
===!
0
},
function
(){
var
a
=
b
.
match
(
/
(
iPhone
\s
OS
)\s([\d
_
]
+
)
/
);
if
(
a
)
this
.
os
.
ios
=
this
.
os
.
iphone
=!
0
,
this
.
os
.
version
=
a
[
2
].
replace
(
/_/g
,
"
.
"
);
else
{
var
c
=
b
.
match
(
/
(
iPad
)
.*OS
\s([\d
_
]
+
)
/
);
c
&&
(
this
.
os
.
ios
=
this
.
os
.
ipad
=!
0
,
this
.
os
.
version
=
c
[
2
].
replace
(
/_/g
,
"
.
"
))}
return
this
.
os
.
ios
===!
0
}];[].
every
.
call
(
c
,
function
(
b
){
return
!
b
.
call
(
a
)})}
b
.
call
(
a
,
navigator
.
userAgent
)}(
mui
),
function
(
a
){
function
b
(
a
){
this
.
os
=
this
.
os
||
{};
var
b
=
a
.
match
(
/Html5Plus/i
);
b
&&
(
this
.
os
.
plus
=!
0
)}
b
.
call
(
a
,
navigator
.
userAgent
)}(
mui
),
function
(
a
){
var
b
=
[];
a
.
global
=
a
.
options
=
{
gestureConfig
:{
tap
:
!
0
,
doubletap
:
!
0
,
longtap
:
!
0
,
swipe
:
!
0
,
drag
:
!
0
}},
a
.
initGlobal
=
function
(
b
){
return
a
.
options
=
a
.
extend
(
a
.
global
,
b
,
!
0
),
this
},
a
.
init
=
function
(
c
){
return
a
.
options
=
a
.
extend
(
a
.
global
,
c
||
{},
!
0
),
a
.
ready
(
function
(){
for
(
var
c
=
0
,
d
=
b
.
length
;
d
>
c
;
c
++
)
b
[
c
].
call
(
a
)}),
this
},
a
.
init
.
add
=
function
(
a
){
b
.
push
(
a
)}}(
mui
),
function
(
a
){
var
b
=
{
optimize
:
!
0
,
swipeBack
:
!
1
,
preloadPages
:[],
preloadLimit
:
10
},
c
=
{
duration
:
a
.
os
.
ios
?
200
:
100
,
aniShow
:
"
slide-in-right
"
};
a
.
options
.
show
&&
(
c
=
a
.
extend
(
c
,
a
.
options
.
show
,
!
0
)),
a
.
currentWebview
=
null
,
a
.
isHomePage
=!
1
,
a
.
extend
(
a
.
global
,
b
),
a
.
extend
(
a
.
options
,
b
),
a
.
waitingOptions
=
function
(
b
){
return
a
.
extend
({},
b
)},
a
.
showOptions
=
function
(
b
){
return
a
.
extend
(
c
,
b
)},
a
.
windowOptions
=
function
(
b
){
return
a
.
extend
({
scalable
:
!
1
,
bounce
:
""
},
b
)},
a
.
plusReady
=
function
(
a
){
return
window
.
plus
?
a
():
document
.
addEventListener
(
"
plusready
"
,
function
(){
a
()},
!
1
),
this
},
a
.
fire
=
function
(
a
,
b
,
c
){
a
&&
a
.
evalJS
(
"
mui&&mui.receive('
"
+
b
+
"
','
"
+
JSON
.
stringify
(
c
||
{})
+
"
')
"
)},
a
.
receive
=
function
(
b
,
c
){
b
&&
(
c
=
JSON
.
parse
(
c
),
a
.
trigger
(
document
,
b
,
c
))};
var
d
=
function
(
b
){
if
(
!
b
.
preloaded
){
a
.
fire
(
b
,
"
preload
"
);
for
(
var
c
=
b
.
children
(),
d
=
0
;
d
<
c
.
length
;
d
++
)
a
.
fire
(
c
[
d
],
"
preload
"
);
b
.
preloaded
=!
0
}},
e
=
function
(
b
,
c
,
d
){
if
(
d
){
if
(
!
b
[
c
+
"
ed
"
]){
a
.
fire
(
b
,
c
);
for
(
var
e
=
b
.
children
(),
f
=
0
;
f
<
e
.
length
;
f
++
)
a
.
fire
(
e
[
f
],
c
);
b
[
c
+
"
ed
"
]
=!
0
}}
else
{
a
.
fire
(
b
,
c
);
for
(
var
e
=
b
.
children
(),
f
=
0
;
f
<
e
.
length
;
f
++
)
a
.
fire
(
e
[
f
],
c
)}};
a
.
openWindow
=
function
(
b
,
c
,
f
){
if
(
window
.
plus
){
"
object
"
==
typeof
b
?(
f
=
b
,
b
=
f
.
url
,
c
=
f
.
id
||
b
):
"
object
"
==
typeof
c
?(
f
=
c
,
c
=
b
):
c
=
c
||
b
,
f
=
f
||
{};
var
g
,
h
,
i
=
f
.
params
||
{};
if
(
a
.
webviews
[
c
]){
var
j
=
a
.
webviews
[
c
];
if
(
j
.
preload
)
return
g
=
j
.
webview
,
g
&&
g
.
getURL
()
||
(
f
=
a
.
extend
(
f
,{
id
:
c
,
url
:
b
,
showAfterLoad
:
f
.
showAfterLoad
===!
1
?
!
1
:
!
0
,
preload
:
!
0
}),
g
=
a
.
createWindow
(
f
)),
h
=
j
.
show
,
h
=
f
.
show
?
a
.
extend
(
h
,
f
.
show
):
h
,
g
.
show
(
h
.
aniShow
,
h
.
duration
,
function
(){
d
(
g
),
e
(
g
,
"
pagebeforeshow
"
,
!
1
)}),
j
.
afterShowMethodName
&&
g
.
evalJS
(
j
.
afterShowMethodName
+
"
('
"
+
JSON
.
stringify
(
i
)
+
"
')
"
),
this
;
f
=
a
.
extend
(
j
,
a
.
extend
(
f
,{
id
:
c
,
url
:
b
,
showAfterLoad
:
f
.
showAfterLoad
===!
1
?
!
1
:
!
0
})),
g
=
a
.
createWindow
(
f
)}
else
f
=
a
.
extend
(
f
,{
id
:
c
,
url
:
b
,
showAfterLoad
:
f
.
showAfterLoad
===!
1
?
!
1
:
!
0
}),
g
=
a
.
createWindow
(
f
);
if
(
f
.
showAfterLoad
){
var
k
=
a
.
waitingOptions
(
f
.
waiting
),
l
=
plus
.
nativeUI
.
showWaiting
(
k
.
title
||
""
,
k
.
options
);
h
=
a
.
showOptions
(
f
.
show
),
g
.
addEventListener
(
"
loaded
"
,
function
(){
l
.
close
(),
g
.
show
(
h
.
aniShow
,
h
.
duration
,
function
(){
d
(
g
),
e
(
g
,
"
pagebeforeshow
"
,
!
1
)}),
g
.
showed
=!
0
,
f
.
afterShowMethodName
&&
g
.
evalJS
(
f
.
afterShowMethodName
+
"
('
"
+
JSON
.
stringify
(
i
)
+
"
')
"
)},
!
1
)}
return
g
}},
a
.
createWindow
=
function
(
b
,
c
){
if
(
window
.
plus
){
var
d
,
e
=
b
.
id
||
b
.
url
;
if
(
b
.
preload
){
a
.
webviews
[
e
]
&&
a
.
webviews
[
e
].
webview
.
getURL
()?
d
=
a
.
webviews
[
e
].
webview
:(
d
=
plus
.
webview
.
create
(
b
.
url
,
e
,
a
.
windowOptions
(
b
.
styles
),{
preload
:
!
0
}),
b
.
subpages
&&
a
.
each
(
b
.
subpages
,
function
(
b
,
c
){
var
e
=
plus
.
webview
.
create
(
c
.
url
,
c
.
id
||
c
.
url
,
a
.
windowOptions
(
c
.
styles
),{
preload
:
!
0
});
d
.
append
(
e
)})),
a
.
webviews
[
e
]
=
{
webview
:
d
,
preload
:
!
0
,
show
:
a
.
showOptions
(
b
.
show
),
afterShowMethodName
:
b
.
afterShowMethodName
};
var
f
=
a
.
data
.
preloads
,
g
=
f
.
indexOf
(
e
);
if
(
~
g
&&
f
.
splice
(
g
,
1
),
f
.
push
(
e
),
f
.
length
>
a
.
options
.
preloadLimit
){
var
h
=
a
.
data
.
preloads
.
shift
(),
i
=
a
.
webviews
[
h
];
i
&&
i
.
webview
&&
a
.
closeAll
(
i
.
webview
),
delete
a
.
webviews
[
h
]}}
else
c
!==!
1
&&
(
d
=
plus
.
webview
.
create
(
b
.
url
,
e
,
a
.
windowOptions
(
b
.
styles
)),
b
.
subpages
&&
a
.
each
(
b
.
subpages
,
function
(
b
,
c
){
var
e
=
plus
.
webview
.
create
(
c
.
url
,
c
.
id
||
c
.
url
,
a
.
windowOptions
(
c
.
styles
));
d
.
append
(
e
)}));
return
d
}},
a
.
closeOpened
=
function
(
b
){
var
c
=
b
.
opened
();
if
(
c
)
for
(
var
d
=
0
,
e
=
c
.
length
;
e
>
d
;
d
++
){
var
f
=
c
[
d
],
g
=
f
.
opened
();
g
&&
g
.
length
>
0
?
a
.
closeOpened
(
f
):
f
.
parent
()
!==
b
&&
f
.
close
(
"
none
"
)}},
a
.
closeAll
=
function
(
b
,
c
){
a
.
closeOpened
(
b
),
c
?
b
.
close
(
c
):
b
.
close
()},
a
.
createWindows
=
function
(
b
){
a
.
each
(
b
,
function
(
b
,
c
){
a
.
createWindow
(
c
,
!
1
)})},
a
.
appendWebview
=
function
(
b
){
if
(
window
.
plus
){
var
c
,
d
=
b
.
id
||
b
.
url
;
return
a
.
webviews
[
d
]
||
(
c
=
plus
.
webview
.
create
(
b
.
url
,
d
,
b
.
styles
),
c
.
addEventListener
(
"
loaded
"
,
function
(){
a
.
currentWebview
.
append
(
c
)}),
a
.
webviews
[
d
]
=
b
),
c
}},
a
.
webviews
=
{},
a
.
data
.
preloads
=
[],
a
.
init
.
add
(
function
(){
var
b
=
a
.
options
,
c
=
b
.
subpages
||
[];
a
.
plusReady
(
function
(){
a
.
currentWebview
=
plus
.
webview
.
currentWebview
(),
a
.
each
(
c
,
function
(
b
,
c
){
a
.
appendWebview
(
c
)}),
a
.
currentWebview
==
plus
.
webview
.
getWebviewById
(
plus
.
runtime
.
appid
)
&&
(
a
.
isHomePage
=!
0
,
setTimeout
(
function
(){
d
(
a
.
currentWebview
)},
300
))})}),
window
.
addEventListener
(
"
preload
"
,
function
(){
var
b
=
a
.
options
.
preloadPages
||
[];
a
.
plusReady
(
function
(){
a
.
each
(
b
,
function
(
b
,
c
){
a
.
createWindow
(
a
.
extend
(
c
,{
preload
:
!
0
}))})})})}(
mui
),
function
(
a
){
a
.
init
.
add
(
function
(){
var
b
=
a
.
options
;
b
.
titleBar
&&
a
.
titleBar
(
b
.
titleBar
),
a
.
os
.
ios
&&
a
.
plusReady
(
function
(){
var
b
=
a
.
options
.
statusBarBackground
?
a
.
options
.
statusBarBackground
:
"
#f7f7f7
"
;
plus
.
navigator
.
setStatusBarBackground
(
b
)})})}(
mui
),
function
(
a
){
a
.
init
.
add
(
function
(){
var
b
=
a
.
options
,
c
=
b
.
pullRefresh
||
{};
if
(
a
.
os
.
plus
&&
a
.
os
.
android
)
c
.
down
&&
a
.
plus_pulldownRefresh
(
c
.
down
);
else
{
var
d
=
c
.
container
;
if
(
d
){
var
e
=
a
(
d
);
1
===
e
.
length
&&
e
.
pullRefresh
(
c
)}}})}(
mui
),
function
(
a
,
b
,
c
){
a
.
titleBar
=
function
(
b
){
return
b
=
a
.
extend
({
template
:
"
top.html
"
,
height
:
"
48px
"
},
b
),
a
.
options
.
optimize
&&
a
.
os
.
plus
?
a
.
plusReady
(
function
(){
var
c
=
plus
.
webview
.
create
(
b
.
template
,
null
,{
scalable
:
!
1
,
position
:
"
dock
"
,
dock
:
"
top
"
,
height
:
b
.
height
});
c
.
addEventListener
(
"
loaded
"
,
function
(){
c
.
evalJS
(
'
document.querySelector(".mui-title").innerHTML="
'
+
b
.
title
+
'
"
'
)});
var
d
=
b
.
pulldownRefresh
||
{},
e
=
d
.
container
;
e
?
c
.
append
(
a
.
currentWebview
):
a
.
currentWebview
.
append
(
c
)}):
a
.
get
(
b
.
template
,
function
(
a
){
var
d
=
a
.
match
(
/<body
[^
>
]
*>
([\s\S
.
]
*
)
<
\/
body>/i
)[
0
],
e
=
c
.
createElement
(
"
div
"
);
for
(
e
.
innerHTML
=
d
;
e
.
firstChild
;)
c
.
body
.
insertBefore
(
e
.
firstChild
,
c
.
body
.
firstChild
);
if
(
b
.
title
){
var
f
=
c
.
body
.
querySelector
(
"
.mui-bar .mui-title
"
);
f
&&
(
f
.
innerHTML
=
b
.
title
)}}),
this
}}(
mui
,
window
,
document
),
function
(
a
){
a
.
get
=
function
(
a
,
c
,
d
){
b
(
"
GET
"
,
a
,
c
,
d
)},
a
.
post
=
function
(
a
,
c
,
d
){
b
(
"
POST
"
,
a
,
c
,
d
)};
var
b
=
function
(
a
,
b
,
c
,
d
){
var
e
=
new
XMLHttpRequest
,
f
=
/^
([\w
-
]
+:
)\/\/
/
.
test
(
b
)?
RegExp
.
$1
:
window
.
location
.
protocol
;
e
.
onreadystatechange
=
function
(){
4
===
e
.
readyState
&&
(
e
.
status
>=
200
&&
e
.
status
<
300
||
304
===
e
.
status
||
0
===
e
.
status
&&
"
file:
"
===
f
?
c
&&
c
(
e
.
responseText
):
d
&&
d
())},
e
.
open
(
a
,
b
,
!
0
),
e
.
send
()}}(
mui
),
function
(
a
,
b
,
c
){
a
.
offset
=
function
(
a
){
var
d
=
{
top
:
0
,
left
:
0
};
return
typeof
a
.
getBoundingClientRect
!==
c
&&
(
d
=
a
.
getBoundingClientRect
()),{
top
:
d
.
top
+
b
.
pageYOffset
-
a
.
clientTop
,
left
:
d
.
left
+
b
.
pageXOffset
-
a
.
clientLeft
}}}(
mui
,
window
),
function
(
a
,
b
){
a
.
scrollTo
=
function
(
a
,
c
,
d
){
c
=
c
||
1
e3
;
var
e
=
function
(
c
){
if
(
0
>=
c
)
return
void
(
d
&&
d
());
var
f
=
a
-
b
.
scrollY
;
setTimeout
(
function
(){
b
.
scrollTo
(
0
,
b
.
scrollY
+
f
/
c
*
10
),
e
(
c
-
10
)},
16.7
)};
e
(
c
)}}(
mui
,
window
),
function
(
a
,
b
,
c
){
var
d
=
"
mui-pull-top-pocket
"
,
e
=
"
mui-pull-bottom-pocket
"
,
f
=
"
mui-pull
"
,
g
=
"
mui-pull-loading
"
,
h
=
"
mui-pull-caption
"
,
i
=
h
+
"
-down
"
,
j
=
h
+
"
-over
"
,
k
=
h
+
"
-refresh
"
,
l
=
"
mui-icon
"
,
m
=
"
mui-icon-spinner
"
,
n
=
"
mui-icon-pulldown
"
,
o
=
"
mui-spin
"
,
p
=
"
mui-in
"
,
q
=
"
mui-reverse
"
,
r
=
g
+
"
"
+
l
+
"
"
+
n
+
"
"
+
q
,
s
=
g
+
"
"
+
l
+
"
"
+
n
,
t
=
g
+
"
"
+
l
+
"
"
+
m
+
"
"
+
o
,
u
=
{
down
:{
height
:
50
,
contentdown
:
"
下拉可以刷新
"
,
contentover
:
"
释放立即刷新
"
,
contentrefresh
:
"
正在刷新...
"
},
up
:{
height
:
50
,
contentdown
:
"
上拉显示更多
"
,
contentover
:
"
释放立即刷新
"
,
contentrefresh
:
"
正在刷新...
"
,
duration
:
300
}},
v
=
[
'
<div class="
'
+
f
+
'
">
'
,
'
<div class="
'
+
s
+
'
"></div>
'
,
'
<div class="
'
+
h
+
'
">
'
,
'
<span class="
'
+
i
+
"
"
+
p
+
'
">{downCaption}</span>
'
,
'
<span class="
'
+
j
+
'
">{overCaption}</span>
'
,
'
<span class="
'
+
k
+
'
">{refreshCaption}</span>
'
,
"
</div>
"
,
"
</div>
"
],
w
=
function
(
b
,
c
){
this
.
element
=
b
,
this
.
options
=
a
.
extend
(
u
,
c
,
!
0
),
this
.
options
.
up
.
height
=-
this
.
options
.
up
.
height
,
this
.
pullOptions
=
null
,
this
.
init
()};
w
.
prototype
.
init
=
function
(){
this
.
element
.
style
.
webkitTransform
=
"
translate3d(0,0,0)
"
,
this
.
element
.
style
.
position
=
"
relative
"
,
this
.
element
.
style
[
"
-webkit-backface-visibility
"
]
=
"
hidden
"
,
this
.
translateY
=
0
,
this
.
lastTranslateY
=
0
,
this
.
initPocket
(),
this
.
initEvent
()},
w
.
prototype
.
initPocket
=
function
(){
var
a
=
this
.
options
;
a
.
down
&&
a
.
down
.
hasOwnProperty
(
"
callback
"
)
&&
(
this
.
topPocket
=
this
.
element
.
querySelector
(
"
.
"
+
d
),
this
.
topPocket
||
(
this
.
topPocket
=
this
.
createPocket
(
d
,
a
.
down
),
this
.
element
.
insertBefore
(
this
.
topPocket
,
this
.
element
.
firstChild
))),
a
.
up
&&
a
.
up
.
hasOwnProperty
(
"
callback
"
)
&&
(
this
.
bottomPocket
=
this
.
element
.
querySelector
(
"
.
"
+
e
),
this
.
bottomPocket
||
(
this
.
bottomPocket
=
this
.
createPocket
(
e
,
a
.
up
),
this
.
element
.
appendChild
(
this
.
bottomPocket
)))},
w
.
prototype
.
createPocket
=
function
(
a
,
b
){
var
d
=
c
.
createElement
(
"
div
"
);
return
d
.
className
=
a
,
d
.
innerHTML
=
v
.
join
(
""
).
replace
(
"
{downCaption}
"
,
b
.
contentdown
).
replace
(
"
{overCaption}
"
,
b
.
contentover
).
replace
(
"
{refreshCaption}
"
,
b
.
contentrefresh
),
d
},
w
.
prototype
.
initEvent
=
function
(){
var
a
=
this
;
a
.
bottomPocket
&&
a
.
element
.
addEventListener
(
"
dragup
"
,
function
(
b
){
a
.
dragUp
(
b
)}),
a
.
topPocket
&&
a
.
element
.
addEventListener
(
"
dragdown
"
,
function
(
b
){
a
.
dragDown
(
b
)}),(
a
.
bottomPocket
||
a
.
topPocket
)
&&
(
a
.
element
.
addEventListener
(
"
dragstart
"
,
function
(
b
){
a
.
dragStart
(
b
)}),
a
.
element
.
addEventListener
(
"
drag
"
,
function
(
b
){
var
c
=
b
.
detail
.
direction
;
a
.
dragDirection
&&
"
up
"
!==
c
&&
"
down
"
!==
c
&&
a
.
pullOptions
&&
(
a
.
pullOptions
.
height
>
0
?
a
.
dragDown
(
b
):
a
.
dragUp
(
b
))}),
a
.
element
.
addEventListener
(
"
dragend
"
,
function
(
b
){
a
.
dragEnd
(
b
)}))},
w
.
prototype
.
dragStart
=
function
(
a
){
var
b
=
a
.
detail
;(
"
up
"
===
b
.
direction
||
"
down
"
===
b
.
direction
)
&&
(
this
.
element
.
style
.
webkitTransitionDuration
=
"
0s
"
,
this
.
isLoading
=
this
.
dragDirection
=!
1
)},
w
.
prototype
.
dragUp
=
function
(
a
){
var
d
=
this
;
if
(
!
d
.
isLoading
&&
"
down
"
!==
d
.
dragDirection
){
var
e
=
c
.
body
.
scrollHeight
;
!
d
.
dragDirection
&&
b
.
innerHeight
+
b
.
scrollY
+
40
<
e
||
(
b
.
scrollTo
(
0
,
e
),
d
.
pullOptions
=
d
.
options
.
up
,
d
.
loading
=
d
.
bottomPocket
.
querySelector
(
"
.
"
+
g
),
d
.
drag
(
a
))}},
w
.
prototype
.
dragDown
=
function
(
a
){
var
c
=
this
;
if
(
!
c
.
isLoading
&&
"
up
"
!==
c
.
dragDirection
){
var
d
=
b
.
scrollY
;
!
c
.
dragDirection
&&
d
>
5
||
(
0
!==
d
&&
b
.
scrollTo
(
0
,
0
),
c
.
pullOptions
=
c
.
options
.
down
,
c
.
loading
=
c
.
topPocket
.
querySelector
(
"
.
"
+
g
),
c
.
drag
(
a
))}},
w
.
prototype
.
drag
=
function
(
a
){
this
.
pullOptions
&&
(
this
.
pullOptions
.
height
>
0
&&
a
.
detail
.
deltaY
<
0
||
(
this
.
dragDirection
=
this
.
pullOptions
.
height
>
0
?
"
down
"
:
"
up
"
,
this
.
requestAnimationFrame
||
this
.
updateTranslate
(),
a
.
detail
.
gesture
.
preventDefault
(),
this
.
translateY
=
.
4
*
a
.
detail
.
deltaY
))},
w
.
prototype
.
dragEnd
=
function
(
b
){
var
c
=
this
;
c
.
pullOptions
&&
(
cancelAnimationFrame
(
c
.
requestAnimationFrame
),
Math
.
abs
(.
4
*
b
.
detail
.
deltaY
)
>=
Math
.
abs
(
c
.
pullOptions
.
height
)?
c
.
load
():
this
.
hide
(),
a
.
gestures
.
stoped
=!
0
)},
w
.
prototype
.
hide
=
function
(){
this
.
translateY
=
0
,
this
.
requestAnimationFrame
&&
(
cancelAnimationFrame
(
this
.
requestAnimationFrame
),
this
.
requestAnimationFrame
=
null
),
this
.
element
.
style
.
webkitTransitionDuration
=
"
0.5s
"
,
this
.
setTranslate
(
0
),
this
.
setCaption
(
i
),
this
.
pullOptions
.
height
>
0
&&
this
.
loading
.
classList
.
remove
(
q
),
this
.
pullOptions
=
null
},
w
.
prototype
.
updateTranslate
=
function
(){
var
a
=
this
;
a
.
translateY
!==
a
.
lastTranslateY
&&
(
a
.
translateY
=
Math
.
abs
(
a
.
translateY
)
<
2
?
0
:
a
.
translateY
,
a
.
setTranslate
(
a
.
translateY
),
Math
.
abs
(
a
.
translateY
)
>=
Math
.
abs
(
a
.
pullOptions
.
height
)?
a
.
showLoading
(
j
):
a
.
hideLoading
(
i
),
a
.
lastTranslateY
=
a
.
translateY
),
a
.
requestAnimationFrame
=
requestAnimationFrame
(
function
(){
a
.
updateTranslate
()})},
w
.
prototype
.
setTranslate
=
function
(
a
){
this
.
element
.
style
.
webkitTransform
=
"
translate3d(0,
"
+
a
+
"
px,0)
"
,
this
.
bottomPocket
&&
(
0
>
a
?
this
.
bottomPocket
.
style
.
bottom
=
(
a
>
this
.
pullOptions
.
height
?
a
:
this
.
pullOptions
.
height
)
+
"
px
"
:
0
===
a
&&
this
.
bottomPocket
.
setAttribute
(
"
style
"
,
""
))},
w
.
prototype
.
load
=
function
(){
var
d
=
this
;
d
.
isLoading
=!
0
,
d
.
showLoading
(
k
),
d
.
setTranslate
(
d
.
pullOptions
.
height
);
var
e
=
d
.
pullOptions
.
callback
;
e
&&
e
(
function
(){
if
(
d
.
pullOptions
&&
d
.
pullOptions
.
height
<
0
){
var
e
=
Math
.
min
(
1
e3
,
d
.
pullOptions
.
duration
);
setTimeout
(
function
(){
a
.
scrollTo
(
c
.
body
.
scrollHeight
-
b
.
innerHeight
,
e
,
function
(){
d
.
isLoading
=!
1
})},
100
)}
else
d
.
isLoading
=!
1
;
d
.
hide
()})},
w
.
prototype
.
showLoading
=
function
(
a
){
this
.
setCaption
(
a
)},
w
.
prototype
.
hideLoading
=
function
(
a
){
this
.
setCaption
(
a
)},
w
.
prototype
.
setCaption
=
function
(
a
){
var
b
=
this
.
pullOptions
&&
this
.
pullOptions
.
height
>
0
?
this
.
topPocket
:
this
.
bottomPocket
;
if
(
b
){
var
c
=
b
.
querySelector
(
"
.
"
+
h
),
d
=
c
.
querySelector
(
"
.
"
+
p
);
d
&&
d
.
classList
.
remove
(
p
);
var
e
=
c
.
querySelector
(
"
.
"
+
a
);
e
&&
e
.
classList
.
add
(
p
),
this
.
loading
.
className
=
this
.
pullOptions
&&
this
.
pullOptions
.
height
>
0
?
a
===
k
?
t
:
a
===
j
?
r
:
s
:
t
}},
a
.
fn
.
pullRefresh
=
function
(
b
){
this
.
each
(
function
(){
var
c
=
this
.
getAttribute
(
"
data-pullrefresh
"
);
if
(
!
c
){
var
d
=++
a
.
uuid
;
a
.
data
[
d
]
=
new
w
(
this
,
b
),
this
.
setAttribute
(
"
data-pullrefresh
"
,
d
)}})}}(
mui
,
window
,
document
),
function
(
a
){
var
b
=
{
height
:
50
,
contentdown
:
"
下拉可以刷新
"
,
contentover
:
"
释放立即刷新
"
,
contentrefresh
:
"
正在刷新...
"
};
a
.
plus_pulldownRefresh
=
function
(
c
){
c
=
a
.
extend
(
b
,
c
,
!
0
),
a
.
plusReady
(
function
(){
var
b
=
document
.
body
,
d
=
b
.
getAttribute
(
"
data-pullrefresh-plus
"
);
if
(
!
d
){
d
=++
a
.
uuid
,
b
.
setAttribute
(
"
data-pullrefresh-plus
"
,
d
);
var
e
=
a
.
currentWebview
;
e
.
setPullToRefresh
({
support
:
!
0
,
height
:
c
.
height
+
"
px
"
,
range
:
"
200px
"
,
contentdown
:{
caption
:
c
.
contentdown
},
contentover
:{
caption
:
c
.
contentover
},
contentrefresh
:{
caption
:
c
.
contentrefresh
}},
function
(){
c
.
callback
&&
c
.
callback
(
function
(){
e
.
endPullToRefresh
()})})}})}}(
mui
),
function
(
a
,
b
,
c
,
d
){
var
e
=
"
mui-off-canvas-left
"
,
f
=
"
mui-off-canvas-right
"
,
g
=
"
mui-off-canvas-backdrop
"
,
h
=
"
mui-off-canvas-wrap
"
,
i
=
"
mui-off-canvas-height-fixed
"
,
j
=
"
mui-left
"
,
k
=
"
mui-right
"
,
l
=
"
mui-sliding
"
,
m
=
"
.mui-inner-wrap
"
,
n
=
function
(
a
){
if
(
parentNode
=
a
.
parentNode
){
if
(
parentNode
.
classList
.
contains
(
h
))
return
parentNode
;
if
(
parentNode
=
parentNode
.
parentNode
,
parentNode
.
classList
.
contains
(
h
))
return
parentNode
}},
o
=
function
(
b
,
d
){
if
(
d
.
classList
&&
d
.
classList
.
contains
(
g
)){
var
e
=
n
(
d
);
if
(
e
)
return
a
.
targets
.
_container
=
e
,
d
}
else
if
(
"
A
"
===
d
.
tagName
&&
d
.
hash
){
var
f
=
c
.
getElementById
(
d
.
hash
.
replace
(
"
#
"
,
""
));
if
(
f
){
var
e
=
n
(
f
);
if
(
e
)
return
a
.
targets
.
_container
=
e
,
f
}}
return
!
1
};
a
.
registerTarget
({
name
:
d
,
index
:
60
,
handle
:
o
,
target
:
!
1
,
isReset
:
!
1
,
isContinue
:
!
0
});
var
p
=
function
(
a
,
b
){
var
d
=
a
.
querySelector
(
"
.mui-content
"
),
e
=
c
.
getElementsByTagName
(
"
html
"
)[
0
],
f
=
c
.
body
;
b
?(
e
.
classList
.
add
(
i
),
f
.
classList
.
add
(
i
),
d
&&
d
.
classList
.
add
(
i
)):(
e
.
classList
.
remove
(
i
),
f
.
classList
.
remove
(
i
),
d
&&
d
.
classList
.
remove
(
i
))},
q
=
function
(){
var
a
=
this
.
parentNode
;
a
.
classList
.
remove
(
l
),
this
.
removeEventListener
(
"
webkitTransitionEnd
"
,
q
),
a
.
classList
.
contains
(
k
)
||
a
.
classList
.
contains
(
j
)
||
p
(
a
,
!
1
)},
r
=
function
(
a
,
b
){
if
(
a
&&
b
){
var
c
=
b
.
classList
;
a
.
querySelector
(
m
).
addEventListener
(
"
webkitTransitionEnd
"
,
q
),
a
.
classList
.
contains
(
k
)
||
a
.
classList
.
contains
(
j
)
||
p
(
a
,
!
0
),
c
.
contains
(
e
)?
a
.
classList
.
toggle
(
k
):
c
.
contains
(
f
)?
a
.
classList
.
toggle
(
j
):
c
.
contains
(
g
)
&&
(
a
.
classList
.
remove
(
k
),
a
.
classList
.
remove
(
j
)),
a
.
classList
.
add
(
l
)}};
b
.
addEventListener
(
"
tap
"
,
function
(){
a
.
targets
.
offcanvas
&&
r
(
a
.
targets
.
_container
,
a
.
targets
.
offcanvas
)}),
a
.
fn
.
offCanvas
=
function
(){
var
a
=
arguments
;
this
.
each
(
function
(){
if
(
"
show
"
===
a
[
0
]
||
"
hide
"
===
a
[
0
]
||
"
toggle
"
===
a
[
0
]){
var
b
=
this
.
classList
;
if
(
b
.
contains
(
e
)
||
b
.
contains
(
f
)){
var
c
=
n
(
this
);
c
&&
r
(
c
,
this
)}}})}}(
mui
,
window
,
document
,
"
offcanvas
"
),
function
(
a
,
b
,
c
){
if
(
!
a
.
os
.
android
){
var
d
,
e
,
f
,
g
,
h
=
"
mui-slider
"
,
i
=
"
mui-switch
"
,
j
=
"
mui-table-view-cell
"
,
k
=
"
mui-slider-handle
"
,
l
=
"
mui-off-canvas-left
"
,
m
=
"
mui-off-canvas-right
"
,
n
=
"
mui-off-canvas-wrap
"
,
o
=
"
mui-off-canvas-height-fixed
"
,
p
=
"
mui-left
"
,
q
=
"
mui-right
"
,
r
=
"
mui-sliding
"
,
s
=
"
mui-draggable
"
,
t
=
"
.mui-inner-wrap
"
,
u
=
"
.
"
+
l
,
v
=
"
.
"
+
m
,
w
=!
1
,
x
=
1
,
y
=
0
,
z
=
0
,
A
=
0
,
B
=
0
,
C
=
function
(){
y
!==
z
&&
(
e
.
style
[
"
-webkit-transition-duration
"
]
=
"
0s
"
,
"
right
"
===
g
&&
y
>
0
?(
y
=
Math
.
min
(
y
,
B
),
0
>
A
?
D
(
e
,
A
+
y
):
D
(
e
,
y
)):
"
left
"
===
g
&&
0
>
y
&&
(
y
=
Math
.
max
(
y
,
-
B
),
A
>
0
?
D
(
e
,
A
+
y
):
D
(
e
,
y
)),
z
=
y
),
f
=
requestAnimationFrame
(
function
(){
C
()})},
D
=
function
(
a
,
b
){
a
&&
(
a
.
style
.
webkitTransform
=
"
translate3d(
"
+
b
+
"
px,0,0)
"
)},
E
=
function
(
a
,
b
){
var
d
=
a
.
querySelector
(
"
.mui-content
"
),
e
=
c
.
getElementsByTagName
(
"
html
"
)[
0
],
f
=
c
.
body
;
b
?(
e
.
classList
.
add
(
o
),
f
.
classList
.
add
(
o
),
d
&&
d
.
classList
.
add
(
o
)):(
e
.
classList
.
remove
(
o
),
f
.
classList
.
remove
(
o
),
d
&&
d
.
classList
.
remove
(
o
))},
F
=
function
(){
var
a
=
this
.
parentNode
,
b
=
a
.
classList
;
b
.
remove
(
r
),
this
.
removeEventListener
(
"
webkitTransitionEnd
"
,
F
),
b
.
contains
(
q
)
||
b
.
contains
(
p
)
||
E
(
a
,
!
1
)};
b
.
addEventListener
(
"
touchstart
"
,
function
(
a
){
var
b
=
a
.
target
;
for
(
w
=!
1
,
d
=
e
=
null
;
b
&&
b
!==
c
;
b
=
b
.
parentNode
){
var
f
=
b
.
classList
;
if
(
f
){
if
(
f
.
contains
(
i
))
break
;
if
(
f
.
contains
(
j
)
&&
b
.
querySelector
(
"
.
"
+
k
))
break
;
if
(
f
.
contains
(
h
))
break
;
if
(
f
.
contains
(
n
)
&&
f
.
contains
(
s
)){
if
(
d
=
b
,
e
=
d
.
querySelector
(
t
),
!
e
)
return
;
break
}}}}),
b
.
addEventListener
(
"
dragstart
"
,
function
(
b
){
if
(
d
){
var
c
=
b
.
detail
;
if
(
"
left
"
===
c
.
direction
?
d
.
classList
.
contains
(
q
)?
w
=!
0
:
d
.
querySelector
(
v
)
&&!
d
.
classList
.
contains
(
p
)
&&
(
w
=!
0
):
"
right
"
===
c
.
direction
&&
(
d
.
classList
.
contains
(
p
)?
w
=!
0
:
d
.
querySelector
(
u
)
&&!
d
.
classList
.
contains
(
q
)
&&
(
w
=!
0
)),
w
){
g
=
c
.
direction
,
B
=
.
8
*
d
.
offsetWidth
;
var
f
=
a
.
getStyles
(
e
,
"
webkitTransform
"
),
h
=
a
.
parseTranslateMatrix
(
f
);
A
=
y
=
h
?
h
.
x
:
0
;
var
i
=
d
.
classList
;
i
.
add
(
r
),
i
.
contains
(
q
)
||
i
.
contains
(
p
)
||
E
(
d
,
!
0
),
c
.
gesture
.
preventDefault
()}}}),
b
.
addEventListener
(
"
drag
"
,
function
(
a
){
if
(
w
){
var
b
=
a
.
detail
;
f
||
C
(),
y
=
b
.
deltaX
*
x
}}),
b
.
addEventListener
(
"
dragend
"
,
function
(){
if
(
w
){
f
&&
(
cancelAnimationFrame
(
f
),
f
=
null
),
e
.
setAttribute
(
"
style
"
,
""
),
e
.
addEventListener
(
"
webkitTransitionEnd
"
,
F
);
var
a
,
b
=
d
.
classList
,
c
=
[
"
add
"
,
"
remove
"
];
"
right
"
===
g
&&
y
>
0
?(
a
=
q
,
0
>
A
&&
(
c
.
reverse
(),
a
=
p
),
y
>
B
/
2
?
b
[
c
[
0
]](
a
):
b
[
c
[
1
]](
a
)):
"
left
"
===
g
&&
0
>
y
&&
(
a
=
p
,
A
>
0
&&
(
c
.
reverse
(),
a
=
q
),
-
y
>
B
/
2
?
b
[
c
[
0
]](
a
):
b
[
c
[
1
]](
a
))}})}}(
mui
,
window
,
document
,
"
offcanvas
"
),
function
(
a
,
b
,
c
,
d
){
var
e
=
"
mui-action
"
,
f
=
function
(
a
,
b
){
return
b
.
className
&&~
b
.
className
.
indexOf
(
e
)?
b
:
!
1
};
a
.
registerTarget
({
name
:
d
,
index
:
50
,
handle
:
f
,
target
:
!
1
})}(
mui
,
window
,
document
,
"
action
"
),
function
(
a
,
b
,
c
,
d
){
var
e
=
"
mui-modal
"
,
f
=
function
(
a
,
b
){
if
(
"
A
"
===
b
.
tagName
&&
b
.
hash
){
var
d
=
c
.
getElementById
(
b
.
hash
.
replace
(
"
#
"
,
""
));
if
(
d
&&
d
.
classList
.
contains
(
e
))
return
d
}
return
!
1
};
a
.
registerTarget
({
name
:
d
,
index
:
50
,
handle
:
f
,
target
:
!
1
,
isReset
:
!
1
,
isContinue
:
!
0
}),
b
.
addEventListener
(
"
tap
"
,
function
(){
a
.
targets
.
modal
&&
a
.
targets
.
modal
.
classList
.
toggle
(
"
mui-active
"
)})}(
mui
,
window
,
document
,
"
modal
"
),
function
(
a
,
b
,
c
,
d
){
var
e
=
"
mui-popover
"
,
f
=
"
mui-bar-popover
"
,
g
=
"
mui-popover-action
"
,
h
=
"
mui-backdrop
"
,
i
=
"
mui-bar-backdrop
"
,
j
=
"
mui-backdrop-action
"
,
k
=
"
mui-active
"
,
l
=
function
(
b
,
d
){
return
"
A
"
===
d
.
tagName
&&
d
.
hash
&&
(
a
.
targets
.
_popover
=
c
.
getElementById
(
d
.
hash
.
replace
(
"
#
"
,
""
)),
a
.
targets
.
_popover
&&
a
.
targets
.
_popover
.
classList
.
contains
(
e
))?
d
:
!
1
};
a
.
registerTarget
({
name
:
d
,
index
:
60
,
handle
:
l
,
target
:
!
1
,
isReset
:
!
1
,
isContinue
:
!
0
});
var
m
=
function
(
a
){
a
?
c
.
body
.
setAttribute
(
"
style
"
,
"
position:fixed;width:100%;height:100%;overflow:hidden;
"
):
c
.
body
.
setAttribute
(
"
style
"
,
""
)},
n
=
function
(){
this
.
style
.
display
=
"
none
"
,
this
.
removeEventListener
(
"
webkitTransitionEnd
"
,
n
),
m
(
!
1
)},
o
=
function
(){
var
b
=
c
.
createElement
(
"
div
"
);
return
b
.
classList
.
add
(
h
),
b
.
addEventListener
(
"
tap
"
,
function
(){
var
b
=
a
.
targets
.
_popover
;
b
&&
(
b
.
addEventListener
(
"
webkitTransitionEnd
"
,
n
),
b
.
classList
.
remove
(
k
),
b
.
parentNode
.
removeChild
(
o
))}),
b
}();
b
.
addEventListener
(
"
tap
"
,
function
(){
a
.
targets
.
popover
&&
p
(
a
.
targets
.
_popover
,
a
.
targets
.
popover
)});
var
p
=
function
(
a
,
d
){
o
.
classList
.
remove
(
i
),
o
.
classList
.
remove
(
j
);
var
e
=
c
.
querySelector
(
"
.mui-popover.mui-active
"
);
if
(
!
e
||
(
e
.
style
.
display
=
"
none
"
,
e
.
classList
.
remove
(
k
),
e
.
removeEventListener
(
"
webkitTransitionEnd
"
,
n
),
m
(
!
1
),
e
.
parentNode
.
removeChild
(
o
),
a
!==
e
)){
if
(
a
.
classList
.
contains
(
f
)
||
a
.
classList
.
contains
(
g
))
if
(
a
.
classList
.
contains
(
g
))
o
.
classList
.
add
(
j
);
else
if
(
o
.
classList
.
add
(
i
),
d
&&
d
.
parentNode
){
var
h
=
d
.
offsetWidth
,
l
=
d
.
offsetLeft
,
p
=
b
.
innerWidth
;
a
.
style
.
left
=
Math
.
min
(
Math
.
max
(
l
,
5
),
p
-
h
-
5
)
+
"
px
"
}
a
.
style
.
display
=
"
block
"
,
a
.
offsetHeight
,
a
.
classList
.
add
(
k
),
a
.
parentNode
.
appendChild
(
o
),
m
(
!
0
),
o
.
classList
.
add
(
k
)}};
a
.
fn
.
popover
=
function
(){
var
b
=
arguments
;
this
.
each
(
function
(){
a
.
targets
.
_popover
=
this
,(
"
show
"
===
b
[
0
]
||
"
hide
"
===
b
[
0
]
||
"
toggle
"
===
b
[
0
])
&&
p
(
this
,
b
[
1
])})}}(
mui
,
window
,
document
,
"
popover
"
),
function
(
a
,
b
,
c
,
d
){
var
e
=
"
mui-control-item
"
,
f
=
"
mui-control-content
"
,
g
=
"
mui-tab-item
"
,
h
=
function
(
a
,
b
){
return
b
.
classList
&&
(
b
.
classList
.
contains
(
e
)
||
b
.
classList
.
contains
(
g
))?
b
:
!
1
};
a
.
registerTarget
({
name
:
d
,
index
:
80
,
handle
:
h
,
target
:
!
1
}),
b
.
addEventListener
(
"
tap
"
,
function
(){
var
b
=
a
.
targets
[
d
];
if
(
b
){
var
e
,
g
,
h
,
i
=
"
mui-active
"
,
j
=
"
.
"
+
i
;
e
=
b
.
parentNode
.
querySelector
(
j
),
e
&&
e
.
classList
.
remove
(
i
);
var
k
=
b
===
e
;
if
(
b
&&
b
.
classList
.
add
(
i
),
b
.
hash
&&
(
h
=
c
.
getElementById
(
b
.
hash
.
replace
(
"
#
"
,
""
)))){
if
(
!
h
.
classList
.
contains
(
f
))
return
void
b
.
classList
[
k
?
"
remove
"
:
"
add
"
](
i
);
if
(
!
k
){
g
=
h
.
parentNode
.
getElementsByClassName
(
i
);
for
(
var
l
=
0
;
l
<
g
.
length
;
l
++
)
g
[
l
].
classList
.
remove
(
i
);
h
.
classList
.
add
(
i
);
var
m
=
h
.
parentNode
.
querySelectorAll
(
"
.
"
+
f
);
a
.
trigger
(
h
,
a
.
eventName
(
"
shown
"
,
d
),{
tabNumber
:
Array
.
prototype
.
indexOf
.
call
(
m
,
h
)})}}}})}(
mui
,
window
,
document
,
"
tab
"
),
function
(
a
,
b
){
var
c
=
"
mui-slider
"
,
d
=
"
mui-slider-group
"
,
e
=
"
mui-slider-loop
"
,
f
=
"
mui-slider-indicator
"
,
g
=
"
mui-action-previous
"
,
h
=
"
mui-action-next
"
,
i
=
"
mui-slider-item
"
,
j
=
"
.
"
+
i
,
k
=
"
.
"
+
f
,
l
=
"
.mui-slider-progress-bar
"
,
m
=
function
(
b
,
c
){
this
.
element
=
b
,
this
.
options
=
a
.
extend
({
slideshowDelay
:
0
,
factor
:
1
},
c
),
this
.
init
()};
m
.
prototype
.
init
=
function
(){
this
.
initEvent
(),
this
.
initTimer
()},
m
.
prototype
.
refresh
=
function
(
b
){
var
c
=
a
.
extend
({
slideshowDelay
:
0
,
factor
:
1
},
b
);
this
.
options
.
slideshowDelay
!=
c
.
slideshowDelay
&&
(
this
.
options
.
slideshowDelay
=
c
.
slideshowDelay
,
this
.
options
.
slideshowDelay
&&
this
.
nextItem
())},
m
.
prototype
.
initEvent
=
function
(){
var
b
=
this
,
c
=
b
.
element
,
d
=
c
.
parentNode
;
b
.
translateX
=
0
,
b
.
sliderWidth
=
c
.
offsetWidth
,
b
.
isLoop
=
c
.
classList
.
contains
(
e
),
b
.
sliderLength
=
c
.
querySelectorAll
(
j
).
length
,
b
.
progressBarWidth
=
0
,
b
.
progressBar
=
d
.
querySelector
(
l
),
b
.
progressBar
&&
(
b
.
progressBarWidth
=
b
.
progressBar
.
offsetWidth
);
var
f
=!
1
;
b
.
isSwipeable
=!
1
,
d
.
addEventListener
(
"
dragstart
"
,
function
(
a
){
var
d
=
a
.
detail
,
g
=
d
.
direction
;(
"
left
"
==
g
||
"
right
"
==
g
)
&&
(
f
=!
0
,
b
.
translateX
=
b
.
lastTranslateX
=
0
,
b
.
scrollX
=
b
.
getScroll
(),
b
.
sliderWidth
=
c
.
offsetWidth
,
b
.
isLoop
=
c
.
classList
.
contains
(
e
),
b
.
sliderLength
=
c
.
querySelectorAll
(
j
).
length
,
b
.
progressBar
&&
(
b
.
progressBarWidth
=
b
.
progressBar
.
offsetWidth
),
b
.
maxTranslateX
=
(
b
.
sliderLength
-
1
)
*
b
.
sliderWidth
,
a
.
detail
.
gesture
.
preventDefault
())}),
d
.
addEventListener
(
"
drag
"
,
function
(
a
){
f
&&
b
.
dragItem
(
a
)}),
d
.
addEventListener
(
"
dragend
"
,
function
(){
f
&&
(
b
.
gotoItem
(
b
.
getSlideNumber
()),
f
=
b
.
isSwipeable
=!
1
)}),
d
.
addEventListener
(
"
swipeleft
"
,
function
(
c
){
b
.
isSwipeable
&&
(
a
.
gestures
.
stoped
=!
0
,
b
.
nextItem
(),
f
=
b
.
isSwipeable
=!
1
,
c
.
stopImmediatePropagation
())}),
d
.
addEventListener
(
"
swiperight
"
,
function
(
c
){
b
.
isSwipeable
&&
(
a
.
gestures
.
stoped
=!
0
,
b
.
prevItem
(),
f
=
b
.
isSwipeable
=!
1
,
c
.
stopImmediatePropagation
())}),
d
.
addEventListener
(
"
slide
"
,
function
(
a
){
var
b
=
a
.
detail
;
b
.
slideNumber
=
b
.
slideNumber
||
0
;
var
c
=
d
.
querySelector
(
"
.mui-slider-indicator .mui-number span
"
);
c
&&
(
c
.
innerText
=
b
.
slideNumber
+
1
);
for
(
var
e
=
d
.
querySelectorAll
(
"
.mui-slider-indicator .mui-indicator
"
),
f
=
0
,
g
=
e
.
length
;
g
>
f
;
f
++
)
e
[
f
].
classList
[
f
===
b
.
slideNumber
?
"
add
"
:
"
remove
"
](
"
mui-active
"
);
for
(
var
h
=
d
.
querySelectorAll
(
"
.mui-control-item
"
),
f
=
0
,
g
=
h
.
length
;
g
>
f
;
f
++
)
h
[
f
].
classList
[
f
===
b
.
slideNumber
?
"
add
"
:
"
remove
"
](
"
mui-active
"
)}),
d
.
addEventListener
(
a
.
eventName
(
"
shown
"
,
"
tab
"
),
function
(
a
){
b
.
gotoItem
(
-
(
a
.
detail
.
tabNumber
||
0
))});
var
i
=
c
.
parentNode
.
querySelector
(
k
);
i
&&
i
.
addEventListener
(
"
tap
"
,
function
(
a
){
var
c
=
a
.
target
;(
c
.
classList
.
contains
(
g
)
||
c
.
classList
.
contains
(
h
))
&&
(
b
[
c
.
classList
.
contains
(
g
)?
"
prevItem
"
:
"
nextItem
"
](),
a
.
stopPropagation
())})},
m
.
prototype
.
dragItem
=
function
(
a
){
var
b
=
this
,
c
=
a
.
detail
;
if
(
c
.
deltaX
!==
c
.
lastDeltaX
){
var
d
=
c
.
deltaX
*
b
.
options
.
factor
+
b
.
scrollX
;
b
.
element
.
style
[
"
-webkit-transition-duration
"
]
=
"
0
"
;
var
e
=
0
,
f
=-
b
.
maxTranslateX
;
if
(
b
.
isLoop
&&
(
e
=
b
.
sliderWidth
,
f
+=
e
),
d
>
e
||
f
>
d
)
return
void
(
b
.
isSwipeable
=!
1
);
b
.
requestAnimationFrame
||
b
.
updateTranslate
(),
b
.
isSwipeable
=!
0
,
b
.
translateX
=
d
}
b
.
timer
&&
clearTimeout
(
b
.
timer
),
b
.
timer
=
setTimeout
(
function
(){
b
.
initTimer
()},
100
)},
m
.
prototype
.
updateTranslate
=
function
(){
var
a
=
this
;
a
.
lastTranslateX
!==
a
.
translateX
&&
(
a
.
setTranslate
(
a
.
translateX
),
a
.
lastTranslateX
=
a
.
translateX
),
a
.
requestAnimationFrame
=
requestAnimationFrame
(
function
(){
a
.
updateTranslate
()})},
m
.
prototype
.
setTranslate
=
function
(
a
){
this
.
element
.
style
.
webkitTransform
=
"
translate3d(
"
+
a
+
"
px,0,0)
"
,
this
.
updateProcess
(
a
)},
m
.
prototype
.
updateProcess
=
function
(
a
){
var
b
=
this
.
progressBarWidth
;
b
&&
(
a
=
Math
.
abs
(
a
),
this
.
setProcess
(
a
*
(
b
/
this
.
sliderWidth
)))},
m
.
prototype
.
setProcess
=
function
(
a
){
var
b
=
this
.
progressBar
;
b
&&
(
b
.
style
.
webkitTransform
=
"
translate3d(
"
+
a
+
"
px,0,0)
"
)},
m
.
prototype
.
nextItem
=
function
(){
this
.
gotoItem
(
this
.
getCurrentSlideNumber
(
"
next
"
)
-
1
)},
m
.
prototype
.
prevItem
=
function
(){
this
.
gotoItem
(
this
.
getCurrentSlideNumber
(
"
prev
"
)
+
1
)},
m
.
prototype
.
gotoItem
=
function
(
b
){
var
c
=
this
,
d
=
c
.
element
,
e
=
c
.
sliderLength
;
c
.
isLoop
?
e
-=
2
:(
e
-=
1
,
b
=
Math
.
min
(
0
,
b
),
b
=
Math
.
max
(
b
,
-
e
)),
c
.
requestAnimationFrame
&&
(
cancelAnimationFrame
(
c
.
requestAnimationFrame
),
c
.
requestAnimationFrame
=
null
);
var
f
=
Math
.
max
(
b
,
-
e
)
*
d
.
offsetWidth
;
d
.
style
[
"
-webkit-transition-duration
"
]
=
"
.2s
"
,
c
.
setTranslate
(
f
);
var
g
=
function
(){
d
.
style
[
"
-webkit-transition-duration
"
]
=
"
0
"
,
d
.
style
.
webkitTransform
=
"
translate3d(
"
+
b
*
d
.
offsetWidth
+
"
px,0,0)
"
,
d
.
removeEventListener
(
"
webkitTransitionEnd
"
,
g
)};
d
.
removeEventListener
(
"
webkitTransitionEnd
"
,
g
),
c
.
isLoop
&&
(
1
===
b
||
b
===-
e
)
&&
(
b
=
1
===
b
?
-
e
+
1
:
0
,
d
.
addEventListener
(
"
webkitTransitionEnd
"
,
g
)),
a
.
trigger
(
d
.
parentNode
,
"
slide
"
,{
slideNumber
:
Math
.
abs
(
b
)}),
this
.
initTimer
()},
m
.
prototype
.
getSlideNumber
=
function
(){
return
Math
.
round
(
this
.
getScroll
()
/
this
.
sliderWidth
)},
m
.
prototype
.
getCurrentSlideNumber
=
function
(
a
){
return
Math
[
"
next
"
===
a
?
"
ceil
"
:
"
floor
"
](
this
.
getScroll
()
/
this
.
sliderWidth
)},
m
.
prototype
.
getScroll
=
function
(){
var
b
=
this
.
element
,
c
=
0
;
if
(
"
webkitTransform
"
in
b
.
style
){
var
d
=
a
.
parseTranslate
(
b
.
style
.
webkitTransform
);
c
=
d
?
d
.
x
:
0
}
return
c
},
m
.
prototype
.
initTimer
=
function
(){
var
a
=
this
,
c
=
a
.
options
.
slideshowDelay
;
if
(
c
){
var
d
=
a
.
element
,
e
=
d
.
getAttribute
(
"
data-slidershowTimer
"
);
e
&&
b
.
clearTimeout
(
e
),
e
=
b
.
setTimeout
(
function
(){
d
&&
((
d
.
offsetWidth
||
d
.
offsetHeight
)
&&
a
.
nextItem
(),
a
.
initTimer
())},
c
),
d
.
setAttribute
(
"
data-slidershowTimer
"
,
e
)}},
a
.
fn
.
slider
=
function
(
b
){
this
.
each
(
function
(){
var
e
=
this
;
this
.
classList
.
contains
(
c
)
&&
(
e
=
this
.
querySelector
(
"
.
"
+
d
));
var
f
=
e
.
getAttribute
(
"
data-slider
"
);
if
(
f
){
var
g
=
a
.
data
[
f
];
g
&&
g
.
refresh
(
b
)}
else
f
=++
a
.
uuid
,
a
.
data
[
f
]
=
new
m
(
e
,
b
),
e
.
setAttribute
(
"
data-slider
"
,
f
)})},
a
.
ready
(
function
(){
a
(
"
.mui-slider-group
"
).
slider
()})}(
mui
,
window
),
function
(
a
,
b
,
c
,
d
){
var
e
=
"
mui-switch
"
,
f
=
"
mui-switch-handle
"
,
g
=
"
mui-active
"
,
h
=
"
.
"
+
f
,
i
=
function
(
a
,
b
){
return
b
.
classList
&&
b
.
classList
.
contains
(
e
)?
b
:
!
1
};
a
.
registerTarget
({
name
:
d
,
index
:
100
,
handle
:
i
,
target
:
!
1
});
var
j
,
i
,
k
,
l
,
m
,
n
=
function
(
b
){
if
(
j
){
var
c
=
b
.
detail
;
a
.
gestures
.
stoped
=!
0
;
var
d
=!
c
.
drag
&&!
j
.
classList
.
contains
(
g
)
||
c
.
drag
&&
c
.
deltaX
>
k
/
2
-
l
/
2
;
i
.
style
[
"
-webkit-transition-duration
"
]
=
"
.2s
"
,
d
?(
i
.
style
.
webkitTransform
=
"
translate3d(
"
+
m
+
"
px,0,0)
"
,
j
.
classList
.
add
(
g
)):(
i
.
style
.
webkitTransform
=
"
translate3d(0,0,0)
"
,
j
.
classList
.
remove
(
g
)),
a
.
trigger
(
j
,
"
toggle
"
,{
isActive
:
d
})}},
o
=
function
(
a
){
if
(
j
){
var
b
=
a
.
detail
.
deltaX
;
if
(
0
>
b
)
return
i
.
style
.
webkitTransform
=
"
translate3d(0,0,0)
"
;
if
(
b
>
m
)
return
i
.
style
.
webkitTransform
=
"
translate3d(
"
+
m
+
"
px,0,0)
"
;
i
.
style
[
"
-webkit-transition-duration
"
]
=
"
0s
"
,
i
.
style
.
webkitTransform
=
"
translate3d(
"
+
b
+
"
px,0,0)
"
,
j
.
classList
[
b
>
k
/
2
-
l
/
2
?
"
add
"
:
"
remove
"
](
g
)}};
b
.
addEventListener
(
a
.
EVENT_START
,
function
(
b
){
j
=
a
.
targets
.
toggle
,
j
&&
(
i
=
j
.
querySelector
(
h
),
k
=
j
.
clientWidth
,
l
=
i
.
clientWidth
,
m
=
k
-
l
+
3
,
b
.
preventDefault
())}),
b
.
addEventListener
(
"
tap
"
,
n
),
b
.
addEventListener
(
"
drag
"
,
o
),
b
.
addEventListener
(
"
dragend
"
,
n
)}(
mui
,
window
,
document
,
"
toggle
"
),
function
(
a
,
b
,
c
){
var
d
,
e
,
f
,
g
,
h
,
i
,
j
,
k
,
l
,
m
,
n
,
o
,
p
,
q
,
r
,
s
,
t
,
u
=
"
mui-active
"
,
v
=
"
mui-selected
"
,
w
=
"
mui-table-view-cell
"
,
x
=
"
mui-disabled
"
,
y
=
"
mui-switch
"
,
z
=
"
mui-btn
"
,
A
=
"
mui-slider-cell
"
,
B
=
"
mui-slider-handle
"
,
C
=
"
mui-slider-left
"
,
D
=
"
mui-slider-right
"
,
E
=
"
mui-bounce
"
,
F
=
"
.
"
+
A
,
G
=
"
.
"
+
B
,
H
=
"
.
"
+
C
,
I
=
"
.
"
+
D
,
J
=
.
4
,
K
=
1
,
L
=
1
,
M
=
function
(
a
){
a
?
e
?
e
.
classList
.
add
(
u
):
d
&&
d
.
classList
.
add
(
u
):
e
?
e
.
classList
.
remove
(
u
):
d
&&
d
.
classList
.
remove
(
u
)},
N
=
function
(){
s
!==
t
&&
(
k
||
n
?(
k
&&
n
?
0
===
h
?
O
(
g
,
s
):
O
(
g
,
h
+
s
):
k
?
0
===
h
?
O
(
g
,
Math
.
max
(
s
,
0
)):
O
(
g
,
Math
.
max
(
h
+
s
,
0
)):
n
&&
(
0
===
h
?
O
(
g
,
Math
.
min
(
s
,
0
)):
O
(
g
,
Math
.
min
(
h
+
s
,
0
))),
k
&&
(
0
===
h
?
s
>
m
&&
(
f
.
style
.
backgroundColor
=
l
,
O
(
k
,
Math
.
max
(
s
-
m
,
0
))):(
f
.
style
.
backgroundColor
=
s
>
0
?
l
:
""
,
O
(
k
,
Math
.
max
(
s
,
0
)))),
n
&&
(
0
===
h
?
-
s
>
p
&&
(
f
.
style
.
backgroundColor
=
o
,
O
(
n
,
Math
.
min
(
-
(
-
s
-
p
),
0
))):(
f
.
style
.
backgroundColor
=
s
>
0
&&!
k
?
""
:
o
,
O
(
n
,
Math
.
min
(
s
,
0
))))):
g
&&
(
0
===
h
&&
s
>
0
||
h
===
i
&&
0
>
s
)
&&
Math
.
abs
(
s
)
<=
i
&&
O
(
g
,
h
+
s
),
t
=
s
),
r
=
requestAnimationFrame
(
function
(){
N
()})},
O
=
function
(
a
,
b
){
a
&&
(
a
.
style
.
webkitTransform
=
"
translate3d(
"
+
b
+
"
px,0,0)
"
)},
P
=
function
(
b
,
c
){
k
&&
(
k
.
setAttribute
(
"
style
"
,
""
),
n
&&
n
.
setAttribute
(
"
style
"
,
""
),
b
?(
O
(
g
,
m
),
c
&&
a
.
trigger
(
g
,
"
slideright
"
),
d
.
classList
.
add
(
v
)):(
O
(
g
,
0
),
d
.
classList
.
remove
(
v
)))},
Q
=
function
(
b
,
c
){
n
&&
(
n
.
setAttribute
(
"
style
"
,
""
),
k
&&
k
.
setAttribute
(
"
style
"
,
""
),
b
?(
O
(
g
,
-
p
),
c
&&
a
.
trigger
(
g
,
"
slideleft
"
),
d
.
classList
.
add
(
v
)):(
O
(
g
,
0
),
d
.
classList
.
remove
(
v
)))},
R
=
function
(
a
){
g
&&
(
a
?(
O
(
g
,
0
),
d
.
classList
.
add
(
v
)):(
O
(
g
,
i
),
d
.
classList
.
remove
(
v
)))},
S
=
function
(
b
,
c
){
q
=!
1
,
r
&&
(
cancelAnimationFrame
(
r
),
r
=
null
),
f
.
setAttribute
(
"
style
"
,
""
);
var
d
=
Math
.
abs
(
s
);
if
(
b
||!
k
&&!
n
)
k
||
n
||
R
(
0
===
h
?
!
(
d
>
i
/
2
):
d
>
i
/
2
);
else
if
(
s
>
0
){
var
e
=
m
/
2
;
if
(
0
!==
h
&&
n
&&
(
Q
(
!
(
d
>=
p
/
2
),
!
1
),
e
=
m
/
2
+
p
),
k
){
var
j
=
d
>=
e
;
k
.
classList
.
contains
(
E
)?(
k
.
setAttribute
(
"
style
"
,
""
),
O
(
g
,
0
),
j
&&!
c
.
swipe
&&
a
.
trigger
(
g
,
"
slideright
"
)):
P
(
j
,
!
0
)}}
else
{
var
e
=
m
/
2
;
if
(
0
!==
h
&&
k
&&
(
P
(
!
(
d
>=
m
/
2
),
!
1
),
e
=
p
/
2
+
m
),
n
){
var
j
=
d
>=
e
;
n
.
classList
.
contains
(
E
)?(
n
.
setAttribute
(
"
style
"
,
""
),
O
(
g
,
0
),
j
&&!
c
.
swipe
&&
a
.
trigger
(
g
,
"
slideleft
"
)):
Q
(
j
,
!
0
)}}};
b
.
addEventListener
(
"
touchstart
"
,
function
(
b
){
d
=
e
=
g
=
k
=
n
=
q
=
r
=!
1
,
s
=
t
=
h
=
i
=
m
=
p
=
0
,
l
=
o
=
""
;
for
(
var
u
=
b
.
target
,
A
=!
1
;
u
&&
u
!==
c
;
u
=
u
.
parentNode
)
if
(
u
.
classList
){
var
B
=
u
.
classList
;
if
((
"
INPUT
"
===
u
.
tagName
&&
"
radio
"
!==
u
.
type
&&
"
checkbox
"
!==
u
.
type
||
"
BUTTON
"
===
u
.
tagName
||
B
.
contains
(
y
)
||
B
.
contains
(
z
)
||
B
.
contains
(
x
))
&&
(
A
=!
0
),
B
.
contains
(
w
)){
d
=
u
;
var
C
=
d
.
parentNode
.
querySelector
(
"
.
"
+
v
);
if
(
C
&&
C
!=
d
){
C
.
classList
.
remove
(
v
);
var
D
=
C
.
querySelector
(
G
);
if
(
D
){
var
E
=
C
.
querySelector
(
H
);
E
&&
E
.
setAttribute
(
"
style
"
,
""
);
var
N
=
C
.
querySelector
(
I
);
N
&&
N
.
setAttribute
(
"
style
"
,
""
),
E
||
N
?
O
(
D
,
0
):
O
(
D
,
D
.
offsetWidth
)}}
var
P
=
d
.
querySelector
(
"
a
"
);
if
(
P
&&
P
.
parentNode
===
d
&&
(
e
=
P
),
f
=
d
.
querySelector
(
F
),
f
&&
f
.
parentNode
===
d
){
var
Q
=
f
.
querySelector
(
G
);
if
(
Q
){
g
=
Q
,
i
=
g
.
offsetWidth
,
j
=
a
.
getStyles
(
g
,
"
margin-left
"
),
L
=
K
;
var
R
=
f
.
querySelector
(
H
);
R
&&
(
k
=
R
,
l
=
a
.
getStyles
(
R
,
"
background-color
"
),
m
=
R
.
offsetWidth
);
var
S
=
f
.
querySelector
(
I
);
S
&&
(
n
=
S
,
o
=
a
.
getStyles
(
S
,
"
background-color
"
),
p
=
S
.
offsetWidth
),(
k
||
n
)
&&
(
L
=
J
);
var
T
=
a
.
getStyles
(
g
,
"
webkitTransform
"
),
U
=
a
.
parseTranslateMatrix
(
T
);
h
=
U
?
U
.
x
:
0
}}
A
||
M
(
!
0
);
break
}}}),
b
.
addEventListener
(
"
touchmove
"
,
function
(){
M
(
!
1
)}),
b
.
addEventListener
(
"
dragstart
"
,
function
(
a
){
if
(
g
){
var
b
=
a
.
detail
,
c
=
b
.
direction
,
d
=
b
.
angle
;
if
(
"
left
"
===
c
){
if
((
n
||
g
)
&&
(
d
>
150
||-
150
>
d
)){
if
(
!
n
&&
k
&&
0
===
h
)
return
;
if
(
g
&&!
n
&&!
k
&&
0
===
h
)
return
;
q
=!
0
}}
else
if
(
"
right
"
===
c
&&
(
k
||
g
)
&&
d
>-
30
&&
30
>
d
){
if
(
!
k
&&
n
&&
0
===
h
)
return
;
if
(
g
&&!
n
&&!
k
&&
h
===
i
)
return
;
q
=!
0
}}}),
b
.
addEventListener
(
"
drag
"
,
function
(
a
){
q
&&
(
r
||
N
(),
s
=
a
.
detail
.
deltaX
*
L
,
a
.
detail
.
gesture
.
preventDefault
())}),
b
.
addEventListener
(
"
dragend
"
,
function
(
a
){
q
&&
S
(
!
1
,
a
.
detail
)}),
b
.
addEventListener
(
"
swiperight
"
,
function
(
b
){
if
(
g
){
var
c
=!
1
;
k
&&!
k
.
classList
.
contains
(
E
)
&&
0
===
h
?(
P
(
!
0
,
!
0
),
c
=!
0
):
n
&&
0
>
h
?(
Q
(
!
1
,
!
1
),
c
=!
0
):
k
||
n
||
(
c
=!
0
),
c
&&
(
a
.
gestures
.
stoped
=!
0
,
b
.
stopImmediatePropagation
(),
S
(
!
0
,
b
.
detail
))}}),
b
.
addEventListener
(
"
swipeleft
"
,
function
(
b
){
if
(
g
){
var
c
=!
1
;
n
&&!
n
.
classList
.
contains
(
E
)
&&
0
===
h
?(
Q
(
!
0
,
!
0
),
c
=!
0
):
k
&&
h
>
0
?(
P
(
!
1
,
!
1
),
c
=!
0
):
k
||
n
||
(
c
=!
0
),
c
&&
(
a
.
gestures
.
stoped
=!
0
,
b
.
stopImmediatePropagation
(),
S
(
!
0
,
b
.
detail
))}}),
b
.
addEventListener
(
"
touchend
"
,
function
(){
d
&&
M
(
!
1
)}),
b
.
addEventListener
(
"
touchcancel
"
,
function
(){
d
&&
M
(
!
1
)});
var
T
=
function
(){
var
a
=
d
.
classList
;
if
(
a
.
contains
(
"
mui-radio
"
)){
var
b
=
d
.
querySelector
(
"
input[type=radio]
"
);
b
&&
b
.
click
()}
else
if
(
a
.
contains
(
"
mui-checkbox
"
)){
var
b
=
d
.
querySelector
(
"
input[type=checkbox]
"
);
b
&&
b
.
click
()}};
b
.
addEventListener
(
"
doubletap
"
,
function
(){
d
&&
T
()}),
b
.
addEventListener
(
"
tap
"
,
function
(){
if
(
d
){
var
b
=!
1
,
c
=
d
.
classList
;
if
(
c
.
contains
(
"
mui-collapse
"
)){
if
(
!
c
.
contains
(
u
)){
var
e
=
d
.
parentNode
.
querySelector
(
"
.mui-collapse.mui-active
"
);
e
&&
e
.
classList
.
remove
(
u
),
b
=!
0
}
c
.
toggle
(
u
),
b
&&
a
.
trigger
(
d
,
"
expand
"
)}
T
()}})}(
mui
,
window
,
document
),
function
(
a
,
b
){
a
.
alert
=
function
(
c
,
d
,
e
,
f
){
if
(
a
.
os
.
plus
){
if
(
void
0
===
typeof
c
)
return
;
"
function
"
==
typeof
d
?(
f
=
d
,
d
=
null
,
e
=
"
确定
"
):
"
function
"
==
typeof
e
&&
(
f
=
e
,
e
=
null
),
plus
.
nativeUI
.
alert
(
c
,
f
,
d
,
e
)}
else
b
.
alert
(
c
)}}(
mui
,
window
),
function
(
a
,
b
){
a
.
confirm
=
function
(
c
,
d
,
e
,
f
){
if
(
a
.
os
.
plus
){
if
(
void
0
===
typeof
c
)
return
;
"
function
"
==
typeof
d
?(
f
=
d
,
d
=
null
,
e
=
null
):
"
function
"
==
typeof
e
&&
(
f
=
e
,
e
=
null
),
plus
.
nativeUI
.
confirm
(
c
,
f
,
d
,
e
)}
else
b
.
confirm
(
c
)}}(
mui
,
window
),
function
(
a
,
b
){
a
.
prompt
=
function
(
c
,
d
,
e
,
f
,
g
){
if
(
a
.
os
.
plus
){
if
(
void
0
===
typeof
message
)
return
;
"
function
"
==
typeof
d
?(
g
=
d
,
d
=
null
,
e
=
null
,
f
=
null
):
"
function
"
==
typeof
e
?(
g
=
e
,
e
=
null
,
f
=
null
):
"
function
"
==
typeof
f
&&
(
g
=
f
,
f
=
null
),
plus
.
nativeUI
.
prompt
(
c
,
g
,
e
,
d
,
f
)}
else
b
.
prompt
(
c
)}}(
mui
,
window
),
function
(
a
){
a
.
toast
=
function
(
b
){
if
(
a
.
os
.
plus
&&
a
.
os
.
android
)
plus
.
nativeUI
.
toast
(
b
,{
verticalAlign
:
"
bottom
"
});
else
{
var
c
=
document
.
createElement
(
"
div
"
);
c
.
classList
.
add
(
"
mui-toast-container
"
),
c
.
innerHTML
=
'
<div class="mui-toast-message">
'
+
b
+
"
</div>
"
,
document
.
body
.
appendChild
(
c
),
setTimeout
(
function
(){
document
.
body
.
removeChild
(
c
)},
2
e3
)}}}(
mui
,
window
),
function
(
a
,
b
,
c
){
var
d
=
"
mui-icon
"
,
e
=
"
mui-icon-clear
"
,
f
=
"
mui-icon-speech
"
,
g
=
"
mui-icon-search
"
,
h
=
"
mui-input-row
"
,
i
=
"
mui-placeholder
"
,
j
=
"
mui-tooltip
"
,
k
=
"
mui-hidden
"
,
l
=
"
.
"
+
e
,
m
=
"
.
"
+
f
,
n
=
"
.
"
+
i
,
o
=
"
.
"
+
j
,
p
=
function
(
a
){
for
(;
a
&&
a
!==
c
;
a
=
a
.
parentNode
)
if
(
a
.
classList
&&
a
.
classList
.
contains
(
h
))
return
a
;
return
null
},
q
=
function
(
a
,
b
){
this
.
element
=
a
,
this
.
options
=
b
||
{
actions
:
"
clear
"
},
~
this
.
options
.
actions
.
indexOf
(
"
slider
"
)?(
this
.
sliderActionClass
=
j
+
"
"
+
k
,
this
.
sliderActionSelector
=
o
):(
~
this
.
options
.
actions
.
indexOf
(
"
clear
"
)
&&
(
this
.
clearActionClass
=
d
+
"
"
+
e
+
(
a
.
value
?
""
:
"
"
+
k
),
this
.
clearActionSelector
=
l
),
~
this
.
options
.
actions
.
indexOf
(
"
speech
"
)
&&
(
this
.
speechActionClass
=
d
+
"
"
+
f
,
this
.
speechActionSelector
=
m
),
~
this
.
options
.
actions
.
indexOf
(
"
search
"
)
&&
(
this
.
searchActionClass
=
i
,
this
.
searchActionSelector
=
n
)),
this
.
init
()};
q
.
prototype
.
init
=
function
(){
this
.
initAction
(),
this
.
initElementEvent
()},
q
.
prototype
.
initAction
=
function
(){
var
a
=
this
,
b
=
a
.
element
.
parentNode
;
b
&&
(
a
.
sliderActionClass
?
a
.
sliderAction
=
a
.
createAction
(
b
,
a
.
sliderActionClass
,
a
.
sliderActionSelector
):(
a
.
searchActionClass
&&
(
a
.
searchAction
=
a
.
createAction
(
b
,
a
.
searchActionClass
,
a
.
searchActionSelector
),
a
.
searchAction
.
addEventListener
(
"
tap
"
,
function
(){
setTimeout
(
function
(){
a
.
element
.
focus
()},
0
)})),
a
.
speechActionClass
&&
(
a
.
speechAction
=
a
.
createAction
(
b
,
a
.
speechActionClass
,
a
.
speechActionSelector
),
a
.
speechAction
.
addEventListener
(
"
click
"
,
function
(
a
){
a
.
stopPropagation
()}),
a
.
speechAction
.
addEventListener
(
"
tap
"
,
function
(
b
){
a
.
speechActionClick
(
b
)})),
a
.
clearActionClass
&&
(
a
.
clearAction
=
a
.
createAction
(
b
,
a
.
clearActionClass
,
a
.
clearActionSelector
),
a
.
clearAction
.
addEventListener
(
"
tap
"
,
function
(
b
){
a
.
clearActionClick
(
b
)}))))},
q
.
prototype
.
createAction
=
function
(
a
,
b
,
e
){
var
f
=
a
.
querySelector
(
e
);
if
(
!
f
){
var
f
=
c
.
createElement
(
"
span
"
);
f
.
className
=
b
,
b
===
this
.
searchActionClass
&&
(
f
.
innerHTML
=
'
<span class="
'
+
d
+
"
"
+
g
+
'
"></span>
'
+
this
.
element
.
getAttribute
(
"
placeholder
"
),
this
.
element
.
setAttribute
(
"
placeholder
"
,
""
)),
a
.
insertBefore
(
f
,
this
.
element
.
nextSibling
)}
return
f
},
q
.
prototype
.
initElementEvent
=
function
(){
var
b
=
this
.
element
;
if
(
this
.
sliderActionClass
){
var
c
=
this
.
sliderAction
,
d
=
b
.
offsetLeft
,
e
=
b
.
offsetWidth
-
28
,
f
=
c
.
offsetWidth
,
g
=
Math
.
abs
(
b
.
max
-
b
.
min
),
h
=
null
,
i
=
function
(){
c
.
classList
.
remove
(
k
),
f
=
f
||
c
.
offsetWidth
;
var
a
=
Math
.
abs
(
b
.
value
)
/
g
*
e
;
c
.
style
.
left
=
14
+
d
+
a
-
f
/
2
+
"
px
"
,
c
.
innerText
=
b
.
value
,
h
&&
clearTimeout
(
h
),
h
=
setTimeout
(
function
(){
c
.
classList
.
add
(
k
)},
1
e3
)};
b
.
addEventListener
(
"
input
"
,
i
),
b
.
addEventListener
(
"
tap
"
,
i
)}
else
{
if
(
this
.
clearActionClass
){
var
j
=
this
.
clearAction
;
if
(
!
j
)
return
;
a
.
each
([
"
keyup
"
,
"
change
"
,
"
input
"
,
"
focus
"
,
"
blur
"
,
"
cut
"
,
"
paste
"
],
function
(
a
,
c
){
!
function
(
a
){
b
.
addEventListener
(
a
,
function
(){
j
.
classList
[
b
.
value
.
trim
()?
"
remove
"
:
"
add
"
](
k
)})}(
c
)})}
this
.
searchActionClass
&&
(
b
.
addEventListener
(
"
focus
"
,
function
(){
b
.
parentNode
.
classList
.
add
(
"
mui-active
"
)}),
b
.
addEventListener
(
"
blur
"
,
function
(){
b
.
value
.
trim
()
||
b
.
parentNode
.
classList
.
remove
(
"
mui-active
"
)}))}},
q
.
prototype
.
clearActionClick
=
function
(
a
){
this
.
element
.
value
=
""
,
this
.
element
.
focus
(),
this
.
clearAction
.
classList
.
add
(
k
),
a
.
preventDefault
()},
q
.
prototype
.
speechActionClick
=
function
(
a
){
if
(
b
.
plus
){
var
c
=
this
;
c
.
element
.
value
=
""
,
plus
.
speech
.
startRecognize
({
engine
:
"
iFly
"
},
function
(
a
){
c
.
element
.
value
+=
a
,
setTimeout
(
function
(){
c
.
element
.
focus
()},
0
),
plus
.
speech
.
stopRecognize
()},
function
(){})}
else
alert
(
"
only for 5+
"
);
a
.
preventDefault
()},
a
.
fn
.
input
=
function
(){
this
.
each
(
function
(){
var
b
=
[],
c
=
p
(
this
.
parentNode
);
if
(
"
range
"
===
this
.
type
&&
c
.
classList
.
contains
(
"
mui-input-range
"
))
b
.
push
(
"
slider
"
);
else
{
var
d
=
this
.
classList
;
d
.
contains
(
"
mui-input-clear
"
)
&&
b
.
push
(
"
clear
"
),
d
.
contains
(
"
mui-input-speech
"
)
&&
b
.
push
(
"
speech
"
),
"
search
"
===
this
.
type
&&
c
.
classList
.
contains
(
"
mui-search
"
)
&&
b
.
push
(
"
search
"
)}
var
e
=
this
.
getAttribute
(
"
data-input-
"
+
b
[
0
]);
if
(
!
e
){
e
=++
a
.
uuid
,
a
.
data
[
e
]
=
new
q
(
this
,{
actions
:
b
.
join
(
"
,
"
)});
for
(
var
f
=
0
,
g
=
b
.
length
;
g
>
f
;
f
++
)
this
.
setAttribute
(
"
data-input-
"
+
b
[
f
],
e
)}})},
a
.
ready
(
function
(){
a
(
"
.mui-input-row input
"
).
input
()})}(
mui
,
window
,
document
),
function
(
a
,
b
){
a
.
back
=
function
(){
b
.
history
.
length
>
1
&&
(
"
function
"
==
typeof
a
.
options
.
back
?
a
.
options
.
back
()
!==!
1
&&
b
.
history
.
back
():
b
.
history
.
back
())},
b
.
addEventListener
(
"
tap
"
,
function
(){
var
b
=
a
.
targets
.
action
;
b
&&
b
.
classList
.
contains
(
"
mui-action-back
"
)
&&
a
.
back
()}),
b
.
addEventListener
(
"
swiperight
"
,
function
(
b
){
var
c
=
b
.
detail
;
c
.
angle
>-
15
&&
c
.
angle
<
15
&&
a
.
options
.
swipeBack
===!
0
&&
a
.
back
()})}(
mui
,
window
),
function
(
a
,
b
){
a
.
back
=
function
(){
var
c
=!
0
,
d
=!
1
;
if
(
"
function
"
==
typeof
a
.
options
.
back
&&
(
d
=
a
.
options
.
back
(),
d
===!
1
&&
(
c
=!
1
)),
c
)
if
(
b
.
plus
){
var
e
=
a
.
currentWebview
,
f
=
e
.
parent
();
e
.
canBack
(
function
(
c
){
if
(
c
.
canBack
)
b
.
history
.
back
();
else
{
f
&&
(
e
=
f
);
var
d
=
e
.
opener
();
if
(
d
){
var
g
=
d
.
parent
();
g
&&
(
d
=
g
),
e
.
preload
?
e
.
hide
(
"
auto
"
):
a
.
closeAll
(
e
)}}})}
else
b
.
history
.
length
>
1
?
b
.
history
.
back
():
b
.
close
()},
a
.
menu
=
function
(){
var
c
=
document
.
querySelector
(
"
.mui-action-menu
"
);
if
(
c
)
a
.
trigger
(
c
,
"
tap
"
);
else
if
(
b
.
plus
){
var
d
=
a
.
currentWebview
,
e
=
d
.
parent
();
e
&&
e
.
evalJS
(
"
mui&&mui.menu();
"
)}},
a
.
plusReady
(
function
(){
plus
.
key
.
addEventListener
(
"
backbutton
"
,
function
(){
a
.
back
()},
!
1
),
plus
.
key
.
addEventListener
(
"
menubutton
"
,
function
(){
a
.
menu
()},
!
1
)})}(
mui
,
window
);
\ No newline at end of file
var
mui
=
function
(
a
,
b
){
var
c
=
/complete|loaded|interactive/
,
d
=
/^#
([\w
-
]
*
)
$/
,
e
=
/^
\.([\w
-
]
+
)
$/
,
f
=
/^
[\w
-
]
+$/
,
g
=
/translate
(?:
3d
)?\((
.+
?)\)
/
,
h
=
/matrix
(
3d
)?\((
.+
?)\)
/
,
i
=
function
(
b
,
c
){
if
(
c
=
c
||
a
,
!
b
)
return
j
();
if
(
"
object
"
==
typeof
b
)
return
j
([
b
],
null
);
try
{
if
(
d
.
test
(
b
)){
var
e
=
c
.
getElementById
(
RegExp
.
$1
);
return
j
(
e
?[
e
]:[])}
return
j
(
i
.
qsa
(
b
,
c
),
b
)}
catch
(
f
){}
return
j
()},
j
=
function
(
a
,
b
){
return
a
=
a
||
[],
a
.
__proto__
=
i
.
fn
,
a
.
selector
=
b
||
""
,
a
};
return
i
.
uuid
=
0
,
i
.
data
=
{},
i
.
extend
=
function
(
a
,
c
,
d
){
a
||
(
a
=
{}),
c
||
(
c
=
{});
for
(
var
e
in
c
)
c
[
e
]
!==
b
&&
(
d
&&
"
object
"
==
typeof
a
[
e
]?
i
.
extend
(
a
[
e
],
c
[
e
],
d
):
a
[
e
]
=
c
[
e
]);
return
a
},
i
.
slice
=
[].
slice
,
i
.
qsa
=
function
(
b
,
c
){
return
c
=
c
||
a
,
i
.
slice
.
call
(
e
.
test
(
b
)?
c
.
getElementsByClassName
(
RegExp
.
$1
):
f
.
test
(
b
)?
c
.
getElementsByTagName
(
b
):
c
.
querySelectorAll
(
b
))},
i
.
ready
=
function
(
b
){
return
c
.
test
(
a
.
readyState
)?
b
(
i
):
a
.
addEventListener
(
"
DOMContentLoaded
"
,
function
(){
b
(
i
)},
!
1
),
this
},
i
.
each
=
function
(
a
,
b
){
return
[].
every
.
call
(
a
,
function
(
a
,
c
){
return
b
.
call
(
a
,
c
,
a
)
!==!
1
}),
this
},
i
.
trigger
=
function
(
a
,
b
,
c
){
return
a
.
dispatchEvent
(
new
CustomEvent
(
b
,{
detail
:
c
,
bubbles
:
!
0
,
cancelable
:
!
0
})),
this
},
i
.
getStyles
=
function
(
a
,
b
){
var
c
=
a
.
ownerDocument
.
defaultView
.
getComputedStyle
(
a
,
null
);
return
b
?
c
.
getPropertyValue
(
b
)
||
c
[
b
]:
c
},
i
.
parseTranslate
=
function
(
a
,
b
){
var
c
=
a
.
match
(
g
||
""
);
return
c
&&
c
[
1
]
||
(
c
=
[
""
,
"
0,0,0
"
]),
c
=
c
[
1
].
split
(
"
,
"
),
c
=
{
x
:
parseFloat
(
c
[
0
]),
y
:
parseFloat
(
c
[
1
]),
z
:
parseFloat
(
c
[
2
])},
b
&&
c
.
hasOwnProperty
(
b
)?
c
[
b
]:
c
},
i
.
parseTranslateMatrix
=
function
(
a
,
b
){
var
c
=
a
.
match
(
h
),
d
=
c
&&
c
[
1
];
c
?(
c
=
c
[
2
].
split
(
"
,
"
),
"
3d
"
===
d
?
c
=
c
.
slice
(
12
,
15
):(
c
.
push
(
0
),
c
=
c
.
slice
(
4
,
7
))):
c
=
[
0
,
0
,
0
];
var
e
=
{
x
:
parseFloat
(
c
[
0
]),
y
:
parseFloat
(
c
[
1
]),
z
:
parseFloat
(
c
[
2
])};
return
b
&&
e
.
hasOwnProperty
(
b
)?
e
[
b
]:
e
},
i
.
fn
=
{
each
:
function
(
a
){
return
[].
every
.
call
(
this
,
function
(
b
,
c
){
return
a
.
call
(
b
,
c
,
b
)
!==!
1
}),
this
}},
i
}(
document
);
window
.
mui
=
mui
,
"
$
"
in
window
||
(
window
.
$
=
mui
),
function
(
a
,
b
,
c
){
a
.
targets
=
{},
a
.
targetHandles
=
[],
a
.
registerTarget
=
function
(
b
){
return
b
.
index
=
b
.
index
||
1
e3
,
a
.
targetHandles
.
push
(
b
),
a
.
targetHandles
.
sort
(
function
(
a
,
b
){
return
a
.
index
-
b
.
index
}),
a
.
targetHandles
},
b
.
addEventListener
(
"
touchstart
"
,
function
(
b
){
for
(
var
d
=
b
.
target
,
e
=
{};
d
&&
d
!==
c
;
d
=
d
.
parentNode
){
var
f
=!
1
;
if
(
a
.
each
(
a
.
targetHandles
,
function
(
c
,
g
){
var
h
=
g
.
name
;
f
||
e
[
h
]
||!
g
.
hasOwnProperty
(
"
handle
"
)?
e
[
h
]
||
g
.
isReset
!==!
1
&&
(
a
.
targets
[
h
]
=!
1
):(
a
.
targets
[
h
]
=
g
.
handle
(
b
,
d
),
a
.
targets
[
h
]
&&
(
e
[
h
]
=!
0
,
g
.
isContinue
!==!
0
&&
(
f
=!
0
)))}),
f
)
break
}})}(
mui
,
window
,
document
),
function
(
a
){
String
.
prototype
.
trim
===
a
&&
(
String
.
prototype
.
trim
=
function
(){
return
this
.
replace
(
/^
\s
+|
\s
+$/g
,
""
)})}(),
function
(){
function
a
(
a
,
b
){
b
=
b
||
{
bubbles
:
!
1
,
cancelable
:
!
1
,
detail
:
void
0
};
var
c
=
document
.
createEvent
(
"
Events
"
),
d
=!
0
;
if
(
b
)
for
(
var
e
in
b
)
"
bubbles
"
===
e
?
d
=!!
b
[
e
]:
c
[
e
]
=
b
[
e
];
return
c
.
initEvent
(
a
,
d
,
!
0
),
c
}
"
undefined
"
==
typeof
window
.
CustomEvent
&&
(
a
.
prototype
=
window
.
Event
.
prototype
,
window
.
CustomEvent
=
a
)}(),
function
(
a
){
"
classList
"
in
a
.
documentElement
||!
Object
.
defineProperty
||
"
undefined
"
==
typeof
HTMLElement
||
Object
.
defineProperty
(
HTMLElement
.
prototype
,
"
classList
"
,{
get
:
function
(){
function
a
(
a
){
return
function
(
c
){
var
d
=
b
.
className
.
split
(
/
\s
+/
),
e
=
d
.
indexOf
(
c
);
a
(
d
,
e
,
c
),
b
.
className
=
d
.
join
(
"
"
)}}
var
b
=
this
,
c
=
{
add
:
a
(
function
(
a
,
b
,
c
){
~
b
||
a
.
push
(
c
)}),
remove
:
a
(
function
(
a
,
b
){
~
b
&&
a
.
splice
(
b
,
1
)}),
toggle
:
a
(
function
(
a
,
b
,
c
){
~
b
?
a
.
splice
(
b
,
1
):
a
.
push
(
c
)}),
contains
:
function
(
a
){
return
!!~
b
.
className
.
split
(
/
\s
+/
).
indexOf
(
a
)},
item
:
function
(
a
){
return
b
.
className
.
split
(
/
\s
+/
)[
a
]
||
null
}};
return
Object
.
defineProperty
(
c
,
"
length
"
,{
get
:
function
(){
return
b
.
className
.
split
(
/
\s
+/
).
length
}}),
c
}})}(
document
),
function
(
a
){
var
b
=
0
;
a
.
requestAnimationFrame
||
(
a
.
requestAnimationFrame
=
a
.
webkitRequestAnimationFrame
,
a
.
cancelAnimationFrame
=
a
.
webkitCancelAnimationFrame
||
a
.
webkitCancelRequestAnimationFrame
),
a
.
requestAnimationFrame
||
(
a
.
requestAnimationFrame
=
function
(
c
){
var
d
=
(
new
Date
).
getTime
(),
e
=
Math
.
max
(
0
,
16.7
-
(
d
-
b
)),
f
=
a
.
setTimeout
(
function
(){
c
(
d
+
e
)},
e
);
return
b
=
d
+
e
,
f
}),
a
.
cancelAnimationFrame
||
(
a
.
cancelAnimationFrame
=
function
(
a
){
clearTimeout
(
a
)})}(
window
),
function
(
a
,
b
,
c
){
if
(
!
b
.
FastClick
){
var
d
=
function
(
a
,
b
){
return
!
b
.
type
||
"
radio
"
!==
b
.
type
&&
"
checkbox
"
!==
b
.
type
?
!
1
:
b
};
a
.
registerTarget
({
name
:
c
,
index
:
40
,
handle
:
d
,
target
:
!
1
});
var
e
=
function
(
c
){
var
d
=
a
.
targets
.
click
;
if
(
d
){
var
e
,
f
;
document
.
activeElement
&&
document
.
activeElement
!==
d
&&
document
.
activeElement
.
blur
(),
f
=
c
.
detail
.
gesture
.
changedTouches
[
0
],
e
=
document
.
createEvent
(
"
MouseEvents
"
),
e
.
initMouseEvent
(
"
click
"
,
!
0
,
!
0
,
b
,
1
,
f
.
screenX
,
f
.
screenY
,
f
.
clientX
,
f
.
clientY
,
!
1
,
!
1
,
!
1
,
!
1
,
0
,
null
),
e
.
forwardedTouchEvent
=!
0
,
d
.
dispatchEvent
(
e
)}};
b
.
addEventListener
(
"
tap
"
,
e
),
b
.
addEventListener
(
"
doubletap
"
,
e
),
b
.
addEventListener
(
"
click
"
,
function
(
b
){
return
a
.
targets
.
click
&&!
b
.
forwardedTouchEvent
?(
b
.
stopImmediatePropagation
?
b
.
stopImmediatePropagation
():
b
.
propagationStopped
=!
0
,
b
.
stopPropagation
(),
b
.
preventDefault
(),
!
1
):
void
0
},
!
0
)}}(
mui
,
window
,
"
click
"
),
function
(
a
){
a
.
namespace
=
"
mui
"
,
a
.
classNamePrefix
=
a
.
namespace
+
"
-
"
,
a
.
classSelectorPrefix
=
"
.
"
+
a
.
classNamePrefix
,
a
.
className
=
function
(
b
){
return
a
.
classNamePrefix
+
b
},
a
.
classSelector
=
function
(
b
){
return
b
.
replace
(
/
\.
/g
,
a
.
classSelectorPrefix
)},
a
.
eventName
=
function
(
b
,
c
){
return
b
+
(
a
.
namespace
?
"
.
"
+
a
.
namespace
:
""
)
+
(
c
?
"
.
"
+
c
:
""
)}}(
mui
),
function
(
a
,
b
){
a
.
EVENT_START
=
"
touchstart
"
,
a
.
EVENT_MOVE
=
"
touchmove
"
,
a
.
EVENT_END
=
"
touchend
"
,
a
.
EVENT_CANCEL
=
"
touchcancel
"
,
a
.
EVENT_CLICK
=
"
click
"
,
a
.
preventDefault
=
function
(
a
){
a
.
preventDefault
()},
a
.
stopPropagation
=
function
(
a
){
a
.
stopPropagation
()},
a
.
gestures
=
[],
a
.
registerGesture
=
function
(
b
){
return
b
.
index
=
b
.
index
||
1
e3
,
a
.
gestures
.
push
(
b
),
a
.
gestures
.
sort
(
function
(
a
,
b
){
return
a
.
index
-
b
.
index
}),
a
.
gestures
};
var
c
=
function
(
a
,
b
){
var
c
=
b
.
x
-
a
.
x
,
d
=
b
.
y
-
a
.
y
;
return
Math
.
sqrt
(
c
*
c
+
d
*
d
)},
d
=
function
(
a
,
b
){
return
180
*
Math
.
atan2
(
b
.
y
-
a
.
y
,
b
.
x
-
a
.
x
)
/
Math
.
PI
},
e
=
function
(
a
){
return
-
45
>
a
&&
a
>-
135
?
"
up
"
:
a
>=
45
&&
135
>
a
?
"
down
"
:
a
>=
135
||-
135
>=
a
?
"
left
"
:
a
>=-
45
&&
45
>=
a
?
"
right
"
:
null
},
f
=
function
(
b
,
c
){
a
.
gestures
.
stoped
||
a
.
each
(
a
.
gestures
,
function
(
d
,
e
){
a
.
gestures
.
stoped
||
a
.
options
.
gestureConfig
[
e
.
name
]
&&
e
.
hasOwnProperty
(
"
handle
"
)
&&
e
.
handle
(
b
,
c
)})},
g
=
{},
h
=
function
(
b
){
a
.
gestures
.
stoped
=!
1
,
g
=
{
target
:
b
.
target
,
lastTarget
:
g
.
lastTarget
?
g
.
lastTarget
:
null
,
startTime
:
Date
.
now
(),
touchTime
:
0
,
lastTapTime
:
g
.
lastTapTime
?
g
.
lastTapTime
:
0
,
start
:{
x
:
b
.
touches
[
0
].
pageX
,
y
:
b
.
touches
[
0
].
pageY
},
move
:{
x
:
0
,
y
:
0
},
deltaX
:
0
,
deltaY
:
0
,
lastDeltaX
:
0
,
lastDeltaY
:
0
,
angle
:
""
,
direction
:
""
,
distance
:
0
,
drag
:
!
1
,
swipe
:
!
1
,
gesture
:
b
},
f
(
b
,
g
)},
i
=
function
(
b
){
a
.
gestures
.
stoped
||
(
g
.
touchTime
=
Date
.
now
()
-
g
.
startTime
,
g
.
move
=
{
x
:
b
.
touches
[
0
].
pageX
,
y
:
b
.
touches
[
0
].
pageY
},
g
.
distance
=
c
(
g
.
start
,
g
.
move
),
g
.
angle
=
d
(
g
.
start
,
g
.
move
),
g
.
direction
=
e
(
g
.
angle
),
g
.
lastDeltaX
=
g
.
deltaX
,
g
.
lastDeltaY
=
g
.
deltaY
,
g
.
deltaX
=
g
.
move
.
x
-
g
.
start
.
x
,
g
.
deltaY
=
g
.
move
.
y
-
g
.
start
.
y
,
g
.
gesture
=
b
,
f
(
b
,
g
))},
j
=
function
(
b
){
a
.
gestures
.
stoped
||
(
g
.
touchTime
=
Date
.
now
()
-
g
.
startTime
,
g
.
gesture
=
b
,
f
(
b
,
g
))};
b
.
addEventListener
(
a
.
EVENT_START
,
h
),
b
.
addEventListener
(
a
.
EVENT_MOVE
,
i
),
b
.
addEventListener
(
a
.
EVENT_END
,
j
),
b
.
addEventListener
(
a
.
EVENT_CANCEL
,
j
),
a
.
fn
.
on
=
function
(
b
,
c
,
d
){
this
.
each
(
function
(){
var
e
=
this
;
e
.
addEventListener
(
b
,
function
(
b
){
var
f
=
a
.
qsa
(
c
,
e
),
g
=
b
.
target
;
if
(
f
&&
f
.
length
>
0
)
for
(;
g
&&
g
!==
document
&&
g
!==
e
;
g
=
g
.
parentNode
)
g
&&~
f
.
indexOf
(
g
)
&&
(
b
.
detail
?
b
.
detail
.
currentTarget
=
g
:
b
.
detail
=
{
currentTarget
:
g
},
d
.
call
(
g
,
b
))}),
e
.
removeEventListener
(
a
.
EVENT_CLICK
,
k
),
e
.
addEventListener
(
a
.
EVENT_CLICK
,
k
)})};
var
k
=
function
(
a
){
a
.
target
&&
"
INPUT
"
!==
a
.
target
.
tagName
&&
a
.
preventDefault
()}}(
mui
,
window
),
function
(
a
,
b
){
var
c
=
function
(
c
,
d
){
if
(
c
.
type
===
a
.
EVENT_END
||
c
.
type
===
a
.
EVENT_CANCEL
){
var
e
=
this
.
options
;
d
.
direction
&&
e
.
swipeMaxTime
>
d
.
touchTime
&&
d
.
distance
>
e
.
swipeMinDistince
&&
"
range
"
!==
c
.
target
.
type
&&
(
d
.
swipe
=!
0
,
a
.
trigger
(
c
.
target
,
b
+
d
.
direction
,
d
))}};
a
.
registerGesture
({
name
:
b
,
index
:
10
,
handle
:
c
,
options
:{
swipeMaxTime
:
300
,
swipeMinDistince
:
18
}})}(
mui
,
"
swipe
"
),
function
(
a
,
b
){
var
c
=
function
(
c
,
d
){
switch
(
c
.
type
){
case
a
.
EVENT_MOVE
:
d
.
direction
&&
(
d
.
drag
||
(
d
.
drag
=!
0
,
a
.
trigger
(
c
.
target
,
b
+
"
start
"
,
d
)),
a
.
trigger
(
c
.
target
,
b
,
d
),
a
.
trigger
(
c
.
target
,
b
+
d
.
direction
,
d
));
break
;
case
a
.
EVENT_END
:
case
a
.
EVENT_CANCEL
:
d
.
drag
&&
a
.
trigger
(
c
.
target
,
b
+
"
end
"
,
d
)}};
a
.
registerGesture
({
name
:
b
,
index
:
20
,
handle
:
c
,
options
:{}})}(
mui
,
"
drag
"
),
function
(
a
,
b
){
var
c
=
function
(
c
,
d
){
if
(
c
.
type
===
a
.
EVENT_END
||
c
.
type
===
a
.
EVENT_CANCEL
){
var
e
=
this
.
options
;
if
(
d
.
distance
<
e
.
tabMaxDistance
&&
d
.
touchTime
<
e
.
tapMaxTime
){
if
(
a
.
options
.
gestureConfig
.
doubletap
&&
d
.
lastTarget
&&
d
.
lastTarget
===
c
.
target
&&
d
.
lastTapTime
&&
d
.
startTime
-
d
.
lastTapTime
<
e
.
tabMaxInterval
)
return
a
.
trigger
(
c
.
target
,
"
doubletap
"
,
d
),
d
.
lastTapTime
=
Date
.
now
(),
void
(
d
.
lastTarget
=
c
.
target
);
a
.
trigger
(
c
.
target
,
b
,
d
),
d
.
lastTapTime
=
Date
.
now
(),
d
.
lastTarget
=
c
.
target
}}};
a
.
registerGesture
({
name
:
b
,
index
:
30
,
handle
:
c
,
options
:{
tabMaxInterval
:
300
,
tabMaxDistance
:
5
,
tapMaxTime
:
250
}})}(
mui
,
"
tap
"
),
function
(
a
,
b
){
var
c
,
d
=
function
(
d
,
e
){
var
f
=
this
.
options
;
switch
(
d
.
type
){
case
a
.
EVENT_START
:
clearTimeout
(
c
),
c
=
setTimeout
(
function
(){
e
.
drag
||
a
.
trigger
(
d
.
target
,
b
,
e
)},
f
.
holdTimeout
);
break
;
case
a
.
EVENT_MOVE
:
e
.
distance
>
f
.
holdThreshold
&&
clearTimeout
(
c
);
break
;
case
a
.
EVENT_END
:
case
a
.
EVENT_CANCEL
:
clearTimeout
(
c
)}};
a
.
registerGesture
({
name
:
b
,
index
:
10
,
handle
:
d
,
options
:{
holdTimeout
:
500
,
holdThreshold
:
2
}})}(
mui
,
"
longtap
"
),
function
(
a
){
function
b
(
b
){
this
.
os
=
{};
var
c
=
[
function
(){
var
a
=
b
.
match
(
/
(
Android
)
;
?[\s\/]
+
([\d
.
]
+
)?
/
);
return
a
&&
(
this
.
os
.
android
=!
0
,
this
.
os
.
version
=
a
[
2
]),
this
.
os
.
android
===!
0
},
function
(){
var
a
=
b
.
match
(
/
(
iPhone
\s
OS
)\s([\d
_
]
+
)
/
);
if
(
a
)
this
.
os
.
ios
=
this
.
os
.
iphone
=!
0
,
this
.
os
.
version
=
a
[
2
].
replace
(
/_/g
,
"
.
"
);
else
{
var
c
=
b
.
match
(
/
(
iPad
)
.*OS
\s([\d
_
]
+
)
/
);
c
&&
(
this
.
os
.
ios
=
this
.
os
.
ipad
=!
0
,
this
.
os
.
version
=
c
[
2
].
replace
(
/_/g
,
"
.
"
))}
return
this
.
os
.
ios
===!
0
}];[].
every
.
call
(
c
,
function
(
b
){
return
!
b
.
call
(
a
)})}
b
.
call
(
a
,
navigator
.
userAgent
)}(
mui
),
function
(
a
){
function
b
(
a
){
this
.
os
=
this
.
os
||
{};
var
b
=
a
.
match
(
/Html5Plus/i
);
b
&&
(
this
.
os
.
plus
=!
0
)}
b
.
call
(
a
,
navigator
.
userAgent
)}(
mui
),
function
(
a
){
var
b
=
[];
a
.
global
=
a
.
options
=
{
gestureConfig
:{
tap
:
!
0
,
doubletap
:
!
0
,
longtap
:
!
0
,
swipe
:
!
0
,
drag
:
!
0
}},
a
.
initGlobal
=
function
(
b
){
return
a
.
options
=
a
.
extend
(
a
.
global
,
b
,
!
0
),
this
},
a
.
init
=
function
(
c
){
return
a
.
options
=
a
.
extend
(
a
.
global
,
c
||
{},
!
0
),
a
.
ready
(
function
(){
for
(
var
c
=
0
,
d
=
b
.
length
;
d
>
c
;
c
++
)
b
[
c
].
call
(
a
)}),
this
},
a
.
init
.
add
=
function
(
a
){
b
.
push
(
a
)}}(
mui
),
function
(
a
){
var
b
=
{
optimize
:
!
0
,
swipeBack
:
!
1
,
preloadPages
:[],
preloadLimit
:
10
},
c
=
{
duration
:
a
.
os
.
ios
?
200
:
100
,
aniShow
:
"
slide-in-right
"
};
a
.
options
.
show
&&
(
c
=
a
.
extend
(
c
,
a
.
options
.
show
,
!
0
)),
a
.
currentWebview
=
null
,
a
.
isHomePage
=!
1
,
a
.
extend
(
a
.
global
,
b
),
a
.
extend
(
a
.
options
,
b
),
a
.
waitingOptions
=
function
(
b
){
return
a
.
extend
({},
b
)},
a
.
showOptions
=
function
(
b
){
return
a
.
extend
(
c
,
b
)},
a
.
windowOptions
=
function
(
b
){
return
a
.
extend
({
scalable
:
!
1
,
bounce
:
""
},
b
)},
a
.
plusReady
=
function
(
a
){
return
window
.
plus
?
a
():
document
.
addEventListener
(
"
plusready
"
,
function
(){
a
()},
!
1
),
this
},
a
.
fire
=
function
(
a
,
b
,
c
){
a
&&
a
.
evalJS
(
"
mui&&mui.receive('
"
+
b
+
"
','
"
+
JSON
.
stringify
(
c
||
{})
+
"
')
"
)},
a
.
receive
=
function
(
b
,
c
){
b
&&
(
c
=
JSON
.
parse
(
c
),
a
.
trigger
(
document
,
b
,
c
))};
var
d
=
function
(
b
){
if
(
!
b
.
preloaded
){
a
.
fire
(
b
,
"
preload
"
);
for
(
var
c
=
b
.
children
(),
d
=
0
;
d
<
c
.
length
;
d
++
)
a
.
fire
(
c
[
d
],
"
preload
"
);
b
.
preloaded
=!
0
}},
e
=
function
(
b
,
c
,
d
){
if
(
d
){
if
(
!
b
[
c
+
"
ed
"
]){
a
.
fire
(
b
,
c
);
for
(
var
e
=
b
.
children
(),
f
=
0
;
f
<
e
.
length
;
f
++
)
a
.
fire
(
e
[
f
],
c
);
b
[
c
+
"
ed
"
]
=!
0
}}
else
{
a
.
fire
(
b
,
c
);
for
(
var
e
=
b
.
children
(),
f
=
0
;
f
<
e
.
length
;
f
++
)
a
.
fire
(
e
[
f
],
c
)}};
a
.
openWindow
=
function
(
b
,
c
,
f
){
if
(
window
.
plus
){
"
object
"
==
typeof
b
?(
f
=
b
,
b
=
f
.
url
,
c
=
f
.
id
||
b
):
"
object
"
==
typeof
c
?(
f
=
c
,
c
=
b
):
c
=
c
||
b
,
f
=
f
||
{};
var
g
,
h
,
i
=
f
.
params
||
{};
if
(
a
.
webviews
[
c
]){
var
j
=
a
.
webviews
[
c
];
if
(
j
.
preload
)
return
g
=
j
.
webview
,
g
&&
g
.
getURL
()
||
(
f
=
a
.
extend
(
f
,{
id
:
c
,
url
:
b
,
showAfterLoad
:
f
.
showAfterLoad
===!
1
?
!
1
:
!
0
,
preload
:
!
0
}),
g
=
a
.
createWindow
(
f
)),
h
=
j
.
show
,
h
=
f
.
show
?
a
.
extend
(
h
,
f
.
show
):
h
,
g
.
show
(
h
.
aniShow
,
h
.
duration
,
function
(){
d
(
g
),
e
(
g
,
"
pagebeforeshow
"
,
!
1
)}),
j
.
afterShowMethodName
&&
g
.
evalJS
(
j
.
afterShowMethodName
+
"
('
"
+
JSON
.
stringify
(
i
)
+
"
')
"
),
this
;
f
=
a
.
extend
(
j
,
a
.
extend
(
f
,{
id
:
c
,
url
:
b
,
showAfterLoad
:
f
.
showAfterLoad
===!
1
?
!
1
:
!
0
})),
g
=
a
.
createWindow
(
f
)}
else
f
=
a
.
extend
(
f
,{
id
:
c
,
url
:
b
,
showAfterLoad
:
f
.
showAfterLoad
===!
1
?
!
1
:
!
0
}),
g
=
a
.
createWindow
(
f
);
if
(
f
.
showAfterLoad
){
var
k
=
a
.
waitingOptions
(
f
.
waiting
),
l
=
plus
.
nativeUI
.
showWaiting
(
k
.
title
||
""
,
k
.
options
);
h
=
a
.
showOptions
(
f
.
show
),
g
.
addEventListener
(
"
loaded
"
,
function
(){
l
.
close
(),
g
.
show
(
h
.
aniShow
,
h
.
duration
,
function
(){
d
(
g
),
e
(
g
,
"
pagebeforeshow
"
,
!
1
)}),
g
.
showed
=!
0
,
f
.
afterShowMethodName
&&
g
.
evalJS
(
f
.
afterShowMethodName
+
"
('
"
+
JSON
.
stringify
(
i
)
+
"
')
"
)},
!
1
)}
return
g
}},
a
.
createWindow
=
function
(
b
,
c
){
if
(
window
.
plus
){
var
d
,
e
=
b
.
id
||
b
.
url
;
if
(
b
.
preload
){
a
.
webviews
[
e
]
&&
a
.
webviews
[
e
].
webview
.
getURL
()?
d
=
a
.
webviews
[
e
].
webview
:(
d
=
plus
.
webview
.
create
(
b
.
url
,
e
,
a
.
windowOptions
(
b
.
styles
),{
preload
:
!
0
}),
b
.
subpages
&&
a
.
each
(
b
.
subpages
,
function
(
b
,
c
){
var
e
=
plus
.
webview
.
create
(
c
.
url
,
c
.
id
||
c
.
url
,
a
.
windowOptions
(
c
.
styles
),{
preload
:
!
0
});
d
.
append
(
e
)})),
a
.
webviews
[
e
]
=
{
webview
:
d
,
preload
:
!
0
,
show
:
a
.
showOptions
(
b
.
show
),
afterShowMethodName
:
b
.
afterShowMethodName
};
var
f
=
a
.
data
.
preloads
,
g
=
f
.
indexOf
(
e
);
if
(
~
g
&&
f
.
splice
(
g
,
1
),
f
.
push
(
e
),
f
.
length
>
a
.
options
.
preloadLimit
){
var
h
=
a
.
data
.
preloads
.
shift
(),
i
=
a
.
webviews
[
h
];
i
&&
i
.
webview
&&
a
.
closeAll
(
i
.
webview
),
delete
a
.
webviews
[
h
]}}
else
c
!==!
1
&&
(
d
=
plus
.
webview
.
create
(
b
.
url
,
e
,
a
.
windowOptions
(
b
.
styles
)),
b
.
subpages
&&
a
.
each
(
b
.
subpages
,
function
(
b
,
c
){
var
e
=
plus
.
webview
.
create
(
c
.
url
,
c
.
id
||
c
.
url
,
a
.
windowOptions
(
c
.
styles
));
d
.
append
(
e
)}));
return
d
}},
a
.
closeOpened
=
function
(
b
){
var
c
=
b
.
opened
();
if
(
c
)
for
(
var
d
=
0
,
e
=
c
.
length
;
e
>
d
;
d
++
){
var
f
=
c
[
d
],
g
=
f
.
opened
();
g
&&
g
.
length
>
0
?
a
.
closeOpened
(
f
):
f
.
parent
()
!==
b
&&
f
.
close
(
"
none
"
)}},
a
.
closeAll
=
function
(
b
,
c
){
a
.
closeOpened
(
b
),
c
?
b
.
close
(
c
):
b
.
close
()},
a
.
createWindows
=
function
(
b
){
a
.
each
(
b
,
function
(
b
,
c
){
a
.
createWindow
(
c
,
!
1
)})},
a
.
appendWebview
=
function
(
b
){
if
(
window
.
plus
){
var
c
,
d
=
b
.
id
||
b
.
url
;
return
a
.
webviews
[
d
]
||
(
c
=
plus
.
webview
.
create
(
b
.
url
,
d
,
b
.
styles
),
c
.
addEventListener
(
"
loaded
"
,
function
(){
a
.
currentWebview
.
append
(
c
)}),
a
.
webviews
[
d
]
=
b
),
c
}},
a
.
webviews
=
{},
a
.
data
.
preloads
=
[],
a
.
init
.
add
(
function
(){
var
b
=
a
.
options
,
c
=
b
.
subpages
||
[];
a
.
plusReady
(
function
(){
a
.
currentWebview
=
plus
.
webview
.
currentWebview
(),
a
.
each
(
c
,
function
(
b
,
c
){
a
.
appendWebview
(
c
)}),
a
.
currentWebview
==
plus
.
webview
.
getWebviewById
(
plus
.
runtime
.
appid
)
&&
(
a
.
isHomePage
=!
0
,
setTimeout
(
function
(){
d
(
a
.
currentWebview
)},
300
))})}),
window
.
addEventListener
(
"
preload
"
,
function
(){
var
b
=
a
.
options
.
preloadPages
||
[];
a
.
plusReady
(
function
(){
a
.
each
(
b
,
function
(
b
,
c
){
a
.
createWindow
(
a
.
extend
(
c
,{
preload
:
!
0
}))})})})}(
mui
),
function
(
a
){
a
.
init
.
add
(
function
(){
var
b
=
a
.
options
;
b
.
titleBar
&&
a
.
titleBar
(
b
.
titleBar
),
a
.
os
.
ios
&&
a
.
plusReady
(
function
(){
var
b
=
a
.
options
.
statusBarBackground
?
a
.
options
.
statusBarBackground
:
"
#f7f7f7
"
;
plus
.
navigator
.
setStatusBarBackground
(
b
)})})}(
mui
),
function
(
a
){
a
.
init
.
add
(
function
(){
var
b
=
a
.
options
,
c
=
b
.
pullRefresh
||
{};
if
(
a
.
os
.
plus
&&
a
.
os
.
android
)
c
.
down
&&
a
.
plus_pulldownRefresh
(
c
.
down
);
else
{
var
d
=
c
.
container
;
if
(
d
){
var
e
=
a
(
d
);
1
===
e
.
length
&&
e
.
pullRefresh
(
c
)}}})}(
mui
),
function
(
a
,
b
,
c
){
a
.
titleBar
=
function
(
b
){
return
b
=
a
.
extend
({
template
:
"
top.html
"
,
height
:
"
48px
"
},
b
),
a
.
options
.
optimize
&&
a
.
os
.
plus
?
a
.
plusReady
(
function
(){
var
c
=
plus
.
webview
.
create
(
b
.
template
,
null
,{
scalable
:
!
1
,
position
:
"
dock
"
,
dock
:
"
top
"
,
height
:
b
.
height
});
c
.
addEventListener
(
"
loaded
"
,
function
(){
c
.
evalJS
(
'
document.querySelector(".mui-title").innerHTML="
'
+
b
.
title
+
'
"
'
)});
var
d
=
b
.
pulldownRefresh
||
{},
e
=
d
.
container
;
e
?
c
.
append
(
a
.
currentWebview
):
a
.
currentWebview
.
append
(
c
)}):
a
.
get
(
b
.
template
,
function
(
a
){
var
d
=
a
.
match
(
/<body
[^
>
]
*>
([\s\S
.
]
*
)
<
\/
body>/i
)[
0
],
e
=
c
.
createElement
(
"
div
"
);
for
(
e
.
innerHTML
=
d
;
e
.
firstChild
;)
c
.
body
.
insertBefore
(
e
.
firstChild
,
c
.
body
.
firstChild
);
if
(
b
.
title
){
var
f
=
c
.
body
.
querySelector
(
"
.mui-bar .mui-title
"
);
f
&&
(
f
.
innerHTML
=
b
.
title
)}}),
this
}}(
mui
,
window
,
document
),
function
(
a
){
a
.
get
=
function
(
a
,
c
,
d
){
b
(
"
GET
"
,
a
,
c
,
d
)},
a
.
post
=
function
(
a
,
c
,
d
){
b
(
"
POST
"
,
a
,
c
,
d
)};
var
b
=
function
(
a
,
b
,
c
,
d
){
var
e
=
new
XMLHttpRequest
,
f
=
/^
([\w
-
]
+:
)\/\/
/
.
test
(
b
)?
RegExp
.
$1
:
window
.
location
.
protocol
;
e
.
onreadystatechange
=
function
(){
4
===
e
.
readyState
&&
(
e
.
status
>=
200
&&
e
.
status
<
300
||
304
===
e
.
status
||
0
===
e
.
status
&&
"
file:
"
===
f
?
c
&&
c
(
e
.
responseText
):
d
&&
d
())},
e
.
open
(
a
,
b
,
!
0
),
e
.
send
()}}(
mui
),
function
(
a
,
b
,
c
){
a
.
offset
=
function
(
a
){
var
d
=
{
top
:
0
,
left
:
0
};
return
typeof
a
.
getBoundingClientRect
!==
c
&&
(
d
=
a
.
getBoundingClientRect
()),{
top
:
d
.
top
+
b
.
pageYOffset
-
a
.
clientTop
,
left
:
d
.
left
+
b
.
pageXOffset
-
a
.
clientLeft
}}}(
mui
,
window
),
function
(
a
,
b
){
a
.
scrollTo
=
function
(
a
,
c
,
d
){
c
=
c
||
1
e3
;
var
e
=
function
(
c
){
if
(
0
>=
c
)
return
void
(
d
&&
d
());
var
f
=
a
-
b
.
scrollY
;
setTimeout
(
function
(){
b
.
scrollTo
(
0
,
b
.
scrollY
+
f
/
c
*
10
),
e
(
c
-
10
)},
16.7
)};
e
(
c
)}}(
mui
,
window
),
function
(
a
,
b
,
c
){
var
d
=
"
mui-pull-top-pocket
"
,
e
=
"
mui-pull-bottom-pocket
"
,
f
=
"
mui-pull
"
,
g
=
"
mui-pull-loading
"
,
h
=
"
mui-pull-caption
"
,
i
=
h
+
"
-down
"
,
j
=
h
+
"
-over
"
,
k
=
h
+
"
-refresh
"
,
l
=
"
mui-icon
"
,
m
=
"
mui-icon-spinner
"
,
n
=
"
mui-icon-pulldown
"
,
o
=
"
mui-spin
"
,
p
=
"
mui-in
"
,
q
=
"
mui-reverse
"
,
r
=
g
+
"
"
+
l
+
"
"
+
n
+
"
"
+
q
,
s
=
g
+
"
"
+
l
+
"
"
+
n
,
t
=
g
+
"
"
+
l
+
"
"
+
m
+
"
"
+
o
,
u
=
{
down
:{
height
:
50
,
contentdown
:
"
下拉可以刷新
"
,
contentover
:
"
释放立即刷新
"
,
contentrefresh
:
"
正在刷新...
"
},
up
:{
height
:
50
,
contentdown
:
"
上拉显示更多
"
,
contentover
:
"
释放立即刷新
"
,
contentrefresh
:
"
正在刷新...
"
,
duration
:
300
}},
v
=
[
'
<div class="
'
+
f
+
'
">
'
,
'
<div class="
'
+
s
+
'
"></div>
'
,
'
<div class="
'
+
h
+
'
">
'
,
'
<span class="
'
+
i
+
"
"
+
p
+
'
">{downCaption}</span>
'
,
'
<span class="
'
+
j
+
'
">{overCaption}</span>
'
,
'
<span class="
'
+
k
+
'
">{refreshCaption}</span>
'
,
"
</div>
"
,
"
</div>
"
],
w
=
function
(
b
,
c
){
this
.
element
=
b
,
this
.
options
=
a
.
extend
(
u
,
c
,
!
0
),
this
.
options
.
up
.
height
=-
this
.
options
.
up
.
height
,
this
.
pullOptions
=
null
,
this
.
init
()};
w
.
prototype
.
init
=
function
(){
this
.
element
.
style
.
webkitTransform
=
"
translate3d(0,0,0)
"
,
this
.
element
.
style
.
position
=
"
relative
"
,
this
.
element
.
style
[
"
-webkit-backface-visibility
"
]
=
"
hidden
"
,
this
.
translateY
=
0
,
this
.
lastTranslateY
=
0
,
this
.
initPocket
(),
this
.
initEvent
()},
w
.
prototype
.
initPocket
=
function
(){
var
a
=
this
.
options
;
a
.
down
&&
a
.
down
.
hasOwnProperty
(
"
callback
"
)
&&
(
this
.
topPocket
=
this
.
element
.
querySelector
(
"
.
"
+
d
),
this
.
topPocket
||
(
this
.
topPocket
=
this
.
createPocket
(
d
,
a
.
down
),
this
.
element
.
insertBefore
(
this
.
topPocket
,
this
.
element
.
firstChild
))),
a
.
up
&&
a
.
up
.
hasOwnProperty
(
"
callback
"
)
&&
(
this
.
bottomPocket
=
this
.
element
.
querySelector
(
"
.
"
+
e
),
this
.
bottomPocket
||
(
this
.
bottomPocket
=
this
.
createPocket
(
e
,
a
.
up
),
this
.
element
.
appendChild
(
this
.
bottomPocket
)))},
w
.
prototype
.
createPocket
=
function
(
a
,
b
){
var
d
=
c
.
createElement
(
"
div
"
);
return
d
.
className
=
a
,
d
.
innerHTML
=
v
.
join
(
""
).
replace
(
"
{downCaption}
"
,
b
.
contentdown
).
replace
(
"
{overCaption}
"
,
b
.
contentover
).
replace
(
"
{refreshCaption}
"
,
b
.
contentrefresh
),
d
},
w
.
prototype
.
initEvent
=
function
(){
var
a
=
this
;
a
.
bottomPocket
&&
a
.
element
.
addEventListener
(
"
dragup
"
,
function
(
b
){
a
.
dragUp
(
b
)}),
a
.
topPocket
&&
a
.
element
.
addEventListener
(
"
dragdown
"
,
function
(
b
){
a
.
dragDown
(
b
)}),(
a
.
bottomPocket
||
a
.
topPocket
)
&&
(
a
.
element
.
addEventListener
(
"
dragstart
"
,
function
(
b
){
a
.
dragStart
(
b
)}),
a
.
element
.
addEventListener
(
"
drag
"
,
function
(
b
){
var
c
=
b
.
detail
.
direction
;
a
.
dragDirection
&&
"
up
"
!==
c
&&
"
down
"
!==
c
&&
a
.
pullOptions
&&
(
a
.
pullOptions
.
height
>
0
?
a
.
dragDown
(
b
):
a
.
dragUp
(
b
))}),
a
.
element
.
addEventListener
(
"
dragend
"
,
function
(
b
){
a
.
dragEnd
(
b
)}))},
w
.
prototype
.
dragStart
=
function
(
a
){
var
b
=
a
.
detail
;(
"
up
"
===
b
.
direction
||
"
down
"
===
b
.
direction
)
&&
(
this
.
element
.
style
.
webkitTransitionDuration
=
"
0s
"
,
this
.
isLoading
=
this
.
dragDirection
=!
1
)},
w
.
prototype
.
dragUp
=
function
(
a
){
var
d
=
this
;
if
(
!
d
.
isLoading
&&
"
down
"
!==
d
.
dragDirection
){
var
e
=
c
.
body
.
scrollHeight
;
!
d
.
dragDirection
&&
b
.
innerHeight
+
b
.
scrollY
+
40
<
e
||
(
b
.
scrollTo
(
0
,
e
),
d
.
pullOptions
=
d
.
options
.
up
,
d
.
loading
=
d
.
bottomPocket
.
querySelector
(
"
.
"
+
g
),
d
.
drag
(
a
))}},
w
.
prototype
.
dragDown
=
function
(
a
){
var
c
=
this
;
if
(
!
c
.
isLoading
&&
"
up
"
!==
c
.
dragDirection
){
var
d
=
b
.
scrollY
;
!
c
.
dragDirection
&&
d
>
5
||
(
0
!==
d
&&
b
.
scrollTo
(
0
,
0
),
c
.
pullOptions
=
c
.
options
.
down
,
c
.
loading
=
c
.
topPocket
.
querySelector
(
"
.
"
+
g
),
c
.
drag
(
a
))}},
w
.
prototype
.
drag
=
function
(
a
){
this
.
pullOptions
&&
(
this
.
pullOptions
.
height
>
0
&&
a
.
detail
.
deltaY
<
0
||
(
this
.
dragDirection
=
this
.
pullOptions
.
height
>
0
?
"
down
"
:
"
up
"
,
this
.
requestAnimationFrame
||
this
.
updateTranslate
(),
a
.
detail
.
gesture
.
preventDefault
(),
this
.
translateY
=
.
4
*
a
.
detail
.
deltaY
))},
w
.
prototype
.
dragEnd
=
function
(
b
){
var
c
=
this
;
c
.
pullOptions
&&
(
cancelAnimationFrame
(
c
.
requestAnimationFrame
),
Math
.
abs
(.
4
*
b
.
detail
.
deltaY
)
>=
Math
.
abs
(
c
.
pullOptions
.
height
)?
c
.
load
():
this
.
hide
(),
a
.
gestures
.
stoped
=!
0
)},
w
.
prototype
.
hide
=
function
(){
this
.
translateY
=
0
,
this
.
requestAnimationFrame
&&
(
cancelAnimationFrame
(
this
.
requestAnimationFrame
),
this
.
requestAnimationFrame
=
null
),
this
.
element
.
style
.
webkitTransitionDuration
=
"
0.5s
"
,
this
.
setTranslate
(
0
),
this
.
setCaption
(
i
),
this
.
pullOptions
.
height
>
0
&&
this
.
loading
.
classList
.
remove
(
q
),
this
.
pullOptions
=
null
},
w
.
prototype
.
updateTranslate
=
function
(){
var
a
=
this
;
a
.
translateY
!==
a
.
lastTranslateY
&&
(
a
.
translateY
=
Math
.
abs
(
a
.
translateY
)
<
2
?
0
:
a
.
translateY
,
a
.
setTranslate
(
a
.
translateY
),
Math
.
abs
(
a
.
translateY
)
>=
Math
.
abs
(
a
.
pullOptions
.
height
)?
a
.
showLoading
(
j
):
a
.
hideLoading
(
i
),
a
.
lastTranslateY
=
a
.
translateY
),
a
.
requestAnimationFrame
=
requestAnimationFrame
(
function
(){
a
.
updateTranslate
()})},
w
.
prototype
.
setTranslate
=
function
(
a
){
this
.
element
.
style
.
webkitTransform
=
"
translate3d(0,
"
+
a
+
"
px,0)
"
,
this
.
bottomPocket
&&
(
0
>
a
?
this
.
bottomPocket
.
style
.
bottom
=
(
a
>
this
.
pullOptions
.
height
?
a
:
this
.
pullOptions
.
height
)
+
"
px
"
:
0
===
a
&&
this
.
bottomPocket
.
setAttribute
(
"
style
"
,
""
))},
w
.
prototype
.
load
=
function
(){
var
d
=
this
;
d
.
isLoading
=!
0
,
d
.
showLoading
(
k
),
d
.
setTranslate
(
d
.
pullOptions
.
height
);
var
e
=
d
.
pullOptions
.
callback
;
e
&&
e
(
function
(){
if
(
d
.
pullOptions
&&
d
.
pullOptions
.
height
<
0
){
var
e
=
Math
.
min
(
1
e3
,
d
.
pullOptions
.
duration
);
setTimeout
(
function
(){
a
.
scrollTo
(
c
.
body
.
scrollHeight
-
b
.
innerHeight
,
e
,
function
(){
d
.
isLoading
=!
1
})},
100
)}
else
d
.
isLoading
=!
1
;
d
.
hide
()})},
w
.
prototype
.
showLoading
=
function
(
a
){
this
.
setCaption
(
a
)},
w
.
prototype
.
hideLoading
=
function
(
a
){
this
.
setCaption
(
a
)},
w
.
prototype
.
setCaption
=
function
(
a
){
var
b
=
this
.
pullOptions
&&
this
.
pullOptions
.
height
>
0
?
this
.
topPocket
:
this
.
bottomPocket
;
if
(
b
){
var
c
=
b
.
querySelector
(
"
.
"
+
h
),
d
=
c
.
querySelector
(
"
.
"
+
p
);
d
&&
d
.
classList
.
remove
(
p
);
var
e
=
c
.
querySelector
(
"
.
"
+
a
);
e
&&
e
.
classList
.
add
(
p
),
this
.
loading
.
className
=
this
.
pullOptions
&&
this
.
pullOptions
.
height
>
0
?
a
===
k
?
t
:
a
===
j
?
r
:
s
:
t
}},
a
.
fn
.
pullRefresh
=
function
(
b
){
this
.
each
(
function
(){
var
c
=
this
.
getAttribute
(
"
data-pullrefresh
"
);
if
(
!
c
){
var
d
=++
a
.
uuid
;
a
.
data
[
d
]
=
new
w
(
this
,
b
),
this
.
setAttribute
(
"
data-pullrefresh
"
,
d
)}})}}(
mui
,
window
,
document
),
function
(
a
){
var
b
=
{
height
:
50
,
contentdown
:
"
下拉可以刷新
"
,
contentover
:
"
释放立即刷新
"
,
contentrefresh
:
"
正在刷新...
"
};
a
.
plus_pulldownRefresh
=
function
(
c
){
c
=
a
.
extend
(
b
,
c
,
!
0
),
a
.
plusReady
(
function
(){
var
b
=
document
.
body
,
d
=
b
.
getAttribute
(
"
data-pullrefresh-plus
"
);
if
(
!
d
){
d
=++
a
.
uuid
,
b
.
setAttribute
(
"
data-pullrefresh-plus
"
,
d
);
var
e
=
a
.
currentWebview
;
e
.
setPullToRefresh
({
support
:
!
0
,
height
:
c
.
height
+
"
px
"
,
range
:
"
200px
"
,
contentdown
:{
caption
:
c
.
contentdown
},
contentover
:{
caption
:
c
.
contentover
},
contentrefresh
:{
caption
:
c
.
contentrefresh
}},
function
(){
c
.
callback
&&
c
.
callback
(
function
(){
e
.
endPullToRefresh
()})})}})}}(
mui
),
function
(
a
,
b
,
c
,
d
){
var
e
=
"
mui-off-canvas-left
"
,
f
=
"
mui-off-canvas-right
"
,
g
=
"
mui-off-canvas-backdrop
"
,
h
=
"
mui-off-canvas-wrap
"
,
i
=
"
mui-off-canvas-height-fixed
"
,
j
=
"
mui-left
"
,
k
=
"
mui-right
"
,
l
=
"
mui-sliding
"
,
m
=
"
.mui-inner-wrap
"
,
n
=
function
(
a
){
if
(
parentNode
=
a
.
parentNode
){
if
(
parentNode
.
classList
.
contains
(
h
))
return
parentNode
;
if
(
parentNode
=
parentNode
.
parentNode
,
parentNode
.
classList
.
contains
(
h
))
return
parentNode
}},
o
=
function
(
b
,
d
){
if
(
d
.
classList
&&
d
.
classList
.
contains
(
g
)){
var
e
=
n
(
d
);
if
(
e
)
return
a
.
targets
.
_container
=
e
,
d
}
else
if
(
"
A
"
===
d
.
tagName
&&
d
.
hash
){
var
f
=
c
.
getElementById
(
d
.
hash
.
replace
(
"
#
"
,
""
));
if
(
f
){
var
e
=
n
(
f
);
if
(
e
)
return
a
.
targets
.
_container
=
e
,
f
}}
return
!
1
};
a
.
registerTarget
({
name
:
d
,
index
:
60
,
handle
:
o
,
target
:
!
1
,
isReset
:
!
1
,
isContinue
:
!
0
});
var
p
=
function
(
a
,
b
){
var
d
=
a
.
querySelector
(
"
.mui-content
"
),
e
=
c
.
getElementsByTagName
(
"
html
"
)[
0
],
f
=
c
.
body
;
b
?(
e
.
classList
.
add
(
i
),
f
.
classList
.
add
(
i
),
d
&&
d
.
classList
.
add
(
i
)):(
e
.
classList
.
remove
(
i
),
f
.
classList
.
remove
(
i
),
d
&&
d
.
classList
.
remove
(
i
))},
q
=
function
(){
var
a
=
this
.
parentNode
;
a
.
classList
.
remove
(
l
),
this
.
removeEventListener
(
"
webkitTransitionEnd
"
,
q
),
a
.
classList
.
contains
(
k
)
||
a
.
classList
.
contains
(
j
)
||
p
(
a
,
!
1
)},
r
=
function
(
a
,
b
){
if
(
a
&&
b
){
var
c
=
b
.
classList
;
a
.
querySelector
(
m
).
addEventListener
(
"
webkitTransitionEnd
"
,
q
),
a
.
classList
.
contains
(
k
)
||
a
.
classList
.
contains
(
j
)
||
p
(
a
,
!
0
),
c
.
contains
(
e
)?
a
.
classList
.
toggle
(
k
):
c
.
contains
(
f
)?
a
.
classList
.
toggle
(
j
):
c
.
contains
(
g
)
&&
(
a
.
classList
.
remove
(
k
),
a
.
classList
.
remove
(
j
)),
a
.
classList
.
add
(
l
)}};
b
.
addEventListener
(
"
tap
"
,
function
(){
a
.
targets
.
offcanvas
&&
r
(
a
.
targets
.
_container
,
a
.
targets
.
offcanvas
)}),
a
.
fn
.
offCanvas
=
function
(){
var
a
=
arguments
;
this
.
each
(
function
(){
if
(
"
show
"
===
a
[
0
]
||
"
hide
"
===
a
[
0
]
||
"
toggle
"
===
a
[
0
]){
var
b
=
this
.
classList
;
if
(
b
.
contains
(
e
)
||
b
.
contains
(
f
)){
var
c
=
n
(
this
);
c
&&
r
(
c
,
this
)}}})}}(
mui
,
window
,
document
,
"
offcanvas
"
),
function
(
a
,
b
,
c
){
if
(
!
a
.
os
.
android
){
var
d
,
e
,
f
,
g
,
h
=
"
mui-slider
"
,
i
=
"
mui-switch
"
,
j
=
"
mui-table-view-cell
"
,
k
=
"
mui-slider-handle
"
,
l
=
"
mui-off-canvas-left
"
,
m
=
"
mui-off-canvas-right
"
,
n
=
"
mui-off-canvas-wrap
"
,
o
=
"
mui-off-canvas-height-fixed
"
,
p
=
"
mui-left
"
,
q
=
"
mui-right
"
,
r
=
"
mui-sliding
"
,
s
=
"
mui-draggable
"
,
t
=
"
.mui-inner-wrap
"
,
u
=
"
.
"
+
l
,
v
=
"
.
"
+
m
,
w
=!
1
,
x
=
1
,
y
=
0
,
z
=
0
,
A
=
0
,
B
=
0
,
C
=
function
(){
y
!==
z
&&
(
e
.
style
[
"
-webkit-transition-duration
"
]
=
"
0s
"
,
"
right
"
===
g
&&
y
>
0
?(
y
=
Math
.
min
(
y
,
B
),
0
>
A
?
D
(
e
,
A
+
y
):
D
(
e
,
y
)):
"
left
"
===
g
&&
0
>
y
&&
(
y
=
Math
.
max
(
y
,
-
B
),
A
>
0
?
D
(
e
,
A
+
y
):
D
(
e
,
y
)),
z
=
y
),
f
=
requestAnimationFrame
(
function
(){
C
()})},
D
=
function
(
a
,
b
){
a
&&
(
a
.
style
.
webkitTransform
=
"
translate3d(
"
+
b
+
"
px,0,0)
"
)},
E
=
function
(
a
,
b
){
var
d
=
a
.
querySelector
(
"
.mui-content
"
),
e
=
c
.
getElementsByTagName
(
"
html
"
)[
0
],
f
=
c
.
body
;
b
?(
e
.
classList
.
add
(
o
),
f
.
classList
.
add
(
o
),
d
&&
d
.
classList
.
add
(
o
)):(
e
.
classList
.
remove
(
o
),
f
.
classList
.
remove
(
o
),
d
&&
d
.
classList
.
remove
(
o
))},
F
=
function
(){
var
a
=
this
.
parentNode
,
b
=
a
.
classList
;
b
.
remove
(
r
),
this
.
removeEventListener
(
"
webkitTransitionEnd
"
,
F
),
b
.
contains
(
q
)
||
b
.
contains
(
p
)
||
E
(
a
,
!
1
)};
b
.
addEventListener
(
"
touchstart
"
,
function
(
a
){
var
b
=
a
.
target
;
for
(
w
=!
1
,
d
=
e
=
null
;
b
&&
b
!==
c
;
b
=
b
.
parentNode
){
var
f
=
b
.
classList
;
if
(
f
){
if
(
f
.
contains
(
i
))
break
;
if
(
f
.
contains
(
j
)
&&
b
.
querySelector
(
"
.
"
+
k
))
break
;
if
(
f
.
contains
(
h
))
break
;
if
(
f
.
contains
(
n
)
&&
f
.
contains
(
s
)){
if
(
d
=
b
,
e
=
d
.
querySelector
(
t
),
!
e
)
return
;
break
}}}}),
b
.
addEventListener
(
"
dragstart
"
,
function
(
b
){
if
(
d
){
var
c
=
b
.
detail
;
if
(
"
left
"
===
c
.
direction
?
d
.
classList
.
contains
(
q
)?
w
=!
0
:
d
.
querySelector
(
v
)
&&!
d
.
classList
.
contains
(
p
)
&&
(
w
=!
0
):
"
right
"
===
c
.
direction
&&
(
d
.
classList
.
contains
(
p
)?
w
=!
0
:
d
.
querySelector
(
u
)
&&!
d
.
classList
.
contains
(
q
)
&&
(
w
=!
0
)),
w
){
g
=
c
.
direction
,
B
=
.
8
*
d
.
offsetWidth
;
var
f
=
a
.
getStyles
(
e
,
"
webkitTransform
"
),
h
=
a
.
parseTranslateMatrix
(
f
);
A
=
y
=
h
?
h
.
x
:
0
;
var
i
=
d
.
classList
;
i
.
add
(
r
),
i
.
contains
(
q
)
||
i
.
contains
(
p
)
||
E
(
d
,
!
0
),
c
.
gesture
.
preventDefault
()}}}),
b
.
addEventListener
(
"
drag
"
,
function
(
a
){
if
(
w
){
var
b
=
a
.
detail
;
f
||
C
(),
y
=
b
.
deltaX
*
x
}}),
b
.
addEventListener
(
"
dragend
"
,
function
(){
if
(
w
){
f
&&
(
cancelAnimationFrame
(
f
),
f
=
null
),
e
.
setAttribute
(
"
style
"
,
""
),
e
.
addEventListener
(
"
webkitTransitionEnd
"
,
F
);
var
a
,
b
=
d
.
classList
,
c
=
[
"
add
"
,
"
remove
"
];
"
right
"
===
g
&&
y
>
0
?(
a
=
q
,
0
>
A
&&
(
c
.
reverse
(),
a
=
p
),
y
>
B
/
2
?
b
[
c
[
0
]](
a
):
b
[
c
[
1
]](
a
)):
"
left
"
===
g
&&
0
>
y
&&
(
a
=
p
,
A
>
0
&&
(
c
.
reverse
(),
a
=
q
),
-
y
>
B
/
2
?
b
[
c
[
0
]](
a
):
b
[
c
[
1
]](
a
))}})}}(
mui
,
window
,
document
,
"
offcanvas
"
),
function
(
a
,
b
,
c
,
d
){
var
e
=
"
mui-action
"
,
f
=
function
(
a
,
b
){
return
b
.
className
&&~
b
.
className
.
indexOf
(
e
)?
b
:
!
1
};
a
.
registerTarget
({
name
:
d
,
index
:
50
,
handle
:
f
,
target
:
!
1
})}(
mui
,
window
,
document
,
"
action
"
),
function
(
a
,
b
,
c
,
d
){
var
e
=
"
mui-modal
"
,
f
=
function
(
a
,
b
){
if
(
"
A
"
===
b
.
tagName
&&
b
.
hash
){
var
d
=
c
.
getElementById
(
b
.
hash
.
replace
(
"
#
"
,
""
));
if
(
d
&&
d
.
classList
.
contains
(
e
))
return
d
}
return
!
1
};
a
.
registerTarget
({
name
:
d
,
index
:
50
,
handle
:
f
,
target
:
!
1
,
isReset
:
!
1
,
isContinue
:
!
0
}),
b
.
addEventListener
(
"
tap
"
,
function
(){
a
.
targets
.
modal
&&
a
.
targets
.
modal
.
classList
.
toggle
(
"
mui-active
"
)})}(
mui
,
window
,
document
,
"
modal
"
),
function
(
a
,
b
,
c
,
d
){
var
e
=
"
mui-popover
"
,
f
=
"
mui-bar-popover
"
,
g
=
"
mui-popover-action
"
,
h
=
"
mui-backdrop
"
,
i
=
"
mui-bar-backdrop
"
,
j
=
"
mui-backdrop-action
"
,
k
=
"
mui-active
"
,
l
=
function
(
b
,
d
){
return
"
A
"
===
d
.
tagName
&&
d
.
hash
&&
(
a
.
targets
.
_popover
=
c
.
getElementById
(
d
.
hash
.
replace
(
"
#
"
,
""
)),
a
.
targets
.
_popover
&&
a
.
targets
.
_popover
.
classList
.
contains
(
e
))?
d
:
!
1
};
a
.
registerTarget
({
name
:
d
,
index
:
60
,
handle
:
l
,
target
:
!
1
,
isReset
:
!
1
,
isContinue
:
!
0
});
var
m
=
function
(
a
){
a
?
c
.
body
.
setAttribute
(
"
style
"
,
"
position:fixed;width:100%;height:100%;overflow:hidden;
"
):
c
.
body
.
setAttribute
(
"
style
"
,
""
)},
n
=
function
(){
this
.
style
.
display
=
"
none
"
,
this
.
removeEventListener
(
"
webkitTransitionEnd
"
,
n
),
m
(
!
1
)},
o
=
function
(){
var
b
=
c
.
createElement
(
"
div
"
);
return
b
.
classList
.
add
(
h
),
b
.
addEventListener
(
"
tap
"
,
function
(){
var
b
=
a
.
targets
.
_popover
;
b
&&
(
b
.
addEventListener
(
"
webkitTransitionEnd
"
,
n
),
b
.
classList
.
remove
(
k
),
b
.
parentNode
.
removeChild
(
o
))}),
b
}();
b
.
addEventListener
(
"
tap
"
,
function
(){
a
.
targets
.
popover
&&
p
(
a
.
targets
.
_popover
,
a
.
targets
.
popover
)});
var
p
=
function
(
a
,
d
){
o
.
classList
.
remove
(
i
),
o
.
classList
.
remove
(
j
);
var
e
=
c
.
querySelector
(
"
.mui-popover.mui-active
"
);
if
(
!
e
||
(
e
.
style
.
display
=
"
none
"
,
e
.
classList
.
remove
(
k
),
e
.
removeEventListener
(
"
webkitTransitionEnd
"
,
n
),
m
(
!
1
),
e
.
parentNode
.
removeChild
(
o
),
a
!==
e
)){
if
(
a
.
classList
.
contains
(
f
)
||
a
.
classList
.
contains
(
g
))
if
(
a
.
classList
.
contains
(
g
))
o
.
classList
.
add
(
j
);
else
if
(
o
.
classList
.
add
(
i
),
d
&&
d
.
parentNode
){
var
h
=
d
.
offsetWidth
,
l
=
d
.
offsetLeft
,
p
=
b
.
innerWidth
;
a
.
style
.
left
=
Math
.
min
(
Math
.
max
(
l
,
5
),
p
-
h
-
5
)
+
"
px
"
}
a
.
style
.
display
=
"
block
"
,
a
.
offsetHeight
,
a
.
classList
.
add
(
k
),
a
.
parentNode
.
appendChild
(
o
),
m
(
!
0
),
o
.
classList
.
add
(
k
)}};
a
.
fn
.
popover
=
function
(){
var
b
=
arguments
;
this
.
each
(
function
(){
a
.
targets
.
_popover
=
this
,(
"
show
"
===
b
[
0
]
||
"
hide
"
===
b
[
0
]
||
"
toggle
"
===
b
[
0
])
&&
p
(
this
,
b
[
1
])})}}(
mui
,
window
,
document
,
"
popover
"
),
function
(
a
,
b
,
c
,
d
){
var
e
=
"
mui-control-item
"
,
f
=
"
mui-control-content
"
,
g
=
"
mui-tab-item
"
,
h
=
function
(
a
,
b
){
return
b
.
classList
&&
(
b
.
classList
.
contains
(
e
)
||
b
.
classList
.
contains
(
g
))?
b
:
!
1
};
a
.
registerTarget
({
name
:
d
,
index
:
80
,
handle
:
h
,
target
:
!
1
}),
b
.
addEventListener
(
"
tap
"
,
function
(){
var
b
=
a
.
targets
.
tab
;
if
(
b
){
var
e
,
g
,
h
,
i
=
"
mui-active
"
,
j
=
"
.
"
+
i
;
e
=
b
.
parentNode
.
querySelector
(
j
),
e
&&
e
.
classList
.
remove
(
i
);
var
k
=
b
===
e
;
if
(
b
&&
b
.
classList
.
add
(
i
),
b
.
hash
&&
(
h
=
c
.
getElementById
(
b
.
hash
.
replace
(
"
#
"
,
""
)))){
if
(
!
h
.
classList
.
contains
(
f
))
return
void
b
.
classList
[
k
?
"
remove
"
:
"
add
"
](
i
);
if
(
!
k
){
g
=
h
.
parentNode
.
getElementsByClassName
(
i
);
for
(
var
l
=
0
;
l
<
g
.
length
;
l
++
)
g
[
l
].
classList
.
remove
(
i
);
h
.
classList
.
add
(
i
);
var
m
=
h
.
parentNode
.
querySelectorAll
(
"
.
"
+
f
);
a
.
trigger
(
h
,
a
.
eventName
(
"
shown
"
,
d
),{
tabNumber
:
Array
.
prototype
.
indexOf
.
call
(
m
,
h
)})}}}})}(
mui
,
window
,
document
,
"
tab
"
),
function
(
a
,
b
){
var
c
=
"
mui-slider
"
,
d
=
"
mui-slider-group
"
,
e
=
"
mui-slider-loop
"
,
f
=
"
mui-slider-indicator
"
,
g
=
"
mui-action-previous
"
,
h
=
"
mui-action-next
"
,
i
=
"
mui-slider-item
"
,
j
=
"
.
"
+
i
,
k
=
"
.
"
+
f
,
l
=
"
.mui-slider-progress-bar
"
,
m
=
function
(
b
,
c
){
this
.
element
=
b
,
this
.
options
=
a
.
extend
({
slideshowDelay
:
0
,
factor
:
1
},
c
),
this
.
init
()};
m
.
prototype
.
init
=
function
(){
this
.
initEvent
(),
this
.
initTimer
()},
m
.
prototype
.
refresh
=
function
(
b
){
var
c
=
a
.
extend
({
slideshowDelay
:
0
,
factor
:
1
},
b
);
this
.
options
.
slideshowDelay
!=
c
.
slideshowDelay
&&
(
this
.
options
.
slideshowDelay
=
c
.
slideshowDelay
,
this
.
options
.
slideshowDelay
&&
this
.
nextItem
())},
m
.
prototype
.
initEvent
=
function
(){
var
b
=
this
,
c
=
b
.
element
,
d
=
c
.
parentNode
;
b
.
translateX
=
0
,
b
.
sliderWidth
=
c
.
offsetWidth
,
b
.
isLoop
=
c
.
classList
.
contains
(
e
),
b
.
sliderLength
=
c
.
querySelectorAll
(
j
).
length
,
b
.
progressBarWidth
=
0
,
b
.
progressBar
=
d
.
querySelector
(
l
),
b
.
progressBar
&&
(
b
.
progressBarWidth
=
b
.
progressBar
.
offsetWidth
);
var
f
=!
1
;
b
.
isSwipeable
=!
1
,
d
.
addEventListener
(
"
dragstart
"
,
function
(
a
){
var
d
=
a
.
detail
,
g
=
d
.
direction
;(
"
left
"
==
g
||
"
right
"
==
g
)
&&
(
f
=!
0
,
b
.
translateX
=
b
.
lastTranslateX
=
0
,
b
.
scrollX
=
b
.
getScroll
(),
b
.
sliderWidth
=
c
.
offsetWidth
,
b
.
isLoop
=
c
.
classList
.
contains
(
e
),
b
.
sliderLength
=
c
.
querySelectorAll
(
j
).
length
,
b
.
progressBar
&&
(
b
.
progressBarWidth
=
b
.
progressBar
.
offsetWidth
),
b
.
maxTranslateX
=
(
b
.
sliderLength
-
1
)
*
b
.
sliderWidth
,
a
.
detail
.
gesture
.
preventDefault
())}),
d
.
addEventListener
(
"
drag
"
,
function
(
a
){
f
&&
b
.
dragItem
(
a
)}),
d
.
addEventListener
(
"
dragend
"
,
function
(){
f
&&
(
b
.
gotoItem
(
b
.
getSlideNumber
()),
f
=
b
.
isSwipeable
=!
1
)}),
d
.
addEventListener
(
"
swipeleft
"
,
function
(
c
){
b
.
isSwipeable
&&
(
a
.
gestures
.
stoped
=!
0
,
b
.
nextItem
(),
f
=
b
.
isSwipeable
=!
1
,
c
.
stopImmediatePropagation
())}),
d
.
addEventListener
(
"
swiperight
"
,
function
(
c
){
b
.
isSwipeable
&&
(
a
.
gestures
.
stoped
=!
0
,
b
.
prevItem
(),
f
=
b
.
isSwipeable
=!
1
,
c
.
stopImmediatePropagation
())}),
d
.
addEventListener
(
"
slide
"
,
function
(
a
){
var
b
=
a
.
detail
;
b
.
slideNumber
=
b
.
slideNumber
||
0
;
var
c
=
d
.
querySelector
(
"
.mui-slider-indicator .mui-number span
"
);
c
&&
(
c
.
innerText
=
b
.
slideNumber
+
1
);
for
(
var
e
=
d
.
querySelectorAll
(
"
.mui-slider-indicator .mui-indicator
"
),
f
=
0
,
g
=
e
.
length
;
g
>
f
;
f
++
)
e
[
f
].
classList
[
f
===
b
.
slideNumber
?
"
add
"
:
"
remove
"
](
"
mui-active
"
);
for
(
var
h
=
d
.
querySelectorAll
(
"
.mui-control-item
"
),
f
=
0
,
g
=
h
.
length
;
g
>
f
;
f
++
)
h
[
f
].
classList
[
f
===
b
.
slideNumber
?
"
add
"
:
"
remove
"
](
"
mui-active
"
)}),
d
.
addEventListener
(
a
.
eventName
(
"
shown
"
,
"
tab
"
),
function
(
a
){
b
.
gotoItem
(
-
(
a
.
detail
.
tabNumber
||
0
))});
var
i
=
c
.
parentNode
.
querySelector
(
k
);
i
&&
i
.
addEventListener
(
"
tap
"
,
function
(
a
){
var
c
=
a
.
target
;(
c
.
classList
.
contains
(
g
)
||
c
.
classList
.
contains
(
h
))
&&
(
b
[
c
.
classList
.
contains
(
g
)?
"
prevItem
"
:
"
nextItem
"
](),
a
.
stopPropagation
())})},
m
.
prototype
.
dragItem
=
function
(
a
){
var
b
=
this
,
c
=
a
.
detail
;
if
(
c
.
deltaX
!==
c
.
lastDeltaX
){
var
d
=
c
.
deltaX
*
b
.
options
.
factor
+
b
.
scrollX
;
b
.
element
.
style
[
"
-webkit-transition-duration
"
]
=
"
0
"
;
var
e
=
0
,
f
=-
b
.
maxTranslateX
;
if
(
b
.
isLoop
&&
(
e
=
b
.
sliderWidth
,
f
+=
e
),
d
>
e
||
f
>
d
)
return
void
(
b
.
isSwipeable
=!
1
);
b
.
requestAnimationFrame
||
b
.
updateTranslate
(),
b
.
isSwipeable
=!
0
,
b
.
translateX
=
d
}
b
.
timer
&&
clearTimeout
(
b
.
timer
),
b
.
timer
=
setTimeout
(
function
(){
b
.
initTimer
()},
100
)},
m
.
prototype
.
updateTranslate
=
function
(){
var
a
=
this
;
a
.
lastTranslateX
!==
a
.
translateX
&&
(
a
.
setTranslate
(
a
.
translateX
),
a
.
lastTranslateX
=
a
.
translateX
),
a
.
requestAnimationFrame
=
requestAnimationFrame
(
function
(){
a
.
updateTranslate
()})},
m
.
prototype
.
setTranslate
=
function
(
a
){
this
.
element
.
style
.
webkitTransform
=
"
translate3d(
"
+
a
+
"
px,0,0)
"
,
this
.
updateProcess
(
a
)},
m
.
prototype
.
updateProcess
=
function
(
a
){
var
b
=
this
.
progressBarWidth
;
b
&&
(
a
=
Math
.
abs
(
a
),
this
.
setProcess
(
a
*
(
b
/
this
.
sliderWidth
)))},
m
.
prototype
.
setProcess
=
function
(
a
){
var
b
=
this
.
progressBar
;
b
&&
(
b
.
style
.
webkitTransform
=
"
translate3d(
"
+
a
+
"
px,0,0)
"
)},
m
.
prototype
.
nextItem
=
function
(){
this
.
gotoItem
(
this
.
getCurrentSlideNumber
(
"
next
"
)
-
1
)},
m
.
prototype
.
prevItem
=
function
(){
this
.
gotoItem
(
this
.
getCurrentSlideNumber
(
"
prev
"
)
+
1
)},
m
.
prototype
.
gotoItem
=
function
(
b
){
var
c
=
this
,
d
=
c
.
element
,
e
=
c
.
sliderLength
;
c
.
isLoop
?
e
-=
2
:(
e
-=
1
,
b
=
Math
.
min
(
0
,
b
),
b
=
Math
.
max
(
b
,
-
e
)),
c
.
requestAnimationFrame
&&
(
cancelAnimationFrame
(
c
.
requestAnimationFrame
),
c
.
requestAnimationFrame
=
null
);
var
f
=
Math
.
max
(
b
,
-
e
)
*
d
.
offsetWidth
;
d
.
style
[
"
-webkit-transition-duration
"
]
=
"
.2s
"
,
c
.
setTranslate
(
f
);
var
g
=
function
(){
d
.
style
[
"
-webkit-transition-duration
"
]
=
"
0
"
,
d
.
style
.
webkitTransform
=
"
translate3d(
"
+
b
*
d
.
offsetWidth
+
"
px,0,0)
"
,
d
.
removeEventListener
(
"
webkitTransitionEnd
"
,
g
)};
d
.
removeEventListener
(
"
webkitTransitionEnd
"
,
g
),
c
.
isLoop
&&
(
1
===
b
||
b
===-
e
)
&&
(
b
=
1
===
b
?
-
e
+
1
:
0
,
d
.
addEventListener
(
"
webkitTransitionEnd
"
,
g
)),
a
.
trigger
(
d
.
parentNode
,
"
slide
"
,{
slideNumber
:
Math
.
abs
(
b
)}),
this
.
initTimer
()},
m
.
prototype
.
getSlideNumber
=
function
(){
return
Math
.
round
(
this
.
getScroll
()
/
this
.
sliderWidth
)},
m
.
prototype
.
getCurrentSlideNumber
=
function
(
a
){
return
Math
[
"
next
"
===
a
?
"
ceil
"
:
"
floor
"
](
this
.
getScroll
()
/
this
.
sliderWidth
)},
m
.
prototype
.
getScroll
=
function
(){
var
b
=
this
.
element
,
c
=
0
;
if
(
"
webkitTransform
"
in
b
.
style
){
var
d
=
a
.
parseTranslate
(
b
.
style
.
webkitTransform
);
c
=
d
?
d
.
x
:
0
}
return
c
},
m
.
prototype
.
initTimer
=
function
(){
var
a
=
this
,
c
=
a
.
options
.
slideshowDelay
;
if
(
c
){
var
d
=
a
.
element
,
e
=
d
.
getAttribute
(
"
data-slidershowTimer
"
);
e
&&
b
.
clearTimeout
(
e
),
e
=
b
.
setTimeout
(
function
(){
d
&&
((
d
.
offsetWidth
||
d
.
offsetHeight
)
&&
a
.
nextItem
(),
a
.
initTimer
())},
c
),
d
.
setAttribute
(
"
data-slidershowTimer
"
,
e
)}},
a
.
fn
.
slider
=
function
(
b
){
this
.
each
(
function
(){
var
e
=
this
;
this
.
classList
.
contains
(
c
)
&&
(
e
=
this
.
querySelector
(
"
.
"
+
d
));
var
f
=
e
.
getAttribute
(
"
data-slider
"
);
if
(
f
){
var
g
=
a
.
data
[
f
];
g
&&
g
.
refresh
(
b
)}
else
f
=++
a
.
uuid
,
a
.
data
[
f
]
=
new
m
(
e
,
b
),
e
.
setAttribute
(
"
data-slider
"
,
f
)})},
a
.
ready
(
function
(){
a
(
"
.mui-slider-group
"
).
slider
()})}(
mui
,
window
),
function
(
a
,
b
,
c
,
d
){
var
e
=
"
mui-switch
"
,
f
=
"
mui-switch-handle
"
,
g
=
"
mui-active
"
,
h
=
"
.
"
+
f
,
i
=
function
(
a
,
b
){
return
b
.
classList
&&
b
.
classList
.
contains
(
e
)?
b
:
!
1
};
a
.
registerTarget
({
name
:
d
,
index
:
100
,
handle
:
i
,
target
:
!
1
});
var
j
,
i
,
k
,
l
,
m
,
n
=
function
(
b
){
if
(
j
){
var
c
=
b
.
detail
;
a
.
gestures
.
stoped
=!
0
;
var
d
=!
c
.
drag
&&!
j
.
classList
.
contains
(
g
)
||
c
.
drag
&&
c
.
deltaX
>
k
/
2
-
l
/
2
;
i
.
style
[
"
-webkit-transition-duration
"
]
=
"
.2s
"
,
d
?(
i
.
style
.
webkitTransform
=
"
translate3d(
"
+
m
+
"
px,0,0)
"
,
j
.
classList
.
add
(
g
)):(
i
.
style
.
webkitTransform
=
"
translate3d(0,0,0)
"
,
j
.
classList
.
remove
(
g
)),
a
.
trigger
(
j
,
"
toggle
"
,{
isActive
:
d
})}},
o
=
function
(
a
){
if
(
j
){
var
b
=
a
.
detail
.
deltaX
;
if
(
0
>
b
)
return
i
.
style
.
webkitTransform
=
"
translate3d(0,0,0)
"
;
if
(
b
>
m
)
return
i
.
style
.
webkitTransform
=
"
translate3d(
"
+
m
+
"
px,0,0)
"
;
i
.
style
[
"
-webkit-transition-duration
"
]
=
"
0s
"
,
i
.
style
.
webkitTransform
=
"
translate3d(
"
+
b
+
"
px,0,0)
"
,
j
.
classList
[
b
>
k
/
2
-
l
/
2
?
"
add
"
:
"
remove
"
](
g
)}};
b
.
addEventListener
(
a
.
EVENT_START
,
function
(
b
){
j
=
a
.
targets
.
toggle
,
j
&&
(
i
=
j
.
querySelector
(
h
),
k
=
j
.
clientWidth
,
l
=
i
.
clientWidth
,
m
=
k
-
l
+
3
,
b
.
preventDefault
())}),
b
.
addEventListener
(
"
tap
"
,
n
),
b
.
addEventListener
(
"
drag
"
,
o
),
b
.
addEventListener
(
"
dragend
"
,
n
)}(
mui
,
window
,
document
,
"
toggle
"
),
function
(
a
,
b
,
c
){
var
d
,
e
,
f
,
g
,
h
,
i
,
j
,
k
,
l
,
m
,
n
,
o
,
p
,
q
,
r
,
s
,
t
,
u
=
"
mui-active
"
,
v
=
"
mui-selected
"
,
w
=
"
mui-table-view-cell
"
,
x
=
"
mui-disabled
"
,
y
=
"
mui-switch
"
,
z
=
"
mui-btn
"
,
A
=
"
mui-slider-cell
"
,
B
=
"
mui-slider-handle
"
,
C
=
"
mui-slider-left
"
,
D
=
"
mui-slider-right
"
,
E
=
"
mui-bounce
"
,
F
=
"
.
"
+
A
,
G
=
"
.
"
+
B
,
H
=
"
.
"
+
C
,
I
=
"
.
"
+
D
,
J
=
.
4
,
K
=
1
,
L
=
1
,
M
=
function
(
a
){
a
?
e
?
e
.
classList
.
add
(
u
):
d
&&
d
.
classList
.
add
(
u
):
e
?
e
.
classList
.
remove
(
u
):
d
&&
d
.
classList
.
remove
(
u
)},
N
=
function
(){
s
!==
t
&&
(
k
||
n
?(
k
&&
n
?
0
===
h
?
O
(
g
,
s
):
O
(
g
,
h
+
s
):
k
?
0
===
h
?
O
(
g
,
Math
.
max
(
s
,
0
)):
O
(
g
,
Math
.
max
(
h
+
s
,
0
)):
n
&&
(
0
===
h
?
O
(
g
,
Math
.
min
(
s
,
0
)):
O
(
g
,
Math
.
min
(
h
+
s
,
0
))),
k
&&
(
0
===
h
?
s
>
m
&&
(
f
.
style
.
backgroundColor
=
l
,
O
(
k
,
Math
.
max
(
s
-
m
,
0
))):(
f
.
style
.
backgroundColor
=
s
>
0
?
l
:
""
,
O
(
k
,
Math
.
max
(
s
,
0
)))),
n
&&
(
0
===
h
?
-
s
>
p
&&
(
f
.
style
.
backgroundColor
=
o
,
O
(
n
,
Math
.
min
(
-
(
-
s
-
p
),
0
))):(
f
.
style
.
backgroundColor
=
s
>
0
&&!
k
?
""
:
o
,
O
(
n
,
Math
.
min
(
s
,
0
))))):
g
&&
(
0
===
h
&&
s
>
0
||
h
===
i
&&
0
>
s
)
&&
Math
.
abs
(
s
)
<=
i
&&
O
(
g
,
h
+
s
),
t
=
s
),
r
=
requestAnimationFrame
(
function
(){
N
()})},
O
=
function
(
a
,
b
){
a
&&
(
a
.
style
.
webkitTransform
=
"
translate3d(
"
+
b
+
"
px,0,0)
"
)},
P
=
function
(
b
,
c
){
k
&&
(
k
.
setAttribute
(
"
style
"
,
""
),
n
&&
n
.
setAttribute
(
"
style
"
,
""
),
b
?(
O
(
g
,
m
),
c
&&
a
.
trigger
(
g
,
"
slideright
"
),
d
.
classList
.
add
(
v
)):(
O
(
g
,
0
),
d
.
classList
.
remove
(
v
)))},
Q
=
function
(
b
,
c
){
n
&&
(
n
.
setAttribute
(
"
style
"
,
""
),
k
&&
k
.
setAttribute
(
"
style
"
,
""
),
b
?(
O
(
g
,
-
p
),
c
&&
a
.
trigger
(
g
,
"
slideleft
"
),
d
.
classList
.
add
(
v
)):(
O
(
g
,
0
),
d
.
classList
.
remove
(
v
)))},
R
=
function
(
a
){
g
&&
(
a
?(
O
(
g
,
0
),
d
.
classList
.
add
(
v
)):(
O
(
g
,
i
),
d
.
classList
.
remove
(
v
)))},
S
=
function
(
b
,
c
){
q
=!
1
,
r
&&
(
cancelAnimationFrame
(
r
),
r
=
null
),
f
.
setAttribute
(
"
style
"
,
""
);
var
d
=
Math
.
abs
(
s
);
if
(
b
||!
k
&&!
n
)
k
||
n
||
R
(
0
===
h
?
!
(
d
>
i
/
2
):
d
>
i
/
2
);
else
if
(
s
>
0
){
var
e
=
m
/
2
;
if
(
0
!==
h
&&
n
&&
(
Q
(
!
(
d
>=
p
/
2
),
!
1
),
e
=
m
/
2
+
p
),
k
){
var
j
=
d
>=
e
;
k
.
classList
.
contains
(
E
)?(
k
.
setAttribute
(
"
style
"
,
""
),
O
(
g
,
0
),
j
&&!
c
.
swipe
&&
a
.
trigger
(
g
,
"
slideright
"
)):
P
(
j
,
!
0
)}}
else
{
var
e
=
m
/
2
;
if
(
0
!==
h
&&
k
&&
(
P
(
!
(
d
>=
m
/
2
),
!
1
),
e
=
p
/
2
+
m
),
n
){
var
j
=
d
>=
e
;
n
.
classList
.
contains
(
E
)?(
n
.
setAttribute
(
"
style
"
,
""
),
O
(
g
,
0
),
j
&&!
c
.
swipe
&&
a
.
trigger
(
g
,
"
slideleft
"
)):
Q
(
j
,
!
0
)}}};
b
.
addEventListener
(
"
touchstart
"
,
function
(
b
){
d
=
e
=
g
=
k
=
n
=
q
=
r
=!
1
,
s
=
t
=
h
=
i
=
m
=
p
=
0
,
l
=
o
=
""
;
for
(
var
u
=
b
.
target
,
A
=!
1
;
u
&&
u
!==
c
;
u
=
u
.
parentNode
)
if
(
u
.
classList
){
var
B
=
u
.
classList
;
if
((
"
INPUT
"
===
u
.
tagName
&&
"
radio
"
!==
u
.
type
&&
"
checkbox
"
!==
u
.
type
||
"
BUTTON
"
===
u
.
tagName
||
B
.
contains
(
y
)
||
B
.
contains
(
z
)
||
B
.
contains
(
x
))
&&
(
A
=!
0
),
B
.
contains
(
w
)){
d
=
u
;
var
C
=
d
.
parentNode
.
querySelector
(
"
.
"
+
v
);
if
(
C
&&
C
!=
d
){
C
.
classList
.
remove
(
v
);
var
D
=
C
.
querySelector
(
G
);
if
(
D
){
var
E
=
C
.
querySelector
(
H
);
E
&&
E
.
setAttribute
(
"
style
"
,
""
);
var
N
=
C
.
querySelector
(
I
);
N
&&
N
.
setAttribute
(
"
style
"
,
""
),
E
||
N
?
O
(
D
,
0
):
O
(
D
,
D
.
offsetWidth
)}}
var
P
=
d
.
querySelector
(
"
a
"
);
if
(
P
&&
P
.
parentNode
===
d
&&
(
e
=
P
),
f
=
d
.
querySelector
(
F
),
f
&&
f
.
parentNode
===
d
){
var
Q
=
f
.
querySelector
(
G
);
if
(
Q
){
g
=
Q
,
i
=
g
.
offsetWidth
,
j
=
a
.
getStyles
(
g
,
"
margin-left
"
),
L
=
K
;
var
R
=
f
.
querySelector
(
H
);
R
&&
(
k
=
R
,
l
=
a
.
getStyles
(
R
,
"
background-color
"
),
m
=
R
.
offsetWidth
);
var
S
=
f
.
querySelector
(
I
);
S
&&
(
n
=
S
,
o
=
a
.
getStyles
(
S
,
"
background-color
"
),
p
=
S
.
offsetWidth
),(
k
||
n
)
&&
(
L
=
J
);
var
T
=
a
.
getStyles
(
g
,
"
webkitTransform
"
),
U
=
a
.
parseTranslateMatrix
(
T
);
h
=
U
?
U
.
x
:
0
}}
A
||
M
(
!
0
);
break
}}}),
b
.
addEventListener
(
"
touchmove
"
,
function
(){
M
(
!
1
)}),
b
.
addEventListener
(
"
dragstart
"
,
function
(
a
){
if
(
g
){
var
b
=
a
.
detail
,
c
=
b
.
direction
,
d
=
b
.
angle
;
if
(
"
left
"
===
c
){
if
((
n
||
g
)
&&
(
d
>
150
||-
150
>
d
)){
if
(
!
n
&&
k
&&
0
===
h
)
return
;
if
(
g
&&!
n
&&!
k
&&
0
===
h
)
return
;
q
=!
0
}}
else
if
(
"
right
"
===
c
&&
(
k
||
g
)
&&
d
>-
30
&&
30
>
d
){
if
(
!
k
&&
n
&&
0
===
h
)
return
;
if
(
g
&&!
n
&&!
k
&&
h
===
i
)
return
;
q
=!
0
}}}),
b
.
addEventListener
(
"
drag
"
,
function
(
a
){
q
&&
(
r
||
N
(),
s
=
a
.
detail
.
deltaX
*
L
,
a
.
detail
.
gesture
.
preventDefault
())}),
b
.
addEventListener
(
"
dragend
"
,
function
(
a
){
q
&&
S
(
!
1
,
a
.
detail
)}),
b
.
addEventListener
(
"
swiperight
"
,
function
(
b
){
if
(
g
){
var
c
=!
1
;
k
&&!
k
.
classList
.
contains
(
E
)
&&
0
===
h
?(
P
(
!
0
,
!
0
),
c
=!
0
):
n
&&
0
>
h
?(
Q
(
!
1
,
!
1
),
c
=!
0
):
k
||
n
||
(
c
=!
0
),
c
&&
(
a
.
gestures
.
stoped
=!
0
,
b
.
stopImmediatePropagation
(),
S
(
!
0
,
b
.
detail
))}}),
b
.
addEventListener
(
"
swipeleft
"
,
function
(
b
){
if
(
g
){
var
c
=!
1
;
n
&&!
n
.
classList
.
contains
(
E
)
&&
0
===
h
?(
Q
(
!
0
,
!
0
),
c
=!
0
):
k
&&
h
>
0
?(
P
(
!
1
,
!
1
),
c
=!
0
):
k
||
n
||
(
c
=!
0
),
c
&&
(
a
.
gestures
.
stoped
=!
0
,
b
.
stopImmediatePropagation
(),
S
(
!
0
,
b
.
detail
))}}),
b
.
addEventListener
(
"
touchend
"
,
function
(){
d
&&
M
(
!
1
)}),
b
.
addEventListener
(
"
touchcancel
"
,
function
(){
d
&&
M
(
!
1
)});
var
T
=
function
(){
var
a
=
d
.
classList
;
if
(
a
.
contains
(
"
mui-radio
"
)){
var
b
=
d
.
querySelector
(
"
input[type=radio]
"
);
b
&&
b
.
click
()}
else
if
(
a
.
contains
(
"
mui-checkbox
"
)){
var
b
=
d
.
querySelector
(
"
input[type=checkbox]
"
);
b
&&
b
.
click
()}};
b
.
addEventListener
(
"
doubletap
"
,
function
(){
d
&&
T
()}),
b
.
addEventListener
(
"
tap
"
,
function
(){
if
(
d
){
var
b
=!
1
,
c
=
d
.
classList
;
if
(
c
.
contains
(
"
mui-collapse
"
)){
if
(
!
c
.
contains
(
u
)){
var
e
=
d
.
parentNode
.
querySelector
(
"
.mui-collapse.mui-active
"
);
e
&&
e
.
classList
.
remove
(
u
),
b
=!
0
}
c
.
toggle
(
u
),
b
&&
a
.
trigger
(
d
,
"
expand
"
)}
T
()}})}(
mui
,
window
,
document
),
function
(
a
,
b
){
a
.
alert
=
function
(
c
,
d
,
e
,
f
){
if
(
a
.
os
.
plus
){
if
(
void
0
===
typeof
c
)
return
;
"
function
"
==
typeof
d
?(
f
=
d
,
d
=
null
,
e
=
"
确定
"
):
"
function
"
==
typeof
e
&&
(
f
=
e
,
e
=
null
),
plus
.
nativeUI
.
alert
(
c
,
f
,
d
,
e
)}
else
b
.
alert
(
c
)}}(
mui
,
window
),
function
(
a
,
b
){
a
.
confirm
=
function
(
c
,
d
,
e
,
f
){
if
(
a
.
os
.
plus
){
if
(
void
0
===
typeof
c
)
return
;
"
function
"
==
typeof
d
?(
f
=
d
,
d
=
null
,
e
=
null
):
"
function
"
==
typeof
e
&&
(
f
=
e
,
e
=
null
),
plus
.
nativeUI
.
confirm
(
c
,
f
,
d
,
e
)}
else
b
.
confirm
(
c
)}}(
mui
,
window
),
function
(
a
,
b
){
a
.
prompt
=
function
(
c
,
d
,
e
,
f
,
g
){
if
(
a
.
os
.
plus
){
if
(
void
0
===
typeof
message
)
return
;
"
function
"
==
typeof
d
?(
g
=
d
,
d
=
null
,
e
=
null
,
f
=
null
):
"
function
"
==
typeof
e
?(
g
=
e
,
e
=
null
,
f
=
null
):
"
function
"
==
typeof
f
&&
(
g
=
f
,
f
=
null
),
plus
.
nativeUI
.
prompt
(
c
,
g
,
e
,
d
,
f
)}
else
b
.
prompt
(
c
)}}(
mui
,
window
),
function
(
a
){
a
.
toast
=
function
(
b
){
if
(
a
.
os
.
plus
&&
a
.
os
.
android
)
plus
.
nativeUI
.
toast
(
b
,{
verticalAlign
:
"
bottom
"
});
else
{
var
c
=
document
.
createElement
(
"
div
"
);
c
.
classList
.
add
(
"
mui-toast-container
"
),
c
.
innerHTML
=
'
<div class="mui-toast-message">
'
+
b
+
"
</div>
"
,
document
.
body
.
appendChild
(
c
),
setTimeout
(
function
(){
document
.
body
.
removeChild
(
c
)},
2
e3
)}}}(
mui
,
window
),
function
(
a
,
b
,
c
){
var
d
=
"
mui-icon
"
,
e
=
"
mui-icon-clear
"
,
f
=
"
mui-icon-speech
"
,
g
=
"
mui-icon-search
"
,
h
=
"
mui-input-row
"
,
i
=
"
mui-placeholder
"
,
j
=
"
mui-tooltip
"
,
k
=
"
mui-hidden
"
,
l
=
"
.
"
+
e
,
m
=
"
.
"
+
f
,
n
=
"
.
"
+
i
,
o
=
"
.
"
+
j
,
p
=
function
(
a
){
for
(;
a
&&
a
!==
c
;
a
=
a
.
parentNode
)
if
(
a
.
classList
&&
a
.
classList
.
contains
(
h
))
return
a
;
return
null
},
q
=
function
(
a
,
b
){
this
.
element
=
a
,
this
.
options
=
b
||
{
actions
:
"
clear
"
},
~
this
.
options
.
actions
.
indexOf
(
"
slider
"
)?(
this
.
sliderActionClass
=
j
+
"
"
+
k
,
this
.
sliderActionSelector
=
o
):(
~
this
.
options
.
actions
.
indexOf
(
"
clear
"
)
&&
(
this
.
clearActionClass
=
d
+
"
"
+
e
+
(
a
.
value
?
""
:
"
"
+
k
),
this
.
clearActionSelector
=
l
),
~
this
.
options
.
actions
.
indexOf
(
"
speech
"
)
&&
(
this
.
speechActionClass
=
d
+
"
"
+
f
,
this
.
speechActionSelector
=
m
),
~
this
.
options
.
actions
.
indexOf
(
"
search
"
)
&&
(
this
.
searchActionClass
=
i
,
this
.
searchActionSelector
=
n
)),
this
.
init
()};
q
.
prototype
.
init
=
function
(){
this
.
initAction
(),
this
.
initElementEvent
()},
q
.
prototype
.
initAction
=
function
(){
var
a
=
this
,
b
=
a
.
element
.
parentNode
;
b
&&
(
a
.
sliderActionClass
?
a
.
sliderAction
=
a
.
createAction
(
b
,
a
.
sliderActionClass
,
a
.
sliderActionSelector
):(
a
.
searchActionClass
&&
(
a
.
searchAction
=
a
.
createAction
(
b
,
a
.
searchActionClass
,
a
.
searchActionSelector
),
a
.
searchAction
.
addEventListener
(
"
tap
"
,
function
(){
setTimeout
(
function
(){
a
.
element
.
focus
()},
0
)})),
a
.
speechActionClass
&&
(
a
.
speechAction
=
a
.
createAction
(
b
,
a
.
speechActionClass
,
a
.
speechActionSelector
),
a
.
speechAction
.
addEventListener
(
"
click
"
,
function
(
a
){
a
.
stopPropagation
()}),
a
.
speechAction
.
addEventListener
(
"
tap
"
,
function
(
b
){
a
.
speechActionClick
(
b
)})),
a
.
clearActionClass
&&
(
a
.
clearAction
=
a
.
createAction
(
b
,
a
.
clearActionClass
,
a
.
clearActionSelector
),
a
.
clearAction
.
addEventListener
(
"
tap
"
,
function
(
b
){
a
.
clearActionClick
(
b
)}))))},
q
.
prototype
.
createAction
=
function
(
a
,
b
,
e
){
var
f
=
a
.
querySelector
(
e
);
if
(
!
f
){
var
f
=
c
.
createElement
(
"
span
"
);
f
.
className
=
b
,
b
===
this
.
searchActionClass
&&
(
f
.
innerHTML
=
'
<span class="
'
+
d
+
"
"
+
g
+
'
"></span>
'
+
this
.
element
.
getAttribute
(
"
placeholder
"
),
this
.
element
.
setAttribute
(
"
placeholder
"
,
""
)),
a
.
insertBefore
(
f
,
this
.
element
.
nextSibling
)}
return
f
},
q
.
prototype
.
initElementEvent
=
function
(){
var
b
=
this
.
element
;
if
(
this
.
sliderActionClass
){
var
c
=
this
.
sliderAction
,
d
=
b
.
offsetLeft
,
e
=
b
.
offsetWidth
-
28
,
f
=
c
.
offsetWidth
,
g
=
Math
.
abs
(
b
.
max
-
b
.
min
),
h
=
null
,
i
=
function
(){
c
.
classList
.
remove
(
k
),
f
=
f
||
c
.
offsetWidth
;
var
a
=
Math
.
abs
(
b
.
value
)
/
g
*
e
;
c
.
style
.
left
=
14
+
d
+
a
-
f
/
2
+
"
px
"
,
c
.
innerText
=
b
.
value
,
h
&&
clearTimeout
(
h
),
h
=
setTimeout
(
function
(){
c
.
classList
.
add
(
k
)},
1
e3
)};
b
.
addEventListener
(
"
input
"
,
i
),
b
.
addEventListener
(
"
tap
"
,
i
)}
else
{
if
(
this
.
clearActionClass
){
var
j
=
this
.
clearAction
;
if
(
!
j
)
return
;
a
.
each
([
"
keyup
"
,
"
change
"
,
"
input
"
,
"
focus
"
,
"
blur
"
,
"
cut
"
,
"
paste
"
],
function
(
a
,
c
){
!
function
(
a
){
b
.
addEventListener
(
a
,
function
(){
j
.
classList
[
b
.
value
.
trim
()?
"
remove
"
:
"
add
"
](
k
)})}(
c
)})}
this
.
searchActionClass
&&
(
b
.
addEventListener
(
"
focus
"
,
function
(){
b
.
parentNode
.
classList
.
add
(
"
mui-active
"
)}),
b
.
addEventListener
(
"
blur
"
,
function
(){
b
.
value
.
trim
()
||
b
.
parentNode
.
classList
.
remove
(
"
mui-active
"
)}))}},
q
.
prototype
.
clearActionClick
=
function
(
a
){
this
.
element
.
value
=
""
,
this
.
element
.
focus
(),
this
.
clearAction
.
classList
.
add
(
k
),
a
.
preventDefault
()},
q
.
prototype
.
speechActionClick
=
function
(
a
){
if
(
b
.
plus
){
var
c
=
this
;
c
.
element
.
value
=
""
,
plus
.
speech
.
startRecognize
({
engine
:
"
iFly
"
},
function
(
a
){
c
.
element
.
value
+=
a
,
setTimeout
(
function
(){
c
.
element
.
focus
()},
0
),
plus
.
speech
.
stopRecognize
()},
function
(){})}
else
alert
(
"
only for 5+
"
);
a
.
preventDefault
()},
a
.
fn
.
input
=
function
(){
this
.
each
(
function
(){
var
b
=
[],
c
=
p
(
this
.
parentNode
);
if
(
"
range
"
===
this
.
type
&&
c
.
classList
.
contains
(
"
mui-input-range
"
))
b
.
push
(
"
slider
"
);
else
{
var
d
=
this
.
classList
;
d
.
contains
(
"
mui-input-clear
"
)
&&
b
.
push
(
"
clear
"
),
d
.
contains
(
"
mui-input-speech
"
)
&&
b
.
push
(
"
speech
"
),
"
search
"
===
this
.
type
&&
c
.
classList
.
contains
(
"
mui-search
"
)
&&
b
.
push
(
"
search
"
)}
var
e
=
this
.
getAttribute
(
"
data-input-
"
+
b
[
0
]);
if
(
!
e
){
e
=++
a
.
uuid
,
a
.
data
[
e
]
=
new
q
(
this
,{
actions
:
b
.
join
(
"
,
"
)});
for
(
var
f
=
0
,
g
=
b
.
length
;
g
>
f
;
f
++
)
this
.
setAttribute
(
"
data-input-
"
+
b
[
f
],
e
)}})},
a
.
ready
(
function
(){
a
(
"
.mui-input-row input
"
).
input
()})}(
mui
,
window
,
document
),
function
(
a
,
b
){
a
.
back
=
function
(){
b
.
history
.
length
>
1
&&
(
"
function
"
==
typeof
a
.
options
.
back
?
a
.
options
.
back
()
!==!
1
&&
b
.
history
.
back
():
b
.
history
.
back
())},
b
.
addEventListener
(
"
tap
"
,
function
(){
var
b
=
a
.
targets
.
action
;
b
&&
b
.
classList
.
contains
(
"
mui-action-back
"
)
&&
a
.
back
()}),
b
.
addEventListener
(
"
swiperight
"
,
function
(
b
){
var
c
=
b
.
detail
;
c
.
angle
>-
15
&&
c
.
angle
<
15
&&
a
.
options
.
swipeBack
===!
0
&&
a
.
back
()})}(
mui
,
window
),
function
(
a
,
b
){
a
.
back
=
function
(){
var
c
=!
0
,
d
=!
1
;
if
(
"
function
"
==
typeof
a
.
options
.
back
&&
(
d
=
a
.
options
.
back
(),
d
===!
1
&&
(
c
=!
1
)),
c
)
if
(
b
.
plus
){
var
e
=
a
.
currentWebview
,
f
=
e
.
parent
();
e
.
canBack
(
function
(){
f
&&
(
e
=
f
);
var
b
=
e
.
opener
();
if
(
b
){
var
c
=
b
.
parent
();
c
&&
(
b
=
c
),
e
.
preload
?
e
.
hide
(
"
auto
"
):
a
.
closeAll
(
e
)}})}
else
b
.
history
.
length
>
1
?
b
.
history
.
back
():
b
.
close
()},
a
.
menu
=
function
(){
var
c
=
document
.
querySelector
(
"
.mui-action-menu
"
);
if
(
c
)
a
.
trigger
(
c
,
"
tap
"
);
else
if
(
b
.
plus
){
var
d
=
a
.
currentWebview
,
e
=
d
.
parent
();
e
&&
e
.
evalJS
(
"
mui&&mui.menu();
"
)}},
a
.
plusReady
(
function
(){
plus
.
key
.
addEventListener
(
"
backbutton
"
,
function
(){
a
.
back
()},
!
1
),
plus
.
key
.
addEventListener
(
"
menubutton
"
,
function
(){
a
.
menu
()},
!
1
)})}(
mui
,
window
);
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment