109 changed files with 16385 additions and 607 deletions
-
3lib/ajax_asm.php
-
134lib/controller/AddCameraNode.php
-
46lib/controller/addDetectionProfile.php
-
52lib/controller/addNetworkNode.php
-
38lib/controller/camMakeMove.php
-
22lib/controller/camStop.php
-
43lib/controller/dash/node_0.js
-
28lib/controller/dash/node_10.js
-
78lib/controller/dash/node_13.js
-
7lib/controller/dash/node_3.js
-
36lib/controller/doDeviceOperation.php
-
47lib/controller/getDashBoardItems.php
-
30lib/controller/getDetectionProfile.php
-
348lib/controller/getDeviceDraw.php
-
53lib/controller/getNetwork.php
-
201lib/controller/getNetworkServerProps.php
-
33lib/controller/getNodeAdvancedNfo.php
-
31lib/controller/getNodeBasicNfo.php
-
31lib/controller/getResourceInfo.php
-
16lib/controller/getSiteStatus.php
-
140lib/controller/getStatus.php
-
9lib/controller/listServerLog.php
-
42lib/controller/props/0_node_prop.js
-
137lib/controller/resetAllSettings.php
-
37lib/controller/validateNode.php
-
45lib/defines.php
-
2lib/javascript/howler/howler.core.min.js
-
3242lib/javascript/howler/howler.js
-
4lib/javascript/howler/howler.min.js
-
2lib/javascript/howler/howler.spatial.min.js
-
144lib/javascript/jsapi_dynamic/rgoose_camera_editor.js
-
632lib/javascript/jsapi_dynamic/rgoose_dashboard.js
-
371lib/javascript/jsapi_dynamic/rgoose_devices_module.js
-
36lib/javascript/jsapi_dynamic/rgoose_logs.js
-
154lib/javascript/jsapi_dynamic/rgoose_main.js
-
75lib/javascript/jsapi_dynamic/rgoose_sysmap_editor.js
-
36lib/javascript/jsapi_dynamic/rgoose_timeline.js
-
0lib/javascript/leaflet/images/layers-2x.png
-
0lib/javascript/leaflet/images/layers.png
-
0lib/javascript/leaflet/images/marker-icon-2x.png
-
0lib/javascript/leaflet/images/marker-icon.png
-
0lib/javascript/leaflet/images/marker-shadow.png
-
13lib/javascript/pnotyfy/Angeler.css
-
13lib/javascript/pnotyfy/BrightTheme.css
-
1lib/javascript/pnotyfy/Material.css
-
1lib/javascript/pnotyfy/PNotify.css
-
5269lib/javascript/pnotyfy/PNotify.js
-
612lib/javascript/pnotyfy/PNotifyAnimate.js
-
1lib/javascript/pnotyfy/PNotifyBootstrap4.css
-
471lib/javascript/pnotyfy/PNotifyBootstrap4.js
-
1lib/javascript/pnotyfy/PNotifyConfirm.css
-
1306lib/javascript/pnotyfy/PNotifyConfirm.js
-
1lib/javascript/pnotyfy/PNotifyCountdown.css
-
74lib/javascript/pnotyfy/PNotifyCountdown.js
-
1lib/javascript/pnotyfy/PNotifyDesktop.css
-
700lib/javascript/pnotyfy/PNotifyDesktop.js
-
471lib/javascript/pnotyfy/PNotifyFontAwesome5.js
-
548lib/javascript/pnotyfy/PNotifyFontAwesome5Fix.js
-
1lib/javascript/pnotyfy/PNotifyMobile.css
-
657lib/javascript/pnotyfy/PNotifyMobile.js
-
1lib/javascript/pnotyfy/PNotifyPaginate.css
-
89lib/javascript/pnotyfy/PNotifyPaginate.js
-
1lib/javascript/pnotyfy/PNotifyReference.css
-
75lib/javascript/pnotyfy/PNotifyReference.js
-
57lib/php/argus/argus.php
-
14lib/php/onvif/test_v11.php
-
16lib/php/onvif/toto.php
-
28lib/php/ui/UI_functions.php
-
BINstyle/assets/audio/beep-07a.mp3
-
BINstyle/assets/audio/beep-07a.wav
-
BINstyle/assets/audio/beep-08b.mp3
-
BINstyle/assets/audio/beep-08b.wav
-
BINstyle/assets/audio/beep-09.mp3
-
BINstyle/assets/audio/beep-09.wav
-
BINstyle/assets/audio/beep-10.mp3
-
BINstyle/assets/audio/beep-10.wav
-
BINstyle/assets/audio/beep-21.mp3
-
BINstyle/assets/audio/beep-21.wav
-
BINstyle/assets/audio/beep-23.mp3
-
BINstyle/assets/audio/beep-23.wav
-
BINstyle/assets/audio/beep-24.mp3
-
BINstyle/assets/audio/beep-24.wav
-
BINstyle/assets/audio/beep-25.mp3
-
BINstyle/assets/audio/beep-25.wav
-
BINstyle/assets/audio/beep-26.mp3
-
BINstyle/assets/audio/beep-26.wav
-
BINstyle/assets/audio/beep-28.mp3
-
BINstyle/assets/audio/beep-28.wav
-
BINstyle/assets/audio/beep-29.mp3
-
BINstyle/assets/audio/beep-29.wav
-
BINstyle/assets/audio/beep-30b.mp3
-
BINstyle/assets/audio/beep-30b.wav
-
BINstyle/assets/audio/button-15.mp3
-
BINstyle/assets/audio/button-15.wav
-
BINstyle/assets/audio/button-16.mp3
-
BINstyle/assets/audio/button-16.wav
-
BINstyle/assets/audio/button-17.mp3
-
BINstyle/assets/audio/button-17.wav
-
BINstyle/assets/audio/button-38.mp3
-
BINstyle/assets/audio/button-38.wav
@ -0,0 +1,46 @@ |
|||
<?php |
|||
require_once('../ajax_asm.php'); |
|||
$UID = intval($CUser->Data['id'] ); |
|||
$ACCESS = intval($CUser->Data['access'] ); |
|||
if( $UID > 1 && $ACCESS > 4 ){ |
|||
$Z = $_POST['NID']; |
|||
if( $Z != '' ){ |
|||
$TArr = explode( ':', $Z ); |
|||
$NodeID = intval( $TArr[0] ); |
|||
$QS = "SELECT * FROM nodes WHERE id={$NodeID}"; |
|||
$result = $DATABASE->Query( $QS, false ); |
|||
if( count( $result ) ){ |
|||
$T = $result[0]; |
|||
$AID = intval( $T['aux_id'] ); |
|||
$QS = "SELECT `profile_id` FROM `lrf_detection_profiles` WHERE `aux_id`={$AID} ORDER BY `profile_id`"; |
|||
$result = $DATABASE->Query( $QS, false ); |
|||
if( count($result) ) { |
|||
$LP = 0; |
|||
foreach( $result as $R ){ |
|||
$LP=intval($R['profile_id']); |
|||
}; |
|||
if( $LP < 3 ){ |
|||
$LP++; |
|||
$QS="INSERT INTO `lrf_detection_profiles` SET `aux_id`={$AID}, `master`=1, `profile_id`={$LP}"; |
|||
$DATABASE->Query( $QS ); |
|||
if( $T['type'] == 1 || $T['type'] == 5 ){ |
|||
$QS="INSERT INTO `lrf_detection_profiles` SET `aux_id`={$AID}, `master`=0, `profile_id`={$LP}"; |
|||
$DATABASE->Query( $QS ); |
|||
}; |
|||
}; |
|||
} else { |
|||
$QS="INSERT INTO `lrf_detection_profiles` SET `aux_id`={$AID}, `master`=1, `profile_id`=0"; |
|||
$DATABASE->Query( $QS ); |
|||
if( $T['type'] == 1 || $T['type'] == 5 ){ |
|||
$QS="INSERT INTO `lrf_detection_profiles` SET `aux_id`={$AID}, `master`=0, `profile_id`=0"; |
|||
$DATABASE->Query( $QS ); |
|||
}; |
|||
}; |
|||
$QS="INSERT INTO `access_log` SET ts=NOW(), `user_id`={$UID}, `cmd`=12, `dataset`='{}'"; |
|||
$DATABASE->Query( $QS ); |
|||
}; |
|||
exit(); |
|||
}; |
|||
}; |
|||
header('location: /'); |
|||
?>
|
|||
@ -0,0 +1,38 @@ |
|||
<?php |
|||
require_once('../ajax_asm.php'); |
|||
if( $CUser->Data['id'] > 1 ){ |
|||
$CMD = ''; |
|||
if(isset( $_POST['CMD'] )){ |
|||
$CMD = $_POST['CMD']; |
|||
} else { |
|||
$CMD = $_GET['CMD']; |
|||
}; |
|||
$TArr = explode( '_', $CMD ); |
|||
$CID = intval($TArr[3]); |
|||
$CCC = intval($TArr[2]); |
|||
if( $CID ){ |
|||
//$QS = "SELECT `aux_id` FROM `nodes` WHERE `id`={$CID}";
|
|||
//$RR = $DATABASE->Query( $QS );
|
|||
//$CID = intval( $RR[0]['aux_id'] );
|
|||
//if( $CID == 0 ) exit();
|
|||
$ACMD = 0; |
|||
switch( $CCC ){ |
|||
case 10: $ACMD = 0x21; break; //Zoom In
|
|||
case 11: $ACMD = 0x41; break; //Zoom Out
|
|||
case 27: $ACMD = 0x03; break; // Right
|
|||
case 28: $ACMD = 0x13; break; // RD
|
|||
case 29: $ACMD = 0x11; break; // Down
|
|||
case 30: $ACMD = 0x15; break; // LD
|
|||
case 31: $ACMD = 0x05; break; // Left
|
|||
case 32: $ACMD = 0x0d; break; // LU
|
|||
case 33: $ACMD = 0x09; break; // Up
|
|||
case 34: $ACMD = 0x0B; break; // RU
|
|||
}; |
|||
echo $CID . " -> " .$ACMD; |
|||
if( $ACMD ){ |
|||
$QS = "INSERT `nodes_qcq` SET `cmd`={$ACMD}, `node_id`={$CID}, `status`=0"; |
|||
$DATABASE->Query( $QS ); |
|||
}; |
|||
}; |
|||
}; |
|||
?>
|
|||
@ -0,0 +1,22 @@ |
|||
<?php |
|||
require_once('../ajax_asm.php'); |
|||
if( $CUser->Data['id'] > 1 ){ |
|||
$CMD = ''; |
|||
if(isset( $_POST['CMD'] )){ |
|||
$CMD = $_POST['CMD']; |
|||
} else { |
|||
$CMD = $_GET['CMD']; |
|||
}; |
|||
$TArr = explode( '_', $CMD ); |
|||
$CID = intval($TArr[3]); |
|||
if( $CID ){ |
|||
//$QS = "SELECT `aux_id` FROM `nodes` WHERE `id`={$CID}";
|
|||
//$RR = $DATABASE->Query( $QS );
|
|||
//$CID = intval( $RR[0]['aux_id'] );
|
|||
//if( $CID == 0 ) exit();
|
|||
$QS = "INSERT `nodes_qcq` SET `cmd`=1, `node_id`={$CID}, `status`=0"; |
|||
$DATABASE->Query( $QS ); |
|||
}; |
|||
}; |
|||
?>
|
|||
|
|||
@ -1,11 +1,34 @@ |
|||
{ |
|||
id: 'db_node_%%%NODEID%%%', |
|||
frame: false, |
|||
width: 258, |
|||
height: 200, |
|||
border: true, |
|||
title: 'R-Goose Server', |
|||
items:[{ |
|||
html: '<p>Server</p>' |
|||
}] |
|||
{ |
|||
id: 'db_node_%%%NODEID%%%', |
|||
tools: [{ |
|||
id:'gear', |
|||
handler: function(){ |
|||
//Ext.Msg.alert('Message', 'The Settings tool was clicked.');
|
|||
showServerToolBox(%%%NODEID%%%); |
|||
} |
|||
},{ |
|||
id:'close', |
|||
handler: function(e, target, panel){ |
|||
panel.ownerCt.remove(panel, true); |
|||
} |
|||
}], |
|||
frame: true, |
|||
width: 258, |
|||
height: 240, |
|||
border: false, |
|||
title: '%%%SYSSERVERNAME%%%', |
|||
items: [{ |
|||
xtype: 'panel', |
|||
html: '<table width="100%"><tr><td><p id="ser_status_txt">%%%SERVERSTATUS%%%</p></td><td width="16px"><img id="serv_status_img" src="/style/icons/icons/%%%SERVERSTATUSIMG%%%"></td></tr></table>' |
|||
},{ |
|||
xtype: 'panel', |
|||
html: '<table width="100%" border=0><tr><td><svg class="donut" width="80" height="100%" viewBox="0 0 42 42"><!-- circle class="donut-hole" cx="21" cy="21" r="15.91549430918954" fill="#fff"></circle --><!-- GREEN --><circle id="donut-segment2" cx="21" cy="21" r="15.91549430918954" fill="transparent" stroke="#b1c94e" stroke-width="3" stroke-dasharray="0 100" stroke-dashoffset="25"></circle><!-- BLUE --><circle id="donut-segment3" cx="21" cy="21" r="15.91549430918954" fill="transparent" stroke="#aaddff" stroke-width="3" stroke-dasharray="0 100" stroke-dashoffset="25"></circle><!-- PURPLE --><circle id="donut-segment1" cx="21" cy="21" r="15.91549430918954" fill="transparent" stroke="#ce4b99" stroke-width="3" stroke-dasharray="0 100" stroke-dashoffset="25"></circle><g class="chart-text"><text x="50%" y="50%" class="chart-number" id="totalValue">0</text><text x="50%" y="50%" class="chart-label">CPU</text></g></svg></td><td><svg class="donut" width="80" height="100%" viewBox="0 0 42 42"><!-- circle class="donut-hole" cx="21" cy="21" r="15.91549430918954" fill="#fff"></circle --><!-- GREEN --><circle id="donut1-segment2" cx="21" cy="21" r="15.91549430918954" fill="transparent" stroke="#b1c94e" stroke-width="3" stroke-dasharray="0 100" stroke-dashoffset="25"></circle><!-- BLUE --><circle id="donut1-segment3" cx="21" cy="21" r="15.91549430918954" fill="transparent" stroke="#aaddff" stroke-width="3" stroke-dasharray="0 100" stroke-dashoffset="25"></circle><!-- PURPLE --><circle id="donut1-segment1" cx="21" cy="21" r="15.91549430918954" fill="transparent" stroke="#ce4b99" stroke-width="3" stroke-dasharray="0 100" stroke-dashoffset="25"></circle><g class="chart-text"><text x="50%" y="50%" class="chart-number" id="totalValue1">0</text><text x="50%" y="50%" class="chart-label">MEM</text></g></svg></td><td><svg class="donut" width="80" height="100%" viewBox="0 0 42 42"><!-- circle class="donut-hole" cx="21" cy="21" r="15.91549430918954" fill="#fff"></circle --><!-- GREEN --><circle id="donut2-segment2" cx="21" cy="21" r="15.91549430918954" fill="transparent" stroke="#b1c94e" stroke-width="3" stroke-dasharray="0 100" stroke-dashoffset="25"></circle><!-- BLUE --><circle id="donut2-segment3" cx="21" cy="21" r="15.91549430918954" fill="transparent" stroke="#aaddff" stroke-width="3" stroke-dasharray="0 100" stroke-dashoffset="25"></circle><!-- PURPLE --><circle id="donut2-segment1" cx="21" cy="21" r="15.91549430918954" fill="transparent" stroke="#ce4b99" stroke-width="3" stroke-dasharray="0 100" stroke-dashoffset="25"></circle><g class="chart-text"><text x="50%" y="50%" class="chart-number" id="totalValue2">0</text><text x="50%" y="50%" class="chart-label">DISK</text></g></svg></td></tr></table>' |
|||
},{ |
|||
xtype: 'panel', |
|||
height: 80, |
|||
frame: true, |
|||
border: false, |
|||
autoScroll: true, |
|||
items: %%%MODULES%%% |
|||
}] |
|||
} |
|||
@ -0,0 +1,28 @@ |
|||
{ |
|||
id: 'db_node_%%%NODEID%%%', |
|||
//xxtype: 'panel',
|
|||
xtype: 'portlet', |
|||
//columnWidth:.33,
|
|||
//layout: 'fit',
|
|||
width: 258, |
|||
height: 240, |
|||
tools: [{ |
|||
id:'gear', |
|||
handler: function(){ |
|||
Ext.Msg.alert('Message', 'The Settings tool was clicked.'); |
|||
} |
|||
},{ |
|||
id:'close', |
|||
handler: function(e, target, panel){ |
|||
panel.ownerCt.remove(panel, true); |
|||
} |
|||
}], |
|||
frame: true, |
|||
bodyStyle: 'padding: 0px;', |
|||
plr: null, |
|||
title: '%%%NODENAME%%%', |
|||
items:[{ |
|||
//html: '<video id="hls-%%%NODEID%%%" class="video-js vjs-default-skin" width="244" height="200"></video>',
|
|||
html: '<img data-enlargeable000 ondblclick="fullScreen(\'img-%%%NODEID%%%\');" style="cursor: zoom-in" id="img-%%%NODEID%%%" src="%%%SELURL%%%" width="244" height="200" />', |
|||
}] |
|||
} |
|||
@ -0,0 +1,36 @@ |
|||
<?php |
|||
require_once('../ajax_asm.php'); |
|||
if( $CUser->Data['id'] > 1 ){ |
|||
$NodeID = intval($_POST['NID']); |
|||
$SiteID = intval($_POST['SITE']); |
|||
$OPID = intval( $_POST['CMD'] ); |
|||
$PARAM = $_POST['PARAM']; |
|||
$QS = "SELECT * FROM nodes WHERE id={$NodeID}"; |
|||
$Data = array(); |
|||
$result = $DATABASE->Query( $QS, false ); |
|||
if( count( $result ) ){ |
|||
$T = $result[0]; |
|||
$TYP = intval( $T['type'] ); |
|||
$AID = intval( $T['aux_id'] ); |
|||
switch( $TYP ){ |
|||
case ARGUS_ALS_SENSOR: |
|||
case ARGUS_LFS_SENSOR: |
|||
case ARGUS_PLS_200_SENSOR: |
|||
case ARGUS_PLS_360_SENSOR: |
|||
case ARGUS_3D_SENSOR: |
|||
case ARGUS_NET_PLS_200:{ |
|||
//$QS = "SELECT * FROM lrf_sensors WHERE id={$AID}";
|
|||
//$result = $DATABASE->Query( $QS, false );
|
|||
//if( count($result)) {
|
|||
//
|
|||
//};
|
|||
$QS = "UPDATE `lrf_sensors` SET `pushed_cmd`={$OPID} WHERE id={$AID}"; |
|||
$DATABASE->Query( $QS ); |
|||
}; |
|||
}; |
|||
}; |
|||
echo json_encode( $Data ); |
|||
exit(); |
|||
}; |
|||
header('location: /'); |
|||
?>
|
|||
@ -0,0 +1,30 @@ |
|||
<?php |
|||
require_once('../ajax_asm.php'); |
|||
if( $CUser->Data['id'] > 1 ){ |
|||
$NodeID = intval($_POST['NID']); |
|||
$SiteID = intval($_POST['SITE']); |
|||
$QS = "SELECT * FROM nodes WHERE id={$NodeID}"; |
|||
$Data = array(); |
|||
$result = $DATABASE->Query( $QS, false ); |
|||
if( count( $result ) ){ |
|||
$T = $result[0]; |
|||
$AID = $T['aux_id']; |
|||
$QS = "SELECT * FROM lrf_sensors WHERE id={$AID}"; |
|||
$result = $DATABASE->Query( $QS, false ); |
|||
if( count($result)) { |
|||
$R = $result[0]; |
|||
$K['name'] = $T['name']; |
|||
$K['data_status'] = intval( $R['data_status'] ); |
|||
$K['online'] = intval($T['online']); |
|||
$K['profile_id'] = intval($R['detection_profile_id']); |
|||
$K['profiles'] = array(); |
|||
$QS = "SELECT DISTINCT `profile_id` as `id` FROM `lrf_detection_profiles` WHERE `aux_id`={$AID} ORDER BY `profile_id`"; |
|||
foreach( $DATABASE->Query( $QS ) as $Z ) $K['profiles'][] = intval($Z['id']); |
|||
$Data = $K; |
|||
}; |
|||
}; |
|||
echo json_encode( $Data ); |
|||
exit(); |
|||
}; |
|||
header('location: /'); |
|||
?>
|
|||
@ -1,107 +1,118 @@ |
|||
<?php |
|||
require_once('../ajax_asm.php'); |
|||
if( $CUser->Data['id'] > 1 ){ |
|||
$Node = intval( $_POST['NODE'] ); |
|||
$QS = "SELECT * FROM nodes WHERE id = {$Node}"; |
|||
$Result = $DATABASE->Query( $QS, false ); |
|||
if( count( $Result ) ){ |
|||
$Props = $Result[0]; |
|||
$QS = "SELECT * FROM servers WHERE id = {$Props['aux_id']}"; |
|||
$Result = $DATABASE->Query( $QS, false ); |
|||
$Server = $Result[0]; |
|||
$Node = intval( $_POST['NODE'] ); |
|||
$QS = "SELECT * FROM nodes WHERE id = {$Node}"; |
|||
$Result = $DATABASE->Query( $QS, false ); |
|||
if( count( $Result ) ){ |
|||
$Props = $Result[0]; |
|||
$QS = "SELECT * FROM servers WHERE id = {$Props['aux_id']}"; |
|||
$Result = $DATABASE->Query( $QS, false ); |
|||
$Server = $Result[0]; |
|||
|
|||
$TName = 'props/0_node_prop.js'; |
|||
$Data = file_get_contents( $TName ); |
|||
$Data = str_replace('%%%NODEID%%%', ''.$Node, $Data ); |
|||
$Data = str_replace('%%%NODENAME%%%', $Props['name'] , $Data ); |
|||
//Info
|
|||
$InfoData = ''; |
|||
$InfoParts = array(); |
|||
$InfoParts[] = '{ xtype: \'panel\', html: \'<div class="sideInfo_item" id="INFO_ID">'.$Server['identity'].'</div>\'}'; |
|||
if($Props['online']){ |
|||
$InfoParts[] = '{ xtype: \'panel\', html: \'<div class="sideInfo_item" id="INFO_ON">Online</div>\'}'; |
|||
}else{ |
|||
$InfoParts[] = '{ xtype: \'panel\', html: \'<div class="sideInfo_item" id="INFO_OFF">Offline</div>\'}'; |
|||
}; |
|||
$InfoData = implode( ',', $InfoParts ); |
|||
$Data = str_replace('%%%INFO%%%', $InfoData, $Data ); |
|||
// Get Sockets
|
|||
$SocketsData = ''; |
|||
$SockDataParts = array(); |
|||
$QS = "SELECT * FROM sockets WHERE `node_id`={$Node}"; |
|||
$Result = $DATABASE->Query( $QS, false ); |
|||
if( count( $Result ) ){ |
|||
foreach( $Result as $R ){ |
|||
switch( $R['type'] ){ |
|||
case ARGUS_NODE_SOCK_TYPE_SERIAL_PORT: |
|||
//Uart
|
|||
$SockDataParts[] = '{ xtype: \'panel\', html: \'<div class="sideInfo_item" id="UART_'.(($R['state']==0)?'N':'O').'_'.(($R['binded']==0)?'N':'B').'">'.$R['name'].'</div>\'}'; |
|||
break; |
|||
case ARGUS_NODE_SOCK_TYPE_VIDEO_GRABBER: |
|||
//Video Grabber
|
|||
$SockDataParts[] = '{ xtype: \'panel\', html: \'<div class="sideInfo_item" id="VIDEO_'.(($R['state']==0)?'N':'O').'_'.(($R['binded']==0)?'N':'B').'">'.$R['name'].'</div>\'}'; |
|||
break; |
|||
case ARGUS_NODE_SOCK_TYPE_NETWORK: |
|||
//Network Interface
|
|||
$SockDataParts[] = '{ xtype: \'panel\', html: \'<div class="sideInfo_item" id="NET_'.(($R['state']==0)?'N':'O').'">'.$R['name'].'</div>\'}'; |
|||
break; |
|||
default: |
|||
$SockDataParts[] = '{ xtype: \'panel\', html: \'<div align="center" style="padding: 5px; color: black; background-color: grey;">'.$R['name'].'</div>\'}'; |
|||
}; |
|||
}; |
|||
$SocketsData = implode( ',', $SockDataParts ); |
|||
}; |
|||
$Data = str_replace('%%%SOCKETS%%%', $SocketsData, $Data ); |
|||
//Get Modules
|
|||
$QS = "SELECT * FROM `server_modules` WHERE `server_id`={$Props['aux_id']}"; |
|||
$MDAT = $DATABASE->Query( $QS ); |
|||
if(count($MDAT)){ |
|||
$MODITEMS = array(); |
|||
foreach( $MDAT as $M ){ |
|||
switch( $M['type'] ){ |
|||
case 1:{ |
|||
//ZLMedia
|
|||
$MODITEMS[] = '{ xtype:\'button\', width: \'100%\', text:\'Media Server\'}'; |
|||
break; |
|||
}; |
|||
case 2:{ |
|||
//DCB_USB
|
|||
$MODITEMS[] = '{ xtype:\'button\', width: \'100%\', text:\'Dry Contacts\'}'; |
|||
break; |
|||
}; |
|||
case 3:{ |
|||
//Kafka
|
|||
$MODITEMS[] = '{ xtype:\'button\', width: \'100%\', text:\'Kafka Proxy\'}'; |
|||
break; |
|||
$TName = 'props/0_node_prop.js'; |
|||
$Data = file_get_contents( $TName ); |
|||
$Data = str_replace('%%%NODEID%%%', ''.$Node, $Data ); |
|||
$Data = str_replace('%%%NODENAME%%%', $Props['name'] , $Data ); |
|||
//Info
|
|||
$InfoData = ''; |
|||
$InfoParts = array(); |
|||
$InfoParts[] = '{ xtype: \'panel\', html: \'<div class="sideInfo_item" id="INFO_ID">'.$Server['identity'].'</div>\'}'; |
|||
if($Props['online']){ |
|||
$InfoParts[] = '{ xtype: \'panel\', html: \'<div class="sideInfo_item" id="INFO_ON">Online</div>\'}'; |
|||
}else{ |
|||
$InfoParts[] = '{ xtype: \'panel\', html: \'<div class="sideInfo_item" id="INFO_OFF">Offline</div>\'}'; |
|||
}; |
|||
case 4:{ |
|||
//GPS
|
|||
$MODITEMS[] = '{ xtype:\'button\', width: \'100%\', text:\'GPS Anchor\'}'; |
|||
break; |
|||
$InfoData = implode( ',', $InfoParts ); |
|||
$Data = str_replace('%%%INFO%%%', $InfoData, $Data ); |
|||
// Get Sockets
|
|||
$SocketsData = ''; |
|||
$SockDataParts = array(); |
|||
$QS = "SELECT * FROM resources WHERE `node_id`={$Node}"; |
|||
$Result = $DATABASE->Query( $QS, false ); |
|||
if( count( $Result ) ){ |
|||
foreach( $Result as $R ){ |
|||
switch( $R['type'] ){ |
|||
case 1: |
|||
//Uart
|
|||
$SockDataParts[] = '{ xtype: \'panel\', html: \'<div class="sideInfo_item" id="UART_'.(($R['active']==0)?'N':'O').'"><a onclick="showResourceInfo('.$R['id'].');">'.'UART Line'.'</a></div>\'}'; |
|||
break; |
|||
case 31: |
|||
//Video Grabber
|
|||
$SockDataParts[] = '{ xtype: \'panel\', html: \'<div class="sideInfo_item" id="VIDEO_'.(($R['active']==0)?'N':'O').'">'.'Analog Video'.'</div>\'}'; |
|||
break; |
|||
case 100: |
|||
//Network Interface IPV4
|
|||
$SockDataParts[] = '{ xtype: \'panel\', html: \'<div class="sideInfo_item" id="NET_'.(($R['active']==0)?'N':'O').'">'.'Network IPV4'.'</div>\'}'; |
|||
break; |
|||
case 101: |
|||
//Network Interface IPV6
|
|||
$SockDataParts[] = '{ xtype: \'panel\', html: \'<div class="sideInfo_item" id="NET_'.(($R['active']==0)?'N':'O').'">'.'Network IPV6'.'</div>\'}'; |
|||
break; |
|||
//Media Encoder Sink
|
|||
case 132: // Audio
|
|||
$SockDataParts[] = '{ xtype: \'panel\', html: \'<div class="sideInfo_item" id="MEDIA_'.(($R['active']==0)?'N':'O').'">'.'Audio Sink'.'</div>\'}'; |
|||
break; |
|||
case 131: // Vide
|
|||
$SockDataParts[] = '{ xtype: \'panel\', html: \'<div class="sideInfo_item" id="MEDIA_'.(($R['active']==0)?'N':'O').'">'.'Video Sink'.'</div>\'}'; |
|||
break; |
|||
default: |
|||
$SockDataParts[] = '{ xtype: \'panel\', html: \'<div align="center" style="padding: 5px; color: black; background-color: grey;">'.$R['device'].'</div>\'}'; |
|||
}; |
|||
}; |
|||
case 5:{ |
|||
//Netvork
|
|||
$MODITEMS[] = '{ xtype:\'button\', width: \'100%\', text:\'Network Proxy\'}'; |
|||
break; |
|||
$SocketsData = implode( ',', $SockDataParts ); |
|||
}; |
|||
case 6:{ |
|||
//FlyHunter
|
|||
$MODITEMS[] = '{ xtype:\'button\', width: \'100%\', text:\'Fly Hunter\', handler: function(){ module_prop_FlyHunter('.$M['id'].'); } }'; |
|||
break; |
|||
$Data = str_replace('%%%SOCKETS%%%', $SocketsData, $Data ); |
|||
//Get Modules
|
|||
$QS = "SELECT * FROM `server_modules` WHERE `server_id`={$Props['aux_id']}"; |
|||
$MDAT = $DATABASE->Query( $QS ); |
|||
if(count($MDAT)){ |
|||
$MODITEMS = array(); |
|||
foreach( $MDAT as $M ){ |
|||
switch( $M['type'] ){ |
|||
case 1:{ |
|||
//ZLMedia
|
|||
$MODITEMS[] = '{ xtype:\'button\', width: \'100%\', text:\'Media Server\'}'; |
|||
break; |
|||
}; |
|||
case 2:{ |
|||
//DCB_USB
|
|||
$MODITEMS[] = '{ xtype:\'button\', width: \'100%\', text:\'Dry Contacts\'}'; |
|||
break; |
|||
}; |
|||
case 3:{ |
|||
//Kafka
|
|||
$MODITEMS[] = '{ xtype:\'button\', width: \'100%\', text:\'Kafka Proxy\'}'; |
|||
break; |
|||
}; |
|||
case 4:{ |
|||
//GPS
|
|||
$MODITEMS[] = '{ xtype:\'button\', width: \'100%\', text:\'GPS Anchor\'}'; |
|||
break; |
|||
}; |
|||
case 5:{ |
|||
//Netvork
|
|||
$MODITEMS[] = '{ xtype:\'button\', width: \'100%\', text:\'Network Proxy\'}'; |
|||
break; |
|||
}; |
|||
case 6:{ |
|||
//FlyHunter
|
|||
$MODITEMS[] = '{ xtype:\'button\', width: \'100%\', text:\'Fly Hunter\', handler: function(){ module_prop_FlyHunter('.$M['id'].'); } }'; |
|||
break; |
|||
}; |
|||
}; |
|||
}; |
|||
$IMPL = implode( ',', $MODITEMS ); |
|||
$ModulesData = "{ items: [{$IMPL}]}"; |
|||
$Data = str_replace('%%%MODULES%%%', $ModulesData, $Data ); |
|||
} else { |
|||
$Data = str_replace('%%%MODULES%%%', '', $Data ); |
|||
}; |
|||
}; |
|||
echo $Data; |
|||
} else { |
|||
echo '{ html: \'Node '.$_POST['NODE'].' Loadded\'}'; |
|||
}; |
|||
$IMPL = implode( ',', $MODITEMS ); |
|||
$ModulesData = "{ items: [{$IMPL}]}"; |
|||
$Data = str_replace('%%%MODULES%%%', $ModulesData, $Data ); |
|||
} else { |
|||
$Data = str_replace('%%%MODULES%%%', '', $Data ); |
|||
}; |
|||
echo $Data; |
|||
} else { |
|||
echo '{ html: \'Node '.$_POST['NODE'].' Loadded\'}'; |
|||
}; |
|||
} else { |
|||
header('location: /'); |
|||
header('location: /'); |
|||
}; |
|||
?>
|
|||
@ -0,0 +1,33 @@ |
|||
<?php |
|||
require_once('../ajax_asm.php'); |
|||
if( $CUser->Data['id'] > 1 ){ |
|||
$Z = $_POST['NID']; |
|||
if( $Z != '' ){ |
|||
$TArr = explode( ':', $Z ); |
|||
$NodeID = intval( $TArr[0] ); |
|||
$QS = "SELECT * FROM nodes WHERE id={$NodeID}"; |
|||
$Data = array(); |
|||
$result = $DATABASE->Query( $QS, false ); |
|||
if( count( $result ) ){ |
|||
$T = $result[0]; |
|||
$AID = intval( $T['aux_id'] ); |
|||
$QS = "SELECT * FROM lrf_sensors WHERE id={$AID}"; |
|||
$result = $DATABASE->Query( $QS, false ); |
|||
if( count($result)) { |
|||
$R = $result[0]; |
|||
$K['name'] = $T['name']; |
|||
$K['dev_id'] = $AID; |
|||
//$K['data_status'] = intval( $R['data_status'] );
|
|||
$K['type'] = intval( $R['type_id'] ); |
|||
$K['range'] = floatval( $R['max_range'] ); |
|||
$QS="SELECT `profile_id` as `id`, `master`, `order`, `offset`, `delta`, `flip`, `width`, `sst`, `sun`, `gp`, `spikes` FROM `lrf_detection_profiles` WHERE `aux_id`={$AID} ORDER BY `profile_id`"; |
|||
$K['profiles'] = $DATABASE->Query( $QS, false ); |
|||
$Data = $K; |
|||
}; |
|||
}; |
|||
echo json_encode( $Data ); |
|||
exit(); |
|||
}; |
|||
}; |
|||
header('location: /'); |
|||
?>
|
|||
@ -0,0 +1,31 @@ |
|||
<?php |
|||
require_once('../ajax_asm.php'); |
|||
if( $CUser->Data['id'] > 1 ){ |
|||
$Z = $_POST['NID']; |
|||
if( $Z != '' ){ |
|||
$TArr = explode( ':', $Z ); |
|||
$NodeID = intval( $TArr[0] ); |
|||
$QS = "SELECT * FROM nodes WHERE id={$NodeID}"; |
|||
$Data = array(); |
|||
$result = $DATABASE->Query( $QS, false ); |
|||
if( count( $result ) ){ |
|||
$T = $result[0]; |
|||
$AID = intval( $T['aux_id'] ); |
|||
$QS = "SELECT * FROM lrf_sensors WHERE id={$AID}"; |
|||
$result = $DATABASE->Query( $QS, false ); |
|||
if( count($result)) { |
|||
$R = $result[0]; |
|||
$K['name'] = $T['name']; |
|||
$K['dev_id'] = $AID; |
|||
//$K['data_status'] = intval( $R['data_status'] );
|
|||
$K['type'] = intval( $R['type_id'] ); |
|||
$K['range'] = floatval( $R['max_range'] ); |
|||
$Data = $K; |
|||
}; |
|||
}; |
|||
echo json_encode( $Data ); |
|||
exit(); |
|||
}; |
|||
}; |
|||
header('location: /'); |
|||
?>
|
|||
@ -0,0 +1,31 @@ |
|||
<?php |
|||
require_once('../ajax_asm.php'); |
|||
if( $CUser->Data['id'] > 1 ){ |
|||
$EID = intval( $_POST['RID'] ); |
|||
$QS = "SELECT * FROM resources WHERE id = {$EID}"; |
|||
$Result = $DATABASE->Query( $QS, false ); |
|||
if( count( $Result ) ){ |
|||
$CR = $Result[0]; |
|||
switch( $CR['type'] ){ |
|||
case 1: //https://bufferwall.com/posts/330881001ji1a/
|
|||
$QS = "SELECT * FROM uart_settings WHERE id={$CR['aux_id']}"; |
|||
$Result = $DATABASE->Query( $QS ); |
|||
$Z = $Result[0]; |
|||
$R_name = 'UART connected to a Server Appliance'; |
|||
$R_dev = $CR['device']; |
|||
$R_nfo = 'Speed: ' . $Z['speed'] . ', Bits: ' . $Z['bit'] . ', Parity: ' . $Z['parity'] . ', Stop Bit: '. $Z['stop_bit']; |
|||
break; |
|||
}; |
|||
echo "{ xtype: 'panel', html: '<table width=\"100%\" border=0><tr><td rowspan=3 width=\"256px\">"; |
|||
echo "<img id=\"res_info_image\" src=\"/style/assets/unnamed.png\"></td>"; |
|||
echo "<td>{$R_name}</td></tr>"; |
|||
echo "<tr><td>{$R_dev}</td></tr>"; |
|||
echo "<tr><td>{$R_nfo}</td></tr>"; |
|||
echo "</table>'}"; |
|||
} else { |
|||
echo '{ xtype: \'panel\', html: \'Node '.$_POST['NODE'].' Loadded\'}'; |
|||
}; |
|||
} else { |
|||
header('location: /'); |
|||
}; |
|||
?>
|
|||
@ -1,16 +0,0 @@ |
|||
<?php |
|||
require_once('../ajax_asm.php'); |
|||
if( $CUser->Data['id'] > 1 ){ |
|||
$Data['status'] = 'OK'; |
|||
$GID = intval($_POST['NID']); |
|||
$QS = "SELECT * FROM nodes WHERE site_id ={$GID}"; |
|||
$Result = $DATABASE->Query( $QS, false ); |
|||
foreach( $Result as $CD ){ |
|||
$cnode['id'] = $CD['id']; |
|||
$Data['nodes'][] = $cnode; |
|||
}; |
|||
} else { |
|||
$Data['status']='LOGOUT'; |
|||
}; |
|||
echo json_encode( $Data ); |
|||
?>
|
|||
@ -0,0 +1,140 @@ |
|||
<?php |
|||
require_once('../ajax_asm.php'); |
|||
$UID = intval( $CUser->Data['id'] ); |
|||
$ACCESS = intval( $CUser->Data['access'] ); |
|||
if( $UID > 1 ){ |
|||
$SiteID = intval( $_POST['SITE'] ); |
|||
$LastNID = intval( $_POST['LNID'] ); |
|||
$LastServerPID = intval( $_POST['SPID'] ); |
|||
$Data = array(); |
|||
$ServerWasHuped = false; |
|||
$ServerIsOnLine = true; |
|||
$Data['status'] = 'OK'; |
|||
$CTS = time(); |
|||
$Data['nodes'] = array(); |
|||
$QS = "SELECT * FROM nodes WHERE site_id = {$SiteID} ORDER BY `type`"; |
|||
$result = $DATABASE->Query( $QS, false ); |
|||
if( count( $result ) > 0 ){ |
|||
foreach( $result as $R ){ |
|||
$CN = array(); |
|||
$CN['id'] = $R['id']; |
|||
$CN['type'] = intval($R['type']); |
|||
if( $ServerIsOnLine ){ |
|||
$CN['status'] = intval($R['online']); |
|||
} else { |
|||
$CN['status'] = 0; |
|||
}; |
|||
if( $CN['status'] == 1 || $ServerIsOnLine ){ |
|||
switch( $R['type'] ){ |
|||
case ARGUS_SERVER:{ |
|||
$QS="SELECT * FROM `servers` WHERE `id`={$R['aux_id']}"; |
|||
$zult = $DATABASE->Query( $QS ); |
|||
if( $zult[0]['online'] == 1 ){ |
|||
$STS = intval( $zult[0]['ts'] ); |
|||
$CN['CTS'] = $CTS; |
|||
$CN['STS'] = $STS; |
|||
if( ( $CTS - $STS ) > 1 ){ //3 seconds offline
|
|||
$ServerIsOnLine = false; |
|||
$CN['status'] = 0; |
|||
} else { |
|||
$CN['status'] = 1; |
|||
}; |
|||
} else { |
|||
$ServerIsOnLine = false; |
|||
$CN['status'] = 0; |
|||
}; |
|||
$CN['cpu1'] = intval( $zult[0]['stat_cpu1'] * 2.5 ); |
|||
$CN['cpu5'] = intval( $zult[0]['stat_cpu5'] ); |
|||
$CN['cpu15'] = intval( $zult[0]['stat_cpu15'] * 2.5 ); |
|||
$CN['mem'] = intval( $zult[0]['stat_mem']*100 ); |
|||
$CN['disk']= intval( $zult[0]['stat_disk']*100 ); |
|||
break; |
|||
}; |
|||
case ARGUS_ALS_SENSOR: |
|||
case ARGUS_LFS_SENSOR: |
|||
case ARGUS_PLS_200_SENSOR: |
|||
case ARGUS_PLS_360_SENSOR: |
|||
case ARGUS_NET_PLS_200:{ |
|||
// check Targets
|
|||
$CN['targets'] = array(); |
|||
$QS="SELECT * FROM events_cloud WHERE node_id={$CN['id']} AND ( evt_type=13 OR evt_type=14) ORDER BY id DESC LIMIT 32"; |
|||
//$QS="SELECT * FROM events_cloud WHERE node_id={$CN['id']} AND ( evt_type=13 OR evt_type=14) AND (UNIX_TIMESTAMP(NOW())-ts)<60 ORDER BY id DESC LIMIT 32";
|
|||
//$QS="SELECT * FROM events_cloud WHERE node_id={$CN['id']} AND ( evt_type=13 OR evt_type=14) ORDER BY ts, ts_ms DESC LIMIT 32";
|
|||
//echo $QS . "\n\n";
|
|||
$zult = $DATABASE->Query( $QS ); |
|||
if( count( $zult ) ){ |
|||
$CN['status'] = 4; // Alarmed
|
|||
$CT = array(); |
|||
foreach( $zult as $Z ){ |
|||
$CT['digital'] = $Z['range_digital']; |
|||
$CT['az'] = $Z['azimuth']; |
|||
$CN['targets'][] = $CT; |
|||
}; |
|||
}; |
|||
break; |
|||
}; |
|||
case ARGUS_3D_SENSOR:{ |
|||
break; |
|||
}; |
|||
case ARGUS_ANALOG_STATIC_CAMERA: |
|||
case ARGUS_ANALOG_PTZ_CAMERA: |
|||
case ARGUS_IP_STATIC_CAMERA: |
|||
case ARGUS_IP_PTZ_CAMERA:{ |
|||
if( $ServerIsOnLine ){ |
|||
$QS="SELECT * FROM `media_streams` WHERE `id`={$R['aux_parameter']}"; |
|||
$SR=$DATABASE->Query( $QS ); |
|||
if( count( $SR ) ) { |
|||
$ST = $SR[0]; |
|||
if( $ST['valid'] == 1 ){ |
|||
$CN['valid'] = true; |
|||
$QS="SELECT * FROM `module_embed_video_settings` WHERE `id`=1"; |
|||
$S=$DATABASE->Query( $QS ); |
|||
$CN['src'] = 'http://' . $_SERVER['SERVER_ADDR'].':' . $S[0]['web_port'] .'/stream?id='. $R['aux_parameter']; |
|||
break; |
|||
}; |
|||
}; |
|||
}; |
|||
$CN['valid'] = false; |
|||
$CN['src'] = "/style/assets/no-signal.png"; |
|||
break; |
|||
}; |
|||
}; |
|||
}; |
|||
$Data['nodes'][] = $CN; |
|||
}; |
|||
}; |
|||
// Notifications
|
|||
$Data['notifications'] = array(); |
|||
$QS = "SELECT * FROM `notifications` WHERE `status`='A' AND `site_id`={$SiteID} AND `id` > {$LastNID}"; |
|||
$result = $DATABASE->Query( $QS ); |
|||
if( count( $result ) ){ |
|||
foreach( $result as $R ){ |
|||
$cn['id'] = intval( $R['id'] ); |
|||
$cn['react'] = false; |
|||
$cn['hide'] = true; |
|||
$cn['action']= ''; |
|||
switch( intval( $R['type'] ) ){ |
|||
case 0:{ |
|||
$cn['type']= 'info'; |
|||
$cn['msg'] = $Labels->GetLabel('SYS_WELCOME_MSG'); |
|||
break; |
|||
}; |
|||
case 1:{ |
|||
$cn['type']= 'error'; |
|||
$QS="SELECT `name` FROM `nodes` WHERE `id`={$R['obj_id']}"; |
|||
$RR = $DATABASE->Query( $QS ); |
|||
$cn['msg'] = $Labels->GetLabel('SYS_MSG_DEVINV') . ' <b>' . $RR[0]['name'] .'</b>'; |
|||
$cn['hide'] = false; |
|||
$cn['react'] = true; |
|||
$cn['action'] = $R['obj_id'].':'.$cn['id']; |
|||
}; |
|||
}; |
|||
$Data['notifications'][] = $cn; |
|||
}; |
|||
}; |
|||
} else { |
|||
$Data['notifications'] = array(); |
|||
$Data['status']='LOGOUT'; |
|||
}; |
|||
echo json_encode( $Data ); |
|||
?>
|
|||
@ -0,0 +1,137 @@ |
|||
<?php |
|||
require_once('../ajax_asm.php'); |
|||
|
|||
function deleteNode( $NodeID ){ |
|||
global $DATABASE; |
|||
$QS = "SELECT * FROM `nodes` WHERE `id`={$NodeID}"; |
|||
$Result = $DATABASE->Query( $QS ); |
|||
if( count( $Result ) ){ |
|||
$ND = $Result[0]; |
|||
switch( $ND['type'] ){ |
|||
// Server
|
|||
case 0:{ |
|||
// Clear Resources
|
|||
$QS = "SELECT * FROM `resources` WHERE `node_id`={$NodeID}"; |
|||
$RES = $DATABASE->Query( $QS ); |
|||
foreach( $RES as $R ){ |
|||
switch( $R['type'] ){ |
|||
// Handle UARTS
|
|||
case 1:{ |
|||
$QS = "DELETE FROM `uart_settings` WHERE `id`={$R['aux_id']}"; |
|||
$DATABASE->Query( $QS ); |
|||
break; |
|||
}; |
|||
// Handle Analog Video Grabber
|
|||
case 31:{ |
|||
$QS = "DELETE FROM `media_streams` WHERE `id`={$R['aux_id']}"; |
|||
$DATABASE->Query( $QS ); |
|||
break; |
|||
}; |
|||
}; |
|||
$QS = "DELETE FROM `resources` WHERE `id`={$R['id']}"; |
|||
$DATABASE->Query( $QS ); |
|||
}; |
|||
break; |
|||
}; |
|||
// Sensors
|
|||
case 1: |
|||
case 2: |
|||
case 3: |
|||
case 4: |
|||
case 5: |
|||
case 6:{ |
|||
$QS = "DELETE FROM `lrf_sensors` WHERE `id`={$ND['aux_id']}"; |
|||
$DATABASE->Query( $QS ); |
|||
$QS = "DELETE FROM `lrf_detection_profiles` WHERE `aux_id`={$ND['aux_id']}"; |
|||
$DATABASE->Query( $QS ); |
|||
$QS = "SELECT * FROM `lrf_draw` WHERE `node_id`={$ND['id']}"; |
|||
$DR = $DATABASE->Query( $QS ); |
|||
if( count( $DR ) ){ |
|||
foreach( $DR as $R ){ |
|||
$FF = "data/device_draws/{$R['md5']}.raw"; |
|||
unlink($FF); |
|||
if( $R['rendered'] == 'Y' ){ |
|||
$FF = "data/device_draws/{$R['md5']}_100.png"; |
|||
unlink($FF); |
|||
$FF = "data/device_draws/{$R['md5']}_50.png"; |
|||
unlink($FF); |
|||
$FF = "data/device_draws/{$R['md5']}_25.png"; |
|||
unlink($FF); |
|||
$FF = "data/device_draws/{$R['md5']}_12.png"; |
|||
unlink($FF); |
|||
}; |
|||
}; |
|||
$QS = "DELETE FROM `lrf_draw` WHERE `node_id`={$ND['id']}"; |
|||
$DATABASE->Query( $QS ); |
|||
}; |
|||
break; |
|||
}; |
|||
// Cameras
|
|||
case 10: |
|||
case 11: |
|||
case 12: |
|||
case 13:{ |
|||
$QS = "DELETE FROM `media_streams` WHERE `source_id`={$ND['aux_id']} OR `id`={$ND['aux_parameter']}"; |
|||
$DATABASE->Query( $QS ); |
|||
$QS = "DELETE FROM `cameras` WHERE `id`={$ND['aux_id']}"; |
|||
$DATABASE->Query( $QS ); |
|||
break; |
|||
}; |
|||
// IP UART
|
|||
case 20:{ |
|||
|
|||
|
|||
break; |
|||
}; |
|||
default:{ |
|||
|
|||
}; |
|||
}; |
|||
$QS = "DELETE FROM `connections` WHERE `from`={$ND['id']} OR `to`={$ND['id']}"; |
|||
$DATABASE->Query( $QS ); |
|||
$QS = "DELETE FROM `resources` WHERE `node_id`={$ND['id']}"; |
|||
$DATABASE->Query( $QS ); |
|||
if( $ND['type'] != 0 ){ |
|||
$QS = "DELETE FROM `nodes` WHERE `id`={$ND['id']}"; |
|||
$DATABASE->Query( $QS ); |
|||
}; |
|||
}; |
|||
}; |
|||
|
|||
$UID = intval( $CUser->Data['id'] ); |
|||
$ACCESS = intval( $CUser->Data['access'] ); |
|||
if( isset( $_POST['SAID'] ) ){ |
|||
$SITE = intval( $_POST['SAID'] ); |
|||
} else $SITE = 0; |
|||
if( $UID > 1 ){ |
|||
if( $SITE == $CUser->Data['selected_site'] ){ |
|||
if( $ACCESS > 5 ){ |
|||
$QS = "SELECT `id` FROM `nodes` WHERE `site_id`={$SITE}"; |
|||
$Nodes = $DATABASE->Query( $QS ); |
|||
foreach( $Nodes as $Node ) deleteNode( $Node['id'] ); |
|||
$QS = "INSERT INTO `access_log` SET `ts`=NOW(), `user_id`={$UID}, `cmd`=255"; |
|||
$DATABASE->Query( $QS ); |
|||
// Restart Setver(s)
|
|||
$QS = "SELECT * FROM `nodes` WHERE `site_id`={$SITE} AND `type`=0"; |
|||
$SR = $DATABASE->Query( $QS ); |
|||
foreach( $SR as $S ){ |
|||
$QS = "INSERT INTO `servers_queue` SET `server_id`={$S['aux_id']}, `ts`=NOW(), `cmd`=251"; |
|||
$DATABASE->Query( $QS ); |
|||
}; |
|||
} else { |
|||
// Log Security Treat!
|
|||
$QS = "INSERT INTO `access_log` SET `ts`=NOW(), `user_id`={$UID}, `cmd`=13, `dataset`='{\"action\":255}'"; |
|||
$DATABASE->Query( $QS ); |
|||
$Data['notifications'] = array(); |
|||
$Data['status']='ACCESS'; |
|||
}; |
|||
} else { |
|||
$Data['notifications'] = array(); |
|||
$Data['status']='LOGOUT'; |
|||
}; |
|||
} else { |
|||
$Data['notifications'] = array(); |
|||
$Data['status']='LOGOUT'; |
|||
}; |
|||
echo json_encode( $Data ); |
|||
?>
|
|||
@ -0,0 +1,37 @@ |
|||
<?php |
|||
require_once('../ajax_asm.php'); |
|||
$UID = intval( $CUser->Data['id'] ); |
|||
$ACCESS = intval( $CUser->Data['access'] ); |
|||
if( $UID > 1 && $ACCESS > 1 ){ |
|||
$INFO = $_POST['NID']; |
|||
if( $INFO != '' ){ |
|||
$TArr = explode( ':', $INFO ); |
|||
$NodeID = intval( $TArr[0]); |
|||
$NoteID = intval( $TArr[1]); |
|||
$METHOD = intval( $_POST['MET'] ); |
|||
$Data = array(); |
|||
$QS = "SELECT * FROM nodes WHERE id={$NodeID}"; |
|||
$result = $DATABASE->Query( $QS ); |
|||
if( count( $result ) ){ |
|||
$DevID = intval( $result[0]['aux_id'] ); |
|||
switch( $METHOD ){ |
|||
case 1:{ |
|||
$QS = "UPDATE lrf_sensors SET data_status = 1 WHERE id={$result[0]['aux_id']}"; |
|||
$DATABASE->Query( $QS ); |
|||
$QS = "UPDATE notifications SET status='D' WHERE id={$NoteID}"; |
|||
$DATABASE->Query( $QS ); |
|||
$QS = "INSERT INTO `access_log` SET `ts`=NOW(), `user_id`={$UID},`cmd`=10, `dataset`='{\"node\":{$NodeID},\"note\":{$NoteID},\"method\":1}'"; |
|||
$DATABASE->Query( $QS ); |
|||
break; |
|||
}; |
|||
}; |
|||
$Data['status'] = 'OK'; |
|||
} else { |
|||
$Data['status'] = 'NONODE'; |
|||
}; |
|||
}; |
|||
} else { |
|||
$Data['status']='NOACCESS'; |
|||
}; |
|||
echo json_encode( $Data ); |
|||
?>
|
|||
2
lib/javascript/howler/howler.core.min.js
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
3242
lib/javascript/howler/howler.js
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
4
lib/javascript/howler/howler.min.js
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
2
lib/javascript/howler/howler.spatial.min.js
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
13
lib/javascript/pnotyfy/Angeler.css
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
13
lib/javascript/pnotyfy/BrightTheme.css
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
1
lib/javascript/pnotyfy/Material.css
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1 @@ |
|||
body>.pnotify.pnotify-positioned{position:fixed;z-index:100040}body>.pnotify.pnotify-modal{z-index:100042}.pnotify{height:auto;display:none;transition:opacity .1s linear;opacity:0}.pnotify.pnotify-positioned{position:absolute;z-index:1}.pnotify.pnotify-modal{z-index:3}.pnotify.pnotify-in{display:block;opacity:1}.pnotify.pnotify-initial{display:block}.pnotify-hidden{visibility:hidden}.pnotify.pnotify-move{transition:left .4s ease,top .4s ease,right .4s ease,bottom .4s ease}.pnotify.pnotify-fade-slow{transition:opacity .4s linear;opacity:0}.pnotify.pnotify-fade-slow.pnotify.pnotify-move{transition:opacity .4s linear,left .4s ease,top .4s ease,right .4s ease,bottom .4s ease}.pnotify.pnotify-fade-normal{transition:opacity .25s linear;opacity:0}.pnotify.pnotify-fade-normal.pnotify.pnotify-move{transition:opacity .25s linear,left .4s ease,top .4s ease,right .4s ease,bottom .4s ease}.pnotify.pnotify-fade-fast{transition:opacity .1s linear;opacity:0}.pnotify.pnotify-fade-fast.pnotify.pnotify-move{transition:opacity .1s linear,left .4s ease,top .4s ease,right .4s ease,bottom .4s ease}.pnotify.pnotify-masking{display:block;-webkit-mask-image:linear-gradient( to bottom,rgba(0,0,0,0.8),rgba(0,0,0,0) 30px,rgba(0,0,0,0) );mask-image:linear-gradient( to bottom,rgba(0,0,0,0.8),rgba(0,0,0,0) 30px,rgba(0,0,0,0) )}.pnotify.pnotify-masking.pnotify-stack-up{-webkit-mask-image:linear-gradient( to top,rgba(0,0,0,0.8),rgba(0,0,0,0) 30px,rgba(0,0,0,0) );mask-image:linear-gradient( to top,rgba(0,0,0,0.8),rgba(0,0,0,0) 30px,rgba(0,0,0,0) )}.pnotify.pnotify-masking.pnotify-stack-left{-webkit-mask-image:linear-gradient( to left,rgba(0,0,0,0.8),rgba(0,0,0,0) 30px,rgba(0,0,0,0) );mask-image:linear-gradient( to left,rgba(0,0,0,0.8),rgba(0,0,0,0) 30px,rgba(0,0,0,0) )}.pnotify.pnotify-masking.pnotify-stack-right{-webkit-mask-image:linear-gradient( to right,rgba(0,0,0,0.8),rgba(0,0,0,0) 30px,rgba(0,0,0,0) );mask-image:linear-gradient( to right,rgba(0,0,0,0.8),rgba(0,0,0,0) 30px,rgba(0,0,0,0) )}.pnotify.pnotify-fade-in,.pnotify.pnotify-masking-in{opacity:1}.pnotify .pnotify-shadow{-webkit-box-shadow:0 6px 28px 0 rgba(0,0,0,.1);-moz-box-shadow:0 6px 28px 0 rgba(0,0,0,.1);box-shadow:0 6px 28px 0 rgba(0,0,0,.1)}.pnotify-container{position:relative;background-position:0 0;padding:.8em;height:100%;margin:0}.pnotify-container:after{content:' ';visibility:hidden;display:block;height:0;clear:both}.pnotify-closer,.pnotify-sticker{float:right;margin-left:.5em;cursor:pointer}[dir=rtl] .pnotify-closer,[dir=rtl] .pnotify-sticker{float:left;margin-right:.5em;margin-left:0}.pnotify-title{display:block;white-space:pre-line;margin-bottom:.4em;margin-top:0}.pnotify-text-with-max-height{overflow-y:auto;overscroll-behavior:contain;padding-bottom:.03em}.pnotify.pnotify-with-icon .pnotify-content{margin-left:24px}[dir=rtl] .pnotify.pnotify-with-icon .pnotify-content{margin-right:24px;margin-left:0}.pnotify-pre-line{white-space:pre-line}.pnotify-icon,.pnotify-icon span{display:block;float:left}[dir=rtl] .pnotify-icon,[dir=rtl] .pnotify-icon span{float:right}.pnotify-modal-overlay{background-color:rgba(0,0,0,.6);top:0;left:0;position:absolute;height:100%;width:100%;z-index:2;transition:opacity .25s linear;opacity:0;padding:0;display:flex;justify-content:center;align-items:flex-end}.pnotify-modal-overlay-up{align-items:flex-start}.pnotify-modal-overlay-left{justify-content:flex-start;align-items:center}.pnotify-modal-overlay-right{justify-content:flex-end;align-items:center}.pnotify-modal-overlay.pnotify-modal-overlay-in{opacity:1}.pnotify-modal-overlay-closes:after{content:'×';font-family:Arial;font-size:3rem;color:#fff;text-shadow:0 0 .4rem #fff}body>.pnotify-modal-overlay{position:fixed;z-index:100041} |
|||
5269
lib/javascript/pnotyfy/PNotify.js
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,612 @@ |
|||
(function (global, factory) { |
|||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : |
|||
typeof define === 'function' && define.amd ? define(['exports'], factory) : |
|||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.PNotifyAnimate = {})); |
|||
}(this, (function (exports) { 'use strict'; |
|||
|
|||
function _typeof(obj) { |
|||
"@babel/helpers - typeof"; |
|||
|
|||
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { |
|||
_typeof = function (obj) { |
|||
return typeof obj; |
|||
}; |
|||
} else { |
|||
_typeof = function (obj) { |
|||
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; |
|||
}; |
|||
} |
|||
|
|||
return _typeof(obj); |
|||
} |
|||
|
|||
function _classCallCheck(instance, Constructor) { |
|||
if (!(instance instanceof Constructor)) { |
|||
throw new TypeError("Cannot call a class as a function"); |
|||
} |
|||
} |
|||
|
|||
function _defineProperties(target, props) { |
|||
for (var i = 0; i < props.length; i++) { |
|||
var descriptor = props[i]; |
|||
descriptor.enumerable = descriptor.enumerable || false; |
|||
descriptor.configurable = true; |
|||
if ("value" in descriptor) descriptor.writable = true; |
|||
Object.defineProperty(target, descriptor.key, descriptor); |
|||
} |
|||
} |
|||
|
|||
function _createClass(Constructor, protoProps, staticProps) { |
|||
if (protoProps) _defineProperties(Constructor.prototype, protoProps); |
|||
if (staticProps) _defineProperties(Constructor, staticProps); |
|||
return Constructor; |
|||
} |
|||
|
|||
function _inherits(subClass, superClass) { |
|||
if (typeof superClass !== "function" && superClass !== null) { |
|||
throw new TypeError("Super expression must either be null or a function"); |
|||
} |
|||
|
|||
subClass.prototype = Object.create(superClass && superClass.prototype, { |
|||
constructor: { |
|||
value: subClass, |
|||
writable: true, |
|||
configurable: true |
|||
} |
|||
}); |
|||
if (superClass) _setPrototypeOf(subClass, superClass); |
|||
} |
|||
|
|||
function _getPrototypeOf(o) { |
|||
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { |
|||
return o.__proto__ || Object.getPrototypeOf(o); |
|||
}; |
|||
return _getPrototypeOf(o); |
|||
} |
|||
|
|||
function _setPrototypeOf(o, p) { |
|||
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { |
|||
o.__proto__ = p; |
|||
return o; |
|||
}; |
|||
|
|||
return _setPrototypeOf(o, p); |
|||
} |
|||
|
|||
function _isNativeReflectConstruct() { |
|||
if (typeof Reflect === "undefined" || !Reflect.construct) return false; |
|||
if (Reflect.construct.sham) return false; |
|||
if (typeof Proxy === "function") return true; |
|||
|
|||
try { |
|||
Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); |
|||
return true; |
|||
} catch (e) { |
|||
return false; |
|||
} |
|||
} |
|||
|
|||
function _assertThisInitialized(self) { |
|||
if (self === void 0) { |
|||
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); |
|||
} |
|||
|
|||
return self; |
|||
} |
|||
|
|||
function _possibleConstructorReturn(self, call) { |
|||
if (call && (typeof call === "object" || typeof call === "function")) { |
|||
return call; |
|||
} |
|||
|
|||
return _assertThisInitialized(self); |
|||
} |
|||
|
|||
function _createSuper(Derived) { |
|||
var hasNativeReflectConstruct = _isNativeReflectConstruct(); |
|||
|
|||
return function _createSuperInternal() { |
|||
var Super = _getPrototypeOf(Derived), |
|||
result; |
|||
|
|||
if (hasNativeReflectConstruct) { |
|||
var NewTarget = _getPrototypeOf(this).constructor; |
|||
|
|||
result = Reflect.construct(Super, arguments, NewTarget); |
|||
} else { |
|||
result = Super.apply(this, arguments); |
|||
} |
|||
|
|||
return _possibleConstructorReturn(this, result); |
|||
}; |
|||
} |
|||
|
|||
function _toConsumableArray(arr) { |
|||
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); |
|||
} |
|||
|
|||
function _arrayWithoutHoles(arr) { |
|||
if (Array.isArray(arr)) return _arrayLikeToArray(arr); |
|||
} |
|||
|
|||
function _iterableToArray(iter) { |
|||
if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); |
|||
} |
|||
|
|||
function _unsupportedIterableToArray(o, minLen) { |
|||
if (!o) return; |
|||
if (typeof o === "string") return _arrayLikeToArray(o, minLen); |
|||
var n = Object.prototype.toString.call(o).slice(8, -1); |
|||
if (n === "Object" && o.constructor) n = o.constructor.name; |
|||
if (n === "Map" || n === "Set") return Array.from(o); |
|||
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); |
|||
} |
|||
|
|||
function _arrayLikeToArray(arr, len) { |
|||
if (len == null || len > arr.length) len = arr.length; |
|||
|
|||
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; |
|||
|
|||
return arr2; |
|||
} |
|||
|
|||
function _nonIterableSpread() { |
|||
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); |
|||
} |
|||
|
|||
function noop() {} |
|||
|
|||
function run(fn) { |
|||
return fn(); |
|||
} |
|||
|
|||
function blank_object() { |
|||
return Object.create(null); |
|||
} |
|||
|
|||
function run_all(fns) { |
|||
fns.forEach(run); |
|||
} |
|||
|
|||
function is_function(thing) { |
|||
return typeof thing === 'function'; |
|||
} |
|||
|
|||
function safe_not_equal(a, b) { |
|||
return a != a ? b == b : a !== b || a && _typeof(a) === 'object' || typeof a === 'function'; |
|||
} |
|||
|
|||
function is_empty(obj) { |
|||
return Object.keys(obj).length === 0; |
|||
} |
|||
|
|||
function detach(node) { |
|||
node.parentNode.removeChild(node); |
|||
} |
|||
|
|||
function children(element) { |
|||
return Array.from(element.childNodes); |
|||
} |
|||
|
|||
var current_component; |
|||
|
|||
function set_current_component(component) { |
|||
current_component = component; |
|||
} |
|||
|
|||
function get_current_component() { |
|||
if (!current_component) throw new Error('Function called outside component initialization'); |
|||
return current_component; |
|||
} |
|||
|
|||
function onDestroy(fn) { |
|||
get_current_component().$$.on_destroy.push(fn); |
|||
} |
|||
|
|||
var dirty_components = []; |
|||
var binding_callbacks = []; |
|||
var render_callbacks = []; |
|||
var flush_callbacks = []; |
|||
var resolved_promise = Promise.resolve(); |
|||
var update_scheduled = false; |
|||
|
|||
function schedule_update() { |
|||
if (!update_scheduled) { |
|||
update_scheduled = true; |
|||
resolved_promise.then(flush); |
|||
} |
|||
} |
|||
|
|||
function add_render_callback(fn) { |
|||
render_callbacks.push(fn); |
|||
} |
|||
|
|||
var flushing = false; |
|||
var seen_callbacks = new Set(); |
|||
|
|||
function flush() { |
|||
if (flushing) return; |
|||
flushing = true; |
|||
|
|||
do { |
|||
// first, call beforeUpdate functions
|
|||
// and update components
|
|||
for (var i = 0; i < dirty_components.length; i += 1) { |
|||
var component = dirty_components[i]; |
|||
set_current_component(component); |
|||
update(component.$$); |
|||
} |
|||
|
|||
set_current_component(null); |
|||
dirty_components.length = 0; |
|||
|
|||
while (binding_callbacks.length) { |
|||
binding_callbacks.pop()(); |
|||
} // then, once components are updated, call
|
|||
// afterUpdate functions. This may cause
|
|||
// subsequent updates...
|
|||
|
|||
|
|||
for (var _i = 0; _i < render_callbacks.length; _i += 1) { |
|||
var callback = render_callbacks[_i]; |
|||
|
|||
if (!seen_callbacks.has(callback)) { |
|||
// ...so guard against infinite loops
|
|||
seen_callbacks.add(callback); |
|||
callback(); |
|||
} |
|||
} |
|||
|
|||
render_callbacks.length = 0; |
|||
} while (dirty_components.length); |
|||
|
|||
while (flush_callbacks.length) { |
|||
flush_callbacks.pop()(); |
|||
} |
|||
|
|||
update_scheduled = false; |
|||
flushing = false; |
|||
seen_callbacks.clear(); |
|||
} |
|||
|
|||
function update($$) { |
|||
if ($$.fragment !== null) { |
|||
$$.update(); |
|||
run_all($$.before_update); |
|||
var dirty = $$.dirty; |
|||
$$.dirty = [-1]; |
|||
$$.fragment && $$.fragment.p($$.ctx, dirty); |
|||
$$.after_update.forEach(add_render_callback); |
|||
} |
|||
} |
|||
|
|||
var outroing = new Set(); |
|||
|
|||
function transition_in(block, local) { |
|||
if (block && block.i) { |
|||
outroing["delete"](block); |
|||
block.i(local); |
|||
} |
|||
} |
|||
|
|||
function mount_component(component, target, anchor) { |
|||
var _component$$$ = component.$$, |
|||
fragment = _component$$$.fragment, |
|||
on_mount = _component$$$.on_mount, |
|||
on_destroy = _component$$$.on_destroy, |
|||
after_update = _component$$$.after_update; |
|||
fragment && fragment.m(target, anchor); // onMount happens before the initial afterUpdate
|
|||
|
|||
add_render_callback(function () { |
|||
var new_on_destroy = on_mount.map(run).filter(is_function); |
|||
|
|||
if (on_destroy) { |
|||
on_destroy.push.apply(on_destroy, _toConsumableArray(new_on_destroy)); |
|||
} else { |
|||
// Edge case - component was destroyed immediately,
|
|||
// most likely as a result of a binding initialising
|
|||
run_all(new_on_destroy); |
|||
} |
|||
|
|||
component.$$.on_mount = []; |
|||
}); |
|||
after_update.forEach(add_render_callback); |
|||
} |
|||
|
|||
function destroy_component(component, detaching) { |
|||
var $$ = component.$$; |
|||
|
|||
if ($$.fragment !== null) { |
|||
run_all($$.on_destroy); |
|||
$$.fragment && $$.fragment.d(detaching); // TODO null out other refs, including component.$$ (but need to
|
|||
// preserve final state?)
|
|||
|
|||
$$.on_destroy = $$.fragment = null; |
|||
$$.ctx = []; |
|||
} |
|||
} |
|||
|
|||
function make_dirty(component, i) { |
|||
if (component.$$.dirty[0] === -1) { |
|||
dirty_components.push(component); |
|||
schedule_update(); |
|||
component.$$.dirty.fill(0); |
|||
} |
|||
|
|||
component.$$.dirty[i / 31 | 0] |= 1 << i % 31; |
|||
} |
|||
|
|||
function init(component, options, instance, create_fragment, not_equal, props) { |
|||
var dirty = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : [-1]; |
|||
var parent_component = current_component; |
|||
set_current_component(component); |
|||
var prop_values = options.props || {}; |
|||
var $$ = component.$$ = { |
|||
fragment: null, |
|||
ctx: null, |
|||
// state
|
|||
props: props, |
|||
update: noop, |
|||
not_equal: not_equal, |
|||
bound: blank_object(), |
|||
// lifecycle
|
|||
on_mount: [], |
|||
on_destroy: [], |
|||
before_update: [], |
|||
after_update: [], |
|||
context: new Map(parent_component ? parent_component.$$.context : []), |
|||
// everything else
|
|||
callbacks: blank_object(), |
|||
dirty: dirty, |
|||
skip_bound: false |
|||
}; |
|||
var ready = false; |
|||
$$.ctx = instance ? instance(component, prop_values, function (i, ret) { |
|||
var value = (arguments.length <= 2 ? 0 : arguments.length - 2) ? arguments.length <= 2 ? undefined : arguments[2] : ret; |
|||
|
|||
if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) { |
|||
if (!$$.skip_bound && $$.bound[i]) $$.bound[i](value); |
|||
if (ready) make_dirty(component, i); |
|||
} |
|||
|
|||
return ret; |
|||
}) : []; |
|||
$$.update(); |
|||
ready = true; |
|||
run_all($$.before_update); // `false` as a special case of no DOM component
|
|||
|
|||
$$.fragment = create_fragment ? create_fragment($$.ctx) : false; |
|||
|
|||
if (options.target) { |
|||
if (options.hydrate) { |
|||
var nodes = children(options.target); // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|||
|
|||
$$.fragment && $$.fragment.l(nodes); |
|||
nodes.forEach(detach); |
|||
} else { |
|||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|||
$$.fragment && $$.fragment.c(); |
|||
} |
|||
|
|||
if (options.intro) transition_in(component.$$.fragment); |
|||
mount_component(component, options.target, options.anchor); |
|||
flush(); |
|||
} |
|||
|
|||
set_current_component(parent_component); |
|||
} |
|||
|
|||
var SvelteComponent = /*#__PURE__*/function () { |
|||
function SvelteComponent() { |
|||
_classCallCheck(this, SvelteComponent); |
|||
} |
|||
|
|||
_createClass(SvelteComponent, [{ |
|||
key: "$destroy", |
|||
value: function $destroy() { |
|||
destroy_component(this, 1); |
|||
this.$destroy = noop; |
|||
} |
|||
}, { |
|||
key: "$on", |
|||
value: function $on(type, callback) { |
|||
var callbacks = this.$$.callbacks[type] || (this.$$.callbacks[type] = []); |
|||
callbacks.push(callback); |
|||
return function () { |
|||
var index = callbacks.indexOf(callback); |
|||
if (index !== -1) callbacks.splice(index, 1); |
|||
}; |
|||
} |
|||
}, { |
|||
key: "$set", |
|||
value: function $set($$props) { |
|||
if (this.$$set && !is_empty($$props)) { |
|||
this.$$.skip_bound = true; |
|||
this.$$set($$props); |
|||
this.$$.skip_bound = false; |
|||
} |
|||
} |
|||
}]); |
|||
|
|||
return SvelteComponent; |
|||
}(); |
|||
|
|||
var position = "PrependContainer"; |
|||
var defaults = { |
|||
inClass: null, |
|||
outClass: null |
|||
}; |
|||
|
|||
function instance($$self, $$props, $$invalidate) { |
|||
var _$$props$self = $$props.self, |
|||
self = _$$props$self === void 0 ? null : _$$props$self; |
|||
var _$$props$inClass = $$props.inClass, |
|||
inClass = _$$props$inClass === void 0 ? defaults.inClass : _$$props$inClass; |
|||
var _$$props$outClass = $$props.outClass, |
|||
outClass = _$$props$outClass === void 0 ? defaults.outClass : _$$props$outClass; |
|||
var _animation = self.animation; |
|||
var _animateIn = self.animateIn; |
|||
var _animateOut = self.animateOut; |
|||
onDestroy(function () { |
|||
self.$set({ |
|||
animation: _animation, |
|||
animateIn: _animateIn, |
|||
animateOut: _animateOut |
|||
}); |
|||
}); |
|||
self.on("pnotify:update", function () { |
|||
if (self.refs.elem) { |
|||
var animSpeed = 250; |
|||
|
|||
if (self.animateSpeed === "slow") { |
|||
animSpeed = 400; |
|||
} else if (self.animateSpeed === "fast") { |
|||
animSpeed = 100; |
|||
} else if (self.animateSpeed > 0) { |
|||
animSpeed = self.animateSpeed; |
|||
} |
|||
|
|||
animSpeed = animSpeed / 1000; |
|||
|
|||
if (self.refs.elem.style.animationDuration !== "".concat(animSpeed, "s")) { |
|||
$$invalidate(0, self.refs.elem.style.animationDuration = "".concat(animSpeed, "s"), self); |
|||
} |
|||
} |
|||
}); |
|||
|
|||
function animateIn(callback, immediate) { |
|||
// Declare that the notice is animating in.
|
|||
self.setAnimating("in"); |
|||
var off; |
|||
|
|||
var finished = function finished(event) { |
|||
if (event && self.refs.elem && event.target !== self.refs.elem) { |
|||
return; |
|||
} |
|||
|
|||
off(); |
|||
self.setAnimatingClass("pnotify-in animated"); |
|||
|
|||
if (callback) { |
|||
callback.call(); |
|||
} // Declare that the notice has completed animating.
|
|||
|
|||
|
|||
self.setAnimating(false); |
|||
}; |
|||
|
|||
off = self.on("animationend", finished); |
|||
|
|||
if (immediate) { |
|||
finished(); |
|||
} else { |
|||
self.setAnimatingClass("pnotify-in animated ".concat(inClass || outClass)); |
|||
} |
|||
} |
|||
|
|||
function animateOut(callback, immediate) { |
|||
// Declare that the notice is animating out.
|
|||
self.setAnimating("out"); |
|||
var off; |
|||
|
|||
var finished = function finished(event) { |
|||
if (event && self.refs.elem && event.target !== self.refs.elem) { |
|||
return; |
|||
} |
|||
|
|||
off(); |
|||
self.setAnimatingClass("animated"); |
|||
|
|||
if (callback) { |
|||
callback.call(); |
|||
} // Declare that the notice has completed animating.
|
|||
|
|||
|
|||
if (self.setAnimating) { |
|||
self.setAnimating(false); |
|||
} |
|||
}; |
|||
|
|||
off = self.on("animationend", finished); |
|||
|
|||
if (immediate) { |
|||
finished(); |
|||
} else { |
|||
self.setAnimatingClass("pnotify-in animated ".concat(outClass || inClass)); |
|||
} |
|||
} |
|||
|
|||
self.attention = function (aniClass, callback) { |
|||
var off; |
|||
|
|||
var cb = function cb() { |
|||
off(); |
|||
self.removeModuleClass("container", "animated", aniClass); |
|||
|
|||
if (callback) { |
|||
callback.call(self); |
|||
} |
|||
}; |
|||
|
|||
off = self.on("animationend", cb); |
|||
self.addModuleClass("container", "animated", aniClass); |
|||
}; |
|||
|
|||
$$self.$$set = function ($$props) { |
|||
if ("self" in $$props) $$invalidate(0, self = $$props.self); |
|||
if ("inClass" in $$props) $$invalidate(1, inClass = $$props.inClass); |
|||
if ("outClass" in $$props) $$invalidate(2, outClass = $$props.outClass); |
|||
}; |
|||
|
|||
$$self.$$.update = function () { |
|||
if ($$self.$$.dirty & |
|||
/*inClass, outClass, self*/ |
|||
7) { |
|||
if (inClass || outClass) { |
|||
self.$set({ |
|||
animation: "none", |
|||
animateIn: animateIn, |
|||
animateOut: animateOut |
|||
}); |
|||
} else { |
|||
self.$set({ |
|||
animation: _animation, |
|||
animateIn: _animateIn, |
|||
animateOut: _animateOut |
|||
}); |
|||
} |
|||
} |
|||
}; |
|||
|
|||
return [self, inClass, outClass]; |
|||
} |
|||
|
|||
var Animate = /*#__PURE__*/function (_SvelteComponent) { |
|||
_inherits(Animate, _SvelteComponent); |
|||
|
|||
var _super = _createSuper(Animate); |
|||
|
|||
function Animate(options) { |
|||
var _this; |
|||
|
|||
_classCallCheck(this, Animate); |
|||
|
|||
_this = _super.call(this); |
|||
init(_assertThisInitialized(_this), options, instance, null, safe_not_equal, { |
|||
self: 0, |
|||
inClass: 1, |
|||
outClass: 2 |
|||
}); |
|||
return _this; |
|||
} |
|||
|
|||
return Animate; |
|||
}(SvelteComponent); |
|||
|
|||
exports.default = Animate; |
|||
exports.defaults = defaults; |
|||
exports.position = position; |
|||
|
|||
Object.defineProperty(exports, '__esModule', { value: true }); |
|||
|
|||
}))); |
|||
@ -0,0 +1 @@ |
|||
.pnotify .bootstrap4-title{font-size:1.2rem}.pnotify .bootstrap4-icon>*{position:relative;line-height:1.2rem}.pnotify.pnotify-with-icon .bootstrap4-ml{margin-left:24px}[dir=rtl] .pnotify.pnotify-with-icon .bootstrap4-ml{margin-right:24px;margin-left:0} |
|||
@ -0,0 +1,471 @@ |
|||
(function (global, factory) { |
|||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : |
|||
typeof define === 'function' && define.amd ? define(['exports'], factory) : |
|||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.PNotifyBootstrap4 = {})); |
|||
}(this, (function (exports) { 'use strict'; |
|||
|
|||
function _typeof(obj) { |
|||
"@babel/helpers - typeof"; |
|||
|
|||
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { |
|||
_typeof = function (obj) { |
|||
return typeof obj; |
|||
}; |
|||
} else { |
|||
_typeof = function (obj) { |
|||
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; |
|||
}; |
|||
} |
|||
|
|||
return _typeof(obj); |
|||
} |
|||
|
|||
function _classCallCheck(instance, Constructor) { |
|||
if (!(instance instanceof Constructor)) { |
|||
throw new TypeError("Cannot call a class as a function"); |
|||
} |
|||
} |
|||
|
|||
function _defineProperties(target, props) { |
|||
for (var i = 0; i < props.length; i++) { |
|||
var descriptor = props[i]; |
|||
descriptor.enumerable = descriptor.enumerable || false; |
|||
descriptor.configurable = true; |
|||
if ("value" in descriptor) descriptor.writable = true; |
|||
Object.defineProperty(target, descriptor.key, descriptor); |
|||
} |
|||
} |
|||
|
|||
function _createClass(Constructor, protoProps, staticProps) { |
|||
if (protoProps) _defineProperties(Constructor.prototype, protoProps); |
|||
if (staticProps) _defineProperties(Constructor, staticProps); |
|||
return Constructor; |
|||
} |
|||
|
|||
function _inherits(subClass, superClass) { |
|||
if (typeof superClass !== "function" && superClass !== null) { |
|||
throw new TypeError("Super expression must either be null or a function"); |
|||
} |
|||
|
|||
subClass.prototype = Object.create(superClass && superClass.prototype, { |
|||
constructor: { |
|||
value: subClass, |
|||
writable: true, |
|||
configurable: true |
|||
} |
|||
}); |
|||
if (superClass) _setPrototypeOf(subClass, superClass); |
|||
} |
|||
|
|||
function _getPrototypeOf(o) { |
|||
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { |
|||
return o.__proto__ || Object.getPrototypeOf(o); |
|||
}; |
|||
return _getPrototypeOf(o); |
|||
} |
|||
|
|||
function _setPrototypeOf(o, p) { |
|||
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { |
|||
o.__proto__ = p; |
|||
return o; |
|||
}; |
|||
|
|||
return _setPrototypeOf(o, p); |
|||
} |
|||
|
|||
function _isNativeReflectConstruct() { |
|||
if (typeof Reflect === "undefined" || !Reflect.construct) return false; |
|||
if (Reflect.construct.sham) return false; |
|||
if (typeof Proxy === "function") return true; |
|||
|
|||
try { |
|||
Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); |
|||
return true; |
|||
} catch (e) { |
|||
return false; |
|||
} |
|||
} |
|||
|
|||
function _assertThisInitialized(self) { |
|||
if (self === void 0) { |
|||
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); |
|||
} |
|||
|
|||
return self; |
|||
} |
|||
|
|||
function _possibleConstructorReturn(self, call) { |
|||
if (call && (typeof call === "object" || typeof call === "function")) { |
|||
return call; |
|||
} |
|||
|
|||
return _assertThisInitialized(self); |
|||
} |
|||
|
|||
function _createSuper(Derived) { |
|||
var hasNativeReflectConstruct = _isNativeReflectConstruct(); |
|||
|
|||
return function _createSuperInternal() { |
|||
var Super = _getPrototypeOf(Derived), |
|||
result; |
|||
|
|||
if (hasNativeReflectConstruct) { |
|||
var NewTarget = _getPrototypeOf(this).constructor; |
|||
|
|||
result = Reflect.construct(Super, arguments, NewTarget); |
|||
} else { |
|||
result = Super.apply(this, arguments); |
|||
} |
|||
|
|||
return _possibleConstructorReturn(this, result); |
|||
}; |
|||
} |
|||
|
|||
function _toConsumableArray(arr) { |
|||
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); |
|||
} |
|||
|
|||
function _arrayWithoutHoles(arr) { |
|||
if (Array.isArray(arr)) return _arrayLikeToArray(arr); |
|||
} |
|||
|
|||
function _iterableToArray(iter) { |
|||
if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); |
|||
} |
|||
|
|||
function _unsupportedIterableToArray(o, minLen) { |
|||
if (!o) return; |
|||
if (typeof o === "string") return _arrayLikeToArray(o, minLen); |
|||
var n = Object.prototype.toString.call(o).slice(8, -1); |
|||
if (n === "Object" && o.constructor) n = o.constructor.name; |
|||
if (n === "Map" || n === "Set") return Array.from(o); |
|||
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); |
|||
} |
|||
|
|||
function _arrayLikeToArray(arr, len) { |
|||
if (len == null || len > arr.length) len = arr.length; |
|||
|
|||
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; |
|||
|
|||
return arr2; |
|||
} |
|||
|
|||
function _nonIterableSpread() { |
|||
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); |
|||
} |
|||
|
|||
function noop() {} |
|||
|
|||
function run(fn) { |
|||
return fn(); |
|||
} |
|||
|
|||
function blank_object() { |
|||
return Object.create(null); |
|||
} |
|||
|
|||
function run_all(fns) { |
|||
fns.forEach(run); |
|||
} |
|||
|
|||
function is_function(thing) { |
|||
return typeof thing === 'function'; |
|||
} |
|||
|
|||
function safe_not_equal(a, b) { |
|||
return a != a ? b == b : a !== b || a && _typeof(a) === 'object' || typeof a === 'function'; |
|||
} |
|||
|
|||
function is_empty(obj) { |
|||
return Object.keys(obj).length === 0; |
|||
} |
|||
|
|||
function detach(node) { |
|||
node.parentNode.removeChild(node); |
|||
} |
|||
|
|||
function children(element) { |
|||
return Array.from(element.childNodes); |
|||
} |
|||
|
|||
var current_component; |
|||
|
|||
function set_current_component(component) { |
|||
current_component = component; |
|||
} |
|||
|
|||
var dirty_components = []; |
|||
var binding_callbacks = []; |
|||
var render_callbacks = []; |
|||
var flush_callbacks = []; |
|||
var resolved_promise = Promise.resolve(); |
|||
var update_scheduled = false; |
|||
|
|||
function schedule_update() { |
|||
if (!update_scheduled) { |
|||
update_scheduled = true; |
|||
resolved_promise.then(flush); |
|||
} |
|||
} |
|||
|
|||
function add_render_callback(fn) { |
|||
render_callbacks.push(fn); |
|||
} |
|||
|
|||
var flushing = false; |
|||
var seen_callbacks = new Set(); |
|||
|
|||
function flush() { |
|||
if (flushing) return; |
|||
flushing = true; |
|||
|
|||
do { |
|||
// first, call beforeUpdate functions
|
|||
// and update components
|
|||
for (var i = 0; i < dirty_components.length; i += 1) { |
|||
var component = dirty_components[i]; |
|||
set_current_component(component); |
|||
update(component.$$); |
|||
} |
|||
|
|||
set_current_component(null); |
|||
dirty_components.length = 0; |
|||
|
|||
while (binding_callbacks.length) { |
|||
binding_callbacks.pop()(); |
|||
} // then, once components are updated, call
|
|||
// afterUpdate functions. This may cause
|
|||
// subsequent updates...
|
|||
|
|||
|
|||
for (var _i = 0; _i < render_callbacks.length; _i += 1) { |
|||
var callback = render_callbacks[_i]; |
|||
|
|||
if (!seen_callbacks.has(callback)) { |
|||
// ...so guard against infinite loops
|
|||
seen_callbacks.add(callback); |
|||
callback(); |
|||
} |
|||
} |
|||
|
|||
render_callbacks.length = 0; |
|||
} while (dirty_components.length); |
|||
|
|||
while (flush_callbacks.length) { |
|||
flush_callbacks.pop()(); |
|||
} |
|||
|
|||
update_scheduled = false; |
|||
flushing = false; |
|||
seen_callbacks.clear(); |
|||
} |
|||
|
|||
function update($$) { |
|||
if ($$.fragment !== null) { |
|||
$$.update(); |
|||
run_all($$.before_update); |
|||
var dirty = $$.dirty; |
|||
$$.dirty = [-1]; |
|||
$$.fragment && $$.fragment.p($$.ctx, dirty); |
|||
$$.after_update.forEach(add_render_callback); |
|||
} |
|||
} |
|||
|
|||
var outroing = new Set(); |
|||
|
|||
function transition_in(block, local) { |
|||
if (block && block.i) { |
|||
outroing["delete"](block); |
|||
block.i(local); |
|||
} |
|||
} |
|||
|
|||
function mount_component(component, target, anchor) { |
|||
var _component$$$ = component.$$, |
|||
fragment = _component$$$.fragment, |
|||
on_mount = _component$$$.on_mount, |
|||
on_destroy = _component$$$.on_destroy, |
|||
after_update = _component$$$.after_update; |
|||
fragment && fragment.m(target, anchor); // onMount happens before the initial afterUpdate
|
|||
|
|||
add_render_callback(function () { |
|||
var new_on_destroy = on_mount.map(run).filter(is_function); |
|||
|
|||
if (on_destroy) { |
|||
on_destroy.push.apply(on_destroy, _toConsumableArray(new_on_destroy)); |
|||
} else { |
|||
// Edge case - component was destroyed immediately,
|
|||
// most likely as a result of a binding initialising
|
|||
run_all(new_on_destroy); |
|||
} |
|||
|
|||
component.$$.on_mount = []; |
|||
}); |
|||
after_update.forEach(add_render_callback); |
|||
} |
|||
|
|||
function destroy_component(component, detaching) { |
|||
var $$ = component.$$; |
|||
|
|||
if ($$.fragment !== null) { |
|||
run_all($$.on_destroy); |
|||
$$.fragment && $$.fragment.d(detaching); // TODO null out other refs, including component.$$ (but need to
|
|||
// preserve final state?)
|
|||
|
|||
$$.on_destroy = $$.fragment = null; |
|||
$$.ctx = []; |
|||
} |
|||
} |
|||
|
|||
function make_dirty(component, i) { |
|||
if (component.$$.dirty[0] === -1) { |
|||
dirty_components.push(component); |
|||
schedule_update(); |
|||
component.$$.dirty.fill(0); |
|||
} |
|||
|
|||
component.$$.dirty[i / 31 | 0] |= 1 << i % 31; |
|||
} |
|||
|
|||
function init(component, options, instance, create_fragment, not_equal, props) { |
|||
var dirty = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : [-1]; |
|||
var parent_component = current_component; |
|||
set_current_component(component); |
|||
var prop_values = options.props || {}; |
|||
var $$ = component.$$ = { |
|||
fragment: null, |
|||
ctx: null, |
|||
// state
|
|||
props: props, |
|||
update: noop, |
|||
not_equal: not_equal, |
|||
bound: blank_object(), |
|||
// lifecycle
|
|||
on_mount: [], |
|||
on_destroy: [], |
|||
before_update: [], |
|||
after_update: [], |
|||
context: new Map(parent_component ? parent_component.$$.context : []), |
|||
// everything else
|
|||
callbacks: blank_object(), |
|||
dirty: dirty, |
|||
skip_bound: false |
|||
}; |
|||
var ready = false; |
|||
$$.ctx = instance ? instance(component, prop_values, function (i, ret) { |
|||
var value = (arguments.length <= 2 ? 0 : arguments.length - 2) ? arguments.length <= 2 ? undefined : arguments[2] : ret; |
|||
|
|||
if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) { |
|||
if (!$$.skip_bound && $$.bound[i]) $$.bound[i](value); |
|||
if (ready) make_dirty(component, i); |
|||
} |
|||
|
|||
return ret; |
|||
}) : []; |
|||
$$.update(); |
|||
ready = true; |
|||
run_all($$.before_update); // `false` as a special case of no DOM component
|
|||
|
|||
$$.fragment = create_fragment ? create_fragment($$.ctx) : false; |
|||
|
|||
if (options.target) { |
|||
if (options.hydrate) { |
|||
var nodes = children(options.target); // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|||
|
|||
$$.fragment && $$.fragment.l(nodes); |
|||
nodes.forEach(detach); |
|||
} else { |
|||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|||
$$.fragment && $$.fragment.c(); |
|||
} |
|||
|
|||
if (options.intro) transition_in(component.$$.fragment); |
|||
mount_component(component, options.target, options.anchor); |
|||
flush(); |
|||
} |
|||
|
|||
set_current_component(parent_component); |
|||
} |
|||
|
|||
var SvelteComponent = /*#__PURE__*/function () { |
|||
function SvelteComponent() { |
|||
_classCallCheck(this, SvelteComponent); |
|||
} |
|||
|
|||
_createClass(SvelteComponent, [{ |
|||
key: "$destroy", |
|||
value: function $destroy() { |
|||
destroy_component(this, 1); |
|||
this.$destroy = noop; |
|||
} |
|||
}, { |
|||
key: "$on", |
|||
value: function $on(type, callback) { |
|||
var callbacks = this.$$.callbacks[type] || (this.$$.callbacks[type] = []); |
|||
callbacks.push(callback); |
|||
return function () { |
|||
var index = callbacks.indexOf(callback); |
|||
if (index !== -1) callbacks.splice(index, 1); |
|||
}; |
|||
} |
|||
}, { |
|||
key: "$set", |
|||
value: function $set($$props) { |
|||
if (this.$$set && !is_empty($$props)) { |
|||
this.$$.skip_bound = true; |
|||
this.$$set($$props); |
|||
this.$$.skip_bound = false; |
|||
} |
|||
} |
|||
}]); |
|||
|
|||
return SvelteComponent; |
|||
}(); |
|||
|
|||
var position = "PrependContainer"; |
|||
var defaults = {}; |
|||
|
|||
function init$1(eventDetail) { |
|||
eventDetail.defaults.styling = { |
|||
prefix: "bootstrap4", |
|||
container: "alert", |
|||
notice: "alert-warning", |
|||
info: "alert-info", |
|||
success: "alert-success", |
|||
error: "alert-danger", |
|||
// Confirm Module
|
|||
"action-bar": "bootstrap4-ml", |
|||
"prompt-bar": "bootstrap4-ml", |
|||
btn: "btn mx-1", |
|||
"btn-primary": "btn-primary", |
|||
"btn-secondary": "btn-secondary", |
|||
input: "form-control" |
|||
}; |
|||
} |
|||
|
|||
var Bootstrap4 = /*#__PURE__*/function (_SvelteComponent) { |
|||
_inherits(Bootstrap4, _SvelteComponent); |
|||
|
|||
var _super = _createSuper(Bootstrap4); |
|||
|
|||
function Bootstrap4(options) { |
|||
var _this; |
|||
|
|||
_classCallCheck(this, Bootstrap4); |
|||
|
|||
_this = _super.call(this); |
|||
init(_assertThisInitialized(_this), options, null, null, safe_not_equal, {}); |
|||
return _this; |
|||
} |
|||
|
|||
return Bootstrap4; |
|||
}(SvelteComponent); |
|||
|
|||
exports.default = Bootstrap4; |
|||
exports.defaults = defaults; |
|||
exports.init = init$1; |
|||
exports.position = position; |
|||
|
|||
Object.defineProperty(exports, '__esModule', { value: true }); |
|||
|
|||
}))); |
|||
@ -0,0 +1 @@ |
|||
.pnotify-action-bar,.pnotify-prompt-bar{margin-top:5px;clear:both}.pnotify-action-bar{display:flex;flex-wrap:wrap;justify-content:flex-end}.pnotify-prompt-input{margin-bottom:5px;display:block;width:100%} |
|||
1306
lib/javascript/pnotyfy/PNotifyConfirm.js
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1 @@ |
|||
.pnotify-countdown{position:absolute;top:100%;left:0;width:100%;height:.5em;display:flex;justify-content:center;align-items:center}.pnotify-countdown-top{top:auto;bottom:100%}.pnotify-countdown-left{top:0;right:100%;left:auto;height:100%;width:.5em}.pnotify-countdown-right{top:0;left:100%;height:100%;width:.5em}.pnotify-countdown-bar{position:absolute;top:0;left:0;transition:width .1s linear}.pnotify-countdown-reverse .pnotify-countdown-bar{top:auto;left:auto;right:0;bottom:0} |
|||
@ -0,0 +1,74 @@ |
|||
(function(global,factory){typeof exports==='object'&&typeof module!=='undefined'?factory(exports):typeof define==='function'&&define.amd?define(['exports'],factory):(global=typeof globalThis!=='undefined'?globalThis:global||self,factory(global.PNotifyCountdown={}));}(this,(function(exports){'use strict';function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function(obj){return typeof obj;};}else{_typeof=function(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};} |
|||
return _typeof(obj);} |
|||
function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}} |
|||
function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}} |
|||
function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor;} |
|||
function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function");} |
|||
subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass);} |
|||
function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o);};return _getPrototypeOf(o);} |
|||
function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o;};return _setPrototypeOf(o,p);} |
|||
function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Date.prototype.toString.call(Reflect.construct(Date,[],function(){}));return true;}catch(e){return false;}} |
|||
function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");} |
|||
return self;} |
|||
function _possibleConstructorReturn(self,call){if(call&&(typeof call==="object"||typeof call==="function")){return call;} |
|||
return _assertThisInitialized(self);} |
|||
function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else{result=Super.apply(this,arguments);} |
|||
return _possibleConstructorReturn(this,result);};} |
|||
function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();} |
|||
function _toConsumableArray(arr){return _arrayWithoutHoles(arr)||_iterableToArray(arr)||_unsupportedIterableToArray(arr)||_nonIterableSpread();} |
|||
function _arrayWithoutHoles(arr){if(Array.isArray(arr))return _arrayLikeToArray(arr);} |
|||
function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;} |
|||
function _iterableToArray(iter){if(typeof Symbol!=="undefined"&&Symbol.iterator in Object(iter))return Array.from(iter);} |
|||
function _iterableToArrayLimit(arr,i){if(typeof Symbol==="undefined"||!(Symbol.iterator in Object(arr)))return;var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}} |
|||
return _arr;} |
|||
function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);} |
|||
function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2;} |
|||
function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");} |
|||
function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");} |
|||
function noop(){} |
|||
function run(fn){return fn();} |
|||
function blank_object(){return Object.create(null);} |
|||
function run_all(fns){fns.forEach(run);} |
|||
function is_function(thing){return typeof thing==='function';} |
|||
function safe_not_equal(a,b){return a!=a?b==b:a!==b||a&&_typeof(a)==='object'||typeof a==='function';} |
|||
function is_empty(obj){return Object.keys(obj).length===0;} |
|||
function append(target,node){target.appendChild(node);} |
|||
function insert(target,node,anchor){target.insertBefore(node,anchor||null);} |
|||
function detach(node){node.parentNode.removeChild(node);} |
|||
function element(name){return document.createElement(name);} |
|||
function text(data){return document.createTextNode(data);} |
|||
function empty(){return text('');} |
|||
function attr(node,attribute,value){if(value==null)node.removeAttribute(attribute);else if(node.getAttribute(attribute)!==value)node.setAttribute(attribute,value);} |
|||
function children(element){return Array.from(element.childNodes);} |
|||
var current_component;function set_current_component(component){current_component=component;} |
|||
function get_current_component(){if(!current_component)throw new Error('Function called outside component initialization');return current_component;} |
|||
function onMount(fn){get_current_component().$$.on_mount.push(fn);} |
|||
function onDestroy(fn){get_current_component().$$.on_destroy.push(fn);} |
|||
var dirty_components=[];var binding_callbacks=[];var render_callbacks=[];var flush_callbacks=[];var resolved_promise=Promise.resolve();var update_scheduled=false;function schedule_update(){if(!update_scheduled){update_scheduled=true;resolved_promise.then(flush);}} |
|||
function add_render_callback(fn){render_callbacks.push(fn);} |
|||
var flushing=false;var seen_callbacks=new Set();function flush(){if(flushing)return;flushing=true;do{for(var i=0;i<dirty_components.length;i+=1){var component=dirty_components[i];set_current_component(component);update(component.$$);} |
|||
set_current_component(null);dirty_components.length=0;while(binding_callbacks.length){binding_callbacks.pop()();} |
|||
for(var _i=0;_i<render_callbacks.length;_i+=1){var callback=render_callbacks[_i];if(!seen_callbacks.has(callback)){seen_callbacks.add(callback);callback();}} |
|||
render_callbacks.length=0;}while(dirty_components.length);while(flush_callbacks.length){flush_callbacks.pop()();} |
|||
update_scheduled=false;flushing=false;seen_callbacks.clear();} |
|||
function update($$){if($$.fragment!==null){$$.update();run_all($$.before_update);var dirty=$$.dirty;$$.dirty=[-1];$$.fragment&&$$.fragment.p($$.ctx,dirty);$$.after_update.forEach(add_render_callback);}} |
|||
var outroing=new Set();function transition_in(block,local){if(block&&block.i){outroing["delete"](block);block.i(local);}} |
|||
function mount_component(component,target,anchor){var _component$$$=component.$$,fragment=_component$$$.fragment,on_mount=_component$$$.on_mount,on_destroy=_component$$$.on_destroy,after_update=_component$$$.after_update;fragment&&fragment.m(target,anchor);add_render_callback(function(){var new_on_destroy=on_mount.map(run).filter(is_function);if(on_destroy){on_destroy.push.apply(on_destroy,_toConsumableArray(new_on_destroy));}else{run_all(new_on_destroy);} |
|||
component.$$.on_mount=[];});after_update.forEach(add_render_callback);} |
|||
function destroy_component(component,detaching){var $$=component.$$;if($$.fragment!==null){run_all($$.on_destroy);$$.fragment&&$$.fragment.d(detaching);$$.on_destroy=$$.fragment=null;$$.ctx=[];}} |
|||
function make_dirty(component,i){if(component.$$.dirty[0]===-1){dirty_components.push(component);schedule_update();component.$$.dirty.fill(0);} |
|||
component.$$.dirty[i/31|0]|=1<<i%31;} |
|||
function init(component,options,instance,create_fragment,not_equal,props){var dirty=arguments.length>6&&arguments[6]!==undefined?arguments[6]:[-1];var parent_component=current_component;set_current_component(component);var prop_values=options.props||{};var $$=component.$$={fragment:null,ctx:null,props:props,update:noop,not_equal:not_equal,bound:blank_object(),on_mount:[],on_destroy:[],before_update:[],after_update:[],context:new Map(parent_component?parent_component.$$.context:[]),callbacks:blank_object(),dirty:dirty,skip_bound:false};var ready=false;$$.ctx=instance?instance(component,prop_values,function(i,ret){var value=(arguments.length<=2?0:arguments.length-2)?arguments.length<=2?undefined:arguments[2]:ret;if($$.ctx&¬_equal($$.ctx[i],$$.ctx[i]=value)){if(!$$.skip_bound&&$$.bound[i])$$.bound[i](value);if(ready)make_dirty(component,i);} |
|||
return ret;}):[];$$.update();ready=true;run_all($$.before_update);$$.fragment=create_fragment?create_fragment($$.ctx):false;if(options.target){if(options.hydrate){var nodes=children(options.target);$$.fragment&&$$.fragment.l(nodes);nodes.forEach(detach);}else{$$.fragment&&$$.fragment.c();} |
|||
if(options.intro)transition_in(component.$$.fragment);mount_component(component,options.target,options.anchor);flush();} |
|||
set_current_component(parent_component);} |
|||
var SvelteComponent=function(){function SvelteComponent(){_classCallCheck(this,SvelteComponent);} |
|||
_createClass(SvelteComponent,[{key:"$destroy",value:function $destroy(){destroy_component(this,1);this.$destroy=noop;}},{key:"$on",value:function $on(type,callback){var callbacks=this.$$.callbacks[type]||(this.$$.callbacks[type]=[]);callbacks.push(callback);return function(){var index=callbacks.indexOf(callback);if(index!==-1)callbacks.splice(index,1);};}},{key:"$set",value:function $set($$props){if(this.$$set&&!is_empty($$props)){this.$$.skip_bound=true;this.$$set($$props);this.$$.skip_bound=false;}}}]);return SvelteComponent;}();function create_if_block(ctx){var div1;var div0;var div0_class_value;var div0_style_value;var div1_class_value;return{c:function c(){div1=element("div");div0=element("div");attr(div0,"class",div0_class_value="pnotify-countdown-bar ".concat(ctx[0].getStyle("countdown-bar")));attr(div0,"style",div0_style_value="height: ".concat(ctx[1]==="right"||ctx[1]==="left"?ctx[3]:"100","%; width: ").concat(ctx[1]==="top"||ctx[1]==="bottom"?ctx[3]:"100","%;"));attr(div1,"class",div1_class_value="pnotify-countdown pnotify-countdown-".concat(ctx[1]," ").concat(ctx[2]?"pnotify-countdown-reverse":""," ").concat(ctx[0].getStyle("countdown")));},m:function m(target,anchor){insert(target,div1,anchor);append(div1,div0);},p:function p(ctx,dirty){if(dirty&1&&div0_class_value!==(div0_class_value="pnotify-countdown-bar ".concat(ctx[0].getStyle("countdown-bar")))){attr(div0,"class",div0_class_value);} |
|||
if(dirty&10&&div0_style_value!==(div0_style_value="height: ".concat(ctx[1]==="right"||ctx[1]==="left"?ctx[3]:"100","%; width: ").concat(ctx[1]==="top"||ctx[1]==="bottom"?ctx[3]:"100","%;"))){attr(div0,"style",div0_style_value);} |
|||
if(dirty&7&&div1_class_value!==(div1_class_value="pnotify-countdown pnotify-countdown-".concat(ctx[1]," ").concat(ctx[2]?"pnotify-countdown-reverse":""," ").concat(ctx[0].getStyle("countdown")))){attr(div1,"class",div1_class_value);}},d:function d(detaching){if(detaching)detach(div1);}};} |
|||
function create_fragment(ctx){var if_block_anchor;var if_block=ctx[4]&&create_if_block(ctx);return{c:function c(){if(if_block)if_block.c();if_block_anchor=empty();},m:function m(target,anchor){if(if_block)if_block.m(target,anchor);insert(target,if_block_anchor,anchor);},p:function p(ctx,_ref){var _ref2=_slicedToArray(_ref,1),dirty=_ref2[0];if(ctx[4]){if(if_block){if_block.p(ctx,dirty);}else{if_block=create_if_block(ctx);if_block.c();if_block.m(if_block_anchor.parentNode,if_block_anchor);}}else if(if_block){if_block.d(1);if_block=null;}},i:noop,o:noop,d:function d(detaching){if(if_block)if_block.d(detaching);if(detaching)detach(if_block_anchor);}};} |
|||
var position="AppendContainer";var defaults={anchor:"bottom",reverse:false};function instance($$self,$$props,$$invalidate){var _$$props$self=$$props.self,self=_$$props$self===void 0?null:_$$props$self;var _$$props$anchor=$$props.anchor,anchor=_$$props$anchor===void 0?defaults.anchor:_$$props$anchor;var _$$props$reverse=$$props.reverse,reverse=_$$props$reverse===void 0?defaults.reverse:_$$props$reverse;var _state=self.getState();var _timer=self.getTimer();var _msLeft=0;var _percent=100;var ival;var offUpdate;var offAfterOpen;var getValues=function getValues(){$$invalidate(5,_state=self.getState());$$invalidate(6,_timer=self.getTimer());};onMount(function(){offUpdate=self.on("pnotify:update",getValues);offAfterOpen=self.on("pnotify:afterOpen",getValues);ival=setInterval(function(){if(showCountdown){if(timeStart){_msLeft=self.delay-(new Date()-timeStart);$$invalidate(3,_percent=_msLeft/self.delay*100);}else{$$invalidate(3,_percent=_state==="closing"?0:100);}}},100);});onDestroy(function(){offUpdate&&offUpdate();offAfterOpen&&offAfterOpen();clearInterval(ival);});$$self.$$set=function($$props){if("self"in $$props)$$invalidate(0,self=$$props.self);if("anchor"in $$props)$$invalidate(1,anchor=$$props.anchor);if("reverse"in $$props)$$invalidate(2,reverse=$$props.reverse);};var showCountdown;var timeStart;$$self.$$.update=function(){if($$self.$$.dirty&33){$$invalidate(4,showCountdown=["opening","open","closing"].indexOf(_state)!==-1&&self.hide&&self.delay!==Infinity);} |
|||
if($$self.$$.dirty&80){timeStart=showCountdown&&_timer&&_timer!=="prevented"?new Date():null;} |
|||
if($$self.$$.dirty&19){{self.removeModuleClass("elem","pnotify-with-countdown","pnotify-with-countdown-bottom","pnotify-with-countdown-top","pnotify-with-countdown-left","pnotify-with-countdown-right");if(showCountdown){self.addModuleClass("elem","pnotify-with-countdown","pnotify-with-countdown-".concat(anchor));}}}};return[self,anchor,reverse,_percent,showCountdown];} |
|||
var Countdown=function(_SvelteComponent){_inherits(Countdown,_SvelteComponent);var _super=_createSuper(Countdown);function Countdown(options){var _this;_classCallCheck(this,Countdown);_this=_super.call(this);init(_assertThisInitialized(_this),options,instance,create_fragment,safe_not_equal,{self:0,anchor:1,reverse:2});return _this;} |
|||
return Countdown;}(SvelteComponent);exports.default=Countdown;exports.defaults=defaults;exports.position=position;Object.defineProperty(exports,'__esModule',{value:true});}))); |
|||
@ -0,0 +1 @@ |
|||
[data-pnotify].pnotify-desktop-hide{left:-10000px!important;display:none!important} |
|||
@ -0,0 +1,700 @@ |
|||
(function (global, factory) { |
|||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : |
|||
typeof define === 'function' && define.amd ? define(['exports'], factory) : |
|||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.PNotifyDesktop = {})); |
|||
}(this, (function (exports) { 'use strict'; |
|||
|
|||
function _typeof(obj) { |
|||
"@babel/helpers - typeof"; |
|||
|
|||
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { |
|||
_typeof = function (obj) { |
|||
return typeof obj; |
|||
}; |
|||
} else { |
|||
_typeof = function (obj) { |
|||
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; |
|||
}; |
|||
} |
|||
|
|||
return _typeof(obj); |
|||
} |
|||
|
|||
function _classCallCheck(instance, Constructor) { |
|||
if (!(instance instanceof Constructor)) { |
|||
throw new TypeError("Cannot call a class as a function"); |
|||
} |
|||
} |
|||
|
|||
function _defineProperties(target, props) { |
|||
for (var i = 0; i < props.length; i++) { |
|||
var descriptor = props[i]; |
|||
descriptor.enumerable = descriptor.enumerable || false; |
|||
descriptor.configurable = true; |
|||
if ("value" in descriptor) descriptor.writable = true; |
|||
Object.defineProperty(target, descriptor.key, descriptor); |
|||
} |
|||
} |
|||
|
|||
function _createClass(Constructor, protoProps, staticProps) { |
|||
if (protoProps) _defineProperties(Constructor.prototype, protoProps); |
|||
if (staticProps) _defineProperties(Constructor, staticProps); |
|||
return Constructor; |
|||
} |
|||
|
|||
function _inherits(subClass, superClass) { |
|||
if (typeof superClass !== "function" && superClass !== null) { |
|||
throw new TypeError("Super expression must either be null or a function"); |
|||
} |
|||
|
|||
subClass.prototype = Object.create(superClass && superClass.prototype, { |
|||
constructor: { |
|||
value: subClass, |
|||
writable: true, |
|||
configurable: true |
|||
} |
|||
}); |
|||
if (superClass) _setPrototypeOf(subClass, superClass); |
|||
} |
|||
|
|||
function _getPrototypeOf(o) { |
|||
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { |
|||
return o.__proto__ || Object.getPrototypeOf(o); |
|||
}; |
|||
return _getPrototypeOf(o); |
|||
} |
|||
|
|||
function _setPrototypeOf(o, p) { |
|||
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { |
|||
o.__proto__ = p; |
|||
return o; |
|||
}; |
|||
|
|||
return _setPrototypeOf(o, p); |
|||
} |
|||
|
|||
function _isNativeReflectConstruct() { |
|||
if (typeof Reflect === "undefined" || !Reflect.construct) return false; |
|||
if (Reflect.construct.sham) return false; |
|||
if (typeof Proxy === "function") return true; |
|||
|
|||
try { |
|||
Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); |
|||
return true; |
|||
} catch (e) { |
|||
return false; |
|||
} |
|||
} |
|||
|
|||
function _assertThisInitialized(self) { |
|||
if (self === void 0) { |
|||
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); |
|||
} |
|||
|
|||
return self; |
|||
} |
|||
|
|||
function _possibleConstructorReturn(self, call) { |
|||
if (call && (typeof call === "object" || typeof call === "function")) { |
|||
return call; |
|||
} |
|||
|
|||
return _assertThisInitialized(self); |
|||
} |
|||
|
|||
function _createSuper(Derived) { |
|||
var hasNativeReflectConstruct = _isNativeReflectConstruct(); |
|||
|
|||
return function _createSuperInternal() { |
|||
var Super = _getPrototypeOf(Derived), |
|||
result; |
|||
|
|||
if (hasNativeReflectConstruct) { |
|||
var NewTarget = _getPrototypeOf(this).constructor; |
|||
|
|||
result = Reflect.construct(Super, arguments, NewTarget); |
|||
} else { |
|||
result = Super.apply(this, arguments); |
|||
} |
|||
|
|||
return _possibleConstructorReturn(this, result); |
|||
}; |
|||
} |
|||
|
|||
function _toConsumableArray(arr) { |
|||
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); |
|||
} |
|||
|
|||
function _arrayWithoutHoles(arr) { |
|||
if (Array.isArray(arr)) return _arrayLikeToArray(arr); |
|||
} |
|||
|
|||
function _iterableToArray(iter) { |
|||
if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); |
|||
} |
|||
|
|||
function _unsupportedIterableToArray(o, minLen) { |
|||
if (!o) return; |
|||
if (typeof o === "string") return _arrayLikeToArray(o, minLen); |
|||
var n = Object.prototype.toString.call(o).slice(8, -1); |
|||
if (n === "Object" && o.constructor) n = o.constructor.name; |
|||
if (n === "Map" || n === "Set") return Array.from(o); |
|||
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); |
|||
} |
|||
|
|||
function _arrayLikeToArray(arr, len) { |
|||
if (len == null || len > arr.length) len = arr.length; |
|||
|
|||
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; |
|||
|
|||
return arr2; |
|||
} |
|||
|
|||
function _nonIterableSpread() { |
|||
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); |
|||
} |
|||
|
|||
function noop() {} |
|||
|
|||
function run(fn) { |
|||
return fn(); |
|||
} |
|||
|
|||
function blank_object() { |
|||
return Object.create(null); |
|||
} |
|||
|
|||
function run_all(fns) { |
|||
fns.forEach(run); |
|||
} |
|||
|
|||
function is_function(thing) { |
|||
return typeof thing === 'function'; |
|||
} |
|||
|
|||
function safe_not_equal(a, b) { |
|||
return a != a ? b == b : a !== b || a && _typeof(a) === 'object' || typeof a === 'function'; |
|||
} |
|||
|
|||
function is_empty(obj) { |
|||
return Object.keys(obj).length === 0; |
|||
} |
|||
|
|||
function detach(node) { |
|||
node.parentNode.removeChild(node); |
|||
} |
|||
|
|||
function children(element) { |
|||
return Array.from(element.childNodes); |
|||
} |
|||
|
|||
var current_component; |
|||
|
|||
function set_current_component(component) { |
|||
current_component = component; |
|||
} |
|||
|
|||
var dirty_components = []; |
|||
var binding_callbacks = []; |
|||
var render_callbacks = []; |
|||
var flush_callbacks = []; |
|||
var resolved_promise = Promise.resolve(); |
|||
var update_scheduled = false; |
|||
|
|||
function schedule_update() { |
|||
if (!update_scheduled) { |
|||
update_scheduled = true; |
|||
resolved_promise.then(flush); |
|||
} |
|||
} |
|||
|
|||
function add_render_callback(fn) { |
|||
render_callbacks.push(fn); |
|||
} |
|||
|
|||
var flushing = false; |
|||
var seen_callbacks = new Set(); |
|||
|
|||
function flush() { |
|||
if (flushing) return; |
|||
flushing = true; |
|||
|
|||
do { |
|||
// first, call beforeUpdate functions
|
|||
// and update components
|
|||
for (var i = 0; i < dirty_components.length; i += 1) { |
|||
var component = dirty_components[i]; |
|||
set_current_component(component); |
|||
update(component.$$); |
|||
} |
|||
|
|||
set_current_component(null); |
|||
dirty_components.length = 0; |
|||
|
|||
while (binding_callbacks.length) { |
|||
binding_callbacks.pop()(); |
|||
} // then, once components are updated, call
|
|||
// afterUpdate functions. This may cause
|
|||
// subsequent updates...
|
|||
|
|||
|
|||
for (var _i = 0; _i < render_callbacks.length; _i += 1) { |
|||
var callback = render_callbacks[_i]; |
|||
|
|||
if (!seen_callbacks.has(callback)) { |
|||
// ...so guard against infinite loops
|
|||
seen_callbacks.add(callback); |
|||
callback(); |
|||
} |
|||
} |
|||
|
|||
render_callbacks.length = 0; |
|||
} while (dirty_components.length); |
|||
|
|||
while (flush_callbacks.length) { |
|||
flush_callbacks.pop()(); |
|||
} |
|||
|
|||
update_scheduled = false; |
|||
flushing = false; |
|||
seen_callbacks.clear(); |
|||
} |
|||
|
|||
function update($$) { |
|||
if ($$.fragment !== null) { |
|||
$$.update(); |
|||
run_all($$.before_update); |
|||
var dirty = $$.dirty; |
|||
$$.dirty = [-1]; |
|||
$$.fragment && $$.fragment.p($$.ctx, dirty); |
|||
$$.after_update.forEach(add_render_callback); |
|||
} |
|||
} |
|||
|
|||
var outroing = new Set(); |
|||
|
|||
function transition_in(block, local) { |
|||
if (block && block.i) { |
|||
outroing["delete"](block); |
|||
block.i(local); |
|||
} |
|||
} |
|||
|
|||
function mount_component(component, target, anchor) { |
|||
var _component$$$ = component.$$, |
|||
fragment = _component$$$.fragment, |
|||
on_mount = _component$$$.on_mount, |
|||
on_destroy = _component$$$.on_destroy, |
|||
after_update = _component$$$.after_update; |
|||
fragment && fragment.m(target, anchor); // onMount happens before the initial afterUpdate
|
|||
|
|||
add_render_callback(function () { |
|||
var new_on_destroy = on_mount.map(run).filter(is_function); |
|||
|
|||
if (on_destroy) { |
|||
on_destroy.push.apply(on_destroy, _toConsumableArray(new_on_destroy)); |
|||
} else { |
|||
// Edge case - component was destroyed immediately,
|
|||
// most likely as a result of a binding initialising
|
|||
run_all(new_on_destroy); |
|||
} |
|||
|
|||
component.$$.on_mount = []; |
|||
}); |
|||
after_update.forEach(add_render_callback); |
|||
} |
|||
|
|||
function destroy_component(component, detaching) { |
|||
var $$ = component.$$; |
|||
|
|||
if ($$.fragment !== null) { |
|||
run_all($$.on_destroy); |
|||
$$.fragment && $$.fragment.d(detaching); // TODO null out other refs, including component.$$ (but need to
|
|||
// preserve final state?)
|
|||
|
|||
$$.on_destroy = $$.fragment = null; |
|||
$$.ctx = []; |
|||
} |
|||
} |
|||
|
|||
function make_dirty(component, i) { |
|||
if (component.$$.dirty[0] === -1) { |
|||
dirty_components.push(component); |
|||
schedule_update(); |
|||
component.$$.dirty.fill(0); |
|||
} |
|||
|
|||
component.$$.dirty[i / 31 | 0] |= 1 << i % 31; |
|||
} |
|||
|
|||
function init(component, options, instance, create_fragment, not_equal, props) { |
|||
var dirty = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : [-1]; |
|||
var parent_component = current_component; |
|||
set_current_component(component); |
|||
var prop_values = options.props || {}; |
|||
var $$ = component.$$ = { |
|||
fragment: null, |
|||
ctx: null, |
|||
// state
|
|||
props: props, |
|||
update: noop, |
|||
not_equal: not_equal, |
|||
bound: blank_object(), |
|||
// lifecycle
|
|||
on_mount: [], |
|||
on_destroy: [], |
|||
before_update: [], |
|||
after_update: [], |
|||
context: new Map(parent_component ? parent_component.$$.context : []), |
|||
// everything else
|
|||
callbacks: blank_object(), |
|||
dirty: dirty, |
|||
skip_bound: false |
|||
}; |
|||
var ready = false; |
|||
$$.ctx = instance ? instance(component, prop_values, function (i, ret) { |
|||
var value = (arguments.length <= 2 ? 0 : arguments.length - 2) ? arguments.length <= 2 ? undefined : arguments[2] : ret; |
|||
|
|||
if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) { |
|||
if (!$$.skip_bound && $$.bound[i]) $$.bound[i](value); |
|||
if (ready) make_dirty(component, i); |
|||
} |
|||
|
|||
return ret; |
|||
}) : []; |
|||
$$.update(); |
|||
ready = true; |
|||
run_all($$.before_update); // `false` as a special case of no DOM component
|
|||
|
|||
$$.fragment = create_fragment ? create_fragment($$.ctx) : false; |
|||
|
|||
if (options.target) { |
|||
if (options.hydrate) { |
|||
var nodes = children(options.target); // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|||
|
|||
$$.fragment && $$.fragment.l(nodes); |
|||
nodes.forEach(detach); |
|||
} else { |
|||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|||
$$.fragment && $$.fragment.c(); |
|||
} |
|||
|
|||
if (options.intro) transition_in(component.$$.fragment); |
|||
mount_component(component, options.target, options.anchor); |
|||
flush(); |
|||
} |
|||
|
|||
set_current_component(parent_component); |
|||
} |
|||
|
|||
var SvelteComponent = /*#__PURE__*/function () { |
|||
function SvelteComponent() { |
|||
_classCallCheck(this, SvelteComponent); |
|||
} |
|||
|
|||
_createClass(SvelteComponent, [{ |
|||
key: "$destroy", |
|||
value: function $destroy() { |
|||
destroy_component(this, 1); |
|||
this.$destroy = noop; |
|||
} |
|||
}, { |
|||
key: "$on", |
|||
value: function $on(type, callback) { |
|||
var callbacks = this.$$.callbacks[type] || (this.$$.callbacks[type] = []); |
|||
callbacks.push(callback); |
|||
return function () { |
|||
var index = callbacks.indexOf(callback); |
|||
if (index !== -1) callbacks.splice(index, 1); |
|||
}; |
|||
} |
|||
}, { |
|||
key: "$set", |
|||
value: function $set($$props) { |
|||
if (this.$$set && !is_empty($$props)) { |
|||
this.$$.skip_bound = true; |
|||
this.$$set($$props); |
|||
this.$$.skip_bound = false; |
|||
} |
|||
} |
|||
}]); |
|||
|
|||
return SvelteComponent; |
|||
}(); |
|||
|
|||
var position = "PrependContainer"; |
|||
var defaults = { |
|||
fallback: true, |
|||
icon: null, |
|||
tag: null, |
|||
title: null, |
|||
text: null, |
|||
options: {} |
|||
}; |
|||
|
|||
function requestPermission() { |
|||
if (typeof Notification !== "undefined" && "requestPermission" in Notification) { |
|||
Notification.requestPermission(); |
|||
} else if ("webkitNotifications" in window) { |
|||
window.webkitNotifications.requestPermission(); |
|||
} |
|||
} |
|||
|
|||
var Notification = window.Notification; |
|||
|
|||
var _notify = function notify(title, options, onclick, onclose) { |
|||
// Memoize based on feature detection.
|
|||
if ("Notification" in window) { |
|||
_notify = function notify(title, options, onclick, onclose) { |
|||
var notice = new Notification(title, options); |
|||
|
|||
if ("NotificationEvent" in window) { |
|||
notice.addEventListener("notificationclick", onclick); |
|||
notice.addEventListener("close", onclose); |
|||
} else if ("addEventListener" in notice) { |
|||
notice.addEventListener("click", onclick); |
|||
notice.addEventListener("close", onclose); |
|||
} else { |
|||
notice.onclick = onclick; |
|||
notice.onclose = onclose; |
|||
} |
|||
|
|||
return notice; |
|||
}; |
|||
} else if ("mozNotification" in navigator) { |
|||
_notify = function notify(title, options, onclick, onclose) { |
|||
// Gecko < 22
|
|||
var notice = navigator.mozNotification.createNotification(title, options.body, options.icon).show(); |
|||
notice.onclick = onclick; |
|||
notice.onclose = onclose; |
|||
return notice; |
|||
}; |
|||
} else if ("webkitNotifications" in window) { |
|||
_notify = function notify(title, options, onclick, onclose) { |
|||
var notice = window.webkitNotifications.createNotification(options.icon, title, options.body); |
|||
notice.onclick = onclick; |
|||
notice.onclose = onclose; |
|||
return notice; |
|||
}; |
|||
} else { |
|||
_notify = function notify(title, options, onclick, onclose) { |
|||
return null; |
|||
}; |
|||
} |
|||
|
|||
return _notify(title, options, onclick, onclose); |
|||
}; |
|||
|
|||
function checkPermission() { |
|||
if (typeof Notification !== "undefined" && "permission" in Notification) { |
|||
return Notification.permission === "granted"; |
|||
} else if ("webkitNotifications" in window) { |
|||
return window.webkitNotifications.checkPermission() == 0; |
|||
} |
|||
|
|||
return false; |
|||
} |
|||
|
|||
var _permission = checkPermission(); |
|||
|
|||
function instance($$self, $$props, $$invalidate) { |
|||
var _$$props$self = $$props.self, |
|||
self = _$$props$self === void 0 ? null : _$$props$self; |
|||
var _$$props$fallback = $$props.fallback, |
|||
fallback = _$$props$fallback === void 0 ? defaults.fallback : _$$props$fallback; |
|||
var _$$props$icon = $$props.icon, |
|||
icon = _$$props$icon === void 0 ? defaults.icon : _$$props$icon; |
|||
var _$$props$tag = $$props.tag, |
|||
tag = _$$props$tag === void 0 ? defaults.tag : _$$props$tag; |
|||
var _$$props$title = $$props.title, |
|||
title = _$$props$title === void 0 ? defaults.title : _$$props$title; |
|||
var _$$props$text = $$props.text, |
|||
text = _$$props$text === void 0 ? defaults.text : _$$props$text; |
|||
var _$$props$options = $$props.options, |
|||
options = _$$props$options === void 0 ? defaults.options : _$$props$options; |
|||
|
|||
var _desktop; // Animation should always be 'none' for desktop notices, but remember
|
|||
// the old animation so it can be recovered.
|
|||
|
|||
|
|||
var _oldAnimation = "none"; |
|||
|
|||
var _icon; |
|||
|
|||
var _tag; |
|||
|
|||
self.on("pnotify:beforeOpen", function () { |
|||
if (!_permission) { |
|||
requestPermission(); |
|||
return; |
|||
} |
|||
|
|||
if (_desktop && "show" in _desktop) { |
|||
self.setModuleOpen(true); |
|||
|
|||
_desktop.show(); |
|||
} |
|||
}); |
|||
self.on("pnotify:beforeClose", function () { |
|||
if (!_permission) { |
|||
return; |
|||
} |
|||
|
|||
if (_desktop && "close" in _desktop) { |
|||
_desktop.close(); |
|||
|
|||
self.setModuleOpen(false); |
|||
} |
|||
}); |
|||
_permission = checkPermission(); |
|||
|
|||
if (_permission) { |
|||
self.addModuleClass("elem", "pnotify-desktop-hide"); |
|||
self.animation = "none"; |
|||
genNotice(); |
|||
} else if (!fallback) { |
|||
// Keep the notice from opening if fallback is false.
|
|||
self.autoOpen = false; |
|||
} |
|||
|
|||
function genNotice() { |
|||
if (icon === null) { |
|||
switch (self.type) { |
|||
case "error": |
|||
_icon = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3gQJATQg7e6HvQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAABr0lEQVRYw8WXu0oDQRSGv7hRSFYrLTTWKihaqUgUJO+gphBLL1jYpPSCVcAggpWthYhC7Ows9An0IbSPkMRCw8ZmFuI6yczs9cAPuzNz5v92brtrESxGARtokkCcAg2hk7jNl4G2R/m4zFPAiwTgWdRFHnmJuaulOAAaPQDqUZvv9DB3tR0lwIcGwHtU5uca5q4qYZvngJbHpAZ8CtU8dS1gLEyAisegBGTFKWiL65KnzVlY5uOSId6VtNuTtMupOu/TAHiQlNmSskHNXCOAGWBeUp7VhFoApoMAXAOWJoCszBJ9+ALY6vL0JiPgjsKmKUAaOOoBZwIAcNxlJLsCrAOTIQJMAWu62y4LOIqT7lGS96TIcYCMDkBZ46h1gB+PHI28ssq8X/G6DaqG8Piz2DrjVjGXbtSBy46F5QAHwJAizwZugKKscs7gSaqS/KpB/qxsFxwafhf6Odb/eblJi8BGwJdW26BtURxQpMU83hmaDQsNiPtvYMSwj3tgAqDgYzU7wJdHjo9+CgBvEW47lV5Tgj5DMtG0xIfESkIAF+522gdWxTzGEX3i9+6KpOMXF5UBt0NKJCAAAAAASUVORK5CYII="; |
|||
break; |
|||
|
|||
case "success": |
|||
_icon = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3gQJATQPRj+65AAAAdBJREFUWMPtlzsvRFEQx3+7HmEjoiYKolVJJDRqnS8ggvVIVEQhCIUsEYJGCEH2E4h4FPREaLTbEo1IEJXHrmY2GTf33nPuY7ud5OTenTMz//89Z86ZWShLWf5LB3AOfACFiOMF2AkC3qOc88BXxFEAxlX8ftGdaNCEen8H6oFHYBR4FocwkpTngzzHgF01fwL0aYcp9fVtMW/rsMcWXWijK1Hexgye9smRT6CxaHgjytMYwccNSXqoja9FeVbiZS+OVaeDiUBLAPAJA/i2m5MXgRSQk7llC/DBMOBeBGqAe0eAjQhfvurH3EmgQk6EW6CVEHt+ZFo6J4EU8OoTcF35jhnAl2wSx20LFgyB1yyOWtY2c72ScMAAkPeZy6g4zUBdGAIAcyEq4Z7y7xbdTFgCACMBwPVJqVDHeNqvaplkH5i0sNuUwmaNkQxww20ZSOy7gFvX7SAk0i76jPQQlJoAwAEwq35ngfmwVatSdUMArZZ+K9JQ1Bp6iGqgSt7f/AIOqSzujLEn6AV+JG6zm4HuCZ+AJuAbWAQu5aIJu7JDck0ngDugC/j1c2qPqR13jpxuvWyS8liY/kQcean/lX6ACQ99DdAQYe+Lf0zylMUgf7qDKgzv284QAAAAAElFTkSuQmCC"; |
|||
break; |
|||
|
|||
case "info": |
|||
_icon = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3gQJATQ09zRTwAAAAdxJREFUWMPtl88rRFEUxz8zBolRCgsrpOym8TMSO2WplLKwUrKi/B0W7JSFmhVLNlhSlLKx8CtRGpEsJpofpZk3Nkc9b968e++8mdlw6vTeu/edc773nl/3wl+ngOH/zUAf0AN0AmEgB7wCD8AtcFMJoM3ADpAHLHk62RIwL8B0uQwHgXVRnDfkS2DSj/EW4K0Ew05eLMV4O/CuUJwEUvJUgdgwMd4IpBUKl13kVG6aL+ZjJ20DDQqQXy5jKYVMDBhVrb5f069LLrKfGnInqh040HRTvsTAHgei9oGQ7X0YaNNUNCdFKChgQvKtQ1vAkNvEahlSToez9oXad2BCA30ceHZxRxMQMShuvZLmv+hOA32/h+KUwS7MugVhqwb6Go+5nEEwht0ABDUEzyXdFsrQYwqMJjTbdxio9Qkg6QbgvkpnkLw0uQIAZ1UCYNkXawdw4qPCmVBcuADAMZCpAoCVYr3AKtYyHZSWauakjMx50TWwrzJw6lFARjQOt3se8jM6W9TloSCqIb9bRHbN5Fg+KkEZcow/Ak+KFBsD6h3jR8CUabAMlqn7xfxEbAdwWKLhhO3sGPCbOsNSvSyF0Z/5TaCuEleziLhmAOiWG1NWrmZXwIVU1A/+SZO+AcgLC4wt0zD3AAAAAElFTkSuQmCC"; |
|||
break; |
|||
|
|||
case "notice": |
|||
default: |
|||
_icon = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3gQJATM4scOJLAAAAcxJREFUWMPtljtLA0EQx3+J0QRfnYqCiCA+MERBrIwgFtoFbMTOR61i5QcQBdEihZWNoEWwsNAvkMJeBLHRQtHC0iIP4utOmw2cx97d7l2SRgcGbufmv/Pf2dmdhb8uIR+YJqAPaBff30AeeAHuxLgqMgRkgS/AAEybGuLfEdBcycCTwKVYmY5mgO6gwdd8BLaqAST9Bs8EDG7VTd3gex4TbgEjwKjQOHDugZlRDb7sMZEJpCS4bYVMJOygsG1cB+wqHN0Gib1RYXFpLwL74nx7Sb3EFlXATQNjTgRagA3FbZIRiCliT5wITGgUaRACA0CPjMC4xtUcDUAgDAzLCCQ0MhALQCAE9MoIdGkQCJIBgE4ZgWiNMvDL10qgUMMMFGQEnjQmkLXbVg38s8y4qtFcTCAnHiJ5oKiJnSoHjVgIXAmHkGIl5yy+YcWruIy9dvqpupIDCfZWEXvh1gsWFVfxIbG9a3RbRwJnYiuqJYfAqxsBgBWFiQyJzfTAlIB1uzEicbwBFoBTl8lSwINoSuXKjrv4F4FBh61zlKUKvgn7/e5ZEngMEDgLdFSieHaAT42LpgTMVbqC24B54Bi4twV9E6cnDcw6PFj+RSo/l6rlSlldhx4AAAAASUVORK5CYII="; |
|||
break; |
|||
} |
|||
} else if (icon === false) { |
|||
_icon = null; |
|||
} else { |
|||
_icon = icon; |
|||
} |
|||
|
|||
if (!_tag || tag !== null) { |
|||
_tag = tag === null ? "PNotify-".concat(Math.round(Math.random() * 1000000)) : tag; |
|||
} |
|||
|
|||
var desktopOptions = { |
|||
body: text || self.text, |
|||
tag: _tag |
|||
}; |
|||
|
|||
if (!self.hide) { |
|||
desktopOptions.requireInteraction = true; |
|||
} |
|||
|
|||
if (_icon !== null) { |
|||
desktopOptions.icon = _icon; |
|||
} |
|||
|
|||
Object.apply(desktopOptions, options); |
|||
_desktop = _notify(title || self.title, desktopOptions, function () { |
|||
self.fire && self.fire("click", { |
|||
target: _desktop |
|||
}); |
|||
}, function () { |
|||
self.close && self.close(); |
|||
}); |
|||
|
|||
if (!("close" in _desktop) && "cancel" in _desktop) { |
|||
_desktop.close = function () { |
|||
_desktop.cancel(); |
|||
}; |
|||
} |
|||
} |
|||
|
|||
$$self.$$set = function ($$props) { |
|||
if ("self" in $$props) $$invalidate(0, self = $$props.self); |
|||
if ("fallback" in $$props) $$invalidate(1, fallback = $$props.fallback); |
|||
if ("icon" in $$props) $$invalidate(2, icon = $$props.icon); |
|||
if ("tag" in $$props) $$invalidate(3, tag = $$props.tag); |
|||
if ("title" in $$props) $$invalidate(4, title = $$props.title); |
|||
if ("text" in $$props) $$invalidate(5, text = $$props.text); |
|||
if ("options" in $$props) $$invalidate(6, options = $$props.options); |
|||
}; |
|||
|
|||
$$self.$$.update = function () { |
|||
if ($$self.$$.dirty & |
|||
/*self, _permission, _oldAnimation*/ |
|||
257) { |
|||
{ |
|||
if (self.animation !== "none") { |
|||
$$invalidate(8, _oldAnimation = self.animation); |
|||
} // This is necessary so desktop notices don't cause spacing problems
|
|||
// when positioning.
|
|||
|
|||
|
|||
if (self.getAnimatingClass() !== "" && _permission) { |
|||
self.setAnimatingClass(""); |
|||
} |
|||
|
|||
if (!_permission && self.hasModuleClass("elem", "pnotify-desktop-hide")) { |
|||
self.removeModuleClass("elem", "pnotify-desktop-hide"); |
|||
$$invalidate(0, self.animation = _oldAnimation, self); |
|||
} else if (_permission && !self.hasModuleClass("elem", "pnotify-desktop-hide")) { |
|||
self.addModuleClass("elem", "pnotify-desktop-hide"); |
|||
$$invalidate(0, self.animation = "none", self); |
|||
genNotice(); |
|||
} |
|||
} |
|||
} |
|||
|
|||
if ($$self.$$.dirty & |
|||
/*self, _permission*/ |
|||
1) { |
|||
{ |
|||
self.setModuleHandled(_permission); |
|||
} |
|||
} |
|||
}; |
|||
|
|||
return [self, fallback, icon, tag, title, text, options]; |
|||
} |
|||
|
|||
var Desktop = /*#__PURE__*/function (_SvelteComponent) { |
|||
_inherits(Desktop, _SvelteComponent); |
|||
|
|||
var _super = _createSuper(Desktop); |
|||
|
|||
function Desktop(options) { |
|||
var _this; |
|||
|
|||
_classCallCheck(this, Desktop); |
|||
|
|||
_this = _super.call(this); |
|||
init(_assertThisInitialized(_this), options, instance, null, safe_not_equal, { |
|||
self: 0, |
|||
fallback: 1, |
|||
icon: 2, |
|||
tag: 3, |
|||
title: 4, |
|||
text: 5, |
|||
options: 6 |
|||
}); |
|||
return _this; |
|||
} |
|||
|
|||
return Desktop; |
|||
}(SvelteComponent); |
|||
|
|||
exports.default = Desktop; |
|||
exports.defaults = defaults; |
|||
exports.permission = requestPermission; |
|||
exports.position = position; |
|||
|
|||
Object.defineProperty(exports, '__esModule', { value: true }); |
|||
|
|||
}))); |
|||
@ -0,0 +1,471 @@ |
|||
(function (global, factory) { |
|||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : |
|||
typeof define === 'function' && define.amd ? define(['exports'], factory) : |
|||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.PNotifyFontAwesome5 = {})); |
|||
}(this, (function (exports) { 'use strict'; |
|||
|
|||
function _typeof(obj) { |
|||
"@babel/helpers - typeof"; |
|||
|
|||
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { |
|||
_typeof = function (obj) { |
|||
return typeof obj; |
|||
}; |
|||
} else { |
|||
_typeof = function (obj) { |
|||
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; |
|||
}; |
|||
} |
|||
|
|||
return _typeof(obj); |
|||
} |
|||
|
|||
function _classCallCheck(instance, Constructor) { |
|||
if (!(instance instanceof Constructor)) { |
|||
throw new TypeError("Cannot call a class as a function"); |
|||
} |
|||
} |
|||
|
|||
function _defineProperties(target, props) { |
|||
for (var i = 0; i < props.length; i++) { |
|||
var descriptor = props[i]; |
|||
descriptor.enumerable = descriptor.enumerable || false; |
|||
descriptor.configurable = true; |
|||
if ("value" in descriptor) descriptor.writable = true; |
|||
Object.defineProperty(target, descriptor.key, descriptor); |
|||
} |
|||
} |
|||
|
|||
function _createClass(Constructor, protoProps, staticProps) { |
|||
if (protoProps) _defineProperties(Constructor.prototype, protoProps); |
|||
if (staticProps) _defineProperties(Constructor, staticProps); |
|||
return Constructor; |
|||
} |
|||
|
|||
function _inherits(subClass, superClass) { |
|||
if (typeof superClass !== "function" && superClass !== null) { |
|||
throw new TypeError("Super expression must either be null or a function"); |
|||
} |
|||
|
|||
subClass.prototype = Object.create(superClass && superClass.prototype, { |
|||
constructor: { |
|||
value: subClass, |
|||
writable: true, |
|||
configurable: true |
|||
} |
|||
}); |
|||
if (superClass) _setPrototypeOf(subClass, superClass); |
|||
} |
|||
|
|||
function _getPrototypeOf(o) { |
|||
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { |
|||
return o.__proto__ || Object.getPrototypeOf(o); |
|||
}; |
|||
return _getPrototypeOf(o); |
|||
} |
|||
|
|||
function _setPrototypeOf(o, p) { |
|||
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { |
|||
o.__proto__ = p; |
|||
return o; |
|||
}; |
|||
|
|||
return _setPrototypeOf(o, p); |
|||
} |
|||
|
|||
function _isNativeReflectConstruct() { |
|||
if (typeof Reflect === "undefined" || !Reflect.construct) return false; |
|||
if (Reflect.construct.sham) return false; |
|||
if (typeof Proxy === "function") return true; |
|||
|
|||
try { |
|||
Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); |
|||
return true; |
|||
} catch (e) { |
|||
return false; |
|||
} |
|||
} |
|||
|
|||
function _assertThisInitialized(self) { |
|||
if (self === void 0) { |
|||
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); |
|||
} |
|||
|
|||
return self; |
|||
} |
|||
|
|||
function _possibleConstructorReturn(self, call) { |
|||
if (call && (typeof call === "object" || typeof call === "function")) { |
|||
return call; |
|||
} |
|||
|
|||
return _assertThisInitialized(self); |
|||
} |
|||
|
|||
function _createSuper(Derived) { |
|||
var hasNativeReflectConstruct = _isNativeReflectConstruct(); |
|||
|
|||
return function _createSuperInternal() { |
|||
var Super = _getPrototypeOf(Derived), |
|||
result; |
|||
|
|||
if (hasNativeReflectConstruct) { |
|||
var NewTarget = _getPrototypeOf(this).constructor; |
|||
|
|||
result = Reflect.construct(Super, arguments, NewTarget); |
|||
} else { |
|||
result = Super.apply(this, arguments); |
|||
} |
|||
|
|||
return _possibleConstructorReturn(this, result); |
|||
}; |
|||
} |
|||
|
|||
function _toConsumableArray(arr) { |
|||
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); |
|||
} |
|||
|
|||
function _arrayWithoutHoles(arr) { |
|||
if (Array.isArray(arr)) return _arrayLikeToArray(arr); |
|||
} |
|||
|
|||
function _iterableToArray(iter) { |
|||
if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); |
|||
} |
|||
|
|||
function _unsupportedIterableToArray(o, minLen) { |
|||
if (!o) return; |
|||
if (typeof o === "string") return _arrayLikeToArray(o, minLen); |
|||
var n = Object.prototype.toString.call(o).slice(8, -1); |
|||
if (n === "Object" && o.constructor) n = o.constructor.name; |
|||
if (n === "Map" || n === "Set") return Array.from(o); |
|||
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); |
|||
} |
|||
|
|||
function _arrayLikeToArray(arr, len) { |
|||
if (len == null || len > arr.length) len = arr.length; |
|||
|
|||
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; |
|||
|
|||
return arr2; |
|||
} |
|||
|
|||
function _nonIterableSpread() { |
|||
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); |
|||
} |
|||
|
|||
function noop() {} |
|||
|
|||
function run(fn) { |
|||
return fn(); |
|||
} |
|||
|
|||
function blank_object() { |
|||
return Object.create(null); |
|||
} |
|||
|
|||
function run_all(fns) { |
|||
fns.forEach(run); |
|||
} |
|||
|
|||
function is_function(thing) { |
|||
return typeof thing === 'function'; |
|||
} |
|||
|
|||
function safe_not_equal(a, b) { |
|||
return a != a ? b == b : a !== b || a && _typeof(a) === 'object' || typeof a === 'function'; |
|||
} |
|||
|
|||
function is_empty(obj) { |
|||
return Object.keys(obj).length === 0; |
|||
} |
|||
|
|||
function detach(node) { |
|||
node.parentNode.removeChild(node); |
|||
} |
|||
|
|||
function children(element) { |
|||
return Array.from(element.childNodes); |
|||
} |
|||
|
|||
var current_component; |
|||
|
|||
function set_current_component(component) { |
|||
current_component = component; |
|||
} |
|||
|
|||
var dirty_components = []; |
|||
var binding_callbacks = []; |
|||
var render_callbacks = []; |
|||
var flush_callbacks = []; |
|||
var resolved_promise = Promise.resolve(); |
|||
var update_scheduled = false; |
|||
|
|||
function schedule_update() { |
|||
if (!update_scheduled) { |
|||
update_scheduled = true; |
|||
resolved_promise.then(flush); |
|||
} |
|||
} |
|||
|
|||
function add_render_callback(fn) { |
|||
render_callbacks.push(fn); |
|||
} |
|||
|
|||
var flushing = false; |
|||
var seen_callbacks = new Set(); |
|||
|
|||
function flush() { |
|||
if (flushing) return; |
|||
flushing = true; |
|||
|
|||
do { |
|||
// first, call beforeUpdate functions
|
|||
// and update components
|
|||
for (var i = 0; i < dirty_components.length; i += 1) { |
|||
var component = dirty_components[i]; |
|||
set_current_component(component); |
|||
update(component.$$); |
|||
} |
|||
|
|||
set_current_component(null); |
|||
dirty_components.length = 0; |
|||
|
|||
while (binding_callbacks.length) { |
|||
binding_callbacks.pop()(); |
|||
} // then, once components are updated, call
|
|||
// afterUpdate functions. This may cause
|
|||
// subsequent updates...
|
|||
|
|||
|
|||
for (var _i = 0; _i < render_callbacks.length; _i += 1) { |
|||
var callback = render_callbacks[_i]; |
|||
|
|||
if (!seen_callbacks.has(callback)) { |
|||
// ...so guard against infinite loops
|
|||
seen_callbacks.add(callback); |
|||
callback(); |
|||
} |
|||
} |
|||
|
|||
render_callbacks.length = 0; |
|||
} while (dirty_components.length); |
|||
|
|||
while (flush_callbacks.length) { |
|||
flush_callbacks.pop()(); |
|||
} |
|||
|
|||
update_scheduled = false; |
|||
flushing = false; |
|||
seen_callbacks.clear(); |
|||
} |
|||
|
|||
function update($$) { |
|||
if ($$.fragment !== null) { |
|||
$$.update(); |
|||
run_all($$.before_update); |
|||
var dirty = $$.dirty; |
|||
$$.dirty = [-1]; |
|||
$$.fragment && $$.fragment.p($$.ctx, dirty); |
|||
$$.after_update.forEach(add_render_callback); |
|||
} |
|||
} |
|||
|
|||
var outroing = new Set(); |
|||
|
|||
function transition_in(block, local) { |
|||
if (block && block.i) { |
|||
outroing["delete"](block); |
|||
block.i(local); |
|||
} |
|||
} |
|||
|
|||
function mount_component(component, target, anchor) { |
|||
var _component$$$ = component.$$, |
|||
fragment = _component$$$.fragment, |
|||
on_mount = _component$$$.on_mount, |
|||
on_destroy = _component$$$.on_destroy, |
|||
after_update = _component$$$.after_update; |
|||
fragment && fragment.m(target, anchor); // onMount happens before the initial afterUpdate
|
|||
|
|||
add_render_callback(function () { |
|||
var new_on_destroy = on_mount.map(run).filter(is_function); |
|||
|
|||
if (on_destroy) { |
|||
on_destroy.push.apply(on_destroy, _toConsumableArray(new_on_destroy)); |
|||
} else { |
|||
// Edge case - component was destroyed immediately,
|
|||
// most likely as a result of a binding initialising
|
|||
run_all(new_on_destroy); |
|||
} |
|||
|
|||
component.$$.on_mount = []; |
|||
}); |
|||
after_update.forEach(add_render_callback); |
|||
} |
|||
|
|||
function destroy_component(component, detaching) { |
|||
var $$ = component.$$; |
|||
|
|||
if ($$.fragment !== null) { |
|||
run_all($$.on_destroy); |
|||
$$.fragment && $$.fragment.d(detaching); // TODO null out other refs, including component.$$ (but need to
|
|||
// preserve final state?)
|
|||
|
|||
$$.on_destroy = $$.fragment = null; |
|||
$$.ctx = []; |
|||
} |
|||
} |
|||
|
|||
function make_dirty(component, i) { |
|||
if (component.$$.dirty[0] === -1) { |
|||
dirty_components.push(component); |
|||
schedule_update(); |
|||
component.$$.dirty.fill(0); |
|||
} |
|||
|
|||
component.$$.dirty[i / 31 | 0] |= 1 << i % 31; |
|||
} |
|||
|
|||
function init(component, options, instance, create_fragment, not_equal, props) { |
|||
var dirty = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : [-1]; |
|||
var parent_component = current_component; |
|||
set_current_component(component); |
|||
var prop_values = options.props || {}; |
|||
var $$ = component.$$ = { |
|||
fragment: null, |
|||
ctx: null, |
|||
// state
|
|||
props: props, |
|||
update: noop, |
|||
not_equal: not_equal, |
|||
bound: blank_object(), |
|||
// lifecycle
|
|||
on_mount: [], |
|||
on_destroy: [], |
|||
before_update: [], |
|||
after_update: [], |
|||
context: new Map(parent_component ? parent_component.$$.context : []), |
|||
// everything else
|
|||
callbacks: blank_object(), |
|||
dirty: dirty, |
|||
skip_bound: false |
|||
}; |
|||
var ready = false; |
|||
$$.ctx = instance ? instance(component, prop_values, function (i, ret) { |
|||
var value = (arguments.length <= 2 ? 0 : arguments.length - 2) ? arguments.length <= 2 ? undefined : arguments[2] : ret; |
|||
|
|||
if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) { |
|||
if (!$$.skip_bound && $$.bound[i]) $$.bound[i](value); |
|||
if (ready) make_dirty(component, i); |
|||
} |
|||
|
|||
return ret; |
|||
}) : []; |
|||
$$.update(); |
|||
ready = true; |
|||
run_all($$.before_update); // `false` as a special case of no DOM component
|
|||
|
|||
$$.fragment = create_fragment ? create_fragment($$.ctx) : false; |
|||
|
|||
if (options.target) { |
|||
if (options.hydrate) { |
|||
var nodes = children(options.target); // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|||
|
|||
$$.fragment && $$.fragment.l(nodes); |
|||
nodes.forEach(detach); |
|||
} else { |
|||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|||
$$.fragment && $$.fragment.c(); |
|||
} |
|||
|
|||
if (options.intro) transition_in(component.$$.fragment); |
|||
mount_component(component, options.target, options.anchor); |
|||
flush(); |
|||
} |
|||
|
|||
set_current_component(parent_component); |
|||
} |
|||
|
|||
var SvelteComponent = /*#__PURE__*/function () { |
|||
function SvelteComponent() { |
|||
_classCallCheck(this, SvelteComponent); |
|||
} |
|||
|
|||
_createClass(SvelteComponent, [{ |
|||
key: "$destroy", |
|||
value: function $destroy() { |
|||
destroy_component(this, 1); |
|||
this.$destroy = noop; |
|||
} |
|||
}, { |
|||
key: "$on", |
|||
value: function $on(type, callback) { |
|||
var callbacks = this.$$.callbacks[type] || (this.$$.callbacks[type] = []); |
|||
callbacks.push(callback); |
|||
return function () { |
|||
var index = callbacks.indexOf(callback); |
|||
if (index !== -1) callbacks.splice(index, 1); |
|||
}; |
|||
} |
|||
}, { |
|||
key: "$set", |
|||
value: function $set($$props) { |
|||
if (this.$$set && !is_empty($$props)) { |
|||
this.$$.skip_bound = true; |
|||
this.$$set($$props); |
|||
this.$$.skip_bound = false; |
|||
} |
|||
} |
|||
}]); |
|||
|
|||
return SvelteComponent; |
|||
}(); |
|||
|
|||
var position = "PrependContainer"; |
|||
var defaults = {}; |
|||
|
|||
function init$1(eventDetail) { |
|||
// You must have Font Awesome v5.0+
|
|||
eventDetail.defaults.icons = { |
|||
prefix: "fontawesome5", |
|||
notice: "fas fa-exclamation-circle", |
|||
info: "fas fa-info-circle", |
|||
success: "fas fa-check-circle", |
|||
error: "fas fa-exclamation-triangle", |
|||
// Buttons Module
|
|||
closer: "fas fa-times", |
|||
sticker: "fas", |
|||
stuck: "fa-play", |
|||
unstuck: "fa-pause", |
|||
// Reference Module (Useful for other modules.)
|
|||
refresh: "fas fa-sync" |
|||
}; |
|||
} |
|||
|
|||
var Font_awesome5 = /*#__PURE__*/function (_SvelteComponent) { |
|||
_inherits(Font_awesome5, _SvelteComponent); |
|||
|
|||
var _super = _createSuper(Font_awesome5); |
|||
|
|||
function Font_awesome5(options) { |
|||
var _this; |
|||
|
|||
_classCallCheck(this, Font_awesome5); |
|||
|
|||
_this = _super.call(this); |
|||
init(_assertThisInitialized(_this), options, null, null, safe_not_equal, {}); |
|||
return _this; |
|||
} |
|||
|
|||
return Font_awesome5; |
|||
}(SvelteComponent); |
|||
|
|||
exports.default = Font_awesome5; |
|||
exports.defaults = defaults; |
|||
exports.init = init$1; |
|||
exports.position = position; |
|||
|
|||
Object.defineProperty(exports, '__esModule', { value: true }); |
|||
|
|||
}))); |
|||
@ -0,0 +1,548 @@ |
|||
(function (global, factory) { |
|||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : |
|||
typeof define === 'function' && define.amd ? define(['exports'], factory) : |
|||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.PNotifyFontAwesome5Fix = {})); |
|||
}(this, (function (exports) { 'use strict'; |
|||
|
|||
function _typeof(obj) { |
|||
"@babel/helpers - typeof"; |
|||
|
|||
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { |
|||
_typeof = function (obj) { |
|||
return typeof obj; |
|||
}; |
|||
} else { |
|||
_typeof = function (obj) { |
|||
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; |
|||
}; |
|||
} |
|||
|
|||
return _typeof(obj); |
|||
} |
|||
|
|||
function _classCallCheck(instance, Constructor) { |
|||
if (!(instance instanceof Constructor)) { |
|||
throw new TypeError("Cannot call a class as a function"); |
|||
} |
|||
} |
|||
|
|||
function _defineProperties(target, props) { |
|||
for (var i = 0; i < props.length; i++) { |
|||
var descriptor = props[i]; |
|||
descriptor.enumerable = descriptor.enumerable || false; |
|||
descriptor.configurable = true; |
|||
if ("value" in descriptor) descriptor.writable = true; |
|||
Object.defineProperty(target, descriptor.key, descriptor); |
|||
} |
|||
} |
|||
|
|||
function _createClass(Constructor, protoProps, staticProps) { |
|||
if (protoProps) _defineProperties(Constructor.prototype, protoProps); |
|||
if (staticProps) _defineProperties(Constructor, staticProps); |
|||
return Constructor; |
|||
} |
|||
|
|||
function _inherits(subClass, superClass) { |
|||
if (typeof superClass !== "function" && superClass !== null) { |
|||
throw new TypeError("Super expression must either be null or a function"); |
|||
} |
|||
|
|||
subClass.prototype = Object.create(superClass && superClass.prototype, { |
|||
constructor: { |
|||
value: subClass, |
|||
writable: true, |
|||
configurable: true |
|||
} |
|||
}); |
|||
if (superClass) _setPrototypeOf(subClass, superClass); |
|||
} |
|||
|
|||
function _getPrototypeOf(o) { |
|||
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { |
|||
return o.__proto__ || Object.getPrototypeOf(o); |
|||
}; |
|||
return _getPrototypeOf(o); |
|||
} |
|||
|
|||
function _setPrototypeOf(o, p) { |
|||
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { |
|||
o.__proto__ = p; |
|||
return o; |
|||
}; |
|||
|
|||
return _setPrototypeOf(o, p); |
|||
} |
|||
|
|||
function _isNativeReflectConstruct() { |
|||
if (typeof Reflect === "undefined" || !Reflect.construct) return false; |
|||
if (Reflect.construct.sham) return false; |
|||
if (typeof Proxy === "function") return true; |
|||
|
|||
try { |
|||
Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); |
|||
return true; |
|||
} catch (e) { |
|||
return false; |
|||
} |
|||
} |
|||
|
|||
function _assertThisInitialized(self) { |
|||
if (self === void 0) { |
|||
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); |
|||
} |
|||
|
|||
return self; |
|||
} |
|||
|
|||
function _possibleConstructorReturn(self, call) { |
|||
if (call && (typeof call === "object" || typeof call === "function")) { |
|||
return call; |
|||
} |
|||
|
|||
return _assertThisInitialized(self); |
|||
} |
|||
|
|||
function _createSuper(Derived) { |
|||
var hasNativeReflectConstruct = _isNativeReflectConstruct(); |
|||
|
|||
return function _createSuperInternal() { |
|||
var Super = _getPrototypeOf(Derived), |
|||
result; |
|||
|
|||
if (hasNativeReflectConstruct) { |
|||
var NewTarget = _getPrototypeOf(this).constructor; |
|||
|
|||
result = Reflect.construct(Super, arguments, NewTarget); |
|||
} else { |
|||
result = Super.apply(this, arguments); |
|||
} |
|||
|
|||
return _possibleConstructorReturn(this, result); |
|||
}; |
|||
} |
|||
|
|||
function _toConsumableArray(arr) { |
|||
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); |
|||
} |
|||
|
|||
function _arrayWithoutHoles(arr) { |
|||
if (Array.isArray(arr)) return _arrayLikeToArray(arr); |
|||
} |
|||
|
|||
function _iterableToArray(iter) { |
|||
if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); |
|||
} |
|||
|
|||
function _unsupportedIterableToArray(o, minLen) { |
|||
if (!o) return; |
|||
if (typeof o === "string") return _arrayLikeToArray(o, minLen); |
|||
var n = Object.prototype.toString.call(o).slice(8, -1); |
|||
if (n === "Object" && o.constructor) n = o.constructor.name; |
|||
if (n === "Map" || n === "Set") return Array.from(o); |
|||
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); |
|||
} |
|||
|
|||
function _arrayLikeToArray(arr, len) { |
|||
if (len == null || len > arr.length) len = arr.length; |
|||
|
|||
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; |
|||
|
|||
return arr2; |
|||
} |
|||
|
|||
function _nonIterableSpread() { |
|||
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); |
|||
} |
|||
|
|||
function noop() {} |
|||
|
|||
function run(fn) { |
|||
return fn(); |
|||
} |
|||
|
|||
function blank_object() { |
|||
return Object.create(null); |
|||
} |
|||
|
|||
function run_all(fns) { |
|||
fns.forEach(run); |
|||
} |
|||
|
|||
function is_function(thing) { |
|||
return typeof thing === 'function'; |
|||
} |
|||
|
|||
function safe_not_equal(a, b) { |
|||
return a != a ? b == b : a !== b || a && _typeof(a) === 'object' || typeof a === 'function'; |
|||
} |
|||
|
|||
function is_empty(obj) { |
|||
return Object.keys(obj).length === 0; |
|||
} |
|||
|
|||
function detach(node) { |
|||
node.parentNode.removeChild(node); |
|||
} |
|||
|
|||
function children(element) { |
|||
return Array.from(element.childNodes); |
|||
} |
|||
|
|||
var current_component; |
|||
|
|||
function set_current_component(component) { |
|||
current_component = component; |
|||
} |
|||
|
|||
function get_current_component() { |
|||
if (!current_component) throw new Error('Function called outside component initialization'); |
|||
return current_component; |
|||
} |
|||
|
|||
function onDestroy(fn) { |
|||
get_current_component().$$.on_destroy.push(fn); |
|||
} |
|||
|
|||
var dirty_components = []; |
|||
var binding_callbacks = []; |
|||
var render_callbacks = []; |
|||
var flush_callbacks = []; |
|||
var resolved_promise = Promise.resolve(); |
|||
var update_scheduled = false; |
|||
|
|||
function schedule_update() { |
|||
if (!update_scheduled) { |
|||
update_scheduled = true; |
|||
resolved_promise.then(flush); |
|||
} |
|||
} |
|||
|
|||
function tick() { |
|||
schedule_update(); |
|||
return resolved_promise; |
|||
} |
|||
|
|||
function add_render_callback(fn) { |
|||
render_callbacks.push(fn); |
|||
} |
|||
|
|||
var flushing = false; |
|||
var seen_callbacks = new Set(); |
|||
|
|||
function flush() { |
|||
if (flushing) return; |
|||
flushing = true; |
|||
|
|||
do { |
|||
// first, call beforeUpdate functions
|
|||
// and update components
|
|||
for (var i = 0; i < dirty_components.length; i += 1) { |
|||
var component = dirty_components[i]; |
|||
set_current_component(component); |
|||
update(component.$$); |
|||
} |
|||
|
|||
set_current_component(null); |
|||
dirty_components.length = 0; |
|||
|
|||
while (binding_callbacks.length) { |
|||
binding_callbacks.pop()(); |
|||
} // then, once components are updated, call
|
|||
// afterUpdate functions. This may cause
|
|||
// subsequent updates...
|
|||
|
|||
|
|||
for (var _i = 0; _i < render_callbacks.length; _i += 1) { |
|||
var callback = render_callbacks[_i]; |
|||
|
|||
if (!seen_callbacks.has(callback)) { |
|||
// ...so guard against infinite loops
|
|||
seen_callbacks.add(callback); |
|||
callback(); |
|||
} |
|||
} |
|||
|
|||
render_callbacks.length = 0; |
|||
} while (dirty_components.length); |
|||
|
|||
while (flush_callbacks.length) { |
|||
flush_callbacks.pop()(); |
|||
} |
|||
|
|||
update_scheduled = false; |
|||
flushing = false; |
|||
seen_callbacks.clear(); |
|||
} |
|||
|
|||
function update($$) { |
|||
if ($$.fragment !== null) { |
|||
$$.update(); |
|||
run_all($$.before_update); |
|||
var dirty = $$.dirty; |
|||
$$.dirty = [-1]; |
|||
$$.fragment && $$.fragment.p($$.ctx, dirty); |
|||
$$.after_update.forEach(add_render_callback); |
|||
} |
|||
} |
|||
|
|||
var outroing = new Set(); |
|||
|
|||
function transition_in(block, local) { |
|||
if (block && block.i) { |
|||
outroing["delete"](block); |
|||
block.i(local); |
|||
} |
|||
} |
|||
|
|||
function mount_component(component, target, anchor) { |
|||
var _component$$$ = component.$$, |
|||
fragment = _component$$$.fragment, |
|||
on_mount = _component$$$.on_mount, |
|||
on_destroy = _component$$$.on_destroy, |
|||
after_update = _component$$$.after_update; |
|||
fragment && fragment.m(target, anchor); // onMount happens before the initial afterUpdate
|
|||
|
|||
add_render_callback(function () { |
|||
var new_on_destroy = on_mount.map(run).filter(is_function); |
|||
|
|||
if (on_destroy) { |
|||
on_destroy.push.apply(on_destroy, _toConsumableArray(new_on_destroy)); |
|||
} else { |
|||
// Edge case - component was destroyed immediately,
|
|||
// most likely as a result of a binding initialising
|
|||
run_all(new_on_destroy); |
|||
} |
|||
|
|||
component.$$.on_mount = []; |
|||
}); |
|||
after_update.forEach(add_render_callback); |
|||
} |
|||
|
|||
function destroy_component(component, detaching) { |
|||
var $$ = component.$$; |
|||
|
|||
if ($$.fragment !== null) { |
|||
run_all($$.on_destroy); |
|||
$$.fragment && $$.fragment.d(detaching); // TODO null out other refs, including component.$$ (but need to
|
|||
// preserve final state?)
|
|||
|
|||
$$.on_destroy = $$.fragment = null; |
|||
$$.ctx = []; |
|||
} |
|||
} |
|||
|
|||
function make_dirty(component, i) { |
|||
if (component.$$.dirty[0] === -1) { |
|||
dirty_components.push(component); |
|||
schedule_update(); |
|||
component.$$.dirty.fill(0); |
|||
} |
|||
|
|||
component.$$.dirty[i / 31 | 0] |= 1 << i % 31; |
|||
} |
|||
|
|||
function init(component, options, instance, create_fragment, not_equal, props) { |
|||
var dirty = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : [-1]; |
|||
var parent_component = current_component; |
|||
set_current_component(component); |
|||
var prop_values = options.props || {}; |
|||
var $$ = component.$$ = { |
|||
fragment: null, |
|||
ctx: null, |
|||
// state
|
|||
props: props, |
|||
update: noop, |
|||
not_equal: not_equal, |
|||
bound: blank_object(), |
|||
// lifecycle
|
|||
on_mount: [], |
|||
on_destroy: [], |
|||
before_update: [], |
|||
after_update: [], |
|||
context: new Map(parent_component ? parent_component.$$.context : []), |
|||
// everything else
|
|||
callbacks: blank_object(), |
|||
dirty: dirty, |
|||
skip_bound: false |
|||
}; |
|||
var ready = false; |
|||
$$.ctx = instance ? instance(component, prop_values, function (i, ret) { |
|||
var value = (arguments.length <= 2 ? 0 : arguments.length - 2) ? arguments.length <= 2 ? undefined : arguments[2] : ret; |
|||
|
|||
if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) { |
|||
if (!$$.skip_bound && $$.bound[i]) $$.bound[i](value); |
|||
if (ready) make_dirty(component, i); |
|||
} |
|||
|
|||
return ret; |
|||
}) : []; |
|||
$$.update(); |
|||
ready = true; |
|||
run_all($$.before_update); // `false` as a special case of no DOM component
|
|||
|
|||
$$.fragment = create_fragment ? create_fragment($$.ctx) : false; |
|||
|
|||
if (options.target) { |
|||
if (options.hydrate) { |
|||
var nodes = children(options.target); // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|||
|
|||
$$.fragment && $$.fragment.l(nodes); |
|||
nodes.forEach(detach); |
|||
} else { |
|||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|||
$$.fragment && $$.fragment.c(); |
|||
} |
|||
|
|||
if (options.intro) transition_in(component.$$.fragment); |
|||
mount_component(component, options.target, options.anchor); |
|||
flush(); |
|||
} |
|||
|
|||
set_current_component(parent_component); |
|||
} |
|||
|
|||
var SvelteComponent = /*#__PURE__*/function () { |
|||
function SvelteComponent() { |
|||
_classCallCheck(this, SvelteComponent); |
|||
} |
|||
|
|||
_createClass(SvelteComponent, [{ |
|||
key: "$destroy", |
|||
value: function $destroy() { |
|||
destroy_component(this, 1); |
|||
this.$destroy = noop; |
|||
} |
|||
}, { |
|||
key: "$on", |
|||
value: function $on(type, callback) { |
|||
var callbacks = this.$$.callbacks[type] || (this.$$.callbacks[type] = []); |
|||
callbacks.push(callback); |
|||
return function () { |
|||
var index = callbacks.indexOf(callback); |
|||
if (index !== -1) callbacks.splice(index, 1); |
|||
}; |
|||
} |
|||
}, { |
|||
key: "$set", |
|||
value: function $set($$props) { |
|||
if (this.$$set && !is_empty($$props)) { |
|||
this.$$.skip_bound = true; |
|||
this.$$set($$props); |
|||
this.$$.skip_bound = false; |
|||
} |
|||
} |
|||
}]); |
|||
|
|||
return SvelteComponent; |
|||
}(); |
|||
|
|||
var position = "PrependContainer"; |
|||
var defaults = {}; |
|||
|
|||
function instance($$self, $$props, $$invalidate) { |
|||
var _$$props$self = $$props.self, |
|||
self = _$$props$self === void 0 ? null : _$$props$self; // This keeps the beforeUpdate handler from going into a loop when we're
|
|||
// taming Font Awesome's magic.
|
|||
|
|||
var _updatingIcon = false; |
|||
var _updatingSticker = false; // Save the old value of icon, so we can do our magic.
|
|||
|
|||
var _oldIconProp = self.icon; |
|||
|
|||
var _oldIconValue = self.icon === true ? self.getIcon(self.type) : self.icon; |
|||
|
|||
var _oldSticker = "".concat(self.getIcon("sticker"), " ").concat(self.hide ? self.getIcon("unstuck") : self.getIcon("stuck")); |
|||
|
|||
var newIconProp; |
|||
var newIconValue; |
|||
var newSticker; |
|||
var removeIconHandler = self.on("pnotify:update", function () { |
|||
if (_updatingIcon) { |
|||
return; |
|||
} // Font Awesome 5 uses dark magic by replacing the icon element with an SVG.
|
|||
// In order to make it play nice with Svelte, we have to clear the element
|
|||
// and make it again.
|
|||
|
|||
|
|||
newIconProp = self.icon; |
|||
newIconValue = self.icon === true ? self.getIcon(self.type) : self.icon; |
|||
|
|||
if (newIconValue !== _oldIconValue && (typeof newIconValue === "string" && newIconValue.match(/(^| )fa[srlb]($| )/) || typeof _oldIconValue === "string" && _oldIconValue.match(/(^| )fa[srlb]($| )/))) { |
|||
$$invalidate(0, self.icon = false, self); |
|||
_updatingIcon = true; |
|||
tick().then(function () { |
|||
$$invalidate(0, self.icon = newIconProp, self); |
|||
_updatingIcon = false; // Update seved icon.
|
|||
|
|||
_oldIconProp = newIconProp; |
|||
_oldIconValue = newIconValue; |
|||
}); |
|||
} else { |
|||
// Update seved icon.
|
|||
_oldIconProp = newIconProp; |
|||
_oldIconValue = newIconValue; |
|||
} |
|||
}); |
|||
var removeStickerHandler = self.on("pnotify:update", function () { |
|||
if (_updatingSticker) { |
|||
return; |
|||
} // Font Awesome 5 uses dark magic by replacing the icon element with an SVG.
|
|||
// In order to make it play nice with Svelte, we have to clear the element
|
|||
// and make it again.
|
|||
|
|||
|
|||
newSticker = "".concat(self.getIcon("sticker"), " ").concat(self.hide ? self.getIcon("unstuck") : self.getIcon("stuck")); |
|||
|
|||
if (self.sticker && newSticker !== _oldSticker && typeof newSticker === "string" && newSticker.match(/(^| )fa[srlb]($| )/)) { |
|||
$$invalidate(0, self.sticker = false, self); |
|||
_updatingSticker = true; |
|||
tick().then(function () { |
|||
$$invalidate(0, self.sticker = true, self); |
|||
_updatingSticker = false; // Update seved icon.
|
|||
|
|||
_oldSticker = newSticker; |
|||
}); |
|||
} else { |
|||
// Update seved icon.
|
|||
_oldSticker = newSticker; |
|||
} |
|||
}); |
|||
onDestroy(function () { |
|||
removeIconHandler && removeIconHandler(); |
|||
removeStickerHandler && removeStickerHandler(); |
|||
}); |
|||
|
|||
$$self.$$set = function ($$props) { |
|||
if ("self" in $$props) $$invalidate(0, self = $$props.self); |
|||
}; |
|||
|
|||
return [self]; |
|||
} |
|||
|
|||
var Font_awesome5_fix = /*#__PURE__*/function (_SvelteComponent) { |
|||
_inherits(Font_awesome5_fix, _SvelteComponent); |
|||
|
|||
var _super = _createSuper(Font_awesome5_fix); |
|||
|
|||
function Font_awesome5_fix(options) { |
|||
var _this; |
|||
|
|||
_classCallCheck(this, Font_awesome5_fix); |
|||
|
|||
_this = _super.call(this); |
|||
init(_assertThisInitialized(_this), options, instance, null, safe_not_equal, { |
|||
self: 0 |
|||
}); |
|||
return _this; |
|||
} |
|||
|
|||
return Font_awesome5_fix; |
|||
}(SvelteComponent); |
|||
|
|||
exports.default = Font_awesome5_fix; |
|||
exports.defaults = defaults; |
|||
exports.position = position; |
|||
|
|||
Object.defineProperty(exports, '__esModule', { value: true }); |
|||
|
|||
}))); |
|||
@ -0,0 +1 @@ |
|||
[data-pnotify] .pnotify-container{position:relative}[data-pnotify] .pnotify-mobile-animate-left{transition:left .1s ease}[data-pnotify] .pnotify-mobile-animate-top{transition:top .1s ease}@media(max-width:480px){[data-pnotify].pnotify{font-size:1.2em;-webkit-font-smoothing:antialiased;-moz-font-smoothing:antialiased;-ms-font-smoothing:antialiased;font-smoothing:antialiased}body>[data-pnotify].pnotify{position:fixed}[data-pnotify].pnotify.pnotify-stack-down,[data-pnotify].pnotify.pnotify-stack-up{width:100%!important}[data-pnotify].pnotify.pnotify-stack-right,[data-pnotify].pnotify.pnotify-stack-left{height:100%!important}[data-pnotify].pnotify .pnotify-shadow{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}[data-pnotify].pnotify.pnotify-stack-down .pnotify-shadow{border-bottom-width:5px}[data-pnotify].pnotify.pnotify-stack-up .pnotify-shadow{border-top-width:5px}[data-pnotify].pnotify.pnotify-stack-right .pnotify-shadow{border-right-width:5px}[data-pnotify].pnotify.pnotify-stack-left .pnotify-shadow{border-left-width:5px}[data-pnotify].pnotify .pnotify-container{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}[data-pnotify].pnotify.pnotify-stack-down .pnotify-container,[data-pnotify].pnotify.pnotify-stack-up .pnotify-container{width:auto!important}[data-pnotify].pnotify.pnotify-stack-right .pnotify-container,[data-pnotify].pnotify.pnotify-stack-left .pnotify-container{height:100%!important}} |
|||
@ -0,0 +1,657 @@ |
|||
(function (global, factory) { |
|||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : |
|||
typeof define === 'function' && define.amd ? define(['exports'], factory) : |
|||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.PNotifyMobile = {})); |
|||
}(this, (function (exports) { 'use strict'; |
|||
|
|||
function _typeof(obj) { |
|||
"@babel/helpers - typeof"; |
|||
|
|||
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { |
|||
_typeof = function (obj) { |
|||
return typeof obj; |
|||
}; |
|||
} else { |
|||
_typeof = function (obj) { |
|||
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; |
|||
}; |
|||
} |
|||
|
|||
return _typeof(obj); |
|||
} |
|||
|
|||
function _classCallCheck(instance, Constructor) { |
|||
if (!(instance instanceof Constructor)) { |
|||
throw new TypeError("Cannot call a class as a function"); |
|||
} |
|||
} |
|||
|
|||
function _defineProperties(target, props) { |
|||
for (var i = 0; i < props.length; i++) { |
|||
var descriptor = props[i]; |
|||
descriptor.enumerable = descriptor.enumerable || false; |
|||
descriptor.configurable = true; |
|||
if ("value" in descriptor) descriptor.writable = true; |
|||
Object.defineProperty(target, descriptor.key, descriptor); |
|||
} |
|||
} |
|||
|
|||
function _createClass(Constructor, protoProps, staticProps) { |
|||
if (protoProps) _defineProperties(Constructor.prototype, protoProps); |
|||
if (staticProps) _defineProperties(Constructor, staticProps); |
|||
return Constructor; |
|||
} |
|||
|
|||
function _inherits(subClass, superClass) { |
|||
if (typeof superClass !== "function" && superClass !== null) { |
|||
throw new TypeError("Super expression must either be null or a function"); |
|||
} |
|||
|
|||
subClass.prototype = Object.create(superClass && superClass.prototype, { |
|||
constructor: { |
|||
value: subClass, |
|||
writable: true, |
|||
configurable: true |
|||
} |
|||
}); |
|||
if (superClass) _setPrototypeOf(subClass, superClass); |
|||
} |
|||
|
|||
function _getPrototypeOf(o) { |
|||
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { |
|||
return o.__proto__ || Object.getPrototypeOf(o); |
|||
}; |
|||
return _getPrototypeOf(o); |
|||
} |
|||
|
|||
function _setPrototypeOf(o, p) { |
|||
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { |
|||
o.__proto__ = p; |
|||
return o; |
|||
}; |
|||
|
|||
return _setPrototypeOf(o, p); |
|||
} |
|||
|
|||
function _isNativeReflectConstruct() { |
|||
if (typeof Reflect === "undefined" || !Reflect.construct) return false; |
|||
if (Reflect.construct.sham) return false; |
|||
if (typeof Proxy === "function") return true; |
|||
|
|||
try { |
|||
Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); |
|||
return true; |
|||
} catch (e) { |
|||
return false; |
|||
} |
|||
} |
|||
|
|||
function _assertThisInitialized(self) { |
|||
if (self === void 0) { |
|||
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); |
|||
} |
|||
|
|||
return self; |
|||
} |
|||
|
|||
function _possibleConstructorReturn(self, call) { |
|||
if (call && (typeof call === "object" || typeof call === "function")) { |
|||
return call; |
|||
} |
|||
|
|||
return _assertThisInitialized(self); |
|||
} |
|||
|
|||
function _createSuper(Derived) { |
|||
var hasNativeReflectConstruct = _isNativeReflectConstruct(); |
|||
|
|||
return function _createSuperInternal() { |
|||
var Super = _getPrototypeOf(Derived), |
|||
result; |
|||
|
|||
if (hasNativeReflectConstruct) { |
|||
var NewTarget = _getPrototypeOf(this).constructor; |
|||
|
|||
result = Reflect.construct(Super, arguments, NewTarget); |
|||
} else { |
|||
result = Super.apply(this, arguments); |
|||
} |
|||
|
|||
return _possibleConstructorReturn(this, result); |
|||
}; |
|||
} |
|||
|
|||
function _toConsumableArray(arr) { |
|||
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); |
|||
} |
|||
|
|||
function _arrayWithoutHoles(arr) { |
|||
if (Array.isArray(arr)) return _arrayLikeToArray(arr); |
|||
} |
|||
|
|||
function _iterableToArray(iter) { |
|||
if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); |
|||
} |
|||
|
|||
function _unsupportedIterableToArray(o, minLen) { |
|||
if (!o) return; |
|||
if (typeof o === "string") return _arrayLikeToArray(o, minLen); |
|||
var n = Object.prototype.toString.call(o).slice(8, -1); |
|||
if (n === "Object" && o.constructor) n = o.constructor.name; |
|||
if (n === "Map" || n === "Set") return Array.from(o); |
|||
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); |
|||
} |
|||
|
|||
function _arrayLikeToArray(arr, len) { |
|||
if (len == null || len > arr.length) len = arr.length; |
|||
|
|||
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; |
|||
|
|||
return arr2; |
|||
} |
|||
|
|||
function _nonIterableSpread() { |
|||
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); |
|||
} |
|||
|
|||
function noop() {} |
|||
|
|||
function run(fn) { |
|||
return fn(); |
|||
} |
|||
|
|||
function blank_object() { |
|||
return Object.create(null); |
|||
} |
|||
|
|||
function run_all(fns) { |
|||
fns.forEach(run); |
|||
} |
|||
|
|||
function is_function(thing) { |
|||
return typeof thing === 'function'; |
|||
} |
|||
|
|||
function safe_not_equal(a, b) { |
|||
return a != a ? b == b : a !== b || a && _typeof(a) === 'object' || typeof a === 'function'; |
|||
} |
|||
|
|||
function is_empty(obj) { |
|||
return Object.keys(obj).length === 0; |
|||
} |
|||
|
|||
function detach(node) { |
|||
node.parentNode.removeChild(node); |
|||
} |
|||
|
|||
function listen(node, event, handler, options) { |
|||
node.addEventListener(event, handler, options); |
|||
return function () { |
|||
return node.removeEventListener(event, handler, options); |
|||
}; |
|||
} |
|||
|
|||
function children(element) { |
|||
return Array.from(element.childNodes); |
|||
} |
|||
|
|||
var current_component; |
|||
|
|||
function set_current_component(component) { |
|||
current_component = component; |
|||
} |
|||
|
|||
function get_current_component() { |
|||
if (!current_component) throw new Error('Function called outside component initialization'); |
|||
return current_component; |
|||
} |
|||
|
|||
function onMount(fn) { |
|||
get_current_component().$$.on_mount.push(fn); |
|||
} |
|||
|
|||
function onDestroy(fn) { |
|||
get_current_component().$$.on_destroy.push(fn); |
|||
} |
|||
|
|||
var dirty_components = []; |
|||
var binding_callbacks = []; |
|||
var render_callbacks = []; |
|||
var flush_callbacks = []; |
|||
var resolved_promise = Promise.resolve(); |
|||
var update_scheduled = false; |
|||
|
|||
function schedule_update() { |
|||
if (!update_scheduled) { |
|||
update_scheduled = true; |
|||
resolved_promise.then(flush); |
|||
} |
|||
} |
|||
|
|||
function add_render_callback(fn) { |
|||
render_callbacks.push(fn); |
|||
} |
|||
|
|||
var flushing = false; |
|||
var seen_callbacks = new Set(); |
|||
|
|||
function flush() { |
|||
if (flushing) return; |
|||
flushing = true; |
|||
|
|||
do { |
|||
// first, call beforeUpdate functions
|
|||
// and update components
|
|||
for (var i = 0; i < dirty_components.length; i += 1) { |
|||
var component = dirty_components[i]; |
|||
set_current_component(component); |
|||
update(component.$$); |
|||
} |
|||
|
|||
set_current_component(null); |
|||
dirty_components.length = 0; |
|||
|
|||
while (binding_callbacks.length) { |
|||
binding_callbacks.pop()(); |
|||
} // then, once components are updated, call
|
|||
// afterUpdate functions. This may cause
|
|||
// subsequent updates...
|
|||
|
|||
|
|||
for (var _i = 0; _i < render_callbacks.length; _i += 1) { |
|||
var callback = render_callbacks[_i]; |
|||
|
|||
if (!seen_callbacks.has(callback)) { |
|||
// ...so guard against infinite loops
|
|||
seen_callbacks.add(callback); |
|||
callback(); |
|||
} |
|||
} |
|||
|
|||
render_callbacks.length = 0; |
|||
} while (dirty_components.length); |
|||
|
|||
while (flush_callbacks.length) { |
|||
flush_callbacks.pop()(); |
|||
} |
|||
|
|||
update_scheduled = false; |
|||
flushing = false; |
|||
seen_callbacks.clear(); |
|||
} |
|||
|
|||
function update($$) { |
|||
if ($$.fragment !== null) { |
|||
$$.update(); |
|||
run_all($$.before_update); |
|||
var dirty = $$.dirty; |
|||
$$.dirty = [-1]; |
|||
$$.fragment && $$.fragment.p($$.ctx, dirty); |
|||
$$.after_update.forEach(add_render_callback); |
|||
} |
|||
} |
|||
|
|||
var outroing = new Set(); |
|||
|
|||
function transition_in(block, local) { |
|||
if (block && block.i) { |
|||
outroing["delete"](block); |
|||
block.i(local); |
|||
} |
|||
} |
|||
|
|||
var globals = typeof window !== 'undefined' ? window : typeof globalThis !== 'undefined' ? globalThis : global; |
|||
|
|||
function mount_component(component, target, anchor) { |
|||
var _component$$$ = component.$$, |
|||
fragment = _component$$$.fragment, |
|||
on_mount = _component$$$.on_mount, |
|||
on_destroy = _component$$$.on_destroy, |
|||
after_update = _component$$$.after_update; |
|||
fragment && fragment.m(target, anchor); // onMount happens before the initial afterUpdate
|
|||
|
|||
add_render_callback(function () { |
|||
var new_on_destroy = on_mount.map(run).filter(is_function); |
|||
|
|||
if (on_destroy) { |
|||
on_destroy.push.apply(on_destroy, _toConsumableArray(new_on_destroy)); |
|||
} else { |
|||
// Edge case - component was destroyed immediately,
|
|||
// most likely as a result of a binding initialising
|
|||
run_all(new_on_destroy); |
|||
} |
|||
|
|||
component.$$.on_mount = []; |
|||
}); |
|||
after_update.forEach(add_render_callback); |
|||
} |
|||
|
|||
function destroy_component(component, detaching) { |
|||
var $$ = component.$$; |
|||
|
|||
if ($$.fragment !== null) { |
|||
run_all($$.on_destroy); |
|||
$$.fragment && $$.fragment.d(detaching); // TODO null out other refs, including component.$$ (but need to
|
|||
// preserve final state?)
|
|||
|
|||
$$.on_destroy = $$.fragment = null; |
|||
$$.ctx = []; |
|||
} |
|||
} |
|||
|
|||
function make_dirty(component, i) { |
|||
if (component.$$.dirty[0] === -1) { |
|||
dirty_components.push(component); |
|||
schedule_update(); |
|||
component.$$.dirty.fill(0); |
|||
} |
|||
|
|||
component.$$.dirty[i / 31 | 0] |= 1 << i % 31; |
|||
} |
|||
|
|||
function init(component, options, instance, create_fragment, not_equal, props) { |
|||
var dirty = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : [-1]; |
|||
var parent_component = current_component; |
|||
set_current_component(component); |
|||
var prop_values = options.props || {}; |
|||
var $$ = component.$$ = { |
|||
fragment: null, |
|||
ctx: null, |
|||
// state
|
|||
props: props, |
|||
update: noop, |
|||
not_equal: not_equal, |
|||
bound: blank_object(), |
|||
// lifecycle
|
|||
on_mount: [], |
|||
on_destroy: [], |
|||
before_update: [], |
|||
after_update: [], |
|||
context: new Map(parent_component ? parent_component.$$.context : []), |
|||
// everything else
|
|||
callbacks: blank_object(), |
|||
dirty: dirty, |
|||
skip_bound: false |
|||
}; |
|||
var ready = false; |
|||
$$.ctx = instance ? instance(component, prop_values, function (i, ret) { |
|||
var value = (arguments.length <= 2 ? 0 : arguments.length - 2) ? arguments.length <= 2 ? undefined : arguments[2] : ret; |
|||
|
|||
if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) { |
|||
if (!$$.skip_bound && $$.bound[i]) $$.bound[i](value); |
|||
if (ready) make_dirty(component, i); |
|||
} |
|||
|
|||
return ret; |
|||
}) : []; |
|||
$$.update(); |
|||
ready = true; |
|||
run_all($$.before_update); // `false` as a special case of no DOM component
|
|||
|
|||
$$.fragment = create_fragment ? create_fragment($$.ctx) : false; |
|||
|
|||
if (options.target) { |
|||
if (options.hydrate) { |
|||
var nodes = children(options.target); // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|||
|
|||
$$.fragment && $$.fragment.l(nodes); |
|||
nodes.forEach(detach); |
|||
} else { |
|||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|||
$$.fragment && $$.fragment.c(); |
|||
} |
|||
|
|||
if (options.intro) transition_in(component.$$.fragment); |
|||
mount_component(component, options.target, options.anchor); |
|||
flush(); |
|||
} |
|||
|
|||
set_current_component(parent_component); |
|||
} |
|||
|
|||
var SvelteComponent = /*#__PURE__*/function () { |
|||
function SvelteComponent() { |
|||
_classCallCheck(this, SvelteComponent); |
|||
} |
|||
|
|||
_createClass(SvelteComponent, [{ |
|||
key: "$destroy", |
|||
value: function $destroy() { |
|||
destroy_component(this, 1); |
|||
this.$destroy = noop; |
|||
} |
|||
}, { |
|||
key: "$on", |
|||
value: function $on(type, callback) { |
|||
var callbacks = this.$$.callbacks[type] || (this.$$.callbacks[type] = []); |
|||
callbacks.push(callback); |
|||
return function () { |
|||
var index = callbacks.indexOf(callback); |
|||
if (index !== -1) callbacks.splice(index, 1); |
|||
}; |
|||
} |
|||
}, { |
|||
key: "$set", |
|||
value: function $set($$props) { |
|||
if (this.$$set && !is_empty($$props)) { |
|||
this.$$.skip_bound = true; |
|||
this.$$set($$props); |
|||
this.$$.skip_bound = false; |
|||
} |
|||
} |
|||
}]); |
|||
|
|||
return SvelteComponent; |
|||
}(); |
|||
|
|||
var window_1 = globals.window; |
|||
|
|||
function create_fragment(ctx) { |
|||
var mounted; |
|||
var dispose; |
|||
return { |
|||
c: noop, |
|||
m: function m(target, anchor) { |
|||
if (!mounted) { |
|||
dispose = listen(window_1, "resize", |
|||
/*resize_handler*/ |
|||
ctx[3]); |
|||
mounted = true; |
|||
} |
|||
}, |
|||
p: noop, |
|||
i: noop, |
|||
o: noop, |
|||
d: function d(detaching) { |
|||
mounted = false; |
|||
dispose(); |
|||
} |
|||
}; |
|||
} |
|||
|
|||
var position = "PrependContainer"; |
|||
var defaults = { |
|||
swipeDismiss: true |
|||
}; |
|||
|
|||
function instance($$self, $$props, $$invalidate) { |
|||
var _$$props$self = $$props.self, |
|||
self = _$$props$self === void 0 ? null : _$$props$self; |
|||
var _$$props$swipeDismiss = $$props.swipeDismiss, |
|||
swipeDismiss = _$$props$swipeDismiss === void 0 ? defaults.swipeDismiss : _$$props$swipeDismiss; |
|||
var origXY = null; |
|||
var diffXY = null; |
|||
var noticeWidthHeight = null; |
|||
var noticeOpacity = null; |
|||
var csspos = "left"; |
|||
var direction = "X"; |
|||
var span = "Width"; |
|||
var windowInnerWidth = window.innerWidth; |
|||
var offs = []; |
|||
onMount(function () { |
|||
offs = [self.on("touchstart", function (e) { |
|||
if (!swipeDismiss) { |
|||
return; |
|||
} |
|||
|
|||
var stack = self.stack; |
|||
|
|||
if (stack) { |
|||
switch (stack.dir1) { |
|||
case "up": |
|||
case "down": |
|||
csspos = "left"; |
|||
direction = "X"; |
|||
span = "Width"; |
|||
break; |
|||
|
|||
case "left": |
|||
case "right": |
|||
csspos = "top"; |
|||
direction = "Y"; |
|||
span = "Height"; |
|||
break; |
|||
} |
|||
} |
|||
|
|||
origXY = e.touches[0]["screen".concat(direction)]; |
|||
noticeWidthHeight = self.refs.elem["scroll".concat(span)]; |
|||
noticeOpacity = window.getComputedStyle(self.refs.elem)["opacity"]; |
|||
$$invalidate(1, self.refs.container.style[csspos] = 0, self); |
|||
}), self.on("touchmove", function (e) { |
|||
if (!origXY || !swipeDismiss) { |
|||
return; |
|||
} |
|||
|
|||
var curXY = e.touches[0]["screen".concat(direction)]; |
|||
diffXY = curXY - origXY; |
|||
var opacity = (1 - Math.abs(diffXY) / noticeWidthHeight) * noticeOpacity; |
|||
$$invalidate(1, self.refs.elem.style.opacity = opacity, self); |
|||
$$invalidate(1, self.refs.container.style[csspos] = "".concat(diffXY, "px"), self); |
|||
}), self.on("touchend", function () { |
|||
if (!origXY || !swipeDismiss) { |
|||
return; |
|||
} |
|||
|
|||
self.refs.container.classList.add("pnotify-mobile-animate-left"); |
|||
|
|||
if (Math.abs(diffXY) > 40) { |
|||
var goLeft = diffXY < 0 ? noticeWidthHeight * -2 : noticeWidthHeight * 2; |
|||
$$invalidate(1, self.refs.elem.style.opacity = 0, self); |
|||
$$invalidate(1, self.refs.container.style[csspos] = "".concat(goLeft, "px"), self); |
|||
self.close(); |
|||
} else { |
|||
self.refs.elem.style.removeProperty("opacity"); |
|||
self.refs.container.style.removeProperty(csspos); |
|||
} |
|||
|
|||
origXY = null; |
|||
diffXY = null; |
|||
noticeWidthHeight = null; |
|||
noticeOpacity = null; |
|||
}), self.on("touchcancel", function () { |
|||
if (!origXY || !swipeDismiss) { |
|||
return; |
|||
} |
|||
|
|||
self.refs.elem.style.removeProperty("opacity"); |
|||
self.refs.container.style.removeProperty(csspos); |
|||
origXY = null; |
|||
diffXY = null; |
|||
noticeWidthHeight = null; |
|||
noticeOpacity = null; |
|||
}), self.on("pnotify:afterClose", function () { |
|||
// Remove any styling we added to close it.
|
|||
if (!swipeDismiss) { |
|||
return; |
|||
} |
|||
|
|||
self.refs.elem.style.removeProperty("opacity"); |
|||
self.refs.container.style.removeProperty("left"); |
|||
self.refs.container.style.removeProperty("top"); |
|||
})]; |
|||
}); |
|||
onDestroy(function () { |
|||
offs.forEach(function (off) { |
|||
return off(); |
|||
}); |
|||
}); |
|||
|
|||
var resize_handler = function resize_handler() { |
|||
return $$invalidate(0, windowInnerWidth = window.innerWidth); |
|||
}; |
|||
|
|||
$$self.$$set = function ($$props) { |
|||
if ("self" in $$props) $$invalidate(1, self = $$props.self); |
|||
if ("swipeDismiss" in $$props) $$invalidate(2, swipeDismiss = $$props.swipeDismiss); |
|||
}; |
|||
|
|||
$$self.$$.update = function () { |
|||
if ($$self.$$.dirty & |
|||
/*self, windowInnerWidth*/ |
|||
3) { |
|||
{ |
|||
var stack = self.stack; |
|||
|
|||
if (stack) { |
|||
if (windowInnerWidth <= 480) { |
|||
if (!("_m_spacing1" in stack)) { |
|||
stack._m_spacing1 = stack.spacing1; |
|||
stack._m_firstpos1 = stack.firstpos1; |
|||
stack._m_spacing2 = stack.spacing2; |
|||
stack._m_firstpos2 = stack.firstpos2; |
|||
stack.spacing1 = 0; |
|||
stack.firstpos1 = 0; |
|||
stack.spacing2 = 0; |
|||
stack.firstpos2 = 0; |
|||
stack.queuePosition(); |
|||
} |
|||
} else { |
|||
if ("_m_spacing1" in stack) { |
|||
stack.spacing1 = stack._m_spacing1; |
|||
delete stack._m_spacing1; |
|||
stack.firstpos1 = stack._m_firstpos1; |
|||
delete stack._m_firstpos1; |
|||
stack.spacing2 = stack._m_spacing2; |
|||
delete stack._m_spacing2; |
|||
stack.firstpos2 = stack._m_firstpos2; |
|||
delete stack._m_firstpos2; |
|||
stack.queuePosition(); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
}; |
|||
|
|||
return [windowInnerWidth, self, swipeDismiss, resize_handler]; |
|||
} |
|||
|
|||
var Mobile = /*#__PURE__*/function (_SvelteComponent) { |
|||
_inherits(Mobile, _SvelteComponent); |
|||
|
|||
var _super = _createSuper(Mobile); |
|||
|
|||
function Mobile(options) { |
|||
var _this; |
|||
|
|||
_classCallCheck(this, Mobile); |
|||
|
|||
_this = _super.call(this); |
|||
init(_assertThisInitialized(_this), options, instance, create_fragment, safe_not_equal, { |
|||
self: 1, |
|||
swipeDismiss: 2 |
|||
}); |
|||
return _this; |
|||
} |
|||
|
|||
return Mobile; |
|||
}(SvelteComponent); |
|||
|
|||
exports.default = Mobile; |
|||
exports.defaults = defaults; |
|||
exports.position = position; |
|||
|
|||
Object.defineProperty(exports, '__esModule', { value: true }); |
|||
|
|||
}))); |
|||
@ -0,0 +1 @@ |
|||
.pnotify-paginate{float:right;display:flex;align-items:center;justify-content:center}.pnotify-paginate-buttons{display:flex}.pnotify-paginate-button{display:inline-block;margin:0 .5em;cursor:pointer}.pnotify-paginate-button:disabled,.pnotify-paginate-button[aria-disabled=true]{cursor:initial}.pnotify-paginate-count{font-size:.9em} |
|||
@ -0,0 +1,89 @@ |
|||
(function(global,factory){typeof exports==='object'&&typeof module!=='undefined'?factory(exports):typeof define==='function'&&define.amd?define(['exports'],factory):(global=typeof globalThis!=='undefined'?globalThis:global||self,factory(global.PNotifyPaginate={}));}(this,(function(exports){'use strict';function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function(obj){return typeof obj;};}else{_typeof=function(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};} |
|||
return _typeof(obj);} |
|||
function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}} |
|||
function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}} |
|||
function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor;} |
|||
function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function");} |
|||
subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass);} |
|||
function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o);};return _getPrototypeOf(o);} |
|||
function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o;};return _setPrototypeOf(o,p);} |
|||
function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Date.prototype.toString.call(Reflect.construct(Date,[],function(){}));return true;}catch(e){return false;}} |
|||
function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");} |
|||
return self;} |
|||
function _possibleConstructorReturn(self,call){if(call&&(typeof call==="object"||typeof call==="function")){return call;} |
|||
return _assertThisInitialized(self);} |
|||
function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else{result=Super.apply(this,arguments);} |
|||
return _possibleConstructorReturn(this,result);};} |
|||
function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();} |
|||
function _toConsumableArray(arr){return _arrayWithoutHoles(arr)||_iterableToArray(arr)||_unsupportedIterableToArray(arr)||_nonIterableSpread();} |
|||
function _arrayWithoutHoles(arr){if(Array.isArray(arr))return _arrayLikeToArray(arr);} |
|||
function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;} |
|||
function _iterableToArray(iter){if(typeof Symbol!=="undefined"&&Symbol.iterator in Object(iter))return Array.from(iter);} |
|||
function _iterableToArrayLimit(arr,i){if(typeof Symbol==="undefined"||!(Symbol.iterator in Object(arr)))return;var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}} |
|||
return _arr;} |
|||
function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);} |
|||
function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2;} |
|||
function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");} |
|||
function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");} |
|||
function noop(){} |
|||
function run(fn){return fn();} |
|||
function blank_object(){return Object.create(null);} |
|||
function run_all(fns){fns.forEach(run);} |
|||
function is_function(thing){return typeof thing==='function';} |
|||
function safe_not_equal(a,b){return a!=a?b==b:a!==b||a&&_typeof(a)==='object'||typeof a==='function';} |
|||
function is_empty(obj){return Object.keys(obj).length===0;} |
|||
function append(target,node){target.appendChild(node);} |
|||
function insert(target,node,anchor){target.insertBefore(node,anchor||null);} |
|||
function detach(node){node.parentNode.removeChild(node);} |
|||
function element(name){return document.createElement(name);} |
|||
function text(data){return document.createTextNode(data);} |
|||
function space(){return text(' ');} |
|||
function listen(node,event,handler,options){node.addEventListener(event,handler,options);return function(){return node.removeEventListener(event,handler,options);};} |
|||
function attr(node,attribute,value){if(value==null)node.removeAttribute(attribute);else if(node.getAttribute(attribute)!==value)node.setAttribute(attribute,value);} |
|||
function children(element){return Array.from(element.childNodes);} |
|||
function set_data(text,data){data=''+data;if(text.wholeText!==data)text.data=data;} |
|||
var current_component;function set_current_component(component){current_component=component;} |
|||
function get_current_component(){if(!current_component)throw new Error('Function called outside component initialization');return current_component;} |
|||
function onMount(fn){get_current_component().$$.on_mount.push(fn);} |
|||
function onDestroy(fn){get_current_component().$$.on_destroy.push(fn);} |
|||
var dirty_components=[];var binding_callbacks=[];var render_callbacks=[];var flush_callbacks=[];var resolved_promise=Promise.resolve();var update_scheduled=false;function schedule_update(){if(!update_scheduled){update_scheduled=true;resolved_promise.then(flush);}} |
|||
function add_render_callback(fn){render_callbacks.push(fn);} |
|||
var flushing=false;var seen_callbacks=new Set();function flush(){if(flushing)return;flushing=true;do{for(var i=0;i<dirty_components.length;i+=1){var component=dirty_components[i];set_current_component(component);update(component.$$);} |
|||
set_current_component(null);dirty_components.length=0;while(binding_callbacks.length){binding_callbacks.pop()();} |
|||
for(var _i=0;_i<render_callbacks.length;_i+=1){var callback=render_callbacks[_i];if(!seen_callbacks.has(callback)){seen_callbacks.add(callback);callback();}} |
|||
render_callbacks.length=0;}while(dirty_components.length);while(flush_callbacks.length){flush_callbacks.pop()();} |
|||
update_scheduled=false;flushing=false;seen_callbacks.clear();} |
|||
function update($$){if($$.fragment!==null){$$.update();run_all($$.before_update);var dirty=$$.dirty;$$.dirty=[-1];$$.fragment&&$$.fragment.p($$.ctx,dirty);$$.after_update.forEach(add_render_callback);}} |
|||
var outroing=new Set();function transition_in(block,local){if(block&&block.i){outroing["delete"](block);block.i(local);}} |
|||
function mount_component(component,target,anchor){var _component$$$=component.$$,fragment=_component$$$.fragment,on_mount=_component$$$.on_mount,on_destroy=_component$$$.on_destroy,after_update=_component$$$.after_update;fragment&&fragment.m(target,anchor);add_render_callback(function(){var new_on_destroy=on_mount.map(run).filter(is_function);if(on_destroy){on_destroy.push.apply(on_destroy,_toConsumableArray(new_on_destroy));}else{run_all(new_on_destroy);} |
|||
component.$$.on_mount=[];});after_update.forEach(add_render_callback);} |
|||
function destroy_component(component,detaching){var $$=component.$$;if($$.fragment!==null){run_all($$.on_destroy);$$.fragment&&$$.fragment.d(detaching);$$.on_destroy=$$.fragment=null;$$.ctx=[];}} |
|||
function make_dirty(component,i){if(component.$$.dirty[0]===-1){dirty_components.push(component);schedule_update();component.$$.dirty.fill(0);} |
|||
component.$$.dirty[i/31|0]|=1<<i%31;} |
|||
function init(component,options,instance,create_fragment,not_equal,props){var dirty=arguments.length>6&&arguments[6]!==undefined?arguments[6]:[-1];var parent_component=current_component;set_current_component(component);var prop_values=options.props||{};var $$=component.$$={fragment:null,ctx:null,props:props,update:noop,not_equal:not_equal,bound:blank_object(),on_mount:[],on_destroy:[],before_update:[],after_update:[],context:new Map(parent_component?parent_component.$$.context:[]),callbacks:blank_object(),dirty:dirty,skip_bound:false};var ready=false;$$.ctx=instance?instance(component,prop_values,function(i,ret){var value=(arguments.length<=2?0:arguments.length-2)?arguments.length<=2?undefined:arguments[2]:ret;if($$.ctx&¬_equal($$.ctx[i],$$.ctx[i]=value)){if(!$$.skip_bound&&$$.bound[i])$$.bound[i](value);if(ready)make_dirty(component,i);} |
|||
return ret;}):[];$$.update();ready=true;run_all($$.before_update);$$.fragment=create_fragment?create_fragment($$.ctx):false;if(options.target){if(options.hydrate){var nodes=children(options.target);$$.fragment&&$$.fragment.l(nodes);nodes.forEach(detach);}else{$$.fragment&&$$.fragment.c();} |
|||
if(options.intro)transition_in(component.$$.fragment);mount_component(component,options.target,options.anchor);flush();} |
|||
set_current_component(parent_component);} |
|||
var SvelteComponent=function(){function SvelteComponent(){_classCallCheck(this,SvelteComponent);} |
|||
_createClass(SvelteComponent,[{key:"$destroy",value:function $destroy(){destroy_component(this,1);this.$destroy=noop;}},{key:"$on",value:function $on(type,callback){var callbacks=this.$$.callbacks[type]||(this.$$.callbacks[type]=[]);callbacks.push(callback);return function(){var index=callbacks.indexOf(callback);if(index!==-1)callbacks.splice(index,1);};}},{key:"$set",value:function $set($$props){if(this.$$set&&!is_empty($$props)){this.$$.skip_bound=true;this.$$set($$props);this.$$.skip_bound=false;}}}]);return SvelteComponent;}();function create_if_block_1(ctx){var div2;var div0;var div0_tabindex_value;var div0_aria_disabled_value;var div0_class_value;var div0_title_value;var t;var div1;var div1_tabindex_value;var div1_aria_disabled_value;var div1_class_value;var div1_title_value;var div2_class_value;var mounted;var dispose;return{c:function c(){div2=element("div");div0=element("div");t=space();div1=element("div");attr(div0,"role","button");attr(div0,"tabindex",div0_tabindex_value=ctx[4]===1?"-1":"0");attr(div0,"aria-disabled",div0_aria_disabled_value=ctx[4]===1);attr(div0,"class",div0_class_value="pnotify-paginate-button ".concat(ctx[0].getStyle("paginate-btn")," ").concat(ctx[0].getStyle("paginate-previous")));attr(div0,"title",div0_title_value=ctx[3].previous);attr(div1,"role","button");attr(div1,"tabindex",div1_tabindex_value=ctx[4]===ctx[5]?"-1":"0");attr(div1,"aria-disabled",div1_aria_disabled_value=ctx[4]===ctx[5]);attr(div1,"class",div1_class_value="pnotify-paginate-button ".concat(ctx[0].getStyle("paginate-btn")," ").concat(ctx[0].getStyle("paginate-next")));attr(div1,"title",div1_title_value=ctx[3].next);attr(div2,"class",div2_class_value="pnotify-paginate-buttons ".concat(ctx[0].getStyle("paginate-buttons")));},m:function m(target,anchor){insert(target,div2,anchor);append(div2,div0);append(div2,t);append(div2,div1);if(!mounted){dispose=[listen(div0,"click",ctx[10]),listen(div1,"click",ctx[11])];mounted=true;}},p:function p(ctx,dirty){if(dirty&16&&div0_tabindex_value!==(div0_tabindex_value=ctx[4]===1?"-1":"0")){attr(div0,"tabindex",div0_tabindex_value);} |
|||
if(dirty&16&&div0_aria_disabled_value!==(div0_aria_disabled_value=ctx[4]===1)){attr(div0,"aria-disabled",div0_aria_disabled_value);} |
|||
if(dirty&1&&div0_class_value!==(div0_class_value="pnotify-paginate-button ".concat(ctx[0].getStyle("paginate-btn")," ").concat(ctx[0].getStyle("paginate-previous")))){attr(div0,"class",div0_class_value);} |
|||
if(dirty&8&&div0_title_value!==(div0_title_value=ctx[3].previous)){attr(div0,"title",div0_title_value);} |
|||
if(dirty&48&&div1_tabindex_value!==(div1_tabindex_value=ctx[4]===ctx[5]?"-1":"0")){attr(div1,"tabindex",div1_tabindex_value);} |
|||
if(dirty&48&&div1_aria_disabled_value!==(div1_aria_disabled_value=ctx[4]===ctx[5])){attr(div1,"aria-disabled",div1_aria_disabled_value);} |
|||
if(dirty&1&&div1_class_value!==(div1_class_value="pnotify-paginate-button ".concat(ctx[0].getStyle("paginate-btn")," ").concat(ctx[0].getStyle("paginate-next")))){attr(div1,"class",div1_class_value);} |
|||
if(dirty&8&&div1_title_value!==(div1_title_value=ctx[3].next)){attr(div1,"title",div1_title_value);} |
|||
if(dirty&1&&div2_class_value!==(div2_class_value="pnotify-paginate-buttons ".concat(ctx[0].getStyle("paginate-buttons")))){attr(div2,"class",div2_class_value);}},d:function d(detaching){if(detaching)detach(div2);mounted=false;run_all(dispose);}};} |
|||
function create_if_block(ctx){var div;var span0;var t0;var span0_class_value;var t1;var span1;var t2_value=ctx[3].of+"";var t2;var span1_class_value;var t3;var span2;var t4;var span2_class_value;var div_class_value;return{c:function c(){div=element("div");span0=element("span");t0=text(ctx[4]);t1=space();span1=element("span");t2=text(t2_value);t3=space();span2=element("span");t4=text(ctx[5]);attr(span0,"class",span0_class_value="pnotify-paginate-count-current ".concat(ctx[0].getStyle("paginate-count-current")));attr(span1,"class",span1_class_value="pnotify-paginate-count-of ".concat(ctx[0].getStyle("paginate-count-of")));attr(span2,"class",span2_class_value="pnotify-paginate-count-total ".concat(ctx[0].getStyle("paginate-count-total")));attr(div,"class",div_class_value="pnotify-paginate-count ".concat(ctx[0].getStyle("paginate-count")));},m:function m(target,anchor){insert(target,div,anchor);append(div,span0);append(span0,t0);append(div,t1);append(div,span1);append(span1,t2);append(div,t3);append(div,span2);append(span2,t4);},p:function p(ctx,dirty){if(dirty&16)set_data(t0,ctx[4]);if(dirty&1&&span0_class_value!==(span0_class_value="pnotify-paginate-count-current ".concat(ctx[0].getStyle("paginate-count-current")))){attr(span0,"class",span0_class_value);} |
|||
if(dirty&8&&t2_value!==(t2_value=ctx[3].of+""))set_data(t2,t2_value);if(dirty&1&&span1_class_value!==(span1_class_value="pnotify-paginate-count-of ".concat(ctx[0].getStyle("paginate-count-of")))){attr(span1,"class",span1_class_value);} |
|||
if(dirty&32)set_data(t4,ctx[5]);if(dirty&1&&span2_class_value!==(span2_class_value="pnotify-paginate-count-total ".concat(ctx[0].getStyle("paginate-count-total")))){attr(span2,"class",span2_class_value);} |
|||
if(dirty&1&&div_class_value!==(div_class_value="pnotify-paginate-count ".concat(ctx[0].getStyle("paginate-count")))){attr(div,"class",div_class_value);}},d:function d(detaching){if(detaching)detach(div);}};} |
|||
function create_fragment(ctx){var div;var t;var div_class_value;var if_block0=ctx[1]&&create_if_block_1(ctx);var if_block1=ctx[2]&&create_if_block(ctx);return{c:function c(){div=element("div");if(if_block0)if_block0.c();t=space();if(if_block1)if_block1.c();attr(div,"class",div_class_value="pnotify-paginate ".concat(ctx[0].getStyle("paginate")));},m:function m(target,anchor){insert(target,div,anchor);if(if_block0)if_block0.m(div,null);append(div,t);if(if_block1)if_block1.m(div,null);},p:function p(ctx,_ref){var _ref2=_slicedToArray(_ref,1),dirty=_ref2[0];if(ctx[1]){if(if_block0){if_block0.p(ctx,dirty);}else{if_block0=create_if_block_1(ctx);if_block0.c();if_block0.m(div,t);}}else if(if_block0){if_block0.d(1);if_block0=null;} |
|||
if(ctx[2]){if(if_block1){if_block1.p(ctx,dirty);}else{if_block1=create_if_block(ctx);if_block1.c();if_block1.m(div,null);}}else if(if_block1){if_block1.d(1);if_block1=null;} |
|||
if(dirty&1&&div_class_value!==(div_class_value="pnotify-paginate ".concat(ctx[0].getStyle("paginate")))){attr(div,"class",div_class_value);}},i:noop,o:noop,d:function d(detaching){if(detaching)detach(div);if(if_block0)if_block0.d();if(if_block1)if_block1.d();}};} |
|||
var position="PrependContainer";var defaults={buttons:true,count:true,immediateTransition:true,waiting:true,labels:{previous:"Previous",next:"Next",of:"of"}};function instance($$self,$$props,$$invalidate){var _$$props$self=$$props.self,self=_$$props$self===void 0?null:_$$props$self;var _$$props$buttons=$$props.buttons,buttons=_$$props$buttons===void 0?defaults.buttons:_$$props$buttons;var _$$props$count=$$props.count,count=_$$props$count===void 0?defaults.count:_$$props$count;var _$$props$immediateTra=$$props.immediateTransition,immediateTransition=_$$props$immediateTra===void 0?defaults.immediateTransition:_$$props$immediateTra;var _$$props$waiting=$$props.waiting,waiting=_$$props$waiting===void 0?defaults.waiting:_$$props$waiting;var _$$props$labels=$$props.labels,labels=_$$props$labels===void 0?defaults.labels:_$$props$labels;var currentIndex;var stackLength;var handlerCallback=function handlerCallback(){$$invalidate(4,currentIndex=0);try{self.stack.forEach(function(notice){return $$invalidate(4,currentIndex++,currentIndex);},{start:self,dir:"prev"});}catch(e){if(e.message!=="Invalid start param."){throw e;}} |
|||
$$invalidate(5,stackLength=self.stack.length);};var addHandlerOff;var removeHandlerOff;var beforeOpenHandlerOff;onMount(function(){handlerCallback();addHandlerOff=self.stack.on("afterAddNotice",handlerCallback);removeHandlerOff=self.stack.on("afterRemoveNotice",handlerCallback);beforeOpenHandlerOff=self.on("beforeOpen",handlerCallback);});onDestroy(function(){addHandlerOff();removeHandlerOff();beforeOpenHandlerOff();});function handleNext(){self.stack.forEach(function(notice){if(notice!==self&&(notice.getState()==="waiting"||!waiting&¬ice.getState()==="closed")){self.stack.swap(self,notice,immediateTransition,waiting);return false;}},{start:self,dir:"next"});} |
|||
function handlePrevious(){self.stack.forEach(function(notice){if(notice!==self&¬ice.getState()==="waiting"){self.stack.swap(self,notice,immediateTransition,true);return false;}},{start:self,dir:"prev"});} |
|||
var click_handler=function click_handler(event){return handlePrevious();};var click_handler_1=function click_handler_1(event){return handleNext();};$$self.$$set=function($$props){if("self"in $$props)$$invalidate(0,self=$$props.self);if("buttons"in $$props)$$invalidate(1,buttons=$$props.buttons);if("count"in $$props)$$invalidate(2,count=$$props.count);if("immediateTransition"in $$props)$$invalidate(8,immediateTransition=$$props.immediateTransition);if("waiting"in $$props)$$invalidate(9,waiting=$$props.waiting);if("labels"in $$props)$$invalidate(3,labels=$$props.labels);};return[self,buttons,count,labels,currentIndex,stackLength,handleNext,handlePrevious,immediateTransition,waiting,click_handler,click_handler_1];} |
|||
var Paginate=function(_SvelteComponent){_inherits(Paginate,_SvelteComponent);var _super=_createSuper(Paginate);function Paginate(options){var _this;_classCallCheck(this,Paginate);_this=_super.call(this);init(_assertThisInitialized(_this),options,instance,create_fragment,safe_not_equal,{self:0,buttons:1,count:2,immediateTransition:8,waiting:9,labels:3});return _this;} |
|||
return Paginate;}(SvelteComponent);exports.default=Paginate;exports.defaults=defaults;exports.position=position;Object.defineProperty(exports,'__esModule',{value:true});}))); |
|||
@ -0,0 +1 @@ |
|||
.pnotify-reference-button.svelte-1tn3i34{float:right;margin-top:1em}.pnotify-reference-clearing.svelte-1tn3i34{clear:right;line-height:0} |
|||
@ -0,0 +1,75 @@ |
|||
(function(global,factory){typeof exports==='object'&&typeof module!=='undefined'?factory(exports):typeof define==='function'&&define.amd?define(['exports'],factory):(global=typeof globalThis!=='undefined'?globalThis:global||self,factory(global.PNotifyReference={}));}(this,(function(exports){'use strict';function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function(obj){return typeof obj;};}else{_typeof=function(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};} |
|||
return _typeof(obj);} |
|||
function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}} |
|||
function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}} |
|||
function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor;} |
|||
function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function");} |
|||
subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass);} |
|||
function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o);};return _getPrototypeOf(o);} |
|||
function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o;};return _setPrototypeOf(o,p);} |
|||
function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Date.prototype.toString.call(Reflect.construct(Date,[],function(){}));return true;}catch(e){return false;}} |
|||
function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");} |
|||
return self;} |
|||
function _possibleConstructorReturn(self,call){if(call&&(typeof call==="object"||typeof call==="function")){return call;} |
|||
return _assertThisInitialized(self);} |
|||
function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else{result=Super.apply(this,arguments);} |
|||
return _possibleConstructorReturn(this,result);};} |
|||
function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();} |
|||
function _toConsumableArray(arr){return _arrayWithoutHoles(arr)||_iterableToArray(arr)||_unsupportedIterableToArray(arr)||_nonIterableSpread();} |
|||
function _arrayWithoutHoles(arr){if(Array.isArray(arr))return _arrayLikeToArray(arr);} |
|||
function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;} |
|||
function _iterableToArray(iter){if(typeof Symbol!=="undefined"&&Symbol.iterator in Object(iter))return Array.from(iter);} |
|||
function _iterableToArrayLimit(arr,i){if(typeof Symbol==="undefined"||!(Symbol.iterator in Object(arr)))return;var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}} |
|||
return _arr;} |
|||
function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);} |
|||
function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2;} |
|||
function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");} |
|||
function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");} |
|||
function noop(){} |
|||
function run(fn){return fn();} |
|||
function blank_object(){return Object.create(null);} |
|||
function run_all(fns){fns.forEach(run);} |
|||
function is_function(thing){return typeof thing==='function';} |
|||
function safe_not_equal(a,b){return a!=a?b==b:a!==b||a&&_typeof(a)==='object'||typeof a==='function';} |
|||
function is_empty(obj){return Object.keys(obj).length===0;} |
|||
function null_to_empty(value){return value==null?'':value;} |
|||
function append(target,node){target.appendChild(node);} |
|||
function insert(target,node,anchor){target.insertBefore(node,anchor||null);} |
|||
function detach(node){node.parentNode.removeChild(node);} |
|||
function element(name){return document.createElement(name);} |
|||
function text(data){return document.createTextNode(data);} |
|||
function space(){return text(' ');} |
|||
function listen(node,event,handler,options){node.addEventListener(event,handler,options);return function(){return node.removeEventListener(event,handler,options);};} |
|||
function attr(node,attribute,value){if(value==null)node.removeAttribute(attribute);else if(node.getAttribute(attribute)!==value)node.setAttribute(attribute,value);} |
|||
function children(element){return Array.from(element.childNodes);} |
|||
function set_data(text,data){data=''+data;if(text.wholeText!==data)text.data=data;} |
|||
var current_component;function set_current_component(component){current_component=component;} |
|||
function get_current_component(){if(!current_component)throw new Error('Function called outside component initialization');return current_component;} |
|||
function onDestroy(fn){get_current_component().$$.on_destroy.push(fn);} |
|||
var dirty_components=[];var binding_callbacks=[];var render_callbacks=[];var flush_callbacks=[];var resolved_promise=Promise.resolve();var update_scheduled=false;function schedule_update(){if(!update_scheduled){update_scheduled=true;resolved_promise.then(flush);}} |
|||
function add_render_callback(fn){render_callbacks.push(fn);} |
|||
var flushing=false;var seen_callbacks=new Set();function flush(){if(flushing)return;flushing=true;do{for(var i=0;i<dirty_components.length;i+=1){var component=dirty_components[i];set_current_component(component);update(component.$$);} |
|||
set_current_component(null);dirty_components.length=0;while(binding_callbacks.length){binding_callbacks.pop()();} |
|||
for(var _i=0;_i<render_callbacks.length;_i+=1){var callback=render_callbacks[_i];if(!seen_callbacks.has(callback)){seen_callbacks.add(callback);callback();}} |
|||
render_callbacks.length=0;}while(dirty_components.length);while(flush_callbacks.length){flush_callbacks.pop()();} |
|||
update_scheduled=false;flushing=false;seen_callbacks.clear();} |
|||
function update($$){if($$.fragment!==null){$$.update();run_all($$.before_update);var dirty=$$.dirty;$$.dirty=[-1];$$.fragment&&$$.fragment.p($$.ctx,dirty);$$.after_update.forEach(add_render_callback);}} |
|||
var outroing=new Set();function transition_in(block,local){if(block&&block.i){outroing["delete"](block);block.i(local);}} |
|||
function mount_component(component,target,anchor){var _component$$$=component.$$,fragment=_component$$$.fragment,on_mount=_component$$$.on_mount,on_destroy=_component$$$.on_destroy,after_update=_component$$$.after_update;fragment&&fragment.m(target,anchor);add_render_callback(function(){var new_on_destroy=on_mount.map(run).filter(is_function);if(on_destroy){on_destroy.push.apply(on_destroy,_toConsumableArray(new_on_destroy));}else{run_all(new_on_destroy);} |
|||
component.$$.on_mount=[];});after_update.forEach(add_render_callback);} |
|||
function destroy_component(component,detaching){var $$=component.$$;if($$.fragment!==null){run_all($$.on_destroy);$$.fragment&&$$.fragment.d(detaching);$$.on_destroy=$$.fragment=null;$$.ctx=[];}} |
|||
function make_dirty(component,i){if(component.$$.dirty[0]===-1){dirty_components.push(component);schedule_update();component.$$.dirty.fill(0);} |
|||
component.$$.dirty[i/31|0]|=1<<i%31;} |
|||
function init(component,options,instance,create_fragment,not_equal,props){var dirty=arguments.length>6&&arguments[6]!==undefined?arguments[6]:[-1];var parent_component=current_component;set_current_component(component);var prop_values=options.props||{};var $$=component.$$={fragment:null,ctx:null,props:props,update:noop,not_equal:not_equal,bound:blank_object(),on_mount:[],on_destroy:[],before_update:[],after_update:[],context:new Map(parent_component?parent_component.$$.context:[]),callbacks:blank_object(),dirty:dirty,skip_bound:false};var ready=false;$$.ctx=instance?instance(component,prop_values,function(i,ret){var value=(arguments.length<=2?0:arguments.length-2)?arguments.length<=2?undefined:arguments[2]:ret;if($$.ctx&¬_equal($$.ctx[i],$$.ctx[i]=value)){if(!$$.skip_bound&&$$.bound[i])$$.bound[i](value);if(ready)make_dirty(component,i);} |
|||
return ret;}):[];$$.update();ready=true;run_all($$.before_update);$$.fragment=create_fragment?create_fragment($$.ctx):false;if(options.target){if(options.hydrate){var nodes=children(options.target);$$.fragment&&$$.fragment.l(nodes);nodes.forEach(detach);}else{$$.fragment&&$$.fragment.c();} |
|||
if(options.intro)transition_in(component.$$.fragment);mount_component(component,options.target,options.anchor);flush();} |
|||
set_current_component(parent_component);} |
|||
var SvelteComponent=function(){function SvelteComponent(){_classCallCheck(this,SvelteComponent);} |
|||
_createClass(SvelteComponent,[{key:"$destroy",value:function $destroy(){destroy_component(this,1);this.$destroy=noop;}},{key:"$on",value:function $on(type,callback){var callbacks=this.$$.callbacks[type]||(this.$$.callbacks[type]=[]);callbacks.push(callback);return function(){var index=callbacks.indexOf(callback);if(index!==-1)callbacks.splice(index,1);};}},{key:"$set",value:function $set($$props){if(this.$$set&&!is_empty($$props)){this.$$.skip_bound=true;this.$$set($$props);this.$$.skip_bound=false;}}}]);return SvelteComponent;}();function create_fragment(ctx){var button;var i;var i_class_value;var t0;var t1_value=ctx[1].text+"";var t1;var button_class_value;var button_disabled_value;var t2;var div;var mounted;var dispose;return{c:function c(){button=element("button");i=element("i");t0=text("\n ");t1=text(t1_value);t2=space();div=element("div");attr(i,"class",i_class_value=""+(null_to_empty(ctx[0].getIcon("refresh"))+" svelte-1tn3i34"));attr(button,"class",button_class_value=""+(null_to_empty("pnotify-action-button pnotify-reference-button ".concat(ctx[0].getStyle("btn")," ").concat(ctx[0].getStyle("btn-secondary")))+" svelte-1tn3i34"));attr(button,"type","button");button.disabled=button_disabled_value=!ctx[2];attr(div,"class","pnotify-reference-clearing svelte-1tn3i34");},m:function m(target,anchor){insert(target,button,anchor);append(button,i);append(button,t0);append(button,t1);insert(target,t2,anchor);insert(target,div,anchor);if(!mounted){dispose=listen(button,"click",ctx[3]);mounted=true;}},p:function p(ctx,_ref){var _ref2=_slicedToArray(_ref,1),dirty=_ref2[0];if(dirty&1&&i_class_value!==(i_class_value=""+(null_to_empty(ctx[0].getIcon("refresh"))+" svelte-1tn3i34"))){attr(i,"class",i_class_value);} |
|||
if(dirty&2&&t1_value!==(t1_value=ctx[1].text+""))set_data(t1,t1_value);if(dirty&1&&button_class_value!==(button_class_value=""+(null_to_empty("pnotify-action-button pnotify-reference-button ".concat(ctx[0].getStyle("btn")," ").concat(ctx[0].getStyle("btn-secondary")))+" svelte-1tn3i34"))){attr(button,"class",button_class_value);} |
|||
if(dirty&4&&button_disabled_value!==(button_disabled_value=!ctx[2])){button.disabled=button_disabled_value;}},i:noop,o:noop,d:function d(detaching){if(detaching)detach(button);if(detaching)detach(t2);if(detaching)detach(div);mounted=false;dispose();}};} |
|||
var position="AppendContent";var defaults={labels:{text:"Spin Around"}};function instance($$self,$$props,$$invalidate){var _$$props$self=$$props.self,self=_$$props$self===void 0?null:_$$props$self;var _$$props$labels=$$props.labels,labels=_$$props$labels===void 0?defaults.labels:_$$props$labels;var mouseIsIn=false;var removeMouseEnter=self.on("mouseenter",function(){return $$invalidate(2,mouseIsIn=true);});var removeMouseLeave=self.on("mouseleave",function(){return $$invalidate(2,mouseIsIn=false);});onDestroy(function(){removeMouseEnter&&removeMouseEnter();removeMouseLeave&&removeMouseLeave();});function doSomething(){var curAngle=0;var timer=setInterval(function(){curAngle+=10;if(curAngle===360){curAngle=0;clearInterval(timer);} |
|||
$$invalidate(0,self.refs.elem.style.transform="rotate(".concat(curAngle,"deg)"),self);},20);} |
|||
$$self.$$set=function($$props){if("self"in $$props)$$invalidate(0,self=$$props.self);if("labels"in $$props)$$invalidate(1,labels=$$props.labels);};return[self,labels,mouseIsIn,doSomething];} |
|||
var Reference=function(_SvelteComponent){_inherits(Reference,_SvelteComponent);var _super=_createSuper(Reference);function Reference(options){var _this;_classCallCheck(this,Reference);_this=_super.call(this);init(_assertThisInitialized(_this),options,instance,create_fragment,safe_not_equal,{self:0,labels:1});return _this;} |
|||
return Reference;}(SvelteComponent);exports.default=Reference;exports.defaults=defaults;exports.position=position;Object.defineProperty(exports,'__esModule',{value:true});}))); |
|||
@ -0,0 +1,57 @@ |
|||
<?php |
|||
/***************************************************************** |
|||
* Argus PHP functions * |
|||
* * |
|||
* * |
|||
* * |
|||
*****************************************************************/ |
|||
// Argus Defines
|
|||
|
|||
define( "ARGUS_SERVER", 0 ); |
|||
define( "ARGUS_ALS_SENSOR", 1 ); |
|||
define( "ARGUS_LFS_SENSOR", 2 ); |
|||
define( "ARGUS_PLS_200_SENSOR", 3 ); |
|||
define( "ARGUS_PLS_360_SENSOR", 4 ); |
|||
define( "ARGUS_3D_SENSOR", 5 ); |
|||
define( "ARGUS_NET_PLS_200", 6 ); |
|||
define( "ARGUS_ANALOG_STATIC_CAMERA", 10 ); |
|||
define( "ARGUS_ANALOG_PTZ_CAMERA", 11 ); |
|||
define( "ARGUS_IP_STATIC_CAMERA", 12 ); |
|||
define( "ARGUS_IP_PTZ_CAMERA", 13 ); |
|||
define( "ARGUS_IP_UART_GATEWAY", 20 ); |
|||
define( "ARGUS_JAMER", 40 ); |
|||
define( "ARGUS_IP_VIDEO_SERVER", 50 ); |
|||
define( "ARGUS_DRONE_CONTROL", 60 ); |
|||
define( "ARGUS_UNKNOWN", 255 ); |
|||
|
|||
define( "ARGUS_NODE_SOCK_TYPE_SERIAL_PORT", 1 ); |
|||
define( "ARGUS_NODE_SOCK_TYPE_NETWORK", 2 ); |
|||
define( "ARGUS_NODE_SOCK_TYPE_DC", 3 ); |
|||
define( "ARGUS_NODE_SOCK_TYPE_VIDEO_GRABBER", 4 ); |
|||
define( "ARGUS_NODE_SOCK_TYPE_AUDIO_GRABBER", 5 ); |
|||
define( "ARGUS_NODE_SOCK_TYPE_VIDEO_DIGITAL", 6 ); |
|||
|
|||
define( "COM_MODE_IN", 1 ); |
|||
define( "COM_MODE_OUT", 2 ); |
|||
define( "COM_MODE_INOUT", 3 ); |
|||
|
|||
define( "COM_TYPE_UART", 1 ); |
|||
define( "COM_TYPE_TCP", 2 ); |
|||
define( "COM_TYPE_DC_CTRL", 3 ); |
|||
define( "COM_TYPE_ANALOG_VIDEO", 4 ); |
|||
define( "COM_TYPE_ANALOG_AUDIO", 5 ); |
|||
define( "COM_TYPE_DIGITAL_MEDIA", 6 ); |
|||
|
|||
define( "CAM_TYPE_ANALOG", 1 ); |
|||
define( "CAM_TYPE_DIGITAL", 2 ); |
|||
|
|||
define( "MOD_TYPE_MEDIASERVER", 1 ); |
|||
define( "MOD_TYPE_USB_DC", 2 ); |
|||
|
|||
function addConnection( $SiteID, $FromNodeID, $FromAuxID, $ToNodeID, $ToAuxID, $Type ){ |
|||
global $DATABASE; |
|||
$QS = "INSERT INTO `connections` SET `site_id`={$SiteID}, `from`={$FromNodeID}, `from_aux`={$FromAuxID}, `to`={$ToNodeID}, `to_aux`={$ToAuxID}, `type`={$Type}"; |
|||
$DATABASE->Query( $QS, false ); |
|||
}; |
|||
|
|||
?>
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files changed in this diff
Write
Preview
Loading…
Cancel
Save
Reference in new issue