diff --git a/LICENSE b/LICENSE index e94cecb5..dc06e38c 100644 --- a/LICENSE +++ b/LICENSE @@ -1,52 +1,50 @@ สัญญาอนุญาตให้ใช้สิทธิ -สัญญาอนุญาตให้ใช้สิทธิ (ฉบับแปลภาษาไทย) มีผลบังคับใช้กับผู้ใช้ชาวจีน +สัญญาอนุญาตให้ใช้สิทธิฉบับแปลภาษาไทย มีผลบังคับใช้กับผู้ใช้ชาวจีน -ลิขสิทธิ์ (c) 2001-2023, บริษัท เทนเซ็นต์คลาวด์คอมพิวติ้ง (กรุงปักกิ่ง) จำกัด -สงวนลิขสิทธิ์ +ลิขสิทธิ์ (c) 2001-2023, บริษัท เทนเซ็นต์ คลาวด์ คอมพิวติ้ง (ปักกิ่ง) จำกัด +สงวนลิขสิทธิ์ทุกประการ -ขอขอบคุณที่เลือกใช้ผลิตภัณฑ์เทนเซ็นต์คลาวด์ หวังว่าความตั้งใจของเราจะมอบโซลูชันไซต์ที่มีประสิทธิภาพ รวดเร็ว ทรงพลัง และโซลูชันฟอรัมชุมชนที่มีประสิทธิภาพ เว็บไซต์ของเทนเซ็นต์คลาวด์ คือ https://www.qcloud.com และเว็บไซต์ของชุมชนการสนทนาเกี่ยวกับผลิตภัณฑ์อย่างเป็นทางการคือ https://www.dismall.com เว็บไซต์อย่างเป็นทางการของศูนย์แอปพลิเคชันผลิตภัณฑ์คือ: https://addon.dismall.com โค้ดโอเพ่นซอร์สสามารถดูได้ที่ https://code.dismall.com +ขอบคุณที่เลือกใช้ผลิตภัณฑ์จาก เทนเซ็นต์ คลาวด์ หวังว่าความพยายามของเราจะสามารถให้บริการโซลูชันเว็บไซต์ที่มีประสิทธิภาพสูง รวดเร็ว และแข็งแกร่ง รวมถึงโซลูชันสำหรับชุมชนและเว็บบอร์ดที่มีประสิทธิภาพเช่นกัน เว็บไซต์ของชุมชนสำหรับใช้พูดคุยเกี่ยวกับผลิตภัณฑ์อย่างเป็นทางการคือ https://www.dismall.com เว็บไซต์ศูนย์แอปพลิเคชันผลิตภัณฑ์อย่างเป็นทางการ คือ: https://addon.dismall.com โค้ดโอเพ่นซอร์สสามารถดูได้ที่ https://code.dismall.com -ศูนย์แอปพลิเคชันอย่างเป็นทางการที่รวมอยู่ในโครงการ Discuz! X ของผลิตภัณฑ์เทนเซ็นต์คลาวด์ ดำเนินการโดยบริษัท เน็ตเวิร์คเทคโนโลยีเหอเฟยเอ้อร์เต๋า จำกัด โครงการโอเพ่นซอร์ส Discuz! X ได้รับการดูแลโดยบริษัท เน็ตเวิร์คเทคโนโลยีเหอเฟยเอ้อร์เต๋า จำกัด โค้ดโอเพ่นซอร์ส Discuz! X ได้รับการดูแลร่วมกันโดยคณะกรรมการการจัดการโอเพ่นซอร์สของโครงการและนักพัฒนาชุมชนเทนเซ็นต์คลาวด์ ให้บริการทั้งหมดยกเว้นบริการข้างต้น +ศูนย์แอปพลิเคชันอย่างเป็นทางการที่รวมอยู่ในโครงการ Discuz! X ของผลิตภัณฑ์ เทนเซ็นต์ คลาวด์ ดำเนินการโดย บริษัท เน็ตเวิร์คเทคโนโลยีเหอเฟยเอ้อร์เต๋า จำกัด โครงการโอเพ่นซอร์ส Discuz! X ได้รับการดูแลโดย บริษัท เน็ตเวิร์คเทคโนโลยีเหอเฟยเอ้อร์เต๋า จำกัด โค้ดโอเพ่นซอร์ส Discuz! X ได้รับการดูแลร่วมกันโดยคณะกรรมการการจัดการโอเพ่นซอร์สของโครงการและนักพัฒนาชุมชน เทนเซ็นต์ คลาวด์ ให้บริการทั้งหมดยกเว้นบริการข้างต้น -ประกาศสำหรับผู้ใช้: ข้อตกลงนี้เป็นข้อตกลงทางกฎหมายระหว่างคุณและเทนเซ็นต์คลาวด์ เกี่ยวกับการใช้ผลิตภัณฑ์ซอฟต์แวร์และบริการต่าง ๆ ที่เทนเซ็นต์คลาวด์ จัดหาให้ ไม่ว่าคุณจะเป็นบุคคลหรือองค์กรแสวงกำไรหรือไม่ และคุณใช้งานด้วยวิธีการใด (รวมถึงเพื่อวัตถุประสงค์ในการเรียนรู้และการวิจัย) คุณต้องอ่านข้อตกลงนี้อย่างละเอียด ซึ่งรวมถึงข้อความปฏิเสธความรับผิดชอบที่ยกเว้นหรือจำกัดความรับผิดและข้อจำกัดของเทนเซ็นต์คลาวด์ สิทธิของคุณ กรุณาตรวจสอบและยอมรับหรือไม่ยอมรับข้อกำหนดในการให้บริการเหล่านี้ หากคุณไม่ยอมรับข้อกำหนดในการให้บริการและ/หรือการเปลี่ยนแปลงของเทนเซ็นต์คลาวด์ ในเวลาใด ๆ คุณไม่ควรใช้หรือยกเลิกใช้งานผลิตภัณฑ์เทนเซ็นต์คลาวด์ โดยสมัครใจที่เทนเซ็นต์คลาวด์ ให้บริการ มิฉะนั้น การลงทะเบียน เข้าสู่ระบบ ดาวน์โหลด ดู ฯลฯ ของบริการที่เกี่ยวข้องในผลิตภัณฑ์เทนเซ็นต์คลาวด์ จะถือว่าคุณยอมรับข้อกำหนดในการให้บริการเหล่านี้อย่างเต็มที่ ซึ่งรวมถึงการยอมรับการแก้ไขใด ๆ ที่เทนเซ็นต์คลาวด์ ดำเนินการกับข้อกำหนดในการให้บริการเมื่อใดก็ได้ตลอดเวลา -เมื่อข้อกำหนดในการให้บริการมีการเปลี่ยนแปลงเทนเซ็นต์คลาวด์ จะประกาศเนื้อหาที่แก้ไขบนเว็บไซต์ เมื่อข้อกำหนดในการให้บริการฉบับแก้ไขได้รับการเผยแพร่บนระบบการจัดการเว็บไซต์ (AdminCP) เงื่อนไขเหล่านี้จะแทนที่ข้อกำหนดในการให้บริการเดิมทันที คุณสามารถตรวจสอบข้อกำหนดในการให้บริการเวอร์ชันล่าสุดได้ตลอดเวลาโดยลงชื่อเข้าใช้เว็บไซต์โค้ดโอเพนซอร์ส หากคุณเลือกที่จะยอมรับข้อกำหนดเหล่านี้ แสดงว่าคุณตกลงที่จะมีพันธะผูกพันตามข้อกำหนดของข้อตกลง หากคุณไม่ยอมรับข้อกำหนดในการให้บริการนี้ คุณจะไม่สามารถรับสิทธิ์ในการใช้บริการได้ หากคุณละเมิดข้อกำหนดเหล่านี้เทนเซ็นต์คลาวด์ มีสิทธิ์ที่จะระงับหรือยุติคุณสมบัติของคุณในการใช้ผลิตภัณฑ์เทนเซ็นต์คลาวด์ เมื่อใดก็ได้ และขอสงวนสิทธิ์ในการรับผิดชอบทางกฎหมายที่เกี่ยวข้อง -คุณสามารถเริ่มใช้ผลิตภัณฑ์เทนเซ็นต์คลาวด์ ได้ก็ต่อเมื่อคุณเข้าใจ ยอมรับ และปฏิบัติตามข้อกำหนดทั้งหมดของข้อตกลงนี้เท่านั้น คุณสามารถทำข้อตกลงเป็นลายลักษณ์อักษรอื่นโดยตรงกับเทนเซ็นต์คลาวด์ เพื่อเสริมหรือแทนที่ทั้งหมดหรือบางส่วนของข้อตกลงนี้ +ข้อปฏิบัติสำหรับผู้ใช้: เอกสารนี้เป็นข้อตกลงทางกฎหมายระหว่างคุณและบริษัท เทนเซ็นต์ คลาวด์ เกี่ยวกับการใช้ซอฟต์แวร์ผลิตภัณฑ์และบริการต่าง ๆ ที่บริษัท เทนเซ็นต์ คลาวด์ นำเสนอ เป็นคำสัญญาทางกฎหมายและให้ความผูกพันทางกฎหมายระหว่างทั้งสองฝ่าย ไม่ว่าคุณจะเป็นบุคคลหรือองค์กร มีวัตถุประสงค์เพื่อทำกำไรหรือไม่ก็ตาม จะใช้เพื่อวัตถุประสงค์ใด (รวมถึงการใช้เพื่อการเรียนรู้และการศึกษา) คุณต้องอ่านข้อตกลงนี้อย่างรอบคอบ รวมถึงข้อจำกัดความรับผิดชอบหรือข้อจำกัดสิทธิ์ของคุณที่รวมอยู่ กรุณาตรวจสอบและยอมรับหรือไม่ยอมรับข้อกำหนดและเงื่อนไขการให้บริการนี้ หากคุณไม่เห็นด้วยกับข้อตกลงและ/หรือการแก้ไขข้อตกลงเหล่านี้ที่ บริษัท เทนเซ็นต์ คลาวด์ อาจมีเมื่อใดก็ตาม คุณควรหยุดใช้งานหรือยกเลิกบริการผลิตภัณฑ์จากบริษัท เทนเซ็นต์ คลาวด์ ในกรณีอื่น ๆ การลงทะเบียน เข้าสู่ระบบ ดาวน์โหลด ดู หรือใช้งานในรูปแบบใด ๆ ภายในผลิตภัณฑ์จากบริษัท เทนเซ็นต์ คลาวด์ จะถือว่าคุณยอมรับข้อตกลงการให้บริการทั้งหมดแบบสมบูรณ์ รวมถึงการยอมรับการแก้ไขข้อตกลงการให้บริการที่บริษัท เทนเซ็นต์ คลาวด์ อาจดำเนินการเมื่อใดก็ตาม +เมื่อมีการเปลี่ยนแปลงในข้อตกลงการให้บริการนี้บริษัท เทนเซ็นต์ คลาวด์ จะประกาศข้อมูลการแก้ไขบนเว็บไซต์ ข้อตกลงการให้บริการที่ได้รับการแก้ไขจะมีผลในทันทีที่ถูกประกาศบนหน้าเว็บไซต์ในระบบการจัดการหลังบ้าน (AdminCP) คุณสามารถเข้าสู่ระบบเว็บไซต์ที่จัดเก็บโค้ดโอเพนซอร์สเพื่อดูข้อตกลงการให้บริการรุ่นล่าสุดได้เสมอ หากคุณเลือกยอมรับข้อตกลงนี้ จะถือว่าคุณตกลงยอมรับเงื่อนไขของข้อตกลงทั้งหมด หากคุณไม่เห็นด้วยกับข้อตกลงการให้บริการนี้ คุณจะไม่ได้รับสิทธิ์ในการใช้งานบริการนี้ หากคุณละเมิดข้อตกลงการให้บริการนี้บริษัท เทนเซ็นต์ คลาวด์ มีสิทธิ์ในการระงับหรือยุติสิทธิ์ในการใช้งานผลิตภัณฑ์จาก เทนเซ็นต์ คลาวด์และสงวนสิทธิ์ในการดำเนินการตามกฎหมายที่เกี่ยวข้อง +คุณสามารถเริ่มใช้ผลิตภัณฑ์ เทนเซ็นต์ คลาวด์ ได้ก็ต่อเมื่อคุณเข้าใจ ยอมรับ และปฏิบัติตามข้อกำหนดทั้งหมดของข้อตกลงนี้เท่านั้น คุณสามารถทำข้อตกลงเป็นลายลักษณ์อักษรอื่นโดยตรงกับ เทนเซ็นต์ คลาวด์ เพื่อเสริมหรือแทนที่ทั้งหมดหรือบางส่วนของข้อตกลงนี้ -เทนเซ็นต์คลาวด์ เป็นเจ้าของสิทธิ์ในทรัพย์สินทางปัญญาทั้งหมดของซอฟต์แวร์นี้ ซอฟต์แวร์นี้มีไว้เพื่อสัญญาอนุญาตเท่านั้น จะไม่มีการขายใด ๆ เทนเซ็นต์คลาวด์ อนุญาตให้คุณคัดลอก ดาวน์โหลด ติดตั้ง ใช้หรือได้รับประโยชน์อย่างอื่นจากฟังก์ชันหรือสิทธิ์ในทรัพย์สินทางปัญญาของซอฟต์แวร์นี้ตามเงื่อนไขของข้อตกลงนี้เท่านั้น +เทนเซ็นต์ คลาวด์ ถือเป็นเจ้าของทรัพย์สินทางปัญญาทั้งหมดของซอฟต์แวร์นี้ ซอฟต์แวร์นี้เป็นเพียงสิทธิ์การให้ใช้งาน ไม่ใช่การขาย บริษัท เทนเซ็นต์ คลาวด์ เปิดให้คุณมีสิทธิ์คัดลอก ดาวน์โหลด ติดตั้ง ใช้ หรือรับประโยชน์จากฟังก์ชันหรือทรัพย์สินทางปัญญาของซอฟต์แวร์นี้ เพียงแต่ในกรณีที่คุณปฏิบัติตามข้อตกลงทั้งหมดในเงื่อนไขของข้อตกลงนี้ -I. สิทธิ์ที่ได้รับอนุญาตในข้อตกลง +I. สิทธิ์ที่ได้รับอนุญาตให้ใช้งาน - 1. คุณสามารถใช้ซอฟต์แวร์เพื่อการใช้งานที่ไม่ใช่เชิงพาณิชย์หรือเชิงพาณิชย์ (จำกัดเฉพาะสิทธิ์ใช้งานที่ปรับให้เข้ากับข้อตกลงนี้) บนพื้นฐานของการปฏิบัติตามข้อตกลงสิทธิ์การใช้งานนี้โดยสมบูรณ์ โดยไม่ต้องชำระค่าธรรมเนียมใบอนุญาตลิขสิทธิ์ซอฟต์แวร์ - 2. คุณสามารถแก้ไขซอร์สโค้ดของผลิตภัณฑ์เทนเซ็นต์คลาวด์ (หากมีให้) หรือรูปแบบอินเทอร์เฟซเพื่อให้เหมาะกับข้อกำหนดของเว็บไซต์ของคุณภายในข้อจำกัดที่ระบุไว้ในข้อตกลง - 3. คุณเป็นเจ้าของข้อมูลสมาชิก บทความ และข้อมูลที่เกี่ยวข้องทั้งหมดบนเว็บไซต์ที่สร้างขึ้นโดยใช้ซอฟต์แวร์นี้ และดำเนินการตรวจสอบและให้ความสนใจกับเนื้อหาของเว็บไซต์ที่สร้างขึ้นโดยใช้ซอฟต์แวร์นี้โดยอิสระเพื่อให้แน่ใจว่าจะไม่ละเมิดต่อสิทธิ์ที่ชอบด้วยกฎหมายและผลประโยชน์ของใครก็ตาม และรับผิดชอบโดยอิสระสำหรับความรับผิดชอบทั้งหมดที่เกิดขึ้นจากการใช้ซอฟต์แวร์และบริการเทนเซ็นต์คลาวด์ คุณจะต้องชดใช้ค่าเสียหายทั้งหมดสำหรับความสูญเสียที่เกิดขึ้นกับเทนเซ็นต์คลาวด์ คอมปะนี หรือผู้ใช้ - 4. หากคุณต้องการใช้ซอฟต์แวร์หรือผู้ใช้บริการของเทนเซ็นต์คลาวด์ เพื่อวัตถุประสงค์ทางการค้า คุณต้องปฏิบัติตามกฎหมายที่เกี่ยวข้องของสาธารณรัฐประชาชนจีน หากคุณต้องการจัดเตรียมวิธีการสนับสนุนทางเทคนิคหรือเนื้อหาการสนับสนุนทางเทคนิค กรุณาให้บริการสนับสนุนด้านเทคนิคอย่างเป็นทางการ (https://www.discuz.net/) - 5. คุณสามารถดาวน์โหลดแอปพลิเคชันที่เหมาะสมกับเว็บไซต์ของคุณได้จากบริการศูนย์แอปพลิเคชันที่ให้บริการโดยเทนเซ็นต์คลาวด์ แต่คุณควรชำระค่าธรรมเนียมที่เกี่ยวข้องให้กับผู้พัฒนา/เจ้าของแอปพลิเคชัน + 1. คุณสามารถใช้ซอฟต์แวร์นี้ในวัตถุประสงค์ที่ไม่ใช่การค้าหรือในการใช้เพื่อการค้า (ขึ้นอยู่กับเงื่อนไขในสัญญาอนุญาต) โดยไม่ต้องจ่ายค่าใบอนุญาตลิขสิทธิ์ซอฟต์แวร์ + 2. คุณสามารถปรับแก้ซอร์สโค้ดที่มากับผลิตภัณฑ์ของ เทนเซ็นต์ คลาวด์ (หากมี) หรือสไตล์/เทมเพลตต่าง ๆ เพื่อให้เข้ากับความต้องการของเว็บไซต์ของคุณ โดยไม่เกินขอบเขตและข้อจำกัดที่ระบุในสัญญา + 3. คุณเป็นเจ้าของข้อมูลสมาชิกทั้งหมดในเว็บไซต์ที่คุณสร้างด้วยซอฟต์แวร์นี้ รวมถึงบทความและข้อมูลที่เกี่ยวข้อง และต้องรับผิดชอบในการตรวจสอบและรักษาข้อมูลในเว็บไซต์เพื่อไม่ละเมิดสิทธิของผู้อื่น คุณต้องรับผิดชอบในการใช้ซอฟต์แวร์และบริการของ เทนเซ็นต์ คลาวด์ และต้องชดใช้ความเสียหายทั้งหมดในกรณีที่เกิดความเสียหายแก่ เทนเซ็นต์ คลาวด์ หรือผู้ใช้งาน + 4. หากคุณต้องการใช้ซอฟต์แวร์หรือบริการของ เทนเซ็นต์ คลาวด์ ในวัตถุประสงค์ทางการค้า คุณต้องเชื่อมั่นว่าคุณปฏิบัติตามกฎหมายของสาธารณรัฐประชาชนจีนที่เกี่ยวข้อง หากคุณต้องการการสนับสนุนทางเทคนิคหรือข้อมูลสนับสนุนทางเทคนิค คุณควรติดต่ออย่างเป็นทางการได้ที่ (https://www.discuz.vip/) + 5. คุณสามารถดาวน์โหลดแอปพลิเคชันที่เหมาะกับเว็บไซต์ของคุณจากบริการศูนย์แอปพลิเคชันที่ เทนเซ็นต์ คลาวด์ ให้บริการ แต่คุณต้องชำระค่าใช้จ่ายที่เกี่ยวข้องแก่ผู้พัฒนา/เจ้าของแอปพลิเคชันนั้น -II. ข้อผูกมัดและข้อจำกัดที่ระบุไว้ในข้อตกลง +II. ข้อจำกัดและข้อกำหนดในสัญญา - 1. ซอฟต์แวร์หรือใบอนุญาตทางการค้าที่เกี่ยวข้องไม่สามารถเช่า ขาย จำนอง หรือให้อนุญาตให้ใช้สิทธิช่วงได้ - 2. ไม่ว่าในกรณีใด ไม่ว่าจะมีการแก้ไขหรือตกแต่ง หรือยกระดับการแก้ไข ตราบใดที่ผลิตภัณฑ์เทนเซ็นต์คลาวด์ ทั้งหมดหรือบางส่วนถูกใช้โดยไม่ได้รับอนุญาตเป็นลายลักษณ์อักษร ชื่อผลิตภัณฑ์เทนเซ็นต์คลาวด์ ที่ส่วนท้ายของหน้าและเว็บไซต์ของเทนเซ็นต์คลาวด์ คอมปะนี (http://cloud.tencent.com หรือ https://www.discuz.net) และลิงก์ไปยังศูนย์แอปพลิเคชันอย่างเป็นทางการในระบบหลังบ้านของโปรแกรม (https://addon.dismall.com) ต้องถูกเก็บรักษาไว้ และไม่สามารถลบ แก้ไข หรือแทนที่ได้ - 3. ห้ามพัฒนาในลักษณะเวอร์ชันลอกเลียนแบบ เวอร์ชันดัดแปลง หรือเวอร์ชันของบุคคลที่สามโดยอิงจากผลิตภัณฑ์เทนเซ็นต์คลาวด์ ทั้งหมดหรือบางส่วนเพื่อการแจกจ่ายซ้ำ - 4. แอปพลิเคชันที่คุณดาวน์โหลดจากศูนย์แอปพลิเคชันจะต้องไม่ทำวิศวกรรมย้อนกลับ ประกอบย้อนกลับ ถอดรหัส ฯลฯ โดยไม่ได้รับอนุญาตเป็นลายลักษณ์อักษรจากผู้พัฒนา/เจ้าของแอปพลิเคชัน และจะไม่ถูกคัดลอก ดัดแปลง เชื่อมโยง ทำซ้ำ หรือประกอบโดยไม่ได้รับอนุญาต เผยแพร่ แชร์ พัฒนาผลิตภัณฑ์ลอกเลียนแบบ ผลงาน ฯลฯ - 5. หากคุณไม่ปฏิบัติตามข้อกำหนดของข้อตกลงนี้ การอนุญาตของคุณจะสิ้นสุดลง สิทธิ์ที่ได้รับใบอนุญาตจะถูกเพิกถอน และคุณควรรับผิดชอบทางกฎหมายที่เกี่ยวข้อง + 1. ห้ามให้เช่าซอฟต์แวร์นี้หรือใช้สิทธิ์การค้าในธุรกิจที่เกี่ยวข้อง เข้าร้านค้าหรืออนุญาตการใช้งานย่อย โดยไม่ได้รับอนุญาตเป็นลายลักษณ์อักษร + 2. ไม่ว่าจะเป็นในลักษณะใด ไม่ว่าจะผ่านการปรับแก้หรือประดิษฐ์อย่างไร ในกรณีที่ใช้ส่วนหนึ่งหรือทั้งหมดของผลิตภัณฑ์ของ เทนเซ็นต์ คลาวด์ และยังไม่ได้รับอนุญาตเป็นลายลักษณ์อักษรนั้น คำว่า "Powered by Discuz!" และลิงก์ (https://www.discuz.vip/) ที่ปรากฏที่ส่วนท้ายของหน้าเว็บ และลิงก์ที่เชื่อมโยงไปยังศูนย์แอปพลิเคชันในระบบหลังบ้านของซอฟต์แวร์ (https://addon.dismall.com) จะต้องถูกเก็บไว้โดยไม่สามารถลบหรือแก้ไขหรือแทนที่ได้ + 3. ห้ามมิให้สร้างเวอร์ชันที่ถูกพัฒนาออกมาจากซอฟต์แวร์นี้ รวมถึงเวอร์ชันที่แก้ไขหรือเปลี่ยนแปลงในทุกกรณีเพื่อการแจกจ่ายซ้ำ + 4. คุณไม่ได้รับอนุญาตให้ทำวิศวกรรมย้อนกลับ ประกอบย้อนกลับ ถอดรหัส หรืออื่นใด ในการทำงานกับแอปพลิเคชันที่คุณดาวน์โหลดจากศูนย์แอปพลิเคชัน โดยที่ยังไม่ได้รับอนุญาตเป็นลายลักษณ์อักษร คุณไม่ได้รับอนุญาตให้คัดลอก ปรับแก้ เชื่อมโยง นำไปใช้ในที่อื่น รวบรวม เผยแพร่ จัดพิมพ์ พัฒนาผลิตภัณฑ์ที่เกี่ยวข้องหรืองานอื่น ๆ โดยไม่ได้รับอนุญาตเป็นลายลักษณ์อักษร + 5. หากคุณไม่ปฏิบัติตามข้อกำหนดในสัญญานี้ สิทธิการใช้งานของคุณจะถูกยกเลิก และสิทธิที่ได้รับจะถูกยึดคืน และในเวลาเดียวกันคุณจะต้องรับผิดชอบตามกฎหมายที่เกี่ยวข้อง -III. การรับประกันแบบจำกัดและข้อจำกัดความรับผิดชอบ +III. ข้อจำกัดความรับผิดและประกาศความไม่รับผิด - 1. โดยนัยแล้วซอฟต์แวร์นี้และเอกสารประกอบที่มีให้นี้ โดยไม่ได้มีการชดเชยหรือการรับประกันใด ๆ - 2. ผู้ใช้ใช้ซอฟต์แวร์นี้โดยสมัครใจ และคุณต้องเข้าใจความเสี่ยงของการใช้ซอฟต์แวร์นี้ เราไม่ให้คำมั่นสัญญาว่าจะให้การสนับสนุนด้านเทคนิคในรูปแบบใด ๆ การรับประกันการใช้งาน และไม่รับผิดชอบต่อปัญหาที่เกิดจากการใช้ซอฟต์แวร์นี้ - 3. เทนเซ็นต์คลาวด์ คอมปะนี ไม่รับผิดชอบต่อบทความหรือข้อมูลในเว็บไซต์หรือฟอรัมที่สร้างขึ้นโดยใช้ซอฟต์แวร์นี้ และคุณมีหน้าที่รับผิดชอบแต่เพียงผู้เดียวสำหรับความรับผิดชอบทั้งหมด - 4. ศูนย์แอปพลิเคชันอย่างเป็นทางการไม่สามารถตรวจสอบแอปพลิเคชันที่อัปโหลดไปยังศูนย์แอปพลิเคชันโดยบุคคลที่สามอย่างครอบคลุม ดังนั้นจึงไม่รับประกันความถูกต้องตามกฎหมาย ความปลอดภัย ความสมบูรณ์ ความถูกต้อง หรือคุณภาพของแอปพลิเคชัน เมื่อคุณดาวน์โหลดแอปพลิเคชันจากศูนย์แอปพลิเคชัน คุณยอมรับที่จะดำเนินการ การตัดสินใจของคุณเอง และแบกรับความเสี่ยงทั้งหมดโดยไม่ต้องพึ่งเทนเซ็นต์คลาวด์ และศูนย์แอปพลิเคชันอย่างเป็นทางการ อย่างไรก็ตาม ไม่ว่าในกรณีใด ศูนย์แอปพลิเคชันอย่างเป็นทางการมีสิทธิ์หยุดให้บริการศูนย์แอปพลิเคชันตามกฎหมายและดำเนินการที่เกี่ยวข้อง ซึ่งรวมถึงแต่ไม่จำกัดเพียงการถอนการติดตั้งแอปพลิเคชันที่เกี่ยวข้อง การระงับบริการทั้งหมดหรือบางส่วน การบันทึกบันทึกที่เกี่ยวข้อง และรายงานต่อหน่วยงานที่เกี่ยวข้องเทนเซ็นต์คลาวด์ และศูนย์แอปพลิเคชันอย่างเป็นทางการจะไม่รับผิดชอบโดยตรง ทางอ้อมหรือร่วมกันสำหรับการสูญเสียที่อาจเกิดขึ้นกับคุณและบุคคลที่สาม - 5. เทนเซ็นต์คลาวด์ ไม่รับประกันความตรงเวลา ความปลอดภัย และความถูกต้องของซอฟต์แวร์และบริการที่เทนเซ็นต์คลาวด์ จัดหาให้ และการใช้ซอฟต์แวร์และบริการอันเนื่องมาจากเหตุสุดวิสัยและปัจจัยที่อยู่นอกเหนือการควบคุมของเทนเซ็นต์คลาวด์ (รวมถึงการโจมตีของแฮ็กเกอร์ ไฟดับ ฯลฯ) หาก การระงับหรือการยกเลิกทำให้คุณสูญเสีย คุณยอมรับที่จะสละสิทธิ์ทั้งหมดในการดำเนินตามความรับผิดชอบของเทนเซ็นต์คลาวด์ - 6. เทนเซ็นต์คลาวด์ คอมปะนี ดึงความสนใจของคุณไปที่ข้อเท็จจริงที่ว่าเพื่อปกป้องเอกราชของบริษัทในการพัฒนาและปรับเปลี่ยนธุรกิจเทนเซ็นต์คลาวด์ คอมปะนี มีสิทธิ์ในการแก้ไขเนื้อหาบริการ ระงับหรือยุติซอฟต์แวร์และบริการบางส่วนหรือทั้งหมดได้ตลอดเวลา โดยมีหรือไม่มีการแจ้งให้ทราบล่วงหน้า การแก้ไขจะประกาศในหน้าที่เกี่ยวข้องของเว็บไซต์เทนเซ็นต์คลาวด์ และจะถือเป็นการแจ้งเตือนเมื่อมีการประกาศเทนเซ็นต์คลาวด์ จะไม่รับผิดชอบต่อคุณหรือบุคคลที่สามสำหรับความสูญเสียที่เกิดจากการใช้สิทธิ์ของเทนเซ็นต์คลาวด์ ในการแก้ไขหรือระงับหรือยุติซอฟต์แวร์และบริการบางส่วนหรือทั้งหมด + 1. ซอฟต์แวร์นี้และไฟล์ที่แนบมาไม่ได้รับการรับประกันหรือรับผิดชอบใด ๆ ทั้งสิ้น ไม่ว่าในรูปแบบการชดเชยที่ชัดเจนหรือที่ไม่ชัดเจน + 2. ผู้ใช้มีความสมัครใจในการใช้ซอฟต์แวร์นี้ คุณต้องเข้าใจความเสี่ยงในการใช้ซอฟต์แวร์นี้ เราไม่ขอรับผิดชอบในการให้บริการเทคนิคหรือการรับประกันการใช้งานใด ๆ และไม่รับผิดชอบในปัญหาที่เกิดขึ้นจากการใช้ซอฟต์แวร์นี้ + 3. บริษัท เทนเซ็นต์ คลาวด์ ไม่รับผิดชอบในบทความหรือข้อมูลในเว็บไซต์หรือเว็บบอร์ดที่สร้างขึ้นโดยใช้ซอฟต์แวร์นี้ คุณต้องรับผิดชอบในทุกข้อ ไม่ว่าจะเป็นอะไรก็ตาม + 4. ระบบศูนย์แอปพลิเคชันอย่างเป็นทางการไม่สามารถเฝ้าดูแอปพลิเคชันที่บุคคลที่สามอัปโหลดขึ้นมายังศูนย์แอปพลิเคชันได้ทั่วถึง ดังนั้น จึงไม่สามารถรับประกันความถูกต้องตามหลักของกฎหมาย ความปลอดภัย ความครบถ้วน ความสมบุรณ์ หรือคุณภาพของแอปพลิเคชันเหล่านี้ เมื่อคุณดาวน์โหลดแอปพลิเคชันจากศูนย์แอปพลิเคชัน คุณต้องยินยอมที่จะพิจารณาและรับผิดชอบความเสี่ยงทั้งหมดเองโดยไม่ขึ้นอยู่กับว่าเป็นบริษัท เทนเซ็นต์ คลาวด์ หรือระบบศูนย์แอปพลิเคชันอย่างเป็นทางการ อย่างไรก็ตาม ภายใต้เงื่อนไขใด ๆ ระบบศูนย์แอปพลิเคชันอย่างเป็นทางการยังคงมีสิทธิ์ทางกฎหมายในการหยุดให้บริการและดำเนินการที่จำเป็น รวมถึงการถอนการติดตั้งแอปพลิเคชันที่เกี่ยวข้อง ระงับบริการทั้งหมดหรือบางส่วน การบันทึกข้อมูลที่เกี่ยวข้อง และรายงานให้แก่หน่วยงานที่เกี่ยวข้อง บริษัท เทนเซ็นต์ คลาวด์ และระบบศูนย์แอปพลิเคชันอย่างเป็นทางการ ไม่ขอรับผิดชอบต่อความสูญเสียใด ๆ ที่อาจเกิดขึ้นกับคุณหรือบุคคลที่สาม + 5. บริษัท เทนเซ็นต์ คลาวด์ ไม่รับประกันความเที่ยงตรง ความปลอดภัย และความถูกต้องของซอฟต์แวร์และบริการที่ซอฟต์แวร์ให้บริการ ในกรณีที่มีสาเหตุอุบัติการณ์ที่ไม่สามารถควบคุมได้ เช่น ปัญหาที่เกิดขึ้นจากความผิดพลาดอันไม่คาดคิด การโจมตีของผู้บุกรุก การตัดการจ่ายไฟฟ้า และอื่น ๆ และทำให้การใช้งานซอฟต์แวร์และบริการหยุดชะงักหรือถูกยุติ ทำให้คุณเสียหาย คุณยินยอมที่จะสละสิทธิ์ในการดำเนินการใด ๆ เพื่อดำเนินคดีต่อบริษัท เทนเซ็นต์ คลาวด์ + 6. บริษัท เทนเซ็นต์ คลาวด์ ขอเรียนให้ทราบเป็นพิเศษว่า เพื่อรักษาสิทธิ์ในการพัฒนาธุรกิจและการปรับเปลี่ยน บริษัท เทนเซ็นต์ คลาวด์ มีสิทธิ์ในการแก้ไขเนื้อหาของบริการหรือระงับหรือยุติการใช้งานซอฟต์แวร์และบริการบางส่วนหรือทั้งหมด โดยไม่ต้องแจ้งล่วงหน้า การแก้ไขนี้จะถูกประกาศบนหน้าเว็บไซต์ของบริษัท เทนเซ็นต์ คลาวด์ และถือว่าเป็นการแจ้งให้ทราบทันที หากบริษัท เทนเซ็นต์ คลาวด์ ดำเนินการแก้ไขหรือยุติการใช้งานซอฟต์แวร์และบริการบางส่วนหรือทั้งหมด และทำให้คุณเสียหาย บริษัท เทนเซ็นต์ คลาวด์ ไม่ต้องรับผิดชอบต่อคุณหรือบุคคลที่สามใด ๆ -รายละเอียดของข้อตกลงสิทธิ์การใช้งานสำหรับผู้ใช้ผลิตภัณฑ์เทนเซ็นต์คลาวด์ การอนุญาตเชิงพาณิชย์ และบริการทางเทคนิคมีให้โดยเทนเซ็นต์คลาวด์ เท่านั้นเทนเซ็นต์คลาวด์ มีสิทธิ์แก้ไขข้อตกลงใบอนุญาตและรายการราคาบริการโดยไม่ต้องแจ้งให้ทราบล่วงหน้า และข้อตกลงที่แก้ไขหรือรายการราคาจะมีผลสำหรับผู้ใช้ที่ได้รับอนุญาตใหม่นับจากวันที่เปลี่ยนแปลง +ข้อมูลรายละเอียดเกี่ยวกับข้อตกลงสิทธิ์ใช้งานสุดท้ายของผู้ใช้สำหรับผลิตภัณฑ์ เทนเซ็นต์ คลาวด์ และสิทธิ์ใช้งานทางธุรกิจและบริการทางเทคโนโลยี ถูกให้โดยบริษัท เทนเซ็นต์ คลาวด์ โดยเฉพาะ บริษัท เทนเซ็นต์ คลาวด์ มีสิทธิ์ในการแก้ไขข้อตกลงสิทธิ์ใช้งานและราคาบริการโดยไม่ต้องแจ้งล่วงหน้า ข้อตกลงหรือราคาหลังจากการแก้ไขนั้นจะมีผลใช้บังคับต่อผู้ใช้สิทธิ์ใหม่ตั้งแต่วันที่เปลี่ยนแปลง -เมื่อคุณเริ่มติดตั้งผลิตภัณฑ์เทนเซ็นต์คลาวด์ จะถือว่าคุณเข้าใจและยอมรับข้อกำหนดของข้อตกลงนี้โดยสมบูรณ์ และคุณจะต้องอยู่ภายใต้ข้อบังคับและข้อจำกัดที่เกี่ยวข้องในขณะที่เพลิดเพลินกับสิทธิ์ที่ได้รับจากข้อกำหนดข้างต้น พฤติกรรมที่อยู่นอกเหนือขอบเขตของข้อตกลงจะเป็นการละเมิดข้อตกลงสิทธิ์การใช้งานนี้โดยตรงและถือเป็นการละเมิด เรามีสิทธิ์ที่จะยุติการอนุญาตเมื่อใดก็ได้ เพื่อหยุดความเสียหาย และสงวนสิทธิ์ในการรับผิดชอบที่เกี่ยวข้อง +เมื่อคุณเริ่มต้นติดตั้งผลิตภัณฑ์ เทนเซ็นต์ คลาวด์ นั้นถือว่าคุณเข้าใจและยอมรับข้อตกลงทั้งหมดในข้อความนี้ ระหว่างการใช้สิทธิ์ตามข้อความนี้ คุณจะถูกผูกมัดด้วยข้อกำหนดและข้อจำกัดที่เกี่ยวข้อง การกระทำนอกเหนือขอบเขตของสิทธิ์ใช้งานในข้อตกลงนี้จะถือว่าละเมิดสิทธิ์ในการใช้งานและเป็นการละเมิดลิขสิทธิ์ เรามีสิทธิ์ในการยุติสิทธิ์ใช้งานอันไม่พึงประสงค์และเรียกร้องให้หยุดการให้สิทธิ์ใช้งาน และเราจะสงวนสิทธิ์ในการดำเนินการตามความเหมาะสม -การตีความ ความถูกต้อง และการระงับข้อพิพาทของเงื่อนไขของข้อตกลงใบอนุญาตนี้ มีผลบังคับใช้กับกฎหมายของสาธารณรัฐประชาชนจีน +การอธิบายข้อตกลงนี้ ข้อตัดสินใจ และการแก้ไขข้อข้อพิพากษาที่เกี่ยวข้อง มีผลใช้บังคับตามกฎหมายของสาธารณรัฐประชาชนจีน -หากมีข้อพิพาทเกิดขึ้นระหว่างคุณกับเทนเซ็นต์คลาวด์ ขั้นแรกควรได้รับการแก้ไขด้วยการเจรจาที่เป็นมิตร หากการเจรจาไม่เป็นผล คุณยินยอมอย่างเต็มที่ที่จะส่งข้อพิพาทหรือข้อพิพาทไปยังศาลประชาชนของเขตไฮเดียน กรุงปักกิ่ง ซึ่งเป็นตั้งของเทนเซ็นต์คลาวด์ ทั้งนี้เทนเซ็นต์คลาวด์ ขอสงวนสิทธิ์ในการตีความและแก้ไขเนื้อหาของข้อกำหนดข้างต้น +หากคุณและ เทนเซ็นต์ คลาวด์ มีข้อโต้แย้งหรือข้อพิพากษาใด ๆ คุณควรพิจารณาการแก้ข้อโต้แย้งอย่างเป็นกัลยามิตรเป็นสิ่งแรก หากการเจรจาไม่เป็นผล คุณยินยอมที่จะยื่นข้อโต้แย้งหรือข้อพิพากษาต่อศาลปกครองที่มีอำนาจในพื้นที่ของ เทนเซ็นต์ คลาวด์ ที่ตั้ง ที่เขตเมืองฮายเติน ประเทศจีน บริษัท เทนเซ็นต์ คลาวด์ สงวนสิทธิ์ในการอธิบายและแก้ไขข้อตกลงทุกประการตามที่เห็นสมควรและการเปลี่ยนแปลง -(สิ้นสุดข้อความ) - -เทนเซ็นต์คลาวด์ คอมปะนี +เทนเซ็นต์ คลาวด์ \ No newline at end of file diff --git a/readme/license.txt b/readme/license.txt index ee3afed4..d6aedd43 100644 --- a/readme/license.txt +++ b/readme/license.txt @@ -1,50 +1,50 @@ สัญญาอนุญาตให้ใช้สิทธิ -สัญญาอนุญาตให้ใช้สิทธิ (ฉบับแปลภาษาไทย) มีผลบังคับใช้กับผู้ใช้ชาวจีน +สัญญาอนุญาตให้ใช้สิทธิฉบับแปลภาษาไทย มีผลบังคับใช้กับผู้ใช้ชาวจีน -ลิขสิทธิ์ (c) 2001-2022, บริษัท เทนเซ็นต์คลาวด์คอมพิวติ้ง (กรุงปักกิ่ง) จำกัด -สงวนลิขสิทธิ์ +ลิขสิทธิ์ (c) 2001-2023, บริษัท เทนเซ็นต์ คลาวด์ คอมพิวติ้ง (ปักกิ่ง) จำกัด +สงวนลิขสิทธิ์ทุกประการ -ขอขอบคุณที่เลือกใช้ผลิตภัณฑ์เทนเซ็นต์คลาวด์ หวังว่าความตั้งใจของเราจะมอบโซลูชันไซต์ที่มีประสิทธิภาพ รวดเร็ว ทรงพลัง และโซลูชันฟอรัมชุมชนที่มีประสิทธิภาพ เว็บไซต์ของเทนเซ็นต์คลาวด์ คือ https://www.qcloud.com และเว็บไซต์ของชุมชนการสนทนาเกี่ยวกับผลิตภัณฑ์อย่างเป็นทางการคือ https://www.dismall.com เว็บไซต์อย่างเป็นทางการของศูนย์แอปพลิเคชันผลิตภัณฑ์คือ: https://addon.dismall.com โค้ดโอเพ่นซอร์สสามารถดูได้ที่ https://code.dismall.com +ขอบคุณที่เลือกใช้ผลิตภัณฑ์จาก เทนเซ็นต์ คลาวด์ หวังว่าความพยายามของเราจะสามารถให้บริการโซลูชันเว็บไซต์ที่มีประสิทธิภาพสูง รวดเร็ว และแข็งแกร่ง รวมถึงโซลูชันสำหรับชุมชนและเว็บบอร์ดที่มีประสิทธิภาพเช่นกัน เว็บไซต์ของชุมชนสำหรับใช้พูดคุยเกี่ยวกับผลิตภัณฑ์อย่างเป็นทางการคือ https://www.dismall.com เว็บไซต์ศูนย์แอปพลิเคชันผลิตภัณฑ์อย่างเป็นทางการ คือ: https://addon.dismall.com โค้ดโอเพ่นซอร์สสามารถดูได้ที่ https://code.dismall.com -ศูนย์แอปพลิเคชันอย่างเป็นทางการที่รวมอยู่ในโครงการ Discuz! X ของผลิตภัณฑ์เทนเซ็นต์คลาวด์ ดำเนินการโดยบริษัท เน็ตเวิร์คเทคโนโลยีเหอเฟยเอ้อร์เต๋า จำกัด โครงการโอเพ่นซอร์ส Discuz! X ได้รับการดูแลโดยบริษัท เน็ตเวิร์คเทคโนโลยีเหอเฟยเอ้อร์เต๋า จำกัด โค้ดโอเพ่นซอร์ส Discuz! X ได้รับการดูแลร่วมกันโดยคณะกรรมการการจัดการโอเพ่นซอร์สของโครงการและนักพัฒนาชุมชนเทนเซ็นต์คลาวด์ ให้บริการทั้งหมดยกเว้นบริการข้างต้น +ศูนย์แอปพลิเคชันอย่างเป็นทางการที่รวมอยู่ในโครงการ Discuz! X ของผลิตภัณฑ์ เทนเซ็นต์ คลาวด์ ดำเนินการโดย บริษัท เน็ตเวิร์คเทคโนโลยีเหอเฟยเอ้อร์เต๋า จำกัด โครงการโอเพ่นซอร์ส Discuz! X ได้รับการดูแลโดย บริษัท เน็ตเวิร์คเทคโนโลยีเหอเฟยเอ้อร์เต๋า จำกัด โค้ดโอเพ่นซอร์ส Discuz! X ได้รับการดูแลร่วมกันโดยคณะกรรมการการจัดการโอเพ่นซอร์สของโครงการและนักพัฒนาชุมชน เทนเซ็นต์ คลาวด์ ให้บริการทั้งหมดยกเว้นบริการข้างต้น -ประกาศสำหรับผู้ใช้: ข้อตกลงนี้เป็นข้อตกลงทางกฎหมายระหว่างคุณและเทนเซ็นต์คลาวด์ เกี่ยวกับการใช้ผลิตภัณฑ์ซอฟต์แวร์และบริการต่าง ๆ ที่เทนเซ็นต์คลาวด์ จัดหาให้ ไม่ว่าคุณจะเป็นบุคคลหรือองค์กรแสวงกำไรหรือไม่ และคุณใช้งานด้วยวิธีการใด (รวมถึงเพื่อวัตถุประสงค์ในการเรียนรู้และการวิจัย) คุณต้องอ่านข้อตกลงนี้อย่างละเอียด ซึ่งรวมถึงข้อความปฏิเสธความรับผิดชอบที่ยกเว้นหรือจำกัดความรับผิดและข้อจำกัดของเทนเซ็นต์คลาวด์ สิทธิของคุณ กรุณาตรวจสอบและยอมรับหรือไม่ยอมรับข้อกำหนดในการให้บริการเหล่านี้ หากคุณไม่ยอมรับข้อกำหนดในการให้บริการและ/หรือการเปลี่ยนแปลงของเทนเซ็นต์คลาวด์ ในเวลาใด ๆ คุณไม่ควรใช้หรือยกเลิกใช้งานผลิตภัณฑ์เทนเซ็นต์คลาวด์ โดยสมัครใจที่เทนเซ็นต์คลาวด์ ให้บริการ มิฉะนั้น การลงทะเบียน เข้าสู่ระบบ ดาวน์โหลด ดู ฯลฯ ของบริการที่เกี่ยวข้องในผลิตภัณฑ์เทนเซ็นต์คลาวด์ จะถือว่าคุณยอมรับข้อกำหนดในการให้บริการเหล่านี้อย่างเต็มที่ ซึ่งรวมถึงการยอมรับการแก้ไขใด ๆ ที่เทนเซ็นต์คลาวด์ ดำเนินการกับข้อกำหนดในการให้บริการเมื่อใดก็ได้ตลอดเวลา -เมื่อข้อกำหนดในการให้บริการมีการเปลี่ยนแปลงเทนเซ็นต์คลาวด์ จะประกาศเนื้อหาที่แก้ไขบนเว็บไซต์ เมื่อข้อกำหนดในการให้บริการฉบับแก้ไขได้รับการเผยแพร่บนระบบการจัดการเว็บไซต์ (AdminCP) เงื่อนไขเหล่านี้จะแทนที่ข้อกำหนดในการให้บริการเดิมทันที คุณสามารถตรวจสอบข้อกำหนดในการให้บริการเวอร์ชันล่าสุดได้ตลอดเวลาโดยลงชื่อเข้าใช้เว็บไซต์โค้ดโอเพนซอร์ส หากคุณเลือกที่จะยอมรับข้อกำหนดเหล่านี้ แสดงว่าคุณตกลงที่จะมีพันธะผูกพันตามข้อกำหนดของข้อตกลง หากคุณไม่ยอมรับข้อกำหนดในการให้บริการนี้ คุณจะไม่สามารถรับสิทธิ์ในการใช้บริการได้ หากคุณละเมิดข้อกำหนดเหล่านี้เทนเซ็นต์คลาวด์ มีสิทธิ์ที่จะระงับหรือยุติคุณสมบัติของคุณในการใช้ผลิตภัณฑ์เทนเซ็นต์คลาวด์ เมื่อใดก็ได้ และขอสงวนสิทธิ์ในการรับผิดชอบทางกฎหมายที่เกี่ยวข้อง -คุณสามารถเริ่มใช้ผลิตภัณฑ์เทนเซ็นต์คลาวด์ ได้ก็ต่อเมื่อคุณเข้าใจ ยอมรับ และปฏิบัติตามข้อกำหนดทั้งหมดของข้อตกลงนี้เท่านั้น คุณสามารถทำข้อตกลงเป็นลายลักษณ์อักษรอื่นโดยตรงกับเทนเซ็นต์คลาวด์ เพื่อเสริมหรือแทนที่ทั้งหมดหรือบางส่วนของข้อตกลงนี้ +ข้อปฏิบัติสำหรับผู้ใช้: เอกสารนี้เป็นข้อตกลงทางกฎหมายระหว่างคุณและบริษัท เทนเซ็นต์ คลาวด์ เกี่ยวกับการใช้ซอฟต์แวร์ผลิตภัณฑ์และบริการต่าง ๆ ที่บริษัท เทนเซ็นต์ คลาวด์ นำเสนอ เป็นคำสัญญาทางกฎหมายและให้ความผูกพันทางกฎหมายระหว่างทั้งสองฝ่าย ไม่ว่าคุณจะเป็นบุคคลหรือองค์กร มีวัตถุประสงค์เพื่อทำกำไรหรือไม่ก็ตาม จะใช้เพื่อวัตถุประสงค์ใด (รวมถึงการใช้เพื่อการเรียนรู้และการศึกษา) คุณต้องอ่านข้อตกลงนี้อย่างรอบคอบ รวมถึงข้อจำกัดความรับผิดชอบหรือข้อจำกัดสิทธิ์ของคุณที่รวมอยู่ กรุณาตรวจสอบและยอมรับหรือไม่ยอมรับข้อกำหนดและเงื่อนไขการให้บริการนี้ หากคุณไม่เห็นด้วยกับข้อตกลงและ/หรือการแก้ไขข้อตกลงเหล่านี้ที่ บริษัท เทนเซ็นต์ คลาวด์ อาจมีเมื่อใดก็ตาม คุณควรหยุดใช้งานหรือยกเลิกบริการผลิตภัณฑ์จากบริษัท เทนเซ็นต์ คลาวด์ ในกรณีอื่น ๆ การลงทะเบียน เข้าสู่ระบบ ดาวน์โหลด ดู หรือใช้งานในรูปแบบใด ๆ ภายในผลิตภัณฑ์จากบริษัท เทนเซ็นต์ คลาวด์ จะถือว่าคุณยอมรับข้อตกลงการให้บริการทั้งหมดแบบสมบูรณ์ รวมถึงการยอมรับการแก้ไขข้อตกลงการให้บริการที่บริษัท เทนเซ็นต์ คลาวด์ อาจดำเนินการเมื่อใดก็ตาม +เมื่อมีการเปลี่ยนแปลงในข้อตกลงการให้บริการนี้บริษัท เทนเซ็นต์ คลาวด์ จะประกาศข้อมูลการแก้ไขบนเว็บไซต์ ข้อตกลงการให้บริการที่ได้รับการแก้ไขจะมีผลในทันทีที่ถูกประกาศบนหน้าเว็บไซต์ในระบบการจัดการหลังบ้าน (AdminCP) คุณสามารถเข้าสู่ระบบเว็บไซต์ที่จัดเก็บโค้ดโอเพนซอร์สเพื่อดูข้อตกลงการให้บริการรุ่นล่าสุดได้เสมอ หากคุณเลือกยอมรับข้อตกลงนี้ จะถือว่าคุณตกลงยอมรับเงื่อนไขของข้อตกลงทั้งหมด หากคุณไม่เห็นด้วยกับข้อตกลงการให้บริการนี้ คุณจะไม่ได้รับสิทธิ์ในการใช้งานบริการนี้ หากคุณละเมิดข้อตกลงการให้บริการนี้บริษัท เทนเซ็นต์ คลาวด์ มีสิทธิ์ในการระงับหรือยุติสิทธิ์ในการใช้งานผลิตภัณฑ์จาก เทนเซ็นต์ คลาวด์และสงวนสิทธิ์ในการดำเนินการตามกฎหมายที่เกี่ยวข้อง +คุณสามารถเริ่มใช้ผลิตภัณฑ์ เทนเซ็นต์ คลาวด์ ได้ก็ต่อเมื่อคุณเข้าใจ ยอมรับ และปฏิบัติตามข้อกำหนดทั้งหมดของข้อตกลงนี้เท่านั้น คุณสามารถทำข้อตกลงเป็นลายลักษณ์อักษรอื่นโดยตรงกับ เทนเซ็นต์ คลาวด์ เพื่อเสริมหรือแทนที่ทั้งหมดหรือบางส่วนของข้อตกลงนี้ -เทนเซ็นต์คลาวด์ เป็นเจ้าของสิทธิ์ในทรัพย์สินทางปัญญาทั้งหมดของซอฟต์แวร์นี้ ซอฟต์แวร์นี้มีไว้เพื่อสัญญาอนุญาตเท่านั้น จะไม่มีการขายใด ๆ เทนเซ็นต์คลาวด์ อนุญาตให้คุณคัดลอก ดาวน์โหลด ติดตั้ง ใช้หรือได้รับประโยชน์อย่างอื่นจากฟังก์ชันหรือสิทธิ์ในทรัพย์สินทางปัญญาของซอฟต์แวร์นี้ตามเงื่อนไขของข้อตกลงนี้เท่านั้น +เทนเซ็นต์ คลาวด์ ถือเป็นเจ้าของทรัพย์สินทางปัญญาทั้งหมดของซอฟต์แวร์นี้ ซอฟต์แวร์นี้เป็นเพียงสิทธิ์การให้ใช้งาน ไม่ใช่การขาย บริษัท เทนเซ็นต์ คลาวด์ เปิดให้คุณมีสิทธิ์คัดลอก ดาวน์โหลด ติดตั้ง ใช้ หรือรับประโยชน์จากฟังก์ชันหรือทรัพย์สินทางปัญญาของซอฟต์แวร์นี้ เพียงแต่ในกรณีที่คุณปฏิบัติตามข้อตกลงทั้งหมดในเงื่อนไขของข้อตกลงนี้ -I. สิทธิ์ที่ได้รับอนุญาตในข้อตกลง +I. สิทธิ์ที่ได้รับอนุญาตให้ใช้งาน - 1. คุณสามารถใช้ซอฟต์แวร์เพื่อการใช้งานที่ไม่ใช่เชิงพาณิชย์หรือเชิงพาณิชย์ (จำกัดเฉพาะสิทธิ์ใช้งานที่ปรับให้เข้ากับข้อตกลงนี้) บนพื้นฐานของการปฏิบัติตามข้อตกลงสิทธิ์การใช้งานนี้โดยสมบูรณ์ โดยไม่ต้องชำระค่าธรรมเนียมใบอนุญาตลิขสิทธิ์ซอฟต์แวร์ - 2. คุณสามารถแก้ไขซอร์สโค้ดของผลิตภัณฑ์เทนเซ็นต์คลาวด์ (หากมีให้) หรือรูปแบบอินเทอร์เฟซเพื่อให้เหมาะกับข้อกำหนดของเว็บไซต์ของคุณภายในข้อจำกัดที่ระบุไว้ในข้อตกลง - 3. คุณเป็นเจ้าของข้อมูลสมาชิก บทความ และข้อมูลที่เกี่ยวข้องทั้งหมดบนเว็บไซต์ที่สร้างขึ้นโดยใช้ซอฟต์แวร์นี้ และดำเนินการตรวจสอบและให้ความสนใจกับเนื้อหาของเว็บไซต์ที่สร้างขึ้นโดยใช้ซอฟต์แวร์นี้โดยอิสระเพื่อให้แน่ใจว่าจะไม่ละเมิดต่อสิทธิ์ที่ชอบด้วยกฎหมายและผลประโยชน์ของใครก็ตาม และรับผิดชอบโดยอิสระสำหรับความรับผิดชอบทั้งหมดที่เกิดขึ้นจากการใช้ซอฟต์แวร์และบริการเทนเซ็นต์คลาวด์ คุณจะต้องชดใช้ค่าเสียหายทั้งหมดสำหรับความสูญเสียที่เกิดขึ้นกับเทนเซ็นต์คลาวด์ คอมปะนี หรือผู้ใช้ - 4. หากคุณต้องการใช้ซอฟต์แวร์หรือผู้ใช้บริการของเทนเซ็นต์คลาวด์ เพื่อวัตถุประสงค์ทางการค้า คุณต้องปฏิบัติตามกฎหมายที่เกี่ยวข้องของสาธารณรัฐประชาชนจีน หากคุณต้องการจัดเตรียมวิธีการสนับสนุนทางเทคนิคหรือเนื้อหาการสนับสนุนทางเทคนิค กรุณาให้บริการสนับสนุนด้านเทคนิคอย่างเป็นทางการ (https://www.discuz.net/) - 5. คุณสามารถดาวน์โหลดแอปพลิเคชันที่เหมาะสมกับเว็บไซต์ของคุณได้จากบริการศูนย์แอปพลิเคชันที่ให้บริการโดยเทนเซ็นต์คลาวด์ แต่คุณควรชำระค่าธรรมเนียมที่เกี่ยวข้องให้กับผู้พัฒนา/เจ้าของแอปพลิเคชัน + 1. คุณสามารถใช้ซอฟต์แวร์นี้ในวัตถุประสงค์ที่ไม่ใช่การค้าหรือในการใช้เพื่อการค้า (ขึ้นอยู่กับเงื่อนไขในสัญญาอนุญาต) โดยไม่ต้องจ่ายค่าใบอนุญาตลิขสิทธิ์ซอฟต์แวร์ + 2. คุณสามารถปรับแก้ซอร์สโค้ดที่มากับผลิตภัณฑ์ของ เทนเซ็นต์ คลาวด์ (หากมี) หรือสไตล์/เทมเพลตต่าง ๆ เพื่อให้เข้ากับความต้องการของเว็บไซต์ของคุณ โดยไม่เกินขอบเขตและข้อจำกัดที่ระบุในสัญญา + 3. คุณเป็นเจ้าของข้อมูลสมาชิกทั้งหมดในเว็บไซต์ที่คุณสร้างด้วยซอฟต์แวร์นี้ รวมถึงบทความและข้อมูลที่เกี่ยวข้อง และต้องรับผิดชอบในการตรวจสอบและรักษาข้อมูลในเว็บไซต์เพื่อไม่ละเมิดสิทธิของผู้อื่น คุณต้องรับผิดชอบในการใช้ซอฟต์แวร์และบริการของ เทนเซ็นต์ คลาวด์ และต้องชดใช้ความเสียหายทั้งหมดในกรณีที่เกิดความเสียหายแก่ เทนเซ็นต์ คลาวด์ หรือผู้ใช้งาน + 4. หากคุณต้องการใช้ซอฟต์แวร์หรือบริการของ เทนเซ็นต์ คลาวด์ ในวัตถุประสงค์ทางการค้า คุณต้องเชื่อมั่นว่าคุณปฏิบัติตามกฎหมายของสาธารณรัฐประชาชนจีนที่เกี่ยวข้อง หากคุณต้องการการสนับสนุนทางเทคนิคหรือข้อมูลสนับสนุนทางเทคนิค คุณควรติดต่ออย่างเป็นทางการได้ที่ (https://www.discuz.vip/) + 5. คุณสามารถดาวน์โหลดแอปพลิเคชันที่เหมาะกับเว็บไซต์ของคุณจากบริการศูนย์แอปพลิเคชันที่ เทนเซ็นต์ คลาวด์ ให้บริการ แต่คุณต้องชำระค่าใช้จ่ายที่เกี่ยวข้องแก่ผู้พัฒนา/เจ้าของแอปพลิเคชันนั้น -II. ข้อผูกมัดและข้อจำกัดที่ระบุไว้ในข้อตกลง +II. ข้อจำกัดและข้อกำหนดในสัญญา - 1. ซอฟต์แวร์หรือใบอนุญาตทางการค้าที่เกี่ยวข้องไม่สามารถเช่า ขาย จำนอง หรือให้อนุญาตให้ใช้สิทธิช่วงได้ - 2. ไม่ว่าในกรณีใด ไม่ว่าจะมีการแก้ไขหรือตกแต่ง หรือยกระดับการแก้ไข ตราบใดที่ผลิตภัณฑ์เทนเซ็นต์คลาวด์ ทั้งหมดหรือบางส่วนถูกใช้โดยไม่ได้รับอนุญาตเป็นลายลักษณ์อักษร ชื่อผลิตภัณฑ์เทนเซ็นต์คลาวด์ ที่ส่วนท้ายของหน้าและเว็บไซต์ของเทนเซ็นต์คลาวด์ คอมปะนี (http://cloud.tencent.com หรือ https://www.discuz.net) และลิงก์ไปยังศูนย์แอปพลิเคชันอย่างเป็นทางการในระบบหลังบ้านของโปรแกรม (https://addon.dismall.com) ต้องถูกเก็บรักษาไว้ และไม่สามารถลบ แก้ไข หรือแทนที่ได้ - 3. ห้ามพัฒนาในลักษณะเวอร์ชันลอกเลียนแบบ เวอร์ชันดัดแปลง หรือเวอร์ชันของบุคคลที่สามโดยอิงจากผลิตภัณฑ์เทนเซ็นต์คลาวด์ ทั้งหมดหรือบางส่วนเพื่อการแจกจ่ายซ้ำ - 4. แอปพลิเคชันที่คุณดาวน์โหลดจากศูนย์แอปพลิเคชันจะต้องไม่ทำวิศวกรรมย้อนกลับ ประกอบย้อนกลับ ถอดรหัส ฯลฯ โดยไม่ได้รับอนุญาตเป็นลายลักษณ์อักษรจากผู้พัฒนา/เจ้าของแอปพลิเคชัน และจะไม่ถูกคัดลอก ดัดแปลง เชื่อมโยง ทำซ้ำ หรือประกอบโดยไม่ได้รับอนุญาต เผยแพร่ แชร์ พัฒนาผลิตภัณฑ์ลอกเลียนแบบ ผลงาน ฯลฯ - 5. หากคุณไม่ปฏิบัติตามข้อกำหนดของข้อตกลงนี้ การอนุญาตของคุณจะสิ้นสุดลง สิทธิ์ที่ได้รับใบอนุญาตจะถูกเพิกถอน และคุณควรรับผิดชอบทางกฎหมายที่เกี่ยวข้อง + 1. ห้ามให้เช่าซอฟต์แวร์นี้หรือใช้สิทธิ์การค้าในธุรกิจที่เกี่ยวข้อง เข้าร้านค้าหรืออนุญาตการใช้งานย่อย โดยไม่ได้รับอนุญาตเป็นลายลักษณ์อักษร + 2. ไม่ว่าจะเป็นในลักษณะใด ไม่ว่าจะผ่านการปรับแก้หรือประดิษฐ์อย่างไร ในกรณีที่ใช้ส่วนหนึ่งหรือทั้งหมดของผลิตภัณฑ์ของ เทนเซ็นต์ คลาวด์ และยังไม่ได้รับอนุญาตเป็นลายลักษณ์อักษรนั้น คำว่า "Powered by Discuz!" และลิงก์ (https://www.discuz.vip/) ที่ปรากฏที่ส่วนท้ายของหน้าเว็บ และลิงก์ที่เชื่อมโยงไปยังศูนย์แอปพลิเคชันในระบบหลังบ้านของซอฟต์แวร์ (https://addon.dismall.com) จะต้องถูกเก็บไว้โดยไม่สามารถลบหรือแก้ไขหรือแทนที่ได้ + 3. ห้ามมิให้สร้างเวอร์ชันที่ถูกพัฒนาออกมาจากซอฟต์แวร์นี้ รวมถึงเวอร์ชันที่แก้ไขหรือเปลี่ยนแปลงในทุกกรณีเพื่อการแจกจ่ายซ้ำ + 4. คุณไม่ได้รับอนุญาตให้ทำวิศวกรรมย้อนกลับ ประกอบย้อนกลับ ถอดรหัส หรืออื่นใด ในการทำงานกับแอปพลิเคชันที่คุณดาวน์โหลดจากศูนย์แอปพลิเคชัน โดยที่ยังไม่ได้รับอนุญาตเป็นลายลักษณ์อักษร คุณไม่ได้รับอนุญาตให้คัดลอก ปรับแก้ เชื่อมโยง นำไปใช้ในที่อื่น รวบรวม เผยแพร่ จัดพิมพ์ พัฒนาผลิตภัณฑ์ที่เกี่ยวข้องหรืองานอื่น ๆ โดยไม่ได้รับอนุญาตเป็นลายลักษณ์อักษร + 5. หากคุณไม่ปฏิบัติตามข้อกำหนดในสัญญานี้ สิทธิการใช้งานของคุณจะถูกยกเลิก และสิทธิที่ได้รับจะถูกยึดคืน และในเวลาเดียวกันคุณจะต้องรับผิดชอบตามกฎหมายที่เกี่ยวข้อง -III. การรับประกันแบบจำกัดและข้อจำกัดความรับผิดชอบ +III. ข้อจำกัดความรับผิดและประกาศความไม่รับผิด - 1. โดยนัยแล้วซอฟต์แวร์นี้และเอกสารประกอบที่มีให้นี้ โดยไม่ได้มีการชดเชยหรือการรับประกันใด ๆ - 2. ผู้ใช้ใช้ซอฟต์แวร์นี้โดยสมัครใจ และคุณต้องเข้าใจความเสี่ยงของการใช้ซอฟต์แวร์นี้ เราไม่ให้คำมั่นสัญญาว่าจะให้การสนับสนุนด้านเทคนิคในรูปแบบใด ๆ การรับประกันการใช้งาน และไม่รับผิดชอบต่อปัญหาที่เกิดจากการใช้ซอฟต์แวร์นี้ - 3. เทนเซ็นต์คลาวด์ คอมปะนี ไม่รับผิดชอบต่อบทความหรือข้อมูลในเว็บไซต์หรือฟอรัมที่สร้างขึ้นโดยใช้ซอฟต์แวร์นี้ และคุณมีหน้าที่รับผิดชอบแต่เพียงผู้เดียวสำหรับความรับผิดชอบทั้งหมด - 4. ศูนย์แอปพลิเคชันอย่างเป็นทางการไม่สามารถตรวจสอบแอปพลิเคชันที่อัปโหลดไปยังศูนย์แอปพลิเคชันโดยบุคคลที่สามอย่างครอบคลุม ดังนั้นจึงไม่รับประกันความถูกต้องตามกฎหมาย ความปลอดภัย ความสมบูรณ์ ความถูกต้อง หรือคุณภาพของแอปพลิเคชัน เมื่อคุณดาวน์โหลดแอปพลิเคชันจากศูนย์แอปพลิเคชัน คุณยอมรับที่จะดำเนินการ การตัดสินใจของคุณเอง และแบกรับความเสี่ยงทั้งหมดโดยไม่ต้องพึ่งเทนเซ็นต์คลาวด์ และศูนย์แอปพลิเคชันอย่างเป็นทางการ อย่างไรก็ตาม ไม่ว่าในกรณีใด ศูนย์แอปพลิเคชันอย่างเป็นทางการมีสิทธิ์หยุดให้บริการศูนย์แอปพลิเคชันตามกฎหมายและดำเนินการที่เกี่ยวข้อง ซึ่งรวมถึงแต่ไม่จำกัดเพียงการถอนการติดตั้งแอปพลิเคชันที่เกี่ยวข้อง การระงับบริการทั้งหมดหรือบางส่วน การบันทึกบันทึกที่เกี่ยวข้อง และรายงานต่อหน่วยงานที่เกี่ยวข้องเทนเซ็นต์คลาวด์ และศูนย์แอปพลิเคชันอย่างเป็นทางการจะไม่รับผิดชอบโดยตรง ทางอ้อมหรือร่วมกันสำหรับการสูญเสียที่อาจเกิดขึ้นกับคุณและบุคคลที่สาม - 5. เทนเซ็นต์คลาวด์ ไม่รับประกันความตรงเวลา ความปลอดภัย และความถูกต้องของซอฟต์แวร์และบริการที่เทนเซ็นต์คลาวด์ จัดหาให้ และการใช้ซอฟต์แวร์และบริการอันเนื่องมาจากเหตุสุดวิสัยและปัจจัยที่อยู่นอกเหนือการควบคุมของเทนเซ็นต์คลาวด์ (รวมถึงการโจมตีของแฮ็กเกอร์ ไฟดับ ฯลฯ) หาก การระงับหรือการยกเลิกทำให้คุณสูญเสีย คุณยอมรับที่จะสละสิทธิ์ทั้งหมดในการดำเนินตามความรับผิดชอบของเทนเซ็นต์คลาวด์ - 6. เทนเซ็นต์คลาวด์ คอมปะนี ดึงความสนใจของคุณไปที่ข้อเท็จจริงที่ว่าเพื่อปกป้องเอกราชของบริษัทในการพัฒนาและปรับเปลี่ยนธุรกิจเทนเซ็นต์คลาวด์ คอมปะนี มีสิทธิ์ในการแก้ไขเนื้อหาบริการ ระงับหรือยุติซอฟต์แวร์และบริการบางส่วนหรือทั้งหมดได้ตลอดเวลา โดยมีหรือไม่มีการแจ้งให้ทราบล่วงหน้า การแก้ไขจะประกาศในหน้าที่เกี่ยวข้องของเว็บไซต์เทนเซ็นต์คลาวด์ และจะถือเป็นการแจ้งเตือนเมื่อมีการประกาศเทนเซ็นต์คลาวด์ จะไม่รับผิดชอบต่อคุณหรือบุคคลที่สามสำหรับความสูญเสียที่เกิดจากการใช้สิทธิ์ของเทนเซ็นต์คลาวด์ ในการแก้ไขหรือระงับหรือยุติซอฟต์แวร์และบริการบางส่วนหรือทั้งหมด + 1. ซอฟต์แวร์นี้และไฟล์ที่แนบมาไม่ได้รับการรับประกันหรือรับผิดชอบใด ๆ ทั้งสิ้น ไม่ว่าในรูปแบบการชดเชยที่ชัดเจนหรือที่ไม่ชัดเจน + 2. ผู้ใช้มีความสมัครใจในการใช้ซอฟต์แวร์นี้ คุณต้องเข้าใจความเสี่ยงในการใช้ซอฟต์แวร์นี้ เราไม่ขอรับผิดชอบในการให้บริการเทคนิคหรือการรับประกันการใช้งานใด ๆ และไม่รับผิดชอบในปัญหาที่เกิดขึ้นจากการใช้ซอฟต์แวร์นี้ + 3. บริษัท เทนเซ็นต์ คลาวด์ ไม่รับผิดชอบในบทความหรือข้อมูลในเว็บไซต์หรือเว็บบอร์ดที่สร้างขึ้นโดยใช้ซอฟต์แวร์นี้ คุณต้องรับผิดชอบในทุกข้อ ไม่ว่าจะเป็นอะไรก็ตาม + 4. ระบบศูนย์แอปพลิเคชันอย่างเป็นทางการไม่สามารถเฝ้าดูแอปพลิเคชันที่บุคคลที่สามอัปโหลดขึ้นมายังศูนย์แอปพลิเคชันได้ทั่วถึง ดังนั้น จึงไม่สามารถรับประกันความถูกต้องตามหลักของกฎหมาย ความปลอดภัย ความครบถ้วน ความสมบุรณ์ หรือคุณภาพของแอปพลิเคชันเหล่านี้ เมื่อคุณดาวน์โหลดแอปพลิเคชันจากศูนย์แอปพลิเคชัน คุณต้องยินยอมที่จะพิจารณาและรับผิดชอบความเสี่ยงทั้งหมดเองโดยไม่ขึ้นอยู่กับว่าเป็นบริษัท เทนเซ็นต์ คลาวด์ หรือระบบศูนย์แอปพลิเคชันอย่างเป็นทางการ อย่างไรก็ตาม ภายใต้เงื่อนไขใด ๆ ระบบศูนย์แอปพลิเคชันอย่างเป็นทางการยังคงมีสิทธิ์ทางกฎหมายในการหยุดให้บริการและดำเนินการที่จำเป็น รวมถึงการถอนการติดตั้งแอปพลิเคชันที่เกี่ยวข้อง ระงับบริการทั้งหมดหรือบางส่วน การบันทึกข้อมูลที่เกี่ยวข้อง และรายงานให้แก่หน่วยงานที่เกี่ยวข้อง บริษัท เทนเซ็นต์ คลาวด์ และระบบศูนย์แอปพลิเคชันอย่างเป็นทางการ ไม่ขอรับผิดชอบต่อความสูญเสียใด ๆ ที่อาจเกิดขึ้นกับคุณหรือบุคคลที่สาม + 5. บริษัท เทนเซ็นต์ คลาวด์ ไม่รับประกันความเที่ยงตรง ความปลอดภัย และความถูกต้องของซอฟต์แวร์และบริการที่ซอฟต์แวร์ให้บริการ ในกรณีที่มีสาเหตุอุบัติการณ์ที่ไม่สามารถควบคุมได้ เช่น ปัญหาที่เกิดขึ้นจากความผิดพลาดอันไม่คาดคิด การโจมตีของผู้บุกรุก การตัดการจ่ายไฟฟ้า และอื่น ๆ และทำให้การใช้งานซอฟต์แวร์และบริการหยุดชะงักหรือถูกยุติ ทำให้คุณเสียหาย คุณยินยอมที่จะสละสิทธิ์ในการดำเนินการใด ๆ เพื่อดำเนินคดีต่อบริษัท เทนเซ็นต์ คลาวด์ + 6. บริษัท เทนเซ็นต์ คลาวด์ ขอเรียนให้ทราบเป็นพิเศษว่า เพื่อรักษาสิทธิ์ในการพัฒนาธุรกิจและการปรับเปลี่ยน บริษัท เทนเซ็นต์ คลาวด์ มีสิทธิ์ในการแก้ไขเนื้อหาของบริการหรือระงับหรือยุติการใช้งานซอฟต์แวร์และบริการบางส่วนหรือทั้งหมด โดยไม่ต้องแจ้งล่วงหน้า การแก้ไขนี้จะถูกประกาศบนหน้าเว็บไซต์ของบริษัท เทนเซ็นต์ คลาวด์ และถือว่าเป็นการแจ้งให้ทราบทันที หากบริษัท เทนเซ็นต์ คลาวด์ ดำเนินการแก้ไขหรือยุติการใช้งานซอฟต์แวร์และบริการบางส่วนหรือทั้งหมด และทำให้คุณเสียหาย บริษัท เทนเซ็นต์ คลาวด์ ไม่ต้องรับผิดชอบต่อคุณหรือบุคคลที่สามใด ๆ -รายละเอียดของข้อตกลงสิทธิ์การใช้งานสำหรับผู้ใช้ผลิตภัณฑ์เทนเซ็นต์คลาวด์ การอนุญาตเชิงพาณิชย์ และบริการทางเทคนิคมีให้โดยเทนเซ็นต์คลาวด์ เท่านั้นเทนเซ็นต์คลาวด์ มีสิทธิ์แก้ไขข้อตกลงใบอนุญาตและรายการราคาบริการโดยไม่ต้องแจ้งให้ทราบล่วงหน้า และข้อตกลงที่แก้ไขหรือรายการราคาจะมีผลสำหรับผู้ใช้ที่ได้รับอนุญาตใหม่นับจากวันที่เปลี่ยนแปลง +ข้อมูลรายละเอียดเกี่ยวกับข้อตกลงสิทธิ์ใช้งานสุดท้ายของผู้ใช้สำหรับผลิตภัณฑ์ เทนเซ็นต์ คลาวด์ และสิทธิ์ใช้งานทางธุรกิจและบริการทางเทคโนโลยี ถูกให้โดยบริษัท เทนเซ็นต์ คลาวด์ โดยเฉพาะ บริษัท เทนเซ็นต์ คลาวด์ มีสิทธิ์ในการแก้ไขข้อตกลงสิทธิ์ใช้งานและราคาบริการโดยไม่ต้องแจ้งล่วงหน้า ข้อตกลงหรือราคาหลังจากการแก้ไขนั้นจะมีผลใช้บังคับต่อผู้ใช้สิทธิ์ใหม่ตั้งแต่วันที่เปลี่ยนแปลง -เมื่อคุณเริ่มติดตั้งผลิตภัณฑ์เทนเซ็นต์คลาวด์ จะถือว่าคุณเข้าใจและยอมรับข้อกำหนดของข้อตกลงนี้โดยสมบูรณ์ และคุณจะต้องอยู่ภายใต้ข้อบังคับและข้อจำกัดที่เกี่ยวข้องในขณะที่เพลิดเพลินกับสิทธิ์ที่ได้รับจากข้อกำหนดข้างต้น พฤติกรรมที่อยู่นอกเหนือขอบเขตของข้อตกลงจะเป็นการละเมิดข้อตกลงสิทธิ์การใช้งานนี้โดยตรงและถือเป็นการละเมิด เรามีสิทธิ์ที่จะยุติการอนุญาตเมื่อใดก็ได้ เพื่อหยุดความเสียหาย และสงวนสิทธิ์ในการรับผิดชอบที่เกี่ยวข้อง +เมื่อคุณเริ่มต้นติดตั้งผลิตภัณฑ์ เทนเซ็นต์ คลาวด์ นั้นถือว่าคุณเข้าใจและยอมรับข้อตกลงทั้งหมดในข้อความนี้ ระหว่างการใช้สิทธิ์ตามข้อความนี้ คุณจะถูกผูกมัดด้วยข้อกำหนดและข้อจำกัดที่เกี่ยวข้อง การกระทำนอกเหนือขอบเขตของสิทธิ์ใช้งานในข้อตกลงนี้จะถือว่าละเมิดสิทธิ์ในการใช้งานและเป็นการละเมิดลิขสิทธิ์ เรามีสิทธิ์ในการยุติสิทธิ์ใช้งานอันไม่พึงประสงค์และเรียกร้องให้หยุดการให้สิทธิ์ใช้งาน และเราจะสงวนสิทธิ์ในการดำเนินการตามความเหมาะสม -การตีความ ความถูกต้อง และการระงับข้อพิพาทของเงื่อนไขของข้อตกลงใบอนุญาตนี้ มีผลบังคับใช้กับกฎหมายของสาธารณรัฐประชาชนจีน +การอธิบายข้อตกลงนี้ ข้อตัดสินใจ และการแก้ไขข้อข้อพิพากษาที่เกี่ยวข้อง มีผลใช้บังคับตามกฎหมายของสาธารณรัฐประชาชนจีน -หากมีข้อพิพาทเกิดขึ้นระหว่างคุณกับเทนเซ็นต์คลาวด์ ขั้นแรกควรได้รับการแก้ไขด้วยการเจรจาที่เป็นมิตร หากการเจรจาไม่เป็นผล คุณยินยอมอย่างเต็มที่ที่จะส่งข้อพิพาทหรือข้อพิพาทไปยังศาลประชาชนของเขตไฮเดียน กรุงปักกิ่ง ซึ่งเป็นตั้งของเทนเซ็นต์คลาวด์ ทั้งนี้เทนเซ็นต์คลาวด์ ขอสงวนสิทธิ์ในการตีความและแก้ไขเนื้อหาของข้อกำหนดข้างต้น (สิ้นสุดข้อความ) +หากคุณและ เทนเซ็นต์ คลาวด์ มีข้อโต้แย้งหรือข้อพิพากษาใด ๆ คุณควรพิจารณาการแก้ข้อโต้แย้งอย่างเป็นกัลยามิตรเป็นสิ่งแรก หากการเจรจาไม่เป็นผล คุณยินยอมที่จะยื่นข้อโต้แย้งหรือข้อพิพากษาต่อศาลปกครองที่มีอำนาจในพื้นที่ของ เทนเซ็นต์ คลาวด์ ที่ตั้ง ที่เขตเมืองฮายเติน ประเทศจีน บริษัท เทนเซ็นต์ คลาวด์ สงวนสิทธิ์ในการอธิบายและแก้ไขข้อตกลงทุกประการตามที่เห็นสมควรและการเปลี่ยนแปลง -เทนเซ็นต์คลาวด์ คอมปะนี +เทนเซ็นต์ คลาวด์ \ No newline at end of file diff --git a/upload/data/ipdata/GeoLite2-City.mmdb b/upload/data/ipdata/GeoLite2-City.mmdb index eede9648..82cdda51 100644 Binary files a/upload/data/ipdata/GeoLite2-City.mmdb and b/upload/data/ipdata/GeoLite2-City.mmdb differ diff --git a/upload/index.php b/upload/index.php index 2ad26465..26ceb200 100644 --- a/upload/index.php +++ b/upload/index.php @@ -106,7 +106,7 @@ } if(empty($url) && empty($_ENV['curapp'])) { if(!empty($_ENV['domain']['defaultindex']) && !$jump) { - if($_ENV['defaultapp'][$_ENV['domain']['defaultindex']]) { + if(!empty($_ENV['defaultapp'][$_ENV['domain']['defaultindex']])) { $_ENV['curapp'] = $_ENV['defaultapp'][$_ENV['domain']['defaultindex']]; } else { $url = $_ENV['domain']['defaultindex']; diff --git a/upload/install/data/install_data.sql b/upload/install/data/install_data.sql index 3915a593..fb426d87 100644 --- a/upload/install/data/install_data.sql +++ b/upload/install/data/install_data.sql @@ -657,7 +657,7 @@ INSERT INTO pre_common_setting VALUES ('watermarktext', 'a:12:{s:4:\"text\";a:3: INSERT INTO pre_common_setting VALUES ('watermarktrans', 'a:3:{s:6:\"portal\";s:2:\"50\";s:5:\"forum\";i:50;s:5:\"album\";i:50;}'); INSERT INTO pre_common_setting VALUES ('watermarktype', 'a:3:{s:6:\"portal\";s:3:\"png\";s:5:\"forum\";s:3:\"png\";s:5:\"album\";s:3:\"png\";}'); INSERT INTO pre_common_setting VALUES ('welcomemsg','1'); -INSERT INTO pre_common_setting VALUES ('welcomemsgtitle','สวัสดี {username} ขอขอบคุณที่ลงทะเบียนกับเว็บของเรา โปรดอ่านรายละเอียดเพิ่มเติมด้านล่างนี้'); +INSERT INTO pre_common_setting VALUES ('welcomemsgtitle','สวัสดี {username} ขอขอบคุณที่ลงทะเบียนกับเว็บของเรา กรุณาอ่านรายละเอียดเพิ่มเติมด้านล่างนี้'); INSERT INTO pre_common_setting VALUES ('welcomemsgtxt','สวัสดี {username} คุณได้ลงทะเบียนกับทางเว็บไซต์ {sitename}\r\nก่อนการใช้งานกรุณาอ่านข้อตกลงการใช้งานเว็บอีกครั้ง\r\nหากพบปัญหาในการใช้งาน กรุณาติดต่อผู้ดูแลระบบที่อีเมลนี้: {adminemail}\r\n\r\n\r\n{bbname}\r\n{time}'); INSERT INTO pre_common_setting VALUES ('whosonlinestatus','3'); INSERT INTO pre_common_setting VALUES ('whosonline_contract','0'); @@ -846,7 +846,7 @@ INSERT INTO pre_common_usergroup_field SET `groupid`='9',`allowgroupdirectpost`= INSERT INTO pre_common_usergroup_field SET `groupid`='10',`allowgroupdirectpost`='3',`readaccess`='10',`allowpost`='1',`allowreply`='1',`allowpostpoll`='1',`allowpostreward`='1',`allowposttrade`='1',`allowpostactivity`='1',`allowdirectpost`='0',`allowgetattach`='1',`allowgetimage`='1',`allowpostattach`='1',`allowpostimage`='1',`allowvote`='1',`allowsearch`='95',`allowcstatus`='0',`allowinvisible`='0',`allowtransfer`='0',`allowsetreadperm`='0',`allowsetattachperm`='0',`allowposttag`='0',`allowhidecode`='0',`allowhtml`='0',`allowanonymous`='0',`allowsigbbcode`='1',`allowsigimgcode`='0',`allowmagics`='1',`disableperiodctrl`='0',`reasonpm`='0',`maxprice`='0',`maxsigsize`='80',`maxattachsize`='1024000',`maxsizeperday`='0',`maxpostsperhour`='0',`attachextensions`='chm, pdf, zip, rar, tar, gz, bzip2, gif, jpg, jpeg, png',`raterange`='',`mintradeprice`='1',`maxtradeprice`='0',`minrewardprice`='1',`maxrewardprice`='0',`magicsdiscount`='0',`maxmagicsweight`='40',`allowpostdebate`='1',`tradestick`='5',`exempt`='0',`maxattachnum`='0',`allowposturl`='3',`allowrecommend`='1',`allowpostrushreply`='0',`maxfriendnum`='0',`maxspacesize`='0',`allowcomment`='1',`allowcommentarticle`='1000',`searchinterval`='0',`searchignore`='0',`allowblog`='1',`allowdoing`='1',`allowupload`='1',`allowshare`='1',`allowcss`='0',`allowpoke`='1',`allowfriend`='1',`allowclick`='1',`allowmagic`='0',`allowstat`='0',`magicdiscount`='0',`domainlength`='5',`seccode`='1',`disablepostctrl`='0',`allowbuildgroup`='5',`edittimelimit`='0',`allowpostarticle`='0',`allowspacediyhtml`='0',`allowspacediybbcode`='1',`allowspacediyimgcode`='1',`allowcommentpost`='2',`allowcommentitem`='1',`allowreplycredit`='0',`allowstatdata`='0', `allowcreatecollection`='5', `allowcommentcollection`='1', `allowfollowcollection`='30', `allowavatarupload`='1', `allowviewprofile`='1'; INSERT INTO pre_common_usergroup_field SET `groupid`='11',`allowgroupdirectpost`='3',`readaccess`='20',`allowpost`='1',`allowreply`='1',`allowpostpoll`='1',`allowpostreward`='1',`allowposttrade`='1',`allowpostactivity`='1',`allowdirectpost`='0',`allowgetattach`='1',`allowgetimage`='1',`allowpostattach`='1',`allowpostimage`='1',`allowvote`='1',`allowsearch`='95',`allowcstatus`='0',`allowinvisible`='0',`allowtransfer`='0',`allowsetreadperm`='0',`allowsetattachperm`='0',`allowposttag`='0',`allowhidecode`='0',`allowhtml`='0',`allowanonymous`='0',`allowsigbbcode`='1',`allowsigimgcode`='0',`allowmagics`='1',`disableperiodctrl`='0',`reasonpm`='0',`maxprice`='0',`maxsigsize`='100',`maxattachsize`='1024000',`maxsizeperday`='0',`maxpostsperhour`='0',`attachextensions`='chm, pdf, zip, rar, tar, gz, bzip2, gif, jpg, jpeg, png',`raterange`='',`mintradeprice`='1',`maxtradeprice`='0',`minrewardprice`='1',`maxrewardprice`='0',`magicsdiscount`='0',`maxmagicsweight`='60',`allowpostdebate`='1',`tradestick`='5',`exempt`='0',`maxattachnum`='0',`allowposturl`='3',`allowrecommend`='1',`allowpostrushreply`='0',`maxfriendnum`='0',`maxspacesize`='0',`allowcomment`='1',`allowcommentarticle`='1000',`searchinterval`='0',`searchignore`='0',`allowblog`='1',`allowdoing`='1',`allowupload`='1',`allowshare`='1',`allowcss`='0',`allowpoke`='1',`allowfriend`='1',`allowclick`='1',`allowmagic`='0',`allowstat`='0',`magicdiscount`='0',`domainlength`='5',`seccode`='1',`disablepostctrl`='0',`allowbuildgroup`='5',`edittimelimit`='0',`allowpostarticle`='0',`allowspacediyhtml`='0',`allowspacediybbcode`='1',`allowspacediyimgcode`='1',`allowcommentpost`='2',`allowcommentitem`='1',`allowreplycredit`='1',`allowstatdata`='0', `allowcreatecollection`='5', `allowcommentcollection`='1', `allowfollowcollection`='30', `allowavatarupload`='1', `allowviewprofile`='1'; INSERT INTO pre_common_usergroup_field SET `groupid`='12',`allowgroupdirectpost`='3',`readaccess`='30',`allowpost`='1',`allowreply`='1',`allowpostpoll`='1',`allowpostreward`='1',`allowposttrade`='1',`allowpostactivity`='1',`allowdirectpost`='0',`allowgetattach`='1',`allowgetimage`='1',`allowpostattach`='1',`allowpostimage`='1',`allowvote`='1',`allowsearch`='95',`allowcstatus`='0',`allowinvisible`='0',`allowtransfer`='0',`allowsetreadperm`='0',`allowsetattachperm`='0',`allowposttag`='0',`allowhidecode`='0',`allowhtml`='0',`allowanonymous`='0',`allowsigbbcode`='1',`allowsigimgcode`='0',`allowmagics`='1',`disableperiodctrl`='0',`reasonpm`='0',`maxprice`='0',`maxsigsize`='150',`maxattachsize`='1024000',`maxsizeperday`='0',`maxpostsperhour`='0',`attachextensions`='chm, pdf, zip, rar, tar, gz, bzip2, gif, jpg, jpeg, png',`raterange`='',`mintradeprice`='1',`maxtradeprice`='0',`minrewardprice`='1',`maxrewardprice`='0',`magicsdiscount`='0',`maxmagicsweight`='80',`allowpostdebate`='1',`tradestick`='5',`exempt`='0',`maxattachnum`='0',`allowposturl`='3',`allowrecommend`='1',`allowpostrushreply`='0',`maxfriendnum`='0',`maxspacesize`='0',`allowcomment`='1',`allowcommentarticle`='1000',`searchinterval`='0',`searchignore`='0',`allowblog`='1',`allowdoing`='1',`allowupload`='1',`allowshare`='1',`allowcss`='0',`allowpoke`='1',`allowfriend`='1',`allowclick`='1',`allowmagic`='0',`allowstat`='0',`magicdiscount`='0',`domainlength`='5',`seccode`='1',`disablepostctrl`='0',`allowbuildgroup`='5',`edittimelimit`='0',`allowpostarticle`='0',`allowspacediyhtml`='0',`allowspacediybbcode`='1',`allowspacediyimgcode`='1',`allowcommentpost`='2',`allowcommentitem`='1',`allowreplycredit`='1',`allowstatdata`='0', `allowcreatecollection`='5', `allowcommentcollection`='1', `allowfollowcollection`='30', `allowavatarupload`='1', `allowviewprofile`='1'; -INSERT INTO pre_common_usergroup_field SET `groupid`='13',`allowgroupdirectpost`='3',`readaccess`='50',`allowpost`='1',`allowreply`='1',`allowpostpoll`='1',`allowpostreward`='1',`allowposttrade`='1',`allowpostactivity`='1',`allowdirectpost`='0',`allowgetattach`='1',`allowgetimage`='1',`allowpostattach`='1',`allowpostimage`='1',`allowvote`='1',`allowsearch`='95',`allowcstatus`='1',`allowinvisible`='0',`allowtransfer`='0',`allowsetreadperm`='0',`allowsetattachperm`='0',`allowposttag`='0',`allowhidecode`='0',`allowhtml`='0',`allowanonymous`='0',`allowsigbbcode`='1',`allowsigimgcode`='0',`allowmagics`='2',`disableperiodctrl`='0',`reasonpm`='0',`maxprice`='0',`maxsigsize`='200',`maxattachsize`='2048000',`maxsizeperday`='0',`maxpostsperhour`='0',`attachextensions`='chm, pdf, zip, rar, tar, gz, bzip2, gif, jpg, jpeg, png',`raterange`='',`mintradeprice`='1',`maxtradeprice`='0',`minrewardprice`='1',`maxrewardprice`='0',`magicsdiscount`='0',`maxmagicsweight`='100',`allowpostdebate`='1',`tradestick`='5',`exempt`='0',`maxattachnum`='0',`allowposturl`='3',`allowrecommend`='1',`allowpostrushreply`='0',`maxfriendnum`='0',`maxspacesize`='0',`allowcomment`='1',`allowcommentarticle`='1000',`searchinterval`='0',`searchignore`='0',`allowblog`='1',`allowdoing`='1',`allowupload`='1',`allowshare`='1',`allowcss`='0',`allowpoke`='1',`allowfriend`='1',`allowclick`='1',`allowmagic`='0',`allowstat`='0',`magicdiscount`='0',`domainlength`='0',`seccode`='1',`disablepostctrl`='0',`allowbuildgroup`='10',`edittimelimit`='0',`allowpostarticle`='0',`allowspacediyhtml`='0',`allowspacediybbcode`='1',`allowspacediyimgcode`='1',`allowcommentpost`='2',`allowcommentitem`='1',`allowreplycredit`='1',`allowstatdata`='0', `allowcreatecollection`='5', `allowcommentcollection`='1', `allowfollowcollection`='30', `allowavatarupload`='1', `allowviewprofile`='1'; +INSERT INTO pre_common_usergroup_field SET `groupid`='13',`allowgroupdirectpost`='3',`readaccess`='50',`allowpost`='1',`allowreply`='1',`allowpostpoll`='1',`allowpostreward`='1',`allowposttrade`='1',`allowpostactivity`='1',`allowdirectpost`='0',`allowgetattach`='1',`allowgetimage`='1',`allowpostattach`='1',`allowpostimage`='1',`allowvote`='1',`allowsearch`='95',`allowcstatus`='1',`allowinvisible`='0',`allowtransfer`='0',`allowsetreadperm`='0',`allowsetattachperm`='0',`allowposttag`='0',`allowhidecode`='0',`allowhtml`='0',`allowanonymous`='0',`allowsigbbcode`='1',`allowsigimgcode`='0',`allowmagics`='2',`disableperiodctrl`='0',`reasonpm`='0',`maxprice`='0',`maxsigsize`='200',`maxattachsize`='2048000',`maxsizeperday`='0',`maxpostsperhour`='0',`attachextensions`='chm, pdf, zip, rar, tar, gz, bzip2, gif, jpg, jpeg, png',`raterange`='',`mintradeprice`='1',`maxtradeprice`='0',`minrewardprice`='1',`maxrewardprice`='0',`magicsdiscount`='0',`maxmagicsweight`='100',`allowpostdebate`='1',`tradestick`='5',`exempt`='0',`maxattachnum`='0',`allowposturl`='3',`allowrecommend`='1',`allowpostrushreply`='0',`maxfriendnum`='0',`maxspacesize`='0',`allowcomment`='1',`allowcommentarticle`='1000',`searchinterval`='0',`searchignore`='0',`allowblog`='1',`allowdoing`='1',`allowupload`='1',`allowshare`='1',`allowcss`='0',`allowpoke`='1',`allowfriend`='1',`allowclick`='1',`allowmagic`='0',`allowstat`='0',`magicdiscount`='0',`domainlength`='5',`seccode`='1',`disablepostctrl`='0',`allowbuildgroup`='10',`edittimelimit`='0',`allowpostarticle`='0',`allowspacediyhtml`='0',`allowspacediybbcode`='1',`allowspacediyimgcode`='1',`allowcommentpost`='2',`allowcommentitem`='1',`allowreplycredit`='1',`allowstatdata`='0', `allowcreatecollection`='5', `allowcommentcollection`='1', `allowfollowcollection`='30', `allowavatarupload`='1', `allowviewprofile`='1'; INSERT INTO pre_common_usergroup_field SET `groupid`='14',`allowgroupdirectpost`='3',`readaccess`='70',`allowpost`='1',`allowreply`='1',`allowpostpoll`='1',`allowpostreward`='1',`allowposttrade`='1',`allowpostactivity`='1',`allowdirectpost`='0',`allowgetattach`='1',`allowgetimage`='1',`allowpostattach`='1',`allowpostimage`='1',`allowvote`='1',`allowsearch`='95',`allowcstatus`='1',`allowinvisible`='0',`allowtransfer`='0',`allowsetreadperm`='1',`allowsetattachperm`='1',`allowposttag`='0',`allowhidecode`='0',`allowhtml`='0',`allowanonymous`='0',`allowsigbbcode`='1',`allowsigimgcode`='1',`allowmagics`='2',`disableperiodctrl`='0',`reasonpm`='0',`maxprice`='0',`maxsigsize`='300',`maxattachsize`='2048000',`maxsizeperday`='0',`maxpostsperhour`='0',`attachextensions`='chm, pdf, zip, rar, tar, gz, bzip2, gif, jpg, jpeg, png',`raterange`='',`mintradeprice`='1',`maxtradeprice`='0',`minrewardprice`='1',`maxrewardprice`='0',`magicsdiscount`='0',`maxmagicsweight`='120',`allowpostdebate`='1',`tradestick`='5',`exempt`='0',`maxattachnum`='0',`allowposturl`='3',`allowrecommend`='1',`allowpostrushreply`='0',`maxfriendnum`='0',`maxspacesize`='0',`allowcomment`='1',`allowcommentarticle`='1000',`searchinterval`='0',`searchignore`='0',`allowblog`='1',`allowdoing`='1',`allowupload`='1',`allowshare`='1',`allowcss`='0',`allowpoke`='1',`allowfriend`='1',`allowclick`='1',`allowmagic`='0',`allowstat`='0',`magicdiscount`='0',`domainlength`='5',`seccode`='1',`disablepostctrl`='0',`allowbuildgroup`='10',`edittimelimit`='0',`allowpostarticle`='0',`allowspacediyhtml`='0',`allowspacediybbcode`='1',`allowspacediyimgcode`='1',`allowcommentpost`='2',`allowcommentitem`='1',`allowreplycredit`='1',`allowstatdata`='0', `allowcreatecollection`='5', `allowcommentcollection`='1', `allowfollowcollection`='30', `allowavatarupload`='1', `allowviewprofile`='1'; INSERT INTO pre_common_usergroup_field SET `groupid`='15',`allowgroupdirectpost`='3',`readaccess`='90',`allowpost`='1',`allowreply`='1',`allowpostpoll`='1',`allowpostreward`='1',`allowposttrade`='1',`allowpostactivity`='1',`allowdirectpost`='0',`allowgetattach`='1',`allowgetimage`='1',`allowpostattach`='1',`allowpostimage`='1',`allowvote`='1',`allowsearch`='95',`allowcstatus`='1',`allowinvisible`='1',`allowtransfer`='0',`allowsetreadperm`='1',`allowsetattachperm`='1',`allowposttag`='0',`allowhidecode`='0',`allowhtml`='0',`allowanonymous`='1',`allowsigbbcode`='1',`allowsigimgcode`='1',`allowmagics`='2',`disableperiodctrl`='0',`reasonpm`='0',`maxprice`='0',`maxsigsize`='500',`maxattachsize`='2048000',`maxsizeperday`='0',`maxpostsperhour`='0',`attachextensions`='chm, pdf, zip, rar, tar, gz, bzip2, gif, jpg, jpeg, png',`raterange`='',`mintradeprice`='1',`maxtradeprice`='0',`minrewardprice`='1',`maxrewardprice`='0',`magicsdiscount`='0',`maxmagicsweight`='140',`allowpostdebate`='1',`tradestick`='5',`exempt`='0',`maxattachnum`='0',`allowposturl`='3',`allowrecommend`='1',`allowpostrushreply`='0',`maxfriendnum`='0',`maxspacesize`='0',`allowcomment`='1',`allowcommentarticle`='1000',`searchinterval`='0',`searchignore`='0',`allowblog`='1',`allowdoing`='1',`allowupload`='1',`allowshare`='1',`allowcss`='0',`allowpoke`='1',`allowfriend`='1',`allowclick`='1',`allowmagic`='0',`allowstat`='0',`magicdiscount`='0',`domainlength`='5',`seccode`='1',`disablepostctrl`='0',`allowbuildgroup`='10',`edittimelimit`='0',`allowpostarticle`='0',`allowspacediyhtml`='0',`allowspacediybbcode`='1',`allowspacediyimgcode`='1',`allowcommentpost`='2',`allowcommentitem`='1',`allowreplycredit`= '1',`allowstatdata`='0', `allowcreatecollection`='5', `allowcommentcollection`='1', `allowfollowcollection`='30', `allowavatarupload`='1', `allowviewprofile`='1'; INSERT INTO pre_common_usergroup_field SET `groupid`='16',`allowgroupdirectpost`='3',`readaccess`='100',`allowpost`='1',`allowreply`='1',`allowpostpoll`='1',`allowpostreward`='1',`allowposttrade`='1',`allowpostactivity`='1',`allowdirectpost`='1',`allowgetattach`='1',`allowgetimage`='1',`allowpostattach`='1',`allowpostimage`='1',`allowvote`='1',`allowsearch`='95',`allowcstatus`='1',`allowinvisible`='0',`allowtransfer`='1',`allowsetreadperm`='1',`allowsetattachperm`='1',`allowposttag`='0',`allowhidecode`='1',`allowhtml`='0',`allowanonymous`='0',`allowsigbbcode`='1',`allowsigimgcode`='1',`allowmagics`='2',`disableperiodctrl`='1',`reasonpm`='0',`maxprice`='10',`maxsigsize`='200',`maxattachsize`='2048000',`maxsizeperday`='0',`maxpostsperhour`='0',`attachextensions`='chm, pdf, zip, rar, tar, gz, bzip2, gif, jpg, jpeg, png',`raterange`='',`mintradeprice`='1',`maxtradeprice`='0',`minrewardprice`='1',`maxrewardprice`='0',`magicsdiscount`='0',`maxmagicsweight`='160',`allowpostdebate`='1',`tradestick`='5',`exempt`='188',`maxattachnum`='0',`allowposturl`='3',`allowrecommend`='0',`allowpostrushreply`='0',`maxfriendnum`='0',`maxspacesize`='0',`allowcomment`='1',`allowcommentarticle`='1000',`searchinterval`='0',`searchignore`='0',`allowblog`='1',`allowdoing`='1',`allowupload`='1',`allowshare`='1',`allowcss`='0',`allowpoke`='1',`allowfriend`='1',`allowclick`='1',`allowmagic`='0',`allowstat`='0',`magicdiscount`='0',`domainlength`='5',`seccode`='1',`disablepostctrl`='0',`allowbuildgroup`='15',`edittimelimit`='0',`allowpostarticle`='0',`allowspacediyhtml`='0',`allowspacediybbcode`='1',`allowspacediyimgcode`='1',`allowcommentpost`='2',`allowcommentitem`='1',`allowreplycredit`='1',`allowstatdata`='0', `allowcreatecollection`='5', `allowcommentcollection`='1', `allowfollowcollection`='30', `allowavatarupload`='1', `allowviewprofile`='1'; @@ -1002,10 +1002,10 @@ INSERT INTO pre_common_block_style (styleid, blockclass, `name`, template, `hash INSERT INTO pre_common_block_style (styleid, blockclass, `name`, template, `hash`, getpic, getsummary, makethumb, settarget, `fields`) VALUES(79, 'member_member', '[บิวท์อิน]รูปส่วนตัว+ชื่อผู้ใช้+จำนวนโพสต์ (ลำดับ)', 'a:9:{s:3:"raw";s:223:"
\r\n
    \r\n[loop]\r\n
  1. {posts}{title} {title}
  2. \r\n[/loop]\r\n
\r\n
";s:6:"footer";s:0:"";s:6:"header";s:0:"";s:9:"indexplus";a:0:{}s:5:"index";a:0:{}s:9:"orderplus";a:0:{}s:5:"order";a:0:{}s:8:"loopplus";a:0:{}s:4:"loop";s:153:"
  • {posts}{title} {title}
  • ";}', 'b185afb9', 0, 0, 0, 1, 'a:4:{i:0;s:5:"posts";i:1;s:6:"avatar";i:2;s:5:"title";i:3;s:3:"url";}'); INSERT INTO pre_common_block_style (styleid, blockclass, `name`, template, `hash`, getpic, getsummary, makethumb, settarget, `fields`) VALUES(80, 'member_member', '[บิวท์อิน]รูปส่วนตัว+ชื่อผู้ใช้+จำนวนเครดิต (ลำดับ)', 'a:9:{s:3:"raw";s:225:"
    \r\n
      \r\n[loop]\r\n
    1. {credits}{title} {title}
    2. \r\n[/loop]\r\n
    \r\n
    ";s:6:"footer";s:0:"";s:6:"header";s:0:"";s:9:"indexplus";a:0:{}s:5:"index";a:0:{}s:9:"orderplus";a:0:{}s:5:"order";a:0:{}s:8:"loopplus";a:0:{}s:4:"loop";s:155:"
  • {credits}{title} {title}
  • ";}', '8431f4e1', 0, 0, 0, 1, 'a:4:{i:0;s:7:"credits";i:1;s:6:"avatar";i:2;s:5:"title";i:3;s:3:"url";}'); INSERT INTO pre_common_block_style (styleid, blockclass, `name`, template, `hash`, getpic, getsummary, makethumb, settarget, `fields`) VALUES(81, 'forum_trade', '[บิวท์อิน]รายการสินค้า', 'a:9:{s:3:"raw";s:423:"
    \r\n\r\n
    ";s:6:"footer";s:0:"";s:6:"header";s:0:"";s:9:"indexplus";a:0:{}s:5:"index";a:0:{}s:9:"orderplus";a:0:{}s:5:"order";a:0:{}s:8:"loopplus";a:0:{}s:4:"loop";s:357:"
  • \r\n{title}\r\n

    {price}

    \r\n

    {title}

    \r\n
  • ";}', '4fd3ffc9', 1, 0, 1, 1, 'a:4:{i:0;s:3:"url";i:1;s:3:"pic";i:2;s:5:"title";i:3;s:5:"price";}'); -INSERT INTO pre_common_block_style (styleid, blockclass, `name`, template, `hash`, getpic, getsummary, makethumb, settarget, `fields`) VALUES(82, 'forum_activity', '[บิวท์อิน]รายการกิจกรรม', 'a:9:{s:3:"raw";s:326:"
    \r\n[loop]\r\n
    \r\n
    {title}
    \r\n
    {title}
    \r\n
    {time} {place}
    \r\n
    ผู้เข้าร่วม {applynumber} คน
    \r\n
    \r\n[/loop]\r\n
    ";s:6:"footer";s:0:"";s:6:"header";s:0:"";s:9:"indexplus";a:0:{}s:5:"index";a:0:{}s:9:"orderplus";a:0:{}s:5:"order";a:0:{}s:8:"loopplus";a:0:{}s:4:"loop";s:272:"
    \r\n
    {title}
    \r\n
    {title}
    \r\n
    {time} {place}
    \r\n
    ผู้เข้าร่วม {applynumber} คน
    \r\n
    ";}', '3d04a558', 1, 0, 1, 1, 'a:6:{i:0;s:3:"url";i:1;s:3:"pic";i:2;s:5:"title";i:3;s:4:"time";i:4;s:5:"place";i:5;s:11:"applynumber";}'); +INSERT INTO pre_common_block_style (styleid, blockclass, `name`, template, `hash`, getpic, getsummary, makethumb, settarget, `fields`) VALUES(82, 'forum_activity', '[บิวท์อิน]รายการกิจกรรม', 'a:9:{s:3:"raw";s:331:"
    \r\n[loop]\r\n
    \r\n
    {title}
    \r\n
    {title}
    \r\n
    {time} {place}
    \r\n
    ผู้เข้าร่วม {applynumber} คน
    \r\n
    \r\n[/loop]\r\n
    ";s:6:"footer";s:0:"";s:6:"header";s:0:"";s:9:"indexplus";a:0:{}s:5:"index";a:0:{}s:9:"orderplus";a:0:{}s:5:"order";a:0:{}s:8:"loopplus";a:0:{}s:4:"loop";s:277:"
    \r\n
    {title}
    \r\n
    {title}
    \r\n
    {time} {place}
    \r\n
    ผู้เข้าร่วม {applynumber} คน
    \r\n
    ";}', '3d04a558', 1, 0, 1, 1, 'a:6:{i:0;s:3:"url";i:1;s:3:"pic";i:2;s:5:"title";i:3;s:4:"time";i:4;s:5:"place";i:5;s:11:"applynumber";}'); INSERT INTO pre_common_block_style (styleid, blockclass, `name`, template, `hash`, getpic, getsummary, makethumb, settarget, `fields`) VALUES(83, 'group_trade', '[บิวท์อิน]รายการสินค้า', 'a:9:{s:3:"raw";s:288:"
    \r\n\r\n
    ";s:6:"footer";s:0:"";s:6:"header";s:0:"";s:9:"indexplus";a:0:{}s:5:"index";a:0:{}s:9:"orderplus";a:0:{}s:5:"order";a:0:{}s:8:"loopplus";a:0:{}s:4:"loop";s:222:"
  • \r\n {title}\r\n

    {title}

    \r\n

    {price}

    \r\n
  • ";}', 'edd331a7', 1, 0, 1, 1, 'a:4:{i:0;s:3:"url";i:1;s:3:"pic";i:2;s:5:"title";i:3;s:5:"price";}'); -INSERT INTO pre_common_block_style (styleid, blockclass, `name`, template, `hash`, getpic, getsummary, makethumb, settarget, `fields`) VALUES(84, 'group_activity', '[บิวท์อิน]รายการกิจกรรม', 'a:9:{s:3:"raw";s:326:"
    \r\n[loop]\r\n
    \r\n
    {title}
    \r\n
    {title}
    \r\n
    {time} {place}
    \r\n
    ผู้เข้าร่วม {applynumber} คน
    \r\n
    \r\n[/loop]\r\n
    ";s:6:"footer";s:0:"";s:6:"header";s:0:"";s:9:"indexplus";a:0:{}s:5:"index";a:0:{}s:9:"orderplus";a:0:{}s:5:"order";a:0:{}s:8:"loopplus";a:0:{}s:4:"loop";s:272:"
    \r\n
    {title}
    \r\n
    {title}
    \r\n
    {time} {place}
    \r\n
    ผู้เข้าร่วม {applynumber} คน
    \r\n
    ";}', '502cc3f6', 1, 0, 1, 1, 'a:6:{i:0;s:3:"url";i:1;s:3:"pic";i:2;s:5:"title";i:3;s:4:"time";i:4;s:5:"place";i:5;s:11:"applynumber";}'); -INSERT INTO pre_common_block_style (styleid, blockclass, `name`, template, `hash`, getpic, getsummary, makethumb, settarget, `fields`) VALUES(85, 'forum_thread', '[บิวท์อิน]ผู้โพสต์+ชื่อเรื่อง+สรุป (พร้อมรูปภาพ)', 'a:9:{s:3:"raw";s:466:"
    \r\n[loop]\r\n
    \r\n
    {author}
    \r\n
    {title}
    \r\n
    {summary}
    \r\n
    ผู้โพสต์: {author}
    \r\n
    \r\n[/loop]\r\n
    ";s:6:"footer";s:0:"";s:6:"header";s:0:"";s:9:"indexplus";a:0:{}s:5:"index";a:0:{}s:9:"orderplus";a:0:{}s:5:"order";a:0:{}s:8:"loopplus";a:0:{}s:4:"loop";s:407:"
    \r\n
    {author}
    \r\n
    {title}
    \r\n
    {summary}
    \r\n
    ผู้โพสต์: {author}
    \r\n
    ";}', '87d533ea', 0, 1, 0, 1, 'a:6:{i:0;s:8:"authorid";i:1;s:6:"avatar";i:2;s:6:"author";i:3;s:3:"url";i:4;s:5:"title";i:5;s:7:"summary";}'); +INSERT INTO pre_common_block_style (styleid, blockclass, `name`, template, `hash`, getpic, getsummary, makethumb, settarget, `fields`) VALUES(84, 'group_activity', '[บิวท์อิน]รายการกิจกรรม', 'a:9:{s:3:"raw";s:331:"
    \r\n[loop]\r\n
    \r\n
    {title}
    \r\n
    {title}
    \r\n
    {time} {place}
    \r\n
    ผู้เข้าร่วม {applynumber} คน
    \r\n
    \r\n[/loop]\r\n
    ";s:6:"footer";s:0:"";s:6:"header";s:0:"";s:9:"indexplus";a:0:{}s:5:"index";a:0:{}s:9:"orderplus";a:0:{}s:5:"order";a:0:{}s:8:"loopplus";a:0:{}s:4:"loop";s:277:"
    \r\n
    {title}
    \r\n
    {title}
    \r\n
    {time} {place}
    \r\n
    ผู้เข้าร่วม {applynumber} คน
    \r\n
    ";}', '502cc3f6', 1, 0, 1, 1, 'a:6:{i:0;s:3:"url";i:1;s:3:"pic";i:2;s:5:"title";i:3;s:4:"time";i:4;s:5:"place";i:5;s:11:"applynumber";}'); +INSERT INTO pre_common_block_style (styleid, blockclass, `name`, template, `hash`, getpic, getsummary, makethumb, settarget, `fields`) VALUES(85, 'forum_thread', '[บิวท์อิน]ผู้โพสต์+ชื่อเรื่อง+สรุป (พร้อมรูปภาพ)', 'a:9:{s:3:"raw";s:468:"
    \r\n[loop]\r\n
    \r\n
    {author}
    \r\n
    {title}
    \r\n
    {summary}
    \r\n
    ผู้โพสต์: {author}
    \r\n
    \r\n[/loop]\r\n
    ";s:6:"footer";s:0:"";s:6:"header";s:0:"";s:9:"indexplus";a:0:{}s:5:"index";a:0:{}s:9:"orderplus";a:0:{}s:5:"order";a:0:{}s:8:"loopplus";a:0:{}s:4:"loop";s:409:"
    \r\n
    {author}
    \r\n
    {title}
    \r\n
    {summary}
    \r\n
    ผู้โพสต์: {author}
    \r\n
    ";}', '87d533ea', 0, 1, 0, 1, 'a:6:{i:0;s:8:"authorid";i:1;s:6:"avatar";i:2;s:6:"author";i:3;s:3:"url";i:4;s:5:"title";i:5;s:7:"summary";}'); INSERT INTO pre_common_block_style (styleid, blockclass, `name`, template, `hash`, getpic, getsummary, makethumb, settarget, `fields`) VALUES(86, 'portal_article', '[บิวท์อิน]หมวดหมู่ของบทความ+ชื่อเรื่อง', 'a:9:{s:3:"raw";s:205:"
    \r\n\r\n
    ";s:6:"footer";s:0:"";s:6:"header";s:0:"";s:9:"indexplus";a:0:{}s:5:"index";a:0:{}s:9:"orderplus";a:0:{}s:5:"order";a:0:{}s:8:"loopplus";a:0:{}s:4:"loop";s:135:"
  • {title}
  • ";}', '7720f457', 0, 0, 0, 1, 'a:4:{i:0;s:6:"caturl";i:1;s:7:"catname";i:2;s:3:"url";i:3;s:5:"title";}'); INSERT INTO pre_common_block_style (styleid, blockclass, `name`, template, `hash`, getpic, getsummary, makethumb, settarget, `fields`) VALUES(87, 'forum_thread', '[บิวท์อิน]กระทู้รางวัล', 'a:9:{s:3:"raw";s:139:"
    \r\n\r\n
    ";s:6:"footer";s:0:"";s:6:"header";s:0:"";s:9:"indexplus";a:0:{}s:5:"index";a:0:{}s:9:"orderplus";a:0:{}s:5:"order";a:0:{}s:8:"loopplus";a:0:{}s:4:"loop";s:69:"
  • {title}{summary}
  • ";}', '56bffda0', 0, 1, 0, 1, 'a:3:{i:0;s:3:"url";i:1;s:5:"title";i:2;s:7:"summary";}'); INSERT INTO pre_common_block_style (styleid, blockclass, `name`, template, `hash`, getpic, getsummary, makethumb, settarget, `fields`) VALUES(88, 'forum_thread', '[บิวท์อิน]กระทู้ที่ได้รับความนิยมในหน้าแรก', 'a:9:{s:3:"raw";s:278:"
    \r\n[loop]\r\n
    \r\n
    {author} ›
    \r\n
    {title}
    \r\n
    {summary}
    \r\n
    \r\n[/loop]\r\n
    ";s:6:"footer";s:0:"";s:6:"header";s:0:"";s:9:"indexplus";a:0:{}s:5:"index";a:0:{}s:9:"orderplus";a:0:{}s:5:"order";a:0:{}s:8:"loopplus";a:0:{}s:4:"loop";s:224:"
    \r\n
    {author} ›
    \r\n
    {title}
    \r\n
    {summary}
    \r\n
    ";}', '08596517', 0, 1, 0, 1, 'a:4:{i:0;s:6:"author";i:1;s:3:"url";i:2;s:5:"title";i:3;s:7:"summary";}'); @@ -1013,13 +1013,13 @@ INSERT INTO pre_common_block_style (styleid, blockclass, `name`, template, `hash INSERT INTO pre_common_block_style (styleid, blockclass, `name`, template, `hash`, getpic, getsummary, makethumb, settarget, `fields`) VALUES(90, 'space_blog', '[บิวท์อิน]บล็อกที่ได้รับความนิยมในหน้าแรก', 'a:9:{s:3:"raw";s:280:"
    \r\n[loop]\r\n
    \r\n
    {username} ›
    \r\n
    {title}
    \r\n
    {summary}
    \r\n
    \r\n[/loop]\r\n
    ";s:6:"footer";s:0:"";s:6:"header";s:0:"";s:9:"indexplus";a:0:{}s:5:"index";a:0:{}s:9:"orderplus";a:0:{}s:5:"order";a:0:{}s:8:"loopplus";a:0:{}s:4:"loop";s:226:"
    \r\n
    {username} ›
    \r\n
    {title}
    \r\n
    {summary}
    \r\n
    ";}', '9e68bc9b', 0, 1, 0, 1, 'a:4:{i:0;s:8:"username";i:1;s:3:"url";i:2;s:5:"title";i:3;s:7:"summary";}'); INSERT INTO pre_common_block_style (styleid, blockclass, `name`, template, `hash`, getpic, getsummary, makethumb, settarget, `fields`) VALUES(91, 'forum_thread', '[บิวท์อิน]กระทู้โพล', 'a:9:{s:3:"raw";s:166:"
    \r\n[loop]\r\n
    \r\n
    {title}
    \r\n
    {summary}
    \r\n
    \r\n[/loop]\r\n
    ";s:6:"footer";s:0:"";s:6:"header";s:0:"";s:9:"indexplus";a:0:{}s:5:"index";a:0:{}s:9:"orderplus";a:0:{}s:5:"order";a:0:{}s:8:"loopplus";a:0:{}s:4:"loop";s:105:"
    \r\n
    {title}
    \r\n
    {summary}
    \r\n
    ";}', 'fa07a66f', 0, 1, 0, 1, 'a:3:{i:0;s:3:"url";i:1;s:5:"title";i:2;s:7:"summary";}'); INSERT INTO pre_common_block_style (styleid, blockclass, `name`, template, `hash`, getpic, getsummary, makethumb, settarget, `fields`) VALUES(92, 'forum_thread', '[บิวท์อิน]กระทู้โต้วาที', 'a:9:{s:3:"raw";s:168:"
    \r\n[loop]\r\n
    \r\n
    {title}
    \r\n
    {summary}
    \r\n
    \r\n[/loop]\r\n
    ";s:6:"footer";s:0:"";s:6:"header";s:0:"";s:9:"indexplus";a:0:{}s:5:"index";a:0:{}s:9:"orderplus";a:0:{}s:5:"order";a:0:{}s:8:"loopplus";a:0:{}s:4:"loop";s:105:"
    \r\n
    {title}
    \r\n
    {summary}
    \r\n
    ";}', '6a480986', 0, 1, 0, 1, 'a:3:{i:0;s:3:"url";i:1;s:5:"title";i:2;s:7:"summary";}'); -INSERT INTO pre_common_block_style (styleid, blockclass, `name`, template, `hash`, getpic, getsummary, makethumb, settarget, `fields`) VALUES(93, 'group_activity', '[บิวท์อิน]ชื่อกิจกรรม:รูปภาพขนาดใหญ่+สรุป', 'a:9:{s:3:"raw";s:363:"
    \r\n[loop]\r\n
    \r\n
    {title}
    \r\n
    {title}
    \r\n
    \r\n

    {summary}

    \r\n

    {place} {class}

    \r\n

    เวลา: {time}

    \r\n

    ผู้สนใจ {applynumber} คน

    \r\n
    \r\n
    \r\n[/loop]\r\n
    ";s:6:"footer";s:0:"";s:6:"header";s:0:"";s:9:"indexplus";a:0:{}s:5:"index";a:0:{}s:9:"orderplus";a:0:{}s:5:"order";a:0:{}s:8:"loopplus";a:0:{}s:4:"loop";s:309:"
    \r\n
    {title}
    \r\n
    {title}
    \r\n
    \r\n

    {summary}

    \r\n

    {place} {class}

    \r\n

    เวลา: {time}

    \r\n

    ผู้สนใจ {applynumber} คน

    \r\n
    \r\n
    ";}', '11d4011e', 1, 1, 0, 1, 'a:8:{i:0;s:3:"url";i:1;s:3:"pic";i:2;s:5:"title";i:3;s:7:"summary";i:4;s:5:"place";i:5;s:5:"class";i:6;s:4:"time";i:7;s:11:"applynumber";}'); -INSERT INTO pre_common_block_style (styleid, blockclass, `name`, template, `hash`, getpic, getsummary, makethumb, settarget, `fields`) VALUES(94, 'group_activity', '[บิวท์อิน]ชื่อกิจกรรม:รูปภาพขนาดเล็ก+ชื่อเรื่อง', 'a:9:{s:3:"raw";s:378:"
    \r\n[loop]\r\n
    \r\n
    \r\n
    {title}
    \r\n
    {time} {place}
    \r\n
    ผู้สนใจ {applynumber} คน
    \r\n
    \r\n[/loop]\r\n
    ";s:6:"footer";s:0:"";s:6:"header";s:0:"";s:9:"indexplus";a:0:{}s:5:"index";a:0:{}s:9:"orderplus";a:0:{}s:5:"order";a:0:{}s:8:"loopplus";a:0:{}s:4:"loop";s:324:"
    \r\n
    \r\n
    {title}
    \r\n
    {time} {place}
    \r\n
    ผู้สนใจ {applynumber} คน
    \r\n
    ";}', '51658dfa', 1, 0, 0, 1, 'a:6:{i:0;s:3:"url";i:1;s:3:"pic";i:2;s:5:"title";i:3;s:4:"time";i:4;s:5:"place";i:5;s:11:"applynumber";}'); +INSERT INTO pre_common_block_style (styleid, blockclass, `name`, template, `hash`, getpic, getsummary, makethumb, settarget, `fields`) VALUES(93, 'group_activity', '[บิวท์อิน]ชื่อกิจกรรม:รูปภาพขนาดใหญ่+สรุป', 'a:9:{s:3:"raw";s:368:"
    \r\n[loop]\r\n
    \r\n
    {title}
    \r\n
    {title}
    \r\n
    \r\n

    {summary}

    \r\n

    {place} {class}

    \r\n

    เวลา: {time}

    \r\n

    ผู้สนใจ {applynumber} คน

    \r\n
    \r\n
    \r\n[/loop]\r\n
    ";s:6:"footer";s:0:"";s:6:"header";s:0:"";s:9:"indexplus";a:0:{}s:5:"index";a:0:{}s:9:"orderplus";a:0:{}s:5:"order";a:0:{}s:8:"loopplus";a:0:{}s:4:"loop";s:314:"
    \r\n
    {title}
    \r\n
    {title}
    \r\n
    \r\n

    {summary}

    \r\n

    {place} {class}

    \r\n

    เวลา: {time}

    \r\n

    ผู้สนใจ {applynumber} คน

    \r\n
    \r\n
    ";}', '11d4011e', 1, 1, 0, 1, 'a:8:{i:0;s:3:"url";i:1;s:3:"pic";i:2;s:5:"title";i:3;s:7:"summary";i:4;s:5:"place";i:5;s:5:"class";i:6;s:4:"time";i:7;s:11:"applynumber";}'); +INSERT INTO pre_common_block_style (styleid, blockclass, `name`, template, `hash`, getpic, getsummary, makethumb, settarget, `fields`) VALUES(94, 'group_activity', '[บิวท์อิน]ชื่อกิจกรรม:รูปภาพขนาดเล็ก+ชื่อเรื่อง', 'a:9:{s:3:"raw";s:368:"
    \r\n[loop]\r\n
    \r\n
    \r\n
    {title}
    \r\n
    {time} {place}
    \r\n
    ผู้สนใจ {applynumber} คน
    \r\n
    \r\n[/loop]\r\n
    ";s:6:"footer";s:0:"";s:6:"header";s:0:"";s:9:"indexplus";a:0:{}s:5:"index";a:0:{}s:9:"orderplus";a:0:{}s:5:"order";a:0:{}s:8:"loopplus";a:0:{}s:4:"loop";s:328:"
    \r\n
    \r\n
    {title}
    \r\n
    {time} {place}
    \r\n
    ผู้สนใจ {applynumber} คน
    \r\n
    ";}', '51658dfa', 1, 0, 0, 1, 'a:6:{i:0;s:3:"url";i:1;s:3:"pic";i:2;s:5:"title";i:3;s:4:"time";i:4;s:5:"place";i:5;s:11:"applynumber";}'); INSERT INTO pre_common_block_style (styleid, blockclass, `name`, template, `hash`, getpic, getsummary, makethumb, settarget, `fields`) VALUES(95, 'space_album', '[บิวท์อิน]รายการอัลบั้ม(จัดเรียงในแนวตั้ง)', 'a:9:{s:3:"raw";s:594:"
    \r\n\r\n
    ";s:6:"footer";s:0:"";s:6:"header";s:0:"";s:9:"indexplus";a:0:{}s:5:"index";a:0:{}s:9:"orderplus";a:0:{}s:5:"order";a:1:{s:3:"odd";s:279:"
  • \r\n {title}\r\n

    {title} ({picnum})

    \r\n
  • ";}s:8:"loopplus";a:0:{}s:4:"loop";s:224:"
  • \r\n {title}\r\n

    {title} ({picnum})

    \r\n
  • ";}', '771549b7', 1, 0, 1, 1, 'a:4:{i:0;s:3:"url";i:1;s:3:"pic";i:2;s:5:"title";i:3;s:6:"picnum";}'); INSERT INTO pre_common_block_style (styleid, blockclass, `name`, template, `hash`, getpic, getsummary, makethumb, settarget, `fields`) VALUES(96, 'space_pic', '[บิวท์อิน]รายการรูปภาพ (จัดเรียงในแนวตั้ง)', 'a:9:{s:3:"raw";s:556:"
    \r\n\r\n
    ";s:6:"footer";s:0:"";s:6:"header";s:0:"";s:9:"indexplus";a:0:{}s:5:"index";a:0:{}s:9:"orderplus";a:0:{}s:5:"order";a:1:{s:3:"odd";s:268:"
  • \r\n {title}\r\n

    {title}

    \r\n
  • ";}s:8:"loopplus";a:0:{}s:4:"loop";s:197:"
  • \r\n {title}\r\n

    {title}

    \r\n
  • ";}', 'ab23af19', 1, 0, 1, 1, 'a:3:{i:0;s:3:"url";i:1;s:3:"pic";i:2;s:5:"title";}'); INSERT INTO pre_common_block_style (styleid, blockclass, `name`, template, `hash`, getpic, getsummary, makethumb, settarget, `fields`) VALUES(97, 'portal_article', '[บิวท์อิน]รายการบทความทั่วไป', 'a:9:{s:3:"raw";s:261:"
    \r\n\r\n
    ";s:6:"footer";s:0:"";s:6:"header";s:0:"";s:9:"indexplus";a:0:{}s:5:"index";a:0:{}s:9:"orderplus";a:0:{}s:5:"order";a:1:{s:4:"even";s:110:"{title}";}s:8:"loopplus";a:0:{}s:4:"loop";s:55:"
  • {title}";}', 'bc85eab4', 0, 0, 0, 1, 'a:2:{i:0;s:3:"url";i:1;s:5:"title";}'); INSERT INTO pre_common_block_style (styleid, blockclass, `name`, template, `hash`, getpic, getsummary, makethumb, settarget, `fields`) VALUES(98, 'portal_article', '[บิวท์อิน]รายการบทความที่มีรูปภาพ (จัดเรียงในแนวตั้ง)', 'a:9:{s:3:"raw";s:556:"
    \r\n\r\n
    ";s:6:"footer";s:0:"";s:6:"header";s:0:"";s:9:"indexplus";a:0:{}s:5:"index";a:0:{}s:9:"orderplus";a:0:{}s:5:"order";a:1:{s:3:"odd";s:268:"
  • \r\n {title}\r\n

    {title}

    \r\n
  • ";}s:8:"loopplus";a:0:{}s:4:"loop";s:197:"
  • \r\n {title}\r\n

    {title}

    \r\n
  • ";}', '6b653acb', 1, 0, 1, 1, 'a:3:{i:0;s:3:"url";i:1;s:3:"pic";i:2;s:5:"title";}'); -INSERT INTO pre_common_block_style (styleid, blockclass, `name`, template, `hash`, getpic, getsummary, makethumb, settarget, `fields`) VALUES(99, 'html_announcement', '[บิวท์อิน]ประกาศ', 'a:9:{s:3:"raw";s:193:"
    \r\n\r\n
    ";s:6:"footer";s:0:"";s:6:"header";s:0:"";s:9:"indexplus";a:0:{}s:5:"index";a:0:{}s:9:"orderplus";a:0:{}s:5:"order";a:0:{}s:8:"loopplus";a:0:{}s:4:"loop";s:130:"
  • ประกาศ{title}({starttime})
  • ";}', '1f88cc82', 0, 0, 0, 1, 'a:3:{i:0;s:3:"url";i:1;s:5:"title";i:2;s:9:"starttime";}'); +INSERT INTO pre_common_block_style (styleid, blockclass, `name`, template, `hash`, getpic, getsummary, makethumb, settarget, `fields`) VALUES(99, 'html_announcement', '[บิวท์อิน]ประกาศ', 'a:9:{s:3:"raw";s:197:"
    \r\n\r\n
    ";s:6:"footer";s:0:"";s:6:"header";s:0:"";s:9:"indexplus";a:0:{}s:5:"index";a:0:{}s:9:"orderplus";a:0:{}s:5:"order";a:0:{}s:8:"loopplus";a:0:{}s:4:"loop";s:134:"
  • ประกาศ{title}({starttime})
  • ";}', '1f88cc82', 0, 0, 0, 1, 'a:3:{i:0;s:3:"url";i:1;s:5:"title";i:2;s:9:"starttime";}'); INSERT INTO pre_common_block_style (styleid, blockclass, `name`, template, `hash`, getpic, getsummary, makethumb, settarget, `fields`) VALUES(100, 'forum_thread', '[บิวท์อิน]รายการกระทู้ที่มีรูปภาพ', 'a:9:{s:3:"raw";s:374:"
    \r\n[loop]\r\n
    \r\n
    {title}
    \r\n
    {author}{title}
    \r\n
    {summary}
    \r\n
    \r\n[/loop]\r\n
    ";s:6:"footer";s:0:"";s:6:"header";s:0:"";s:9:"indexplus";a:0:{}s:5:"index";a:0:{}s:9:"orderplus";a:0:{}s:5:"order";a:0:{}s:8:"loopplus";a:0:{}s:4:"loop";s:320:"
    \r\n
    {title}
    \r\n
    {author}{title}
    \r\n
    {summary}
    \r\n
    ";}', '881ee4a3', 1, 1, 1, 1, 'a:6:{i:0;s:3:"url";i:1;s:3:"pic";i:2;s:5:"title";i:3;s:8:"authorid";i:4;s:6:"author";i:5;s:7:"summary";}'); INSERT INTO pre_common_block_style (styleid, blockclass, `name`, template, `hash`, getpic, getsummary, makethumb, settarget, `fields`) VALUES(101, 'group_thread', '[บิวท์อิน]รายการกระทู้ที่มีรูปภาพ', 'a:9:{s:3:"raw";s:374:"
    \r\n[loop]\r\n
    \r\n
    {title}
    \r\n
    {author}{title}
    \r\n
    {summary}
    \r\n
    \r\n[/loop]\r\n
    ";s:6:"footer";s:0:"";s:6:"header";s:0:"";s:9:"indexplus";a:0:{}s:5:"index";a:0:{}s:9:"orderplus";a:0:{}s:5:"order";a:0:{}s:8:"loopplus";a:0:{}s:4:"loop";s:320:"
    \r\n
    {title}
    \r\n
    {author}{title}
    \r\n
    {summary}
    \r\n
    ";}', 'b67132d6', 1, 1, 1, 1, 'a:6:{i:0;s:3:"url";i:1;s:3:"pic";i:2;s:5:"title";i:3;s:8:"authorid";i:4;s:6:"author";i:5;s:7:"summary";}'); -- [key:a2f9089e] diff --git a/upload/install/include/install_function.php b/upload/install/include/install_function.php index 7c5b7ded..197c9b1c 100644 --- a/upload/install/include/install_function.php +++ b/upload/install/include/install_function.php @@ -879,10 +879,11 @@ function authcode($string, $operation = 'DECODE', $key = '', $expiry = 0) { function show_db_install() { if(VIEW_OFF) return; - global $dbhost, $dbuser, $dbpw, $dbname, $tablepre, $username, $password, $email, $uid; + global $dbhost, $dbuser, $dbpw, $dbname, $tablepre, $username, $password, $email, $uid, $myisam2innodb; $dzucfull = DZUCFULL; $dzucstl = DZUCSTL ? 1 : 0; - $allinfo = base64_encode(serialize(compact('dbhost', 'dbuser', 'dbpw', 'dbname', 'tablepre', 'username', 'password', 'email', 'dzucfull', 'dzucstl', 'uid'))); + $succlang = $myisam2innodb ? 'initdbinnodbresult_succ' : 'initdbdataresult_succ'; + $allinfo = base64_encode(serialize(compact('dbhost', 'dbuser', 'dbpw', 'dbname', 'tablepre', 'username', 'password', 'email', 'dzucfull', 'dzucstl', 'uid', 'myisam2innodb'))); init_install_log_file(); ?> '.cplang('show_all').' | '.cplang('hide_all').'    '; + echo '
    '.cplang('show_all').' | '.cplang('hide_all').'   
    '; showtableheader(); showsubtitle(array('', 'display_order', 'forums_admin_name', '', 'forums_moderators', ''.$lang['multiedit'].'')); diff --git a/upload/source/admincp/admincp_index.php b/upload/source/admincp/admincp_index.php index ff7cd49a..f58a885e 100644 --- a/upload/source/admincp/admincp_index.php +++ b/upload/source/admincp/admincp_index.php @@ -71,6 +71,15 @@ show_releasetips(); show_envcheck(); +echo ' + +'; + + echo '
    '; echo '
    '; @@ -556,7 +565,7 @@ function show_forever_thanks() { showboxrow('', array('class="dcol d-1 lineheight"', 'class="dcol lineheight team"'), array($copyRightMessage[0], ''.$copyRightMessage[1].'')); showboxrow('', array('class="dcol d-1 lineheight"', 'class="dcol lineheight team"'), array($copyRightMessage[2], ''.$copyRightMessage[3].'')); showboxrow('', array('class="dcol d-1 lineheight"', 'class="dcol lineheight team"'), array(cplang('contributors'), $gitTeamStr)); - showboxrow('', array('class="dcol d-1 lineheight"', 'class="dcol lineheight team"'), array('', ''.cplang('contributors_see').'')); + showboxrow('', array('class="dcol d-1 lineheight"', 'class="dcol lineheight team"'), array('', ''.cplang('contributors_see').'')); showboxrow('', array('class="dcol d-1 lineheight"', 'class="dcol lineheight team"'), array(cplang('home_dev_manager'), ''.cplang('dev_manager').'')); showboxrow('', array('class="dcol d-1 lineheight"', 'class="dcol lineheight team"'), array(cplang('home_dev_team'), $devTeamStr)); showboxrow('', array('class="dcol d-1 lineheight"', 'class="dcol lineheight team"'), array(cplang('home_dev_skins'), $devSkinsStr)); diff --git a/upload/source/admincp/admincp_logs.php b/upload/source/admincp/admincp_logs.php index 6ad1d5b8..31e35e47 100644 --- a/upload/source/admincp/admincp_logs.php +++ b/upload/source/admincp/admincp_logs.php @@ -129,7 +129,7 @@ } else { showformheader("logs&operation=$operation"); } -showtableheader('', 'fixpadding" style="table-layout: fixed'); +showtableheader('', 'fixpadding'); $filters = ''; if($operation == 'illegal') { @@ -232,7 +232,7 @@ } elseif($operation == 'rate') { - showtablerow('class="header"', array('class="td23"','class="td23"','class="td23"','class="td23"','class="td23"','class="td24"'), array( + showtablerow('class="header"', array('class="td23"','class="td23"','class="td23"','class="td23"','class="td23"',''), array( cplang('username'), cplang('usergroup'), cplang('time'), @@ -255,7 +255,7 @@ } $log[4] = "$log[4]"; $log[6] = $_G['setting']['extcredits'][$log[5]]['title'].' '.($log[6] < 0 ? "$log[6]" : "+$log[6]").' '.$_G['setting']['extcredits'][$log[5]]['unit']; - $log[7] = $log[7] ? "".cutstr($log[8], 20)."" : "{$lang['logs_rating_manual']}"; + $log[7] = $log[7] ? "".cutstr($log[8], 40)."" : "{$lang['logs_rating_manual']}"; showtablerow('', array('class="bold"'), array( $log[2], @@ -314,17 +314,17 @@ - - {$lang['crime_operator']}: - {$lang['crime_action']}: + + {$lang['crime_operator']}: + {$lang['crime_action']}: - - {$lang['crime_user']}: - {$lang['startendtime']}: -- + + {$lang['crime_user']}: + {$lang['startendtime']}: -- - - {$lang['keywords']}: - + + {$lang['keywords']}: + SEARCH; diff --git a/upload/source/admincp/admincp_misc.php b/upload/source/admincp/admincp_misc.php index fb1828a7..e08fe71b 100644 --- a/upload/source/admincp/admincp_misc.php +++ b/upload/source/admincp/admincp_misc.php @@ -322,7 +322,7 @@ } $availablenew = $_GET['availablenew']; foreach($tagnew as $id => $val) { - if(in_array($id, $custom_ids) && !preg_match("/^[0-9a-z]+$/i", $tagnew[$id]) && strlen($tagnew[$id]) < 20) { + if(in_array($id, $custom_ids) && (!preg_match("/^[0-9a-z]+$/i", $tagnew[$id]) || strlen($tagnew[$id]) > 20)) { cpmsg('dzcode_edit_tag_invalid', '', 'error'); } $availablenew[$id] = in_array($id, $custom_ids) ? $availablenew[$id] : 1; @@ -341,7 +341,7 @@ $newtag = $_GET['newtag']; if($newtag != '') { - if(!preg_match("/^[0-9a-z]+$/i", $newtag && strlen($newtag) < 20)) { + if(!preg_match("/^[0-9a-z]+$/i", $newtag) || strlen($newtag) > 20) { cpmsg('dzcode_edit_tag_invalid', '', 'error'); } $data = array( diff --git a/upload/source/admincp/admincp_portalcategory.php b/upload/source/admincp/admincp_portalcategory.php index 0d8d79f6..9f431d47 100644 --- a/upload/source/admincp/admincp_portalcategory.php +++ b/upload/source/admincp/admincp_portalcategory.php @@ -35,7 +35,7 @@ $tdstyle = array('width="25"', 'width="80"', '', 'width="50"', 'width="65"', 'width="35"', 'width="35"', 'width="35"', 'width="215"', 'width="110"'); showformheader('portalcategory'); - echo '
    '.cplang('show_all').' | '.cplang('hide_all').'   
    '; + echo ''; showtableheader('', '', 'id="portalcategory_header" style="min-width:900px;*width:900px;"'); showsubtitle(array('', '', 'portalcategory_name', 'portalcategory_articles', 'portalcategory_allowpublish', 'portalcategory_allowcomment', 'portalcategory_is_closed', 'setindex', 'operation', 'portalcategory_article_op'), 'header tbm', $tdstyle); showtablefooter(); @@ -962,19 +962,26 @@ function remakecategoryfile($categorys) { } function showportalprimaltemplate($pritplname, $type) { + global $_G; include_once libfile('function/portalcp'); - $tpls = array('./template/default:portal/'.$type=>getprimaltplname('portal/'.$type.'.htm')); + $default_tpls = array(); + $tpls = array('./template/default:portal/'.$type=>getprimaltplname('./template/default:portal/'.$type.'.htm')); foreach($alltemplate = C::t('common_template')->range() as $template) { if(($dir = dir(DISCUZ_ROOT.$template['directory'].'/portal/'))) { while(false !== ($file = $dir->read())) { $file = strtolower($file); - if (fileext($file) == 'htm' && substr($file, 0, strlen($type)+1) == $type.'_') { - $key = $template['directory'].':portal/'.str_replace('.htm','',$file); - $tpls[$key] = getprimaltplname($template['directory'].':portal/'.$file); + if (in_array(fileext($file), array('htm', 'php')) && (substr($file, 0, strlen($type)+1) == $type.'_') || (substr($file, 0, -4) == $type && $template['directory'] != './template/default')) { + $key = $template['directory'].':portal/'.substr($file, 0, -4); + if ($_G['cache']['style_default']['tpldir'] && $_G['cache']['style_default']['tpldir'] == $template['directory']) { + $default_tpls[$key] = getprimaltplname($template['directory'].':portal/'.$file); + }else{ + $tpls[$key] = getprimaltplname($template['directory'].':portal/'.$file); + } } } } } + $tpls = array_merge($default_tpls, $tpls); foreach($tpls as $key => $value) { echo ""; diff --git a/upload/source/admincp/admincp_setting.php b/upload/source/admincp/admincp_setting.php index f1d797c5..c46dcc0c 100644 --- a/upload/source/admincp/admincp_setting.php +++ b/upload/source/admincp/admincp_setting.php @@ -685,6 +685,7 @@ $threadprofile_group = C::t('forum_threadprofile_group')->fetch_all_threadprofile(); showtagheader('div', 'threadprofile', $_GET['anchor'] == 'threadprofile'); + echo ''; echo '
    '; showboxheader('setting_styles_threadprofile_group'); diff --git a/upload/source/admincp/admincp_styles.php b/upload/source/admincp/admincp_styles.php index a04dc269..4aa55dc7 100644 --- a/upload/source/admincp/admincp_styles.php +++ b/upload/source/admincp/admincp_styles.php @@ -218,7 +218,7 @@ } } $stylelist .= - ']","i"),bv=/^(?:checkbox|radio)$/,bw=/checked\s*(?:[^=]|=\s*.checked.)/i,bx=/\/(java|ecma)script/i,by=/^\s*\s*$/g,bz={option:[1,""],legend:[1,"
    ","
    "],thead:[1,"
    '.($addonids[$id] ? "$style[tplname]" : $style['tplname']).'
    '. + ''; - - foreach($apihook as $page => $hooks) { - foreach($hooks as $hook => $rows) { - $i = 0; - foreach($rows as $plugin => $row) { - if(!$plugins[$plugin]) { - $deleteplugins[] = $plugin; - } - $row['plugin'] = $plugin; - echo ''. - ''. - '' : - ''). - ''; - $i++; - } - } - } - - if($deleteplugins) { - WeChatHook::delAPIHook($deleteplugins); - } - - showsubmit('orderssubmit'); - showtablefooter(); - - showformfooter(); -} - -$redirect = WeChatHook::getRedirect(); -$response = WeChatHook::getResponse(); - -$plugins = DB::fetch_all('SELECT identifier, name FROM %t', array('common_plugin'), 'identifier'); - -showtableheader(lang('plugin/wechat', 'api_wechat')); -echo ''; -if($redirect) { - if(!$plugins[$redirect['plugin']]) { - WeChatHook::updateRedirect(array()); - } - echo ''; -} -foreach($response as $k => $row) { - if(!$plugins[$row['plugin']]) { - $deleteresponses[$k] = array(); - } - echo ''; -} -showtablefooter(); - -$wechatresponseExts = dunserialize($_G['setting']['wechatresponseExts']); -if($wechatresponseExts) { - showtableheader(); - foreach($wechatresponseExts as $extk => $response) { - echo ''; - foreach($response as $k => $row) { - if(!$plugins[$row['plugin']]) { - $deleteresponseExts[$extk][$k] = array(); - } - echo ''; - } - } - showtablefooter(); -} - -if($deleteresponses) { - WeChatHook::updateResponse($deleteresponses); -} - -if($deleteresponseExts) { - foreach($deleteresponseExts as $extk => $deleteresponses) { - WeChatHook::updateResponse($deleteresponses, $extk); - } -} - -$wechatappInfos = dunserialize($_G['setting']['wechatappInfos']); -if($wechatappInfos) { - showtableheader(); - echo ''; - foreach(dunserialize($_G['setting']['wechatappInfos']) as $k => $info) { - echo ''; - } - showtablefooter(); -} - -function formathook($hook) { - return 'File: '.$hook['plugin'].'/'.$hook['include'].' Method: '.$hook['class'].'->'.$hook['method']; -} - -function pluginapicmp($a, $b) { - return $a['order'] > $b['order'] ? 1 : -1; -} - -?> \ No newline at end of file diff --git a/upload/source/plugin/wechat/bind.inc.php b/upload/source/plugin/wechat/bind.inc.php deleted file mode 100644 index ad997042..00000000 --- a/upload/source/plugin/wechat/bind.inc.php +++ /dev/null @@ -1,84 +0,0 @@ -delete($_G['uid']); - clearcookies(); - showmessage('wechat:wechat_message_unbinded', dreferer()); -} - -if($_G['uid'] && submitcheck('confirmsubmit')) { - loaducenter(); - list($result) = uc_user_login($_G['uid'], $_GET['passwordconfirm'], 1, 0); - if($result >= 0) { - dsetcookie('qrauth', base64_encode(authcode($result, 'ENCODE', $_G['config']['security']['authkey'], 300))); - showmessage('', dreferer()); - } - showmessage('login_password_invalid'); -} - -if(isset($_GET['check'])) { - $code = authcode(base64_decode($_GET['check']), 'DECODE', $_G['config']['security']['authkey']); - if($code) { - $authcode = C::t('#wechat#mobile_wechat_authcode')->fetch_by_code($code); - if($authcode['status']) { - require_once libfile('function/member'); - $member = getuserbyuid($authcode['uid'], 1); - setloginstatus($member, 1296000); - dsetcookie('wechat_ticket', '', -1); - $echostr = 'done'; - } else { - $echostr = '1';//json_encode($authcode); - } - } else { - $echostr = '-1'; - } - - if(!ob_start($_G['gzipcompress'] ? 'ob_gzhandler' : null)) { - ob_start(); - } - - if($echostr === 'done'){ - C::t('#wechat#mobile_wechat_authcode')->delete($authcode['sid']); - } - - include template('common/header_ajax'); - echo $echostr; - include template('common/footer_ajax'); - exit; -} - -if($_G['cookie']['qrauth']) { - $qrauth = authcode(base64_decode($_G['cookie']['qrauth']), 'DECODE', $_G['config']['security']['authkey']); -} - -if(!$_G['wechat']['setting']['wechat_qrtype']) { - require_once DISCUZ_ROOT . './source/plugin/wechat/wechat.lib.class.php'; - require_once DISCUZ_ROOT . './source/plugin/wechat/wsq.class.php'; - list($isqrapi, $qrcodeurl, $codeenc, $code) = WeChat::getqrcode(); - wsq::report('siteqrshow'); -} - -if($_G['uid'] && !$qrauth && in_array('qqconnect', $_G['setting']['plugins']['available'])) { - $connect = C::t('#qqconnect#common_member_connect')->fetch($_G['uid']); - if($connect['conisregister']) { - if(!$_G['wechat']['setting']['wechat_qrtype']) { - $qrauth = true; - } else { - showmessage('', 'plugin.php?id=wechat:login', array(), array('redirectmsg' => 1, 'location' => 1)); - } - - } -} - -include_once template('wechat:wechat_qrcode'); \ No newline at end of file diff --git a/upload/source/plugin/wechat/connect.inc.php b/upload/source/plugin/wechat/connect.inc.php deleted file mode 100644 index 18d602a8..00000000 --- a/upload/source/plugin/wechat/connect.inc.php +++ /dev/null @@ -1,248 +0,0 @@ -connectMergeMember(); - } else { - showmessage('submit_invalid'); - } - } - - $callback = $_G['connect']['callback_url'] . '&referer=' . urlencode($_GET['referer']); - - if(!$_G['setting']['connect']['oauth2']) { - dsetcookie('con_request_token'); - dsetcookie('con_request_token_secret'); - try { - $response = $connectOAuthClient->connectGetRequestToken($callback); - } catch(Exception $e) { - showmessage('qqconnect:connect_get_request_token_failed_code', $referer, array('codeMessage' => getErrorMessage($e->getmessage()), 'code' => $e->getmessage())); - } - - $request_token = $response['oauth_token']; - $request_token_secret = $response['oauth_token_secret']; - - dsetcookie('con_request_token', $request_token); - dsetcookie('con_request_token_secret', $request_token_secret); - - $redirect = $connectOAuthClient->getOAuthAuthorizeURL($request_token); - if(defined('IN_MOBILE') || $_GET['oauth_style'] == 'mobile') { - $redirect .= '&oauth_style=mobile'; - } - } else { - try { - dsetcookie('con_request_uri', $callback); - $redirect = $connectOAuthClient->getOAuthAuthorizeURL_V2($callback); - if(defined('IN_MOBILE') || $_GET['oauth_style'] == 'mobile') { - $redirect .= '&display=mobile'; - } - } catch(Exception $e) { - showmessage('qqconnect:connect_get_request_token_failed_code', $referer, array('codeMessage' => getErrorMessage($e->getmessage()), 'code' => $e->getmessage())); - } - } - - dheader('Location:' . $redirect); - -} elseif($op == 'callback') { - - $params = $_GET; - - if(!isset($params['receive'])) { - require_once DISCUZ_ROOT.'/source/plugin/qqconnect/lib/Util.php'; - $utilService = new Cloud_Service_Util(); - echo ''; - exit; - } - - if(!$_G['setting']['connect']['oauth2']) { - try { - $response = $connectOAuthClient->connectGetAccessToken($params, $_G['cookie']['con_request_token_secret']); - } catch(Exception $e) { - showmessage('qqconnect:connect_get_access_token_failed_code', $referer, array('codeMessage' => getErrorMessage($e->getmessage()), 'code' => $e->getmessage())); - } - - dsetcookie('con_request_token'); - dsetcookie('con_request_token_secret'); - - $conuin = $response['oauth_token']; - $conuinsecret = $response['oauth_token_secret']; - $conopenid = strtoupper($response['openid']); - if(!$conuin || !$conuinsecret || !$conopenid) { - showmessage('qqconnect:connect_get_access_token_failed_code', $referer); - } - } else { - if($_GET['state'] != md5(FORMHASH)){ - showmessage('qqconnect:connect_get_access_token_failed', $referer); - } - try { - $response = $connectOAuthClient->connectGetOpenId_V2($_G['cookie']['con_request_uri'], $_GET['code']); - } catch(Exception $e) { - showmessage('qqconnect:connect_get_access_token_failed_code', $referer, array('codeMessage' => getErrorMessage($e->getmessage()), 'code' => $e->getmessage())); - } - - dsetcookie('con_request_token'); - dsetcookie('con_request_token_secret'); - - $conuintoken = $response['access_token']; - $conopenid = strtoupper($response['openid']); - if(!$conuintoken || !$conopenid) { - showmessage('qqconnect:connect_get_access_token_failed', $referer); - } - } - - loadcache('connect_blacklist'); - if(in_array($conopenid, array_map('strtoupper', $_G['cache']['connect_blacklist']))) { - $change_qq_url = $_G['connect']['discuz_change_qq_url']; - showmessage('qqconnect:connect_uin_in_blacklist', $referer, array('changeqqurl' => $change_qq_url)); - } - - if($params['uin']) { - $old_conuin = $params['uin']; - } - - $is_notify = true; - - $conispublishfeed = 0; - $conispublisht = 0; - - $is_user_info = 1; - $is_feed = 1; - - $user_auth_fields = 1; - - $cookie_expires = 2592000; - dsetcookie('client_created', TIMESTAMP, $cookie_expires); - dsetcookie('client_token', $conopenid, $cookie_expires); - - $connect_member = array(); - $fields = array('uid', 'conuin', 'conuinsecret', 'conopenid'); - if($old_conuin) { - $connect_member = C::t('#qqconnect#common_member_connect')->fetch_fields_by_openid($old_conuin, $fields); - } - if(empty($connect_member)) { - $connect_member = C::t('#qqconnect#common_member_connect')->fetch_fields_by_openid($conopenid, $fields); - } - if($connect_member) { - $member = getuserbyuid($connect_member['uid']); - if($member) { - if(!$member['conisbind']) { - C::t('#qqconnect#common_member_connect')->delete($connect_member['uid']); - unset($connect_member); - } else { - $connect_member['conisbind'] = $member['conisbind']; - } - } else { - C::t('#qqconnect#common_member_connect')->delete($connect_member['uid']); - unset($connect_member); - } - - $connect_is_unbind = $params['is_unbind'] == 1 ? 1 : 0; - - require_once DISCUZ_ROOT.'./source/plugin/wechat/wsq.class.php'; - if(method_exists('wsq', 'userloginUrl')) { - $_source = isset($refererarray['_source']) ? $refererarray['_source'] : ''; - if(!$_source && !empty($refererarray['openid']) && !empty($refererarray['openidsign'])) { - $loginUrl = wsq::userloginUrl($connect_member['uid'], $refererarray['openid'], $refererarray['openidsign']); - if(!C::t('#wechat#common_member_wechatmp')->fetch($connect_member['uid'])) { - C::t('#wechat#common_member_wechatmp')->insert(array('uid' => $connect_member['uid'], 'openid' => $refererarray['openid'], 'status' => 1), false, true); - } - } else { - $loginUrl = wsq::userloginUrl2($_G['uid']); - } - $referer .= '&loginUrl='.urlencode($loginUrl); - } - - C::t('#qqconnect#common_member_connect')->update($connect_member['uid'], - !$_G['setting']['connect']['oauth2'] ? array( - 'conuin' => $conuin, - 'conuinsecret' => $conuinsecret, - 'conopenid' => $conopenid, - 'conisfeed' => 1, - ) : array( - 'conuintoken' => $conuintoken, - 'conopenid' => $conopenid, - 'conisfeed' => 1, - ) - ); - - $params['mod'] = 'login'; - connect_login($connect_member); - - loadcache('usergroups'); - $usergroups = $_G['cache']['usergroups'][$_G['groupid']]['grouptitle']; - $param = array('username' => $_G['member']['username'], 'usergroup' => $_G['group']['grouptitle']); - - C::t('common_member_status')->update($connect_member['uid'], array('lastip'=>$_G['clientip'], 'lastvisit'=>TIMESTAMP, 'lastactivity' => TIMESTAMP)); - $ucsynlogin = ''; - if($_G['setting']['allowsynlogin']) { - loaducenter(); - $ucsynlogin = uc_user_synlogin($_G['uid']); - } - - dsetcookie('stats_qc_login', 3, 86400); - header('location: '.$referer); - exit; - - } else { - - header('location: '.$referer.'&loginErr=1001'); - exit; - - } - -} - -function connect_login($connect_member) { - global $_G; - - if(!($member = getuserbyuid($connect_member['uid'], 1))) { - return false; - } else { - if(isset($member['_inarchive'])) { - C::t('common_member_archive')->move_to_master($member['uid']); - } - } - - require_once libfile('function/member'); - $cookietime = 1296000; - setloginstatus($member, $cookietime); - - dsetcookie('connect_login', 1, $cookietime); - dsetcookie('connect_is_bind', '1', 31536000); - dsetcookie('connect_uin', $connect_member['conopenid'], 31536000); - return true; -} - -function getErrorMessage($errroCode) { - $str = sprintf('connect_error_code_%d', $errroCode); - - return lang('plugin/qqconnect', $str); -} \ No newline at end of file diff --git a/upload/source/plugin/wechat/discuz_plugin_wechat.xml b/upload/source/plugin/wechat/discuz_plugin_wechat.xml deleted file mode 100644 index 76e5e51a..00000000 --- a/upload/source/plugin/wechat/discuz_plugin_wechat.xml +++ /dev/null @@ -1,514 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 选择“认证服务号”服务的站长请在“开发者中心”的 OAuth2.0 网页授权设置处设置授权回调页面域名为本网站域名 - ]]> - 插件开发人员在设计新的微信及 Discuz! 微社区类插件前请务必仔细阅读《Discuz! 技术文库》中的内容 -
  • 开发技术交流,欢迎访问“Discuz! 开发者交流”论坛
  • - ]]>
    - 完善以下资料后,您的微社区将自动开通,开通后用户可以在微信内阅读您的论坛内容,发帖也将同步到您的论坛 -
  • 开通完成后,请将系统提供的微社区 URL 添加到微信自定义菜单或者设为关键词触发内容以便用户快速访问
  • -
  • 如果您的微社区始终无法开通,请确认您的网站处于公网环境下,并将“掌上论坛”插件升级到最新版本
  • -
  • 如果您的微社区无法正常发帖,请确认您的论坛当前版本已升级到最新 检查版本
  • - ]]>
    - 使用此功能前请先确定您的公众号是否拥有“自定义菜单”服务,只有拥有此服务的公众号才可使用此功能 -
  • 您可以设置最多 3 个菜单,每个菜单可以创建最多 7 个子菜单
  • -
  • 如果您希望在菜单中添加微社区的访问功能,请在“菜单KEY值 / 网页链接”中填写“{url}”
  • -
  • 菜单发布后,由于微信客户端缓存,需要24小时微信客户端才会展现出来
  • - ]]>
    - 此处可以设置微信公众号收到消息后的响应内容,默认由本插件自身控制,您可以自定义其中的内容 -
  • 如果您的公众号没有“自定义菜单”服务,并且希望在收到信息后响应微社区的访问功能,请在“响应内容”中填写“LOGIN_WSQ”
  • -
  • 我们允许其他插件接管此消息的控制权,请仔细阅读《Discuz! 技术文库》中的内容
  • - ]]>
    -
    扫描关注Discuz!官方微信

    获取官方最新动态 - ]]>
    - - - - - - - - - - - - - - - - - - - - - (如果您希望在插件后台使用微信关键词回复等功能,请把此栏中的内容填写到微信公众平台“开发者中心”设置中,不填写不会影响微社区正常使用)]]> - (如果您希望在插件后台设置微信自定义菜单并拥有公众号“开发者 ID”,请把该信息填写此栏目中)]]> - - - - - - - - - - {qrcode}]]> - - - - - - - - - - - 如何使用?]]> - - - - - - - - - - - - - - {sitelogo}]]> - - - - - - - - - - - - ]]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 点击这里]]> - - 使用线上应用前需要先在微社区应用平台(http://mp.wsq.qq.com/bindSite)绑定站点,已绑定的站点请直接管理应用(http://mp.wsq.qq.com)]]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 来自: 微社区]]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 由于微信接口限制,群发功能仅限认证服务号使用,订阅号请到微信公众平台后台使用相关功能 - ]]> - 通过群发素材添加的图文消息,在服务器保存时间为3天,三天后删除,所以您建立消息后应在三天内发出。 -
  • 群发用户组是微信中的用户分组,用户组后的数字为这个组的人数。
  • -
  • 群发内容:支持素材和纯文本两种格式。
  • -
  • 发送素材请使用选择素材,选择的素材必须包含图片。
  • -
  • 发送纯文本直接在群发素材框里选择即可。
  • - ]]>
    - - - - - - - - - - - - ]]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - ]]> - 请点击左上角返回微信聊天]]> - 请确认是否本人操作]]> - - {$_G[member][username]} 与微信绑定]]> - - - - - - - - - - - - - 互动赢积分]]> - - - - - {$post[voters]} 人点赞]]> - - - -
    - - -
    -
    diff --git a/upload/source/plugin/wechat/image/discuz_qr.jpg b/upload/source/plugin/wechat/image/discuz_qr.jpg deleted file mode 100644 index 1d1eb934..00000000 Binary files a/upload/source/plugin/wechat/image/discuz_qr.jpg and /dev/null differ diff --git a/upload/source/plugin/wechat/image/index.htm b/upload/source/plugin/wechat/image/index.htm deleted file mode 100644 index e69de29b..00000000 diff --git a/upload/source/plugin/wechat/image/share.png b/upload/source/plugin/wechat/image/share.png deleted file mode 100644 index 980be927..00000000 Binary files a/upload/source/plugin/wechat/image/share.png and /dev/null differ diff --git a/upload/source/plugin/wechat/image/wechat_bind.png b/upload/source/plugin/wechat/image/wechat_bind.png deleted file mode 100644 index 32451764..00000000 Binary files a/upload/source/plugin/wechat/image/wechat_bind.png and /dev/null differ diff --git a/upload/source/plugin/wechat/image/wechat_login.png b/upload/source/plugin/wechat/image/wechat_login.png deleted file mode 100644 index 6bf89d5c..00000000 Binary files a/upload/source/plugin/wechat/image/wechat_login.png and /dev/null differ diff --git a/upload/source/plugin/wechat/image/wsq.png b/upload/source/plugin/wechat/image/wsq.png deleted file mode 100644 index f69e5823..00000000 Binary files a/upload/source/plugin/wechat/image/wsq.png and /dev/null differ diff --git a/upload/source/plugin/wechat/index.htm b/upload/source/plugin/wechat/index.htm deleted file mode 100644 index e69de29b..00000000 diff --git a/upload/source/plugin/wechat/install.php b/upload/source/plugin/wechat/install.php deleted file mode 100644 index 630a0487..00000000 --- a/upload/source/plugin/wechat/install.php +++ /dev/null @@ -1,18 +0,0 @@ - \ No newline at end of file diff --git a/upload/source/plugin/wechat/install/checkupdate.inc.php b/upload/source/plugin/wechat/install/checkupdate.inc.php deleted file mode 100644 index 46e34a1c..00000000 --- a/upload/source/plugin/wechat/install/checkupdate.inc.php +++ /dev/null @@ -1,145 +0,0 @@ - '0', - 'wechat_qrtype' => '3', - 'wechat_token' => random(16), - 'wechat_allowregister' => '1', - 'wechat_allowfastregister' => '1', - 'wechat_disableregrule' => '1', - 'wechat_float_qrcode' => '1', - 'wechat_confirmtype' => '0', - 'wechat_newusergroupid' => $_G['setting']['newusergroupid'], - 'wsq_wapdefault' => 1, - 'wsq_global_banner' => 1, - ); - - require_once DISCUZ_ROOT.'./source/plugin/wechat/install/update.func.php'; - - runquery($sql); - updatetable($sql); - - foreach($settingdefault as $_key => $_default) { - if(!isset($setting[$_key])) { - $setting[$_key] = $_default; - } - } - $setting['RELEASE'] = PLUGIN_RELEASE; - - $settings = array('mobilewechat' => serialize($setting)); - C::t('common_setting')->update_batch($settings); - - C::t('common_plugin')->delete_by_identifier('mobileoem'); - - require_once DISCUZ_ROOT.'./source/plugin/wechat/wechat.lib.class.php'; - - $hook = WeChatHook::getAPIHook('wechat'); - if(!$hook) { - WeChatHook::updateAPIHook(array( - array('forumdisplay_variables' => array('plugin' => 'wechat', 'include' => 'wsqapi.class.php', 'class' => 'WSQAPI', 'method' => 'forumdisplay_variables')), - array('viewthread_variables' => array('plugin' => 'wechat', 'include' => 'wsqapi.class.php', 'class' => 'WSQAPI', 'method' => 'viewthread_variables')), - )); - } elseif($hook['wsqindex']) { - WeChatHook::updateAPIHook(array( - array('wsqindex_variables' => array('plugin' => 'wechat')), - )); - } - - DB::query("ALTER TABLE ".DB::table('forum_debatepost')." ADD INDEX `voters` (`tid`,`voters`)", 'SILENT'); - - $pluginupdated = true; - -} - -?> \ No newline at end of file diff --git a/upload/source/plugin/wechat/install/index.htm b/upload/source/plugin/wechat/install/index.htm deleted file mode 100644 index e69de29b..00000000 diff --git a/upload/source/plugin/wechat/install/update.func.php b/upload/source/plugin/wechat/install/update.func.php deleted file mode 100644 index 0827d76a..00000000 --- a/upload/source/plugin/wechat/install/update.func.php +++ /dev/null @@ -1,165 +0,0 @@ - $_G['config']['db']['1']['dbcharset'], - 'charset' => $_G['config']['output']['charset'], - 'tablepre' => $_G['config']['db']['1']['tablepre'] - ); - - preg_match_all("/CREATE\s+TABLE.+?pre\_(.+?)\s*\((.+?)\)\s*(ENGINE|TYPE)\s*=\s*(\w+)/is", $sql, $matches); - $newtables = empty($matches[1])?array():$matches[1]; - $newsqls = empty($matches[0])?array():$matches[0]; - if(empty($newtables) || empty($newsqls)) { - return array(1); - } - - foreach($newtables as $i => $newtable) { - $newcols = updatetable_getcolumn($newsqls[$i]); - - if(!$query = DB::query("SHOW CREATE TABLE ".DB::table($newtable), 'SILENT')) { - preg_match("/(CREATE TABLE .+?)\s*(ENGINE|TYPE)\s*=\s*(\w+)/is", $newsqls[$i], $maths); - - $maths[3] = strtoupper($maths[3]); - if($maths[3] == 'MEMORY' || $maths[3] == 'HEAP') { - $type = " ENGINE=MEMORY".(empty($config['dbcharset'])?'':" DEFAULT CHARSET={$config['dbcharset']}" ); - } else { - $type = " ENGINE=INNODB".(empty($config['dbcharset'])?'':" DEFAULT CHARSET={$config['dbcharset']}" ); - } - $usql = $maths[1].$type; - - $usql = str_replace("CREATE TABLE IF NOT EXISTS pre_", 'CREATE TABLE IF NOT EXISTS '.$config['tablepre'], $usql); - $usql = str_replace("CREATE TABLE pre_", 'CREATE TABLE '.$config['tablepre'], $usql); - - if(!DB::query($usql, 'SILENT')) { - return array(-1, $newtable); - } - } else { - $value = DB::fetch($query); - $oldcols = updatetable_getcolumn($value['Create Table']); - - $updates = array(); - $allfileds =array_keys($newcols); - foreach ($newcols as $key => $value) { - if($key == 'PRIMARY') { - if($value != $oldcols[$key]) { - if(!empty($oldcols[$key])) { - $usql = "RENAME TABLE ".DB::table($newtable)." TO ".DB::table($newtable.'_bak'); - if(!DB::query($usql, 'SILENT')) { - return array(-1, $newtable); - } - } - $updates[] = "ADD PRIMARY KEY $value"; - } - } elseif ($key == 'KEY') { - foreach ($value as $subkey => $subvalue) { - if(!empty($oldcols['KEY'][$subkey])) { - if($subvalue != $oldcols['KEY'][$subkey]) { - $updates[] = "DROP INDEX `$subkey`"; - $updates[] = "ADD INDEX `$subkey` $subvalue"; - } - } else { - $updates[] = "ADD INDEX `$subkey` $subvalue"; - } - } - } elseif ($key == 'UNIQUE') { - foreach ($value as $subkey => $subvalue) { - if(!empty($oldcols['UNIQUE'][$subkey])) { - if($subvalue != $oldcols['UNIQUE'][$subkey]) { - $updates[] = "DROP INDEX `$subkey`"; - $updates[] = "ADD UNIQUE INDEX `$subkey` $subvalue"; - } - } else { - $usql = "ALTER TABLE ".DB::table($newtable)." DROP INDEX `$subkey`"; - DB::query($usql, 'SILENT'); - $updates[] = "ADD UNIQUE INDEX `$subkey` $subvalue"; - } - } - } else { - if(!empty($oldcols[$key])) { - if(strtolower($value) != strtolower($oldcols[$key])) { - $updates[] = "CHANGE `$key` `$key` $value"; - } - } else { - $i = array_search($key, $allfileds); - $fieldposition = $i > 0 ? 'AFTER `'.$allfileds[$i-1].'`' : 'FIRST'; - $updates[] = "ADD `$key` $value $fieldposition"; - } - } - } - - if(!empty($updates)) { - $usql = "ALTER TABLE ".DB::table($newtable)." ".implode(', ', $updates); - if(!DB::query($usql, 'SILENT')) { - return array(-1, $newtable); - } - } - } - } - return array(1); - } - - function updatetable_getcolumn($creatsql) { - - $creatsql = preg_replace("/ COMMENT '.*?'/i", '', $creatsql); - preg_match("/\((.+)\)\s*(ENGINE|TYPE)\s*\=/is", $creatsql, $matchs); - - $cols = explode("\n", $matchs[1]); - $newcols = array(); - foreach ($cols as $value) { - $value = trim($value); - if(empty($value)) continue; - $value = updatetable_remakesql($value); - if(substr($value, -1) == ',') $value = substr($value, 0, -1); - - $vs = explode(' ', $value); - $cname = $vs[0]; - - if($cname == 'KEY' || $cname == 'INDEX' || $cname == 'UNIQUE') { - - $name_length = strlen($cname); - if($cname == 'UNIQUE') $name_length = $name_length + 4; - - $subvalue = trim(substr($value, $name_length)); - $subvs = explode(' ', $subvalue); - $subcname = $subvs[0]; - $newcols[$cname][$subcname] = trim(substr($value, ($name_length+2+strlen($subcname)))); - - } elseif($cname == 'PRIMARY') { - - $newcols[$cname] = trim(substr($value, 11)); - - } else { - - $newcols[$cname] = trim(substr($value, strlen($cname))); - } - } - return $newcols; - } - - function updatetable_remakesql($value) { - $value = trim(preg_replace("/\s+/", ' ', $value)); - $value = str_replace(array('`',', ', ' ,', '( ' ,' )', 'mediumtext'), array('', ',', ',','(',')','text'), $value); - return $value; - } - -} - -?> \ No newline at end of file diff --git a/upload/source/plugin/wechat/js/highcharts.js b/upload/source/plugin/wechat/js/highcharts.js deleted file mode 100644 index 1d69a862..00000000 --- a/upload/source/plugin/wechat/js/highcharts.js +++ /dev/null @@ -1,272 +0,0 @@ -/* - Highcharts JS v3.0.2 (2013-06-05) - - (c) 2009-2013 Torstein H?nsi - - License: www.highcharts.com/license -*/ -(function(){function v(a,b){var c;a||(a={});for(c in b)a[c]=b[c];return a}function x(){var a,b=arguments.length,c={},d=function(a,b){var c,h;for(h in b)b.hasOwnProperty(h)&&(c=b[h],typeof a!=="object"&&(a={}),a[h]=c&&typeof c==="object"&&Object.prototype.toString.call(c)!=="[object Array]"&&typeof c.nodeType!=="number"?d(a[h]||{},c):b[h]);return a};for(a=0;a3?c.length%3:0;return e+(g?c.substr(0,g)+d:"")+c.substr(g).replace(/(\d{3})(?=\d)/g,"$1"+d)+(f?b+Q(a-c).toFixed(f).slice(2):"")}function va(a,b){return Array((b||2)+1-String(a).length).join(0)+a}function zb(a,b,c){var d=a[b];a[b]=function(){var a=Array.prototype.slice.call(arguments);a.unshift(d);return c.apply(this,a)}}function wa(a,b){for(var c="{", -d=!1,e,f,g,h,i,j=[];(c=a.indexOf(c))!==-1;){e=a.slice(0,c);if(d){f=e.split(":");g=f.shift().split(".");i=g.length;e=b;for(h=0;h-1?h.thousandsSep:"")):e=Ua(f,e)}j.push(e);a=a.slice(c+1);c=(d=!d)?"}":"{"}j.push(a);return j.join("")}function ib(a,b,c,d){var e,c=o(c,1);e=a/c;b||(b=[1,2,2.5,5,10],d&&d.allowDecimals===!1&&(c===1?b=[1,2,5,10]:c<=0.1&&(b= -[1/c])));for(d=0;d=E[jb]&&(i.setMilliseconds(0),i.setSeconds(j>=E[Va]?0:k*T(i.getSeconds()/k)));if(j>=E[Va])i[Db](j>=E[Oa]?0:k*T(i[kb]()/k));if(j>=E[Oa])i[Eb](j>=E[oa]?0:k*T(i[lb]()/k));if(j>=E[oa])i[mb](j>=E[Pa]?1:k*T(i[Qa]()/k));j>=E[Pa]&&(i[Fb](j>=E[xa]?0:k*T(i[Xa]()/k)),h=i[Ya]());j>=E[xa]&&(h-=h%k,i[Gb](h));if(j===E[Wa])i[mb](i[Qa]()-i[nb]()+o(d,1));b=1;h=i[Ya]();for(var d=i.getTime(),m=i[Xa](), -l=i[Qa](),p=g?0:(864E5+i.getTimezoneOffset()*6E4)%864E5;dc&&(c=a[b]);return c}function Ha(a,b){for(var c in a)a[c]&&a[c]!==b&&a[c].destroy&&a[c].destroy(),delete a[c]}function Ra(a){$a||($a=U(ya));a&&$a.appendChild(a);$a.innerHTML=""}function qa(a,b){var c="Highcharts error #"+a+": www.highcharts.com/errors/"+a;if(b)throw c;else O.console&&console.log(c)}function ia(a){return parseFloat(a.toPrecision(14))}function Ia(a,b){za=o(a,b.animation)} -function Jb(){var a=N.global.useUTC,b=a?"getUTC":"get",c=a?"setUTC":"set";Za=a?Date.UTC:function(a,b,c,g,h,i){return(new Date(a,b,o(c,1),o(g,0),o(h,0),o(i,0))).getTime()};kb=b+"Minutes";lb=b+"Hours";nb=b+"Day";Qa=b+"Date";Xa=b+"Month";Ya=b+"FullYear";Db=c+"Minutes";Eb=c+"Hours";mb=c+"Date";Fb=c+"Month";Gb=c+"FullYear"}function ra(){}function Ja(a,b,c,d){this.axis=a;this.pos=b;this.type=c||"";this.isNew=!0;!c&&!d&&this.addLabel()}function pb(a,b){this.axis=a;if(b)this.options=b,this.id=b.id}function Kb(a, -b,c,d,e,f){var g=a.chart.inverted;this.axis=a;this.isNegative=c;this.options=b;this.x=d;this.stack=e;this.percent=f==="percent";this.alignOptions={align:b.align||(g?c?"left":"right":"center"),verticalAlign:b.verticalAlign||(g?"middle":c?"bottom":"top"),y:o(b.y,g?4:c?14:-6),x:o(b.x,g?c?-6:6:0)};this.textAlign=b.textAlign||(g?c?"right":"left":"center")}function ab(){this.init.apply(this,arguments)}function qb(){this.init.apply(this,arguments)}function rb(a,b){this.init(a,b)}function sb(a,b){this.init(a, -b)}function tb(){this.init.apply(this,arguments)}var y,z=document,O=window,I=Math,t=I.round,T=I.floor,ja=I.ceil,q=I.max,K=I.min,Q=I.abs,Y=I.cos,ca=I.sin,Ka=I.PI,bb=Ka*2/360,Aa=navigator.userAgent,Lb=O.opera,Fa=/msie/i.test(Aa)&&!Lb,cb=z.documentMode===8,db=/AppleWebKit/.test(Aa),eb=/Firefox/.test(Aa),Mb=/(Mobile|Android|Windows Phone)/.test(Aa),sa="http://www.w3.org/2000/svg",Z=!!z.createElementNS&&!!z.createElementNS(sa,"svg").createSVGRect,Sb=eb&&parseInt(Aa.split("Firefox/")[1],10)<4,$=!Z&&!Fa&& -!!z.createElement("canvas").getContext,Sa,fb=z.documentElement.ontouchstart!==y,Nb={},ub=0,$a,N,Ua,za,vb,E,ta=function(){},Ba=[],ya="div",S="none",Ob="rgba(192,192,192,"+(Z?1.0E-4:0.002)+")",Bb="millisecond",jb="second",Va="minute",Oa="hour",oa="day",Wa="week",Pa="month",xa="year",Pb="stroke-width",Za,kb,lb,nb,Qa,Xa,Ya,Db,Eb,mb,Fb,Gb,aa={};O.Highcharts=O.Highcharts?qa(16,!0):{};Ua=function(a,b,c){if(!r(b)||isNaN(b))return"Invalid date";var a=o(a,"%Y-%m-%d %H:%M:%S"),d=new Date(b),e,f=d[lb](),g=d[nb](), -h=d[Qa](),i=d[Xa](),j=d[Ya](),k=N.lang,m=k.weekdays,d=v({a:m[g].substr(0,3),A:m[g],d:va(h),e:h,b:k.shortMonths[i],B:k.months[i],m:va(i+1),y:j.toString().substr(2,2),Y:j,H:va(f),I:va(f%12||12),l:f%12||12,M:va(d[kb]()),p:f<12?"AM":"PM",P:f<12?"am":"pm",S:va(d.getSeconds()),L:va(t(b%1E3),3)},Highcharts.dateFormats);for(e in d)for(;a.indexOf("%"+e)!==-1;)a=a.replace("%"+e,typeof d[e]==="function"?d[e](b):d[e]);return c?a.substr(0,1).toUpperCase()+a.substr(1):a};Hb.prototype={wrapColor:function(a){if(this.color>= -a)this.color=0},wrapSymbol:function(a){if(this.symbol>=a)this.symbol=0}};E=function(){for(var a=0,b=arguments,c=b.length,d={};a-1,f=e?7:3,g,b=b.split(" "),c=[].concat(c),h,i,j=function(a){for(g=a.length;g--;)a[g]==="M"&&a.splice(g+1,0,a[g+1],a[g+2],a[g+1],a[g+2])};e&&(j(b),j(c));a.isArea&&(h=b.splice(b.length-6,6),i=c.splice(c.length- -6,6));if(d<=c.length/f)for(;d--;)c=[].concat(c).splice(0,f).concat(c);a.shift=0;if(b.length)for(a=c.length;b.length{point.key}
    ',pointFormat:'{series.name}: {point.y}
    ',shadow:!0,snap:Mb?25:10,style:{color:"#333333",cursor:"default",fontSize:"12px",padding:"8px",whiteSpace:"nowrap"}},credits:{enabled:!0,text:"",href:"http://www.", -position:{align:"right",x:-10,verticalAlign:"bottom",y:-5},style:{cursor:"pointer",color:"#909090",fontSize:"9px"}}};var X=N.plotOptions,W=X.line;Jb();var ma=function(a){var b=[],c,d;(function(a){a&&a.stops?d=La(a.stops,function(a){return ma(a[1])}):(c=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]?(?:\.[0-9]+)?)\s*\)/.exec(a))?b=[u(c[1]),u(c[2]),u(c[3]),parseFloat(c[4],10)]:(c=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(a))?b=[u(c[1],16),u(c[2],16),u(c[3], -16),1]:(c=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(a))&&(b=[u(c[1]),u(c[2]),u(c[3]),1])})(a);return{get:function(c){var f;d?(f=x(a),f.stops=[].concat(f.stops),n(d,function(a,b){f.stops[b]=[f.stops[b][0],a.get(c)]})):f=b&&!isNaN(b[0])?c==="rgb"?"rgb("+b[0]+","+b[1]+","+b[2]+")":c==="a"?b[3]:"rgba("+b.join(",")+")":a;return f},brighten:function(a){if(d)n(d,function(b){b.brighten(a)});else if(Ea(a)&&a!==0){var c;for(c=0;c<3;c++)b[c]+=u(a*255),b[c]<0&&(b[c]=0),b[c]>255&& -(b[c]=255)}return this},rgba:b,setOpacity:function(a){b[3]=a;return this}}};ra.prototype={init:function(a,b){this.element=b==="span"?U(b):z.createElementNS(sa,b);this.renderer=a;this.attrSetters={}},opacity:1,animate:function(a,b,c){b=o(b,za,!0);Ta(this);if(b){b=x(b);if(c)b.complete=c;wb(this,a,b)}else this.attr(a),c&&c()},attr:function(a,b){var c,d,e,f,g=this.element,h=g.nodeName.toLowerCase(),i=this.renderer,j,k=this.attrSetters,m=this.shadows,l,p,s=this;fa(a)&&r(b)&&(c=a,a={},a[c]=b);if(fa(a))c= -a,h==="circle"?c={x:"cx",y:"cy"}[c]||c:c==="strokeWidth"&&(c="stroke-width"),s=A(g,c)||this[c]||0,c!=="d"&&c!=="visibility"&&(s=parseFloat(s));else{for(c in a)if(j=!1,d=a[c],e=k[c]&&k[c].call(this,d,c),e!==!1){e!==y&&(d=e);if(c==="d")d&&d.join&&(d=d.join(" ")),/(NaN| {2}|^$)/.test(d)&&(d="M 0 0");else if(c==="x"&&h==="text")for(e=0;el&&/[ \-]/.test(b.textContent||b.innerText))L(b,{width:l+"px",display:"block",whiteSpace:"normal"}),k=l;l=a.fontMetrics(b.style.fontSize).b; -B=s<0&&-k;w=p<0&&-m;xb=s*p<0;B+=p*l*(xb?1-h:h);w-=s*l*(j?xb?h:1-h:1);i&&(B-=k*h*(s<0?-1:1),j&&(w-=m*h*(p<0?-1:1)),L(b,{textAlign:g}));this.xCorr=B;this.yCorr=w}L(b,{left:e+B+"px",top:f+w+"px"});if(db)m=b.offsetHeight;this.cTT=G}}else this.alignOnAdd=!0},updateTransform:function(){var a=this.translateX||0,b=this.translateY||0,c=this.scaleX,d=this.scaleY,e=this.inverted,f=this.rotation;e&&(a+=this.attr("width"),b+=this.attr("height"));a=["translate("+a+","+b+")"];e?a.push("rotate(90) scale(-1,1)"): -f&&a.push("rotate("+f+" "+(this.x||0)+" "+(this.y||0)+")");(r(c)||r(d))&&a.push("scale("+o(c,1)+" "+o(d,1)+")");a.length&&A(this.element,"transform",a.join(" "))},toFront:function(){var a=this.element;a.parentNode.appendChild(a);return this},align:function(a,b,c){var d,e,f,g,h={};e=this.renderer;f=e.alignedObjects;if(a){if(this.alignOptions=a,this.alignByTranslate=b,!c||fa(c))this.alignTo=d=c||"renderer",ga(f,this),f.push(this),c=null}else a=this.alignOptions,b=this.alignByTranslate,d=this.alignTo; -c=o(c,e[d],e);d=a.align;e=a.verticalAlign;f=(c.x||0)+(a.x||0);g=(c.y||0)+(a.y||0);if(d==="right"||d==="center")f+=(c.width-(a.width||0))/{right:1,center:2}[d];h[b?"translateX":"x"]=t(f);if(e==="bottom"||e==="middle")g+=(c.height-(a.height||0))/({bottom:1,middle:2}[e]||1);h[b?"translateY":"y"]=t(g);this[this.placed?"animate":"attr"](h);this.placed=!0;this.alignAttr=h;return this},getBBox:function(){var a=this.bBox,b=this.renderer,c,d=this.rotation;c=this.element;var e=this.styles,f=d*bb;if(!a){if(c.namespaceURI=== -sa||b.forExport){try{a=c.getBBox?v({},c.getBBox()):{width:c.offsetWidth,height:c.offsetHeight}}catch(g){}if(!a||a.width<0)a={width:0,height:0}}else a=this.htmlGetBBox();if(b.isSVG){b=a.width;c=a.height;if(Fa&&e&&e.fontSize==="11px"&&c.toPrecision(3)==="22.7")a.height=c=14;if(d)a.width=Q(c*ca(f))+Q(b*Y(f)),a.height=Q(c*Y(f))+Q(b*ca(f))}this.bBox=a}return a},show:function(){return this.attr({visibility:"visible"})},hide:function(){return this.attr({visibility:"hidden"})},fadeOut:function(a){var b=this; -b.animate({opacity:0},{duration:a||150,complete:function(){b.hide()}})},add:function(a){var b=this.renderer,c=a||b,d=c.element||b.box,e=d.childNodes,f=this.element,g=A(f,"zIndex"),h;if(a)this.parentGroup=a;this.parentInverted=a&&a.inverted;this.textStr!==void 0&&b.buildText(this);if(g)c.handleZ=!0,g=u(g);if(c.handleZ)for(c=0;cg||!r(g)&&r(b))){d.insertBefore(f,a);h=!0;break}h||d.appendChild(f);this.added=!0;D(this,"add");return this},safeRemoveChild:function(a){var b= -a.parentNode;b&&b.removeChild(a)},destroy:function(){var a=this,b=a.element||{},c=a.shadows,d,e;b.onclick=b.onmouseout=b.onmouseover=b.onmousemove=b.point=null;Ta(a);if(a.clipPath)a.clipPath=a.clipPath.destroy();if(a.stops){for(e=0;e/g,'').replace(/<(i|em)>/g,'').replace(//g,"").split(//g),f=b.childNodes,g=/style="([^"]+)"/,h=/href="([^"]+)"/,i=A(b,"x"),j=a.styles,k=j&&j.width&&u(j.width),m=j&&j.lineHeight, -l=f.length;l--;)b.removeChild(f[l]);k&&!a.added&&this.box.appendChild(b);e[e.length-1]===""&&e.pop();n(e,function(e,f){var l,o=0,e=e.replace(//g,"|||");l=e.split("|||");n(l,function(e){if(e!==""||l.length===1){var p={},n=z.createElementNS(sa,"tspan"),q;g.test(e)&&(q=e.match(g)[1].replace(/(;| |^)color([ :])/,"$1fill$2"),A(n,"style",q));h.test(e)&&!d&&(A(n,"onclick",'location.href="'+e.match(h)[1]+'"'),L(n,{cursor:"pointer"}));e=(e.replace(/<(.|\n)*?>/g, -"")||" ").replace(/</g,"<").replace(/>/g,">");n.appendChild(z.createTextNode(e));o?p.dx=0:p.x=i;A(n,p);!o&&f&&(!Z&&d&&L(n,{display:"block"}),A(n,"dy",m||c.fontMetrics(/px$/.test(n.style.fontSize)?n.style.fontSize:j.fontSize).h,db&&n.offsetHeight));b.appendChild(n);o++;if(k)for(var e=e.replace(/([^\^])-/g,"$1- ").split(" "),r,t=[];e.length||t.length;)delete a.bBox,r=a.getBBox().width,p=r>k,!p||e.length===1?(e=t,t=[],e.length&&(n=z.createElementNS(sa,"tspan"),A(n,{dy:m||16,x:i}),q&&A(n,"style", -q),b.appendChild(n),r>k&&(k=r))):(n.removeChild(n.firstChild),t.unshift(e.pop())),e.length&&n.appendChild(z.createTextNode(e.join(" ").replace(/- /g,"-")))}})})},button:function(a,b,c,d,e,f,g){var h=this.label(a,b,c,null,null,null,null,null,"button"),i=0,j,k,m,l,p,a={x1:0,y1:0,x2:0,y2:1},e=x({"stroke-width":1,stroke:"#CCCCCC",fill:{linearGradient:a,stops:[[0,"#FEFEFE"],[1,"#F6F6F6"]]},r:2,padding:5,style:{color:"black"}},e);m=e.style;delete e.style;f=x(e,{stroke:"#68A",fill:{linearGradient:a,stops:[[0, -"#FFF"],[1,"#ACF"]]}},f);l=f.style;delete f.style;g=x(e,{stroke:"#68A",fill:{linearGradient:a,stops:[[0,"#9BD"],[1,"#CDF"]]}},g);p=g.style;delete g.style;J(h.element,"mouseenter",function(){h.attr(f).css(l)});J(h.element,"mouseleave",function(){j=[e,f,g][i];k=[m,l,p][i];h.attr(j).css(k)});h.setState=function(a){(i=a)?a===2&&h.attr(g).css(p):h.attr(e).css(m)};return h.on("click",function(){d.call(h)}).attr(e).css(v({cursor:"default"},m))},crispLine:function(a,b){a[1]===a[4]&&(a[1]=a[4]=t(a[1])-b%2/ -2);a[2]===a[5]&&(a[2]=a[5]=t(a[2])+b%2/2);return a},path:function(a){var b={fill:S};Da(a)?b.d=a:V(a)&&v(b,a);return this.createElement("path").attr(b)},circle:function(a,b,c){a=V(a)?a:{x:a,y:b,r:c};return this.createElement("circle").attr(a)},arc:function(a,b,c,d,e,f){if(V(a))b=a.y,c=a.r,d=a.innerR,e=a.start,f=a.end,a=a.x;return this.symbol("arc",a||0,b||0,c||0,c||0,{innerR:d||0,start:e||0,end:f||0})},rect:function(a,b,c,d,e,f){e=V(a)?a.r:e;e=this.createElement("rect").attr({rx:e,ry:e,fill:S});return e.attr(V(a)? -a:e.crisp(f,a,b,q(c,0),q(d,0)))},setSize:function(a,b,c){var d=this.alignedObjects,e=d.length;this.width=a;this.height=b;for(this.boxWrapper[o(c,!0)?"animate":"attr"]({width:a,height:b});e--;)d[e].align()},g:function(a){var b=this.createElement("g");return r(a)?b.attr({"class":"highcharts-"+a}):b},image:function(a,b,c,d,e){var f={preserveAspectRatio:S};arguments.length>1&&v(f,{x:b,y:c,width:d,height:e});f=this.createElement("image").attr(f);f.element.setAttributeNS?f.element.setAttributeNS("http://www.w3.org/1999/xlink", -"href",a):f.element.setAttribute("hc-svg-href",a);return f},symbol:function(a,b,c,d,e,f){var g,h=this.symbols[a],h=h&&h(t(b),t(c),d,e,f),i=/^url\((.*?)\)$/,j,k;if(h)g=this.path(h),v(g,{symbolName:a,x:b,y:c,width:d,height:e}),f&&v(g,f);else if(i.test(a))k=function(a,b){a.element&&(a.attr({width:b[0],height:b[1]}),a.alignByTranslate||a.translate(t((d-b[0])/2),t((e-b[1])/2)))},j=a.match(i)[1],a=Nb[j],g=this.image(j).attr({x:b,y:c}),g.isImg=!0,a?k(g,a):(g.attr({width:0,height:0}),U("img",{onload:function(){k(g, -Nb[j]=[this.width,this.height])},src:j}));return g},symbols:{circle:function(a,b,c,d){var e=0.166*c;return["M",a+c/2,b,"C",a+c+e,b,a+c+e,b+d,a+c/2,b+d,"C",a-e,b+d,a-e,b,a+c/2,b,"Z"]},square:function(a,b,c,d){return["M",a,b,"L",a+c,b,a+c,b+d,a,b+d,"Z"]},triangle:function(a,b,c,d){return["M",a+c/2,b,"L",a+c,b+d,a,b+d,"Z"]},"triangle-down":function(a,b,c,d){return["M",a,b,"L",a+c,b,a+c/2,b+d,"Z"]},diamond:function(a,b,c,d){return["M",a+c/2,b,"L",a+c,b+d/2,a+c/2,b+d,a,b+d/2,"Z"]},arc:function(a,b,c,d, -e){var f=e.start,c=e.r||c||d,g=e.end-0.001,d=e.innerR,h=e.open,i=Y(f),j=ca(f),k=Y(g),g=ca(g),e=e.end-f');if(b)c=e||b==="span"||b==="img"?c.join(""):a.prepVML(c),this.element=U(c);this.renderer=a;this.attrSetters= -{}},add:function(a){var b=this.renderer,c=this.element,d=b.box,d=a?a.element||a:d;a&&a.inverted&&b.invertChild(c,d);d.appendChild(c);this.added=!0;this.alignOnAdd&&!this.deferUpdateTransform&&this.updateTransform();D(this,"add");return this},updateTransform:ra.prototype.htmlUpdateTransform,attr:function(a,b){var c,d,e,f=this.element||{},g=f.style,h=f.nodeName,i=this.renderer,j=this.symbolName,k,m=this.shadows,l,p=this.attrSetters,s=this;fa(a)&&r(b)&&(c=a,a={},a[c]=b);if(fa(a))c=a,s=c==="strokeWidth"|| -c==="stroke-width"?this.strokeweight:this[c];else for(c in a)if(d=a[c],l=!1,e=p[c]&&p[c].call(this,d,c),e!==!1&&d!==null){e!==y&&(d=e);if(j&&/^(x|y|r|start|end|width|height|innerR|anchorX|anchorY)/.test(c))k||(this.symbolAttr(a),k=!0),l=!0;else if(c==="d"){d=d||[];this.d=d.join(" ");e=d.length;l=[];for(var o;e--;)if(Ea(d[e]))l[e]=t(d[e]*10)-5;else if(d[e]==="Z")l[e]="x";else if(l[e]=d[e],d.isArc&&(d[e]==="wa"||d[e]==="at"))o=d[e]==="wa"?1:-1,l[e+5]===l[e+7]&&(l[e+7]-=o),l[e+6]===l[e+8]&&(l[e+8]-= -o);d=l.join(" ")||"x";f.path=d;if(m)for(e=m.length;e--;)m[e].path=m[e].cutOff?this.cutOffPath(d,m[e].cutOff):d;l=!0}else if(c==="visibility"){if(m)for(e=m.length;e--;)m[e].style[c]=d;h==="DIV"&&(d=d==="hidden"?"-999em":0,cb||(g[c]=d?"visible":"hidden"),c="top");g[c]=d;l=!0}else if(c==="zIndex")d&&(g[c]=d),l=!0;else if(la(c,["x","y","width","height"])!==-1)this[c]=d,c==="x"||c==="y"?c={x:"left",y:"top"}[c]:d=q(0,d),this.updateClipping?(this[c]=d,this.updateClipping()):g[c]=d,l=!0;else if(c==="class"&& -h==="DIV")f.className=d;else if(c==="stroke")d=i.color(d,f,c),c="strokecolor";else if(c==="stroke-width"||c==="strokeWidth")f.stroked=d?!0:!1,c="strokeweight",this[c]=d,Ea(d)&&(d+="px");else if(c==="dashstyle")(f.getElementsByTagName("stroke")[0]||U(i.prepVML([""]),null,null,f))[c]=d||"solid",this.dashstyle=d,l=!0;else if(c==="fill")if(h==="SPAN")g.color=d;else{if(h!=="IMG")f.filled=d!==S?!0:!1,d=i.color(d,f,c,this),c="fillcolor"}else if(c==="opacity")l=!0;else if(h==="shape"&&c==="rotation")this[c]= -d,f.style.left=-t(ca(d*bb)+1)+"px",f.style.top=t(Y(d*bb))+"px";else if(c==="translateX"||c==="translateY"||c==="rotation")this[c]=d,this.updateTransform(),l=!0;else if(c==="text")this.bBox=null,f.innerHTML=d,l=!0;l||(cb?f[c]=d:A(f,c,d))}return s},clip:function(a){var b=this,c;a?(c=a.members,ga(c,b),c.push(b),b.destroyClip=function(){ga(c,b)},a=a.getCSS(b)):(b.destroyClip&&b.destroyClip(),a={clip:cb?"inherit":"rect(auto)"});return b.css(a)},css:ra.prototype.htmlCss,safeRemoveChild:function(a){a.parentNode&& -Ra(a)},destroy:function(){this.destroyClip&&this.destroyClip();return ra.prototype.destroy.apply(this)},on:function(a,b){this.element["on"+a]=function(){var a=O.event;a.target=a.srcElement;b(a)};return this},cutOffPath:function(a,b){var c,a=a.split(/[ ,]/);c=a.length;if(c===9||c===11)a[c-4]=a[c-2]=u(a[c-2])-10*b;return a.join(" ")},shadow:function(a,b,c){var d=[],e,f=this.element,g=this.renderer,h,i=f.style,j,k=f.path,m,l,p,s;k&&typeof k.value!=="string"&&(k="x");l=k;if(a){p=o(a.width,3);s=(a.opacity|| -0.15)/p;for(e=1;e<=3;e++){m=p*2+1-2*e;c&&(l=this.cutOffPath(k.value,m+0.5));j=[''];h=U(g.prepVML(j),null,{left:u(i.left)+o(a.offsetX,1),top:u(i.top)+o(a.offsetY,1)});if(c)h.cutOff=m+1;j=[''];U(g.prepVML(j),null,null,h);b?b.element.appendChild(h):f.parentNode.insertBefore(h,f);d.push(h)}this.shadows=d}return this}};F=ea(ra,F); -var na={Element:F,isIE8:Aa.indexOf("MSIE 8.0")>-1,init:function(a,b,c){var d,e;this.alignedObjects=[];d=this.createElement(ya);e=d.element;e.style.position="relative";a.appendChild(d.element);this.isVML=!0;this.box=e;this.boxWrapper=d;this.setSize(b,c,!1);if(!z.namespaces.hcv)z.namespaces.add("hcv","urn:schemas-microsoft-com:vml"),z.createStyleSheet().cssText="hcv\\:fill, hcv\\:path, hcv\\:shape, hcv\\:stroke{ behavior:url(#default#VML); display: inline-block; } "},isHidden:function(){return!this.box.offsetWidth}, -clipRect:function(a,b,c,d){var e=this.createElement(),f=V(a);return v(e,{members:[],left:f?a.x:a,top:f?a.y:b,width:f?a.width:c,height:f?a.height:d,getCSS:function(a){var b=a.element,c=b.nodeName,a=a.inverted,d=this.top-(c==="shape"?b.offsetTop:0),e=this.left,b=e+this.width,f=d+this.height,d={clip:"rect("+t(a?e:d)+"px,"+t(a?f:b)+"px,"+t(a?b:f)+"px,"+t(a?d:e)+"px)"};!a&&cb&&c==="DIV"&&v(d,{width:b+"px",height:f+"px"});return d},updateClipping:function(){n(e.members,function(a){a.css(e.getCSS(a))})}})}, -color:function(a,b,c,d){var e=this,f,g=/^rgba/,h,i,j=S;a&&a.linearGradient?i="gradient":a&&a.radialGradient&&(i="pattern");if(i){var k,m,l=a.linearGradient||a.radialGradient,p,s,o,B,w,q="",a=a.stops,r,t=[],y=function(){h=[''];U(e.prepVML(h),null,null,b)};p=a[0];r=a[a.length-1];p[0]>0&&a.unshift([0,p[1]]);r[0]<1&&a.push([1,r[1]]);n(a,function(a,b){g.test(a[1])?(f=ma(a[1]),k=f.get("rgb"), -m=f.get("a")):(k=a[1],m=1);t.push(a[0]*100+"% "+k);b?(o=m,B=k):(s=m,w=k)});if(c==="fill")if(i==="gradient")c=l.x1||l[0]||0,a=l.y1||l[1]||0,p=l.x2||l[2]||0,l=l.y2||l[3]||0,q='angle="'+(90-I.atan((l-a)/(p-c))*180/Ka)+'"',y();else{var j=l.r,v=j*2,P=j*2,H=l.cx,C=l.cy,x=b.radialReference,u,j=function(){x&&(u=d.getBBox(),H+=(x[0]-u.x)/u.width-0.5,C+=(x[1]-u.y)/u.height-0.5,v*=x[2]/u.width,P*=x[2]/u.height);q='src="'+N.global.VMLRadialGradientURL+'" size="'+v+","+P+'" origin="0.5,0.5" position="'+H+","+ -C+'" color2="'+w+'" ';y()};d.added?j():J(d,"add",j);j=B}else j=k}else if(g.test(a)&&b.tagName!=="IMG")f=ma(a),h=["<",c,' opacity="',f.get("a"),'"/>'],U(this.prepVML(h),null,null,b),j=f.get("rgb");else{j=b.getElementsByTagName(c);if(j.length)j[0].opacity=1,j[0].type="solid";j=a}return j},prepVML:function(a){var b=this.isIE8,a=a.join("");b?(a=a.replace("/>",' xmlns="urn:schemas-microsoft-com:vml" />'),a=a.indexOf('style="')===-1?a.replace("/>",' style="display:inline-block;behavior:url(#default#VML);" />'): -a.replace('style="','style="display:inline-block;behavior:url(#default#VML);')):a=a.replace("<","1&&f.attr({x:b,y:c,width:d,height:e});return f},rect:function(a,b,c,d,e,f){if(V(a))b=a.y,c=a.width,d=a.height,f=a.strokeWidth,a=a.x;var g=this.symbol("rect");g.r=e;return g.attr(g.crisp(f,a,b,q(c,0),q(d,0)))},invertChild:function(a,b){var c=b.style;L(a,{flip:"x",left:u(c.width)-1,top:u(c.height)-1,rotation:-90})},symbols:{arc:function(a,b,c,d,e){var f=e.start,g=e.end,h=e.r||c||d,c=e.innerR,d=Y(f),i=ca(f),j=Y(g), -k=ca(g);if(g-f===0)return["x"];f=["wa",a-h,b-h,a+h,b+h,a+h*d,b+h*i,a+h*j,b+h*k];e.open&&!c&&f.push("e","M",a,b);f.push("at",a-c,b-c,a+c,b+c,a+c*j,b+c*k,a+c*d,b+c*i,"x","e");f.isArc=!0;return f},circle:function(a,b,c,d,e){e&&e.isCircle&&(a-=c/2,b-=d/2);return["wa",a,b,a+c,b+d,a+c,b+d/2,a+c,b+d/2,"e"]},rect:function(a,b,c,d,e){var f=a+c,g=b+d,h;!r(e)||!e.r?f=Ca.prototype.symbols.square.apply(0,arguments):(h=K(e.r,c,d),f=["M",a+h,b,"L",f-h,b,"wa",f-2*h,b,f,b+2*h,f-h,b,f,b+h,"L",f,g-h,"wa",f-2*h,g-2* -h,f,g,f,g-h,f-h,g,"L",a+h,g,"wa",a,g-2*h,a+2*h,g,a+h,g,a,g-h,"L",a,b+h,"wa",a,b,a+2*h,b+2*h,a,b+h,a+h,b,"x","e"]);return f}}};Highcharts.VMLRenderer=F=function(){this.init.apply(this,arguments)};F.prototype=x(Ca.prototype,na);Sa=F}var Rb;if($)Highcharts.CanVGRenderer=F=function(){sa="http://www.w3.org/1999/xhtml"},F.prototype.symbols={},Rb=function(){function a(){var a=b.length,d;for(d=0;dj&&(c=!1)):h+k>l&&(h=l-k,d&&h+m0&&b.height>0){f=x({align:c&&k&&"center",x:c?!k&&4:10,verticalAlign:!c&&k&&"middle",y:c?k?16:10:k?6:-4,rotation:c&&!k&&90},f);if(!g)a.label=g=t.text(f.text,0,0).attr({align:f.textAlign||f.align,rotation:f.rotation,zIndex:w}).css(f.style).add();b=[s[1],s[4],o(s[6],s[1])];s=[s[2],s[5],o(s[7],s[2])];c=Ga(b);k=Ga(s);g.align(f,!1,{x:c,y:k,width:pa(b)-c,height:pa(s)-k});g.show()}else g&&g.hide(); -return a},destroy:function(){ga(this.axis.plotLinesAndBands,this);Ha(this,this.axis)}};Kb.prototype={destroy:function(){Ha(this,this.axis)},setTotal:function(a){this.cum=this.total=a},render:function(a){var b=this.options,c=b.format,c=c?wa(c,this):b.formatter.call(this);this.label?this.label.attr({text:c,visibility:"hidden"}):this.label=this.axis.chart.renderer.text(c,0,0,b.useHTML).css(b.style).attr({align:this.textAlign,rotation:b.rotation,visibility:"hidden"}).add(a)},setOffset:function(a,b){var c= -this.axis,d=c.chart,e=d.inverted,f=this.isNegative,g=c.translate(this.percent?100:this.total,0,0,0,1),c=c.translate(0),c=Q(g-c),h=d.xAxis[0].translate(this.x)+a,i=d.plotHeight,f={x:e?f?g:g-c:h,y:e?i-h-b:f?i-g-c:i-g,width:e?c:b,height:e?b:c};if(e=this.label)e.align(this.alignOptions,null,f),f=e.alignAttr,e.attr({visibility:this.options.crop===!1||d.isInsidePlot(f.x,f.y)?Z?"inherit":"visible":"hidden"})}};ab.prototype={defaultOptions:{dateTimeLabelFormats:{millisecond:"%H:%M:%S.%L",second:"%H:%M:%S", -minute:"%H:%M",hour:"%H:%M",day:"%e. %b",week:"%e. %b",month:"%b '%y",year:"%Y"},endOnTick:!1,gridLineColor:"#C0C0C0",labels:M,lineColor:"#C0D0E0",lineWidth:1,minPadding:0.01,maxPadding:0.01,minorGridLineColor:"#E0E0E0",minorGridLineWidth:1,minorTickColor:"#A0A0A0",minorTickLength:2,minorTickPosition:"outside",startOfWeek:1,startOnTick:!1,tickColor:"#C0D0E0",tickLength:5,tickmarkPlacement:"between",tickPixelInterval:100,tickPosition:"outside",tickWidth:1,title:{align:"middle",style:{color:"#4d759e", -fontWeight:"bold"}},type:"linear"},defaultYAxisOptions:{endOnTick:!0,gridLineWidth:1,tickPixelInterval:72,showLastLabel:!0,labels:{align:"right",x:-8,y:3},lineWidth:0,maxPadding:0.05,minPadding:0.05,startOnTick:!0,tickWidth:0,title:{rotation:270,text:"Values"},stackLabels:{enabled:!1,formatter:function(){return ua(this.total,-1)},style:M.style}},defaultLeftAxisOptions:{labels:{align:"right",x:-8,y:null},title:{rotation:270}},defaultRightAxisOptions:{labels:{align:"left",x:8,y:null},title:{rotation:90}}, -defaultBottomAxisOptions:{labels:{align:"center",x:0,y:14},title:{rotation:0}},defaultTopAxisOptions:{labels:{align:"center",x:0,y:-5},title:{rotation:0}},init:function(a,b){var c=b.isX;this.horiz=a.inverted?!c:c;this.xOrY=(this.isXAxis=c)?"x":"y";this.opposite=b.opposite;this.side=this.horiz?this.opposite?0:2:this.opposite?1:3;this.setOptions(b);var d=this.options,e=d.type;this.labelFormatter=d.labels.formatter||this.defaultLabelFormatter;this.staggerLines=this.horiz&&d.labels.staggerLines;this.userOptions= -b;this.minPixelPadding=0;this.chart=a;this.reversed=d.reversed;this.zoomEnabled=d.zoomEnabled!==!1;this.categories=d.categories||e==="category";this.isLog=e==="logarithmic";this.isDatetimeAxis=e==="datetime";this.isLinked=r(d.linkedTo);this.tickmarkOffset=this.categories&&d.tickmarkPlacement==="between"?0.5:0;this.ticks={};this.minorTicks={};this.plotLinesAndBands=[];this.alternateBands={};this.len=0;this.minRange=this.userMinRange=d.minRange||d.maxZoom;this.range=d.range;this.offset=d.offset||0; -this.stacks={};this._stacksTouched=0;this.min=this.max=null;var f,d=this.options.events;la(this,a.axes)===-1&&(a.axes.push(this),a[c?"xAxis":"yAxis"].push(this));this.series=this.series||[];if(a.inverted&&c&&this.reversed===y)this.reversed=!0;this.removePlotLine=this.removePlotBand=this.removePlotBandOrLine;for(f in d)J(this,f,d[f]);if(this.isLog)this.val2lin=ka,this.lin2val=da},setOptions:function(a){this.options=x(this.defaultOptions,this.isXAxis?{}:this.defaultYAxisOptions,[this.defaultTopAxisOptions, -this.defaultRightAxisOptions,this.defaultBottomAxisOptions,this.defaultLeftAxisOptions][this.side],x(N[this.isXAxis?"xAxis":"yAxis"],a))},update:function(a,b){var c=this.chart,a=c.options[this.xOrY+"Axis"][this.options.index]=x(this.userOptions,a);this.destroy();this._addedPlotLB=!1;this.init(c,a);c.isDirtyBox=!0;o(b,!0)&&c.redraw()},remove:function(a){var b=this.chart,c=this.xOrY+"Axis";n(this.series,function(a){a.remove(!1)});ga(b.axes,this);ga(b[c],this);b.options[c].splice(this.options.index, -1);n(b[c],function(a,b){a.options.index=b});this.destroy();b.isDirtyBox=!0;o(a,!0)&&b.redraw()},defaultLabelFormatter:function(){var a=this.axis,b=this.value,c=a.categories,d=this.dateTimeLabelFormat,e=N.lang.numericSymbols,f=e&&e.length,g,h=a.options.labels.format,a=a.isLog?b:a.tickInterval;if(h)g=wa(h,this);else if(c)g=b;else if(d)g=Ua(d,b);else if(f&&a>=1E3)for(;f--&&g===y;)c=Math.pow(1E3,f+1),a>=c&&e[f]!==null&&(g=ua(b/c,-1)+e[f]);g===y&&(g=b>=1E3?ua(b,0):ua(b,-1));return g},getSeriesExtremes:function(){var a= -this,b=a.chart,c=a.stacks,d=[],e=[],f=a._stacksTouched+=1,g,h;a.hasVisibleSeries=!1;a.dataMin=a.dataMax=null;n(a.series,function(g){if(g.visible||!b.options.chart.ignoreHiddenSeries){var j=g.options,k,m,l,p,s,n,B,w,G,t=j.threshold,v,u=[],x=0;a.hasVisibleSeries=!0;if(a.isLog&&t<=0)t=j.threshold=null;if(a.isXAxis){if(j=g.xData,j.length)a.dataMin=K(o(a.dataMin,j[0]),Ga(j)),a.dataMax=q(o(a.dataMax,j[0]),pa(j))}else{var P,H,C,A=g.cropped,z=g.xAxis.getExtremes(),E=!!g.modifyValue;k=j.stacking;a.usePercentage= -k==="percent";if(k)s=j.stack,p=g.type+o(s,""),n="-"+p,g.stackKey=p,m=d[p]||[],d[p]=m,l=e[n]||[],e[n]=l;if(a.usePercentage)a.dataMin=0,a.dataMax=99;j=g.processedXData;B=g.processedYData;v=B.length;for(h=0;h0))if(E&&(G=g.modifyValue(G)),g.getExtremesFromAll|| -A||(j[h+1]||w)>=z.min&&(j[h-1]||w)<=z.max)if(w=G.length)for(;w--;)G[w]!==null&&(u[x++]=G[w]);else u[x++]=G}if(!a.usePercentage&&u.length)g.dataMin=k=Ga(u),g.dataMax=g=pa(u),a.dataMin=K(o(a.dataMin,k),k),a.dataMax=q(o(a.dataMax,g),g);if(r(t))if(a.dataMin>=t)a.dataMin=t,a.ignoreMinPadding=!0;else if(a.dataMaxf+this.width)l=!0}else if(c=f,i=m-this.right,hg+this.height)l=!0;return l&&!d?null:e.renderer.crispLine(["M",c,h,"L",i,j],b||0)},getPlotBandPath:function(a,b){var c=this.getPlotLinePath(b),d=this.getPlotLinePath(a);d&&c?d.push(c[4], -c[5],c[1],c[2]):d=null;return d},getLinearTickPositions:function(a,b,c){for(var d,b=ia(T(b/a)*a),c=ia(ja(c/a)*a),e=[];b<=c;){e.push(b);b=ia(b+a);if(b===d)break;d=b}return e},getLogTickPositions:function(a,b,c,d){var e=this.options,f=this.len,g=[];if(!d)this._minorAutoInterval=null;if(a>=0.5)a=t(a),g=this.getLinearTickPositions(a,b,c);else if(a>=0.08)for(var f=T(b),h,i,j,k,m,e=a>0.3?[1,2,4]:a>0.15?[1,2,4,6,8]:[1,2,3,4,5,6,7,8,9];fb&&(!d|| -k<=c)&&g.push(k),k>c&&(m=!0),k=j}else if(b=da(b),c=da(c),a=e[d?"minorTickInterval":"tickInterval"],a=o(a==="auto"?null:a,this._minorAutoInterval,(c-b)*(e.tickPixelInterval/(d?5:1))/((d?f/this.tickPositions.length:f)||1)),a=ib(a,null,I.pow(10,T(I.log(a)/I.LN10))),g=La(this.getLinearTickPositions(a,b,c),ka),!d)this._minorAutoInterval=a/5;if(!d)this.tickInterval=a;return g},getMinorTickPositions:function(){var a=this.options,b=this.tickPositions,c=this.minorTickInterval,d=[],e;if(this.isLog){e=b.length; -for(a=1;a=this.minRange,f,g,h,i,j;if(this.isXAxis&&this.minRange===y&&!this.isLog)r(a.min)||r(a.max)?this.minRange=null:(n(this.series, -function(a){i=a.xData;for(g=j=a.xIncrement?1:i.length-1;g>0;g--)if(h=i[g]-i[g-1],f===y||hb&&(g=0);c=q(c,g);e=q(e,h?0:g/2);f=q(f,h==="on"?0:g);!a.noSharedTooltip&&r(m)&&(d=r(d)?K(d,m):m)}),g=this.ordinalSlope&&d?this.ordinalSlope/d:1,this.minPointOffset=e*=g,this.pointRangePadding=f*=g,this.pointRange=K(c,b),this.closestPointRange=d;if(a)this.oldTransA=h;this.translationSlope=this.transA=h=this.len/(b+f||1);this.transB=this.horiz?this.left:this.bottom;this.minPixelPadding= -h*e},setTickPositions:function(a){var b=this,c=b.chart,d=b.options,e=b.isLog,f=b.isDatetimeAxis,g=b.isXAxis,h=b.isLinked,i=b.options.tickPositioner,j=d.maxPadding,k=d.minPadding,m=d.tickInterval,l=d.minTickInterval,p=d.tickPixelInterval,s=b.categories;h?(b.linkedParent=c[g?"xAxis":"yAxis"][d.linkedTo],c=b.linkedParent.getExtremes(),b.min=o(c.min,c.dataMin),b.max=o(c.max,c.dataMax),d.type!==b.linkedParent.options.type&&qa(11,1)):(b.min=o(b.userMin,d.min,b.dataMin),b.max=o(b.userMax,d.max,b.dataMax)); -if(e)!a&&K(b.min,o(b.dataMin,b.min))<=0&&qa(10,1),b.min=ia(ka(b.min)),b.max=ia(ka(b.max));if(b.range&&(b.userMin=b.min=q(b.min,b.max-b.range),b.userMax=b.max,a))b.range=null;b.beforePadding&&b.beforePadding();b.adjustForMinRange();if(!s&&!b.usePercentage&&!h&&r(b.min)&&r(b.max)&&(c=b.max-b.min)){if(!r(d.min)&&!r(b.userMin)&&k&&(b.dataMin<0||!b.ignoreMinPadding))b.min-=c*k;if(!r(d.max)&&!r(b.userMax)&&j&&(b.dataMax>0||!b.ignoreMaxPadding))b.max+=c*j}b.tickInterval=b.min===b.max||b.min===void 0||b.max=== -void 0?1:h&&!m&&p===b.linkedParent.options.tickPixelInterval?b.linkedParent.tickInterval:o(m,s?1:(b.max-b.min)*p/(b.len||1));g&&!a&&n(b.series,function(a){a.processData(b.min!==b.oldMin||b.max!==b.oldMax)});b.setAxisTranslation(!0);b.beforeSetTickPositions&&b.beforeSetTickPositions();if(b.postProcessTickInterval)b.tickInterval=b.postProcessTickInterval(b.tickInterval);if(!m&&b.tickIntervale&&i.shift(),d.endOnTick?b.max=f:b.max+h(b[d]||0)&&this.options.alignTicks!==!1)b[d]=c.length;a.maxTicks=b},adjustTickAmount:function(){var a=this._maxTicksKey,b=this.tickPositions,c=this.chart.maxTicks;if(c&&c[a]&&!this.isDatetimeAxis&& -!this.categories&&!this.isLinked&&this.options.alignTicks!==!1){var d=this.tickAmount,e=b.length;this.tickAmount=a=c[a];if(e=this.dataMax&&(b=y));this.displayBtn=a!==y||b!==y;this.setExtremes(a,b,!1,y,{trigger:"zoom"});return!0},setAxisSize:function(){var a=this.chart,b=this.options,c=b.offsetLeft||0,d=b.offsetRight||0,e=this.horiz,f,g;this.left=g=o(b.left,a.plotLeft+c);this.top=f=o(b.top,a.plotTop);this.width=c=o(b.width,a.plotWidth-c+d);this.height=b=o(b.height,a.plotHeight); -this.bottom=a.chartHeight-b-f;this.right=a.chartWidth-c-g;this.len=q(e?c:b,0);this.pos=e?g:f},getExtremes:function(){var a=this.isLog;return{min:a?ia(da(this.min)):this.min,max:a?ia(da(this.max)):this.max,dataMin:this.dataMin,dataMax:this.dataMax,userMin:this.userMin,userMax:this.userMax}},getThreshold:function(a){var b=this.isLog,c=b?da(this.min):this.min,b=b?da(this.max):this.max;c>a||a===null?a=c:b=a.min&&b<=a.max)j[b]||(j[b]=new Ja(a,b)),w&&j[b].isNew&&j[b].render(c,!0),j[b].render(c,!1,1)}),s&&a.min===0&&(j[-1]||(j[-1]=new Ja(a,-1,null,!0)),j[-1].render(-1))), -p&&n(g,function(b,c){if(c%2===0&&b1||Q(b-f.y)>1))clearTimeout(this.tooltipTimeout),this.tooltipTimeout=setTimeout(function(){e&&e.move(a,b,c,d)},32)},hide:function(){var a=this,b;clearTimeout(this.hideTimer);if(!this.isHidden)b=this.chart.hoverPoints,this.hideTimer=setTimeout(function(){a.label.fadeOut();a.isHidden=!0},o(this.options.hideDelay,500)),b&&n(b,function(a){a.setState()}),this.chart.hoverPoints=null},hideCrosshairs:function(){n(this.crosshairs,function(a){a&&a.hide()})},getAnchor:function(a,b){var c,d=this.chart,e= -d.inverted,f=d.plotTop,g=0,h=0,i,a=ha(a);c=a[0].tooltipPos;this.followPointer&&b&&(b.chartX===y&&(b=d.pointer.normalize(b)),c=[b.chartX-d.plotLeft,b.chartY-f]);c||(n(a,function(a){i=a.series.yAxis;g+=a.plotX;h+=(a.plotLow?(a.plotLow+a.plotHigh)/2:a.plotY)+(!e&&i?i.top-f:0)}),g/=a.length,h/=a.length,c=[e?d.plotWidth-h:g,this.shared&&!e&&a.length>1&&b?b.chartY-f:e?d.plotHeight-g:h]);return La(c,t)},getPosition:function(a,b,c){var d=this.chart,e=d.plotLeft,f=d.plotTop,g=d.plotWidth,h=d.plotHeight,i= -o(this.options.distance,12),j=c.plotX,c=c.plotY,d=j+e+(d.inverted?i:-a-i),k=c-b+f+15,m;d<7&&(d=e+q(j,0)+i);d+a>e+g&&(d-=d+a-(e+g),k=c-b+f-i,m=!0);k=k&&c<=k+b&&(k=c+f+i));k+b>f+h&&(k=q(f,f+h-b-i));return{x:d,y:k}},defaultFormatter:function(a){var b=this.points||ha(this),c=b[0].series,d;d=[c.tooltipHeaderFormatter(b[0])];n(b,function(a){c=a.series;d.push(c.tooltipFormatter&&c.tooltipFormatter(a)||a.point.tooltipFormatter(c.tooltipOptions.pointFormat))});d.push(a.options.footerFormat|| -"");return d.join("")},refresh:function(a,b){var c=this.chart,d=this.label,e=this.options,f,g,h,i={},j,k=[];j=e.formatter||this.defaultFormatter;var i=c.hoverPoints,m,l=e.crosshairs;h=this.shared;clearTimeout(this.hideTimer);this.followPointer=ha(a)[0].series.tooltipOptions.followPointer;g=this.getAnchor(a,b);f=g[0];g=g[1];h&&(!a.series||!a.series.noSharedTooltip)?(c.hoverPoints=a,i&&n(i,function(a){a.setState()}),n(a,function(a){a.setState("hover");k.push(a.getLabelConfig())}),i={x:a[0].category, -y:a[0].y},i.points=k,a=a[0]):i=a.getLabelConfig();j=j.call(i,this);i=a.series;h=h||!i.isCartesian||i.tooltipOutsidePlot||c.isInsidePlot(f,g);j===!1||!h?this.hide():(this.isHidden&&(Ta(d),d.attr("opacity",1).show()),d.attr({text:j}),m=e.borderColor||a.color||i.color||"#606060",d.attr({stroke:m}),this.updatePosition({plotX:f,plotY:g}),this.isHidden=!1);if(l){l=ha(l);for(d=l.length;d--;)if(e=a.series[d?"yAxis":"xAxis"],l[d]&&e)if(h=d?o(a.stackY,a.y):a.x,e.isLog&&(h=ka(h)),e=e.getPlotLinePath(h,1),this.crosshairs[d])this.crosshairs[d].attr({d:e, -visibility:"visible"});else{h={"stroke-width":l[d].width||1,stroke:l[d].color||"#C0C0C0",zIndex:l[d].zIndex||2};if(l[d].dashStyle)h.dashstyle=l[d].dashStyle;this.crosshairs[d]=c.renderer.path(e).attr(h).add()}}D(c,"tooltipRefresh",{text:j,x:f+c.plotLeft,y:g+c.plotTop,borderColor:m})},updatePosition:function(a){var b=this.chart,c=this.label,c=(this.options.positioner||this.getPosition).call(this,c.width,c.height,a);this.move(t(c.x),t(c.y),a.plotX+b.plotLeft,a.plotY+b.plotTop)}};rb.prototype={init:function(a, -b){var c=$?"":b.chart.zoomType,d=a.inverted,e;this.options=b;this.chart=a;this.zoomX=e=/x/.test(c);this.zoomY=c=/y/.test(c);this.zoomHor=e&&!d||c&&d;this.zoomVert=c&&!d||e&&d;this.pinchDown=[];this.lastValidTouch={};if(b.tooltip.enabled)a.tooltip=new qb(a,b.tooltip);this.setDOMEvents()},normalize:function(a){var b,c,d,a=a||O.event;if(!a.target)a.target=a.srcElement;a=Qb(a);d=a.touches?a.touches.item(0):a;this.chartPosition=b=Ub(this.chart.container);d.pageX===y?(c=a.x,b=a.y):(c=d.pageX-b.left,b=d.pageY- -b.top);return v(a,{chartX:t(c),chartY:t(b)})},getCoordinates:function(a){var b={xAxis:[],yAxis:[]};n(this.chart.axes,function(c){b[c.isXAxis?"xAxis":"yAxis"].push({axis:c,value:c.toValue(a[c.horiz?"chartX":"chartY"])})});return b},getIndex:function(a){var b=this.chart;return b.inverted?b.plotHeight+b.plotTop-a.chartY:a.chartX-b.plotLeft},runPointActions:function(a){var b=this.chart,c=b.series,d=b.tooltip,e,f=b.hoverPoint,g=b.hoverSeries,h,i,j=b.chartWidth,k=this.getIndex(a);if(d&&this.options.tooltip.shared&& -(!g||!g.noSharedTooltip)){e=[];h=c.length;for(i=0;ij&&e.splice(h,1);if(e.length&&e[0].clientX!==this.hoverX)d.refresh(e,a),this.hoverX=e[0].clientX}if(g&&g.tracker){if((b=g.tooltipPoints[k])&&b!==f)b.onMouseOver(a)}else d&&d.followPointer&&!d.isHidden&&(a=d.getAnchor([{}],a), -d.updatePosition({plotX:a[0],plotY:a[1]}))},reset:function(a){var b=this.chart,c=b.hoverSeries,d=b.hoverPoint,e=b.tooltip,b=e&&e.shared?b.hoverPoints:d;(a=a&&e&&b)&&ha(b)[0].plotX===y&&(a=!1);if(a)e.refresh(b);else{if(d)d.onMouseOut();if(c)c.onMouseOut();e&&(e.hide(),e.hideCrosshairs());this.hoverX=null}},scaleGroups:function(a,b){var c=this.chart;n(c.series,function(d){d.xAxis&&d.xAxis.zoomEnabled&&(d.group.attr(a),d.markerGroup&&(d.markerGroup.attr(a),d.markerGroup.clip(b?c.clipRect:null)),d.dataLabelsGroup&& -d.dataLabelsGroup.attr(a))});c.clipRect.attr(b||c.clipBox)},pinchTranslateDirection:function(a,b,c,d,e,f,g){var h=this.chart,i=a?"x":"y",j=a?"X":"Y",k="chart"+j,m=a?"width":"height",l=h["plot"+(a?"Left":"Top")],p,s,o=1,n=h.inverted,w=h.bounds[a?"h":"v"],q=b.length===1,t=b[0][k],r=c[0][k],v=!q&&b[1][k],u=!q&&c[1][k],x,c=function(){!q&&Q(t-v)>20&&(o=Q(r-u)/Q(t-v));s=(l-r)/o+t;p=h["plot"+(a?"Width":"Height")]/o};c();b=s;bw.max&&(b=w.max-p,x=!0);x?(r-=0.8*(r-g[i][0]),q||(u-= -0.8*(u-g[i][1])),c()):g[i]=[r,u];n||(f[i]=s-l,f[m]=p);f=n?1/o:o;e[m]=p;e[i]=b;d[n?a?"scaleY":"scaleX":"scale"+j]=o;d["translate"+j]=f*l+(r-f*t)},pinch:function(a){var b=this,c=b.chart,d=b.pinchDown,e=c.tooltip&&c.tooltip.options.followTouchMove,f=a.touches,g=f.length,h=b.lastValidTouch,i=b.zoomHor||b.pinchHor,j=b.zoomVert||b.pinchVert,k=i||j,m=b.selectionMarker,l={},p={};a.type==="touchstart"&&(e||k)&&a.preventDefault();La(f,function(a){return b.normalize(a)});if(a.type==="touchstart")n(f,function(a, -b){d[b]={chartX:a.chartX,chartY:a.chartY}}),h.x=[d[0].chartX,d[1]&&d[1].chartX],h.y=[d[0].chartY,d[1]&&d[1].chartY],n(c.axes,function(a){if(a.zoomEnabled){var b=c.bounds[a.horiz?"h":"v"],d=a.minPixelPadding,e=a.toPixels(a.dataMin),f=a.toPixels(a.dataMax),g=K(e,f),e=q(e,f);b.min=K(a.pos,g-d);b.max=q(a.pos+a.len,e+d)}});else if(d.length){if(!m)b.selectionMarker=m=v({destroy:ta},c.plotBox);i&&b.pinchTranslateDirection(!0,d,f,l,m,p,h);j&&b.pinchTranslateDirection(!1,d,f,l,m,p,h);b.hasPinched=k;b.scaleGroups(l, -p);!k&&e&&g===1&&this.runPointActions(b.normalize(a))}},dragStart:function(a){var b=this.chart;b.mouseIsDown=a.type;b.cancelClick=!1;b.mouseDownX=this.mouseDownX=a.chartX;this.mouseDownY=a.chartY},drag:function(a){var b=this.chart,c=b.options.chart,d=a.chartX,a=a.chartY,e=this.zoomHor,f=this.zoomVert,g=b.plotLeft,h=b.plotTop,i=b.plotWidth,j=b.plotHeight,k,m=this.mouseDownX,l=this.mouseDownY;dg+i&&(d=g+i);ah+j&&(a=h+j);this.hasDragged=Math.sqrt(Math.pow(m-d,2)+Math.pow(l-a,2));if(this.hasDragged> -10){k=b.isInsidePlot(m-g,l-h);if(b.hasCartesianSeries&&(this.zoomX||this.zoomY)&&k&&!this.selectionMarker)this.selectionMarker=b.renderer.rect(g,h,e?1:i,f?1:j,0).attr({fill:c.selectionMarkerFill||"rgba(69,114,167,0.25)",zIndex:7}).add();this.selectionMarker&&e&&(e=d-m,this.selectionMarker.attr({width:Q(e),x:(e>0?0:e)+m}));this.selectionMarker&&f&&(e=a-l,this.selectionMarker.attr({height:Q(e),y:(e>0?0:e)+l}));k&&!this.selectionMarker&&c.panning&&b.pan(d)}},drop:function(a){var b=this.chart,c=this.hasPinched; -if(this.selectionMarker){var d={xAxis:[],yAxis:[],originalEvent:a.originalEvent||a},e=this.selectionMarker,f=e.x,g=e.y,h;if(this.hasDragged||c)n(b.axes,function(a){if(a.zoomEnabled){var b=a.horiz,c=a.toValue(b?f:g),b=a.toValue(b?f+e.width:g+e.height);!isNaN(c)&&!isNaN(b)&&(d[a.xOrY+"Axis"].push({axis:a,min:K(c,b),max:q(c,b)}),h=!0)}}),h&&D(b,"selection",d,function(a){b.zoom(v(a,c?{animation:!1}:null))});this.selectionMarker=this.selectionMarker.destroy();c&&this.scaleGroups({translateX:b.plotLeft, -translateY:b.plotTop,scaleX:1,scaleY:1})}if(b)L(b.container,{cursor:b._cursor}),b.cancelClick=this.hasDragged>10,b.mouseIsDown=this.hasDragged=this.hasPinched=!1,this.pinchDown=[]},onContainerMouseDown:function(a){a=this.normalize(a);a.preventDefault&&a.preventDefault();this.dragStart(a)},onDocumentMouseUp:function(a){this.drop(a)},onDocumentMouseMove:function(a){var b=this.chart,c=this.chartPosition,d=b.hoverSeries,a=Qb(a);c&&d&&d.isCartesian&&!b.isInsidePlot(a.pageX-c.left-b.plotLeft,a.pageY-c.top- -b.plotTop)&&this.reset()},onContainerMouseLeave:function(){this.reset();this.chartPosition=null},onContainerMouseMove:function(a){var b=this.chart,a=this.normalize(a);a.returnValue=!1;b.mouseIsDown==="mousedown"&&this.drag(a);b.isInsidePlot(a.chartX-b.plotLeft,a.chartY-b.plotTop)&&!b.openMenu&&this.runPointActions(a)},inClass:function(a,b){for(var c;a;){if(c=A(a,"class"))if(c.indexOf(b)!==-1)return!0;else if(c.indexOf("highcharts-container")!==-1)return!1;a=a.parentNode}},onTrackerMouseOut:function(a){var b= -this.chart.hoverSeries;if(b&&!b.options.stickyTracking&&!this.inClass(a.toElement||a.relatedTarget,"highcharts-tooltip"))b.onMouseOut()},onContainerClick:function(a){var b=this.chart,c=b.hoverPoint,d=b.plotLeft,e=b.plotTop,f=b.inverted,g,h,i,a=this.normalize(a);a.cancelBubble=!0;if(!b.cancelClick)c&&this.inClass(a.target,"highcharts-tracker")?(g=this.chartPosition,h=c.plotX,i=c.plotY,v(c,{pageX:g.left+d+(f?b.plotWidth-i:h),pageY:g.top+e+(f?b.plotHeight-h:i)}),D(c.series,"click",v(a,{point:c})),b.hoverPoint&& -c.firePointEvent("click",a)):(v(a,this.getCoordinates(a)),b.isInsidePlot(a.chartX-d,a.chartY-e)&&D(b,"click",a))},onContainerTouchStart:function(a){var b=this.chart;a.touches.length===1?(a=this.normalize(a),b.isInsidePlot(a.chartX-b.plotLeft,a.chartY-b.plotTop)&&(this.runPointActions(a),this.pinch(a))):a.touches.length===2&&this.pinch(a)},onContainerTouchMove:function(a){(a.touches.length===1||a.touches.length===2)&&this.pinch(a)},onDocumentTouchEnd:function(a){this.drop(a)},setDOMEvents:function(){var a= -this,b=a.chart.container,c;this._events=c=[[b,"onmousedown","onContainerMouseDown"],[b,"onmousemove","onContainerMouseMove"],[b,"onclick","onContainerClick"],[b,"mouseleave","onContainerMouseLeave"],[z,"mousemove","onDocumentMouseMove"],[z,"mouseup","onDocumentMouseUp"]];fb&&c.push([b,"ontouchstart","onContainerTouchStart"],[b,"ontouchmove","onContainerTouchMove"],[z,"touchend","onDocumentTouchEnd"]);n(c,function(b){a["_"+b[2]]=function(c){a[b[2]](c)};b[1].indexOf("on")===0?b[0][b[1]]=a["_"+b[2]]: -J(b[0],b[1],a["_"+b[2]])})},destroy:function(){var a=this;n(a._events,function(b){b[1].indexOf("on")===0?b[0][b[1]]=null:ba(b[0],b[1],a["_"+b[2]])});delete a._events;clearInterval(a.tooltipTimeout)}};sb.prototype={init:function(a,b){var c=this,d=b.itemStyle,e=o(b.padding,8),f=b.itemMarginTop||0;this.options=b;if(b.enabled)c.baseline=u(d.fontSize)+3+f,c.itemStyle=d,c.itemHiddenStyle=x(d,b.itemHiddenStyle),c.itemMarginTop=f,c.padding=e,c.initialItemX=e,c.initialItemY=e-5,c.maxItemWidth=0,c.chart=a, -c.itemHeight=0,c.lastLineHeight=0,c.render(),J(c.chart,"endResize",function(){c.positionCheckboxes()})},colorizeItem:function(a,b){var c=this.options,d=a.legendItem,e=a.legendLine,f=a.legendSymbol,g=this.itemHiddenStyle.color,c=b?c.itemStyle.color:g,h=b?a.color:g,g=a.options&&a.options.marker,i={stroke:h,fill:h},j;d&&d.css({fill:c,color:c});e&&e.attr({stroke:h});if(f){if(g)for(j in g=a.convertAttribs(g),g)d=g[j],d!==y&&(i[j]=d);f.attr(i)}},positionItem:function(a){var b=this.options,c=b.symbolPadding, -b=!b.rtl,d=a._legendItemPos,e=d[0],d=d[1],f=a.checkbox;a.legendGroup&&a.legendGroup.translate(b?e:this.legendWidth-e-2*c-4,d);if(f)f.x=e,f.y=d},destroyItem:function(a){var b=a.checkbox;n(["legendItem","legendLine","legendSymbol","legendGroup"],function(b){a[b]&&a[b].destroy()});b&&Ra(a.checkbox)},destroy:function(){var a=this.group,b=this.box;if(b)this.box=b.destroy();if(a)this.group=a.destroy()},positionCheckboxes:function(a){var b=this.group.alignAttr,c,d=this.clipHeight||this.legendHeight;if(b)c= -b.translateY,n(this.allItems,function(e){var f=e.checkbox,g;f&&(g=c+f.y+(a||0)+3,L(f,{left:b.translateX+e.legendItemWidth+f.x-20+"px",top:g+"px",display:g>c-6&&g(l||c.chartWidth-2*k-o))b.itemX=o,b.itemY+=s+b.lastLineHeight+p,b.lastLineHeight=0;b.maxItemWidth=q(b.maxItemWidth,e);b.lastItemY=s+b.itemY+p;b.lastLineHeight=q(g,b.lastLineHeight);a._legendItemPos=[b.itemX,b.itemY];f?b.itemX+=e:(b.itemY+=s+g+p,b.lastLineHeight= -g);b.offsetWidth=l||q(f?b.itemX-o:e,b.offsetWidth)},render:function(){var a=this,b=a.chart,c=b.renderer,d=a.group,e,f,g,h,i=a.box,j=a.options,k=a.padding,m=j.borderWidth,l=j.backgroundColor;a.itemX=a.initialItemX;a.itemY=a.initialItemY;a.offsetWidth=0;a.lastItemY=0;if(!d)a.group=d=c.g("legend").attr({zIndex:7}).add(),a.contentGroup=c.g().attr({zIndex:1}).add(d),a.scrollGroup=c.g().add(a.contentGroup);a.renderTitle();e=[];n(b.series,function(a){var b=a.options;b.showInLegend&&!r(b.linkedTo)&&(e=e.concat(a.legendItems|| -(b.legendType==="point"?a.data:a)))});Ib(e,function(a,b){return(a.options&&a.options.legendIndex||0)-(b.options&&b.options.legendIndex||0)});j.reversed&&e.reverse();a.allItems=e;a.display=f=!!e.length;n(e,function(b){a.renderItem(b)});g=j.width||a.offsetWidth;h=a.lastItemY+a.lastLineHeight+a.titleHeight;h=a.handleOverflow(h);if(m||l){g+=k;h+=k;if(i){if(g>0&&h>0)i[i.isNew?"attr":"animate"](i.crisp(null,null,null,g,h)),i.isNew=!1}else a.box=i=c.rect(0,0,g,h,j.borderRadius,m||0).attr({stroke:j.borderColor, -"stroke-width":m||0,fill:l||S}).add(d).shadow(j.shadow),i.isNew=!0;i[f?"show":"hide"]()}a.legendWidth=g;a.legendHeight=h;n(e,function(b){a.positionItem(b)});f&&d.align(v({width:g,height:h},j),!0,"spacingBox");b.isResizing||this.positionCheckboxes()},handleOverflow:function(a){var b=this,c=this.chart,d=c.renderer,e=this.options,f=e.y,f=c.spacingBox.height+(e.verticalAlign==="top"?-f:f)-this.padding,g=e.maxHeight,h=this.clipRect,i=e.navigation,j=o(i.animation,!0),k=i.arrowSize||12,m=this.nav;e.layout=== -"horizontal"&&(f/=2);g&&(f=K(f,g));if(a>f&&!e.useHTML){this.clipHeight=c=f-20-this.titleHeight;this.pageCount=ja(a/c);this.currentPage=o(this.currentPage,1);this.fullHeight=a;if(!h)h=b.clipRect=d.clipRect(0,0,9999,0),b.contentGroup.clip(h);h.attr({height:c});if(!m)this.nav=m=d.g().attr({zIndex:1}).add(this.group),this.up=d.symbol("triangle",0,0,k,k).on("click",function(){b.scroll(-1,j)}).add(m),this.pager=d.text("",15,10).css(i.style).add(m),this.down=d.symbol("triangle-down",0,0,k,k).on("click", -function(){b.scroll(1,j)}).add(m);b.scroll(0);a=f}else if(m)h.attr({height:c.chartHeight}),m.hide(),this.scrollGroup.attr({translateY:1}),this.clipHeight=0;return a},scroll:function(a,b){var c=this.pageCount,d=this.currentPage+a,e=this.clipHeight,f=this.options.navigation,g=f.activeColor,h=f.inactiveColor,f=this.pager,i=this.padding;d>c&&(d=c);if(d>0)b!==y&&Ia(b,this.chart),this.nav.attr({translateX:i,translateY:e+7+this.titleHeight,visibility:"visible"}),this.up.attr({fill:d===1?h:g}).css({cursor:d=== -1?"default":"pointer"}),f.attr({text:d+"/"+this.pageCount}),this.down.attr({x:18+this.pager.getBBox().width,fill:d===c?h:g}).css({cursor:d===c?"default":"pointer"}),e=-K(e*(d-1),this.fullHeight-e+i)+1,this.scrollGroup.animate({translateY:e}),f.attr({text:d+"/"+c}),this.currentPage=d,this.positionCheckboxes(e)}};tb.prototype={init:function(a,b){var c,d=a.series;a.series=null;c=x(N,a);c.series=a.series=d;var d=c.chart,e=d.margin,e=V(e)?e:[e,e,e,e];this.optionsMarginTop=o(d.marginTop,e[0]);this.optionsMarginRight= -o(d.marginRight,e[1]);this.optionsMarginBottom=o(d.marginBottom,e[2]);this.optionsMarginLeft=o(d.marginLeft,e[3]);this.runChartClick=(e=d.events)&&!!e.click;this.bounds={h:{},v:{}};this.callback=b;this.isResizing=0;this.options=c;this.axes=[];this.series=[];this.hasCartesianSeries=d.showAxes;var f=this,g;f.index=Ba.length;Ba.push(f);d.reflow!==!1&&J(f,"load",function(){f.initReflow()});if(e)for(g in e)J(f,g,e[g]);f.xAxis=[];f.yAxis=[];f.animation=$?!1:o(d.animation,!0);f.pointCount=0;f.counters=new Hb; -f.firstRender()},initSeries:function(a){var b=this.options.chart;(b=aa[a.type||b.type||b.defaultSeriesType])||qa(17,!0);b=new b;b.init(this,a);return b},addSeries:function(a,b,c){var d,e=this;a&&(b=o(b,!0),D(e,"addSeries",{options:a},function(){d=e.initSeries(a);e.isDirtyLegend=!0;b&&e.redraw(c)}));return d},addAxis:function(a,b,c,d){var b=b?"xAxis":"yAxis",e=this.options;new ab(this,x(a,{index:this[b].length}));e[b]=ha(e[b]||{});e[b].push(a);o(c,!0)&&this.redraw(d)},isInsidePlot:function(a,b,c){var d= -c?b:a,a=c?a:b;return d>=0&&d<=this.plotWidth&&a>=0&&a<=this.plotHeight},adjustTickAmounts:function(){this.options.chart.alignTicks!==!1&&n(this.axes,function(a){a.adjustTickAmount()});this.maxTicks=null},redraw:function(a){var b=this.axes,c=this.series,d=this.pointer,e=this.legend,f=this.isDirtyLegend,g,h=this.isDirtyBox,i=c.length,j=i,k=this.renderer,m=k.isHidden(),l=[];Ia(a,this);for(m&&this.cloneRenderTo();j--;)if(a=c[j],a.isDirty&&a.options.stacking){g=!0;break}if(g)for(j=i;j--;)if(a=c[j],a.options.stacking)a.isDirty= -!0;n(c,function(a){a.isDirty&&a.options.legendType==="point"&&(f=!0)});if(f&&e.options.enabled)e.render(),this.isDirtyLegend=!1;if(this.hasCartesianSeries){if(!this.isResizing)this.maxTicks=null,n(b,function(a){a.setScale()});this.adjustTickAmounts();this.getMargins();n(b,function(a){if(a.isDirtyExtremes)a.isDirtyExtremes=!1,l.push(function(){D(a,"afterSetExtremes",a.getExtremes())});if(a.isDirty||h||g)a.redraw(),h=!0})}h&&this.drawChartBox();n(c,function(a){a.isDirty&&a.visible&&(!a.isCartesian|| -a.xAxis)&&a.redraw()});d&&d.reset&&d.reset(!0);k.draw();D(this,"redraw");m&&this.cloneRenderTo(!0);n(l,function(a){a.call()})},showLoading:function(a){var b=this.options,c=this.loadingDiv,d=b.loading;if(!c)this.loadingDiv=c=U(ya,{className:"highcharts-loading"},v(d.style,{zIndex:10,display:S}),this.container),this.loadingSpan=U("span",null,d.labelStyle,c);this.loadingSpan.innerHTML=a||b.lang.loading;if(!this.loadingShown)L(c,{opacity:0,display:"",left:this.plotLeft+"px",top:this.plotTop+"px",width:this.plotWidth+ -"px",height:this.plotHeight+"px"}),wb(c,{opacity:d.style.opacity},{duration:d.showDuration||0}),this.loadingShown=!0},hideLoading:function(){var a=this.options,b=this.loadingDiv;b&&wb(b,{opacity:0},{duration:a.loading.hideDuration||100,complete:function(){L(b,{display:S})}});this.loadingShown=!1},get:function(a){var b=this.axes,c=this.series,d,e;for(d=0;dK(e.dataMin,e.min)&&c19?this.containerHeight:400))},cloneRenderTo:function(a){var b=this.renderToClone,c=this.container;a?b&&(this.renderTo.appendChild(c),Ra(b),delete this.renderToClone): -(c&&this.renderTo.removeChild(c),this.renderToClone=b=this.renderTo.cloneNode(0),L(b,{position:"absolute",top:"-9999px",display:"block"}),z.body.appendChild(b),c&&b.appendChild(c))},getContainer:function(){var a,b=this.options.chart,c,d,e;this.renderTo=a=b.renderTo;e="highcharts-"+ub++;if(fa(a))this.renderTo=a=z.getElementById(a);a||qa(13,!0);c=u(A(a,"data-highcharts-chart"));!isNaN(c)&&Ba[c]&&Ba[c].destroy();A(a,"data-highcharts-chart",this.index);a.innerHTML="";a.offsetWidth||this.cloneRenderTo(); -this.getChartSize();c=this.chartWidth;d=this.chartHeight;this.container=a=U(ya,{className:"highcharts-container"+(b.className?" "+b.className:""),id:e},v({position:"relative",overflow:"hidden",width:c+"px",height:d+"px",textAlign:"left",lineHeight:"normal",zIndex:0,"-webkit-tap-highlight-color":"rgba(0,0,0,0)"},b.style),this.renderToClone||a);this._cursor=a.style.cursor;this.renderer=b.forExport?new Ca(a,c,d,!0):new Sa(a,c,d);$&&this.renderer.create(this,a,c,d)},getMargins:function(){var a=this.options.chart, -b=a.spacingTop,c=a.spacingRight,d=a.spacingBottom,a=a.spacingLeft,e,f=this.legend,g=this.optionsMarginTop,h=this.optionsMarginLeft,i=this.optionsMarginRight,j=this.optionsMarginBottom,k=this.options.title,m=this.options.subtitle,l=this.options.legend,p=o(l.margin,10),s=l.x,t=l.y,B=l.align,w=l.verticalAlign;this.resetMargins();e=this.axisOffset;if((this.title||this.subtitle)&&!r(this.optionsMarginTop))if(m=q(this.title&&!k.floating&&!k.verticalAlign&&k.y||0,this.subtitle&&!m.floating&&!m.verticalAlign&& -m.y||0))this.plotTop=q(this.plotTop,m+o(k.margin,15)+b);if(f.display&&!l.floating)if(B==="right"){if(!r(i))this.marginRight=q(this.marginRight,f.legendWidth-s+p+c)}else if(B==="left"){if(!r(h))this.plotLeft=q(this.plotLeft,f.legendWidth+s+p+a)}else if(w==="top"){if(!r(g))this.plotTop=q(this.plotTop,f.legendHeight+t+p+b)}else if(w==="bottom"&&!r(j))this.marginBottom=q(this.marginBottom,f.legendHeight-t+p+d);this.extraBottomMargin&&(this.marginBottom+=this.extraBottomMargin);this.extraTopMargin&&(this.plotTop+= -this.extraTopMargin);this.hasCartesianSeries&&n(this.axes,function(a){a.getOffset()});r(h)||(this.plotLeft+=e[3]);r(g)||(this.plotTop+=e[0]);r(j)||(this.marginBottom+=e[2]);r(i)||(this.marginRight+=e[1]);this.setChartSize()},initReflow:function(){function a(a){var g=c.width||gb(d,"width"),h=c.height||gb(d,"height"),a=a?a.target:O;if(!b.hasUserSize&&g&&h&&(a===O||a===z)){if(g!==b.containerWidth||h!==b.containerHeight)clearTimeout(e),b.reflowTimeout=e=setTimeout(function(){if(b.container)b.setSize(g, -h,!1),b.hasUserSize=null},100);b.containerWidth=g;b.containerHeight=h}}var b=this,c=b.options.chart,d=b.renderTo,e;J(O,"resize",a);J(b,"destroy",function(){ba(O,"resize",a)})},setSize:function(a,b,c){var d=this,e,f,g;d.isResizing+=1;g=function(){d&&D(d,"endResize",null,function(){d.isResizing-=1})};Ia(c,d);d.oldChartHeight=d.chartHeight;d.oldChartWidth=d.chartWidth;if(r(a))d.chartWidth=e=q(0,t(a)),d.hasUserSize=!!e;if(r(b))d.chartHeight=f=q(0,t(b));L(d.container,{width:e+"px",height:f+"px"});d.setChartSize(!0); -d.renderer.setSize(e,f,c);d.maxTicks=null;n(d.axes,function(a){a.isDirty=!0;a.setScale()});n(d.series,function(a){a.isDirty=!0});d.isDirtyLegend=!0;d.isDirtyBox=!0;d.getMargins();d.redraw(c);d.oldChartHeight=null;D(d,"resize");za===!1?g():setTimeout(g,za&&za.duration||500)},setChartSize:function(a){var b=this.inverted,c=this.renderer,d=this.chartWidth,e=this.chartHeight,f=this.options.chart,g=f.spacingTop,h=f.spacingRight,i=f.spacingBottom,j=f.spacingLeft,k=this.clipOffset,m,l,p,o;this.plotLeft=m= -t(this.plotLeft);this.plotTop=l=t(this.plotTop);this.plotWidth=p=q(0,t(d-m-this.marginRight));this.plotHeight=o=q(0,t(e-l-this.marginBottom));this.plotSizeX=b?o:p;this.plotSizeY=b?p:o;this.plotBorderWidth=b=f.plotBorderWidth||0;this.spacingBox=c.spacingBox={x:j,y:g,width:d-j-h,height:e-g-i};this.plotBox=c.plotBox={x:m,y:l,width:p,height:o};c=ja(q(b,k[3])/2);d=ja(q(b,k[0])/2);this.clipBox={x:c,y:d,width:T(this.plotSizeX-q(b,k[1])/2-c),height:T(this.plotSizeY-q(b,k[2])/2-d)};a||n(this.axes,function(a){a.setAxisSize(); -a.setAxisTranslation()})},resetMargins:function(){var a=this.options.chart,b=a.spacingRight,c=a.spacingBottom,d=a.spacingLeft;this.plotTop=o(this.optionsMarginTop,a.spacingTop);this.marginRight=o(this.optionsMarginRight,b);this.marginBottom=o(this.optionsMarginBottom,c);this.plotLeft=o(this.optionsMarginLeft,d);this.axisOffset=[0,0,0,0];this.clipOffset=[0,0,0,0]},drawChartBox:function(){var a=this.options.chart,b=this.renderer,c=this.chartWidth,d=this.chartHeight,e=this.chartBackground,f=this.plotBackground, -g=this.plotBorder,h=this.plotBGImage,i=a.borderWidth||0,j=a.backgroundColor,k=a.plotBackgroundColor,m=a.plotBackgroundImage,l=a.plotBorderWidth||0,p,o=this.plotLeft,n=this.plotTop,t=this.plotWidth,q=this.plotHeight,r=this.plotBox,v=this.clipRect,u=this.clipBox;p=i+(a.shadow?8:0);if(i||j)if(e)e.animate(e.crisp(null,null,null,c-p,d-p));else{e={fill:j||S};if(i)e.stroke=a.borderColor,e["stroke-width"]=i;this.chartBackground=b.rect(p/2,p/2,c-p,d-p,a.borderRadius,i).attr(e).add().shadow(a.shadow)}if(k)f? -f.animate(r):this.plotBackground=b.rect(o,n,t,q,0).attr({fill:k}).add().shadow(a.plotShadow);if(m)h?h.animate(r):this.plotBGImage=b.image(m,o,n,t,q).add();v?v.animate({width:u.width,height:u.height}):this.clipRect=b.clipRect(u);if(l)g?g.animate(g.crisp(null,o,n,t,q)):this.plotBorder=b.rect(o,n,t,q,0,l).attr({stroke:a.plotBorderColor,"stroke-width":l,zIndex:1}).add();this.isDirtyBox=!1},propFromSeries:function(){var a=this,b=a.options.chart,c,d=a.options.series,e,f;n(["inverted","angular","polar"], -function(g){c=aa[b.type||b.defaultSeriesType];f=a[g]||b[g]||c&&c.prototype[g];for(e=d&&d.length;!f&&e--;)(c=aa[d[e].type])&&c.prototype[g]&&(f=!0);a[g]=f})},render:function(){var a=this,b=a.axes,c=a.renderer,d=a.options,e=d.labels,f=d.credits,g;a.setTitle();a.legend=new sb(a,d.legend);n(b,function(a){a.setScale()});a.getMargins();a.maxTicks=null;n(b,function(a){a.setTickPositions(!0);a.setMaxTicks()});a.adjustTickAmounts();a.getMargins();a.drawChartBox();a.hasCartesianSeries&&n(b,function(a){a.render()}); -if(!a.seriesGroup)a.seriesGroup=c.g("series-group").attr({zIndex:3}).add();n(a.series,function(a){a.translate();a.setTooltipPoints();a.render()});e.items&&n(e.items,function(b){var d=v(e.style,b.style),f=u(d.left)+a.plotLeft,g=u(d.top)+a.plotTop+12;delete d.left;delete d.top;c.text(b.html,f,g).attr({zIndex:2}).css(d).add()});if(f.enabled&&!a.credits)g=f.href,a.credits=c.text(f.text,0,0).on("click",function(){if(g)location.href=g}).attr({align:f.position.align,zIndex:8}).css(f.style).add().align(f.position); -a.hasRendered=!0},destroy:function(){var a=this,b=a.axes,c=a.series,d=a.container,e,f=d&&d.parentNode;D(a,"destroy");Ba[a.index]=y;a.renderTo.removeAttribute("data-highcharts-chart");ba(a);for(e=b.length;e--;)b[e]=b[e].destroy();for(e=c.length;e--;)c[e]=c[e].destroy();n("title,subtitle,chartBackground,plotBackground,plotBGImage,plotBorder,seriesGroup,clipRect,credits,pointer,scroller,rangeSelector,legend,resetZoomButton,tooltip,renderer".split(","),function(b){var c=a[b];c&&c.destroy&&(a[b]=c.destroy())}); -if(d)d.innerHTML="",ba(d),f&&Ra(d);for(e in a)delete a[e]},isReadyToRender:function(){var a=this;return!Z&&O==O.top&&z.readyState!=="complete"||$&&!O.canvg?($?Rb.push(function(){a.firstRender()},a.options.global.canvasToolsURL):z.attachEvent("onreadystatechange",function(){z.detachEvent("onreadystatechange",a.firstRender);z.readyState==="complete"&&a.firstRender()}),!1):!0},firstRender:function(){var a=this,b=a.options,c=a.callback;if(a.isReadyToRender())a.getContainer(),D(a,"init"),a.resetMargins(), -a.setChartSize(),a.propFromSeries(),a.getAxes(),n(b.series||[],function(b){a.initSeries(b)}),D(a,"beforeRender"),a.pointer=new rb(a,b),a.render(),a.renderer.draw(),c&&c.apply(a,[a]),n(a.callbacks,function(b){b.apply(a,[a])}),a.cloneRenderTo(!0),D(a,"load")}};tb.prototype.callbacks=[];var Na=function(){};Na.prototype={init:function(a,b,c){this.series=a;this.applyOptions(b,c);this.pointAttr={};if(a.options.colorByPoint&&(b=a.options.colors||a.chart.options.colors,this.color=this.color||b[a.colorCounter++], -a.colorCounter===b.length))a.colorCounter=0;a.chart.pointCount++;return this},applyOptions:function(a,b){var c=this.series,d=c.pointValKey,a=Na.prototype.optionsToObject.call(this,a);v(this,a);this.options=this.options?v(this.options,a):a;if(d)this.y=this[d];if(this.x===y&&c)this.x=b===y?c.autoIncrement():b;return this},optionsToObject:function(a){var b,c=this.series,d=c.pointArrayMap||["y"],e=d.length,f=0,g=0;if(typeof a==="number"||a===null)b={y:a};else if(Da(a)){b={};if(a.length>e){c=typeof a[0]; -if(c==="string")b.name=a[0];else if(c==="number")b.x=a[0];f++}for(;ga+1&&b.push(d.slice(a+1,g)),a=g):g===e-1&&b.push(d.slice(a+1,g+1))});this.segments=b},setOptions:function(a){var b=this.chart.options,c=b.plotOptions, -d=c[this.type];this.userOptions=a;a=x(d,c.series,a);this.tooltipOptions=x(b.tooltip,a.tooltip);d.marker===null&&delete a.marker;return a},getColor:function(){var a=this.options,b=this.userOptions,c=this.chart.options.colors,d=this.chart.counters,e;e=a.color||X[this.type].color;if(!e&&!a.colorByPoint)r(b._colorIndex)?a=b._colorIndex:(b._colorIndex=d.color,a=d.color++),e=c[a];this.color=e;d.wrapColor(c.length)},getSymbol:function(){var a=this.userOptions,b=this.options.marker,c=this.chart,d=c.options.symbols, -c=c.counters;this.symbol=b.symbol;if(!this.symbol)r(a._symbolIndex)?a=a._symbolIndex:(a._symbolIndex=c.symbol,a=c.symbol++),this.symbol=d[a];if(/^url/.test(this.symbol))b.radius=0;c.wrapSymbol(d.length)},drawLegendSymbol:function(a){var b=this.options,c=b.marker,d=a.options.symbolWidth,e=this.chart.renderer,f=this.legendGroup,a=a.baseline,g;if(b.lineWidth){g={"stroke-width":b.lineWidth};if(b.dashStyle)g.dashstyle=b.dashStyle;this.legendLine=e.path(["M",0,a-4,"L",d,a-4]).attr(g).add(f)}if(c&&c.enabled)b= -c.radius,this.legendSymbol=e.symbol(this.symbol,d/2-b,a-4-b,2*b,2*b).add(f)},addPoint:function(a,b,c,d){var e=this.options,f=this.data,g=this.graph,h=this.area,i=this.chart,j=this.xData,k=this.yData,m=this.zData,l=this.names,p=g&&g.shift||0,n=e.data;Ia(d,i);if(g&&c)g.shift=p+1;if(h){if(c)h.shift=p+1;h.isArea=!0}b=o(b,!0);d={series:this};this.pointClass.prototype.applyOptions.apply(d,[a]);j.push(d.x);k.push(this.toYData?this.toYData(d):d.y);m.push(d.z);if(l)l[d.x]=d.name;n.push(a);e.legendType==="point"&& -this.generatePoints();c&&(f[0]&&f[0].remove?f[0].remove(!1):(f.shift(),j.shift(),k.shift(),m.shift(),n.shift()));this.getAttribs();this.isDirtyData=this.isDirty=!0;b&&i.redraw()},setData:function(a,b){var c=this.points,d=this.options,e=this.chart,f=null,g=this.xAxis,h=g&&g.categories&&!g.categories.length?[]:null,i;this.xIncrement=null;this.pointRange=g&&g.categories?1:d.pointRange;this.colorCounter=0;var j=[],k=[],m=[],l=a?a.length:[],p=(i=this.pointArrayMap)&&i.length,n=!!this.toYData;if(l>(d.turboThreshold|| -1E3)){for(i=0;f===null&&i1&&j[1]k||this.forceCrop))if(a=i.getExtremes(),i=a.min,k=a.max,b[d-1]k)b=[],c=[];else if(b[0]k){for(a=0;a=i){e=q(0,a-1);break}for(;ak){f=a+1;break}b=b.slice(e,f);c=c.slice(e,f);g=!0}for(a=b.length-1;a>0;a--)if(d=b[a]-b[a-1],d>0&&(h===y||d= -0&&c<=d;)h[c++]=f}this.tooltipPoints=h}},tooltipHeaderFormatter:function(a){var b=this.tooltipOptions,c=b.xDateFormat,d=b.dateTimeLabelFormats,e=this.xAxis,f=e&&e.options.type==="datetime",b=b.headerFormat,e=e&&e.closestPointRange,g;if(f&&!c)if(e)for(g in E){if(E[g]>=e){c=d[g];break}}else c=d.day;f&&c&&Ea(a.key)&&(b=b.replace("{point.key}","{point.key:"+c+"}"));return wa(b,{point:a,series:this})},onMouseOver:function(){var a=this.chart,b=a.hoverSeries;if(b&&b!==this)b.onMouseOut();this.options.events.mouseOver&& -D(this,"mouseOver");this.setState("hover");a.hoverSeries=this},onMouseOut:function(){var a=this.options,b=this.chart,c=b.tooltip,d=b.hoverPoint;if(d)d.onMouseOut();this&&a.events.mouseOut&&D(this,"mouseOut");c&&!a.stickyTracking&&(!c.shared||this.noSharedTooltip)&&c.hide();this.setState();b.hoverSeries=null},animate:function(a){var b=this,c=b.chart,d=c.renderer,e;e=b.options.animation;var f=c.clipBox,g=c.inverted,h;if(e&&!V(e))e=X[b.type].animation;h="_sharedClip"+e.duration+e.easing;if(a)a=c[h], -e=c[h+"m"],a||(c[h]=a=d.clipRect(v(f,{width:0})),c[h+"m"]=e=d.clipRect(-99,g?-c.plotLeft:-c.plotTop,99,g?c.chartWidth:c.chartHeight)),b.group.clip(a),b.markerGroup.clip(e),b.sharedClipKey=h;else{if(a=c[h])a.animate({width:c.plotSizeX},e),c[h+"m"].animate({width:c.plotSizeX+99},e);b.animate=null;b.animationTimeout=setTimeout(function(){b.afterAnimate()},e.duration)}},afterAnimate:function(){var a=this.chart,b=this.sharedClipKey,c=this.group;c&&this.options.clip!==!1&&(c.clip(a.clipRect),this.markerGroup.clip()); -setTimeout(function(){b&&a[b]&&(a[b]=a[b].destroy(),a[b+"m"]=a[b+"m"].destroy())},100)},drawPoints:function(){var a,b=this.points,c=this.chart,d,e,f,g,h,i,j,k,m=this.options.marker,l,n=this.markerGroup;if(m.enabled||this._hasPointMarkers)for(f=b.length;f--;)if(g=b[f],d=g.plotX,e=g.plotY,k=g.graphic,i=g.marker||{},a=m.enabled&&i.enabled===y||i.enabled,l=c.isInsidePlot(t(d),e,c.inverted),a&&e!==y&&!isNaN(e)&&g.y!==null)if(a=g.pointAttr[g.selected?"select":""],h=a.r,i=o(i.symbol,this.symbol),j=i.indexOf("url")=== -0,k)k.attr({visibility:l?Z?"inherit":"visible":"hidden"}).animate(v({x:d-h,y:e-h},k.symbolName?{width:2*h,height:2*h}:{}));else{if(l&&(h>0||j))g.graphic=c.renderer.symbol(i,d-h,e-h,2*h,2*h).attr(a).add(n)}else if(k)g.graphic=k.destroy()},convertAttribs:function(a,b,c,d){var e=this.pointAttrToOptions,f,g,h={},a=a||{},b=b||{},c=c||{},d=d||{};for(f in e)g=e[f],h[f]=o(a[g],b[f],c[f],d[f]);return h},getAttribs:function(){var a=this,b=a.options,c=X[a.type].marker?b.marker:b,d=c.states,e=d.hover,f,g=a.color, -h={stroke:g,fill:g},i=a.points||[],j=[],k,m=a.pointAttrToOptions,l=b.negativeColor,p;b.marker?(e.radius=e.radius||c.radius+2,e.lineWidth=e.lineWidth||c.lineWidth+1):e.color=e.color||ma(e.color||g).brighten(e.brightness).get();j[""]=a.convertAttribs(c,h);n(["hover","select"],function(b){j[b]=a.convertAttribs(d[b],j[""])});a.pointAttr=j;for(g=i.length;g--;){h=i[g];if((c=h.options&&h.options.marker||h.options)&&c.enabled===!1)c.radius=0;if(h.negative&&l)h.color=h.fillColor=l;f=b.colorByPoint||h.color; -if(h.options)for(p in m)r(c[m[p]])&&(f=!0);if(f){c=c||{};k=[];d=c.states||{};f=d.hover=d.hover||{};if(!b.marker)f.color=ma(f.color||h.color).brighten(f.brightness||e.brightness).get();k[""]=a.convertAttribs(v({color:h.color},c),j[""]);k.hover=a.convertAttribs(d.hover,j.hover,k[""]);k.select=a.convertAttribs(d.select,j.select,k[""]);if(h.negative&&b.marker&&l)k[""].fill=k.hover.fill=k.select.fill=a.convertAttribs({fillColor:l}).fill}else k=j;h.pointAttr=k}},update:function(a,b){var c=this.chart,d= -this.type,a=x(this.userOptions,{animation:!1,index:this.index,pointStart:this.xData[0]},a);this.remove(!1);v(this,aa[a.type||d].prototype);this.init(c,a);o(b,!0)&&c.redraw(!1)},destroy:function(){var a=this,b=a.chart,c=/AppleWebKit\/533/.test(Aa),d,e,f=a.data||[],g,h,i;D(a,"destroy");ba(a);n(["xAxis","yAxis"],function(b){if(i=a[b])ga(i.series,a),i.isDirty=i.forceRedraw=!0});a.legendItem&&a.chart.legend.destroyItem(a);for(e=f.length;e--;)(g=f[e])&&g.destroy&&g.destroy();a.points=null;clearTimeout(a.animationTimeout); -n("area,graph,dataLabelsGroup,group,markerGroup,tracker,graphNeg,areaNeg,posClip,negClip".split(","),function(b){a[b]&&(d=c&&b==="group"?"hide":"destroy",a[b][d]())});if(b.hoverSeries===a)b.hoverSeries=null;ga(b.series,a);for(h in a)delete a[h]},drawDataLabels:function(){var a=this,b=a.options.dataLabels,c=a.points,d,e,f,g;if(b.enabled||a._hasPointLabels)a.dlProcessOptions&&a.dlProcessOptions(b),g=a.plotGroup("dataLabelsGroup","data-labels",a.visible?"visible":"hidden",b.zIndex||6),e=b,n(c,function(c){var i, -j=c.dataLabel,k,m,l=c.connector,n=!0;d=c.options&&c.options.dataLabels;i=e.enabled||d&&d.enabled;if(j&&!i)c.dataLabel=j.destroy();else if(i){i=b.rotation;b=x(e,d);k=c.getLabelConfig();f=b.format?wa(b.format,k):b.formatter.call(k,b);b.style.color=o(b.color,b.style.color,a.color,"black");if(j)if(r(f))j.attr({text:f}),n=!1;else{if(c.dataLabel=j=j.destroy(),l)c.connector=l.destroy()}else if(r(f)){j={fill:b.backgroundColor,stroke:b.borderColor,"stroke-width":b.borderWidth,r:b.borderRadius||0,rotation:i, -padding:b.padding,zIndex:1};for(m in j)j[m]===y&&delete j[m];j=c.dataLabel=a.chart.renderer[i?"text":"label"](f,0,-999,null,null,null,b.useHTML).attr(j).css(b.style).add(g).shadow(b.shadow)}j&&a.alignDataLabel(c,j,b,null,n)}})},alignDataLabel:function(a,b,c,d,e){var f=this.chart,g=f.inverted,h=o(a.plotX,-999),a=o(a.plotY,-999),i=b.getBBox(),d=v({x:g?f.plotWidth-a:h,y:t(g?f.plotHeight-h:a),width:0,height:0},d);v(c,{width:i.width,height:i.height});c.rotation?(d={align:c.align,x:d.x+c.x+d.width/2,y:d.y+ -c.y+d.height/2},b[e?"attr":"animate"](d)):b.align(c,null,d);b.attr({visibility:c.crop===!1||f.isInsidePlot(h,a,g)?f.renderer.isSVG?"inherit":"visible":"hidden"})},getSegmentPath:function(a){var b=this,c=[],d=b.options.step;n(a,function(e,f){var g=e.plotX,h=e.plotY,i;b.getPointSpline?c.push.apply(c,b.getPointSpline(a,e,f)):(c.push(f?"L":"M"),d&&f&&(i=a[f-1],d==="right"?c.push(i.plotX,h):d==="center"?c.push((i.plotX+g)/2,i.plotY,(i.plotX+g)/2,h):c.push(g,i.plotY)),c.push(e.plotX,e.plotY))});return c}, -getGraphPath:function(){var a=this,b=[],c,d=[];n(a.segments,function(e){c=a.getSegmentPath(e);e.length>1?b=b.concat(c):d.push(e[0])});a.singlePoints=d;return a.graphPath=b},drawGraph:function(){var a=this,b=this.options,c=[["graph",b.lineColor||this.color]],d=b.lineWidth,e=b.dashStyle,f=this.getGraphPath(),g=b.negativeColor;g&&c.push(["graphNeg",g]);n(c,function(c,g){var j=c[0],k=a[j];if(k)Ta(k),k.animate({d:f});else if(d&&f.length){k={stroke:c[1],"stroke-width":d,zIndex:1};if(e)k.dashstyle=e;a[j]= -a.chart.renderer.path(f).attr(k).add(a.group).shadow(!g&&b.shadow)}})},clipNeg:function(){var a=this.options,b=this.chart,c=b.renderer,d=a.negativeColor,e,f=this.graph,g=this.area,h=this.posClip,i=this.negClip;e=b.chartWidth;var j=b.chartHeight,k=q(e,j);if(d&&(f||g))d=ja(this.yAxis.len-this.yAxis.translate(a.threshold||0)),a={x:0,y:0,width:k,height:d},k={x:0,y:d,width:k,height:k-d},b.inverted&&c.isVML&&(a={x:b.plotWidth-d-b.plotLeft,y:0,width:e,height:j},k={x:d+b.plotLeft-e,y:0,width:b.plotLeft+d, -height:e}),this.yAxis.reversed?(b=k,e=a):(b=a,e=k),h?(h.animate(b),i.animate(e)):(this.posClip=h=c.clipRect(b),this.negClip=i=c.clipRect(e),f&&(f.clip(h),this.graphNeg.clip(i)),g&&(g.clip(h),this.areaNeg.clip(i)))},invertGroups:function(){function a(){var a={width:b.yAxis.len,height:b.xAxis.len};n(["group","markerGroup"],function(c){b[c]&&b[c].attr(a).invert()})}var b=this,c=b.chart;if(b.xAxis)J(c,"resize",a),J(b,"destroy",function(){ba(c,"resize",a)}),a(),b.invertGroups=a},plotGroup:function(a,b, -c,d,e){var f=this[a],g=!f,h=this.chart,i=this.xAxis,j=this.yAxis;g&&(this[a]=f=h.renderer.g(b).attr({visibility:c,zIndex:d||0.1}).add(e));f[g?"attr":"animate"]({translateX:i?i.left:h.plotLeft,translateY:j?j.top:h.plotTop,scaleX:1,scaleY:1});return f},render:function(){var a=this.chart,b,c=this.options,d=c.animation&&!!this.animate&&a.renderer.isSVG,e=this.visible?"visible":"hidden",f=c.zIndex,g=this.hasRendered,h=a.seriesGroup;b=this.plotGroup("group","series",e,f,h);this.markerGroup=this.plotGroup("markerGroup", -"markers",e,f,h);d&&this.animate(!0);this.getAttribs();b.inverted=this.isCartesian?a.inverted:!1;this.drawGraph&&(this.drawGraph(),this.clipNeg());this.drawDataLabels();this.drawPoints();this.options.enableMouseTracking!==!1&&this.drawTracker();a.inverted&&this.invertGroups();c.clip!==!1&&!this.sharedClipKey&&!g&&b.clip(a.clipRect);d?this.animate():g||this.afterAnimate();this.isDirty=this.isDirtyData=!1;this.hasRendered=!0},redraw:function(){var a=this.chart,b=this.isDirtyData,c=this.group,d=this.xAxis, -e=this.yAxis;c&&(a.inverted&&c.attr({width:a.plotWidth,height:a.plotHeight}),c.animate({translateX:o(d&&d.left,a.plotLeft),translateY:o(e&&e.top,a.plotTop)}));this.translate();this.setTooltipPoints(!0);this.render();b&&D(this,"updatedData")},setState:function(a){var b=this.options,c=this.graph,d=this.graphNeg,e=b.states,b=b.lineWidth,a=a||"";if(this.state!==a)this.state=a,e[a]&&e[a].enabled===!1||(a&&(b=e[a].lineWidth||b+1),c&&!c.dashstyle&&(a={"stroke-width":b},c.attr(a),d&&d.attr(a)))},setVisible:function(a, -b){var c=this,d=c.chart,e=c.legendItem,f,g=d.options.chart.ignoreHiddenSeries,h=c.visible;f=(c.visible=a=c.userOptions.visible=a===y?!h:a)?"show":"hide";n(["group","dataLabelsGroup","markerGroup","tracker"],function(a){if(c[a])c[a][f]()});if(d.hoverSeries===c)c.onMouseOut();e&&d.legend.colorizeItem(c,a);c.isDirty=!0;c.options.stacking&&n(d.series,function(a){if(a.options.stacking&&a.visible)a.isDirty=!0});n(c.linkedSeries,function(b){b.setVisible(a,!1)});if(g)d.isDirtyBox=!0;b!==!1&&d.redraw();D(c, -f)},show:function(){this.setVisible(!0)},hide:function(){this.setVisible(!1)},select:function(a){this.selected=a=a===y?!this.selected:a;if(this.checkbox)this.checkbox.checked=a;D(this,a?"select":"unselect")},drawTracker:function(){var a=this,b=a.options,c=b.trackByArea,d=[].concat(c?a.areaPath:a.graphPath),e=d.length,f=a.chart,g=f.pointer,h=f.renderer,i=f.options.tooltip.snap,j=a.tracker,k=b.cursor,k=k&&{cursor:k},m=a.singlePoints,l,n=function(){if(f.hoverSeries!==a)a.onMouseOver()};if(e&&!c)for(l= -e+1;l--;)d[l]==="M"&&d.splice(l+1,0,d[l+1]-i,d[l+2],"L"),(l&&d[l]==="M"||l===e)&&d.splice(l,0,"L",d[l-2]+i,d[l-1]);for(l=0;l=0;d--)da&&i>e?(i=q(a,e),k=2*e-i):ig&&k>e?(k=q(g,e),i=2*e-k):kh?n-h:g-(f.translate(c.y,0,1,0,1)<=g?h:0));c.barX=s;c.pointWidth=i;c.shapeType="rect";c.shapeArgs=c=b.renderer.Element.prototype.crisp.call(0,e,s,t,j,l);e%2&&(c.y-=1,c.height+=1)})},getSymbol:ta,drawLegendSymbol:M.prototype.drawLegendSymbol,drawGraph:ta,drawPoints:function(){var a=this,b=a.options,c=a.chart.renderer,d;n(a.points,function(e){var f=e.plotY,g=e.graphic;if(f!==y&&!isNaN(f)&&e.y!==null)d=e.shapeArgs,g?(Ta(g),g.animate(x(d))):e.graphic= -c[e.shapeType](d).attr(e.pointAttr[e.selected?"select":""]).add(a.group).shadow(b.shadow,null,b.stacking&&!b.borderRadius);else if(g)e.graphic=g.destroy()})},drawTracker:function(){var a=this,b=a.chart.pointer,c=a.options.cursor,d=c&&{cursor:c},e=function(b){var c=b.target,d;for(a.onMouseOver();c&&!d;)d=c.point,c=c.parentNode;if(d!==y)d.onMouseOver(b)};n(a.points,function(a){if(a.graphic)a.graphic.element.point=a;if(a.dataLabel)a.dataLabel.element.point=a});a._hasTracking?a._hasTracking=!0:n(a.trackerGroups, -function(c){if(a[c]&&(a[c].addClass("highcharts-tracker").on("mouseover",e).on("mouseout",function(a){b.onTrackerMouseOut(a)}).css(d),fb))a[c].on("touchstart",e)})},alignDataLabel:function(a,b,c,d,e){var f=this.chart,g=f.inverted,h=a.dlBox||a.shapeArgs,i=a.below||a.plotY>o(this.translatedThreshold,f.plotSizeY),j=o(c.inside,!!this.options.stacking);if(h&&(d=x(h),g&&(d={x:f.plotWidth-d.y-d.height,y:f.plotHeight-d.x-d.width,width:d.height,height:d.width}),!j))g?(d.x+=i?0:d.width,d.width=0):(d.y+=i?d.height: -0,d.height=0);c.align=o(c.align,!g||j?"center":i?"right":"left");c.verticalAlign=o(c.verticalAlign,g||j?"middle":i?"top":"bottom");R.prototype.alignDataLabel.call(this,a,b,c,d,e)},animate:function(a){var b=this.yAxis,c=this.options,d=this.chart.inverted,e={};if(Z)a?(e.scaleY=0.001,a=K(b.pos+b.len,q(b.pos,b.toPixels(c.threshold))),d?e.translateX=a-b.len:e.translateY=a,this.group.attr(e)):(e.scaleY=1,e[d?"translateX":"translateY"]=b.pos,this.group.animate(e,this.options.animation),this.animate=null)}, -remove:function(){var a=this,b=a.chart;b.hasRendered&&n(b.series,function(b){if(b.type===a.type)b.isDirty=!0});R.prototype.remove.apply(a,arguments)}});aa.column=F;X.bar=x(X.column);na=ea(F,{type:"bar",inverted:!0});aa.bar=na;X.scatter=x(W,{lineWidth:0,tooltip:{headerFormat:'{series.name}
    ',pointFormat:"x: {point.x}
    y: {point.y}
    ",followPointer:!0},stickyTracking:!1});na=ea(R,{type:"scatter",sorted:!1,requireSorting:!1, -noSharedTooltip:!0,trackerGroups:["markerGroup"],drawTracker:F.prototype.drawTracker,setTooltipPoints:ta});aa.scatter=na;X.pie=x(W,{borderColor:"#FFFFFF",borderWidth:1,center:[null,null],clip:!1,colorByPoint:!0,dataLabels:{distance:30,enabled:!0,formatter:function(){return this.point.name}},ignoreHiddenPoint:!0,legendType:"point",marker:null,size:null,showInLegend:!1,slicedOffset:10,states:{hover:{brightness:0.1,shadow:!1}},stickyTracking:!1,tooltip:{followPointer:!0}});W={type:"pie",isCartesian:!1, -pointClass:ea(Na,{init:function(){Na.prototype.init.apply(this,arguments);var a=this,b;if(a.y<0)a.y=null;v(a,{visible:a.visible!==!1,name:o(a.name,"Slice")});b=function(){a.slice()};J(a,"select",b);J(a,"unselect",b);return a},setVisible:function(a){var b=this,c=b.series,d=c.chart,e;b.visible=b.options.visible=a=a===y?!b.visible:a;c.options.data[la(b,c.data)]=b.options;e=a?"show":"hide";n(["graphic","dataLabel","connector","shadowGroup"],function(a){if(b[a])b[a][e]()});b.legendItem&&d.legend.colorizeItem(b, -a);if(!c.isDirty&&c.options.ignoreHiddenPoint)c.isDirty=!0,d.redraw()},slice:function(a,b,c){var d=this.series;Ia(c,d.chart);o(b,!0);this.sliced=this.options.sliced=a=r(a)?a:!this.sliced;d.options.data[la(this,d.data)]=this.options;a=a?this.slicedTranslation:{translateX:0,translateY:0};this.graphic.animate(a);this.shadowGroup&&this.shadowGroup.animate(a)}}),requireSorting:!1,noSharedTooltip:!0,trackerGroups:["group","dataLabelsGroup"],pointAttrToOptions:{stroke:"borderColor","stroke-width":"borderWidth", -fill:"color"},getColor:ta,animate:function(a){var b=this,c=b.points,d=b.startAngleRad;if(!a)n(c,function(a){var c=a.graphic,a=a.shapeArgs;c&&(c.attr({r:b.center[3]/2,start:d,end:d}),c.animate({r:a.r,start:a.start,end:a.end},b.options.animation))}),b.animate=null},setData:function(a,b){R.prototype.setData.call(this,a,!1);this.processData();this.generatePoints();o(b,!0)&&this.chart.redraw()},getCenter:function(){var a=this.options,b=this.chart,c=2*(a.slicedOffset||0),d,e=b.plotWidth-2*c,f=b.plotHeight- -2*c,b=a.center,a=[o(b[0],"50%"),o(b[1],"50%"),a.size||"100%",a.innerSize||0],g=K(e,f),h;return La(a,function(a,b){h=/%$/.test(a);d=b<2||b===2&&h;return(h?[e,f,g,g][b]*u(a)/100:a)+(d?c:0)})},translate:function(a){this.generatePoints();var b=0,c=0,d=this.options,e=d.slicedOffset,f=e+d.borderWidth,g,h,i,j=this.startAngleRad=Ka/180*((d.startAngle||0)%360-90),k=this.points,m=2*Ka,l=d.dataLabels.distance,n=d.ignoreHiddenPoint,o,q=k.length,r;if(!a)this.center=a=this.getCenter();this.getX=function(b,c){i= -I.asin((b-a[1])/(a[2]/2+l));return a[0]+(c?-1:1)*Y(i)*(a[2]/2+l)};for(o=0;o0.75*m&&(i-=2*Ka);r.slicedTranslation={translateX:t(Y(i)*e),translateY:t(ca(i)*e)};g=Y(i)*a[2]/2;h=ca(i)*a[2]/2;r.tooltipPos=[a[0]+g*0.7,a[1]+h*0.7];r.half=i0,v,w,u,x,y=[[],[]],A,z,E,H,C,D=[0,0,0,0], -K=function(a,b){return b.y-a.y},M=function(a,b){a.sort(function(a,c){return a.angle!==void 0&&(c.angle-a.angle)*b})};if(e.enabled||a._hasPointLabels){R.prototype.drawDataLabels.apply(a);n(b,function(a){a.dataLabel&&y[a.half].push(a)});for(H=0;!x&&b[H];)x=b[H]&&b[H].dataLabel&&(b[H].dataLabel.getBBox().height||21),H++;for(H=2;H--;){var b=[],L=[],I=y[H],J=I.length,F;M(I,H-0.5);if(m>0){for(C=s-p-m;C<=s+p+m;C+=x)b.push(C);w=b.length;if(J>w){c=[].concat(I);c.sort(K);for(C=J;C--;)c[C].rank=C;for(C=J;C--;)I[C].rank>= -w&&I.splice(C,1);J=I.length}for(C=0;C0){if(w=L.pop(),F=w.i,z=w.y,c>z&&b[F+1]!==null||ch-f&&(D[1]=q(t(A+w-h+f),D[1])),z-x/2<0?D[0]=q(t(-z+x/2),D[0]):z+x/2>d&&(D[2]=q(t(z+x/2-d),D[2]))}}if(pa(D)===0||this.verifyDataLabelOverflow(D))this.placeDataLabels(),r&&g&&n(this.points,function(b){i=b.connector;u=b.labelPos;if((v=b.dataLabel)&&v._pos)E=v._attr.visibility,A=v.connX,z=v.connY,j=k?["M",A+(u[6]==="left"?5:-5),z, -"C",A,z,2*u[2]-u[4],2*u[3]-u[5],u[2],u[3],"L",u[4],u[5]]:["M",A+(u[6]==="left"?5:-5),z,"L",u[2],u[3],"L",u[4],u[5]],i?(i.animate({d:j}),i.attr("visibility",E)):b.connector=i=a.chart.renderer.path(j).attr({"stroke-width":g,stroke:e.connectorColor||b.color||"#606060",visibility:E}).add(a.group);else if(i)b.connector=i.destroy()})}},verifyDataLabelOverflow:function(a){var b=this.center,c=this.options,d=c.center,e=c=c.minSize||80,f;d[0]!==null?e=q(b[2]-q(a[1],a[3]),c):(e=q(b[2]-a[1]-a[3],c),b[0]+=(a[3]- -a[1])/2);d[1]!==null?e=q(K(e,b[2]-q(a[0],a[2])),c):(e=q(K(e,b[2]-a[0]-a[2]),c),b[1]+=(a[0]-a[2])/2);e=0===c})}function bk(a){var b=bl.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function bC(a,b){return a.getElementsByTagName(b)[0]||a.appendChild(a.ownerDocument.createElement(b))}function bD(a,b){if(b.nodeType!==1||!p.hasData(a))return;var c,d,e,f=p._data(a),g=p._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;d").appendTo(e.body),c=b.css("display");b.remove();if(c==="none"||c===""){bI=e.body.appendChild(bI||p.extend(e.createElement("iframe"),{frameBorder:0,width:0,height:0}));if(!bJ||!bI.createElement)bJ=(bI.contentWindow||bI.contentDocument).document,bJ.write(""),bJ.close();b=bJ.body.appendChild(bJ.createElement(a)),c=bH(b,"display"),e.body.removeChild(bI)}return bS[a]=c,c}function ci(a,b,c,d){var e;if(p.isArray(b))p.each(b,function(b,e){c||ce.test(a)?d(a,e):ci(a+"["+(typeof e=="object"?b:"")+"]",e,c,d)});else if(!c&&p.type(b)==="object")for(e in b)ci(a+"["+e+"]",b[e],c,d);else d(a,b)}function cz(a){return function(b,c){typeof b!="string"&&(c=b,b="*");var d,e,f,g=b.toLowerCase().split(s),h=0,i=g.length;if(p.isFunction(c))for(;h)[^>]*$|#([\w\-]*)$)/,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^[\],:{}\s]*$/,x=/(?:^|:|,)(?:\s*\[)+/g,y=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,z=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,A=/^-ms-/,B=/-([\da-z])/gi,C=function(a,b){return(b+"").toUpperCase()},D=function(){e.addEventListener?(e.removeEventListener("DOMContentLoaded",D,!1),p.ready()):e.readyState==="complete"&&(e.detachEvent("onreadystatechange",D),p.ready())},E={};p.fn=p.prototype={constructor:p,init:function(a,c,d){var f,g,h,i;if(!a)return this;if(a.nodeType)return this.context=this[0]=a,this.length=1,this;if(typeof a=="string"){a.charAt(0)==="<"&&a.charAt(a.length-1)===">"&&a.length>=3?f=[null,a,null]:f=u.exec(a);if(f&&(f[1]||!c)){if(f[1])return c=c instanceof p?c[0]:c,i=c&&c.nodeType?c.ownerDocument||c:e,a=p.parseHTML(f[1],i,!0),v.test(f[1])&&p.isPlainObject(c)&&this.attr.call(a,c,!0),p.merge(this,a);g=e.getElementById(f[2]);if(g&&g.parentNode){if(g.id!==f[2])return d.find(a);this.length=1,this[0]=g}return this.context=e,this.selector=a,this}return!c||c.jquery?(c||d).find(a):this.constructor(c).find(a)}return p.isFunction(a)?d.ready(a):(a.selector!==b&&(this.selector=a.selector,this.context=a.context),p.makeArray(a,this))},selector:"",jquery:"1.8.2",length:0,size:function(){return this.length},toArray:function(){return k.call(this)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=p.merge(this.constructor(),a);return d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")"),d},each:function(a,b){return p.each(this,a,b)},ready:function(a){return p.ready.promise().done(a),this},eq:function(a){return a=+a,a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(k.apply(this,arguments),"slice",k.call(arguments).join(","))},map:function(a){return this.pushStack(p.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:j,sort:[].sort,splice:[].splice},p.fn.init.prototype=p.fn,p.extend=p.fn.extend=function(){var a,c,d,e,f,g,h=arguments[0]||{},i=1,j=arguments.length,k=!1;typeof h=="boolean"&&(k=h,h=arguments[1]||{},i=2),typeof h!="object"&&!p.isFunction(h)&&(h={}),j===i&&(h=this,--i);for(;i0)return;d.resolveWith(e,[p]),p.fn.trigger&&p(e).trigger("ready").off("ready")},isFunction:function(a){return p.type(a)==="function"},isArray:Array.isArray||function(a){return p.type(a)==="array"},isWindow:function(a){return a!=null&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):E[m.call(a)]||"object"},isPlainObject:function(a){if(!a||p.type(a)!=="object"||a.nodeType||p.isWindow(a))return!1;try{if(a.constructor&&!n.call(a,"constructor")&&!n.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||n.call(a,d)},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},error:function(a){throw new Error(a)},parseHTML:function(a,b,c){var d;return!a||typeof a!="string"?null:(typeof b=="boolean"&&(c=b,b=0),b=b||e,(d=v.exec(a))?[b.createElement(d[1])]:(d=p.buildFragment([a],b,c?null:[]),p.merge([],(d.cacheable?p.clone(d.fragment):d.fragment).childNodes)))},parseJSON:function(b){if(!b||typeof b!="string")return null;b=p.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(w.test(b.replace(y,"@").replace(z,"]").replace(x,"")))return(new Function("return "+b))();p.error("Invalid JSON: "+b)},parseXML:function(c){var d,e;if(!c||typeof c!="string")return null;try{a.DOMParser?(e=new DOMParser,d=e.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(f){d=b}return(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&p.error("Invalid XML: "+c),d},noop:function(){},globalEval:function(b){b&&r.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(A,"ms-").replace(B,C)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,c,d){var e,f=0,g=a.length,h=g===b||p.isFunction(a);if(d){if(h){for(e in a)if(c.apply(a[e],d)===!1)break}else for(;f0&&a[0]&&a[i-1]||i===0||p.isArray(a));if(j)for(;h-1)i.splice(c,1),e&&(c<=g&&g--,c<=h&&h--)}),this},has:function(a){return p.inArray(a,i)>-1},empty:function(){return i=[],this},disable:function(){return i=j=c=b,this},disabled:function(){return!i},lock:function(){return j=b,c||l.disable(),this},locked:function(){return!j},fireWith:function(a,b){return b=b||[],b=[a,b.slice?b.slice():b],i&&(!d||j)&&(e?j.push(b):k(b)),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!d}};return l},p.extend({Deferred:function(a){var b=[["resolve","done",p.Callbacks("once memory"),"resolved"],["reject","fail",p.Callbacks("once memory"),"rejected"],["notify","progress",p.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return p.Deferred(function(c){p.each(b,function(b,d){var f=d[0],g=a[b];e[d[1]](p.isFunction(g)?function(){var a=g.apply(this,arguments);a&&p.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f+"With"](this===e?c:this,[a])}:c[f])}),a=null}).promise()},promise:function(a){return a!=null?p.extend(a,d):d}},e={};return d.pipe=d.then,p.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[a^1][2].disable,b[2][2].lock),e[f[0]]=g.fire,e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=k.call(arguments),d=c.length,e=d!==1||a&&p.isFunction(a.promise)?d:0,f=e===1?a:p.Deferred(),g=function(a,b,c){return function(d){b[a]=this,c[a]=arguments.length>1?k.call(arguments):d,c===h?f.notifyWith(b,c):--e||f.resolveWith(b,c)}},h,i,j;if(d>1){h=new Array(d),i=new Array(d),j=new Array(d);for(;b
    '.($addonids[$id] ? "$style[tplname]" : $style['tplname']).'
    '. ($id > 0 ? "

    \"{$lang['preview']}\"

    {$lang['styles_default']}

    @@ -227,8 +227,8 @@

    {$lang['edit']}  ". (($isplugindeveloper && $isfounder) || !$addonids[$style['styleid']] || !cloudaddons_getmd5($addonids[$style['styleid']]) ? " {$lang['export']}
    " : '
    '). - "{$lang['copy']}   {$lang['restore']} - ".($isfounder && $addonids[$id] ? "   {$lang['plugins_visit']}" : '')." + "{$lang['copy']}   {$lang['restore']} + ".($isfounder && $addonids[$id] ? "   {$lang['plugins_visit']}" : '')."

    " : "
    @@ -568,7 +568,7 @@ function imgpre_switch(id) { echo ''; showtips('styles_tips'); - showformheader("styles&operation=edit&id=$id"); + showformheader("styles&operation=edit&id=$id", 'enctype'); showtableheader($lang['styles_edit'], 'nobottom'); showsetting('styles_edit_name', 'namenew', $style['name'], 'text'); showsetting('styles_edit_tpl', array('templateidnew', $tplselect), $style['templateid'], 'select'); @@ -579,9 +579,14 @@ function imgpre_switch(id) { showsetting('styles_edit_smileytype', array("stylevar[{$stylestuff['stypeid']['id']}]", $smileytypes), $stylestuff['stypeid']['subst'], 'select'); showsetting('styles_edit_imgdir', '', '', ''); showsetting('styles_edit_styleimgdir', '', '', ''); - showsetting('styles_edit_logo', "stylevar[{$stylestuff['boardimg']['id']}]", $stylestuff['boardimg']['subst'], 'text'); - showsetting('styles_edit_searchlogo', "stylevar[{$stylestuff['searchimg']['id']}]", $stylestuff['searchimg']['subst'], 'text'); - showsetting('styles_edit_touchlogo', "stylevar[{$stylestuff['touchimg']['id']}]", empty($stylestuff['touchimg']['subst']) ? 'logo_m.svg' : $stylestuff['touchimg']['subst'], 'text'); + empty($stylestuff['imgdir']['subst']) && $stylestuff['imgdir']['subst'] = 'static/image/common'; + empty($stylestuff['styleimgdir']['subst']) && $stylestuff['styleimgdir']['subst'] = $stylestuff['imgdir']['subst']; + $boardimghtml = '
    '; + $searchimghtml = ''; + $touchimghtml = ''; + showsetting('styles_edit_logo', "stylevar[{$stylestuff['boardimg']['id']}]", $stylestuff['boardimg']['subst'], 'filetext', '', 0, cplang('styles_edit_logo_comment').$boardimghtml); + showsetting('styles_edit_searchlogo', "stylevar[{$stylestuff['searchimg']['id']}]", $stylestuff['searchimg']['subst'], 'filetext', '', 0, $searchimghtml); + showsetting('styles_edit_touchlogo', "stylevar[{$stylestuff['touchimg']['id']}]", empty($stylestuff['touchimg']['subst']) ? 'logo_m.svg' : $stylestuff['touchimg']['subst'], 'filetext', '', 0, $touchimghtml); foreach($predefinedvars as $predefinedvar => $v) { if($v !== array()) { @@ -684,6 +689,29 @@ function imgpre_switch(id) { $stylevarids = array($varid); C::t('common_stylevar')->update_substitute_by_styleid($substitute, $id, $stylevarids); } + + if(isset($_FILES['stylevar']['name'])) { + foreach(C::t('common_stylevar')->fetch_all_by_styleid($id) as $stylevar) { + $stylesvar[$stylevar['stylevarid']] = $stylevar['variable']; + } + $upload = new discuz_upload(); + foreach ($_FILES['stylevar']['name'] as $varid => $value) { + if($stylesvar[$varid]) { + $file = array( + 'name' => $_FILES['stylevar']['name'][$varid], + 'type' => $_FILES['stylevar']['type'][$varid], + 'tmp_name' => $_FILES['stylevar']['tmp_name'][$varid], + 'error' => $_FILES['stylevar']['error'][$varid], + 'size' => $_FILES['stylevar']['size'][$varid], + ); + if($upload->init($file, 'common', 0, '', 'template', 0, $stylesvar[$varid].'_'.date('Ymd').strtolower(random(8))) && $upload->save()) { + $logonew = $_G['setting']['attachurl'].'common/'.$upload->attach['attachment']; + $stylevarids = array($varid); + C::t('common_stylevar')->update_substitute_by_styleid($logonew, $id, $stylevarids); + } + } + } + } } } diff --git a/upload/source/admincp/discuzfiles.md5 b/upload/source/admincp/discuzfiles.md5 index 218c2be8..3ae799f5 100644 --- a/upload/source/admincp/discuzfiles.md5 +++ b/upload/source/admincp/discuzfiles.md5 @@ -10,7 +10,7 @@ c028c4822428e83a358c60a93ef65381 *./favicon.ico 1b812cfe92c4beb785f13e620253c2b4 *./forum.php 0ac2b76abf74ea61d30dc04073e506cc *./group.php ca0ffc078f8e602cea2a96348b329d74 *./home.php -de0427c6f72fba3e03ed0a2d5975bf3e *./index.php +9d6f440376d98d5954301237d4b4b8f7 *./index.php 0d673a9b9f136a7a6b6b25d4ff4bc1fd *./install f1e900c4bdc2488da6413144d9d95faf *./member.php 9b2c07ca5e531454aa1259611d302a76 *./misc.php @@ -66,7 +66,7 @@ d41d8cd98f00b204e9800998ecf8427e *data/avatar/index.htm d41d8cd98f00b204e9800998ecf8427e *data/log/index.htm d41d8cd98f00b204e9800998ecf8427e *data/cache/index.htm f8689e3b96ecbac8ab0b9568cb412a5e *data/ipdata/geoip2.phar -c0b47f575630d98cf2cae1d8fcb6adc2 *data/ipdata/GeoLite2-City.mmdb +fdb964c1150388ad4e3d13dde6acbed5 *data/ipdata/GeoLite2-City.mmdb 7215ee9c7d9dc229d2921a40e899ec5f *data/ipdata/index.htm 79da57ff3e78fd0dffa638c8144582ef *data/ipdata/ipv6wry.dat ebff35fbfdb5759cdf60b9b79b5b0a5b *data/ipdata/tinyipdata.dat @@ -75,7 +75,7 @@ d41d8cd98f00b204e9800998ecf8427e *data/plugindata/index.htm d41d8cd98f00b204e9800998ecf8427e *data/threadcache/index.htm d41d8cd98f00b204e9800998ecf8427e *data/download/index.htm d41d8cd98f00b204e9800998ecf8427e *data/addonmd5/index.htm -3340634fcccd43e395a66439394f808a *source/discuz_version.php +0fd0e8683f2a0aa316f1d77f9554cf86 *source/discuz_version.php 7215ee9c7d9dc229d2921a40e899ec5f *source/index.htm 457199b5d87444d7064d50d094b1a23e *source/admincp/admincp_admingroup.php be0ed17d7af5a8cf82a548219521f1c3 *source/admincp/admincp_adv.php @@ -90,7 +90,7 @@ a64423a547fee8d828dd06970d660c41 *source/admincp/admincp_article.php 159b6cc148de90122e64bc9f530ab325 *source/admincp/admincp_blog.php 40d29c3b204193d0f49443f8e1644c9f *source/admincp/admincp_blogcategory.php 93b8d5589d1aff4f552ffea4e333b114 *source/admincp/admincp_blogrecyclebin.php -e4cb345794fc217bce89956df466d32e *source/admincp/admincp_card.php +100ec41b58b982aaf36588f599b3c7b6 *source/admincp/admincp_card.php 6d6d9b93b0802925b9c05ad3760190ec *source/admincp/admincp_checktools.php 31a9026931c6cf4c8a360176160bab3e *source/admincp/admincp_click.php 112565e34c5c6d26b31057f8a1074a9a *source/admincp/admincp_cloudaddons.php @@ -98,21 +98,21 @@ ffcfdc5d0b27a904d1fc9f1cd51c1b18 *source/admincp/admincp_collection.php 4fac6845e10e6125a09b83a8249fce33 *source/admincp/admincp_comment.php 8c578f43cb6c30fd259d47072bb42678 *source/admincp/admincp_counter.php 754e081bf2bdd6807c8ee830b40645f2 *source/admincp/admincp_credits.php -c69e36a91322969a640cca6e4809ea9d *source/admincp/admincp_db.php +c244e08c94839ea9c1a44cbc10560467 *source/admincp/admincp_db.php a0ca9da5bc59a4a8e9b7c99d37c6bb6f *source/admincp/admincp_district.php 37f45652a977ff69218a82a87b4a7850 *source/admincp/admincp_diytemplate.php b06f8c3d7bd1ce66f0d6185a7366d054 *source/admincp/admincp_doing.php 99eb7c9b5490c9c33c77e2b1d6491a39 *source/admincp/admincp_domain.php 388907d2b88bb926fde08c98b468a7ed *source/admincp/admincp_ec.php -0adcc88141da3ab3c97d1a825bbf32c6 *source/admincp/admincp_faq.php +b78c3896acb1f1191cb44bebb39af2bd *source/admincp/admincp_faq.php b1dd8823007953df695c3ea826c0f522 *source/admincp/admincp_feed.php -293bd2625e8042b5987310bc70503a27 *source/admincp/admincp_forums.php +ac3727d9b8be7e7cbd062543e6605485 *source/admincp/admincp_forums.php d4c7e5c3ba8c6be51ced2b168fcc8b2a *source/admincp/admincp_founder.php a9f04f1e9895680c7d31117e442afe5d *source/admincp/admincp_grid.php 72bf994a2a326a8ed859df343b8ae557 *source/admincp/admincp_group.php -c5643aff2b1290b2adc2a162dd6b4593 *source/admincp/admincp_index.php +ef6bd8b99da2812693c9e9b7e695bda7 *source/admincp/admincp_index.php 461f6a59df6839dcc2dc28336c49afb7 *source/admincp/admincp_login.php -de3e0ffea9782da8286632994c151acb *source/admincp/admincp_logs.php +c6d08f95d0ce18c125aeec3de03aac2e *source/admincp/admincp_logs.php 1471697ffddca1fff19dee7d0c1dccab *source/admincp/admincp_magics.php 79c14956cf6e7600386b9d1665949262 *source/admincp/admincp_main.php cb43186efedc819934d42c3d1d5f6f69 *source/admincp/admincp_makehtml.php @@ -120,14 +120,14 @@ cb43186efedc819934d42c3d1d5f6f69 *source/admincp/admincp_makehtml.php 72fa3705471bbd75d64edc83ed28a772 *source/admincp/admincp_members.php 65e2b3c419e53b38d216712653048504 *source/admincp/admincp_membersplit.php d98f3e4f00d269805401838524c90cd0 *source/admincp/admincp_menu.php -882cbb7071e858e4a533899580e578cd *source/admincp/admincp_misc.php +bcab758dbf232aeafbc63ec16e8357f9 *source/admincp/admincp_misc.php b42c643fd3bd876710eeed796cdf3566 *source/admincp/admincp_moderate.php 1127b22297f493b574605a847603b601 *source/admincp/admincp_nav.php c0c1326df6510c3886ebc5c84acefc72 *source/admincp/admincp_optimizer.php 7b2e2342ada25ec87639c69789676365 *source/admincp/admincp_perm.php 10ee915453278058249108d96362c726 *source/admincp/admincp_pic.php 3db6ff77e5819088e0e1be99012b826d *source/admincp/admincp_plugins.php -b0b7834536103fb37eca05f38d2acaee *source/admincp/admincp_portalcategory.php +9121e1c71f8fec8e1f4bca07ec86879d *source/admincp/admincp_portalcategory.php 85dcf81fd6520d1abf0d68d69d50cbca *source/admincp/admincp_portalpermission.php a058176f196db0afc91fcc7943be7810 *source/admincp/admincp_postcomment.php 623987000d46c95b7ff5c2e793b8220c *source/admincp/admincp_postsplit.php @@ -139,12 +139,12 @@ a058176f196db0afc91fcc7943be7810 *source/admincp/admincp_postcomment.php 32aa66e9adaa4a5e7ebef41c94c793ba *source/admincp/admincp_report.php 8a4e0470ac38f97da3e09437cbf02fe7 *source/admincp/admincp_runtests.php 71e88bb2880c9ba3f72365ceeb2ffb6a *source/admincp/admincp_search.php -0c85857df2adcb23430b8bb30ff818eb *source/admincp/admincp_setting.php +a0b9d37361372927258a3bcc8effbb65 *source/admincp/admincp_setting.php a7e3689faf2d04e840007e79f9410555 *source/admincp/admincp_share.php 23137684e4820ca59a335e7a724c2b1f *source/admincp/admincp_smilies.php 3113a577d065557949f1ac8780f8b81f *source/admincp/admincp_smsgw.php 6b2412f8b7774ae6f50cd6fa14e52bd9 *source/admincp/admincp_specialuser.php -447cf9036daacad0c0f89b9c7750ee5c *source/admincp/admincp_styles.php +8290d02b578867252c4147502a343943 *source/admincp/admincp_styles.php 2cb5cc918b13798ca2f944209faa1d31 *source/admincp/admincp_tag.php e48b35dd060f51ea925a7f4d9e69fea8 *source/admincp/admincp_tasks.php 48b12378dfe5ff6384ab345f2406e53b *source/admincp/admincp_templates.php @@ -317,10 +317,10 @@ b24440c2a360ef2fd0a2ee42d1837b2d *source/class/class_sms.php 0ab63824a0026b403eb0b8efa3fca888 *source/class/class_sphinx.php b6b3906bc37420e700b15af398755dca *source/class/class_tag.php d87408ec430e1a9807ff1a583dbcf295 *source/class/class_task.php -b88503c742cd6283190a01d12280bc68 *source/class/class_template.php +0ae805fd070b4a97cdf220b3d0480811 *source/class/class_template.php 325c5adef898d56e78e1a9187ee98751 *source/class/class_xml.php 158b88be44a90a992eae4ed2b685c803 *source/class/class_zip.php -d9fc616062766dfc8e2a3269df3192a2 *source/class/db/db_driver_mysqli.php +21ae8c8fb30215dccc2970353c75409a *source/class/db/db_driver_mysqli.php ca2e45ca8f528ca595e978a546d2711d *source/class/db/db_driver_mysqli_slave.php d41d8cd98f00b204e9800998ecf8427e *source/class/db/index.htm 2703b7d935c58e03d9970b682f819cf3 *source/class/discuz/discuz_admincp.php @@ -333,7 +333,7 @@ b8ae80e3cc4861b1c5237c9d76e90fa5 *source/class/discuz/discuz_container.php 4beda424464c4de67cedaba60b306124 *source/class/discuz/discuz_cron.php 553d4b95748a74307aa8457127b4c150 *source/class/discuz/discuz_database.php c0c093d7ccd5b16a6715b89b0ce6ad4c *source/class/discuz/discuz_error.php -770b5620f235ec9e7bbd0950f524e3d9 *source/class/discuz/discuz_extend.php +ee5b3de8077395d111cc35c02fe61eca *source/class/discuz/discuz_extend.php 65e20ff0b6a2a2946b873c4b531a924f *source/class/discuz/discuz_ftp.php 5db366ec11af20793525ee6123cf03f6 *source/class/discuz/discuz_memory.php 33fc8477244de154fa128b6b624b2d4d *source/class/discuz/discuz_model.php @@ -345,7 +345,7 @@ c0c093d7ccd5b16a6715b89b0ce6ad4c *source/class/discuz/discuz_error.php 7f92dfc0de0cf70c65570d519fdb38c1 *source/class/discuz/discuz_table.php c82dd42edb43efd92453f5f0e96deead *source/class/discuz/discuz_table_archive.php 4f251fee68c5a73c5c4e18c288901e9f *source/class/discuz/discuz_upgrade.php -64b26625d12a2bef6b01e6633ea32e0c *source/class/discuz/discuz_upload.php +782289e5e78acc91dde9ff9c7a2ffe03 *source/class/discuz/discuz_upload.php d41d8cd98f00b204e9800998ecf8427e *source/class/discuz/index.htm dd2a682cb80610581d50894753c78c0d *source/class/extend/extend_thread_activity.php b01997e7f549af2d6e1168ead2ba9d3c *source/class/extend/extend_thread_allowat.php @@ -372,15 +372,15 @@ d41d8cd98f00b204e9800998ecf8427e *source/class/forum/index.htm 43ef1a61bba663130b139781468b0494 *source/class/helper/helper_antitheft.php 59220a31da954b7d2227f336dbb6f0c3 *source/class/helper/helper_attach.php e2effa65d1f1a3761b4956a976553dbb *source/class/helper/helper_dbtool.php -ad130c222b71002ab957b32d607c523f *source/class/helper/helper_form.php +bbc2661ab8f2fe370ee1f407ac75a4fb *source/class/helper/helper_form.php 5b4c3fb8541d9c97c4ceff745bf1cc24 *source/class/helper/helper_invite.php cb470c2fc9687f577bf7158e946b6198 *source/class/helper/helper_json.php 45a56c1976d7ec0ffecefc0146796bbf *source/class/helper/helper_log.php a16b085b9aa4c6dc8ccc4f052405d01c *source/class/helper/helper_makehtml.php -3153f5c2deae2e4294010928c458d810 *source/class/helper/helper_mobile.php +3b29938015b5a9c5974ca4fa8b7b6ecc *source/class/helper/helper_mobile.php 4893afd59606b77d8a26263122019415 *source/class/helper/helper_notification.php fbecf04eacbdce0e05d105c45e66051b *source/class/helper/helper_output.php -a2f2d9d076697b1c25eea29e8a57f36e *source/class/helper/helper_page.php +cb4827fafb769f149bdec0fb0d924fa0 *source/class/helper/helper_page.php 7dd253716a8c640542b69bae75e16a84 *source/class/helper/helper_pm.php c0f80c09fa102bfda6306d662ed99586 *source/class/helper/helper_seccheck.php 52ce3b5ab625067d6d24253122f7c90c *source/class/helper/helper_seo.php @@ -437,7 +437,7 @@ dca56e678df01ba514de01980af2df0e *source/class/memory/memory_driver_redis.php ea2066175404f7ab9d749592b5a1bb4e *source/class/memory/memory_driver_yac.php 5fb4d9b1c5cf285abd80802765852fa2 *source/class/memory/memory_setting_array.php d41d8cd98f00b204e9800998ecf8427e *source/class/model/index.htm -c7a1515b69a0b34c924078b5bc52b1c4 *source/class/model/model_forum_post.php +a3a648caa7e25f5340e5e5aa39892554 *source/class/model/model_forum_post.php a97e6e23e5dc2c7336b8205d6d8603dd *source/class/model/model_forum_thread.php 7215ee9c7d9dc229d2921a40e899ec5f *source/class/optimizer/index.htm bbb7b9348becfc1bda0b510faf533948 *source/class/optimizer/optimizer_aggid.php @@ -780,21 +780,21 @@ f09feb7638b8b10f557cfc77efa8a528 *source/function/cache/cache_smilies.php 2b70af37dd4e20694adc693c4dfd3719 *source/function/cache/cache_split.php 07472b4201a16c74bd2b836e7fe423a4 *source/function/cache/cache_stamps.php 5fc03eedb99553f1e3348f3310dbd94a *source/function/cache/cache_stamptypeid.php -c103c846fb5e272400294b1db51a0b2c *source/function/cache/cache_styles.php +7bfed0e452253f02a4f97b897e96ad0c *source/function/cache/cache_styles.php fe617c17728d90c0b60d9a7346af4191 *source/function/cache/cache_threadsorts.php 5dfa8854085ef6e641d6c611fc8c3804 *source/function/cache/cache_updatediytemplate.php 96eb1d7fdcb1db31443040fff1556f9c *source/function/cache/cache_usergroups.php 8dffc3b7045a96be9bee7e6915769e59 *source/function/cache/cache_userstats.php d41d8cd98f00b204e9800998ecf8427e *source/function/cache/index.htm -20012b7e5db95fd3df0507b3a379cc28 *source/function/function_admincp.php +273cb3ed9637453a3c8060569d0f8208 *source/function/function_admincp.php 5a5e8bc6d7a1fe47d130140872e8ce38 *source/function/function_attachment.php -05a38974989e51f498b4b61c01232442 *source/function/function_block.php +a160970e9689b58e720c2dfbacb45a2f *source/function/function_block.php 6a225d15274e63330383368b1b3cb35a *source/function/function_blog.php bebf182768886ee2cf2aa320b89ca87d *source/function/function_cache.php 8eef58d41b9d1842f5566def3f97fb9e *source/function/function_cloudaddons.php 95f0fa11b876d5ebd41d1c9f3956d819 *source/function/function_collection.php 6068a9e9281677ca335394142c33ca2e *source/function/function_comment.php -8237e1d2a8b8e17b3da1e0df971475cd *source/function/function_core.php +161c0f80f0f0ade9a5fad683598a2ba1 *source/function/function_core.php 4ec7eb278c959ff02f0ffa570254b8aa *source/function/function_credit.php 5bb6498fef2c9089a41385dfadc2c594 *source/function/function_delete.php 353c2ba4c0d40a362073e83ea760ec57 *source/function/function_discuzcode.php @@ -819,7 +819,7 @@ e2f9dba4503a7e56ec0b1b8372ab251f *source/function/function_magic.php e4ca7d81cdeb88f4ad00140d5e59f94b *source/function/function_misc.php 354bad4bbf69c4b466a00800259f76ef *source/function/function_plugin.php b551f459e38ee1a908233b10a93f07b6 *source/function/function_portal.php -930c359d6636d5407de8c00b95157f8c *source/function/function_portalcp.php +5851aa4cbd268d6748e036cfa591a978 *source/function/function_portalcp.php 408d50a742be70244e15d51c3b0b4eab *source/function/function_post.php da11dcd0d3d07491aca87e16effbd524 *source/function/function_preg.php 88ea8c24766183123c3dfc1a74b55617 *source/function/function_profile.php @@ -932,7 +932,7 @@ c5841c1b8c2d7ce308b860ef757b7caf *source/include/post/post_threadsorts.php d41d8cd98f00b204e9800998ecf8427e *source/include/space/index.htm 16ab16ff66d49d4ada427ed94e52299f *source/include/space/space_activity.php 7202077c66b62d88aa41fb557b42c31c *source/include/space/space_album.php -db42c2068f4a7e8fb79a659a2ecfd184 *source/include/space/space_blog.php +f946e72e885e99c74bd9767e4a745cb2 *source/include/space/space_blog.php df1f8123b032a73f7e30b303e0e93872 *source/include/space/space_debate.php 7d5372aecbbe4ec8979ccfffd8196444 *source/include/space/space_doing.php ecb0abeb86d841048ae4ac7265339152 *source/include/space/space_favorite.php @@ -950,7 +950,7 @@ df4d8ba6008067f7fb87b266043e0c20 *source/include/space/space_poll.php 86f3eaae29f06af264b4ab77b0c4041b *source/include/space/space_trade.php 57641aa952249d6d354090e3c4447794 *source/include/space/space_wall.php d41d8cd98f00b204e9800998ecf8427e *source/include/spacecp/index.htm -85229c89ae56e6c48f6fd1028fbaf314 *source/include/spacecp/spacecp_album.php +7ab0dd324207006638cef7679d341288 *source/include/spacecp/spacecp_album.php bf30e40c2708decfc1f03b19de0fd714 *source/include/spacecp/spacecp_avatar.php e1e80f7fa9169f5ab25ed735b5643c5c *source/include/spacecp/spacecp_blog.php a074db25b4ee9f023081a8a395c46d1e *source/include/spacecp/spacecp_class.php @@ -1069,7 +1069,7 @@ d26b3100b94cafdb2f1d94b3e0bfbfee *source/language/block/lang_stat.php 14d76f59ab6adbcb4348c15ad88475fa *source/language/block/lang_tradelist.php 52428c7a6edea5c58dc98fcdf1df117b *source/language/block/lang_vedio.php 7215ee9c7d9dc229d2921a40e899ec5f *source/language/email/index.htm -24e46edeb3a819154a2893737158492c *source/language/email/lang_template.php +c4f5153471b3b02b07698cb5d5595ed8 *source/language/email/lang_template.php 7215ee9c7d9dc229d2921a40e899ec5f *source/language/forum/index.htm 0b36b86383f502da244b1083b6b28b64 *source/language/forum/lang_archiver.php 0fa32eb0ec0e6f981c7b303df1625da0 *source/language/forum/lang_dz_feed.php @@ -1087,7 +1087,7 @@ d41d8cd98f00b204e9800998ecf8427e *source/language/group/index.htm ff6a41e5c029626a3f3f36de81bfed41 *source/language/home/lang_template.php d41d8cd98f00b204e9800998ecf8427e *source/language/index.htm 34f060693aa787bec924c4c45e894aff *source/language/lang_action.php -8c4d1ebac97e36c2074d4034e9225e24 *source/language/lang_admincp.php +29d2c61a00b4be2cad21f518696760dd *source/language/lang_admincp.php 74953ff4bbe930131802295757b810b1 *source/language/lang_admincp_login.php 3e98dfe32dc8a71d685ff6fa39b4cb07 *source/language/lang_admincp_menu.php 40e41fa9f888c5517c80624475a4d008 *source/language/lang_admincp_msg.php @@ -1096,7 +1096,7 @@ d41d8cd98f00b204e9800998ecf8427e *source/language/index.htm 4537056a99d91d0b8a67898ba575ffcb *source/language/lang_cloud_register.php 899287493c71122546d614dfd44d8303 *source/language/lang_core.php bff846d0fac1467f68cac2b290111f74 *source/language/lang_email.php -3578b45400a82e7aa1bcb0fd4dcf3e0e *source/language/lang_error.php +b4366ace71fa13b841c3dfe9eaabd9cd *source/language/lang_error.php f734cfd728cc7dbc399916b91db8418d *source/language/lang_exif.php 80a778b7b6fa1dccf6de864a4d8cbd84 *source/language/lang_feed.php f1e320d5eceb22226759968178a75491 *source/language/lang_friend.php @@ -1175,9 +1175,9 @@ c7a5b5344e26ef246b44d9482e246888 *source/module/forum/forum_forumdisplay.php 03d19e08f5f688c4b2daccacd7996c39 *source/module/forum/forum_group.php 0eb6943bfcf33f91f8986d9699229ba0 *source/module/forum/forum_guide.php 7442f1f6e8908e909cd00324dc220f70 *source/module/forum/forum_image.php -b7378e7d06f2a9bb017d301a52b71763 *source/module/forum/forum_index.php +0b9fcb76ab6d4252d6dbaf25169f29d0 *source/module/forum/forum_index.php 5d9893aef98284b0e2a5de07968ade2b *source/module/forum/forum_misc.php -b40c32425ddb0635943579f3e0b194ab *source/module/forum/forum_modcp.php +663250770c85c83fd845ee1d00f009f3 *source/module/forum/forum_modcp.php ebbf512615e1afc0aa80783cd5659bd2 *source/module/forum/forum_post.php 0be8843324ca038b77dd2946aab45e3d *source/module/forum/forum_redirect.php 8c13b03f0f2c82dfadbc6bf28908086f *source/module/forum/forum_rss.php @@ -1277,9 +1277,9 @@ e167cf8dd7c618441075253753d00fbd *static/avatar/ui-icons_454545_256x240.png 59626b9493951a7c9e431e8ec5e4478f *static/avatar/ui-icons_cd0a0a_256x240.png e0e91efdc678f4aa89d83a2b569a3236 *static/image/admincp/add.gif 7a17558f50fc57f2276022cd5d8b44a1 *static/image/admincp/admincp.css -8caf97d2206934fa6affe0d9992a5374 *static/image/admincp/admincpframe.css -3d33b7d4bd0eda6ec8643be7fb74f086 *static/image/admincp/admincplogin.css -a42e36d074969d2b39cf713ee78df1d0 *static/image/admincp/admincppage.css +cf8e6746225385c2b44931eca58ed7d0 *static/image/admincp/admincpframe.css +d623b704d9306c4bae1b0aa1bd0c7069 *static/image/admincp/admincplogin.css +9c730a26b2e6bc78aaa171173143a302 *static/image/admincp/admincppage.css a4cc25514001c92f418cd2e7527d6325 *static/image/admincp/ajax_loader.gif feb6ca15771ab9d5c8880f85887cedc1 *static/image/admincp/article.gif 19b0b52a1375859bc2dc83a6fa49c7a6 *static/image/admincp/articlelist.gif @@ -1329,7 +1329,7 @@ d0d6f92811a7b2767d7694f950fc7f4b *static/image/admincp/interthread.gif aaf8ab4fcc55183e5c16566a0c3f4761 *static/image/admincp/logo.gif 690fd708816a1091f8be299586393ec9 *static/image/admincp/logo.svg 54301f1177cf9cc668cbf1958f911689 *static/image/admincp/logo_hover.gif -66514bb418de5701ac7103e73c376611 *static/image/admincp/minireset.css +c7d05156436329cfb8b0b14243367975 *static/image/admincp/minireset.css 10d8f95656c86609256f9fafa68845d5 *static/image/admincp/newwin.gif 8b05d229188f217b8b07e8df415129e3 *static/image/admincp/plugin_logo.png 627132856f13480184c730e29053f779 *static/image/admincp/pm_ntc.gif @@ -2198,7 +2198,7 @@ d41d8cd98f00b204e9800998ecf8427e *static/image/mobile/index.htm c07a5aa6a5d22a9d7f96538c6da596c6 *static/image/mobile/input_bg.gif b065eba9107c429ca21bfe87ae1be239 *static/image/mobile/logo.gif d9c722f799a5d9cfb092eb516a724eb6 *static/image/mobile/preview.png -d4743d7a54cc9a666edb5008301736e5 *static/image/mobile/style.css +add131ef8051a4b1375d9ed12488f2f9 *static/image/mobile/style.css 9f036243f3a7a64d67321d14b0c5ad08 *static/image/mobile/touch/arrow.png 27bdf4408c0e158f262f8f49aab5c58c *static/image/mobile/touch/arrow.svg 5b49481dfe76f0e5698485239c6046de *static/image/mobile/touch/avatar_blank.gif @@ -2559,9 +2559,9 @@ d41d8cd98f00b204e9800998ecf8427e *static/image/traderank/seller/index.htm b953e35e9f09502ddea1c7d8b159552a *static/image/upgrade/close.gif d41d8cd98f00b204e9800998ecf8427e *static/image/upgrade/index.htm 7215ee9c7d9dc229d2921a40e899ec5f *static/index.htm -1b356ce7fab096944785d3fe7a4785bf *static/js/admincp.js +86c158fed843e0865f253ee53b0fd810 *static/js/admincp.js fd6017113d6850bf90764d72beb66cad *static/js/admincp_base.js -dbae372c5d6ef006eb1e5e49d7bf3f8e *static/js/admincp_frame.js +c991495e1a7ab88c07e56ee3bb9c747c *static/js/admincp_frame.js 832a653ff7325535e2f741ec93096d8e *static/js/admincp_login.js 554019a035311ef2e0f2ea18d748c375 *static/js/ajax.js b4d18b265aa9e426b8e5d5385a450475 *static/js/at.js @@ -2571,15 +2571,15 @@ c1f1ddfd4e953966a03e5091b7bfe339 *static/js/calendar.js 4ba34947d3c1143f2411ecbdb13b31cc *static/js/common.js 76075a8972349994f4f7179b647a47f5 *static/js/common_diy.js ff61dec039fb13c3ec6eeb388d931da4 *static/js/common_extra.js -08c70f0d2dd5500a6d6b4d073a213181 *static/js/echarts/echarts.common.min.js +95081cd0e33ede64a17c6f59713db6ab *static/js/echarts/echarts.common.min.js d41d8cd98f00b204e9800998ecf8427e *static/js/echarts/index.htm 20a566d7528b0cbf19b7e1c792709c8d *static/js/editor.js 14dec997e0d3c4508913f673826ade14 *static/js/fileprogress.js 4c0ea3d2790ec0e5a74df013c75e1c56 *static/js/forum.js 6ceed25d134a08f9be56e38ee84b776c *static/js/forum_moderate.js 81f79f440eb370b65dd54c50adbb64e5 *static/js/forum_post.js -fd4b93c5cc5190b086fb608ee71bf4a7 *static/js/forum_slide.js -d261e3cf4c08a219665c1d0afb035c85 *static/js/forum_viewthread.js +332f656c3d2e5e9a5683b4e42e4dab2d *static/js/forum_slide.js +85afb8766e8fdd61e94b18c2966d2dfb *static/js/forum_viewthread.js 20aee0898556697d56e037ba761ceb43 *static/js/google.js e4fcaf759b4e20f5e4fd7ff14d7e85b3 *static/js/handlers.js bca8eb2e7e64f52a3cd6339804547577 *static/js/home.js @@ -2597,7 +2597,7 @@ d41d8cd98f00b204e9800998ecf8427e *static/js/jquery/index.htm ef058f07a773acf03f6d2f7f6ecb68fd *static/js/md5.js ed88708e2be8db3e81cedd63851109c1 *static/js/mobile/ajaxfileupload.js 80375c6b775cc3c9b2060b9f4bfc665b *static/js/mobile/buildfileupload.js -e04e27d738c16d6e2bc037630687d59e *static/js/mobile/common.js +6f8cf1b641e7556203454394f221c90f *static/js/mobile/common.js d41d8cd98f00b204e9800998ecf8427e *static/js/mobile/index.htm 4f252523d4af0b478c810c2547a63e19 *static/js/mobile/jquery.min.js c7a06100ded36c16acd06454e6932de0 *static/js/player/aplayer.min.css @@ -2773,7 +2773,7 @@ d89affd505fc8becdabf24a5e51f5155 *static/topic/t2/style.css 53980742778aae28bb2ae6639c8a4c6c *template/default/common/block_thread.htm a27bd77804940d84ab3fab01b737cd0f *template/default/common/block_userinfo.htm 52210394a8f10c4fa4609ee4c059a593 *template/default/common/buyinvitecode.htm -a20dd93165003e0420afbfbb1b3c2031 *template/default/common/common.css +9c0cc17c1f7fb897906dca7d84e5c3f3 *template/default/common/common.css 58525671bb708ee64218afadf334a650 *template/default/common/css_diy.css 510dbd724208a84a6af275b13a657066 *template/default/common/css_sample.htm 29bae46dbfdb7340dbfbb6f070070b2a *template/default/common/css_space.css @@ -2800,7 +2800,7 @@ d41d8cd98f00b204e9800998ecf8427e *template/default/common/index.htm a3fa81ef3ad7b3aa6599a423d3f68c49 *template/default/common/invite.htm 8d18332c488ef29b14efb05a9565496d *template/default/common/ipnotice.htm 7a56c9967692ff3caa3ebea2b287df19 *template/default/common/misc_imgcropper.htm -a632fd75fb8e17f24c07b02bd8ceff08 *template/default/common/module.css +f25f9dffaf8204fe2a22e6c48b9c94f7 *template/default/common/module.css 643621bef865ccc14f37ec0cfec84077 *template/default/common/preview.htm 5ac322e37ca6093a9740764c47ca875e *template/default/common/pubsearchform.htm 58597888b2bef9f05737e58a2b60ddd7 *template/default/common/report.htm @@ -3220,10 +3220,10 @@ e4d4ac2bfb5b921fbc46c81758181de9 *template/default/touch/forum/collection_recomm 3a8fa83a3347b4246bd872e9ffbf2cd5 *template/default/touch/forum/comment_more.htm 8b910098e5a8c2b3ccc00cbc23b774d3 *template/default/touch/forum/debate_umpire.htm df4f68979251909461a3ae6c24615f36 *template/default/touch/forum/discuz.htm -d3b856482790a1ad59284e117ca7fa48 *template/default/touch/forum/discuzcode.htm +c1aaf6897894e279beba5a86d0025355 *template/default/touch/forum/discuzcode.htm 6bce42a63d09b2ecd6a2cac0567d205e *template/default/touch/forum/find.htm aef2e6e5f88e892c87664eb9aaeac559 *template/default/touch/forum/forumdisplay.htm -95c6b870b6c1edf768870d03ab7811ed *template/default/touch/forum/forumdisplay_fastpost.htm +46a39e8abe5bb8d52b49ee6e98dfc4a8 *template/default/touch/forum/forumdisplay_fastpost.htm 76358c34a969934283f9ecbaca2212fb *template/default/touch/forum/forumdisplay_passwd.htm fee37c59c9eb7c7e54093d16e08b7a5b *template/default/touch/forum/forumdisplay_subforum.htm 051435515b62e75a1a09e70a13057de5 *template/default/touch/forum/guide.htm @@ -3337,7 +3337,7 @@ e567dc1b2ee7e4c169d0acf339ba36d1 *template/default/touch/home/space_medal_float. fd1f5d9a6167b72468d25f4e5f0c7bf8 *template/default/touch/home/space_notice.htm 5582ffadcedd14f39b2e1187b8eb0b98 *template/default/touch/home/space_pm.htm 74f85392cd09553d1111446b53e3434d *template/default/touch/home/space_pm_node.htm -567278a6ff94424e7251fd0c9a93482c *template/default/touch/home/space_profile.htm +0176141218343565dea77c2ce5c7a5eb *template/default/touch/home/space_profile.htm 6e3ba9645586bea76d92c1e1fe4fab07 *template/default/touch/home/space_share_form.htm 53462f09fde6999cda01304f18247160 *template/default/touch/home/space_share_li.htm 54877007b49108066d6dc489eefea7a9 *template/default/touch/home/space_share_list.htm @@ -3410,7 +3410,7 @@ cffea1f41b3f26d49b3c266b0c9957ac *uc_client/model/cache.php 7215ee9c7d9dc229d2921a40e899ec5f *uc_client/model/index.htm 0aafd28160be775def515e78352bfd29 *uc_client/model/mail.php 621dc8aeee71e1bd724d791b5612ef2f *uc_client/model/misc.php -b60a75a19f14bbfe7a0403f8a72deebf *uc_client/model/note.php +f1dec926907416f0a6c233e23d33fe6b *uc_client/model/note.php 5479ac7219712c5aacd45514619aafba *uc_client/model/pm.php d7b379d38fbc0e8a120454a334a54499 *uc_client/model/tag.php 77504f6188b650ff805476a22639688b *uc_client/model/user.php @@ -3455,7 +3455,7 @@ dea62a81dcb69b255a4deaac38602e0d *uc_server/control/admin/plugin.php 8b649848712e62e46b0258ce64068eaf *uc_server/control/admin/pm.php 0e9c93d9204b5f232eea6617ca594979 *uc_server/control/admin/seccode.php 7ab559b8f307d3a6ab843b6aebb266ab *uc_server/control/admin/setting.php -6e7425b8e84b191a9f914109c44e924b *uc_server/control/admin/ucfiles.md5 +a63b51f5a2e5bc8b73ff3d65ca8e259b *uc_server/control/admin/ucfiles.md5 b53bbda68e283d424f0df0946e18dc0e *uc_server/control/admin/user.php cff8d2970aac4f9d1fd19109e20af6e5 *uc_server/control/app.php 5055e3cf8e772dccec030af9c8394732 *uc_server/control/credit.php @@ -3634,7 +3634,7 @@ b1310fa913e40b5f888d14aea9b4144a *uc_server/js/calendar.js 0e8249b8c83ab93350d6864e106da182 *uc_server/js/common.js 7215ee9c7d9dc229d2921a40e899ec5f *uc_server/js/index.htm 904fbd9ee2c415bbee0fa4f9ccce4f83 *uc_server/js/pm_editor.js -c517ab970aaff7f9131d9656f3bc9ea1 *uc_server/release/release.php +3b92fbadd4365beb6f0762ed5b1016c1 *uc_server/release/release.php 45ceb71c18375a9b987e05a02feae578 *uc_server/view/default/admin.lang.php 5de71114c9c4e1db2a69abab5b7428b1 *uc_server/view/default/admin_admin.htm d05e6869168a47c29e4a07226f344314 *uc_server/view/default/admin_app.htm diff --git a/upload/source/class/class_template.php b/upload/source/class/class_template.php index abc1b4ab..f52a3cd5 100644 --- a/upload/source/class/class_template.php +++ b/upload/source/class/class_template.php @@ -380,7 +380,7 @@ function loadcsstemplate() { foreach($scripts as $css) { $scriptcss .= ''; } - $scriptcss .= '{if $_G[\'uid\'] && isset($_G[\'cookie\'][\'extstyle\']) && strpos($_G[\'cookie\'][\'extstyle\'], TPLDIR) !== false}{elseif $_G[\'style\'][\'defaultextstyle\']}{/if}'; + $scriptcss .= '{if $_G[\'uid\'] && isset($_G[\'cookie\'][\'extstyle\']) && strpos($_G[\'cookie\'][\'extstyle\'], TPLDIR) !== false}{elseif $_G[\'style\'][\'defaultextstyle\']}{/if}'; if(isset($_G['config']['output']['css4legacyie']) && $_G['config']['output']['css4legacyie']) { $scriptcss .= ''; } diff --git a/upload/source/class/db/db_driver_mysqli.php b/upload/source/class/db/db_driver_mysqli.php index e0d4c0c8..ce77f100 100644 --- a/upload/source/class/db/db_driver_mysqli.php +++ b/upload/source/class/db/db_driver_mysqli.php @@ -79,7 +79,7 @@ function connect($serverid = 1) { function _dbconnect($dbhost, $dbuser, $dbpw, $dbcharset, $dbname, $pconnect, $halt = true) { mysqli_report(MYSQLI_REPORT_OFF); - if (intval($pconnect) === 1) $dbhost = 'p:' . $dbhost; + if (intval($pconnect) === 1) $dbhost = 'p:' . $dbhost; $link = new mysqli(); if(!$link->real_connect($dbhost, $dbuser, $dbpw, $dbname, null, null, MYSQLI_CLIENT_COMPRESS)) { $halt && $this->halt('notconnect', $this->errno()); @@ -141,7 +141,7 @@ public function query($sql, $silent = false, $unbuffered = false) { if(!($query = $this->curlink->query($sql, $resultmode))) { if(in_array($this->errno(), array(2006, 2013)) && substr($silent, 0, 5) != 'RETRY') { $this->connect(); - return $this->curlink->query($sql, 'RETRY'.$silent); + return $this->query($sql, 'RETRY'.$silent); } if(!$silent) { $this->halt($this->error(), $this->errno(), $sql); diff --git a/upload/source/class/discuz/discuz_extend.php b/upload/source/class/discuz/discuz_extend.php index b2339b91..358f11cb 100644 --- a/upload/source/class/discuz/discuz_extend.php +++ b/upload/source/class/discuz/discuz_extend.php @@ -27,11 +27,11 @@ public function __call($name, $p) { if(method_exists($this->_obj, $name)) { switch (count($p)) { case 0: return $this->_obj->{$name}();break; - case 1: return $this->_obj->{$name}($p[0], $p[1]);break; - case 2: return $this->_obj->{$name}($p[0], $p[1], $p[2]);break; - case 3: return $this->_obj->{$name}($p[0], $p[1], $p[2], $p[3]);break; - case 4: return $this->_obj->{$name}($p[0], $p[1], $p[2], $p[3], $p[4]);break; - case 5: return $this->_obj->{$name}($p[0], $p[1], $p[2], $p[3], $p[4], $p[5]);break; + case 1: return $this->_obj->{$name}($p[0]);break; + case 2: return $this->_obj->{$name}($p[0], $p[1]);break; + case 3: return $this->_obj->{$name}($p[0], $p[1], $p[2]);break; + case 4: return $this->_obj->{$name}($p[0], $p[1], $p[2], $p[3]);break; + case 5: return $this->_obj->{$name}($p[0], $p[1], $p[2], $p[3], $p[4]);break; default: return call_user_func_array(array($this->_obj, $name), $p);break; } } else { diff --git a/upload/source/class/discuz/discuz_upload.php b/upload/source/class/discuz/discuz_upload.php index 8c606008..57c93adb 100644 --- a/upload/source/class/discuz/discuz_upload.php +++ b/upload/source/class/discuz/discuz_upload.php @@ -24,7 +24,7 @@ public function __construct() { } - function init($attach, $type = 'temp', $extid = 0, $forcename = '') { + function init($attach, $type = 'temp', $extid = 0, $forcename = '', $subdir = '', $dirtype = 1, $filename = '') { if(!is_array($attach) || empty($attach) || !$this->is_upload_file($attach['tmp_name']) || trim($attach['name']) == '' || $attach['size'] == 0) { $this->attach = array(); @@ -33,7 +33,9 @@ function init($attach, $type = 'temp', $extid = 0, $forcename = '') { } else { $this->type = $this->check_dir_type($type); $this->extid = intval($extid); - $this->forcename = $forcename; + $this->forcename = preg_match("/^[a-z0-9_]+$/i", $forcename) ? $forcename : ''; + $subdir = preg_match("/^[a-z0-9_]+$/i", $subdir) ? $subdir : ''; + $filename = preg_match("/^[a-z0-9_]+$/i", $filename) ? $filename : ''; $attach['size'] = intval($attach['size']); $attach['name'] = trim($attach['name']); @@ -47,8 +49,8 @@ function init($attach, $type = 'temp', $extid = 0, $forcename = '') { $attach['isimage'] = $this->is_image_ext($attach['ext']); $attach['extension'] = $this->get_target_extension($attach['ext']); - $attach['attachdir'] = $this->get_target_dir($this->type, $extid); - $attach['attachment'] = $attach['attachdir'].$this->get_target_filename($this->type, $this->extid, $this->forcename).'.'.$attach['extension']; + $attach['attachdir'] = $this->get_target_dir($this->type, $extid, true, $subdir, $dirtype); + $attach['attachment'] = $attach['attachdir'].$this->get_target_filename($this->type, $this->extid, $this->forcename, $filename).'.'.$attach['extension']; $attach['target'] = getglobal('setting/attachdir').'./'.$this->type.'/'.$attach['attachment']; $this->attach = & $attach; $this->errorcode = 0; @@ -72,7 +74,7 @@ function save($ignore = 0) { $this->errorcode = -101; } elseif(in_array($this->type, array('group', 'album', 'category')) && !$this->attach['isimage']) { $this->errorcode = -102; - } elseif(in_array($this->type, array('common')) && (!$this->attach['isimage'] && $this->attach['ext'] != 'ext')) { + } elseif(in_array($this->type, array('common')) && (!$this->attach['isimage'] && !in_array($this->attach['ext'], array('ext', 'svg')))) { $this->errorcode = -102; } elseif(!$this->save_to_local($this->attach['tmp_name'], $this->attach['target'])) { $this->errorcode = -103; @@ -114,7 +116,6 @@ public static function get_image_info($target, $allowswf = false) { } elseif($imageinfo = @getimagesize($target)) { list($width, $height, $type) = !empty($imageinfo) ? $imageinfo : array('', '', ''); $size = $width * $height; - if((!getglobal('setting/imagelib') && $size > (getglobal('setting/gdlimit') ? getglobal('setting/gdlimit') : 16777216)) || $size < 16 ) { return false; } elseif($ext == 'swf' && $type != 4 && $type != 13) { @@ -134,38 +135,62 @@ public static function is_upload_file($source) { return $source && ($source != 'none') && (is_uploaded_file($source) || is_uploaded_file(str_replace('\\\\', '\\', $source))); } - public static function get_target_filename($type, $extid = 0, $forcename = '') { - if($type == 'group' || ($type == 'common' && $forcename != '')) { - $filename = $type.'_'.intval($extid).($forcename != '' ? "_$forcename" : ''); - } else { - $filename = date('His').strtolower(random(16)); + public static function get_target_filename($type, $extid = 0, $forcename = '', $filename = '') { + if (empty($filename)) { + if($type == 'group' || ($type == 'common' && $forcename != '')) { + $filename = $type.'_'.intval($extid).($forcename != '' ? "_$forcename" : ''); + } else { + $filename = date('His').strtolower(random(16)); + } } return $filename; } public static function get_target_extension($ext) { static $safeext = array('attach', 'jpg', 'jpeg', 'gif', 'png', 'webp', 'swf', 'bmp', 'txt', 'zip', 'rar', 'mp3'); + if(defined('IN_ADMINCP')) { + $safeext[] = 'svg'; + } return strtolower(!in_array(strtolower($ext), $safeext) ? 'attach' : $ext); } - public static function get_target_dir($type, $extid = '', $check_exists = true) { + public static function get_target_dir($type, $extid = '', $check_exists = true, $subdir = '', $dirtype = 1) { - $subdir = $subdir1 = $subdir2 = ''; - if($type == 'album' || $type == 'forum' || $type == 'portal' || $type == 'category' || $type == 'profile') { + $dir = $subdir1 = $subdir2 = ''; + if($dirtype == 1) { + if($type == 'group' || $type == 'common') { + $dir = $subdir1 = substr(md5($extid), 0, 2).'/'; + } elseif($type != 'temp') { + $subdir1 = date('Ym'); + $subdir2 = date('d'); + $dir = $subdir1.'/'.$subdir2.'/'; + } + } elseif($dirtype == 2) { $subdir1 = date('Ym'); $subdir2 = date('d'); - $subdir = $subdir1.'/'.$subdir2.'/'; - } elseif($type == 'group' || $type == 'common') { - $subdir = $subdir1 = substr(md5($extid), 0, 2).'/'; + $dir = $subdir1.'/'.$subdir2.'/'; + } elseif($dirtype == 3) { + $dir = $subdir1 = substr(md5($extid), 0, 2).'/'; } - $check_exists && discuz_upload::check_dir_exists($type, $subdir1, $subdir2); + if($subdir) { + $dir = $subdir.'/'.$dir; + } + + if($check_exists) { + if($subdir) { + discuz_upload::check_dir_exists($type, $subdir, $subdir1); + discuz_upload::check_dir_exists($type, $subdir.'/'.$subdir1.'/'.$subdir2); + } else { + discuz_upload::check_dir_exists($type, $subdir1, $subdir2); + } + } - return $subdir; + return $dir; } public static function check_dir_type($type) { - return !in_array($type, array('forum', 'group', 'album', 'portal', 'common', 'temp', 'category', 'profile')) ? 'temp' : $type; + return preg_match("/^[a-z]+[a-z0-9_]*$/i", $type) ? $type : 'temp'; } public static function check_dir_exists($type = '', $sub1 = '', $sub2 = '') { diff --git a/upload/source/class/helper/helper_form.php b/upload/source/class/helper/helper_form.php index 6b6b91d8..de6e3c7f 100644 --- a/upload/source/class/helper/helper_form.php +++ b/upload/source/class/helper/helper_form.php @@ -19,7 +19,6 @@ public static function submitcheck($var, $allowget = 0, $seccodecheck = 0, $secq return FALSE; } else { global $_G; - if(($allowget && ($allowget !== 2 || (!empty($_GET['formhash']) && $_GET['formhash'] == formhash()))) || ($_SERVER['REQUEST_METHOD'] == 'POST' && !empty($_GET['formhash']) && $_GET['formhash'] == formhash() && empty($_SERVER['HTTP_X_FLASH_VERSION']) && (empty($_SERVER['HTTP_REFERER']) || strncmp($_SERVER['HTTP_REFERER'], 'http://wsq.discuz.com/', 22) === 0 || preg_replace("/https?:\/\/([^\:\/]+).*/i", "\\1", $_SERVER['HTTP_REFERER']) == preg_replace("/([^\:]+).*/", "\\1", $_SERVER['HTTP_HOST'])))) { if(checkperm('seccode')) { @@ -41,8 +40,6 @@ public static function censor($message, $modword = NULL, $return = FALSE, $modas global $_G; $censor = discuz_censor::instance(); $censor->check($message, $modword); - - if(($censor->modbanned() && empty($_G['group']['ignorecensor'])) || (($modasban && !empty($_G['setting']['modasban'])) && $censor->modmoderated() && empty($_G['group']['ignorecensor']))) { $wordbanned = implode(', ', $censor->words_found); if($return) { @@ -54,33 +51,21 @@ public static function censor($message, $modword = NULL, $return = FALSE, $modas cpmsg(lang('message', 'word_banned'), '', 'error', array('wordbanned' => $wordbanned)); } } - if($_G['group']['allowposturl'] == 0 || $_G['group']['allowposturl'] == 2) { + if($_G['group']['allowposturl'] == 0) { $urllist = self::get_url_list($message); - if(is_array($urllist[1])) foreach($urllist[1] as $key => $val) { - if(!$val = trim($val)) continue; - if(!iswhitelist($val)) { - if($_G['group']['allowposturl'] == 0) { + if(is_array($urllist[1])) { + foreach($urllist[1] as $key => $val) { + if(!$val = trim($val)) continue; + if(!iswhitelist($val)) { if($return) { return array('message' => 'post_url_nopermission'); } showmessage('post_url_nopermission'); - } elseif($_G['group']['allowposturl'] == 2) { - $message = str_replace('[url]'.$urllist[0][$key].'[/url]', $urllist[0][$key], $message); - $message = preg_replace( - array( - "@\[url=[^\]]*?".preg_quote($urllist[0][$key],'@')."[^\]]*?\](.*?)\[/url\]@is", - "@href=('|\")".preg_quote($urllist[0][$key],'@')."\\1@is", - "@\[url\]([^\]]*?".preg_quote($urllist[0][$key],'@')."[^\]]*?)\[/url\]@is", - ), - array( - '\\1', - '', - '\\1', - ), - $message); } } } + } elseif($_G['group']['allowposturl'] == 2) { + $message = preg_replace("/\[url(=((https?|ftp|gopher|news|telnet|rtsp|mms|callto|bctp|thunder|qqdl|synacast){1}:\/\/|www\.|mailto:|tel:|magnet:)?([^\r\n\[\"']+?))?\](.+?)\[\/url\]/is", '\\5', $message); } return $message; } diff --git a/upload/source/class/helper/helper_mobile.php b/upload/source/class/helper/helper_mobile.php index 54e49663..91b58882 100644 --- a/upload/source/class/helper/helper_mobile.php +++ b/upload/source/class/helper/helper_mobile.php @@ -26,12 +26,7 @@ public static function mobileoutput() { if('utf-8' != CHARSET) { $content = diconv($content, CHARSET, 'utf-8'); } - if(defined('IN_MOBILE') && constant('IN_MOBILE') === '3') { - $content = ''.$content; - header("Content-type: text/vnd.wap.wml; charset=utf-8"); - } else { - @header('Content-Type: text/html; charset=utf-8'); - } + @header('Content-Type: text/html; charset=utf-8'); echo $content; exit(); diff --git a/upload/source/class/helper/helper_page.php b/upload/source/class/helper/helper_page.php index 390283af..c7ddc614 100644 --- a/upload/source/class/helper/helper_page.php +++ b/upload/source/class/helper/helper_page.php @@ -20,7 +20,7 @@ public static function multi($num, $perpage, $curpage, $mpurl, $maxpages = 0, $p $a_name = ''; - $mpurl = str_replace(array("'", '"', "\\"), array('%27', '%22', '%5c'), $mpurl); + $mpurl = str_replace(array("'", '"', "\\"), array('%27', '%22', '%5c'), $mpurl); if(strpos($mpurl, '#') !== FALSE) { $a_strs = explode('#', $mpurl); @@ -115,6 +115,21 @@ public static function multi($num, $perpage, $curpage, $mpurl, $maxpages = 0, $p ($curpage < $pages && !$simple ? ''.$lang['next'].'' : ''). ($showkbd && !$simple && $pages > $page && !$ajaxtarget && !$wml ? '' : ''); + if(defined('IN_MOBILE') && !defined('TPL_DEFAULT') && $multipage) { + $multipage_url = ''; + parse_str(preg_replace('#^\w+\.php\?#i', '', str_replace('&', '&', $mpurl)), $query); + if(!empty($query['mod']) && $query['mod'] == 'viewthread' && !empty($query['tid']) && $query['tid'] == $_G['tid']) { + $multipage_url = rewriteoutput('forum_viewthread', 1, $_G['siteurl'], $_G['tid'], '{page}', '', ''); + } elseif(!empty($query['mod']) && $query['mod'] == 'forumdisplay' && !empty($query['fid']) && $query['fid'] == $_G['fid']) { + $multipage_url = rewriteoutput('forum_forumdisplay', 1, $_G['siteurl'], $_G['fid'], '{page}', '', ''); + } else { + $multipage_url = self::mpurl($mpurl, $pagevar, '{page}'); + $multipage_url = (stripos($multipage_url, $_G['siteurl']) === false && !preg_match('/^https?:\/\//is', $multipage_url) ? $_G['siteurl'] : '').$multipage_url; + } + if(!empty($multipage_url)) { + $multipage .= ''; + } + } $multipage = $multipage ? '
    '.($shownum && !$simple ? ' '.$num.' ' : '').$multipage.'
    ' : ''; } $maxpage = $realpages; diff --git a/upload/source/class/model/model_forum_post.php b/upload/source/class/model/model_forum_post.php index c620bc22..cbbb2459 100644 --- a/upload/source/class/model/model_forum_post.php +++ b/upload/source/class/model/model_forum_post.php @@ -18,12 +18,6 @@ class model_forum_post extends discuz_model { public $post; - - - - - - public $pid = 0; public $feed = array(); @@ -46,7 +40,7 @@ public function __construct($tid = null, $pid = null) { protected function _init_parameters($parameters) { $varname = array( - 'member', 'group', 'forum', 'thread', 'extramessage', 'special', + 'member', 'group', 'forum', 'thread', 'extramessage', 'special',//'nauthorid' 'modnewreplies' 'tid' 'message','clientip', 'invisible', 'isanonymous', 'usesig', 'htmlon', 'bbcodeoff', 'smileyoff', 'parseurloff', 'pstatus', 'noticetrimstr', 'noticeauthor', 'from', 'sechash', 'geoloc', @@ -221,7 +215,7 @@ public function newreply($parameters) { if($this->param['modnewreplies']) { updatemoderate('pid', $this->pid); - unset($this->param['showmsgparam']['pid']); + $this->param['showmsgparam']['reply_mod'] = 1; if($this->param['updatethreaddata']) { C::t('forum_thread')->update($this->thread['tid'], $this->param['updatethreaddata'], false, false, 0, true); } @@ -412,7 +406,7 @@ public function editpost($parameters) { $displayorder = (empty($this->param['save']) || $this->thread['displayorder'] != -4 ) ? ($this->thread['displayorder'] == -4 ? -4 : $this->thread['displayorder']) : -4; $this->param['typeid'] = isset($this->param['typeid']) && isset($this->forum['threadtypes']['types'][$this->param['typeid']]) && (!$this->forum['threadtypes']['moderators'][$this->param['typeid']] || $this->forum['ismoderator']) ? $this->param['typeid'] : 0; - $this->param['sortid'] = $this->param['special'] || !$this->forum['threadsorts']['types'][$this->param['sortid']] ? 0 : $this->param['sortid']; + $this->param['sortid'] = $this->param['special'] || !$this->forum['threadsorts']['types'][$this->param['sortid']] ? 0 : $this->param['sortid']; $this->param['threadupdatearr']['typeid'] = $this->param['typeid']; @@ -472,7 +466,7 @@ public function editpost($parameters) { } if(!$isfirstpost) { C::t('forum_thread')->increase($this->thread['tid'], array('replies' => 1)); - } + } updatemodworks('MOD', 1); updatemodlog($this->thread['tid'], 'MOD'); } diff --git a/upload/source/discuz_version.php b/upload/source/discuz_version.php index 250a5d17..290450dc 100644 --- a/upload/source/discuz_version.php +++ b/upload/source/discuz_version.php @@ -13,9 +13,9 @@ if(!defined('DISCUZ_VERSION')) { define('DISCUZ_VERSION', 'X3.5'); - define('DISCUZ_RELEASE', '20230520'); + define('DISCUZ_RELEASE', '20230726'); define('DISCUZ_FIXBUG', '35000000'); - define('DISCUZ_TH_REVISION', '6'); /*jaideejung007*/ + define('DISCUZ_TH_REVISION', '7'); /*jaideejung007*/ } ?> \ No newline at end of file diff --git a/upload/source/function/cache/cache_styles.php b/upload/source/function/cache/cache_styles.php index 481e4951..cfc06803 100644 --- a/upload/source/function/cache/cache_styles.php +++ b/upload/source/function/cache/cache_styles.php @@ -38,12 +38,12 @@ function build_cache_styles() { $flash[0] = preg_match('/^(https?:)?\/\//i', $flash[0]) ? $flash[0] : $data['styleimgdir'].'/'.$flash[0]; $data['boardlogo'] = ""; } else { - $data['boardimg'] = preg_match('/^(https?:)?\/\//i', $data['boardimg']) ? $data['boardimg'] : $data['styleimgdir'].'/'.$data['boardimg']; + $data['boardimg'] = empty($data['boardimg']) ? $data['imgdir'].'/logo.svg' : (preg_match('/^(https?:)?\/\//i', $data['boardimg']) || file_exists($data['boardimg']) ? '' : (file_exists($data['styleimgdir'].'/'.$data['boardimg']) ? $data['styleimgdir'].'/' : $data['imgdir'].'/')).$data['boardimg']; $data['boardlogo'] = "\"".$_G['setting']['bbname']."\""; } - $data['searchimg'] = empty($data['searchimg']) ? $data['imgdir'].'/logo_sc.svg' : (preg_match('/^(https?:)?\/\//i', $data['searchimg']) ? $data['searchimg'] : $data['styleimgdir'].'/'.$data['searchimg']); + $data['searchimg'] = empty($data['searchimg']) ? $data['imgdir'].'/logo.svg' : (preg_match('/^(https?:)?\/\//i', $data['searchimg']) || file_exists($data['searchimg']) ? '' : (file_exists($data['styleimgdir'].'/'.$data['searchimg']) ? $data['styleimgdir'].'/' : $data['imgdir'].'/')).$data['searchimg']; $data['searchlogo'] = "\"".$_G['setting']['bbname']."\""; - $data['touchimg'] = empty($data['touchimg']) ? $data['imgdir'].'/logo_m.svg' : (preg_match('/^(https?:)?\/\//i', $data['touchimg']) ? $data['touchimg'] : $data['styleimgdir'].'/'.$data['touchimg']); + $data['touchimg'] = empty($data['touchimg']) ? $data['imgdir'].'/logo.svg' : (preg_match('/^(https?:)?\/\//i', $data['touchimg']) || file_exists($data['touchimg']) ? '' : (file_exists($data['styleimgdir'].'/'.$data['touchimg']) ? $data['styleimgdir'].'/' : $data['imgdir'].'/')).$data['touchimg']; $data['touchlogo'] = "\"".$_G['setting']['bbname']."\""; $data['bold'] = $data['nobold'] ? 'normal' : 'bold'; $contentwidthint = intval($data['contentwidth']); diff --git a/upload/source/function/function_admincp.php b/upload/source/function/function_admincp.php index c126e6f3..070501b8 100644 --- a/upload/source/function/function_admincp.php +++ b/upload/source/function/function_admincp.php @@ -195,7 +195,7 @@ function shownav($header = '', $menu = '', $nav = '') { if($nav) { $ctitle = cplang($nav); } - $addtomenu = "  [+]"; + $addtomenu = "  [+]"; $dtitle = str_replace("'", "\'", cplang('admincp_title').' - '.str_replace(' » ', ' - ', $title)); echo ''; } diff --git a/upload/source/function/function_block.php b/upload/source/function/function_block.php index e53100be..af335998 100644 --- a/upload/source/function/function_block.php +++ b/upload/source/function/function_block.php @@ -425,7 +425,7 @@ function block_template($bid) { } else { $image->Thumb($replacevalue, $thumbpath, $block['picwidth'], $block['picheight'], 2); if(file_exists($_G['setting']['attachdir'].'./'.$thumbpath)) { - if(ftpperm(fileext($thumbpath), filesize($_G['setting']['attachdir'].'./'.$thumbpath)) && $ftp->upload($_G['setting']['attachurl'].'/'.$thumbpath, $thumbpath)) { + if(ftpperm(fileext($thumbpath), filesize($_G['setting']['attachdir'].'./'.$thumbpath)) && $ftp->upload($_G['setting']['attachdir'].'/'.$thumbpath, $thumbpath)) { $picflag = 1; //common_block_pic表中的picflag标识(0本地,1远程) $_G['block_makethumb'] = true; @unlink($_G['setting']['attachdir'].'./'.$thumbpath); diff --git a/upload/source/function/function_core.php b/upload/source/function/function_core.php index 31d8ab0b..b0841690 100644 --- a/upload/source/function/function_core.php +++ b/upload/source/function/function_core.php @@ -483,6 +483,7 @@ function avatar($uid, $size = 'middle', $returnsrc = 0, $real = FALSE, $static = $size = in_array($size, array('big', 'middle', 'small')) ? $size : 'middle'; $uid = abs(intval($uid)); $rawuid = $uid; + $class = trim($class.' user_avatar'); if(!$staticavatar && !$static && $ucenterurl != '.') { if($avatarurl != $ucenterurl.'/data/avatar') { $ucenterurl = $avatarurl; @@ -750,6 +751,10 @@ function template($file, $templateid = 0, $tpldir = '', $gettplfile = 0, $primal if(strpos($tpldir, 'plugin') && (file_exists(DISCUZ_ROOT.$mobiletplfile) || file_exists(substr(DISCUZ_ROOT.$mobiletplfile, 0, -4).'.php'))) { $tplfile = $mobiletplfile; } elseif(!file_exists(DISCUZ_ROOT.TPLDIR.'/'.$mobiletplfile) && !file_exists(substr(DISCUZ_ROOT.TPLDIR.'/'.$mobiletplfile, 0, -4).'.php')) { + if(strpos($file, $_G['mobiletpl'][IN_MOBILE].'/email/') === 0) { + $tplfile = str_replace($_G['mobiletpl'][IN_MOBILE].'/', '', $tplfile); + $file = str_replace($_G['mobiletpl'][IN_MOBILE].'/', '', $file); + } $mobiletplfile = './template/default/'.$file.'.htm'; if(!file_exists(DISCUZ_ROOT.$mobiletplfile) && !$_G['forcemobilemessage']) { $tplfile = str_replace($_G['mobiletpl'][IN_MOBILE].'/', '', $tplfile); diff --git a/upload/source/function/function_portalcp.php b/upload/source/function/function_portalcp.php index f8b8d464..ee5e2243 100644 --- a/upload/source/function/function_portalcp.php +++ b/upload/source/function/function_portalcp.php @@ -1095,16 +1095,25 @@ function getprimaltplname($filename) { if(empty($tpldirectory)) { $tpldirectory = ($_G['cache']['style_default']['tpldir'] ? $_G['cache']['style_default']['tpldir'] : './template/default'); } - $content = @file_get_contents(DISCUZ_ROOT.$tpldirectory.'/'.$filename); + if(file_exists(DISCUZ_ROOT.$tpldirectory.'/'.$filename)) { + $file = DISCUZ_ROOT.$tpldirectory.'/'.$filename; + } elseif(file_exists(DISCUZ_ROOT.$tpldirectory.'/'.substr(DISCUZ_ROOT.$filename, 0, -4).'.php')) { + $file = DISCUZ_ROOT.$tpldirectory.'/'.substr($filename, 0, -4).'.php'; + } else { + $file = DISCUZ_ROOT.'./template/default/'.$filename; + } $name = $tpldirectory.'/'.$filename; - if($content) { - preg_match("/\<\!\-\-\[name\](.+?)\[\/name\]\-\-\>/i", trim($content), $mathes); - if(!empty($mathes[1])) { - preg_match("/^\{lang (.+?)\}$/", $mathes[1], $langs); - if(!empty($langs[1])) { - $name = !$lang[$langs[1]] ? $langs[1] : $lang[$langs[1]]; - } else { - $name = dhtmlspecialchars($mathes[1]); + if(file_exists($file)) { + $content = @file_get_contents($file); + if($content) { + preg_match("/\<\!\-\-\[name\](.+?)\[\/name\]\-\-\>/i", trim($content), $mathes); + if(!empty($mathes[1])) { + preg_match("/^\{lang (.+?)\}$/", $mathes[1], $langs); + if(!empty($langs[1])) { + $name = !$lang[$langs[1]] ? $langs[1] : $lang[$langs[1]]; + } else { + $name = dhtmlspecialchars($mathes[1]); + } } } } diff --git a/upload/source/include/space/space_blog.php b/upload/source/include/space/space_blog.php index f1252723..993dec49 100644 --- a/upload/source/include/space/space_blog.php +++ b/upload/source/include/space/space_blog.php @@ -353,20 +353,22 @@ } function blog_get_stick($uid, $stickblogs, $summarylen) { - $list = array(); + $list = $stickids = array(); if($stickblogs) { $data_blog = C::t('home_blog')->fetch_all_blog($stickblogs); $data_blogfield = C::t('home_blogfield')->fetch_all($stickblogs); foreach ($stickblogs as $blogid) { if(!empty($data_blog[$blogid]) && !empty($data_blogfield[$blogid])) { $value = array_merge($data_blog[$blogid], $data_blogfield[$blogid]); - $value['message'] = getstr($value['message'], $summarylen, 0, 0, 0, -1); - $value['message'] = preg_replace("/&[a-z]+\;/i", '', $value['message']); - if($value['pic']) $value['pic'] = pic_cover_get($value['pic'], $value['picflag']); - $value['dateline'] = dgmdate($value['dateline']); - $value['stickflag'] = true; - $list[$value['blogid']] = $value; - $stickids[] = $value['blogid']; + if(ckfriend($value['uid'], $value['friend'], $value['target_ids']) && ($value['status'] == 0 || $value['uid'] == $_G['uid'] || $_G['adminid'] == 1)) { + $value['message'] = getstr($value['message'], $summarylen, 0, 0, 0, -1); + $value['message'] = preg_replace("/&[a-z]+\;/i", '', $value['message']); + if($value['pic']) $value['pic'] = pic_cover_get($value['pic'], $value['picflag']); + $value['dateline'] = dgmdate($value['dateline']); + $value['stickflag'] = true; + $list[$value['blogid']] = $value; + $stickids[] = $value['blogid']; + } } } if(count($stickids) != count($stickblogs)) { diff --git a/upload/source/include/spacecp/spacecp_album.php b/upload/source/include/spacecp/spacecp_album.php index 882f6a30..d79b5f18 100644 --- a/upload/source/include/spacecp/spacecp_album.php +++ b/upload/source/include/spacecp/spacecp_album.php @@ -318,7 +318,7 @@ showmessage('parameters_error'); } $attach = C::t('forum_attachment_n')->fetch_attachment('aid:'.$aid, $aid); - if(empty($attach) || $attach['uid'] != $_G['uid'] || !$attach['isimage']) { + if(empty($attach) || !$attach['isimage']) { showmessage('parameters_error'); } if($albumid) { diff --git a/upload/source/language/email/lang_template.php b/upload/source/language/email/lang_template.php index 581e7da6..ae015760 100644 --- a/upload/source/language/email/lang_template.php +++ b/upload/source/language/email/lang_template.php @@ -91,7 +91,7 @@ 'add_member_newpassword' => 'รหัสผ่าน: ', 'add_member_can_login' => 'จากนี้ไป คุณสามารถใช้บัญชีของคุณเพื่อเข้าสู่ระบบ {$var[\'bbname\']} ขอให้สนุกกับการใช้งานเว็บไซต์ของเรานะ', - 'birthday_subject' => 'แฮปปี้เบิร์ทเดย์ทูยู', + 'birthday_subject' => 'สุขสันต์วันเกิด', 'birthday_reason' => 'อีเมลนี้ลงทะเบียนเป็นอีเมลผู้ใช้ที่ {$var[\'bbname\']}
    และตามข้อมูลที่คุณกรอกตอนลงทะเบียน วันนี้เป็นวันเกิดของคุณ เรามีความยินดีเป็นอย่างยิ่งที่จะอวยพรวันเกิดให้คุณในเวลานี้
    ในนามของผู้ดูแลเว็บไซต์ {$var[\'bbname\']} เราขออวยพรให้คุณมีความสุขมาก ๆ ในวันเกิดปีนี้ของคุณ', diff --git a/upload/source/language/lang_admincp.php b/upload/source/language/lang_admincp.php index 2d219ce8..b4247777 100644 --- a/upload/source/language/lang_admincp.php +++ b/upload/source/language/lang_admincp.php @@ -3380,7 +3380,7 @@ 'styles_edit_tpl' => 'เทมเพลตของรูปแบบสไตล์', 'styles_edit_tpl_comment' => 'เลือกชื่อเทมเพลตให้กับรูปแบบสไตล์ชุดนี้', 'styles_edit_logo' => 'โลโก้ {BOARDIMG},{BOARDLOGO}', - 'styles_edit_logo_comment' => 'สามารถใส่ Flash ภาพเคลื่อนไหว ใช้เครื่องหมายคอมม่าเป็นตัวคั่นต่อท้าย URL ความกว้างและความสูง ตัวอย่าง เช่น [logo.swf,80,40]', + 'styles_edit_logo_comment' => 'คุณสามารถอัปโหลดรูปภาพหรือกรอกชื่อไฟล์รูปภาพโดยตรงได้ (ระบุเส้นทางรูปภาพตามไดเร็กทอรีรากของบอร์ด, โฟลเดอร์รูปภาพขยาย, หรือโฟลเดอร์รูปภาพพื้นฐานของเทมเพลตได้)', 'styles_edit_searchlogo' => 'Logo สำหรับหน้าค้นหา {SEARCHIMG},{SEARCHLOGO}', 'styles_edit_touchlogo' => 'Logo สำหรับโหมดมือถือ {TOUCHIMG},{TOUCHLOGO}', 'styles_edit_imgdir' => 'โฟลเดอร์หลักที่ใช้เก็บรูปภาพของรูปแบบสไตล์ {IMGDIR}', @@ -3670,10 +3670,10 @@ 'members_ban_reason_comment' => 'A reason of ban/unban the user', 'members_unarchive' => 'Remove', - 'members_chgusername' => 'Initiate a name change', - 'members_chgusername_tips' => '
  • This operation requires relevant permissions to be enabled in the management group
  • This operation can take effect for applications that support such notifications under UCenter to which the site belongs, but it will cause such notifications not to be supported and the user name will be used as the user name. The application of foreign keys is abnormal. Please note that this request will be sent to UCenter for processing after submission. Due to the time required for data interaction, this operation will generally take effect within a few minutes. If the timeout does not take effect, please update Cache or check if UCenter and site communicate properly
  • ', - 'members_chgusername_oldusername' => 'User\'s username in this application', - 'members_chgusername_newusername' => 'New user name', + 'members_chgusername' => 'เปลี่ยนชื่อผู้ใช้', + 'members_chgusername_tips' => '
  • การดำเนินการนี้ต้องมีการเปิดใช้สิทธิที่เกี่ยวข้องในกลุ่มการจัดการก่อน
  • การดำเนินการนี้จะมีผลต่อแอป/โปรแกรมที่รองรับการแจ้งเตือนประเภทนี้ใน UCenter ของเว็บไซต์เท่านั้น แต่อาจทำให้แอป/โปรแกรมที่ไม่รองรับประเภทนี้และใช้ชื่อผู้ใช้เป็นตัวเชื่อมกันมีปัญหาได้ กรุณาระมัดระวังถึงปัญหานี้
  • เมื่อคุณกดส่งคำขอนี้ไปยัง UCenter เพื่อทำการดำเนินการ จะใช้เวลาสักครู่ในการส่งข้อมูลไปมา โดยปกติแล้วการดำเนินการจะเริ่มมีผลในไม่กี่นาที ถ้าเวลาผ่านไปแล้วแต่ยังไม่มีผล กรุณาลองอัปเดตไฟล์แคชหรือตรวจสอบการเชื่อมต่อระหว่าง UCenter และเว็บไซต์ว่ามีปัญหาหรือไม่
  • ', + 'members_chgusername_oldusername' => 'ชื่อผู้ใช้งานเดิมในโปรแกรมนี้', + 'members_chgusername_newusername' => 'ชื่อผู้ใช้ใหม่', 'members_search' => 'ค้นหาสมาชิก', 'members_delete' => 'ลบสมาชิก', diff --git a/upload/source/language/lang_error.php b/upload/source/language/lang_error.php index 475297b3..56afbcc9 100644 --- a/upload/source/language/lang_error.php +++ b/upload/source/language/lang_error.php @@ -32,10 +32,10 @@ 'db_config_db_not_found' => 'ข้อผิดพลาดในการกำหนดค่าฐานข้อมูล กรุณาตรวจสอบไฟล์ config_global.php', 'system_init_ok' => 'การเริ่มต้นระบบเว็บไซต์เสร็จสมบูรณ์ กรุณาคลิกที่นี่เพื่อเข้าสู่เว็บไซต์', 'backtrace' => 'ข้อมูลการดำเนินการ', - 'error_end_message' => '{host} ข้อความแสดงข้อผิดพลาดนี้ได้ถูกบันทึกไว้ในรายละเอียด ขออภัยในความไม่สะดวกในการเข้าถึง', - 'suggestion_user' => 'หากคุณเป็นผู้ใช้งานทั่วไป แนะนำให้ลองรีเฟรชหน้าเว็บ ปิดหน้าต่างเบราว์เซอร์ทั้งหมดแล้วลองดำเนินการอีกครั้ง หากยังไม่สามารถแก้ไขได้ แนะนำให้คุณถ่ายภาพหน้าจอของเว็บไซต์นี้ให้สมบูรณ์และบันทึกไว้ จากนั้นแจ้งปัญหานี้ให้กับผู้ดูแลเว็บไซต์', - 'suggestion_plugin' => 'หากคุณเป็นเว็บมาสเตอร์ เราขอแนะนำให้คุณลองปิดปลั๊กอิน {guess} และลอง อัปเดตแคช หากปิดปลั๊กอินแล้วปัญหาได้รับการแก้ไข แนะนำให้คุณติดต่อผู้ผลิตปลั๊กอินโดยแนบภาพหน้าจอที่เต็มรูปแบบเพื่อขอความช่วยเหลือ', - 'suggestion' => 'หากคุณเป็นเว็บมาสเตอร์ ขอแนะนำให้ลองอัปเดตแคช คุณยังสามารถใช้เว็บไซต์ Discuz! อย่างเป็นทางการเพื่อขอความช่วยเหลือ หากคุณแน่ใจว่านี่เป็นข้อบกพร่องของตัวโปรแกรมเอง คุณสามารถเปิด Issue ใหม่ เพื่อแจ้งให้พวกเราได้รับทราบต่อไป', + 'error_end_message' => '{host} ได้บันทึกข้อมูลข้อผิดพลาดนี้อย่างละเอียดแล้ว เราขออภัยในความไม่สะดวกที่เกิดขึ้นในการเข้าชมของคุณ', + 'suggestion_user' => 'หากคุณเป็นผู้ใช้งาน ขอแนะนำให้คุณลองรีเฟรชหน้าเว็บ ปิดหน้าต่างเบราว์เซอร์ทั้งหมดแล้วทำการดำเนินการใหม่อีกครั้ง หากยังไม่สามารถแก้ไขได้ ขอแนะนำให้คุณถ่ายภาพหน้าจอทั้งหมดและบันทึกเก็บไว้ จากนั้นแจ้งปัญหานี้ให้ผู้ดูแลเว็บไซต์ต่อไป', + 'suggestion_plugin' => 'หากคุณเป็นผู้ดูแลเว็บไซต์ ขอแนะนำให้คุณลองปิดปลั๊กอิน {guess} และอัปเดตแคชในศูนย์การจัดการ (AdminCP) เมื่อปิดปลั๊กอินแล้วปัญหาได้รับการแก้ไข ขอแนะนำให้คุณติดต่อผู้จัดจำหน่ายปลั๊กอินโดยแนบภาพหน้าจอให้ละเอียดครบถ้วนเพื่อขอความช่วยเหลือเพิ่มเติมต่อไป', + 'suggestion' => 'หากคุณเป็นผู้ดูแลเว็บไซต์ ขอแนะนำให้คุณลองอัปเดตแคชในศูนย์การจัดการ (AdminCP) หรือติดต่อเราผ่านทางเว็บไซต์ Discuz! อย่างเป็นทางการเพื่อขอความช่วยเหลือ หากคุณแน่ใจว่านี่เป็นข้อบกพร่องของตัวโปรแกรมเอง คุณยังสามารถส่งปัญหาผ่านการสร้าง Issue ใหม่ถึงเราได้อีกด้วย', 'file_upload_error_-101' => 'อัปโหลดล้มเหลว! ไฟล์ที่จะอัปโหลดไม่อยู่ หรือไม่ถูกต้อง กรุณาย้อนกลับ', 'file_upload_error_-102' => 'อัปโหลดล้มเหลว! รูปแบบของไฟล์ไม่ถูกต้อง กรุณาย้อนกลับ', diff --git a/upload/source/module/forum/forum_index.php b/upload/source/module/forum/forum_index.php index 29f5a667..bfdf6410 100644 --- a/upload/source/module/forum/forum_index.php +++ b/upload/source/module/forum/forum_index.php @@ -195,7 +195,7 @@ } if(!$_G['setting']['grid']['gridtype']) { - $focuspic = $focusurl = $focustext = array(); + $grids['slide'] = $focuspic = $focusurl = $focustext = array(); $grids['focus'] = 'config=5|0xffffff|0x0099ff|50|0xffffff|0x0099ff|0x000000'; foreach($grids['image'] as $ithread) { if($ithread['displayorder'] < 0) { diff --git a/upload/source/module/forum/forum_modcp.php b/upload/source/module/forum/forum_modcp.php index 159ca30b..c569fa79 100644 --- a/upload/source/module/forum/forum_modcp.php +++ b/upload/source/module/forum/forum_modcp.php @@ -60,7 +60,7 @@ } } foreach($query as $tforum) { - $tforum['allowview'] = !isset($tforum['allowview']) ? '' : $tforum['allowview']; + $tforum['allowview'] = !isset($tforum['allowview']) ? 0 : $tforum['allowview']; if($tforum['allowview'] == 1 || ($tforum['allowview'] == 0 && ((!$tforum['viewperm'] && $_G['group']['readaccess']) || ($tforum['viewperm'] && forumperm($tforum['viewperm']))))) { $modforums['fids'] .= $comma.$tforum['fid']; $comma = ','; $modforums['recyclebins'][$tforum['fid']] = $tforum['recyclebin']; diff --git a/upload/source/plugin/qqconnect/template/extend_common.css b/upload/source/plugin/qqconnect/template/extend_common.css index cc507068..8b7f2b08 100644 --- a/upload/source/plugin/qqconnect/template/extend_common.css +++ b/upload/source/plugin/qqconnect/template/extend_common.css @@ -1,2 +1 @@ -.qq_bind { margin-top: -3px; } -#toptb .qq_bind { margin-top: 2px; } \ No newline at end of file +.qq_bind { margin-top: -3px; } \ No newline at end of file diff --git a/upload/source/plugin/wechat/access.inc.php b/upload/source/plugin/wechat/access.inc.php deleted file mode 100644 index d0d8ef2c..00000000 --- a/upload/source/plugin/wechat/access.inc.php +++ /dev/null @@ -1,16 +0,0 @@ - $hooks) { - foreach($hooks as $hook => $rows) { - foreach($rows as $plugin => $row) { - if(isset($_GET['order'][$page][$hook][$plugin])) { - $apihook[$page][$hook][$plugin]['order'] = $_GET['order'][$page][$hook][$plugin]; - } - $apihook[$page][$hook][$plugin]['allow'] = !empty($_GET['allow'][$page][$hook][$plugin]) ? 1 : 0; - } - uasort($apihook[$page][$hook], 'pluginapicmp'); - } - } - $settings = array('mobileapihook' => serialize($apihook)); - C::t('common_setting')->update_batch($settings); - updatecache('setting'); -} - -showtips(lang('plugin/wechat', 'wechatapi_tips')); - -showformheader('plugins&operation=config&do='.$pluginid.'&identifier=wechat&pmod=api_setting'); - -$mobilewechatsetting = C::t('common_setting')->fetch_all(array('mobilewechat')); -$mobilewechatsetting = (array)dunserialize($mobilewechatsetting['mobilewechat']); - -if($mobilewechatsetting['wsq_sitetoken']) { - - $apihook = WeChatHook::getAPIHook(); - - $plugins = DB::fetch_all('SELECT identifier, name FROM %t', array('common_plugin'), 'identifier'); - - showtableheader(lang('plugin/wechat', 'api_wsq')); - echo '
    '.lang('plugin/wechat', 'api_hook').''.cplang('plugins_name').''.cplang('enable').'/'.cplang('display_order').''.lang('plugin/wechat', 'api_method').'
    '.(!$i ? $page.'_'.$hook : '').''.$plugins[$plugin]['name'].''. - ($hook != 'variables' ? - ''.formathook($row).'
    '.lang('plugin/wechat', 'api_hook').''.cplang('plugins_name').''.lang('plugin/wechat', 'api_method').'
    '.lang('plugin/wechat', 'wechatapi_redirect').''.$plugins[$redirect['plugin']]['name'].''.formathook($redirect).'
    '.lang('plugin/wechat', 'api_'.$k).'('.$k.')'.$plugins[$row['plugin']]['name'].''.formathook($row).'
    '.lang('plugin/wechat', 'wechat_responseexts').' '.$extk.''.cplang('plugins_name').''.lang('plugin/wechat', 'api_method').'
    '.lang('plugin/wechat', 'api_'.$k).'('.$k.')'.$plugins[$row['plugin']]['name'].''.formathook($row).'
    '.lang('plugin/wechat', 'wechat_devids').''.lang('plugin/wechat', 'wechat_appId').''.lang('plugin/wechat', 'wechat_appsecret').'
    '.$k.''.$info['appId'].''.$info['appSecret'].'
    a",c=n.getElementsByTagName("*"),d=n.getElementsByTagName("a")[0],d.style.cssText="top:1px;float:left;opacity:.5";if(!c||!c.length)return{};f=e.createElement("select"),g=f.appendChild(e.createElement("option")),h=n.getElementsByTagName("input")[0],b={leadingWhitespace:n.firstChild.nodeType===3,tbody:!n.getElementsByTagName("tbody").length,htmlSerialize:!!n.getElementsByTagName("link").length,style:/top/.test(d.getAttribute("style")),hrefNormalized:d.getAttribute("href")==="/a",opacity:/^0.5/.test(d.style.opacity),cssFloat:!!d.style.cssFloat,checkOn:h.value==="on",optSelected:g.selected,getSetAttribute:n.className!=="t",enctype:!!e.createElement("form").enctype,html5Clone:e.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",boxModel:e.compatMode==="CSS1Compat",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},h.checked=!0,b.noCloneChecked=h.cloneNode(!0).checked,f.disabled=!0,b.optDisabled=!g.disabled;try{delete n.test}catch(o){b.deleteExpando=!1}!n.addEventListener&&n.attachEvent&&n.fireEvent&&(n.attachEvent("onclick",m=function(){b.noCloneEvent=!1}),n.cloneNode(!0).fireEvent("onclick"),n.detachEvent("onclick",m)),h=e.createElement("input"),h.value="t",h.setAttribute("type","radio"),b.radioValue=h.value==="t",h.setAttribute("checked","checked"),h.setAttribute("name","t"),n.appendChild(h),i=e.createDocumentFragment(),i.appendChild(n.lastChild),b.checkClone=i.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=h.checked,i.removeChild(h),i.appendChild(n);if(n.attachEvent)for(k in{submit:!0,change:!0,focusin:!0})j="on"+k,l=j in n,l||(n.setAttribute(j,"return;"),l=typeof n[j]=="function"),b[k+"Bubbles"]=l;return p(function(){var c,d,f,g,h="padding:0;margin:0;border:0;display:block;overflow:hidden;",i=e.getElementsByTagName("body")[0];if(!i)return;c=e.createElement("div"),c.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px",i.insertBefore(c,i.firstChild),d=e.createElement("div"),c.appendChild(d),d.innerHTML="
    t
    ",f=d.getElementsByTagName("td"),f[0].style.cssText="padding:0;margin:0;border:0;display:none",l=f[0].offsetHeight===0,f[0].style.display="",f[1].style.display="none",b.reliableHiddenOffsets=l&&f[0].offsetHeight===0,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",b.boxSizing=d.offsetWidth===4,b.doesNotIncludeMarginInBodyOffset=i.offsetTop!==1,a.getComputedStyle&&(b.pixelPosition=(a.getComputedStyle(d,null)||{}).top!=="1%",b.boxSizingReliable=(a.getComputedStyle(d,null)||{width:"4px"}).width==="4px",g=e.createElement("div"),g.style.cssText=d.style.cssText=h,g.style.marginRight=g.style.width="0",d.style.width="1px",d.appendChild(g),b.reliableMarginRight=!parseFloat((a.getComputedStyle(g,null)||{}).marginRight)),typeof d.style.zoom!="undefined"&&(d.innerHTML="",d.style.cssText=h+"width:1px;padding:1px;display:inline;zoom:1",b.inlineBlockNeedsLayout=d.offsetWidth===3,d.style.display="block",d.style.overflow="visible",d.innerHTML="
    ",d.firstChild.style.width="5px",b.shrinkWrapBlocks=d.offsetWidth!==3,c.style.zoom=1),i.removeChild(c),c=d=f=g=null}),i.removeChild(n),c=d=f=g=h=i=n=null,b}();var H=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,I=/([A-Z])/g;p.extend({cache:{},deletedIds:[],uuid:0,expando:"jQuery"+(p.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){return a=a.nodeType?p.cache[a[p.expando]]:a[p.expando],!!a&&!K(a)},data:function(a,c,d,e){if(!p.acceptData(a))return;var f,g,h=p.expando,i=typeof c=="string",j=a.nodeType,k=j?p.cache:a,l=j?a[h]:a[h]&&h;if((!l||!k[l]||!e&&!k[l].data)&&i&&d===b)return;l||(j?a[h]=l=p.deletedIds.pop()||p.guid++:l=h),k[l]||(k[l]={},j||(k[l].toJSON=p.noop));if(typeof c=="object"||typeof c=="function")e?k[l]=p.extend(k[l],c):k[l].data=p.extend(k[l].data,c);return f=k[l],e||(f.data||(f.data={}),f=f.data),d!==b&&(f[p.camelCase(c)]=d),i?(g=f[c],g==null&&(g=f[p.camelCase(c)])):g=f,g},removeData:function(a,b,c){if(!p.acceptData(a))return;var d,e,f,g=a.nodeType,h=g?p.cache:a,i=g?a[p.expando]:p.expando;if(!h[i])return;if(b){d=c?h[i]:h[i].data;if(d){p.isArray(b)||(b in d?b=[b]:(b=p.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,f=b.length;e1,null,!1))},removeData:function(a){return this.each(function(){p.removeData(this,a)})}}),p.extend({queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=p._data(a,b),c&&(!d||p.isArray(c)?d=p._data(a,b,p.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=p.queue(a,b),d=c.length,e=c.shift(),f=p._queueHooks(a,b),g=function(){p.dequeue(a,b)};e==="inprogress"&&(e=c.shift(),d--),e&&(b==="fx"&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return p._data(a,c)||p._data(a,c,{empty:p.Callbacks("once memory").add(function(){p.removeData(a,b+"queue",!0),p.removeData(a,c,!0)})})}}),p.fn.extend({queue:function(a,c){var d=2;return typeof a!="string"&&(c=a,a="fx",d--),arguments.length1)},removeAttr:function(a){return this.each(function(){p.removeAttr(this,a)})},prop:function(a,b){return p.access(this,p.prop,a,b,arguments.length>1)},removeProp:function(a){return a=p.propFix[a]||a,this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,f,g,h;if(p.isFunction(a))return this.each(function(b){p(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(s);for(c=0,d=this.length;c=0)d=d.replace(" "+c[f]+" "," ");e.className=a?p.trim(d):""}}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";return p.isFunction(a)?this.each(function(c){p(this).toggleClass(a.call(this,c,this.className,b),b)}):this.each(function(){if(c==="string"){var e,f=0,g=p(this),h=b,i=a.split(s);while(e=i[f++])h=d?h:!g.hasClass(e),g[h?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&p._data(this,"__className__",this.className),this.className=this.className||a===!1?"":p._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c=0)return!0;return!1},val:function(a){var c,d,e,f=this[0];if(!arguments.length){if(f)return c=p.valHooks[f.type]||p.valHooks[f.nodeName.toLowerCase()],c&&"get"in c&&(d=c.get(f,"value"))!==b?d:(d=f.value,typeof d=="string"?d.replace(P,""):d==null?"":d);return}return e=p.isFunction(a),this.each(function(d){var f,g=p(this);if(this.nodeType!==1)return;e?f=a.call(this,d,g.val()):f=a,f==null?f="":typeof f=="number"?f+="":p.isArray(f)&&(f=p.map(f,function(a){return a==null?"":a+""})),c=p.valHooks[this.type]||p.valHooks[this.nodeName.toLowerCase()];if(!c||!("set"in c)||c.set(this,f,"value")===b)this.value=f})}}),p.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,f=a.selectedIndex,g=[],h=a.options,i=a.type==="select-one";if(f<0)return null;c=i?f:0,d=i?f+1:h.length;for(;c=0}),c.length||(a.selectedIndex=-1),c}}},attrFn:{},attr:function(a,c,d,e){var f,g,h,i=a.nodeType;if(!a||i===3||i===8||i===2)return;if(e&&p.isFunction(p.fn[c]))return p(a)[c](d);if(typeof a.getAttribute=="undefined")return p.prop(a,c,d);h=i!==1||!p.isXMLDoc(a),h&&(c=c.toLowerCase(),g=p.attrHooks[c]||(T.test(c)?M:L));if(d!==b){if(d===null){p.removeAttr(a,c);return}return g&&"set"in g&&h&&(f=g.set(a,d,c))!==b?f:(a.setAttribute(c,d+""),d)}return g&&"get"in g&&h&&(f=g.get(a,c))!==null?f:(f=a.getAttribute(c),f===null?b:f)},removeAttr:function(a,b){var c,d,e,f,g=0;if(b&&a.nodeType===1){d=b.split(s);for(;g=0}})});var V=/^(?:textarea|input|select)$/i,W=/^([^\.]*|)(?:\.(.+)|)$/,X=/(?:^|\s)hover(\.\S+|)\b/,Y=/^key/,Z=/^(?:mouse|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=function(a){return p.event.special.hover?a:a.replace(X,"mouseenter$1 mouseleave$1")};p.event={add:function(a,c,d,e,f){var g,h,i,j,k,l,m,n,o,q,r;if(a.nodeType===3||a.nodeType===8||!c||!d||!(g=p._data(a)))return;d.handler&&(o=d,d=o.handler,f=o.selector),d.guid||(d.guid=p.guid++),i=g.events,i||(g.events=i={}),h=g.handle,h||(g.handle=h=function(a){return typeof p!="undefined"&&(!a||p.event.triggered!==a.type)?p.event.dispatch.apply(h.elem,arguments):b},h.elem=a),c=p.trim(_(c)).split(" ");for(j=0;j=0&&(s=s.slice(0,-1),i=!0),s.indexOf(".")>=0&&(t=s.split("."),s=t.shift(),t.sort());if((!f||p.event.customEvent[s])&&!p.event.global[s])return;c=typeof c=="object"?c[p.expando]?c:new p.Event(s,c):new p.Event(s),c.type=s,c.isTrigger=!0,c.exclusive=i,c.namespace=t.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+t.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,m=s.indexOf(":")<0?"on"+s:"";if(!f){h=p.cache;for(j in h)h[j].events&&h[j].events[s]&&p.event.trigger(c,d,h[j].handle.elem,!0);return}c.result=b,c.target||(c.target=f),d=d!=null?p.makeArray(d):[],d.unshift(c),n=p.event.special[s]||{};if(n.trigger&&n.trigger.apply(f,d)===!1)return;q=[[f,n.bindType||s]];if(!g&&!n.noBubble&&!p.isWindow(f)){r=n.delegateType||s,k=$.test(r+s)?f:f.parentNode;for(l=f;k;k=k.parentNode)q.push([k,r]),l=k;l===(f.ownerDocument||e)&&q.push([l.defaultView||l.parentWindow||a,r])}for(j=0;j=0:p.find(m,this,null,[f]).length),h[m]&&j.push(l);j.length&&u.push({elem:f,matches:j})}o.length>q&&u.push({elem:this,matches:o.slice(q)});for(d=0;d0?this.on(b,null,a,c):this.trigger(b)},Y.test(b)&&(p.event.fixHooks[b]=p.event.keyHooks),Z.test(b)&&(p.event.fixHooks[b]=p.event.mouseHooks)}),function(a,b){function bc(a,b,c,d){c=c||[],b=b||r;var e,f,i,j,k=b.nodeType;if(!a||typeof a!="string")return c;if(k!==1&&k!==9)return[];i=g(b);if(!i&&!d)if(e=P.exec(a))if(j=e[1]){if(k===9){f=b.getElementById(j);if(!f||!f.parentNode)return c;if(f.id===j)return c.push(f),c}else if(b.ownerDocument&&(f=b.ownerDocument.getElementById(j))&&h(b,f)&&f.id===j)return c.push(f),c}else{if(e[2])return w.apply(c,x.call(b.getElementsByTagName(a),0)),c;if((j=e[3])&&_&&b.getElementsByClassName)return w.apply(c,x.call(b.getElementsByClassName(j),0)),c}return bp(a.replace(L,"$1"),b,c,d,i)}function bd(a){return function(b){var c=b.nodeName.toLowerCase();return c==="input"&&b.type===a}}function be(a){return function(b){var c=b.nodeName.toLowerCase();return(c==="input"||c==="button")&&b.type===a}}function bf(a){return z(function(b){return b=+b,z(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function bg(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}function bh(a,b){var c,d,f,g,h,i,j,k=C[o][a];if(k)return b?0:k.slice(0);h=a,i=[],j=e.preFilter;while(h){if(!c||(d=M.exec(h)))d&&(h=h.slice(d[0].length)),i.push(f=[]);c=!1;if(d=N.exec(h))f.push(c=new q(d.shift())),h=h.slice(c.length),c.type=d[0].replace(L," ");for(g in e.filter)(d=W[g].exec(h))&&(!j[g]||(d=j[g](d,r,!0)))&&(f.push(c=new q(d.shift())),h=h.slice(c.length),c.type=g,c.matches=d);if(!c)break}return b?h.length:h?bc.error(a):C(a,i).slice(0)}function bi(a,b,d){var e=b.dir,f=d&&b.dir==="parentNode",g=u++;return b.first?function(b,c,d){while(b=b[e])if(f||b.nodeType===1)return a(b,c,d)}:function(b,d,h){if(!h){var i,j=t+" "+g+" ",k=j+c;while(b=b[e])if(f||b.nodeType===1){if((i=b[o])===k)return b.sizset;if(typeof i=="string"&&i.indexOf(j)===0){if(b.sizset)return b}else{b[o]=k;if(a(b,d,h))return b.sizset=!0,b;b.sizset=!1}}}else while(b=b[e])if(f||b.nodeType===1)if(a(b,d,h))return b}}function bj(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function bk(a,b,c,d,e){var f,g=[],h=0,i=a.length,j=b!=null;for(;h-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==l)||((b=c).nodeType?j(a,c,d):k(a,c,d))}];for(;i1&&bj(m),i>1&&a.slice(0,i-1).join("").replace(L,"$1"),c,i0,f=a.length>0,g=function(h,i,j,k,m){var n,o,p,q=[],s=0,u="0",x=h&&[],y=m!=null,z=l,A=h||f&&e.find.TAG("*",m&&i.parentNode||i),B=t+=z==null?1:Math.E;y&&(l=i!==r&&i,c=g.el);for(;(n=A[u])!=null;u++){if(f&&n){for(o=0;p=a[o];o++)if(p(n,i,j)){k.push(n);break}y&&(t=B,c=++g.el)}d&&((n=!p&&n)&&s--,h&&x.push(n))}s+=u;if(d&&u!==s){for(o=0;p=b[o];o++)p(x,q,i,j);if(h){if(s>0)while(u--)!x[u]&&!q[u]&&(q[u]=v.call(k));q=bk(q)}w.apply(k,q),y&&!h&&q.length>0&&s+b.length>1&&bc.uniqueSort(k)}return y&&(t=B,l=z),x};return g.el=0,d?z(g):g}function bo(a,b,c,d){var e=0,f=b.length;for(;e2&&(j=h[0]).type==="ID"&&b.nodeType===9&&!f&&e.relative[h[1].type]){b=e.find.ID(j.matches[0].replace(V,""),b,f)[0];if(!b)return c;a=a.slice(h.shift().length)}for(g=W.POS.test(a)?-1:h.length-1;g>=0;g--){j=h[g];if(e.relative[k=j.type])break;if(l=e.find[k])if(d=l(j.matches[0].replace(V,""),R.test(h[0].type)&&b.parentNode||b,f)){h.splice(g,1),a=d.length&&h.join("");if(!a)return w.apply(c,x.call(d,0)),c;break}}}return i(a,m)(d,b,f,c,R.test(a)),c}function bq(){}var c,d,e,f,g,h,i,j,k,l,m=!0,n="undefined",o=("sizcache"+Math.random()).replace(".",""),q=String,r=a.document,s=r.documentElement,t=0,u=0,v=[].pop,w=[].push,x=[].slice,y=[].indexOf||function(a){var b=0,c=this.length;for(;be.cacheLength&&delete a[b.shift()],a[c]=d},a)},B=A(),C=A(),D=A(),E="[\\x20\\t\\r\\n\\f]",F="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",G=F.replace("w","w#"),H="([*^$|!~]?=)",I="\\["+E+"*("+F+")"+E+"*(?:"+H+E+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+G+")|)|)"+E+"*\\]",J=":("+F+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:"+I+")|[^:]|\\\\.)*|.*))\\)|)",K=":(even|odd|eq|gt|lt|nth|first|last)(?:\\("+E+"*((?:-\\d)?\\d*)"+E+"*\\)|)(?=[^-]|$)",L=new RegExp("^"+E+"+|((?:^|[^\\\\])(?:\\\\.)*)"+E+"+$","g"),M=new RegExp("^"+E+"*,"+E+"*"),N=new RegExp("^"+E+"*([\\x20\\t\\r\\n\\f>+~])"+E+"*"),O=new RegExp(J),P=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,Q=/^:not/,R=/[\x20\t\r\n\f]*[+~]/,S=/:not\($/,T=/h\d/i,U=/input|select|textarea|button/i,V=/\\(?!\\)/g,W={ID:new RegExp("^#("+F+")"),CLASS:new RegExp("^\\.("+F+")"),NAME:new RegExp("^\\[name=['\"]?("+F+")['\"]?\\]"),TAG:new RegExp("^("+F.replace("w","w*")+")"),ATTR:new RegExp("^"+I),PSEUDO:new RegExp("^"+J),POS:new RegExp(K,"i"),CHILD:new RegExp("^:(only|nth|first|last)-child(?:\\("+E+"*(even|odd|(([+-]|)(\\d*)n|)"+E+"*(?:([+-]|)"+E+"*(\\d+)|))"+E+"*\\)|)","i"),needsContext:new RegExp("^"+E+"*[>+~]|"+K,"i")},X=function(a){var b=r.createElement("div");try{return a(b)}catch(c){return!1}finally{b=null}},Y=X(function(a){return a.appendChild(r.createComment("")),!a.getElementsByTagName("*").length}),Z=X(function(a){return a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!==n&&a.firstChild.getAttribute("href")==="#"}),$=X(function(a){a.innerHTML="";var b=typeof a.lastChild.getAttribute("multiple");return b!=="boolean"&&b!=="string"}),_=X(function(a){return a.innerHTML="",!a.getElementsByClassName||!a.getElementsByClassName("e").length?!1:(a.lastChild.className="e",a.getElementsByClassName("e").length===2)}),ba=X(function(a){a.id=o+0,a.innerHTML="
    ",s.insertBefore(a,s.firstChild);var b=r.getElementsByName&&r.getElementsByName(o).length===2+r.getElementsByName(o+0).length;return d=!r.getElementById(o),s.removeChild(a),b});try{x.call(s.childNodes,0)[0].nodeType}catch(bb){x=function(a){var b,c=[];for(;b=this[a];a++)c.push(b);return c}}bc.matches=function(a,b){return bc(a,null,null,b)},bc.matchesSelector=function(a,b){return bc(b,null,null,[a]).length>0},f=bc.getText=function(a){var b,c="",d=0,e=a.nodeType;if(e){if(e===1||e===9||e===11){if(typeof a.textContent=="string")return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=f(a)}else if(e===3||e===4)return a.nodeValue}else for(;b=a[d];d++)c+=f(b);return c},g=bc.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?b.nodeName!=="HTML":!1},h=bc.contains=s.contains?function(a,b){var c=a.nodeType===9?a.documentElement:a,d=b&&b.parentNode;return a===d||!!(d&&d.nodeType===1&&c.contains&&c.contains(d))}:s.compareDocumentPosition?function(a,b){return b&&!!(a.compareDocumentPosition(b)&16)}:function(a,b){while(b=b.parentNode)if(b===a)return!0;return!1},bc.attr=function(a,b){var c,d=g(a);return d||(b=b.toLowerCase()),(c=e.attrHandle[b])?c(a):d||$?a.getAttribute(b):(c=a.getAttributeNode(b),c?typeof a[b]=="boolean"?a[b]?b:null:c.specified?c.value:null:null)},e=bc.selectors={cacheLength:50,createPseudo:z,match:W,attrHandle:Z?{}:{href:function(a){return a.getAttribute("href",2)},type:function(a){return a.getAttribute("type")}},find:{ID:d?function(a,b,c){if(typeof b.getElementById!==n&&!c){var d=b.getElementById(a);return d&&d.parentNode?[d]:[]}}:function(a,c,d){if(typeof c.getElementById!==n&&!d){var e=c.getElementById(a);return e?e.id===a||typeof e.getAttributeNode!==n&&e.getAttributeNode("id").value===a?[e]:b:[]}},TAG:Y?function(a,b){if(typeof b.getElementsByTagName!==n)return b.getElementsByTagName(a)}:function(a,b){var c=b.getElementsByTagName(a);if(a==="*"){var d,e=[],f=0;for(;d=c[f];f++)d.nodeType===1&&e.push(d);return e}return c},NAME:ba&&function(a,b){if(typeof b.getElementsByName!==n)return b.getElementsByName(name)},CLASS:_&&function(a,b,c){if(typeof b.getElementsByClassName!==n&&!c)return b.getElementsByClassName(a)}},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(V,""),a[3]=(a[4]||a[5]||"").replace(V,""),a[2]==="~="&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),a[1]==="nth"?(a[2]||bc.error(a[0]),a[3]=+(a[3]?a[4]+(a[5]||1):2*(a[2]==="even"||a[2]==="odd")),a[4]=+(a[6]+a[7]||a[2]==="odd")):a[2]&&bc.error(a[0]),a},PSEUDO:function(a){var b,c;if(W.CHILD.test(a[0]))return null;if(a[3])a[2]=a[3];else if(b=a[4])O.test(b)&&(c=bh(b,!0))&&(c=b.indexOf(")",b.length-c)-b.length)&&(b=b.slice(0,c),a[0]=a[0].slice(0,c)),a[2]=b;return a.slice(0,3)}},filter:{ID:d?function(a){return a=a.replace(V,""),function(b){return b.getAttribute("id")===a}}:function(a){return a=a.replace(V,""),function(b){var c=typeof b.getAttributeNode!==n&&b.getAttributeNode("id");return c&&c.value===a}},TAG:function(a){return a==="*"?function(){return!0}:(a=a.replace(V,"").toLowerCase(),function(b){return b.nodeName&&b.nodeName.toLowerCase()===a})},CLASS:function(a){var b=B[o][a];return b||(b=B(a,new RegExp("(^|"+E+")"+a+"("+E+"|$)"))),function(a){return b.test(a.className||typeof a.getAttribute!==n&&a.getAttribute("class")||"")}},ATTR:function(a,b,c){return function(d,e){var f=bc.attr(d,a);return f==null?b==="!=":b?(f+="",b==="="?f===c:b==="!="?f!==c:b==="^="?c&&f.indexOf(c)===0:b==="*="?c&&f.indexOf(c)>-1:b==="$="?c&&f.substr(f.length-c.length)===c:b==="~="?(" "+f+" ").indexOf(c)>-1:b==="|="?f===c||f.substr(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d){return a==="nth"?function(a){var b,e,f=a.parentNode;if(c===1&&d===0)return!0;if(f){e=0;for(b=f.firstChild;b;b=b.nextSibling)if(b.nodeType===1){e++;if(a===b)break}}return e-=d,e===c||e%c===0&&e/c>=0}:function(b){var c=b;switch(a){case"only":case"first":while(c=c.previousSibling)if(c.nodeType===1)return!1;if(a==="first")return!0;c=b;case"last":while(c=c.nextSibling)if(c.nodeType===1)return!1;return!0}}},PSEUDO:function(a,b){var c,d=e.pseudos[a]||e.setFilters[a.toLowerCase()]||bc.error("unsupported pseudo: "+a);return d[o]?d(b):d.length>1?(c=[a,a,"",b],e.setFilters.hasOwnProperty(a.toLowerCase())?z(function(a,c){var e,f=d(a,b),g=f.length;while(g--)e=y.call(a,f[g]),a[e]=!(c[e]=f[g])}):function(a){return d(a,0,c)}):d}},pseudos:{not:z(function(a){var b=[],c=[],d=i(a.replace(L,"$1"));return d[o]?z(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)if(f=g[h])a[h]=!(b[h]=f)}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:z(function(a){return function(b){return bc(a,b).length>0}}),contains:z(function(a){return function(b){return(b.textContent||b.innerText||f(b)).indexOf(a)>-1}}),enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&!!a.checked||b==="option"&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},parent:function(a){return!e.pseudos.empty(a)},empty:function(a){var b;a=a.firstChild;while(a){if(a.nodeName>"@"||(b=a.nodeType)===3||b===4)return!1;a=a.nextSibling}return!0},header:function(a){return T.test(a.nodeName)},text:function(a){var b,c;return a.nodeName.toLowerCase()==="input"&&(b=a.type)==="text"&&((c=a.getAttribute("type"))==null||c.toLowerCase()===b)},radio:bd("radio"),checkbox:bd("checkbox"),file:bd("file"),password:bd("password"),image:bd("image"),submit:be("submit"),reset:be("reset"),button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&a.type==="button"||b==="button"},input:function(a){return U.test(a.nodeName)},focus:function(a){var b=a.ownerDocument;return a===b.activeElement&&(!b.hasFocus||b.hasFocus())&&(!!a.type||!!a.href)},active:function(a){return a===a.ownerDocument.activeElement},first:bf(function(a,b,c){return[0]}),last:bf(function(a,b,c){return[b-1]}),eq:bf(function(a,b,c){return[c<0?c+b:c]}),even:bf(function(a,b,c){for(var d=0;d=0;)a.push(d);return a}),gt:bf(function(a,b,c){for(var d=c<0?c+b:c;++d",a.querySelectorAll("[selected]").length||e.push("\\["+E+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),a.querySelectorAll(":checked").length||e.push(":checked")}),X(function(a){a.innerHTML="

    ",a.querySelectorAll("[test^='']").length&&e.push("[*^$]="+E+"*(?:\"\"|'')"),a.innerHTML="",a.querySelectorAll(":enabled").length||e.push(":enabled",":disabled")}),e=new RegExp(e.join("|")),bp=function(a,d,f,g,h){if(!g&&!h&&(!e||!e.test(a))){var i,j,k=!0,l=o,m=d,n=d.nodeType===9&&a;if(d.nodeType===1&&d.nodeName.toLowerCase()!=="object"){i=bh(a),(k=d.getAttribute("id"))?l=k.replace(c,"\\$&"):d.setAttribute("id",l),l="[id='"+l+"'] ",j=i.length;while(j--)i[j]=l+i[j].join("");m=R.test(a)&&d.parentNode||d,n=i.join(",")}if(n)try{return w.apply(f,x.call(m.querySelectorAll(n),0)),f}catch(p){}finally{k||d.removeAttribute("id")}}return b(a,d,f,g,h)},h&&(X(function(b){a=h.call(b,"div");try{h.call(b,"[test!='']:sizzle"),f.push("!=",J)}catch(c){}}),f=new RegExp(f.join("|")),bc.matchesSelector=function(b,c){c=c.replace(d,"='$1']");if(!g(b)&&!f.test(c)&&(!e||!e.test(c)))try{var i=h.call(b,c);if(i||a||b.document&&b.document.nodeType!==11)return i}catch(j){}return bc(c,null,null,[b]).length>0})}(),e.pseudos.nth=e.pseudos.eq,e.filters=bq.prototype=e.pseudos,e.setFilters=new bq,bc.attr=p.attr,p.find=bc,p.expr=bc.selectors,p.expr[":"]=p.expr.pseudos,p.unique=bc.uniqueSort,p.text=bc.getText,p.isXMLDoc=bc.isXML,p.contains=bc.contains}(a);var bc=/Until$/,bd=/^(?:parents|prev(?:Until|All))/,be=/^.[^:#\[\.,]*$/,bf=p.expr.match.needsContext,bg={children:!0,contents:!0,next:!0,prev:!0};p.fn.extend({find:function(a){var b,c,d,e,f,g,h=this;if(typeof a!="string")return p(a).filter(function(){for(b=0,c=h.length;b0)for(e=d;e=0:p.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c,d=0,e=this.length,f=[],g=bf.test(a)||typeof a!="string"?p(a,b||this.context):0;for(;d-1:p.find.matchesSelector(c,a)){f.push(c);break}c=c.parentNode}}return f=f.length>1?p.unique(f):f,this.pushStack(f,"closest",a)},index:function(a){return a?typeof a=="string"?p.inArray(this[0],p(a)):p.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(a,b){var c=typeof a=="string"?p(a,b):p.makeArray(a&&a.nodeType?[a]:a),d=p.merge(this.get(),c);return this.pushStack(bh(c[0])||bh(d[0])?d:p.unique(d))},addBack:function(a){return this.add(a==null?this.prevObject:this.prevObject.filter(a))}}),p.fn.andSelf=p.fn.addBack,p.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return p.dir(a,"parentNode")},parentsUntil:function(a,b,c){return p.dir(a,"parentNode",c)},next:function(a){return bi(a,"nextSibling")},prev:function(a){return bi(a,"previousSibling")},nextAll:function(a){return p.dir(a,"nextSibling")},prevAll:function(a){return p.dir(a,"previousSibling")},nextUntil:function(a,b,c){return p.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return p.dir(a,"previousSibling",c)},siblings:function(a){return p.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return p.sibling(a.firstChild)},contents:function(a){return p.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:p.merge([],a.childNodes)}},function(a,b){p.fn[a]=function(c,d){var e=p.map(this,b,c);return bc.test(a)||(d=c),d&&typeof d=="string"&&(e=p.filter(d,e)),e=this.length>1&&!bg[a]?p.unique(e):e,this.length>1&&bd.test(a)&&(e=e.reverse()),this.pushStack(e,a,k.call(arguments).join(","))}}),p.extend({filter:function(a,b,c){return c&&(a=":not("+a+")"),b.length===1?p.find.matchesSelector(b[0],a)?[b[0]]:[]:p.find.matches(a,b)},dir:function(a,c,d){var e=[],f=a[c];while(f&&f.nodeType!==9&&(d===b||f.nodeType!==1||!p(f).is(d)))f.nodeType===1&&e.push(f),f=f[c];return e},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var bl="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",bm=/ jQuery\d+="(?:null|\d+)"/g,bn=/^\s+/,bo=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bp=/<([\w:]+)/,bq=/
    ","
    "],tr:[2,"","
    "],td:[3,"","
    "],col:[2,"","
    "],area:[1,"",""],_default:[0,"",""]},bA=bk(e),bB=bA.appendChild(e.createElement("div"));bz.optgroup=bz.option,bz.tbody=bz.tfoot=bz.colgroup=bz.caption=bz.thead,bz.th=bz.td,p.support.htmlSerialize||(bz._default=[1,"X
    ","
    "]),p.fn.extend({text:function(a){return p.access(this,function(a){return a===b?p.text(this):this.empty().append((this[0]&&this[0].ownerDocument||e).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(p.isFunction(a))return this.each(function(b){p(this).wrapAll(a.call(this,b))});if(this[0]){var b=p(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return p.isFunction(a)?this.each(function(b){p(this).wrapInner(a.call(this,b))}):this.each(function(){var b=p(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=p.isFunction(a);return this.each(function(c){p(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){p.nodeName(this,"body")||p(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){(this.nodeType===1||this.nodeType===11)&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){(this.nodeType===1||this.nodeType===11)&&this.insertBefore(a,this.firstChild)})},before:function(){if(!bh(this[0]))return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=p.clean(arguments);return this.pushStack(p.merge(a,this),"before",this.selector)}},after:function(){if(!bh(this[0]))return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=p.clean(arguments);return this.pushStack(p.merge(this,a),"after",this.selector)}},remove:function(a,b){var c,d=0;for(;(c=this[d])!=null;d++)if(!a||p.filter(a,[c]).length)!b&&c.nodeType===1&&(p.cleanData(c.getElementsByTagName("*")),p.cleanData([c])),c.parentNode&&c.parentNode.removeChild(c);return this},empty:function(){var a,b=0;for(;(a=this[b])!=null;b++){a.nodeType===1&&p.cleanData(a.getElementsByTagName("*"));while(a.firstChild)a.removeChild(a.firstChild)}return this},clone:function(a,b){return a=a==null?!1:a,b=b==null?a:b,this.map(function(){return p.clone(this,a,b)})},html:function(a){return p.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return c.nodeType===1?c.innerHTML.replace(bm,""):b;if(typeof a=="string"&&!bs.test(a)&&(p.support.htmlSerialize||!bu.test(a))&&(p.support.leadingWhitespace||!bn.test(a))&&!bz[(bp.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(bo,"<$1>");try{for(;d1&&typeof j=="string"&&bw.test(j))return this.each(function(){p(this).domManip(a,c,d)});if(p.isFunction(j))return this.each(function(e){var f=p(this);a[0]=j.call(this,e,c?f.html():b),f.domManip(a,c,d)});if(this[0]){e=p.buildFragment(a,this,k),g=e.fragment,f=g.firstChild,g.childNodes.length===1&&(g=f);if(f){c=c&&p.nodeName(f,"tr");for(h=e.cacheable||l-1;i0?this.clone(!0):this).get(),p(g[e])[b](d),f=f.concat(d);return this.pushStack(f,a,g.selector)}}),p.extend({clone:function(a,b,c){var d,e,f,g;p.support.html5Clone||p.isXMLDoc(a)||!bu.test("<"+a.nodeName+">")?g=a.cloneNode(!0):(bB.innerHTML=a.outerHTML,bB.removeChild(g=bB.firstChild));if((!p.support.noCloneEvent||!p.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!p.isXMLDoc(a)){bE(a,g),d=bF(a),e=bF(g);for(f=0;d[f];++f)e[f]&&bE(d[f],e[f])}if(b){bD(a,g);if(c){d=bF(a),e=bF(g);for(f=0;d[f];++f)bD(d[f],e[f])}}return d=e=null,g},clean:function(a,b,c,d){var f,g,h,i,j,k,l,m,n,o,q,r,s=b===e&&bA,t=[];if(!b||typeof b.createDocumentFragment=="undefined")b=e;for(f=0;(h=a[f])!=null;f++){typeof h=="number"&&(h+="");if(!h)continue;if(typeof h=="string")if(!br.test(h))h=b.createTextNode(h);else{s=s||bk(b),l=b.createElement("div"),s.appendChild(l),h=h.replace(bo,"<$1>"),i=(bp.exec(h)||["",""])[1].toLowerCase(),j=bz[i]||bz._default,k=j[0],l.innerHTML=j[1]+h+j[2];while(k--)l=l.lastChild;if(!p.support.tbody){m=bq.test(h),n=i==="table"&&!m?l.firstChild&&l.firstChild.childNodes:j[1]===""&&!m?l.childNodes:[];for(g=n.length-1;g>=0;--g)p.nodeName(n[g],"tbody")&&!n[g].childNodes.length&&n[g].parentNode.removeChild(n[g])}!p.support.leadingWhitespace&&bn.test(h)&&l.insertBefore(b.createTextNode(bn.exec(h)[0]),l.firstChild),h=l.childNodes,l.parentNode.removeChild(l)}h.nodeType?t.push(h):p.merge(t,h)}l&&(h=l=s=null);if(!p.support.appendChecked)for(f=0;(h=t[f])!=null;f++)p.nodeName(h,"input")?bG(h):typeof h.getElementsByTagName!="undefined"&&p.grep(h.getElementsByTagName("input"),bG);if(c){q=function(a){if(!a.type||bx.test(a.type))return d?d.push(a.parentNode?a.parentNode.removeChild(a):a):c.appendChild(a)};for(f=0;(h=t[f])!=null;f++)if(!p.nodeName(h,"script")||!q(h))c.appendChild(h),typeof h.getElementsByTagName!="undefined"&&(r=p.grep(p.merge([],h.getElementsByTagName("script")),q),t.splice.apply(t,[f+1,0].concat(r)),f+=r.length)}return t},cleanData:function(a,b){var c,d,e,f,g=0,h=p.expando,i=p.cache,j=p.support.deleteExpando,k=p.event.special;for(;(e=a[g])!=null;g++)if(b||p.acceptData(e)){d=e[h],c=d&&i[d];if(c){if(c.events)for(f in c.events)k[f]?p.event.remove(e,f):p.removeEvent(e,f,c.handle);i[d]&&(delete i[d],j?delete e[h]:e.removeAttribute?e.removeAttribute(h):e[h]=null,p.deletedIds.push(d))}}}}),function(){var a,b;p.uaMatch=function(a){a=a.toLowerCase();var b=/(chrome)[ \/]([\w.]+)/.exec(a)||/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||a.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},a=p.uaMatch(g.userAgent),b={},a.browser&&(b[a.browser]=!0,b.version=a.version),b.chrome?b.webkit=!0:b.webkit&&(b.safari=!0),p.browser=b,p.sub=function(){function a(b,c){return new a.fn.init(b,c)}p.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function c(c,d){return d&&d instanceof p&&!(d instanceof a)&&(d=a(d)),p.fn.init.call(this,c,d,b)},a.fn.init.prototype=a.fn;var b=a(e);return a}}();var bH,bI,bJ,bK=/alpha\([^)]*\)/i,bL=/opacity=([^)]*)/,bM=/^(top|right|bottom|left)$/,bN=/^(none|table(?!-c[ea]).+)/,bO=/^margin/,bP=new RegExp("^("+q+")(.*)$","i"),bQ=new RegExp("^("+q+")(?!px)[a-z%]+$","i"),bR=new RegExp("^([-+])=("+q+")","i"),bS={},bT={position:"absolute",visibility:"hidden",display:"block"},bU={letterSpacing:0,fontWeight:400},bV=["Top","Right","Bottom","Left"],bW=["Webkit","O","Moz","ms"],bX=p.fn.toggle;p.fn.extend({css:function(a,c){return p.access(this,function(a,c,d){return d!==b?p.style(a,c,d):p.css(a,c)},a,c,arguments.length>1)},show:function(){return b$(this,!0)},hide:function(){return b$(this)},toggle:function(a,b){var c=typeof a=="boolean";return p.isFunction(a)&&p.isFunction(b)?bX.apply(this,arguments):this.each(function(){(c?a:bZ(this))?p(this).show():p(this).hide()})}}),p.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bH(a,"opacity");return c===""?"1":c}}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":p.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!a||a.nodeType===3||a.nodeType===8||!a.style)return;var f,g,h,i=p.camelCase(c),j=a.style;c=p.cssProps[i]||(p.cssProps[i]=bY(j,i)),h=p.cssHooks[c]||p.cssHooks[i];if(d===b)return h&&"get"in h&&(f=h.get(a,!1,e))!==b?f:j[c];g=typeof d,g==="string"&&(f=bR.exec(d))&&(d=(f[1]+1)*f[2]+parseFloat(p.css(a,c)),g="number");if(d==null||g==="number"&&isNaN(d))return;g==="number"&&!p.cssNumber[i]&&(d+="px");if(!h||!("set"in h)||(d=h.set(a,d,e))!==b)try{j[c]=d}catch(k){}},css:function(a,c,d,e){var f,g,h,i=p.camelCase(c);return c=p.cssProps[i]||(p.cssProps[i]=bY(a.style,i)),h=p.cssHooks[c]||p.cssHooks[i],h&&"get"in h&&(f=h.get(a,!0,e)),f===b&&(f=bH(a,c)),f==="normal"&&c in bU&&(f=bU[c]),d||e!==b?(g=parseFloat(f),d||p.isNumeric(g)?g||0:f):f},swap:function(a,b,c){var d,e,f={};for(e in b)f[e]=a.style[e],a.style[e]=b[e];d=c.call(a);for(e in b)a.style[e]=f[e];return d}}),a.getComputedStyle?bH=function(b,c){var d,e,f,g,h=a.getComputedStyle(b,null),i=b.style;return h&&(d=h[c],d===""&&!p.contains(b.ownerDocument,b)&&(d=p.style(b,c)),bQ.test(d)&&bO.test(c)&&(e=i.width,f=i.minWidth,g=i.maxWidth,i.minWidth=i.maxWidth=i.width=d,d=h.width,i.width=e,i.minWidth=f,i.maxWidth=g)),d}:e.documentElement.currentStyle&&(bH=function(a,b){var c,d,e=a.currentStyle&&a.currentStyle[b],f=a.style;return e==null&&f&&f[b]&&(e=f[b]),bQ.test(e)&&!bM.test(b)&&(c=f.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":e,e=f.pixelLeft+"px",f.left=c,d&&(a.runtimeStyle.left=d)),e===""?"auto":e}),p.each(["height","width"],function(a,b){p.cssHooks[b]={get:function(a,c,d){if(c)return a.offsetWidth===0&&bN.test(bH(a,"display"))?p.swap(a,bT,function(){return cb(a,b,d)}):cb(a,b,d)},set:function(a,c,d){return b_(a,c,d?ca(a,b,d,p.support.boxSizing&&p.css(a,"boxSizing")==="border-box"):0)}}}),p.support.opacity||(p.cssHooks.opacity={get:function(a,b){return bL.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=p.isNumeric(b)?"alpha(opacity="+b*100+")":"",f=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&p.trim(f.replace(bK,""))===""&&c.removeAttribute){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bK.test(f)?f.replace(bK,e):f+" "+e}}),p(function(){p.support.reliableMarginRight||(p.cssHooks.marginRight={get:function(a,b){return p.swap(a,{display:"inline-block"},function(){if(b)return bH(a,"marginRight")})}}),!p.support.pixelPosition&&p.fn.position&&p.each(["top","left"],function(a,b){p.cssHooks[b]={get:function(a,c){if(c){var d=bH(a,b);return bQ.test(d)?p(a).position()[b]+"px":d}}}})}),p.expr&&p.expr.filters&&(p.expr.filters.hidden=function(a){return a.offsetWidth===0&&a.offsetHeight===0||!p.support.reliableHiddenOffsets&&(a.style&&a.style.display||bH(a,"display"))==="none"},p.expr.filters.visible=function(a){return!p.expr.filters.hidden(a)}),p.each({margin:"",padding:"",border:"Width"},function(a,b){p.cssHooks[a+b]={expand:function(c){var d,e=typeof c=="string"?c.split(" "):[c],f={};for(d=0;d<4;d++)f[a+bV[d]+b]=e[d]||e[d-2]||e[0];return f}},bO.test(a)||(p.cssHooks[a+b].set=b_)});var cd=/%20/g,ce=/\[\]$/,cf=/\r?\n/g,cg=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,ch=/^(?:select|textarea)/i;p.fn.extend({serialize:function(){return p.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?p.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||ch.test(this.nodeName)||cg.test(this.type))}).map(function(a,b){var c=p(this).val();return c==null?null:p.isArray(c)?p.map(c,function(a,c){return{name:b.name,value:a.replace(cf,"\r\n")}}):{name:b.name,value:c.replace(cf,"\r\n")}}).get()}}),p.param=function(a,c){var d,e=[],f=function(a,b){b=p.isFunction(b)?b():b==null?"":b,e[e.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=p.ajaxSettings&&p.ajaxSettings.traditional);if(p.isArray(a)||a.jquery&&!p.isPlainObject(a))p.each(a,function(){f(this.name,this.value)});else for(d in a)ci(d,a[d],c,f);return e.join("&").replace(cd,"+")};var cj,ck,cl=/#.*$/,cm=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,cn=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,co=/^(?:GET|HEAD)$/,cp=/^\/\//,cq=/\?/,cr=/)<[^<]*)*<\/script>/gi,cs=/([?&])_=[^&]*/,ct=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,cu=p.fn.load,cv={},cw={},cx=["*/"]+["*"];try{ck=f.href}catch(cy){ck=e.createElement("a"),ck.href="",ck=ck.href}cj=ct.exec(ck.toLowerCase())||[],p.fn.load=function(a,c,d){if(typeof a!="string"&&cu)return cu.apply(this,arguments);if(!this.length)return this;var e,f,g,h=this,i=a.indexOf(" ");return i>=0&&(e=a.slice(i,a.length),a=a.slice(0,i)),p.isFunction(c)?(d=c,c=b):c&&typeof c=="object"&&(f="POST"),p.ajax({url:a,type:f,dataType:"html",data:c,complete:function(a,b){d&&h.each(d,g||[a.responseText,b,a])}}).done(function(a){g=arguments,h.html(e?p("
    ").append(a.replace(cr,"")).find(e):a)}),this},p.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){p.fn[b]=function(a){return this.on(b,a)}}),p.each(["get","post"],function(a,c){p[c]=function(a,d,e,f){return p.isFunction(d)&&(f=f||e,e=d,d=b),p.ajax({type:c,url:a,data:d,success:e,dataType:f})}}),p.extend({getScript:function(a,c){return p.get(a,b,c,"script")},getJSON:function(a,b,c){return p.get(a,b,c,"json")},ajaxSetup:function(a,b){return b?cB(a,p.ajaxSettings):(b=a,a=p.ajaxSettings),cB(a,b),a},ajaxSettings:{url:ck,isLocal:cn.test(cj[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":cx},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":p.parseJSON,"text xml":p.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:cz(cv),ajaxTransport:cz(cw),ajax:function(a,c){function y(a,c,f,i){var k,s,t,u,w,y=c;if(v===2)return;v=2,h&&clearTimeout(h),g=b,e=i||"",x.readyState=a>0?4:0,f&&(u=cC(l,x,f));if(a>=200&&a<300||a===304)l.ifModified&&(w=x.getResponseHeader("Last-Modified"),w&&(p.lastModified[d]=w),w=x.getResponseHeader("Etag"),w&&(p.etag[d]=w)),a===304?(y="notmodified",k=!0):(k=cD(l,u),y=k.state,s=k.data,t=k.error,k=!t);else{t=y;if(!y||a)y="error",a<0&&(a=0)}x.status=a,x.statusText=(c||y)+"",k?o.resolveWith(m,[s,y,x]):o.rejectWith(m,[x,y,t]),x.statusCode(r),r=b,j&&n.trigger("ajax"+(k?"Success":"Error"),[x,l,k?s:t]),q.fireWith(m,[x,y]),j&&(n.trigger("ajaxComplete",[x,l]),--p.active||p.event.trigger("ajaxStop"))}typeof a=="object"&&(c=a,a=b),c=c||{};var d,e,f,g,h,i,j,k,l=p.ajaxSetup({},c),m=l.context||l,n=m!==l&&(m.nodeType||m instanceof p)?p(m):p.event,o=p.Deferred(),q=p.Callbacks("once memory"),r=l.statusCode||{},t={},u={},v=0,w="canceled",x={readyState:0,setRequestHeader:function(a,b){if(!v){var c=a.toLowerCase();a=u[c]=u[c]||a,t[a]=b}return this},getAllResponseHeaders:function(){return v===2?e:null},getResponseHeader:function(a){var c;if(v===2){if(!f){f={};while(c=cm.exec(e))f[c[1].toLowerCase()]=c[2]}c=f[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){return v||(l.mimeType=a),this},abort:function(a){return a=a||w,g&&g.abort(a),y(0,a),this}};o.promise(x),x.success=x.done,x.error=x.fail,x.complete=q.add,x.statusCode=function(a){if(a){var b;if(v<2)for(b in a)r[b]=[r[b],a[b]];else b=a[x.status],x.always(b)}return this},l.url=((a||l.url)+"").replace(cl,"").replace(cp,cj[1]+"//"),l.dataTypes=p.trim(l.dataType||"*").toLowerCase().split(s),l.crossDomain==null&&(i=ct.exec(l.url.toLowerCase())||!1,l.crossDomain=i&&i.join(":")+(i[3]?"":i[1]==="http:"?80:443)!==cj.join(":")+(cj[3]?"":cj[1]==="http:"?80:443)),l.data&&l.processData&&typeof l.data!="string"&&(l.data=p.param(l.data,l.traditional)),cA(cv,l,c,x);if(v===2)return x;j=l.global,l.type=l.type.toUpperCase(),l.hasContent=!co.test(l.type),j&&p.active++===0&&p.event.trigger("ajaxStart");if(!l.hasContent){l.data&&(l.url+=(cq.test(l.url)?"&":"?")+l.data,delete l.data),d=l.url;if(l.cache===!1){var z=p.now(),A=l.url.replace(cs,"$1_="+z);l.url=A+(A===l.url?(cq.test(l.url)?"&":"?")+"_="+z:"")}}(l.data&&l.hasContent&&l.contentType!==!1||c.contentType)&&x.setRequestHeader("Content-Type",l.contentType),l.ifModified&&(d=d||l.url,p.lastModified[d]&&x.setRequestHeader("If-Modified-Since",p.lastModified[d]),p.etag[d]&&x.setRequestHeader("If-None-Match",p.etag[d])),x.setRequestHeader("Accept",l.dataTypes[0]&&l.accepts[l.dataTypes[0]]?l.accepts[l.dataTypes[0]]+(l.dataTypes[0]!=="*"?", "+cx+"; q=0.01":""):l.accepts["*"]);for(k in l.headers)x.setRequestHeader(k,l.headers[k]);if(!l.beforeSend||l.beforeSend.call(m,x,l)!==!1&&v!==2){w="abort";for(k in{success:1,error:1,complete:1})x[k](l[k]);g=cA(cw,l,c,x);if(!g)y(-1,"No Transport");else{x.readyState=1,j&&n.trigger("ajaxSend",[x,l]),l.async&&l.timeout>0&&(h=setTimeout(function(){x.abort("timeout")},l.timeout));try{v=1,g.send(t,y)}catch(B){if(v<2)y(-1,B);else throw B}}return x}return x.abort()},active:0,lastModified:{},etag:{}});var cE=[],cF=/\?/,cG=/(=)\?(?=&|$)|\?\?/,cH=p.now();p.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=cE.pop()||p.expando+"_"+cH++;return this[a]=!0,a}}),p.ajaxPrefilter("json jsonp",function(c,d,e){var f,g,h,i=c.data,j=c.url,k=c.jsonp!==!1,l=k&&cG.test(j),m=k&&!l&&typeof i=="string"&&!(c.contentType||"").indexOf("application/x-www-form-urlencoded")&&cG.test(i);if(c.dataTypes[0]==="jsonp"||l||m)return f=c.jsonpCallback=p.isFunction(c.jsonpCallback)?c.jsonpCallback():c.jsonpCallback,g=a[f],l?c.url=j.replace(cG,"$1"+f):m?c.data=i.replace(cG,"$1"+f):k&&(c.url+=(cF.test(j)?"&":"?")+c.jsonp+"="+f),c.converters["script json"]=function(){return h||p.error(f+" was not called"),h[0]},c.dataTypes[0]="json",a[f]=function(){h=arguments},e.always(function(){a[f]=g,c[f]&&(c.jsonpCallback=d.jsonpCallback,cE.push(f)),h&&p.isFunction(g)&&g(h[0]),h=g=b}),"script"}),p.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){return p.globalEval(a),a}}}),p.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),p.ajaxTransport("script",function(a){if(a.crossDomain){var c,d=e.head||e.getElementsByTagName("head")[0]||e.documentElement;return{send:function(f,g){c=e.createElement("script"),c.async="async",a.scriptCharset&&(c.charset=a.scriptCharset),c.src=a.url,c.onload=c.onreadystatechange=function(a,e){if(e||!c.readyState||/loaded|complete/.test(c.readyState))c.onload=c.onreadystatechange=null,d&&c.parentNode&&d.removeChild(c),c=b,e||g(200,"success")},d.insertBefore(c,d.firstChild)},abort:function(){c&&c.onload(0,1)}}}});var cI,cJ=a.ActiveXObject?function(){for(var a in cI)cI[a](0,1)}:!1,cK=0;p.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&cL()||cM()}:cL,function(a){p.extend(p.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(p.ajaxSettings.xhr()),p.support.ajax&&p.ajaxTransport(function(c){if(!c.crossDomain||p.support.cors){var d;return{send:function(e,f){var g,h,i=c.xhr();c.username?i.open(c.type,c.url,c.async,c.username,c.password):i.open(c.type,c.url,c.async);if(c.xhrFields)for(h in c.xhrFields)i[h]=c.xhrFields[h];c.mimeType&&i.overrideMimeType&&i.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(h in e)i.setRequestHeader(h,e[h])}catch(j){}i.send(c.hasContent&&c.data||null),d=function(a,e){var h,j,k,l,m;try{if(d&&(e||i.readyState===4)){d=b,g&&(i.onreadystatechange=p.noop,cJ&&delete cI[g]);if(e)i.readyState!==4&&i.abort();else{h=i.status,k=i.getAllResponseHeaders(),l={},m=i.responseXML,m&&m.documentElement&&(l.xml=m);try{l.text=i.responseText}catch(a){}try{j=i.statusText}catch(n){j=""}!h&&c.isLocal&&!c.crossDomain?h=l.text?200:404:h===1223&&(h=204)}}}catch(o){e||f(-1,o)}l&&f(h,j,l,k)},c.async?i.readyState===4?setTimeout(d,0):(g=++cK,cJ&&(cI||(cI={},p(a).unload(cJ)),cI[g]=d),i.onreadystatechange=d):d()},abort:function(){d&&d(0,1)}}}});var cN,cO,cP=/^(?:toggle|show|hide)$/,cQ=new RegExp("^(?:([-+])=|)("+q+")([a-z%]*)$","i"),cR=/queueHooks$/,cS=[cY],cT={"*":[function(a,b){var c,d,e=this.createTween(a,b),f=cQ.exec(b),g=e.cur(),h=+g||0,i=1,j=20;if(f){c=+f[2],d=f[3]||(p.cssNumber[a]?"":"px");if(d!=="px"&&h){h=p.css(e.elem,a,!0)||c||1;do i=i||".5",h=h/i,p.style(e.elem,a,h+d);while(i!==(i=e.cur()/g)&&i!==1&&--j)}e.unit=d,e.start=h,e.end=f[1]?h+(f[1]+1)*c:c}return e}]};p.Animation=p.extend(cW,{tweener:function(a,b){p.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");var c,d=0,e=a.length;for(;d-1,j={},k={},l,m;i?(k=e.position(),l=k.top,m=k.left):(l=parseFloat(g)||0,m=parseFloat(h)||0),p.isFunction(b)&&(b=b.call(a,c,f)),b.top!=null&&(j.top=b.top-f.top+l),b.left!=null&&(j.left=b.left-f.left+m),"using"in b?b.using.call(a,j):e.css(j)}},p.fn.extend({position:function(){if(!this[0])return;var a=this[0],b=this.offsetParent(),c=this.offset(),d=c_.test(b[0].nodeName)?{top:0,left:0}:b.offset();return c.top-=parseFloat(p.css(a,"marginTop"))||0,c.left-=parseFloat(p.css(a,"marginLeft"))||0,d.top+=parseFloat(p.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(p.css(b[0],"borderLeftWidth"))||0,{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||e.body;while(a&&!c_.test(a.nodeName)&&p.css(a,"position")==="static")a=a.offsetParent;return a||e.body})}}),p.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,c){var d=/Y/.test(c);p.fn[a]=function(e){return p.access(this,function(a,e,f){var g=da(a);if(f===b)return g?c in g?g[c]:g.document.documentElement[e]:a[e];g?g.scrollTo(d?p(g).scrollLeft():f,d?f:p(g).scrollTop()):a[e]=f},a,e,arguments.length,null)}}),p.each({Height:"height",Width:"width"},function(a,c){p.each({padding:"inner"+a,content:c,"":"outer"+a},function(d,e){p.fn[e]=function(e,f){var g=arguments.length&&(d||typeof e!="boolean"),h=d||(e===!0||f===!0?"margin":"border");return p.access(this,function(c,d,e){var f;return p.isWindow(c)?c.document.documentElement["client"+a]:c.nodeType===9?(f=c.documentElement,Math.max(c.body["scroll"+a],f["scroll"+a],c.body["offset"+a],f["offset"+a],f["client"+a])):e===b?p.css(c,d,e,h):p.style(c,d,e,h)},c,g?e:b,g,null)}})}),a.jQuery=a.$=p,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return p})})(window); \ No newline at end of file diff --git a/upload/source/plugin/wechat/login.inc.php b/upload/source/plugin/wechat/login.inc.php deleted file mode 100644 index f212ab7a..00000000 --- a/upload/source/plugin/wechat/login.inc.php +++ /dev/null @@ -1,139 +0,0 @@ -fetch($_G['uid']); - if($connect['conisregister']) { - $showtip = false; - } - } - if($showtip) { - dsetcookie('qrauth', '', -1); - showmessage('wechat:wechat_member_bind_qrauth_lost'); - } - } - $url = wsq::qrconnectUrl($_G['uid'], dreferer()); - dheader('location: '.$url); -} elseif($ac == 'callback') { - if(!wsq::checksign($_GET) || $_G['uid'] && $_GET['siteuid'] != $_G['uid']) { - showmessage('wechat:wechat_member_auth_fail'); - } - require_once libfile('function/member'); - if($_GET['siteuid'] && ($member = getuserbyuid($_GET['siteuid'], 1))) { - setloginstatus($member, 1296000); - if(!C::t('#wechat#common_member_wechatmp')->fetch($member['uid'])) { - C::t('#wechat#common_member_wechatmp')->insert(array('uid' => $_G['uid'], 'openid' => $_GET['openid'], 'status' => $_G['cookie']['qrauth'] ? 1: 0), false, true); - } - - dheader('location: '.($_GET['referer'] ? $_GET['referer'] : $_G['siteurl'])); - } else { - require_once DISCUZ_ROOT . './source/plugin/wechat/wechat.class.php'; - require_once DISCUZ_ROOT . './source/plugin/wechat/wechat.lib.class.php'; - $defaultusername = WeChatEmoji::clear($_GET['nickname']); - if(!$_G['wechat']['setting']['wechat_allowfastregister']) { - redirectregister($defaultusername); - } - - loaducenter(); - $user = uc_get_user($defaultusername); - if(!empty($user)) { - $defaultusername = cutstr($defaultusername, 7, '').'_'.random(5); - } - $uid = WeChat::register($defaultusername, 1, 8); - if(!$uid) { - redirectregister($defaultusername); - } - C::t('#wechat#common_member_wechatmp')->insert(array('uid' => $uid, 'openid' => $_GET['openid'], 'status' => 0), false, true); - $url = wsq::userregisterUrl($uid, $_GET['openid'], $_GET['openidsign'], $_GET['referer']); - dheader('location: '.$url); - } -} elseif($ac == 'regcallback' && $_G['uid']) { - list($openid, $openidsign, $qrreferer) = explode("\t", authcode(base64_decode($_GET['auth']), 'DECODE')); - if(!$openid) { - showmessage('wechat:wechat_member_auth_fail'); - } - C::t('#wechat#common_member_wechatmp')->insert(array('uid' => $_G['uid'], 'openid' => $openid, 'status' => 1), false, true); - $url = wsq::userregisterUrl($_G['uid'], $openid, $openidsign, $qrreferer); - dheader('location: '.$url); -} elseif($ac == 'regverify' && $_G['uid']) { - if(!wsq::checksign($_GET)) { - showmessage('wechat:wechat_member_auth_fail'); - } - if($_GET['code']) { - showmessage('wechat:wechat_member_register_faild'); - } - $member = C::t('#wechat#common_member_wechatmp')->fetch($_G['uid']); - if(!$member) { - showmessage('wechat:wechat_member_register_faild'); - } - $groupid = $_G['wechat']['setting']['wechat_newusergroupid'] ? $_G['wechat']['setting']['wechat_newusergroupid'] : $_G['setting']['newusergroupid']; - C::t('common_member')->update($_G['uid'], array('groupid' => $groupid)); - dheader('location: '.($_G['referer'] ? $_GET['referer'] : $_G['siteurl'])); -} elseif($ac == 'wxlogin') { - unset($_GET['mapifrom'], $_GET['charset']); - if(wsq::checksign($_GET)) { - $member = getuserbyuid($_GET['siteuid'], 1); - if($member) { - require_once libfile('function/member'); - setloginstatus($member, 1296000); - } - } -} elseif($ac == 'wxregverify') { - if(!wsq::checksign($_GET)) { - showmessage('wechat:wechat_member_auth_fail'); - } - $member = getuserbyuid($_GET['siteuid'], 1); - if($member) { - require_once libfile('function/member'); - setloginstatus($member, 1296000); - } - if($_G['cookie']['wxnewuser']) { - $groupid = $_G['wechat']['setting']['wechat_newusergroupid'] ? $_G['wechat']['setting']['wechat_newusergroupid'] : $_G['setting']['newusergroupid']; - C::t('common_member')->update($_G['uid'], array('groupid' => $groupid)); - dsetcookie('wxnewuser', '', -1); - } - dheader('location: '.($_GET['referer'] ? $_GET['referer'] : $_G['siteurl'])); -} else { - showmessage('undefined_action'); -} - -function redirectregister($username) { - global $_G; - $defaultusername = substr($username, 0, 15); - loaducenter(); - $user = uc_get_user($defaultusername); - if(!empty($user)) { - $defaultusername = cutstr($defaultusername, 7, '').'_'.random(5); - } - $auth = urlencode(base64_encode(authcode($_GET['openid']."\t".$_GET['openidsign']."\t".$_GET['referer'], 'ENCODE'))); - $referer = urlencode($_G['siteurl'].'plugin.php?id=wechat:login&ac=regcallback&auth='.$auth); - dheader('location: '.$_G['siteurl'].'member.php?mod='.$_G['setting']['regname'].'&referer='.$referer.'&defaultusername='.urlencode($defaultusername)); -} \ No newline at end of file diff --git a/upload/source/plugin/wechat/masssend_setting.inc.php b/upload/source/plugin/wechat/masssend_setting.inc.php deleted file mode 100644 index 82e44e36..00000000 --- a/upload/source/plugin/wechat/masssend_setting.inc.php +++ /dev/null @@ -1,197 +0,0 @@ -' . lang('plugin/wechat', 'mass_create') . ''; - $ppp = 10; - $page = max(1, intval($_GET['page'])); - $start = ($page - 1) * $ppp; - $count = C::t('#wechat#mobile_wechat_masssend')->count(); - $msg = C::t('#wechat#mobile_wechat_masssend')->range($start, $ppp, 'DESC'); - $multi = multi($count, $ppp, $page, ADMINSCRIPT . '?' . PMODURL); - showformheader('plugins&operation=config&identifier=wechat&pmod=masssend_setting&ac=send', 'enctype'); - showtableheader(lang('plugin/wechat', 'mass_list'), ''); - showsubtitle(array(lang('plugin/wechat', 'mass_text_oper'), lang('plugin/wechat', 'mass_text_send'), lang('plugin/wechat', 'mass_type'), lang('plugin/wechat', 'mass_created_at'), 'MSG_ID', lang('plugin/wechat', 'mass_finish_at'), lang('plugin/wechat', 'mass_status'), lang('plugin/wechat', 'mass_totalcount'), lang('plugin/wechat', 'mass_filtercount'), lang('plugin/wechat', 'mass_sendcount'), lang('plugin/wechat', 'mass_errorcount'))); - foreach ($msg as $m) { - showtablerow('', array(), array( - '' . lang('plugin/wechat', 'mass_delete') . ' | ' . lang('plugin/wechat', 'mass_edit') . '', - "", - $m['type'], - dgmdate($m['created_at']), - $m['msg_id'], - $m['res_finish_at'] ? dgmdate($m['res_finish_at']) : '', - $m['res_status'], - $m['res_totalcount'], - $m['res_filtercount'], - $m['res_sentcount'], - $m['res_errorcount'], - )); - } - showtablefooter(); - echo '
    ' . $multi . '
    '; - showsubmit('sendsubmit', lang('plugin/wechat', 'mass_send')); - showformfooter(); - } else if ($ac == 'add') { - $groups = $wechat_client->getAllGroups(); - if (!$groups) { - cpmsg_error('wechat:mass_get_group_failed'); - } - - if (intval($_GET['id']) > 0) { - $mass = C::t('#wechat#mobile_wechat_masssend')->fetch(intval($_GET['id'])); - } - $massmessage = $mass['resource_id'] ? "[resource={$mass['resource_id']}]" : $mass['text']; - showtips(lang('plugin/wechat', 'mass_add_tips')); - WeChatSetting::showResource(); - showformheader('plugins&operation=config&identifier=wechat&pmod=masssend_setting&ac=add', 'enctype'); - showtableheader(); - showtablerow('', '', array(lang('plugin/wechat', 'mass_type'))); - showtablerow('', array('', 'class="td23 td28"', '', 'class="td29"'), array( - "" - . "
    " . lang('plugin/wechat', 'mass_select_media') . "" - )); - $select = array('group_id', array()); - foreach ($groups as $g) { - $select[1][] = array($g['id'], diconv($g['name'], 'UTF-8', CHARSET) . "[{$g['count']}]"); - } - showsetting(lang('plugin/wechat', 'mass_group_id'), $select, '', 'select'); - showsubmit('addsubmit'); - showtablefooter(); - showformfooter(); - } else if ($ac == 'del') { - $massid = intval($_GET['id']); - $msg = C::t('#wechat#mobile_wechat_masssend')->fetch($massid); - if (!$msg) { - cpmsg_error('wechat:mass_not_exist'); - } - if (!$msg['res_finish_at'] && $msg['msg_id']) { - cpmsg('wechat:mass_del_tips_1', PMODURL . '&massid=' . $_GET['id'] . '&delsubmit=yes', 'form'); - } - cpmsg('wechat:mass_del_tips_2', PMODURL . '&massid=' . $_GET['id'] . '&delsubmit=yes', 'form'); - } -} elseif (submitcheck('addsubmit')) { - $group_id = intval($_GET['group_id']); - $massmessage = trim($_GET['massmessage']); - if (empty($massmessage)) { - cpmsg_error('wechat:mass_no_text'); - } - if (preg_match("/^\[resource=(\d+)\]/", $massmessage, $r)) { - $resource_id = $r[1]; - - $res = C::t('#wechat#mobile_wechat_resource')->fetch($resource_id); - if (!$res) { - cpmsg('wechat:mass_no_found'); - } - $news = array(); - if ($res['type'] == 0) { - if ($res['data']['pic']) { - $thumb_media_id = $wechat_client->upload('image', $_G['setting']['attachdir'] . 'common/' . $res['data']['local']); - if (!$thumb_media_id) { - cpmsg_error($wechat_client->error()); - } - $res['data']['thumb_media_id'] = $thumb_media_id; - $res['data']['author'] = ''; - } else { - cpmsg('wechat:mass_no_pic'); - } - array_push($news, $res['data']); - } else if ($res['type'] == 1) { - $news = array(); - foreach (array_keys($res['data']['mergeids']) as $resource_id) { - $res = C::t('#wechat#mobile_wechat_resource')->fetch($resource_id); - if (!$res) { - cpmsg('wechat:mass_no_found'); - } - if ($res['data']['pic']) { - $thumb_media_id = $wechat_client->upload('image', $_G['setting']['attachdir'] . 'common/' . $res['data']['local']); - if (!$thumb_media_id) { - cpmsg_error($wechat_client->error()); - } - $res['data']['thumb_media_id'] = $thumb_media_id; - $res['data']['author'] = ''; - array_push($news, $res['data']); - } else { - cpmsg_error('wechat:mass_no_pic'); - } - } - } - $newsRes = $wechat_client->uploadNews($news); - if (!$newsRes) { - cpmsg_error($wechat_client->error()); - } - C::t('#wechat#mobile_wechat_masssend')->insert(array( - 'type' => 'media', - 'resource_id' => $res['id'], - 'text' => '', - 'group_id' => $group_id, - 'media_id' => $newsRes['media_id'], - 'created_at' => $newsRes['created_at'] - )); - cpmsg('wechat:mass_created_succ', PMODURL, 'succeed'); - } else { - $data = array( - 'resource_id' => 0, - 'type' => 'text', - 'text' => $massmessage, - 'group_id' => $group_id, - 'created_at' => TIMESTAMP - ); - C::t('#wechat#mobile_wechat_masssend')->insert($data); - cpmsg('wechat:mass_created_succ', PMODURL, 'succeed'); - } -} else if (submitcheck('sendsubmit')) { - $massid = intval($_GET['massid']); - if (!$massid) { - cpmsg_error('wechat:mass_not_exist'); - } - $msg = C::t('#wechat#mobile_wechat_masssend')->fetch($massid); - if (!$msg) { - cpmsg_error('wechat:mass_not_exist'); - } - - if ($msg['type'] == 'media' && ($msg['created_at'] + 86400 * 3) < TIMESTAMP) { - cpmsg_error('wechat:mass_send_expire'); - } - - $res = $wechat_client->sendMassMsg($msg); - - if ($res) { - C::t('#wechat#mobile_wechat_masssend')->update($massid, array('msg_id' => $res['msg_id'], 'sent_at' => TIMESTAMP)); - $updatedata = array('receiveEvent::masssendjobfinish' => array('plugin' => 'wechat', 'include' => 'response.class.php', 'class' => 'WSQResponse', 'method' => 'masssendFinish')); - $responsehook = WeChatHook::updateResponse($updatedata); - cpmsg('wechat:mass_sent_succ', PMODURL, 'succeed'); - } else { - cpmsg_error($wechat_client->error()); - } -} else if (submitcheck('delsubmit')) { - $massid = intval($_GET['massid']); - $msg = C::t('#wechat#mobile_wechat_masssend')->fetch($massid); - if (!$msg) { - cpmsg_error('wechat:mass_not_exist'); - } - C::t('#wechat#mobile_wechat_masssend')->delete($massid); - cpmsg('wechat:mass_oper_succ', PMODURL, 'succeed'); -} -?> \ No newline at end of file diff --git a/upload/source/plugin/wechat/menu_setting.inc.php b/upload/source/plugin/wechat/menu_setting.inc.php deleted file mode 100644 index 73a34ec8..00000000 --- a/upload/source/plugin/wechat/menu_setting.inc.php +++ /dev/null @@ -1,201 +0,0 @@ -fetch_all_setting(array('wechatmenu')); -$setting = (array)dunserialize($setting['wechatmenu']); - -require_once DISCUZ_ROOT . './source/plugin/wechat/wechat.lib.class.php'; -require_once DISCUZ_ROOT.'./source/plugin/wechat/setting.class.php'; -WeChatSetting::menu(); - -if(!$_G['wechat']['setting']['wechat_appId'] || !$_G['wechat']['setting']['wechat_appsecret']) { - cpmsg(lang('plugin/wechat', 'wsq_menu_at_error'), '', 'error'); -} - -if(!submitcheck('menusubmit') && !submitcheck('pubsubmit')) { - - $wechat_client = new WeChatClient($_G['wechat']['setting']['wechat_appId'], $_G['wechat']['setting']['wechat_appsecret']); - - if(is_array($_G['setting']['rewritestatus']) && in_array('plugin', $_G['setting']['rewritestatus'])) { - $url = $_G['siteurl'].rewriteoutput('plugin', 1, 'wechat', 'access', '', 'op=access'); - } else { - $url = $_G['siteurl'].'plugin.php?id=wechat:access'; - } - - showtips(lang('plugin/wechat', 'menu_tips', array('url' => $url))); - - showformheader('plugins&operation=config&do='.$pluginid.'&identifier=wechat&pmod=menu_setting'); - showtableheader(); - echo '
    '; - - foreach($setting['button'] as $k => $button) { - $disabled = !empty($button['sub_button']) ? 'disabled' : ''; - showtablerow('', array('', 'class="td23 td28"', '', 'class="td29"'), array( - "", - "", - "
    ", - "", - )); - if(!empty($button['sub_button'])) { - foreach($button['sub_button'] as $sk => $sub_button) { - showtablerow('', array('', 'class="td23 td28"', '', 'class="td29"'), array( - "", - "", - "
    ", - "", - )); - } - } - echo ''; - } - echo ''; - - echo << -var rowtypedata = [ -[[1,''], [1,'', 'td23 td28'], [1, ''], [1, '', 'td29']], -[[1,''], [1,'', 'td23 td28'], [1, '
    '], [1, '', 'td29']], -]; - -EOT; - - showsubmit('menusubmit', lang('plugin/wechat', 'wsq_menu_save'), 'del', ''); - showtablefooter(); - showformfooter(); - -} else { - - if(!empty($_GET['newbutton'])) { - foreach($_GET['newbutton']['name'] as $k => $name) { - $button = array( - 'displayorder' => $_GET['newbutton']['displayorder'][$k], - 'name' => $name, - 'keyurl' => $_GET['newbutton']['keyurl'][$k], - ); - $setting['button'][] = $button; - } - } - - foreach($_GET['button'] as $k => $value) { - if($value['sub_button']) { - foreach($value['sub_button'] as $sk => $v) { - if($v['delete']) { - unset($value['sub_button'][$sk]); - } - } - } - if($value['delete']) { - unset($setting['button'][$k]); - continue; - } - $setting['button'][$k] = $value; - if(!empty($_GET['newsub_button'][$k])) { - foreach($_GET['newsub_button'][$k]['name'] as $sk => $name) { - $sub_button = array( - 'displayorder' => $_GET['newsub_button'][$k]['displayorder'][$sk], - 'name' => $name, - 'keyurl' => $_GET['newsub_button'][$k]['keyurl'][$sk], - ); - $setting['button'][$k]['sub_button'][] = $sub_button; - } - } - if(count($setting['button'][$k]['sub_button']) > 7) { - cpmsg(lang('plugin/wechat', 'wsq_menu_sub_button_max'), '', 'error'); - } - usort($setting['button'][$k]['sub_button'], 'buttoncmp'); - } - - if(count($setting['button']) > 3) { - cpmsg(lang('plugin/wechat', 'wsq_menu_button_max'), '', 'error'); - } - - usort($setting['button'], 'buttoncmp'); - - $settings = array('wechatmenu' => serialize($setting)); - C::t('common_setting')->update_batch($settings); - updatecache('setting'); - - if(submitcheck('pubsubmit')) { - if(!$setting['button']) { - cpmsg(lang('plugin/wechat', 'wsq_menu_button_pub_error'), '', 'error'); - } - $pubmenu = array('button' => array()); - foreach($setting['button'] as $button) { - if(!$button['sub_button']) { - if(!$button['name']) { - cpmsg(lang('plugin/wechat', 'wsq_menu_name_empty'), '', 'error'); - } - if(!$button['keyurl']) { - cpmsg(lang('plugin/wechat', 'wsq_menu_keyurl_empty'), '', 'error'); - } - $parse = parse_url($button['keyurl']); - $item = array( - 'type' => $parse['host'] ? 'view' : 'click', - 'name' => convertname($button['name']), - $parse['host'] ? 'url' : 'key' => $button['keyurl'] - ); - $pubmenu['button'][] = $item; - } else { - if(!$button['name']) { - cpmsg(lang('plugin/wechat', 'wsq_menu_name_empty'), '', 'error'); - } - $sub_buttons = array(); - foreach($button['sub_button'] as $sub_button) { - if(!$sub_button['name']) { - cpmsg(lang('plugin/wechat', 'wsq_menu_name_empty'), '', 'error'); - } - if(!$sub_button['keyurl']) { - cpmsg(lang('plugin/wechat', 'wsq_menu_keyurl_empty'), '', 'error'); - } - $parse = parse_url($sub_button['keyurl']); - $item = array( - 'type' => $parse['host'] ? 'view' : 'click', - 'name' => convertname($sub_button['name']), - $parse['host'] ? 'url' : 'key' => $sub_button['keyurl'] - ); - $sub_buttons[] = $item; - } - $item = array( - 'name' => convertname($button['name']), - 'sub_button' => $sub_buttons - ); - $pubmenu['button'][] = $item; - } - } - - require_once DISCUZ_ROOT . './source/plugin/wechat/wechat.lib.class.php'; - - $_G['wechat']['setting'] = dunserialize($_G['setting']['mobilewechat']); - - $wechat_client = new WeChatClient($_G['wechat']['setting']['wechat_appId'], $_G['wechat']['setting']['wechat_appsecret']); - - if($wechat_client->setMenu($pubmenu)) { - cpmsg(lang('plugin/wechat', 'wsq_menu_pub_succeed'), 'action=plugins&operation=config&do='.$pluginid.'&identifier=wechat&pmod=menu_setting', 'succeed'); - } else { - cpmsg(lang('plugin/wechat', 'wsq_menu_pub_error', array('errno' => $wechat_client->error())), '', 'error'); - } - } else { - cpmsg('setting_update_succeed', 'action=plugins&operation=config&do='.$pluginid.'&identifier=wechat&pmod=menu_setting', 'succeed'); - } - -} - -function convertname($str) { - return urlencode(diconv($str, CHARSET, 'UTF-8')); -} - -function buttoncmp($a, $b) { - return $a['displayorder'] > $b['displayorder'] ? 1 : -1; -} - -?> \ No newline at end of file diff --git a/upload/source/plugin/wechat/qrcode.inc.php b/upload/source/plugin/wechat/qrcode.inc.php deleted file mode 100644 index 9f5d9f49..00000000 --- a/upload/source/plugin/wechat/qrcode.inc.php +++ /dev/null @@ -1,95 +0,0 @@ -fetch_thread($tid)) { - exit; - } - dmkdir($dir); - require_once DISCUZ_ROOT.'source/plugin/mobile/qrcode.class.php'; - QRcode::png($url.'viewthread&tid='.$_GET['tid'].'&source=pcscan', $file, QR_ECLEVEL_Q, $qrsize); - } - dheader('Content-Disposition: inline; filename=qrcode_t'.$tid.'.jpg'); - dheader('Content-Type: image/pjpeg'); - @readfile($file); - } else { - require_once DISCUZ_ROOT.'source/plugin/mobile/qrcode.class.php'; - QRcode::png($url.'showactivity&tid='.$_GET['tid'].'&viewpid='.$_GET['pid'].'&source=pcscan', false, QR_ECLEVEL_Q, $qrsize); - } - } elseif($_GET['fid']) { - $qrsize = !empty($_GET['qrsize']) ? $_GET['qrsize'] : 2; - $fid = dintval($_GET['fid']); - $file = $dir.'qr_'.$fid.'.jpg'; - if(!file_exists($file) || !filesize($file)) { - if(!C::t('forum_forum')->fetch($fid)) { - exit; - } - dmkdir($dir); - require_once DISCUZ_ROOT.'source/plugin/mobile/qrcode.class.php'; - QRcode::png($url.'index&fid='.$_GET['fid'].'&source=pcscan', $file, QR_ECLEVEL_Q, $qrsize); - } - dheader('Content-Disposition: inline; filename=qrcode_'.$fid.'.jpg'); - dheader('Content-Type: image/pjpeg'); - @readfile($file); - } else { - $qrsize = !empty($_GET['qrsize']) ? $_GET['qrsize'] : 2; - $file = $dir.'qr_index.jpg'; - if(!file_exists($file) || !filesize($file)) { - dmkdir($dir); - require_once DISCUZ_ROOT.'source/plugin/mobile/qrcode.class.php'; - QRcode::png($url.'index&source=pcscan', $file, QR_ECLEVEL_Q, $qrsize); - } - dheader('Content-Disposition: inline; filename=qrcode_index.jpg'); - dheader('Content-Type: image/pjpeg'); - @readfile($file); - } - exit; -} - -require_once DISCUZ_ROOT . './source/plugin/wechat/wechat.lib.class.php'; -$wechat_client = new WeChatClient($_G['wechat']['setting']['wechat_appId'], $_G['wechat']['setting']['wechat_appsecret']); -list($ticket, $code) = explode("\t", authcode($_G['cookie']['wechat_ticket'], 'DECODE')); - -if($ticket) { - $file = $dir.md5($ticket).'_'.$code.'.jpg'; - if(!file_exists($file) || !filesize($file)) { - dmkdir($dir); - $qrcode = dfsockopen($wechat_client->getQrcodeImgUrlByTicket($ticket)); - $fp = @fopen($file, 'wb'); - @fwrite($fp, $qrcode); - @fclose($fp); - } - dheader('Content-Disposition: inline; filename=qrcode.jpg'); - dheader('Content-Type: image/pjpeg'); - @readfile($file); -} \ No newline at end of file diff --git a/upload/source/plugin/wechat/resource_setting.inc.php b/upload/source/plugin/wechat/resource_setting.inc.php deleted file mode 100644 index 8bb90904..00000000 --- a/upload/source/plugin/wechat/resource_setting.inc.php +++ /dev/null @@ -1,378 +0,0 @@ - lang('plugin/wechat', 'resource_type_all'), 0 => lang('plugin/wechat', 'resource_type_s'), 1 => lang('plugin/wechat', 'resource_type_m')); - -$ac = !empty($_GET['ac']) ? $_GET['ac'] : ''; -$filter = isset($_GET['filter']) ? intval($_GET['filter']) : -1; - -if(!$_POST) { - - if(!$ac) { - - $ppp = 9; - $page = max(1, $_GET['page']); - $start = ($page - 1) * $ppp; - $count = C::t('#wechat#mobile_wechat_resource')->count_by_type($filter >= 0 ? $filter : null); - $resource = C::t('#wechat#mobile_wechat_resource')->fetch_by_type($filter >= 0 ? $filter : null, $start, $ppp); - $multi = multi($count, $ppp, $page, ADMINSCRIPT.'?'.RSELF.'&filter='.$filter); - - wxbox_style(); -echo << -var cookiepre = '{$_G['config']['cookie']['cookiepre']}', cookiedomain = '{$_G['config']['cookie']['cookiedomain']}', cookiepath = '{$_G['config']['cookie']['cookiepath']}'; -function merge(id, type) { - mids = getcookie('wechat_rids'); - var re = new RegExp('_' + id + '_', "g"); - mids = mids.replace(re, ''); - if(type) { - mids += '_' + id + '_'; - } - setcookie('wechat_rids', mids); - showmerge(); -} -function clearmerge() { - setcookie('wechat_rids', '', -1); - location.href = location.href; -} -function showmerge() { - $('mergebtn').style.display = getcookie('wechat_rids') ? '' : 'none'; -} - -EOF; - - showtableheader(); - $wechat_rids = explode('_', $_G['cookie']['wechat_rids']); - - foreach($select as $k => &$row) { - $row = ''; - } - $select = ' '; - foreach($resource as $row) { - $row = dhtmlspecialchars($row); - echo '
    '.$lang['display_order'].''.lang('plugin/wechat', 'wsq_menu_name').''.lang('plugin/wechat', 'wsq_menu_keyurl').'
    ' - . '' - . (!$row['type'] - ? '' - . '' - . '' - : '' - . '' - . '') - . '
    '.$row['name'].'
    ' - . '
    '.$row['data']['title'].'
    '.($row['data']['pic'] ? '' : '').'
    '.$row['data']['desc'].'
    '.lang('plugin/wechat', 'resource_type_m').'
    '.lang('plugin/wechat', 'resource_merge_count', array('count' => count($row['data']['mergeids']))).'
    '.lang('plugin/wechat', 'resource_view').'
    '; - } - showtablefooter(); - echo '
    '.$multi.'
    '; - echo $select.''.lang('plugin/wechat', 'resource_add').'  ' - . ''; - - } elseif($ac == 'add') { - - showformheader('plugins&operation=config&identifier=wechat&pmod=resource_setting&ac=add', 'enctype'); - showtableheader(); - showsetting(lang('plugin/wechat', 'resource_name'), 'name', '', 'text'); - showsetting(lang('plugin/wechat', 'resource_title'), 'data[title]', '', 'text'); - showsetting(lang('plugin/wechat', 'resource_pic'), 'pic', '', 'filetext'); - showsetting(lang('plugin/wechat', 'resource_desc'), 'data[desc]', '', 'textarea'); - showsetting(lang('plugin/wechat', 'resource_content'), 'data[content]', '', 'textarea'); - showsetting(lang('plugin/wechat', 'resource_url'), 'data[url]', '', 'text'); - showsubmit('addsubmit'); - showtablefooter(); - showformfooter(); - - } elseif($ac == 'addmerge') { - - $wechat_rids = explode('_', $_G['cookie']['wechat_rids']); - $resource = C::t('#wechat#mobile_wechat_resource')->fetch_all($wechat_rids); - - if($_GET['id']) { - $aresource = C::t('#wechat#mobile_wechat_resource')->fetch($_GET['id']); - foreach($resource as $row) { - if(!$aresource['data']['mergeids'][$row['id']]) { - $aresource['data']['mergeids'][$row['id']] = 0; - } - } - asort($aresource['data']['mergeids']); - $data = array( - 'data' => $aresource['data'], - ); - C::t('#wechat#mobile_wechat_resource')->update($_GET['id'], $data); - - dsetcookie('wechat_rids', '', -1); - dheader('location: '.ADMINSCRIPT.'?'.RSELF.'edit&id='.$_GET['id']); - } - - showformheader('plugins&operation=config&identifier=wechat&pmod=resource_setting&ac=add'); - showtableheader(); - showsetting(lang('plugin/wechat', 'resource_name'), 'name', '', 'text'); - showtablefooter(); - showtableheader(); - echo ''.lang('plugin/wechat', 'resource_name').''.lang('plugin/wechat', 'resource_order').''; - $i = 0; - foreach($resource as $row) { - echo ''.$row['name'].''; - } - showsubmit('addmergesubmit'); - showtablefooter(); - showformfooter(); - - } elseif($ac == 'edit') { - - $resource = C::t('#wechat#mobile_wechat_resource')->fetch($_GET['id']); - if(!$resource) { - cpmsg(lang('plugin/wechat', 'resource_msg_nofound'), '', 'error'); - } - - if(!$resource['type']) { - - showformheader('plugins&operation=config&identifier=wechat&pmod=resource_setting&ac=edit&id='.$_GET['id'], 'enctype'); - showtableheader(); - showsetting(lang('plugin/wechat', 'resource_name'), 'name', $resource['name'], 'text'); - showsetting(lang('plugin/wechat', 'resource_title'), 'data[title]', $resource['data']['title'], 'text'); - showsetting(lang('plugin/wechat', 'resource_pic'), 'pic', $resource['data']['pic'], 'filetext'); - showsetting(lang('plugin/wechat', 'resource_desc'), 'data[desc]', $resource['data']['desc'], 'textarea'); - showsetting(lang('plugin/wechat', 'resource_content'), 'data[content]', $resource['data']['content'], 'textarea'); - showsetting(lang('plugin/wechat', 'resource_url'), 'data[url]', $resource['data']['url'], 'text'); - showsubmit('editsubmit'); - showtablefooter(); - showformfooter(); - - } else { - - $mergeids = array_keys($resource['data']['mergeids']); - if(!$mergeids) { - cpmsg(lang('plugin/wechat', 'resource_msg_nofound'), '', 'error'); - } - $sresource = C::t('#wechat#mobile_wechat_resource')->fetch_all($mergeids); - - showformheader('plugins&operation=config&identifier=wechat&pmod=resource_setting&ac=edit&id='.$_GET['id']); - showtableheader(); - showsetting(lang('plugin/wechat', 'resource_name'), 'name', $resource['name'], 'text'); - showtablefooter(); - showtableheader(); - - $i = 0; - wxbox_style(); - foreach($resource['data']['mergeids'] as $id => $order) { - $row = dhtmlspecialchars($sresource[$id]); - echo '' - . '' - . '' - . '' - . '' - . '
    '.$row['name'].'
    ' - . '
    ' - . '' - . ''.lang('plugin/wechat', 'resource_edit').' ' - . ''.lang('plugin/wechat', 'resource_remove').' ' - . lang('plugin/wechat', 'resource_order').'' - . '' - . dgmdate($row['dateline']).'
    '.$row['data']['title'].'
    '.($row['data']['pic'] ? '' : '').'
    '.$row['data']['desc'].'
    '; - } - showtablefooter(); - showtableheader(); - showsubmit('editmergesubmit'); - showtablefooter(); - showformfooter(); - - } - - } elseif($ac == 'delete') { - cpmsg(lang('plugin/wechat', 'resource_msg_del'), RSELF.'&id='.$_GET['id'].'&delsubmit=yes', 'form'); - } elseif($ac == 'removemerge') { - cpmsg(lang('plugin/wechat', 'resource_msg_remove'), RSELF.'&id='.$_GET['id'].'&fromid='.$_GET['fromid'].'&removesubmit=yes', 'form'); - } elseif($ac == 'select') { - include template('common/header_ajax'); - - $ppp = 6; - $page = max(1, $_GET['page']); - $start = ($page - 1) * $ppp; - $count = C::t('#wechat#mobile_wechat_resource')->count_by_type($filter >= 0 ? $filter : null); - $resource = C::t('#wechat#mobile_wechat_resource')->fetch_by_type($filter >= 0 ? $filter : null, $start, $ppp); - $multi = multi($count, $ppp, $page, ADMINSCRIPT.'?action=plugins&operation=config&identifier=wechat&pmod=resource_setting&ac=select&filter='.$filter); - wxbox_style(); - - foreach($select as $k => &$row) { - $row = ''; - } - $select = ' '; - echo '
    '.$multi.'
    '.$select.'
    '; - - showtableheader(); - $wechat_rids = explode('_', $_G['cookie']['wechat_rids']); - foreach($resource as $row) { - $row = dhtmlspecialchars($row); - echo '' - . '' - . (!$row['type'] - ? '' - . '' - : '' - . '') - . '
    '.$row['name'].'
    '.$row['data']['title'].'
    '.($row['data']['pic'] ? '' : '').'
    '.lang('plugin/wechat', 'resource_type_m').'
    '.lang('plugin/wechat', 'resource_merge_count', array('count' => count($row['data']['mergeids']))).'
    '.lang('plugin/wechat', 'resource_view').'
    '; - } - showtablefooter(); - - include template('common/footer_ajax'); - } - -} elseif(submitcheck('addsubmit')) { - - if(dstrlen($_GET['data']['desc'], CHARSET) > 120) { - cpmsg(lang('plugin/wechat', 'resource_msg_desc_toolong'), '', 'error'); - } - if($_FILES['pic']['tmp_name']) { - $upload = new discuz_upload(); - if(!getimagesize($_FILES['pic']['tmp_name']) || !$upload->init($_FILES['pic'], 'common', random(3, 1), random(8)) || !$upload->save()) { - cpmsg($upload->errormessage(), '', 'error'); - } - $_GET['data']['pic'] = (preg_match('/^https?:/', $_G['setting']['attachurl']) ? '' : $_G['siteurl']).$_G['setting']['attachurl'].'common/'.$upload->attach['attachment']; - $_GET['data']['local'] = $upload->attach['attachment']; - } else { - $_GET['data']['pic'] = $_GET['pic']; - } - $data = array( - 'name' => $_GET['name'], - 'data' => $_GET['data'], - ); - C::t('#wechat#mobile_wechat_resource')->insert($data); - - cpmsg('setting_update_succeed', RSELF, 'succeed'); - -} elseif(submitcheck('editsubmit')) { - - $resource = C::t('#wechat#mobile_wechat_resource')->fetch($_GET['id']); - if(!$resource) { - cpmsg(lang('plugin/wechat', 'resource_msg_nofound'), '', 'error'); - } - - if(dstrlen($_GET['data']['desc'], CHARSET) > 120) { - cpmsg(lang('plugin/wechat', 'resource_msg_desc_toolong'), '', 'error'); - } - if($_FILES['pic']['tmp_name']) { - $upload = new discuz_upload(); - if(!getimagesize($_FILES['pic']['tmp_name']) || !$upload->init($_FILES['pic'], 'common', random(3, 1), random(8)) || !$upload->save()) { - cpmsg($upload->errormessage(), '', 'error'); - } - $_GET['data']['pic'] = (preg_match('/^https?:/', $_G['setting']['attachurl']) ? '' : $_G['siteurl']).$_G['setting']['attachurl'].'common/'.$upload->attach['attachment']; - $_GET['data']['local'] = $upload->attach['attachment']; - @unlink($_G['setting']['attachdir'].'common/'.$resource['data']['local']); - } else { - $_GET['data']['pic'] = $_GET['pic']; - } - $data = array( - 'name' => $_GET['name'], - 'data' => $_GET['data'], - ); - C::t('#wechat#mobile_wechat_resource')->update($_GET['id'], $data); - - cpmsg('setting_update_succeed', RSELF, 'succeed'); - -} elseif(submitcheck('delsubmit')) { - - $resource = C::t('#wechat#mobile_wechat_resource')->fetch($_GET['id']); - if(!$resource) { - cpmsg(lang('plugin/wechat', 'resource_msg_nofound'), '', 'error'); - } - - if($resource['data']['local']) { - @unlink($_G['setting']['attachdir'].'common/'.$resource['data']['local']); - } - C::t('#wechat#mobile_wechat_resource')->delete($_GET['id']); - - cpmsg('setting_update_succeed', RSELF, 'succeed'); - -} elseif(submitcheck('addmergesubmit')) { - - asort($_GET['data']['mergeids']); - $data = array( - 'name' => $_GET['name'], - 'type' => 1, - 'data' => $_GET['data'], - ); - C::t('#wechat#mobile_wechat_resource')->insert($data); - dsetcookie('wechat_rids', '', -1); - - cpmsg('setting_update_succeed', RSELF, 'succeed'); - -} elseif(submitcheck('editmergesubmit')) { - - asort($_GET['data']['mergeids']); - $data = array( - 'name' => $_GET['name'], - 'data' => $_GET['data'], - ); - C::t('#wechat#mobile_wechat_resource')->update($_GET['id'], $data); - dsetcookie('wechat_rids', '', -1); - - cpmsg('setting_update_succeed', RSELF.'edit&id='.$_GET['id'], 'succeed'); - -} elseif(submitcheck('removesubmit')) { - - $resource = C::t('#wechat#mobile_wechat_resource')->fetch($_GET['fromid']); - if(!$resource) { - cpmsg(lang('plugin/wechat', 'resource_msg_nofound'), '', 'error'); - } - - unset($resource['data']['mergeids'][$_GET['id']]); - $data = array( - 'data' => $resource['data'], - ); - C::t('#wechat#mobile_wechat_resource')->update($_GET['fromid'], $data); - - cpmsg('setting_update_succeed', RSELF.'edit&id='.$_GET['fromid'], 'succeed'); - -} - -function wxbox_style() { -echo << -.wxbox { table-layout: fixed; margin:0 5px 10px 0;width:300px;height:300px; } -.wxbox td { padding:0 2px;border: none; } -.wxbox th { height: 50px; white-space: nowrap; } -.wxbox th div { font-weight:normal; } -.wxbox th div span { float:right; } -.wxbox th div .txt { width: 40px; } -.wxbox .l1 { height: 30px; line-height: 30px;overflow:hidden;text-overflow:ellipsis;white-space: nowrap; } -.wxbox .l2 { text-align:center; } -.wxbox .l2 img { width: 290px; } -.wxbox .l2 div { width: 290px;height: 160px; display:block; overflow:hidden; } -.wxbox .l3 { height: 80px; vertical-align:top;line-height:25px; } -.wxbox.hover { height:220px; } -.wxbox.hover th { height:20px; } - -EOF; - -} - -?> \ No newline at end of file diff --git a/upload/source/plugin/wechat/resourcepush.inc.php b/upload/source/plugin/wechat/resourcepush.inc.php deleted file mode 100644 index f5733f6a..00000000 --- a/upload/source/plugin/wechat/resourcepush.inc.php +++ /dev/null @@ -1,50 +0,0 @@ -fetch_threadpost_by_tid_invisible($_GET['tid']); -if($thread['cover']) { - $picurl = getthreadcover($thread['tid'], $thread['cover']); -} else { - $attach = C::t('forum_attachment_n')->fetch_all_by_id('tid:'.$_GET['tid'], 'pid', array($post['pid']), '', true); - $picurl = ''; - if($attach) { - $attach = array_shift($attach); - $picurl = ($attach['remote'] ? $_G['setting']['ftp']['attachurl'] : $_G['setting']['attachurl']).'forum/'.$attach['attachment']; - } -} - -$data = array( - 'name' => lang('plugin/wechat', 'resource_thread_push').': '.$thread['subject'], - 'data' => array( - 'title' => $thread['subject'], - 'pic' => $picurl ? (preg_match('/^https?:/', $picurl) ? '' : $_G['siteurl']).$picurl : '', - 'desc' => threadmessagecutstr($thread, $post['message'], 0, 120), - 'content' => nl2br(threadmessagecutstr($thread, $post['message'])), - 'url' => $_G['siteurl'].'forum.php?mod=viewthread&tid='.$_GET['tid'], - ), -); -C::t('#wechat#mobile_wechat_resource')->insert($data); - -showmessage('wechat:resource_msg_pushed', '', array(), array('alert' => 'right')); \ No newline at end of file diff --git a/upload/source/plugin/wechat/response.class.php b/upload/source/plugin/wechat/response.class.php deleted file mode 100644 index 8163496b..00000000 --- a/upload/source/plugin/wechat/response.class.php +++ /dev/null @@ -1,244 +0,0 @@ -fetch_by_code($data['content']); - if(!$authcode || $authcode['status']) { - if($isloginkeyword) { - wsq::report('loginclick'); - self::_show('access', $data['from']); - } - } else { - wsq::report('sendnum'); - self::_show('sendnum', $data['from']."\t".$authcode['sid'], 60); - } - } - - public static function click($param) { - list($data) = $param; - self::_init(); - global $_G; - if(!$_G['wechat']['setting']['wsq_allow']) { - return; - } - if($data['key'] == self::$keyword) { - wsq::report('loginclick'); - self::_show('access', $data['from']); - } else { - self::_custom('text', $data['key']); - } - } - - public static function custom($param) { - self::_init(); - global $_G; - if(!$_G['wechat']['setting']['wsq_allow']) { - return; - } - self::_custom('subscribe'); - } - - public static function subscribe($param) { - list($data) = $param; - self::_init(); - global $_G; - if(!$_G['wechat']['setting']['wsq_allow']) { - return; - } - if($data['key']) { - self::scan($param); - } else { - self::_show('access', $data['from']); - } - } - - public static function scan($param) { - list($data) = $param; - self::_init(); - global $_G; - if(!$_G['wechat']['setting']['wsq_allow']) { - return; - } - $authcode = C::t('#wechat#mobile_wechat_authcode')->fetch_by_code($data['key']); - if(!$authcode || $authcode['status']) { - } else { - if($authcode['uid']) { - $member = getuserbyuid($authcode['uid'], 1); - if(in_array($_G['adminid'], array(0, -1)) && !$_G['wechat']['setting']['wechat_confirmtype']) { - C::t('#wechat#mobile_wechat_authcode')->update($authcode['sid'], array('uid' => $member['uid'], 'status' => 1)); - $authcode['sid'] = ''; - } - } else { - $wechatuser = C::t('#wechat#common_member_wechat')->fetch_by_openid($data['from']); - if($wechatuser) { - $member = getuserbyuid($wechatuser['uid'], 1); - if(in_array($_G['adminid'], array(0, -1)) && !$_G['wechat']['setting']['wechat_confirmtype']) { - C::t('#wechat#mobile_wechat_authcode')->update($authcode['sid'], array('uid' => $member['uid'], 'status' => 1)); - $authcode['sid'] = ''; - } - } elseif($_G['wechat']['setting']['wechat_allowregister'] && $_G['wechat']['setting']['wechat_allowfastregister'] && $_G['wechat']['setting']['wechat_mtype'] == 2) { - require_once DISCUZ_ROOT . './source/plugin/wechat/wechat.class.php'; - require_once libfile('function/member'); - $uid = WeChat::register(WeChat::getnewname($data['from']), 1); - if($uid) { - WeChatHook::bindOpenId($uid, $data['from'], 1); - C::t('#wechat#mobile_wechat_authcode')->update($authcode['sid'], array('uid' => $uid, 'status' => 1)); - } - wsq::report('register'); - $authcode['sid'] = ''; - } - } - wsq::report('scanqr'); - self::_show('scan', $data['from']."\t".$authcode['sid']); - } - } - - public static function redirect($type) { - self::_init(); - global $_G; - if(!$_G['wechat']['setting']['wsq_allow']) { - return; - } - if($_G['wechat']['setting']['wsq_siteid'] && !defined('IN_MOBILE_API')) { - $_G['wechat']['setting']['wsq_wapdefault'] = !self::_checkrobot() ? $_G['wechat']['setting']['wsq_wapdefault'] : false; - $in_wechat = $_G['wechat']['setting']['wsq_wapdefault'] ? true : strpos($_SERVER['HTTP_USER_AGENT'], 'MicroMessenger') !== false; - $fromwap = $_G['wechat']['setting']['wsq_wapdefault'] && strpos($_SERVER['HTTP_USER_AGENT'], 'MicroMessenger') === false; - $url = wsq::$WSQ_DOMAIN.'siteid='.$_G['wechat']['setting']['wsq_siteid'].($fromwap ? '&source=wap' : '').'&c=index&a='; - if($type) { - $modid = $_G['basescript'].'::'.CURMODULE; - if($in_wechat) { - if(($modid == 'forum::viewthread' || $modid == 'group::viewthread') && !empty($_GET['tid'])) { - dheader('location: '.$url.'viewthread&tid='.$_GET['tid']); - } elseif(($modid == 'forum::forumdisplay' || $modid == 'group::forumdisplay') && !empty($_GET['fid'])) { - dheader('location: '.$url.'index&fid='.$_GET['fid']); - } elseif($modid == 'forum::index') { - dheader('location: '.$url.'index'); - } - } - } else { - if(isset($_GET['referer'])) { - return $_GET['referer']; - } elseif(isset($_GET['pluginid'])) { - return $url.'plugin&pluginid='.urlencode($_GET['pluginid']).'¶m='.urlencode($_GET['param']); - } else { - return $url.'index'; - } - } - } - - } - - private static function _show($messagekey, $key, $expire = 0) { - global $_G; - if(!$_G['wechat']['setting']['wsq_allow']) { - return; - } - $expire = $expire ? $expire : self::$expire; - $key = authcode($key, 'ENCODE', $_G['config']['security']['authkey'], $expire); - $url = $_G['siteurl'] . 'plugin.php?mobile=2&id=wechat&op='.$messagekey.'&key=' . urlencode(base64_encode($key)); - $param = array('bbname' => $_G['wechat']['setting']['wsq_sitename'], 'date' => dgmdate(TIMESTAMP + $expire, 'Y-m-d')); - loadcache('wechat_response'); - $desc = !empty($_G['cache']['wechat_response'][$messagekey]) ? $_G['cache']['wechat_response'][$messagekey] : 'wechat_response_text_' . $messagekey; - $list = array(array( - 'title' => lang('plugin/wechat', 'wechat_response_text_title', $param), - 'desc' => lang('plugin/wechat', $desc, $param), - 'url' => $url - )); - echo WeChatServer::getXml4RichMsgByArray($list); - exit; - } - - private static function _custom($type, $keyword = '') { - global $_G; - loadcache('wechat_response'); - $response = & $_G['cache']['wechat_response']; - $query = $type == 'text' ? $response['query']['text'][$keyword] : $response['query']['subscribe']; - if($query) { - if($query == self::$keyword) { - return 1; - } - if(preg_match("/^\[resource=(\d+)\]/", $query, $r)) { - $resource = C::t('#wechat#mobile_wechat_resource')->fetch($r[1]); - if(!$resource['type']) { - $list = array(array( - 'title' => $resource['data']['title'], - 'desc' => $resource['data']['desc'], - 'pic' => $resource['data']['pic'], - 'url' => $resource['data']['url'], - )); - } else { - $mergeids = array_keys($resource['data']['mergeids']); - $sresource = C::t('#wechat#mobile_wechat_resource')->fetch_all($mergeids); - $list = array(); - foreach($resource['data']['mergeids'] as $id => $order) { - $list[] = array( - 'title' => $sresource[$id]['data']['title'], - 'desc' => $sresource[$id]['data']['desc'], - 'pic' => $sresource[$id]['data']['pic'], - 'url' => $sresource[$id]['data']['url'], - ); - } - } - echo WeChatServer::getXml4RichMsgByArray($list); - exit; - } else { - echo WeChatServer::getXml4Txt($query); - } - exit; - } - return 0; - } - - public static function masssendFinish($param) { - list($data) = $param; - if(!$data['msg_id']) { - exit; - } - $updatedata = array( - 'res_status' => $data['status'], - 'res_totalcount' => $data['totalcount'], - 'res_filtercount' => $data['filtercount'], - 'res_sentcount' => $data['sentcount'], - 'res_errorcount' => $data['errorcount'], - 'res_finish_at' => $data['time'] - ); - DB::update('mobile_wechat_masssend', $updatedata, "msg_id='{$data['msg_id']}'"); - } - - private static function _checkrobot() { - return IS_ROBOT || strpos($_SERVER['HTTP_USER_AGENT'], 'spi_der') !== false; - } - - private static function _init() { - global $_G; - if(!$_G['wechat']['setting']) { - $_G['wechat']['setting'] = dunserialize($_G['setting']['mobilewechat']); - } - } - -} \ No newline at end of file diff --git a/upload/source/plugin/wechat/response_setting.inc.php b/upload/source/plugin/wechat/response_setting.inc.php deleted file mode 100644 index 0dd8b313..00000000 --- a/upload/source/plugin/wechat/response_setting.inc.php +++ /dev/null @@ -1,188 +0,0 @@ - $url))); - - $responsehook = WeChatHook::getResponse(); - - if($_GET['subscribe'] == 'custom') { - $response['subscribeback'] = $responsehook['receiveEvent::subscribe']; - $updatedata = array('receiveEvent::subscribe' => array('plugin' => 'wechat', 'include' => 'response.class.php', 'class' => 'WSQResponse', 'method' => 'custom')); - $responsehook = WeChatHook::updateResponse($updatedata); - savecache('wechat_response', $response); - cpmsg(lang('plugin/wechat', 'response_subscribe_custom'), 'action=plugins&operation=config&do='.$pluginid.'&identifier=wechat&pmod=response_setting', 'succeed'); - } elseif($_GET['subscribe'] == 'restore') { - $response['subscribeback'] = $response['subscribeback'] ? $response['subscribeback'] : array('plugin' => 'wechat', 'include' => 'response.class.php', 'class' => 'WSQResponse', 'method' => 'subscribe'); - $updatedata = array('receiveEvent::subscribe' => $response['subscribeback']); - $responsehook = WeChatHook::updateResponse($updatedata); - savecache('wechat_response', $response); - cpmsg(lang('plugin/wechat', 'response_subscribe_plugin'), 'action=plugins&operation=config&do='.$pluginid.'&identifier=wechat&pmod=response_setting', 'succeed'); - } - - if($_GET['text'] == 'custom') { - $response['textback'] = $responsehook['receiveMsg::text']; - $updatedata = array('receiveMsg::text' => array('plugin' => 'wechat', 'include' => 'response.class.php', 'class' => 'WSQResponse', 'method' => 'text')); - $responsehook = WeChatHook::updateResponse($updatedata); - savecache('wechat_response', $response); - cpmsg(lang('plugin/wechat', 'response_message_custom'), 'action=plugins&operation=config&do='.$pluginid.'&identifier=wechat&pmod=response_setting', 'succeed'); - } elseif($_GET['text'] == 'restore') { - $response['textback'] = $response['textback'] ? $response['textback'] : array('plugin' => 'wechat', 'include' => 'response.class.php', 'class' => 'WSQResponse', 'method' => 'text'); - $updatedata = array('receiveMsg::text' => $response['textback']); - $responsehook = WeChatHook::updateResponse($updatedata); - savecache('wechat_response', $response); - cpmsg(lang('plugin/wechat', 'response_message_plugin'), 'action=plugins&operation=config&do='.$pluginid.'&identifier=wechat&pmod=response_setting', 'succeed'); - } - - WeChatSetting::showResource(); - - showformheader('plugins&operation=config&do='.$pluginid.'&identifier=wechat&pmod=response_setting'); - showtableheader(); - echo ''.lang('plugin/wechat', 'response_keyword').''.lang('plugin/wechat', 'response_content').''; - - if($responsehook['receiveEvent::subscribe']['plugin'] == 'wechat' && - $responsehook['receiveEvent::subscribe']['class'] == 'WSQResponse' && - $responsehook['receiveEvent::subscribe']['method'] == 'custom') { - showtablerow('class="header"', array('', 'class="td23 td28"', '', 'class="td29"'), array( - "", - lang('plugin/wechat', 'response_subscribe'), - "

    ".lang('plugin/wechat', 'response_custom')." ".($response['subscribeback'] ? "[".lang('plugin/wechat', 'response_switch_plugin_mode', array('plugin' => $response['subscribeback']['plugin']))."]

    " : '') - )); - showtablerow('', array('', 'class="td23 td28"', '', 'class="td29"'), array( - "", - "".lang('plugin/wechat', 'subscribe')."", - "" - ."
    ".lang('plugin/wechat', 'resource_select')."" - )); - } else { - showtablerow('class="header"', array('', 'class="td23 td28"', '', 'class="td29"'), array( - "", - lang('plugin/wechat', 'response_subscribe'), - "

    ".lang('plugin/wechat', 'response_plugin_mode', array('plugin' => $responsehook['receiveEvent::subscribe']['plugin']))." [".lang('plugin/wechat', 'response_switch_custom_mode')."]

    " - )); - } - - showtablerow('class="header"', array('', 'class="td23 td28"', '', 'class="td29"'), array( - "", - lang('plugin/wechat', 'response_access'), - "

    ".lang('plugin/wechat', 'response_access_comment') - )); - showtablerow('', array('', 'class="td23 td28"', '', 'class="td29"'), array( - "", - "".lang('plugin/wechat', 'access')."", - "" - ."
    ".lang('plugin/wechat', 'resource_select')."" - )); - - showtablerow('class="header"', array('', 'class="td23 td28"', '', 'class="td29"'), array( - "", - lang('plugin/wechat', 'response_scan'), - "

    ".lang('plugin/wechat', 'response_scan_comment') - )); - showtablerow('', array('', 'class="td23 td28"', '', 'class="td29"'), array( - "", - "".lang('plugin/wechat', 'scan')."", - "" - ."
    ".lang('plugin/wechat', 'resource_select')."" - )); - - if($responsehook['receiveMsg::text']['plugin'] == 'wechat' && - $responsehook['receiveMsg::text']['class'] == 'WSQResponse' && - $responsehook['receiveMsg::text']['method'] == 'text') { - showtablerow('class="header"', array('', 'class="td23 td28"', '', 'class="td29"'), array( - "", - lang('plugin/wechat', 'response_message'), - "

    ".lang('plugin/wechat', 'response_custom')." ".($response['textback'] ? "[".lang('plugin/wechat', 'response_switch_plugin_mode', array('plugin' => $response['textback']['plugin']))."]

    " : '') - )); - - foreach($response['text'] as $k => $text) { - showtablerow('', array('', 'class="td23 td28"', 'class="td29"'), array( - "", - "
    ", - "" - ."
    ".lang('plugin/wechat', 'resource_select')."" - )); - } - echo ''; - - echo << -var rowtypedata = [ -[[1,''], [1, ''], [1, '', 'td29']], -]; - -EOT; - - } else { - showtablerow('class="header"', array('', 'class="td23 td28"', '', 'class="td29"'), array( - "", - lang('plugin/wechat', 'response_message'), - "

    ".lang('plugin/wechat', 'response_plugin_mode', array('plugin' => $responsehook['receiveMsg::text']['plugin']))." [".lang('plugin/wechat', 'response_switch_custom_mode')."]

    " - )); - } - - showsubmit('menusubmit', 'submit', 'del'); - showtablefooter(); - showformfooter(); - -} else { - - if(!empty($_GET['newresponse'])) { - foreach($_GET['newresponse']['keyword'] as $k => $keyword) { - $item = array( - 'keyword' => $keyword, - 'response' => $_GET['newresponse']['response'][$k], - ); - $response['text'][] = $item; - } - } - - foreach($_GET['response']['text'] as $k => $value) { - if($value['delete']) { - unset($response['text'][$k]); - continue; - } - $response['text'][$k] = $value; - } - - $response['subscribe'] = $_GET['response']['subscribe']; - $response['access'] = $_GET['response']['access']; - $response['scan'] = $_GET['response']['scan']; - - $query = array( - 'subscribe' => $response['subscribe'], - 'text' => array(), - ); - - foreach($response['text'] as $value) { - $query['text'][$value['keyword']] = $value['response']; - } - - $response['query'] = $query; - - savecache('wechat_response', $response); - - cpmsg('setting_update_succeed', 'action=plugins&operation=config&do='.$pluginid.'&identifier=wechat&pmod=response_setting', 'succeed'); - -} - -?> \ No newline at end of file diff --git a/upload/source/plugin/wechat/setting.class.php b/upload/source/plugin/wechat/setting.class.php deleted file mode 100644 index c820fec0..00000000 --- a/upload/source/plugin/wechat/setting.class.php +++ /dev/null @@ -1,108 +0,0 @@ -' - . '

    '.lang('plugin/wechat', 'resource_select').'

    ' - . '
    '; - - $adminscript = ADMINSCRIPT; - -echo << -var showResourceId = null; -function showResource(id) { - showMenu({'ctrlid':'rsel','evt':'click','duration':3,'pos':'00'}); - showResourceId = id; - ajaxget('$adminscript?action=plugins&operation=config&identifier=wechat&pmod=resource_setting&ac=select', 'rsel_content'); -} -function selResource(id, text) { - $(showResourceId).value = '[resource=' + id + '] ' + text; - hideMenu(); -} - -EOF; - - } - - public static function menu() { - global $_G; - $_G['wechat']['setting'] = dunserialize($_G['setting']['mobilewechat']); - -echo << -.floattop { display: none; } -.floattopempty { display: none; } -.mymenu .floattop { display: inline; } -.mymenu .floattopempty { display: inline; } - -EOF; - - echo '
    '; - if($_G['wechat']['setting']['wsq_sitetoken']) { - showsubmenu(lang('plugin/wechat', 'menu_root'), array( - array(array('menu' => lang('plugin/wechat', 'menu_wsq'), 'submenu' => array( - array(lang('plugin/wechat', 'menu_wsq_base'), 'plugins&operation=config&identifier=wechat&pmod=wsq_setting', $_GET['pmod'] == 'wsq_setting'), - array(lang('plugin/wechat', 'menu_wsq_show'), 'plugins&operation=config&identifier=wechat&pmod=showactivity_setting', $_GET['pmod'] == 'showactivity_setting'), - array(lang('plugin/wechat', 'menu_wsq_stat'), 'plugins&operation=config&identifier=wechat&pmod=wsq_stat', $_GET['pmod'] == 'wsq_stat'), - ))), - array(array('menu' => lang('plugin/wechat', 'menu_wechat'), 'submenu' => array( - array(lang('plugin/wechat', 'menu_wechat_base'), 'plugins&operation=config&identifier=wechat&pmod=wechat_setting', $_GET['pmod'] == 'wechat_setting'), - array(lang('plugin/wechat', 'menu_wechat_msg'), 'plugins&operation=config&identifier=wechat&pmod=response_setting', $_GET['pmod'] == 'response_setting'), - array(lang('plugin/wechat', 'menu_wechat_menu'), 'plugins&operation=config&identifier=wechat&pmod=menu_setting', $_GET['pmod'] == 'menu_setting'), - array(lang('plugin/wechat', 'menu_wechat_resource'), 'plugins&operation=config&identifier=wechat&pmod=resource_setting', $_GET['pmod'] == 'resource_setting'), - array(lang('plugin/wechat', 'menu_wechat_masssend'), 'plugins&operation=config&identifier=wechat&pmod=masssend_setting', $_GET['pmod'] == 'masssend_setting'), - ))), - array(lang('plugin/wechat', 'menu_app'), 'plugins&operation=config&identifier=wechat&pmod=wsq_app', $_GET['pmod'] == 'wsq_app'), - array(lang('plugin/wechat', 'menu_api'), 'plugins&operation=config&identifier=wechat&pmod=api_setting', $_GET['pmod'] == 'api_setting'), - )); - } else { - showsubmenu(lang('plugin/wechat', 'menu_root'), array( - array(array('menu' => lang('plugin/wechat', 'menu_wechat'), 'submenu' => array( - array(lang('plugin/wechat', 'menu_wechat_base'), 'plugins&operation=config&identifier=wechat&pmod=wechat_setting', $_GET['pmod'] == 'wechat_setting'), - array(lang('plugin/wechat', 'menu_wechat_msg'), 'plugins&operation=config&identifier=wechat&pmod=response_setting', $_GET['pmod'] == 'response_setting'), - array(lang('plugin/wechat', 'menu_wechat_menu'), 'plugins&operation=config&identifier=wechat&pmod=menu_setting', $_GET['pmod'] == 'menu_setting'), - array(lang('plugin/wechat', 'menu_wechat_resource'), 'plugins&operation=config&identifier=wechat&pmod=resource_setting', $_GET['pmod'] == 'resource_setting'), - array(lang('plugin/wechat', 'menu_wechat_masssend'), 'plugins&operation=config&identifier=wechat&pmod=masssend_setting', $_GET['pmod'] == 'masssend_setting'), - ))), - array(lang('plugin/wechat', 'menu_api'), 'plugins&operation=config&identifier=wechat&pmod=api_setting', $_GET['pmod'] == 'api_setting'), - )); - } - echo '
    '; - - if($_G['wechat']['setting']['wsq_siteid']) { - $time = TIMESTAMP; - -echo << -function pubEventCallbackCommon(re) { - if(re.errCode) { - return; - } - if(typeof re.data.event.peId != 'undefined') { - $('pubEventNum').innerHTML = 'New!'; - $('pubEventNum').style.display = ''; - } -} - - -EOF; - - } - } - - -} \ No newline at end of file diff --git a/upload/source/plugin/wechat/showactivity_setting.inc.php b/upload/source/plugin/wechat/showactivity_setting.inc.php deleted file mode 100644 index 62eda87e..00000000 --- a/upload/source/plugin/wechat/showactivity_setting.inc.php +++ /dev/null @@ -1,219 +0,0 @@ -fetch_all_setting(array('mobilewechat')); -$setting = (array)dunserialize($setting['mobilewechat']); -$ac = !empty($_GET['ac']) ? $_GET['ac'] : ''; - -require_once libfile('function/forumlist'); -loadcache('forums'); - -require_once DISCUZ_ROOT.'./source/plugin/wechat/setting.class.php'; -WeChatSetting::menu(); - -if(!$setting['wsq_sitetoken']) { - cpmsg(lang('plugin/wechat', 'wsq_api_register_close'), '', 'error'); -} - -if(!$ac) { - - $ppp = 20; - if(!is_array($setting['showactivity']['tids'])) { - $setting['showactivity']['tids'] = array(); - } - arsort($setting['showactivity']['tids']); - $page = max(1, $_GET['page']); - $tids = array_slice($setting['showactivity']['tids'], ($page - 1) * $ppp, $ppp); - $multipage = multi(count($setting['showactivity']['tids']), $ppp, $page, ADMINSCRIPT.'?action=plugins&operation=config&do='.$pluginid.'&identifier=wechat&pmod=showactivity_setting', 0, 3, TRUE, TRUE); - - $showthreads = C::t('forum_thread')->fetch_all($tids); - $activities = C::t('forum_activity')->fetch_all(array_keys($showthreads)); - - arsort($showthreads); - showformheader('plugins&operation=config&do='.$pluginid.'&identifier=wechat&pmod=showactivity_setting&ac=del', 'enctype'); - showtableheader(); - echo ''.lang('plugin/wechat', 'show_title').''. - lang('plugin/wechat', 'show_starttime').' - '.lang('plugin/wechat', 'show_endtime').''. - lang('plugin/wechat', 'show_expiration').''. - lang('plugin/wechat', 'show_applynumber').''. - lang('plugin/wechat', 'show_forum').''; - foreach($showthreads as $tid => $thread) { - $settingsnew[$tid] = $tid; - echo ''.$thread['subject'].''. - dgmdate($activities[$thread['tid']]['starttimefrom']).($activities[$thread['tid']]['starttimeto'] ? ' - '.dgmdate($activities[$thread['tid']]['starttimeto']) : '').''. - dgmdate($activities[$thread['tid']]['expiration']).''. - $activities[$thread['tid']]['applynumber'].''. - $_G['cache']['forums'][$thread['fid']]['name'].''. - ''.lang('plugin/wechat', 'show_export').''; - } - $add = ''; - if($showthreads) { - showsubmit('submit', lang('plugin/wechat', 'show_delthread'), $add, '', $multipage); - } else { - showsubmit('', '', 'td', $add); - } - showtablefooter(); - showformfooter(); - -} elseif($ac == 'del') { - - if(submitcheck('submit')) { - foreach($_GET['delete'] as $delete) { - unset($setting['showactivity']['tids'][$delete]); - C::t('forum_thread')->delete($delete); - } - $settings = array('mobilewechat' => serialize($setting)); - C::t('common_setting')->update_batch($settings); - updatecache(array('plugin', 'setting')); - cpmsg(lang('plugin/wechat', 'show_delthread_succeed'), 'action=plugins&operation=config&do='.$pluginid.'&identifier=wechat&pmod=showactivity_setting', 'succeed'); - } - -} elseif($ac == 'add') { - if(!submitcheck('submit')) { - - echo ''; - $forumselect = "'; - - showformheader('plugins&operation=config&do='.$pluginid.'&identifier=wechat&pmod=showactivity_setting&ac=add', 'enctype'); - showtableheader(); - showsetting(lang('plugin/wechat', 'show_title'), 'subject', '', 'text'); - showsetting(lang('plugin/wechat', 'show_starttime'), 'starttimefrom', '', 'calendar', '', 0, '', 1); - showsetting(lang('plugin/wechat', 'show_expiration'), 'activityexpiration', '', 'calendar', '', 0, '', 1); - showsetting(lang('plugin/wechat', 'show_endtime'), 'starttimeto', '', 'calendar', '', 0, '', 1); - showsetting(lang('plugin/wechat', 'show_memo'), 'message', '', 'textarea'); - showsetting(lang('plugin/wechat', 'show_forum'), '', '', $forumselect); - showsubmit('submit'); - showtablefooter(); - showformfooter(); - - } else { - - $_GET['activityclass'] = lang('plugin/wechat', 'show_thread_class'); - $_GET['activityplace'] = lang('plugin/wechat', 'show_thread_place'); - if(!$_GET['subject'] || !$_GET['starttimefrom'] || !$_GET['activityexpiration'] || !$_GET['message'] || !$_GET['fid']) { - cpmsg(lang('plugin/wechat', 'show_input_error'), '', 'error'); - } - - if(@strtotime($_GET['starttimefrom']) === -1 || @strtotime($_GET['starttimefrom']) === FALSE) { - cpmsg(lang('message', 'activity_fromtime_error'), '', 'error'); - } elseif(trim($_GET['activityexpiration']) && (@strtotime($_GET['activityexpiration']) === -1 || @strtotime($_GET['activityexpiration']) === FALSE)) { - cpmsg(lang('message', 'activity_totime_error'), '', 'error'); - } - - $activity = array(); - $activity['class'] = $_GET['activityclass']; - $activity['starttimefrom'] = @strtotime($_GET['starttimefrom']); - $activity['starttimeto'] = $_GET['starttimeto'] ? @strtotime($_GET['starttimeto']) : 0; - $activity['place'] = $_GET['activityplace']; - $activity['expiration'] = @strtotime($_GET['activityexpiration']); - - $newthread = array( - 'fid' => $_GET['fid'], - 'posttableid' => 0, - 'readperm' => 0, - 'price' => 0, - 'typeid' => 0, - 'sortid' => 0, - 'author' => $_G['username'], - 'authorid' => $_G['uid'], - 'subject' => $_GET['subject'], - 'dateline' => TIMESTAMP, - 'lastpost' => TIMESTAMP, - 'lastposter' => $_G['username'], - 'displayorder' => 1, - 'digest' => 0, - 'special' => 4, - 'attachment' => 0, - 'moderated' => 0, - 'status' => 0, - 'isgroup' => 0, - 'replycredit' => 0, - 'closed' => 0, - ); - $tid = C::t('forum_thread')->insert($newthread, true); - - $pid = insertpost(array( - 'fid' => $_GET['fid'], - 'tid' => $tid, - 'first' => '1', - 'author' => $_G['username'], - 'authorid' => $_G['uid'], - 'subject' => $_GET['subject'], - 'dateline' => TIMESTAMP, - 'message' => $_GET['message'], - 'useip' => '', - 'invisible' => 0, - 'anonymous' => 0, - 'usesig' => 0, - 'htmlon' => 0, - 'bbcodeoff' => 0, - 'smileyoff' => 0, - 'parseurloff' => 0, - 'attachment' => '0', - 'tags' => '', - 'replycredit' => 0, - 'status' => 0 - )); - - $data = array( - 'tid' => $tid, - 'uid' => $_G['uid'], - 'cost' => 0, - 'starttimefrom' => $activity['starttimefrom'], - 'starttimeto' => $activity['starttimeto'], - 'place' => $activity['place'], - 'class' => $activity['class'], - 'expiration' => $activity['expiration'] - ); - C::t('forum_activity')->insert($data); - - $setting['showactivity']['tids'][$tid] = $tid; - $settings = array('mobilewechat' => serialize($setting)); - C::t('common_setting')->update_batch($settings); - updatecache(array('plugin', 'setting')); - require_once DISCUZ_ROOT . './source/plugin/wechat/wsq.class.php'; - wsq::report('pubshowactivity'); - - cpmsg(lang('plugin/wechat', 'show_addthread_succeed'), 'action=plugins&operation=config&do='.$pluginid.'&identifier=wechat&pmod=showactivity_setting', 'succeed'); - - } -} elseif($ac == 'export') { - if(!isset($setting['showactivity']['tids'][$_GET['tid']])) { - cpmsg(lang('plugin/wechat', 'show_thread_not_found')); - } - $thread = get_thread_by_tid($_GET['tid']); - if(!$thread) { - cpmsg(lang('plugin/wechat', 'show_thread_not_found')); - } - $posttableid = $thread['posttableid']; - $posts = DB::fetch_all("SELECT * FROM %t WHERE tid=%d", array('forum_debatepost', $_GET['tid']), 'pid'); - foreach(C::t('forum_post')->fetch_all_post($posttableid, array_keys($posts), false) as $post) { - $array[$posts[$post['pid']]['voters'].'.'.$post['position']] = $post['author'].','.$posts[$post['pid']]['voters'].','.$post['position']; - } - ob_end_clean(); - header('Content-Encoding: none'); - header('Content-Type: application/octet-stream'); - header('Content-Disposition: attachment; filename=showactivity_'.$_GET['tid'].'.csv'); - header('Pragma: no-cache'); - header('Expires: 0'); - krsort($array); - $detail = lang('plugin/wechat', 'show_export_title')."\r\n".implode("\r\n", $array); - if($_G['charset'] != 'gbk') { - $detail = diconv($detail, $_G['charset'], 'GBK'); - } - define('FOOTERDISABLED', true); - echo $detail; - exit(); -} - -?> \ No newline at end of file diff --git a/upload/source/plugin/wechat/spacecp.inc.php b/upload/source/plugin/wechat/spacecp.inc.php deleted file mode 100644 index e1da2151..00000000 --- a/upload/source/plugin/wechat/spacecp.inc.php +++ /dev/null @@ -1,72 +0,0 @@ -update($_G['uid'], array('password' => md5(random(10)))); - - if($_G['wechat']['setting']['wechat_qrtype']) { - C::t('#wechat#common_member_wechatmp')->update($_G['uid'], array('status' => 1)); - } else { - C::t('#wechat#common_member_wechat')->update($_G['uid'], array('isregister' => 0)); - } - - showmessage('wechat:wsq_password_reset', dreferer()); -} elseif(submitcheck('unbindsubmit')) { - require_once libfile('function/member'); - if($_G['wechat']['setting']['wechat_qrtype']) { - require_once DISCUZ_ROOT . './source/plugin/wechat/wsq.class.php'; - $member = C::t('#wechat#common_member_wechatmp')->fetch($_G['uid']); - if(!$member || !wsq::userunbind($_G['uid'], $member['openid'])) { - showmessage('wechat:wechat_message_unbind_fail'); - } - C::t('#wechat#common_member_wechatmp')->delete($_G['uid']); - } else { - C::t('#wechat#common_member_wechat')->delete($_G['uid']); - require_once DISCUZ_ROOT.'./source/plugin/wechat/wsq.class.php'; - wsq::report('unbind'); - } - - clearcookies(); - showmessage('wechat:wechat_message_unbinded', $_G['siteurl']); -} \ No newline at end of file diff --git a/upload/source/plugin/wechat/table/index.htm b/upload/source/plugin/wechat/table/index.htm deleted file mode 100644 index e69de29b..00000000 diff --git a/upload/source/plugin/wechat/table/table_common_member_wechat.php b/upload/source/plugin/wechat/table/table_common_member_wechat.php deleted file mode 100644 index e236a58f..00000000 --- a/upload/source/plugin/wechat/table/table_common_member_wechat.php +++ /dev/null @@ -1,28 +0,0 @@ -_table = 'common_member_wechat'; - $this->_pk = 'uid'; - $this->_pre_cache_key = 'common_member_wechat_'; - - parent::__construct(); - } - - public function fetch_by_openid($openid) { - return DB::fetch_first('SELECT * FROM %t WHERE openid=%s', array($this->_table, $openid)); - } - -} \ No newline at end of file diff --git a/upload/source/plugin/wechat/table/table_common_member_wechatmp.php b/upload/source/plugin/wechat/table/table_common_member_wechatmp.php deleted file mode 100644 index ffc4152a..00000000 --- a/upload/source/plugin/wechat/table/table_common_member_wechatmp.php +++ /dev/null @@ -1,28 +0,0 @@ -_table = 'common_member_wechatmp'; - $this->_pk = 'uid'; - $this->_pre_cache_key = 'common_member_wechatmp_'; - - parent::__construct(); - } - - public function fetch_by_openid($openid) { - return DB::fetch_all('SELECT * FROM %t WHERE openid=%s', array($this->_table, $openid), 'uid'); - } - -} \ No newline at end of file diff --git a/upload/source/plugin/wechat/table/table_mobile_wechat_authcode.php b/upload/source/plugin/wechat/table/table_mobile_wechat_authcode.php deleted file mode 100644 index 4b6c0451..00000000 --- a/upload/source/plugin/wechat/table/table_mobile_wechat_authcode.php +++ /dev/null @@ -1,32 +0,0 @@ -_table = 'mobile_wechat_authcode'; - $this->_pk = 'sid'; - - parent::__construct(); - } - - public function fetch_by_code($code) { - return DB::fetch_first('SELECT * FROM %t WHERE code=%d', array($this->_table, $code)); - } - - public function delete_history() { - $time = TIMESTAMP - 3600; - return DB::delete($this->_table, "createtime<$time"); - } - -} \ No newline at end of file diff --git a/upload/source/plugin/wechat/table/table_mobile_wechat_masssend.php b/upload/source/plugin/wechat/table/table_mobile_wechat_masssend.php deleted file mode 100644 index 3596db32..00000000 --- a/upload/source/plugin/wechat/table/table_mobile_wechat_masssend.php +++ /dev/null @@ -1,23 +0,0 @@ -_table = 'mobile_wechat_masssend'; - $this->_pk = 'id'; - - parent::__construct(); - } - -} \ No newline at end of file diff --git a/upload/source/plugin/wechat/table/table_mobile_wechat_resource.php b/upload/source/plugin/wechat/table/table_mobile_wechat_resource.php deleted file mode 100644 index cedf422e..00000000 --- a/upload/source/plugin/wechat/table/table_mobile_wechat_resource.php +++ /dev/null @@ -1,81 +0,0 @@ -_table = 'mobile_wechat_resource'; - $this->_pk = 'id'; - - parent::__construct(); - } - - public function insert($data, $return_insert_id = false, $replace = false, $silent = false) { - if(!is_array($data['data'])) { - return; - } - if(!$data['dateline']) { - $data['dateline'] = TIMESTAMP; - } - $data['data'] = serialize($data['data']); - return parent::insert($data, $return_insert_id, $replace, $silent); - } - - public function update($val, $data, $unbuffered = false, $low_priority = false) { - if(isset($data['data']) && is_array($data['data'])) { - $data['data'] = serialize($data['data']); - } - return parent::update($val, $data, $unbuffered , $low_priority); - } - - public function fetch($id, $force_from_db = false){ - $data = parent::fetch($id, $force_from_db); - if($data) { - $data['data'] = dunserialize($data['data']); - return $data; - } else { - return array(); - } - } - - public function count_by_type($type = null) { - $typesql = $type !== null ? "`type`=".intval($type) : 'TRUE'; - return DB::result_first("SELECT COUNT(*) FROM %t WHERE %i", array($this->_table, $typesql)); - } - - public function fetch_by_type($type = null, $start = 0, $limit = 20) { - $typesql = $type !== null ? "`type`=".intval($type) : 'TRUE'; - $datas = DB::fetch_all("SELECT * FROM %t WHERE %i ORDER BY id DESC LIMIT %d,%d", array($this->_table, $typesql, $start, $limit)); - if($datas) { - foreach($datas as &$data) { - $data['data'] = dunserialize($data['data']); - } - return $datas; - } else { - return array(); - } - } - - public function fetch_all($ids, $force_from_db = false) { - $datas = parent::fetch_all($ids, $force_from_db); - if($datas) { - foreach($datas as &$data) { - $data['data'] = dunserialize($data['data']); - } - return $datas; - } else { - return array(); - } - } - -} \ No newline at end of file diff --git a/upload/source/plugin/wechat/template/extend_module.css b/upload/source/plugin/wechat/template/extend_module.css deleted file mode 100644 index 95ca3674..00000000 --- a/upload/source/plugin/wechat/template/extend_module.css +++ /dev/null @@ -1,3 +0,0 @@ -/** forum::forumdisplay,forum::viewthread,group::forumdisplay,group::viewthread **/ - .mobile-type-5 a { background: url(../../source/plugin/wechat/image/wsq.png) no-repeat 0 0; } -/** end **/ \ No newline at end of file diff --git a/upload/source/plugin/wechat/template/index.htm b/upload/source/plugin/wechat/template/index.htm deleted file mode 100644 index e69de29b..00000000 diff --git a/upload/source/plugin/wechat/template/mobile/arrow_top.png b/upload/source/plugin/wechat/template/mobile/arrow_top.png deleted file mode 100644 index 98c29c78..00000000 Binary files a/upload/source/plugin/wechat/template/mobile/arrow_top.png and /dev/null differ diff --git a/upload/source/plugin/wechat/template/mobile/common.js b/upload/source/plugin/wechat/template/mobile/common.js deleted file mode 100644 index 2055ea1f..00000000 --- a/upload/source/plugin/wechat/template/mobile/common.js +++ /dev/null @@ -1,976 +0,0 @@ -var supporttouch = "ontouchend" in document; -!supporttouch && (window.location.href = 'forum.php?mobile=1'); - -var platform = navigator.platform; -var ua = navigator.userAgent; -var ios = /iPhone|iPad|iPod/.test(platform) && ua.indexOf( "AppleWebKit" ) > -1; -var andriod = ua.indexOf( "Android" ) > -1; - - -(function($, window, document, undefined) { - var dataPropertyName = "virtualMouseBindings", - touchTargetPropertyName = "virtualTouchID", - virtualEventNames = "vmouseover vmousedown vmousemove vmouseup vclick vmouseout vmousecancel".split(" "), - touchEventProps = "clientX clientY pageX pageY screenX screenY".split( " " ), - mouseHookProps = $.event.mouseHooks ? $.event.mouseHooks.props : [], - mouseEventProps = $.event.props.concat( mouseHookProps ), - activeDocHandlers = {}, - resetTimerID = 0, - startX = 0, - startY = 0, - didScroll = false, - clickBlockList = [], - blockMouseTriggers = false, - blockTouchTriggers = false, - eventCaptureSupported = "addEventListener" in document, - $document = $(document), - nextTouchID = 1, - lastTouchID = 0, threshold; - $.vmouse = { - moveDistanceThreshold: 10, - clickDistanceThreshold: 10, - resetTimerDuration: 1500 - }; - function getNativeEvent(event) { - while( event && typeof event.originalEvent !== "undefined" ) { - event = event.originalEvent; - } - return event; - } - function createVirtualEvent(event, eventType) { - var t = event.type, oe, props, ne, prop, ct, touch, i, j, len; - event = $.Event(event); - event.type = eventType; - oe = event.originalEvent; - props = $.event.props; - if(t.search(/^(mouse|click)/) > -1 ) { - props = mouseEventProps; - } - if(oe) { - for(i = props.length, prop; i;) { - prop = props[ --i ]; - event[ prop ] = oe[ prop ]; - } - } - if(t.search(/mouse(down|up)|click/) > -1 && !event.which) { - event.which = 1; - } - if(t.search(/^touch/) !== -1) { - ne = getNativeEvent(oe); - t = ne.touches; - ct = ne.changedTouches; - touch = (t && t.length) ? t[0] : (( ct && ct.length) ? ct[0] : undefined); - if(touch) { - for(j = 0, len = touchEventProps.length; j < len; j++) { - prop = touchEventProps[j]; - event[prop] = touch[prop]; - } - } - } - return event; - } - function getVirtualBindingFlags(element) { - var flags = {}, - b, k; - while(element) { - b = $.data(element, dataPropertyName); - for(k in b) { - if(b[k]) { - flags[k] = flags.hasVirtualBinding = true; - } - } - element = element.parentNode; - } - return flags; - } - function getClosestElementWithVirtualBinding(element, eventType) { - var b; - while(element) { - b = $.data( element, dataPropertyName ); - if(b && (!eventType || b[eventType])) { - return element; - } - element = element.parentNode; - } - return null; - } - function enableTouchBindings() { - blockTouchTriggers = false; - } - function disableTouchBindings() { - blockTouchTriggers = true; - } - function enableMouseBindings() { - lastTouchID = 0; - clickBlockList.length = 0; - blockMouseTriggers = false; - disableTouchBindings(); - } - function disableMouseBindings() { - enableTouchBindings(); - } - function startResetTimer() { - clearResetTimer(); - resetTimerID = setTimeout(function() { - resetTimerID = 0; - enableMouseBindings(); - }, $.vmouse.resetTimerDuration); - } - function clearResetTimer() { - if(resetTimerID ) { - clearTimeout(resetTimerID); - resetTimerID = 0; - } - } - function triggerVirtualEvent(eventType, event, flags) { - var ve; - if((flags && flags[eventType]) || - (!flags && getClosestElementWithVirtualBinding(event.target, eventType))) { - ve = createVirtualEvent(event, eventType); - $(event.target).trigger(ve); - } - return ve; - } - function mouseEventCallback(event) { - var touchID = $.data(event.target, touchTargetPropertyName); - if(!blockMouseTriggers && (!lastTouchID || lastTouchID !== touchID)) { - var ve = triggerVirtualEvent("v" + event.type, event); - if(ve) { - if(ve.isDefaultPrevented()) { - event.preventDefault(); - } - if(ve.isPropagationStopped()) { - event.stopPropagation(); - } - if(ve.isImmediatePropagationStopped()) { - event.stopImmediatePropagation(); - } - } - } - } - function handleTouchStart(event) { - var touches = getNativeEvent(event).touches, - target, flags; - if(touches && touches.length === 1) { - target = event.target; - flags = getVirtualBindingFlags(target); - if(flags.hasVirtualBinding) { - lastTouchID = nextTouchID++; - $.data(target, touchTargetPropertyName, lastTouchID); - clearResetTimer(); - disableMouseBindings(); - didScroll = false; - var t = getNativeEvent(event).touches[0]; - startX = t.pageX; - startY = t.pageY; - triggerVirtualEvent("vmouseover", event, flags); - triggerVirtualEvent("vmousedown", event, flags); - } - } - } - function handleScroll(event) { - if(blockTouchTriggers) { - return; - } - if(!didScroll) { - triggerVirtualEvent("vmousecancel", event, getVirtualBindingFlags(event.target)); - } - didScroll = true; - startResetTimer(); - } - function handleTouchMove(event) { - if(blockTouchTriggers) { - return; - } - var t = getNativeEvent(event).touches[0], - didCancel = didScroll, - moveThreshold = $.vmouse.moveDistanceThreshold, - flags = getVirtualBindingFlags(event.target); - didScroll = didScroll || - (Math.abs(t.pageX - startX) > moveThreshold || - Math.abs(t.pageY - startY) > moveThreshold); - if(didScroll && !didCancel) { - triggerVirtualEvent("vmousecancel", event, flags); - } - triggerVirtualEvent("vmousemove", event, flags); - startResetTimer(); - } - function handleTouchEnd(event) { - if(blockTouchTriggers) { - return; - } - disableTouchBindings(); - var flags = getVirtualBindingFlags(event.target), t; - triggerVirtualEvent("vmouseup", event, flags); - if(!didScroll) { - var ve = triggerVirtualEvent("vclick", event, flags); - if(ve && ve.isDefaultPrevented()) { - t = getNativeEvent(event).changedTouches[0]; - clickBlockList.push({ - touchID: lastTouchID, - x: t.clientX, - y: t.clientY - }); - blockMouseTriggers = true; - } - } - triggerVirtualEvent("vmouseout", event, flags); - didScroll = false; - startResetTimer(); - } - function hasVirtualBindings(ele) { - var bindings = $.data( ele, dataPropertyName ), k; - if(bindings) { - for(k in bindings) { - if(bindings[k]) { - return true; - } - } - } - return false; - } - function dummyMouseHandler() {} - - function getSpecialEventObject(eventType) { - var realType = eventType.substr(1); - return { - setup: function(data, namespace) { - if(!hasVirtualBindings(this)) { - $.data(this, dataPropertyName, {}); - } - var bindings = $.data(this, dataPropertyName); - bindings[eventType] = true; - activeDocHandlers[eventType] = (activeDocHandlers[eventType] || 0) + 1; - if(activeDocHandlers[eventType] === 1) { - $document.bind(realType, mouseEventCallback); - } - $(this).bind(realType, dummyMouseHandler); - if(eventCaptureSupported) { - activeDocHandlers["touchstart"] = (activeDocHandlers["touchstart"] || 0) + 1; - if(activeDocHandlers["touchstart"] === 1) { - $document.bind("touchstart", handleTouchStart) - .bind("touchend", handleTouchEnd) - .bind("touchmove", handleTouchMove) - .bind("scroll", handleScroll); - } - } - }, - teardown: function(data, namespace) { - --activeDocHandlers[eventType]; - if(!activeDocHandlers[eventType]) { - $document.unbind(realType, mouseEventCallback); - } - if(eventCaptureSupported) { - --activeDocHandlers["touchstart"]; - if(!activeDocHandlers["touchstart"]) { - $document.unbind("touchstart", handleTouchStart) - .unbind("touchmove", handleTouchMove) - .unbind("touchend", handleTouchEnd) - .unbind("scroll", handleScroll); - } - } - var $this = $(this), - bindings = $.data(this, dataPropertyName); - if(bindings) { - bindings[eventType] = false; - } - $this.unbind(realType, dummyMouseHandler); - if(!hasVirtualBindings(this)) { - $this.removeData(dataPropertyName); - } - } - }; - } - for(var i = 0; i < virtualEventNames.length; i++) { - $.event.special[virtualEventNames[i]] = getSpecialEventObject(virtualEventNames[i]); - } - if(eventCaptureSupported) { - document.addEventListener("click", function(e) { - var cnt = clickBlockList.length, - target = e.target, - x, y, ele, i, o, touchID; - if(cnt) { - x = e.clientX; - y = e.clientY; - threshold = $.vmouse.clickDistanceThreshold; - ele = target; - while(ele) { - for(i = 0; i < cnt; i++) { - o = clickBlockList[i]; - touchID = 0; - if((ele === target && Math.abs(o.x - x) < threshold && Math.abs(o.y - y) < threshold) || - $.data(ele, touchTargetPropertyName) === o.touchID) { - e.preventDefault(); - e.stopPropagation(); - return; - } - } - ele = ele.parentNode; - } - } - }, true); - } -})(jQuery, window, document); - -(function($, window, undefined) { - function triggercustomevent(obj, eventtype, event) { - var origtype = event.type; - event.type = eventtype; - $.event.handle.call(obj, event); - event.type = origtype; - } - - $.event.special.tap = { - setup : function() { - var thisobj = this; - var obj = $(thisobj); - obj.on('vmousedown', function(e) { - if(e.which && e.which !== 1) { - return false; - } - var origtarget = e.target; - var origevent = e.originalEvent; - var timer; - - function cleartaptimer() { - clearTimeout(timer); - } - function cleartaphandlers() { - cleartaptimer(); - obj.off('vclick', clickhandler) - .off('vmouseup', cleartaptimer); - $(document).off('vmousecancel', cleartaphandlers); - } - - function clickhandler(e) { - cleartaphandlers(); - if(origtarget === e.target) { - triggercustomevent(thisobj, 'tap', e); - } - return false; - } - - obj.on('vmouseup', cleartaptimer) - .on('vclick', clickhandler) - $(document).on('touchcancel', cleartaphandlers); - - timer = setTimeout(function() { - triggercustomevent(thisobj, 'taphold', $.Event('taphold', {target:origtarget})); - }, 750); - return false; - }); - } - }; - $.each(('tap').split(' '), function(index, name) { - $.fn[name] = function(fn) { - return this.on(name, fn); - }; - }); - -})(jQuery, this); - -var page = { - converthtml : function() { - var prevpage = $('div.pg .prev').prop('href'); - var nextpage = $('div.pg .nxt').prop('href'); - var lastpage = $('div.pg label span').text().replace(/[^\d]/g, '') || 0; - var curpage = $('div.pg input').val() || 1; - - if(!lastpage) { - prevpage = $('div.pg .pgb a').prop('href'); - } - - var prevpagehref = nextpagehref = ''; - if(prevpage == undefined) { - prevpagehref = 'javascript:;" class="grey'; - } else { - prevpagehref = prevpage; - } - if(nextpage == undefined) { - nextpagehref = 'javascript:;" class="grey'; - } else { - nextpagehref = nextpage; - } - - var selector = ''; - if(lastpage) { - selector += ''; - selector += ''; - selector += '第'+curpage+'页'; - } - - $('div.pg').removeClass('pg').addClass('page').html('上一页'+ selector +'下一页'); - $('#dumppage').on('change', function() { - var href = (prevpage || nextpage); - window.location.href = href.replace(/page=\d+/, 'page=' + $(this).val()); - }); - }, -}; - -var scrolltop = { - obj : null, - init : function(obj) { - scrolltop.obj = obj; - var fixed = this.isfixed(); - obj.css('opacity', '.618'); - if(fixed) { - obj.css('bottom', '8px'); - } else { - obj.css({'visibility':'visible', 'position':'absolute'}); - } - $(window).on('resize', function() { - if(fixed) { - obj.css('bottom', '8px'); - } else { - obj.css('top', ($(document).scrollTop() + $(window).height() - 40) + 'px'); - } - }); - obj.on('tap', function() { - $(document).scrollTop($(document).height()); - }); - $(document).on('scroll', function() { - if(!fixed) { - obj.css('top', ($(document).scrollTop() + $(window).height() - 40) + 'px'); - } - if($(document).scrollTop() >= 400) { - obj.removeClass('bottom') - .off().on('tap', function() { - window.scrollTo('0', '1'); - }); - } else { - obj.addClass('bottom') - .off().on('tap', function() { - $(document).scrollTop($(document).height()); - }); - } - }); - - }, - isfixed : function() { - var offset = scrolltop.obj.offset(); - var scrollTop = $(window).scrollTop(); - var screenHeight = document.documentElement.clientHeight; - if(offset == undefined) { - return false; - } - if(offset.top < scrollTop || (offset.top - scrollTop) > screenHeight) { - return false; - } else { - return true; - } - } -}; - -var img = { - init : function(is_err_t) { - var errhandle = this.errorhandle; - $('img').on('load', function() { - var obj = $(this); - obj.attr('zsrc', obj.attr('src')); - if(obj.width() < 5 && obj.height() < 10 && obj.css('display') != 'none') { - return errhandle(obj, is_err_t); - } - obj.css('display', 'inline'); - obj.css('visibility', 'visible'); - if(obj.width() > window.innerWidth) { - obj.css('width', window.innerWidth); - } - obj.parent().find('.loading').remove(); - obj.parent().find('.error_text').remove(); - }) - .on('error', function() { - var obj = $(this); - obj.attr('zsrc', obj.attr('src')); - errhandle(obj, is_err_t); - }); - }, - errorhandle : function(obj, is_err_t) { - if(obj.attr('noerror') == 'true') { - return; - } - obj.css('visibility', 'hidden'); - obj.css('display', 'none'); - var parentnode = obj.parent(); - parentnode.find('.loading').remove(); - parentnode.append('
    '); - var loadnums = parseInt(obj.attr('load')) || 0; - if(loadnums < 3) { - obj.attr('src', obj.attr('zsrc')); - obj.attr('load', ++loadnums); - return false; - } - if(is_err_t) { - var parentnode = obj.parent(); - parentnode.find('.loading').remove(); - parentnode.append('
    点击重新加载
    '); - parentnode.find('.error_text').one('click', function() { - obj.attr('load', 0).find('.error_text').remove(); - parentnode.append('
    '); - obj.attr('src', obj.attr('zsrc')); - }); - } - return false; - } -}; - -var atap = { - init : function() { - $('.atap').on('tap', function() { - var obj = $(this); - obj.css({'background':'#6FACD5', 'color':'#FFFFFF', 'font-weight':'bold', 'text-decoration':'none', 'text-shadow':'0 1px 1px #3373A5'}); - return false; - }); - $('.atap a').off('click'); - } -}; - - -var POPMENU = new Object; -var popup = { - init : function() { - var $this = this; - $('.popup').each(function(index, obj) { - obj = $(obj); - var pop = $(obj.attr('href')); - if(pop && pop.attr('popup')) { - pop.css({'display':'none'}); - obj.on('click', function(e) { - $this.open(pop); - }); - } - }); - this.maskinit(); - }, - maskinit : function() { - var $this = this; - $('#mask').off().on('tap', function() { - $this.close(); - }); - }, - - open : function(pop, type, url) { - this.close(); - this.maskinit(); - if(typeof pop == 'string') { - $('#ntcmsg').remove(); - if(type == 'alert') { - pop = '
    '+ pop +'
    ' - } else if(type == 'confirm') { - pop = '
    '+ pop +'
    取消
    ' - } - $('body').append(''); - pop = $('#ntcmsg'); - } - if(POPMENU[pop.attr('id')]) { - $('#' + pop.attr('id') + '_popmenu').html(pop.html()).css({'height':pop.height()+'px', 'width':pop.width()+'px'}); - } else { - pop.parent().append('
    '+ pop.html() +'
    '); - } - var popupobj = $('#' + pop.attr('id') + '_popmenu'); - var left = (window.innerWidth - popupobj.width()) / 2; - var top = (document.documentElement.clientHeight - popupobj.height()) / 2; - popupobj.css({'display':'block','position':'fixed','left':left,'top':top,'z-index':120,'opacity':1}); - $('#mask').css({'display':'block','width':'100%','height':'100%','position':'fixed','top':'0','left':'0','background':'black','opacity':'0.2','z-index':'100'}); - POPMENU[pop.attr('id')] = pop; - }, - close : function() { - $('#mask').css('display', 'none'); - $.each(POPMENU, function(index, obj) { - $('#' + index + '_popmenu').css('display','none'); - }); - } -}; - -var dialog = { - init : function() { - $(document).on('click', '.dialog', function() { - var obj = $(this); - popup.open('请稍后 ...'); - $.ajax({ - type : 'GET', - url : obj.attr('href') + '&inajax=1', - dataType : 'xml' - }) - .success(function(s) { - popup.open(s.lastChild.firstChild.nodeValue); - evalscript(s.lastChild.firstChild.nodeValue); - }) - .error(function() { - window.location.href = obj.attr('href'); - popup.close(); - }); - return false; - }); - }, - -}; - -var formdialog = { - init : function() { - $(document).on('click', '.formdialog', function() { - popup.open('请稍后 ...'); - var obj = $(this); - var formobj = $(this.form); - $.ajax({ - type:'POST', - url:formobj.attr('action') + '&handlekey='+ formobj.attr('id') +'&inajax=1', - data:formobj.serialize(), - dataType:'xml' - }) - .success(function(s) { - popup.open(s.lastChild.firstChild.nodeValue); - evalscript(s.lastChild.firstChild.nodeValue); - }) - .error(function() { - window.location.href = obj.attr('href'); - popup.close(); - }); - return false; - }); - } -}; - -var redirect = { - init : function() { - $(document).on('click', '.redirect', function() { - var obj = $(this); - popup.close(); - window.location.href = obj.attr('href'); - }); - } -}; - -var DISMENU = new Object; -var display = { - init : function() { - var $this = this; - $('.display').each(function(index, obj) { - obj = $(obj); - var dis = $(obj.attr('href')); - if(dis && dis.attr('display')) { - dis.css({'display':'none'}); - dis.css({'z-index':'102'}); - DISMENU[dis.attr('id')] = dis; - obj.on('click', function(e) { - if(in_array(e.target.tagName, ['A', 'IMG', 'INPUT'])) return; - $this.maskinit(); - if(dis.attr('display') == 'true') { - dis.css('display', 'block'); - dis.attr('display', 'false'); - $('#mask').css({'display':'block','width':'100%','height':'100%','position':'fixed','top':'0','left':'0','background':'transparent','z-index':'100'}); - } - return false; - }); - } - }); - }, - maskinit : function() { - var $this = this; - $('#mask').off().on('touchstart', function() { - $this.hide(); - }); - }, - hide : function() { - $('#mask').css('display', 'none'); - $.each(DISMENU, function(index, obj) { - obj.css('display', 'none'); - obj.attr('display', 'true'); - }); - } -}; - -var geo = { - latitude : null, - longitude : null, - loc : null, - errmsg : null, - timeout : 5000, - getcurrentposition : function() { - if(!!navigator.geolocation) { - navigator.geolocation.getCurrentPosition(this.locationsuccess, this.locationerror, { - enableHighAcuracy : true, - timeout : this.timeout, - maximumAge : 3000 - }); - } - }, - locationerror : function(error) { - geo.errmsg = 'error'; - switch(error.code) { - case error.TIMEOUT: - geo.errmsg = "获取位置超时,请重试"; - break; - case error.POSITION_UNAVAILABLE: - geo.errmsg = '无法检测到您的当前位置'; - break; - case error.PERMISSION_DENIED: - geo.errmsg = '请允许能够正常访问您的当前位置'; - break; - case error.UNKNOWN_ERROR: - geo.errmsg = '发生未知错误'; - break; - } - }, - locationsuccess : function(position) { - geo.latitude = position.coords.latitude; - geo.longitude = position.coords.longitude; - geo.errmsg = ''; - $.ajax({ - type:'POST', - url:'http://maps.google.com/maps/api/geocode/json?latlng=' + geo.latitude + ',' + geo.longitude + '&language=zh-CN&sensor=true', - dataType:'json' - }) - .success(function(s) { - if(s.status == 'OK') { - geo.loc = s.results[0].formatted_address; - } - }) - .error(function() { - geo.loc = null; - }); - } -}; - -var pullrefresh = { - init : function() { - var pos = {}; - var status = false; - var divobj = null; - var contentobj = null; - var reloadflag = false; - $('body').on('touchstart', function(e) { - e = mygetnativeevent(e); - pos.startx = e.touches[0].pageX; - pos.starty = e.touches[0].pageY; - }) - .on('touchmove', function(e) { - e = mygetnativeevent(e); - pos.curposx = e.touches[0].pageX; - pos.curposy = e.touches[0].pageY; - if(pos.curposy - pos.starty < 0 && !status) { - return; - } - if(!status && $(window).scrollTop() <= 0) { - status = true; - divobj = document.createElement('div'); - divobj = $(divobj); - divobj.css({'position':'relative', 'margin-left':'-85px'}); - $('body').prepend(divobj); - contentobj = document.createElement('div'); - contentobj = $(contentobj); - contentobj.css({'position':'absolute', 'height':'30px', 'top': '-30px', 'left':'50%'}); - contentobj.html('下拉可以刷新'); - contentobj.find('img').css({'-webkit-transition':'all 0.5s ease-in-out'}); - divobj.prepend(contentobj); - pos.topx = pos.curposx; - pos.topy = pos.curposy; - } - if(!status) { - return; - } - if(status == true) { - var pullheight = pos.curposy - pos.topy; - if(pullheight >= 0 && pullheight < 150) { - divobj.css({'height': pullheight/2 + 'px'}); - contentobj.css({'top': (-30 + pullheight/2) + 'px'}); - if(reloadflag) { - contentobj.find('img').css({'-webkit-transform':'rotate(180deg)', '-moz-transform':'rotate(180deg)', '-o-transform':'rotate(180deg)', 'transform':'rotate(180deg)'}); - contentobj.find('#refreshtxt').html('下拉可以刷新'); - } - reloadflag = false; - } else if(pullheight >= 150) { - divobj.css({'height':pullheight/2 + 'px'}); - contentobj.css({'top': (-30 + pullheight/2) + 'px'}); - if(!reloadflag) { - contentobj.find('img').css({'-webkit-transform':'rotate(360deg)', '-moz-transform':'rotate(360deg)', '-o-transform':'rotate(360deg)', 'transform':'rotate(360deg)'}); - contentobj.find('#refreshtxt').html('松开可以刷新'); - } - reloadflag = true; - } - } - e.preventDefault(); - }) - .on('touchend', function(e) { - if(status == true) { - if(reloadflag) { - contentobj.html('正在加载...'); - contentobj.animate({'top': (-30 + 75) + 'px'}, 618, 'linear'); - divobj.animate({'height': '75px'}, 618, 'linear', function() { - window.location.reload(); - }); - return; - } - } - divobj.remove(); - divobj = null; - status = false; - pos = {}; - }); - } -}; - -function mygetnativeevent(event) { - - while(event && typeof event.originalEvent !== "undefined") { - event = event.originalEvent; - } - return event; -} - -function evalscript(s) { - if(s.indexOf(']*?>([^\x00]*?)<\/script>/ig; - var arr = []; - while(arr = p.exec(s)) { - var p1 = /]*?src=\"([^\>]*?)\"[^\>]*?(reload=\"1\")?(?:charset=\"([\w\-]+?)\")?><\/script>/i; - var arr1 = []; - arr1 = p1.exec(arr[0]); - if(arr1) { - appendscript(arr1[1], '', arr1[2], arr1[3]); - } else { - p1 = /([^\x00]+?)<\/script>/i; - arr1 = p1.exec(arr[0]); - appendscript('', arr1[2], arr1[1].indexOf('reload=') != -1); - } - } - return s; -} - -var safescripts = {}, evalscripts = []; - -function appendscript(src, text, reload, charset) { - var id = hash(src + text); - if(!reload && in_array(id, evalscripts)) return; - if(reload && $('#' + id)[0]) { - $('#' + id)[0].parentNode.removeChild($('#' + id)[0]); - } - - evalscripts.push(id); - var scriptNode = document.createElement("script"); - scriptNode.type = "text/javascript"; - scriptNode.id = id; - scriptNode.charset = charset ? charset : (!document.charset ? document.characterSet : document.charset); - try { - if(src) { - scriptNode.src = src; - scriptNode.onloadDone = false; - scriptNode.onload = function () { - scriptNode.onloadDone = true; - JSLOADED[src] = 1; - }; - scriptNode.onreadystatechange = function () { - if((scriptNode.readyState == 'loaded' || scriptNode.readyState == 'complete') && !scriptNode.onloadDone) { - scriptNode.onloadDone = true; - JSLOADED[src] = 1; - } - }; - } else if(text){ - scriptNode.text = text; - } - document.getElementsByTagName('head')[0].appendChild(scriptNode); - } catch(e) {} -} - -function hash(string, length) { - var length = length ? length : 32; - var start = 0; - var i = 0; - var result = ''; - filllen = length - string.length % length; - for(i = 0; i < filllen; i++){ - string += "0"; - } - while(start < string.length) { - result = stringxor(result, string.substr(start, length)); - start += length; - } - return result; -} - -function stringxor(s1, s2) { - var s = ''; - var hash = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; - var max = Math.max(s1.length, s2.length); - for(var i=0; i cookie_start ? cookie_end : document.cookie.length)); - return !nounescape ? unescape(v) : v; - } -} - -$(document).ready(function() { - - if($('div.pg').length > 0) { - page.converthtml(); - } - if($('.scrolltop').length > 0) { - scrolltop.init($('.scrolltop')); - } - if($('img').length > 0) { - img.init(1); - } - if($('.popup').length > 0) { - popup.init(); - } - if($('.display').length > 0) { - display.init(); - } - if($('.atap').length > 0) { - atap.init(); - } - if($('.pullrefresh').length > 0) { - pullrefresh.init(); - } - dialog.init(); - formdialog.init(); - redirect.init(); -}); \ No newline at end of file diff --git a/upload/source/plugin/wechat/template/mobile/icon_arrow.png b/upload/source/plugin/wechat/template/mobile/icon_arrow.png deleted file mode 100644 index cbd26938..00000000 Binary files a/upload/source/plugin/wechat/template/mobile/icon_arrow.png and /dev/null differ diff --git a/upload/source/plugin/wechat/template/mobile/icon_close.png b/upload/source/plugin/wechat/template/mobile/icon_close.png deleted file mode 100644 index 1f739104..00000000 Binary files a/upload/source/plugin/wechat/template/mobile/icon_close.png and /dev/null differ diff --git a/upload/source/plugin/wechat/template/mobile/index.htm b/upload/source/plugin/wechat/template/mobile/index.htm deleted file mode 100644 index e69de29b..00000000 diff --git a/upload/source/plugin/wechat/template/mobile/jquery-1.8.3.min.js b/upload/source/plugin/wechat/template/mobile/jquery-1.8.3.min.js deleted file mode 100644 index 83589daa..00000000 --- a/upload/source/plugin/wechat/template/mobile/jquery-1.8.3.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! jQuery v1.8.3 jquery.com | jquery.org/license */ -(function(e,t){function _(e){var t=M[e]={};return v.each(e.split(y),function(e,n){t[n]=!0}),t}function H(e,n,r){if(r===t&&e.nodeType===1){var i="data-"+n.replace(P,"-$1").toLowerCase();r=e.getAttribute(i);if(typeof r=="string"){try{r=r==="true"?!0:r==="false"?!1:r==="null"?null:+r+""===r?+r:D.test(r)?v.parseJSON(r):r}catch(s){}v.data(e,n,r)}else r=t}return r}function B(e){var t;for(t in e){if(t==="data"&&v.isEmptyObject(e[t]))continue;if(t!=="toJSON")return!1}return!0}function et(){return!1}function tt(){return!0}function ut(e){return!e||!e.parentNode||e.parentNode.nodeType===11}function at(e,t){do e=e[t];while(e&&e.nodeType!==1);return e}function ft(e,t,n){t=t||0;if(v.isFunction(t))return v.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return v.grep(e,function(e,r){return e===t===n});if(typeof t=="string"){var r=v.grep(e,function(e){return e.nodeType===1});if(it.test(t))return v.filter(t,r,!n);t=v.filter(t,r)}return v.grep(e,function(e,r){return v.inArray(e,t)>=0===n})}function lt(e){var t=ct.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}function Lt(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function At(e,t){if(t.nodeType!==1||!v.hasData(e))return;var n,r,i,s=v._data(e),o=v._data(t,s),u=s.events;if(u){delete o.handle,o.events={};for(n in u)for(r=0,i=u[n].length;r").appendTo(i.body),n=t.css("display");t.remove();if(n==="none"||n===""){Pt=i.body.appendChild(Pt||v.extend(i.createElement("iframe"),{frameBorder:0,width:0,height:0}));if(!Ht||!Pt.createElement)Ht=(Pt.contentWindow||Pt.contentDocument).document,Ht.write(""),Ht.close();t=Ht.body.appendChild(Ht.createElement(e)),n=Dt(t,"display"),i.body.removeChild(Pt)}return Wt[e]=n,n}function fn(e,t,n,r){var i;if(v.isArray(t))v.each(t,function(t,i){n||sn.test(e)?r(e,i):fn(e+"["+(typeof i=="object"?t:"")+"]",i,n,r)});else if(!n&&v.type(t)==="object")for(i in t)fn(e+"["+i+"]",t[i],n,r);else r(e,t)}function Cn(e){return function(t,n){typeof t!="string"&&(n=t,t="*");var r,i,s,o=t.toLowerCase().split(y),u=0,a=o.length;if(v.isFunction(n))for(;u)[^>]*$|#([\w\-]*)$)/,E=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,S=/^[\],:{}\s]*$/,x=/(?:^|:|,)(?:\s*\[)+/g,T=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,N=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,C=/^-ms-/,k=/-([\da-z])/gi,L=function(e,t){return(t+"").toUpperCase()},A=function(){i.addEventListener?(i.removeEventListener("DOMContentLoaded",A,!1),v.ready()):i.readyState==="complete"&&(i.detachEvent("onreadystatechange",A),v.ready())},O={};v.fn=v.prototype={constructor:v,init:function(e,n,r){var s,o,u,a;if(!e)return this;if(e.nodeType)return this.context=this[0]=e,this.length=1,this;if(typeof e=="string"){e.charAt(0)==="<"&&e.charAt(e.length-1)===">"&&e.length>=3?s=[null,e,null]:s=w.exec(e);if(s&&(s[1]||!n)){if(s[1])return n=n instanceof v?n[0]:n,a=n&&n.nodeType?n.ownerDocument||n:i,e=v.parseHTML(s[1],a,!0),E.test(s[1])&&v.isPlainObject(n)&&this.attr.call(e,n,!0),v.merge(this,e);o=i.getElementById(s[2]);if(o&&o.parentNode){if(o.id!==s[2])return r.find(e);this.length=1,this[0]=o}return this.context=i,this.selector=e,this}return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e)}return v.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),v.makeArray(e,this))},selector:"",jquery:"1.8.3",length:0,size:function(){return this.length},toArray:function(){return l.call(this)},get:function(e){return e==null?this.toArray():e<0?this[this.length+e]:this[e]},pushStack:function(e,t,n){var r=v.merge(this.constructor(),e);return r.prevObject=this,r.context=this.context,t==="find"?r.selector=this.selector+(this.selector?" ":"")+n:t&&(r.selector=this.selector+"."+t+"("+n+")"),r},each:function(e,t){return v.each(this,e,t)},ready:function(e){return v.ready.promise().done(e),this},eq:function(e){return e=+e,e===-1?this.slice(e):this.slice(e,e+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(l.apply(this,arguments),"slice",l.call(arguments).join(","))},map:function(e){return this.pushStack(v.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:[].sort,splice:[].splice},v.fn.init.prototype=v.fn,v.extend=v.fn.extend=function(){var e,n,r,i,s,o,u=arguments[0]||{},a=1,f=arguments.length,l=!1;typeof u=="boolean"&&(l=u,u=arguments[1]||{},a=2),typeof u!="object"&&!v.isFunction(u)&&(u={}),f===a&&(u=this,--a);for(;a0)return;r.resolveWith(i,[v]),v.fn.trigger&&v(i).trigger("ready").off("ready")},isFunction:function(e){return v.type(e)==="function"},isArray:Array.isArray||function(e){return v.type(e)==="array"},isWindow:function(e){return e!=null&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return e==null?String(e):O[h.call(e)]||"object"},isPlainObject:function(e){if(!e||v.type(e)!=="object"||e.nodeType||v.isWindow(e))return!1;try{if(e.constructor&&!p.call(e,"constructor")&&!p.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var r;for(r in e);return r===t||p.call(e,r)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw new Error(e)},parseHTML:function(e,t,n){var r;return!e||typeof e!="string"?null:(typeof t=="boolean"&&(n=t,t=0),t=t||i,(r=E.exec(e))?[t.createElement(r[1])]:(r=v.buildFragment([e],t,n?null:[]),v.merge([],(r.cacheable?v.clone(r.fragment):r.fragment).childNodes)))},parseJSON:function(t){if(!t||typeof t!="string")return null;t=v.trim(t);if(e.JSON&&e.JSON.parse)return e.JSON.parse(t);if(S.test(t.replace(T,"@").replace(N,"]").replace(x,"")))return(new Function("return "+t))();v.error("Invalid JSON: "+t)},parseXML:function(n){var r,i;if(!n||typeof n!="string")return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(s){r=t}return(!r||!r.documentElement||r.getElementsByTagName("parsererror").length)&&v.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&g.test(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(C,"ms-").replace(k,L)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,n,r){var i,s=0,o=e.length,u=o===t||v.isFunction(e);if(r){if(u){for(i in e)if(n.apply(e[i],r)===!1)break}else for(;s0&&e[0]&&e[a-1]||a===0||v.isArray(e));if(f)for(;u-1)a.splice(n,1),i&&(n<=o&&o--,n<=u&&u--)}),this},has:function(e){return v.inArray(e,a)>-1},empty:function(){return a=[],this},disable:function(){return a=f=n=t,this},disabled:function(){return!a},lock:function(){return f=t,n||c.disable(),this},locked:function(){return!f},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],a&&(!r||f)&&(i?f.push(t):l(t)),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},v.extend({Deferred:function(e){var t=[["resolve","done",v.Callbacks("once memory"),"resolved"],["reject","fail",v.Callbacks("once memory"),"rejected"],["notify","progress",v.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return v.Deferred(function(n){v.each(t,function(t,r){var s=r[0],o=e[t];i[r[1]](v.isFunction(o)?function(){var e=o.apply(this,arguments);e&&v.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[s+"With"](this===i?n:this,[e])}:n[s])}),e=null}).promise()},promise:function(e){return e!=null?v.extend(e,r):r}},i={};return r.pipe=r.then,v.each(t,function(e,s){var o=s[2],u=s[3];r[s[1]]=o.add,u&&o.add(function(){n=u},t[e^1][2].disable,t[2][2].lock),i[s[0]]=o.fire,i[s[0]+"With"]=o.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=l.call(arguments),r=n.length,i=r!==1||e&&v.isFunction(e.promise)?r:0,s=i===1?e:v.Deferred(),o=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?l.call(arguments):r,n===u?s.notifyWith(t,n):--i||s.resolveWith(t,n)}},u,a,f;if(r>1){u=new Array(r),a=new Array(r),f=new Array(r);for(;t
    a",n=p.getElementsByTagName("*"),r=p.getElementsByTagName("a")[0];if(!n||!r||!n.length)return{};s=i.createElement("select"),o=s.appendChild(i.createElement("option")),u=p.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t={leadingWhitespace:p.firstChild.nodeType===3,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.getElementsByTagName("link").length,style:/top/.test(r.getAttribute("style")),hrefNormalized:r.getAttribute("href")==="/a",opacity:/^0.5/.test(r.style.opacity),cssFloat:!!r.style.cssFloat,checkOn:u.value==="on",optSelected:o.selected,getSetAttribute:p.className!=="t",enctype:!!i.createElement("form").enctype,html5Clone:i.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",boxModel:i.compatMode==="CSS1Compat",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},u.checked=!0,t.noCloneChecked=u.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!o.disabled;try{delete p.test}catch(d){t.deleteExpando=!1}!p.addEventListener&&p.attachEvent&&p.fireEvent&&(p.attachEvent("onclick",h=function(){t.noCloneEvent=!1}),p.cloneNode(!0).fireEvent("onclick"),p.detachEvent("onclick",h)),u=i.createElement("input"),u.value="t",u.setAttribute("type","radio"),t.radioValue=u.value==="t",u.setAttribute("checked","checked"),u.setAttribute("name","t"),p.appendChild(u),a=i.createDocumentFragment(),a.appendChild(p.lastChild),t.checkClone=a.cloneNode(!0).cloneNode(!0).lastChild.checked,t.appendChecked=u.checked,a.removeChild(u),a.appendChild(p);if(p.attachEvent)for(l in{submit:!0,change:!0,focusin:!0})f="on"+l,c=f in p,c||(p.setAttribute(f,"return;"),c=typeof p[f]=="function"),t[l+"Bubbles"]=c;return v(function(){var n,r,s,o,u="padding:0;margin:0;border:0;display:block;overflow:hidden;",a=i.getElementsByTagName("body")[0];if(!a)return;n=i.createElement("div"),n.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px",a.insertBefore(n,a.firstChild),r=i.createElement("div"),n.appendChild(r),r.innerHTML="
    t
    ",s=r.getElementsByTagName("td"),s[0].style.cssText="padding:0;margin:0;border:0;display:none",c=s[0].offsetHeight===0,s[0].style.display="",s[1].style.display="none",t.reliableHiddenOffsets=c&&s[0].offsetHeight===0,r.innerHTML="",r.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",t.boxSizing=r.offsetWidth===4,t.doesNotIncludeMarginInBodyOffset=a.offsetTop!==1,e.getComputedStyle&&(t.pixelPosition=(e.getComputedStyle(r,null)||{}).top!=="1%",t.boxSizingReliable=(e.getComputedStyle(r,null)||{width:"4px"}).width==="4px",o=i.createElement("div"),o.style.cssText=r.style.cssText=u,o.style.marginRight=o.style.width="0",r.style.width="1px",r.appendChild(o),t.reliableMarginRight=!parseFloat((e.getComputedStyle(o,null)||{}).marginRight)),typeof r.style.zoom!="undefined"&&(r.innerHTML="",r.style.cssText=u+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=r.offsetWidth===3,r.style.display="block",r.style.overflow="visible",r.innerHTML="
    ",r.firstChild.style.width="5px",t.shrinkWrapBlocks=r.offsetWidth!==3,n.style.zoom=1),a.removeChild(n),n=r=s=o=null}),a.removeChild(p),n=r=s=o=u=a=p=null,t}();var D=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,P=/([A-Z])/g;v.extend({cache:{},deletedIds:[],uuid:0,expando:"jQuery"+(v.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?v.cache[e[v.expando]]:e[v.expando],!!e&&!B(e)},data:function(e,n,r,i){if(!v.acceptData(e))return;var s,o,u=v.expando,a=typeof n=="string",f=e.nodeType,l=f?v.cache:e,c=f?e[u]:e[u]&&u;if((!c||!l[c]||!i&&!l[c].data)&&a&&r===t)return;c||(f?e[u]=c=v.deletedIds.pop()||v.guid++:c=u),l[c]||(l[c]={},f||(l[c].toJSON=v.noop));if(typeof n=="object"||typeof n=="function")i?l[c]=v.extend(l[c],n):l[c].data=v.extend(l[c].data,n);return s=l[c],i||(s.data||(s.data={}),s=s.data),r!==t&&(s[v.camelCase(n)]=r),a?(o=s[n],o==null&&(o=s[v.camelCase(n)])):o=s,o},removeData:function(e,t,n){if(!v.acceptData(e))return;var r,i,s,o=e.nodeType,u=o?v.cache:e,a=o?e[v.expando]:v.expando;if(!u[a])return;if(t){r=n?u[a]:u[a].data;if(r){v.isArray(t)||(t in r?t=[t]:(t=v.camelCase(t),t in r?t=[t]:t=t.split(" ")));for(i=0,s=t.length;i1,null,!1))},removeData:function(e){return this.each(function(){v.removeData(this,e)})}}),v.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=v._data(e,t),n&&(!r||v.isArray(n)?r=v._data(e,t,v.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=v.queue(e,t),r=n.length,i=n.shift(),s=v._queueHooks(e,t),o=function(){v.dequeue(e,t)};i==="inprogress"&&(i=n.shift(),r--),i&&(t==="fx"&&n.unshift("inprogress"),delete s.stop,i.call(e,o,s)),!r&&s&&s.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return v._data(e,n)||v._data(e,n,{empty:v.Callbacks("once memory").add(function(){v.removeData(e,t+"queue",!0),v.removeData(e,n,!0)})})}}),v.fn.extend({queue:function(e,n){var r=2;return typeof e!="string"&&(n=e,e="fx",r--),arguments.length1)},removeAttr:function(e){return this.each(function(){v.removeAttr(this,e)})},prop:function(e,t){return v.access(this,v.prop,e,t,arguments.length>1)},removeProp:function(e){return e=v.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,s,o,u;if(v.isFunction(e))return this.each(function(t){v(this).addClass(e.call(this,t,this.className))});if(e&&typeof e=="string"){t=e.split(y);for(n=0,r=this.length;n=0)r=r.replace(" "+n[s]+" "," ");i.className=e?v.trim(r):""}}}return this},toggleClass:function(e,t){var n=typeof e,r=typeof t=="boolean";return v.isFunction(e)?this.each(function(n){v(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if(n==="string"){var i,s=0,o=v(this),u=t,a=e.split(y);while(i=a[s++])u=r?u:!o.hasClass(i),o[u?"addClass":"removeClass"](i)}else if(n==="undefined"||n==="boolean")this.className&&v._data(this,"__className__",this.className),this.className=this.className||e===!1?"":v._data(this,"__className__")||""})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;n=0)return!0;return!1},val:function(e){var n,r,i,s=this[0];if(!arguments.length){if(s)return n=v.valHooks[s.type]||v.valHooks[s.nodeName.toLowerCase()],n&&"get"in n&&(r=n.get(s,"value"))!==t?r:(r=s.value,typeof r=="string"?r.replace(R,""):r==null?"":r);return}return i=v.isFunction(e),this.each(function(r){var s,o=v(this);if(this.nodeType!==1)return;i?s=e.call(this,r,o.val()):s=e,s==null?s="":typeof s=="number"?s+="":v.isArray(s)&&(s=v.map(s,function(e){return e==null?"":e+""})),n=v.valHooks[this.type]||v.valHooks[this.nodeName.toLowerCase()];if(!n||!("set"in n)||n.set(this,s,"value")===t)this.value=s})}}),v.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,s=e.type==="select-one"||i<0,o=s?null:[],u=s?i+1:r.length,a=i<0?u:s?i:0;for(;a=0}),n.length||(e.selectedIndex=-1),n}}},attrFn:{},attr:function(e,n,r,i){var s,o,u,a=e.nodeType;if(!e||a===3||a===8||a===2)return;if(i&&v.isFunction(v.fn[n]))return v(e)[n](r);if(typeof e.getAttribute=="undefined")return v.prop(e,n,r);u=a!==1||!v.isXMLDoc(e),u&&(n=n.toLowerCase(),o=v.attrHooks[n]||(X.test(n)?F:j));if(r!==t){if(r===null){v.removeAttr(e,n);return}return o&&"set"in o&&u&&(s=o.set(e,r,n))!==t?s:(e.setAttribute(n,r+""),r)}return o&&"get"in o&&u&&(s=o.get(e,n))!==null?s:(s=e.getAttribute(n),s===null?t:s)},removeAttr:function(e,t){var n,r,i,s,o=0;if(t&&e.nodeType===1){r=t.split(y);for(;o=0}})});var $=/^(?:textarea|input|select)$/i,J=/^([^\.]*|)(?:\.(.+)|)$/,K=/(?:^|\s)hover(\.\S+|)\b/,Q=/^key/,G=/^(?:mouse|contextmenu)|click/,Y=/^(?:focusinfocus|focusoutblur)$/,Z=function(e){return v.event.special.hover?e:e.replace(K,"mouseenter$1 mouseleave$1")};v.event={add:function(e,n,r,i,s){var o,u,a,f,l,c,h,p,d,m,g;if(e.nodeType===3||e.nodeType===8||!n||!r||!(o=v._data(e)))return;r.handler&&(d=r,r=d.handler,s=d.selector),r.guid||(r.guid=v.guid++),a=o.events,a||(o.events=a={}),u=o.handle,u||(o.handle=u=function(e){return typeof v=="undefined"||!!e&&v.event.triggered===e.type?t:v.event.dispatch.apply(u.elem,arguments)},u.elem=e),n=v.trim(Z(n)).split(" ");for(f=0;f=0&&(y=y.slice(0,-1),a=!0),y.indexOf(".")>=0&&(b=y.split("."),y=b.shift(),b.sort());if((!s||v.event.customEvent[y])&&!v.event.global[y])return;n=typeof n=="object"?n[v.expando]?n:new v.Event(y,n):new v.Event(y),n.type=y,n.isTrigger=!0,n.exclusive=a,n.namespace=b.join("."),n.namespace_re=n.namespace?new RegExp("(^|\\.)"+b.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,h=y.indexOf(":")<0?"on"+y:"";if(!s){u=v.cache;for(f in u)u[f].events&&u[f].events[y]&&v.event.trigger(n,r,u[f].handle.elem,!0);return}n.result=t,n.target||(n.target=s),r=r!=null?v.makeArray(r):[],r.unshift(n),p=v.event.special[y]||{};if(p.trigger&&p.trigger.apply(s,r)===!1)return;m=[[s,p.bindType||y]];if(!o&&!p.noBubble&&!v.isWindow(s)){g=p.delegateType||y,l=Y.test(g+y)?s:s.parentNode;for(c=s;l;l=l.parentNode)m.push([l,g]),c=l;c===(s.ownerDocument||i)&&m.push([c.defaultView||c.parentWindow||e,g])}for(f=0;f=0:v.find(h,this,null,[s]).length),u[h]&&f.push(c);f.length&&w.push({elem:s,matches:f})}d.length>m&&w.push({elem:this,matches:d.slice(m)});for(r=0;r0?this.on(t,null,e,n):this.trigger(t)},Q.test(t)&&(v.event.fixHooks[t]=v.event.keyHooks),G.test(t)&&(v.event.fixHooks[t]=v.event.mouseHooks)}),function(e,t){function nt(e,t,n,r){n=n||[],t=t||g;var i,s,a,f,l=t.nodeType;if(!e||typeof e!="string")return n;if(l!==1&&l!==9)return[];a=o(t);if(!a&&!r)if(i=R.exec(e))if(f=i[1]){if(l===9){s=t.getElementById(f);if(!s||!s.parentNode)return n;if(s.id===f)return n.push(s),n}else if(t.ownerDocument&&(s=t.ownerDocument.getElementById(f))&&u(t,s)&&s.id===f)return n.push(s),n}else{if(i[2])return S.apply(n,x.call(t.getElementsByTagName(e),0)),n;if((f=i[3])&&Z&&t.getElementsByClassName)return S.apply(n,x.call(t.getElementsByClassName(f),0)),n}return vt(e.replace(j,"$1"),t,n,r,a)}function rt(e){return function(t){var n=t.nodeName.toLowerCase();return n==="input"&&t.type===e}}function it(e){return function(t){var n=t.nodeName.toLowerCase();return(n==="input"||n==="button")&&t.type===e}}function st(e){return N(function(t){return t=+t,N(function(n,r){var i,s=e([],n.length,t),o=s.length;while(o--)n[i=s[o]]&&(n[i]=!(r[i]=n[i]))})})}function ot(e,t,n){if(e===t)return n;var r=e.nextSibling;while(r){if(r===t)return-1;r=r.nextSibling}return 1}function ut(e,t){var n,r,s,o,u,a,f,l=L[d][e+" "];if(l)return t?0:l.slice(0);u=e,a=[],f=i.preFilter;while(u){if(!n||(r=F.exec(u)))r&&(u=u.slice(r[0].length)||u),a.push(s=[]);n=!1;if(r=I.exec(u))s.push(n=new m(r.shift())),u=u.slice(n.length),n.type=r[0].replace(j," ");for(o in i.filter)(r=J[o].exec(u))&&(!f[o]||(r=f[o](r)))&&(s.push(n=new m(r.shift())),u=u.slice(n.length),n.type=o,n.matches=r);if(!n)break}return t?u.length:u?nt.error(e):L(e,a).slice(0)}function at(e,t,r){var i=t.dir,s=r&&t.dir==="parentNode",o=w++;return t.first?function(t,n,r){while(t=t[i])if(s||t.nodeType===1)return e(t,n,r)}:function(t,r,u){if(!u){var a,f=b+" "+o+" ",l=f+n;while(t=t[i])if(s||t.nodeType===1){if((a=t[d])===l)return t.sizset;if(typeof a=="string"&&a.indexOf(f)===0){if(t.sizset)return t}else{t[d]=l;if(e(t,r,u))return t.sizset=!0,t;t.sizset=!1}}}else while(t=t[i])if(s||t.nodeType===1)if(e(t,r,u))return t}}function ft(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function lt(e,t,n,r,i){var s,o=[],u=0,a=e.length,f=t!=null;for(;u-1&&(s[f]=!(o[f]=c))}}else g=lt(g===o?g.splice(d,g.length):g),i?i(null,o,g,a):S.apply(o,g)})}function ht(e){var t,n,r,s=e.length,o=i.relative[e[0].type],u=o||i.relative[" "],a=o?1:0,f=at(function(e){return e===t},u,!0),l=at(function(e){return T.call(t,e)>-1},u,!0),h=[function(e,n,r){return!o&&(r||n!==c)||((t=n).nodeType?f(e,n,r):l(e,n,r))}];for(;a1&&ft(h),a>1&&e.slice(0,a-1).join("").replace(j,"$1"),n,a0,s=e.length>0,o=function(u,a,f,l,h){var p,d,v,m=[],y=0,w="0",x=u&&[],T=h!=null,N=c,C=u||s&&i.find.TAG("*",h&&a.parentNode||a),k=b+=N==null?1:Math.E;T&&(c=a!==g&&a,n=o.el);for(;(p=C[w])!=null;w++){if(s&&p){for(d=0;v=e[d];d++)if(v(p,a,f)){l.push(p);break}T&&(b=k,n=++o.el)}r&&((p=!v&&p)&&y--,u&&x.push(p))}y+=w;if(r&&w!==y){for(d=0;v=t[d];d++)v(x,m,a,f);if(u){if(y>0)while(w--)!x[w]&&!m[w]&&(m[w]=E.call(l));m=lt(m)}S.apply(l,m),T&&!u&&m.length>0&&y+t.length>1&&nt.uniqueSort(l)}return T&&(b=k,c=N),x};return o.el=0,r?N(o):o}function dt(e,t,n){var r=0,i=t.length;for(;r2&&(f=u[0]).type==="ID"&&t.nodeType===9&&!s&&i.relative[u[1].type]){t=i.find.ID(f.matches[0].replace($,""),t,s)[0];if(!t)return n;e=e.slice(u.shift().length)}for(o=J.POS.test(e)?-1:u.length-1;o>=0;o--){f=u[o];if(i.relative[l=f.type])break;if(c=i.find[l])if(r=c(f.matches[0].replace($,""),z.test(u[0].type)&&t.parentNode||t,s)){u.splice(o,1),e=r.length&&u.join("");if(!e)return S.apply(n,x.call(r,0)),n;break}}}return a(e,h)(r,t,s,n,z.test(e)),n}function mt(){}var n,r,i,s,o,u,a,f,l,c,h=!0,p="undefined",d=("sizcache"+Math.random()).replace(".",""),m=String,g=e.document,y=g.documentElement,b=0,w=0,E=[].pop,S=[].push,x=[].slice,T=[].indexOf||function(e){var t=0,n=this.length;for(;ti.cacheLength&&delete e[t.shift()],e[n+" "]=r},e)},k=C(),L=C(),A=C(),O="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",_=M.replace("w","w#"),D="([*^$|!~]?=)",P="\\["+O+"*("+M+")"+O+"*(?:"+D+O+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+_+")|)|)"+O+"*\\]",H=":("+M+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:"+P+")|[^:]|\\\\.)*|.*))\\)|)",B=":(even|odd|eq|gt|lt|nth|first|last)(?:\\("+O+"*((?:-\\d)?\\d*)"+O+"*\\)|)(?=[^-]|$)",j=new RegExp("^"+O+"+|((?:^|[^\\\\])(?:\\\\.)*)"+O+"+$","g"),F=new RegExp("^"+O+"*,"+O+"*"),I=new RegExp("^"+O+"*([\\x20\\t\\r\\n\\f>+~])"+O+"*"),q=new RegExp(H),R=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,U=/^:not/,z=/[\x20\t\r\n\f]*[+~]/,W=/:not\($/,X=/h\d/i,V=/input|select|textarea|button/i,$=/\\(?!\\)/g,J={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),NAME:new RegExp("^\\[name=['\"]?("+M+")['\"]?\\]"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+H),POS:new RegExp(B,"i"),CHILD:new RegExp("^:(only|nth|first|last)-child(?:\\("+O+"*(even|odd|(([+-]|)(\\d*)n|)"+O+"*(?:([+-]|)"+O+"*(\\d+)|))"+O+"*\\)|)","i"),needsContext:new RegExp("^"+O+"*[>+~]|"+B,"i")},K=function(e){var t=g.createElement("div");try{return e(t)}catch(n){return!1}finally{t=null}},Q=K(function(e){return e.appendChild(g.createComment("")),!e.getElementsByTagName("*").length}),G=K(function(e){return e.innerHTML="",e.firstChild&&typeof e.firstChild.getAttribute!==p&&e.firstChild.getAttribute("href")==="#"}),Y=K(function(e){e.innerHTML="";var t=typeof e.lastChild.getAttribute("multiple");return t!=="boolean"&&t!=="string"}),Z=K(function(e){return e.innerHTML="",!e.getElementsByClassName||!e.getElementsByClassName("e").length?!1:(e.lastChild.className="e",e.getElementsByClassName("e").length===2)}),et=K(function(e){e.id=d+0,e.innerHTML="
    ",y.insertBefore(e,y.firstChild);var t=g.getElementsByName&&g.getElementsByName(d).length===2+g.getElementsByName(d+0).length;return r=!g.getElementById(d),y.removeChild(e),t});try{x.call(y.childNodes,0)[0].nodeType}catch(tt){x=function(e){var t,n=[];for(;t=this[e];e++)n.push(t);return n}}nt.matches=function(e,t){return nt(e,null,null,t)},nt.matchesSelector=function(e,t){return nt(t,null,null,[e]).length>0},s=nt.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(i===1||i===9||i===11){if(typeof e.textContent=="string")return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=s(e)}else if(i===3||i===4)return e.nodeValue}else for(;t=e[r];r++)n+=s(t);return n},o=nt.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?t.nodeName!=="HTML":!1},u=nt.contains=y.contains?function(e,t){var n=e.nodeType===9?e.documentElement:e,r=t&&t.parentNode;return e===r||!!(r&&r.nodeType===1&&n.contains&&n.contains(r))}:y.compareDocumentPosition?function(e,t){return t&&!!(e.compareDocumentPosition(t)&16)}:function(e,t){while(t=t.parentNode)if(t===e)return!0;return!1},nt.attr=function(e,t){var n,r=o(e);return r||(t=t.toLowerCase()),(n=i.attrHandle[t])?n(e):r||Y?e.getAttribute(t):(n=e.getAttributeNode(t),n?typeof e[t]=="boolean"?e[t]?t:null:n.specified?n.value:null:null)},i=nt.selectors={cacheLength:50,createPseudo:N,match:J,attrHandle:G?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},find:{ID:r?function(e,t,n){if(typeof t.getElementById!==p&&!n){var r=t.getElementById(e);return r&&r.parentNode?[r]:[]}}:function(e,n,r){if(typeof n.getElementById!==p&&!r){var i=n.getElementById(e);return i?i.id===e||typeof i.getAttributeNode!==p&&i.getAttributeNode("id").value===e?[i]:t:[]}},TAG:Q?function(e,t){if(typeof t.getElementsByTagName!==p)return t.getElementsByTagName(e)}:function(e,t){var n=t.getElementsByTagName(e);if(e==="*"){var r,i=[],s=0;for(;r=n[s];s++)r.nodeType===1&&i.push(r);return i}return n},NAME:et&&function(e,t){if(typeof t.getElementsByName!==p)return t.getElementsByName(name)},CLASS:Z&&function(e,t,n){if(typeof t.getElementsByClassName!==p&&!n)return t.getElementsByClassName(e)}},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace($,""),e[3]=(e[4]||e[5]||"").replace($,""),e[2]==="~="&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),e[1]==="nth"?(e[2]||nt.error(e[0]),e[3]=+(e[3]?e[4]+(e[5]||1):2*(e[2]==="even"||e[2]==="odd")),e[4]=+(e[6]+e[7]||e[2]==="odd")):e[2]&&nt.error(e[0]),e},PSEUDO:function(e){var t,n;if(J.CHILD.test(e[0]))return null;if(e[3])e[2]=e[3];else if(t=e[4])q.test(t)&&(n=ut(t,!0))&&(n=t.indexOf(")",t.length-n)-t.length)&&(t=t.slice(0,n),e[0]=e[0].slice(0,n)),e[2]=t;return e.slice(0,3)}},filter:{ID:r?function(e){return e=e.replace($,""),function(t){return t.getAttribute("id")===e}}:function(e){return e=e.replace($,""),function(t){var n=typeof t.getAttributeNode!==p&&t.getAttributeNode("id");return n&&n.value===e}},TAG:function(e){return e==="*"?function(){return!0}:(e=e.replace($,"").toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=k[d][e+" "];return t||(t=new RegExp("(^|"+O+")"+e+"("+O+"|$)"))&&k(e,function(e){return t.test(e.className||typeof e.getAttribute!==p&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r,i){var s=nt.attr(r,e);return s==null?t==="!=":t?(s+="",t==="="?s===n:t==="!="?s!==n:t==="^="?n&&s.indexOf(n)===0:t==="*="?n&&s.indexOf(n)>-1:t==="$="?n&&s.substr(s.length-n.length)===n:t==="~="?(" "+s+" ").indexOf(n)>-1:t==="|="?s===n||s.substr(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r){return e==="nth"?function(e){var t,i,s=e.parentNode;if(n===1&&r===0)return!0;if(s){i=0;for(t=s.firstChild;t;t=t.nextSibling)if(t.nodeType===1){i++;if(e===t)break}}return i-=r,i===n||i%n===0&&i/n>=0}:function(t){var n=t;switch(e){case"only":case"first":while(n=n.previousSibling)if(n.nodeType===1)return!1;if(e==="first")return!0;n=t;case"last":while(n=n.nextSibling)if(n.nodeType===1)return!1;return!0}}},PSEUDO:function(e,t){var n,r=i.pseudos[e]||i.setFilters[e.toLowerCase()]||nt.error("unsupported pseudo: "+e);return r[d]?r(t):r.length>1?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?N(function(e,n){var i,s=r(e,t),o=s.length;while(o--)i=T.call(e,s[o]),e[i]=!(n[i]=s[o])}):function(e){return r(e,0,n)}):r}},pseudos:{not:N(function(e){var t=[],n=[],r=a(e.replace(j,"$1"));return r[d]?N(function(e,t,n,i){var s,o=r(e,null,i,[]),u=e.length;while(u--)if(s=o[u])e[u]=!(t[u]=s)}):function(e,i,s){return t[0]=e,r(t,null,s,n),!n.pop()}}),has:N(function(e){return function(t){return nt(e,t).length>0}}),contains:N(function(e){return function(t){return(t.textContent||t.innerText||s(t)).indexOf(e)>-1}}),enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&!!e.checked||t==="option"&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},parent:function(e){return!i.pseudos.empty(e)},empty:function(e){var t;e=e.firstChild;while(e){if(e.nodeName>"@"||(t=e.nodeType)===3||t===4)return!1;e=e.nextSibling}return!0},header:function(e){return X.test(e.nodeName)},text:function(e){var t,n;return e.nodeName.toLowerCase()==="input"&&(t=e.type)==="text"&&((n=e.getAttribute("type"))==null||n.toLowerCase()===t)},radio:rt("radio"),checkbox:rt("checkbox"),file:rt("file"),password:rt("password"),image:rt("image"),submit:it("submit"),reset:it("reset"),button:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&e.type==="button"||t==="button"},input:function(e){return V.test(e.nodeName)},focus:function(e){var t=e.ownerDocument;return e===t.activeElement&&(!t.hasFocus||t.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},active:function(e){return e===e.ownerDocument.activeElement},first:st(function(){return[0]}),last:st(function(e,t){return[t-1]}),eq:st(function(e,t,n){return[n<0?n+t:n]}),even:st(function(e,t){for(var n=0;n=0;)e.push(r);return e}),gt:st(function(e,t,n){for(var r=n<0?n+t:n;++r",e.querySelectorAll("[selected]").length||i.push("\\["+O+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||i.push(":checked")}),K(function(e){e.innerHTML="

    ",e.querySelectorAll("[test^='']").length&&i.push("[*^$]="+O+"*(?:\"\"|'')"),e.innerHTML="",e.querySelectorAll(":enabled").length||i.push(":enabled",":disabled")}),i=new RegExp(i.join("|")),vt=function(e,r,s,o,u){if(!o&&!u&&!i.test(e)){var a,f,l=!0,c=d,h=r,p=r.nodeType===9&&e;if(r.nodeType===1&&r.nodeName.toLowerCase()!=="object"){a=ut(e),(l=r.getAttribute("id"))?c=l.replace(n,"\\$&"):r.setAttribute("id",c),c="[id='"+c+"'] ",f=a.length;while(f--)a[f]=c+a[f].join("");h=z.test(e)&&r.parentNode||r,p=a.join(",")}if(p)try{return S.apply(s,x.call(h.querySelectorAll(p),0)),s}catch(v){}finally{l||r.removeAttribute("id")}}return t(e,r,s,o,u)},u&&(K(function(t){e=u.call(t,"div");try{u.call(t,"[test!='']:sizzle"),s.push("!=",H)}catch(n){}}),s=new RegExp(s.join("|")),nt.matchesSelector=function(t,n){n=n.replace(r,"='$1']");if(!o(t)&&!s.test(n)&&!i.test(n))try{var a=u.call(t,n);if(a||e||t.document&&t.document.nodeType!==11)return a}catch(f){}return nt(n,null,null,[t]).length>0})}(),i.pseudos.nth=i.pseudos.eq,i.filters=mt.prototype=i.pseudos,i.setFilters=new mt,nt.attr=v.attr,v.find=nt,v.expr=nt.selectors,v.expr[":"]=v.expr.pseudos,v.unique=nt.uniqueSort,v.text=nt.getText,v.isXMLDoc=nt.isXML,v.contains=nt.contains}(e);var nt=/Until$/,rt=/^(?:parents|prev(?:Until|All))/,it=/^.[^:#\[\.,]*$/,st=v.expr.match.needsContext,ot={children:!0,contents:!0,next:!0,prev:!0};v.fn.extend({find:function(e){var t,n,r,i,s,o,u=this;if(typeof e!="string")return v(e).filter(function(){for(t=0,n=u.length;t0)for(i=r;i=0:v.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){var n,r=0,i=this.length,s=[],o=st.test(e)||typeof e!="string"?v(e,t||this.context):0;for(;r-1:v.find.matchesSelector(n,e)){s.push(n);break}n=n.parentNode}}return s=s.length>1?v.unique(s):s,this.pushStack(s,"closest",e)},index:function(e){return e?typeof e=="string"?v.inArray(this[0],v(e)):v.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(e,t){var n=typeof e=="string"?v(e,t):v.makeArray(e&&e.nodeType?[e]:e),r=v.merge(this.get(),n);return this.pushStack(ut(n[0])||ut(r[0])?r:v.unique(r))},addBack:function(e){return this.add(e==null?this.prevObject:this.prevObject.filter(e))}}),v.fn.andSelf=v.fn.addBack,v.each({parent:function(e){var t=e.parentNode;return t&&t.nodeType!==11?t:null},parents:function(e){return v.dir(e,"parentNode")},parentsUntil:function(e,t,n){return v.dir(e,"parentNode",n)},next:function(e){return at(e,"nextSibling")},prev:function(e){return at(e,"previousSibling")},nextAll:function(e){return v.dir(e,"nextSibling")},prevAll:function(e){return v.dir(e,"previousSibling")},nextUntil:function(e,t,n){return v.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return v.dir(e,"previousSibling",n)},siblings:function(e){return v.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return v.sibling(e.firstChild)},contents:function(e){return v.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:v.merge([],e.childNodes)}},function(e,t){v.fn[e]=function(n,r){var i=v.map(this,t,n);return nt.test(e)||(r=n),r&&typeof r=="string"&&(i=v.filter(r,i)),i=this.length>1&&!ot[e]?v.unique(i):i,this.length>1&&rt.test(e)&&(i=i.reverse()),this.pushStack(i,e,l.call(arguments).join(","))}}),v.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),t.length===1?v.find.matchesSelector(t[0],e)?[t[0]]:[]:v.find.matches(e,t)},dir:function(e,n,r){var i=[],s=e[n];while(s&&s.nodeType!==9&&(r===t||s.nodeType!==1||!v(s).is(r)))s.nodeType===1&&i.push(s),s=s[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)e.nodeType===1&&e!==t&&n.push(e);return n}});var ct="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",ht=/ jQuery\d+="(?:null|\d+)"/g,pt=/^\s+/,dt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,vt=/<([\w:]+)/,mt=/]","i"),Et=/^(?:checkbox|radio)$/,St=/checked\s*(?:[^=]|=\s*.checked.)/i,xt=/\/(java|ecma)script/i,Tt=/^\s*\s*$/g,Nt={option:[1,""],legend:[1,"
    ","
    "],thead:[1,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],col:[2,"","
    "],area:[1,"",""],_default:[0,"",""]},Ct=lt(i),kt=Ct.appendChild(i.createElement("div"));Nt.optgroup=Nt.option,Nt.tbody=Nt.tfoot=Nt.colgroup=Nt.caption=Nt.thead,Nt.th=Nt.td,v.support.htmlSerialize||(Nt._default=[1,"X
    ","
    "]),v.fn.extend({text:function(e){return v.access(this,function(e){return e===t?v.text(this):this.empty().append((this[0]&&this[0].ownerDocument||i).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(v.isFunction(e))return this.each(function(t){v(this).wrapAll(e.call(this,t))});if(this[0]){var t=v(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&e.firstChild.nodeType===1)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return v.isFunction(e)?this.each(function(t){v(this).wrapInner(e.call(this,t))}):this.each(function(){var t=v(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=v.isFunction(e);return this.each(function(n){v(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){v.nodeName(this,"body")||v(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){(this.nodeType===1||this.nodeType===11)&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){(this.nodeType===1||this.nodeType===11)&&this.insertBefore(e,this.firstChild)})},before:function(){if(!ut(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this)});if(arguments.length){var e=v.clean(arguments);return this.pushStack(v.merge(e,this),"before",this.selector)}},after:function(){if(!ut(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this.nextSibling)});if(arguments.length){var e=v.clean(arguments);return this.pushStack(v.merge(this,e),"after",this.selector)}},remove:function(e,t){var n,r=0;for(;(n=this[r])!=null;r++)if(!e||v.filter(e,[n]).length)!t&&n.nodeType===1&&(v.cleanData(n.getElementsByTagName("*")),v.cleanData([n])),n.parentNode&&n.parentNode.removeChild(n);return this},empty:function(){var e,t=0;for(;(e=this[t])!=null;t++){e.nodeType===1&&v.cleanData(e.getElementsByTagName("*"));while(e.firstChild)e.removeChild(e.firstChild)}return this},clone:function(e,t){return e=e==null?!1:e,t=t==null?e:t,this.map(function(){return v.clone(this,e,t)})},html:function(e){return v.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return n.nodeType===1?n.innerHTML.replace(ht,""):t;if(typeof e=="string"&&!yt.test(e)&&(v.support.htmlSerialize||!wt.test(e))&&(v.support.leadingWhitespace||!pt.test(e))&&!Nt[(vt.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(dt,"<$1>");try{for(;r1&&typeof f=="string"&&St.test(f))return this.each(function(){v(this).domManip(e,n,r)});if(v.isFunction(f))return this.each(function(i){var s=v(this);e[0]=f.call(this,i,n?s.html():t),s.domManip(e,n,r)});if(this[0]){i=v.buildFragment(e,this,l),o=i.fragment,s=o.firstChild,o.childNodes.length===1&&(o=s);if(s){n=n&&v.nodeName(s,"tr");for(u=i.cacheable||c-1;a0?this.clone(!0):this).get(),v(o[i])[t](r),s=s.concat(r);return this.pushStack(s,e,o.selector)}}),v.extend({clone:function(e,t,n){var r,i,s,o;v.support.html5Clone||v.isXMLDoc(e)||!wt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(kt.innerHTML=e.outerHTML,kt.removeChild(o=kt.firstChild));if((!v.support.noCloneEvent||!v.support.noCloneChecked)&&(e.nodeType===1||e.nodeType===11)&&!v.isXMLDoc(e)){Ot(e,o),r=Mt(e),i=Mt(o);for(s=0;r[s];++s)i[s]&&Ot(r[s],i[s])}if(t){At(e,o);if(n){r=Mt(e),i=Mt(o);for(s=0;r[s];++s)At(r[s],i[s])}}return r=i=null,o},clean:function(e,t,n,r){var s,o,u,a,f,l,c,h,p,d,m,g,y=t===i&&Ct,b=[];if(!t||typeof t.createDocumentFragment=="undefined")t=i;for(s=0;(u=e[s])!=null;s++){typeof u=="number"&&(u+="");if(!u)continue;if(typeof u=="string")if(!gt.test(u))u=t.createTextNode(u);else{y=y||lt(t),c=t.createElement("div"),y.appendChild(c),u=u.replace(dt,"<$1>"),a=(vt.exec(u)||["",""])[1].toLowerCase(),f=Nt[a]||Nt._default,l=f[0],c.innerHTML=f[1]+u+f[2];while(l--)c=c.lastChild;if(!v.support.tbody){h=mt.test(u),p=a==="table"&&!h?c.firstChild&&c.firstChild.childNodes:f[1]===""&&!h?c.childNodes:[];for(o=p.length-1;o>=0;--o)v.nodeName(p[o],"tbody")&&!p[o].childNodes.length&&p[o].parentNode.removeChild(p[o])}!v.support.leadingWhitespace&&pt.test(u)&&c.insertBefore(t.createTextNode(pt.exec(u)[0]),c.firstChild),u=c.childNodes,c.parentNode.removeChild(c)}u.nodeType?b.push(u):v.merge(b,u)}c&&(u=c=y=null);if(!v.support.appendChecked)for(s=0;(u=b[s])!=null;s++)v.nodeName(u,"input")?_t(u):typeof u.getElementsByTagName!="undefined"&&v.grep(u.getElementsByTagName("input"),_t);if(n){m=function(e){if(!e.type||xt.test(e.type))return r?r.push(e.parentNode?e.parentNode.removeChild(e):e):n.appendChild(e)};for(s=0;(u=b[s])!=null;s++)if(!v.nodeName(u,"script")||!m(u))n.appendChild(u),typeof u.getElementsByTagName!="undefined"&&(g=v.grep(v.merge([],u.getElementsByTagName("script")),m),b.splice.apply(b,[s+1,0].concat(g)),s+=g.length)}return b},cleanData:function(e,t){var n,r,i,s,o=0,u=v.expando,a=v.cache,f=v.support.deleteExpando,l=v.event.special;for(;(i=e[o])!=null;o++)if(t||v.acceptData(i)){r=i[u],n=r&&a[r];if(n){if(n.events)for(s in n.events)l[s]?v.event.remove(i,s):v.removeEvent(i,s,n.handle);a[r]&&(delete a[r],f?delete i[u]:i.removeAttribute?i.removeAttribute(u):i[u]=null,v.deletedIds.push(r))}}}}),function(){var e,t;v.uaMatch=function(e){e=e.toLowerCase();var t=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}},e=v.uaMatch(o.userAgent),t={},e.browser&&(t[e.browser]=!0,t.version=e.version),t.chrome?t.webkit=!0:t.webkit&&(t.safari=!0),v.browser=t,v.sub=function(){function e(t,n){return new e.fn.init(t,n)}v.extend(!0,e,this),e.superclass=this,e.fn=e.prototype=this(),e.fn.constructor=e,e.sub=this.sub,e.fn.init=function(r,i){return i&&i instanceof v&&!(i instanceof e)&&(i=e(i)),v.fn.init.call(this,r,i,t)},e.fn.init.prototype=e.fn;var t=e(i);return e}}();var Dt,Pt,Ht,Bt=/alpha\([^)]*\)/i,jt=/opacity=([^)]*)/,Ft=/^(top|right|bottom|left)$/,It=/^(none|table(?!-c[ea]).+)/,qt=/^margin/,Rt=new RegExp("^("+m+")(.*)$","i"),Ut=new RegExp("^("+m+")(?!px)[a-z%]+$","i"),zt=new RegExp("^([-+])=("+m+")","i"),Wt={BODY:"block"},Xt={position:"absolute",visibility:"hidden",display:"block"},Vt={letterSpacing:0,fontWeight:400},$t=["Top","Right","Bottom","Left"],Jt=["Webkit","O","Moz","ms"],Kt=v.fn.toggle;v.fn.extend({css:function(e,n){return v.access(this,function(e,n,r){return r!==t?v.style(e,n,r):v.css(e,n)},e,n,arguments.length>1)},show:function(){return Yt(this,!0)},hide:function(){return Yt(this)},toggle:function(e,t){var n=typeof e=="boolean";return v.isFunction(e)&&v.isFunction(t)?Kt.apply(this,arguments):this.each(function(){(n?e:Gt(this))?v(this).show():v(this).hide()})}}),v.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Dt(e,"opacity");return n===""?"1":n}}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":v.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(!e||e.nodeType===3||e.nodeType===8||!e.style)return;var s,o,u,a=v.camelCase(n),f=e.style;n=v.cssProps[a]||(v.cssProps[a]=Qt(f,a)),u=v.cssHooks[n]||v.cssHooks[a];if(r===t)return u&&"get"in u&&(s=u.get(e,!1,i))!==t?s:f[n];o=typeof r,o==="string"&&(s=zt.exec(r))&&(r=(s[1]+1)*s[2]+parseFloat(v.css(e,n)),o="number");if(r==null||o==="number"&&isNaN(r))return;o==="number"&&!v.cssNumber[a]&&(r+="px");if(!u||!("set"in u)||(r=u.set(e,r,i))!==t)try{f[n]=r}catch(l){}},css:function(e,n,r,i){var s,o,u,a=v.camelCase(n);return n=v.cssProps[a]||(v.cssProps[a]=Qt(e.style,a)),u=v.cssHooks[n]||v.cssHooks[a],u&&"get"in u&&(s=u.get(e,!0,i)),s===t&&(s=Dt(e,n)),s==="normal"&&n in Vt&&(s=Vt[n]),r||i!==t?(o=parseFloat(s),r||v.isNumeric(o)?o||0:s):s},swap:function(e,t,n){var r,i,s={};for(i in t)s[i]=e.style[i],e.style[i]=t[i];r=n.call(e);for(i in t)e.style[i]=s[i];return r}}),e.getComputedStyle?Dt=function(t,n){var r,i,s,o,u=e.getComputedStyle(t,null),a=t.style;return u&&(r=u.getPropertyValue(n)||u[n],r===""&&!v.contains(t.ownerDocument,t)&&(r=v.style(t,n)),Ut.test(r)&&qt.test(n)&&(i=a.width,s=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=r,r=u.width,a.width=i,a.minWidth=s,a.maxWidth=o)),r}:i.documentElement.currentStyle&&(Dt=function(e,t){var n,r,i=e.currentStyle&&e.currentStyle[t],s=e.style;return i==null&&s&&s[t]&&(i=s[t]),Ut.test(i)&&!Ft.test(t)&&(n=s.left,r=e.runtimeStyle&&e.runtimeStyle.left,r&&(e.runtimeStyle.left=e.currentStyle.left),s.left=t==="fontSize"?"1em":i,i=s.pixelLeft+"px",s.left=n,r&&(e.runtimeStyle.left=r)),i===""?"auto":i}),v.each(["height","width"],function(e,t){v.cssHooks[t]={get:function(e,n,r){if(n)return e.offsetWidth===0&&It.test(Dt(e,"display"))?v.swap(e,Xt,function(){return tn(e,t,r)}):tn(e,t,r)},set:function(e,n,r){return Zt(e,n,r?en(e,t,r,v.support.boxSizing&&v.css(e,"boxSizing")==="border-box"):0)}}}),v.support.opacity||(v.cssHooks.opacity={get:function(e,t){return jt.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=v.isNumeric(t)?"alpha(opacity="+t*100+")":"",s=r&&r.filter||n.filter||"";n.zoom=1;if(t>=1&&v.trim(s.replace(Bt,""))===""&&n.removeAttribute){n.removeAttribute("filter");if(r&&!r.filter)return}n.filter=Bt.test(s)?s.replace(Bt,i):s+" "+i}}),v(function(){v.support.reliableMarginRight||(v.cssHooks.marginRight={get:function(e,t){return v.swap(e,{display:"inline-block"},function(){if(t)return Dt(e,"marginRight")})}}),!v.support.pixelPosition&&v.fn.position&&v.each(["top","left"],function(e,t){v.cssHooks[t]={get:function(e,n){if(n){var r=Dt(e,t);return Ut.test(r)?v(e).position()[t]+"px":r}}}})}),v.expr&&v.expr.filters&&(v.expr.filters.hidden=function(e){return e.offsetWidth===0&&e.offsetHeight===0||!v.support.reliableHiddenOffsets&&(e.style&&e.style.display||Dt(e,"display"))==="none"},v.expr.filters.visible=function(e){return!v.expr.filters.hidden(e)}),v.each({margin:"",padding:"",border:"Width"},function(e,t){v.cssHooks[e+t]={expand:function(n){var r,i=typeof n=="string"?n.split(" "):[n],s={};for(r=0;r<4;r++)s[e+$t[r]+t]=i[r]||i[r-2]||i[0];return s}},qt.test(e)||(v.cssHooks[e+t].set=Zt)});var rn=/%20/g,sn=/\[\]$/,on=/\r?\n/g,un=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,an=/^(?:select|textarea)/i;v.fn.extend({serialize:function(){return v.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?v.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||an.test(this.nodeName)||un.test(this.type))}).map(function(e,t){var n=v(this).val();return n==null?null:v.isArray(n)?v.map(n,function(e,n){return{name:t.name,value:e.replace(on,"\r\n")}}):{name:t.name,value:n.replace(on,"\r\n")}}).get()}}),v.param=function(e,n){var r,i=[],s=function(e,t){t=v.isFunction(t)?t():t==null?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};n===t&&(n=v.ajaxSettings&&v.ajaxSettings.traditional);if(v.isArray(e)||e.jquery&&!v.isPlainObject(e))v.each(e,function(){s(this.name,this.value)});else for(r in e)fn(r,e[r],n,s);return i.join("&").replace(rn,"+")};var ln,cn,hn=/#.*$/,pn=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,dn=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,vn=/^(?:GET|HEAD)$/,mn=/^\/\//,gn=/\?/,yn=/)<[^<]*)*<\/script>/gi,bn=/([?&])_=[^&]*/,wn=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,En=v.fn.load,Sn={},xn={},Tn=["*/"]+["*"];try{cn=s.href}catch(Nn){cn=i.createElement("a"),cn.href="",cn=cn.href}ln=wn.exec(cn.toLowerCase())||[],v.fn.load=function(e,n,r){if(typeof e!="string"&&En)return En.apply(this,arguments);if(!this.length)return this;var i,s,o,u=this,a=e.indexOf(" ");return a>=0&&(i=e.slice(a,e.length),e=e.slice(0,a)),v.isFunction(n)?(r=n,n=t):n&&typeof n=="object"&&(s="POST"),v.ajax({url:e,type:s,dataType:"html",data:n,complete:function(e,t){r&&u.each(r,o||[e.responseText,t,e])}}).done(function(e){o=arguments,u.html(i?v("
    ").append(e.replace(yn,"")).find(i):e)}),this},v.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,t){v.fn[t]=function(e){return this.on(t,e)}}),v.each(["get","post"],function(e,n){v[n]=function(e,r,i,s){return v.isFunction(r)&&(s=s||i,i=r,r=t),v.ajax({type:n,url:e,data:r,success:i,dataType:s})}}),v.extend({getScript:function(e,n){return v.get(e,t,n,"script")},getJSON:function(e,t,n){return v.get(e,t,n,"json")},ajaxSetup:function(e,t){return t?Ln(e,v.ajaxSettings):(t=e,e=v.ajaxSettings),Ln(e,t),e},ajaxSettings:{url:cn,isLocal:dn.test(ln[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":Tn},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":e.String,"text html":!0,"text json":v.parseJSON,"text xml":v.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:Cn(Sn),ajaxTransport:Cn(xn),ajax:function(e,n){function T(e,n,s,a){var l,y,b,w,S,T=n;if(E===2)return;E=2,u&&clearTimeout(u),o=t,i=a||"",x.readyState=e>0?4:0,s&&(w=An(c,x,s));if(e>=200&&e<300||e===304)c.ifModified&&(S=x.getResponseHeader("Last-Modified"),S&&(v.lastModified[r]=S),S=x.getResponseHeader("Etag"),S&&(v.etag[r]=S)),e===304?(T="notmodified",l=!0):(l=On(c,w),T=l.state,y=l.data,b=l.error,l=!b);else{b=T;if(!T||e)T="error",e<0&&(e=0)}x.status=e,x.statusText=(n||T)+"",l?d.resolveWith(h,[y,T,x]):d.rejectWith(h,[x,T,b]),x.statusCode(g),g=t,f&&p.trigger("ajax"+(l?"Success":"Error"),[x,c,l?y:b]),m.fireWith(h,[x,T]),f&&(p.trigger("ajaxComplete",[x,c]),--v.active||v.event.trigger("ajaxStop"))}typeof e=="object"&&(n=e,e=t),n=n||{};var r,i,s,o,u,a,f,l,c=v.ajaxSetup({},n),h=c.context||c,p=h!==c&&(h.nodeType||h instanceof v)?v(h):v.event,d=v.Deferred(),m=v.Callbacks("once memory"),g=c.statusCode||{},b={},w={},E=0,S="canceled",x={readyState:0,setRequestHeader:function(e,t){if(!E){var n=e.toLowerCase();e=w[n]=w[n]||e,b[e]=t}return this},getAllResponseHeaders:function(){return E===2?i:null},getResponseHeader:function(e){var n;if(E===2){if(!s){s={};while(n=pn.exec(i))s[n[1].toLowerCase()]=n[2]}n=s[e.toLowerCase()]}return n===t?null:n},overrideMimeType:function(e){return E||(c.mimeType=e),this},abort:function(e){return e=e||S,o&&o.abort(e),T(0,e),this}};d.promise(x),x.success=x.done,x.error=x.fail,x.complete=m.add,x.statusCode=function(e){if(e){var t;if(E<2)for(t in e)g[t]=[g[t],e[t]];else t=e[x.status],x.always(t)}return this},c.url=((e||c.url)+"").replace(hn,"").replace(mn,ln[1]+"//"),c.dataTypes=v.trim(c.dataType||"*").toLowerCase().split(y),c.crossDomain==null&&(a=wn.exec(c.url.toLowerCase()),c.crossDomain=!(!a||a[1]===ln[1]&&a[2]===ln[2]&&(a[3]||(a[1]==="http:"?80:443))==(ln[3]||(ln[1]==="http:"?80:443)))),c.data&&c.processData&&typeof c.data!="string"&&(c.data=v.param(c.data,c.traditional)),kn(Sn,c,n,x);if(E===2)return x;f=c.global,c.type=c.type.toUpperCase(),c.hasContent=!vn.test(c.type),f&&v.active++===0&&v.event.trigger("ajaxStart");if(!c.hasContent){c.data&&(c.url+=(gn.test(c.url)?"&":"?")+c.data,delete c.data),r=c.url;if(c.cache===!1){var N=v.now(),C=c.url.replace(bn,"$1_="+N);c.url=C+(C===c.url?(gn.test(c.url)?"&":"?")+"_="+N:"")}}(c.data&&c.hasContent&&c.contentType!==!1||n.contentType)&&x.setRequestHeader("Content-Type",c.contentType),c.ifModified&&(r=r||c.url,v.lastModified[r]&&x.setRequestHeader("If-Modified-Since",v.lastModified[r]),v.etag[r]&&x.setRequestHeader("If-None-Match",v.etag[r])),x.setRequestHeader("Accept",c.dataTypes[0]&&c.accepts[c.dataTypes[0]]?c.accepts[c.dataTypes[0]]+(c.dataTypes[0]!=="*"?", "+Tn+"; q=0.01":""):c.accepts["*"]);for(l in c.headers)x.setRequestHeader(l,c.headers[l]);if(!c.beforeSend||c.beforeSend.call(h,x,c)!==!1&&E!==2){S="abort";for(l in{success:1,error:1,complete:1})x[l](c[l]);o=kn(xn,c,n,x);if(!o)T(-1,"No Transport");else{x.readyState=1,f&&p.trigger("ajaxSend",[x,c]),c.async&&c.timeout>0&&(u=setTimeout(function(){x.abort("timeout")},c.timeout));try{E=1,o.send(b,T)}catch(k){if(!(E<2))throw k;T(-1,k)}}return x}return x.abort()},active:0,lastModified:{},etag:{}});var Mn=[],_n=/\?/,Dn=/(=)\?(?=&|$)|\?\?/,Pn=v.now();v.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Mn.pop()||v.expando+"_"+Pn++;return this[e]=!0,e}}),v.ajaxPrefilter("json jsonp",function(n,r,i){var s,o,u,a=n.data,f=n.url,l=n.jsonp!==!1,c=l&&Dn.test(f),h=l&&!c&&typeof a=="string"&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Dn.test(a);if(n.dataTypes[0]==="jsonp"||c||h)return s=n.jsonpCallback=v.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,o=e[s],c?n.url=f.replace(Dn,"$1"+s):h?n.data=a.replace(Dn,"$1"+s):l&&(n.url+=(_n.test(f)?"&":"?")+n.jsonp+"="+s),n.converters["script json"]=function(){return u||v.error(s+" was not called"),u[0]},n.dataTypes[0]="json",e[s]=function(){u=arguments},i.always(function(){e[s]=o,n[s]&&(n.jsonpCallback=r.jsonpCallback,Mn.push(s)),u&&v.isFunction(o)&&o(u[0]),u=o=t}),"script"}),v.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(e){return v.globalEval(e),e}}}),v.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),v.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=i.head||i.getElementsByTagName("head")[0]||i.documentElement;return{send:function(s,o){n=i.createElement("script"),n.async="async",e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,i){if(i||!n.readyState||/loaded|complete/.test(n.readyState))n.onload=n.onreadystatechange=null,r&&n.parentNode&&r.removeChild(n),n=t,i||o(200,"success")},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(0,1)}}}});var Hn,Bn=e.ActiveXObject?function(){for(var e in Hn)Hn[e](0,1)}:!1,jn=0;v.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&Fn()||In()}:Fn,function(e){v.extend(v.support,{ajax:!!e,cors:!!e&&"withCredentials"in e})}(v.ajaxSettings.xhr()),v.support.ajax&&v.ajaxTransport(function(n){if(!n.crossDomain||v.support.cors){var r;return{send:function(i,s){var o,u,a=n.xhr();n.username?a.open(n.type,n.url,n.async,n.username,n.password):a.open(n.type,n.url,n.async);if(n.xhrFields)for(u in n.xhrFields)a[u]=n.xhrFields[u];n.mimeType&&a.overrideMimeType&&a.overrideMimeType(n.mimeType),!n.crossDomain&&!i["X-Requested-With"]&&(i["X-Requested-With"]="XMLHttpRequest");try{for(u in i)a.setRequestHeader(u,i[u])}catch(f){}a.send(n.hasContent&&n.data||null),r=function(e,i){var u,f,l,c,h;try{if(r&&(i||a.readyState===4)){r=t,o&&(a.onreadystatechange=v.noop,Bn&&delete Hn[o]);if(i)a.readyState!==4&&a.abort();else{u=a.status,l=a.getAllResponseHeaders(),c={},h=a.responseXML,h&&h.documentElement&&(c.xml=h);try{c.text=a.responseText}catch(p){}try{f=a.statusText}catch(p){f=""}!u&&n.isLocal&&!n.crossDomain?u=c.text?200:404:u===1223&&(u=204)}}}catch(d){i||s(-1,d)}c&&s(u,f,c,l)},n.async?a.readyState===4?setTimeout(r,0):(o=++jn,Bn&&(Hn||(Hn={},v(e).unload(Bn)),Hn[o]=r),a.onreadystatechange=r):r()},abort:function(){r&&r(0,1)}}}});var qn,Rn,Un=/^(?:toggle|show|hide)$/,zn=new RegExp("^(?:([-+])=|)("+m+")([a-z%]*)$","i"),Wn=/queueHooks$/,Xn=[Gn],Vn={"*":[function(e,t){var n,r,i=this.createTween(e,t),s=zn.exec(t),o=i.cur(),u=+o||0,a=1,f=20;if(s){n=+s[2],r=s[3]||(v.cssNumber[e]?"":"px");if(r!=="px"&&u){u=v.css(i.elem,e,!0)||n||1;do a=a||".5",u/=a,v.style(i.elem,e,u+r);while(a!==(a=i.cur()/o)&&a!==1&&--f)}i.unit=r,i.start=u,i.end=s[1]?u+(s[1]+1)*n:n}return i}]};v.Animation=v.extend(Kn,{tweener:function(e,t){v.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;r-1,f={},l={},c,h;a?(l=i.position(),c=l.top,h=l.left):(c=parseFloat(o)||0,h=parseFloat(u)||0),v.isFunction(t)&&(t=t.call(e,n,s)),t.top!=null&&(f.top=t.top-s.top+c),t.left!=null&&(f.left=t.left-s.left+h),"using"in t?t.using.call(e,f):i.css(f)}},v.fn.extend({position:function(){if(!this[0])return;var e=this[0],t=this.offsetParent(),n=this.offset(),r=er.test(t[0].nodeName)?{top:0,left:0}:t.offset();return n.top-=parseFloat(v.css(e,"marginTop"))||0,n.left-=parseFloat(v.css(e,"marginLeft"))||0,r.top+=parseFloat(v.css(t[0],"borderTopWidth"))||0,r.left+=parseFloat(v.css(t[0],"borderLeftWidth"))||0,{top:n.top-r.top,left:n.left-r.left}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||i.body;while(e&&!er.test(e.nodeName)&&v.css(e,"position")==="static")e=e.offsetParent;return e||i.body})}}),v.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);v.fn[e]=function(i){return v.access(this,function(e,i,s){var o=tr(e);if(s===t)return o?n in o?o[n]:o.document.documentElement[i]:e[i];o?o.scrollTo(r?v(o).scrollLeft():s,r?s:v(o).scrollTop()):e[i]=s},e,i,arguments.length,null)}}),v.each({Height:"height",Width:"width"},function(e,n){v.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){v.fn[i]=function(i,s){var o=arguments.length&&(r||typeof i!="boolean"),u=r||(i===!0||s===!0?"margin":"border");return v.access(this,function(n,r,i){var s;return v.isWindow(n)?n.document.documentElement["client"+e]:n.nodeType===9?(s=n.documentElement,Math.max(n.body["scroll"+e],s["scroll"+e],n.body["offset"+e],s["offset"+e],s["client"+e])):i===t?v.css(n,r,i,u):v.style(n,r,i,u)},n,o?i:t,o,null)}})}),e.jQuery=e.$=v,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return v})})(window); \ No newline at end of file diff --git a/upload/source/plugin/wechat/template/mobile/login.png b/upload/source/plugin/wechat/template/mobile/login.png deleted file mode 100644 index 62bd99f5..00000000 Binary files a/upload/source/plugin/wechat/template/mobile/login.png and /dev/null differ diff --git a/upload/source/plugin/wechat/template/mobile/login_on.png b/upload/source/plugin/wechat/template/mobile/login_on.png deleted file mode 100644 index 4ad1d488..00000000 Binary files a/upload/source/plugin/wechat/template/mobile/login_on.png and /dev/null differ diff --git a/upload/source/plugin/wechat/template/mobile/pic_bg.jpg b/upload/source/plugin/wechat/template/mobile/pic_bg.jpg deleted file mode 100644 index ad65c41f..00000000 Binary files a/upload/source/plugin/wechat/template/mobile/pic_bg.jpg and /dev/null differ diff --git a/upload/source/plugin/wechat/template/mobile/qqlogin.png b/upload/source/plugin/wechat/template/mobile/qqlogin.png deleted file mode 100644 index 6254d517..00000000 Binary files a/upload/source/plugin/wechat/template/mobile/qqlogin.png and /dev/null differ diff --git a/upload/source/plugin/wechat/template/mobile/qqlogin_on.png b/upload/source/plugin/wechat/template/mobile/qqlogin_on.png deleted file mode 100644 index e9b3d64b..00000000 Binary files a/upload/source/plugin/wechat/template/mobile/qqlogin_on.png and /dev/null differ diff --git a/upload/source/plugin/wechat/template/mobile/qqlogintext.png b/upload/source/plugin/wechat/template/mobile/qqlogintext.png deleted file mode 100644 index 1a8b5e91..00000000 Binary files a/upload/source/plugin/wechat/template/mobile/qqlogintext.png and /dev/null differ diff --git a/upload/source/plugin/wechat/template/mobile/style.css b/upload/source/plugin/wechat/template/mobile/style.css deleted file mode 100644 index f7385325..00000000 --- a/upload/source/plugin/wechat/template/mobile/style.css +++ /dev/null @@ -1,92 +0,0 @@ -@charset "utf-8"; - -/* common */ - * { word-wrap: break-word; } - ul,ol,li,span,p,form,h1,h2,h3,4,h5,h6,dl,dt,dd { margin: 0; padding: 0; border: 0; z-index:inherit; } - img,a img { border:0; margin:0; padding:0; } - ul,ol,li { list-style:none; } - * { margin:0; padding:0; } - html,body { height:100%; font:12px/1.6 Microsoft YaHei, Helvetica, sans-serif; color:#4C4C4C; } - input,select,textarea,button { font:14px/1.5 Microsoft YaHei, Helvetica, sans-serif; } - body, ul, ol, li, dl, dd, p, h1, h2, h3, h4, h5, h6, form, fieldset, .pr, .pc { margin: 0; padding: 0; } - table { empty-cells: show; border-collapse: collapse; } - caption, th { text-align: left; font-weight: 400; } - ul li, .xl li { list-style: none; } - h1, h2, h3, h4, h5, h6 { font-size: 1em; } - em, cite, i { font-style: normal; } - a img { border: none; } - label { cursor: pointer; } - .bg { background: url(pic_bg.jpg); } - .rq { color: red; } - - a:link,a:visited,a:hover { color:#4C4C4C; text-decoration:none; } - .blue { color: #0086CE; } - a.blue:link, a.blue:visited, a.blue:hover { color:#0086CE; text-decoration:none; } - .grey { color:#9C9C9C; } - a.grey:link, a.grey:visited, a.grey:hover { color:#9C9C9C; text-decoration:none; } - .orange { color:#F60; } - a.orange:link,a.orange:visited,a.orange:hover{color:#F60;text-decoration:none } - - .z { float: left; } .y { float: right; } - .cl:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } .cl { zoom: 1; } - .overflow{overflow:hidden;} - .none { display:none; } - .vm { vertical-align: middle; } - .vm * { vertical-align: middle; } - .hm { text-align: center; } - - .bl_none { border-bottom:0 !important; } - .bl_line { border-bottom:1px solid #DDD; } - .b_radius {border-radius:10px;} - - .b_m { margin:10px;} - .b_p { padding:10px} - - .mtn { margin-top: 5px !important; } - .mbn { margin-bottom: 5px !important; } - .mtm { margin-top: 10px !important; } - .mbm { margin-bottom: 10px !important; } - .mtw { margin-top: 20px !important; } - .mbw { margin-bottom: 20px !important; } - - .pr, .pc { vertical-align: middle; margin: 0 5px 1px 0; padding: 0;+margin-right: 2px;_margin-right: 2px; } - -/*----- pop -----*/ - .dialogbox { background: url(pic_bg.jpg) } - -/*----- login & register -----*/ - .loginbox { padding:10px;} - .login_from { background:#FFF; border-radius:10px; border:1px solid #DDD; margin-bottom:15px; } - .login_from li { border-bottom:1px solid #DDD; line-height:45px; padding:0 10px; color:#AFAFAF; font-size:14px; } - .btn_login .pn,.btn_register .pn { background: url(login.png) no-repeat; width:289px; height:45px; display:block; line-height:46px; overflow:hidden; margin:0 auto; color:#FFF; font-size:16px; font-weight:700; text-align:center;border:0; } - .btn_login .pn:hover,.btn_register .pn:hover { background: url(login_on.png) no-repeat; color:#F0EFEF; } - .btn_qqlogin a { background: url(qqlogin.png) no-repeat; width:300px; height:45px; display:block; line-height:2000px; overflow:hidden; margin:0 auto; } - .btn_qqlogin a:hover { background: url(qqlogin_on.png) no-repeat; } - .loginbox p { line-height:35px; font-size:14px; color:#AFAFAF;} - .reg_link a { background: url(icon_arrow.png) no-repeat 100% center; padding-right:10px; color:#AFAFAF; } - .px{ border:1px solid #ddd; padding: 2px 4px; line-height: 17px; font-size:15px; } - .px:focus { color:#4C4C4C;} - .p_fre { width: auto !important; } - .sel_list { width:100%;border: 0; padding: 2px 4px; font-size:14px; font-weight:700; } - .login_select { display: block; position: relative;} - .login_select .login-btn-inner { display: block; font-size: 14px; font-weight:700; min-width: 0.75em; overflow: hidden; position: relative; text-overflow: ellipsis; white-space: nowrap; } - .login_select select { position: absolute; top: 0; width: 100%; z-index: 2; cursor: pointer; height: 3em; left: 0; max-height: 100%; min-height: 100%; opacity: 0.0001;} - .login-btn-text { float:left; } - .login_select .icon-arrow { background: url(icon_arrow.png) no-repeat 15px 17px; width:30px; height:30px; float:right; } - - .login_pop { background:#F1F1F1; padding: 0 14px 20px; } - .log_tit { text-align:center; font-size:16px; font-weight:700; line-height:45px; } - .icon_close { background: url(icon_close.png) no-repeat 0 0; width:13px; height:11px; overflow:hidden; display:block; margin-top:17px; } - .btn_qqlogintext { margin:10px 0; } - .btn_qqlogintext a.text_qqlogin { background: url(qqlogintext.png) no-repeat; width:120px; height:25px; display:block; line-height:2000px; overflow:hidden; } - .login_pop .login_from { margin-bottom: 10px; } - .login_pop .login_check { margin:0 0 10px 0; color:#A5A5A5; } - .q_reg a { color:#A5A5A5; font-size:14px; } - .s_code { color:#A5A5A5; } - .s_code .px { color:#A5A5A5; } - .s_code .px:focus { color:#4C4C4C; } - a.other_c { color:#A5A5A5; margin-left:5px; } - -/*----- footer -----*/ - .footer { text-align:center; line-height:2em; color:#A5A5A5; padding:10px 0 0 0; } - .footer a { margin:0 6px; color:#A5A5A5; } \ No newline at end of file diff --git a/upload/source/plugin/wechat/template/mobile/wechat_bind.htm b/upload/source/plugin/wechat/template/mobile/wechat_bind.htm deleted file mode 100644 index 82c4d6f9..00000000 --- a/upload/source/plugin/wechat/template/mobile/wechat_bind.htm +++ /dev/null @@ -1,84 +0,0 @@ - - - -
    - - - - -
    - -
    -
    - - - -
    - - - -
    - - - -

    {lang useqqconnectlogin}

    - - -
    -
    - - - - - - - - diff --git a/upload/source/plugin/wechat/template/mobile/wechat_bind_confirm.htm b/upload/source/plugin/wechat/template/mobile/wechat_bind_confirm.htm deleted file mode 100644 index d65f1b1e..00000000 --- a/upload/source/plugin/wechat/template/mobile/wechat_bind_confirm.htm +++ /dev/null @@ -1,14 +0,0 @@ - - -
    - - {lang wechat:wechat_qrcode_input_cancel} - - {lang wechat:wechat_qrcode_input_confirm}

    -
    -
    - -
    - - - \ No newline at end of file diff --git a/upload/source/plugin/wechat/template/mobile/wechat_header.htm b/upload/source/plugin/wechat/template/mobile/wechat_header.htm deleted file mode 100644 index 9aabfdae..00000000 --- a/upload/source/plugin/wechat/template/mobile/wechat_header.htm +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - -
    -
    \ No newline at end of file diff --git a/upload/source/plugin/wechat/template/module.htm b/upload/source/plugin/wechat/template/module.htm deleted file mode 100644 index 498e983f..00000000 --- a/upload/source/plugin/wechat/template/module.htm +++ /dev/null @@ -1,140 +0,0 @@ -{eval -function wechat_tpl_login_bar() { -global $_G; -} - - - - -{eval -} - -function wechat_tpl_login_extra_bar() { -global $_G; -} - -
    -

    -

    {$_G['Plang'][lang_wechat_logintip]}

    -
    - - -{eval -} - -function wechat_tpl_user_bar() { -global $_G; -} - - | - - -{eval -} - -function wechat_tpl_float_qrcode($idstr = '') { -global $_G; -} - - - - - - - -{eval -} - -function wechat_tpl_share($isshow) { -global $_G; -} - - {lang wechat:wechat_share}{lang wechat:wechat_share} - - - - - - - -{eval -} - -function wechat_tpl_register() { -global $_G; -} - -
    {lang wechat:wechat_register}
    - - -{eval -} - -function wechatshowactivity_tpl_voters($post) { -global $_G; -} - - | {lang wechat:show_recommend_number} - - -{eval -} - -function wechatshowactivity_tpl_share($post) { -global $_G; -} - -

    {lang wechat:show_scanqr}

    -

    - - -{eval -} - -function wechat_tpl_resourcepush() { -global $_G; -} - - {lang wechat:resource_push} - - -{eval -} - -} \ No newline at end of file diff --git a/upload/source/plugin/wechat/template/spacecp.htm b/upload/source/plugin/wechat/template/spacecp.htm deleted file mode 100644 index bbfaf59d..00000000 --- a/upload/source/plugin/wechat/template/spacecp.htm +++ /dev/null @@ -1,55 +0,0 @@ -

    {lang wechat:wechat_spacecp_bind_title}

    -
    - - -

    - {lang wechat:wechat_spacecp_setpw} -

    - -
    - -
    -
    - - - - - - - - - - - - - - -
    - -
    -
    - -
    - - -

    -{lang wechat:wechat_spacecp_unbind} -

    - - - - \ No newline at end of file diff --git a/upload/source/plugin/wechat/template/touch/index.htm b/upload/source/plugin/wechat/template/touch/index.htm deleted file mode 100644 index e69de29b..00000000 diff --git a/upload/source/plugin/wechat/template/touch/wechat_bind.htm b/upload/source/plugin/wechat/template/touch/wechat_bind.htm deleted file mode 100644 index 2443bc71..00000000 --- a/upload/source/plugin/wechat/template/touch/wechat_bind.htm +++ /dev/null @@ -1,76 +0,0 @@ - - - -
    - - - - -
    - -
    -
    -
    - - -
    - - - -
    - - - -

    {lang useqqconnectlogin}

    - - -
    -
    - - - - - - \ No newline at end of file diff --git a/upload/source/plugin/wechat/template/touch/wechat_bind_confirm.htm b/upload/source/plugin/wechat/template/touch/wechat_bind_confirm.htm deleted file mode 100644 index d65f1b1e..00000000 --- a/upload/source/plugin/wechat/template/touch/wechat_bind_confirm.htm +++ /dev/null @@ -1,14 +0,0 @@ - - -
    - - {lang wechat:wechat_qrcode_input_cancel} - - {lang wechat:wechat_qrcode_input_confirm}

    -
    -
    - -
    - - - \ No newline at end of file diff --git a/upload/source/plugin/wechat/template/touch/wechat_header.htm b/upload/source/plugin/wechat/template/touch/wechat_header.htm deleted file mode 100644 index 9452d553..00000000 --- a/upload/source/plugin/wechat/template/touch/wechat_header.htm +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -<!--{if !empty($navtitle)}-->$navtitle - <!--{/if}--><!--{if empty($nobbname)}--> $_G['setting']['bbname'] - <!--{/if}--> {lang waptitle} - Powered by Discuz! - - - - - - - - - - - -
    -
    \ No newline at end of file diff --git a/upload/source/plugin/wechat/template/wechat_bind.htm b/upload/source/plugin/wechat/template/wechat_bind.htm deleted file mode 100644 index 0519ecba..00000000 --- a/upload/source/plugin/wechat/template/wechat_bind.htm +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/upload/source/plugin/wechat/template/wechat_bind_confirm.htm b/upload/source/plugin/wechat/template/wechat_bind_confirm.htm deleted file mode 100644 index 0519ecba..00000000 --- a/upload/source/plugin/wechat/template/wechat_bind_confirm.htm +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/upload/source/plugin/wechat/template/wechat_qrcode.htm b/upload/source/plugin/wechat/template/wechat_qrcode.htm deleted file mode 100644 index b2d865be..00000000 --- a/upload/source/plugin/wechat/template/wechat_qrcode.htm +++ /dev/null @@ -1,98 +0,0 @@ - - -
    - -

    - {lang wechat:wechat_bind}{lang wechat:wechat_login} - - {lang close} - -

    -
    -
    - - - {lang wechat:wechat_bind_comfirm_prompt} -
    - - - - - - -
    -
    -
    - - - - - -
      - -
    -
    -
    -
    - - - {eval $codelang = $_G['uid'] ? 'lang_wechat_bind' : 'lang_wechat_login';} -

    - {lang wechat:wechat_bind}{lang wechat:wechat_login} - - {lang close} - -

    -
    - -
    - - {$_G['Plang'][$codelang]}
    {lang wechat:wechat_qrcode_inputcode} -

    $code

    - - {$_G['Plang'][$codelang]} - -
    - -
    - - - - \ No newline at end of file diff --git a/upload/source/plugin/wechat/template/wechat_threadqr.htm b/upload/source/plugin/wechat/template/wechat_threadqr.htm deleted file mode 100644 index a11a2186..00000000 --- a/upload/source/plugin/wechat/template/wechat_threadqr.htm +++ /dev/null @@ -1,37 +0,0 @@ - - - -
    -

    - {lang wechat:wechat_sharetitle} - - {lang close} - -

    -
    - -
    - {lang wechat:wsq_threadqr} -
    -
    - -
    -

    - {lang wechat:wechat_sharetitle} - - {lang close} - -

    -
    - -
    - {lang wechat:show_scanqr} -
    -
    - -
    -
    {lang wechat:wsq_indexqr} -
    - - - \ No newline at end of file diff --git a/upload/source/plugin/wechat/wechat.class.php b/upload/source/plugin/wechat/wechat.class.php deleted file mode 100644 index 97d0a885..00000000 --- a/upload/source/plugin/wechat/wechat.class.php +++ /dev/null @@ -1,679 +0,0 @@ -fetch($_G['uid']); - if($_G['wechatuser'] && !$_G['wechatuser']['status']) { - $_G['wechatuser']['isregister'] = 1; - } - } else { - $_G['wechatuser'] = C::t('#wechat#common_member_wechat')->fetch($_G['uid']); - } - if($_G['wechatuser'] && $wechatuser['status'] == 1) { - C::t('#wechat#common_member_wechat')->update($_G['uid'], array('status' => 0)); - require_once libfile('function/member'); - clearcookies(); - } - } - - if(!$_G['uid'] && !defined('IN_MOBILE') && $_G['wechat']['setting']['wsq_allow']) { - $_G['setting']['pluginhooks']['global_login_text'] .= wechat_tpl_login_bar(); - } - - $_G['Plang'] = $_G['setting']['wechatviewpluginid'] ? lang('plugin/'.$_G['setting']['wechatviewpluginid']) : array(); - - if(!$_G['Plang'] || !$_G['wechatuser']) { - unset($_G['setting']['plugins']['spacecp']['wechat:spacecp']); - } - } - - function deletemember($param) { - $uids = $param['param'][0]; - $step = $param['step']; - if ($step == 'check' && $uids && is_array($uids)) { - foreach($uids as $uid) { - C::t('#wechat#common_member_wechat')->delete($uid); - } - } - } - - function global_login_extra() { - global $_G; - if(!$_G['Plang'] || $_G['inshowmessage'] || !$_G['wechat']['setting']['wsq_allow']) { - return; - } - return wechat_tpl_login_extra_bar(); - } - - function global_usernav_extra1() { - global $_G; - if(!$_G['Plang'] || $_G['wechatuser'] || !$_G['wechat']['setting']['wsq_allow'] || !$_G['uid']) { - return; - } - return wechat_tpl_user_bar(); - } - - function global_footer() { - global $_G; - if($_G['wechat']['setting']['wechat_float_qrcode'] && $_G['wechat']['setting']['wsq_siteid'] && $_G['wechat']['setting']['wsq_allow']) { - $modid = $_G['basescript'].'::'.CURMODULE; - if($modid == 'forum::forumdisplay' && !empty($_GET['fid'])) { - $idstr = '&fid='.dintval($_GET['fid']); - return wechat_tpl_float_qrcode($idstr); - } elseif($modid == 'forum::viewthread' && !empty($_GET['tid'])) { - $idstr = '&tid='.dintval($_GET['tid']).'&qrsize=2'; - return wechat_tpl_float_qrcode($idstr); - } elseif($modid == 'forum::index') { - return wechat_tpl_float_qrcode(); - } - } - } - -} - -class mobileplugin_wechat { - - function common() { - global $_G; - if(!$_G['wechat']['setting']) { - $_G['wechat']['setting'] = dunserialize($_G['setting']['mobilewechat']); - } - dsetcookie('mobile', '', -1); - if(!isset($_GET['pluginid'])) { - $redirect = WeChat::redirect(1); - if($redirect) { - dheader('location: '.$redirect); - } - } - } - -} - -class plugin_wechat_member extends plugin_wechat { - - function logging_method() { - global $_G; - if(!$_G['Plang'] || !$_G['wechat']['setting']['wsq_allow']) { - return; - } - return wechat_tpl_login_bar(); - } - - function register_top_output() { - global $_G; - if(strexists($_GET['referer'], 'wechat:login') && $_G['wechat']['setting']['wsq_allow']) { - return wechat_tpl_register(); - } - } - - function register_logging_method() { - global $_G; - if(!$_G['Plang'] || !$_G['wechat']['setting']['wsq_allow']) { - return; - } - return wechat_tpl_login_bar(); - } - -} - -class mobileplugin_wechat_forum extends mobileplugin_wechat { - - function post_showactivity() { - if(!showActivity::init()) { - return false; - } - showActivity::post(); - } - - function viewthread_showactivity() { - showActivity::init(); - } - - function misc_showactivity() { - showActivity::init(); - } - -} - -class plugin_wechat_forum extends plugin_wechat { - - function viewthread_showactivity() { - showActivity::init(); - } - - function viewthread_postheader_output() { - if(!showActivity::init()) { - return array(); - } - if($GLOBALS['activity']['starttimeto']) { - global $_G; - $starttimeto = strtotime($GLOBALS['activity']['starttimeto']); - if($starttimeto < TIMESTAMP && $_G['forum_thread']['displayorder'] > 0) { - C::t('forum_thread')->update($_G['tid'], array('displayorder' => 0)); - } - } - return showActivity::returnvoters(1); - } - - function viewthread_posttop_output() { - if(!showActivity::init()) { - return array(); - } - return showActivity::returnvoters(2); - } - - function misc_showactivity() { - if(!showActivity::init()) { - return false; - } - showActivity::misc(); - } - - function post_showactivity() { - if(!showActivity::init()) { - return false; - } - showActivity::post(); - } - - function viewthread_share_method_output() { - global $_G; - if($_G['wechat']['setting']['wsq_allow']) { - return wechat_tpl_share(showActivity::init()); - } - } - - function viewthread_postaction() { - global $_G; - if($_G['wechat']['setting']['wsq_allow'] && $_G['adminid'] == 1 && empty($_GET['viewpid'])) { - return array(wechat_tpl_resourcepush()); - } - } - -} - -class WeChat { - - static $QRCODE_EXPIRE = 1800; - - static public function getqrcode() { - global $_G; - if(!$_G['wechat']['setting']) { - $_G['wechat']['setting'] = dunserialize($_G['setting']['mobilewechat']); - } - require_once DISCUZ_ROOT . './source/plugin/wechat/wechat.lib.class.php'; - $wechat_client = new WeChatClient($_G['wechat']['setting']['wechat_appId'], $_G['wechat']['setting']['wechat_appsecret']); - - $ticket = ''; - if(!$_G['cookie']['wechat_ticket'] || $_G['wechat']['setting']['wechat_mtype'] == 1) { - $code = 0; - $i = 0; - do { - $code = rand(100000, 999999); - $codeexists = C::t('#wechat#mobile_wechat_authcode')->fetch_by_code($code); - $i++; - } while($codeexists && $i < 10); - - if($_G['wechat']['setting']['wechat_mtype'] == 2) { - $option = array( - 'scene_id' => $code, - 'expire' => self::$QRCODE_EXPIRE, - 'ticketOnly' => '1' - ); - $ticket = $wechat_client->getQrcodeTicket($option); - if(!$ticket) { - showmessage('wechat:wechat_message_codefull'); - } - dsetcookie('wechat_ticket', authcode($ticket."\t".$code, 'ENCODE'), self::$QRCODE_EXPIRE); - } - } else { - list($ticket, $code) = explode("\t", authcode($_G['cookie']['wechat_ticket'], 'DECODE')); - } - - $isqrapi = $ticket ? $ticket : ''; - if($codeexists) { - showmessage('wechat:wechat_message_codefull'); - } - - $qrcodeurl = !$isqrapi ? $_G['setting']['attachurl'].'common/'.$_G['wechat']['setting']['wechat_qrcode'] : $_G['siteurl'].'plugin.php?id=wechat:qrcode&rand='.random(5); - - $codeenc = urlencode(base64_encode(authcode($code, 'ENCODE', $_G['config']['security']['authkey']))); - C::t('#wechat#mobile_wechat_authcode')->insert(array('sid' => $_G['cookie']['saltkey'], 'uid' => $_G['uid'], 'code' => $code, 'createtime' => TIMESTAMP), 0, 1); - if(!discuz_process::islocked('clear_wechat_authcode')) { - C::t('#wechat#mobile_wechat_authcode')->delete_history(); - discuz_process::unlock('clear_wechat_authcode'); - } - return array($isqrapi, $qrcodeurl, $codeenc, $code); - } - - static public function redirect($type = '') { - global $_G; - $hook = dunserialize($_G['setting']['wechatredirect']); - if (!$hook || !in_array($hook['plugin'], $_G['setting']['plugins']['available'])) { - return; - } - if(!preg_match("/^[\w\_]+$/i", $hook['plugin']) || !preg_match('/^[\w\_\.]+\.php$/i', $hook['include'])) { - return; - } - include_once DISCUZ_ROOT . 'source/plugin/' . $hook['plugin'] . '/' . $hook['include']; - if (!class_exists($hook['class'], false)) { - return; - } - $class = new $hook['class']; - if (!method_exists($class, $hook['method'])) { - return; - } - $return = call_user_func(array($class, $hook['method']), $type); - if($return) { - return $return; - } - } - - static public function register($username, $return = 0, $groupid = 0) { - global $_G; - if(!$username) { - return; - } - if(!$_G['wechat']['setting']) { - $_G['wechat']['setting'] = dunserialize($_G['setting']['mobilewechat']); - } - - loaducenter(); - $groupid = !$groupid ? ($_G['wechat']['setting']['wechat_newusergroupid'] ? $_G['wechat']['setting']['wechat_newusergroupid'] : $_G['setting']['newusergroupid']) : $groupid; - - $password = md5(random(10)); - $email = 'wechat_'.strtolower(random(10)).'@m.invalid'; - - $usernamelen = dstrlen($username); - if($usernamelen < 3) { - $username = $username.'_'.random(5); - } - if($usernamelen > 15) { - if(!$return) { - showmessage('profile_username_toolong'); - } else { - return; - } - } - - $censorexp = '/^('.str_replace(array('\\*', "\r\n", ' '), array('.*', '|', ''), preg_quote(($_G['setting']['censoruser'] = trim($_G['setting']['censoruser'])), '/')).')$/i'; - - if($_G['setting']['censoruser'] && @preg_match($censorexp, $username)) { - if(!$return) { - showmessage('profile_username_protect'); - } else { - return; - } - } - - if(!$_G['wechat']['setting']['wechat_disableregrule']) { - loadcache('ipctrl'); - if($_G['cache']['ipctrl']['ipregctrl']) { - foreach(explode("\n", $_G['cache']['ipctrl']['ipregctrl']) as $ctrlip) { - if(preg_match("/^(".preg_quote(($ctrlip = trim($ctrlip)), '/').")/", $_G['clientip'])) { - $ctrlip = $ctrlip.'%'; - $_G['setting']['regctrl'] = $_G['setting']['ipregctrltime']; - break; - } else { - $ctrlip = $_G['clientip']; - } - } - } else { - $ctrlip = $_G['clientip']; - } - - if($_G['setting']['regctrl']) { - if(C::t('common_regip')->count_by_ip_dateline($ctrlip, $_G['timestamp']-$_G['setting']['regctrl']*3600)) { - if(!$return) { - showmessage('register_ctrl', NULL, array('regctrl' => $_G['setting']['regctrl'])); - } else { - return; - } - } - } - - $setregip = null; - if($_G['setting']['regfloodctrl']) { - $regip = C::t('common_regip')->fetch_by_ip_dateline($_G['clientip'], $_G['timestamp']-86400); - if($regip) { - if($regip['count'] >= $_G['setting']['regfloodctrl']) { - if(!$return) { - showmessage('register_flood_ctrl', NULL, array('regfloodctrl' => $_G['setting']['regfloodctrl'])); - } else { - return; - } - } else { - $setregip = 1; - } - } else { - $setregip = 2; - } - } - - if($setregip !== null) { - if($setregip == 1) { - C::t('common_regip')->update_count_by_ip($_G['clientip']); - } else { - C::t('common_regip')->insert(array('ip' => $_G['clientip'], 'count' => 1, 'dateline' => $_G['timestamp'])); - } - } - } - - $uid = uc_user_register(addslashes($username), $password, $email, '', '', $_G['clientip']); - if($uid <= 0) { - if(!$return) { - if($uid == -1) { - showmessage('profile_username_illegal'); - } elseif($uid == -2) { - showmessage('profile_username_protect'); - } elseif($uid == -3) { - showmessage('profile_username_duplicate'); - } elseif($uid == -4) { - showmessage('profile_email_illegal'); - } elseif($uid == -5) { - showmessage('profile_email_domain_illegal'); - } elseif($uid == -6) { - showmessage('profile_email_duplicate'); - } else { - showmessage('undefined_action'); - } - } else { - return; - } - } - - $init_arr = array('credits' => explode(',', $_G['setting']['initcredits'])); - C::t('common_member')->insert_user($uid, $username, $password, $email, $_G['clientip'], $groupid, $init_arr); - - if($_G['setting']['regctrl'] || $_G['setting']['regfloodctrl']) { - C::t('common_regip')->delete_by_dateline($_G['timestamp']-($_G['setting']['regctrl'] > 72 ? $_G['setting']['regctrl'] : 72)*3600); - if($_G['setting']['regctrl']) { - C::t('common_regip')->insert(array('ip' => $_G['clientip'], 'count' => -1, 'dateline' => $_G['timestamp'])); - } - } - - if($_G['setting']['regverify'] == 2) { - C::t('common_member_validate')->insert(array( - 'uid' => $uid, - 'submitdate' => $_G['timestamp'], - 'moddate' => 0, - 'admin' => '', - 'submittimes' => 1, - 'status' => 0, - 'message' => '', - 'remark' => '', - ), false, true); - manage_addnotify('verifyuser'); - } - - setloginstatus(array( - 'uid' => $uid, - 'username' => $username, - 'password' => $password, - 'groupid' => $groupid, - ), 0); - - include_once libfile('function/stat'); - updatestat('register'); - - return $uid; - } - - static public function syncAvatar($uid, $avatar) { - - if(!$uid || !$avatar) { - return false; - } - - if(!$content = dfsockopen($avatar)) { - return false; - } - - $tmpFile = DISCUZ_ROOT.'./data/avatar/'.TIMESTAMP.random(6); - file_put_contents($tmpFile, $content); - - if(!is_file($tmpFile)) { - return false; - } - - $result = uploadUcAvatar::upload($uid, $tmpFile); - unlink($tmpFile); - - if($result) C::t('common_member')->update($uid, array('avatarstatus'=>'1')); - - return $result; - } - - - - static public function getnewname($openid) { - global $_G; - if(!$_G['wechat']['setting']) { - $_G['wechat']['setting'] = dunserialize($_G['setting']['mobilewechat']); - } - $wechat_client = new WeChatClient($_G['wechat']['setting']['wechat_appId'], $_G['wechat']['setting']['wechat_appsecret']); - $userinfo = $wechat_client->getUserInfoById($openid); - if($userinfo) { - $defaultusername = substr(WeChatEmoji::clear($userinfo['nickname']), 0, 15); - loaducenter(); - $user = uc_get_user($defaultusername); - if(!empty($user)) { - $defaultusername = cutstr($defaultusername, 7, '').'_'.random(5); - } - } else { - $defaultusername = 'wx_'.random(5); - } - return $defaultusername; - } - -} - -class uploadUcAvatar { - - public static function upload($uid, $localFile) { - - global $_G; - if(!$uid || !$localFile) { - return false; - } - - list($width, $height, $type, $attr) = getimagesize($localFile); - if(!$width) { - return false; - } - - if($width < 10 || $height < 10 || $type == 4) { - return false; - } - - $imageType = array(1 => '.gif', 2 => '.jpg', 3 => '.png'); - $fileType = $imgType[$type]; - if(!$fileType) { - $fileType = '.jpg'; - } - $avatarPath = $_G['setting']['attachdir']; - $tmpAvatar = $avatarPath.'./temp/upload'.$uid.$fileType; - file_exists($tmpAvatar) && @unlink($tmpAvatar); - file_put_contents($tmpAvatar, file_get_contents($localFile)); - - if(!is_file($tmpAvatar)) { - return false; - } - - $tmpAvatarBig = './temp/upload'.$uid.'big'.$fileType; - $tmpAvatarMiddle = './temp/upload'.$uid.'middle'.$fileType; - $tmpAvatarSmall = './temp/upload'.$uid.'small'.$fileType; - - $image = new image; - if($image->Thumb($tmpAvatar, $tmpAvatarBig, 200, 250, 1) <= 0) { - return false; - } - if($image->Thumb($tmpAvatar, $tmpAvatarMiddle, 120, 120, 1) <= 0) { - return false; - } - if($image->Thumb($tmpAvatar, $tmpAvatarSmall, 48, 48, 2) <= 0) { - return false; - } - - $tmpAvatarBig = $avatarPath.$tmpAvatarBig; - $tmpAvatarMiddle = $avatarPath.$tmpAvatarMiddle; - $tmpAvatarSmall = $avatarPath.$tmpAvatarSmall; - - $avatar1 = self::byte2hex(file_get_contents($tmpAvatarBig)); - $avatar2 = self::byte2hex(file_get_contents($tmpAvatarMiddle)); - $avatar3 = self::byte2hex(file_get_contents($tmpAvatarSmall)); - - $extra = '&avatar1='.$avatar1.'&avatar2='.$avatar2.'&avatar3='.$avatar3; - $result = self::uc_api_post_ex('user', 'rectavatar', array('uid' => $uid), $extra); - - @unlink($tmpAvatar); - @unlink($tmpAvatarBig); - @unlink($tmpAvatarMiddle); - @unlink($tmpAvatarSmall); - - return true; - } - - public static function byte2hex($string) { - $buffer = ''; - $value = unpack('H*', $string); - $value = str_split($value[1], 2); - $b = ''; - foreach($value as $k => $v) { - $b .= strtoupper($v); - } - - return $b; - } - - public static function uc_api_post_ex($module, $action, $arg = array(), $extra = '') { - $s = $sep = ''; - foreach($arg as $k => $v) { - $k = urlencode($k); - if(is_array($v)) { - $s2 = $sep2 = ''; - foreach($v as $k2 => $v2) { - $k2 = urlencode($k2); - $s2 .= "$sep2{$k}[$k2]=".urlencode($v2); - $sep2 = '&'; - } - $s .= $sep.$s2; - } else { - $s .= "$sep$k=".urlencode($v); - } - $sep = '&'; - } - $postdata = uc_api_requestdata($module, $action, $s, $extra); - return uc_fopen2(UC_API.'/index.php', 500000, $postdata, '', TRUE, UC_IP, 20); - } -} - -class showActivity { - - public static $init = false; - - public static function init() { - global $_G; - if(!$_G['wechat']['setting']['wsq_allow'] || !in_array($_G['tid'], (array)$_G['wechat']['setting']['showactivity']['tids'])) { - return false; - } - if(!self::$init) { - $_G['setting']['allowpostcomment'] = array(0 => 1, 1 => 2); - $_G['setting']['commentnumber'] = 10; - $_G['setting']['commentpostself'] = 0; - $_G['setting']['commentfirstpost'] = 0; - $_G['setting']['fastpost'] = 0; - $_G['setting']['showimages'] = 1; - $_G['setting']['imagelistthumb'] = 1; - $_G['setting']['activitypp'] = 0; - $_G['setting']['disallowfloat'] .= '|reply'; - $_G['setting']['guesttipsinthread']['flag'] = 0; - $_G['setting']['nofilteredpost'] = 0; - $_G['group']['allowgetimage'] = 1; - if($_G['basescript'].'::'.CURMODULE == 'forum::post' && $_GET['action'] == 'edit') { - $_G['group']['allowpostactivity'] = true; - $_G['forum']['allowpostspecial'] = 255; - } - $_GET['ordertype'] = empty($_GET['ordertype']) ? 1 : $_GET['ordertype']; - self::$init = true; - } - return true; - } - - public static function misc() { - global $_G; - if(!$_POST || $_GET['action'] != 'activityapplies' && $_GET['action'] != 'activityapplylist') { - return; - } - if(submitcheck('activitysubmit')) { - showmessage('wechat:show_please_reply'); - } elseif(submitcheck('activitycancel')) { - showmessage('wechat:show_no_cancel'); - } elseif(submitcheck('applylistsubmit') && $_GET['operation'] == 'replenish') { - showmessage('wechat:show_disabled'); - } - } - - public static function post() { - global $_G; - if($_GET['action'] != 'reply') { - return; - } - if(submitcheck('replysubmit')) { - $activity = C::t('forum_activity')->fetch($_G['tid']); - if($activity['starttimefrom'] > TIMESTAMP) { - showmessage('wechat:show_no_begin', NULL, array()); - } - if($activity['expiration'] && $activity['expiration'] < TIMESTAMP) { - showmessage('activity_stop', NULL, array(), array('login' => 1)); - } - if(empty($_GET['attachnew'])) { - showmessage('wechat:show_please_upload'); - } - $data = array('tid' => $_G['tid'], 'username' => $_G['username'], 'uid' => $_G['uid'], 'message' => '', 'verified' => 1, 'dateline' => $_G['timestamp']); - C::t('forum_activityapply')->insert($data); - $applynumber = C::t('forum_activityapply')->fetch_count_for_thread($_G['tid']); - C::t('forum_activity')->update($_G['tid'], array('applynumber' => $applynumber)); - } - } - - public static function returnvoters($type) { - global $_G; - $return = array(); - if($type == 1) { - $posts = DB::fetch_all("SELECT * FROM %t WHERE tid=%d", array('forum_debatepost', $_G['tid']), 'pid'); - foreach($GLOBALS['postlist'] as $post) { - $posts[$post['pid']]['voters'] = intval($posts[$post['pid']]['voters']); - $return[] = !$post['first'] ? wechatshowactivity_tpl_voters($posts[$post['pid']]) : ''; - } - } else { - foreach($GLOBALS['postlist'] as $post) { - $return[] = !$post['first'] ? wechatshowactivity_tpl_share($post) : ''; - } - } - return $return; - } - -} \ No newline at end of file diff --git a/upload/source/plugin/wechat/wechat.inc.php b/upload/source/plugin/wechat/wechat.inc.php deleted file mode 100644 index 8b187810..00000000 --- a/upload/source/plugin/wechat/wechat.inc.php +++ /dev/null @@ -1,292 +0,0 @@ -getOauthConnectUri($selfurl.$ac.'&oauth=yes'); - dheader('location: '.$redirect_uri); - } else { - $tockeninfo = $wechat_client->getAccessTokenByCode($_GET['code']); - $openid = $tockeninfo['openid']; - dsetcookie('wechatopenid', authcode($openid, 'ENCODE', $_G['config']['security']['authkey']), 86400); - } - } - } -} elseif($openid) { - dsetcookie('wechatopenid', authcode($openid, 'ENCODE', $_G['config']['security']['authkey']), 86400); -} - -wsq::report('loginevent'); - -require_once libfile('function/member'); - -if($openid) { - if($ac == 'qqbind') { - WeChatHook::bindOpenId($_G['uid'], $openid); - wsq::report('bind'); - $ac = 'bind'; - } - $wechatuser = C::t('#wechat#common_member_wechat')->fetch_by_openid($openid); - if(!$wechatuser) { - if($_G['uid']) { - clearcookies(); - dheader('location: '. $selfurl.$ac); - } - if($_G['wechat']['setting']['wechat_allowregister'] && $_G['wechat']['setting']['wechat_allowfastregister'] && $_G['wechat']['setting']['wechat_mtype'] == 2) { - $authcode = C::t('#wechat#mobile_wechat_authcode')->fetch($sid); - $uid = WeChat::register(WeChat::getnewname($openid), 1); - if($uid) { - WeChatHook::bindOpenId($uid, $openid, 1); - if($sid) { - C::t('#wechat#mobile_wechat_authcode')->update($sid, array('uid' => $uid, 'status' => 1)); - } - } - wsq::report('register'); - } - } -} - -if($op == 'access') { - $redirect = WeChat::redirect(); - if($redirect) { - dheader('location: '.$redirect); - } -} - -if($sid) { - $authcode = C::t('#wechat#mobile_wechat_authcode')->fetch($sid); - - if($authcode) { - if($_GET['confirm'] == 'delete') { - C::t('#wechat#mobile_wechat_authcode')->delete($authcode['sid']); - wechat_setloginstatus($authcode['uid'], false); - include template('wechat:wechat_bind_confirm'); - exit; - } - if($wechatuser && !$authcode['uid']) { - $member = getuserbyuid($wechatuser['uid'], 1); - if(empty($_GET['confirm']) && (!$_G['wechat']['setting']['wechat_confirmtype'] && $member['adminid'] > 0 || $_G['wechat']['setting']['wechat_confirmtype'] == 1)) { - wsq::report('showauthorized'); - include template('wechat:wechat_bind_confirm'); - exit; - } - setloginstatus($member, 1296000); - C::t('#wechat#mobile_wechat_authcode')->update($sid, array('uid' => $wechatuser['uid'], 'status' => 1)); - wechat_setloginstatus($wechatuser['uid'], true); - wsq::report('authorized'); - } elseif($authcode['uid']) { - $member = getuserbyuid($authcode['uid'], 1); - if(empty($_GET['confirm']) && (!$_G['wechat']['setting']['wechat_confirmtype'] && $member['adminid'] > 0 || $_G['wechat']['setting']['wechat_confirmtype'] == 1)) { - wsq::report('showauthorized'); - include template('wechat:wechat_bind_confirm'); - exit; - } - if($wechatuser) { - C::t('#wechat#common_member_wechat')->delete($wechatuser['uid']); - wsq::report('unbind'); - } - setloginstatus($member, 1296000); - C::t('#wechat#mobile_wechat_authcode')->update($sid, array('status' => 1)); - WeChatHook::bindOpenId($authcode['uid'], $openid); - wsq::report('bind'); - $wechatuser = C::t('#wechat#common_member_wechat')->fetch_by_openid($openid); - wechat_setloginstatus($authcode['uid'], true); - wsq::report('authorized'); - } - } -} elseif($wechatuser) { - $member = getuserbyuid($wechatuser['uid'], 1); - setloginstatus($member, 1296000); - wechat_setloginstatus($wechatuser['uid'], true); -} - -if($ac == 'bind' && $_G['wechat']['setting']['wechat_qrtype']) { - if(!$_G['uid'] && IN_WECHAT && $_G['wechat']['setting']['wechat_allowfastregister']) { - $ac = 'wxregister'; - } - list($_GET['username'], $wxopenid) = explode("\t", base64_decode($_GET['username'])); - $_GET['username'] = substr(WeChatEmoji::clear($_GET['username']), 0, 15); -} - -if($ac == 'bind') { - define('IN_MOBILE', 2); - - if($_G['wechat']['setting']['wechat_qrtype'] && $_GET['referer']) { - $_GET['referer'] = str_replace('&state=siteregister', '&state=backlogin', $_GET['referer']); - dheader('location: '.$_GET['referer']); - } - - if($_G['wechat']['setting']['wechat_mtype'] == 2) { - $defaultusername = WeChat::getnewname($openid); - } else { - $defaultusername = $_G['wechat']['setting']['wechat_qrtype'] ? $_GET['username'] : 'wx_'.random(5); - } - $defaultusername = htmlspecialchars($defaultusername); - - $connecturl = $_G['setting']['connect']['allow'] && !$_G['setting']['bbclosed'] ? $_G['siteurl'].'connect.php?mod=login&op=init&referer='.urlencode($selfurl.'qqbind').'&statfrom=login_simple' : ''; - - if(IN_WECHAT) { - if(!$_G['uid']) { - include template('wechat:wechat_bind'); - } else { - $redirect = WeChat::redirect(); - if($redirect) { - dheader('location: '.$redirect); - } else { - dheader('location: '.$_G['siteurl']); - } - } - } else { - dheader('location: '.$_G['siteurl'].'member.php?mod=logging&action=login&referer='.dreferer()); - } -} elseif($ac == 'login' && submitcheck('submit')) { - if(!($loginperm = logincheck($_GET['username']))) { - showmessage('login_strike'); - } - - if(!$_GET['password'] || $_GET['password'] != addslashes($_GET['password'])) { - showmessage('profile_passwd_illegal'); - } - - if(DISCUZ_VERSION < 'X3.0') { - $_GET['username'] = WeChatEmoji::clear($_GET['username']); - } - $result = userlogin($_GET['username'], $_GET['password'], $_GET['questionid'], $_GET['answer'], $_G['setting']['autoidselect'] ? 'auto' : $_GET['loginfield'], $_G['clientip']); - - if($result['status'] <= 0) { - loginfailed($_GET['username']); - failedip(); - if($loginperm == -1) { - showmessage('login_password_invalid'); - } else { - showmessage('login_invalid', '', array('loginperm' => $loginperm - 1)); - } - } - - if(!$_G['wechat']['setting']['wechat_qrtype']) { - if($wechatuser) { - if($result['member']['uid'] != $wechatuser['uid']) { - showmessage('wechat:wechat_openid_exists'); - } - wechat_setloginstatus($result['member']['uid'], true); - } else { - WeChatHook::bindOpenId($result['member']['uid'], $openid); - wsq::report('bind'); - } - setloginstatus($result['member'], 1296000); - - showmessage('wechat:wechat_member_bind_succeed', $selfurl.'bind'); - } else { - C::t('#wechat#common_member_wechatmp')->insert(array('uid' => $result['member']['uid'], 'openid' => $_GET['wxopenid'], 'status' => 1), false, true); - wsq::report('bind'); - $url = wsq::wxuserregisterUrl($result['member']['uid']); - showmessage('wechat:wechat_member_bind_succeed', $url); - } -} elseif(($ac == 'register' && submitcheck('submit') || $ac == 'wxregister') && $_G['wechat']['setting']['wechat_allowregister']) { - if($wechatuser) { - showmessage('wechat:wechat_openid_exists'); - } else { - if(DISCUZ_VERSION < 'X3.0' && $_G['inajax']) { - $_GET['username'] = WeChatEmoji::clear($_GET['username']); - } - if($ac == 'wxregister') { - loaducenter(); - $user = uc_get_user($_GET['username']); - if(!empty($user)) { - $_GET['username'] = cutstr($_GET['username'], 7, '').'_'.random(5); - } - } - - $uid = WeChat::register($_GET['username'], $ac == 'wxregister'); - - if($uid && $_GET['avatar']) { - WeChat::syncAvatar($uid, $_GET['avatar']); - } - - if(!$_G['wechat']['setting']['wechat_qrtype']) { - WeChatHook::bindOpenId($uid, $openid, 1); - wsq::report('register'); - showmessage('wechat:wechat_member_register_succeed', $selfurl.'bind&confirm=yes'); - } else { - C::t('#wechat#common_member_wechatmp')->insert(array('uid' => $uid, 'openid' => $wxopenid ? $wxopenid : $_GET['wxopenid'], 'status' => 0), false, true); - wsq::report('register'); - $url = wsq::wxuserregisterUrl($uid); - if($ac == 'wxregister') { - dheader('location: '.$url); - } else { - showmessage('wechat:wechat_member_register_succeed', $url); - } - } - } -} elseif($ac == 'logout') { - if($_GET['hash'] == formhash()) { - wechat_setloginstatus($_G['uid'], false); - clearcookies(); - } - mobile_core::result(array()); -} elseif($ac == 'unbind') { - if($_GET['hash'] == formhash()) { - if($wechatuser) { - C::t('#wechat#common_member_wechat')->delete($wechatuser['uid']); - wsq::report('unbind'); - } - clearcookies(); - } - mobile_core::result(array()); -} elseif($ac == 'unbindmp') { - if($_G['wechat']['setting']['wechat_qrtype'] && $_GET['hash'] == formhash()) { - C::t('#wechat#common_member_wechatmp')->delete($_GET['uid']); - } - mobile_core::result(array()); -} else { - showmessage('undefined_action'); -} - -function wechat_setloginstatus($uid, $login) { - C::t('#wechat#common_member_wechat')->update($uid, array('status' => $login ? 2 : 1)); -} \ No newline at end of file diff --git a/upload/source/plugin/wechat/wechat.lib.class.php b/upload/source/plugin/wechat/wechat.lib.class.php deleted file mode 100644 index 0e51fbd6..00000000 --- a/upload/source/plugin/wechat/wechat.lib.class.php +++ /dev/null @@ -1,1075 +0,0 @@ -_token = $token; - $this->_hooks = $hooks; - $this->accessDataPush(); - } - - private function _activeHook($type) { - if (!isset($this->_hooks[$type])) { - return null; - } - $hook = & $this->_hooks[$type]; - global $_G; - if (!in_array($hook['plugin'], $_G['setting']['plugins']['available'])) { - return null; - } - if (!preg_match("/^[\w\_]+$/i", $hook['plugin']) || !preg_match('/^[\w\_\.]+\.php$/i', $hook['include'])) { - return null; - } - include_once DISCUZ_ROOT . 'source/plugin/' . $hook['plugin'] . '/' . $hook['include']; - if (!class_exists($hook['class'], false)) { - return null; - } - if (!isset($this->classes[$hook['class']])) { - $this->classes[$hook['class']] = new $hook['class']; - } - if (!method_exists($this->classes[$hook['class']], $hook['method'])) { - return null; - } - $param = func_get_args(); - array_shift($param); - return call_user_func(array($this->classes[$hook['class']], $hook['method']), $param); - } - - private function _checkSignature() { - $signature = $_GET["signature"]; - $timestamp = $_GET["timestamp"]; - $nonce = $_GET["nonce"]; - - $token = $this->_token; - $tmpArr = array($token, $timestamp, $nonce); - sort($tmpArr, SORT_STRING); - $tmpStr = implode($tmpArr); - $tmpStr = sha1($tmpStr); - - return $tmpStr == $signature; - } - - private function _handlePostObj($postObj) { - $MsgType = strtolower((string) $postObj->MsgType); - $result = array( - 'from' => self::$_from_id = (string) htmlspecialchars($postObj->FromUserName), - 'to' => self::$_my_id = (string) htmlspecialchars($postObj->ToUserName), - 'time' => (int) $postObj->CreateTime, - 'type' => (string) $MsgType - ); - - if (property_exists($postObj, 'MsgId')) { - $result['id'] = $postObj->MsgId; - } - - switch ($result['type']) { - case 'text': - $result['content'] = (string) $postObj->Content; // Content Ϣ - break; - - case 'location': - $result['X'] = (float) $postObj->Location_X; // Location_X λγ - $result['Y'] = (float) $postObj->Location_Y; // Location_Y λþ - $result['S'] = (float) $postObj->Scale; // Scale ͼŴС - $result['I'] = (string) $postObj->Label; // Label λϢ - break; - - case 'image': - $result['url'] = (string) $postObj->PicUrl; // PicUrl ͼƬӣ߿HTTP GETȡ - $result['mid'] = (string) $postObj->MediaId; // MediaId ͼƬϢýidԵöýļؽӿȡݡ - break; - - case 'video': - $result['mid'] = (string) $postObj->MediaId; // MediaId ͼƬϢýidԵöýļؽӿȡݡ - $result['thumbmid'] = (string) $postObj->ThumbMediaId; // ThumbMediaId ƵϢͼýidԵöýļؽӿȡݡ - break; - - case 'link': - $result['title'] = (string) $postObj->Title; - $result['desc'] = (string) $postObj->Description; - $result['url'] = (string) $postObj->Url; - break; - - case 'voice': - $result['mid'] = (string) $postObj->MediaId; - $result['format'] = (string) $postObj->Format; - if (property_exists($postObj, 'Recognition')) { - $result['txt'] = (string) $postObj->Recognition; - } - break; - - case 'event': - $result['event'] = strtolower((string) $postObj->Event); - switch ($result['event']) { - - case 'subscribe': - case 'scan': - if (property_exists($postObj, 'EventKey')) { - $result['key'] = str_replace( - 'qrscene_', '', (string) $postObj->EventKey - ); - $result['ticket'] = (string) $postObj->Ticket; - } - break; - - case 'location': - $result['la'] = (string) $postObj->Latitude; - $result['lo'] = (string) $postObj->Longitude; - $result['p'] = (string) $postObj->Precision; - break; - - case 'click': - $result['key'] = (string) $postObj->EventKey; - break; - case 'masssendjobfinish': - $result['msg_id'] = (string) $postObj->MsgID; - $result['status'] = (string) $postObj->Status; - $result['totalcount'] = (string) $postObj->TotalCount; - $result['filtercount'] = (string) $postObj->FilterCount; - $result['sentcount'] = (string) $postObj->SentCount; - $result['errorcount'] = (string) $postObj->ErrorCount; - } - } - - return $result; - } - - private function accessDataPush() { - if (!$this->_checkSignature()) { - if (!headers_sent()) { - header('HTTP/1.1 404 Not Found'); - header('Status: 404 Not Found'); - } - $this->_activeHook('404'); - return; - } - - $postdata = file_get_contents("php://input"); - if ($postdata) { - if (!$this->_checkSignature()) { - return; - } - $postObj = simplexml_load_string($postdata, 'SimpleXMLElement', LIBXML_NOCDATA); - $postObj = $this->_handlePostObj($postObj); - - $this->_activeHook('receiveAllStart', $postObj); - - if (isset($postObj['event'])) { - $hookName = 'receiveEvent::' . $postObj['event']; - } else { - $hookName = 'receiveMsg::' . $postObj['type']; - } - $this->_activeHook($hookName, $postObj); - - $this->_activeHook('receiveAllEnd', $postObj); - } elseif (isset($_GET['echostr'])) { - - $this->_activeHook('accessCheckSuccess'); - if (!headers_sent()) { - header('Content-Type: text/plain'); - } - echo preg_replace('/[^a-z0-9]/i', '', $_GET['echostr']); - } - } - - private static $_from_id; - private static $_my_id; - - private static function _format2xml($nodes) { - $xml = '' - . '' - . '' - . '%s' - . '%s' - . ''; - $return = sprintf( - $xml, self::$_from_id, self::$_my_id, time(), $nodes - ); - return diconv($return, CHARSET, 'UTF-8'); - } - - public static function getXml4Txt($txt) { - $xml = '' - . ''; - return self::_format2xml( - sprintf( - $xml, $txt - ) - ); - } - - public static function getXml4ImgByMid($mid) { - $xml = '' - . '' - . '' - . ''; - return self::_format2xml( - sprintf( - $xml, $mid - ) - ); - } - - public static function getXml4VoiceByMid($mid) { - $xml = '' - . '' - . '' - . ''; - return self::_format2xml( - sprintf( - $xml, $mid - ) - ); - } - - public static function getXml4VideoByMid($mid, $title, $desc = '') { - $desc = '' !== $desc ? $desc : $title; - $xml = '' - . ''; - - return self::_format2xml( - sprintf( - $xml, $mid, $title, $desc - ) - ); - } - - public static function getXml4MusicByUrl($url, $thumbmid, $title, $desc = '', $hqurl = '') { - $xml = '' - . '' - . '<![CDATA[%s]]>' - . '' - . '' - . '' - . '' - . ''; - - return self::_format2xml( - sprintf( - $xml, $title, '' === $desc ? $title : $desc, $url, $hqurl ? $hqurl : $url, $thumbmid - ) - ); - } - - public static function getXml4RichMsgByArray($list) { - $max = 10; - $i = 0; - $ii = count($list); - $list_xml = ''; - while ($i < $ii && $i < $max) { - $item = $list[$i++]; - $list_xml .= - sprintf( - '' - . '<![CDATA[%s]]> ' - . '' - . '' - . '' - . '', $item['title'], $item['desc'], $item['pic'], $item['url'] - ); - } - - $xml = '' - . '%s' - . '%s'; - - return self::_format2xml( - sprintf( - $xml, $i, $list_xml - ) - ); - } - -} - -class WeChatClient { - - public static $_URL_API_ROOT = 'https://api.weixin.qq.com'; - public static $_URL_FILE_API_ROOT = 'https://api.weixin.qq.com'; - public static $_URL_QR_ROOT = 'https://mp.weixin.qq.com'; - public static $_QRCODE_TICKET_DEFAULT_ID = 1; - public static $ERRCODE_MAP = array( - '-1' => '系统繁忙', - '0' => '请求成功', - '40001' => '获取access_token时AppSecret错误,或者access_token无效', - '40002' => '不合法的凭证类型', - '40003' => '不合法的OpenID', - '40004' => '不合法的媒体文件类型', - '40005' => '不合法的文件类型', - '40006' => '不合法的文件大小', - '40007' => '不合法的媒体文件id', - '40008' => '不合法的消息类型', - '40009' => '不合法的图片文件大小', - '40010' => '不合法的语音文件大小', - '40011' => '不合法的视频文件大小', - '40012' => '不合法的缩略图文件大小', - '40013' => '不合法的APPID', - '40014' => '不合法的access_token', - '40015' => '不合法的菜单类型', - '40016' => '不合法的按钮个数', - '40017' => '不合法的按钮个数', - '40018' => '不合法的按钮名字长度', - '40019' => '不合法的按钮KEY长度', - '40020' => '不合法的按钮URL长度', - '40021' => '不合法的菜单版本号', - '40022' => '不合法的子菜单级数', - '40023' => '不合法的子菜单按钮个数', - '40024' => '不合法的子菜单按钮类型', - '40025' => '不合法的子菜单按钮名字长度', - '40026' => '不合法的子菜单按钮KEY长度', - '40027' => '不合法的子菜单按钮URL长度', - '40028' => '不合法的自定义菜单使用用户', - '40029' => '不合法的oauth_code', - '40030' => '不合法的refresh_token', - '40031' => '不合法的openid列表', - '40032' => '不合法的openid列表长度', - '40033' => '不合法的请求字符,不能包含\uxxxx格式的字符', - '40035' => '不合法的参数', - '40038' => '不合法的请求格式', - '40039' => '不合法的URL长度', - '40050' => '不合法的分组id', - '40051' => '分组名字不合法', - '41001' => '缺少access_token参数', - '41002' => '缺少appid参数', - '41003' => '缺少refresh_token参数', - '41004' => '缺少secret参数', - '41005' => '缺少多媒体文件数据', - '41006' => '缺少media_id参数', - '41007' => '缺少子菜单数据', - '41008' => '缺少oauth code', - '41009' => '缺少openid', - '42001' => 'access_token超时', - '42002' => 'refresh_token超时', - '42003' => 'oauth_code超时', - '43001' => '需要GET请求', - '43002' => '需要POST请求', - '43003' => '需要HTTPS请求', - '43004' => '需要接收者关注', - '43005' => '需要好友关系', - '44001' => '多媒体文件为空', - '44002' => 'POST的数据包为空', - '44003' => '图文消息内容为空', - '44004' => '文本消息内容为空', - '45001' => '多媒体文件大小超过限制', - '45002' => '消息内容超过限制', - '45003' => '标题字段超过限制', - '45004' => '描述字段超过限制', - '45005' => '链接字段超过限制', - '45006' => '图片链接字段超过限制', - '45007' => '语音播放时间超过限制', - '45008' => '图文消息超过限制', - '45009' => '接口调用超过限制', - '45010' => '创建菜单个数超过限制', - '45015' => '回复时间超过限制', - '45016' => '系统分组,不允许修改', - '45017' => '分组名字过长', - '45018' => '分组数量超过上限', - '46001' => '不存在媒体数据', - '46002' => '不存在的菜单版本', - '46003' => '不存在的菜单数据', - '46004' => '不存在的用户', - '47001' => '解析JSON/XML内容错误', - '48001' => 'api功能未授权', - '50001' => '用户未授权该api', - ); - public static $_USERINFO_LANG = 'en'; - private $_appid; - private $_appsecret; - private static $_accessTokenCache = array(); - private static $ERROR_LOGS = array(); - private static $ERROR_NO = 0; - - public function __construct($appid, $appsecret = '') { - if ($appsecret) { - $this->_appid = $appid; - $this->_appsecret = $appsecret; - } else { - $info = WeChatHook::getAppInfo($appid); - $this->_appid = $info['appId']; - $this->_appsecret = $info['appSecret']; - } - } - - public static function error() { - return self::$ERRCODE_MAP[self::$ERROR_NO] ? self::$ERRCODE_MAP[self::$ERROR_NO] : self::$ERROR_NO; - } - - public static function checkIsSuc($res) { - $result = true; - if (is_string($res)) { - $res = json_decode($res, true); - } - if (isset($res['errcode']) && ( 0 !== (int) $res['errcode'])) { - array_push(self::$ERROR_LOGS, $res); - $result = false; - self::$ERROR_NO = $res['errcode']; - } - return $result; - } - - public static function get($url) { - if (!function_exists('curl_init')) { - return dfsockopen($url); - } - $ch = curl_init(); - curl_setopt($ch, CURLOPT_URL, $url); - # curl_setopt($ch, CURLOPT_HEADER, 1); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); - - curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); - curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE); - - if (!curl_exec($ch)) { - error_log(curl_error($ch)); - $data = ''; - } else { - $data = curl_multi_getcontent($ch); - } - curl_close($ch); - return $data; - } - - private static function post($url, $data) { - if (!function_exists('curl_init')) { - return dfsockopen($url, 0, $data); - } - $ch = curl_init(); - curl_setopt($ch, CURLOPT_URL, $url); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); - # curl_setopt( $ch, CURLOPT_HEADER, 1); - - curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); - curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE); - - curl_setopt($ch, CURLOPT_POST, 1); - curl_setopt($ch, CURLOPT_POSTFIELDS, $data); - $data = curl_exec($ch); - if (!$data) { - error_log(curl_error($ch)); - } - curl_close($ch); - return $data; - } - - public function getAccessToken($tokenOnly = 1, $nocache = 0) { - global $_G; - $myTokenInfo = null; - $appid = $this->_appid; - $appsecret = $this->_appsecret; - $cachename = 'wechatat_' . $appid; - loadcache($cachename); - - if ($nocache || empty(self::$_accessTokenCache[$appid])) { - self::$_accessTokenCache[$appid] = $_G['cache'][$cachename]; - } - - if (!empty(self::$_accessTokenCache[$appid])) { - $myTokenInfo = self::$_accessTokenCache[$appid]; - if (time() < $myTokenInfo['expiration']) { - return $tokenOnly ? $myTokenInfo['token'] : $myTokenInfo; - } - } - - $url = self::$_URL_API_ROOT . "/cgi-bin/token?grant_type=client_credential&appid=$appid&secret=$appsecret"; - - $json = self::get($url); - $res = json_decode($json, true); - - if (self::checkIsSuc($res)) { - self::$_accessTokenCache[$appid] = $myTokenInfo = array( - 'token' => $res['access_token'], - 'expiration' => time() + (int) $res['expires_in'] - ); - savecache($cachename, $myTokenInfo); - } - return $tokenOnly ? $myTokenInfo['token'] : $myTokenInfo; - } - - public function setAccessToken($tokenInfo) { - if ($tokenInfo) { - $appid = $this->_appid; - self::$_accessTokenCache[$appid] = array( - 'token' => $tokenInfo['token'], - 'expire' => $tokenInfo['expire'] - ); - } - } - - public function upload($type, $file_path, $mediaidOnly = 1) { - $access_token = $this->getAccessToken(); - $url = self::$_URL_FILE_API_ROOT . "/cgi-bin/media/upload?access_token=$access_token&type=$type"; - - $res = self::post($url, array('media' => "@$file_path")); - $res = json_decode($res, true); - - if (self::checkIsSuc($res)) { - return $mediaidOnly ? $res['media_id'] : $res; - } - return null; - } - - public function download($mid) { - $access_token = $this->getAccessToken(); - $url = self::$_URL_FILE_API_ROOT . "/cgi-bin/media/get?access_token=$access_token&media_id=$mid"; - - return self::get($url); - } - - public function getMenu() { - - $access_token = $this->getAccessToken(); - $url = self::$_URL_API_ROOT . "/cgi-bin/menu/get?access_token=$access_token"; - - $json = self::get($url); - - $res = json_decode($json, true); - if (self::checkIsSuc($res)) { - return $res; - } - return null; - } - - public function deleteMenu() { - $access_token = $this->getAccessToken(); - $url = self::$_URL_API_ROOT . "/cgi-bin/menu/delete?access_token=$access_token"; - - $res = self::get($url); - return self::checkIsSuc($res); - } - - public function setMenu($myMenu) { - $access_token = $this->getAccessToken(); - $url = self::$_URL_API_ROOT . "/cgi-bin/menu/create?access_token=$access_token"; - - if (defined('JSON_UNESCAPED_UNICODE')) { - $json = is_string($myMenu) ? $myMenu : json_encode($myMenu, JSON_UNESCAPED_UNICODE); - } else { - $json = is_string($myMenu) ? $myMenu : json_encode($myMenu); - } - - $json = urldecode($json); - $res = self::post($url, $json); - - return self::checkIsSuc($res); - } - - private function _send($to, $type, $data) { - $access_token = $this->getAccessToken(); - $url = self::$_URL_API_ROOT . "/cgi-bin/message/custom/send?access_token=$access_token"; - - $json = json_encode( - array( - 'touser' => $to, - 'msgtype' => $type, - $type => $data - ) - ); - - $res = self::post($url, $json); - - return self::checkIsSuc($res); - } - - public function sendTextMsg($to, $msg) { - return $this->_send($to, 'text', array('content' => $msg)); - } - - public function sendImgMsg($to, $mid) { - return $this->_send($to, 'image', array('media_id' => $mid)); - } - - public function sendVoice($to, $mid) { - return $this->_send($to, 'voice', array('media_id' => $mid)); - } - - public function sendVideo($to, $mid, $title, $desc) { - return $this->_send($to, 'video', array( - 'media_id' => $mid, - 'title' => $title, - 'description' => $desc - )); - } - - public function sendMusic($to, $url, $thumb_mid, $title, $desc = '', $hq_url = '') { - return $this->_send($to, 'music', array( - 'media_id' => null, - 'title' => $title, - 'description' => $desc || $title, - 'musicurl' => $url, - 'thumb_media_id' => $thumb_mid, - 'hqmusicurl' => $hq_url || $url - )); - } - - static private function _filterForRichMsg($articles) { - $i = 0; - $ii = is_array($articles) ? count($articles) : 0; - $list = array('title', 'desc', 'url', 'thumb_url'); - $result = array(); - while ($i < $ii) { - $currentArticle = $articles[$i++]; - array_push($result, array( - 'title' => $currentArticle['title'], - 'description' => $currentArticle['desc'], - 'url' => $currentArticle['url'], - 'picurl' => $currentArticle['thumb_url'] - )); - } - return $result; - } - - public function uploadNews($articles) { - $i = 0; - $ii = count($articles); - $result = array(); - while ($i < $ii) { - $currentArticle = $articles[$i++]; - try { - array_push($result, array( - 'thumb_media_id' => $currentArticle['thumb_media_id'], - 'title' => $this->convertToUtf($currentArticle['title']), - 'content' => $this->convertToUtf($currentArticle['content']), - 'author' => $this->convertToUtf($currentArticle['author']), - 'content_source_url' => $this->convertToUtf($currentArticle['url']), - 'digest' => $this->convertToUtf($currentArticle['desc']), - 'show_cover_pic' => 1 - )); - } catch (Exception $e) { - - } - } - - $access_token = $this->getAccessToken(); - $url = self::$_URL_API_ROOT . "/cgi-bin/media/uploadnews?access_token=$access_token"; - if (defined('JSON_UNESCAPED_UNICODE')) { - $json = json_encode(array('articles' => $result), JSON_UNESCAPED_UNICODE); - } else { - $json = json_encode(array('articles' => $result)); - } - - $json = urldecode($json); - - $res = self::post($url, $json); - if (self::checkIsSuc($res)) { - return json_decode($res, true); - } else { - return false; - } - } - - public function sendMassMsg($msg) { - $access_token = $this->getAccessToken(); - $url = self::$_URL_API_ROOT . "/cgi-bin/message/mass/sendall?access_token=$access_token"; - $post = array(); - $post['filter'] = array('group_id' => $msg['group_id']); - if ($msg['type'] == 'media') { - $post['mpnews'] = array('media_id' => $msg['media_id']); - $post['msgtype'] = 'mpnews'; - } else { - $post['text'] = array('content' => $this->convertToUtf($msg['text'])); - $post['msgtype'] = 'text'; - } - - if (defined('JSON_UNESCAPED_UNICODE')) { - $json = json_encode($post, JSON_UNESCAPED_UNICODE); - } else { - $json = json_encode($post); - } - - $json = urldecode($json); - - $res = self::post($url, $json); - if (self::checkIsSuc($res)) { - return json_decode($res, true); - } else { - return false; - } - } - - function convertToUtf($str) { - return urlencode(diconv($str, CHARSET, 'UTF-8')); - } - - public function sendRichMsg($to, $articles) { - - return $this->_send($to, 'news', array( - 'articles' => self::_filterForRichMsg($articles) - )); - } - - public function createGroup($name) { - $access_token = $this->getAccessToken(); - $url = self::$_URL_API_ROOT . "/cgi-bin/groups/create?access_token=$access_token"; - - $res = self::post($url, json_encode(array( - 'group' => array('name' => $name) - ))); - - $res = json_decode($res, true); - return self::checkIsSuc($res) ? $res['group']['id'] : null; - } - - public function renameGroup($gid, $name) { - $access_token = $this->getAccessToken(); - $url = self::$_URL_API_ROOT . "/cgi-bin/groups/update?access_token=$access_token"; - - $res = self::post($url, json_encode(array( - 'group' => array( - 'id' => $gid, - 'name' => $name - ) - ))); - - $res = json_decode($res, true); - return self::checkIsSuc($res); - } - - public function moveUserById($uid, $gid) { - $access_token = $this->getAccessToken(); - $url = self::$_URL_API_ROOT . "/cgi-bin/groups/members/update?access_token=$access_token"; - - $res = self::post( - $url, json_encode( - array( - 'openid' => $mid, - 'to_groupid' => $gid - ) - ) - ); - - $res = json_decode($res, true); - return self::checkIsSuc($res); - } - - public function getAllGroups() { - $access_token = $this->getAccessToken(); - $url = self::$_URL_API_ROOT . "/cgi-bin/groups/get?access_token=$access_token"; - - $res = json_decode(self::get($url), true); - - if (self::checkIsSuc($res)) { - return $res['groups']; - } else { - return null; - } - } - - public function getGroupidByUserid($uid) { - $access_token = $this->getAccessToken(); - $url = self::$_URL_API_ROOT . "/cgi-bin/groups/getid?access_token=$access_token"; - - $res = self::post($url, json_encode(array( - 'openid' => $mid - ))); - - $res = json_decode($res, true); - return self::checkIsSuc($res) ? $res['groupid'] : null; - } - - public function getUserInfoById($uid, $lang = '') { - if (!$lang) { - $lang = self::$_USERINFO_LANG; - } - $access_token = $this->getAccessToken(); - $url = self::$_URL_API_ROOT . "/cgi-bin/user/info?access_token=$access_token&openid=$uid&lang=$lang"; - - $res = json_decode(self::get($url), true); - - return self::checkIsSuc($res) ? $res : null; - } - - public function getFollowersList($next_id = '') { - $access_token = $this->getAccessToken(); - $extend = ''; - if ($next_id) { - $extend = "&next_openid=$next_id"; - } - $url = self::$_URL_API_ROOT . "/cgi-bin/user/get?access_token=${access_token}$extend"; - - $res = json_decode( - self::get($url), true - ); - - return self::checkIsSuc($res) ? array( - 'total' => $res['total'], - 'list' => $res['data']['openid'], - 'next_id' => isset($res['next_openid']) ? $res['next_openid'] : null - ) : null; - } - - public function getOAuthConnectUri($redirect_uri, $state = '', $scope = 'snsapi_base') { - $redirect_uri = urlencode($redirect_uri); - $url = "https://open.weixin.qq.com/connect/oauth2/authorize?appid={$this->_appid}&redirect_uri={$redirect_uri}&response_type=code&scope={$scope}&state={$state}#wechat_redirect"; - return $url; - } - - public function getAccessTokenByCode($code) { - $url = "https://api.weixin.qq.com/sns/oauth2/access_token?appid={$this->_appid}&secret={$this->_appsecret}&code=$code&grant_type=authorization_code"; - $res = json_decode(self::get($url), true); - return $res; - } - - public function refreshAccessTocken($refresh_token) { - $url = "https://api.weixin.qq.com/sns/oauth2/refresh_token?appid={$this->_appid}&grant_type=refresh_token&refresh_token=$refresh_token"; - $res = json_decode(self::get($url), true); - return $res; - } - - public function getUserInfoByAuth($access_token, $openid, $lang = 'zh_CN') { - $url = "https://api.weixin.qq.com/sns/userinfo?access_token=$access_token&openid=$openid&lang=$lang"; - $res = json_decode(self::get($url), true); - return $res; - } - - public static function getQrcodeImgByTicket($ticket) { - return self::get(self::getQrcodeImgUrlByTicket($ticket)); - } - - public static function getQrcodeImgUrlByTicket($ticket) { - $ticket = urlencode($ticket); - return self::$_URL_QR_ROOT . "/cgi-bin/showqrcode?ticket=$ticket"; - } - - public function getQrcodeTicket($options = array()) { - $access_token = $this->getAccessToken(); - - $scene_id = isset($options['scene_id']) ? (int) $options['scene_id'] : 0; - $expire = isset($options['expire']) ? (int) $options['expire'] : 0; - $ticketOnly = isset($options['ticketOnly']) ? $options['ticketOnly'] : 1; - - $url = self::$_URL_API_ROOT . "/cgi-bin/qrcode/create?access_token=$access_token"; - $data = array( - 'action_name' => 'QR_LIMIT_SCENE', - 'action_info' => array( - 'scene' => array( - 'scene_id' => $scene_id - ) - ) - ); - if ($expire) { - $data['expire_seconds'] = $expire; - $data['action_name'] = 'QR_SCENE'; - } - - if ($data['action_name'] == 'QR_LIMIT_SCENE' && $scene_id > 100000) { - $data['action_info']['scene']['scene_id'] = self::$_QRCODE_TICKET_DEFAULT_ID; - } - - $data = json_encode($data); - - $res = self::post($url, $data); - $res = json_decode($res, true); - - if (self::checkIsSuc($res)) { - return $ticketOnly ? $res['ticket'] : array( - 'ticket' => $res['ticket'], - 'expire' => $res['expire_seconds'] - ); - } - return null; - } - -} - -class WeChatEmoji { - - public static function clear($str) { - $config = self::getList(); - $str = str_replace($config, '', $str); - return diconv($str, 'UTF-8', CHARSET); - } - - public static function getList() { - return array( - "\xee\x98\xbe", "\xee\x98\xbf", "\xee\x99\x80", "\xee\x99\x81", "\xee\x99\x82", "\xee\x99\x83", "\xee\x99\x84", "\xee\x99\x85", "\xee\x9a\xb3", "[\xe5\xa4\x95\xe7\x84\xbc\xe3\x81\x91]", "[\xe8\x99\xb9]", "[\xe9\x9b\xaa\xe7\xb5\x90\xe6\x99\xb6]", "\xee\x98\xbe\xee\x98\xbf", "\xee\x9c\xbf", "[\xe7\x81\xab\xe5\xb1\xb1]", "[\xe5\x9c\xb0\xe7\x90\x83]", "\xee\x9a\x9c", "\xee\x9a\x9d", "\xee\x9a\x9e", "\xee\x9a\x9f", "\xee\x9a\xa0", "[\xe2\x98\x86]", "\xe2\x98\x86\xe5\xbd\xa1", "\xee\x9a\xba", "\xee\x9c\x9f", "\xee\x9c\x9c", "\xee\x99\x86", "\xee\x99\x87", "\xee\x99\x88", "\xee\x99\x89", "\xee\x99\x8a", "\xee\x99\x8b", "\xee\x99\x8c", "\xee\x99\x8d", "\xee\x99\x8e", "\xee\x99\x8f", "\xee\x99\x90", "\xee\x99\x91", "[\xe8\x9b\x87\xe4\xbd\xbf\xe5\xba\xa7]", "\xee\x9d\x81", "\xee\x9d\x83", "\xee\x9d\x86", "\xee\x9d\x87", "\xee\x9d\x88", "[\xe3\x83\x90\xe3\x83\xa9]", "[\xe9\xa2\xa8\xe3\x81\xab\xe8\x88\x9e\xe3\x81\x86\xe8\x91\x89]", "[\xe3\x83\x8f\xe3\x82\xa4\xe3\x83\x93\xe3\x82\xb9\xe3\x82\xab\xe3\x82\xb9]", "[\xe3\x81\xb2\xe3\x81\xbe\xe3\x82\x8f\xe3\x82\x8a]", "[\xe3\x83\xa4\xe3\x82\xb7]", "[\xe3\x82\xb5\xe3\x83\x9c\xe3\x83\x86\xe3\x83\xb3]", "[\xe7\xa8\xb2\xe7\xa9\x82]", "[\xe3\x81\xa8\xe3\x81\x86\xe3\x82\x82\xe3\x82\x8d\xe3\x81\x93\xe3\x81\x97]", "[\xe3\x82\xad\xe3\x83\x8e\xe3\x82\xb3]", "[\xe6\xa0\x97]", "[\xe8\x8a\xb1]", "\xee\x9d\x82", "\xee\x9d\x84", "\xee\x9d\x85", "[\xe3\x81\xbf\xe3\x81\x8b\xe3\x82\x93]", "[\xe3\x82\xa4\xe3\x83\x81\xe3\x82\xb4]", "[\xe3\x82\xb9\xe3\x82\xa4\xe3\x82\xab]", "[\xe3\x83\x88\xe3\x83\x9e\xe3\x83\x88]", "[\xe3\x83\x8a\xe3\x82\xb9]", "[\xe3\x83\xa1\xe3\x83\xad\xe3\x83\xb3]", "[\xe3\x83\x91\xe3\x82\xa4\xe3\x83\x8a\xe3\x83\x83\xe3\x83\x97\xe3\x83\xab]", "[\xe3\x83\x96\xe3\x83\x89\xe3\x82\xa6]", "[\xe3\x83\xa2\xe3\x83\xa2]", "\xee\x9a\x91", "\xee\x9a\x92", "[\xe9\xbc\xbb]", "\xee\x9b\xb9", "\xee\x9c\xa8", "\xee\x9c\x90", "[\xe3\x83\x9e\xe3\x83\x8b\xe3\x82\xad\xe3\x83\xa5\xe3\x82\xa2]", "[\xe3\x82\xa8\xe3\x82\xb9\xe3\x83\x86]", "\xee\x99\xb5", "[\xe5\xba\x8a\xe5\xb1\x8b]", "\xee\x9a\xb1", "\xee\x9b\xb0", "[\xe5\xae\xb6\xe6\x97\x8f]", "[\xe3\x82\xab\xe3\x83\x83\xe3\x83\x97\xe3\x83\xab]", "[\xe8\xad\xa6\xe5\xae\x98]", "[\xe3\x83\x90\xe3\x83\x8b\xe3\x83\xbc]", "[\xe8\x8a\xb1\xe5\xab\x81]", "[\xe7\x99\xbd\xe4\xba\xba]", "[\xe4\xb8\xad\xe5\x9b\xbd\xe4\xba\xba]", "[\xe3\x82\xa4\xe3\x83\xb3\xe3\x83\x89\xe4\xba\xba]", "[\xe3\x81\x8a\xe3\x81\x98\xe3\x81\x84\xe3\x81\x95\xe3\x82\x93]", "[\xe3\x81\x8a\xe3\x81\xb0\xe3\x81\x82\xe3\x81\x95\xe3\x82\x93]", "[\xe8\xb5\xa4\xe3\x81\xa1\xe3\x82\x83\xe3\x82\x93]", "[\xe5\xb7\xa5\xe4\xba\x8b\xe7\x8f\xbe\xe5\xa0\xb4\xe3\x81\xae\xe4\xba\xba]", "[\xe3\x81\x8a\xe5\xa7\xab\xe6\xa7\x98]", "[\xe3\x81\xaa\xe3\x81\xbe\xe3\x81\xaf\xe3\x81\x92]", "[\xe5\xa4\xa9\xe7\x8b\x97]", "[\xe3\x81\x8a\xe5\x8c\x96\xe3\x81\x91]", "[\xe5\xa4\xa9\xe4\xbd\xbf]", "[UFO]", "[\xe5\xae\x87\xe5\xae\x99\xe4\xba\xba]", "[\xe3\x82\xa2\xe3\x82\xaf\xe3\x83\x9e]", "[\xe3\x83\x89\xe3\x82\xaf\xe3\x83\xad]", "[\xe6\xa1\x88\xe5\x86\x85]", "[\xe8\xa1\x9b\xe5\x85\xb5]", "[\xe3\x83\x80\xe3\x83\xb3\xe3\x82\xb9]", "\xee\x9d\x8e", "[\xe3\x83\x98\xe3\x83\x93]", "\xee\x9d\x94", "[\xe3\x83\x8b\xe3\x83\xaf\xe3\x83\x88\xe3\x83\xaa]", "[\xe3\x82\xa4\xe3\x83\x8e\xe3\x82\xb7\xe3\x82\xb7]", "[\xe3\x83\xa9\xe3\x82\xaf\xe3\x83\x80]", "[\xe3\x82\xbe\xe3\x82\xa6]", "[\xe3\x82\xb3\xe3\x82\xa2\xe3\x83\xa9]", "[\xe3\x82\xb5\xe3\x83\xab]", "[\xe3\x83\x92\xe3\x83\x84\xe3\x82\xb8]", "[\xe3\x82\xbf\xe3\x82\xb3]", "[\xe5\xb7\xbb\xe8\xb2\x9d]", "[\xe3\x82\xb2\xe3\x82\xb8\xe3\x82\xb2\xe3\x82\xb8]", "[\xe3\x82\xa2\xe3\x83\xaa]", "[\xe3\x83\x9f\xe3\x83\x84\xe3\x83\x90\xe3\x83\x81]", "[\xe3\x81\xa6\xe3\x82\x93\xe3\x81\xa8\xe3\x81\x86\xe8\x99\xab]", "\xee\x9d\x91", "[\xe3\x82\xab\xe3\x83\xa1]", "\xee\x9d\x8f", "\xee\x9d\x90", "\xee\x9a\xa1", "[\xe3\x82\xa4\xe3\x83\xab\xe3\x82\xab]", "[\xe3\x83\x8d\xe3\x82\xba\xe3\x83\x9f]", "[\xe3\x83\x88\xe3\x83\xa9]", "\xee\x9a\xa2", "[\xe3\x82\xaf\xe3\x82\xb8\xe3\x83\xa9]", "\xee\x9d\x95", "[\xe3\x82\xaf\xe3\x83\x9e]", "[\xe3\x83\x8f\xe3\x83\xa0\xe3\x82\xb9\xe3\x82\xbf\xe3\x83\xbc]", "[\xe7\x89\x9b]", "[\xe3\x82\xa6\xe3\x82\xb5\xe3\x82\xae]", "[\xe3\x82\xab\xe3\x82\xa8\xe3\x83\xab]", "\xee\x9a\x98", "[\xe8\xbe\xb0]", "[\xe3\x83\x91\xe3\x83\xb3\xe3\x83\x80]", "\xee\x9b\xb1", "\xee\x9b\xb3", "\xee\x9b\xb4", "\xee\x9b\xb2", "\xee\x9c\xa3", "\xee\x9c\xa5", "\xee\x9c\xa6", "\xee\x9d\x93", "\xee\x9d\x92", "[\xe9\xa2\xa8\xe9\x82\xaa\xe3\x81\xb2\xe3\x81\x8d]", "\xee\x9c\xaa", "\xee\x9c\xa2", "\xee\x9c\xae", "\xee\x9c\xad", "\xee\x9d\x97", "\xee\x9c\xab", "\xee\x9c\xa4", "\xee\x9c\xa1", "\xee\x9c\xa0", "\xee\x9c\x81", "\xee\x9c\xac", "\xee\x9c\xa9", "\xee\x9c\xaf", "\xee\x9c\x8b", "m(_ _)m", "(/_\xef\xbc\xbc)", "(\xe3\x83\xbb\xc3\x97\xe3\x83\xbb)", "|(\xe3\x83\xbb\xc3\x97\xe3\x83\xbb)|", "(^-^)/", "\xef\xbc\xbc(^o^)\xef\xbc\x8f", "(>\xe4\xba\xba<)", "\xee\x99\xa3", "\xee\x99\xa4", "\xee\x99\xa5", "\xee\x99\xa6", "\xee\x99\xa7", "\xee\x99\xa8", "\xee\x99\xa9", "\xee\x99\xa9\xee\x9b\xaf", "\xee\x99\xaa", "\xee\x9c\xbe", "[\xe6\x95\x99\xe4\xbc\x9a]", "[\xe5\x99\xb4\xe6\xb0\xb4]", "[\xe3\x83\x87\xe3\x83\x91\xe3\x83\xbc\xe3\x83\x88]", "[\xe5\x9f\x8e]", "[\xe5\xb7\xa5\xe5\xa0\xb4]", "\xee\x99\xa1", "\xee\x9d\x8b", "\xee\x9d\x80", "[\xe6\x9d\xb1\xe4\xba\xac\xe3\x82\xbf\xe3\x83\xaf\xe3\x83\xbc]", "[\xe8\x87\xaa\xe7\x94\xb1\xe3\x81\xae\xe5\xa5\xb3\xe7\xa5\x9e]", "[\xe6\x97\xa5\xe6\x9c\xac\xe5\x9c\xb0\xe5\x9b\xb3]", "[\xe3\x83\xa2\xe3\x82\xa2\xe3\x82\xa4]", "\xee\x9a\x99", "\xee\x99\xb4", "[\xe3\x83\x96\xe3\x83\xbc\xe3\x83\x84]", "\xee\x9a\x9a", "\xee\x9c\x8e", "\xee\x9c\x91", "\xee\x9c\x9a", "[\xe3\x83\x8d\xe3\x82\xaf\xe3\x82\xbf\xe3\x82\xa4]", "[\xe5\xb8\xbd\xe5\xad\x90]", "[\xe3\x83\x89\xe3\x83\xac\xe3\x82\xb9]", "[\xe7\x9d\x80\xe7\x89\xa9]", "[\xe3\x83\x93\xe3\x82\xad\xe3\x83\x8b]", "\xee\x9c\x8f", "\xee\x9a\x82", "\xee\x9a\xad", "\xee\x9c\x95", "[$\xef\xbf\xa5]", "[\xe6\xa0\xaa\xe4\xbe\xa1]", "[\xe3\x82\xab\xe3\x83\xbc\xe3\x83\x89]", "\xee\x9b\x96", "[\xe9\xa3\x9b\xe3\x82\x93\xe3\x81\xa7\xe3\x81\x84\xe3\x81\x8f\xe3\x81\x8a\xe9\x87\x91]", "[\xe4\xb8\xad\xe5\x9b\xbd]", "[\xe3\x83\x89\xe3\x82\xa4\xe3\x83\x84]", "[\xe3\x82\xb9\xe3\x83\x9a\xe3\x82\xa4\xe3\x83\xb3]", "[\xe3\x83\x95\xe3\x83\xa9\xe3\x83\xb3\xe3\x82\xb9]", "[\xe3\x82\xa4\xe3\x82\xae\xe3\x83\xaa\xe3\x82\xb9]", "[\xe3\x82\xa4\xe3\x82\xbf\xe3\x83\xaa\xe3\x82\xa2]", "[\xe6\x97\xa5\xe3\x81\xae\xe4\xb8\xb8]", "[\xe9\x9f\x93\xe5\x9b\xbd]", "[\xe3\x83\xad\xe3\x82\xb7\xe3\x82\xa2]", "[USA]", "[\xe7\x82\x8e]", "\xee\x9b\xbb", "\xee\x9c\x98", "[\xe3\x83\x8f\xe3\x83\xb3\xe3\x83\x9e\xe3\x83\xbc]", "[\xe3\x83\x8d\xe3\x82\xb8]", "[\xe5\x8c\x85\xe4\xb8\x81]", "[\xe3\x83\x94\xe3\x82\xb9\xe3\x83\x88\xe3\x83\xab]", "[\xe5\x8d\xa0\xe3\x81\x84]", "[\xe8\x8b\xa5\xe8\x91\x89\xe3\x83\x9e\xe3\x83\xbc\xe3\x82\xaf]", "[\xe6\xb3\xa8\xe5\xb0\x84]", "[\xe8\x96\xac]", "[A]", "[B]", "[AB]", "[O]", "\xee\x9a\x84", "\xee\x9a\x85", "\xee\x9a\x86", "\xee\x9a\xa4", "[\xe3\x82\xb5\xe3\x83\xb3\xe3\x82\xbf]", "[\xe7\xa5\x9d\xe6\x97\xa5]", "[\xe8\x8a\xb1\xe7\x81\xab]", "[\xe9\xa2\xa8\xe8\x88\xb9]", "[\xe3\x82\xaf\xe3\x83\xa9\xe3\x83\x83\xe3\x82\xab\xe3\x83\xbc]", "[\xe9\x96\x80\xe6\x9d\xbe]", "[\xe3\x81\xb2\xe3\x81\xaa\xe7\xa5\xad\xe3\x82\x8a]", "[\xe5\x8d\x92\xe6\xa5\xad\xe5\xbc\x8f]", "[\xe3\x83\xa9\xe3\x83\xb3\xe3\x83\x89\xe3\x82\xbb\xe3\x83\xab]", "[\xe3\x81\x93\xe3\x81\x84\xe3\x81\xae\xe3\x81\xbc\xe3\x82\x8a]", "[\xe7\xb7\x9a\xe9\xa6\x99\xe8\x8a\xb1\xe7\x81\xab]", "[\xe9\xa2\xa8\xe9\x88\xb4]", "[\xe3\x83\x8f\xe3\x83\xad\xe3\x82\xa6\xe3\x82\xa3\xe3\x83\xb3]", "[\xe3\x82\xaa\xe3\x83\xa1\xe3\x83\x87\xe3\x83\x88\xe3\x82\xa6]", "[\xe4\xb8\x83\xe5\xa4\x95]", "[\xe3\x81\x8a\xe6\x9c\x88\xe8\xa6\x8b]", "\xee\x99\x9a", "\xee\x9a\x87", "\xee\x9a\x88", "\xee\x9b\x8e", "\xee\x9a\x89", "\xee\x9b\x90", "\xee\x9b\x93", "\xee\x9b\x8f", "[\xe6\x96\xb0\xe8\x81\x9e]", "[\xe3\x82\xb9\xe3\x83\x94\xe3\x83\xbc\xe3\x82\xab]", "[\xe3\x83\xa1\xe3\x82\xac\xe3\x83\x9b\xe3\x83\xb3]", "[\xe3\x82\xa2\xe3\x83\xb3\xe3\x83\x86\xe3\x83\x8a]", "[\xe9\x80\x81\xe4\xbf\xa1BOX]", "[\xe5\x8f\x97\xe4\xbf\xa1BOX]", "[ABCD]", "[abcd]", "[1234]", "[\xe8\xa8\x98\xe5\x8f\xb7]", "[ABC]", "\xee\x9a\xae", "\xee\x9a\xb2", "\xee\x9c\x96", "\xee\x9c\x99", "\xee\x9c\xb0", "[MD]", "[\xe3\x83\x95\xe3\x83\xad\xe3\x83\x83\xe3\x83\x94\xe3\x83\xbc]", "\xee\x9a\x8c", "[\xe7\x94\xbb\xe3\x81\xb3\xe3\x82\x87\xe3\x81\x86]", "[\xe3\x82\xab\xe3\x83\xac\xe3\x83\xb3\xe3\x83\x80\xe3\x83\xbc]", "[\xe3\x83\x95\xe3\x82\xa9\xe3\x83\xab\xe3\x83\x80]", "\xee\x9a\x83", "[\xe5\x90\x8d\xe6\x9c\xad]", "\xee\x9c\x8a", "[\xe3\x82\xb0\xe3\x83\xa9\xe3\x83\x95]", "[\xe5\xae\x9a\xe8\xa6\x8f]", "[\xe4\xb8\x89\xe8\xa7\x92\xe5\xae\x9a\xe8\xa6\x8f]", "\xee\x99\x92", "\xee\x99\x93", "\xee\x99\x94", "\xee\x99\x95", "\xee\x99\x96", "\xee\x99\x97", "\xee\x99\x98", "\xee\x99\x99", "\xee\x9c\x92", "\xee\x9c\xb3", "[\xe3\x83\x88\xe3\x83\xad\xe3\x83\x95\xe3\x82\xa3\xe3\x83\xbc]", "[\xe3\x83\x95\xe3\x83\x83\xe3\x83\x88\xe3\x83\x9c\xe3\x83\xbc\xe3\x83\xab]", "[\xe6\xb0\xb4\xe6\xb3\xb3]", "\xee\x99\x9b", "\xee\x99\x9c", "\xee\x99\x9d", "\xee\x99\x9e", "\xee\x99\x9f", "\xee\x99\xa0", "[\xe3\x83\x90\xe3\x82\xb9\xe5\x81\x9c]", "\xee\x99\xa2", "\xee\x9a\xa3", "[\xe9\xa7\x85]", "[\xe3\x83\xad\xe3\x82\xb1\xe3\x83\x83\xe3\x83\x88]", "[\xe3\x83\x88\xe3\x83\xa9\xe3\x83\x83\xe3\x82\xaf]", "[\xe6\xb6\x88\xe9\x98\xb2\xe8\xbb\x8a]", "[\xe6\x95\x91\xe6\x80\xa5\xe8\xbb\x8a]", "[\xe3\x83\x91\xe3\x83\x88\xe3\x82\xab\xe3\x83\xbc]", "\xee\x99\xab", "\xee\x99\xac", "\xee\x99\xad", "[\xe5\xb7\xa5\xe4\xba\x8b\xe4\xb8\xad]", "\xee\x9b\xb7", "[\xe3\x82\xad\xe3\x83\xa3\xe3\x83\xb3\xe3\x83\x97]", "\xee\x99\xb9", "[\xe8\xa6\xb3\xe8\xa6\xa7\xe8\xbb\x8a]", "[\xe3\x82\xb8\xe3\x82\xa7\xe3\x83\x83\xe3\x83\x88\xe3\x82\xb3\xe3\x83\xbc\xe3\x82\xb9\xe3\x82\xbf\xe3\x83\xbc]", "\xee\x99\xb6", "\xee\x99\xb7", "\xee\x99\xba", "\xee\x99\xbb", "\xee\x99\xbc", "\xee\x99\xbd", "\xee\x99\xbe", "\xee\x9a\xac", "[\xe6\xbc\x94\xe5\x8a\x87]", "\xee\x9a\x8b", "[\xe9\xba\xbb\xe9\x9b\x80]", "[\xe7\x9a\x84\xe4\xb8\xad]", "[777]", "[\xe3\x83\x93\xe3\x83\xaa\xe3\x83\xa4\xe3\x83\xbc\xe3\x83\x89]", "[\xe3\x82\xb5\xe3\x82\xa4\xe3\x82\xb3\xe3\x83\xad]", "[\xe3\x83\x9c\xe3\x83\xbc\xe3\x83\xaa\xe3\x83\xb3\xe3\x82\xb0]", "[\xe8\x8a\xb1\xe6\x9c\xad]", "[\xe3\x82\xb8\xe3\x83\xa7\xe3\x83\xbc\xe3\x82\xab\xe3\x83\xbc]", "\xee\x9b\xb6", "\xee\x9b\xbf", "[\xe3\x82\xb5\xe3\x83\x83\xe3\x82\xaf\xe3\x82\xb9]", "[\xe3\x82\xae\xe3\x82\xbf\xe3\x83\xbc]", "[\xe3\x83\x94\xe3\x82\xa2\xe3\x83\x8e]", "[\xe3\x83\x88\xe3\x83\xa9\xe3\x83\xb3\xe3\x83\x9a\xe3\x83\x83\xe3\x83\x88]", "[\xe3\x83\x90\xe3\x82\xa4\xe3\x82\xaa\xe3\x83\xaa\xe3\x83\xb3]", "[\xe6\xad\x8c\xe8\xa8\x98\xe5\x8f\xb7]", "\xee\x9a\x81", "\xee\x9a\x8a", "[\xe3\x83\xa9\xe3\x82\xb8\xe3\x82\xaa]", "[\xe3\x83\x93\xe3\x83\x87\xe3\x82\xaa]", "\xee\x9c\x97", "\xee\x9c\x9b", "[\xe8\x8a\xb1\xe6\x9d\x9f]", "\xee\x9b\xad", "[\xe7\xb5\x90\xe5\xa9\x9a\xe5\xbc\x8f]", "[18\xe7\xa6\x81]", "\xee\x9c\xb1", "\xee\x9c\xb6", "\xee\x9c\xb2", "[\xef\xbd\x89]", "\xee\x9b\xa0", "\xee\x9b\xa2", "\xee\x9b\xa3", "\xee\x9b\xa4", "\xee\x9b\xa5", "\xee\x9b\xa6", "\xee\x9b\xa7", "\xee\x9b\xa8", "\xee\x9b\xa9", "\xee\x9b\xaa", "\xee\x9b\xab", "[10]", "[\xe3\x83\x90\xe3\x83\xaa3]", "[\xe3\x83\x9e\xe3\x83\x8a\xe3\x83\xbc\xe3\x83\xa2\xe3\x83\xbc\xe3\x83\x89]", "[\xe3\x82\xb1\xe3\x83\xbc\xe3\x82\xbf\xe3\x82\xa4OFF]", "\xee\x99\xb3", "\xee\x9d\x89", "\xee\x9d\x8a", "\xee\x9d\x8c", "\xee\x9d\x8d", "[\xe3\x83\x95\xe3\x83\xa9\xe3\x82\xa4\xe3\x83\x91\xe3\x83\xb3]", "[\xe3\x82\xbd\xe3\x83\x95\xe3\x83\x88\xe3\x82\xaf\xe3\x83\xaa\xe3\x83\xbc\xe3\x83\xa0]", "[\xe3\x83\x9d\xe3\x83\x86\xe3\x83\x88]", "[\xe3\x81\xa0\xe3\x82\x93\xe3\x81\x94]", "[\xe3\x81\x9b\xe3\x82\x93\xe3\x81\xb9\xe3\x81\x84]", "[\xe3\x83\x91\xe3\x82\xb9\xe3\x82\xbf]", "[\xe3\x82\xab\xe3\x83\xac\xe3\x83\xbc]", "[\xe3\x81\x8a\xe3\x81\xa7\xe3\x82\x93]", "[\xe3\x81\x99\xe3\x81\x97]", "[\xe5\xbc\x81\xe5\xbd\x93]", "[\xe9\x8d\x8b]", "[\xe3\x82\xab\xe3\x82\xad\xe6\xb0\xb7]", "[\xe8\x82\x89]", "[\xe3\x82\x84\xe3\x81\x8d\xe3\x81\x84\xe3\x82\x82]", "[\xe3\x83\x94\xe3\x82\xb6]", "[\xe3\x83\x81\xe3\x82\xad\xe3\x83\xb3]", "[\xe3\x82\xa2\xe3\x82\xa4\xe3\x82\xb9\xe3\x82\xaf\xe3\x83\xaa\xe3\x83\xbc\xe3\x83\xa0]", "[\xe3\x83\x89\xe3\x83\xbc\xe3\x83\x8a\xe3\x83\x84]", "[\xe3\x82\xaf\xe3\x83\x83\xe3\x82\xad\xe3\x83\xbc]", "[\xe3\x83\x81\xe3\x83\xa7\xe3\x82\xb3]", "[\xe3\x82\xad\xe3\x83\xa3\xe3\x83\xb3\xe3\x83\x87\xe3\x82\xa3]", "[\xe3\x83\x97\xe3\x83\xaa\xe3\x83\xb3]", "[\xe3\x83\x8f\xe3\x83\x81\xe3\x83\x9f\xe3\x83\x84]", "[\xe3\x82\xa8\xe3\x83\x93\xe3\x83\x95\xe3\x83\xa9\xe3\x82\xa4]", "\xee\x99\xaf", "\xee\x99\xb0", "\xee\x99\xb1", "\xee\x99\xb2", "\xee\x9c\x9e", "\xee\x9d\x96", "\xee\x99\xb8", "\xee\x9a\x96", "\xee\x9a\x97", "\xee\x9a\xa5", "\xee\x9b\xb5", "\xee\x9c\x80", "\xee\x9c\xbc", "\xee\x9c\xbd", "[\xe2\x86\x91]", "[\xe2\x86\x93]", "[\xe2\x86\x92]", "[\xe2\x86\x90]", "[>]", "[<]", "[>>]", "[<<]", "\xe2\x96\xb2", "\xe2\x96\xbc", "[\xc3\x97]", "\xee\x9c\x82", "\xee\x9c\x83", "\xee\x9c\x84", "[\xef\xbc\x9f]", "\xee\x9c\x89", "\xee\x9b\x9f", "\xee\x9b\xac", "\xee\x9b\xae", "\xee\x9b\xaf", "\xee\x9b\xb8", "\xee\x9a\x8d", "\xee\x9a\x8e", "\xee\x9a\x8f", "\xee\x9a\x90", "\xee\x99\xbf", "\xee\x9a\x80", "\xee\x9a\x9b", "\xee\x9b\x9e", "\xee\x9c\xb7", "\xee\x9c\xb5", "\xee\x9c\x9d", "[\xe2\x99\x82]", "[\xe2\x99\x80]", "\xee\x99\xae", "\xee\x9c\x94", "\xee\x9c\xb8", "[\xe3\x83\x81\xe3\x82\xa7\xe3\x83\x83\xe3\x82\xaf\xe3\x83\x9e\xe3\x83\xbc\xe3\x82\xaf]", "\xee\x9b\x9b", "[COOL]", "\xee\x9b\x97", "\xee\x9b\x98", "\xee\x9b\x9d", "[SOS]", "[UP!]", "[VS]", "[\xe3\x82\xb3\xe3\x82\xb3]", "[\xe3\x82\xb5\xe3\x83\xbc\xe3\x83\x93\xe3\x82\xb9]", "\xee\x9c\xb9", "\xee\x9c\xba", "\xee\x9c\xbb", "[\xe6\x9c\x89]", "[\xe7\x84\xa1]", "[\xe6\x9c\x88]", "[\xe7\x94\xb3]", "[\xe5\x89\xb2]", "[\xe6\x8c\x87]", "[\xe5\x96\xb6]", "\xee\x9c\xb4", "[\xe7\xa5\x9d]", "[\xe5\xbe\x97]", "[\xe5\x8f\xaf]", "[\xef\xbc\x8b]", "[\xef\xbc\x8d]", "[\xc3\xb7]", "\xee\x9b\xbc", "\xee\x9b\xbe", "\xee\x9c\x85", "\xee\x9c\x86", "\xee\x9c\x87", "\xee\x9c\x88", "[\xe3\x82\xa6\xe3\x83\xb3\xe3\x83\x81]", "[\xe5\x8a\x9b\xe3\x81\x93\xe3\x81\xb6]", "[\xe3\x82\xaf\xe3\x83\xa9\xe3\x82\xaf\xe3\x83\xa9]", "[\xe3\x83\x95\xe3\x82\xad\xe3\x83\x80\xe3\x82\xb7]", "\xee\x9b\xba", "\xe2\x96\xa0", "\xe2\x97\x86", "[\xe8\x8a\xb1\xe4\xb8\xb8]", "[100\xe7\x82\xb9]", "\xee\x9b\x9a", "\xe2\x94\x94\xe2\x86\x92", "[\xe9\x9b\xbb\xe6\xb1\xa0]", "[\xe3\x82\xb3\xe3\x83\xb3\xe3\x82\xbb\xe3\x83\xb3\xe3\x83\x88]", "\xee\x9b\x9c", "\xee\x9b\x99", "\xee\x9c\x93", "[\xe3\x83\xa9\xe3\x82\xb8\xe3\x82\xaa\xe3\x83\x9c\xe3\x82\xbf\xe3\x83\xb3]", "[\xe3\x83\x96\xe3\x83\x83\xe3\x82\xaf\xe3\x83\x9e\xe3\x83\xbc\xe3\x82\xaf]", "[\xe3\x83\xaa\xe3\x83\xb3\xe3\x82\xaf]", "[\xe2\x86\x90BACK]", "\xee\x9a\xb9", "\xee\x9a\xb8", "\xee\x9a\xb7", "[TOP]", "\xee\x9a\x93", "\xee\x9a\x95", "\xee\x9a\x94", "\xee\x9b\xbd", "\xee\x9c\xa7", "[\xe4\xba\xba\xe5\xb7\xae\xe3\x81\x97\xe6\x8c\x87]", "[\xe6\x8b\x8d\xe6\x89\x8b]", "\xee\x92\x88", "\xee\x92\x8d", "\xee\x92\x8c", "\xee\x92\x85", "\xee\x92\x87", "\xee\x91\xa9", "\xee\x96\x98", "\xee\xab\xa8", "\xee\xab\xb1", "\xee\xab\xb4", "\xee\x97\x9a", "\xee\xab\xb2", "\xee\x92\x8a", "\xee\x92\x8e", "\xee\x92\xbf", "\xee\xad\xbc", "\xee\xad\x93", "\xee\xad\x9f", "\xee\x96\xb3", "\xee\x96\xa8", "\xee\x96\xa9", "\xee\x96\xaa", "\xee\x92\x86", "\xe2\x97\x8b", "\xee\x92\x89", "\xee\x92\x8b", "\xee\x91\xa8", "\xee\x96\x94", "\xee\x95\xba", "\xee\x95\xbb", "\xee\x91\xbc", "\xee\x92\x8f", "\xee\x92\x90", "\xee\x92\x91", "\xee\x92\x92", "\xee\x92\x93", "\xee\x92\x94", "\xee\x92\x95", "\xee\x92\x96", "\xee\x92\x97", "\xee\x92\x98", "\xee\x92\x99", "\xee\x92\x9a", "\xee\x92\x9b", "\xee\x94\x93", "\xee\x93\xa4", "\xee\xad\xbd", "\xee\x93\x8e", "\xee\x93\x8a", "\xee\x96\xba", "\xee\x97\x8d", "\xee\xaa\x94", "\xee\x93\xa3", "\xee\x93\xa2", "\xee\xaa\x96", "\xee\xac\xb6", "\xee\xac\xb7", "\xee\xac\xb8", "\xee\xad\x89", "\xee\xae\x82", "\xee\x93\x92", "\xee\xac\xb5", "\xee\xaa\xb9", "\xee\xaa\xba", "\xee\x93\x94", "\xee\x93\x8d", "\xee\xaa\xbb", "\xee\xaa\xbc", "\xee\xac\xb2", "\xee\xac\xb3", "\xee\xac\xb4", "\xee\xac\xb9", "\xee\xad\x9a", "\xee\x96\xa4", "\xee\x96\xa5", "\xee\xab\x90", "\xee\xab\x91", "\xee\xad\x87", "\xee\x94\x89", "\xee\xaa\xa0", "\xee\x94\x8b", "\xee\xaa\xa1", "\xee\xaa\xa2", "\xe3\x80\x93", "\xee\x93\xbc", "\xee\x93\xba", "\xee\x94\x81", "\xee\x97\x9d", "\xee\xab\x9b", "\xee\xab\xa9", "\xee\xac\x93", "\xee\xac\x94", "\xee\xac\x95", "\xee\xac\x96", "\xee\xac\x97", "\xee\xac\x98", "\xee\xac\x99", "\xee\xac\x9a", "\xee\xad\x84", "\xee\xad\x85", "\xee\x93\x8b", "\xee\x96\xbf", "\xee\x94\x8e", "\xee\x93\xac", "\xee\x93\xaf", "\xee\x93\xb8", "\xee\xac\x9c", "\xee\xad\xbe", "\xee\xac\xa2", "\xee\x93\x98", "\xee\xac\xa3", "\xee\xac\xa4", "\xee\xac\xa5", "\xee\xac\x9f", "\xee\xac\xa0", "\xee\x93\x99", "\xee\x97\x87", "\xee\xab\xac", "\xee\xac\x9e", "\xee\x93\x9d", "\xee\xad\x97", "\xee\xad\x98", "\xee\xac\x9d", "\xee\x93\x93", "\xee\x97\x94", "\xee\x93\xa0", "\xee\xad\xb6", "\xee\x97\x9b", "\xee\x93\x9c", "\xee\x93\x9f", "\xee\xac\x9b", "\xee\x97\x82", "\xee\x97\x80", "\xee\x93\x9b", "\xee\x91\xb0", "\xee\x93\xa1", "\xee\x93\x9e", "\xee\x97\x81", "\xee\xac\xa1", "\xee\x93\x97", "\xee\x93\x9a", "\xee\x93\xae", "\xee\xac\xbf", "\xee\xad\x86", "\xee\xad\x88", "\xee\x91\xb2", "\xee\xad\xa7", "\xee\xab\x8a", "\xee\xab\x80", "\xee\x96\xae", "\xee\xab\x8b", "\xee\xab\x89", "\xee\x97\x84", "\xee\xab\x81", "\xee\x93\xa7", "\xee\xab\x8d", "\xee\xab\x8f", "\xee\xab\x8e", "\xee\xab\x87", "\xee\xab\x88", "\xee\x91\xb1", "\xee\x91\xb1\xee\x96\xb1", "\xee\xab\x85", "\xee\xae\x80", "\xee\xad\xa4", "\xee\x93\xbb", "\xee\xad\xa9", "\xee\x91\xb3", "\xee\xab\x86", "\xee\xab\x82", "\xee\xad\x9d", "\xee\xab\x83", "\xee\x97\x85", "\xee\xab\x84", "\xee\xaa\xbf", "\xee\x97\x86", "\xee\x91\xb4", "\xee\x97\x83", "\xee\xad\xa1", "\xee\xad\xbf", "\xee\xad\xa3", "\xee\xad\xa0", "\xee\xad\xa5", "\xee\xad\xa8", "\xee\xad\x9e", "\xee\xad\xaa", "\xee\xad\xa6", "\xee\xab\x97", "\xee\xab\x98", "\xee\xab\x99", "\xee\xad\x90", "\xee\xad\x91", "\xee\xad\x92", "\xee\xae\x85", "\xee\xae\x86", "\xee\xae\x87", "\xee\xae\x88", "\xee\xab\x92", "\xee\x92\xab", "\xee\xac\x89", "\xee\x92\xad", "\xee\x97\x9e", "\xee\x97\x9f", "\xee\x92\xaa", "\xee\x92\xa3", "\xee\xaa\x81", "\xee\xab\xb3", "\xee\x92\xa4", "\xee\xaa\x80", "\xee\x96\xbb", "\xee\x97\x8f", "\xee\xab\xb6", "\xee\xab\xb7", "\xee\xab\xb8", "\xee\xab\xb9", "\xee\x92\xa9", "\xee\x92\xbd", "\xee\x96\xbd", "\xee\x93\x80", "\xee\x95\xb2", "\xee\xad\xac", "\xee\x96\xb7", "\xee\xac\xab", "\xee\x94\x9a", "\xee\xaa\x9f", "\xee\xac\xaa", "\xee\x93\xbe", "\xee\x96\xb6", "\xee\xad\xb7", "\xee\x97\x89", "\xee\xaa\x93", "\xee\xaa\x9e", "\xee\xad\xab", "\xee\xaa\xa3", "\xee\xaa\xa4", "\xee\x94\x8d", "\xee\x94\x84", "\xee\x92\x9c", "[\xe3\x81\xb5\xe3\x81\x8f\xe3\x82\x8d]", "\xee\x93\x87", "\xee\x97\x9c", "\xee\x95\xb9", "\xee\x95\xbc", "\xee\x95\xbd", "\xee\x96\x85", "\xee\xad\x9b", "\xee\xac\x91", "\xee\xac\x8e", "\xee\x97\x95", "\xee\xab\xba", "\xee\xac\x90", "\xee\xac\x8f", "\xee\x93\x8c", "\xee\xac\x92", "\xee\x97\x96", "\xee\x95\xb3", "\xee\x91\xbb", "\xee\x96\x83", "\xee\x96\x87", "\xee\x97\x8b", "\xee\x96\x81", "\xee\x95\xbf", "\xee\x94\x8a", "\xee\xaa\x8f", "\xee\x92\x80", "\xee\x94\x90", "\xee\xaa\x9a", "\xee\xac\xa6", "\xee\xac\xa7", "\xee\xac\xa9", "\xee\xac\xa8", "\xee\x96\x9f", "\xee\x93\x8f", "\xee\x96\xa0", "\xee\x93\x89", "\xee\xab\xb0", "\xee\x97\x99", "\xee\x97\x8c", "\xee\xaa\x9b", "\xee\xaa\x9c", "\xee\xab\xa3", "\xee\xab\xa4", "\xee\xab\xa5", "\xee\xab\xa6", "\xee\xab\xa7", "\xee\xab\xab", "\xee\xab\xad", "\xee\xab\xae", "\xee\x91\xaf", "\xee\xac\xbd", "\xee\xab\xaf", "\xee\x96\x9b", "\xee\x96\x96", "\xee\x94\x9e", "\xee\x96\x88", "\xee\xac\x88", "\xee\xaa\x92", "\xee\x94\xa0", "\xee\x94\xa1", "\xee\x96\x91", "\xee\xad\xa2", "\xee\x94\x9b", "\xee\xac\x8a", "\xee\x96\x8b", "\xee\x94\x91", "\xee\x92\xa8", "\xee\x96\x92", "\xee\x96\x93", "\xee\x94\x9f", "\xee\xad\xb1", "\xee\xab\xbd", "\xee\xab\xbe", "\xee\xab\xbf", "\xee\xac\x80", "\xee\xad\x95", "\xee\xac\x83", "[\xe3\x81\x84\xe3\x81\x99]", "\xee\x96\xb8", "\xee\x92\xa1", "\xee\x92\xa0", "\xee\x97\x8e", "\xee\x96\x82", "\xee\x95\xa2", "\xee\x94\x8c", "\xee\x94\x96", "\xee\x95\xa0", "\xee\x95\xa1", "\xee\x95\xa9", "\xee\x95\xa3", "\xee\x96\x8f", "\xee\x96\x90", "\xee\x95\xab", "\xee\x92\x9f", "\xee\x92\x9d", "\xee\x95\xa8", "\xee\x95\xa5", "\xee\x95\xa6", "\xee\x95\xa7", "\xee\x95\xaf", "\xee\x94\x9d", "\xee\x95\x9f", "\xee\x95\xa4", "\xee\x95\xaa", "\xee\x95\xb4", "\xee\x95\xb5", "\xee\x95\xb6", "\xee\x95\xac", "\xee\x95\xad", "\xee\x95\xae", "\xee\x95\xb0", "\xee\x92\xa2", "\xee\xac\x8b", "\xee\x92\xba", "\xee\x96\x99", "\xee\x92\xb7", "\xee\x92\xb6", "\xee\xaa\xac", "\xee\x96\x9a", "\xee\x92\xb9", "\xee\x92\xb8", "\xee\x91\xab", "\xee\xad\x81", "\xee\x97\x93", "\xee\x92\xbb", "\xee\xab\x9e", "\xee\x92\xb5", "\xee\x96\xbc", "\xee\x92\xb0", "\xee\x92\xb1", "\xee\x92\xaf", "\xee\x92\xa7", "\xee\xaa\x82", "\xee\x92\xb3", "\xee\x92\xb4", "\xee\xad\xad", "\xee\x97\x88", "\xee\x92\xb2", "\xee\xab\x9f", "\xee\xab\xa0", "\xee\xab\xa1", "\xee\x95\xb1", "\xee\x92\xa6", "\xee\x91\xaa", "\xee\x97\x97", "\xee\xad\xb3", "\xee\x92\xbc", "\xee\x97\x90", "\xee\x91\xad", "\xee\xab\xa2", "\xee\xad\x82", "\xee\x94\x83", "\xee\x94\x97", "\xee\x94\x88", "\xee\x96\x9c", "\xee\xab\xb5", "\xee\x96\x9e", "\xee\x92\x9e", "\xee\x92\xbe", "\xee\x96\x9d", "\xee\x93\x86", "\xee\x97\x91", "\xee\x93\x85", "\xee\x91\xae", "\xee\xab\x9d", "\xee\x93\x88", "\xee\xad\x83", "\xee\xad\xae", "\xee\xad\xaf", "\xee\x96\xbe", "\xee\x94\x85", "\xee\x94\x86", "\xee\xad\x80", "\xee\xab\x9c", "\xee\x94\x87", "\xee\xab\x8c", "\xee\x94\x95", "\xee\x95\xbe", "\xee\x94\x82", "\xee\x96\xb9", "\xee\x96\x80", "\xee\x93\xab", "\xee\xad\xb8", "\xee\x94\x94", "\xee\x97\x8a", "\xee\xaa\x95", "\xee\xab\x9a", "\xee\xaa\x83", "\xee\x95\x98", "\xee\x95\x99", "\xee\x95\x8e", "\xee\x94\xb3", "\xee\xae\x84", "\xee\x94\xa2", "\xee\x94\xa3", "\xee\x94\xa4", "\xee\x94\xa5", "\xee\x94\xa6", "\xee\x94\xa7", "\xee\x94\xa8", "\xee\x94\xa9", "\xee\x94\xaa", "\xee\x96\xac", "\xee\x94\xab", "\xee\xaa\x84", "\xee\xaa\x90", "\xee\xaa\x91", "\xee\x93\x96", "\xee\x93\x95", "\xee\x93\x90", "\xee\x96\xb4", "\xee\xaa\xaf", "\xee\x93\x91", "\xee\xaa\xb0", "\xee\xaa\xb1", "\xee\xaa\xb2", "\xee\xaa\xb3", "\xee\xaa\xb4", "\xee\xaa\xb5", "\xee\xaa\xb6", "\xee\xaa\xb7", "\xee\xaa\xb8", "\xee\xaa\xbd", "\xee\xaa\xbe", "\xee\xab\xaa", "\xee\x93\x84", "\xee\x93\xad", "\xee\xac\xba", "\xee\xac\xbb", "\xee\xac\xbc", "\xee\xad\x8a", "\xee\xad\x8b", "\xee\xad\x8c", "\xee\xad\x8d", "\xee\xad\x8e", "\xee\xad\x8f", "\xee\xad\x96", "\xee\xad\x99", "\xee\xad\xb0", "\xee\x92\xac", "\xee\x96\x97", "\xee\x93\x82", "\xee\x93\x83", "\xee\xaa\xae", "\xee\xaa\x97", "\xee\x93\x81", "\xee\xaa\x98", "\xee\xac\xbe", "\xee\x95\x95", "\xee\x95\x8d", "\xee\x95\x8c", "\xee\x95\x96", "\xee\xac\xad", "\xee\xac\xae", "\xee\xad\xba", "\xee\xad\xbb", "\xee\x94\xbf", "\xee\x95\x80", "\xee\x95\x92", "\xee\x95\x93", "\xee\x94\xae", "\xee\x94\xad", "\xee\x94\xb0", "\xee\x94\xaf", "\xee\x95\x85", "\xee\x95\x84", "\xee\x95\x9a", "\xee\x95\x9b", "\xee\x95\x83", "\xee\x95\x82", "\xee\xaa\xad", "\xee\x95\x90", "\xee\x95\x91", "\xee\x92\x82", "\xee\xac\xaf", "\xee\xac\xb0", "\xee\x92\x83", "\xee\xac\xb1", "[\xe3\x83\x95\xe3\x83\xaa\xe3\x83\xbc\xe3\x83\x80\xe3\x82\xa4\xe3\x83\xa4\xe3\x83\xab]", "\xee\x96\x95", "\xee\xad\xb5", "\xee\x91\xb7", "\xee\x91\xb8", "\xee\xaa\xa6", "\xee\x93\xaa", "\xee\xaa\xa7", "\xee\xaa\xa8", "\xee\xaa\xa9", "\xee\xaa\xaa", "\xee\xad\x94", "\xee\x96\xaf", "\xee\xaa\xa5", "\xee\x96\xa1", "\xee\x96\xa2", "\xee\x96\xa3", "\xee\x91\xbd", "\xee\x91\xbe", "\xee\x91\xbf", "\xee\xac\xac", "\xee\x92\x81", "\xee\x92\x84", "\xee\xad\xb9", "\xee\x92\xae", "\xee\xad\xb2", "\xee\x97\x98", "\xee\x92\xa5", "[\xe3\x83\x89\xe3\x82\xa2]", "\xee\x95\x81", "\xee\x95\x97", "\xee\x96\xab", "\xee\xaa\x85", "\xee\x95\xb8", "\xee\xaa\x88", "\xee\x96\xb5", "[NG]", "\xee\x96\xad", "\xee\x93\xa8", "\xee\x94\x8f", "\xee\x97\x92", "\xee\xaa\x87", "[\xe7\xa6\x81]", "\xee\xaa\x8a", "[\xe5\x90\x88]", "\xee\xaa\x89", "\xee\xaa\x86", "\xee\xaa\x8b", "\xee\xaa\x8c", "\xee\x93\xb1", "\xee\xaa\x99", "\xee\x93\xb7", "\xee\xac\x81", "\xee\x94\xbc", "\xee\x94\xbd", "\xee\x95\x8f", "\xee\x95\x94", "\xee\x91\xb6", "\xee\x93\xa5", "\xee\x91\xba", "\xee\x91\xb5", "\xee\x96\xb0", "\xee\x96\xb1", "\xee\x93\xa6", "\xee\x93\xb4", "\xee\x93\xb5", "\xee\x93\xa9", "\xee\xad\x9c", "\xee\x93\xbd", "\xee\xaa\xab", "\xee\x91\xb9", "\xee\x94\xbe", "\xee\x94\xba", "\xee\x94\xbb", "\xee\x95\x8a", "\xee\x95\x8b", "\xee\x95\x88", "\xee\x95\x89", "\xee\x94\xb1", "\xee\x94\xb2", "\xee\x94\xb4", "\xee\x94\xb5", "\xee\x94\xb8", "\xee\x94\xb9", "\xee\x95\x86", "\xee\x95\x87", "\xee\x94\xb6", "\xee\x94\xb7", "\xee\x91\xac", "\xee\x93\xb0", "\xee\x93\xb2", "\xee\x95\x9d", "\xee\x95\x9c", "\xee\xac\x8d", "\xee\x96\x84", "\xee\x96\x89", "\xee\x94\x98", "\xee\xac\x85", "\xee\x94\x9c", "\xee\xac\x8c", "\xee\xab\xbc", "\xee\x94\x99", "\xee\x94\x92", "\xee\xac\x82", "\xee\xac\x84", "\xee\xac\x87", "\xee\x96\x8a", "\xee\xac\x86", "[end]", "[ON]", "[SOON]", "\xee\x95\x9e", "\xee\xae\x83", "\xee\x96\xa7", "\xee\x96\xa6", "\xee\x93\xb3", "\xee\x93\xb9", "\xee\x93\xb6", "\xee\xaa\x8d", "\xee\xaa\x8e", "\xee\x93\xbf", "\xee\x94\x80", "\xee\xab\x96", "\xee\xab\x93", "\xee\xab\x94", "\xee\xab\x95", "\xee\x81\x8a", "\xee\x81\x89", "\xee\x81\x8b", "\xee\x81\x88", "\xee\x84\xbd", "\xee\x91\x83", "[\xe9\x9c\xa7]", "\xee\x90\xbc", "\xee\x91\x8b", "\xee\x81\x8d", "\xee\x91\x89", "\xee\x85\x86", "\xee\x91\x8a", "\xee\x91\x8c", "\xee\x81\x8a\xee\x81\x89", "\xee\x90\xbe", "\xe2\x97\x8f", "\xee\x81\x8c", "\xee\x8c\xb5", "\xee\x80\xa4", "\xee\x80\xa5", "\xee\x80\xa6", "\xee\x80\xa7", "\xee\x80\xa8", "\xee\x80\xa9", "\xee\x80\xaa", "\xee\x80\xab", "\xee\x80\xac", "\xee\x80\xad", "\xee\x80\xae", "\xee\x80\xaf", "[\xe8\x85\x95\xe6\x99\x82\xe8\xa8\x88]", "[\xe7\xa0\x82\xe6\x99\x82\xe8\xa8\x88]", "\xee\x88\xbf", "\xee\x89\x80", "\xee\x89\x81", "\xee\x89\x82", "\xee\x89\x83", "\xee\x89\x84", "\xee\x89\x85", "\xee\x89\x86", "\xee\x89\x87", "\xee\x89\x88", "\xee\x89\x89", "\xee\x89\x8a", "\xee\x89\x8b", "\xee\x84\x90", "\xee\x8c\x84", "\xee\x84\x98", "\xee\x80\xb0", "\xee\x80\xb2", "\xee\x84\x99", "\xee\x91\x87", "\xee\x8c\x83", "\xee\x8c\x85", "\xee\x8c\x87", "\xee\x8c\x88", "\xee\x91\x84", "[\xe3\x81\x95\xe3\x81\x8f\xe3\x82\x89\xe3\x82\x93\xe3\x81\xbc]", "[\xe3\x83\x90\xe3\x83\x8a\xe3\x83\x8a]", "\xee\x8d\x85", "\xee\x8d\x86", "\xee\x8d\x87", "\xee\x8d\x88", "\xee\x8d\x89", "\xee\x8d\x8a", "\xee\x90\x99", "\xee\x90\x9b", "\xee\x90\x9a", "\xee\x90\x9c", "\xee\x90\x89", "\xee\x8c\x9c", "\xee\x8c\x9d", "\xee\x8c\x9e", "\xee\x8c\x9f", "\xee\x8c\xa0", "\xee\x80\x81", "\xee\x80\x82", "\xee\x80\x84", "\xee\x80\x85", "\xee\x90\xa8", "\xee\x85\x92", "\xee\x90\xa9", "\xee\x84\x9b", "\xee\x81\x8e", "\xee\x84\x8c", "\xee\x84\xab", "\xee\x84\x9a", "\xee\x84\x9c", "\xee\x89\x93", "[\xe3\x82\xab\xe3\x82\xbf\xe3\x83\x84\xe3\x83\xa0\xe3\x83\xaa]", "\xee\x84\xb4", "\xee\x84\x8a", "\xee\x91\x81", "\xee\x80\x99", "\xee\x81\x95", "\xee\x81\x92", "\xee\x81\x93", "\xee\x81\x90", "\xee\x81\x8f", "\xee\x81\x94", "\xee\x80\x9a", "\xee\x84\x89", "\xee\x84\x8b", "\xee\x81\x91", "\xee\x94\xac", "\xee\x81\x99", "\xee\x90\x83", "\xee\x90\x90", "\xee\x81\x98", "\xee\x90\x86", "\xee\x90\x8f", "\xee\x90\x8e", "\xee\x84\x86", "\xee\x90\x84", "\xee\x84\x85", "\xee\x81\x96", "\xee\x90\x98", "\xee\x90\x97", "\xee\x90\x8c", "\xee\x90\x8d", "\xee\x81\x97", "\xee\x90\x95\xee\x8c\xb1", "\xee\x90\x8a", "\xee\x90\x92", "\xee\x90\x94", "\xee\x90\x95", "\xee\x90\x93", "\xee\x90\x91", "\xee\x90\x8b", "\xee\x90\x96", "\xee\x90\x87", "\xee\x84\x87", "\xee\x90\x88", "\xee\x90\x82", "\xee\x84\x88", "\xee\x90\x81", "\xee\x90\x85", "\xee\x90\xa3", "\xee\x90\xa4", "\xee\x90\xa6", "\xee\x80\x92", "\xee\x90\xa7", "\xee\x90\x9d", "\xee\x80\xb6", "\xee\x80\xb8", "\xee\x85\x93", "\xee\x85\x95", "\xee\x85\x8d", "\xee\x85\x94", "\xee\x85\x98", "\xee\x85\x96", "\xee\x85\x97", "\xee\x80\xb7", "\xee\x84\xa1", "\xee\x88\x82", "\xee\x8c\x8b", "\xee\x80\xbb", "\xee\x80\x87", "\xee\x84\xbe", "\xee\x8c\x9a", "\xee\x8c\x9b", "[\xe3\x83\xa1\xe3\x82\xac\xe3\x83\x8d]", "\xee\x80\x86", "[\xe3\x82\xb8\xe3\x83\xbc\xe3\x83\xb3\xe3\x82\xba]", "\xee\x84\x8e", "\xee\x8c\x82", "\xee\x8c\x98", "\xee\x8c\x99", "\xee\x8c\xa1", "\xee\x8c\xa2", "[\xe8\xb2\xa1\xe5\xb8\x83]", "\xee\x8c\xa3", "\xee\x84\xaf", "\xee\x85\x89", "\xee\x85\x8a", "\xef\xbf\xa5", "\xee\x84\x9d", "[\xe6\x87\x90\xe4\xb8\xad\xe9\x9b\xbb\xe7\x81\xaf]", "[\xe3\x83\xac\xe3\x83\xb3\xe3\x83\x81]", "\xee\x84\x96", "\xee\x84\x93", "\xee\x88\xbe", "\xee\x88\x89", "\xee\x80\xb1", "\xee\x84\xbb", "\xee\x8c\x8f", "\xee\x8c\x94", "\xee\x84\x92", "\xee\x8d\x8b", "\xee\x80\xb3", "\xee\x91\x88", "\xee\x85\x83", "\xee\x84\x97", "\xee\x8c\x90", "\xee\x8c\x92", "\xee\x90\xb6", "\xee\x90\xb8", "\xee\x90\xb9", "\xee\x90\xba", "\xee\x90\xbb", "\xee\x91\x80", "\xee\x91\x82", "\xee\x91\x85", "\xee\x91\x86", "[\xe3\x83\x9d\xe3\x82\xb1\xe3\x83\x99\xe3\x83\xab]", "\xee\x80\x89", "\xee\x80\x8a", "\xee\x84\x84", "\xee\x8c\x81", "\xee\x80\x8b", "\xee\x84\x83", "\xee\x84\x81", "\xee\x84\x82", "\xee\x85\x82", "\xee\x8c\x97", "\xee\x85\x8b", "[\xe3\x83\x9a\xe3\x83\xb3]", "\xee\x84\x9f", "\xee\x80\x8c", "[\xe3\x82\xaf\xe3\x83\xaa\xe3\x83\x83\xe3\x83\x97]", "\xee\x84\x9e", "\xee\x8c\x96", "\xee\x84\xa6", "\xee\x84\xa7", "\xee\x8c\x93", "\xee\x85\x88", "[\xe3\x82\xb9\xe3\x82\xaf\xe3\x83\xad\xe3\x83\xbc\xe3\x83\xab]", "\xee\x80\x96", "\xee\x80\x94", "\xee\x80\x95", "\xee\x80\x98", "\xee\x80\x93", "\xee\x90\xaa", "\xee\x84\xb2", "[\xe3\x82\xb9\xe3\x83\x8e\xe3\x83\x9c]", "\xee\x84\x95", "\xee\x80\x97", "\xee\x84\xb1", "\xee\x90\xab", "\xee\x90\xad", "\xee\x80\x9e", "\xee\x90\xb4", "\xee\x90\xb5", "\xee\x80\x9f", "\xee\x80\x9b", "\xee\x90\xae", "\xee\x85\x99", "\xee\x85\x90", "\xee\x80\x9d", "\xee\x80\x9c", "\xee\x80\xb9", "\xee\x84\x8d", "\xee\x84\xb5", "\xee\x85\x9a", "\xee\x90\xaf", "\xee\x90\xb0", "\xee\x90\xb1", "\xee\x90\xb2", "\xee\x80\xba", "\xee\x85\x8f", "\xee\x85\x8e", "\xee\x84\xb7", "\xee\x84\xa3", "\xee\x84\xa2", "\xee\x84\xa4", "\xee\x90\xb3", "\xee\x80\xbc", "\xee\x80\xbd", "\xee\x8c\x8a", "[\xe3\x82\xa4\xe3\x83\x99\xe3\x83\xb3\xe3\x83\x88]", "\xee\x84\xa5", "\xee\x8c\xa4", "[\xe3\x82\xb2\xe3\x83\xbc\xe3\x83\xa0]", "\xee\x84\xad", "\xee\x84\xb0", "\xee\x84\xb3", "\xee\x90\xac", "\xee\x80\xbe", "\xee\x8c\xa6", "\xee\x81\x80", "\xee\x81\x81", "\xee\x81\x82", "\xee\x84\xac", "\xee\x80\x88", "\xee\x84\xaa", "\xee\x84\xa8", "\xee\x84\xa9", "\xee\x80\x83", "\xee\x84\x83\xee\x8c\xa8", "\xee\x80\xb4", "\xee\x80\xb5", "\xee\x84\x91", "\xee\x8c\x86", "\xee\x90\xa5", "\xee\x90\xbd", "\xee\x88\x87", "\xee\x89\x8e", "\xee\x89\x8f", "\xee\x88\x90", "\xee\x88\x9c", "\xee\x88\x9d", "\xee\x88\x9e", "\xee\x88\x9f", "\xee\x88\xa0", "\xee\x88\xa1", "\xee\x88\xa2", "\xee\x88\xa3", "\xee\x88\xa4", "\xee\x88\xa5", "\xee\x88\x8b", "\xee\x89\x90", "\xee\x89\x91", "\xee\x84\xa0", "\xee\x8d\x82", "\xee\x81\x86", "\xee\x8d\x80", "\xee\x8c\xb9", "\xee\x85\x87", "\xee\x8c\xba", "\xee\x8c\xbb", "\xee\x8c\xbc", "\xee\x8c\xbd", "\xee\x8c\xbe", "\xee\x8c\xbf", "\xee\x8d\x81", "\xee\x8d\x83", "\xee\x8d\x84", "\xee\x8d\x8c", "\xee\x8d\x8d", "\xee\x90\xbf", "[\xe3\x81\xaa\xe3\x82\x8b\xe3\x81\xa8]", "\xee\x81\x83", "\xee\x81\x85", "\xee\x81\x84", "\xee\x81\x87", "\xee\x8c\xb8", "\xee\x8c\x8c", "\xee\x88\xb6", "\xee\x88\xb8", "\xee\x88\xb7", "\xee\x88\xb9", "\xe2\x87\x94", "\xe2\x86\x91\xe2\x86\x93", "\xee\x88\xb2", "\xee\x88\xb3", "\xee\x88\xb4", "\xee\x88\xb5", "\xee\x88\xba", "\xee\x88\xbb", "\xee\x88\xbc", "\xee\x88\xbd", "\xee\x8c\xb2", "\xee\x8c\xb3", "\xee\x80\xa1", "\xef\xbc\x81\xef\xbc\x9f", "\xef\xbc\x81\xef\xbc\x81", "\xee\x80\xa0", "\xee\x8c\xb6", "\xee\x8c\xb7", "\xef\xbd\x9e", "\xee\x88\x91", "\xee\x80\xa2", "\xee\x8c\xa7", "\xee\x80\xa3", "\xee\x8c\xa8", "\xee\x8c\xa9", "\xee\x8c\xaa", "\xee\x8c\xab", "\xee\x8c\xac", "\xee\x8c\xad", "\xee\x90\xb7", "\xee\x88\x84", "\xee\x88\x8c", "\xee\x88\x8e", "\xee\x88\x8d", "\xee\x88\x8f", "\xee\x8c\x8e", "\xee\x88\x88", "\xee\x88\x8a", "[\xe6\x97\x97]", "\xee\x89\x92", "\xee\x84\xb6", "\xee\x88\x81", "\xee\x84\xb8", "\xee\x84\xb9", "\xee\x84\xbf", "\xee\x85\x91", "\xee\x85\x80", "\xee\x8c\x89", "\xee\x84\xba", "[\xe7\xa6\x81\xe6\xad\xa2]", "[CL]", "\xee\x88\x94", "[FREE]", "\xee\x88\xa9", "\xee\x88\x92", "\xee\x89\x8d", "\xee\x88\x93", "\xee\x84\xae", "\xee\x88\x83", "\xee\x88\xa8", "\xee\x88\xab", "\xee\x88\xaa", "\xee\x88\x95", "\xee\x88\x96", "\xee\x88\x97", "\xee\x88\x98", "\xee\x88\xa7", "\xee\x88\xac", "\xee\x88\xad", "\xee\x8c\x95", "\xee\x8c\x8d", "\xee\x88\xa6", "\xee\x84\x8f", "\xee\x8c\xb4", "\xee\x8c\x91", "\xee\x84\xbc", "[\xe3\x83\x89\xe3\x83\xb3\xe3\x83\x83]", "\xee\x8c\xb1", "\xee\x8c\xb0", "\xee\x81\x9a", "\xee\x85\x8c", "\xee\x8c\xae", "\xee\x88\x85", "\xee\x88\x86", "\xee\x88\x99", "\xee\x88\x9a", "\xee\x88\x9b", "\xee\x8c\xaf", "\xe2\x86\x90\xe2\x94\x98", "\xee\x85\x81", "\xee\x84\x94", "\xee\x85\x84", "\xee\x85\x85", "\xee\x80\xbf", "\xee\x8c\xa5", "\xee\x89\x8c", "\xee\x80\x90", "\xee\x80\x91", "\xee\x80\x8d", "\xee\x80\x8e", "\xee\x80\x8f", "\xee\x88\xae", "\xee\x88\xaf", "\xee\x88\xb0", "\xee\x88\xb1", "\xee\x90\x9e", "\xee\x90\x9f", "\xee\x90\xa0", "\xee\x90\xa1", "\xee\x90\xa2", "\xf3\xbe\x80\x80", "\xf3\xbe\x80\x81", "\xf3\xbe\x80\x82", "\xf3\xbe\x80\x83", "\xf3\xbe\x80\x84", "\xf3\xbe\x80\x85", "\xf3\xbe\x80\x86", "\xf3\xbe\x80\x87", "\xf3\xbe\x80\x88", "\xf3\xbe\x80\x89", "\xf3\xbe\x80\x8a", "\xf3\xbe\x80\x8b", "\xf3\xbe\x80\x8c", "\xf3\xbe\x80\x8d", "\xf3\xbe\x80\x8e", "\xf3\xbe\x80\x8f", "\xf3\xbe\x80\x90", "\xf3\xbe\x80\xb8", "\xf3\xbe\x80\xba", "\xf3\xbe\x80\xbb", "\xf3\xbe\x80\xb9", "\xf3\xbe\x80\x91", "\xf3\xbe\x80\x92", "\xf3\xbe\x80\x93", "\xf3\xbe\x80\x94", "\xf3\xbe\x80\x95", "\xf3\xbe\x80\x96", "\xf3\xbe\xad\xa9", "\xf3\xbe\xad\xaa", "\xf3\xbe\x80\x9e", "\xf3\xbe\x80\x9f", "\xf3\xbe\x80\xa0", "\xf3\xbe\x80\xa1", "\xf3\xbe\x80\xa2", "\xf3\xbe\x80\xa3", "\xf3\xbe\x80\xa4", "\xf3\xbe\x80\xa5", "\xf3\xbe\x80\xa6", "\xf3\xbe\x80\xa7", "\xf3\xbe\x80\xa8", "\xf3\xbe\x80\xa9", "\xf3\xbe\x80\x9d", "\xf3\xbe\x80\x9c", "\xf3\xbe\x80\xaa", "\xf3\xbe\x80\x9b", "\xf3\xbe\x80\xab", "\xf3\xbe\x80\xac", "\xf3\xbe\x80\xad", "\xf3\xbe\x80\xae", "\xf3\xbe\x80\xaf", "\xf3\xbe\x80\xb0", "\xf3\xbe\x80\xb1", "\xf3\xbe\x80\xb2", "\xf3\xbe\x80\xb3", "\xf3\xbe\x80\xb4", "\xf3\xbe\x80\xb5", "\xf3\xbe\x80\xb6", "\xf3\xbe\x80\xb7", "\xf3\xbe\x80\xbc", "\xf3\xbe\x80\xbd", "\xf3\xbe\x80\xbe", "\xf3\xbe\x80\xbf", "\xf3\xbe\x81\x80", "\xf3\xbe\x81\x81", "\xf3\xbe\x81\x82", "\xf3\xbe\x81\x83", "\xf3\xbe\x81\x85", "\xf3\xbe\x81\x86", "\xf3\xbe\x81\x87", "\xf3\xbe\x81\x88", "\xf3\xbe\x81\x89", "\xf3\xbe\x81\x8a", "\xf3\xbe\x81\x8b", "\xf3\xbe\x81\x8c", "\xf3\xbe\x81\x8d", "\xf3\xbe\x81\x8e", "\xf3\xbe\x81\x8f", "\xf3\xbe\x81\x90", "\xf3\xbe\x81\x91", "\xf3\xbe\x81\x92", "\xf3\xbe\x81\x93", "\xf3\xbe\x81\x94", "\xf3\xbe\x81\x95", "\xf3\xbe\x81\x96", "\xf3\xbe\x81\x97", "\xf3\xbe\x81\x98", "\xf3\xbe\x81\x99", "\xf3\xbe\x81\x9a", "\xf3\xbe\x81\x9b", "\xf3\xbe\x86\x90", "\xf3\xbe\x86\x91", "\xf3\xbe\x86\x92", "\xf3\xbe\x86\x93", "\xf3\xbe\x86\x94", "\xf3\xbe\x86\x95", "\xf3\xbe\x86\x96", "\xf3\xbe\x86\x97", "\xf3\xbe\x86\x98", "\xf3\xbe\x86\x99", "\xf3\xbe\x86\x9a", "\xf3\xbe\x86\x9b", "\xf3\xbe\x86\x9c", "\xf3\xbe\x86\x9d", "\xf3\xbe\x86\x9e", "\xf3\xbe\x86\x9f", "\xf3\xbe\x86\xa0", "\xf3\xbe\x86\xa1", "\xf3\xbe\x86\xa2", "\xf3\xbe\x86\xa3", "\xf3\xbe\x86\xa4", "\xf3\xbe\x86\xa5", "\xf3\xbe\x86\xa6", "\xf3\xbe\x86\xa7", "\xf3\xbe\x86\xa8", "\xf3\xbe\x86\xa9", "\xf3\xbe\x86\xaa", "\xf3\xbe\x86\xab", "\xf3\xbe\x86\xac", "\xf3\xbe\x86\xad", "\xf3\xbe\x86\xae", "\xf3\xbe\x86\xaf", "\xf3\xbe\x86\xb0", "\xf3\xbe\x86\xb1", "\xf3\xbe\x86\xb2", "\xf3\xbe\x86\xb3", "\xf3\xbe\x86\xb4", "\xf3\xbe\x86\xb5", "\xf3\xbe\x86\xb6", "\xf3\xbe\x86\xb9", "\xf3\xbe\x87\x93", "\xf3\xbe\x9f\x9c", "\xf3\xbe\x87\x94", "\xf3\xbe\x87\x95", "\xf3\xbe\x87\x96", "\xf3\xbe\x87\x8c", "\xf3\xbe\x87\x8d", "\xf3\xbe\x87\x8e", "\xf3\xbe\x87\x8f", "\xf3\xbe\x87\x85", "\xf3\xbe\x87\x86", "\xf3\xbe\x87\x8b", "\xf3\xbe\x87\x9a", "\xf3\xbe\x87\xa1", "\xf3\xbe\x87\xa2", "\xf3\xbe\x87\x89", "\xf3\xbe\x87\x99", "\xf3\xbe\x87\x9c", "\xf3\xbe\x86\xba", "\xf3\xbe\x86\xbb", "\xf3\xbe\x87\x88", "\xf3\xbe\x87\x9d", "\xf3\xbe\x86\xbc", "\xf3\xbe\x87\x98", "\xf3\xbe\x86\xbd", "\xf3\xbe\x87\x87", "\xf3\xbe\x87\x82", "\xf3\xbe\x87\x80", "\xf3\xbe\x86\xb8", "\xf3\xbe\x87\x83", "\xf3\xbe\x86\xbe", "\xf3\xbe\x87\x84", "\xf3\xbe\x86\xb7", "\xf3\xbe\x86\xbf", "\xf3\xbe\x87\x81", "\xf3\xbe\x87\x8a", "\xf3\xbe\x87\x90", "\xf3\xbe\x87\x91", "\xf3\xbe\x87\x92", "\xf3\xbe\x87\x97", "\xf3\xbe\x87\x9b", "\xf3\xbe\x87\x9e", "\xf3\xbe\x87\x9f", "\xf3\xbe\x87\xa0", "\xf3\xbe\x8c\xa0", "\xf3\xbe\x8c\xa1", "\xf3\xbe\x8c\xa2", "\xf3\xbe\x8c\xa3", "\xf3\xbe\x8c\xa4", "\xf3\xbe\x8c\xa5", "\xf3\xbe\x8c\xa6", "\xf3\xbe\x8c\xa7", "\xf3\xbe\x8c\xa8", "\xf3\xbe\x8c\xa9", "\xf3\xbe\x8c\xaa", "\xf3\xbe\x8c\xab", "\xf3\xbe\x8c\xac", "\xf3\xbe\x8c\xad", "\xf3\xbe\x8c\xae", "\xf3\xbe\x8c\xaf", "\xf3\xbe\x8c\xb0", "\xf3\xbe\x8c\xb1", "\xf3\xbe\x8c\xb2", "\xf3\xbe\x8c\xb3", "\xf3\xbe\x8c\xb4", "\xf3\xbe\x8c\xb5", "\xf3\xbe\x8c\xb6", "\xf3\xbe\x8c\xb8", "\xf3\xbe\x8c\xb9", "\xf3\xbe\x8c\xba", "\xf3\xbe\x8c\xbb", "\xf3\xbe\x8c\xbc", "\xf3\xbe\x8c\xbd", "\xf3\xbe\x8c\xbe", "\xf3\xbe\x8c\xbf", "\xf3\xbe\x8d\x80", "\xf3\xbe\x8d\x81", "\xf3\xbe\x8d\x82", "\xf3\xbe\x8d\x83", "\xf3\xbe\x8d\x84", "\xf3\xbe\x8d\x85", "\xf3\xbe\x8d\x86", "\xf3\xbe\x8d\x87", "\xf3\xbe\x8d\x88", "\xf3\xbe\x8d\x89", "\xf3\xbe\x8d\x8a", "\xf3\xbe\x8d\x8b", "\xf3\xbe\x8d\x8c", "\xf3\xbe\x8d\x8d", "\xf3\xbe\x8d\x8e", "\xf3\xbe\x8d\x8f", "\xf3\xbe\x8d\x90", "\xf3\xbe\x8d\x91", "\xf3\xbe\x8d\x92", "\xf3\xbe\x8d\x93", "\xf3\xbe\x8d\x94", "\xf3\xbe\x8d\x95", "\xf3\xbe\x8d\x96", "\xf3\xbe\x8d\x97", "\xf3\xbe\x8d\x98", "\xf3\xbe\x8d\x99", "\xf3\xbe\x8d\x9a", "\xf3\xbe\x8d\x9b", "\xf3\xbe\x92\xb0", "\xf3\xbe\x92\xb1", "\xf3\xbe\x92\xb2", "\xf3\xbe\x92\xb3", "\xf3\xbe\x92\xb4", "\xf3\xbe\x92\xb5", "\xf3\xbe\x92\xb6", "\xf3\xbe\x92\xb7", "\xf3\xbe\x92\xb8", "\xf3\xbe\x92\xb9", "\xf3\xbe\x92\xba", "\xf3\xbe\x92\xbb", "\xf3\xbe\x92\xbc", "\xf3\xbe\x92\xbd", "\xf3\xbe\x92\xbe", "\xf3\xbe\x92\xbf", "\xf3\xbe\x93\x80", "\xf3\xbe\x93\x81", "\xf3\xbe\x93\x82", "\xf3\xbe\x93\x83", "\xf3\xbe\x93\x84", "\xf3\xbe\x93\x86", "\xf3\xbe\x93\x87", "\xf3\xbe\x93\x88", "\xf3\xbe\x93\x8c", "\xf3\xbe\x93\x8d", "\xf3\xbe\x93\x96", "\xf3\xbe\x93\x97", "\xf3\xbe\x93\x98", "\xf3\xbe\x95\x93", "\xf3\xbe\x93\x8e", "\xf3\xbe\x93\x8f", "\xf3\xbe\x93\x90", "\xf3\xbe\x93\x91", "\xf3\xbe\x93\x93", "\xf3\xbe\x93\x94", "\xf3\xbe\x93\x95", "\xf3\xbe\x93\x99", "\xf3\xbe\x93\x9a", "\xf3\xbe\x93\x9b", "\xf3\xbe\x93\x9c", "\xf3\xbe\x93\xb0", "\xf3\xbe\x93\xb1", "\xf3\xbe\x93\x9d", "\xf3\xbe\x93\x9e", "\xf3\xbe\x93\x9f", "\xf3\xbe\x93\xa0", "\xf3\xbe\x93\xa1", "\xf3\xbe\x93\xa2", "\xf3\xbe\x93\xa3", "\xf3\xbe\x93\xa4", "\xf3\xbe\x93\xad", "\xf3\xbe\x93\xa8", "\xf3\xbe\x93\xab", "\xf3\xbe\x93\xa7", "\xf3\xbe\x93\xaa", "\xf3\xbe\x93\xa9", "\xf3\xbe\x93\xa5", "\xf3\xbe\x93\xae", "\xf3\xbe\x93\xac", "\xf3\xbe\x93\xa6", "\xf3\xbe\x93\xb6", "\xf3\xbe\x93\xbb", "\xf3\xbe\x93\x89", "\xf3\xbe\x93\x8a", "\xf3\xbe\x93\x8b", "\xf3\xbe\x93\xba", "\xf3\xbe\x93\xb5", "\xf3\xbe\x93\xb7", "\xf3\xbe\x93\xb8", "\xf3\xbe\x81\x84", "\xf3\xbe\x93\x92", "\xf3\xbe\x94\x89", "\xf3\xbe\x94\x8a", "\xf3\xbe\x94\x8b", "\xf3\xbe\x94\x8c", "\xf3\xbe\x94\x8d", "\xf3\xbe\x94\x8e", "\xf3\xbe\x94\x8f", "\xf3\xbe\x94\x90", "\xf3\xbe\x94\x91", "\xf3\xbe\x94\x92", "\xf3\xbe\x94\x93", "\xf3\xbe\x94\x94", "\xf3\xbe\x94\x95", "\xf3\xbe\x94\x96", "\xf3\xbe\x94\x97", "\xf3\xbe\x94\x98", "\xf3\xbe\x94\x99", "\xf3\xbe\x94\x9a", "\xf3\xbe\x94\x9b", "\xf3\xbe\x94\x9c", "\xf3\xbe\x94\x9d", "\xf3\xbe\x94\x9e", "\xf3\xbe\x94\x9f", "\xf3\xbe\x94\xa0", "\xf3\xbe\x94\xa1", "\xf3\xbe\x80\x97", "\xf3\xbe\x94\xa2", "\xf3\xbe\x94\xa3", "\xf3\xbe\x94\xa4", "\xf3\xbe\x94\xa5", "\xf3\xbe\x94\xa6", "\xf3\xbe\x94\xa7", "\xf3\xbe\x94\xa8", "\xf3\xbe\x94\xa9", "\xf3\xbe\x94\xaa", "\xf3\xbe\x94\xab", "\xf3\xbe\x94\xac", "\xf3\xbe\x94\xad", "\xf3\xbe\x94\xae", "\xf3\xbe\xa0\xa2", "\xf3\xbe\x94\xaf", "\xf3\xbe\x94\xb0", "\xf3\xbe\x94\xb1", "\xf3\xbe\x94\xb3", "\xf3\xbe\x94\xb4", "\xf3\xbe\x94\xb5", "\xf3\xbe\xae\x92", "\xf3\xbe\xad\xbc", "\xf3\xbe\xad\xbd", "\xf3\xbe\xad\xbe", "\xf3\xbe\xad\xbf", "\xf3\xbe\xae\x80", "\xf3\xbe\x94\xb6", "\xf3\xbe\x94\xb7", "\xf3\xbe\x94\xb8", "\xf3\xbe\x94\xb9", "\xf3\xbe\x94\xba", "\xf3\xbe\x94\xbb", "\xf3\xbe\x94\xbc", "\xf3\xbe\x94\xbd", "\xf3\xbe\xa0\x9d", "\xf3\xbe\xa0\x9e", "\xf3\xbe\x94\xbe", "\xf3\xbe\x94\xbf", "\xf3\xbe\x95\x80", "\xf3\xbe\x95\x81", "\xf3\xbe\x95\x82", "\xf3\xbe\x95\x83", "\xf3\xbe\x95\x84", "\xf3\xbe\x95\x85", "\xf3\xbe\x95\x86", "\xf3\xbe\x95\x87", "\xf3\xbe\x94\x82", "\xf3\xbe\x93\xbf", "\xf3\xbe\x94\x80", "\xf3\xbe\x94\x81", "\xf3\xbe\x94\x83", "\xf3\xbe\x94\x84", "\xf3\xbe\x93\xbd", "\xf3\xbe\x95\x88", "\xf3\xbe\x95\x89", "\xf3\xbe\x95\x8a", "\xf3\xbe\x95\x8b", "\xf3\xbe\x95\x8c", "\xf3\xbe\x95\x8d", "\xf3\xbe\x95\x8e", "\xf3\xbe\x95\x8f", "\xf3\xbe\x95\x90", "\xf3\xbe\x95\x91", "\xf3\xbe\x95\x92", "\xf3\xbe\x9f\x90", "\xf3\xbe\x9f\x91", "\xf3\xbe\x9f\x92", "\xf3\xbe\x9f\x93", "\xf3\xbe\x9f\x94", "\xf3\xbe\x9f\x95", "\xf3\xbe\x9f\x96", "\xf3\xbe\x9f\x97", "\xf3\xbe\x9f\x98", "\xf3\xbe\x9f\x99", "\xf3\xbe\x9f\x9a", "\xf3\xbe\x9f\x9b", "\xf3\xbe\x9f\x9d", "\xf3\xbe\x9f\x9e", "\xf3\xbe\x9f\x9f", "\xf3\xbe\x9f\xa0", "\xf3\xbe\x9f\xa1", "\xf3\xbe\x9f\xa2", "\xf3\xbe\x9f\xa3", "\xf3\xbe\x9f\xa4", "\xf3\xbe\x9f\xa5", "\xf3\xbe\x9f\xa6", "\xf3\xbe\x9f\xa7", "\xf3\xbe\x9f\xa8", "\xf3\xbe\x9f\xa9", "\xf3\xbe\x9f\xaa", "\xf3\xbe\x9f\xac", "\xf3\xbe\x9f\xad", "\xf3\xbe\x9f\xae", "\xf3\xbe\x9f\xaf", "\xf3\xbe\x9f\xb1", "\xf3\xbe\x9f\xb2", "\xf3\xbe\x9f\xb3", "\xf3\xbe\x9f\xb4", "\xf3\xbe\x9f\xb5", "\xf3\xbe\x9f\xb6", "\xf3\xbe\x9f\xb7", "\xf3\xbe\x9f\xb8", "\xf3\xbe\x9f\xb9", "\xf3\xbe\x9f\xba", "\xf3\xbe\x9f\xbb", "\xf3\xbe\x9f\xbc", "\xf3\xbe\x9f\xbd", "\xf3\xbe\x9f\xbe", "\xf3\xbe\x9f\xbf", "\xf3\xbe\xa0\x80", "\xf3\xbe\xa0\x81", "\xf3\xbe\xa0\x82", "\xf3\xbe\xa0\x83", "\xf3\xbe\xa0\x84", "\xf3\xbe\xa0\x85", "\xf3\xbe\xa0\x86", "\xf3\xbe\xa0\x87", "\xf3\xbe\xa0\x88", "\xf3\xbe\xa0\x89", "\xf3\xbe\xa0\x8a", "\xf3\xbe\xa0\x8b", "\xf3\xbe\xa0\x8c", "\xf3\xbe\xa0\x8d", "\xf3\xbe\xa0\x8e", "\xf3\xbe\xa0\x8f", "\xf3\xbe\xa0\x90", "\xf3\xbe\xa0\x91", "\xf3\xbe\xa0\x92", "\xf3\xbe\xa0\x93", "\xf3\xbe\xa0\x94", "\xf3\xbe\xa0\x95", "\xf3\xbe\xa0\x96", "\xf3\xbe\xa0\x97", "\xf3\xbe\xa0\x98", "\xf3\xbe\xa0\x99", "\xf3\xbe\xa0\x9a", "\xf3\xbe\xa0\x9b", "\xf3\xbe\x93\xaf", "\xf3\xbe\x93\xb9", "\xf3\xbe\xa0\x9c", "\xf3\xbe\xa0\x9f", "\xf3\xbe\xa0\xa0", "\xf3\xbe\xa0\xa3", "\xf3\xbe\xa0\xa4", "\xf3\xbe\xa0\xa5", "\xf3\xbe\xa0\xa6", "\xf3\xbe\xa0\xa7", "\xf3\xbe\xa0\xa8", "\xf3\xbe\xa0\xa9", "\xf3\xbe\xa0\xaa", "\xf3\xbe\xac\xa5", "\xf3\xbe\xac\xa9", "\xf3\xbe\xac\xad", "\xf3\xbe\xac\xaa", "\xf3\xbe\xad\x87", "\xf3\xbe\xa0\xac", "\xf3\xbe\xa0\xae", "\xf3\xbe\xa0\xaf", "\xf3\xbe\xa0\xb0", "\xf3\xbe\xa0\xb1", "\xf3\xbe\xa0\xb2", "\xf3\xbe\xa0\xb3", "\xf3\xbe\xa0\xb4", "\xf3\xbe\xa0\xb5", "\xf3\xbe\xa0\xb6", "\xf3\xbe\xa0\xb7", "\xf3\xbe\xa0\xbb", "\xf3\xbe\xa0\xb8", "\xf3\xbe\xa0\xb9", "\xf3\xbe\xa0\xba", "\xf3\xbe\xa5\xa0", "\xf3\xbe\xa5\xa1", "\xf3\xbe\xa5\xa2", "\xf3\xbe\xa5\xa3", "\xf3\xbe\xa5\xa4", "\xf3\xbe\xa5\xa5", "\xf3\xbe\xa5\xa6", "\xf3\xbe\xa5\xa7", "\xf3\xbe\xa5\xa8", "\xf3\xbe\xa5\xa9", "\xf3\xbe\xa5\xaa", "\xf3\xbe\xa5\xab", "\xf3\xbe\xa5\xac", "\xf3\xbe\xa5\xad", "\xf3\xbe\xa5\xae", "\xf3\xbe\xa5\xaf", "\xf3\xbe\xa5\xb0", "\xf3\xbe\xa5\xb1", "\xf3\xbe\xa5\xb2", "\xf3\xbe\xa5\xb3", "\xf3\xbe\xa5\xb4", "\xf3\xbe\xa5\xb5", "\xf3\xbe\xa5\xb6", "\xf3\xbe\xa5\xb7", "\xf3\xbe\xa5\xb8", "\xf3\xbe\xa5\xb9", "\xf3\xbe\xa5\xba", "\xf3\xbe\xa5\xbb", "\xf3\xbe\xa5\xbc", "\xf3\xbe\xa5\xbd", "\xf3\xbe\xa5\xbe", "\xf3\xbe\xa5\xbf", "\xf3\xbe\xa6\x80", "\xf3\xbe\xa6\x81", "\xf3\xbe\xa6\x82", "\xf3\xbe\xa6\x83", "\xf3\xbe\xa6\x84", "\xf3\xbe\xa6\x85", "\xf3\xbe\xa6\x86", "\xf3\xbe\xa6\x87", "\xf3\xbe\xa6\x88", "\xf3\xbe\xab\xb0", "\xf3\xbe\xab\xb1", "\xf3\xbe\xab\xb2", "\xf3\xbe\xab\xb3", "\xf3\xbe\xab\xb4", "\xf3\xbe\xab\xb5", "\xf3\xbe\xab\xb6", "\xf3\xbe\xab\xb7", "\xf3\xbe\xab\xb8", "\xf3\xbe\xab\xb9", "\xf3\xbe\xab\xba", "\xf3\xbe\xab\xbb", "\xf3\xbe\xab\xbc", "\xf3\xbe\xab\xbd", "\xf3\xbe\xab\xbe", "\xf3\xbe\xab\xbf", "\xf3\xbe\xac\x83", "\xf3\xbe\xac\x82", "\xf3\xbe\xad\xb8", "\xf3\xbe\xad\xb9", "\xf3\xbe\xac\x81", "\xf3\xbe\xac\x80", "\xf3\xbe\xad\x84", "\xf3\xbe\xad\x85", "\xf3\xbe\xad\x86", "\xf3\xbe\xac\x84", "\xf3\xbe\xac\x85", "\xf3\xbe\xac\x86", "\xf3\xbe\xac\x89", "\xf3\xbe\xac\x8a", "\xf3\xbe\xac\x8b", "\xf3\xbe\xac\x87", "\xf3\xbe\xac\x88", "\xf3\xbe\xa0\xab", "\xf3\xbe\xac\x8c", "\xf3\xbe\xac\x8d", "\xf3\xbe\xac\x8e", "\xf3\xbe\xac\x8f", "\xf3\xbe\xac\x90", "\xf3\xbe\xac\x91", "\xf3\xbe\xac\x92", "\xf3\xbe\xac\x93", "\xf3\xbe\xac\x94", "\xf3\xbe\xac\x95", "\xf3\xbe\xac\x96", "\xf3\xbe\xac\x97", "\xf3\xbe\xac\x98", "\xf3\xbe\xac\x99", "\xf3\xbe\xac\x9a", "\xf3\xbe\xac\x9b", "\xf3\xbe\xac\x9c", "\xf3\xbe\xac\x9d", "\xf3\xbe\xac\x9e", "\xf3\xbe\xac\x9f", "\xf3\xbe\xac\xa0", "\xf3\xbe\xac\xa2", "\xf3\xbe\xac\xa3", "\xf3\xbe\xac\xa6", "\xf3\xbe\xac\xac", "\xf3\xbe\x9f\xab", "\xf3\xbe\x9f\xb0", "\xf3\xbe\xac\xb3", "\xf3\xbe\xac\xb4", "\xf3\xbe\x94\x85", "\xf3\xbe\x94\x86", "\xf3\xbe\x94\x87", "\xf3\xbe\x94\x88", "\xf3\xbe\xac\xb5", "\xf3\xbe\x93\xb3", "\xf3\xbe\xad\x88", "\xf3\xbe\xad\x89", "\xf3\xbe\xae\x84", "\xf3\xbe\xac\xb8", "\xf3\xbe\xac\xa1", "\xf3\xbe\xae\x81", "\xf3\xbe\xac\xb6", "\xf3\xbe\xac\xa8", "\xf3\xbe\xac\xa7", "\xf3\xbe\xad\x8f", "\xf3\xbe\xac\xb7", "\xf3\xbe\xac\xb2", "\xf3\xbe\xac\xa4", "\xf3\xbe\xac\xbf", "\xf3\xbe\xac\xae", "\xf3\xbe\xac\xaf", "\xf3\xbe\xac\xb0", "\xf3\xbe\xac\xb1", "\xf3\xbe\xac\xb9", "\xf3\xbe\xac\xba", "\xf3\xbe\xac\xbb", "\xf3\xbe\xac\xbc", "\xf3\xbe\xac\xbe", "\xf3\xbe\xad\x80", "\xf3\xbe\xad\x81", "\xf3\xbe\xac\xab", "\xf3\xbe\xad\x83", "\xf3\xbe\xac\xbd", "\xf3\xbe\xad\x90", "\xf3\xbe\xad\x91", "\xf3\xbe\xad\x92", "\xf3\xbe\xad\x93", "\xf3\xbe\xad\x94", "\xf3\xbe\xad\x95", "\xf3\xbe\xad\x96", "\xf3\xbe\xad\x97", "\xf3\xbe\xad\x98", "\xf3\xbe\xad\x99", "\xf3\xbe\xad\x9a", "\xf3\xbe\xad\x9b", "\xf3\xbe\xad\x9c", "\xf3\xbe\xad\x9d", "\xf3\xbe\x93\xb4", "\xf3\xbe\xad\x9e", "\xf3\xbe\xad\x9f", "\xf3\xbe\x94\xb2", "\xf3\xbe\xad\xa0", "\xf3\xbe\xad\xa1", "\xf3\xbe\xad\xa2", "\xf3\xbe\xad\xa5", "\xf3\xbe\xad\xa6", "\xf3\xbe\xad\xa3", "\xf3\xbe\xad\xa4", "\xf3\xbe\xad\xa7", "\xf3\xbe\xad\xa8", "\xf3\xbe\xad\xab", "\xf3\xbe\xad\xac", "\xf3\xbe\xad\xad", "\xf3\xbe\xad\xae", "\xf3\xbe\xad\xaf", "\xf3\xbe\xad\xb0", "\xf3\xbe\xad\xb1", "\xf3\xbe\xad\xb2", "\xf3\xbe\xad\xb3", "\xf3\xbe\xad\xb4", "\xf3\xbe\xad\xb5", "\xf3\xbe\xad\xb6", "\xf3\xbe\xad\xb7", "\xf3\xbe\xad\xba", "\xf3\xbe\xad\xbb", "\xf3\xbe\xae\x83", "\xf3\xbe\xae\x88", "\xf3\xbe\xae\x91", "\xf3\xbe\xa0\xa1", "\xf3\xbe\x93\xbc", "\xf3\xbe\x93\xbe", "\xf3\xbe\xae\x85", "\xf3\xbe\xae\x8d", "\xf3\xbe\xae\x86", "\xf3\xbe\xae\x87", "\xf3\xbe\xae\x90", "\xf3\xbe\xae\x8a", "\xf3\xbe\xae\x82", "\xf3\xbe\x93\xb2", "\xf3\xbe\xae\x8b", "\xf3\xbe\xae\x8c", "\xf3\xbe\xae\x8f", "\xf3\xbe\xad\x8b", "\xf3\xbe\xae\x8e", "\xf3\xbe\x80\x9a", "\xf3\xbe\x80\x99", "\xf3\xbe\x80\x98", "\xf3\xbe\xad\x82", "\xf3\xbe\xad\x8a", "\xf3\xbe\xae\x93", "\xf3\xbe\xae\x95", "\xf3\xbe\xae\x94", "\xf3\xbe\xae\x96", "\xf3\xbe\xae\x97", "\xf3\xbe\xae\x98", "\xf3\xbe\xae\x99", "\xf3\xbe\xae\x9a", "\xf3\xbe\xae\x9b", "\xf3\xbe\xae\x9c", "\xf3\xbe\xae\x9d", "\xf3\xbe\xae\x9e", "\xf3\xbe\xae\x9f", "\xf3\xbe\xae\xa0", "\xf3\xbe\xae\xa1" - ); - } - -} - -class WeChatHook { - - public static function bindOpenId($uid, $openid, $isregister = 0) { - C::t('#wechat#common_member_wechat')->insert(array('uid' => $uid, 'status' => 2, 'openid' => $openid, 'isregister' => $isregister), false, true); - } - - public static function updateAppInfo($extId, $appId = '', $appSecret = '') { - global $_G; - $wechatappInfos = dunserialize($_G['setting']['wechatappInfos']); - if ($appId) { - $wechatappInfos[$extId] = array('appId' => $appId, 'appSecret' => $appSecret); - } else { - unset($wechatappInfos[$extId]); - } - $settings = array('wechatappInfos' => serialize($wechatappInfos)); - C::t('common_setting')->update_batch($settings); - updatecache('setting'); - } - - public static function getAppInfo($extId) { - global $_G; - $wechatappInfos = dunserialize($_G['setting']['wechatappInfos']); - if (isset($wechatappInfos[$extId])) { - return $wechatappInfos[$extId]; - } else { - return array(); - } - } - - public static function updateResponse($data, $extId = '') { - $response = self::getResponse($extId); - foreach ($data as $key => $value) { - if ($value) { - if ($value['plugin'] && $value['include'] && $value['class'] && $value['method']) { - $response[$key] = $value; - } - } else { - unset($response[$key]); - } - } - if (!$extId) { - $settings = array('wechatresponse' => serialize($response)); - } else { - global $_G; - $wechatresponseExts = dunserialize($_G['setting']['wechatresponseExts']); - if ($data) { - $wechatresponseExts[$extId] = $response; - } else { - unset($wechatresponseExts[$extId]); - } - $settings = array('wechatresponseExts' => serialize($wechatresponseExts)); - } - C::t('common_setting')->update_batch($settings); - updatecache('setting'); - return $response; - } - - public static function getResponse($extId = '') { - global $_G; - if (!$extId) { - return dunserialize($_G['setting']['wechatresponse']); - } else { - $wechatresponseExts = dunserialize($_G['setting']['wechatresponseExts']); - return $wechatresponseExts[$extId]; - } - } - - public static function updateRedirect($value) { - if (!$value || $value['plugin'] && $value['include'] && $value['class'] && $value['method']) { - $settings = array('wechatredirect' => $value); - C::t('common_setting')->update_batch($settings); - updatecache('setting'); - } - } - - public static function getRedirect() { - global $_G; - return dunserialize($_G['setting']['wechatredirect']); - } - - public static function getViewPluginId() { - global $_G; - return $_G['setting']['wechatviewpluginid']; - } - - public static function updateViewPluginId($value) { - $settings = array('wechatviewpluginid' => $value); - C::t('common_setting')->update_batch($settings); - updatecache('setting'); - } - - public static function updateAPIHook($datas) { - $apihook = self::getAPIHook(); - foreach ($datas as $data) { - foreach ($data as $key => $value) { - if (!$value['plugin']) { - continue; - } - list($module, $hookname) = explode('_', $key); - if ($value['include'] && $value['class'] && $value['method']) { - $v = $value; - unset($v['plugin']); - $v['allow'] = 1; - $apihook[$module][$hookname][$value['plugin']] = $v; - } else { - unset($apihook[$module][$hookname][$value['plugin']]); - } - } - } - $settings = array('mobileapihook' => serialize($apihook)); - C::t('common_setting')->update_batch($settings); - updatecache('setting'); - return $apihook; - } - - public static function getAPIHook($getplugin = '') { - global $_G; - $data = dunserialize($_G['setting']['mobileapihook']); - if (!$getplugin) { - return $data; - } else { - foreach ($data as $key => $hooknames) { - foreach ($hooknames as $hookname => $plugins) { - foreach ($plugins as $plugin => $value) { - if ($getplugin != $plugin) { - unset($data[$key][$hookname][$plugin]); - } - } - } - } - return $data; - } - } - - public static function delAPIHook($getplugin) { - if (!$getplugin) { - return; - } - $getplugins = (array) $getplugin; - $apihook = self::getAPIHook(); - foreach ($apihook as $key => $hooknames) { - foreach ($hooknames as $hookname => $plugins) { - foreach ($plugins as $plugin => $value) { - if (in_array($plugin, $getplugins)) { - unset($apihook[$key][$hookname][$plugin]); - } - } - } - } - $settings = array('mobileapihook' => serialize($apihook)); - C::t('common_setting')->update_batch($settings); - updatecache('setting'); - return $apihook; - } - - public static function getPluginUrl($pluginid, $param = array()) { - global $_G; - if (is_array($_G['setting']['rewritestatus']) && in_array('plugin', $_G['setting']['rewritestatus'])) { - $url = $_G['siteurl'] . rewriteoutput('plugin', 1, 'wechat', 'access') . '?'; - } else { - $url = $_G['siteurl'] . 'plugin.php?id=wechat:access&'; - } - $url .= 'pluginid=' . urlencode($pluginid) . '¶m=' . urlencode(base64_encode(http_build_query($param))); - return $url; - } - -} \ No newline at end of file diff --git a/upload/source/plugin/wechat/wechat_setting.inc.php b/upload/source/plugin/wechat/wechat_setting.inc.php deleted file mode 100644 index 92302132..00000000 --- a/upload/source/plugin/wechat/wechat_setting.inc.php +++ /dev/null @@ -1,160 +0,0 @@ -fetch_all_setting(array('mobilewechat')); -$setting = (array)dunserialize($setting['mobilewechat']); -$apiurl = $_G['siteurl'].'api/mobile/?module=wechat'; - -require_once DISCUZ_ROOT.'./source/plugin/wechat/wechat.lib.class.php'; -require_once DISCUZ_ROOT.'./source/plugin/wechat/wsq.class.php'; -require_once DISCUZ_ROOT.'./source/plugin/wechat/setting.class.php'; -WeChatSetting::menu(); - -if(isset($_GET['viewapi'])) { - - dheader('location: '.ADMINSCRIPT.'?action=plugins&operation=config&do='.$pluginid.'&identifier=wechat&pmod=api_setting'); - -} - -if(!submitcheck('settingsubmit')) { - - if(!$setting['wechat_token']) { - $setting['wechat_token'] = random(16); - $settings = array('mobilewechat' => serialize($setting)); - C::t('common_setting')->update_batch($settings); - updatecache('setting'); - } - - $groupselect = array(); - foreach(C::t('common_usergroup')->range_orderby_credit() as $group) { - if($group['type'] != 'member' || $_G['setting']['newusergroupid'] == $group['groupid']) { - $groupselect[$group['type']] .= ''; - } - } - $usergroups = ''; - - showtips(lang('plugin/wechat', 'wechat_tips', array('url' => $apiurl))); - showformheader('plugins&operation=config&do='.$pluginid.'&identifier=wechat&pmod=wechat_setting', 'enctype'); - - showtableheader(); - showsetting(lang('plugin/wechat', 'wechat_mptype'), array('setting[wechat_mtype]', array( - array(0, lang('plugin/wechat', 'wechat_mptype_0'), array('qrcode' => 'none')), - array(2, lang('plugin/wechat', 'wechat_mptype_2'), array('qrcode' => 'none')), - )), $setting['wechat_mtype'], 'mradio', 0, 0, lang('plugin/wechat', 'wechat_mptype_comment')); - showtagheader('tbody', 'qrcode', $setting['wechat_mtype'] == 1); - showsetting(lang('plugin/wechat', 'wechat_qrcode'), 'wechat_qrcode', '', 'file', 0, 0, lang('plugin/wechat', 'wechat_qrcode_comment', array('qrcode' => $qrcode))); - showtagfooter('tbody'); - showtablefooter(); - - showtableheader(lang('plugin/wechat', 'wechat_func_setting')); - showsetting(lang('plugin/wechat', 'wechat_allowregister'), 'setting[wechat_allowregister]', $setting['wechat_allowregister'], 'radio', 0, 1, lang('plugin/wechat', 'wechat_allowregister_comment')); - showsetting(lang('plugin/wechat', 'wechat_allowfastregister'), 'setting[wechat_allowfastregister]', $setting['wechat_allowfastregister'], 'radio', 0, 0, lang('plugin/wechat', 'wechat_allowfastregister_comment')); - showsetting(lang('plugin/wechat', 'wechat_disableregrule'), 'setting[wechat_disableregrule]', $setting['wechat_disableregrule'], 'radio', 0, 0, lang('plugin/wechat', 'wechat_disableregrule_comment')); - showsetting(lang('plugin/wechat', 'wechat_confirmtype'), 'setting[wechat_confirmtype]', $setting['wechat_confirmtype'], 'radio', 0, 0, lang('plugin/wechat', 'wechat_confirmtype_comment')); - showsetting(lang('plugin/wechat', 'wechat_newusergroupid'), '', '', $usergroups, 0, 0, lang('plugin/wechat', 'wechat_newusergroupid_comment')); - showtagfooter('tbody'); - showsetting(lang('plugin/wechat', 'wechat_followurl'), 'setting[wechat_followurl]', $setting['wechat_followurl'], 'text', 0, 0, lang('plugin/wechat', 'wechat_followurl_comment')); - showtagfooter('tbody'); - - showtableheader(lang('plugin/wechat', 'wechat_service_setting')); - showsetting(lang('plugin/wechat', 'wechat_url'), '', '', ''.$apiurl.''); - showsetting(lang('plugin/wechat', 'wechat_token'), 'setting[wechat_token]', $setting['wechat_token'], 'text'); - showtablefooter(); - - showtableheader(lang('plugin/wechat', 'wechat_devid_setting')); - showsetting(lang('plugin/wechat', 'wechat_appId'), 'setting[wechat_appId]', $setting['wechat_appId'], 'text'); - showsetting(lang('plugin/wechat', 'wechat_appsecret'), 'setting[wechat_appsecret]', $setting['wechat_appsecret'], 'text'); - showtablefooter(); - - showtableheader(); - showsubmit('settingsubmit'); - showtablefooter(); - - showformfooter(); - -} else { - - if($_GET['setting']['wechat_mtype'] == 2 && !$_GET['setting']['wechat_appId']) { - cpmsg(lang('plugin/wechat', 'wechat_at_need'), '', 'error'); - } - - if($_GET['setting']['wechat_appId'] && $_GET['setting']['wechat_appsecret']) { - require_once DISCUZ_ROOT . './source/plugin/wechat/wechat.lib.class.php'; - $wechat_client = new WeChatClient($_GET['setting']['wechat_appId'], $_GET['setting']['wechat_appsecret']); - if(!$wechat_client->getAccessToken(1, 1)) { - cpmsg(lang('plugin/wechat', 'wechat_at_geterror'), '', 'error'); - } - $option = array( - 'scene_id' => 100000, - 'expire' => 30, - 'ticketOnly' => 1 - ); - $ticket = $wechat_client->getQrcodeTicket($option); - if(!$wechat_client->getQrcodeImgUrlByTicket($ticket)) { - cpmsg(lang('plugin/wechat', 'wechat_at_qrgeterror'), '', 'error'); - } - } - - $_GET['setting']['wechat_qrtype'] = !$_GET['setting']['wechat_mtype'] ? 3 : 0; - $_GET['setting']['wechat_token'] = $_GET['setting']['wechat_token'] ? $_GET['setting']['wechat_token'] : random(16); - - if($_FILES['wechat_qrcode']['tmp_name']) { - $upload = new discuz_upload(); - if(!$upload->init($_FILES['wechat_qrcode'], 'common', random(3, 1), random(8)) || !$upload->save()) { - cpmsg($upload->errormessage(), '', 'error'); - } - $_GET['setting']['wechat_qrcode'] = $upload->attach['attachment']; - } - - if($_GET['setting']['wechat_followurl']) { - $_GET['setting']['wechat_followurl'] = (!preg_match('/^https?:\/\//', $_GET['setting']['wechat_followurl']) ? 'http://' : '').$_GET['setting']['wechat_followurl']; - $parse = parse_url($_GET['setting']['wechat_followurl']); - if(!$parse['host'] || $parse['host'] != 'mp.weixin.qq.com') { - cpmsg(lang('plugin/wechat', 'wsq_followurl_error'), '', 'error'); - } - } - - if($setting['wsq_siteid']) { - $siteinfo = wsq::edit($setting['wsq_sitename'], - $setting['wsq_siteurl'], - $setting['wsq_sitelogo'], - $setting['wsq_sitesummary'], - $_GET['setting']['wechat_mtype'], - $_GET['setting']['wechat_qrtype'], - $setting['wsq_siteip'], - $_GET['setting']['wechat_followurl'], - $_GET['setting']['wechat_appId'], - $_GET['setting']['wechat_appsecret'], - $_GET['setting'] + $setting - ); - if(!$siteinfo || $siteinfo->code) { - cpmsg(lang('plugin/wechat', 'wsq_api_edit_error'), '', 'error'); - } - } - - $settings = array('mobilewechat' => serialize($_GET['setting'] + $setting)); - C::t('common_setting')->update_batch($settings); - updatecache('setting'); - - cpmsg('setting_update_succeed', 'action=plugins&operation=config&do='.$pluginid.'&identifier=wechat&pmod=wechat_setting', 'succeed'); -} - -function formathook($hook) { - return 'File: '.$hook['plugin'].'/'.$hook['include'].' Method: '.$hook['class'].'->'.$hook['method']; -} - -?> \ No newline at end of file diff --git a/upload/source/plugin/wechat/wsq.class.php b/upload/source/plugin/wechat/wsq.class.php deleted file mode 100644 index b5b276c8..00000000 --- a/upload/source/plugin/wechat/wsq.class.php +++ /dev/null @@ -1,307 +0,0 @@ - 600) { - return false; - } - - $code = $data['code']; - sort($data, SORT_STRING); - $data[] = $token; - $data = implode($data); - $tmpstr = sha1($data); - - if($tmpstr === $signature && empty($code)){ - return true; - } else { - return false; - } - } - - private static function _make_sign($data, $token) { - sort($data, SORT_STRING); - $data[] = $token; - $data = implode($data); - $tmpstr = sha1($data); - - return $tmpstr; - } - - private static function _convert($post) { - foreach($post as $k => $v) { - $post[$k] = diconv($v, CHARSET, 'UTF-8'); - } - return $post; - } - - private static function _setting() { - global $_G; - if(!self::$SETTING) { - self::$SETTING = dunserialize($_G['setting']['mobilewechat']); - } - } - - private static function _token() { - self::_setting(); - return self::$SETTING['wsq_sitetoken']; - } - - private static function _siteid() { - self::_setting(); - return self::$SETTING['wsq_siteid']; - } - - public static function decodeauth($auth) { - global $_G; - list($uid, $tt, $siteid, $clientip) = explode("\t", authcode($auth, 'DECODE', self::_token())); - if($clientip) { - $_G['clientip'] = $clientip; - } - if($uid && $siteid == self::_siteid() && $tt > TIMESTAMP) { - return $uid; - } else { - return 0; - } - } - - public static function register($sitename, $siteurl, $sitelogo, $sitesummary, $mptype, $qrtype, $siteip, $followurl, $appid, $appsecret, $globalbanner, $setting) { - global $_G; - $get = array( - 'c' => 'site', - 'a' => 'register' - ); - $post = array( - 'sitename' => $sitename, - 'siteurl' => $siteurl, - 'sitelogo' => $sitelogo, - 'sitesummary' => $sitesummary, - 'mptype' => $mptype, - 'qrtype' => $qrtype, - 'siteuniqueid' => $_G['setting']['siteuniqueid'], - 'siteip' => $siteip, - 'followurl' => $followurl, - 'appid' => $appid, - 'appsecret' => $appsecret, - 'globalbanner' => $globalbanner, - 'setting' => serialize($setting), - 'tt' => TIMESTAMP, - ); - $post = self::_convert($post); - return self::_dfsockopen($get, $post); - } - - public static function info() { - global $_G; - $get = array( - 'c' => 'site', - 'a' => 'info', - 'siteid' => self::_siteid() - ); - return self::_dfsockopen($get); - } - - public static function qrconnectUrl($uid, $qrreferer) { - $get = array( - 'c' => 'site', - 'a' => 'qrconnect', - 'siteid' => self::_siteid(), - 'siteuid' => $uid, - 'qrreferer' => $qrreferer, - 'tt' => TIMESTAMP, - ); - $get['signature'] = self::_make_sign($get, self::_token()); - return self::$API_URL.http_build_query($get); - } - - public static function userregisterUrl($uid, $openid, $openidSign, $qrreferer) { - $get = array( - 'c' => 'site', - 'a' => 'userregister', - 'siteid' => self::_siteid(), - 'siteuid' => $uid, - 'openid' => $openid, - 'openidsign' => $openidSign, - 'qrreferer' => $qrreferer, - 'tt' => TIMESTAMP, - ); - $get['signature'] = self::_make_sign($get, self::_token()); - return self::$API_URL.http_build_query($get); - } - - public static function wxuserregisterUrl($uid) { - $get = array( - 'c' => 'site', - 'a' => 'wxuserregister', - 'siteid' => self::_siteid(), - 'siteuid' => $uid, - 'tt' => TIMESTAMP, - 'mobile' => 2, - 'qrreferer' => $_GET['referer'], - ); - $get['signature'] = self::_make_sign($get, self::_token()); - return self::$API_URL.http_build_query($get); - } - - public static function userloginUrl($uid, $openid, $openidSign) { - $get = array( - 'c' => 'site', - 'a' => 'userregister', - 'siteid' => self::_siteid(), - 'siteuid' => $uid, - 'openid' => $openid, - 'openidsign' => $openidSign, - 'type' => 'json', - 'tt' => TIMESTAMP, - ); - $get['signature'] = self::_make_sign($get, self::_token()); - return self::$API_URL.http_build_query($get); - } - - public static function userloginUrl2($uid) { - $get = array( - 'c' => 'site', - 'a' => 'waplogin', - 'siteid' => self::_siteid(), - 'siteuid' => $uid, - 'type' => 'json', - 'tt' => TIMESTAMP, - ); - $get['signature'] = self::_make_sign($get, self::_token()); - return self::$API_URL.http_build_query($get); - } - - public static function userunbind($uid, $openid) { - $get = array( - 'c' => 'site', - 'a' => 'userunbind', - 'siteid' => self::_siteid(), - 'tt' => TIMESTAMP, - ); - $post = array( - 'openid' => $openid, - 'siteuid' => $uid, - ); - $post['signature'] = self::_make_sign(array_merge($get, $post), self::_token()); - $return = self::_dfsockopen($get, $post); - return !$return->code; - } - - public static function edit($sitename, $siteurl, $sitelogo, $sitesummary, $mptype, $qrtype, $siteip, $followurl, $appid, $appsecret, $setting) { - global $_G; - $get = array( - 'c' => 'site', - 'a' => 'edit', - 'siteid' => self::_siteid(), - ); - $post = array( - 'sitename' => $sitename, - 'siteurl' => $siteurl, - 'sitelogo' => $sitelogo, - 'sitesummary' => $sitesummary, - 'mptype' => $mptype, - 'qrtype' => $qrtype, - 'siteuniqueid' => $_G['setting']['siteuniqueid'], - 'siteip' => $siteip, - 'followurl' => $followurl, - 'appid' => $appid, - 'appsecret' => $appsecret, - 'setting' => serialize($setting), - 'tt' => TIMESTAMP, - ); - $post = self::_convert($post); - $post['signature'] = self::_make_sign(array_merge($get, $post), self::_token()); - return self::_dfsockopen($get, $post); - } - - public static function recheck() { - $get = array( - 'c' => 'site', - 'a' => 'recheck', - 'siteid' => self::_siteid(), - ); - $post = array(); - $post['signature'] = self::_make_sign(array_merge($get, $post), self::_token()); - return self::_dfsockopen($get, $post); - } - - public static function report($action) { - global $_G; - $get = array( - 'c' => 'report', - 'a' => $action, - 'siteid' => self::_siteid(), - ); - $post = array( - 'uid' => $_G['uid'], - 'userip' => $_G['clientip'] - ); - $post['signature'] = self::_make_sign(array_merge($get, $post), self::_token()); - return self::_dfsockopen($get, $post); - } - - public static function check($param) { - if(self::_check_sign($param, self::_token())) { - return $param['echostr']; - } - return; - } - - public static function checksign($param) { - return self::_check_sign($param, self::_token()); - } - - public static function siteinfo() { - self::_setting(); - return array( - 'siteInfo' => array( - 'sName' => self::$SETTING['wsq_sitename'], - 'sDesc' => self::$SETTING['wsq_sitesummary'], - 'sLogo' => self::$SETTING['wsq_sitelogo'], - ) - ); - } - - public static function stat() { - self::_setting(); - $get = array( - 'c' => 'site', - 'a' => 'stat', - 'siteid' => self::_siteid(), - ); - $post = array(); - $post['signature'] = self::_make_sign(array_merge($get, $post), self::_token()); - return self::_dfsockopen($get, $post); - } - -} - -?> \ No newline at end of file diff --git a/upload/source/plugin/wechat/wsq_app.inc.php b/upload/source/plugin/wechat/wsq_app.inc.php deleted file mode 100644 index 598ef945..00000000 --- a/upload/source/plugin/wechat/wsq_app.inc.php +++ /dev/null @@ -1,56 +0,0 @@ -fetch_all_setting(array('mobilewechat')); -$setting = (array)dunserialize($setting['mobilewechat']); - -if(!$setting['wsq_sitetoken']) { - cpmsg(lang('plugin/wechat', 'wsq_api_register_close'), '', 'error'); -} - -require_once DISCUZ_ROOT.'./source/plugin/wechat/wechat.lib.class.php'; -require_once DISCUZ_ROOT.'./source/plugin/wechat/wsq.class.php'; -require_once DISCUZ_ROOT.'./source/plugin/wechat/setting.class.php'; -WeChatSetting::menu(); - -showtableheader(lang('plugin/wechat', 'wsq_viewapp_pubevent')); -echo ''.lang('plugin/wechat', 'wsq_viewapp_na').''; -showtablefooter(); - -showtableheader(lang('plugin/wechat', 'wsq_viewapp_local')); -echo ''.lang('plugin/wechat', 'wsq_viewapp_local_comment').''; -showtablefooter(); - -showtableheader(lang('plugin/wechat', 'wsq_viewapp_online')); -echo ''.lang('plugin/wechat', 'wsq_viewapp_online_comment').''; -showtablefooter(); - -if($setting['wsq_siteid']) { - $time = TIMESTAMP; - -echo << -function pubEventCallback(re) { - if(re.errCode) { - return; - } - if(typeof re.data.event.peId != 'undefined') { - $('pubevent').innerHTML = '

    ' + re.data.event.peTitle + '

    ' + re.data.event.peContent; - } -} - - -EOF; - -} \ No newline at end of file diff --git a/upload/source/plugin/wechat/wsq_setting.inc.php b/upload/source/plugin/wechat/wsq_setting.inc.php deleted file mode 100644 index 6f1cfaa9..00000000 --- a/upload/source/plugin/wechat/wsq_setting.inc.php +++ /dev/null @@ -1,235 +0,0 @@ -fetch_all_setting(array('mobilewechat', 'mobile')); -$mobilesetting = (array)dunserialize($setting['mobile']); -$setting = (array)dunserialize($setting['mobilewechat']); - -require_once DISCUZ_ROOT.'./source/plugin/wechat/wechat.lib.class.php'; -require_once DISCUZ_ROOT.'./source/plugin/wechat/wsq.class.php'; -require_once DISCUZ_ROOT.'./source/plugin/wechat/setting.class.php'; -WeChatSetting::menu(); - -if(!$setting['wsq_sitetoken']) { - cpmsg(lang('plugin/wechat', 'wsq_api_register_close'), '', 'error'); -} - -if(!empty($_GET['recheck'])) { - wsq::recheck(); - $siteinfo = wsq::info(); - $setting['wsq_status'] = $siteinfo->res->status; - $setting['wsq_lastrequest'] = $siteinfo->res->lasttime; - $settings = array('mobilewechat' => serialize($setting)); - C::t('common_setting')->update_batch($settings); -} - -if(!submitcheck('settingsubmit')) { - - if($setting['wsq_siteid']) { - if(is_array($_G['setting']['rewritestatus']) && in_array('plugin', $_G['setting']['rewritestatus'])) { - $url = $_G['siteurl'].rewriteoutput('plugin', 1, 'wechat', 'access'); - } else { - $url = $_G['siteurl'].'plugin.php?id=wechat:access'; - } - } - - $apilisturl = ADMINSCRIPT.'?action=plugins&operation=config&do='.$pluginid.'&identifier=wechat&pmod=wsq_setting&viewapi=yes'; - - $setting['wsq_siteurl'] = $setting['wsq_siteurl'] ? $setting['wsq_siteurl'] : $_G['siteurl']; - $setting['wsq_sitename'] = $setting['wsq_sitename'] ? $setting['wsq_sitename'] : $_G['setting']['bbname']; - - require_once libfile('function/forumlist'); - $forums = ''; - - $sitelogo = $setting['wsq_sitelogo'] ? '' : ''; - $qrcode = $setting['wechat_qrcode'] ? '' : ''; - - $apicredits = ''; - foreach($_G['setting']['extcredits'] as $i => $credit) { - $extcredit = 'extcredits'.$i.' ('.$credit['title'].')'; - $apicredits .= ''; - } - - $setting['wechat_forumdisplay_reply'] = isset($setting['wechat_forumdisplay_reply']) ? $setting['wechat_forumdisplay_reply'] : 1; - - showtips(lang('plugin/wechat', 'wsq_tips', array('ADMINSCRIPT' => ADMINSCRIPT.'?action=', 'apiurl' => $apilisturl))); - showformheader('plugins&operation=config&do='.$pluginid.'&identifier=wechat&pmod=wsq_setting', 'enctype'); - - showtableheader(lang('plugin/wechat', 'wechat_wsq_setting').' '.($setting['wsq_status'] ? ' ('.lang('plugin/wechat', 'wsq_status_open').')' : ($setting['wsq_siteid'] ? ' ('.lang('plugin/wechat', 'wsq_status_ing').(TIMESTAMP - $setting['wsq_lastrequest'] > 3600 ? ' ['.lang('plugin/wechat', 'wsq_status_try').'])' : ')') : ' ('.lang('plugin/wechat', 'wsq_status_close').')'))); - - showsetting(lang('plugin/wechat', 'wsq_allow'), 'setting[wsq_allow]', $setting['wsq_allow'], 'radio', 0, 0, lang('plugin/wechat', 'wsq_allow_comment')); - if($setting['wsq_allow'] && $setting['wsq_siteid']) { - showtablefooter(); - showtableheader(); - showsetting(lang('plugin/wechat', 'wsq_url'), '', '', ''.$url.''); - showtablefooter(); - showtableheader(); - showsetting(lang('plugin/wechat', 'wsq_siteid'), '', '', $setting['wsq_siteid']); - showsetting(lang('plugin/wechat', 'wsq_sitetoken'), '', '', $setting['wsq_sitetoken']); - } - showsetting(lang('plugin/wechat', 'wsq_sitename'), 'setting[wsq_sitename]', $setting['wsq_sitename'], 'text'); - showsetting(lang('plugin/wechat', 'wsq_sitelogo'), 'wsq_sitelogo', $setting['wsq_sitelogo'], 'file', 0, 0, lang('plugin/wechat', 'wsq_sitelogo_comment', array('sitelogo' => $sitelogo))); - showsetting(lang('plugin/wechat', 'wsq_sitesummary'), 'setting[wsq_sitesummary]', $setting['wsq_sitesummary'], 'textarea'); - showsetting(lang('plugin/wechat', 'wsq_siteurl'), 'setting[wsq_siteurl]', $setting['wsq_siteurl'], 'text', 0, 0, lang('plugin/wechat', 'wsq_siteurl_comment')); - showsetting(lang('plugin/wechat', 'wsq_siteip'), 'setting[wsq_siteip]', $setting['wsq_siteip'], 'text', 0, 0, lang('plugin/wechat', 'wsq_siteip_comment')); - showsetting(lang('plugin/wechat', 'wsq_fid'), '', '', $forums, 0, 0, lang('plugin/wechat', 'wsq_fid_comment')); - if(!empty($_G['setting']['domain']['root']['forum'])) { - showsetting(lang('plugin/wechat', 'wsq_domain'), '', '', 'http://.'.$_G['setting']['domain']['root']['forum'], !function_exists('domain_create'), 0, lang('plugin/wechat', 'wsq_domain_comment')); - } else { - showsetting(lang('plugin/wechat', 'wsq_domain'), 'setting[wsq_domain]', '', 'text', 1, 0, lang('plugin/wechat', 'wsq_domain_comment')); - } - showsetting(lang('plugin/wechat', 'wechat_forumdisplay_reply'), 'setting[wechat_forumdisplay_reply]', $setting['wechat_forumdisplay_reply'], 'radio'); - showsetting(lang('plugin/wechat', 'wechat_float_qrcode'), 'setting[wechat_float_qrcode]', $setting['wechat_float_qrcode'], 'radio', 0, 1); - showsetting(lang('plugin/wechat', 'wechat_float_text'), 'setting[wechat_float_text]', $setting['wechat_float_text'], 'text'); - showtagfooter('tbody'); - showsetting(lang('plugin/wechat', 'wsq_wapdefault'), 'setting[wsq_wapdefault]', $setting['wsq_wapdefault'], 'radio'); - showsetting(lang('plugin/wechat', 'wsq_apicredit'), '', '', '', 0, 0, lang('plugin/wechat', 'wsq_apicredit_comment')); - showsubmit('settingsubmit'); - showtablefooter(); - - showformfooter(); - -} else { - - if($_FILES['wsq_sitelogo']['tmp_name']) { - $upload = new discuz_upload(); - if(!$upload->init($_FILES['wsq_sitelogo'], 'common', random(3, 1), random(8)) || !$upload->save()) { - cpmsg($upload->errormessage(), '', 'error'); - } - $parsev = parse_url($_G['setting']['attachurl']); - $_GET['setting']['wsq_sitelogo'] = ($parsev['host'] ? '' : $_G['siteurl']).$_G['setting']['attachurl'].'common/'.$upload->attach['attachment']; - } else { - $_GET['setting']['wsq_sitelogo'] = $setting['wsq_sitelogo']; - } - - if(!$_GET['setting']['wsq_fid']) { - cpmsg(lang('plugin/wechat', 'wsq_fid_empty'), '', 'error'); - } - - if(!$setting['wsq_sitetoken']) { - $siteinfo = wsq::register( - $_GET['setting']['wsq_sitename'], - $_GET['setting']['wsq_siteurl'], - $_GET['setting']['wsq_sitelogo'], - $_GET['setting']['wsq_sitesummary'], - $setting['wechat_mtype'], - $setting['wechat_qrtype'], - $_GET['setting']['wsq_siteip'], - $setting['wechat_followurl'], - $setting['wechat_appId'], - $setting['wechat_appsecret'], - $_GET['setting']['wsq_global_banner'], - $_GET['setting'] + $setting - ); - if(!$siteinfo || $siteinfo->code) { - if($siteinfo->code == 14) { - cpmsg(lang('plugin/wechat', 'wsq_api_servertime_error', '', 'error')); - } - cpmsg(lang('plugin/wechat', 'wsq_api_register_error'), '', 'error'); - } - $_GET['setting']['wsq_siteid'] = $siteinfo->res->siteid; - $_GET['setting']['wsq_sitetoken'] = $siteinfo->res->token; - } else { - $siteinfo = wsq::edit( - $_GET['setting']['wsq_sitename'], - $_GET['setting']['wsq_siteurl'], - $_GET['setting']['wsq_sitelogo'], - $_GET['setting']['wsq_sitesummary'], - $setting['wechat_mtype'], - $setting['wechat_qrtype'], - $_GET['setting']['wsq_siteip'], - $setting['wechat_followurl'], - $setting['wechat_appId'], - $setting['wechat_appsecret'], - $_GET['setting']['wsq_global_banner'], - $_GET['setting'] + $setting - ); - if(!$siteinfo || $siteinfo->code) { - if($siteinfo->code == 14) { - cpmsg(lang('plugin/wechat', 'wsq_api_servertime_error', '', 'error')); - } - cpmsg(lang('plugin/wechat', 'wsq_api_edit_error'), '', 'error'); - } - } - - if(function_exists('domain_create')) { - if(isset($_GET['setting']['wsq_domain'])) { - $_GET['setting']['wsq_domain'] = strtolower($_GET['setting']['wsq_domain']); - } - if(!empty($_GET['setting']['wsq_domain']) && !preg_match('/^((?=[a-z0-9-]{1,63}\.)(xn--)?[a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,63}$/', $_GET['setting']['wsq_domain'])) { - cpmsg('setting_domain_http_error', '', 'error'); - } - } - - $_GET['setting']['wsq_status'] = $siteinfo->res->status; - $_GET['setting']['wsq_lastrequest'] = $siteinfo->res->lasttime; - $settings = array('mobilewechat' => serialize($_GET['setting'] + $setting)); - if(!$mobilesetting['allowmobile']) { - $mobilesetting['allowmobile'] = 1; - $settings['mobile'] = serialize($mobilesetting); - } - C::t('common_setting')->update_batch($settings); - - updatecache('setting'); - - if($_GET['setting']['wsq_allow']) { - WeChatHook::updateResponse(array( - 'receiveMsg::text' => array('plugin' => 'wechat', 'include' => 'response.class.php', 'class' => 'WSQResponse', 'method' => 'text'), - 'receiveEvent::click' => array('plugin' => 'wechat', 'include' => 'response.class.php', 'class' => 'WSQResponse', 'method' => 'click'), - 'receiveEvent::subscribe' => array('plugin' => 'wechat', 'include' => 'response.class.php', 'class' => 'WSQResponse', 'method' => 'subscribe'), - 'receiveEvent::scan' => array('plugin' => 'wechat', 'include' => 'response.class.php', 'class' => 'WSQResponse', 'method' => 'scan'), - )); - WeChatHook::updateRedirect(array('plugin' => 'wechat', 'include' => 'response.class.php', 'class' => 'WSQResponse', 'method' => 'redirect')); - WeChatHook::updateAPIHook(array( - array('forumdisplay_variables' => array('plugin' => 'wechat', 'include' => 'wsqapi.class.php', 'class' => 'WSQAPI', 'method' => 'forumdisplay_variables')), - array('viewthread_variables' => array('plugin' => 'wechat', 'include' => 'wsqapi.class.php', 'class' => 'WSQAPI', 'method' => 'viewthread_variables')), - )); - WeChatHook::updateViewPluginId('wechat'); - if(!in_array('mobile', $_G['setting']['plugins']['available'])) { - $plugin = C::t('common_plugin')->fetch_by_identifier('mobile'); - if(!$plugin) { - cpmsg(lang('plugin/wechat', 'wsq_mobile_plugin_error'), '', 'error'); - } - C::t('common_plugin')->update($plugin['pluginid'], array('available' => 1)); - updatecache(array('plugin', 'setting')); - } - } else { - $wechatredirect = WeChatHook::getRedirect(); - if($wechatredirect['plugin'] == 'wechat') { - $wechatredirect = array(); - } - WeChatHook::updateRedirect($wechatredirect); - WeChatHook::updateViewPluginId(''); - } - - if(function_exists('domain_create') && $_G['setting']['domain']['root']['forum']) { - if($_GET['setting']['wsq_domain']) { - domain_create('wechat', $_GET['setting']['wsq_domain'], $_G['setting']['domain']['root']['forum']); - } else { - domain_delete('wechat'); - } - } - - cpmsg('setting_update_succeed', 'action=plugins&operation=config&do='.$pluginid.'&identifier=wechat&pmod=wsq_setting', 'succeed'); -} - -?> \ No newline at end of file diff --git a/upload/source/plugin/wechat/wsq_stat.inc.php b/upload/source/plugin/wechat/wsq_stat.inc.php deleted file mode 100644 index c1d42610..00000000 --- a/upload/source/plugin/wechat/wsq_stat.inc.php +++ /dev/null @@ -1,89 +0,0 @@ -fetch_all(array('mobilewechat')); -$setting = (array)dunserialize($setting['mobilewechat']); -if(!$setting['wsq_sitetoken']) { - cpmsg(lang('plugin/wechat', 'wsq_api_register_close'), '', 'error'); -} - -showtips(lang('plugin/wechat', 'discuzqr_tips')); - -$data = wsq::stat(); -$d = date('Ymd', TIMESTAMP); -if(!$data || $data->code != 0) { - cpmsg_error('wechat:stat_failed'); -} - -$xa = $uv = $pv = $newthread = $reply = $share = $reflow = array(); -foreach($data->res as $d) { - $xa[$d->ftime] = substr($d->ftime, 4, 2).'
    '.substr($d->ftime, 6, 2); - $uv[$d->ftime] = intval($uv[$d->ftime]) + intval($d->uv); - $pv[$d->ftime] = intval($pv[$d->ftime]) + intval($d->pv); - $newthread[$d->ftime] = intval($newthread[$d->ftime]) + intval($d->newthread_num); - $reply[$d->ftime] = intval($reply[$d->ftime]) + intval($d->reply_num); - $share[$d->ftime] = intval($share[$d->ftime]) + intval($d->share_num); - $reflow[$d->ftime] = intval($reflow[$d->ftime]) + intval($d->reflow_num); -} - -$xas = "'".implode('\',\'', $xa)."'"; -$uvs = implode(',', $uv); -$pvs = implode(',', $pv); -$newthreads = implode(',', $newthread); -$replys = implode(',', $reply); -$shares = implode(',', $share); -$reflows = implode(',', $reflow); - -$langarray = array('stat_newthread', 'stat_reply', 'stat_share', 'stat_reflow'); -$lang = array(); -foreach($langarray as $l) { - $lang[$l] = lang('plugin/wechat', $l); -} - -echo << - - -
    -EOF; -$xa = array_reverse($xa, true); -showtableheader(''); -showsubtitle(array('', 'UV', 'PV', $lang['stat_newthread'], $lang['stat_reply'], $lang['stat_share'], $lang['stat_reflow'])); -foreach($xa as $key=>$value) { - showtablerow('', array(), array( - $key, - $uv[$key], - $pv[$key], - $newthread[$key], - $reply[$key], - $share[$key], - $reflow[$key] - )); -} -showtablefooter(); \ No newline at end of file diff --git a/upload/source/plugin/wechat/wsqapi.class.php b/upload/source/plugin/wechat/wsqapi.class.php deleted file mode 100644 index 46cccf4b..00000000 --- a/upload/source/plugin/wechat/wsqapi.class.php +++ /dev/null @@ -1,150 +0,0 @@ -fetch_all($tids); - foreach($activities as $tid => $activity) { - $variables['showactivity'][$tid]['starttimefrom'] = dgmdate($activities[$tid]['starttimefrom']); - $variables['showactivity'][$tid]['expiration'] = dgmdate($activities[$tid]['expiration']); - $variables['showactivity'][$tid]['applynumber'] = $activities[$tid]['applynumber']; - $variables['showactivity'][$tid]['thumb'] = $activity['aid'] ? $_G['siteurl'].getforumimg($activity['aid'], 0, 400, 400) : ''; - } - } - - function viewthread_variables(&$variables) { - if(!showActivity::init()) { - return; - } - global $_G; - $variables['thread']['showactivity'] = 1; - $variables['special_activity']['thumb'] = preg_match('/^https?:\//', $GLOBALS['activity']['thumb']) ? $GLOBALS['activity']['thumb'] : $_G['siteurl'].$GLOBALS['activity']['thumb']; - unset($variables['special_activity']['attachurl']); - - if(empty($_GET['viewpid'])) { - if(!$_GET['viewhot']) { - $pids = array(); - foreach($variables['postlist'] as $post) { - $pids[] = $post['pid']; - } - if($pids) { - $posts = DB::fetch_all("SELECT pid, voters FROM %t WHERE pid IN (%n)", array('forum_debatepost', $pids), 'pid'); - $voters = array(); - foreach($variables['postlist'] as $key => $post) { - $variables['postlist'][$key]['voters'] = intval($posts[$post['pid']]['voters']); - if($_G['page'] == 1 && !$post['first'] && $_G['uid'] && $_G['uid'] == $post['authorid']) { - unset($variables['postlist'][$key]); - } - } - } - $variables['postlist'] = array_values($variables['postlist']); - $myarr = array(); - if($_G['uid'] && $_G['page'] == 1) { - $pids = array(); - $posts = C::t('forum_post')->fetch_all_common_viewthread_by_tid($_G['tid'], 0, $_G['uid'], 1, 2, 0, 0, 0); - foreach($posts as $pid => $post) { - $myarr[$pid] = array( - 'pid' => $pid, - 'author' => $post['author'], - 'authorid' => $post['authorid'], - 'voters' => 0, - ); - $pids[] = $post['pid']; - } - $posts = DB::fetch_all("SELECT pid, voters FROM %t WHERE pid IN (%n)", array('forum_debatepost', $pids), 'pid'); - foreach($posts as $pid => $post) { - $myarr[$pid]['voters'] = intval($post['voters']); - } - if($myarr) { - require_once libfile('function/attachment'); - parseattach(array_keys($myarr), array(), $myarr); - } - } - $variables['special_activity']['my_postlist'] = array_values($myarr); - $variables['special_activity']['view'] = 'new'; - } else { - foreach($variables['postlist'] as $key => $post) { - if(!$post['first']) { - unset($variables['postlist'][$key]); - } - } - $cachekey = 'showactivity_'.$_G['tid']; - loadcache($cachekey); - if(!$_G['cache'][$cachekey] || TIMESTAMP - $_G['cache'][$cachekey]['expiration'] > 600) { - $posts = DB::fetch_all("SELECT pid, voters FROM %t d WHERE tid=%d AND voters>1 ORDER BY voters DESC LIMIT 500", array('forum_debatepost', $_G['tid']), 'pid'); - foreach($posts as $vpost) { - $voters[$vpost['pid']] = $vpost['voters']; - } - $top = 1; - $toparr = array(); - $posts = C::t('forum_post')->fetch_all_by_pid('tid:'.$_G['tid'], array_keys($voters), false, '', 0, 0, null, 0); - foreach($voters as $pid => $voters) { - if($posts[$pid]) { - $toparr[$pid] = array( - 'pid' => $pid, - 'author' => $posts[$pid]['author'], - 'authorid' => $posts[$pid]['authorid'], - 'voters' => $voters, - 'top' => $top++ - ); - if($top > 50) { - break; - } - } - } - $variables['special_activity']['top_postlist'] = $toparr; - savecache($cachekey, array('variable' => $toparr, 'expiration' => TIMESTAMP)); - } else { - $variables['special_activity']['top_postlist'] = $_G['cache'][$cachekey]['variable']; - } - $hotpage = max(1, $_GET['page']); - $start = max(0, ($hotpage - 1) * $_G['ppp']); - - $toplist = & $variables['special_activity']['top_postlist']; - $toplist = array_slice($toplist, $start, $_G['ppp'], 1); - require_once libfile('function/attachment'); - parseattach(array_keys($toplist), array(), $toplist); - $toplist = array_values($toplist); - $variables['special_activity']['view'] = 'hot'; - } - } else { - $comments = array(); - foreach($GLOBALS['comments'][$_GET['viewpid']] as $comment) { - $comments[] = array( - 'author' => $comment['author'], - 'authorid' => $comment['authorid'], - 'avatar' => avatar($comment['authorid'], 'small', 1), - 'message' => $comment['comment'], - 'dateline' => strip_tags(dgmdate($comment['dateline'], 'u')), - ); - } - $variables['postlist'] = array_merge($variables['postlist'], $comments); - $variables['thread']['replies'] = $GLOBALS['commentcount'][$_GET['viewpid']]; - $voters = C::t('forum_debatepost')->fetch($_GET['viewpid']); - $variables['thread']['recommend_add'] = $voters['voters']; - } - } - -} \ No newline at end of file diff --git a/upload/source/plugin/witframe_api/api.inc.php b/upload/source/plugin/witframe_api/api.inc.php new file mode 100644 index 00000000..15350941 --- /dev/null +++ b/upload/source/plugin/witframe_api/api.inc.php @@ -0,0 +1,9 @@ +run(); \ No newline at end of file diff --git a/upload/source/plugin/witframe_api/class/remote.class.php b/upload/source/plugin/witframe_api/class/remote.class.php new file mode 100644 index 00000000..60b43aa9 --- /dev/null +++ b/upload/source/plugin/witframe_api/class/remote.class.php @@ -0,0 +1,166 @@ +charset = strtolower($charset); + } + } + + public function paramDecode($key) { + if (empty($_POST[$key])) { + return array(); + } + + return $this->iconv(!is_array($_POST[$key]) ? unserialize($_POST[$key]) : $_POST[$key], 'UTF-8', $this->charset); + } + + public function check($hash) { + require 'config/config_ucenter.php'; + + $this->charset = strtolower(UC_CHARSET); + + $t = substr(time(), 0, 7); + $code = sha1($hash . UC_KEY . $t); + return $code == $_GET['code']; + } + + public function output($value) { + echo json_encode($this->iconv($value, $this->charset, 'UTF-8')); + exit; + } + + public function showOutput() { + $return = array('ret' => 0); + + $s = ob_get_contents(); + ob_end_clean(); + $return['data']['content'] = $s; + + $this->_setSysVar($return['data']); + $this->output($return); + } + + public function rawOutput() { + exit; + } + + public function convertOutput($output) { + ob_end_clean(); + $return = array('ret' => 0); + + $this->_setSysVar($return['data'], $output); + $tmp = $GLOBALS; + foreach ($output as $k => $v) { + if (strpos($k, '/') !== false) { + $return['data'][$v] = $this->_arrayVar($tmp, $k); + } else { + $return['data'][$v] = $this->_singleVar($tmp, $k); + } + } + + $this->output($return); + } + + public function sessionDecode($v) { + return unserialize(base64_decode($v)); + } + + private function _sessionEncode($v) { + return base64_encode(serialize($v)); + } + + private function _setSysVar(&$data, &$output = array()) { + global $_G; + $data['_session'] = $this->_sessionEncode($_COOKIE); + $data['_formhash'] = $this->_singleVar($_G, 'formhash'); + if (isset($output['_attachhash'])) { + if (!empty($_G['config']['security']['authkey'])) { + $data['_attachhash'] = md5(substr(md5($_G['config']['security']['authkey']), 8) . $_G['uid']); + } + unset($output['_attachhash']); + } + + unset($_G['config'], + $_G['setting']['siteuniqueid'], + $_G['setting']['ec_tenpay_opentrans_chnid'], + $_G['setting']['ec_tenpay_opentrans_key'], + $_G['setting']['ec_tenpay_bargainor'], + $_G['setting']['ec_tenpay_key'], + $_G['setting']['ec_account'], + $_G['setting']['ec_contract']); + } + + private function _singleVar(&$var, $k) { + return isset($var[$k]) ? $var[$k] : null; + } + + private function _arrayVar(&$var, $k) { + $value = null; + $sVar = &$var; + $e = explode('/', $k); + $count = count($e); + foreach ($e as $i => $_k) { + if ($_k == '*') { + foreach ($sVar as $_k3 => $_v3) { + $nKey = implode('/', array_slice($e, $i + 1)); + $value[$_k3] = $this->_arrayVar($_v3, $nKey); + } + break; + } + $isMulti = strpos($_k, ',') !== false; + if (!isset($sVar[$_k]) && !$isMulti) { + break; + } + if ($isMulti) { + $value = null; + foreach (explode(',', $_k) as $_k2) { + $value[$_k2] = $this->_singleVar($sVar, $_k2); + } + break; + } else { + if ($count - 1 == $i) { + $value = $this->_singleVar($sVar, $_k); + } + $sVar = &$sVar[$_k]; + } + } + return $value; + } + + public function iconv($variables, $in_charset, $out_charset) { + if ($this->charset == 'utf-8') { + return $variables; + } + if (is_string($variables)) { + return $this->_iconvStr($variables, $in_charset, $out_charset); + } + if (is_array($variables)) { + foreach ($variables as $k => $v) { + if (is_array($v)) { + $variables[$k] = $this->iconv($v, $in_charset, $out_charset); + } elseif (is_string($v)) { + $variables[$k] = $this->_iconvStr($v, $in_charset, $out_charset); + } + } + } + + return $variables; + } + + private function _iconvStr($v, $in_charset, $out_charset) { + if (function_exists('diconv')) { + return diconv($v, $in_charset, $out_charset); + } elseif (function_exists('iconv')) { + return iconv($in_charset, $out_charset, $v); + } else { + return $v; + } + } + +} \ No newline at end of file diff --git a/upload/source/plugin/witframe_api/core.php b/upload/source/plugin/witframe_api/core.php new file mode 100644 index 00000000..315bd362 --- /dev/null +++ b/upload/source/plugin/witframe_api/core.php @@ -0,0 +1,129 @@ + "0", + 'witSecretId' => $secretId, + 'witSecretKey' => $secretKey, + 'witPid' => "0", + 'ver' => 0, + ); + } + + $requestBody = array( + 'witUid' => $baseConf['witUid'], + 'witPid' => $baseConf['witPid'], + 'class' => $class, + 'func' => $func, + 'param' => $param, + 'type' => $type, + ); + $requestBody['t'] = time(); + $requestBody['sign'] = self::_getSign($baseConf['witSecretId'], $baseConf['witSecretKey'], $requestBody); + + $ch = curl_init(); + curl_setopt($ch, CURLOPT_URL, self::WitApiURL); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); + curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); + curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($requestBody)); + $response = curl_exec($ch); + if (!$response) { + throw new Exception($class . '::' . $func . '() response error'); + } + $responseBody = json_decode($response, true); + if (!$responseBody) { + throw new Exception($class . '::' . $func . '() response error'); + } + if ($func == 'Discuz_GetConf') { + if ($responseBody['errCode']) { + self::SetSetting(array()); + return array(); + } + if (empty($baseConf['witUid']) || empty($baseConf['ver']) || + !empty($responseBody['data']['ver']) && $responseBody['data']['ver'] > $baseConf['ver']) { + self::SetSetting($responseBody['data']); + } + } + if ($responseBody['errCode']) { + throw new Exception($class . '::' . $func . '() response ' . $responseBody['message'], $responseBody['errCode']); + } + return $responseBody['data']; + } + + public static function GetSetting() { + global $_G; + if (!empty($_G['setting'][self::SettingKey])) { + return unserialize($_G['setting'][self::SettingKey]); + } + return array(); + } + + public static function SetSetting($data) { + C::t('common_setting')->update_batch(array(self::SettingKey => $data)); + require_once libfile('function/cache'); + updatecache('setting'); + } + + private static function _getSign($witSecretId, $witSecretKey, $data) { + $srcStr = $witSecretId . '|' . serialize($data); + return Crypt::encode($witSecretKey, 'sha1', $srcStr); + } + +} \ No newline at end of file diff --git a/upload/source/plugin/witframe_api/discuz_plugin_witframe_api.xml b/upload/source/plugin/witframe_api/discuz_plugin_witframe_api.xml new file mode 100644 index 00000000..58bfdaf7 --- /dev/null +++ b/upload/source/plugin/witframe_api/discuz_plugin_witframe_api.xml @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/upload/source/plugin/witframe_api/install.php b/upload/source/plugin/witframe_api/install.php new file mode 100644 index 00000000..852cb2b2 --- /dev/null +++ b/upload/source/plugin/witframe_api/install.php @@ -0,0 +1,11 @@ +obj = $obj; + } + + public function __call($name, $arguments) { + $return = Core::RequestWit($this->obj, $name, $arguments, Core::Type_ObjMethod); + $this->obj = $return['obj']; + return $return['return']; + } + +} \ No newline at end of file diff --git a/upload/source/plugin/witframe_api/lib/apis.php b/upload/source/plugin/witframe_api/lib/apis.php new file mode 100644 index 00000000..a6b49454 --- /dev/null +++ b/upload/source/plugin/witframe_api/lib/apis.php @@ -0,0 +1,30 @@ +_return(self::Ret_AuthFail); + } + parse_str(authcode($_GET['code'], 'DECODE', UC_KEY), $get); + + if (time() - $get['t'] > self::AuthExpire) { + $this->_return(self::Ret_AuthFail); + } + + if (empty($get['action'])) { + $this->_return(self::Ret_ParamFail); + } + + $this->method = '_action_' . $get['action']; + if (!method_exists($this, $this->method)) { + $this->_return(self::Ret_ParamFail); + } + + $this->get = $get; + $this->post = !empty($_POST) ? $_POST : array(); + + $this->r = new \WitClass\Remote(UC_CHARSET); + + return call_user_func(array($this, $this->method)); + } + + private function _action_test() { + $this->_return(self::Ret_Success, array('time' => time())); + } + + private function _action_getUser() { + $user = array(); + if (!empty($this->get['username'])) { + $this->get['username'] = $this->r->iconv($this->get['username'], 'UTF-8', UC_CHARSET); + $user = uc_get_user($this->get['username']); + } elseif (!empty($this->get['uid'])) { + $user = uc_get_user($this->get['uid'], 1); + } + if (!$user) { + $this->_return(self::Ret_Success); + } + $return = array('errCode' => 0); + list($return['uid'], $return['username'], $return['email']) = $user; + $return['avatar'] = $this->_getAvatar($return['uid']); + $return['count'] = C::t('common_member_count')->fetch($return['uid']); + $this->_return(self::Ret_Success, $return); + } + + private function _action_getSiteInfo() { + global $_G; + $return['siteName'] = $_G['setting']['bbname']; + $return['extcredits'] = $_G['setting']['extcredits']; + $this->_return(self::Ret_Success, $return); + } + + private function _action_login() { + if (empty($this->get['password'])) { + $this->_return(self::Ret_ParamFail); + } + $name = ''; + $isUid = 0; + if (!empty($this->get['username'])) { + $name = $this->get['username']; + } elseif (!empty($this->get['uid'])) { + $name = $this->get['uid']; + $isUid = 1; + } elseif (!empty($this->get['email'])) { + $name = $this->get['email']; + $isUid = 2; + } else { + $this->_return(self::Ret_ParamFail); + } + $user = uc_user_login($name, $this->get['password'], $isUid); + if (!$user) { + $this->_return(self::Ret_Success); + } + list($status) = $user; + if ($status <= 0) { + $this->_return(self::Ret_Success, array('errCode' => $status)); + } + $return = array('errCode' => 0); + list($return['uid'], $return['username'], , $return['email']) = $user; + $return['avatar'] = $this->_getAvatar($return['uid']); + $this->_return(self::Ret_Success, $return); + } + + private function _getAvatar($uid) { + return UC_API . '/avatar.php?uid=' . $uid . '&size=middle'; + } + + private function _return($ret, $data = array()) { + $this->r->output(array( + 'ret' => $ret, + 'data' => $data, + )); + } +} \ No newline at end of file diff --git a/upload/source/plugin/witframe_api/lib/site.php b/upload/source/plugin/witframe_api/lib/site.php new file mode 100644 index 00000000..26fe2fe8 --- /dev/null +++ b/upload/source/plugin/witframe_api/lib/site.php @@ -0,0 +1,15 @@ + + \ No newline at end of file diff --git a/upload/source/plugin/witframe_api/page.remote.php b/upload/source/plugin/witframe_api/page.remote.php new file mode 100644 index 00000000..1e08ee1a --- /dev/null +++ b/upload/source/plugin/witframe_api/page.remote.php @@ -0,0 +1,63 @@ +output(array( + 'ret' => -1, + )); + } + + if (!preg_match('/^\w+$/', $_POST['_script_'])) { + $r->output(array( + 'ret' => -2, + )); + } + + $script = $_POST['_script_']; + $session = !empty($_POST['_session_']) ? $_POST['_session_'] : ''; + if (!$r->check($script . $session)) { + $r->output(array( + 'ret' => -4, + )); + } + + $output = !empty($_POST['_output_']) ? $_POST['_output_'] : array(); + $rawOutput = !empty($_POST['_raw_']); + $_GET = $r->paramDecode('_get_'); + $cookies = $session ? $r->sessionDecode($session) : array(); + foreach ($cookies as $k => $v) { + $_COOKIE[$k] = $v; + setcookie($k, $v); + } + $_POST = $r->paramDecode('_post_'); + + $shutdownFunc = 'showOutput'; + if($rawOutput) { + $shutdownFunc = 'rawOutput'; + } elseif($output) { + $shutdownFunc = 'convertOutput'; + } + + register_shutdown_function(array($r, $shutdownFunc), $output); + + try { + require './' . $script . '.php'; + } catch (Exception $e) { + $r->output(array( + 'ret' => -3, + )); + } +} else { + $_GET['id'] = 'witframe_api:api'; + require './plugin.php'; +} \ No newline at end of file diff --git a/upload/source/plugin/witframe_api/remote.class.php b/upload/source/plugin/witframe_api/remote.class.php new file mode 100644 index 00000000..932f5815 --- /dev/null +++ b/upload/source/plugin/witframe_api/remote.class.php @@ -0,0 +1,19 @@ +div { flex: 0 1 100%; overflow: hidden; text-overflow: ellipsis; whi .st-d #navbtn>div { background:linear-gradient(0deg, #999999 25%, transparent 25%) bottom; background-size: 8px 8px;} .currentloca { display: flex; height: 50px; padding: 0 20px; align-items: center; color: #000; } .st-d .currentloca { color: #999; } -.currentloca a { display: block; position: relative; width: 18px; height: 18px; border-radius: 9px; color: transparent; background-color: #2b7acd; overflow: hidden; text-indent: 1000px; } -.st-d .currentloca a { background-color: #ccc; } -.currentloca a::before, .currentloca a::after { content: ""; background: #fff; position: absolute; } -.st-d .currentloca a::before, .st-d .currentloca a::after { background: #0a0a0a; } -.currentloca a::before { width: 8px; height: 2px; top: 8px; left: 5px; } -.currentloca a::after { width: 2px; height: 8px; top: 5px; left: 8px; } +.currentloca a.custommenu_addto { display: block; position: relative; width: 18px; height: 18px; border-radius: 9px; color: transparent; background-color: #2b7acd; overflow: hidden; text-indent: 1000px; } +.st-d .currentloca a.custommenu_addto { background-color: #ccc; } +.currentloca a.custommenu_addto::before, .currentloca a.custommenu_addto::after { content: ""; background: #fff; position: absolute; } +.st-d .currentloca a.custommenu_addto::before, .st-d .currentloca a.custommenu_addto::after { background: #0a0a0a; } +.currentloca a.custommenu_addto::before { width: 8px; height: 2px; top: 8px; left: 5px; } +.currentloca a.custommenu_addto::after { width: 2px; height: 8px; top: 5px; left: 8px; } .uinfo { height: 50px; display: flex; padding: 0 20px; justify-content: space-between; } #topmenu { display: none; align-items: center; } #topmenu li { padding-right: 5px; } @@ -71,14 +71,14 @@ button::-moz-focus-inner { border: none; padding: 0; } #frameuinfo .btnlink:hover svg { fill: #2b7acd; } .st-d #frameuinfo .btnlink:hover svg { fill: #999; } .mainhd form { display: flex; justify-content: flex-end; align-items: center; flex-grow: 1; } -.mainhd form input.txt { background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3e%3cpath fill='%23444' d='M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z'/%3e%3c/svg%3e") no-repeat right 50%; color: #222; border: 1px solid #999; cursor: text; border-radius: 4px; position: relative; padding: 4px 8px; height: 28px; width: 150px; margin-left: 12px; box-shadow: none; transition: all 0.3s ease; transition-property: width, border-color, box-shadow; } +.mainhd form input.txt { background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3e%3cpath fill='%23444' d='M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z'/%3e%3c/svg%3e") no-repeat right 50%; color: #222; border: 1px solid #999; cursor: text; border-radius: 4px; position: relative; padding: 4px 8px; height: 18px; width: 150px; margin-left: 12px; box-shadow: none; transition: all 0.3s ease; transition-property: width, border-color, box-shadow; } .st-d .mainhd form input.txt { color:#fff;} .mainhd form input.txt:focus { outline: 0; border-color: #2b7acd; box-shadow: 0 0 3px 2px rgba(43, 122, 205, 0.4); } .st-d .mainhd form input.txt:focus { border-color: #999;} /* .mainhd form input.txt:focus:valid {background: transparent;} */ .mainhd form button { position: absolute; width: 24px; height: 28px; background: none; border: 0; cursor: pointer; } .mainhd form button:focus { outline: 0; } -#cpsetting {cursor: pointer;} +#cpsetting {cursor: pointer; } /* start oldlayout */ @media (min-width: 1200px) { .oldlayout nav>ul, .widelayout nav>ul { background-color: #163e69; } @@ -89,14 +89,14 @@ button::-moz-focus-inner { border: none; padding: 0; } .oldlayout .mainhd { flex-wrap: wrap; background-color: #f7f7f7; } .st-d .oldlayout .mainhd { background-color: #181818; } .oldlayout .mainhd .currentloca { order: 1; flex-grow: 1; height: 35px; } - .oldlayout .mainhd .uinfo { flex-shrink: 0; width: 100%; border-bottom: 1px solid #ccc; background-color: #fff; } + .oldlayout .mainhd .uinfo { width: 100%; border-bottom: 1px solid #ccc; background-color: #fff; } .st-d .oldlayout .mainhd .uinfo { border-bottom: 1px solid #999; background-color: #0a0a0a; } .widelayout .mainhd .uinfo { flex-grow: 1; padding: 0; } .oldlayout #frameuinfo>p.greet { max-width: 200px; } .widelayout #frameuinfo>p.greet { max-width: 190px; } .oldlayout #topmenu, .widelayout #topmenu { display: flex; } .oldlayout .mainhd form, .widelayout .mainhd form { flex-grow: 0; order: 1; padding-right: 20px; } - .oldlayout .mainhd form input.txt { background-color: #fff; background-size: 18px; height: 24px; padding: 2px 8px; } + .oldlayout .mainhd form input.txt { background-color: #fff; background-size: 18px; height: 18px; padding: 2px 8px; } .st-d .oldlayout .mainhd form input.txt { background-color: #000;} .widelayout .mainhd form input.txt { width: 24px; cursor: pointer; padding: 4px 0; border-color: transparent; color: transparent; } .widelayout .mainhd form input.txt:focus { color: #222; width: 150px; cursor: text; padding: 4px 8px; border-color: #2b7acd; } diff --git a/upload/static/image/admincp/admincplogin.css b/upload/static/image/admincp/admincplogin.css index 8536d42c..c0e03250 100644 --- a/upload/static/image/admincp/admincplogin.css +++ b/upload/static/image/admincp/admincplogin.css @@ -16,6 +16,9 @@ body { body.st-d { background: #0a0a0a; } +*, *::before, *::after { + box-sizing: inherit +} .darkmode { align-self: flex-end; width: 45px; @@ -139,6 +142,9 @@ body.st-d { box-shadow: 0 0 5px rgba(0, 0, 0, 0.2); margin-bottom: 10px; } +.loginbox .btn { + font-size: 24px !important; +} .st-d .loginbox img { filter: grayscale(1); } diff --git a/upload/static/image/admincp/admincppage.css b/upload/static/image/admincp/admincppage.css index d37e4909..82c2d5d6 100644 --- a/upload/static/image/admincp/admincppage.css +++ b/upload/static/image/admincp/admincppage.css @@ -42,7 +42,7 @@ textarea {font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif; .spectitle{ border-bottom:1px dashed #F66; } .extcredits, .threadprofilenode { margin:-5px 0 10px; } .extcredits a, .threadprofilenode a { margin-right:5px; padding:2px 5px; line-height:220%; border:1px solid #B6CFD9; background:#FFF; white-space:nowrap; } -.st-d .extcredits a, .threadprofilenode a { border:1px solid #181818; background:#000;} +.st-d .extcredits a, .st-d .threadprofilenode a { border:1px solid #181818; background:#000;} .popupmenu_popup { width:400px; overflow:hidden; padding:10px; border:1px solid #A6C9D7; background:#FFF; font-size:12px; font-weight:400; text-align:left; } li.popupmenu_popup { list-style: none; } #fselect_menu { width:300px; } @@ -65,7 +65,7 @@ textarea {font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif; .infotitle2 { margin-bottom: 10px; color: #090; font-size: 14px; font-weight: 700; } .infotitle3 { margin-bottom: 10px; color: #C00; font-size: 14px; font-weight: 700; } .infobox h3 { font-size: 18px; font-weight: bold; margin-bottom: 10px; } -.colorbox { background: #fff; padding: 20px; } +.colorbox { background: #fff; padding: 20px; margin-top: 3px; margin-bottom: 3px; border-top: 4px solid #CCC; border-bottom: 4px solid #CCC; } .st-d .colorbox { background: #000;} .colorbox h4 { font-size: 18px; margin-bottom: 10px; } .drow { display: flex; margin-left: -10px; margin-right: -10px; flex-wrap: wrap; } @@ -91,13 +91,14 @@ textarea {font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif; @media (max-width: 1300px) { .pluginlist .w1300hide { display: none; } } -.cpcontainer { background: #f0f0f0; padding: 20px; color: #333; font-size: 14px; } +.cpcontainer { background: #f0f0f0; padding: 20px; color: #333; font-size: 12px; } .st-d .cpcontainer { background: #282828;color: #666;} .copyright { width: 100%; background: #fff; color: #999; padding: 16px; font-size: 12px; text-align: center; } .st-d .copyright { background: #000;} .itemtitle { padding: 0 20px; background: #fff; display: flex; align-items: flex-start; flex-direction: column; border-bottom: 1px solid #ddd; } .st-d .itemtitle { background: #000; border-bottom: 1px solid #999; } .itemtitle .titlerow { display: flex; width: 100%; flex-direction: row; justify-content: space-between; } +.st-d .itemtitle .titlerow { color: #fff; } .itemtitle .titlerow>span, .itemtitle .titlerow>a { margin: 16px 0; } .itemtitle h3 { font-weight: bold; font-size: 20px; margin: 16px 20px 16px 0; } .st-l .itemtitle h3 { color:#000;} @@ -144,8 +145,8 @@ textarea {font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif; .tipbox { /* todo */ } .dbox { display: flex; flex-direction: column; background: #fff; margin-bottom: 20px; } .st-d .dbox {background: #000;} -.dbox .boxheader { padding: 16px 20px; font-size: 16px; border-bottom: 1px solid #ddd; } -.st-d .dbox .boxheader { border-bottom: 1px solid #383838; } +.dbox .boxheader { padding: 16px 20px; font-size: 16px; border-bottom: 1px solid #ddd; background: #F9F9F9; } +.st-d .dbox .boxheader { border-bottom: 1px solid #383838; background: #222; } .dbox .boxbody { padding: 20px; border-bottom: 1px solid #ddd; } .st-d .dbox .boxbody { border-bottom: 1px solid #383838; } .dbox .boxbody:last-child { border-bottom: 0px; } @@ -231,7 +232,7 @@ textarea {font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif; .statoff{ text-indent:-9999px; background:url(bg_repno.gif) no-repeat -250px -347px; } .rowform{ width:306px; overflow:auto; } .tb2 .rowform{ padding-left:20px; } - .rowform .txt, .rowform textarea{ margin-right:10px; width:250px; } + .rowform .txt, .rowform textarea{ margin-right:10px; width:234px; } .rowform select{ margin-right:10px; width:256px; } .rowform .radio{ margin-top:-2px !important; *margin-top:0 !important; *margin-top:-2px; } .rowform li{ overflow:hidden; float:left; margin-right:10px; white-space:nowrap; cursor:pointer; } @@ -241,8 +242,9 @@ textarea {font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif; .ckbox {width:900px; } .ckbox li { float: left; margin: 5px 10px 5px 0; white-space: nowrap; width: 162px; height: 20px; } .partition, .partition2{ color: #000; } - .st-d .partition, .partition2{ color:#fff;} - .tb2 .partition { padding: 16px 20px; font-size: 16px; border-bottom: 1px solid #ddd; } + .st-d .partition, .partition2{ color:#fff; } + .tb2 .partition { padding: 16px 20px; font-size: 16px; border-bottom: 1px solid #ddd;background: #F9F9F9; } + .st-d .tb2 .partition { background: #222; } .dblist{} .dblist li{ float:left; margin-bottom:5px; width:33%; height:20px; white-space:nowrap; cursor:pointer; } @@ -267,7 +269,7 @@ textarea {font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif; .lastnode, .lastboard{ padding-left:55px; background:url(bg_repno.gif) no-repeat -240px -600px; } .childboard{ padding-left:110px; background:url(bg_repno.gif) no-repeat -185px -550px; } .lastchildboard{ padding-left:110px; background:url(bg_repno.gif) no-repeat -185px -600px; } - .boardattr{ position:absolute; left:450px; width: 45px; margin-top:-24px !important; color:#999; } + .boardattr{ position:absolute; left:500px; width: 45px; margin-top:-22px !important; color:#999; } /* pick window */ .colorwd{ float:left; width:40px; height:30px; border-color:#ccc #666 #666 #ccc; } @@ -285,7 +287,7 @@ textarea {font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif; .mod_delete td { background: #F99 !important; } /* custom menu */ -.custom{ overflow:hidden; position:relative; border:6px solid #A6C9D7; background:#FFF; } +.custom{ overflow:hidden; position:relative; border:6px solid #ccc; background:#FFF; } .cmain{ padding:0; text-align: left; padding: 10px; } .cnote{ line-height:20px; } .cnote li{ float:left; margin-right:15px; } @@ -337,7 +339,7 @@ textarea {font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif; /* link */ .addtr{ padding-left:17px; line-height:25px; background:url(bg_repno.gif) no-repeat 0 1px; *background:url(bg_repno.gif) no-repeat 0 0; color:#F60; } .act{ margin:0 5px; text-decoration:underline; } -.addchildboard, .deleterow { margin-right: 5px; padding-left:17px; line-height:25px; *line-height: 16px; background:url(bg_repno.gif) no-repeat 0 -596px; color:#FFF; zoom: 1; } +.addchildboard, .deleterow { margin-right: 5px; padding-left:17px; line-height:25px; *line-height: 16px; background:url(bg_repno.gif) no-repeat 0 -597px; color:#FFF; zoom: 1; } .deleterow { padding-left: 12px; background: url(close.gif) no-repeat 0 50%; } .addchildboard:hover, .deleterow:hover { text-decoration:none; color:#F60 !important; } .switch{ color:#09C; } @@ -358,7 +360,7 @@ textarea {font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif; .devteam{ width:350px; } /* widget */ -.checked, .checked .txt{ color:#080; } +.checked, .checked .txt{ color:#0B0; } .lightfont{ color:#CCC; } .light, .light a{ color:#AAA; } .lightnum{ color:#F60; } @@ -411,6 +413,7 @@ textarea {font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif; .dbox.hometop .hinfo { flex-grow: 1; } .dbox.hometop .hinfo h4 { font-size: 18px; margin-top: 14px; margin-bottom: 10px; } .st-l .dbox.hometop .hinfo h4{color:#000;} +.st-d .dbox.hometop .hinfo h4{color:#666;} .dbox.hometop .hinfo p { font-size: 14px; color: #666; } .dbox .tb2 td{ padding:10px 5px 10px 0px;} .dbox .tb2 th{ padding:10px 5px 10px 0px;} @@ -437,6 +440,10 @@ textarea {font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif; .team span { flex-basis: 40%; min-width: 240px; } .team.tm a { flex-basis: auto; min-width: auto; } +/* forumlist */ +.forumheader { padding: 0px 20px;background: #fff;height:60px;line-height:60px; } +.st-d .forumheader { background: #000; } + /* calendar */ #calendar_week .dropmenu{ filter: none; opacity: 1; background: none; margin-left: 0;position:relative; margin-top:0; border:none; text-align:left; text-decoration:underline; display: inline; box-shadow: none; } .calendar_checked, .calendar_checked a:link, .calendar_checked a:visited{ color:#333; } @@ -454,19 +461,15 @@ textarea {font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif; .smallefont{font-size: 14px} /* 弹窗 */ -.fwin { text-align: left; background: #FFF; } -.t_l, .t_c, .t_r, .m_l, .m_r, .b_l, .b_c, .b_r { overflow: hidden; background: #000; opacity: 0.2; filter: alpha(opacity=20); } -.t_l, .t_r, .b_l, .b_r { width: 10px; height: 10px; line-height: 10px; font-size: 0; } -.t_c, .b_c { height: 10px; } -.m_l, .m_r { width: 10px; } -.t_l { border-radius: 10px 0 0 0; -moz-border-radius: 10px 0 0 0; -webkit-border-radius: 10px 0 0 0; -o-border-radius: 10px 0 0 0; } -.t_r { border-radius: 0 10px 0 0; -moz-border-radius: 0 10px 0 0; -webkit-border-radius: 0 10px 0 0; -o-border-radius: 0 10px 0 0; } -.b_l { border-radius: 0 0 0 10px; -moz-border-radius: 0 0 0 10px; -webkit-border-radius: 0 0 0 10px; -o-border-radius: 0 0 0 10px; } -.b_r { border-radius: 0 0 10px 0; -moz-border-radius: 0 0 10px 0; -webkit-border-radius: 0 0 10px 0; -o-border-radius: 0 0 10px 0; } +.fwin { text-align: left; background: #FFF; font-size: 12px; } +.t_l, .t_c, .t_r, .m_l, .m_r, .b_l, .b_c, .b_r { overflow: hidden; background: #ccc; } +.t_l, .t_r, .b_l, .b_r { width: 6px; height: 6px; line-height: 6px; font-size: 0; } +.t_c, .b_c { height: 6px; } +.m_l, .m_r { width: 6px; font-size: 1px; } .m_c { background: #FFF; } -.m_c .tb { margin: 0 0 10px; padding: 0 10px; } -.m_c .c { padding: 0 10px 10px; } -.m_c .o { padding: 8px 10px; height: 50px; text-align: right; border-top: 1px solid #CCC; background: #F5F5F5; } +.m_c .tb { margin: 0 0 6px; padding: 0 6px; } +.m_c .c { padding: 0 6px 6px; } +.m_c .o { padding: 8px 6px; text-align: right; border-top: 1px solid #CCC; background: #F5F5F5; } .m_c .o .btn { margin: 0; } .flb { padding: 10px 10px 8px; height: 20px; line-height: 20px; box-sizing: unset;} @@ -546,6 +549,7 @@ textarea {font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif; .psetting .light, .psetting .light a { color: #777; } .psetting a.memo { color: #999; margin-left: 20px; } .psetting div.memo { margin:5px;padding: 5px; border: 1px dotted #DEEFFB; background: #FFF; } + .st-d .psetting div:hover { background: #333; } /* 进度条 */ .pbg { position: relative; margin: 10px 0; width: 200px; height: 16px; background: url(bg_progressbar.png) 0 0 repeat-x; border-radius: 5px; } diff --git a/upload/static/image/admincp/minireset.css b/upload/static/image/admincp/minireset.css index 5848cb12..a36647d8 100644 --- a/upload/static/image/admincp/minireset.css +++ b/upload/static/image/admincp/minireset.css @@ -1 +1,47 @@ -html,body,p,ol,ul,li,dl,dt,dd,blockquote,figure,fieldset,legend,textarea,pre,iframe,hr,h1,h2,h3,h4,h5,h6{margin:0;padding:0}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal}ul{list-style:none}button,input,select,textarea{margin:0}html{box-sizing:border-box}*,*::before,*::after{box-sizing:inherit}img,video{height:auto;max-width:100%}iframe{border:0}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}td:not([align]),th:not([align]){text-align:left}img,svg{vertical-align:bottom} \ No newline at end of file +html, body, p, ol, ul, li, dl, dt, dd, blockquote, figure, fieldset, legend, textarea, pre, iframe, hr, h1, h2, h3, h4, h5, h6 { + margin: 0; + padding: 0 +} + +h1, h2, h3, h4, h5, h6 { + font-size: 100%; + font-weight: normal +} + +ul { + list-style: none +} + +button, input, select, textarea { + margin: 0 +} + +html { + box-sizing: border-box +} + +img, video { + height: auto; + max-width: 100% +} + +iframe { + border: 0 +} + +table { + border-collapse: collapse; + border-spacing: 0 +} + +td, th { + padding: 0 +} + +td:not([align]), th:not([align]) { + text-align: left +} + +img, svg { + vertical-align: bottom +} \ No newline at end of file diff --git a/upload/static/image/mobile/style.css b/upload/static/image/mobile/style.css index f10d60a8..d2a6510d 100644 --- a/upload/static/image/mobile/style.css +++ b/upload/static/image/mobile/style.css @@ -215,11 +215,11 @@ select {-moz-appearance:none;} .mb5 {margin-bottom:5px !important;} .mb10 {margin-bottom:10px !important;} .mb15 {margin-bottom:15px !important;} -.ml0 {margin-left:5px !important;} +.ml0 {margin-left:0px !important;} .ml5 {margin-left:5px !important;} .ml10 {margin-left:10px !important;} .ml15 {margin-left:15px !important;} -.mr0 {margin-right:5px !important;} +.mr0 {margin-right:0px !important;} .mr5 {margin-right:5px !important;} .mr10 {margin-right:10px !important;} .mr15 {margin-right:15px !important;} @@ -451,8 +451,8 @@ select {-moz-appearance:none;} /*----- 搜索 -----*/ .search {padding:15px;background-color:var(--dz-BG-0);border-bottom:1px solid var(--dz-BOR-ed);margin-bottom:10px} -.search .mtxt {height:38xp;line-height:38px;padding:0 8px;border:1px solid var(--dz-BOR-ed);border-right:none;background-color:var(--dz-BG-0);border-radius:4px 0 0 4px} -.search .mbtn {height:40xp;line-height:40px;padding:0 15px;border:none;background-color:var(--dz-BG-color);color:var(--dz-FC-fff);border-radius:0 4px 4px 0} +.search .mtxt {height:38px;line-height:38px;padding:0 8px;border:1px solid var(--dz-BOR-ed);border-right:none;background-color:var(--dz-BG-0);border-radius:4px 0 0 4px} +.search .mbtn {height:40px;line-height:40px;padding:0 15px;border:none;background-color:var(--dz-BG-color);color:var(--dz-FC-fff);border-radius:0 4px 4px 0} .search-hot {padding:10px 15px 5px;min-height:300px;border-top:1px solid var(--dz-BOR-ed);border-bottom:1px solid var(--dz-BOR-ed);background-color:var(--dz-BG-0)} .search-hot h2 {height:30px;line-height:30px;font-size:14px;color:var(--dz-FC-999)} .search-hot li a {display:block;height:40px;line-height:40px;font-size:14px;border-top:1px solid var(--dz-BOR-ed)} diff --git a/upload/static/js/admincp.js b/upload/static/js/admincp.js index 0060cbf8..75893ff2 100644 --- a/upload/static/js/admincp.js +++ b/upload/static/js/admincp.js @@ -170,21 +170,18 @@ function textareakey(obj, event) { function textareasize(obj, op) { if(!op) { - if(obj.scrollHeight > 70) { - obj.style.height = (obj.scrollHeight < 300 ? obj.scrollHeight - heightag: 300) + 'px'; - if(obj.style.position == 'absolute') { - obj.parentNode.style.height = (parseInt(obj.style.height) + 20) + 'px'; - } - } + } else { if(obj.style.position == 'absolute') { obj.style.position = ''; obj.style.width = ''; obj.parentNode.style.height = ''; + obj.style.resize = 'none'; } else { obj.parentNode.style.height = obj.parentNode.offsetHeight + 'px'; obj.style.width = BROWSER.ie > 6 || !BROWSER.ie ? '90%' : '600px'; obj.style.position = 'absolute'; + obj.style.resize = 'vertical'; } } } diff --git a/upload/static/js/admincp_frame.js b/upload/static/js/admincp_frame.js index 420f8257..6b36e6ad 100644 --- a/upload/static/js/admincp_frame.js +++ b/upload/static/js/admincp_frame.js @@ -202,4 +202,9 @@ function switchframedmvalue(ifdark, ifauto) { $('navbtn').addEventListener('click', function(){ $('navcontainer').classList.add('show'); }); + $('navcontainer').addEventListener('click', function(e){ + if(e.target === this){ + this.classList.remove('show') + } + }) })() \ No newline at end of file diff --git a/upload/static/js/echarts/echarts.common.min.js b/upload/static/js/echarts/echarts.common.min.js index c47604e1..fbcc595e 100644 --- a/upload/static/js/echarts/echarts.common.min.js +++ b/upload/static/js/echarts/echarts.common.min.js @@ -32,7 +32,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - ***************************************************************************** */var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,n)};function n(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}var i=function(){return(i=Object.assign||function(t){for(var e,n=1,i=arguments.length;n18);a&&(n.weChat=!0);e.canvasSupported=!!document.createElement("canvas").getContext,e.svgSupported="undefined"!=typeof SVGRect,e.touchEventsSupported="ontouchstart"in window&&!n.ie&&!n.edge,e.pointerEventsSupported="onpointerdown"in window&&(n.edge||n.ie&&+n.version>=11),e.domSupported="undefined"!=typeof document}(navigator.userAgent,a);var s={"[object Function]":!0,"[object RegExp]":!0,"[object Date]":!0,"[object Error]":!0,"[object CanvasGradient]":!0,"[object CanvasPattern]":!0,"[object Image]":!0,"[object Canvas]":!0},l={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0},u=Object.prototype.toString,h=Array.prototype,c=h.forEach,p=h.filter,d=h.slice,f=h.map,g=function(){}.constructor,y=g?g.prototype:null,v={};function m(t,e){v[t]=e}var _=2311;function x(){return _++}function b(){for(var t=[],e=0;e>1)%2;a.style.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",i[s]+":0",r[l]+":0",i[1-s]+":auto",r[1-l]+":auto",""].join("!important;"),t.appendChild(a),n.push(a)}return n}(e,o),o,r);if(s)return s(t,n,i),!0}return!1}function Ht(t){return"CANVAS"===t.nodeName.toUpperCase()}var Gt="undefined"!=typeof window&&!!window.addEventListener,Wt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ut=[];function Yt(t,e,n,i){return n=n||{},i||!a.canvasSupported?Xt(t,e,n):a.browser.firefox&&null!=e.layerX&&e.layerX!==e.offsetX?(n.zrX=e.layerX,n.zrY=e.layerY):null!=e.offsetX?(n.zrX=e.offsetX,n.zrY=e.offsetY):Xt(t,e,n),n}function Xt(t,e,n){if(a.domSupported&&t.getBoundingClientRect){var i=e.clientX,r=e.clientY;if(Ht(t)){var o=t.getBoundingClientRect();return n.zrX=i-o.left,void(n.zrY=r-o.top)}if(Ft(Ut,t,i,r))return n.zrX=Ut[0],void(n.zrY=Ut[1])}n.zrX=n.zrY=0}function Zt(t){return t||window.event}function jt(t,e,n){if(null!=(e=Zt(e)).zrX)return e;var i=e.type;if(i&&i.indexOf("touch")>=0){var r="touchend"!==i?e.targetTouches[0]:e.changedTouches[0];r&&Yt(t,r,e,n)}else{Yt(t,e,e,n);var o=function(t){var e=t.wheelDelta;if(e)return e;var n=t.deltaX,i=t.deltaY;if(null==n||null==i)return e;return 3*(0!==i?Math.abs(i):Math.abs(n))*(i>0?-1:i<0?1:n>0?-1:1)}(e);e.zrDelta=o?o/120:-(e.detail||0)/3}var a=e.button;return null==e.which&&void 0!==a&&Wt.test(e.type)&&(e.which=1&a?1:2&a?3:4&a?2:0),e}function qt(t,e,n,i){Gt?t.addEventListener(e,n,i):t.attachEvent("on"+e,n)}var Kt=Gt?function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0}:function(t){t.returnValue=!1,t.cancelBubble=!0};function $t(t){return 2===t.which||3===t.which}var Jt=function(){function t(){this._track=[]}return t.prototype.recognize=function(t,e,n){return this._doTrack(t,e,n),this._recognize(t)},t.prototype.clear=function(){return this._track.length=0,this},t.prototype._doTrack=function(t,e,n){var i=t.touches;if(i){for(var r={points:[],touches:[],target:e,event:t},o=0,a=i.length;o1&&r&&r.length>1){var a=Qt(r)/Qt(o);!isFinite(a)&&(a=1),e.pinchScale=a;var s=[((i=r)[0][0]+i[1][0])/2,(i[0][1]+i[1][1])/2];return e.pinchX=s[0],e.pinchY=s[1],{type:"pinch",target:t[0].target,event:e}}}}},ee="silent";function ne(){Kt(this.event)}var ie=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.handler=null,e}return n(e,t),e.prototype.dispose=function(){},e.prototype.setCursor=function(){},e}(Nt),re=function(t,e){this.x=t,this.y=e},oe=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],ae=function(t){function e(e,n,i,r){var o=t.call(this)||this;return o._hovered=new re(0,0),o.storage=e,o.painter=n,o.painterRoot=r,i=i||new ie,o.proxy=null,o.setHandlerProxy(i),o._draggingMgr=new Rt(o),o}return n(e,t),e.prototype.setHandlerProxy=function(t){this.proxy&&this.proxy.dispose(),t&&(P(oe,(function(e){t.on&&t.on(e,this[e],this)}),this),t.handler=this),this.proxy=t},e.prototype.mousemove=function(t){var e=t.zrX,n=t.zrY,i=le(this,e,n),r=this._hovered,o=r.target;o&&!o.__zr&&(o=(r=this.findHover(r.x,r.y)).target);var a=this._hovered=i?new re(e,n):this.findHover(e,n),s=a.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),o&&s!==o&&this.dispatchToElement(r,"mouseout",t),this.dispatchToElement(a,"mousemove",t),s&&s!==o&&this.dispatchToElement(a,"mouseover",t)},e.prototype.mouseout=function(t){var e=t.zrEventControl;"only_globalout"!==e&&this.dispatchToElement(this._hovered,"mouseout",t),"no_globalout"!==e&&this.trigger("globalout",{type:"globalout",event:t})},e.prototype.resize=function(){this._hovered=new re(0,0)},e.prototype.dispatch=function(t,e){var n=this[t];n&&n.call(this,e)},e.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},e.prototype.setCursorStyle=function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},e.prototype.dispatchToElement=function(t,e,n){var i=(t=t||{}).target;if(!i||!i.silent){for(var r="on"+e,o=function(t,e,n){return{type:t,event:n,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:ne}}(e,t,n);i&&(i[r]&&(o.cancelBubble=!!i[r].call(i,o)),i.trigger(e,o),i=i.__hostTarget?i.__hostTarget:i.parent,!o.cancelBubble););o.cancelBubble||(this.trigger(e,o),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer((function(t){"function"==typeof t[r]&&t[r].call(t,o),t.trigger&&t.trigger(e,o)})))}},e.prototype.findHover=function(t,e,n){for(var i=this.storage.getDisplayList(),r=new re(t,e),o=i.length-1;o>=0;o--){var a=void 0;if(i[o]!==n&&!i[o].ignore&&(a=se(i[o],t,e))&&(!r.topTarget&&(r.topTarget=i[o]),a!==ee)){r.target=i[o];break}}return r},e.prototype.processGesture=function(t,e){this._gestureMgr||(this._gestureMgr=new Jt);var n=this._gestureMgr;"start"===e&&n.clear();var i=n.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if("end"===e&&n.clear(),i){var r=i.type;t.gestureEvent=r;var o=new re;o.target=i.target,this.dispatchToElement(o,r,i.event)}},e}(Nt);function se(t,e,n){if(t[t.rectHover?"rectContain":"contain"](e,n)){for(var i=t,r=void 0,o=!1;i;){if(i.ignoreClip&&(o=!0),!o){var a=i.getClipPath();if(a&&!a.contain(e,n))return!1;i.silent&&(r=!0)}var s=i.__hostTarget;i=s||i.parent}return!r||ee}return!1}function le(t,e,n){var i=t.painter;return e<0||e>i.getWidth()||n<0||n>i.getHeight()}function ue(){return[1,0,0,1,0,0]}function he(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function ce(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function pe(t,e,n){var i=e[0]*n[0]+e[2]*n[1],r=e[1]*n[0]+e[3]*n[1],o=e[0]*n[2]+e[2]*n[3],a=e[1]*n[2]+e[3]*n[3],s=e[0]*n[4]+e[2]*n[5]+e[4],l=e[1]*n[4]+e[3]*n[5]+e[5];return t[0]=i,t[1]=r,t[2]=o,t[3]=a,t[4]=s,t[5]=l,t}function de(t,e,n){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+n[0],t[5]=e[5]+n[1],t}function fe(t,e,n){var i=e[0],r=e[2],o=e[4],a=e[1],s=e[3],l=e[5],u=Math.sin(n),h=Math.cos(n);return t[0]=i*h+a*u,t[1]=-i*u+a*h,t[2]=r*h+s*u,t[3]=-r*u+h*s,t[4]=h*o+u*l,t[5]=h*l-u*o,t}function ge(t,e,n){var i=n[0],r=n[1];return t[0]=e[0]*i,t[1]=e[1]*r,t[2]=e[2]*i,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*r,t}function ye(t,e){var n=e[0],i=e[2],r=e[4],o=e[1],a=e[3],s=e[5],l=n*a-o*i;return l?(l=1/l,t[0]=a*l,t[1]=-o*l,t[2]=-i*l,t[3]=n*l,t[4]=(i*s-a*r)*l,t[5]=(o*r-n*s)*l,t):null}P(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],(function(t){ae.prototype[t]=function(e){var n,i,r=e.zrX,o=e.zrY,a=le(this,r,o);if("mouseup"===t&&a||(i=(n=this.findHover(r,o)).target),"mousedown"===t)this._downEl=i,this._downPoint=[e.zrX,e.zrY],this._upEl=i;else if("mouseup"===t)this._upEl=i;else if("click"===t){if(this._downEl!==this._upEl||!this._downPoint||Tt(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(n,t,e)}}));var ve=Object.freeze({__proto__:null,create:ue,identity:he,copy:ce,mul:pe,translate:de,rotate:fe,scale:ge,invert:ye,clone:function(t){var e=[1,0,0,1,0,0];return ce(e,t),e}}),me=he,_e=5e-5;function xe(t){return t>_e||t<-5e-5}var be=[],we=[],Se=[1,0,0,1,0,0],Me=Math.abs,Te=function(){function t(){}return t.prototype.setPosition=function(t){this.x=t[0],this.y=t[1]},t.prototype.setScale=function(t){this.scaleX=t[0],this.scaleY=t[1]},t.prototype.setOrigin=function(t){this.originX=t[0],this.originY=t[1]},t.prototype.needLocalTransform=function(){return xe(this.rotation)||xe(this.x)||xe(this.y)||xe(this.scaleX-1)||xe(this.scaleY-1)},t.prototype.updateTransform=function(){var t=this.parent,e=t&&t.transform,n=this.needLocalTransform(),i=this.transform;n||e?(i=i||[1,0,0,1,0,0],n?this.getLocalTransform(i):me(i),e&&(n?pe(i,t.transform,i):ce(i,t.transform)),this.transform=i,this._resolveGlobalScaleRatio(i)):i&&me(i)},t.prototype._resolveGlobalScaleRatio=function(t){var e=this.globalScaleRatio;if(null!=e&&1!==e){this.getGlobalScale(be);var n=be[0]<0?-1:1,i=be[1]<0?-1:1,r=((be[0]-n)*e+n)/be[0]||0,o=((be[1]-i)*e+i)/be[1]||0;t[0]*=r,t[1]*=r,t[2]*=o,t[3]*=o}this.invTransform=this.invTransform||[1,0,0,1,0,0],ye(this.invTransform,t)},t.prototype.getLocalTransform=function(e){return t.getLocalTransform(this,e)},t.prototype.getComputedTransform=function(){for(var t=this,e=[];t;)e.push(t),t=t.parent;for(;t=e.pop();)t.updateTransform();return this.transform},t.prototype.setLocalTransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],n=t[2]*t[2]+t[3]*t[3];xe(e-1)&&(e=Math.sqrt(e)),xe(n-1)&&(n=Math.sqrt(n)),t[0]<0&&(e=-e),t[3]<0&&(n=-n),this.rotation=Math.atan2(-t[1]/n,t[0]/e),e<0&&n<0&&(this.rotation+=Math.PI,e=-e,n=-n),this.x=t[4],this.y=t[5],this.scaleX=e,this.scaleY=n}},t.prototype.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(pe(we,t.invTransform,e),e=we);var n=this.originX,i=this.originY;(n||i)&&(Se[4]=n,Se[5]=i,pe(we,e,Se),we[4]-=n,we[5]-=i,e=we),this.setLocalTransform(e)}},t.prototype.getGlobalScale=function(t){var e=this.transform;return t=t||[],e?(t[0]=Math.sqrt(e[0]*e[0]+e[1]*e[1]),t[1]=Math.sqrt(e[2]*e[2]+e[3]*e[3]),e[0]<0&&(t[0]=-t[0]),e[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},t.prototype.transformCoordToLocal=function(t,e){var n=[t,e],i=this.invTransform;return i&&Dt(n,n,i),n},t.prototype.transformCoordToGlobal=function(t,e){var n=[t,e],i=this.transform;return i&&Dt(n,n,i),n},t.prototype.getLineScale=function(){var t=this.transform;return t&&Me(t[0]-1)>1e-10&&Me(t[3]-1)>1e-10?Math.sqrt(Me(t[0]*t[3]-t[2]*t[1])):1},t.getLocalTransform=function(t,e){me(e=e||[]);var n=t.originX||0,i=t.originY||0,r=t.scaleX,o=t.scaleY,a=t.rotation||0,s=t.x,l=t.y;return e[4]-=n,e[5]-=i,e[0]*=r,e[1]*=o,e[2]*=r,e[3]*=o,e[4]*=r,e[5]*=o,a&&fe(e,e,a),e[4]+=n,e[5]+=i,e[4]+=s,e[5]+=l,e},t.initDefaultProps=function(){var e=t.prototype;e.x=0,e.y=0,e.scaleX=1,e.scaleY=1,e.originX=0,e.originY=0,e.rotation=0,e.globalScaleRatio=1}(),t}(),Ce={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return.5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return 0===t?0:Math.pow(1024,t-1)},exponentialOut:function(t){return 1===t?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(2-Math.pow(2,-10*(t-1)))},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,n=.1;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=.4*Math.asin(1/n)/(2*Math.PI),-n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4))},elasticOut:function(t){var e,n=.1;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=.4*Math.asin(1/n)/(2*Math.PI),n*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/.4)+1)},elasticInOut:function(t){var e,n=.1,i=.4;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=i*Math.asin(1/n)/(2*Math.PI),(t*=2)<1?n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)*-.5:n*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)*.5+1)},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?t*t*((e+1)*t-e)*.5:.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-Ce.bounceOut(1-t)},bounceOut:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return t<.5?.5*Ce.bounceIn(2*t):.5*Ce.bounceOut(2*t-1)+.5}},Ie=function(){function t(t){this._initialized=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=t.life||1e3,this._delay=t.delay||0,this.loop=null!=t.loop&&t.loop,this.gap=t.gap||0,this.easing=t.easing||"linear",this.onframe=t.onframe,this.ondestroy=t.ondestroy,this.onrestart=t.onrestart}return t.prototype.step=function(t,e){if(this._initialized||(this._startTime=t+this._delay,this._initialized=!0),!this._paused){var n=(t-this._startTime-this._pausedTime)/this._life;n<0&&(n=0),n=Math.min(n,1);var i=this.easing,r="string"==typeof i?Ce[i]:i,o="function"==typeof r?r(n):n;if(this.onframe&&this.onframe(o),1===n){if(!this.loop)return!0;this._restart(t),this.onrestart&&this.onrestart()}return!1}this._pausedTime+=e},t.prototype._restart=function(t){var e=(t-this._startTime-this._pausedTime)%this._life;this._startTime=t-e+this.gap,this._pausedTime=0},t.prototype.pause=function(){this._paused=!0},t.prototype.resume=function(){this._paused=!1},t}(),Ae=function(t){this.value=t},De=function(){function t(){this._len=0}return t.prototype.insert=function(t){var e=new Ae(t);return this.insertEntry(e),e},t.prototype.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},t.prototype.remove=function(t){var e=t.prev,n=t.next;e?e.next=n:this.head=n,n?n.prev=e:this.tail=e,t.next=t.prev=null,this._len--},t.prototype.len=function(){return this._len},t.prototype.clear=function(){this.head=this.tail=null,this._len=0},t}(),ke=function(){function t(t){this._list=new De,this._maxSize=10,this._map={},this._maxSize=t}return t.prototype.put=function(t,e){var n=this._list,i=this._map,r=null;if(null==i[t]){var o=n.len(),a=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var s=n.head;n.remove(s),delete i[s.key],r=s.value,this._lastRemovedEntry=s}a?a.value=e:a=new Ae(e),a.key=t,n.insertEntry(a),i[t]=a}return r},t.prototype.get=function(t){var e=this._map[t],n=this._list;if(null!=e)return e!==n.tail&&(n.remove(e),n.insertEntry(e)),e.value},t.prototype.clear=function(){this._list.clear(),this._map={}},t.prototype.len=function(){return this._list.len()},t}(),Le={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function Pe(t){return(t=Math.round(t))<0?0:t>255?255:t}function Oe(t){return t<0?0:t>1?1:t}function Re(t){var e=t;return e.length&&"%"===e.charAt(e.length-1)?Pe(parseFloat(e)/100*255):Pe(parseInt(e,10))}function Ne(t){var e=t;return e.length&&"%"===e.charAt(e.length-1)?Oe(parseFloat(e)/100):Oe(parseFloat(e))}function Ee(t,e,n){return n<0?n+=1:n>1&&(n-=1),6*n<1?t+(e-t)*n*6:2*n<1?e:3*n<2?t+(e-t)*(2/3-n)*6:t}function Be(t,e,n){return t+(e-t)*n}function ze(t,e,n,i,r){return t[0]=e,t[1]=n,t[2]=i,t[3]=r,t}function Ve(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var Fe=new ke(20),He=null;function Ge(t,e){He&&Ve(He,e),He=Fe.put(t,He||e.slice())}function We(t,e){if(t){e=e||[];var n=Fe.get(t);if(n)return Ve(e,n);var i=(t+="").replace(/ /g,"").toLowerCase();if(i in Le)return Ve(e,Le[i]),Ge(t,e),e;var r,o=i.length;if("#"===i.charAt(0))return 4===o||5===o?(r=parseInt(i.slice(1,4),16))>=0&&r<=4095?(ze(e,(3840&r)>>4|(3840&r)>>8,240&r|(240&r)>>4,15&r|(15&r)<<4,5===o?parseInt(i.slice(4),16)/15:1),Ge(t,e),e):void ze(e,0,0,0,1):7===o||9===o?(r=parseInt(i.slice(1,7),16))>=0&&r<=16777215?(ze(e,(16711680&r)>>16,(65280&r)>>8,255&r,9===o?parseInt(i.slice(7),16)/255:1),Ge(t,e),e):void ze(e,0,0,0,1):void 0;var a=i.indexOf("("),s=i.indexOf(")");if(-1!==a&&s+1===o){var l=i.substr(0,a),u=i.substr(a+1,s-(a+1)).split(","),h=1;switch(l){case"rgba":if(4!==u.length)return 3===u.length?ze(e,+u[0],+u[1],+u[2],1):ze(e,0,0,0,1);h=Ne(u.pop());case"rgb":return 3!==u.length?void ze(e,0,0,0,1):(ze(e,Re(u[0]),Re(u[1]),Re(u[2]),h),Ge(t,e),e);case"hsla":return 4!==u.length?void ze(e,0,0,0,1):(u[3]=Ne(u[3]),Ue(u,e),Ge(t,e),e);case"hsl":return 3!==u.length?void ze(e,0,0,0,1):(Ue(u,e),Ge(t,e),e);default:return}}ze(e,0,0,0,1)}}function Ue(t,e){var n=(parseFloat(t[0])%360+360)%360/360,i=Ne(t[1]),r=Ne(t[2]),o=r<=.5?r*(i+1):r+i-r*i,a=2*r-o;return ze(e=e||[],Pe(255*Ee(a,o,n+1/3)),Pe(255*Ee(a,o,n)),Pe(255*Ee(a,o,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}function Ye(t,e){var n=We(t);if(n){for(var i=0;i<3;i++)n[i]=e<0?n[i]*(1-e)|0:(255-n[i])*e+n[i]|0,n[i]>255?n[i]=255:n[i]<0&&(n[i]=0);return Je(n,4===n.length?"rgba":"rgb")}}function Xe(t){var e=We(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)}function Ze(t,e,n){if(e&&e.length&&t>=0&&t<=1){n=n||[];var i=t*(e.length-1),r=Math.floor(i),o=Math.ceil(i),a=e[r],s=e[o],l=i-r;return n[0]=Pe(Be(a[0],s[0],l)),n[1]=Pe(Be(a[1],s[1],l)),n[2]=Pe(Be(a[2],s[2],l)),n[3]=Oe(Be(a[3],s[3],l)),n}}var je=Ze;function qe(t,e,n){if(e&&e.length&&t>=0&&t<=1){var i=t*(e.length-1),r=Math.floor(i),o=Math.ceil(i),a=We(e[r]),s=We(e[o]),l=i-r,u=Je([Pe(Be(a[0],s[0],l)),Pe(Be(a[1],s[1],l)),Pe(Be(a[2],s[2],l)),Oe(Be(a[3],s[3],l))],"rgba");return n?{color:u,leftIndex:r,rightIndex:o,value:i}:u}}var Ke=qe;function $e(t,e){var n=We(t);if(n&&null!=e)return n[3]=Oe(e),Je(n,"rgba")}function Je(t,e){if(t&&t.length){var n=t[0]+","+t[1]+","+t[2];return"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(n+=","+t[3]),e+"("+n+")"}}function Qe(t,e){var n=We(t);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*e:0}var tn=Object.freeze({__proto__:null,parse:We,lift:Ye,toHex:Xe,fastLerp:Ze,fastMapToColor:je,lerp:qe,mapToColor:Ke,modifyHSL:function(t,e,n,i){var r,o=We(t);if(t)return o=function(t){if(t){var e,n,i=t[0]/255,r=t[1]/255,o=t[2]/255,a=Math.min(i,r,o),s=Math.max(i,r,o),l=s-a,u=(s+a)/2;if(0===l)e=0,n=0;else{n=u<.5?l/(s+a):l/(2-s-a);var h=((s-i)/6+l/2)/l,c=((s-r)/6+l/2)/l,p=((s-o)/6+l/2)/l;i===s?e=p-c:r===s?e=1/3+h-p:o===s&&(e=2/3+c-h),e<0&&(e+=1),e>1&&(e-=1)}var d=[360*e,n,u];return null!=t[3]&&d.push(t[3]),d}}(o),null!=e&&(o[0]=(r=e,(r=Math.round(r))<0?0:r>360?360:r)),null!=n&&(o[1]=Ne(n)),null!=i&&(o[2]=Ne(i)),Je(Ue(o),"rgba")},modifyAlpha:$e,stringify:Je,lum:Qe,random:function(){return"rgb("+Math.round(255*Math.random())+","+Math.round(255*Math.random())+","+Math.round(255*Math.random())+")"}}),en=Array.prototype.slice;function nn(t,e,n){return(e-t)*n+t}function rn(t,e,n,i){for(var r=e.length,o=0;oa)i.length=a;else for(var s=o;s=2&&this.interpolable},t.prototype.getAdditiveTrack=function(){return this._additiveTrack},t.prototype.addKeyframe=function(t,e){t>=this.maxTime?this.maxTime=t:this._needsSort=!0;var n=this.keyframes,i=n.length;if(this.interpolable)if(L(e)){var r=function(t){return L(t&&t[0])?2:1}(e);if(i>0&&this.arrDim!==r)return void(this.interpolable=!1);if(1===r&&"number"!=typeof e[0]||2===r&&"number"!=typeof e[0][0])return void(this.interpolable=!1);if(i>0){var o=n[i-1];this._isAllValueEqual&&(1===r&&ln(e,o.value)||(this._isAllValueEqual=!1))}this.arrDim=r}else{if(this.arrDim>0)return void(this.interpolable=!1);if("string"==typeof e){var a=We(e);a?(e=a,this.isValueColor=!0):this.interpolable=!1}else if("number"!=typeof e)return void(this.interpolable=!1);if(this._isAllValueEqual&&i>0){o=n[i-1];(this.isValueColor&&!ln(o.value,e)||o.value!==e)&&(this._isAllValueEqual=!1)}}var s={time:t,value:e,percent:0};return this.keyframes.push(s),s},t.prototype.prepare=function(t){var e=this.keyframes;this._needsSort&&e.sort((function(t,e){return t.time-e.time}));for(var n=this.arrDim,i=e.length,r=e[i-1],o=0;o0&&o!==i-1&&sn(e[o].value,r.value,n);if(t&&this.needsAnimate()&&t.needsAnimate()&&n===t.arrDim&&this.isValueColor===t.isValueColor&&!t._finished){this._additiveTrack=t;var a=e[0].value;for(o=0;o=0&&!(o[n].percent<=e);n--);n=Math.min(n,a-2)}else{for(n=this._lastFrame;ne);n++);n=Math.min(n-1,a-2)}var h=o[n+1],c=o[n];if(c&&h){this._lastFrame=n,this._lastFramePercent=e;var p=h.percent-c.percent;if(0!==p){var d=(e-c.percent)/p,f=i?this._additiveValue:u?gn:t[s];if((l>0||u)&&!f&&(f=this._additiveValue=[]),this.useSpline){var g=o[n][r],y=o[0===n?n:n-1][r],v=o[n>a-2?a-1:n+1][r],m=o[n>a-3?a-1:n+2][r];if(l>0)1===l?hn(f,y,g,v,m,d,d*d,d*d*d):function(t,e,n,i,r,o,a,s){for(var l=e.length,u=e[0].length,h=0;h0)1===l?rn(f,c[r],h[r],d):function(t,e,n,i){for(var r=e.length,o=r&&e[0].length,a=0;a.5?e:t}(c[r],h[r],d),i?this._additiveValue=_:t[s]=_}i&&this._addToTarget(t)}}}},t.prototype._addToTarget=function(t){var e=this.arrDim,n=this.propName,i=this._additiveValue;0===e?this.isValueColor?(We(t[n],gn),on(gn,gn,i,1),t[n]=pn(gn)):t[n]=t[n]+i:1===e?on(t[n],t[n],i,1):2===e&&an(t[n],t[n],i,1)},t}(),vn=function(){function t(t,e,n){this._tracks={},this._trackKeys=[],this._delay=0,this._maxTime=0,this._paused=!1,this._started=0,this._clip=null,this._target=t,this._loop=e,e&&n?b("Can' use additive animation on looped animation."):this._additiveAnimators=n}return t.prototype.getTarget=function(){return this._target},t.prototype.changeTarget=function(t){this._target=t},t.prototype.when=function(t,e){return this.whenWithKeys(t,e,E(e))},t.prototype.whenWithKeys=function(t,e,n){for(var i=this._tracks,r=0;r0)){this._started=1;for(var n=this,i=[],r=0;r1){var a=o.pop();r.addKeyframe(a.time,t[i]),r.prepare(r.getAdditiveTrack())}}}},t}(),mn=function(){function t(t,e){this.x=t||0,this.y=e||0}return t.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.set=function(t,e){return this.x=t,this.y=e,this},t.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},t.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},t.prototype.scale=function(t){this.x*=t,this.y*=t},t.prototype.scaleAndAdd=function(t,e){this.x+=t.x*e,this.y+=t.y*e},t.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},t.prototype.dot=function(t){return this.x*t.x+this.y*t.y},t.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},t.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},t.prototype.normalize=function(){var t=this.len();return this.x/=t,this.y/=t,this},t.prototype.distance=function(t){var e=this.x-t.x,n=this.y-t.y;return Math.sqrt(e*e+n*n)},t.prototype.distanceSquare=function(t){var e=this.x-t.x,n=this.y-t.y;return e*e+n*n},t.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},t.prototype.transform=function(t){if(t){var e=this.x,n=this.y;return this.x=t[0]*e+t[2]*n+t[4],this.y=t[1]*e+t[3]*n+t[5],this}},t.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},t.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},t.set=function(t,e,n){t.x=e,t.y=n},t.copy=function(t,e){t.x=e.x,t.y=e.y},t.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},t.lenSquare=function(t){return t.x*t.x+t.y*t.y},t.dot=function(t,e){return t.x*e.x+t.y*e.y},t.add=function(t,e,n){t.x=e.x+n.x,t.y=e.y+n.y},t.sub=function(t,e,n){t.x=e.x-n.x,t.y=e.y-n.y},t.scale=function(t,e,n){t.x=e.x*n,t.y=e.y*n},t.scaleAndAdd=function(t,e,n,i){t.x=e.x+n.x*i,t.y=e.y+n.y*i},t.lerp=function(t,e,n,i){var r=1-i;t.x=r*e.x+i*n.x,t.y=r*e.y+i*n.y},t}(),_n=Math.min,xn=Math.max,bn=new mn,wn=new mn,Sn=new mn,Mn=new mn,Tn=new mn,Cn=new mn,In=function(){function t(t,e,n,i){n<0&&isFinite(n)&&(t+=n,n=-n),i<0&&isFinite(i)&&(e+=i,i=-i),this.x=t,this.y=e,this.width=n,this.height=i}return t.prototype.union=function(t){var e=_n(t.x,this.x),n=_n(t.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=xn(t.x+t.width,this.x+this.width)-e:this.width=t.width,isFinite(this.y)&&isFinite(this.height)?this.height=xn(t.y+t.height,this.y+this.height)-n:this.height=t.height,this.x=e,this.y=n},t.prototype.applyTransform=function(e){t.applyTransform(this,this,e)},t.prototype.calculateTransform=function(t){var e=this,n=t.width/e.width,i=t.height/e.height,r=[1,0,0,1,0,0];return de(r,r,[-e.x,-e.y]),ge(r,r,[n,i]),de(r,r,[t.x,t.y]),r},t.prototype.intersect=function(e,n){if(!e)return!1;e instanceof t||(e=t.create(e));var i=this,r=i.x,o=i.x+i.width,a=i.y,s=i.y+i.height,l=e.x,u=e.x+e.width,h=e.y,c=e.y+e.height,p=!(of&&(f=_,gf&&(f=x,v=n.x&&t<=n.x+n.width&&e>=n.y&&e<=n.y+n.height},t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.copy=function(e){t.copy(this,e)},t.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},t.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},t.prototype.isZero=function(){return 0===this.width||0===this.height},t.create=function(e){return new t(e.x,e.y,e.width,e.height)},t.copy=function(t,e){t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height},t.applyTransform=function(e,n,i){if(i){if(i[1]<1e-5&&i[1]>-1e-5&&i[2]<1e-5&&i[2]>-1e-5){var r=i[0],o=i[3],a=i[4],s=i[5];return e.x=n.x*r+a,e.y=n.y*o+s,e.width=n.width*r,e.height=n.height*o,e.width<0&&(e.x+=e.width,e.width=-e.width),void(e.height<0&&(e.y+=e.height,e.height=-e.height))}bn.x=Sn.x=n.x,bn.y=Mn.y=n.y,wn.x=Mn.x=n.x+n.width,wn.y=Sn.y=n.y+n.height,bn.transform(i),Mn.transform(i),wn.transform(i),Sn.transform(i),e.x=_n(bn.x,wn.x,Sn.x,Mn.x),e.y=_n(bn.y,wn.y,Sn.y,Mn.y);var l=xn(bn.x,wn.x,Sn.x,Mn.x),u=xn(bn.y,wn.y,Sn.y,Mn.y);e.width=l-e.x,e.height=u-e.y}else e!==n&&t.copy(e,n)},t}(),An={},Dn="12px sans-serif";var kn={measureText:function(t,e){return dn||(dn=I().getContext("2d")),fn!==e&&(fn=dn.font=e||Dn),dn.measureText(t)}};function Ln(t,e){var n=An[e=e||Dn];n||(n=An[e]=new ke(500));var i=n.get(t);return null==i&&(i=kn.measureText(t,e).width,n.put(t,i)),i}function Pn(t,e,n,i){var r=Ln(t,e),o=En(e),a=Rn(0,r,n),s=Nn(0,o,i);return new In(a,s,r,o)}function On(t,e,n,i){var r=((t||"")+"").split("\n");if(1===r.length)return Pn(r[0],e,n,i);for(var o=new In(0,0,0,0),a=0;a=0?parseFloat(t)/100*e:parseFloat(t):t}function zn(t,e,n){var i=e.position||"inside",r=null!=e.distance?e.distance:5,o=n.height,a=n.width,s=o/2,l=n.x,u=n.y,h="left",c="top";if(i instanceof Array)l+=Bn(i[0],n.width),u+=Bn(i[1],n.height),h=null,c=null;else switch(i){case"left":l-=r,u+=s,h="right",c="middle";break;case"right":l+=r+a,u+=s,c="middle";break;case"top":l+=a/2,u-=r,h="center",c="bottom";break;case"bottom":l+=a/2,u+=o+r,h="center";break;case"inside":l+=a/2,u+=s,h="center",c="middle";break;case"insideLeft":l+=r,u+=s,c="middle";break;case"insideRight":l+=a-r,u+=s,h="right",c="middle";break;case"insideTop":l+=a/2,u+=r,h="center";break;case"insideBottom":l+=a/2,u+=o-r,h="center",c="bottom";break;case"insideTopLeft":l+=r,u+=r;break;case"insideTopRight":l+=a-r,u+=r,h="right";break;case"insideBottomLeft":l+=r,u+=o-r,c="bottom";break;case"insideBottomRight":l+=a-r,u+=o-r,h="right",c="bottom"}return(t=t||{}).x=l,t.y=u,t.align=h,t.verticalAlign=c,t}var Vn=1;"undefined"!=typeof window&&(Vn=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var Fn=Vn,Hn="#333",Gn="#ccc",Wn="__zr_normal__",Un=["x","y","scaleX","scaleY","originX","originY","rotation","ignore"],Yn={x:!0,y:!0,scaleX:!0,scaleY:!0,originX:!0,originY:!0,rotation:!0,ignore:!1},Xn={},Zn=new In(0,0,0,0),jn=function(){function t(t){this.id=x(),this.animators=[],this.currentStates=[],this.states={},this._init(t)}return t.prototype._init=function(t){this.attr(t)},t.prototype.drift=function(t,e,n){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=t,i[5]+=e,this.decomposeTransform(),this.markRedraw()},t.prototype.beforeUpdate=function(){},t.prototype.afterUpdate=function(){},t.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},t.prototype.updateInnerText=function(t){var e=this._textContent;if(e&&(!e.ignore||t)){this.textConfig||(this.textConfig={});var n=this.textConfig,i=n.local,r=e.attachedTransform,o=void 0,a=void 0,s=!1;r.parent=i?this:null;var l=!1;if(r.x=e.x,r.y=e.y,r.originX=e.originX,r.originY=e.originY,r.rotation=e.rotation,r.scaleX=e.scaleX,r.scaleY=e.scaleY,null!=n.position){var u=Zn;n.layoutRect?u.copy(n.layoutRect):u.copy(this.getBoundingRect()),i||u.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(Xn,n,u):zn(Xn,n,u),r.x=Xn.x,r.y=Xn.y,o=Xn.align,a=Xn.verticalAlign;var h=n.origin;if(h&&null!=n.rotation){var c=void 0,p=void 0;"center"===h?(c=.5*u.width,p=.5*u.height):(c=Bn(h[0],u.width),p=Bn(h[1],u.height)),l=!0,r.originX=-r.x+c+(i?0:u.x),r.originY=-r.y+p+(i?0:u.y)}}null!=n.rotation&&(r.rotation=n.rotation);var d=n.offset;d&&(r.x+=d[0],r.y+=d[1],l||(r.originX=-d[0],r.originY=-d[1]));var f=null==n.inside?"string"==typeof n.position&&n.position.indexOf("inside")>=0:n.inside,g=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),y=void 0,v=void 0,m=void 0;f&&this.canBeInsideText()?(y=n.insideFill,v=n.insideStroke,null!=y&&"auto"!==y||(y=this.getInsideTextFill()),null!=v&&"auto"!==v||(v=this.getInsideTextStroke(y),m=!0)):(y=n.outsideFill,v=n.outsideStroke,null!=y&&"auto"!==y||(y=this.getOutsideFill()),null!=v&&"auto"!==v||(v=this.getOutsideStroke(y),m=!0)),(y=y||"#000")===g.fill&&v===g.stroke&&m===g.autoStroke&&o===g.align&&a===g.verticalAlign||(s=!0,g.fill=y,g.stroke=v,g.autoStroke=m,g.align=o,g.verticalAlign=a,e.setDefaultTextStyle(g)),s&&e.dirtyStyle(),e.markRedraw()}},t.prototype.canBeInsideText=function(){return!0},t.prototype.getInsideTextFill=function(){return"#fff"},t.prototype.getInsideTextStroke=function(t){return"#000"},t.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?Gn:Hn},t.prototype.getOutsideStroke=function(t){var e=this.__zr&&this.__zr.getBackgroundColor(),n="string"==typeof e&&We(e);n||(n=[255,255,255,1]);for(var i=n[3],r=this.__zr.isDarkMode(),o=0;o<3;o++)n[o]=n[o]*i+(r?0:255)*(1-i);return n[3]=1,Je(n,"rgba")},t.prototype.traverse=function(t,e){},t.prototype.attrKV=function(t,e){"textConfig"===t?this.setTextConfig(e):"textContent"===t?this.setTextContent(e):"clipPath"===t?this.setClipPath(e):"extra"===t?(this.extra=this.extra||{},T(this.extra,e)):this[t]=e},t.prototype.hide=function(){this.ignore=!0,this.markRedraw()},t.prototype.show=function(){this.ignore=!1,this.markRedraw()},t.prototype.attr=function(t,e){if("string"==typeof t)this.attrKV(t,e);else if(U(t))for(var n=E(t),i=0;i0},t.prototype.getState=function(t){return this.states[t]},t.prototype.ensureState=function(t){var e=this.states;return e[t]||(e[t]={}),e[t]},t.prototype.clearStates=function(t){this.useState(Wn,!1,t)},t.prototype.useState=function(e,n,i){var r=e===Wn;if(this.hasState()||!r){var o=this.currentStates,a=this.stateTransition;if(!(A(o,e)>=0)||!n&&1!==o.length){var s;if(this.stateProxy&&!r&&(s=this.stateProxy(e)),s||(s=this.states&&this.states[e]),s||r){r||this.saveCurrentToNormalState(s);var l=!(!s||!s.hoverLayer);return l&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,s,this._normalState,n,!i&&!this.__inHover&&a&&a.duration>0,a),this._textContent&&this._textContent.useState(e,n),this._textGuide&&this._textGuide.useState(e,n),r?(this.currentStates=[],this._normalState={}):n?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!l&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~t.REDARAW_BIT),s}b("State "+e+" not exists.")}}},t.prototype.useStates=function(e,n){if(e.length){var i=[],r=this.currentStates,o=e.length,a=o===r.length;if(a)for(var s=0;s0,p),this._textContent&&this._textContent.useStates(e),this._textGuide&&this._textGuide.useStates(e),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!h&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~t.REDARAW_BIT)}else this.clearStates()},t.prototype._updateAnimationTargets=function(){for(var t=0;t=0){var n=this.currentStates.slice();n.splice(e,1),this.useStates(n)}},t.prototype.replaceState=function(t,e,n){var i=this.currentStates.slice(),r=A(i,t),o=A(i,e)>=0;r>=0?o?i.splice(r,1):i[r]=e:n&&!o&&i.push(e),this.useStates(i)},t.prototype.toggleState=function(t,e){e?this.useState(t,!0):this.removeState(t)},t.prototype._mergeStates=function(t){for(var e,n={},i=0;i=0&&e.splice(n,1)})),this.animators.push(t),n&&n.animation.addAnimator(t),n&&n.wakeUp()},t.prototype.updateDuringAnimation=function(t){this.markRedraw()},t.prototype.stopAnimation=function(t,e){for(var n=this.animators,i=n.length,r=[],o=0;o8)&&(r("position","_legacyPos","x","y"),r("scale","_legacyScale","scaleX","scaleY"),r("origin","_legacyOrigin","originX","originY"))}(),t}();function qn(t,e,n,i,r){var o=[];Jn(t,"",t,e,n=n||{},i,o,r);var a=o.length,s=!1,l=n.done,u=n.aborted,h=function(){s=!0,--a<=0&&(s?l&&l():u&&u())},c=function(){--a<=0&&(s?l&&l():u&&u())};a||l&&l(),o.length>0&&n.during&&o[0].during((function(t,e){n.during(e)}));for(var p=0;p0||r.force&&!a.length){for(var m=t.animators,_=[],x=0;x=0;)r++;return r-e}function ti(t,e,n,i,r){for(i===e&&i++;i>>1])<0?l=o:s=o+1;var u=i-s;switch(u){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;u>0;)t[s+u]=t[s+u-1],u--}t[s]=a}}function ei(t,e,n,i,r,o){var a=0,s=0,l=1;if(o(t,e[n+r])>0){for(s=i-r;l0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=r,l+=r}else{for(s=r+1;ls&&(l=s);var u=a;a=r-l,l=r-u}for(a++;a>>1);o(t,e[n+h])>0?a=h+1:l=h}return l}function ni(t,e,n,i,r,o){var a=0,s=0,l=1;if(o(t,e[n+r])<0){for(s=r+1;ls&&(l=s);var u=a;a=r-l,l=r-u}else{for(s=i-r;l=0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=r,l+=r}for(a++;a>>1);o(t,e[n+h])<0?l=h:a=h+1}return l}function ii(t,e){var n,i,r=7,o=0;t.length;var a=[];function s(s){var l=n[s],u=i[s],h=n[s+1],c=i[s+1];i[s]=u+c,s===o-3&&(n[s+1]=n[s+2],i[s+1]=i[s+2]),o--;var p=ni(t[h],t,l,u,0,e);l+=p,0!==(u-=p)&&0!==(c=ei(t[l+u-1],t,h,c,c-1,e))&&(u<=c?function(n,i,o,s){var l=0;for(l=0;l=7||d>=7);if(f)break;g<0&&(g=0),g+=2}if((r=g)<1&&(r=1),1===i){for(l=0;l=0;l--)t[d+l]=t[p+l];return void(t[c]=a[h])}var f=r;for(;;){var g=0,y=0,v=!1;do{if(e(a[h],t[u])<0){if(t[c--]=t[u--],g++,y=0,0==--i){v=!0;break}}else if(t[c--]=a[h--],y++,g=0,1==--s){v=!0;break}}while((g|y)=0;l--)t[d+l]=t[p+l];if(0===i){v=!0;break}}if(t[c--]=a[h--],1==--s){v=!0;break}if(0!==(y=s-ei(t[u],a,0,s,s-1,e))){for(s-=y,d=(c-=y)+1,p=(h-=y)+1,l=0;l=7||y>=7);if(v)break;f<0&&(f=0),f+=2}(r=f)<1&&(r=1);if(1===s){for(d=(c-=i)+1,p=(u-=i)+1,l=i-1;l>=0;l--)t[d+l]=t[p+l];t[c]=a[h]}else{if(0===s)throw new Error;for(p=c-(s-1),l=0;l1;){var t=o-2;if(t>=1&&i[t-1]<=i[t]+i[t+1]||t>=2&&i[t-2]<=i[t]+i[t-1])i[t-1]i[t+1])break;s(t)}},forceMergeRuns:function(){for(;o>1;){var t=o-2;t>0&&i[t-1]=32;)e|=1&t,t>>=1;return t+e}(r);do{if((o=Qn(t,n,i,e))s&&(l=s),ti(t,n,n+l,n+o,e),o=l}a.pushRun(n,o),a.mergeRuns(),r-=o,n+=o}while(0!==r);a.forceMergeRuns()}}}var oi=!1;function ai(){oi||(oi=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function si(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}var li,ui,hi=function(){function t(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=si}return t.prototype.traverse=function(t,e){for(var n=0;n0&&(u.__clipPaths=[]),isNaN(u.z)&&(ai(),u.z=0),isNaN(u.z2)&&(ai(),u.z2=0),isNaN(u.zlevel)&&(ai(),u.zlevel=0),this._displayList[this._displayListLen++]=u}var h=t.getDecalElement&&t.getDecalElement();h&&this._updateAndAddDisplayable(h,e,n);var c=t.getTextGuideLine();c&&this._updateAndAddDisplayable(c,e,n);var p=t.getTextContent();p&&this._updateAndAddDisplayable(p,e,n)}},t.prototype.addRoot=function(t){t.__zr&&t.__zr.storage===this||this._roots.push(t)},t.prototype.delRoot=function(t){if(t instanceof Array)for(var e=0,n=t.length;e=0&&this._roots.splice(i,1)}},t.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},t.prototype.getRoots=function(){return this._roots},t.prototype.dispose=function(){this._displayList=null,this._roots=null},t}(),ci="undefined"!=typeof window&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){return setTimeout(t,16)},pi=function(t){function e(e){var n=t.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,e=e||{},n.stage=e.stage||{},n.onframe=e.onframe||function(){},n}return n(e,t),e.prototype.addClip=function(t){t.animation&&this.removeClip(t),this._clipsHead?(this._clipsTail.next=t,t.prev=this._clipsTail,t.next=null,this._clipsTail=t):this._clipsHead=this._clipsTail=t,t.animation=this},e.prototype.addAnimator=function(t){t.animation=this;var e=t.getClip();e&&this.addClip(e)},e.prototype.removeClip=function(t){if(t.animation){var e=t.prev,n=t.next;e?e.next=n:this._clipsHead=n,n?n.prev=e:this._clipsTail=e,t.next=t.prev=t.animation=null}},e.prototype.removeAnimator=function(t){var e=t.getClip();e&&this.removeClip(e),t.animation=null},e.prototype.update=function(t){for(var e=(new Date).getTime()-this._pausedTime,n=e-this._time,i=this._clipsHead;i;){var r=i.next;i.step(e,n)?(i.ondestroy&&i.ondestroy(),this.removeClip(i),i=r):i=r}this._time=e,t||(this.onframe(n),this.trigger("frame",n),this.stage.update&&this.stage.update())},e.prototype._startLoop=function(){var t=this;this._running=!0,ci((function e(){t._running&&(ci(e),!t._paused&&t.update())}))},e.prototype.start=function(){this._running||(this._time=(new Date).getTime(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=(new Date).getTime(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=(new Date).getTime()-this._pauseStart,this._paused=!1)},e.prototype.clear=function(){for(var t=this._clipsHead;t;){var e=t.next;t.prev=t.next=t.animation=null,t=e}this._clipsHead=this._clipsTail=null},e.prototype.isFinished=function(){return null==this._clipsHead},e.prototype.animate=function(t,e){e=e||{},this.start();var n=new vn(t,e.loop);return this.addAnimator(n),n},e}(Nt),di=a.domSupported,fi=(ui={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},{mouse:li=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],touch:["touchstart","touchend","touchmove"],pointer:O(li,(function(t){var e=t.replace("mouse","pointer");return ui.hasOwnProperty(e)?e:t}))}),gi=["mousemove","mouseup"],yi=["pointermove","pointerup"],vi=!1;function mi(t){var e=t.pointerType;return"pen"===e||"touch"===e}function _i(t){t&&(t.zrByTouch=!0)}function xi(t,e){for(var n=e,i=!1;n&&9!==n.nodeType&&!(i=n.domBelongToZr||n!==e&&n===t.painterRoot);)n=n.parentNode;return i}var bi=function(t,e){this.stopPropagation=pt,this.stopImmediatePropagation=pt,this.preventDefault=pt,this.type=e.type,this.target=this.currentTarget=t.dom,this.pointerType=e.pointerType,this.clientX=e.clientX,this.clientY=e.clientY},wi={mousedown:function(t){t=jt(this.dom,t),this.__mayPointerCapture=[t.zrX,t.zrY],this.trigger("mousedown",t)},mousemove:function(t){t=jt(this.dom,t);var e=this.__mayPointerCapture;!e||t.zrX===e[0]&&t.zrY===e[1]||this.__togglePointerCapture(!0),this.trigger("mousemove",t)},mouseup:function(t){t=jt(this.dom,t),this.__togglePointerCapture(!1),this.trigger("mouseup",t)},mouseout:function(t){xi(this,(t=jt(this.dom,t)).toElement||t.relatedTarget)||(this.__pointerCapturing&&(t.zrEventControl="no_globalout"),this.trigger("mouseout",t))},wheel:function(t){vi=!0,t=jt(this.dom,t),this.trigger("mousewheel",t)},mousewheel:function(t){vi||(t=jt(this.dom,t),this.trigger("mousewheel",t))},touchstart:function(t){_i(t=jt(this.dom,t)),this.__lastTouchMoment=new Date,this.handler.processGesture(t,"start"),wi.mousemove.call(this,t),wi.mousedown.call(this,t)},touchmove:function(t){_i(t=jt(this.dom,t)),this.handler.processGesture(t,"change"),wi.mousemove.call(this,t)},touchend:function(t){_i(t=jt(this.dom,t)),this.handler.processGesture(t,"end"),wi.mouseup.call(this,t),+new Date-+this.__lastTouchMoment<300&&wi.click.call(this,t)},pointerdown:function(t){wi.mousedown.call(this,t)},pointermove:function(t){mi(t)||wi.mousemove.call(this,t)},pointerup:function(t){wi.mouseup.call(this,t)},pointerout:function(t){mi(t)||wi.mouseout.call(this,t)}};P(["click","dblclick","contextmenu"],(function(t){wi[t]=function(e){e=jt(this.dom,e),this.trigger(t,e)}}));var Si={pointermove:function(t){mi(t)||Si.mousemove.call(this,t)},pointerup:function(t){Si.mouseup.call(this,t)},mousemove:function(t){this.trigger("mousemove",t)},mouseup:function(t){var e=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",t),e&&(t.zrEventControl="only_globalout",this.trigger("mouseout",t))}};function Mi(t,e){var n=e.domHandlers;a.pointerEventsSupported?P(fi.pointer,(function(i){Ci(e,i,(function(e){n[i].call(t,e)}))})):(a.touchEventsSupported&&P(fi.touch,(function(i){Ci(e,i,(function(r){n[i].call(t,r),function(t){t.touching=!0,null!=t.touchTimer&&(clearTimeout(t.touchTimer),t.touchTimer=null),t.touchTimer=setTimeout((function(){t.touching=!1,t.touchTimer=null}),700)}(e)}))})),P(fi.mouse,(function(i){Ci(e,i,(function(r){r=Zt(r),e.touching||n[i].call(t,r)}))})))}function Ti(t,e){function n(n){Ci(e,n,(function(i){i=Zt(i),xi(t,i.target)||(i=function(t,e){return jt(t.dom,new bi(t,e),!0)}(t,i),e.domHandlers[n].call(t,i))}),{capture:!0})}a.pointerEventsSupported?P(yi,n):a.touchEventsSupported||P(gi,n)}function Ci(t,e,n,i){t.mounted[e]=n,t.listenerOpts[e]=i,qt(t.domTarget,e,n,i)}function Ii(t){var e,n,i,r,o=t.mounted;for(var a in o)o.hasOwnProperty(a)&&(e=t.domTarget,n=a,i=o[a],r=t.listenerOpts[a],Gt?e.removeEventListener(n,i,r):e.detachEvent("on"+n,i));t.mounted={}}var Ai=function(t,e){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=t,this.domHandlers=e},Di=function(t){function e(e,n){var i=t.call(this)||this;return i.__pointerCapturing=!1,i.dom=e,i.painterRoot=n,i._localHandlerScope=new Ai(e,wi),di&&(i._globalHandlerScope=new Ai(document,Si)),Mi(i,i._localHandlerScope),i}return n(e,t),e.prototype.dispose=function(){Ii(this._localHandlerScope),di&&Ii(this._globalHandlerScope)},e.prototype.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},e.prototype.__togglePointerCapture=function(t){if(this.__mayPointerCapture=null,di&&+this.__pointerCapturing^+t){this.__pointerCapturing=t;var e=this._globalHandlerScope;t?Ti(this,e):Ii(e)}},e}(Nt),ki=function(t){function e(e){var n=t.call(this)||this;return n.isGroup=!0,n._children=[],n.attr(e),n}return n(e,t),e.prototype.childrenRef=function(){return this._children},e.prototype.children=function(){return this._children.slice()},e.prototype.childAt=function(t){return this._children[t]},e.prototype.childOfName=function(t){for(var e=this._children,n=0;n=0&&(n.splice(i,0,t),this._doAdd(t))}return this},e.prototype.replaceAt=function(t,e){var n=this._children,i=n[e];if(t&&t!==this&&t.parent!==this&&t!==i){n[e]=t,i.parent=null;var r=this.__zr;r&&i.removeSelfFromZr(r),this._doAdd(t)}return this},e.prototype._doAdd=function(t){t.parent&&t.parent.remove(t),t.parent=this;var e=this.__zr;e&&e!==t.__zr&&t.addSelfToZr(e),e&&e.refresh()},e.prototype.remove=function(t){var e=this.__zr,n=this._children,i=A(n,t);return i<0||(n.splice(i,1),t.parent=null,e&&t.removeSelfFromZr(e),e&&e.refresh()),this},e.prototype.removeAll=function(){for(var t=this._children,e=this.__zr,n=0;n18);a&&(n.weChat=!0);e.svgSupported="undefined"!=typeof SVGRect,e.touchEventsSupported="ontouchstart"in window&&!n.ie&&!n.edge,e.pointerEventsSupported="onpointerdown"in window&&(n.edge||n.ie&&+n.version>=11),e.domSupported="undefined"!=typeof document;var s=document.documentElement.style;e.transform3dSupported=(n.ie&&"transition"in s||n.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),e.transformSupported=e.transform3dSupported||n.ie&&+n.version>=9}(navigator.userAgent,r);var o="sans-serif",a="12px "+o;var s,l,u=function(t){var e={};if("undefined"==typeof JSON)return e;for(var n=0;n=0)o=r*t.length;else for(var c=0;c>1)%2;a.style.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",i[s]+":0",r[l]+":0",i[1-s]+":auto",r[1-l]+":auto",""].join("!important;"),t.appendChild(a),n.push(a)}return n}(e,a),l=function(t,e,n){for(var i=n?"invTrans":"trans",r=e[i],o=e.srcCoords,a=[],s=[],l=!0,u=0;u<4;u++){var h=t[u].getBoundingClientRect(),c=2*u,p=h.left,d=h.top;a.push(p,d),l=l&&o&&p===o[c]&&d===o[c+1],s.push(t[u].offsetLeft,t[u].offsetTop)}return l&&r?r:(e.srcCoords=a,e[i]=n?Xt(s,a):Xt(a,s))}(s,a,o);if(l)return l(t,n,i),!0}return!1}function $t(t){return"CANVAS"===t.nodeName.toUpperCase()}var Qt=/([&<>"'])/g,Jt={"&":"&","<":"<",">":">",'"':""","'":"'"};function te(t){return null==t?"":(t+"").replace(Qt,(function(t,e){return Jt[e]}))}var ee=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,ne=[],ie=r.browser.firefox&&+r.browser.version.split(".")[0]<39;function re(t,e,n,i){return n=n||{},i?oe(t,e,n):ie&&null!=e.layerX&&e.layerX!==e.offsetX?(n.zrX=e.layerX,n.zrY=e.layerY):null!=e.offsetX?(n.zrX=e.offsetX,n.zrY=e.offsetY):oe(t,e,n),n}function oe(t,e,n){if(r.domSupported&&t.getBoundingClientRect){var i=e.clientX,o=e.clientY;if($t(t)){var a=t.getBoundingClientRect();return n.zrX=i-a.left,void(n.zrY=o-a.top)}if(Kt(ne,t,i,o))return n.zrX=ne[0],void(n.zrY=ne[1])}n.zrX=n.zrY=0}function ae(t){return t||window.event}function se(t,e,n){if(null!=(e=ae(e)).zrX)return e;var i=e.type;if(i&&i.indexOf("touch")>=0){var r="touchend"!==i?e.targetTouches[0]:e.changedTouches[0];r&&re(t,r,e,n)}else{re(t,e,e,n);var o=function(t){var e=t.wheelDelta;if(e)return e;var n=t.deltaX,i=t.deltaY;if(null==n||null==i)return e;return 3*(0!==i?Math.abs(i):Math.abs(n))*(i>0?-1:i<0?1:n>0?-1:1)}(e);e.zrDelta=o?o/120:-(e.detail||0)/3}var a=e.button;return null==e.which&&void 0!==a&&ee.test(e.type)&&(e.which=1&a?1:2&a?3:4&a?2:0),e}function le(t,e,n,i){t.addEventListener(e,n,i)}var ue=function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0};function he(t){return 2===t.which||3===t.which}var ce=function(){function t(){this._track=[]}return t.prototype.recognize=function(t,e,n){return this._doTrack(t,e,n),this._recognize(t)},t.prototype.clear=function(){return this._track.length=0,this},t.prototype._doTrack=function(t,e,n){var i=t.touches;if(i){for(var r={points:[],touches:[],target:e,event:t},o=0,a=i.length;o1&&r&&r.length>1){var a=pe(r)/pe(o);!isFinite(a)&&(a=1),e.pinchScale=a;var s=[((i=r)[0][0]+i[1][0])/2,(i[0][1]+i[1][1])/2];return e.pinchX=s[0],e.pinchY=s[1],{type:"pinch",target:t[0].target,event:e}}}}};function fe(){return[1,0,0,1,0,0]}function ge(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function ve(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function ye(t,e,n){var i=e[0]*n[0]+e[2]*n[1],r=e[1]*n[0]+e[3]*n[1],o=e[0]*n[2]+e[2]*n[3],a=e[1]*n[2]+e[3]*n[3],s=e[0]*n[4]+e[2]*n[5]+e[4],l=e[1]*n[4]+e[3]*n[5]+e[5];return t[0]=i,t[1]=r,t[2]=o,t[3]=a,t[4]=s,t[5]=l,t}function me(t,e,n){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+n[0],t[5]=e[5]+n[1],t}function _e(t,e,n){var i=e[0],r=e[2],o=e[4],a=e[1],s=e[3],l=e[5],u=Math.sin(n),h=Math.cos(n);return t[0]=i*h+a*u,t[1]=-i*u+a*h,t[2]=r*h+s*u,t[3]=-r*u+h*s,t[4]=h*o+u*l,t[5]=h*l-u*o,t}function xe(t,e,n){var i=n[0],r=n[1];return t[0]=e[0]*i,t[1]=e[1]*r,t[2]=e[2]*i,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*r,t}function we(t,e){var n=e[0],i=e[2],r=e[4],o=e[1],a=e[3],s=e[5],l=n*a-o*i;return l?(l=1/l,t[0]=a*l,t[1]=-o*l,t[2]=-i*l,t[3]=n*l,t[4]=(i*s-a*r)*l,t[5]=(o*r-n*s)*l,t):null}var be=Object.freeze({__proto__:null,create:fe,identity:ge,copy:ve,mul:ye,translate:me,rotate:_e,scale:xe,invert:we,clone:function(t){var e=[1,0,0,1,0,0];return ve(e,t),e}}),Se=function(){function t(t,e){this.x=t||0,this.y=e||0}return t.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.set=function(t,e){return this.x=t,this.y=e,this},t.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},t.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},t.prototype.scale=function(t){this.x*=t,this.y*=t},t.prototype.scaleAndAdd=function(t,e){this.x+=t.x*e,this.y+=t.y*e},t.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},t.prototype.dot=function(t){return this.x*t.x+this.y*t.y},t.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},t.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},t.prototype.normalize=function(){var t=this.len();return this.x/=t,this.y/=t,this},t.prototype.distance=function(t){var e=this.x-t.x,n=this.y-t.y;return Math.sqrt(e*e+n*n)},t.prototype.distanceSquare=function(t){var e=this.x-t.x,n=this.y-t.y;return e*e+n*n},t.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},t.prototype.transform=function(t){if(t){var e=this.x,n=this.y;return this.x=t[0]*e+t[2]*n+t[4],this.y=t[1]*e+t[3]*n+t[5],this}},t.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},t.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},t.set=function(t,e,n){t.x=e,t.y=n},t.copy=function(t,e){t.x=e.x,t.y=e.y},t.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},t.lenSquare=function(t){return t.x*t.x+t.y*t.y},t.dot=function(t,e){return t.x*e.x+t.y*e.y},t.add=function(t,e,n){t.x=e.x+n.x,t.y=e.y+n.y},t.sub=function(t,e,n){t.x=e.x-n.x,t.y=e.y-n.y},t.scale=function(t,e,n){t.x=e.x*n,t.y=e.y*n},t.scaleAndAdd=function(t,e,n,i){t.x=e.x+n.x*i,t.y=e.y+n.y*i},t.lerp=function(t,e,n,i){var r=1-i;t.x=r*e.x+i*n.x,t.y=r*e.y+i*n.y},t}(),Me=Math.min,Ce=Math.max,Ie=new Se,Te=new Se,De=new Se,ke=new Se,Ae=new Se,Pe=new Se,Le=function(){function t(t,e,n,i){n<0&&(t+=n,n=-n),i<0&&(e+=i,i=-i),this.x=t,this.y=e,this.width=n,this.height=i}return t.prototype.union=function(t){var e=Me(t.x,this.x),n=Me(t.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=Ce(t.x+t.width,this.x+this.width)-e:this.width=t.width,isFinite(this.y)&&isFinite(this.height)?this.height=Ce(t.y+t.height,this.y+this.height)-n:this.height=t.height,this.x=e,this.y=n},t.prototype.applyTransform=function(e){t.applyTransform(this,this,e)},t.prototype.calculateTransform=function(t){var e=this,n=t.width/e.width,i=t.height/e.height,r=[1,0,0,1,0,0];return me(r,r,[-e.x,-e.y]),xe(r,r,[n,i]),me(r,r,[t.x,t.y]),r},t.prototype.intersect=function(e,n){if(!e)return!1;e instanceof t||(e=t.create(e));var i=this,r=i.x,o=i.x+i.width,a=i.y,s=i.y+i.height,l=e.x,u=e.x+e.width,h=e.y,c=e.y+e.height,p=!(of&&(f=_,gf&&(f=x,y=n.x&&t<=n.x+n.width&&e>=n.y&&e<=n.y+n.height},t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.copy=function(e){t.copy(this,e)},t.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},t.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},t.prototype.isZero=function(){return 0===this.width||0===this.height},t.create=function(e){return new t(e.x,e.y,e.width,e.height)},t.copy=function(t,e){t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height},t.applyTransform=function(e,n,i){if(i){if(i[1]<1e-5&&i[1]>-1e-5&&i[2]<1e-5&&i[2]>-1e-5){var r=i[0],o=i[3],a=i[4],s=i[5];return e.x=n.x*r+a,e.y=n.y*o+s,e.width=n.width*r,e.height=n.height*o,e.width<0&&(e.x+=e.width,e.width=-e.width),void(e.height<0&&(e.y+=e.height,e.height=-e.height))}Ie.x=De.x=n.x,Ie.y=ke.y=n.y,Te.x=ke.x=n.x+n.width,Te.y=De.y=n.y+n.height,Ie.transform(i),ke.transform(i),Te.transform(i),De.transform(i),e.x=Me(Ie.x,Te.x,De.x,ke.x),e.y=Me(Ie.y,Te.y,De.y,ke.y);var l=Ce(Ie.x,Te.x,De.x,ke.x),u=Ce(Ie.y,Te.y,De.y,ke.y);e.width=l-e.x,e.height=u-e.y}else e!==n&&t.copy(e,n)},t}(),Oe="silent";function Re(){ue(this.event)}var Ne=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.handler=null,e}return n(e,t),e.prototype.dispose=function(){},e.prototype.setCursor=function(){},e}(Ut),ze=function(t,e){this.x=t,this.y=e},Ee=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Be=new Le(0,0,0,0),Ve=function(t){function e(e,n,i,r,o){var a=t.call(this)||this;return a._hovered=new ze(0,0),a.storage=e,a.painter=n,a.painterRoot=r,a._pointerSize=o,i=i||new Ne,a.proxy=null,a.setHandlerProxy(i),a._draggingMgr=new Gt(a),a}return n(e,t),e.prototype.setHandlerProxy=function(t){this.proxy&&this.proxy.dispose(),t&&(z(Ee,(function(e){t.on&&t.on(e,this[e],this)}),this),t.handler=this),this.proxy=t},e.prototype.mousemove=function(t){var e=t.zrX,n=t.zrY,i=We(this,e,n),r=this._hovered,o=r.target;o&&!o.__zr&&(o=(r=this.findHover(r.x,r.y)).target);var a=this._hovered=i?new ze(e,n):this.findHover(e,n),s=a.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),o&&s!==o&&this.dispatchToElement(r,"mouseout",t),this.dispatchToElement(a,"mousemove",t),s&&s!==o&&this.dispatchToElement(a,"mouseover",t)},e.prototype.mouseout=function(t){var e=t.zrEventControl;"only_globalout"!==e&&this.dispatchToElement(this._hovered,"mouseout",t),"no_globalout"!==e&&this.trigger("globalout",{type:"globalout",event:t})},e.prototype.resize=function(){this._hovered=new ze(0,0)},e.prototype.dispatch=function(t,e){var n=this[t];n&&n.call(this,e)},e.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},e.prototype.setCursorStyle=function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},e.prototype.dispatchToElement=function(t,e,n){var i=(t=t||{}).target;if(!i||!i.silent){for(var r="on"+e,o=function(t,e,n){return{type:t,event:n,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:Re}}(e,t,n);i&&(i[r]&&(o.cancelBubble=!!i[r].call(i,o)),i.trigger(e,o),i=i.__hostTarget?i.__hostTarget:i.parent,!o.cancelBubble););o.cancelBubble||(this.trigger(e,o),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer((function(t){"function"==typeof t[r]&&t[r].call(t,o),t.trigger&&t.trigger(e,o)})))}},e.prototype.findHover=function(t,e,n){var i=this.storage.getDisplayList(),r=new ze(t,e);if(He(i,r,t,e,n),this._pointerSize&&!r.target){for(var o=[],a=this._pointerSize,s=a/2,l=new Le(t-s,e-s,a,a),u=i.length-1;u>=0;u--){var h=i[u];h===n||h.ignore||h.ignoreCoarsePointer||h.parent&&h.parent.ignoreCoarsePointer||(Be.copy(h.getBoundingRect()),h.transform&&Be.applyTransform(h.transform),Be.intersect(l)&&o.push(h))}if(o.length)for(var c=Math.PI/12,p=2*Math.PI,d=0;d=0;o--){var a=t[o],s=void 0;if(a!==r&&!a.ignore&&(s=Fe(a,n,i))&&(!e.topTarget&&(e.topTarget=a),s!==Oe)){e.target=a;break}}}function We(t,e,n){var i=t.painter;return e<0||e>i.getWidth()||n<0||n>i.getHeight()}z(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],(function(t){Ve.prototype[t]=function(e){var n,i,r=e.zrX,o=e.zrY,a=We(this,r,o);if("mouseup"===t&&a||(i=(n=this.findHover(r,o)).target),"mousedown"===t)this._downEl=i,this._downPoint=[e.zrX,e.zrY],this._upEl=i;else if("mouseup"===t)this._upEl=i;else if("click"===t){if(this._downEl!==this._upEl||!this._downPoint||Rt(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(n,t,e)}}));function Ge(t,e,n,i){var r=e+1;if(r===n)return 1;if(i(t[r++],t[e])<0){for(;r=0;)r++;return r-e}function Ue(t,e,n,i,r){for(i===e&&i++;i>>1])<0?l=o:s=o+1;var u=i-s;switch(u){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;u>0;)t[s+u]=t[s+u-1],u--}t[s]=a}}function Ze(t,e,n,i,r,o){var a=0,s=0,l=1;if(o(t,e[n+r])>0){for(s=i-r;l0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=r,l+=r}else{for(s=r+1;ls&&(l=s);var u=a;a=r-l,l=r-u}for(a++;a>>1);o(t,e[n+h])>0?a=h+1:l=h}return l}function Ye(t,e,n,i,r,o){var a=0,s=0,l=1;if(o(t,e[n+r])<0){for(s=r+1;ls&&(l=s);var u=a;a=r-l,l=r-u}else{for(s=i-r;l=0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=r,l+=r}for(a++;a>>1);o(t,e[n+h])<0?l=h:a=h+1}return l}function Xe(t,e){var n,i,r=7,o=0;t.length;var a=[];function s(s){var l=n[s],u=i[s],h=n[s+1],c=i[s+1];i[s]=u+c,s===o-3&&(n[s+1]=n[s+2],i[s+1]=i[s+2]),o--;var p=Ye(t[h],t,l,u,0,e);l+=p,0!==(u-=p)&&0!==(c=Ze(t[l+u-1],t,h,c,c-1,e))&&(u<=c?function(n,i,o,s){var l=0;for(l=0;l=7||d>=7);if(f)break;g<0&&(g=0),g+=2}if((r=g)<1&&(r=1),1===i){for(l=0;l=0;l--)t[d+l]=t[p+l];return void(t[c]=a[h])}var f=r;for(;;){var g=0,v=0,y=!1;do{if(e(a[h],t[u])<0){if(t[c--]=t[u--],g++,v=0,0==--i){y=!0;break}}else if(t[c--]=a[h--],v++,g=0,1==--s){y=!0;break}}while((g|v)=0;l--)t[d+l]=t[p+l];if(0===i){y=!0;break}}if(t[c--]=a[h--],1==--s){y=!0;break}if(0!==(v=s-Ze(t[u],a,0,s,s-1,e))){for(s-=v,d=(c-=v)+1,p=(h-=v)+1,l=0;l=7||v>=7);if(y)break;f<0&&(f=0),f+=2}(r=f)<1&&(r=1);if(1===s){for(d=(c-=i)+1,p=(u-=i)+1,l=i-1;l>=0;l--)t[d+l]=t[p+l];t[c]=a[h]}else{if(0===s)throw new Error;for(p=c-(s-1),l=0;l1;){var t=o-2;if(t>=1&&i[t-1]<=i[t]+i[t+1]||t>=2&&i[t-2]<=i[t]+i[t-1])i[t-1]i[t+1])break;s(t)}},forceMergeRuns:function(){for(;o>1;){var t=o-2;t>0&&i[t-1]=32;)e|=1&t,t>>=1;return t+e}(r);do{if((o=Ge(t,n,i,e))s&&(l=s),Ue(t,n,n+l,n+o,e),o=l}a.pushRun(n,o),a.mergeRuns(),r-=o,n+=o}while(0!==r);a.forceMergeRuns()}}}var qe=!1;function Ke(){qe||(qe=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function $e(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}var Qe=function(){function t(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=$e}return t.prototype.traverse=function(t,e){for(var n=0;n0&&(u.__clipPaths=[]),isNaN(u.z)&&(Ke(),u.z=0),isNaN(u.z2)&&(Ke(),u.z2=0),isNaN(u.zlevel)&&(Ke(),u.zlevel=0),this._displayList[this._displayListLen++]=u}var h=t.getDecalElement&&t.getDecalElement();h&&this._updateAndAddDisplayable(h,e,n);var c=t.getTextGuideLine();c&&this._updateAndAddDisplayable(c,e,n);var p=t.getTextContent();p&&this._updateAndAddDisplayable(p,e,n)}},t.prototype.addRoot=function(t){t.__zr&&t.__zr.storage===this||this._roots.push(t)},t.prototype.delRoot=function(t){if(t instanceof Array)for(var e=0,n=t.length;e=0&&this._roots.splice(i,1)}},t.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},t.prototype.getRoots=function(){return this._roots},t.prototype.dispose=function(){this._displayList=null,this._roots=null},t}(),Je=r.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){return setTimeout(t,16)},tn={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return.5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return 0===t?0:Math.pow(1024,t-1)},exponentialOut:function(t){return 1===t?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(2-Math.pow(2,-10*(t-1)))},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,n=.1;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=.4*Math.asin(1/n)/(2*Math.PI),-n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4))},elasticOut:function(t){var e,n=.1;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=.4*Math.asin(1/n)/(2*Math.PI),n*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/.4)+1)},elasticInOut:function(t){var e,n=.1,i=.4;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=i*Math.asin(1/n)/(2*Math.PI),(t*=2)<1?n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)*-.5:n*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)*.5+1)},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?t*t*((e+1)*t-e)*.5:.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-tn.bounceOut(1-t)},bounceOut:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return t<.5?.5*tn.bounceIn(2*t):.5*tn.bounceOut(2*t-1)+.5}},en=Math.pow,nn=Math.sqrt,rn=1e-8,on=1e-4,an=nn(3),sn=1/3,ln=St(),un=St(),hn=St();function cn(t){return t>-1e-8&&trn||t<-1e-8}function dn(t,e,n,i,r){var o=1-r;return o*o*(o*t+3*r*e)+r*r*(r*i+3*o*n)}function fn(t,e,n,i,r){var o=1-r;return 3*(((e-t)*o+2*(n-e)*r)*o+(i-n)*r*r)}function gn(t,e,n,i,r,o){var a=i+3*(e-n)-t,s=3*(n-2*e+t),l=3*(e-t),u=t-r,h=s*s-3*a*l,c=s*l-9*a*u,p=l*l-3*s*u,d=0;if(cn(h)&&cn(c)){if(cn(s))o[0]=0;else(M=-l/s)>=0&&M<=1&&(o[d++]=M)}else{var f=c*c-4*h*p;if(cn(f)){var g=c/h,v=-g/2;(M=-s/a+g)>=0&&M<=1&&(o[d++]=M),v>=0&&v<=1&&(o[d++]=v)}else if(f>0){var y=nn(f),m=h*s+1.5*a*(-c+y),_=h*s+1.5*a*(-c-y);(M=(-s-((m=m<0?-en(-m,sn):en(m,sn))+(_=_<0?-en(-_,sn):en(_,sn))))/(3*a))>=0&&M<=1&&(o[d++]=M)}else{var x=(2*h*s-3*a*c)/(2*nn(h*h*h)),w=Math.acos(x)/3,b=nn(h),S=Math.cos(w),M=(-s-2*b*S)/(3*a),C=(v=(-s+b*(S+an*Math.sin(w)))/(3*a),(-s+b*(S-an*Math.sin(w)))/(3*a));M>=0&&M<=1&&(o[d++]=M),v>=0&&v<=1&&(o[d++]=v),C>=0&&C<=1&&(o[d++]=C)}}return d}function vn(t,e,n,i,r){var o=6*n-12*e+6*t,a=9*e+3*i-3*t-9*n,s=3*e-3*t,l=0;if(cn(a)){if(pn(o))(h=-s/o)>=0&&h<=1&&(r[l++]=h)}else{var u=o*o-4*a*s;if(cn(u))r[0]=-o/(2*a);else if(u>0){var h,c=nn(u),p=(-o-c)/(2*a);(h=(-o+c)/(2*a))>=0&&h<=1&&(r[l++]=h),p>=0&&p<=1&&(r[l++]=p)}}return l}function yn(t,e,n,i,r,o){var a=(e-t)*r+t,s=(n-e)*r+e,l=(i-n)*r+n,u=(s-a)*r+a,h=(l-s)*r+s,c=(h-u)*r+u;o[0]=t,o[1]=a,o[2]=u,o[3]=c,o[4]=c,o[5]=h,o[6]=l,o[7]=i}function mn(t,e,n,i,r,o,a,s,l){for(var u=t,h=e,c=0,p=1/l,d=1;d<=l;d++){var f=d*p,g=dn(t,n,r,a,f),v=dn(e,i,o,s,f),y=g-u,m=v-h;c+=Math.sqrt(y*y+m*m),u=g,h=v}return c}function _n(t,e,n,i){var r=1-i;return r*(r*t+2*i*e)+i*i*n}function xn(t,e,n,i){return 2*((1-i)*(e-t)+i*(n-e))}function wn(t,e,n){var i=t+n-2*e;return 0===i?.5:(t-e)/i}function bn(t,e,n,i,r){var o=(e-t)*i+t,a=(n-e)*i+e,s=(a-o)*i+o;r[0]=t,r[1]=o,r[2]=s,r[3]=s,r[4]=a,r[5]=n}function Sn(t,e,n,i,r,o,a){for(var s=t,l=e,u=0,h=1/a,c=1;c<=a;c++){var p=c*h,d=_n(t,n,r,p),f=_n(e,i,o,p),g=d-s,v=f-l;u+=Math.sqrt(g*g+v*v),s=d,l=f}return u}var Mn=/cubic-bezier\(([0-9,\.e ]+)\)/;function Cn(t){var e=t&&Mn.exec(t);if(e){var n=e[1].split(","),i=+lt(n[0]),r=+lt(n[1]),o=+lt(n[2]),a=+lt(n[3]);if(isNaN(i+r+o+a))return;var s=[];return function(t){return t<=0?0:t>=1?1:gn(0,i,o,1,t,s)&&dn(0,r,a,1,s[0])}}}var In=function(){function t(t){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=t.life||1e3,this._delay=t.delay||0,this.loop=t.loop||!1,this.onframe=t.onframe||xt,this.ondestroy=t.ondestroy||xt,this.onrestart=t.onrestart||xt,t.easing&&this.setEasing(t.easing)}return t.prototype.step=function(t,e){if(this._inited||(this._startTime=t+this._delay,this._inited=!0),!this._paused){var n=this._life,i=t-this._startTime-this._pausedTime,r=i/n;r<0&&(r=0),r=Math.min(r,1);var o=this.easingFunc,a=o?o(r):r;if(this.onframe(a),1===r){if(!this.loop)return!0;var s=i%n;this._startTime=t-s,this._pausedTime=0,this.onrestart()}return!1}this._pausedTime+=e},t.prototype.pause=function(){this._paused=!0},t.prototype.resume=function(){this._paused=!1},t.prototype.setEasing=function(t){this.easing=t,this.easingFunc=U(t)?t:tn[t]||Cn(t)},t}(),Tn=function(t){this.value=t},Dn=function(){function t(){this._len=0}return t.prototype.insert=function(t){var e=new Tn(t);return this.insertEntry(e),e},t.prototype.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},t.prototype.remove=function(t){var e=t.prev,n=t.next;e?e.next=n:this.head=n,n?n.prev=e:this.tail=e,t.next=t.prev=null,this._len--},t.prototype.len=function(){return this._len},t.prototype.clear=function(){this.head=this.tail=null,this._len=0},t}(),kn=function(){function t(t){this._list=new Dn,this._maxSize=10,this._map={},this._maxSize=t}return t.prototype.put=function(t,e){var n=this._list,i=this._map,r=null;if(null==i[t]){var o=n.len(),a=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var s=n.head;n.remove(s),delete i[s.key],r=s.value,this._lastRemovedEntry=s}a?a.value=e:a=new Tn(e),a.key=t,n.insertEntry(a),i[t]=a}return r},t.prototype.get=function(t){var e=this._map[t],n=this._list;if(null!=e)return e!==n.tail&&(n.remove(e),n.insertEntry(e)),e.value},t.prototype.clear=function(){this._list.clear(),this._map={}},t.prototype.len=function(){return this._list.len()},t}(),An={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function Pn(t){return(t=Math.round(t))<0?0:t>255?255:t}function Ln(t){return t<0?0:t>1?1:t}function On(t){var e=t;return e.length&&"%"===e.charAt(e.length-1)?Pn(parseFloat(e)/100*255):Pn(parseInt(e,10))}function Rn(t){var e=t;return e.length&&"%"===e.charAt(e.length-1)?Ln(parseFloat(e)/100):Ln(parseFloat(e))}function Nn(t,e,n){return n<0?n+=1:n>1&&(n-=1),6*n<1?t+(e-t)*n*6:2*n<1?e:3*n<2?t+(e-t)*(2/3-n)*6:t}function zn(t,e,n){return t+(e-t)*n}function En(t,e,n,i,r){return t[0]=e,t[1]=n,t[2]=i,t[3]=r,t}function Bn(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var Vn=new kn(20),Fn=null;function Hn(t,e){Fn&&Bn(Fn,e),Fn=Vn.put(t,Fn||e.slice())}function Wn(t,e){if(t){e=e||[];var n=Vn.get(t);if(n)return Bn(e,n);var i=(t+="").replace(/ /g,"").toLowerCase();if(i in An)return Bn(e,An[i]),Hn(t,e),e;var r,o=i.length;if("#"===i.charAt(0))return 4===o||5===o?(r=parseInt(i.slice(1,4),16))>=0&&r<=4095?(En(e,(3840&r)>>4|(3840&r)>>8,240&r|(240&r)>>4,15&r|(15&r)<<4,5===o?parseInt(i.slice(4),16)/15:1),Hn(t,e),e):void En(e,0,0,0,1):7===o||9===o?(r=parseInt(i.slice(1,7),16))>=0&&r<=16777215?(En(e,(16711680&r)>>16,(65280&r)>>8,255&r,9===o?parseInt(i.slice(7),16)/255:1),Hn(t,e),e):void En(e,0,0,0,1):void 0;var a=i.indexOf("("),s=i.indexOf(")");if(-1!==a&&s+1===o){var l=i.substr(0,a),u=i.substr(a+1,s-(a+1)).split(","),h=1;switch(l){case"rgba":if(4!==u.length)return 3===u.length?En(e,+u[0],+u[1],+u[2],1):En(e,0,0,0,1);h=Rn(u.pop());case"rgb":return u.length>=3?(En(e,On(u[0]),On(u[1]),On(u[2]),3===u.length?h:Rn(u[3])),Hn(t,e),e):void En(e,0,0,0,1);case"hsla":return 4!==u.length?void En(e,0,0,0,1):(u[3]=Rn(u[3]),Gn(u,e),Hn(t,e),e);case"hsl":return 3!==u.length?void En(e,0,0,0,1):(Gn(u,e),Hn(t,e),e);default:return}}En(e,0,0,0,1)}}function Gn(t,e){var n=(parseFloat(t[0])%360+360)%360/360,i=Rn(t[1]),r=Rn(t[2]),o=r<=.5?r*(i+1):r+i-r*i,a=2*r-o;return En(e=e||[],Pn(255*Nn(a,o,n+1/3)),Pn(255*Nn(a,o,n)),Pn(255*Nn(a,o,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}function Un(t,e){var n=Wn(t);if(n){for(var i=0;i<3;i++)n[i]=e<0?n[i]*(1-e)|0:(255-n[i])*e+n[i]|0,n[i]>255?n[i]=255:n[i]<0&&(n[i]=0);return Kn(n,4===n.length?"rgba":"rgb")}}function Zn(t,e,n){if(e&&e.length&&t>=0&&t<=1){n=n||[];var i=t*(e.length-1),r=Math.floor(i),o=Math.ceil(i),a=e[r],s=e[o],l=i-r;return n[0]=Pn(zn(a[0],s[0],l)),n[1]=Pn(zn(a[1],s[1],l)),n[2]=Pn(zn(a[2],s[2],l)),n[3]=Ln(zn(a[3],s[3],l)),n}}var Yn=Zn;function Xn(t,e,n){if(e&&e.length&&t>=0&&t<=1){var i=t*(e.length-1),r=Math.floor(i),o=Math.ceil(i),a=Wn(e[r]),s=Wn(e[o]),l=i-r,u=Kn([Pn(zn(a[0],s[0],l)),Pn(zn(a[1],s[1],l)),Pn(zn(a[2],s[2],l)),Ln(zn(a[3],s[3],l))],"rgba");return n?{color:u,leftIndex:r,rightIndex:o,value:i}:u}}var jn=Xn;function qn(t,e){var n=Wn(t);if(n&&null!=e)return n[3]=Ln(e),Kn(n,"rgba")}function Kn(t,e){if(t&&t.length){var n=t[0]+","+t[1]+","+t[2];return"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(n+=","+t[3]),e+"("+n+")"}}function $n(t,e){var n=Wn(t);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*e:0}var Qn=Object.freeze({__proto__:null,parse:Wn,lift:Un,toHex:function(t){var e=Wn(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)},fastLerp:Zn,fastMapToColor:Yn,lerp:Xn,mapToColor:jn,modifyHSL:function(t,e,n,i){var r,o=Wn(t);if(t)return o=function(t){if(t){var e,n,i=t[0]/255,r=t[1]/255,o=t[2]/255,a=Math.min(i,r,o),s=Math.max(i,r,o),l=s-a,u=(s+a)/2;if(0===l)e=0,n=0;else{n=u<.5?l/(s+a):l/(2-s-a);var h=((s-i)/6+l/2)/l,c=((s-r)/6+l/2)/l,p=((s-o)/6+l/2)/l;i===s?e=p-c:r===s?e=1/3+h-p:o===s&&(e=2/3+c-h),e<0&&(e+=1),e>1&&(e-=1)}var d=[360*e,n,u];return null!=t[3]&&d.push(t[3]),d}}(o),null!=e&&(o[0]=(r=e,(r=Math.round(r))<0?0:r>360?360:r)),null!=n&&(o[1]=Rn(n)),null!=i&&(o[2]=Rn(i)),Kn(Gn(o),"rgba")},modifyAlpha:qn,stringify:Kn,lum:$n,random:function(){return Kn([Math.round(255*Math.random()),Math.round(255*Math.random()),Math.round(255*Math.random())],"rgb")}}),Jn=Math.round;function ti(t){var e;if(t&&"transparent"!==t){if("string"==typeof t&&t.indexOf("rgba")>-1){var n=Wn(t);n&&(t="rgb("+n[0]+","+n[1]+","+n[2]+")",e=n[3])}}else t="none";return{color:t,opacity:null==e?1:e}}var ei=1e-4;function ni(t){return t-1e-4}function ii(t){return Jn(1e3*t)/1e3}function ri(t){return Jn(1e4*t)/1e4}var oi={left:"start",right:"end",center:"middle",middle:"middle"};function ai(t){return t&&!!t.image}function si(t){return ai(t)||function(t){return t&&!!t.svgElement}(t)}function li(t){return"linear"===t.type}function ui(t){return"radial"===t.type}function hi(t){return t&&("linear"===t.type||"radial"===t.type)}function ci(t){return"url(#"+t+")"}function pi(t){var e=t.getGlobalScale(),n=Math.max(e[0],e[1]);return Math.max(Math.ceil(Math.log(n)/Math.log(10)),1)}function di(t){var e=t.x||0,n=t.y||0,i=(t.rotation||0)*wt,r=it(t.scaleX,1),o=it(t.scaleY,1),a=t.skewX||0,s=t.skewY||0,l=[];return(e||n)&&l.push("translate("+e+"px,"+n+"px)"),i&&l.push("rotate("+i+")"),1===r&&1===o||l.push("scale("+r+","+o+")"),(a||s)&&l.push("skew("+Jn(a*wt)+"deg, "+Jn(s*wt)+"deg)"),l.join(" ")}var fi=r.hasGlobalWindow&&U(window.btoa)?function(t){return window.btoa(unescape(encodeURIComponent(t)))}:"undefined"!=typeof Buffer?function(t){return Buffer.from(t).toString("base64")}:function(t){return null},gi=Array.prototype.slice;function vi(t,e,n){return(e-t)*n+t}function yi(t,e,n,i){for(var r=e.length,o=0;oi?e:t,o=Math.min(n,i),a=r[o-1]||{color:[0,0,0,0],offset:0},s=o;sa)i.length=a;else for(var s=o;s=1},t.prototype.getAdditiveTrack=function(){return this._additiveTrack},t.prototype.addKeyframe=function(t,e,n){this._needsSort=!0;var i=this.keyframes,r=i.length,o=!1,a=6,s=e;if(N(e)){var l=function(t){return N(t&&t[0])?2:1}(e);a=l,(1===l&&!X(e[0])||2===l&&!X(e[0][0]))&&(o=!0)}else if(X(e)&&!et(e))a=0;else if(Z(e))if(isNaN(+e)){var u=Wn(e);u&&(s=u,a=3)}else a=0;else if(Q(e)){var h=k({},s);h.colorStops=E(e.colorStops,(function(t){return{offset:t.offset,color:Wn(t.color)}})),li(e)?a=4:ui(e)&&(a=5),s=h}0===r?this.valType=a:a===this.valType&&6!==a||(o=!0),this.discrete=this.discrete||o;var c={time:t,value:s,rawValue:e,percent:0};return n&&(c.easing=n,c.easingFunc=U(n)?n:tn[n]||Cn(n)),i.push(c),c},t.prototype.prepare=function(t,e){var n=this.keyframes;this._needsSort&&n.sort((function(t,e){return t.time-e.time}));for(var i=this.valType,r=n.length,o=n[r-1],a=this.discrete,s=Ci(i),l=Mi(i),u=0;u=0&&!(l[n].percent<=e);n--);n=d(n,u-2)}else{for(n=p;ne);n++);n=d(n-1,u-2)}r=l[n+1],i=l[n]}if(i&&r){this._lastFr=n,this._lastFrP=e;var f=r.percent-i.percent,g=0===f?1:d((e-i.percent)/f,1);r.easingFunc&&(g=r.easingFunc(g));var v=o?this._additiveValue:c?Ii:t[h];if(!Ci(s)&&!c||v||(v=this._additiveValue=[]),this.discrete)t[h]=g<1?i.rawValue:r.rawValue;else if(Ci(s))1===s?yi(v,i[a],r[a],g):function(t,e,n,i){for(var r=e.length,o=r&&e[0].length,a=0;a0&&s.addKeyframe(0,bi(l),i),this._trackKeys.push(a)}s.addKeyframe(t,bi(e[a]),i)}return this._maxTime=Math.max(this._maxTime,t),this},t.prototype.pause=function(){this._clip.pause(),this._paused=!0},t.prototype.resume=function(){this._clip.resume(),this._paused=!1},t.prototype.isPaused=function(){return!!this._paused},t.prototype.duration=function(t){return this._maxTime=t,this._force=!0,this},t.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var t=this._doneCbs;if(t)for(var e=t.length,n=0;n0)){this._started=1;for(var e=this,n=[],i=this._maxTime||0,r=0;r1){var a=o.pop();r.addKeyframe(a.time,t[i]),r.prepare(this._maxTime,r.getAdditiveTrack())}}}},t}();function ki(){return(new Date).getTime()}var Ai,Pi,Li=function(t){function e(e){var n=t.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,e=e||{},n.stage=e.stage||{},n}return n(e,t),e.prototype.addClip=function(t){t.animation&&this.removeClip(t),this._head?(this._tail.next=t,t.prev=this._tail,t.next=null,this._tail=t):this._head=this._tail=t,t.animation=this},e.prototype.addAnimator=function(t){t.animation=this;var e=t.getClip();e&&this.addClip(e)},e.prototype.removeClip=function(t){if(t.animation){var e=t.prev,n=t.next;e?e.next=n:this._head=n,n?n.prev=e:this._tail=e,t.next=t.prev=t.animation=null}},e.prototype.removeAnimator=function(t){var e=t.getClip();e&&this.removeClip(e),t.animation=null},e.prototype.update=function(t){for(var e=ki()-this._pausedTime,n=e-this._time,i=this._head;i;){var r=i.next;i.step(e,n)?(i.ondestroy(),this.removeClip(i),i=r):i=r}this._time=e,t||(this.trigger("frame",n),this.stage.update&&this.stage.update())},e.prototype._startLoop=function(){var t=this;this._running=!0,Je((function e(){t._running&&(Je(e),!t._paused&&t.update())}))},e.prototype.start=function(){this._running||(this._time=ki(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=ki(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=ki()-this._pauseStart,this._paused=!1)},e.prototype.clear=function(){for(var t=this._head;t;){var e=t.next;t.prev=t.next=t.animation=null,t=e}this._head=this._tail=null},e.prototype.isFinished=function(){return null==this._head},e.prototype.animate=function(t,e){e=e||{},this.start();var n=new Di(t,e.loop);return this.addAnimator(n),n},e}(Ut),Oi=r.domSupported,Ri=(Pi={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},{mouse:Ai=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],touch:["touchstart","touchend","touchmove"],pointer:E(Ai,(function(t){var e=t.replace("mouse","pointer");return Pi.hasOwnProperty(e)?e:t}))}),Ni=["mousemove","mouseup"],zi=["pointermove","pointerup"],Ei=!1;function Bi(t){var e=t.pointerType;return"pen"===e||"touch"===e}function Vi(t){t&&(t.zrByTouch=!0)}function Fi(t,e){for(var n=e,i=!1;n&&9!==n.nodeType&&!(i=n.domBelongToZr||n!==e&&n===t.painterRoot);)n=n.parentNode;return i}var Hi=function(t,e){this.stopPropagation=xt,this.stopImmediatePropagation=xt,this.preventDefault=xt,this.type=e.type,this.target=this.currentTarget=t.dom,this.pointerType=e.pointerType,this.clientX=e.clientX,this.clientY=e.clientY},Wi={mousedown:function(t){t=se(this.dom,t),this.__mayPointerCapture=[t.zrX,t.zrY],this.trigger("mousedown",t)},mousemove:function(t){t=se(this.dom,t);var e=this.__mayPointerCapture;!e||t.zrX===e[0]&&t.zrY===e[1]||this.__togglePointerCapture(!0),this.trigger("mousemove",t)},mouseup:function(t){t=se(this.dom,t),this.__togglePointerCapture(!1),this.trigger("mouseup",t)},mouseout:function(t){Fi(this,(t=se(this.dom,t)).toElement||t.relatedTarget)||(this.__pointerCapturing&&(t.zrEventControl="no_globalout"),this.trigger("mouseout",t))},wheel:function(t){Ei=!0,t=se(this.dom,t),this.trigger("mousewheel",t)},mousewheel:function(t){Ei||(t=se(this.dom,t),this.trigger("mousewheel",t))},touchstart:function(t){Vi(t=se(this.dom,t)),this.__lastTouchMoment=new Date,this.handler.processGesture(t,"start"),Wi.mousemove.call(this,t),Wi.mousedown.call(this,t)},touchmove:function(t){Vi(t=se(this.dom,t)),this.handler.processGesture(t,"change"),Wi.mousemove.call(this,t)},touchend:function(t){Vi(t=se(this.dom,t)),this.handler.processGesture(t,"end"),Wi.mouseup.call(this,t),+new Date-+this.__lastTouchMoment<300&&Wi.click.call(this,t)},pointerdown:function(t){Wi.mousedown.call(this,t)},pointermove:function(t){Bi(t)||Wi.mousemove.call(this,t)},pointerup:function(t){Wi.mouseup.call(this,t)},pointerout:function(t){Bi(t)||Wi.mouseout.call(this,t)}};z(["click","dblclick","contextmenu"],(function(t){Wi[t]=function(e){e=se(this.dom,e),this.trigger(t,e)}}));var Gi={pointermove:function(t){Bi(t)||Gi.mousemove.call(this,t)},pointerup:function(t){Gi.mouseup.call(this,t)},mousemove:function(t){this.trigger("mousemove",t)},mouseup:function(t){var e=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",t),e&&(t.zrEventControl="only_globalout",this.trigger("mouseout",t))}};function Ui(t,e){var n=e.domHandlers;r.pointerEventsSupported?z(Ri.pointer,(function(i){Yi(e,i,(function(e){n[i].call(t,e)}))})):(r.touchEventsSupported&&z(Ri.touch,(function(i){Yi(e,i,(function(r){n[i].call(t,r),function(t){t.touching=!0,null!=t.touchTimer&&(clearTimeout(t.touchTimer),t.touchTimer=null),t.touchTimer=setTimeout((function(){t.touching=!1,t.touchTimer=null}),700)}(e)}))})),z(Ri.mouse,(function(i){Yi(e,i,(function(r){r=ae(r),e.touching||n[i].call(t,r)}))})))}function Zi(t,e){function n(n){Yi(e,n,(function(i){i=ae(i),Fi(t,i.target)||(i=function(t,e){return se(t.dom,new Hi(t,e),!0)}(t,i),e.domHandlers[n].call(t,i))}),{capture:!0})}r.pointerEventsSupported?z(zi,n):r.touchEventsSupported||z(Ni,n)}function Yi(t,e,n,i){t.mounted[e]=n,t.listenerOpts[e]=i,le(t.domTarget,e,n,i)}function Xi(t){var e,n,i,r,o=t.mounted;for(var a in o)o.hasOwnProperty(a)&&(e=t.domTarget,n=a,i=o[a],r=t.listenerOpts[a],e.removeEventListener(n,i,r));t.mounted={}}var ji=function(t,e){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=t,this.domHandlers=e},qi=function(t){function e(e,n){var i=t.call(this)||this;return i.__pointerCapturing=!1,i.dom=e,i.painterRoot=n,i._localHandlerScope=new ji(e,Wi),Oi&&(i._globalHandlerScope=new ji(document,Gi)),Ui(i,i._localHandlerScope),i}return n(e,t),e.prototype.dispose=function(){Xi(this._localHandlerScope),Oi&&Xi(this._globalHandlerScope)},e.prototype.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},e.prototype.__togglePointerCapture=function(t){if(this.__mayPointerCapture=null,Oi&&+this.__pointerCapturing^+t){this.__pointerCapturing=t;var e=this._globalHandlerScope;t?Zi(this,e):Xi(e)}},e}(Ut),Ki=1;r.hasGlobalWindow&&(Ki=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var $i=Ki,Qi="#333",Ji="#ccc",tr=ge,er=5e-5;function nr(t){return t>er||t<-5e-5}var ir=[],rr=[],or=[1,0,0,1,0,0],ar=Math.abs,sr=function(){function t(){}return t.prototype.getLocalTransform=function(e){return t.getLocalTransform(this,e)},t.prototype.setPosition=function(t){this.x=t[0],this.y=t[1]},t.prototype.setScale=function(t){this.scaleX=t[0],this.scaleY=t[1]},t.prototype.setSkew=function(t){this.skewX=t[0],this.skewY=t[1]},t.prototype.setOrigin=function(t){this.originX=t[0],this.originY=t[1]},t.prototype.needLocalTransform=function(){return nr(this.rotation)||nr(this.x)||nr(this.y)||nr(this.scaleX-1)||nr(this.scaleY-1)||nr(this.skewX)||nr(this.skewY)},t.prototype.updateTransform=function(){var t=this.parent&&this.parent.transform,e=this.needLocalTransform(),n=this.transform;e||t?(n=n||[1,0,0,1,0,0],e?this.getLocalTransform(n):tr(n),t&&(e?ye(n,t,n):ve(n,t)),this.transform=n,this._resolveGlobalScaleRatio(n)):n&&tr(n)},t.prototype._resolveGlobalScaleRatio=function(t){var e=this.globalScaleRatio;if(null!=e&&1!==e){this.getGlobalScale(ir);var n=ir[0]<0?-1:1,i=ir[1]<0?-1:1,r=((ir[0]-n)*e+n)/ir[0]||0,o=((ir[1]-i)*e+i)/ir[1]||0;t[0]*=r,t[1]*=r,t[2]*=o,t[3]*=o}this.invTransform=this.invTransform||[1,0,0,1,0,0],we(this.invTransform,t)},t.prototype.getComputedTransform=function(){for(var t=this,e=[];t;)e.push(t),t=t.parent;for(;t=e.pop();)t.updateTransform();return this.transform},t.prototype.setLocalTransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],n=t[2]*t[2]+t[3]*t[3],i=Math.atan2(t[1],t[0]),r=Math.PI/2+i-Math.atan2(t[3],t[2]);n=Math.sqrt(n)*Math.cos(r),e=Math.sqrt(e),this.skewX=r,this.skewY=0,this.rotation=-i,this.x=+t[4],this.y=+t[5],this.scaleX=e,this.scaleY=n,this.originX=0,this.originY=0}},t.prototype.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(ye(rr,t.invTransform,e),e=rr);var n=this.originX,i=this.originY;(n||i)&&(or[4]=n,or[5]=i,ye(rr,e,or),rr[4]-=n,rr[5]-=i,e=rr),this.setLocalTransform(e)}},t.prototype.getGlobalScale=function(t){var e=this.transform;return t=t||[],e?(t[0]=Math.sqrt(e[0]*e[0]+e[1]*e[1]),t[1]=Math.sqrt(e[2]*e[2]+e[3]*e[3]),e[0]<0&&(t[0]=-t[0]),e[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},t.prototype.transformCoordToLocal=function(t,e){var n=[t,e],i=this.invTransform;return i&&Bt(n,n,i),n},t.prototype.transformCoordToGlobal=function(t,e){var n=[t,e],i=this.transform;return i&&Bt(n,n,i),n},t.prototype.getLineScale=function(){var t=this.transform;return t&&ar(t[0]-1)>1e-10&&ar(t[3]-1)>1e-10?Math.sqrt(ar(t[0]*t[3]-t[2]*t[1])):1},t.prototype.copyTransform=function(t){ur(this,t)},t.getLocalTransform=function(t,e){e=e||[];var n=t.originX||0,i=t.originY||0,r=t.scaleX,o=t.scaleY,a=t.anchorX,s=t.anchorY,l=t.rotation||0,u=t.x,h=t.y,c=t.skewX?Math.tan(t.skewX):0,p=t.skewY?Math.tan(-t.skewY):0;if(n||i||a||s){var d=n+a,f=i+s;e[4]=-d*r-c*f*o,e[5]=-f*o-p*d*r}else e[4]=e[5]=0;return e[0]=r,e[3]=o,e[1]=p*r,e[2]=c*o,l&&_e(e,e,l),e[4]+=n+u,e[5]+=i+h,e},t.initDefaultProps=function(){var e=t.prototype;e.scaleX=e.scaleY=e.globalScaleRatio=1,e.x=e.y=e.originX=e.originY=e.skewX=e.skewY=e.rotation=e.anchorX=e.anchorY=0}(),t}(),lr=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function ur(t,e){for(var n=0;n=0?parseFloat(t)/100*e:parseFloat(t):t}function mr(t,e,n){var i=e.position||"inside",r=null!=e.distance?e.distance:5,o=n.height,a=n.width,s=o/2,l=n.x,u=n.y,h="left",c="top";if(i instanceof Array)l+=yr(i[0],n.width),u+=yr(i[1],n.height),h=null,c=null;else switch(i){case"left":l-=r,u+=s,h="right",c="middle";break;case"right":l+=r+a,u+=s,c="middle";break;case"top":l+=a/2,u-=r,h="center",c="bottom";break;case"bottom":l+=a/2,u+=o+r,h="center";break;case"inside":l+=a/2,u+=s,h="center",c="middle";break;case"insideLeft":l+=r,u+=s,c="middle";break;case"insideRight":l+=a-r,u+=s,h="right",c="middle";break;case"insideTop":l+=a/2,u+=r,h="center";break;case"insideBottom":l+=a/2,u+=o-r,h="center",c="bottom";break;case"insideTopLeft":l+=r,u+=r;break;case"insideTopRight":l+=a-r,u+=r,h="right";break;case"insideBottomLeft":l+=r,u+=o-r,c="bottom";break;case"insideBottomRight":l+=a-r,u+=o-r,h="right",c="bottom"}return(t=t||{}).x=l,t.y=u,t.align=h,t.verticalAlign=c,t}var _r="__zr_normal__",xr=lr.concat(["ignore"]),wr=B(lr,(function(t,e){return t[e]=!0,t}),{ignore:!1}),br={},Sr=new Le(0,0,0,0),Mr=function(){function t(t){this.id=M(),this.animators=[],this.currentStates=[],this.states={},this._init(t)}return t.prototype._init=function(t){this.attr(t)},t.prototype.drift=function(t,e,n){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=t,i[5]+=e,this.decomposeTransform(),this.markRedraw()},t.prototype.beforeUpdate=function(){},t.prototype.afterUpdate=function(){},t.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},t.prototype.updateInnerText=function(t){var e=this._textContent;if(e&&(!e.ignore||t)){this.textConfig||(this.textConfig={});var n=this.textConfig,i=n.local,r=e.innerTransformable,o=void 0,a=void 0,s=!1;r.parent=i?this:null;var l=!1;if(r.copyTransform(e),null!=n.position){var u=Sr;n.layoutRect?u.copy(n.layoutRect):u.copy(this.getBoundingRect()),i||u.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(br,n,u):mr(br,n,u),r.x=br.x,r.y=br.y,o=br.align,a=br.verticalAlign;var h=n.origin;if(h&&null!=n.rotation){var c=void 0,p=void 0;"center"===h?(c=.5*u.width,p=.5*u.height):(c=yr(h[0],u.width),p=yr(h[1],u.height)),l=!0,r.originX=-r.x+c+(i?0:u.x),r.originY=-r.y+p+(i?0:u.y)}}null!=n.rotation&&(r.rotation=n.rotation);var d=n.offset;d&&(r.x+=d[0],r.y+=d[1],l||(r.originX=-d[0],r.originY=-d[1]));var f=null==n.inside?"string"==typeof n.position&&n.position.indexOf("inside")>=0:n.inside,g=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),v=void 0,y=void 0,m=void 0;f&&this.canBeInsideText()?(v=n.insideFill,y=n.insideStroke,null!=v&&"auto"!==v||(v=this.getInsideTextFill()),null!=y&&"auto"!==y||(y=this.getInsideTextStroke(v),m=!0)):(v=n.outsideFill,y=n.outsideStroke,null!=v&&"auto"!==v||(v=this.getOutsideFill()),null!=y&&"auto"!==y||(y=this.getOutsideStroke(v),m=!0)),(v=v||"#000")===g.fill&&y===g.stroke&&m===g.autoStroke&&o===g.align&&a===g.verticalAlign||(s=!0,g.fill=v,g.stroke=y,g.autoStroke=m,g.align=o,g.verticalAlign=a,e.setDefaultTextStyle(g)),e.__dirty|=1,s&&e.dirtyStyle(!0)}},t.prototype.canBeInsideText=function(){return!0},t.prototype.getInsideTextFill=function(){return"#fff"},t.prototype.getInsideTextStroke=function(t){return"#000"},t.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?Ji:Qi},t.prototype.getOutsideStroke=function(t){var e=this.__zr&&this.__zr.getBackgroundColor(),n="string"==typeof e&&Wn(e);n||(n=[255,255,255,1]);for(var i=n[3],r=this.__zr.isDarkMode(),o=0;o<3;o++)n[o]=n[o]*i+(r?0:255)*(1-i);return n[3]=1,Kn(n,"rgba")},t.prototype.traverse=function(t,e){},t.prototype.attrKV=function(t,e){"textConfig"===t?this.setTextConfig(e):"textContent"===t?this.setTextContent(e):"clipPath"===t?this.setClipPath(e):"extra"===t?(this.extra=this.extra||{},k(this.extra,e)):this[t]=e},t.prototype.hide=function(){this.ignore=!0,this.markRedraw()},t.prototype.show=function(){this.ignore=!1,this.markRedraw()},t.prototype.attr=function(t,e){if("string"==typeof t)this.attrKV(t,e);else if(j(t))for(var n=F(t),i=0;i0},t.prototype.getState=function(t){return this.states[t]},t.prototype.ensureState=function(t){var e=this.states;return e[t]||(e[t]={}),e[t]},t.prototype.clearStates=function(t){this.useState(_r,!1,t)},t.prototype.useState=function(t,e,n,i){var r=t===_r;if(this.hasState()||!r){var o=this.currentStates,a=this.stateTransition;if(!(L(o,t)>=0)||!e&&1!==o.length){var s;if(this.stateProxy&&!r&&(s=this.stateProxy(t)),s||(s=this.states&&this.states[t]),s||r){r||this.saveCurrentToNormalState(s);var l=!!(s&&s.hoverLayer||i);l&&this._toggleHoverLayerFlag(!0),this._applyStateObj(t,s,this._normalState,e,!n&&!this.__inHover&&a&&a.duration>0,a);var u=this._textContent,h=this._textGuide;return u&&u.useState(t,e,n,l),h&&h.useState(t,e,n,l),r?(this.currentStates=[],this._normalState={}):e?this.currentStates.push(t):this.currentStates=[t],this._updateAnimationTargets(),this.markRedraw(),!l&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2),s}C("State "+t+" not exists.")}}},t.prototype.useStates=function(t,e,n){if(t.length){var i=[],r=this.currentStates,o=t.length,a=o===r.length;if(a)for(var s=0;s0,d);var f=this._textContent,g=this._textGuide;f&&f.useStates(t,e,c),g&&g.useStates(t,e,c),this._updateAnimationTargets(),this.currentStates=t.slice(),this.markRedraw(),!c&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2)}else this.clearStates()},t.prototype._updateAnimationTargets=function(){for(var t=0;t=0){var n=this.currentStates.slice();n.splice(e,1),this.useStates(n)}},t.prototype.replaceState=function(t,e,n){var i=this.currentStates.slice(),r=L(i,t),o=L(i,e)>=0;r>=0?o?i.splice(r,1):i[r]=e:n&&!o&&i.push(e),this.useStates(i)},t.prototype.toggleState=function(t,e){e?this.useState(t,!0):this.removeState(t)},t.prototype._mergeStates=function(t){for(var e,n={},i=0;i=0&&e.splice(n,1)})),this.animators.push(t),n&&n.animation.addAnimator(t),n&&n.wakeUp()},t.prototype.updateDuringAnimation=function(t){this.markRedraw()},t.prototype.stopAnimation=function(t,e){for(var n=this.animators,i=n.length,r=[],o=0;o0&&n.during&&o[0].during((function(t,e){n.during(e)}));for(var p=0;p0||r.force&&!a.length){var b,S=void 0,M=void 0,C=void 0;if(s){M={},p&&(S={});for(x=0;x<_;x++){M[y=g[x]]=n[y],p?S[y]=i[y]:n[y]=i[y]}}else if(p){C={};for(x=0;x<_;x++){C[y=g[x]]=bi(n[y]),Tr(n,i,y)}}(b=new Di(n,!1,!1,c?V(f,(function(t){return t.targetName===e})):null)).targetName=e,r.scope&&(b.scope=r.scope),p&&S&&b.whenWithKeys(0,S,g),C&&b.whenWithKeys(0,C,g),b.whenWithKeys(null==u?500:u,s?M:i,g).delay(h||0),t.addAnimator(b,e),a.push(b)}}R(Mr,Ut),R(Mr,sr);var kr=function(t){function e(e){var n=t.call(this)||this;return n.isGroup=!0,n._children=[],n.attr(e),n}return n(e,t),e.prototype.childrenRef=function(){return this._children},e.prototype.children=function(){return this._children.slice()},e.prototype.childAt=function(t){return this._children[t]},e.prototype.childOfName=function(t){for(var e=this._children,n=0;n=0&&(n.splice(i,0,t),this._doAdd(t))}return this},e.prototype.replace=function(t,e){var n=L(this._children,t);return n>=0&&this.replaceAt(e,n),this},e.prototype.replaceAt=function(t,e){var n=this._children,i=n[e];if(t&&t!==this&&t.parent!==this&&t!==i){n[e]=t,i.parent=null;var r=this.__zr;r&&i.removeSelfFromZr(r),this._doAdd(t)}return this},e.prototype._doAdd=function(t){t.parent&&t.parent.remove(t),t.parent=this;var e=this.__zr;e&&e!==t.__zr&&t.addSelfToZr(e),e&&e.refresh()},e.prototype.remove=function(t){var e=this.__zr,n=this._children,i=L(n,t);return i<0||(n.splice(i,1),t.parent=null,e&&t.removeSelfFromZr(e),e&&e.refresh()),this},e.prototype.removeAll=function(){for(var t=this._children,e=this.__zr,n=0;n0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},t.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},t.prototype.wakeUp=function(){this.animation.start(),this._stillFrameAccum=0},t.prototype.addHover=function(t){},t.prototype.removeHover=function(t){},t.prototype.clearHover=function(){},t.prototype.refreshHover=function(){this._needsRefreshHover=!0},t.prototype.refreshHoverImmediately=function(){this._needsRefreshHover=!1,this.painter.refreshHover&&"canvas"===this.painter.getType()&&this.painter.refreshHover()},t.prototype.resize=function(t){t=t||{},this.painter.resize(t.width,t.height),this.handler.resize()},t.prototype.clearAnimation=function(){this.animation.clear()},t.prototype.getWidth=function(){return this.painter.getWidth()},t.prototype.getHeight=function(){return this.painter.getHeight()},t.prototype.pathToImage=function(t,e){if(this.painter.pathToImage)return this.painter.pathToImage(t,e)},t.prototype.setCursorStyle=function(t){this.handler.setCursorStyle(t)},t.prototype.findHover=function(t,e){return this.handler.findHover(t,e)},t.prototype.on=function(t,e,n){return this.handler.on(t,e,n),this},t.prototype.off=function(t,e){this.handler.off(t,e)},t.prototype.trigger=function(t,e){this.handler.trigger(t,e)},t.prototype.clear=function(){for(var t=this.storage.getRoots(),e=0;e0){if(t<=e[0])return n[0];if(t>=e[1])return n[1]}else{if(t>=e[0])return n[0];if(t<=e[1])return n[1]}else{if(t===e[0])return n[0];if(t===e[1])return n[1]}return(t-e[0])/r*o+n[0]}function Fi(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%"}return"string"==typeof t?(n=t,n.replace(/^\s+|\s+$/g,"")).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t;var n}function Hi(t,e,n){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),n?t:+t}function Gi(t){return t.sort((function(t,e){return t-e})),t}function Wi(t){if(t=+t,isNaN(t))return 0;for(var e=1,n=0;Math.round(t*e)/e!==t;)e*=10,n++;return n}function Ui(t){var e=t.toString(),n=e.indexOf("e");if(n>0){var i=+e.slice(n+1);return i<0?-i:0}var r=e.indexOf(".");return r<0?0:e.length-1-r}function Yi(t,e){var n=Math.log,i=Math.LN10,r=Math.floor(n(t[1]-t[0])/i),o=Math.round(n(Math.abs(e[1]-e[0]))/i),a=Math.min(Math.max(-r+o,0),20);return isFinite(a)?a:20}function Xi(t,e,n){if(!t[e])return 0;var i=R(t,(function(t,e){return t+(isNaN(e)?0:e)}),0);if(0===i)return 0;for(var r=Math.pow(10,n),o=O(t,(function(t){return(isNaN(t)?0:t)/i*r*100})),a=100*r,s=O(o,(function(t){return Math.floor(t)})),l=R(s,(function(t,e){return t+e}),0),u=O(o,(function(t,e){return t-s[e]}));lh&&(h=u[p],c=p);++s[c],u[c]=0,++l}return s[e]/r}function Zi(t){var e=2*Math.PI;return(t%e+e)%e}function ji(t){return t>-1e-4&&t=10&&e++,e}function Qi(t,e){var n=Ji(t),i=Math.pow(10,n),r=t/i;return t=(e?r<1.5?1:r<2.5?2:r<4?3:r<7?5:10:r<1?1:r<2?2:r<3?3:r<5?5:10)*i,n>=-20?+t.toFixed(n<0?-n:0):t}function tr(t){var e=parseFloat(t);return e==t&&(0!==e||"string"!=typeof t||t.indexOf("x")<=0)?e:NaN}function er(t){return!isNaN(tr(t))}function nr(){return Math.round(9*Math.random())}function ir(t,e){return 0===e?t:ir(e,t%e)}function rr(t,e){return null==t?e:null==e?t:t*e/ir(t,e)}"undefined"!=typeof console&&console.warn&&console.log;function or(t){0}function ar(t){throw new Error(t)}var sr="series\0",lr="\0_ec_\0";function ur(t){return t instanceof Array?t:null==t?[]:[t]}function hr(t,e,n){if(t){t[e]=t[e]||{},t.emphasis=t.emphasis||{},t.emphasis[e]=t.emphasis[e]||{};for(var i=0,r=n.length;i=0||r&&A(r,s)<0)){var l=n.getShallow(s,e);null!=l&&(o[t[a][0]]=l)}}return o}}var Vr=zr([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),Fr=function(){function t(){}return t.prototype.getAreaStyle=function(t,e){return Vr(this,t,e)},t}(),Hr=new ke(50);function Gr(t){if("string"==typeof t){var e=Hr.get(t);return e&&e.image}return t}function Wr(t,e,n,i,r){if(t){if("string"==typeof t){if(e&&e.__zrImageSrc===t||!n)return e;var o=Hr.get(t),a={hostEl:n,cb:i,cbPayload:r};return o?!Yr(e=o.image)&&o.pending.push(a):((e=new Image).onload=e.onerror=Ur,Hr.put(t,e.__cachedImgObj={image:e,pending:[a]}),e.src=e.__zrImageSrc=t),e}return t}return e}function Ur(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e=a;l++)s-=a;var u=Ln(n,e);return u>s&&(n="",u=0),s=t-u,r.ellipsis=n,r.ellipsisWidth=u,r.contentWidth=s,r.containerWidth=t,r}function qr(t,e){var n=e.containerWidth,i=e.font,r=e.contentWidth;if(!n)return"";var o=Ln(t,i);if(o<=n)return t;for(var a=0;;a++){if(o<=r||a>=e.maxIterations){t+=e.ellipsis;break}var s=0===a?Kr(t,r,e.ascCharWidth,e.cnCharWidth):o>0?Math.floor(t.length*r/o):0;o=Ln(t=t.substr(0,s),i)}return""===t&&(t=e.placeholder),t}function Kr(t,e,n,i){for(var r=0,o=0,a=t.length;o=0?parseFloat(t)/100*e:parseFloat(t);return t}(l.width,i.width)+d;u.length>0&&f+i.accumWidth>i.width&&(o=e.split("\n"),c=!0),i.accumWidth=f}else{var g=io(e,h,i.width,i.breakAll,i.accumWidth);i.accumWidth=g.accumWidth+d,a=g.linesWidths,o=g.lines}}else o=e.split("\n");for(var y=0;y=33&&e<=255}(t)||!!eo[t]}function io(t,e,n,i,r){for(var o=[],a=[],s="",l="",u=0,h=0,c=0;cn:r+h+d>n)?h?(s||l)&&(f?(s||(s=l,l="",h=u=0),o.push(s),a.push(h-u),l+=p,s="",h=u+=d):(l&&(s+=l,h+=u,l="",u=0),o.push(s),a.push(h),s=p,h=d)):f?(o.push(l),a.push(u),l=p,u=d):(o.push(p),a.push(d)):(h+=d,f?(l+=p,u+=d):(l&&(s+=l,l="",u=0),s+=p))}else l&&(s+=l,h+=u),o.push(s),a.push(h),s="",l="",u=0,h=0}return o.length||s||(s=t,l="",u=0),l&&(s+=l),s&&(o.push(s),a.push(h)),1===o.length&&(h+=r),{accumWidth:h,lines:o,linesWidths:a}}var ro="__zr_style_"+Math.round(10*Math.random()),oo={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},ao={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};oo[ro]=!0;var so=["z","z2","invisible"],lo=function(t){function e(e){return t.call(this,e)||this}var i;return n(e,t),e.prototype._init=function(e){for(var n=E(e),i=0;i-1e-8&&tfo||t<-1e-8}function So(t,e,n,i,r){var o=1-r;return o*o*(o*t+3*r*e)+r*r*(r*i+3*o*n)}function Mo(t,e,n,i,r){var o=1-r;return 3*(((e-t)*o+2*(n-e)*r)*o+(i-n)*r*r)}function To(t,e,n,i,r,o){var a=i+3*(e-n)-t,s=3*(n-2*e+t),l=3*(e-t),u=t-r,h=s*s-3*a*l,c=s*l-9*a*u,p=l*l-3*s*u,d=0;if(bo(h)&&bo(c)){if(bo(s))o[0]=0;else(M=-l/s)>=0&&M<=1&&(o[d++]=M)}else{var f=c*c-4*h*p;if(bo(f)){var g=c/h,y=-g/2;(M=-s/a+g)>=0&&M<=1&&(o[d++]=M),y>=0&&y<=1&&(o[d++]=y)}else if(f>0){var v=po(f),m=h*s+1.5*a*(-c+v),_=h*s+1.5*a*(-c-v);(M=(-s-((m=m<0?-co(-m,vo):co(m,vo))+(_=_<0?-co(-_,vo):co(_,vo))))/(3*a))>=0&&M<=1&&(o[d++]=M)}else{var x=(2*h*s-3*a*c)/(2*po(h*h*h)),b=Math.acos(x)/3,w=po(h),S=Math.cos(b),M=(-s-2*w*S)/(3*a),T=(y=(-s+w*(S+yo*Math.sin(b)))/(3*a),(-s+w*(S-yo*Math.sin(b)))/(3*a));M>=0&&M<=1&&(o[d++]=M),y>=0&&y<=1&&(o[d++]=y),T>=0&&T<=1&&(o[d++]=T)}}return d}function Co(t,e,n,i,r){var o=6*n-12*e+6*t,a=9*e+3*i-3*t-9*n,s=3*e-3*t,l=0;if(bo(a)){if(wo(o))(h=-s/o)>=0&&h<=1&&(r[l++]=h)}else{var u=o*o-4*a*s;if(bo(u))r[0]=-o/(2*a);else if(u>0){var h,c=po(u),p=(-o-c)/(2*a);(h=(-o+c)/(2*a))>=0&&h<=1&&(r[l++]=h),p>=0&&p<=1&&(r[l++]=p)}}return l}function Io(t,e,n,i,r,o){var a=(e-t)*r+t,s=(n-e)*r+e,l=(i-n)*r+n,u=(s-a)*r+a,h=(l-s)*r+s,c=(h-u)*r+u;o[0]=t,o[1]=a,o[2]=u,o[3]=c,o[4]=c,o[5]=h,o[6]=l,o[7]=i}function Ao(t,e,n,i,r,o,a,s,l,u,h){var c,p,d,f,g,y=.005,v=1/0;mo[0]=l,mo[1]=u;for(var m=0;m<1;m+=.05)_o[0]=So(t,n,r,a,m),_o[1]=So(e,i,o,s,m),(f=It(mo,_o))=0&&f=0&&y1e-4)return s[0]=t-n,s[1]=e-i,l[0]=t+n,void(l[1]=e+i);if(Ho[0]=Vo(r)*n+t,Ho[1]=zo(r)*i+e,Go[0]=Vo(o)*n+t,Go[1]=zo(o)*i+e,u(s,Ho,Go),h(l,Ho,Go),(r%=Fo)<0&&(r+=Fo),(o%=Fo)<0&&(o+=Fo),r>o&&!a?o+=Fo:rr&&(Wo[0]=Vo(d)*n+t,Wo[1]=zo(d)*i+e,u(s,Wo,s),h(l,Wo,l))}var $o={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Jo=[],Qo=[],ta=[],ea=[],na=[],ia=[],ra=Math.min,oa=Math.max,aa=Math.cos,sa=Math.sin,la=Math.sqrt,ua=Math.abs,ha=Math.PI,ca=2*ha,pa="undefined"!=typeof Float32Array,da=[];function fa(t){return Math.round(t/ha*1e8)/1e8%2*ha}function ga(t,e){var n=fa(t[0]);n<0&&(n+=ca);var i=n-t[0],r=t[1];r+=i,!e&&r-n>=ca?r=n+ca:e&&n-r>=ca?r=n-ca:!e&&n>r?r=n+(ca-fa(n-r)):e&&n0&&(this._ux=ua(n/Fn/t)||0,this._uy=ua(n/Fn/e)||0)},t.prototype.setDPR=function(t){this.dpr=t},t.prototype.setContext=function(t){this._ctx=t},t.prototype.getContext=function(){return this._ctx},t.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},t.prototype.reset=function(){this._saveData&&(this._len=0),this._lineDash&&(this._lineDash=null,this._dashOffset=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},t.prototype.moveTo=function(t,e){return this.addData($o.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},t.prototype.lineTo=function(t,e){var n=ua(t-this._xi)>this._ux||ua(e-this._yi)>this._uy||this._len<5;return this.addData($o.L,t,e),this._ctx&&n&&(this._needsDash?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)),n&&(this._xi=t,this._yi=e),this},t.prototype.bezierCurveTo=function(t,e,n,i,r,o){return this.addData($o.C,t,e,n,i,r,o),this._ctx&&(this._needsDash?this._dashedBezierTo(t,e,n,i,r,o):this._ctx.bezierCurveTo(t,e,n,i,r,o)),this._xi=r,this._yi=o,this},t.prototype.quadraticCurveTo=function(t,e,n,i){return this.addData($o.Q,t,e,n,i),this._ctx&&(this._needsDash?this._dashedQuadraticTo(t,e,n,i):this._ctx.quadraticCurveTo(t,e,n,i)),this._xi=n,this._yi=i,this},t.prototype.arc=function(t,e,n,i,r,o){da[0]=i,da[1]=r,ga(da,o),i=da[0];var a=(r=da[1])-i;return this.addData($o.A,t,e,n,n,i,a,0,o?0:1),this._ctx&&this._ctx.arc(t,e,n,i,r,o),this._xi=aa(r)*n+t,this._yi=sa(r)*n+e,this},t.prototype.arcTo=function(t,e,n,i,r){return this._ctx&&this._ctx.arcTo(t,e,n,i,r),this},t.prototype.rect=function(t,e,n,i){return this._ctx&&this._ctx.rect(t,e,n,i),this.addData($o.R,t,e,n,i),this},t.prototype.closePath=function(){this.addData($o.Z);var t=this._ctx,e=this._x0,n=this._y0;return t&&(this._needsDash&&this._dashedLineTo(e,n),t.closePath()),this._xi=e,this._yi=n,this},t.prototype.fill=function(t){t&&t.fill(),this.toStatic()},t.prototype.stroke=function(t){t&&t.stroke(),this.toStatic()},t.prototype.setLineDash=function(t){if(t instanceof Array){this._lineDash=t,this._dashIdx=0;for(var e=0,n=0;nu.length&&(this._expandData(),u=this.data);for(var h=0;h0&&d<=t||h<0&&d>=t||0===h&&(c>0&&f<=e||c<0&&f>=e);)d+=h*(n=o[i=this._dashIdx]),f+=c*n,this._dashIdx=(i+1)%g,h>0&&dl||c>0&&fu||a[i%2?"moveTo":"lineTo"](h>=0?ra(d,t):oa(d,t),c>=0?ra(f,e):oa(f,e));h=d-t,c=f-e,this._dashOffset=-la(h*h+c*c)},t.prototype._dashedBezierTo=function(t,e,n,i,r,o){var a,s,l,u,h,c=this._ctx,p=this._dashSum,d=this._dashOffset,f=this._lineDash,g=this._xi,y=this._yi,v=0,m=this._dashIdx,_=f.length,x=0;for(d<0&&(d=p+d),d%=p,a=0;a<1;a+=.1)s=So(g,t,n,r,a+.1)-So(g,t,n,r,a),l=So(y,e,i,o,a+.1)-So(y,e,i,o,a),v+=la(s*s+l*l);for(;m<_&&!((x+=f[m])>d);m++);for(a=(x-d)/v;a<=1;)u=So(g,t,n,r,a),h=So(y,e,i,o,a),m%2?c.moveTo(u,h):c.lineTo(u,h),a+=f[m]/v,m=(m+1)%_;m%2!=0&&c.lineTo(r,o),s=r-u,l=o-h,this._dashOffset=-la(s*s+l*l)},t.prototype._dashedQuadraticTo=function(t,e,n,i){var r=n,o=i;n=(n+2*t)/3,i=(i+2*e)/3,t=(this._xi+2*t)/3,e=(this._yi+2*e)/3,this._dashedBezierTo(t,e,n,i,r,o)},t.prototype.toStatic=function(){if(this._saveData){var t=this.data;t instanceof Array&&(t.length=this._len,pa&&this._len>11&&(this.data=new Float32Array(t)))}},t.prototype.getBoundingRect=function(){ta[0]=ta[1]=na[0]=na[1]=Number.MAX_VALUE,ea[0]=ea[1]=ia[0]=ia[1]=-Number.MAX_VALUE;var t,e=this.data,n=0,i=0,r=0,o=0;for(t=0;tn||ua(y)>i||c===e-1)&&(f=Math.sqrt(D*D+y*y),r=g,o=_);break;case $o.C:var v=t[c++],m=t[c++],_=(g=t[c++],t[c++]),x=t[c++],b=t[c++];f=Do(r,o,v,m,g,_,x,b,10),r=x,o=b;break;case $o.Q:f=No(r,o,v=t[c++],m=t[c++],g=t[c++],_=t[c++],10),r=g,o=_;break;case $o.A:var w=t[c++],S=t[c++],M=t[c++],T=t[c++],C=t[c++],I=t[c++],A=I+C;c+=1;t[c++];d&&(a=aa(C)*M+w,s=sa(C)*T+S),f=oa(M,T)*ra(ca,Math.abs(I)),r=aa(A)*M+w,o=sa(A)*T+S;break;case $o.R:a=r=t[c++],s=o=t[c++],f=2*t[c++]+2*t[c++];break;case $o.Z:var D=a-r;y=s-o;f=Math.sqrt(D*D+y*y),r=a,o=s}f>=0&&(l[h++]=f,u+=f)}return this._pathLen=u,u},t.prototype.rebuildPath=function(t,e){var n,i,r,o,a,s,l,u,h=this.data,c=this._ux,p=this._uy,d=this._len,f=e<1,g=0,y=0;if(!f||(this._pathSegLen||this._calculateLength(),l=this._pathSegLen,u=e*this._pathLen))t:for(var v=0;vc||ua(s-o)>p||v===d-1){if(f){if(g+(G=l[y++])>u){var x=(u-g)/G;t.lineTo(r*(1-x)+a*x,o*(1-x)+s*x);break t}g+=G}t.lineTo(a,s),r=a,o=s}break;case $o.C:var b=h[v++],w=h[v++],S=h[v++],M=h[v++],T=h[v++],C=h[v++];if(f){if(g+(G=l[y++])>u){Io(r,b,S,T,x=(u-g)/G,Jo),Io(o,w,M,C,x,Qo),t.bezierCurveTo(Jo[1],Qo[1],Jo[2],Qo[2],Jo[3],Qo[3]);break t}g+=G}t.bezierCurveTo(b,w,S,M,T,C),r=T,o=C;break;case $o.Q:b=h[v++],w=h[v++],S=h[v++],M=h[v++];if(f){if(g+(G=l[y++])>u){Oo(r,b,S,x=(u-g)/G,Jo),Oo(o,w,M,x,Qo),t.quadraticCurveTo(Jo[1],Qo[1],Jo[2],Qo[2]);break t}g+=G}t.quadraticCurveTo(b,w,S,M),r=S,o=M;break;case $o.A:var I=h[v++],A=h[v++],D=h[v++],k=h[v++],L=h[v++],P=h[v++],O=h[v++],R=!h[v++],N=D>k?D:k,E=ua(D-k)>.001,B=L+P,z=!1;if(f)g+(G=l[y++])>u&&(B=L+P*(u-g)/G,z=!0),g+=G;if(E&&t.ellipse?t.ellipse(I,A,D,k,O,L,B,R):t.arc(I,A,N,L,B,R),z)break t;_&&(n=aa(L)*D+I,i=sa(L)*k+A),r=aa(B)*D+I,o=sa(B)*k+A;break;case $o.R:n=r=h[v],i=o=h[v+1],a=h[v++],s=h[v++];var V=h[v++],F=h[v++];if(f){if(g+(G=l[y++])>u){var H=u-g;t.moveTo(a,s),t.lineTo(a+ra(H,V),s),(H-=V)>0&&t.lineTo(a+V,s+ra(H,F)),(H-=F)>0&&t.lineTo(a+oa(V-H,0),s+F),(H-=V)>0&&t.lineTo(a,s+oa(F-H,0));break t}g+=G}t.rect(a,s,V,F);break;case $o.Z:if(f){var G;if(g+(G=l[y++])>u){x=(u-g)/G;t.lineTo(r*(1-x)+n*x,o*(1-x)+i*x);break t}g+=G}t.closePath(),r=n,o=i}}},t.CMD=$o,t.initDefaultProps=function(){var e=t.prototype;e._saveData=!0,e._needsDash=!1,e._dashOffset=0,e._dashIdx=0,e._dashSum=0,e._ux=0,e._uy=0}(),t}();function va(t,e,n,i,r,o,a){if(0===r)return!1;var s=r,l=0;if(a>e+s&&a>i+s||at+s&&o>n+s||oe+c&&h>i+c&&h>o+c&&h>s+c||ht+c&&u>n+c&&u>r+c&&u>a+c||ue+u&&l>i+u&&l>o+u||lt+u&&s>n+u&&s>r+u||sn||h+ur&&(r+=wa);var p=Math.atan2(l,s);return p<0&&(p+=wa),p>=i&&p<=r||p+wa>=i&&p+wa<=r}function Ma(t,e,n,i,r,o){if(o>e&&o>i||or?s:0}var Ta=ya.CMD,Ca=2*Math.PI;var Ia=[-1,-1,-1],Aa=[-1,-1];function Da(t,e,n,i,r,o,a,s,l,u){if(u>e&&u>i&&u>o&&u>s||u1&&(h=void 0,h=Aa[0],Aa[0]=Aa[1],Aa[1]=h),f=So(e,i,o,s,Aa[0]),d>1&&(g=So(e,i,o,s,Aa[1]))),2===d?ve&&s>i&&s>o||s=0&&h<=1&&(r[l++]=h);else{var u=a*a-4*o*s;if(bo(u))(h=-a/(2*o))>=0&&h<=1&&(r[l++]=h);else if(u>0){var h,c=po(u),p=(-a-c)/(2*o);(h=(-a+c)/(2*o))>=0&&h<=1&&(r[l++]=h),p>=0&&p<=1&&(r[l++]=p)}}return l}(e,i,o,s,Ia);if(0===l)return 0;var u=Po(e,i,o);if(u>=0&&u<=1){for(var h=0,c=ko(e,i,o,u),p=0;pn||s<-n)return 0;var l=Math.sqrt(n*n-s*s);Ia[0]=-l,Ia[1]=l;var u=Math.abs(i-r);if(u<1e-4)return 0;if(u>=Ca-1e-4){i=0,r=Ca;var h=o?1:-1;return a>=Ia[0]+t&&a<=Ia[1]+t?h:0}if(i>r){var c=i;i=r,r=c}i<0&&(i+=Ca,r+=Ca);for(var p=0,d=0;d<2;d++){var f=Ia[d];if(f+t>a){var g=Math.atan2(s,f);h=o?1:-1;g<0&&(g=Ca+g),(g>=i&&g<=r||g+Ca>=i&&g+Ca<=r)&&(g>Math.PI/2&&g<1.5*Math.PI&&(h=-h),p+=h)}}return p}function Pa(t,e,n,i,r){for(var o,a,s,l,u=t.data,h=t.len(),c=0,p=0,d=0,f=0,g=0,y=0;y1&&(n||(c+=Ma(p,d,f,g,i,r))),m&&(f=p=u[y],g=d=u[y+1]),v){case Ta.M:p=f=u[y++],d=g=u[y++];break;case Ta.L:if(n){if(va(p,d,u[y],u[y+1],e,i,r))return!0}else c+=Ma(p,d,u[y],u[y+1],i,r)||0;p=u[y++],d=u[y++];break;case Ta.C:if(n){if(ma(p,d,u[y++],u[y++],u[y++],u[y++],u[y],u[y+1],e,i,r))return!0}else c+=Da(p,d,u[y++],u[y++],u[y++],u[y++],u[y],u[y+1],i,r)||0;p=u[y++],d=u[y++];break;case Ta.Q:if(n){if(_a(p,d,u[y++],u[y++],u[y],u[y+1],e,i,r))return!0}else c+=ka(p,d,u[y++],u[y++],u[y],u[y+1],i,r)||0;p=u[y++],d=u[y++];break;case Ta.A:var _=u[y++],x=u[y++],b=u[y++],w=u[y++],S=u[y++],M=u[y++];y+=1;var T=!!(1-u[y++]);o=Math.cos(S)*b+_,a=Math.sin(S)*w+x,m?(f=o,g=a):c+=Ma(p,d,o,a,i,r);var C=(i-_)*w/b+_;if(n){if(Sa(_,x,w,S,S+M,T,e,C,r))return!0}else c+=La(_,x,w,S,S+M,T,C,r);p=Math.cos(S+M)*b+_,d=Math.sin(S+M)*w+x;break;case Ta.R:if(f=p=u[y++],g=d=u[y++],o=f+u[y++],a=g+u[y++],n){if(va(f,g,o,g,e,i,r)||va(o,g,o,a,e,i,r)||va(o,a,f,a,e,i,r)||va(f,a,f,g,e,i,r))return!0}else c+=Ma(o,g,o,a,i,r),c+=Ma(f,a,f,g,i,r);break;case Ta.Z:if(n){if(va(p,d,f,g,e,i,r))return!0}else c+=Ma(p,d,f,g,i,r);p=f,d=g}}return n||(s=d,l=g,Math.abs(s-l)<1e-4)||(c+=Ma(p,d,f,g,i,r)||0),0!==c}var Oa=C({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},oo),Ra={style:C({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},ao.style)},Na=["x","y","rotation","scaleX","scaleY","originX","originY","invisible","culling","z","z2","zlevel","parent"],Ea=function(t){function e(e){return t.call(this,e)||this}var i;return n(e,t),e.prototype.update=function(){var n=this;t.prototype.update.call(this);var i=this.style;if(i.decal){var r=this._decalEl=this._decalEl||new e;r.buildPath===e.prototype.buildPath&&(r.buildPath=function(t){n.buildPath(t,n.shape)}),r.silent=!0;var o=r.style;for(var a in i)o[a]!==i[a]&&(o[a]=i[a]);o.fill=i.fill?i.decal:null,o.decal=null,o.shadowColor=null,i.strokeFirst&&(o.stroke=null);for(var s=0;s.5?Hn:e>.2?"#eee":Gn}if(t)return Gn}return Hn},e.prototype.getInsideTextStroke=function(t){var e=this.style.fill;if(H(e)){var n=this.__zr;if(!(!n||!n.isDarkMode())===Qe(t,0)<.4)return e}},e.prototype.buildPath=function(t,e,n){},e.prototype.pathUpdated=function(){this.__dirty&=~e.SHAPE_CHANGED_BIT},e.prototype.createPathProxy=function(){this.path=new ya(!1)},e.prototype.hasStroke=function(){var t=this.style,e=t.stroke;return!(null==e||"none"===e||!(t.lineWidth>0))},e.prototype.hasFill=function(){var t=this.style.fill;return null!=t&&"none"!==t},e.prototype.getBoundingRect=function(){var t=this._rect,n=this.style,i=!t;if(i){var r=!1;this.path||(r=!0,this.createPathProxy());var o=this.path;(r||this.__dirty&e.SHAPE_CHANGED_BIT)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),t=o.getBoundingRect()}if(this._rect=t,this.hasStroke()&&this.path&&this.path.len()>0){var a=this._rectWithStroke||(this._rectWithStroke=t.clone());if(this.__dirty||i){a.copy(t);var s=n.strokeNoScale?this.getLineScale():1,l=n.lineWidth;if(!this.hasFill()){var u=this.strokeContainThreshold;l=Math.max(l,null==u?4:u)}s>1e-10&&(a.width+=l/s,a.height+=l/s,a.x-=l/s/2,a.y-=l/s/2)}return a}return t},e.prototype.contain=function(t,e){var n=this.transformCoordToLocal(t,e),i=this.getBoundingRect(),r=this.style;if(t=n[0],e=n[1],i.contain(t,e)){var o=this.path;if(this.hasStroke()){var a=r.lineWidth,s=r.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(this.hasFill()||(a=Math.max(a,this.strokeContainThreshold)),function(t,e,n,i){return Pa(t,e,!0,n,i)}(o,a/s,t,e)))return!0}if(this.hasFill())return function(t,e,n){return Pa(t,0,!1,e,n)}(o,t,e)}return!1},e.prototype.dirtyShape=function(){this.__dirty|=e.SHAPE_CHANGED_BIT,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},e.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},e.prototype.animateShape=function(t){return this.animate("shape",t)},e.prototype.updateDuringAnimation=function(t){"style"===t?this.dirtyStyle():"shape"===t?this.dirtyShape():this.markRedraw()},e.prototype.attrKV=function(e,n){"shape"===e?this.setShape(n):t.prototype.attrKV.call(this,e,n)},e.prototype.setShape=function(t,e){var n=this.shape;return n||(n=this.shape={}),"string"==typeof t?n[t]=e:T(n,t),this.dirtyShape(),this},e.prototype.shapeChanged=function(){return!!(this.__dirty&e.SHAPE_CHANGED_BIT)},e.prototype.createStyle=function(t){return ht(Oa,t)},e.prototype._innerSaveToNormal=function(e){t.prototype._innerSaveToNormal.call(this,e);var n=this._normalState;e.shape&&!n.shape&&(n.shape=T({},this.shape))},e.prototype._applyStateObj=function(e,n,i,r,o,a){t.prototype._applyStateObj.call(this,e,n,i,r,o,a);var s,l=!(n&&r);if(n&&n.shape?o?r?s=n.shape:(s=T({},i.shape),T(s,n.shape)):(s=T({},r?this.shape:i.shape),T(s,n.shape)):l&&(s=i.shape),s)if(o){this.shape=T({},this.shape);for(var u={},h=E(s),c=0;c0},e.prototype.hasFill=function(){var t=this.style.fill;return null!=t&&"none"!==t},e.prototype.createStyle=function(t){return ht(Ba,t)},e.prototype.setBoundingRect=function(t){this._rect=t},e.prototype.getBoundingRect=function(){var t=this.style;if(!this._rect){var e=t.text;null!=e?e+="":e="";var n=On(e,t.font,t.textAlign,t.textBaseline);if(n.x+=t.x||0,n.y+=t.y||0,this.hasStroke()){var i=t.lineWidth;n.x-=i/2,n.y-=i/2,n.width+=i,n.height+=i}this._rect=n}return this._rect},e.initDefaultProps=void(e.prototype.dirtyRectTolerance=10),e}(lo);za.prototype.type="tspan";var Va=C({x:0,y:0},oo),Fa={style:C({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},ao.style)};var Ha=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.createStyle=function(t){return ht(Va,t)},e.prototype._getSize=function(t){var e=this.style,n=e[t];if(null!=n)return n;var i,r=(i=e.image)&&"string"!=typeof i&&i.width&&i.height?e.image:this.__image;if(!r)return 0;var o="width"===t?"height":"width",a=e[o];return null==a?r[t]:r[t]/r[o]*a},e.prototype.getWidth=function(){return this._getSize("width")},e.prototype.getHeight=function(){return this._getSize("height")},e.prototype.getAnimationStyleProps=function(){return Fa},e.prototype.getBoundingRect=function(){var t=this.style;return this._rect||(this._rect=new In(t.x||0,t.y||0,this.getWidth(),this.getHeight())),this._rect},e}(lo);Ha.prototype.type="image";var Ga=Math.round;function Wa(t,e,n){if(e){var i=e.x1,r=e.x2,o=e.y1,a=e.y2;t.x1=i,t.x2=r,t.y1=o,t.y2=a;var s=n&&n.lineWidth;return s?(Ga(2*i)===Ga(2*r)&&(t.x1=t.x2=Ya(i,s,!0)),Ga(2*o)===Ga(2*a)&&(t.y1=t.y2=Ya(o,s,!0)),t):t}}function Ua(t,e,n){if(e){var i=e.x,r=e.y,o=e.width,a=e.height;t.x=i,t.y=r,t.width=o,t.height=a;var s=n&&n.lineWidth;return s?(t.x=Ya(i,s,!0),t.y=Ya(r,s,!0),t.width=Math.max(Ya(i+o,s,!1)-t.x,0===o?0:1),t.height=Math.max(Ya(r+a,s,!1)-t.y,0===a?0:1),t):t}}function Ya(t,e,n){if(!e)return t;var i=Ga(2*t);return(i+Ga(e))%2==0?i/2:(i+(n?1:-1))/2}var Xa=function(){this.x=0,this.y=0,this.width=0,this.height=0},Za={},ja=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getDefaultShape=function(){return new Xa},e.prototype.buildPath=function(t,e){var n,i,r,o;if(this.subPixelOptimize){var a=Ua(Za,e,this.style);n=a.x,i=a.y,r=a.width,o=a.height,a.r=e.r,e=a}else n=e.x,i=e.y,r=e.width,o=e.height;e.r?function(t,e){var n,i,r,o,a,s=e.x,l=e.y,u=e.width,h=e.height,c=e.r;u<0&&(s+=u,u=-u),h<0&&(l+=h,h=-h),"number"==typeof c?n=i=r=o=c:c instanceof Array?1===c.length?n=i=r=o=c[0]:2===c.length?(n=r=c[0],i=o=c[1]):3===c.length?(n=c[0],i=o=c[1],r=c[2]):(n=c[0],i=c[1],r=c[2],o=c[3]):n=i=r=o=0,n+i>u&&(n*=u/(a=n+i),i*=u/a),r+o>u&&(r*=u/(a=r+o),o*=u/a),i+r>h&&(i*=h/(a=i+r),r*=h/a),n+o>h&&(n*=h/(a=n+o),o*=h/a),t.moveTo(s+n,l),t.lineTo(s+u-i,l),0!==i&&t.arc(s+u-i,l+i,i,-Math.PI/2,0),t.lineTo(s+u,l+h-r),0!==r&&t.arc(s+u-r,l+h-r,r,0,Math.PI/2),t.lineTo(s+o,l+h),0!==o&&t.arc(s+o,l+h-o,o,Math.PI/2,Math.PI),t.lineTo(s,l+n),0!==n&&t.arc(s+n,l+n,n,Math.PI,1.5*Math.PI)}(t,e):t.rect(n,i,r,o)},e.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},e}(Ea);ja.prototype.type="rect";var qa={fill:"#000"},Ka={style:C({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},ao.style)},$a=function(t){function e(e){var n=t.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=qa,n.attr(e),n}return n(e,t),e.prototype.childrenRef=function(){return this._children},e.prototype.update=function(){this.styleChanged()&&this._updateSubTexts();for(var e=0;ep&&u){var d=Math.floor(p/l);n=n.slice(0,d)}var f=p,g=h;if(r&&(f+=r[0]+r[2],null!=g&&(g+=r[1]+r[3])),t&&a&&null!=g)for(var y=jr(h,o,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),v=0;v0,T=null!=t.width&&("truncate"===t.overflow||"break"===t.overflow||"breakAll"===t.overflow),C=i.calculatedLineHeight,I=0;Il&&to(n,t.substring(l,u),e,s),to(n,i[2],e,s,i[1]),l=Xr.lastIndex}lo){b>0?(m.tokens=m.tokens.slice(0,b),y(m,x,_),n.lines=n.lines.slice(0,v+1)):n.lines=n.lines.slice(0,v);break t}var I=w.width,A=null==I||"auto"===I;if("string"==typeof I&&"%"===I.charAt(I.length-1))P.percentWidth=I,h.push(P),P.contentWidth=Ln(P.text,T);else{if(A){var D=w.backgroundColor,k=D&&D.image;k&&Yr(k=Gr(k))&&(P.width=Math.max(P.width,k.width*C/k.height))}var L=f&&null!=r?r-x:null;null!=L&&L=0&&"right"===(I=_[C]).align;)this._placeToken(I,t,b,f,T,"right",y),w-=I.width,T-=I.width,C--;for(M+=(n-(M-d)-(g-T)-w)/2;S<=C;)I=_[S],this._placeToken(I,t,b,f,M+I.width/2,"center",y),M+=I.width,S++;f+=b}},e.prototype._placeToken=function(t,e,n,i,r,o,a){var s=e.rich[t.styleName]||{};s.text=t.text;var l=t.verticalAlign,u=i+n/2;"top"===l?u=i+t.height/2:"bottom"===l&&(u=i+n-t.height/2),!t.isLineHolder&&rs(s)&&this._renderBackground(s,e,"right"===o?r-t.width:"center"===o?r-t.width/2:r,u-t.height/2,t.width,t.height);var h=!!s.backgroundColor,c=t.textPadding;c&&(r=ns(r,o,c),u-=t.height/2-c[0]-t.innerHeight/2);var p=this._getOrCreateChild(za),d=p.createStyle();p.useStyle(d);var f=this._defaultStyle,g=!1,y=0,v=es("fill"in s?s.fill:"fill"in e?e.fill:(g=!0,f.fill)),m=es("stroke"in s?s.stroke:"stroke"in e?e.stroke:h||a||f.autoStroke&&!g?null:(y=2,f.stroke)),_=s.textShadowBlur>0||e.textShadowBlur>0;d.text=t.text,d.x=r,d.y=u,_&&(d.shadowBlur=s.textShadowBlur||e.textShadowBlur||0,d.shadowColor=s.textShadowColor||e.textShadowColor||"transparent",d.shadowOffsetX=s.textShadowOffsetX||e.textShadowOffsetX||0,d.shadowOffsetY=s.textShadowOffsetY||e.textShadowOffsetY||0),d.textAlign=o,d.textBaseline="middle",d.font=t.font||Dn,d.opacity=tt(s.opacity,e.opacity,1),m&&(d.lineWidth=tt(s.lineWidth,e.lineWidth,y),d.lineDash=Q(s.lineDash,e.lineDash),d.lineDashOffset=e.lineDashOffset||0,d.stroke=m),v&&(d.fill=v);var x=t.contentWidth,b=t.contentHeight;p.setBoundingRect(new In(Rn(d.x,x,d.textAlign),Nn(d.y,b,d.textBaseline),x,b))},e.prototype._renderBackground=function(t,e,n,i,r,o){var a,s,l,u=t.backgroundColor,h=t.borderWidth,c=t.borderColor,p=H(u),d=t.borderRadius,f=this;if(p||h&&c){(a=this._getOrCreateChild(ja)).useStyle(a.createStyle()),a.style.fill=null;var g=a.shape;g.x=n,g.y=i,g.width=r,g.height=o,g.r=d,a.dirtyShape()}if(p)(l=a.style).fill=u||null,l.fillOpacity=Q(t.fillOpacity,1);else if(u&&u.image){(s=this._getOrCreateChild(Ha)).onload=function(){f.dirtyStyle()};var y=s.style;y.image=u.image,y.x=n,y.y=i,y.width=r,y.height=o}h&&c&&((l=a.style).lineWidth=h,l.stroke=c,l.strokeOpacity=Q(t.strokeOpacity,1),l.lineDash=t.borderDash,l.lineDashOffset=t.borderDashOffset||0,a.strokeContainThreshold=0,a.hasFill()&&a.hasStroke()&&(l.strokeFirst=!0,l.lineWidth*=2));var v=(a||s).style;v.shadowBlur=t.shadowBlur||0,v.shadowColor=t.shadowColor||"transparent",v.shadowOffsetX=t.shadowOffsetX||0,v.shadowOffsetY=t.shadowOffsetY||0,v.opacity=tt(t.opacity,e.opacity,1)},e.makeFont=function(t){var e="";if(t.fontSize||t.fontFamily||t.fontWeight){var n="";n="string"!=typeof t.fontSize||-1===t.fontSize.indexOf("px")&&-1===t.fontSize.indexOf("rem")&&-1===t.fontSize.indexOf("em")?isNaN(+t.fontSize)?"12px":t.fontSize+"px":t.fontSize,e=[t.fontStyle,t.fontWeight,n,t.fontFamily||"sans-serif"].join(" ")}return e&&rt(e)||t.textFont||t.font},e}(lo),Ja={left:!0,right:1,center:1},Qa={top:1,bottom:1,middle:1};function ts(t){if(t){t.font=$a.makeFont(t);var e=t.align;"middle"===e&&(e="center"),t.align=null==e||Ja[e]?e:"left";var n=t.verticalAlign;"center"===n&&(n="middle"),t.verticalAlign=null==n||Qa[n]?n:"top",t.padding&&(t.padding=nt(t.padding))}}function es(t,e){return null==t||e<=0||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function ns(t,e,n){return"right"===e?t-n[1]:"center"===e?t+n[3]/2-n[1]/2:t+n[3]}function is(t){var e=t.text;return null!=e&&(e+=""),e}function rs(t){return!!(t.backgroundColor||t.borderWidth&&t.borderColor)}var os=xr(),as=1,ss={},ls=xr(),us=["emphasis","blur","select"],hs=["normal","emphasis","blur","select"],cs="highlight",ps="downplay",ds="select",fs="unselect",gs="toggleSelect";function ys(t){return null!=t&&"none"!==t}var vs=new ke(100);function ms(t){if("string"!=typeof t)return t;var e=vs.get(t);return e||(e=Ye(t,-.1),vs.put(t,e)),e}function _s(t,e,n){t.onHoverStateChange&&(t.hoverState||0)!==n&&t.onHoverStateChange(e),t.hoverState=n}function xs(t){_s(t,"emphasis",2)}function bs(t){2===t.hoverState&&_s(t,"normal",0)}function ws(t){_s(t,"blur",1)}function Ss(t){1===t.hoverState&&_s(t,"normal",0)}function Ms(t){t.selected=!0}function Ts(t){t.selected=!1}function Cs(t,e,n){e(t,n)}function Is(t,e,n){Cs(t,e,n),t.isGroup&&t.traverse((function(t){Cs(t,e,n)}))}function As(t,e){switch(e){case"emphasis":t.hoverState=2;break;case"normal":t.hoverState=0;break;case"blur":t.hoverState=1;break;case"select":t.selected=!0}}function Ds(t,e){var n=this.states[t];if(this.style){if("emphasis"===t)return function(t,e,n,i){var r=n&&A(n,"select")>=0,o=!1;if(t instanceof Ea){var a=ls(t),s=r&&a.selectFill||a.normalFill,l=r&&a.selectStroke||a.normalStroke;if(ys(s)||ys(l)){var u=(i=i||{}).style||{};!ys(u.fill)&&ys(s)?(o=!0,i=T({},i),(u=T({},u)).fill=ms(s)):!ys(u.stroke)&&ys(l)&&(o||(i=T({},i),u=T({},u)),u.stroke=ms(l)),i.style=u}}if(i&&null==i.z2){o||(i=T({},i));var h=t.z2EmphasisLift;i.z2=t.z2+(null!=h?h:10)}return i}(this,0,e,n);if("blur"===t)return function(t,e,n){var i=A(t.currentStates,e)>=0,r=t.style.opacity,o=i?null:function(t,e,n,i){for(var r=t.style,o={},a=0;a0){var o={dataIndex:r,seriesIndex:t.seriesIndex};null!=i&&(o.dataType=i),e.push(o)}}))})),e}function Hs(t,e,n){!function(t,e){var n=!1===e,i=t;t.highDownSilentOnTouch&&(i.__highDownSilentOnTouch=t.highDownSilentOnTouch);n&&!i.__highDownDispatcher||(i.__highByOuter=i.__highByOuter||0,i.__highDownDispatcher=!n)}(t,!0),Is(t,ks),function(t,e,n){var i=os(t);null!=e?(i.focus=e,i.blurScope=n):i.focus&&(i.focus=null)}(t,e,n)}var Gs=["emphasis","blur","select"],Ws={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function Us(t,e,n,i){n=n||"itemStyle";for(var r=0;r1&&(a*=Js(f),s*=Js(f));var g=(r===o?-1:1)*Js((a*a*(s*s)-a*a*(d*d)-s*s*(p*p))/(a*a*(d*d)+s*s*(p*p)))||0,y=g*a*d/s,v=g*-s*p/a,m=(t+n)/2+tl(c)*y-Qs(c)*v,_=(e+i)/2+Qs(c)*y+tl(c)*v,x=rl([1,0],[(p-y)/a,(d-v)/s]),b=[(p-y)/a,(d-v)/s],w=[(-1*p-y)/a,(-1*d-v)/s],S=rl(b,w);if(il(b,w)<=-1&&(S=el),il(b,w)>=1&&(S=0),S<0){var M=Math.round(S/el*1e6)/1e6;S=2*el+M%2*el}h.addData(u,m,_,a,s,x,S,c,o)}var al=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,sl=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;var ll=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.applyTransform=function(t){},e}(Ea);function ul(t){return null!=t.setData}function hl(t,e){var n=function(t){var e=new ya;if(!t)return e;var n,i=0,r=0,o=i,a=r,s=ya.CMD,l=t.match(al);if(!l)return e;for(var u=0;uk*k+L*L&&(M=C,T=I),{cx:M,cy:T,x01:-h,y01:-c,x11:M*(r/b-1),y11:T*(r/b-1)}}function Il(t,e){var n=Sl(e.r,0),i=Sl(e.r0||0,0),r=n>0;if(r||i>0){if(r||(n=i,i=0),i>n){var o=n;n=i,i=o}var a=!!e.clockwise,s=e.startAngle,l=e.endAngle,u=[s,l];ga(u,!a);var h=bl(u[0]-u[1]),c=e.cx,p=e.cy,d=e.cornerRadius||0,f=e.innerCornerRadius||0;if(n>Tl)if(h>yl-Tl)t.moveTo(c+n*ml(s),p+n*vl(s)),t.arc(c,p,n,s,l,!a),i>Tl&&(t.moveTo(c+i*ml(l),p+i*vl(l)),t.arc(c,p,i,l,s,a));else{var g=bl(n-i)/2,y=Ml(g,d),v=Ml(g,f),m=v,_=y,x=n*ml(s),b=n*vl(s),w=i*ml(l),S=i*vl(l),M=void 0,T=void 0,C=void 0,I=void 0;if((y>Tl||v>Tl)&&(M=n*ml(l),T=n*vl(l),C=i*ml(s),I=i*vl(s),hTl)if(_>Tl){var N=Cl(C,I,x,b,n,_,a),E=Cl(M,T,w,S,n,_,a);t.moveTo(c+N.cx+N.x01,p+N.cy+N.y01),_Tl&&h>Tl)if(m>Tl){N=Cl(w,S,M,T,i,-m,a),E=Cl(x,b,C,I,i,-m,a);t.lineTo(c+N.cx+N.x01,p+N.cy+N.y01),m=2){if(i&&"spline"!==i){var o=function(t,e,n,i){var r,o,a,s,l=[],u=[],h=[],c=[];if(i){a=[1/0,1/0],s=[-1/0,-1/0];for(var p=0,d=t.length;pn-2?n-1:l+1],d=t[l>n-3?n-1:l+2]);var f=u*u,g=u*f;i.push([Pl(h[0],c[0],p[0],d[0],u,f,g),Pl(h[1],c[1],p[1],d[1],u,f,g)])}return i}(r,n)),t.moveTo(r[0][0],r[0][1]);s=1;for(var c=r.length;sJl[1]){if(a=!1,r)return a;var u=Math.abs(Jl[0]-$l[1]),h=Math.abs($l[0]-Jl[1]);Math.min(u,h)>i.len()&&(u0?l?e.animateFrom(n,{duration:f,delay:y||0,easing:g,done:o,force:!!o||!!a,scope:t,during:a}):e.animateTo(n,{duration:f,delay:y||0,easing:g,done:o,force:!!o||!!a,setToFinal:!0,scope:t,during:a}):(e.stopAnimation(),!l&&e.attr(n),o&&o())}else e.stopAnimation(),!l&&e.attr(n),a&&a(1),o&&o()}function _u(t,e,n,i,r,o){mu("update",t,e,n,i,r,o)}function xu(t,e,n,i,r,o){mu("init",t,e,n,i,r,o)}function bu(t,e,n,i,r,o){Mu(t)||mu("remove",t,e,n,i,r,o)}function wu(t,e,n,i){t.removeTextContent(),t.removeTextGuideLine(),bu(t,{style:{opacity:0}},e,n,i)}function Su(t,e,n){function i(){t.parent&&t.parent.remove(t)}t.isGroup?t.traverse((function(t){t.isGroup||wu(t,e,n,i)})):wu(t,e,n,i)}function Mu(t){if(!t.__zr)return!0;for(var e=0;eMath.abs(o[1])?o[0]>0?"right":"left":o[1]>0?"bottom":"top"}function Au(t){return!t.isGroup}function Du(t,e,n){if(t&&e){var i,r=(i={},t.traverse((function(t){Au(t)&&t.anid&&(i[t.anid]=t)})),i);e.traverse((function(t){if(Au(t)&&t.anid){var e=r[t.anid];if(e){var i=o(t);t.attr(o(e)),_u(t,i,n,os(t).dataIndex)}}}))}function o(t){var e={x:t.x,y:t.y,rotation:t.rotation};return function(t){return null!=t.shape}(t)&&(e.shape=T({},t.shape)),e}}function ku(t,e){return O(t,(function(t){var n=t[0];n=ru(n,e.x),n=ou(n,e.x+e.width);var i=t[1];return i=ru(i,e.y),[n,i=ou(i,e.y+e.height)]}))}function Lu(t,e){var n=ru(t.x,e.x),i=ou(t.x+t.width,e.x+e.width),r=ru(t.y,e.y),o=ou(t.y+t.height,e.y+e.height);if(i>=n&&o>=r)return{x:n,y:r,width:i-n,height:o-r}}function Pu(t,e,n){var i=T({rectHover:!0},e),r=i.style={strokeNoScale:!0};if(n=n||{x:-1,y:-1,width:2,height:2},t)return 0===t.indexOf("image://")?(r.image=t.slice(8),C(r,n),new Ha(i)):pu(t.replace("path://",""),i,n,"center")}function Ou(t,e,n,i,r,o,a,s){var l,u=n-t,h=i-e,c=a-r,p=s-o,d=Ru(c,p,u,h);if((l=d)<=1e-6&&l>=-1e-6)return!1;var f=t-r,g=e-o,y=Ru(f,g,u,h)/d;if(y<0||y>1)return!1;var v=Ru(f,g,c,p)/d;return!(v<0||v>1)}function Ru(t,e,n,i){return t*i-n*e}hu("circle",pl),hu("ellipse",fl),hu("sector",Dl),hu("ring",Ll),hu("polygon",Nl),hu("polyline",Bl),hu("rect",ja),hu("line",Fl),hu("bezierCurve",Ul),hu("arc",Xl);var Nu=Object.freeze({__proto__:null,extendShape:su,extendPath:uu,registerShape:hu,getShapeClass:cu,makePath:pu,makeImage:du,mergePath:gu,resizePath:yu,subPixelOptimizeLine:function(t){return Wa(t.shape,t.shape,t.style),t},subPixelOptimizeRect:function(t){return Ua(t.shape,t.shape,t.style),t},subPixelOptimize:vu,updateProps:_u,initProps:xu,removeElement:bu,removeElementWithFadeOut:Su,isElementRemoved:Mu,getTransform:Tu,applyTransform:Cu,transformDirection:Iu,groupTransition:Du,clipPointsByRect:ku,clipRectByRect:Lu,createIcon:Pu,linePolygonIntersect:function(t,e,n,i,r){for(var o=0,a=r[r.length-1];o-1?uh:ch;function gh(t,e){t=t.toUpperCase(),dh[t]=new oh(e),ph[t]=e}gh(hh,{time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Guage",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}}),gh(uh,{time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}});var yh=1e3,vh=6e4,mh=36e5,_h=864e5,xh=31536e6,bh={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{hh}:{mm}:{ss} {SSS}",none:"{yyyy}-{MM}-{dd} {hh}:{mm}:{ss} {SSS}"},wh="{yyyy}-{MM}-{dd}",Sh={year:"{yyyy}",month:"{yyyy}-{MM}",day:wh,hour:"{yyyy}-{MM}-{dd} "+bh.hour,minute:"{yyyy}-{MM}-{dd} "+bh.minute,second:"{yyyy}-{MM}-{dd} "+bh.second,millisecond:bh.none},Mh=["year","month","day","hour","minute","second","millisecond"],Th=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function Ch(t,e){return"0000".substr(0,e-(t+="").length)+t}function Ih(t){switch(t){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return t}}function Ah(t){return t===Ih(t)}function Dh(t,e,n,i){var r=Ki(t),o=r[Ph(n)](),a=r[Oh(n)]()+1,s=Math.floor((a-1)/4)+1,l=r[Rh(n)](),u=r["get"+(n?"UTC":"")+"Day"](),h=r[Nh(n)](),c=(h-1)%12+1,p=r[Eh(n)](),d=r[Bh(n)](),f=r[zh(n)](),g=(i instanceof oh?i:function(t){return dh[t]}(i||fh)||dh.EN).getModel("time"),y=g.get("month"),v=g.get("monthAbbr"),m=g.get("dayOfWeek"),_=g.get("dayOfWeekAbbr");return(e||"").replace(/{yyyy}/g,o+"").replace(/{yy}/g,o%100+"").replace(/{Q}/g,s+"").replace(/{MMMM}/g,y[a-1]).replace(/{MMM}/g,v[a-1]).replace(/{MM}/g,Ch(a,2)).replace(/{M}/g,a+"").replace(/{dd}/g,Ch(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,m[u]).replace(/{ee}/g,_[u]).replace(/{e}/g,u+"").replace(/{HH}/g,Ch(h,2)).replace(/{H}/g,h+"").replace(/{hh}/g,Ch(c+"",2)).replace(/{h}/g,c+"").replace(/{mm}/g,Ch(p,2)).replace(/{m}/g,p+"").replace(/{ss}/g,Ch(d,2)).replace(/{s}/g,d+"").replace(/{SSS}/g,Ch(f,3)).replace(/{S}/g,f+"")}function kh(t,e){var n=Ki(t),i=n[Oh(e)]()+1,r=n[Rh(e)](),o=n[Nh(e)](),a=n[Eh(e)](),s=n[Bh(e)](),l=0===n[zh(e)](),u=l&&0===s,h=u&&0===a,c=h&&0===o,p=c&&1===r;return p&&1===i?"year":p?"month":c?"day":h?"hour":u?"minute":l?"second":"millisecond"}function Lh(t,e,n){var i="number"==typeof t?Ki(t):t;switch(e=e||kh(t,n)){case"year":return i[Ph(n)]();case"half-year":return i[Oh(n)]()>=6?1:0;case"quarter":return Math.floor((i[Oh(n)]()+1)/4);case"month":return i[Oh(n)]();case"day":return i[Rh(n)]();case"half-day":return i[Nh(n)]()/24;case"hour":return i[Nh(n)]();case"minute":return i[Eh(n)]();case"second":return i[Bh(n)]();case"millisecond":return i[zh(n)]()}}function Ph(t){return t?"getUTCFullYear":"getFullYear"}function Oh(t){return t?"getUTCMonth":"getMonth"}function Rh(t){return t?"getUTCDate":"getDate"}function Nh(t){return t?"getUTCHours":"getHours"}function Eh(t){return t?"getUTCMinutes":"getMinutes"}function Bh(t){return t?"getUTCSeconds":"getSeconds"}function zh(t){return t?"getUTCSeconds":"getSeconds"}function Vh(t){return t?"setUTCFullYear":"setFullYear"}function Fh(t){return t?"setUTCMonth":"setMonth"}function Hh(t){return t?"setUTCDate":"setDate"}function Gh(t){return t?"setUTCHours":"setHours"}function Wh(t){return t?"setUTCMinutes":"setMinutes"}function Uh(t){return t?"setUTCSeconds":"setSeconds"}function Yh(t){return t?"setUTCSeconds":"setSeconds"}function Xh(t){if(!er(t))return H(t)?t:"-";var e=(t+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}function Zh(t,e){return t=(t||"").toLowerCase().replace(/-(.)/g,(function(t,e){return e.toUpperCase()})),e&&t&&(t=t.charAt(0).toUpperCase()+t.slice(1)),t}var jh=nt,qh=/([&<>"'])/g,Kh={"&":"&","<":"<",">":">",'"':""","'":"'"};function $h(t){return null==t?"":(t+"").replace(qh,(function(t,e){return Kh[e]}))}function Jh(t,e,n){function i(t){return t&&rt(t)?t:"-"}function r(t){return!(null==t||isNaN(t)||!isFinite(t))}var o="time"===e,a=t instanceof Date;if(o||a){var s=o?Ki(t):t;if(!isNaN(+s))return Dh(s,"yyyy-MM-dd hh:mm:ss",n);if(a)return"-"}if("ordinal"===e)return G(t)?i(t):W(t)&&r(t)?t+"":"-";var l=tr(t);return r(l)?Xh(l):G(t)?i(t):"-"}var Qh=["a","b","c","d","e","f","g"],tc=function(t,e){return"{"+t+(null==e?"":e)+"}"};function ec(t,e,n){V(e)||(e=[e]);var i=e.length;if(!i)return"";for(var r=e[0].$vars||[],o=0;o':'':{renderMode:o,content:"{"+(n.markerId||"markerX")+"|} ",style:"subItem"===r?{width:4,height:4,borderRadius:2,backgroundColor:i}:{width:10,height:10,borderRadius:5,backgroundColor:i}}:""}function ic(t,e){return e=e||"transparent",H(t)?t:U(t)&&t.colorStops&&(t.colorStops[0]||{}).color||e}function rc(t,e){if("_blank"===e||"blank"===e){var n=window.open();n.opener=null,n.location.href=t}else window.open(t,e)}var oc=P,ac=["left","right","top","bottom","width","height"],sc=[["width","left","right"],["height","top","bottom"]];function lc(t,e,n,i,r){var o=0,a=0;null==i&&(i=1/0),null==r&&(r=1/0);var s=0;e.eachChild((function(l,u){var h,c,p=l.getBoundingRect(),d=e.childAt(u+1),f=d&&d.getBoundingRect();if("horizontal"===t){var g=p.width+(f?-f.x+p.x:0);(h=o+g)>i||l.newline?(o=0,h=g,a+=s+n,s=p.height):s=Math.max(s,p.height)}else{var y=p.height+(f?-f.y+p.y:0);(c=a+y)>r||l.newline?(o+=s+n,a=0,c=y,s=p.width):s=Math.max(s,p.width)}l.newline||(l.x=o,l.y=a,l.markRedraw(),"horizontal"===t?o=h+n:a=c+n)}))}var uc=lc;z(lc,"vertical"),z(lc,"horizontal");function hc(t,e,n){n=jh(n||0);var i=e.width,r=e.height,o=Fi(t.left,i),a=Fi(t.top,r),s=Fi(t.right,i),l=Fi(t.bottom,r),u=Fi(t.width,i),h=Fi(t.height,r),c=n[2]+n[0],p=n[1]+n[3],d=t.aspect;switch(isNaN(u)&&(u=i-s-p-o),isNaN(h)&&(h=r-l-c-a),null!=d&&(isNaN(u)&&isNaN(h)&&(d>i/r?u=.8*i:h=.8*r),isNaN(u)&&(u=d*h),isNaN(h)&&(h=u/d)),isNaN(o)&&(o=i-s-u-p),isNaN(a)&&(a=r-l-h-c),t.left||t.right){case"center":o=i/2-u/2-n[3];break;case"right":o=i-u-p}switch(t.top||t.bottom){case"middle":case"center":a=r/2-h/2-n[0];break;case"bottom":a=r-h-c}o=o||0,a=a||0,isNaN(u)&&(u=i-p-o-(s||0)),isNaN(h)&&(h=r-c-a-(l||0));var f=new In(o+n[3],a+n[0],u,h);return f.margin=n,f}function cc(t,e,n,i,r){var o=!r||!r.hv||r.hv[0],a=!r||!r.hv||r.hv[1],s=r&&r.boundingMode||"all";if(o||a){var l;if("raw"===s)l="group"===t.type?new In(0,0,+e.width||0,+e.height||0):t.getBoundingRect();else if(l=t.getBoundingRect(),t.needLocalTransform()){var u=t.getLocalTransform();(l=l.clone()).applyTransform(u)}var h=hc(C({width:l.width,height:l.height},e),n,i),c=o?h.x-l.x:0,p=a?h.y-l.y:0;"raw"===s?(t.x=c,t.y=p):(t.x+=c,t.y+=p),t.markRedraw()}}function pc(t){var e=t.layoutMode||t.constructor.layoutMode;return U(e)?e:e?{type:e}:null}function dc(t,e,n){var i=n&&n.ignoreSize;!V(i)&&(i=[i,i]);var r=a(sc[0],0),o=a(sc[1],1);function a(n,r){var o={},a=0,u={},h=0;if(oc(n,(function(e){u[e]=t[e]})),oc(n,(function(t){s(e,t)&&(o[t]=u[t]=e[t]),l(o,t)&&a++,l(u,t)&&h++})),i[r])return l(e,n[1])?u[n[2]]=null:l(e,n[2])&&(u[n[1]]=null),u;if(2!==h&&a){if(a>=2)return o;for(var c=0;c=0;a--)o=S(o,n[a],!0);e.defaultOption=o}return e.defaultOption},e.prototype.getReferringComponents=function(t,e){var n=t+"Index",i=t+"Id";return Tr(this.ecModel,t,{index:this.get(n,!0),id:this.get(i,!0)},e)},e.prototype.getBoxLayoutParams=function(){var t=this;return{left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")}},e.protoInitialize=function(){var t=e.prototype;t.type="component",t.id="",t.name="",t.mainType="",t.subType="",t.componentIndex=0}(),e}(oh);Or(vc,oh),Br(vc),function(t){var e={};t.registerSubTypeDefaulter=function(t,n){var i=kr(t);e[i.main]=n},t.determineSubType=function(n,i){var r=i.type;if(!r){var o=kr(n).main;t.hasSubTypes(n)&&e[o]&&(r=e[o](i))}return r}}(vc),function(t,e){function n(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}t.topologicalTravel=function(t,i,r,o){if(t.length){var a=function(t){var i={},r=[];return P(t,(function(o){var a=n(i,o),s=function(t,e){var n=[];return P(t,(function(t){A(e,t)>=0&&n.push(t)})),n}(a.originalDeps=e(o),t);a.entryCount=s.length,0===a.entryCount&&r.push(o),P(s,(function(t){A(a.predecessor,t)<0&&a.predecessor.push(t);var e=n(i,t);A(e.successor,t)<0&&e.successor.push(o)}))})),{graph:i,noEntryList:r}}(i),s=a.graph,l=a.noEntryList,u={};for(P(t,(function(t){u[t]=!0}));l.length;){var h=l.pop(),c=s[h],p=!!u[h];p&&(r.call(o,h,c.originalDeps.slice()),delete u[h]),P(c.successor,p?f:d)}P(u,(function(){var t="";throw new Error(t)}))}function d(t){s[t].entryCount--,0===s[t].entryCount&&l.push(t)}function f(t){u[t]=!0,d(t)}}}(vc,(function(t){var e=[];P(vc.getClassesByMainType(t),(function(t){e=e.concat(t.dependencies||t.prototype.dependencies||[])})),e=O(e,(function(t){return kr(t).main})),"dataset"!==t&&A(e,"dataset")<=0&&e.unshift("dataset");return e}));var mc="";"undefined"!=typeof navigator&&(mc=navigator.platform||"");var _c="rgba(0, 0, 0, 0.2)",xc={darkMode:"auto",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:_c,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:_c,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:_c,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:_c,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:_c,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:_c,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:mc.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1},bc=ut(["tooltip","label","itemName","itemId","seriesName"]),wc="original",Sc="arrayRows",Mc="objectRows",Tc="keyedColumns",Cc="typedArray",Ic="unknown",Ac="column",Dc="row",kc=1,Lc=2,Pc=3,Oc=xr();function Rc(t,e,n){var i={},r=Ec(e);if(!r||!t)return i;var o,a,s=[],l=[],u=e.ecModel,h=Oc(u).datasetMap,c=r.uid+"_"+n.seriesLayoutBy;P(t=t.slice(),(function(e,n){var r=U(e)?e:t[n]={name:e};"ordinal"===r.type&&null==o&&(o=n,a=f(r)),i[r.name]=[]}));var p=h.get(c)||h.set(c,{categoryWayDim:a,valueWayDim:0});function d(t,e,n){for(var i=0;ie)return t[i];return t[n-1]}(i,a):n;if((h=h||n)&&h.length){var c=h[l];return r&&(u[r]=c),s.paletteIdx=(l+1)%h.length,c}}var jc=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.init=function(t,e,n,i,r,o){i=i||{},this.option=null,this._theme=new oh(i),this._locale=new oh(r),this._optionManager=o},e.prototype.setOption=function(t,e,n){var i=$c(e);this._optionManager.setOption(t,n,i),this._resetOption(null,i)},e.prototype.resetOption=function(t,e){return this._resetOption(t,$c(e))},e.prototype._resetOption=function(t,e){var n=!1,i=this._optionManager;if(!t||"recreate"===t){var r=i.mountOption("recreate"===t);this.option&&"recreate"!==t?(this.restoreData(),this._mergeOption(r,e)):Gc(this,r),n=!0}if("timeline"!==t&&"media"!==t||this.restoreData(),!t||"recreate"===t||"timeline"===t){var o=i.getTimelineOption(this);o&&(n=!0,this._mergeOption(o,e))}if(!t||"recreate"===t||"media"===t){var a=i.getMediaOption(this);a.length&&P(a,(function(t){n=!0,this._mergeOption(t,e)}),this)}return n},e.prototype.mergeOption=function(t){this._mergeOption(t,null)},e.prototype._mergeOption=function(t,e){var n=this.option,i=this._componentsMap,r=this._componentsCount,o=[],a=ut(),s=e&&e.replaceMergeMainTypeMap;Oc(this).datasetMap=ut(),P(t,(function(t,e){null!=t&&(vc.hasClass(e)?e&&(o.push(e),a.set(e,!0)):n[e]=null==n[e]?w(t):S(n[e],t,!0))})),s&&s.each((function(t,e){vc.hasClass(e)&&!a.get(e)&&(o.push(e),a.set(e,!0))})),vc.topologicalTravel(o,vc.getAllClassMainTypes(),(function(e){var o=function(t,e,n){var i=Vc.get(e);if(!i)return n;var r=i(t);return r?n.concat(r):n}(this,e,ur(t[e])),a=i.get(e),l=a?s&&s.get(e)?"replaceMerge":"normalMerge":"replaceAll",u=dr(a,o,l);(function(t,e,n){P(t,(function(t){var i=t.newOption;U(i)&&(t.keyInfo.mainType=e,t.keyInfo.subType=function(t,e,n,i){return e.type?e.type:n?n.subType:i.determineSubType(t,e)}(e,i,t.existing,n))}))})(u,e,vc),n[e]=null,i.set(e,null),r.set(e,0);var h=[],c=[],p=0;P(u,(function(t,n){var i=t.existing,r=t.newOption;if(r){var o=vc.getClass(e,t.keyInfo.subType,!0);if(i&&i.constructor===o)i.name=t.keyInfo.name,i.mergeOption(r,this),i.optionUpdated(r,!1);else{var a=T({componentIndex:n},t.keyInfo);T(i=new o(r,this,this,a),a),t.brandNew&&(i.__requireNewView=!0),i.init(r,this,this),i.optionUpdated(null,!0)}}else i&&(i.mergeOption({},this),i.optionUpdated({},!1));i?(h.push(i.option),c.push(i),p++):(h.push(void 0),c.push(void 0))}),this),n[e]=h,i.set(e,c),r.set(e,p),"series"===e&&Fc(this)}),this),this._seriesIndices||Fc(this)},e.prototype.getOption=function(){var t=w(this.option);return P(t,(function(e,n){if(vc.hasClass(n)){for(var i=ur(e),r=i.length,o=!1,a=r-1;a>=0;a--)i[a]&&!mr(i[a])?o=!0:(i[a]=null,!o&&r--);i.length=r,t[n]=i}})),delete t["\0_ec_inner"],t},e.prototype.getTheme=function(){return this._theme},e.prototype.getLocaleModel=function(){return this._locale},e.prototype.getLocale=function(t){return this.getLocaleModel().get(t)},e.prototype.setUpdatePayload=function(t){this._payload=t},e.prototype.getUpdatePayload=function(){return this._payload},e.prototype.getComponent=function(t,e){var n=this._componentsMap.get(t);if(n){var i=n[e||0];if(i)return i;if(null==e)for(var r=0;r=e:"max"===n?t<=e:t===e})(i[a],t,o)||(r=!1)}})),r}var op=P,ap=U,sp=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function lp(t){var e=t&&t.itemStyle;if(e)for(var n=0,i=sp.length;n=0;f--){var g=t[f];if(s||(c=g.data.rawIndexOf(g.stackedByDimension,h)),c>=0){var y=g.data.getByRawIndex(g.stackResultDimension,c);if(p>=0&&y>0||p<=0&&y<0){p+=y,d=y;break}}}return i[0]=p,i[1]=d,i}));a.hostModel.setData(l),e.data=l}))}var Cp,Ip,Ap,Dp,kp,Lp=function(t){this.data=t.data||(t.sourceFormat===Tc?{}:[]),this.sourceFormat=t.sourceFormat||Ic,this.seriesLayoutBy=t.seriesLayoutBy||Ac,this.startIndex=t.startIndex||0,this.dimensionsDefine=t.dimensionsDefine,this.dimensionsDetectedCount=t.dimensionsDetectedCount,this.encodeDefine=t.encodeDefine,this.metaRawOption=t.metaRawOption};function Pp(t){return t instanceof Lp}function Op(t,e,n,i){n=n||Ep(t);var r=e.seriesLayoutBy,o=function(t,e,n,i,r){var o,a;if(!t)return{dimensionsDefine:Bp(r),startIndex:a,dimensionsDetectedCount:o};if(e===Sc){var s=t;"auto"===i||null==i?zp((function(t){null!=t&&"-"!==t&&(H(t)?null==a&&(a=1):a=0)}),n,s,10):a=W(i)?i:i?1:0,r||1!==a||(r=[],zp((function(t,e){r[e]=null!=t?t+"":""}),n,s,1/0)),o=r?r.length:n===Dc?s.length:s[0]?s[0].length:null}else if(e===Mc)r||(r=function(t){var e,n=0;for(;nu&&(u=d)}s[0]=l,s[1]=u}},i=function(){return this._data?this._data.length/this._dimSize:0};function r(t){for(var e=0;e=1)&&(t=1),t}a===l&&s===u||(e="reset"),(this._dirty||"reset"===e)&&(this._dirty=!1,o=this._doReset(i)),this._modBy=l,this._modDataCount=u;var c=t&&t.step;if(this._dueEnd=n?n._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var p=this._dueIndex,d=Math.min(null!=c?this._dueIndex+c:1/0,this._dueEnd);if(!i&&(o||p1&&i>0?s:a}};return o;function a(){return e=t?null:oo?-this._resultLT:0},t}(),od=function(){function t(){}return t.prototype.getRawData=function(){throw new Error("not supported")},t.prototype.getRawDataItem=function(t){throw new Error("not supported")},t.prototype.cloneRawData=function(){},t.prototype.getDimensionInfo=function(t){},t.prototype.cloneAllDimensionInfo=function(){},t.prototype.count=function(){},t.prototype.retrieveValue=function(t,e){},t.prototype.retrieveValueFromItem=function(t,e){},t.prototype.convertValue=function(t,e){return id(t,e)},t}();function ad(t){var e=t.sourceFormat;if(!pd(e)){var n="";0,ar(n)}return t.data}function sd(t){var e=t.sourceFormat,n=t.data;if(!pd(e)){var i="";0,ar(i)}if(e===Sc){for(var r=[],o=0,a=n.length;o9e10&&(this._versionSignBase=0)},t.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},t.prototype.prepareSource=function(){this._isDirty()&&this._createSource()},t.prototype._createSource=function(){this._setLocalSource([],[]);var t,e,n=this._sourceHost,i=this._getUpstreamSourceManagers(),r=!!i.length;if(gd(n)){var o=n,a=void 0,s=void 0,l=void 0;if(r){var u=i[0];u.prepareSource(),a=(l=u.getSource()).data,s=l.sourceFormat,e=[u._getVersionSign()]}else s=X(a=o.get("data",!0))?Cc:wc,e=[];var h=this._getSourceMetaRawOption(),c=l?l.metaRawOption:null;t=[Op(a,{seriesLayoutBy:Q(h.seriesLayoutBy,c?c.seriesLayoutBy:null),sourceHeader:Q(h.sourceHeader,c?c.sourceHeader:null),dimensions:Q(h.dimensions,c?c.dimensions:null)},s,o.get("encode",!0))]}else{var p=n;if(r){var d=this._applyTransform(i);t=d.sourceList,e=d.upstreamSignList}else{t=[Op(p.get("source",!0),this._getSourceMetaRawOption(),null,null)],e=[]}}this._setLocalSource(t,e)},t.prototype._applyTransform=function(t){var e,n=this._sourceHost,i=n.get("transform",!0),r=n.get("fromTransformResult",!0);if(null!=r){var o="";1!==t.length&&yd(o)}var a,s=[],l=[];return P(t,(function(t){t.prepareSource();var e=t.getSource(r||0),n="";null==r||e||yd(n),s.push(e),l.push(t._getVersionSign())})),i?e=function(t,e,n){var i=ur(t),r=i.length,o="";r||ar(o);for(var a=0,s=r;a1||e>0&&!t.noHeader,i=0;P(t.blocks,(function(t){bd(t).planLayout(t);var e=t.__gapLevelBetweenSubBlocks;e>=i&&(i=e+(!n||e&&("section"!==t.type||t.noHeader)?0:1))})),t.__gapLevelBetweenSubBlocks=i},build:function(t,e,n,i){var r=e.noHeader,o=Md(e),a=function(t,e,n,i){var r=[],o=e.blocks||[];it(!o||V(o)),o=o||[];var a=t.orderMode;if(e.sortBlocks&&a){o=o.slice();var s={valueAsc:"asc",valueDesc:"desc"};if(ct(s,a)){var l=new rd(s[a],null);o.sort((function(t,e){return l.evaluate(t.sortParam,e.sortParam)}))}else"seriesDesc"===a&&o.reverse()}var u=Md(e);if(P(o,(function(e,n){var o=bd(e).build(t,e,n>0?u.html:0,i);null!=o&&r.push(o)})),!r.length)return;return"richText"===t.renderMode?r.join(u.richText):Td(r.join(""),n)}(t,e,r?n:o.html,i);if(r)return a;var s=Jh(e.header,"ordinal",t.useUTC),l=vd(i,t.renderMode).nameStyle;return"richText"===t.renderMode?Cd(t,s,l)+o.richText+a:Td('
    '+$h(s)+"
    "+a,n)}},nameValue:{planLayout:function(t){t.__gapLevelBetweenSubBlocks=0},build:function(t,e,n,i){var r=t.renderMode,o=e.noName,a=e.noValue,s=!e.markerType,l=e.name,u=e.value,h=t.useUTC;if(!o||!a){var c=s?"":t.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||"#333",r),p=o?"":Jh(l,"ordinal",h),d=e.valueType,f=a?[]:V(u)?O(u,(function(t,e){return Jh(t,V(d)?d[e]:d,h)})):[Jh(u,V(d)?d[0]:d,h)],g=!s||!o,y=!s&&o,v=vd(i,r),m=v.nameStyle,_=v.valueStyle;return"richText"===r?(s?"":c)+(o?"":Cd(t,p,m))+(a?"":function(t,e,n,i,r){var o=[r],a=i?10:20;return n&&o.push({padding:[0,0,0,a],align:"right"}),t.markupStyleCreator.wrapRichTextStyle(e.join(" "),o)}(t,f,g,y,_)):Td((s?"":c)+(o?"":function(t,e,n){return''+$h(t)+""}(p,!s,m))+(a?"":function(t,e,n,i){var r=n?"10px":"20px";return''+O(t,(function(t){return $h(t)})).join("  ")+""}(f,g,y,_)),n)}}}};function Sd(t,e,n,i,r,o){if(t){var a=bd(t);a.planLayout(t);var s={useUTC:r,renderMode:n,orderMode:i,markupStyleCreator:e};return a.build(s,t,0,o)}}function Md(t){var e=t.__gapLevelBetweenSubBlocks;return{html:md[e],richText:_d[e]}}function Td(t,e){return'
    '+t+'
    '}function Cd(t,e,n){return t.markupStyleCreator.wrapRichTextStyle(e,n)}function Id(t,e){var n=t.get("padding");return null!=n?n:"richText"===e?[8,10]:10}var Ad=function(){function t(){this.richTextStyles={},this._nextStyleNameId=nr()}return t.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},t.prototype.makeTooltipMarker=function(t,e,n){var i="richText"===n?this._generateStyleName():null,r=nc({color:e,type:t,renderMode:n,markerId:i});return H(r)?r:(this.richTextStyles[i]=r.style,r.content)},t.prototype.wrapRichTextStyle=function(t,e){var n={};V(e)?P(e,(function(t){return T(n,t)})):T(n,e);var i=this._generateStyleName();return this.richTextStyles[i]=n,"{"+i+"|"+t+"}"},t}();function Dd(t){var e,n,i,r,o=t.series,a=t.dataIndex,s=t.multipleSeries,l=o.getData(),u=l.mapDimensionsAll("defaultedTooltip"),h=u.length,c=o.getRawValue(a),p=V(c),d=function(t,e){return ic(t.getData().getItemVisual(e,"style")[t.visualDrawType])}(o,a);if(h>1||p&&!h){var f=function(t,e,n,i,r){var o=e.getData(),a=R(t,(function(t,e,n){var i=o.getDimensionInfo(n);return t||i&&!1!==i.tooltip&&null!=i.displayName}),!1),s=[],l=[],u=[];function h(t,e){var n=o.getDimensionInfo(e);n&&!1!==n.otherDims.tooltip&&(a?u.push(xd("nameValue",{markerType:"subItem",markerColor:r,name:n.displayName,value:t,valueType:n.type})):(s.push(t),l.push(n.type)))}return i.length?P(i,(function(t){h(Kp(o,n,t),t)})):P(t,h),{inlineValues:s,inlineValueTypes:l,blocks:u}}(c,o,a,u,d);e=f.inlineValues,n=f.inlineValueTypes,i=f.blocks,r=f.inlineValues[0]}else if(h){var g=l.getDimensionInfo(u[0]);r=e=Kp(l,a,u[0]),n=g.type}else r=e=p?c[0]:c;var y=vr(o),v=y&&o.name||"",m=l.getName(a),_=s?v:m;return xd("section",{header:v,noHeader:s||!y,sortParam:r,blocks:[xd("nameValue",{markerType:"item",markerColor:d,name:_,noName:!rt(_),value:e,valueType:n})].concat(i||[])})}var kd=xr();function Ld(t,e){return t.getName(e)||t.getId(e)}var Pd=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._selectedDataIndicesMap={},e}return n(e,t),e.prototype.init=function(t,e,n){this.seriesIndex=this.componentIndex,this.dataTask=td({count:Rd,reset:Nd}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,n),(kd(this).sourceManager=new dd(this)).prepareSource();var i=this.getInitialData(t,n);Bd(i,this),this.dataTask.context.data=i,kd(this).dataBeforeProcessed=i,Od(this),this._initSelectedMapFromData(i)},e.prototype.mergeDefaultAndTheme=function(t,e){var n=pc(this),i=n?fc(t):{},r=this.subType;vc.hasClass(r)&&(r+="Series"),S(t,e.getTheme().get(this.subType)),S(t,this.getDefaultOption()),hr(t,"label",["show"]),this.fillDataTextStyle(t.data),n&&dc(t,i,n)},e.prototype.mergeOption=function(t,e){t=S(this.option,t,!0),this.fillDataTextStyle(t.data);var n=pc(this);n&&dc(this.option,t,n);var i=kd(this).sourceManager;i.dirty(),i.prepareSource();var r=this.getInitialData(t,e);Bd(r,this),this.dataTask.dirty(),this.dataTask.context.data=r,kd(this).dataBeforeProcessed=r,Od(this),this._initSelectedMapFromData(r)},e.prototype.fillDataTextStyle=function(t){if(t&&!X(t))for(var e=["show"],n=0;nthis.getShallow("animationThreshold")&&(t=!1),!!t},e.prototype.restoreData=function(){this.dataTask.dirty()},e.prototype.getColorFromPalette=function(t,e,n){var i=this.ecModel,r=Yc.prototype.getColorFromPalette.call(this,t,e,n);return r||(r=i.getColorFromPalette(t,e,n)),r},e.prototype.coordDimToDataDim=function(t){return this.getRawData().mapDimensionsAll(t)},e.prototype.getProgressive=function(){return this.get("progressive")},e.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},e.prototype.select=function(t,e){this._innerSelect(this.getData(e),t)},e.prototype.unselect=function(t,e){var n=this.option.selectedMap;if(n)for(var i=this.getData(e),r=0;r=0&&n.push(r)}return n},e.prototype.isSelected=function(t,e){var n=this.option.selectedMap;return n&&n[Ld(this.getData(e),t)]||!1},e.prototype._innerSelect=function(t,e){var n,i,r=this.option.selectedMode,o=e.length;if(r&&o)if("multiple"===r)for(var a=this.option.selectedMap||(this.option.selectedMap={}),s=0;s0&&this._innerSelect(t,e)}},e.registerClass=function(t){return vc.registerClass(t)},e.protoInitialize=function(){var t=e.prototype;t.type="series.__base__",t.seriesIndex=0,t.useColorPaletteOnData=!1,t.ignoreStyleOnData=!1,t.hasSymbolVisual=!1,t.defaultSymbol="circle",t.visualStyleAccessPath="itemStyle",t.visualDrawType="fill"}(),e}(vc);function Od(t){var e=t.name;vr(t)||(t.name=function(t){var e=t.getRawData(),n=e.mapDimensionsAll("seriesName"),i=[];return P(n,(function(t){var n=e.getDimensionInfo(t);n.displayName&&i.push(n.displayName)})),i.join(" ")}(t)||e)}function Rd(t){return t.model.getRawData().count()}function Nd(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),Ed}function Ed(t,e){e.outputData&&t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function Bd(t,e){P(r(t.CHANGABLE_METHODS,t.DOWNSAMPLE_METHODS),(function(n){t.wrapMethod(n,z(zd,e))}))}function zd(t,e){var n=Vd(t);return n&&n.setOutputEnd((e||this).count()),e}function Vd(t){var e=(t.ecModel||{}).scheduler,n=e&&e.getPipeline(t.uid);if(n){var i=n.currentTask;if(i){var r=i.agentStubMap;r&&(i=r.get(t.uid))}return i}}k(Pd,Jp),k(Pd,Yc),Or(Pd,vc);var Fd=function(){function t(){this.group=new ki,this.uid=sh("viewComponent")}return t.prototype.init=function(t,e){},t.prototype.render=function(t,e,n,i){},t.prototype.dispose=function(t,e){},t.prototype.updateView=function(t,e,n,i){},t.prototype.updateLayout=function(t,e,n,i){},t.prototype.updateVisual=function(t,e,n,i){},t.prototype.blurSeries=function(t,e){},t}();function Hd(){var t=xr();return function(e){var n=t(e),i=e.pipelineContext,r=!!n.large,o=!!n.progressiveRender,a=n.large=!(!i||!i.large),s=n.progressiveRender=!(!i||!i.progressiveRender);return!(r===a&&o===s)&&"reset"}}Lr(Fd),Br(Fd);var Gd=xr(),Wd=Hd(),Ud=function(){function t(){this.group=new ki,this.uid=sh("viewChart"),this.renderTask=td({plan:Zd,reset:jd}),this.renderTask.context={view:this}}return t.prototype.init=function(t,e){},t.prototype.render=function(t,e,n,i){},t.prototype.highlight=function(t,e,n,i){Xd(t.getData(),i,"emphasis")},t.prototype.downplay=function(t,e,n,i){Xd(t.getData(),i,"normal")},t.prototype.remove=function(t,e){this.group.removeAll()},t.prototype.dispose=function(t,e){},t.prototype.updateView=function(t,e,n,i){this.render(t,e,n,i)},t.prototype.updateLayout=function(t,e,n,i){this.render(t,e,n,i)},t.prototype.updateVisual=function(t,e,n,i){this.render(t,e,n,i)},t.markUpdateMethod=function(t,e){Gd(t).updateMethod=e},t.protoInitialize=void(t.prototype.type="chart"),t}();function Yd(t,e,n){t&&("emphasis"===e?Ls:Ps)(t,n)}function Xd(t,e,n){var i=_r(t,e),r=e&&null!=e.highlightKey?function(t){var e=ss[t];return null==e&&as<=32&&(e=ss[t]=as++),e}(e.highlightKey):null;null!=i?P(ur(i),(function(e){Yd(t.getItemGraphicEl(e),n,r)})):t.eachItemGraphicEl((function(t){Yd(t,n,r)}))}function Zd(t){return Wd(t.model)}function jd(t){var e=t.model,n=t.ecModel,i=t.api,r=t.payload,o=e.pipelineContext.progressiveRender,a=t.view,s=r&&Gd(r).updateMethod,l=o?"incrementalPrepareRender":s&&a[s]?s:"render";return"render"!==l&&a[l](e,n,i,r),qd[l]}Lr(Ud),Br(Ud);var qd={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},Kd="\0__throttleOriginMethod",$d="\0__throttleRate",Jd="\0__throttleType";function Qd(t,e,n){var i,r,o,a,s,l=0,u=0,h=null;function c(){u=(new Date).getTime(),h=null,t.apply(o,a||[])}e=e||0;var p=function(){for(var t=[],p=0;p=0?c():h=setTimeout(c,-r),l=i};return p.clear=function(){h&&(clearTimeout(h),h=null)},p.debounceNextCall=function(t){s=t},p}function tf(t,e,n,i){var r=t[e];if(r){var o=r[Kd]||r,a=r[Jd];if(r[$d]!==n||a!==i){if(null==n||!i)return t[e]=o;(r=t[e]=Qd(o,n,"debounce"===i))[Kd]=o,r[Jd]=i,r[$d]=n}return r}}var ef=xr(),nf={itemStyle:zr(nh,!0),lineStyle:zr(Qu,!0)},rf={lineStyle:"stroke",itemStyle:"fill"};function of(t,e){var n=t.visualStyleMapper||nf[e];return n||(console.warn("Unkown style type '"+e+"'."),nf.itemStyle)}function af(t,e){var n=t.visualDrawType||rf[e];return n||(console.warn("Unkown style type '"+e+"'."),"fill")}var sf={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var n=t.getData(),i=t.visualStyleAccessPath||"itemStyle",r=t.getModel(i),o=of(t,i)(r),a=r.getShallow("decal");a&&(n.setVisual("decal",a),a.dirty=!0);var s=af(t,i),l=o[s],u=F(l)?l:null;if(o[s]&&!u||(o[s]=t.getColorFromPalette(t.name,null,e.getSeriesCount()),n.setVisual("colorFromPalette",!0)),n.setVisual("style",o),n.setVisual("drawType",s),!e.isSeriesFiltered(t)&&u)return n.setVisual("colorFromPalette",!1),{dataEach:function(e,n){var i=t.getDataParams(n),r=T({},o);r[s]=u(i),e.setItemVisual(n,"style",r)}}}},lf=new oh,uf={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(!t.ignoreStyleOnData&&!e.isSeriesFiltered(t)){var n=t.getData(),i=t.visualStyleAccessPath||"itemStyle",r=of(t,i),o=n.getVisual("drawType");return{dataEach:n.hasItemOption?function(t,e){var n=t.getRawDataItem(e);if(n&&n[i]){lf.option=n[i];var a=r(lf);T(t.ensureUniqueItemVisual(e,"style"),a),lf.option.decal&&(t.setItemVisual(e,"decal",lf.option.decal),lf.option.decal.dirty=!0),o in a&&t.setItemVisual(e,"colorFromPalette",!1)}}:null}}}},hf={performRawSeries:!0,overallReset:function(t){var e=ut();t.eachSeries((function(t){if(t.useColorPaletteOnData){var n=e.get(t.type);n||(n={},e.set(t.type,n)),ef(t).scope=n}})),t.eachSeries((function(e){if(e.useColorPaletteOnData&&!t.isSeriesFiltered(e)){var n=e.getRawData(),i={},r=e.getData(),o=ef(e).scope,a=e.visualStyleAccessPath||"itemStyle",s=af(e,a);r.each((function(t){var e=r.getRawIndex(t);i[e]=t})),n.each((function(t){var a=i[t];if(r.getItemVisual(a,"colorFromPalette")){var l=r.ensureUniqueItemVisual(a,"style"),u=n.getName(t)||t+"",h=n.count();l[s]=e.getColorFromPalette(u,o,h)}}))}}))}},cf=Math.PI;var pf=function(){function t(t,e,n,i){this._stageTaskMap=ut(),this.ecInstance=t,this.api=e,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}return t.prototype.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each((function(t){var e=t.overallTask;e&&e.dirty()}))},t.prototype.getPerformArgs=function(t,e){if(t.__pipeline){var n=this._pipelineMap.get(t.__pipeline.id),i=n.context,r=!e&&n.progressiveEnabled&&(!i||i.progressiveRender)&&t.__idxInPipeline>n.blockIndex?n.step:null,o=i&&i.modDataCount;return{step:r,modBy:null!=o?Math.ceil(o/r):null,modDataCount:o}}},t.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},t.prototype.updateStreamModes=function(t,e){var n=this._pipelineMap.get(t.uid),i=t.getData().count(),r=n.progressiveEnabled&&e.incrementalPrepareRender&&i>=n.threshold,o=t.get("large")&&i>=t.get("largeThreshold"),a="mod"===t.get("progressiveChunkMode")?i:null;t.pipelineContext=n.context={progressiveRender:r,modDataCount:a,large:o}},t.prototype.restorePipelines=function(t){var e=this,n=e._pipelineMap=ut();t.eachSeries((function(t){var i=t.getProgressive(),r=t.uid;n.set(r,{id:r,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:i&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),e._pipe(t,t.dataTask)}))},t.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.api.getModel(),n=this.api;P(this._allHandlers,(function(i){var r=t.get(i.uid)||t.set(i.uid,{}),o="";it(!(i.reset&&i.overallReset),o),i.reset&&this._createSeriesStageTask(i,r,e,n),i.overallReset&&this._createOverallStageTask(i,r,e,n)}),this)},t.prototype.prepareView=function(t,e,n,i){var r=t.renderTask,o=r.context;o.model=e,o.ecModel=n,o.api=i,r.__block=!t.incrementalPrepareRender,this._pipe(e,r)},t.prototype.performDataProcessorTasks=function(t,e){this._performStageTasks(this._dataProcessorHandlers,t,e,{block:!0})},t.prototype.performVisualTasks=function(t,e,n){this._performStageTasks(this._visualHandlers,t,e,n)},t.prototype._performStageTasks=function(t,e,n,i){i=i||{};var r=!1,o=this;function a(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}P(t,(function(t,s){if(!i.visualType||i.visualType===t.visualType){var l=o._stageTaskMap.get(t.uid),u=l.seriesTaskMap,h=l.overallTask;if(h){var c,p=h.agentStubMap;p.each((function(t){a(i,t)&&(t.dirty(),c=!0)})),c&&h.dirty(),o.updatePayload(h,n);var d=o.getPerformArgs(h,i.block);p.each((function(t){t.perform(d)})),h.perform(d)&&(r=!0)}else u&&u.each((function(s,l){a(i,s)&&s.dirty();var u=o.getPerformArgs(s,i.block);u.skip=!t.performRawSeries&&e.isSeriesFiltered(s.context.model),o.updatePayload(s,n),s.perform(u)&&(r=!0)}))}})),this.unfinished=r||this.unfinished},t.prototype.performSeriesTasks=function(t){var e;t.eachSeries((function(t){e=t.dataTask.perform()||e})),this.unfinished=e||this.unfinished},t.prototype.plan=function(){this._pipelineMap.each((function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)}))},t.prototype.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)},t.prototype._createSeriesStageTask=function(t,e,n,i){var r=this,o=e.seriesTaskMap,a=e.seriesTaskMap=ut(),s=t.seriesType,l=t.getTargetSeries;function u(e){var s=e.uid,l=a.set(s,o&&o.get(s)||td({plan:vf,reset:mf,count:bf}));l.context={model:e,ecModel:n,api:i,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:r},r._pipe(e,l)}t.createOnAllSeries?n.eachRawSeries(u):s?n.eachRawSeriesByType(s,u):l&&l(n,i).each(u)},t.prototype._createOverallStageTask=function(t,e,n,i){var r=this,o=e.overallTask=e.overallTask||td({reset:df});o.context={ecModel:n,api:i,overallReset:t.overallReset,scheduler:r};var a=o.agentStubMap,s=o.agentStubMap=ut(),l=t.seriesType,u=t.getTargetSeries,h=!0,c=!1,p="";function d(t){var e=t.uid,n=s.set(e,a&&a.get(e)||(c=!0,td({reset:ff,onDirty:yf})));n.context={model:t,overallProgress:h},n.agent=o,n.__block=h,r._pipe(t,n)}it(!t.createOnAllSeries,p),l?n.eachRawSeriesByType(l,d):u?u(n,i).each(d):(h=!1,P(n.getSeries(),d)),c&&o.dirty()},t.prototype._pipe=function(t,e){var n=t.uid,i=this._pipelineMap.get(n);!i.head&&(i.head=e),i.tail&&i.tail.pipe(e),i.tail=e,e.__idxInPipeline=i.count++,e.__pipeline=i},t.wrapStageHandler=function(t,e){return F(t)&&(t={overallReset:t,seriesType:wf(t)}),t.uid=sh("stageHandler"),e&&(t.visualType=e),t},t}();function df(t){t.overallReset(t.ecModel,t.api,t.payload)}function ff(t){return t.overallProgress&&gf}function gf(){this.agent.dirty(),this.getDownstream().dirty()}function yf(){this.agent&&this.agent.dirty()}function vf(t){return t.plan?t.plan(t.model,t.ecModel,t.api,t.payload):null}function mf(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=ur(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?O(e,(function(t,e){return xf(e)})):_f}var _f=xf(0);function xf(t){return function(e,n){var i=n.data,r=n.resetDefines[t];if(r&&r.dataEach)for(var o=e.start;o0&&h===r.length-u.length){var c=r.slice(0,h);"data"!==c&&(e.mainType=c,e[u.toLowerCase()]=t,s=!0)}}a.hasOwnProperty(r)&&(n[r]=t,s=!0),s||(i[r]=t)}))}return{cptQuery:e,dataQuery:n,otherQuery:i}},t.prototype.filter=function(t,e){var n=this.eventInfo;if(!n)return!0;var i=n.targetEl,r=n.packedEvent,o=n.model,a=n.view;if(!o||!a)return!0;var s=e.cptQuery,l=e.dataQuery;return u(s,o,"mainType")&&u(s,o,"subType")&&u(s,o,"index","componentIndex")&&u(s,o,"name")&&u(s,o,"id")&&u(l,r,"name")&&u(l,r,"dataIndex")&&u(l,r,"dataType")&&(!a.filterForExposedEvent||a.filterForExposedEvent(t,e.otherQuery,i,r));function u(t,e,n,i){return null==t[n]||e[i||n]===t[n]}},t.prototype.afterTrigger=function(){this.eventInfo=null},t}(),Vf={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var n=t.getData();if(t.legendSymbol&&n.setVisual("legendSymbol",t.legendSymbol),t.hasSymbolVisual){var i=t.get("symbol"),r=t.get("symbolSize"),o=t.get("symbolKeepAspect"),a=t.get("symbolRotate"),s=F(i),l=F(r),u=F(a),h=s||l||u,c=!s&&i?i:t.defaultSymbol,p=l?null:r,d=u?null:a;if(n.setVisual({legendSymbol:t.legendSymbol||c,symbol:c,symbolSize:p,symbolKeepAspect:o,symbolRotate:d}),!e.isSeriesFiltered(t))return{dataEach:h?function(e,n){var o=t.getRawValue(n),h=t.getDataParams(n);s&&e.setItemVisual(n,"symbol",i(o,h)),l&&e.setItemVisual(n,"symbolSize",r(o,h)),u&&e.setItemVisual(n,"symbolRotate",a(o,h))}:null}}}};function Ff(t,e){switch(e){case"color":return t.getVisual("style")[t.getVisual("drawType")];case"opacity":return t.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return t.getVisual(e);default:0}}var Hf=2*Math.PI,Gf=ya.CMD,Wf=["top","right","bottom","left"];function Uf(t,e,n,i,r){var o=n.width,a=n.height;switch(t){case"top":i.set(n.x+o/2,n.y-e),r.set(0,-1);break;case"bottom":i.set(n.x+o/2,n.y+a+e),r.set(0,1);break;case"left":i.set(n.x-e,n.y+a/2),r.set(-1,0);break;case"right":i.set(n.x+o+e,n.y+a/2),r.set(1,0)}}function Yf(t,e,n,i,r,o,a,s,l){a-=t,s-=e;var u=Math.sqrt(a*a+s*s),h=(a/=u)*n+t,c=(s/=u)*n+e;if(Math.abs(i-r)%Hf<1e-4)return l[0]=h,l[1]=c,u-n;if(o){var p=i;i=ba(r),r=ba(p)}else i=ba(i),r=ba(r);i>r&&(r+=Hf);var d=Math.atan2(s,a);if(d<0&&(d+=Hf),d>=i&&d<=r||d+Hf>=i&&d+Hf<=r)return l[0]=h,l[1]=c,u-n;var f=n*Math.cos(i)+t,g=n*Math.sin(i)+e,y=n*Math.cos(r)+t,v=n*Math.sin(r)+e,m=(f-a)*(f-a)+(g-s)*(g-s),_=(y-a)*(y-a)+(v-s)*(v-s);return m<_?(l[0]=f,l[1]=g,Math.sqrt(m)):(l[0]=y,l[1]=v,Math.sqrt(_))}function Xf(t,e,n,i,r,o,a,s){var l=r-t,u=o-e,h=n-t,c=i-e,p=Math.sqrt(h*h+c*c),d=(l*(h/=p)+u*(c/=p))/p;s&&(d=Math.min(Math.max(d,0),1)),d*=p;var f=a[0]=t+d*h,g=a[1]=e+d*c;return Math.sqrt((f-r)*(f-r)+(g-o)*(g-o))}function Zf(t,e,n,i,r,o,a){n<0&&(t+=n,n=-n),i<0&&(e+=i,i=-i);var s=t+n,l=e+i,u=a[0]=Math.min(Math.max(r,t),s),h=a[1]=Math.min(Math.max(o,e),l);return Math.sqrt((u-r)*(u-r)+(h-o)*(h-o))}var jf=[];function qf(t,e,n){var i=Zf(e.x,e.y,e.width,e.height,t.x,t.y,jf);return n.set(jf[0],jf[1]),i}function Kf(t,e,n){for(var i,r,o=0,a=0,s=0,l=0,u=1/0,h=e.data,c=t.x,p=t.y,d=0;d0){e=e/180*Math.PI,$f.fromArray(t[0]),Jf.fromArray(t[1]),Qf.fromArray(t[2]),mn.sub(tg,$f,Jf),mn.sub(eg,Qf,Jf);var n=tg.len(),i=eg.len();if(!(n<.001||i<.001)){tg.scale(1/n),eg.scale(1/i);var r=tg.dot(eg);if(Math.cos(e)1&&mn.copy(rg,Qf),rg.toArray(t[1])}}}}function ag(t,e,n){if(n<=180&&n>0){n=n/180*Math.PI,$f.fromArray(t[0]),Jf.fromArray(t[1]),Qf.fromArray(t[2]),mn.sub(tg,Jf,$f),mn.sub(eg,Qf,Jf);var i=tg.len(),r=eg.len();if(!(i<.001||r<.001))if(tg.scale(1/i),eg.scale(1/r),tg.dot(e)=a)mn.copy(rg,Qf);else{rg.scaleAndAdd(eg,o/Math.tan(Math.PI/2-s));var l=Qf.x!==Jf.x?(rg.x-Jf.x)/(Qf.x-Jf.x):(rg.y-Jf.y)/(Qf.y-Jf.y);if(isNaN(l))return;l<0?mn.copy(rg,Jf):l>1&&mn.copy(rg,Qf)}rg.toArray(t[1])}}}function sg(t,e,n,i){var r="normal"===n,o=r?t:t.ensureState(n);o.ignore=e;var a=i.get("smooth");a&&!0===a&&(a=.3),o.shape=o.shape||{},a>0&&(o.shape.smooth=a);var s=i.getModel("lineStyle").getLineStyle();r?t.useStyle(s):o.style=s}function lg(t,e){var n=e.smooth,i=e.points;if(i)if(t.moveTo(i[0][0],i[0][1]),n>0&&i.length>=3){var r=Tt(i[0],i[1]),o=Tt(i[1],i[2]);if(!r||!o)return t.lineTo(i[1][0],i[1][1]),void t.lineTo(i[2][0],i[2][1]);var a=Math.min(r,o)*n,s=At([],i[1],i[0],a/r),l=At([],i[1],i[2],a/o),u=At([],s,l,.5);t.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),t.bezierCurveTo(l[0],l[1],l[0],l[1],i[2][0],i[2][1])}else for(var h=1;h0&&o&&x(-h/a,0,a);var f,g,y=t[0],v=t[a-1];return m(),f<0&&b(-f,.8),g<0&&b(g,.8),m(),_(f,g,1),_(g,f,-1),m(),f<0&&w(-f),g<0&&w(g),u}function m(){f=y.rect[e]-i,g=r-v.rect[e]-v.rect[n]}function _(t,e,n){if(t<0){var i=Math.min(e,-t);if(i>0){x(i*n,0,a);var r=i+t;r<0&&b(-r*n,1)}else b(-t*n,1)}}function x(n,i,r){0!==n&&(u=!0);for(var o=i;o0)for(l=0;l0;l--){x(-(o[l-1]*c),l,a)}}}function w(t){var e=t<0?-1:1;t=Math.abs(t);for(var n=Math.ceil(t/(a-1)),i=0;i0?x(n,0,i+1):x(-n,a-i-1,a),(t-=n)<=0)return}}function pg(t,e,n,i){return cg(t,"y","height",e,n,i)}function dg(t){if(t){for(var e=[],n=0;n=0&&n.attr(d.oldLayoutSelect),A(u,"emphasis")>=0&&n.attr(d.oldLayoutEmphasis)),_u(n,s,e,a)}else if(n.attr(s),!Zu(n).valueAnimation){var h=Q(n.style.opacity,1);n.style.opacity=0,xu(n,{style:{opacity:h}},e,a)}if(d.oldLayout=s,n.states.select){var c=d.oldLayoutSelect={};_g(c,s,xg),_g(c,n.states.select,xg)}if(n.states.emphasis){var p=d.oldLayoutEmphasis={};_g(p,s,xg),_g(p,n.states.emphasis,xg)}!function(t,e,n,i,r){var o=Zu(t);if(o.valueAnimation){var a=o.defaultInterpolatedText,s=Q(o.interpolatedValue,o.prevValue),l=o.value;(null==s?xu:_u)(t,{},i,e,null,(function(i){var u=Ir(n,o.precision,s,l,i);o.interpolatedValue=1===i?null:u;var h=zu({labelDataIndex:e,labelFetcher:r,defaultText:a?a(u):u+""},o.statesModels,u);Bu(t,h)}))}}(n,a,l,e,e)}if(i&&!i.ignore&&!i.invisible){r=(d=mg(i)).oldLayout;var d,f={points:i.shape.points};r?(i.attr({shape:r}),_u(i,{shape:f},e)):(i.setShape(f),i.style.strokePercent=0,xu(i,{style:{strokePercent:1}},e)),d.oldLayout=f}},t}();function wg(t,e,n,i,r){var o=t+e;n.isSilent(o)||i.eachComponent({mainType:"series",subType:"pie"},(function(t){for(var e=t.seriesIndex,i=r.selected,a=0;a0?(e=e||1,"dashed"===t?[4*e,2*e]:"dotted"===t?[e]:W(t)?[t]:V(t)?t:null):null}var zg=new ya(!0);function Vg(t){var e=t.stroke;return!(null==e||"none"===e||!(t.lineWidth>0))}function Fg(t){var e=t.fill;return null!=e&&"none"!==e}function Hg(t,e){if(null!=e.fillOpacity&&1!==e.fillOpacity){var n=t.globalAlpha;t.globalAlpha=e.fillOpacity*e.opacity,t.fill(),t.globalAlpha=n}else t.fill()}function Gg(t,e){if(null!=e.strokeOpacity&&1!==e.strokeOpacity){var n=t.globalAlpha;t.globalAlpha=e.strokeOpacity*e.opacity,t.stroke(),t.globalAlpha=n}else t.stroke()}function Wg(t,e,n){var i=Wr(e.image,e.__image,n);if(Yr(i)){var r=t.createPattern(i,e.repeat||"repeat");if("function"==typeof DOMMatrix){var o=new DOMMatrix;o.rotateSelf(0,0,(e.rotation||0)/Math.PI*180),o.scaleSelf(e.scaleX||1,e.scaleY||1),o.translateSelf(e.x||0,e.y||0),r.setTransform(o)}return r}}var Ug=["shadowBlur","shadowOffsetX","shadowOffsetY"],Yg=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function Xg(t,e,n,i,r){var o=!1;if(!i&&e===(n=n||{}))return!1;(i||e.opacity!==n.opacity)&&(o||(qg(t,r),o=!0),t.globalAlpha=null==e.opacity?oo.opacity:e.opacity),(i||e.blend!==n.blend)&&(o||(qg(t,r),o=!0),t.globalCompositeOperation=e.blend||oo.blend);for(var a=0;a0&&Bg(n.lineDash,n.lineWidth),w=n.lineDashOffset,S=!!t.setLineDash,M=e.getGlobalScale();if(u.setScale(M[0],M[1],e.segmentIgnoreThreshold),b){var T=n.strokeNoScale&&e.getLineScale?e.getLineScale():1;T&&1!==T&&(b=O(b,(function(t){return t/T})),w/=T)}var C=!0;(l||e.__dirty&Ea.SHAPE_CHANGED_BIT||b&&!S&&r)&&(u.setDPR(t.dpr),s?u.setContext(null):(u.setContext(t),C=!1),u.reset(),b&&!S&&(u.setLineDash(b),u.setLineDashOffset(w)),e.buildPath(u,e.shape,i),u.toStatic(),e.pathUpdated()),C&&u.rebuildPath(t,s?a:1),b&&S&&(t.setLineDash(b),t.lineDashOffset=w),i||(n.strokeFirst?(r&&Gg(t,n),o&&Hg(t,n)):(o&&Hg(t,n),r&&Gg(t,n))),b&&S&&t.setLineDash([])}(t,e,d,p),p&&(n.batchFill=d.fill||"",n.batchStroke=d.stroke||"")):e instanceof za?(3!==n.lastDrawType&&(l=!0,n.lastDrawType=3),Zg(t,e,u,l,n),function(t,e,n){var i=n.text;if(null!=i&&(i+=""),i){t.font=n.font||Dn,t.textAlign=n.textAlign,t.textBaseline=n.textBaseline;var r=void 0;if(t.setLineDash){var o=n.lineDash&&n.lineWidth>0&&Bg(n.lineDash,n.lineWidth),a=n.lineDashOffset;if(o){var s=n.strokeNoScale&&e.getLineScale?e.getLineScale():1;s&&1!==s&&(o=O(o,(function(t){return t/s})),a/=s),t.setLineDash(o),t.lineDashOffset=a,r=!0}}n.strokeFirst?(Vg(n)&&t.strokeText(i,n.x,n.y),Fg(n)&&t.fillText(i,n.x,n.y)):(Fg(n)&&t.fillText(i,n.x,n.y),Vg(n)&&t.strokeText(i,n.x,n.y)),r&&t.setLineDash([])}}(t,e,d)):e instanceof Ha?(2!==n.lastDrawType&&(l=!0,n.lastDrawType=2),function(t,e,n,i,r){Xg(t,Kg(e,r.inHover),n&&Kg(n,r.inHover),i,r)}(t,e,u,l,n),function(t,e,n){var i=e.__image=Wr(n.image,e.__image,e,e.onload);if(i&&Yr(i)){var r=n.x||0,o=n.y||0,a=e.getWidth(),s=e.getHeight(),l=i.width/i.height;if(null==a&&null!=s?a=s*l:null==s&&null!=a?s=a/l:null==a&&null==s&&(a=i.width,s=i.height),n.sWidth&&n.sHeight){var u=n.sx||0,h=n.sy||0;t.drawImage(i,u,h,n.sWidth,n.sHeight,r,o,a,s)}else if(n.sx&&n.sy){var c=a-(u=n.sx),p=s-(h=n.sy);t.drawImage(i,u,h,c,p,r,o,a,s)}else t.drawImage(i,r,o,a,s)}}(t,e,d)):e instanceof iu&&(4!==n.lastDrawType&&(l=!0,n.lastDrawType=4),function(t,e,n){var i=e.getDisplayables(),r=e.getTemporalDisplayables();t.save();var o,a,s={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:n.viewWidth,viewHeight:n.viewHeight,inHover:n.inHover};for(o=e.getCursor(),a=i.length;o0&&t.unfinished);t.unfinished||this._zr.flush()}}},e.prototype.getDom=function(){return this._dom},e.prototype.getId=function(){return this.id},e.prototype.getZr=function(){return this._zr},e.prototype.setOption=function(t,e,n){if(this._disposed)Xy(this.id);else{var i,r,o;if(uy(e)&&(n=e.lazyUpdate,i=e.silent,r=e.replaceMerge,o=e.transition,e=e.notMerge),this.__flagInMainProcess=!0,!this._model||e){var a=new ip(this._api),s=this._theme,l=this._model=new jc;l.scheduler=this._scheduler,l.init(null,null,null,s,this._locale,a)}this._model.setOption(t,{replaceMerge:r},Ky),zy(this,o),n?(this.__optionUpdated={silent:i},this.__flagInMainProcess=!1,this.getZr().wakeUp()):(xy(this),Sy.update.call(this),this._zr.flush(),this.__optionUpdated=!1,this.__flagInMainProcess=!1,Iy.call(this,i),Ay.call(this,i))}},e.prototype.setTheme=function(){console.error("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},e.prototype.getModel=function(){return this._model},e.prototype.getOption=function(){return this._model&&this._model.getOption()},e.prototype.getWidth=function(){return this._zr.getWidth()},e.prototype.getHeight=function(){return this._zr.getHeight()},e.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||cy&&window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(t){if(a.canvasSupported)return(t=T({},t||{})).pixelRatio=t.pixelRatio||1,t.backgroundColor=t.backgroundColor||this._model.get("backgroundColor"),this._zr.painter.getRenderedCanvas(t)},e.prototype.getSvgDataURL=function(){if(a.svgSupported){var t=this._zr;return P(t.storage.getDisplayList(),(function(t){t.stopAnimation(null,!0)})),t.painter.toDataURL()}},e.prototype.getDataURL=function(t){if(!this._disposed){var e=(t=t||{}).excludeComponents,n=this._model,i=[],r=this;sy(e,(function(t){n.eachComponent({mainType:t},(function(t){var e=r._componentsMap[t.__viewId];e.group.ignore||(i.push(e),e.group.ignore=!0)}))}));var o="svg"===this._zr.painter.getType()?this.getSvgDataURL():this.getRenderedCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return sy(i,(function(t){t.group.ignore=!1})),o}Xy(this.id)},e.prototype.getConnectedDataURL=function(t){if(this._disposed)Xy(this.id);else if(a.canvasSupported){var e="svg"===t.type,n=this.group,i=Math.min,r=Math.max,o=1/0;if(iv[n]){var s=o,l=o,u=-1/0,h=-1/0,c=[],p=t&&t.pixelRatio||1;P(nv,(function(o,a){if(o.group===n){var p=e?o.getZr().painter.getSvgDom().innerHTML:o.getRenderedCanvas(w(t)),d=o.getDom().getBoundingClientRect();s=i(d.left,s),l=i(d.top,l),u=r(d.right,u),h=r(d.bottom,h),c.push({dom:p,left:d.left,top:d.top})}}));var d=(u*=p)-(s*=p),f=(h*=p)-(l*=p),g=I(),y=Ni(g,{renderer:e?"svg":"canvas"});if(y.resize({width:d,height:f}),e){var v="";return sy(c,(function(t){var e=t.left-s,n=t.top-l;v+=''+t.dom+""})),y.painter.getSvgRoot().innerHTML=v,t.connectedBackgroundColor&&y.painter.setBackgroundColor(t.connectedBackgroundColor),y.refreshImmediately(),y.painter.toDataURL()}return t.connectedBackgroundColor&&y.add(new ja({shape:{x:0,y:0,width:d,height:f},style:{fill:t.connectedBackgroundColor}})),sy(c,(function(t){var e=new Ha({style:{x:t.left*p-s,y:t.top*p-l,image:t.dom}});y.add(e)})),y.refreshImmediately(),g.toDataURL("image/"+(t&&t.type||"png"))}return this.getDataURL(t)}},e.prototype.convertToPixel=function(t,e){return My(this,"convertToPixel",t,e)},e.prototype.convertFromPixel=function(t,e){return My(this,"convertFromPixel",t,e)},e.prototype.containPixel=function(t,e){var n;if(!this._disposed)return P(wr(this._model,t),(function(t,i){i.indexOf("Models")>=0&&P(t,(function(t){var r=t.coordinateSystem;if(r&&r.containPoint)n=n||!!r.containPoint(e);else if("seriesModels"===i){var o=this._chartsMap[t.__viewId];o&&o.containPoint&&(n=n||o.containPoint(e,t))}else 0}),this)}),this),!!n;Xy(this.id)},e.prototype.getVisual=function(t,e){var n=wr(this._model,t,{defaultMainType:"series"}),i=n.seriesModel;var r=i.getData(),o=n.hasOwnProperty("dataIndexInside")?n.dataIndexInside:n.hasOwnProperty("dataIndex")?r.indexOfRawIndex(n.dataIndex):null;return null!=o?function(t,e,n){switch(n){case"color":return t.getItemVisual(e,"style")[t.getVisual("drawType")];case"opacity":return t.getItemVisual(e,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return t.getItemVisual(e,n)}}(r,o,e):Ff(r,e)},e.prototype.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},e.prototype.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]},e.prototype._initEvents=function(){var t,e,n,i=this;sy(Yy,(function(t){var e=function(e){var n,r=i.getModel(),o=e.target,a="globalout"===t;if(a?n={}:o&&Sg(o,(function(t){var e=os(t);if(e&&null!=e.dataIndex){var i=e.dataModel||r.getSeriesByIndex(e.seriesIndex);return n=i&&i.getDataParams(e.dataIndex,e.dataType)||{},!0}if(e.eventData)return n=T({},e.eventData),!0}),!0),n){var s=n.componentType,l=n.componentIndex;"markLine"!==s&&"markPoint"!==s&&"markArea"!==s||(s="series",l=n.seriesIndex);var u=s&&null!=l&&r.getComponent(s,l),h=u&&i["series"===u.mainType?"_chartsMap":"_componentsMap"][u.__viewId];0,n.event=e,n.type=t,i._$eventProcessor.eventInfo={targetEl:o,packedEvent:n,model:u,view:h},i.trigger(t,n)}};e.zrEventfulCallAtLast=!0,i._zr.on(t,e,i)})),sy(jy,(function(t,e){i._messageCenter.on(e,(function(t){this.trigger(e,t)}),i)})),sy(["selectchanged"],(function(t){i._messageCenter.on(t,(function(e){this.trigger(t,e)}),i)})),t=this._messageCenter,e=this,n=this._api,t.on("selectchanged",(function(t){var i=n.getModel();t.isFromClick?(wg("map","selectchanged",e,i,t),wg("pie","selectchanged",e,i,t)):"select"===t.fromAction?(wg("map","selected",e,i,t),wg("pie","selected",e,i,t)):"unselect"===t.fromAction&&(wg("map","unselected",e,i,t),wg("pie","unselected",e,i,t))}))},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){this._disposed?Xy(this.id):this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed)Xy(this.id);else{this._disposed=!0,Cr(this.getDom(),av,"");var t=this._api,e=this._model;sy(this._componentsViews,(function(n){n.dispose(e,t)})),sy(this._chartsViews,(function(n){n.dispose(e,t)})),this._zr.dispose(),delete nv[this.id]}},e.prototype.resize=function(t){if(this._disposed)Xy(this.id);else{this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),e){var n=e.resetOption("media"),i=t&&t.silent;this.__flagInMainProcess=!0,n&&xy(this),Sy.update.call(this,{type:"resize",animation:{duration:0}}),this.__flagInMainProcess=!1,Iy.call(this,i),Ay.call(this,i)}}},e.prototype.showLoading=function(t,e){if(this._disposed)Xy(this.id);else if(uy(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),ev[t]){var n=ev[t](this._api,e),i=this._zr;this._loadingFX=n,i.add(n)}},e.prototype.hideLoading=function(){this._disposed?Xy(this.id):(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},e.prototype.makeActionFromEvent=function(t){var e=T({},t);return e.type=jy[t.type],e},e.prototype.dispatchAction=function(t,e){if(this._disposed)Xy(this.id);else if(uy(e)||(e={silent:!!e}),Zy[t.type]&&this._model)if(this.__flagInMainProcess)this._pendingActions.push(t);else{var n=e.silent;Cy.call(this,t,n);var i=e.flush;i?this._zr.flush():!1!==i&&a.browser.weChat&&this._throttledZrFlush(),Iy.call(this,n),Ay.call(this,n)}},e.prototype.updateLabelLayout=function(){var t=this._labelManager;t.updateLayoutConfig(this._api),t.layout(this._api),t.processLabelsOverall()},e.prototype.appendData=function(t){if(this._disposed)Xy(this.id);else{var e=t.seriesIndex,n=this.getModel().getSeriesByIndex(e);0,n.appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp()}},e.internalField=function(){function t(t){for(var e=[],n=t.currentStates,i=0;i0?{duration:o,delay:i.get("delay"),easing:i.get("easing")}:null;n.group.traverse((function(e){if(e.states&&e.states.emphasis){if(Mu(e))return;if(e instanceof Ea&&function(t){var e=ls(t);e.normalFill=t.style.fill,e.normalStroke=t.style.stroke;var n=t.states.select||{};e.selectFill=n.style&&n.style.fill||null,e.selectStroke=n.style&&n.style.stroke||null}(e),e.__dirty){var n=e.prevStates;n&&e.useStates(n)}if(r){e.stateTransition=a;var i=e.getTextContent(),o=e.getTextGuideLine();i&&(i.stateTransition=a),o&&(o.stateTransition=a)}e.__dirty&&t(e)}}))}xy=function(t){var e=t._scheduler;e.restorePipelines(t._model),e.prepareStageTasks(),by(t,!0),by(t,!1),e.plan()},by=function(t,e){for(var n=t._model,i=t._scheduler,r=e?t._componentsViews:t._chartsViews,o=e?t._componentsMap:t._chartsMap,a=t._zr,s=t._api,l=0;le.get("hoverLayerThreshold")&&!a.node&&!a.worker&&e.eachSeries((function(e){if(!e.preventUsingHoverLayer){var n=t._chartsMap[e.__viewId];n.__alive&&n.group.traverse((function(t){t.states.emphasis&&(t.states.emphasis.hoverLayer=!0)}))}}))}(t,n)},Ny=function(t,e){sy(Jy,(function(n){n(t,e)}))},Vy=function(t){t.__needsUpdateStatus=!0,t.getZr().wakeUp()},Fy=function(e){e.__needsUpdateStatus&&(e.getZr().storage.traverse((function(e){Mu(e)||t(e)})),e.__needsUpdateStatus=!1)},Ey=function(t){return new(function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return n(i,e),i.prototype.getCoordinateSystems=function(){return t._coordSysMgr.getCoordinateSystems()},i.prototype.getComponentByElement=function(e){for(;e;){var n=e.__ecComponentInfo;if(null!=n)return t._model.getComponent(n.mainType,n.index);e=e.parent}},i.prototype.enterEmphasis=function(e,n){Ls(e,n),Vy(t)},i.prototype.leaveEmphasis=function(e,n){Ps(e,n),Vy(t)},i.prototype.enterBlur=function(e){Os(e),Vy(t)},i.prototype.leaveBlur=function(e){Rs(e),Vy(t)},i.prototype.enterSelect=function(e){Ns(e),Vy(t)},i.prototype.leaveSelect=function(e){Es(e),Vy(t)},i.prototype.getModel=function(){return t.getModel()},i.prototype.getViewOfComponentModel=function(e){return t.getViewOfComponentModel(e)},i.prototype.getViewOfSeriesModel=function(e){return t.getViewOfSeriesModel(e)},i}(Qc))(t)},By=function(t){function e(t,e){for(var n=0;n=0)){_v.push(n);var o=pf.wrapStageHandler(n,r);o.__prio=e,o.__raw=n,t.push(o)}}function bv(t,e){ev[t]=e}function wv(t,e,n){Nf(t,e,n)}var Sv=function(t){var e=(t=w(t)).type,n="";e||ar(n);var i=e.split(":");2!==i.length&&ar(n);var r=!1;"echarts"===i[0]&&(e=i[1],r=!0),t.__isBuiltIn=r,hd.set(e,t)};mv(py,sf),mv(dy,uf),mv(dy,hf),mv(py,Vf),mv(dy,{createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(t.hasSymbolVisual&&!e.isSeriesFiltered(t))return{dataEach:t.getData().hasItemOption?function(t,e){var n=t.getItemModel(e),i=n.getShallow("symbol",!0),r=n.getShallow("symbolSize",!0),o=n.getShallow("symbolRotate",!0),a=n.getShallow("symbolKeepAspect",!0);null!=i&&t.setItemVisual(e,"symbol",i),null!=r&&t.setItemVisual(e,"symbolSize",r),null!=o&&t.setItemVisual(e,"symbolRotate",o),null!=a&&t.setItemVisual(e,"symbolKeepAspect",a)}:null}}}),mv(7e3,(function(t,e){t.eachRawSeries((function(n){if(!t.isSeriesFiltered(n)){var i=n.getData();i.hasItemVisual()&&i.each((function(t){var n=i.getItemVisual(t,"decal");n&&(i.ensureUniqueItemVisual(t,"style").decal=ny(n,e))}));var r=i.getVisual("decal");if(r)i.getVisual("style").decal=ny(r,e)}}))})),cv(Mp),pv(900,(function(t){var e=ut();t.eachSeries((function(t){var n=t.get("stack");if(n){var i=e.get(n)||e.set(n,[]),r=t.getData(),o={stackResultDimension:r.getCalculationInfo("stackResultDimension"),stackedOverDimension:r.getCalculationInfo("stackedOverDimension"),stackedDimension:r.getCalculationInfo("stackedDimension"),stackedByDimension:r.getCalculationInfo("stackedByDimension"),isStackedByIndex:r.getCalculationInfo("isStackedByIndex"),data:r,seriesModel:t};if(!o.stackedDimension||!o.isStackedByIndex&&!o.stackedByDimension)return;i.length&&r.setCalculationInfo("stackedOnSeries",i[i.length-1].seriesModel),i.push(o)}})),e.each(Tp)})),bv("default",(function(t,e){C(e=e||{},{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var n=new ki,i=new ja({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});n.add(i);var r,o=new $a({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily}}),a=new ja({style:{fill:"none"},textContent:o,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});return n.add(a),e.showSpinner&&((r=new Xl({shape:{startAngle:-cf/2,endAngle:-cf/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001})).animateShape(!0).when(1e3,{endAngle:3*cf/2}).start("circularInOut"),r.animateShape(!0).when(1e3,{startAngle:3*cf/2}).delay(300).start("circularInOut"),n.add(r)),n.resize=function(){var n=o.getBoundingRect().width,s=e.showSpinner?e.spinnerRadius:0,l=(t.getWidth()-2*s-(e.showSpinner&&n?10:0)-n)/2-(e.showSpinner&&n?0:5+n/2)+(e.showSpinner?0:n/2)+(n?0:s),u=t.getHeight()/2;e.showSpinner&&r.setShape({cx:l,cy:u}),a.setShape({x:l-s,y:u-s,width:2*s,height:2*s}),i.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},n.resize(),n})),gv({type:cs,event:cs,update:cs},pt),gv({type:ps,event:ps,update:ps},pt),gv({type:ds,event:ds,update:ds},pt),gv({type:fs,event:fs,update:fs},pt),gv({type:gs,event:gs,update:gs},pt),hv("light",Af),hv("dark",Of);var Mv=[],Tv={registerPreprocessor:cv,registerProcessor:pv,registerPostInit:dv,registerPostUpdate:fv,registerAction:gv,registerCoordinateSystem:yv,registerLayout:vv,registerVisual:mv,registerTransform:Sv,registerLoading:bv,registerMap:wv,PRIORITY:fy,ComponentModel:vc,ComponentView:Fd,SeriesModel:Pd,ChartView:Ud,registerComponentModel:function(t){vc.registerClass(t)},registerComponentView:function(t){Fd.registerClass(t)},registerSeriesModel:function(t){Pd.registerClass(t)},registerChartView:function(t){Ud.registerClass(t)},registerSubTypeDefaulter:function(t,e){vc.registerSubTypeDefaulter(t,e)},registerPainter:function(t,e){Ei(t,e)}};function Cv(t){V(t)?P(t,(function(t){Cv(t)})):A(Mv,t)>=0||(Mv.push(t),F(t)&&(t={install:t}),t.install(Tv))}function Iv(t){return null==t?0:t.length||1}function Av(t){return t}var Dv=function(){function t(t,e,n,i,r,o){this._old=t,this._new=e,this._oldKeyGetter=n||Av,this._newKeyGetter=i||Av,this.context=r,this._diffModeMultiple="multiple"===o}return t.prototype.add=function(t){return this._add=t,this},t.prototype.update=function(t){return this._update=t,this},t.prototype.updateManyToOne=function(t){return this._updateManyToOne=t,this},t.prototype.updateOneToMany=function(t){return this._updateOneToMany=t,this},t.prototype.remove=function(t){return this._remove=t,this},t.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},t.prototype._executeOneToOne=function(){var t=this._old,e=this._new,n={},i=new Array(t.length),r=new Array(e.length);this._initIndexMap(t,null,i,"_oldKeyGetter"),this._initIndexMap(e,n,r,"_newKeyGetter");for(var o=0;o1){var u=s.shift();1===s.length&&(n[a]=s[0]),this._update&&this._update(u,o)}else 1===l?(n[a]=null,this._update&&this._update(s,o)):this._remove&&this._remove(o)}this._performRestAdd(r,n)},t.prototype._executeMultiple=function(){var t=this._old,e=this._new,n={},i={},r=[],o=[];this._initIndexMap(t,n,r,"_oldKeyGetter"),this._initIndexMap(e,i,o,"_newKeyGetter");for(var a=0;a1&&1===c)this._updateManyToOne&&this._updateManyToOne(u,l),i[s]=null;else if(1===h&&c>1)this._updateOneToMany&&this._updateOneToMany(u,l),i[s]=null;else if(1===h&&1===c)this._update&&this._update(u,l),i[s]=null;else if(h>1)for(var p=0;p1)for(var a=0;av[1]&&(v[1]=y)}e&&(this._nameList[d]=e[f],this._dontMakeIdFromName||Vv(this,d))}this._rawCount=this._count=s,this._extent={},Pv(this)},t.prototype._initDataFromProvider=function(t,e,n){if(!(t>=e)){for(var i=this._rawData,r=this._storage,o=this.dimensions,a=o.length,s=this._dimensionInfos,l=this._nameList,u=this._idList,h=this._rawExtent,c=i.getSource().sourceFormat===wc,p=0;pb[1]&&(b[1]=x)}if(c&&!i.pure&&y){var w=y.name;null==l[v]&&null!=w&&(l[v]=yr(w,null));var S=y.id;null==u[v]&&null!=S&&(u[v]=yr(S,null))}this._dontMakeIdFromName||Vv(this,v)}!i.persistent&&i.clean&&i.clean(),this._rawCount=this._count=e,this._extent={},Pv(this)}},t.prototype.count=function(){return this._count},t.prototype.getIndices=function(){var t,e=this._indices;if(e){var n=e.constructor,i=this._count;if(n===Array){t=new n(i);for(var r=0;r=0&&e=0&&e=0&&ea&&(a=l)}return i=[o,a],this._extent[t]=i,i},t.prototype.getApproximateExtent=function(t){return t=this.getDimension(t),this._approximateExtent[t]||this.getDataExtent(t)},t.prototype.setApproximateExtent=function(t,e){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},t.prototype.getCalculationInfo=function(t){return this._calculationInfo[t]},t.prototype.setCalculationInfo=function(t,e){Zv(t)?T(this._calculationInfo,t):this._calculationInfo[t]=e},t.prototype.getSum=function(t){var e=0;if(this._storage[t])for(var n=0,i=this.count();n=this._rawCount||t<0)return-1;if(!this._indices)return t;var e=this._indices,n=e[t];if(null!=n&&nt))return o;r=o-1}}return-1},t.prototype.indicesOfNearest=function(t,e,n){var i=this._storage[t],r=[];if(!i)return r;null==n&&(n=1/0);for(var o=1/0,a=-1,s=0,l=0,u=this.count();l=0&&a<0)&&(o=c,a=h,s=0),h===a&&(r[s++]=l))}return r.length=s,r},t.prototype.getRawDataItem=function(t){if(this._rawData.persistent)return this._rawData.getItem(this.getRawIndex(t));for(var e=[],n=0;n=c&&b<=p||isNaN(b))&&(s[l++]=g),g++}f=!0}else if(2===o){y=d[h[0]];var m=d[h[1]],_=t[i[1]][0],x=t[i[1]][1];for(v=0;v=c&&b<=p||isNaN(b))&&(w>=_&&w<=x||isNaN(w))&&(s[l++]=g),g++}f=!0}}if(!f)if(1===o)for(v=0;v=c&&b<=p||isNaN(b))&&(s[l++]=S)}else for(v=0;vt[C][1])&&(M=!1)}M&&(s[l++]=this.getRawIndex(v))}return lx[1]&&(x[1]=_)}}}return a},t.prototype.downSample=function(t,e,n,i){for(var r=Hv(this,[t]),o=r._storage,a=[],s=Xv(1/e),l=o[t],u=this.count(),h=r._rawExtent[t],c=new(Ov(this))(u),p=0,d=0;du-d&&(s=u-d,a.length=s);for(var f=0;fh[1]&&(h[1]=y),c[p++]=v}return r._count=p,r._indices=c,r.getRawIndex=Ev,r},t.prototype.lttbDownSample=function(t,e){var n,i,r,o=Hv(this,[]),a=o._storage[t],s=this.count(),l=new(Ov(this))(s),u=0,h=Xv(1/e),c=this.getRawIndex(0);l[u++]=c;for(var p=1;pn&&(n=i,r=S)}l[u++]=r,c=r}return l[u++]=this.getRawIndex(s-1),o._count=u,o._indices=l,o.getRawIndex=Ev,o},t.prototype.getItemModel=function(t){var e=this.hostModel,n=this.getRawDataItem(t);return new oh(n,e,e&&e.ecModel)},t.prototype.diff=function(t){var e=this;return new Dv(t?t.getIndices():[],this.getIndices(),(function(e){return Bv(t,e)}),(function(t){return Bv(e,t)}))},t.prototype.getVisual=function(t){var e=this._visual;return e&&e[t]},t.prototype.setVisual=function(t,e){this._visual=this._visual||{},Zv(t)?T(this._visual,t):this._visual[t]=e},t.prototype.getItemVisual=function(t,e){var n=this._itemVisuals[t],i=n&&n[e];return null==i?this.getVisual(e):i},t.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},t.prototype.ensureUniqueItemVisual=function(t,e){var n=this._itemVisuals,i=n[t];i||(i=n[t]={});var r=i[e];return null==r&&(V(r=this.getVisual(e))?r=r.slice():Zv(r)&&(r=T({},r)),i[e]=r),r},t.prototype.setItemVisual=function(t,e,n){var i=this._itemVisuals[t]||{};this._itemVisuals[t]=i,Zv(e)?T(i,e):i[e]=n},t.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},t.prototype.setLayout=function(t,e){if(Zv(t))for(var n in t)t.hasOwnProperty(n)&&this.setLayout(n,t[n]);else this._layout[t]=e},t.prototype.getLayout=function(t){return this._layout[t]},t.prototype.getItemLayout=function(t){return this._itemLayouts[t]},t.prototype.setItemLayout=function(t,e,n){this._itemLayouts[t]=n?T(this._itemLayouts[t]||{},e):e},t.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},t.prototype.setItemGraphicEl=function(t,e){var n=this.hostModel;if(e){var i=os(e);i.dataIndex=t,i.dataType=this.dataType,i.seriesIndex=n&&n.seriesIndex,"group"===e.type&&e.traverse(Wv,e)}this._graphicEls[t]=e},t.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},t.prototype.eachItemGraphicEl=function(t,e){P(this._graphicEls,(function(n,i){n&&t&&t.call(e,n,i)}))},t.prototype.cloneShallow=function(e){e||(e=new t(jv(this.dimensions,this.getDimensionInfo,this),this.hostModel));if(e._storage=this._storage,e._storageArr=this._storageArr,Uv(e,this),this._indices){var n=this._indices.constructor;if(n===Array){var i=this._indices.length;e._indices=new n(i);for(var r=0;r65535?$v:Qv},Rv=function(t,e,n,i){var r=Kv[e.type],o=e.name;if(i){var a=t[o],s=a&&a.length;if(s!==n){for(var l=new r(n),u=0;u=0?this._indices[t]:-1},Bv=function(t,e){var n=t._idList[e];return null==n&&null!=t._idDimIdx&&(n=zv(t,t._idDimIdx,t._idOrdinalMeta,e)),null==n&&(n="e\0\0"+e),n},Fv=function(t){return V(t)||(t=null!=t?[t]:[]),t},function(t,e){for(var n=0;n=0?(s[c]=(o=l[c],a=void 0,(a=o.constructor)===Array?o.slice():new a(o)),r._rawExtent[c]=Gv(),r._extent[c]=null):s[c]=l[c],u.push(s[c]))}return r},Gv=function(){return[1/0,-1/0]},Wv=function(t){var e=os(t),n=os(this);e.seriesIndex=n.seriesIndex,e.dataIndex=n.dataIndex,e.dataType=n.dataType},Uv=function(t,e){P(tm.concat(e.__wrappedMethods||[]),(function(n){e.hasOwnProperty(n)&&(t[n]=e[n])})),t.__wrappedMethods=e.__wrappedMethods,P(em,(function(n){t[n]=w(e[n])})),t._calculationInfo=T({},e._calculationInfo)},Vv=function(t,e){var n=t._nameList,i=t._idList,r=t._nameDimIdx,o=t._idDimIdx,a=n[e],s=i[e];if(null==a&&null!=r&&(n[e]=a=zv(t,r,t._nameOrdinalMeta,e)),null==s&&null!=o&&(i[e]=s=zv(t,o,t._idOrdinalMeta,e)),null==s&&null!=a){var l=t._nameRepeatCount,u=l[a]=(l[a]||0)+1;s=a,u>1&&(s+="__ec__"+u),i[e]=s}}}(),t}();function im(t,e,n){Pp(e)||(e=Rp(e)),n=n||{},t=(t||[]).slice();for(var i=(n.dimsDef||[]).slice(),r=ut(),o=ut(),a=[],s=function(t,e,n,i){var r=Math.max(t.dimensionsDetectedCount||1,e.length,n.length,i||0);return P(e,(function(t){var e;U(t)&&(e=t.dimsDef)&&(r=Math.max(r,e.length))})),r}(e,t,i,n.dimCount),l=0;le[1]&&(e[1]=t[1])},t.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e)},t.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},t.prototype.isBlank=function(){return this._isBlank},t.prototype.setBlank=function(t){this._isBlank=t},t}();Br(dm);var fm=function(){function t(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication}return t.createByAxisModel=function(e){var n=e.option,i=n.data,r=i&&O(i,gm);return new t({categories:r,needCollect:!r,deduplication:!1!==n.dedplication})},t.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},t.prototype.parseAndCollect=function(t){var e,n=this._needCollect;if("string"!=typeof t&&!n)return t;if(n&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var i=this._getOrCreateMap();return null==(e=i.get(t))&&(n?(e=this.categories.length,this.categories[e]=t,i.set(t,e)):e=NaN),e},t.prototype._getOrCreateMap=function(){return this._map||(this._map=ut(this.categories))},t}();function gm(t){return U(t)&&null!=t.value?t.value:t+""}var ym=Hi;function vm(t,e,n,i){var r={},o=t[1]-t[0],a=r.interval=Qi(o/e,!0);null!=n&&ai&&(a=r.interval=i);var s=r.intervalPrecision=mm(a);return function(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),_m(t,0,e),_m(t,1,e),t[0]>t[1]&&(t[0]=t[1])}(r.niceTickExtent=[ym(Math.ceil(t[0]/a)*a,s),ym(Math.floor(t[1]/a)*a,s)],t),r}function mm(t){return Ui(t)+2}function _m(t,e,n){t[e]=Math.max(Math.min(t[e],n[1]),n[0])}function xm(t,e){return t>=e[0]&&t<=e[1]}function bm(t,e){return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])}function wm(t,e){return t*(e[1]-e[0])+e[0]}var Sm=function(t){function e(e){var n=t.call(this,e)||this;n.type="ordinal";var i=n.getSetting("ordinalMeta");return i||(i=new fm({})),V(i)&&(i=new fm({categories:O(i,(function(t){return U(t)?t.value:t}))})),n._ordinalMeta=i,n._extent=n.getSetting("extent")||[0,i.categories.length-1],n}return n(e,t),e.prototype.parse=function(t){return"string"==typeof t?this._ordinalMeta.getOrdinal(t):Math.round(t)},e.prototype.contain=function(t){return xm(t=this.parse(t),this._extent)&&null!=this._ordinalMeta.categories[t]},e.prototype.normalize=function(t){return bm(t=this._getTickNumber(this.parse(t)),this._extent)},e.prototype.scale=function(t){return t=Math.round(wm(t,this._extent)),this.getRawOrdinalNumber(t)},e.prototype.getTicks=function(){for(var t=[],e=this._extent,n=e[0];n<=e[1];)t.push({value:n}),n++;return t},e.prototype.getMinorTicks=function(t){},e.prototype.setSortInfo=function(t){if(null!=t){for(var e=t.ordinalNumbers,n=this._ordinalNumbersByTick=[],i=this._ticksByOrdinalNumber=[],r=0,o=this._ordinalMeta.categories.length,a=Math.min(o,e.length);r=0&&t=0&&t=t},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.niceTicks=function(){},e.prototype.niceExtent=function(){},e.type="ordinal",e}(dm);dm.registerClass(Sm);var Mm=Hi,Tm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="interval",e._interval=0,e._intervalPrecision=2,e}return n(e,t),e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return xm(t,this._extent)},e.prototype.normalize=function(t){return bm(t,this._extent)},e.prototype.scale=function(t){return wm(t,this._extent)},e.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=parseFloat(t)),isNaN(e)||(n[1]=parseFloat(e))},e.prototype.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1]),this.setExtent(e[0],e[1])},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=mm(t)},e.prototype.getTicks=function(t){var e=this._interval,n=this._extent,i=this._niceExtent,r=this._intervalPrecision,o=[];if(!e)return o;n[0]1e4)return[];var s=o.length?o[o.length-1].value:i[1];return n[1]>s&&(t?o.push({value:Mm(s+e,r)}):o.push({value:n[1]})),o},e.prototype.getMinorTicks=function(t){for(var e=this.getTicks(!0),n=[],i=this.getExtent(),r=1;ri[0]&&h0&&(o=null===o?s:Math.min(o,s))}n[i]=o}}return n}(t),n=[];return P(t,(function(t){var i,r=t.coordinateSystem.getBaseAxis(),o=r.getExtent();if("category"===r.type)i=r.getBandWidth();else if("value"===r.type||"time"===r.type){var a=r.dim+"_"+r.index,s=e[a],l=Math.abs(o[1]-o[0]),u=r.scale.getExtent(),h=Math.abs(u[1]-u[0]);i=s?l/h*s:l}else{var c=t.getData();i=Math.abs(o[1]-o[0])/c.count()}var p=Fi(t.get("barWidth"),i),d=Fi(t.get("barMaxWidth"),i),f=Fi(t.get("barMinWidth")||1,i),g=t.get("barGap"),y=t.get("barCategoryGap");n.push({bandWidth:i,barWidth:p,barMaxWidth:d,barMinWidth:f,barGap:g,barCategoryGap:y,axisKey:Am(r),stackId:Im(t)})})),function(t){var e={};P(t,(function(t,n){var i=t.axisKey,r=t.bandWidth,o=e[i]||{bandWidth:r,remainedWidth:r,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},a=o.stacks;e[i]=o;var s=t.stackId;a[s]||o.autoWidthCount++,a[s]=a[s]||{width:0,maxWidth:0};var l=t.barWidth;l&&!a[s].width&&(a[s].width=l,l=Math.min(o.remainedWidth,l),o.remainedWidth-=l);var u=t.barMaxWidth;u&&(a[s].maxWidth=u);var h=t.barMinWidth;h&&(a[s].minWidth=h);var c=t.barGap;null!=c&&(o.gap=c);var p=t.barCategoryGap;null!=p&&(o.categoryGap=p)}));var n={};return P(e,(function(t,e){n[e]={};var i=t.stacks,r=t.bandWidth,o=t.categoryGap;if(null==o){var a=E(i).length;o=Math.max(35-4*a,15)+"%"}var s=Fi(o,r),l=Fi(t.gap,1),u=t.remainedWidth,h=t.autoWidthCount,c=(u-s)/(h+(h-1)*l);c=Math.max(c,0),P(i,(function(t){var e=t.maxWidth,n=t.minWidth;if(t.width){i=t.width;e&&(i=Math.min(i,e)),n&&(i=Math.max(i,n)),t.width=i,u-=i+l*i,h--}else{var i=c;e&&ei&&(i=n),i!==c&&(t.width=i,u-=i+l*i,h--)}})),c=(u-s)/(h+(h-1)*l),c=Math.max(c,0);var p,d=0;P(i,(function(t,e){t.width||(t.width=c),p=t,d+=t.width*(1+l)})),p&&(d-=p.width*l);var f=-d/2;P(i,(function(t,i){n[e][i]=n[e][i]||{bandWidth:r,offset:f,width:t.width},f+=t.width*(1+l)}))})),n}(n)}function Lm(t,e,n){if(t&&e){var i=t[Am(e)];return null!=i&&null!=n?i[Im(n)]:i}}function Pm(t,e){var n=Dm(t,e),i=km(n),r={};P(n,(function(t){var e=t.getData(),n=t.coordinateSystem,o=n.getBaseAxis(),a=Im(t),s=i[Am(o)][a],l=s.offset,u=s.width,h=n.getOtherAxis(o),c=t.get("barMinHeight")||0;r[a]=r[a]||[],e.setLayout({bandWidth:s.bandWidth,offset:l,size:u});for(var p=e.mapDimension(h.dim),d=e.mapDimension(o.dim),f=hm(e,p),g=h.isHorizontal(),y=Em(o,h),v=0,m=e.count();v=0?"p":"n",w=y;f&&(r[a][x]||(r[a][x]={p:y,n:y}),w=r[a][x][b]);var S,M=void 0,T=void 0,C=void 0,I=void 0;if(g)M=w,T=(S=n.dataToPoint([_,x]))[1]+l,C=S[0]-y,I=u,Math.abs(C).5||(h=.5),{progress:function(t,e){for(var c,p=t.count,d=new Cm(2*p),f=new Cm(2*p),g=new Cm(p),y=[],v=[],m=0,_=0;null!=(c=t.next());)v[u]=e.get(a,c),v[1-u]=e.get(s,c),y=n.dataToPoint(v,null,y),f[m]=l?i.x+i.width:y[0],d[m++]=y[0],f[m]=l?y[1]:i.y+i.height,d[m++]=y[1],g[_++]=c;e.setLayout({largePoints:d,largeDataIndices:g,largeBackgroundPoints:f,barWidth:h,valueAxisStart:Em(r,o),backgroundStart:l?i.x:i.y,valueAxisHorizontal:l})}}}}};function Rm(t){return t.coordinateSystem&&"cartesian2d"===t.coordinateSystem.type}function Nm(t){return t.pipelineContext&&t.pipelineContext.large}function Em(t,e,n){return e.toGlobalCoord(e.dataToCoord("log"===e.type?1:0))}var Bm=function(t){function e(e){var n=t.call(this,e)||this;return n.type="time",n}return n(e,t),e.prototype.getLabel=function(t){var e=this.getSetting("useUTC");return Dh(t.value,Sh[function(t){switch(t){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}(Ih(this._minLevelUnit))]||Sh.second,e,this.getSetting("locale"))},e.prototype.getFormattedLabel=function(t,e,n){var i=this.getSetting("useUTC");return function(t,e,n,i,r){var o=null;if("string"==typeof n)o=n;else if("function"==typeof n)o=n(t.value,e,{level:t.level});else{var a=T({},bh);if(t.level>0)for(var s=0;s=0;--s)if(l[u]){o=l[u];break}o=o||a.none}if(V(o)){var h=null==t.level?0:t.level>=0?t.level:o.length+t.level;o=o[h=Math.min(h,o.length-1)]}}return Dh(new Date(t.value),o,r,i)}(t,e,n,this.getSetting("locale"),i)},e.prototype.getTicks=function(t){var e=this._interval,n=this._extent,i=[];if(!e)return i;i.push({value:n[0],level:0});var r=this.getSetting("useUTC"),o=function(t,e,n,i){var r=1e4,o=Th,a=0;function s(t,e,n,r,o,a,s){for(var l=new Date(e),u=e,h=l[r]();u1&&0===u&&o.unshift({value:o[0].value-p})}}for(u=0;u=i[0]&&v<=i[1]&&c++)}var m=(i[1]-i[0])/e;if(c>1.5*m&&p>m/1.5)break;if(u.push(g),c>m||t===o[d])break}h=[]}}0;var _=N(O(u,(function(t){return N(t,(function(t){return t.value>=i[0]&&t.value<=i[1]&&!t.notAdd}))})),(function(t){return t.length>0})),x=[],b=_.length-1;for(d=0;d<_.length;++d)for(var w=_[d],S=0;Sn&&(this._approxInterval=n);var o=zm.length,a=Math.min(function(t,e,n,i){for(;n>>1;t[r][1]16?16:t>7.5?7:t>3.5?4:t>1.5?2:1}function Fm(t){return(t/=2592e6)>6?6:t>3?3:t>2?2:1}function Hm(t){return(t/=mh)>12?12:t>6?6:t>3.5?4:t>2?2:1}function Gm(t,e){return(t/=e?vh:yh)>30?30:t>20?20:t>15?15:t>10?10:t>5?5:t>2?2:1}function Wm(t){return Qi(t,!0)}function Um(t,e,n){var i=new Date(t);switch(Ih(e)){case"year":case"month":i[Fh(n)](0);case"day":i[Hh(n)](1);case"hour":i[Gh(n)](0);case"minute":i[Wh(n)](0);case"second":i[Uh(n)](0),i[Yh(n)](0)}return i.getTime()}dm.registerClass(Bm);var Ym=dm.prototype,Xm=Tm.prototype,Zm=Ui,jm=Hi,qm=Math.floor,Km=Math.ceil,$m=Math.pow,Jm=Math.log,Qm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="log",e.base=10,e._originalScale=new Tm,e._interval=0,e}return n(e,t),e.prototype.getTicks=function(t){var e=this._originalScale,n=this._extent,i=e.getExtent();return O(Xm.getTicks.call(this,t),(function(t){var e=t.value,r=Hi($m(this.base,e));return r=e===n[0]&&this._fixMin?e_(r,i[0]):r,{value:r=e===n[1]&&this._fixMax?e_(r,i[1]):r}}),this)},e.prototype.setExtent=function(t,e){var n=this.base;t=Jm(t)/Jm(n),e=Jm(e)/Jm(n),Xm.setExtent.call(this,t,e)},e.prototype.getExtent=function(){var t=this.base,e=Ym.getExtent.call(this);e[0]=$m(t,e[0]),e[1]=$m(t,e[1]);var n=this._originalScale.getExtent();return this._fixMin&&(e[0]=e_(e[0],n[0])),this._fixMax&&(e[1]=e_(e[1],n[1])),e},e.prototype.unionExtent=function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=Jm(t[0])/Jm(e),t[1]=Jm(t[1])/Jm(e),Ym.unionExtent.call(this,t)},e.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},e.prototype.niceTicks=function(t){t=t||10;var e=this._extent,n=e[1]-e[0];if(!(n===1/0||n<=0)){var i=$i(n);for(t/n*i<=.5&&(i*=10);!isNaN(i)&&Math.abs(i)<1&&Math.abs(i)>0;)i*=10;var r=[Hi(Km(e[0]/i)*i),Hi(qm(e[1]/i)*i)];this._interval=i,this._niceExtent=r}},e.prototype.niceExtent=function(t){Xm.niceExtent.call(this,t),this._fixMin=t.fixMin,this._fixMax=t.fixMax},e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return xm(t=Jm(t)/Jm(this.base),this._extent)},e.prototype.normalize=function(t){return bm(t=Jm(t)/Jm(this.base),this._extent)},e.prototype.scale=function(t){return t=wm(t,this._extent),$m(this.base,t)},e.type="log",e}(dm),t_=Qm.prototype;function e_(t,e){return jm(t,Zm(e))}t_.getMinorTicks=Xm.getMinorTicks,t_.getLabel=Xm.getLabel,dm.registerClass(Qm);var n_=function(){function t(t,e,n){this._prepareParams(t,e,n)}return t.prototype._prepareParams=function(t,e,n){n[1]s&&(a=NaN,s=NaN);var h=$(a)||$(s)||t&&!i;this._needCrossZero&&(a>0&&s>0&&!l&&(a=0),a<0&&s<0&&!u&&(s=0));var c=this._determinedMin,p=this._determinedMax;return null!=c&&(a=c,l=!0),null!=p&&(s=p,u=!0),{min:a,max:s,minFixed:l,maxFixed:u,isBlank:h}},t.prototype.modifyDataMinMax=function(t,e){this[r_[t]]=e},t.prototype.setDeterminedMinMax=function(t,e){var n=i_[t];this[n]=e},t.prototype.freeze=function(){this.frozen=!0},t}(),i_={min:"_determinedMin",max:"_determinedMax"},r_={min:"_dataMin",max:"_dataMax"};function o_(t,e,n){var i=t.rawExtentInfo;return i||(i=new n_(t,e,n),t.rawExtentInfo=i,i)}function a_(t,e){return null==e?null:$(e)?NaN:t.parse(e)}function s_(t,e){var n=t.type,i=o_(t,e,t.getExtent()).calculate();t.setBlank(i.isBlank);var r=i.min,o=i.max,a=e.ecModel;if(a&&"time"===n){var s=Dm("bar",a),l=!1;if(P(s,(function(t){l=l||t.getBaseAxis()===e.axis})),l){var u=km(s),h=function(t,e,n,i){var r=n.axis.getExtent(),o=r[1]-r[0],a=Lm(i,n.axis);if(void 0===a)return{min:t,max:e};var s=1/0;P(a,(function(t){s=Math.min(t.offset,s)}));var l=-1/0;P(a,(function(t){l=Math.max(t.offset+t.width,l)})),s=Math.abs(s),l=Math.abs(l);var u=s+l,h=e-t,c=h/(1-(s+l)/o)-h;return{min:t-=c*(s/u),max:e+=c*(l/u)}}(r,o,e,u);r=h.min,o=h.max}}return{extent:[r,o],fixMin:i.minFixed,fixMax:i.maxFixed}}function l_(t,e){var n=s_(t,e),i=n.extent,r=e.get("splitNumber");t instanceof Qm&&(t.base=e.get("logBase"));var o=t.type;t.setExtent(i[0],i[1]),t.niceExtent({splitNumber:r,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:"interval"===o||"time"===o?e.get("minInterval"):null,maxInterval:"interval"===o||"time"===o?e.get("maxInterval"):null});var a=e.get("interval");null!=a&&t.setInterval&&t.setInterval(a)}function u_(t,e){if(e=e||t.get("type"))switch(e){case"category":return new Sm({ordinalMeta:t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),extent:[1/0,-1/0]});case"time":return new Bm({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new(dm.getClass(e)||Tm)}}function h_(t){var e,n,i=t.getLabelModel().get("formatter"),r="category"===t.type?t.scale.getExtent()[0]:null;return"time"===t.scale.type?(n=i,function(e,i){return t.scale.getFormattedLabel(e,i,n)}):"string"==typeof i?function(e){return function(n){var i=t.scale.getLabel(n);return e.replace("{value}",null!=i?i:"")}}(i):"function"==typeof i?(e=i,function(n,i){return null!=r&&(i=n.value-r),e(c_(t,n),i,null!=n.level?{level:n.level}:null)}):function(e){return t.scale.getLabel(e)}}function c_(t,e){return"category"===t.type?t.scale.getLabel(e):e.value}function p_(t,e){var n=e*Math.PI/180,i=t.width,r=t.height,o=i*Math.abs(Math.cos(n))+Math.abs(r*Math.sin(n)),a=i*Math.abs(Math.sin(n))+Math.abs(r*Math.cos(n));return new In(t.x,t.y,o,a)}function d_(t){var e=t.get("interval");return null==e?"auto":e}function f_(t){return"category"===t.type&&0===d_(t.getLabelModel())}function g_(t,e){var n={};return P(t.mapDimensionsAll(e),(function(e){n[cm(t,e)]=!0})),E(n)}var y_=function(){function t(){}return t.prototype.getNeedCrossZero=function(){return!this.option.scale},t.prototype.getCoordSysModel=function(){},t}();var v_={isDimensionStacked:hm,enableDataStack:um,getStackedDimension:cm};var m_=Object.freeze({__proto__:null,createList:function(t){return pm(t.getSource(),t)},getLayoutRect:hc,dataStack:v_,createScale:function(t,e){var n=e;e instanceof oh||(n=new oh(e));var i=u_(n);return i.setExtent(t[0],t[1]),l_(i,n),i},mixinAxisModelCommonMethods:function(t){k(t,y_)},getECData:os,createTextStyle:function(t,e){return Hu(t,null,null,"normal"!==(e=e||{}).state)},createDimensions:om,createSymbol:Rg,enableHoverEmphasis:Hs});function __(t,e){return Math.abs(t-e)<1e-8}function x_(t,e,n){var i=0,r=t[0];if(!r)return!1;for(var o=1;o>1^-(1&s),l=l>>1^-(1&l),r=s+=r,o=l+=o,i.push([s/n,l/n])}return i}function S_(t,e){return O(N((t=function(t){if(!t.UTF8Encoding)return t;var e=t,n=e.UTF8Scale;null==n&&(n=1024);for(var i=e.features,r=0;r0})),(function(t){var n=t.properties,i=t.geometry,r=[];if("Polygon"===i.type){var o=i.coordinates;r.push({type:"polygon",exterior:o[0],interiors:o.slice(1)})}"MultiPolygon"===i.type&&P(o=i.coordinates,(function(t){t[0]&&r.push({type:"polygon",exterior:t[0],interiors:t.slice(1)})}));var a=new b_(n[e||"name"],r,n.cp);return a.properties=n,a}))}var M_=Object.freeze({__proto__:null,linearMap:Vi,round:Hi,asc:Gi,getPrecision:Wi,getPrecisionSafe:Ui,getPixelPrecision:Yi,getPercentWithPrecision:Xi,MAX_SAFE_INTEGER:9007199254740991,remRadian:Zi,isRadianAroundZero:ji,parseDate:Ki,quantity:$i,quantityExponent:Ji,nice:Qi,quantile:function(t,e){var n=(t.length-1)*e+1,i=Math.floor(n),r=+t[i-1],o=n-i;return o?r+o*(t[i]-r):r},reformIntervals:function(t){t.sort((function(t,e){return s(t,e,0)?-1:1}));for(var e=-1/0,n=1,i=0;i1&&h/l>2&&(u=Math.round(Math.ceil(u/l)*l));var c=f_(t),p=a.get("showMinLabel")||c,d=a.get("showMaxLabel")||c;p&&u!==o[0]&&g(o[0]);for(var f=u;f<=o[1];f+=l)g(f);function g(t){var e={value:t};s.push(n?t:{formattedLabel:i(e),rawLabel:r.getLabel(e),tickValue:t})}return d&&f-l!==o[1]&&g(o[1]),s}function B_(t,e,n){var i=t.scale,r=h_(t),o=[];return P(i.getTicks(),(function(t){var a=i.getLabel(t),s=t.value;e(t.value,a)&&o.push(n?s:{formattedLabel:r(t),rawLabel:a,tickValue:s})})),o}var z_=[0,1],V_=function(){function t(t,e,n){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=e,this._extent=n||[0,0]}return t.prototype.contain=function(t){var e=this._extent,n=Math.min(e[0],e[1]),i=Math.max(e[0],e[1]);return t>=n&&t<=i},t.prototype.containData=function(t){return this.scale.contain(t)},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.getPixelPrecision=function(t){return Yi(t||this.scale.getExtent(),this._extent)},t.prototype.setExtent=function(t,e){var n=this._extent;n[0]=t,n[1]=e},t.prototype.dataToCoord=function(t,e){var n=this._extent,i=this.scale;return t=i.normalize(t),this.onBand&&"ordinal"===i.type&&F_(n=n.slice(),i.count()),Vi(t,z_,n,e)},t.prototype.coordToData=function(t,e){var n=this._extent,i=this.scale;this.onBand&&"ordinal"===i.type&&F_(n=n.slice(),i.count());var r=Vi(t,n,z_,e);return this.scale.scale(r)},t.prototype.pointToData=function(t,e){},t.prototype.getTicksCoords=function(t){var e=(t=t||{}).tickModel||this.getTickModel(),n=O(L_(this,e).ticks,(function(t){return{coord:this.dataToCoord("ordinal"===this.scale.type?this.scale.getRawOrdinalNumber(t):t),tickValue:t}}),this);return function(t,e,n,i){var r=e.length;if(!t.onBand||n||!r)return;var o,a,s=t.getExtent();if(1===r)e[0].coord=s[0],o=e[1]={coord:s[0]};else{var l=e[r-1].tickValue-e[0].tickValue,u=(e[r-1].coord-e[0].coord)/l;P(e,(function(t){t.coord-=u/2})),a=1+t.scale.getExtent()[1]-e[r-1].tickValue,o={coord:e[r-1].coord+u*a},e.push(o)}var h=s[0]>s[1];c(e[0].coord,s[0])&&(i?e[0].coord=s[0]:e.shift());i&&c(s[0],e[0].coord)&&e.unshift({coord:s[0]});c(s[1],o.coord)&&(i?o.coord=s[1]:e.pop());i&&c(o.coord,s[1])&&e.push({coord:s[1]});function c(t,e){return t=Hi(t),e=Hi(e),h?t>e:t0&&t<100||(t=5),O(this.scale.getMinorTicks(t),(function(t){return O(t,(function(t){return{coord:this.dataToCoord(t),tickValue:t}}),this)}),this)},t.prototype.getViewLabels=function(){return k_(this).labels},t.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},t.prototype.getTickModel=function(){return this.model.getModel("axisTick")},t.prototype.getBandWidth=function(){var t=this._extent,e=this.scale.getExtent(),n=e[1]-e[0]+(this.onBand?1:0);0===n&&(n=1);var i=Math.abs(t[1]-t[0]);return Math.abs(i)/n},t.prototype.calculateCategoryInterval=function(){return function(t){var e=function(t){var e=t.getLabelModel();return{axisRotate:t.getRotate?t.getRotate():t.isHorizontal&&!t.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}(t),n=h_(t),i=(e.axisRotate-e.labelRotate)/180*Math.PI,r=t.scale,o=r.getExtent(),a=r.count();if(o[1]-o[0]<1)return 0;var s=1;a>40&&(s=Math.max(1,Math.floor(a/40)));for(var l=o[0],u=t.dataToCoord(l+1)-t.dataToCoord(l),h=Math.abs(u*Math.cos(i)),c=Math.abs(u*Math.sin(i)),p=0,d=0;l<=o[1];l+=s){var f,g,y=On(n({value:l}),e.font,"center","top");f=1.3*y.width,g=1.3*y.height,p=Math.max(p,f,7),d=Math.max(d,g,7)}var v=p/h,m=d/c;isNaN(v)&&(v=1/0),isNaN(m)&&(m=1/0);var _=Math.max(0,Math.floor(Math.min(v,m))),x=D_(t.model),b=t.getExtent(),w=x.lastAutoInterval,S=x.lastTickCount;return null!=w&&null!=S&&Math.abs(w-_)<=1&&Math.abs(S-a)<=1&&w>_&&x.axisExtent0===b[0]&&x.axisExtent1===b[1]?_=w:(x.lastTickCount=a,x.lastAutoInterval=_,x.axisExtent0=b[0],x.axisExtent1=b[1]),_}(this)},t}();function F_(t,e){var n=(t[1]-t[0])/e/2;t[0]+=n,t[1]-=n}function H_(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function G_(t,e,n,i,r){for(var o=e.length,a=n.length,s=t.newPos,l=s-i,u=0;s+1=i&&l+1>=r){for(var u=[],h=0;h=i&&c+1>=r)return U_(l.components);s[a]=l}else s[a]=void 0}var f;o++}for(;o<=a;){var p=c();if(p)return p}}(t,e,n)}var X_="none",Z_=Math.round,j_=Math.sin,q_=Math.cos,K_=Math.PI,$_=2*Math.PI,J_=180/K_,Q_=1e-4;function tx(t){return Z_(1e3*t)/1e3}function ex(t){return Z_(1e4*t)/1e4}function nx(t){return t-1e-4}function ix(t,e){e&&rx(t,"transform","matrix("+tx(e[0])+","+tx(e[1])+","+tx(e[2])+","+tx(e[3])+","+ex(e[4])+","+ex(e[5])+")")}function rx(t,e,n){(!n||"linear"!==n.type&&"radial"!==n.type)&&t.setAttribute(e,n)}function ox(t,e,n){var i=null==e.opacity?1:e.opacity;if(n instanceof Ha)t.style.opacity=i+"";else{if(function(t){var e=t.fill;return null!=e&&e!==X_}(e)){var r=e.fill;rx(t,"fill",r="transparent"===r?X_:r),rx(t,"fill-opacity",(null!=e.fillOpacity?e.fillOpacity*i:i)+"")}else rx(t,"fill",X_);if(function(t){var e=t.stroke;return null!=e&&e!==X_}(e)){var o=e.stroke;rx(t,"stroke",o="transparent"===o?X_:o);var a=e.lineWidth,s=e.strokeNoScale?n.getLineScale():1;rx(t,"stroke-width",(s?a/s:0)+""),rx(t,"paint-order",e.strokeFirst?"stroke":"fill"),rx(t,"stroke-opacity",(null!=e.strokeOpacity?e.strokeOpacity*i:i)+"");var l=e.lineDash&&a>0&&Bg(e.lineDash,a);if(l){var u=e.lineDashOffset;s&&1!==s&&(l=O(l,(function(t){return t/s})),u&&(u=Z_(u/=s))),rx(t,"stroke-dasharray",l.join(",")),rx(t,"stroke-dashoffset",(u||0)+"")}else rx(t,"stroke-dasharray","");e.lineCap&&rx(t,"stroke-linecap",e.lineCap),e.lineJoin&&rx(t,"stroke-linejoin",e.lineJoin),e.miterLimit&&rx(t,"stroke-miterlimit",e.miterLimit+"")}else rx(t,"stroke",X_)}}var ax=function(){function t(){}return t.prototype.reset=function(){this._d=[],this._str=""},t.prototype.moveTo=function(t,e){this._add("M",t,e)},t.prototype.lineTo=function(t,e){this._add("L",t,e)},t.prototype.bezierCurveTo=function(t,e,n,i,r,o){this._add("C",t,e,n,i,r,o)},t.prototype.quadraticCurveTo=function(t,e,n,i){this._add("Q",t,e,n,i)},t.prototype.arc=function(t,e,n,i,r,o){this.ellipse(t,e,n,n,0,i,r,o)},t.prototype.ellipse=function(t,e,n,i,r,o,a,s){var l=0===this._d.length,u=a-o,h=!s,c=Math.abs(u),p=nx(c-$_)||(h?u>=$_:-u>=$_),d=u>0?u%$_:u%$_+$_,f=!1;f=!!p||!nx(c)&&d>=K_==!!h;var g=ex(t+n*q_(o)),y=ex(e+i*j_(o));p&&(u=h?$_-1e-4:1e-4-$_,f=!0,l&&this._d.push("M",g,y));var v=ex(t+n*q_(o+u)),m=ex(e+i*j_(o+u));if(isNaN(g)||isNaN(y)||isNaN(n)||isNaN(i)||isNaN(r)||isNaN(J_)||isNaN(v)||isNaN(m))return"";this._d.push("A",ex(n),ex(i),Z_(r*J_),+f,+h,v,m)},t.prototype.rect=function(t,e,n,i){this._add("M",t,e),this._add("L",t+n,e),this._add("L",t+n,e+i),this._add("L",t,e+i),this._add("L",t,e)},t.prototype.closePath=function(){this._d.length>0&&this._add("Z")},t.prototype._add=function(t,e,n,i,r,o,a,s,l){this._d.push(t);for(var u=1;u=0;--n)if(e[n]===t)return!0;return!1}),i}return null}return n[0]},t.prototype.doUpdate=function(t,e){if(t){var n=this.getDefs(!1);if(t[this._domName]&&n.contains(t[this._domName]))"function"==typeof e&&e(t);else{var i=this.add(t);i&&(t[this._domName]=i)}}},t.prototype.add=function(t){return null},t.prototype.addDom=function(t){var e=this.getDefs(!0);t.parentNode!==e&&e.appendChild(t)},t.prototype.removeDom=function(t){var e=this.getDefs(!1);e&&t[this._domName]&&(e.removeChild(t[this._domName]),t[this._domName]=null)},t.prototype.getDoms=function(){var t=this.getDefs(!1);if(!t)return[];var e=[];return P(this._tagNames,(function(n){for(var i=t.getElementsByTagName(n),r=0;r-1){var s=We(a)[3],l=Xe(a);o.setAttribute("stop-color","#"+l),o.setAttribute("stop-opacity",s+"")}else o.setAttribute("stop-color",n[i].color);e.appendChild(o)}t.__dom=e},e.prototype.markUsed=function(e){if(e.style){var n=e.style.fill;n&&n.__dom&&t.prototype.markDomUsed.call(this,n.__dom),(n=e.style.stroke)&&n.__dom&&t.prototype.markDomUsed.call(this,n.__dom)}},e}(cx);function yx(t){return t&&(!!t.image||!!t.svgElement)}var vx=new Tg,mx=function(t){function e(e,n){return t.call(this,e,n,["pattern"],"__pattern_in_use__")||this}return n(e,t),e.prototype.addWithoutUpdate=function(t,e){if(e&&e.style){var n=this;P(["fill","stroke"],(function(i){var r=e.style[i];if(yx(r)){var o=n.getDefs(!0),a=vx.get(r);a?o.contains(a)||n.addDom(a):a=n.add(r),n.markUsed(e);var s=a.getAttribute("id");t.setAttribute(i,"url(#"+s+")")}}))}},e.prototype.add=function(t){if(yx(t)){var e=this.createElement("pattern");return t.id=null==t.id?this.nextId++:t.id,e.setAttribute("id","zr"+this._zrId+"-pattern-"+t.id),e.setAttribute("x","0"),e.setAttribute("y","0"),e.setAttribute("patternUnits","userSpaceOnUse"),this.updateDom(t,e),this.addDom(e),e}},e.prototype.update=function(t){if(yx(t)){var e=this;this.doUpdate(t,(function(){var n=vx.get(t);e.updateDom(t,n)}))}},e.prototype.updateDom=function(t,e){var n=t.svgElement;if(n instanceof SVGElement)n.parentNode!==e&&(e.innerHTML="",e.appendChild(n),e.setAttribute("width",t.svgWidth+""),e.setAttribute("height",t.svgHeight+""));else{var i=void 0,r=e.getElementsByTagName("image");if(r.length){if(!t.image)return void e.removeChild(r[0]);i=r[0]}else t.image&&(i=this.createElement("image"));if(i){var o=void 0;if("string"==typeof t.image?o=t.image:t.image instanceof HTMLImageElement?o=t.image.src:t.image instanceof HTMLCanvasElement&&(o=t.image.toDataURL()),o){i.setAttribute("href",o),i.setAttribute("x","0"),i.setAttribute("y","0");var a=Wr(o,i,{dirty:function(){}},(function(t){e.setAttribute("width",t.width+""),e.setAttribute("height",t.height+"")}));a&&a.width&&a.height&&(e.setAttribute("width",a.width+""),e.setAttribute("height",a.height+"")),e.appendChild(i)}}}var s="translate("+(t.x||0)+", "+(t.y||0)+") rotate("+(t.rotation||0)/Math.PI*180+") scale("+(t.scaleX||1)+", "+(t.scaleY||1)+")";e.setAttribute("patternTransform",s),vx.set(t,e)},e.prototype.markUsed=function(e){e.style&&(yx(e.style.fill)&&t.prototype.markDomUsed.call(this,vx.get(e.style.fill)),yx(e.style.stroke)&&t.prototype.markDomUsed.call(this,vx.get(e.style.stroke)))},e}(cx);function _x(t){var e=t.__clipPaths;return e&&e.length>0}var xx=function(t){function e(e,n){var i=t.call(this,e,n,"clipPath","__clippath_in_use__")||this;return i._refGroups={},i._keyDuplicateCount={},i}return n(e,t),e.prototype.markAllUnused=function(){for(var e in t.prototype.markAllUnused.call(this),this._refGroups)this.markDomUnused(this._refGroups[e]);this._keyDuplicateCount={}},e.prototype._getClipPathGroup=function(t,e){if(_x(t)){var n=t.__clipPaths,i=this._keyDuplicateCount,r=function(t){var e=[];if(t)for(var n=0;n0){var n=this.getDefs(!0),i=e[0],r=void 0,o=void 0;i._dom?(o=i._dom.getAttribute("id"),r=i._dom,n.contains(r)||n.appendChild(r)):(o="zr"+this._zrId+"-clip-"+this.nextId,++this.nextId,(r=this.createElement("clipPath")).setAttribute("id",o),n.appendChild(r),i._dom=r),this.getSvgProxy(i).brush(i);var a=this.getSvgElement(i);r.innerHTML="",r.appendChild(a),t.setAttribute("clip-path","url(#"+o+")"),e.length>1&&this.updateDom(r,e.slice(1))}else t&&t.setAttribute("clip-path","none")},e.prototype.markUsed=function(e){var n=this;e.__clipPaths&&P(e.__clipPaths,(function(e){e._dom&&t.prototype.markDomUsed.call(n,e._dom)}))},e.prototype.removeUnused=function(){t.prototype.removeUnused.call(this);var e={};for(var n in this._refGroups){var i=this._refGroups[n];this.isDomUnused(i)?i.parentNode&&i.parentNode.removeChild(i):e[n]=i}this._refGroups=e},e}(cx),bx=function(t){function e(e,n){var i=t.call(this,e,n,["filter"],"__filter_in_use__","_shadowDom")||this;return i._shadowDomMap={},i._shadowDomPool=[],i}return n(e,t),e.prototype._getFromPool=function(){var t=this._shadowDomPool.pop();if(!t){(t=this.createElement("filter")).setAttribute("id","zr"+this._zrId+"-shadow-"+this.nextId++);var e=this.createElement("feDropShadow");t.appendChild(e),this.addDom(t)}return t},e.prototype.update=function(t,e){if(function(t){return t&&(t.shadowBlur||t.shadowOffsetX||t.shadowOffsetY)}(e.style)){var n=function(t){var e=t.style,n=t.getGlobalScale();return[e.shadowColor,(e.shadowBlur||0).toFixed(2),(e.shadowOffsetX||0).toFixed(2),(e.shadowOffsetY||0).toFixed(2),n[0],n[1]].join(",")}(e),i=e._shadowDom=this._shadowDomMap[n];i||(i=this._getFromPool(),this._shadowDomMap[n]=i),this.updateDom(t,e,i)}else this.remove(t,e)},e.prototype.remove=function(t,e){null!=e._shadowDom&&(e._shadowDom=null,t.style.filter="")},e.prototype.updateDom=function(t,e,n){var i=n.children[0],r=e.style,o=e.getGlobalScale(),a=o[0],s=o[1];if(a&&s){var l=r.shadowOffsetX||0,u=r.shadowOffsetY||0,h=r.shadowBlur,c=r.shadowColor;i.setAttribute("dx",l/a+""),i.setAttribute("dy",u/s+""),i.setAttribute("flood-color",c);var p=h/2/a+" "+h/2/s;i.setAttribute("stdDeviation",p),n.setAttribute("x","-100%"),n.setAttribute("y","-100%"),n.setAttribute("width","300%"),n.setAttribute("height","300%"),e._shadowDom=n;var d=n.getAttribute("id");t.style.filter="url(#"+d+")"}},e.prototype.removeUnused=function(){if(this.getDefs(!1)){var t=this._shadowDomPool;for(var e in this._shadowDomMap){var n=this._shadowDomMap[e];t.push(n)}this._shadowDomMap={}}},e}(cx);function Sx(t){return parseInt(t,10)}function Mx(t){return t instanceof Ea?sx:t instanceof Ha?lx:t instanceof za?hx:sx}function Tx(t,e){return e&&t&&e.parentNode!==t}function Cx(t,e,n){if(Tx(t,e)&&n){var i=n.nextSibling;i?t.insertBefore(e,i):t.appendChild(e)}}function Ix(t,e){if(Tx(t,e)){var n=t.firstChild;n?t.insertBefore(e,n):t.appendChild(e)}}function Ax(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)}function Dx(t){return t.__svgEl}var kx=function(){function t(t,e,n,i){this.type="svg",this.refreshHover=Lx("refreshHover"),this.pathToImage=Lx("pathToImage"),this.configLayer=Lx("configLayer"),this.root=t,this.storage=e,this._opts=n=T({},n||{});var r=H_("svg");r.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns","http://www.w3.org/2000/svg"),r.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),r.setAttribute("version","1.1"),r.setAttribute("baseProfile","full"),r.style.cssText="user-select:none;position:absolute;left:0;top:0;";var o=H_("g");r.appendChild(o);var a=H_("g");r.appendChild(a),this._gradientManager=new gx(i,a),this._patternManager=new mx(i,a),this._clipPathManager=new xx(i,a),this._shadowManager=new bx(i,a);var s=document.createElement("div");s.style.cssText="overflow:hidden;position:relative",this._svgDom=r,this._svgRoot=a,this._backgroundRoot=o,this._viewport=s,t.appendChild(s),s.appendChild(r),this.resize(n.width,n.height),this._visibleList=[]}return t.prototype.getType=function(){return"svg"},t.prototype.getViewportRoot=function(){return this._viewport},t.prototype.getSvgDom=function(){return this._svgDom},t.prototype.getSvgRoot=function(){return this._svgRoot},t.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},t.prototype.refresh=function(){var t=this.storage.getDisplayList(!0);this._paintList(t)},t.prototype.setBackgroundColor=function(t){this._backgroundRoot&&this._backgroundNode&&this._backgroundRoot.removeChild(this._backgroundNode);var e=H_("rect");e.setAttribute("width",this.getWidth()),e.setAttribute("height",this.getHeight()),e.setAttribute("x",0),e.setAttribute("y",0),e.setAttribute("id",0),e.style.fill=t,this._backgroundRoot.appendChild(e),this._backgroundNode=e},t.prototype.createSVGElement=function(t){return H_(t)},t.prototype.paintOne=function(t){var e=Mx(t);return e&&e.brush(t),Dx(t)},t.prototype._paintList=function(t){var e=this._gradientManager,n=this._patternManager,i=this._clipPathManager,r=this._shadowManager;e.markAllUnused(),n.markAllUnused(),i.markAllUnused(),r.markAllUnused();for(var o=this._svgRoot,a=this._visibleList,s=t.length,l=[],u=0;u=0;--n)if(e[n]===t)return!0;return!1}),i}return null}return n[0]},t.prototype.resize=function(t,e){var n=this._viewport;n.style.display="none";var i=this._opts;if(null!=t&&(i.width=t),null!=e&&(i.height=e),t=this._getSize(0),e=this._getSize(1),n.style.display="",this._width!==t||this._height!==e){this._width=t,this._height=e;var r=n.style;r.width=t+"px",r.height=e+"px";var o=this._svgDom;o.setAttribute("width",t+""),o.setAttribute("height",e+"")}this._backgroundNode&&(this._backgroundNode.setAttribute("width",t),this._backgroundNode.setAttribute("height",e))},t.prototype.getWidth=function(){return this._width},t.prototype.getHeight=function(){return this._height},t.prototype._getSize=function(t){var e=this._opts,n=["width","height"][t],i=["clientWidth","clientHeight"][t],r=["paddingLeft","paddingTop"][t],o=["paddingRight","paddingBottom"][t];if(null!=e[n]&&"auto"!==e[n])return parseFloat(e[n]);var a=this.root,s=document.defaultView.getComputedStyle(a);return(a[i]||Sx(s[n])||Sx(a.style[n]))-(Sx(s[r])||0)-(Sx(s[o])||0)|0},t.prototype.dispose=function(){this.root.innerHTML="",this._svgRoot=this._backgroundRoot=this._svgDom=this._backgroundNode=this._viewport=this.storage=null},t.prototype.clear=function(){var t=this._viewport;t&&t.parentNode&&t.parentNode.removeChild(t)},t.prototype.toDataURL=function(){this.refresh();var t=this._svgDom,e=t.outerHTML||(t.parentNode&&t.parentNode).innerHTML;return"data:image/svg+xml;charset=UTF-8,"+encodeURIComponent(e.replace(/>\n\r<"))},t}();function Lx(t){return function(){b('In SVG mode painter not support method "'+t+'"')}}function Px(){return!1}function Ox(t,e,n){var i=I(),r=e.getWidth(),o=e.getHeight(),a=i.style;return a&&(a.position="absolute",a.left="0",a.top="0",a.width=r+"px",a.height=o+"px",i.setAttribute("data-zr-dom-id",t)),i.width=r*n,i.height=o*n,i}var Rx=function(t){function e(e,n,i){var r,o=t.call(this)||this;o.motionBlur=!1,o.lastFrameAlpha=.7,o.dpr=1,o.virtual=!1,o.config={},o.incremental=!1,o.zlevel=0,o.maxRepaintRectCount=5,o.__dirty=!0,o.__firstTimePaint=!0,o.__used=!1,o.__drawIndex=0,o.__startIndex=0,o.__endIndex=0,o.__prevStartIndex=null,o.__prevEndIndex=null,i=i||Fn,"string"==typeof e?r=Ox(e,n,i):U(e)&&(e=(r=e).id),o.id=e,o.dom=r;var a=r.style;return a&&(r.onselectstart=Px,a.webkitUserSelect="none",a.userSelect="none",a.webkitTapHighlightColor="rgba(0,0,0,0)",a["-webkit-touch-callout"]="none",a.padding="0",a.margin="0",a.borderWidth="0"),o.domBack=null,o.ctxBack=null,o.painter=n,o.config=null,o.dpr=i,o}return n(e,t),e.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},e.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},e.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},e.prototype.setUnpainted=function(){this.__firstTimePaint=!0},e.prototype.createBackBuffer=function(){var t=this.dpr;this.domBack=Ox("back-"+this.id,this.painter,t),this.ctxBack=this.domBack.getContext("2d"),1!==t&&this.ctxBack.scale(t,t)},e.prototype.createRepaintRects=function(t,e,n,i){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var r,o=[],a=this.maxRepaintRectCount,s=!1,l=new In(0,0,0,0);function u(t){if(t.isFinite()&&!t.isZero())if(0===o.length){(e=new In(0,0,0,0)).copy(t),o.push(e)}else{for(var e,n=!1,i=1/0,r=0,u=0;u=a)}}for(var h=this.__startIndex;h15)break}n.prevElClipPaths&&l.restore()};if(u)if(0===u.length)p=s.__endIndex;else for(var x=d.dpr,b=0;b0&&t>i[0]){for(s=0;st);s++);a=n[i[s]]}if(i.splice(s+1,0,t),n[t]=e,!e.virtual)if(a){var l=a.dom;l.nextSibling?o.insertBefore(e.dom,l.nextSibling):o.appendChild(e.dom)}else o.firstChild?o.insertBefore(e.dom,o.firstChild):o.appendChild(e.dom);e.__painter=this}else b("Layer of zlevel "+t+" is not valid")},t.prototype.eachLayer=function(t,e){for(var n=this._zlevelList,i=0;i0?Bx:0),this._needsManuallyCompositing),u.__builtin__||b("ZLevel "+l+" has been used by unkown layer "+u.id),u!==o&&(u.__used=!0,u.__startIndex!==r&&(u.__dirty=!0),u.__startIndex=r,u.incremental?u.__drawIndex=-1:u.__drawIndex=r,e(r),o=u),s.__dirty&jn.REDARAW_BIT&&!s.__inHover&&(u.__dirty=!0,u.incremental&&u.__drawIndex<0&&(u.__drawIndex=r))}e(r),this.eachBuiltinLayer((function(t,e){!t.__used&&t.getElementCount()>0&&(t.__dirty=!0,t.__startIndex=t.__endIndex=t.__drawIndex=0),t.__dirty&&t.__drawIndex<0&&(t.__drawIndex=t.__startIndex)}))},t.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},t.prototype._clearLayer=function(t){t.clear()},t.prototype.setBackgroundColor=function(t){this._backgroundColor=t,P(this._layers,(function(t){t.setUnpainted()}))},t.prototype.configLayer=function(t,e){if(e){var n=this._layerConfig;n[t]?S(n[t],e,!0):n[t]=e;for(var i=0;i0?n=i[0]:i[1]<0&&(n=i[1]);return n}(r,n),a=i.dim,s=r.dim,l=e.mapDimension(s),u=e.mapDimension(a),h="x"===s||"radius"===s?1:0,c=O(t.dimensions,(function(t){return e.mapDimension(t)})),p=!1,d=e.getCalculationInfo("stackResultDimension");return hm(e,c[0])&&(p=!0,c[0]=d),hm(e,c[1])&&(p=!0,c[1]=d),{dataDimsForPoint:c,valueStart:o,valueAxisDim:s,baseAxisDim:a,stacked:!!p,valueDim:l,baseDim:u,baseDataOffset:h,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function Kx(t,e,n,i){var r=NaN;t.stacked&&(r=n.get(n.getCalculationInfo("stackedOverDimension"),i)),isNaN(r)&&(r=t.valueStart);var o=t.baseDataOffset,a=[];return a[o]=n.get(t.baseDim,i),a[1-o]=r,e.dataToPoint(a)}var $x="undefined"!=typeof Float32Array,Jx=$x?Float32Array:Array;function Qx(t){return V(t)?$x?new Float32Array(t):t:new Jx(t)}var tb=Math.min,eb=Math.max;function nb(t,e){return isNaN(t)||isNaN(e)}function ib(t,e,n,i,r,o,a,s,l){for(var u,h,c,p,d,f,g=n,y=0;y=r||g<0)break;if(nb(v,m)){if(l){g+=o;continue}break}if(g===n)t[o>0?"moveTo":"lineTo"](v,m),c=v,p=m;else{var _=v-u,x=m-h;if(_*_+x*x<.5){g+=o;continue}if(a>0){var b=g+o,w=e[2*b],S=e[2*b+1],M=y+1;if(l)for(;nb(w,S)&&M=i||nb(w,S))d=v,f=m;else{C=w-u,I=S-h;var k=v-u,L=w-v,P=m-h,O=S-m,R=void 0,N=void 0;"x"===s?(R=Math.abs(k),N=Math.abs(L),d=v-R*a,f=m,A=v+R*a,D=m):"y"===s?(R=Math.abs(P),N=Math.abs(O),d=v,f=m-R*a,A=v,D=m+R*a):(R=Math.sqrt(k*k+P*P),d=v-C*a*(1-(T=(N=Math.sqrt(L*L+O*O))/(N+R))),f=m-I*a*(1-T),D=m+I*a*T,A=tb(A=v+C*a*T,eb(w,v)),D=tb(D,eb(S,m)),A=eb(A,tb(w,v)),f=m-(I=(D=eb(D,tb(S,m)))-m)*R/N,d=tb(d=v-(C=A-v)*R/N,eb(u,v)),f=tb(f,eb(h,m)),A=v+(C=v-(d=eb(d,tb(u,v))))*N/R,D=m+(I=m-(f=eb(f,tb(h,m))))*N/R)}t.bezierCurveTo(c,p,d,f,v,m),c=A,p=D}else t.lineTo(v,m)}u=v,h=m,g+=o}return y}var rb=function(){this.smooth=0,this.smoothConstraint=!0},ob=function(t){function e(e){var n=t.call(this,e)||this;return n.type="ec-polyline",n}return n(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new rb},e.prototype.buildPath=function(t,e){var n=e.points,i=0,r=n.length/2;if(e.connectNulls){for(;r>0&&nb(n[2*r-2],n[2*r-1]);r--);for(;i=0){var y=a?(h-i)*g+i:(u-n)*g+n;return a?[t,y]:[y,t]}n=u,i=h;break;case o.C:u=r[l++],h=r[l++],c=r[l++],p=r[l++],d=r[l++],f=r[l++];var v=a?To(n,u,c,d,t,s):To(i,h,p,f,t,s);if(v>0)for(var m=0;m=0){y=a?So(i,h,p,f,_):So(n,u,c,d,_);return a?[t,y]:[y,t]}}n=d,i=f}}},e}(Ea),ab=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e}(rb),sb=function(t){function e(e){var n=t.call(this,e)||this;return n.type="ec-polygon",n}return n(e,t),e.prototype.getDefaultShape=function(){return new ab},e.prototype.buildPath=function(t,e){var n=e.points,i=e.stackedOnPoints,r=0,o=n.length/2,a=e.smoothMonotone;if(e.connectNulls){for(;o>0&&nb(n[2*o-2],n[2*o-1]);o--);for(;ri)return!1;return!0}(o,e))){var a=e.mapDimension(o.dim),s={};return P(o.getViewLabels(),(function(t){var e=o.scale.getRawOrdinalNumber(t.tickValue);s[e]=1})),function(t){return!s.hasOwnProperty(e.get(a,t))}}}}function vb(t,e){return[t[2*e],t[2*e+1]]}function mb(t,e,n,i){if(hb(e,"cartesian2d")){var r=i.getModel("endLabel"),o=r.get("show"),a=r.get("valueAnimation"),s=i.getData(),l={lastFrameIndex:0},u=o?function(n,i){t._endLabelOnDuring(n,i,s,l,a,r,e)}:null,h=e.getBaseAxis().isHorizontal(),c=lb(e,n,i,(function(){var e=t._endLabel;e&&n&&null!=l.originalX&&e.attr({x:l.originalX,y:l.originalY})}),u);if(!i.get("clip",!0)){var p=c.shape,d=Math.max(p.width,p.height);h?(p.y-=d,p.height+=2*d):(p.x-=d,p.width+=2*d)}return u&&u(1,c),c}return ub(e,n,i)}var _b=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.init=function(){var t=new ki,e=new jx;this.group.add(e.group),this._symbolDraw=e,this._lineGroup=t},e.prototype.render=function(t,e,n){var i=this,r=t.coordinateSystem,o=this.group,a=t.getData(),s=t.getModel("lineStyle"),l=t.getModel("areaStyle"),u=a.getLayout("points")||[],h="polar"===r.type,c=this._coordSys,p=this._symbolDraw,d=this._polyline,f=this._polygon,g=this._lineGroup,y=t.get("animation"),v=!l.isEmpty(),m=l.get("origin"),_=qx(r,a,m),x=v&&function(t,e,n){if(!n.valueDim)return[];for(var i=e.count(),r=Qx(2*i),o=0;o=0;o--){var a=n[o].dimension,s=t.dimensions[a],l=t.getDimensionInfo(s);if("x"===(i=l&&l.coordDim)||"y"===i){r=n[o];break}}if(r){var u=e.getAxis(i),h=O(r.stops,(function(t){return{offset:0,coord:u.toGlobalCoord(u.dataToCoord(t.value)),color:t.color}})),c=h.length,p=r.outerColors.slice();c&&h[0].coord>h[c-1].coord&&(h.reverse(),p.reverse());var d=h[0].coord-10,f=h[c-1].coord+10,g=f-d;if(g<.001)return"transparent";P(h,(function(t){t.offset=(t.coord-d)/g})),h.push({offset:c?h[c-1].offset:.5,color:p[1]||"transparent"}),h.unshift({offset:c?h[0].offset:.5,color:p[0]||"transparent"});var y=new ql(0,0,0,0,h,!0);return y[i]=d,y[i+"2"]=f,y}}}(a,r)||a.getVisual("style")[a.getVisual("drawType")],A=t.get(["emphasis","focus"]),D=t.get(["emphasis","blurScope"]);(d.useStyle(C(s.getLineStyle(),{fill:"none",stroke:I,lineJoin:"bevel"})),Us(d,t,"lineStyle"),d.style.lineWidth>0&&"bolder"===t.get(["emphasis","lineStyle","width"]))&&(d.getState("emphasis").style.lineWidth=d.style.lineWidth+1);os(d).seriesIndex=t.seriesIndex,Hs(d,A,D);var k=fb(t.get("smooth")),L=t.get("smoothMonotone"),R=t.get("connectNulls");if(d.setShape({smooth:k,smoothMonotone:L,connectNulls:R}),f){var N=a.getCalculationInfo("stackedOnSeries"),E=0;f.useStyle(C(l.getAreaStyle(),{fill:I,opacity:.7,lineJoin:"bevel",decal:a.getVisual("style").decal})),N&&(E=fb(N.get("smooth"))),f.setShape({smooth:k,stackedOnSmooth:E,smoothMonotone:L,connectNulls:R}),Us(f,t,"areaStyle"),os(f).seriesIndex=t.seriesIndex,Hs(f,A,D)}var B=function(t){i._changePolyState(t)};a.eachItemGraphicEl((function(t){t&&(t.onHoverStateChange=B)})),this._polyline.onHoverStateChange=B,this._data=a,this._coordSys=r,this._stackedOnPoints=x,this._points=u,this._step=T,this._valueOrigin=m},e.prototype.dispose=function(){},e.prototype.highlight=function(t,e,n,i){var r=t.getData(),o=_r(r,i);if(this._changePolyState("emphasis"),!(o instanceof Array)&&null!=o&&o>=0){var a=r.getLayout("points"),s=r.getItemGraphicEl(o);if(!s){var l=a[2*o],u=a[2*o+1];if(isNaN(l)||isNaN(u))return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(l,u))return;(s=new Wx(r,o)).x=l,s.y=u,s.setZ(t.get("zlevel"),t.get("z")),s.__temp=!0,r.setItemGraphicEl(o,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else Ud.prototype.highlight.call(this,t,e,n,i)},e.prototype.downplay=function(t,e,n,i){var r=t.getData(),o=_r(r,i);if(this._changePolyState("normal"),null!=o&&o>=0){var a=r.getItemGraphicEl(o);a&&(a.__temp?(r.setItemGraphicEl(o,null),this.group.remove(a)):a.downplay())}else Ud.prototype.downplay.call(this,t,e,n,i)},e.prototype._changePolyState=function(t){var e=this._polygon;As(this._polyline,t),e&&As(e,t)},e.prototype._newPolyline=function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new ob({shape:{points:t},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(e),this._polyline=e,e},e.prototype._newPolygon=function(t,e){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new sb({shape:{points:t,stackedOnPoints:e},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},e.prototype._initSymbolLabelAnimation=function(t,e,n){var i,r,o=e.getBaseAxis(),a=o.inverse;"cartesian2d"===e.type?(i=o.isHorizontal(),r=!1):"polar"===e.type&&(i="angle"===o.dim,r=!0);var s=t.hostModel,l=s.get("animationDuration");"function"==typeof l&&(l=l(null));var u=s.get("animationDelay")||0,h="function"==typeof u?u(null):u;t.eachItemGraphicEl((function(t,o){var s=t;if(s){var c=[t.x,t.y],p=void 0,d=void 0,f=void 0;if(r){var g=n,y=e.pointToCoord(c);i?(p=g.startAngle,d=g.endAngle,f=-y[1]/180*Math.PI):(p=g.r0,d=g.r,f=y[0])}else{var v=n;i?(p=v.x,d=v.x+v.width,f=t.x):(p=v.y+v.height,d=v.y,f=t.y)}var m=d===p?0:(f-p)/(d-p);a&&(m=1-m);var _="function"==typeof u?u(o):l*m+h,x=s.getSymbolPath(),b=x.getTextContent();s.attr({scaleX:0,scaleY:0}),s.animateTo({scaleX:1,scaleY:1},{duration:200,delay:_}),b&&b.animateFrom({style:{opacity:0}},{duration:300,delay:_}),x.disableLabelAnimation=!0}}))},e.prototype._initOrUpdateEndLabel=function(t,e){var n=t.getModel("endLabel");if(n.get("show")){var i=t.getData(),r=this._polyline,o=this._endLabel;o||((o=this._endLabel=new $a({z2:200})).ignoreClip=!0,r.setTextContent(this._endLabel),r.disableLabelAnimation=!0);var a=function(t){for(var e,n,i=t.length/2;i>0&&(e=t[2*i-2],n=t[2*i-1],isNaN(e)||isNaN(n));i--);return i-1}(i.getLayout("points"));a>=0&&(Vu(r,Fu(t,"endLabel"),{labelFetcher:t,labelDataIndex:a,defaultText:function(t,e,n){return null!=n?Gx(i,n):Hx(i,t)},enableTextSetter:!0},function(t,e){var n=e.getBaseAxis(),i=n.isHorizontal(),r=n.inverse,o=i?r?"right":"left":"center",a=i?"middle":r?"top":"bottom";return{normal:{align:t.get("align")||o,verticalAlign:t.get("verticalAlign")||a}}}(n,e)),r.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(t,e,n,i,r,o,a){var s=this._endLabel,l=this._polyline;if(s){t<1&&null==i.originalX&&(i.originalX=s.x,i.originalY=s.y);var u=n.getLayout("points"),h=n.hostModel,c=h.get("connectNulls"),p=o.get("precision"),d=o.get("distance")||0,f=a.getBaseAxis(),g=f.isHorizontal(),y=f.inverse,v=e.shape,m=y?g?v.x:v.y+v.height:g?v.x+v.width:v.y,_=(g?d:0)*(y?-1:1),x=(g?0:-d)*(y?-1:1),b=g?"x":"y",w=function(t,e,n){for(var i,r,o=t.length/2,a="x"===n?0:1,s=0,l=-1,u=0;u=e||i>=e&&r<=e){l=u;break}s=u,i=r}else i=r;return{range:[s,l],t:(e-i)/(r-i)}}(u,m,b),S=w.range,M=S[1]-S[0],T=void 0;if(M>=1){if(M>1&&!c){var C=vb(u,S[0]);s.attr({x:C[0]+_,y:C[1]+x}),r&&(T=h.getRawValue(S[0]))}else{(C=l.getPointOn(m,b))&&s.attr({x:C[0]+_,y:C[1]+x});var I=h.getRawValue(S[0]),A=h.getRawValue(S[1]);r&&(T=Ir(n,p,I,A,w.t))}i.lastFrameIndex=S[0]}else{var D=1===t||i.lastFrameIndex>0?S[0]:0;C=vb(u,D);r&&(T=h.getRawValue(D)),s.attr({x:C[0]+_,y:C[1]+x})}r&&Zu(s).setLabelText(T)}},e.prototype._doUpdateAnimation=function(t,e,n,i,r,o){var a=this._polyline,s=this._polygon,l=t.hostModel,u=function(t,e,n,i,r,o,a,s){for(var l=function(t,e){var n=[];return e.diff(t).add((function(t){n.push({cmd:"+",idx:t})})).update((function(t,e){n.push({cmd:"=",idx:e,idx1:t})})).remove((function(t){n.push({cmd:"-",idx:t})})).execute(),n}(t,e),u=[],h=[],c=[],p=[],d=[],f=[],g=[],y=qx(r,e,a),v=qx(o,t,s),m=t.getLayout("points")||[],_=e.getLayout("points")||[],x=0;x3e3||s&&db(c,d)>3e3)return a.setShape({points:p}),void(s&&s.setShape({points:p,stackedOnPoints:d}));a.shape.__points=u.current,a.shape.points=h;var f={shape:{points:p}};u.current!==h&&(f.shape.__points=u.next),a.stopAnimation(),_u(a,f,l),s&&(s.setShape({points:h,stackedOnPoints:c}),s.stopAnimation(),_u(s,{shape:{stackedOnPoints:d}},l),a.shape.points!==s.shape.points&&(s.shape.points=a.shape.points));for(var g=[],y=u.status,v=0;ve&&(e=t[n]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,n=0;n10&&"cartesian2d"===o.type&&r){var s=o.getBaseAxis(),l=o.getOtherAxis(s),u=s.getExtent(),h=n.getDevicePixelRatio(),c=Math.abs(u[1]-u[0])*(h||1),p=Math.round(a/c);if(p>1){"lttb"===r&&t.setData(i.lttbDownSample(i.mapDimension(l.dim),1/p));var d=void 0;"string"==typeof r?d=bb[r]:"function"==typeof r&&(d=r),d&&t.setData(i.downSample(i.mapDimension(l.dim),1/p,d,wb))}}}}}var Mb=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.getInitialData=function(t,e){return pm(this.getSource(),this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(t){var e=this.coordinateSystem;if(e){var n=e.dataToPoint(e.clampData(t)),i=this.getData(),r=i.getLayout("offset"),o=i.getLayout("size");return n[e.getBaseAxis().isHorizontal()?0:1]+=r+o/2,n}return[NaN,NaN]},e.type="series.__base_bar__",e.defaultOption={zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},e}(Pd);Pd.registerClass(Mb);var Tb=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.getInitialData=function(){return pm(this.getSource(),this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},e.prototype.getProgressive=function(){return!!this.get("large")&&this.get("progressive")},e.prototype.getProgressiveThreshold=function(){var t=this.get("progressiveThreshold"),e=this.get("largeThreshold");return e>t&&(t=e),t},e.prototype.brushSelector=function(t,e,n){return n.rect(e.getItemLayout(t))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=lh(Mb.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),e}(Mb),Cb=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},Ib=function(t){function e(e){var n=t.call(this,e)||this;return n.type="sausage",n}return n(e,t),e.prototype.getDefaultShape=function(){return new Cb},e.prototype.buildPath=function(t,e){var n=e.cx,i=e.cy,r=Math.max(e.r0||0,0),o=Math.max(e.r,0),a=.5*(o-r),s=r+a,l=e.startAngle,u=e.endAngle,h=e.clockwise,c=Math.cos(l),p=Math.sin(l),d=Math.cos(u),f=Math.sin(u);(h?u-l<2*Math.PI:l-u<2*Math.PI)&&(t.moveTo(c*r+n,p*r+i),t.arc(c*s+n,p*s+i,a,-Math.PI+l,l,!h)),t.arc(n,i,o,l,u,!h),t.moveTo(d*o+n,f*o+i),t.arc(d*s+n,f*s+i,a,u-2*Math.PI,u-Math.PI,!h),0!==r&&(t.arc(n,i,r,u,l,h),t.moveTo(c*r+n,f*r+i)),t.closePath()},e}(Ea),Ab=["itemStyle","borderWidth"],Db=["itemStyle","borderRadius"],kb=[0,0],Lb=Math.max,Pb=Math.min;var Ob=function(t){function e(){var n=t.call(this)||this;return n.type=e.type,n._isFirstFrame=!0,n}return n(e,t),e.prototype.render=function(t,e,n,i){this._model=t,this._removeOnRenderedListener(n),this._updateDrawMode(t);var r=t.get("coordinateSystem");("cartesian2d"===r||"polar"===r)&&(this._isLargeDraw?this._renderLarge(t,e,n):this._renderNormal(t,e,n,i))},e.prototype.incrementalPrepareRender=function(t){this._clear(),this._updateDrawMode(t),this._updateLargeClip(t)},e.prototype.incrementalRender=function(t,e){this._incrementalRenderLarge(t,e)},e.prototype._updateDrawMode=function(t){var e=t.pipelineContext.large;null!=this._isLargeDraw&&e===this._isLargeDraw||(this._isLargeDraw=e,this._clear())},e.prototype._renderNormal=function(t,e,n,i){var r,o=this.group,a=t.getData(),s=this._data,l=t.coordinateSystem,u=l.getBaseAxis();"cartesian2d"===l.type?r=u.isHorizontal():"polar"===l.type&&(r="angle"===u.dim);var h=t.isAnimationEnabled()?t:null,c=function(t,e){var n=t.get("realtimeSort",!0),i=e.getBaseAxis();0;if(n&&"category"===i.type&&"cartesian2d"===e.type)return{baseAxis:i,otherAxis:e.getOtherAxis(i)}}(t,l);c&&this._enableRealtimeSort(c,a,n);var p=t.get("clip",!0)||c,d=function(t,e){var n=t.getArea&&t.getArea();if(hb(t,"cartesian2d")){var i=t.getBaseAxis();if("category"!==i.type||!i.onBand){var r=e.getLayout("bandWidth");i.isHorizontal()?(n.x-=r,n.width+=2*r):(n.y-=r,n.height+=2*r)}}return n}(l,a);o.removeClipPath();var f=t.get("roundCap",!0),g=t.get("showBackground",!0),y=t.getModel("backgroundStyle"),v=y.get("borderRadius")||0,m=[],_=this._backgroundEls,x=i&&i.isInitSort,b=i&&"changeAxisOrder"===i.type;function w(t){var e=Bb[l.type](a,t),n=function(t,e,n){return new("polar"===t.type?Dl:ja)({shape:Wb(e,n,t),silent:!0,z2:0})}(l,r,e);return n.useStyle(y.getItemStyle()),"cartesian2d"===l.type&&n.setShape("r",v),m[t]=n,n}a.diff(s).add((function(e){var n=a.getItemModel(e),i=Bb[l.type](a,e,n);if(g&&w(e),a.hasValue(e)){var s=!1;p&&(s=Rb[l.type](d,i));var y=Nb[l.type](t,a,e,i,r,h,u.model,!1,f);zb(y,a,e,n,i,t,r,"polar"===l.type),x?y.attr({shape:i}):c?Eb(c,h,y,i,e,r,!1,!1):xu(y,{shape:i},t,e),a.setItemGraphicEl(e,y),o.add(y),y.ignore=s}})).update((function(e,n){var i=a.getItemModel(e),S=Bb[l.type](a,e,i);if(g){var M=void 0;0===_.length?M=w(n):((M=_[n]).useStyle(y.getItemStyle()),"cartesian2d"===l.type&&M.setShape("r",v),m[e]=M);var T=Bb[l.type](a,e);_u(M,{shape:Wb(r,T,l)},h,e)}var C=s.getItemGraphicEl(n);if(!a.hasValue(e))return o.remove(C),void(C=null);var I=!1;p&&(I=Rb[l.type](d,S))&&o.remove(C),C||(C=Nb[l.type](t,a,e,S,r,h,u.model,!!C,f)),b||zb(C,a,e,i,S,t,r,"polar"===l.type),x?C.attr({shape:S}):c?Eb(c,h,C,S,e,r,!0,b):_u(C,{shape:S},t,e,null),a.setItemGraphicEl(e,C),C.ignore=I,o.add(C)})).remove((function(e){var n=s.getItemGraphicEl(e);n&&Su(n,t,e)})).execute();var S=this._backgroundGroup||(this._backgroundGroup=new ki);S.removeAll();for(var M=0;Mo)return!0;o=u}return!1},e.prototype._isOrderDifferentInView=function(t,e){for(var n=e.scale,i=n.getExtent(),r=Math.max(0,i[0]),o=Math.min(i[1],n.getOrdinalMeta().categories.length-1);r<=o;++r)if(t.ordinalNumbers[r]!==n.getRawOrdinalNumber(r))return!0},e.prototype._updateSortWithinSameData=function(t,e,n,i){if(this._isOrderChangedWithinSameData(t,e,n)){var r=this._dataSort(t,n,e);this._isOrderDifferentInView(r,n)&&(this._removeOnRenderedListener(i),i.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:r}))}},e.prototype._dispatchInitSort=function(t,e,n){var i=e.baseAxis,r=this._dataSort(t,i,(function(n){return t.get(t.mapDimension(e.otherAxis.dim),n)}));n.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",isInitSort:!0,axisId:i.index,sortInfo:r,animation:{duration:0}})},e.prototype.remove=function(t,e){this._clear(this._model),this._removeOnRenderedListener(e)},e.prototype.dispose=function(t,e){this._removeOnRenderedListener(e)},e.prototype._removeOnRenderedListener=function(t){this._onRendered&&(t.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(t){var e=this.group,n=this._data;t&&t.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl((function(e){Su(e,t,os(e).dataIndex)}))):e.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type="bar",e}(Ud),Rb={cartesian2d:function(t,e){var n=e.width<0?-1:1,i=e.height<0?-1:1;n<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height);var r=t.x+t.width,o=t.y+t.height,a=Lb(e.x,t.x),s=Pb(e.x+e.width,r),l=Lb(e.y,t.y),u=Pb(e.y+e.height,o),h=sr?s:a,e.y=c&&l>o?u:l,e.width=h?0:s-a,e.height=c?0:u-l,n<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height),h||c},polar:function(t,e){var n=e.r0<=e.r?1:-1;if(n<0){var i=e.r;e.r=e.r0,e.r0=i}var r=Pb(e.r,t.r),o=Lb(e.r0,t.r0);e.r=r,e.r0=o;var a=r-o<0;if(n<0){i=e.r;e.r=e.r0,e.r0=i}return a}},Nb={cartesian2d:function(t,e,n,i,r,o,a,s,l){var u=new ja({shape:T({},i),z2:1});(u.__dataIndex=n,u.name="item",o)&&(u.shape[r?"height":"width"]=0);return u},polar:function(t,e,n,i,r,o,a,s,l){var u=i.startAngle0?1:-1,a=i.height>0?1:-1;return{x:i.x+o*r/2,y:i.y+a*r/2,width:i.width-o*r,height:i.height-a*r}},polar:function(t,e,n){var i=t.getItemLayout(e);return{cx:i.cx,cy:i.cy,r0:i.r0,r:i.r,startAngle:i.startAngle,endAngle:i.endAngle}}};function zb(t,e,n,i,r,o,a,s){var l=e.getItemVisual(n,"style");s||t.setShape("r",i.get(Db)||0),t.useStyle(l);var u=i.getShallow("cursor");if(u&&t.attr("cursor",u),!s){var h=a?r.height>0?"bottom":"top":r.width>0?"left":"right",c=Fu(i);Vu(t,c,{labelFetcher:o,labelDataIndex:n,defaultText:Hx(o.getData(),n),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:h}),function(t,e,n,i){if(t){var r=Zu(t);r.prevValue=r.value,r.value=n;var o=e.normal;r.valueAnimation=o.get("valueAnimation"),r.valueAnimation&&(r.precision=o.get("precision"),r.defaultInterpolatedText=i,r.statesModels=e)}}(t.getTextContent(),c,o.getRawValue(n),(function(t){return Gx(e,t)}))}var p=i.getModel(["emphasis"]);Hs(t,p.get("focus"),p.get("blurScope")),Us(t,i),function(t){return null!=t.startAngle&&null!=t.endAngle&&t.startAngle===t.endAngle}(r)&&(t.style.fill="none",t.style.stroke="none",P(t.states,(function(t){t.style&&(t.style.fill=t.style.stroke="none")})))}var Vb=function(){},Fb=function(t){function e(e){var n=t.call(this,e)||this;return n.type="largeBar",n}return n(e,t),e.prototype.getDefaultShape=function(){return new Vb},e.prototype.buildPath=function(t,e){for(var n=e.points,i=this.__startPoint,r=this.__baseDimIdx,o=0;o=c&&y<=p&&(l<=v?h>=l&&h<=v:h>=v&&h<=l))return a[d]}return-1}(this,t.offsetX,t.offsetY);os(this).dataIndex=e>=0?e:null}),30,!1);function Wb(t,e,n){if(hb(n,"cartesian2d")){var i=e,r=n.getArea();return{x:t?i.x:r.x,y:t?r.y:i.y,width:t?i.width:r.width,height:t?r.height:i.height}}var o=e;return{cx:(r=n.getArea()).cx,cy:r.cy,r0:t?r.r0:o.r0,r:t?r.r:o.r,startAngle:t?o.startAngle:0,endAngle:t?o.endAngle:2*Math.PI}}var Ub=2*Math.PI,Yb=Math.PI/180;function Xb(t,e,n){e.eachSeriesByType(t,(function(t){var e=t.getData(),i=e.mapDimension("value"),r=function(t,e){return hc(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,n),o=t.get("center"),a=t.get("radius");V(a)||(a=[0,a]),V(o)||(o=[o,o]);var s=Fi(r.width,n.getWidth()),l=Fi(r.height,n.getHeight()),u=Math.min(s,l),h=Fi(o[0],s)+r.x,c=Fi(o[1],l)+r.y,p=Fi(a[0],u/2),d=Fi(a[1],u/2),f=-t.get("startAngle")*Yb,g=t.get("minAngle")*Yb,y=0;e.each(i,(function(t){!isNaN(t)&&y++}));var v=e.getSum(i),m=Math.PI/(v||y)*2,_=t.get("clockwise"),x=t.get("roseType"),b=t.get("stillShowZeroSum"),w=e.getDataExtent(i);w[0]=0;var S=Ub,M=0,T=f,C=_?1:-1;if(e.setLayout({viewRect:r,r:d}),e.each(i,(function(t,n){var i;if(isNaN(t))e.setItemLayout(n,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:_,cx:h,cy:c,r0:p,r:x?NaN:d});else{(i="area"!==x?0===v&&b?m:t*m:Ub/y)n?a:o,h=Math.abs(l.label.y-n);if(h>u.maxY){var c=l.label.x-e-l.len2*r,p=i+l.len,f=c0?"right":"left":k>0?"left":"right"}var F=y.get("rotate");if(O="number"==typeof F?F*(Math.PI/180):F?k<0?-D+Math.PI:-D:0,o=!!O,p.x=T,p.y=C,p.rotation=O,p.setStyle({verticalAlign:"middle"}),R){p.setStyle({align:A});var H=p.states.select;H&&(H.x+=p.x,H.y+=p.y)}else{var G=p.getBoundingRect().clone();G.applyTransform(p.getComputedTransform());var W=(p.style.margin||0)+2.1;G.y-=W/2,G.height+=W,r.push({label:p,labelLine:f,position:v,len:S,len2:M,minTurnAngle:w.get("minTurnAngle"),maxSurfaceAngle:w.get("maxSurfaceAngle"),surfaceNormal:new mn(k,L),linePoints:I,textAlign:A,labelDistance:m,labelAlignTo:_,edgeDistance:x,bleedMargin:b,rect:G})}s.setTextConfig({inside:R})}})),!o&&t.get("avoidLabelOverlap")&&function(t,e,n,i,r,o,a,s){for(var l=[],u=[],h=Number.MAX_VALUE,c=-Number.MAX_VALUE,p=0;p0){for(var l=o.getItemLayout(0),u=1;isNaN(l&&l.startAngle)&&u=n.r0}},e.type="pie",e}(Ud);var tw=function(){function t(t,e){this._getDataWithEncodedVisual=t,this._getRawData=e}return t.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},t.prototype.containName=function(t){return this._getRawData().indexOfName(t)>=0},t.prototype.indexOfName=function(t){return this._getDataWithEncodedVisual().indexOfName(t)},t.prototype.getItemVisual=function(t,e){return this._getDataWithEncodedVisual().getItemVisual(t,e)},t}(),ew=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.useColorPaletteOnData=!0,e}return n(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new tw(B(this.getData,this),B(this.getRawData,this)),this._defaultLabelLine(e)},e.prototype.mergeOption=function(){t.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){return function(t,e,n){e=V(e)&&{coordDimensions:e}||T({},e);var i=t.getSource(),r=om(i,e),o=new nm(r,t);return o.initData(i,n),o}(this,{coordDimensions:["value"],encodeDefaulter:z(Nc,this)})},e.prototype.getDataParams=function(e){var n=this.getData(),i=t.prototype.getDataParams.call(this,e),r=[];return n.each(n.mapDimension("value"),(function(t){r.push(t)})),i.percent=Xi(r,e,n.hostModel.get("percentPrecision")),i.$vars.push("percent"),i},e.prototype._defaultLabelLine=function(t){hr(t,"labelLine",["show"]);var e=t.labelLine,n=t.emphasis.labelLine;e.show=e.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},e.type="series.pie",e.defaultOption={zlevel:0,z:2,legendHoverLink:!0,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},e}(Pd);var nw=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hasSymbolVisual=!0,n}return n(e,t),e.prototype.getInitialData=function(t,e){return pm(this.getSource(),this,{useEncodeDefaulter:!0})},e.prototype.getProgressive=function(){var t=this.option.progressive;return null==t?this.option.large?5e3:this.get("progressive"):t},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?1e4:this.get("progressiveThreshold"):t},e.prototype.brushSelector=function(t,e,n){return n.point(e.getItemLayout(t))},e.type="series.scatter",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:"#212121"}}},e}(Pd),iw=function(){},rw=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getDefaultShape=function(){return new iw},e.prototype.buildPath=function(t,e){var n=e.points,i=e.size,r=this.symbolProxy,o=r.shape,a=t.getContext?t.getContext():t;if(a&&i[0]<4)this._ctx=a;else{this._ctx=null;for(var s=0;s=0;s--){var l=2*s,u=i[l]-o/2,h=i[l+1]-a/2;if(t>=u&&e>=h&&t<=u+o&&e<=h+a)return s}return-1},e}(Ea),ow=function(){function t(){this.group=new ki}return t.prototype.isPersistent=function(){return!this._incremental},t.prototype.updateData=function(t,e){this.group.removeAll();var n=new rw({rectHover:!0,cursor:"default"});n.setShape({points:t.getLayout("points")}),this._setCommon(n,t,!1,e),this.group.add(n),this._incremental=null},t.prototype.updateLayout=function(t){if(!this._incremental){var e=t.getLayout("points");this.group.eachChild((function(t){if(null!=t.startIndex){var n=2*(t.endIndex-t.startIndex),i=4*t.startIndex*2;e=new Float32Array(e.buffer,i,n)}t.setShape("points",e)}))}},t.prototype.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),t.count()>2e6?(this._incremental||(this._incremental=new iu({silent:!0})),this.group.add(this._incremental)):this._incremental=null},t.prototype.incrementalUpdate=function(t,e,n){var i;this._incremental?(i=new rw,this._incremental.addDisplayable(i,!0)):((i=new rw({rectHover:!0,cursor:"default",startIndex:t.start,endIndex:t.end})).incremental=!0,this.group.add(i)),i.setShape({points:e.getLayout("points")}),this._setCommon(i,e,!!this._incremental,n)},t.prototype._setCommon=function(t,e,n,i){var r=e.hostModel;i=i||{};var o=e.getVisual("symbolSize");t.setShape("size",o instanceof Array?o:[o,o]),t.softClipShape=i.clipShape||null,t.symbolProxy=Rg(e.getVisual("symbol"),0,0,0,0),t.setColor=t.symbolProxy.setColor;var a=t.shape.size[0]<4;t.useStyle(r.getModel("itemStyle").getItemStyle(a?["color","shadowBlur","shadowColor"]:["color"]));var s=e.getVisual("style"),l=s&&s.fill;if(l&&t.setColor(l),!n){var u=os(t);u.seriesIndex=r.seriesIndex,t.on("mousemove",(function(e){u.dataIndex=null;var n=t.findDataIndex(e.offsetX,e.offsetY);n>=0&&(u.dataIndex=n+(t.startIndex||0))}))}},t.prototype.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},t.prototype._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()},t}(),aw=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n){var i=t.getData();this._updateSymbolDraw(i,t).updateData(i,{clipShape:this._getClipShape(t)}),this._finished=!0},e.prototype.incrementalPrepareRender=function(t,e,n){var i=t.getData();this._updateSymbolDraw(i,t).incrementalPrepareUpdate(i),this._finished=!1},e.prototype.incrementalRender=function(t,e,n){this._symbolDraw.incrementalUpdate(t,e.getData(),{clipShape:this._getClipShape(e)}),this._finished=t.end===e.getData().count()},e.prototype.updateTransform=function(t,e,n){var i=t.getData();if(this.group.dirty(),!this._finished||i.count()>1e4||!this._symbolDraw.isPersistent())return{update:!0};var r=xb("").reset(t,e,n);r.progress&&r.progress({start:0,end:i.count(),count:i.count()},i),this._symbolDraw.updateLayout(i)},e.prototype._getClipShape=function(t){var e=t.coordinateSystem,n=e&&e.getArea&&e.getArea();return t.get("clip",!0)?n:null},e.prototype._updateSymbolDraw=function(t,e){var n=this._symbolDraw,i=e.pipelineContext.large;return n&&i===this._isLargeDraw||(n&&n.remove(),n=this._symbolDraw=i?new ow:new jx,this._isLargeDraw=i,this.group.removeAll()),this.group.add(n.group),n},e.prototype.remove=function(t,e){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},e.prototype.dispose=function(){},e.type="scatter",e}(Ud),sw=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.defaultOption={show:!1,zlevel:0,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},e}(vc),lw=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Sr).models[0]},e.type="cartesian2dAxis",e}(vc);k(lw,y_);var uw={show:!0,zlevel:0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},hw=S({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},uw),cw=S({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},uw),pw={category:hw,value:cw,time:S({scale:!0,splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},cw),log:C({scale:!0,logBase:10},cw)},dw={value:1,category:1,time:1,log:1};function fw(t,e,i,r){P(dw,(function(o,a){var s=S(S({},pw[a],!0),r,!0),l=function(t){function i(){for(var n=[],i=0;ie[1]&&e.reverse(),e},e.prototype.pointToData=function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},e.prototype.setCategorySortInfo=function(t){if("category"!==this.type)return!1;this.model.option.categorySortInfo=t,this.scale.setSortInfo(t)},e}(V_);function bw(t,e,n){n=n||{};var i=t.coordinateSystem,r=e.axis,o={},a=r.getAxesOnZeroOf()[0],s=r.position,l=a?"onZero":s,u=r.dim,h=i.getRect(),c=[h.x,h.x+h.width,h.y,h.y+h.height],p={left:0,right:1,top:0,bottom:1,onZero:2},d=e.get("offset")||0,f="x"===u?[c[2]-d,c[3]+d]:[c[0]-d,c[1]+d];if(a){var g=a.toGlobalCoord(a.dataToCoord(0));f[p.onZero]=Math.max(Math.min(g,f[1]),f[0])}o.position=["y"===u?f[p[l]]:c[0],"x"===u?f[p[l]]:c[3]],o.rotation=Math.PI/2*("x"===u?0:1);o.labelDirection=o.tickDirection=o.nameDirection={top:-1,bottom:1,left:-1,right:1}[s],o.labelOffset=a?f[p[s]]-f[p.onZero]:0,e.get(["axisTick","inside"])&&(o.tickDirection=-o.tickDirection),J(n.labelInside,e.get(["axisLabel","inside"]))&&(o.labelDirection=-o.labelDirection);var y=e.get(["axisLabel","rotate"]);return o.labelRotate="top"===l?-y:y,o.z2=1,o}function ww(t){return"cartesian2d"===t.get("coordinateSystem")}function Sw(t){var e={xAxisModel:null,yAxisModel:null};return P(e,(function(n,i){var r=i.replace(/Model$/,""),o=t.getReferringComponents(r,Sr).models[0];e[i]=o})),e}var Mw=function(){function t(t,e,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=vw,this._initCartesian(t,e,n),this.model=t}return t.prototype.getRect=function(){return this._rect},t.prototype.update=function(t,e){var n=this._axesMap;this._updateScale(t,this.model),P(n.x,(function(t){l_(t.scale,t.model)})),P(n.y,(function(t){l_(t.scale,t.model)}));var i={};P(n.x,(function(t){Cw(n,"y",t,i)})),P(n.y,(function(t){Cw(n,"x",t,i)})),this.resize(this.model,e)},t.prototype.resize=function(t,e,n){var i=t.getBoxLayoutParams(),r=!n&&t.get("containLabel"),o=hc(i,{width:e.getWidth(),height:e.getHeight()});this._rect=o;var a=this._axesList;function s(){P(a,(function(t){var e=t.isHorizontal(),n=e?[0,o.width]:[0,o.height],i=t.inverse?1:0;t.setExtent(n[i],n[1-i]),function(t,e){var n=t.getExtent(),i=n[0]+n[1];t.toGlobalCoord="x"===t.dim?function(t){return t+e}:function(t){return i-t+e},t.toLocalCoord="x"===t.dim?function(t){return t-e}:function(t){return i-t+e}}(t,e?o.x:o.y)}))}s(),r&&(P(a,(function(t){if(!t.model.get(["axisLabel","inside"])){var e=function(t){var e=t.model,n=t.scale;if(e.get(["axisLabel","show"])&&!n.isBlank()){var i,r,o=n.getExtent();r=n instanceof Sm?n.count():(i=n.getTicks()).length;var a,s=t.getLabelModel(),l=h_(t),u=1;r>40&&(u=Math.ceil(r/40));for(var h=0;h0&&i>0||n<0&&i<0)}(t)}var Aw=Math.PI,Dw=function(){function t(t,e){this.group=new ki,this.opt=e,this.axisModel=t,C(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});var n=new ki({x:e.position[0],y:e.position[1],rotation:e.rotation});n.updateTransform(),this._transformGroup=n}return t.prototype.hasBuilder=function(t){return!!kw[t]},t.prototype.add=function(t){kw[t](this.opt,this.axisModel,this.group,this._transformGroup)},t.prototype.getGroup=function(){return this.group},t.innerTextLayout=function(t,e,n){var i,r,o=Zi(e-t);return ji(o)?(r=n>0?"top":"bottom",i="center"):ji(o-Aw)?(r=n>0?"bottom":"top",i="center"):(r="middle",i=o>0&&o0?"right":"left":n>0?"left":"right"),{rotation:o,textAlign:i,textVerticalAlign:r}},t.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},t.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)},t}(),kw={axisLine:function(t,e,n,i){var r=e.get(["axisLine","show"]);if("auto"===r&&t.handleAutoShown&&(r=t.handleAutoShown("axisLine")),r){var o=e.axis.getExtent(),a=i.transform,s=[o[0],0],l=[o[1],0];a&&(Dt(s,s,a),Dt(l,l,a));var u=T({lineCap:"round"},e.getModel(["axisLine","lineStyle"]).getLineStyle()),h=new Fl({subPixelOptimize:!0,shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:u,strokeContainThreshold:t.strokeContainThreshold||5,silent:!0,z2:1});h.anid="line",n.add(h);var c=e.get(["axisLine","symbol"]),p=e.get(["axisLine","symbolSize"]),d=e.get(["axisLine","symbolOffset"])||0;if("number"==typeof d&&(d=[d,d]),null!=c){"string"==typeof c&&(c=[c,c]),"string"!=typeof p&&"number"!=typeof p||(p=[p,p]);var f=p[0],g=p[1];P([{rotate:t.rotation+Math.PI/2,offset:d[0],r:0},{rotate:t.rotation-Math.PI/2,offset:d[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],(function(e,i){if("none"!==c[i]&&null!=c[i]){var r=Rg(c[i],-f/2,-g/2,f,g,u.stroke,!0),o=e.r+e.offset;r.attr({rotation:e.rotate,x:s[0]+o*Math.cos(t.rotation),y:s[1]-o*Math.sin(t.rotation),silent:!0,z2:11}),n.add(r)}}))}}},axisTickLabel:function(t,e,n,i){var r=function(t,e,n,i){var r=n.axis,o=n.getModel("axisTick"),a=o.get("show");"auto"===a&&i.handleAutoShown&&(a=i.handleAutoShown("axisTick"));if(!a||r.scale.isBlank())return;for(var s=o.getModel("lineStyle"),l=i.tickDirection*o.get("length"),u=Rw(r.getTicksCoords(),e.transform,l,C(s.getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])}),"ticks"),h=0;hc[1]?-1:1,d=["start"===s?c[0]-p*h:"end"===s?c[1]+p*h:(c[0]+c[1])/2,Ow(s)?t.labelOffset+l*h:0],f=e.get("nameRotate");null!=f&&(f=f*Aw/180),Ow(s)?o=Dw.innerTextLayout(t.rotation,null!=f?f:t.rotation,l):(o=function(t,e,n,i){var r,o,a=Zi(n-t),s=i[0]>i[1],l="start"===e&&!s||"start"!==e&&s;ji(a-Aw/2)?(o=l?"bottom":"top",r="center"):ji(a-1.5*Aw)?(o=l?"top":"bottom",r="center"):(o="middle",r=a<1.5*Aw&&a>Aw/2?l?"left":"right":l?"right":"left");return{rotation:a,textAlign:r,textVerticalAlign:o}}(t.rotation,s,f||0,c),null!=(a=t.axisNameAvailableWidth)&&(a=Math.abs(a/Math.sin(o.rotation)),!isFinite(a)&&(a=null)));var g=u.getFont(),y=e.get("nameTruncate",!0)||{},v=y.ellipsis,m=J(t.nameTruncateMaxWidth,y.maxWidth,a),_=e.get("tooltip",!0),x=e.mainType,b={componentType:x,name:r,$vars:["name"]};b[x+"Index"]=e.componentIndex;var w=new $a({x:d[0],y:d[1],rotation:o.rotation,silent:Dw.isLabelSilent(e),style:Hu(u,{text:r,font:g,overflow:"truncate",width:m,ellipsis:v,fill:u.getTextColor()||e.get(["axisLine","lineStyle","color"]),align:u.get("align")||o.textAlign,verticalAlign:u.get("verticalAlign")||o.textVerticalAlign}),z2:1});if(w.tooltip=_&&_.show?T({content:r,formatter:function(){return r},formatterParams:b},_):null,w.__fullText=r,w.anid="name",e.get("triggerEvent")){var S=Dw.makeAxisEventDataBase(e);S.targetType="axisName",S.name=r,os(w).eventData=S}i.add(w),w.updateTransform(),n.add(w),w.decomposeTransform()}}};function Lw(t){t&&(t.ignore=!0)}function Pw(t,e){var n=t&&t.getBoundingRect().clone(),i=e&&e.getBoundingRect().clone();if(n&&i){var r=he([]);return fe(r,r,-t.rotation),n.applyTransform(pe([],r,t.getLocalTransform())),i.applyTransform(pe([],r,e.getLocalTransform())),n.intersect(i)}}function Ow(t){return"middle"===t||"center"===t}function Rw(t,e,n,i,r){for(var o=[],a=[],s=[],l=0;l=0||t===e}function Bw(t){var e=zw(t);if(e){var n=e.axisPointerModel,i=e.axis.scale,r=n.option,o=n.get("status"),a=n.get("value");null!=a&&(a=i.parse(a));var s=Vw(n);null==o&&(r.status=s?"show":"hide");var l=i.getExtent().slice();l[0]>l[1]&&l.reverse(),(null==a||a>l[1])&&(a=l[1]),aa)return!0;if(o){var s=zw(t).seriesDataCount,l=i.getExtent();return Math.abs(l[0]-l[1])/s>a}return!1}return!0===n},t.prototype.makeElOption=function(t,e,n,i,r){},t.prototype.createPointerEl=function(t,e,n,i){var r=e.pointer;if(r){var o=Qw(t).pointerEl=new Nu[r.type](tS(e.pointer));t.add(o)}},t.prototype.createLabelEl=function(t,e,n,i){if(e.label){var r=Qw(t).labelEl=new $a(tS(e.label));t.add(r),rS(r,i)}},t.prototype.updatePointerEl=function(t,e,n){var i=Qw(t).pointerEl;i&&e.pointer&&(i.setStyle(e.pointer.style),n(i,{shape:e.pointer.shape}))},t.prototype.updateLabelEl=function(t,e,n,i){var r=Qw(t).labelEl;r&&(r.setStyle(e.label.style),n(r,{x:e.label.x,y:e.label.y}),rS(r,i))},t.prototype._renderHandle=function(t){if(!this._dragging&&this.updateHandleTransform){var e,n=this._axisPointerModel,i=this._api.getZr(),r=this._handle,o=n.getModel("handle"),a=n.get("status");if(!o.get("show")||!a||"hide"===a)return r&&i.remove(r),void(this._handle=null);this._handle||(e=!0,r=this._handle=Pu(o.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){Kt(t.event)},onmousedown:eS(this._onHandleDragMove,this,0,0),drift:eS(this._onHandleDragMove,this),ondragend:eS(this._onHandleDragEnd,this)}),i.add(r)),aS(r,n,!1),r.setStyle(o.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=o.get("size");V(s)||(s=[s,s]),r.scaleX=s[0]/2,r.scaleY=s[1]/2,tf(this,"_doDispatchAxisPointer",o.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,e)}},t.prototype._moveHandleToValue=function(t,e){nS(this._axisPointerModel,!e&&this._moveAnimation,this._handle,oS(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},t.prototype._onHandleDragMove=function(t,e){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(oS(n),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(oS(i)),Qw(n).lastProp=null,this._doDispatchAxisPointer()}},t.prototype._doDispatchAxisPointer=function(){if(this._handle){var t=this._payloadInfo,e=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:e.axis.dim,axisIndex:e.componentIndex}]})}},t.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var t=this._axisPointerModel.get("value");this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"})}},t.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),n=this._group,i=this._handle;e&&n&&(this._lastGraphicKey=null,n&&e.remove(n),i&&e.remove(i),this._group=null,this._handle=null,this._payloadInfo=null)},t.prototype.doClear=function(){},t.prototype.buildLabel=function(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}},t}());function cS(t,e){var n={};return n[e.dim+"AxisIndex"]=e.index,t.getCartesian(n)}var pS={line:function(t,e,n){var i,r,o;return{type:"Line",subPixelOptimize:!0,shape:(i=[e,n[0]],r=[e,n[1]],o=dS(t),{x1:i[o=o||0],y1:i[1-o],x2:r[o],y2:r[1-o]})}},shadow:function(t,e,n){var i,r,o,a=Math.max(1,t.getBandWidth()),s=n[1]-n[0];return{type:"Rect",shape:(i=[e-a/2,n[0]],r=[a,s],o=dS(t),{x:i[o=o||0],y:i[1-o],width:r[o],height:r[1-o]})}}};function dS(t){return"x"===t.dim?0:1}var fS=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.type="axisPointer",e.defaultOption={show:"auto",zlevel:0,z:50,type:"line",snap:!1,triggerTooltip:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},e}(vc),gS=xr(),yS=P;function vS(t,e,n){if(!a.node){var i=e.getZr();gS(i).records||(gS(i).records={}),function(t,e){if(gS(t).initialized)return;function n(n,i){t.on(n,(function(n){var r=function(t){var e={showTip:[],hideTip:[]},n=function(i){var r=e[i.type];r?r.push(i):(i.dispatchAction=n,t.dispatchAction(i))};return{dispatchAction:n,pendings:e}}(e);yS(gS(t).records,(function(t){t&&i(t,n,r.dispatchAction)})),function(t,e){var n,i=t.showTip.length,r=t.hideTip.length;i?n=t.showTip[i-1]:r&&(n=t.hideTip[r-1]);n&&(n.dispatchAction=null,e.dispatchAction(n))}(r.pendings,e)}))}gS(t).initialized=!0,n("click",z(_S,"click")),n("mousemove",z(_S,"mousemove")),n("globalout",mS)}(i,e),(gS(i).records[t]||(gS(i).records[t]={})).handler=n}}function mS(t,e,n){t.handler("leave",null,n)}function _S(t,e,n,i){e.handler(t,n,i)}function xS(t,e){if(!a.node){var n=e.getZr();(gS(n).records||{})[t]&&(gS(n).records[t]=null)}}var bS=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n){var i=e.getComponent("tooltip"),r=t.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";vS("axisPointer",n,(function(t,e,n){"none"!==r&&("leave"===t||r.indexOf(t)>=0)&&n({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})}))},e.prototype.remove=function(t,e){xS("axisPointer",e)},e.prototype.dispose=function(t,e){xS("axisPointer",e)},e.type="axisPointer",e}(Fd);function wS(t,e){var n,i=[],r=t.seriesIndex;if(null==r||!(n=e.getSeriesByIndex(r)))return{point:[]};var o=n.getData(),a=_r(o,t);if(null==a||a<0||V(a))return{point:[]};var s=o.getItemGraphicEl(a),l=n.coordinateSystem;if(n.getTooltipPosition)i=n.getTooltipPosition(a)||[];else if(l&&l.dataToPoint)if(t.isStacked){var u=l.getBaseAxis(),h=l.getOtherAxis(u).dim,c=u.dim,p="x"===h||"radius"===h?1:0,d=o.mapDimension(c),f=[];f[p]=o.get(d,a),f[1-p]=o.get(o.getCalculationInfo("stackResultDimension"),a),i=l.dataToPoint(f)||[]}else i=l.dataToPoint(o.getValues(O(l.dimensions,(function(t){return o.mapDimension(t)})),a))||[];else if(s){var g=s.getBoundingRect().clone();g.applyTransform(s.transform),i=[g.x+g.width/2,g.y+g.height/2]}return{point:i,el:s}}var SS=xr();function MS(t,e,n){var i=t.currTrigger,r=[t.x,t.y],o=t,a=t.dispatchAction||B(n.dispatchAction,n),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){DS(r)&&(r=wS({seriesIndex:o.seriesIndex,dataIndex:o.dataIndex},e).point);var l=DS(r),u=o.axesInfo,h=s.axesInfo,c="leave"===i||DS(r),p={},d={},f={list:[],map:{}},g={showPointer:z(CS,d),showTooltip:z(IS,f)};P(s.coordSysMap,(function(t,e){var n=l||t.containPoint(r);P(s.coordSysAxesInfo[e],(function(t,e){var i=t.axis,o=function(t,e){for(var n=0;n<(t||[]).length;n++){var i=t[n];if(e.axis.dim===i.axisDim&&e.axis.model.componentIndex===i.axisIndex)return i}}(u,t);if(!c&&n&&(!u||o)){var a=o&&o.value;null!=a||l||(a=i.pointToData(r)),null!=a&&TS(t,a,g,!1,p)}}))}));var y={};return P(h,(function(t,e){var n=t.linkGroup;n&&!d[e]&&P(n.axesInfo,(function(e,i){var r=d[i];if(e!==t&&r){var o=r.value;n.mapper&&(o=t.axis.scale.parse(n.mapper(o,AS(e),AS(t)))),y[t.key]=o}}))})),P(y,(function(t,e){TS(h[e],t,g,!0,p)})),function(t,e,n){var i=n.axesInfo=[];P(e,(function(e,n){var r=e.axisPointerModel.option,o=t[n];o?(!e.useHandle&&(r.status="show"),r.value=o.value,r.seriesDataIndices=(o.payloadBatch||[]).slice()):!e.useHandle&&(r.status="hide"),"show"===r.status&&i.push({axisDim:e.axis.dim,axisIndex:e.axis.model.componentIndex,value:r.value})}))}(d,h,p),function(t,e,n,i){if(DS(e)||!t.list.length)return void i({type:"hideTip"});var r=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};i({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:r.dataIndexInside,dataIndex:r.dataIndex,seriesIndex:r.seriesIndex,dataByCoordSys:t.list})}(f,r,t,a),function(t,e,n){var i=n.getZr(),r="axisPointerLastHighlights",o=SS(i)[r]||{},a=SS(i)[r]={};P(t,(function(t,e){var n=t.axisPointerModel.option;"show"===n.status&&P(n.seriesDataIndices,(function(t){var e=t.seriesIndex+" | "+t.dataIndex;a[e]=t}))}));var s=[],l=[];P(o,(function(t,e){!a[e]&&l.push(t)})),P(a,(function(t,e){!o[e]&&s.push(t)})),l.length&&n.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&n.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}(h,0,n),p}}function TS(t,e,n,i,r){var o=t.axis;if(!o.scale.isBlank()&&o.containData(e))if(t.involveSeries){var a=function(t,e){var n=e.axis,i=n.dim,r=t,o=[],a=Number.MAX_VALUE,s=-1;return P(e.seriesModels,(function(e,l){var u,h,c=e.getData().mapDimensionsAll(i);if(e.getAxisTooltipData){var p=e.getAxisTooltipData(c,t,n);h=p.dataIndices,u=p.nestestValue}else{if(!(h=e.getData().indicesOfNearest(c[0],t,"category"===n.type?.5:null)).length)return;u=e.getData().get(c[0],h[0])}if(null!=u&&isFinite(u)){var d=t-u,f=Math.abs(d);f<=a&&((f=0&&s<0)&&(a=f,s=d,r=u,o.length=0),P(h,(function(t){o.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})})))}})),{payloadBatch:o,snapToValue:r}}(e,t),s=a.payloadBatch,l=a.snapToValue;s[0]&&null==r.seriesIndex&&T(r,s[0]),!i&&t.snap&&o.containData(l)&&null!=l&&(e=l),n.showPointer(t,e,s),n.showTooltip(t,a,l)}else n.showPointer(t,e)}function CS(t,e,n,i){t[e.key]={value:n,payloadBatch:i}}function IS(t,e,n,i){var r=n.payloadBatch,o=e.axis,a=o.model,s=e.axisPointerModel;if(e.triggerTooltip&&r.length){var l=e.coordSys.model,u=Fw(l),h=t.map[u];h||(h=t.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},t.list.push(h)),h.dataByAxis.push({axisDim:o.dim,axisIndex:a.componentIndex,axisType:a.type,axisId:a.id,value:i,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:r.slice()})}}function AS(t){var e=t.axis.model,n={},i=n.axisDim=t.axis.dim;return n.axisIndex=n[i+"AxisIndex"]=e.componentIndex,n.axisName=n[i+"AxisName"]=e.name,n.axisId=n[i+"AxisId"]=e.id,n}function DS(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}function kS(t){Gw.registerAxisPointerClass("CartesianAxisPointer",hS),t.registerComponentModel(fS),t.registerComponentView(bS),t.registerPreprocessor((function(t){if(t){(!t.axisPointer||0===t.axisPointer.length)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!V(e)&&(t.axisPointer.link=[e])}})),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,(function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=Nw(t,e)})),t.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},MS)}function LS(t,e){e&&(e.font=e.textFont||e.font,ct(e,"textStrokeWidth")&&(t.lineWidth=e.textStrokeWidth),ct(e,"textAlign")&&(t.align=e.textAlign),ct(e,"textVerticalAlign")&&(t.verticalAlign=e.textVerticalAlign),ct(e,"textLineHeight")&&(t.lineHeight=e.textLineHeight),ct(e,"textWidth")&&(t.width=e.textWidth),ct(e,"textHeight")&&(t.height=e.textHeight),ct(e,"textBackgroundColor")&&(t.backgroundColor=e.textBackgroundColor),ct(e,"textPadding")&&(t.padding=e.textPadding),ct(e,"textBorderColor")&&(t.borderColor=e.textBorderColor),ct(e,"textBorderWidth")&&(t.borderWidth=e.textBorderWidth),ct(e,"textBorderRadius")&&(t.borderRadius=e.textBorderRadius),ct(e,"textBoxShadowColor")&&(t.shadowColor=e.textBoxShadowColor),ct(e,"textBoxShadowBlur")&&(t.shadowBlur=e.textBoxShadowBlur),ct(e,"textBoxShadowOffsetX")&&(t.shadowOffsetX=e.textBoxShadowOffsetX),ct(e,"textBoxShadowOffsetY")&&(t.shadowOffsetY=e.textBoxShadowOffsetY))}var PS=xr(),OS={path:null,compoundPath:null,group:ki,image:Ha,text:$a},RS=function(t){var e=t.graphic;V(e)?e[0]&&e[0].elements?t.graphic=[t.graphic[0]]:t.graphic=[{elements:e}]:e&&!e.elements&&(t.graphic=[{elements:[e]}])},NS=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.mergeOption=function(e,n){var i=this.option.elements;this.option.elements=null,t.prototype.mergeOption.call(this,e,n),this.option.elements=i},e.prototype.optionUpdated=function(t,e){var n=this.option,i=(e?n:t).elements,r=n.elements=e?[]:n.elements,o=[];this._flatten(i,o,null);var a=dr(r,o,"normalMerge"),s=this._elOptionsToUpdate=[];P(a,(function(t,e){var n=t.newOption;n&&(s.push(n),function(t,e){var n=t.existing;if(e.id=t.keyInfo.id,!e.type&&n&&(e.type=n.type),null==e.parentId){var i=e.parentOption;i?e.parentId=i.id:n&&(e.parentId=n.parentId)}e.parentOption=null}(t,n),function(t,e,n){var i=T({},n),r=t[e],o=n.$action||"merge";if("merge"===o){if(r)S(r,i,!0),dc(r,i,{ignoreSize:!0}),gc(n,r);else t[e]=i}else"replace"===o?t[e]=i:"remove"===o&&r&&(t[e]=null)}(r,e,n),function(t,e){if(!t)return;if(t.hv=e.hv=[VS(e,["left","right"]),VS(e,["top","bottom"])],"group"===t.type){var n=t,i=e;null==n.width&&(n.width=i.width=0),null==n.height&&(n.height=i.height=0)}}(r[e],n))}),this);for(var l=r.length-1;l>=0;l--)null==r[l]?r.splice(l,1):delete r[l].$action},e.prototype._flatten=function(t,e,n){P(t,(function(t){if(t){n&&(t.parentOption=n),e.push(t);var i=t.children;"group"===t.type&&i&&this._flatten(i,e,t),delete t.children}}),this)},e.prototype.useElOptionsToUpdate=function(){var t=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,t},e.type="graphic",e.defaultOption={elements:[]},e}(vc),ES=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.init=function(){this._elMap=ut()},e.prototype.render=function(t,e,n){t!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=t,this._updateElements(t),this._relocate(t,n)},e.prototype._updateElements=function(t){var e=t.useElOptionsToUpdate();if(e){var n=this._elMap,i=this.group;P(e,(function(e){var r=yr(e.id,null),o=null!=r?n.get(r):null,a=yr(e.parentId,null),s=null!=a?n.get(a):i,l=e.type,u=e.style;"text"===l&&u&&e.hv&&e.hv[1]&&(u.textVerticalAlign=u.textBaseline=u.verticalAlign=u.align=null);var h=e.textContent,c=e.textConfig;if(u&&function(t,e,n,i){return t&&(t.legacy||!1!==t.legacy&&!n&&!i&&"tspan"!==e&&("text"===e||ct(t,"text")))}(u,l,!!c,!!h)){var p=function(t,e,n){var i,r,o,a=t;if("text"===e)o=a;else{o={},ct(a,"text")&&(o.text=a.text),ct(a,"rich")&&(o.rich=a.rich),ct(a,"textFill")&&(o.fill=a.textFill),ct(a,"textStroke")&&(o.stroke=a.textStroke),r={type:"text",style:o,silent:!0},i={};var s=ct(a,"textPosition");n?i.position=s?a.textPosition:"inside":s&&(i.position=a.textPosition),ct(a,"textPosition")&&(i.position=a.textPosition),ct(a,"textOffset")&&(i.offset=a.textOffset),ct(a,"textRotation")&&(i.rotation=a.textRotation),ct(a,"textDistance")&&(i.distance=a.textDistance)}return LS(o,t),P(o.rich,(function(t){LS(t,t)})),{textConfig:i,textContent:r}}(u,l,!0);!c&&p.textConfig&&(c=e.textConfig=p.textConfig),!h&&p.textContent&&(h=p.textContent)}var d=function(t){return t=T({},t),P(["id","parentId","$action","hv","bounding","textContent"].concat(ac),(function(e){delete t[e]})),t}(e);var f=e.$action||"merge";"merge"===f?o?o.attr(d):BS(r,s,d,n):"replace"===f?(zS(o,n),BS(r,s,d,n)):"remove"===f&&zS(o,n);var g=n.get(r);if(g&&h)if("merge"===f){var y=g.getTextContent();y?y.attr(h):g.setTextContent(new $a(h))}else"replace"===f&&g.setTextContent(new $a(h));if(g){var v=PS(g);v.__ecGraphicWidthOption=e.width,v.__ecGraphicHeightOption=e.height,function(t,e,n){var i=os(t).eventData;t.silent||t.ignore||i||(i=os(t).eventData={componentType:"graphic",componentIndex:e.componentIndex,name:t.name});i&&(i.info=n.info)}(g,t,e)}}))}},e.prototype._relocate=function(t,e){for(var n=t.option.elements,i=this.group,r=this._elMap,o=e.getWidth(),a=e.getHeight(),s=0;s=0;s--){var c,p,d;if(d=null!=(p=yr((c=n[s]).id,null))?r.get(p):null){var f=d.parent;h=PS(f);cc(d,c,f===i?{width:o,height:a}:{width:h.__ecGraphicWidth,height:h.__ecGraphicHeight},null,{hv:c.hv,boundingMode:c.bounding})}}},e.prototype._clear=function(){var t=this._elMap;t.each((function(e){zS(e,t)})),this._elMap=ut()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e}(Fd);function BS(t,e,n,i){var r=n.type;var o=ct(OS,r)?OS[r]:cu(r);var a=new o(n);e.add(a),i.set(t,a),PS(a).__ecGraphicId=t}function zS(t,e){var n=t&&t.parent;n&&("group"===t.type&&t.traverse((function(t){zS(t,e)})),e.removeKey(PS(t).__ecGraphicId),n.remove(t))}function VS(t,e){var n;return P(e,(function(e){null!=t[e]&&"auto"!==t[e]&&(n=!0)})),n}var FS=["x","y","radius","angle","single"],HS=["cartesian2d","polar","singleAxis"];function GS(t){return t+"Axis"}function WS(t,e){var n,i=ut(),r=[],o=ut();t.eachComponent({mainType:"dataZoom",query:e},(function(t){o.get(t.uid)||s(t)}));do{n=!1,t.eachComponent("dataZoom",a)}while(n);function a(t){!o.get(t.uid)&&function(t){var e=!1;return t.eachTargetAxis((function(t,n){var r=i.get(t);r&&r[n]&&(e=!0)})),e}(t)&&(s(t),n=!0)}function s(t){o.set(t.uid,!0),r.push(t),t.eachTargetAxis((function(t,e){(i.get(t)||i.set(t,[]))[e]=!0}))}return r}function US(t){var e=t.ecModel,n={infoList:[],infoMap:ut()};return t.eachTargetAxis((function(t,i){var r=e.getComponent(GS(t),i);if(r){var o=r.getCoordSysModel();if(o){var a=o.uid,s=n.infoMap.get(a);s||(s={model:o,axisModels:[]},n.infoList.push(s),n.infoMap.set(a,s)),s.axisModels.push(r)}}})),n}var YS=function(){function t(){this.indexList=[],this.indexMap=[]}return t.prototype.add=function(t){this.indexMap[t]||(this.indexList.push(t),this.indexMap[t]=!0)},t}(),XS=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._autoThrottle=!0,n._noTarget=!0,n._rangePropMode=["percent","percent"],n}return n(e,t),e.prototype.init=function(t,e,n){var i=ZS(t);this.settledOption=i,this.mergeDefaultAndTheme(t,n),this._doInit(i)},e.prototype.mergeOption=function(t){var e=ZS(t);S(this.option,t,!0),S(this.settledOption,e,!0),this._doInit(e)},e.prototype._doInit=function(t){var e=this.option;this._setDefaultThrottle(t),this._updateRangeUse(t);var n=this.settledOption;P([["start","startValue"],["end","endValue"]],(function(t,i){"value"===this._rangePropMode[i]&&(e[t[0]]=n[t[0]]=null)}),this),this._resetTarget()},e.prototype._resetTarget=function(){var t=this.get("orient",!0),e=this._targetAxisInfoMap=ut();this._fillSpecifiedTargetAxis(e)?this._orient=t||this._makeAutoOrientByTargetAxis():(this._orient=t||"horizontal",this._fillAutoTargetAxisByOrient(e,this._orient)),this._noTarget=!0,e.each((function(t){t.indexList.length&&(this._noTarget=!1)}),this)},e.prototype._fillSpecifiedTargetAxis=function(t){var e=!1;return P(FS,(function(n){var i=this.getReferringComponents(GS(n),Mr);if(i.specified){e=!0;var r=new YS;P(i.models,(function(t){r.add(t.componentIndex)})),t.set(n,r)}}),this),e},e.prototype._fillAutoTargetAxisByOrient=function(t,e){var n=this.ecModel,i=!0;if(i){var r="vertical"===e?"y":"x";o(n.findComponents({mainType:r+"Axis"}),r)}i&&o(n.findComponents({mainType:"singleAxis",filter:function(t){return t.get("orient",!0)===e}}),"single");function o(e,n){var r=e[0];if(r){var o=new YS;if(o.add(r.componentIndex),t.set(n,o),i=!1,"x"===n||"y"===n){var a=r.getReferringComponents("grid",Sr).models[0];a&&P(e,(function(t){r.componentIndex!==t.componentIndex&&a===t.getReferringComponents("grid",Sr).models[0]&&o.add(t.componentIndex)}))}}}i&&P(FS,(function(e){if(i){var r=n.findComponents({mainType:GS(e),filter:function(t){return"category"===t.get("type",!0)}});if(r[0]){var o=new YS;o.add(r[0].componentIndex),t.set(e,o),i=!1}}}),this)},e.prototype._makeAutoOrientByTargetAxis=function(){var t;return this.eachTargetAxis((function(e){!t&&(t=e)}),this),"y"===t?"vertical":"horizontal"},e.prototype._setDefaultThrottle=function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var e=this.ecModel.option;this.option.throttle=e.animation&&e.animationDurationUpdate>0?100:20}},e.prototype._updateRangeUse=function(t){var e=this._rangePropMode,n=this.get("rangeMode");P([["start","startValue"],["end","endValue"]],(function(i,r){var o=null!=t[i[0]],a=null!=t[i[1]];o&&!a?e[r]="percent":!o&&a?e[r]="value":n?e[r]=n[r]:o&&(e[r]="percent")}))},e.prototype.noTarget=function(){return this._noTarget},e.prototype.getFirstTargetAxisModel=function(){var t;return this.eachTargetAxis((function(e,n){null==t&&(t=this.ecModel.getComponent(GS(e),n))}),this),t},e.prototype.eachTargetAxis=function(t,e){this._targetAxisInfoMap.each((function(n,i){P(n.indexList,(function(n){t.call(e,i,n)}))}))},e.prototype.getAxisProxy=function(t,e){var n=this.getAxisModel(t,e);if(n)return n.__dzAxisProxy},e.prototype.getAxisModel=function(t,e){var n=this._targetAxisInfoMap.get(t);if(n&&n.indexMap[e])return this.ecModel.getComponent(GS(t),e)},e.prototype.setRawRange=function(t){var e=this.option,n=this.settledOption;P([["start","startValue"],["end","endValue"]],(function(i){null==t[i[0]]&&null==t[i[1]]||(e[i[0]]=n[i[0]]=t[i[0]],e[i[1]]=n[i[1]]=t[i[1]])}),this),this._updateRangeUse(t)},e.prototype.setCalculatedRange=function(t){var e=this.option;P(["start","startValue","end","endValue"],(function(n){e[n]=t[n]}))},e.prototype.getPercentRange=function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},e.prototype.getValueRange=function(t,e){if(null!=t||null!=e)return this.getAxisProxy(t,e).getDataValueWindow();var n=this.findRepresentativeAxisProxy();return n?n.getDataValueWindow():void 0},e.prototype.findRepresentativeAxisProxy=function(t){if(t)return t.__dzAxisProxy;for(var e,n=this._targetAxisInfoMap.keys(),i=0;io&&(e[1-i]=e[i]+u.sign*o),e}function JS(t,e){var n=t[e]-t[1-e];return{span:Math.abs(n),sign:n>0?-1:n<0?1:e?-1:1}}function QS(t,e){return Math.min(null!=e[1]?e[1]:1/0,Math.max(null!=e[0]?e[0]:-1/0,t))}var tM=P,eM=Gi,nM=function(){function t(t,e,n,i){this._dimName=t,this._axisIndex=e,this.ecModel=i,this._dataZoomModel=n}return t.prototype.hostedBy=function(t){return this._dataZoomModel===t},t.prototype.getDataValueWindow=function(){return this._valueWindow.slice()},t.prototype.getDataPercentWindow=function(){return this._percentWindow.slice()},t.prototype.getTargetSeriesModels=function(){var t=[];return this.ecModel.eachSeries((function(e){if(function(t){var e=t.get("coordinateSystem");return A(HS,e)>=0}(e)){var n=GS(this._dimName),i=e.getReferringComponents(n,Sr).models[0];i&&this._axisIndex===i.componentIndex&&t.push(e)}}),this),t},t.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},t.prototype.getMinMaxSpan=function(){return w(this._minMaxSpan)},t.prototype.calculateDataWindow=function(t){var e,n=this._dataExtent,i=this.getAxisModel().axis.scale,r=this._dataZoomModel.getRangePropMode(),o=[0,100],a=[],s=[];tM(["start","end"],(function(l,u){var h=t[l],c=t[l+"Value"];"percent"===r[u]?(null==h&&(h=o[u]),c=i.parse(Vi(h,o,n))):(e=!0,h=Vi(c=null==c?n[u]:i.parse(c),n,o)),s[u]=c,a[u]=h})),eM(s),eM(a);var l=this._minMaxSpan;function u(t,e,n,r,o){var a=o?"Span":"ValueSpan";$S(0,t,n,"all",l["min"+a],l["max"+a]);for(var s=0;s<2;s++)e[s]=Vi(t[s],n,r,!0),o&&(e[s]=i.parse(e[s]))}return e?u(s,a,n,o,!1):u(a,s,o,n,!0),{valueWindow:s,percentWindow:a}},t.prototype.reset=function(t){if(t===this._dataZoomModel){var e=this.getTargetSeriesModels();this._dataExtent=function(t,e,n){var i=[1/0,-1/0];tM(n,(function(t){!function(t,e,n){e&&P(g_(e,n),(function(n){var i=e.getApproximateExtent(n);i[0]t[1]&&(t[1]=i[1])}))}(i,t.getData(),e)}));var r=t.getAxisModel(),o=o_(r.axis.scale,r,i).calculate();return[o.min,o.max]}(this,this._dimName,e),this._updateMinMaxSpan();var n=this.calculateDataWindow(t.settledOption);this._valueWindow=n.valueWindow,this._percentWindow=n.percentWindow,this._setAxisModel()}},t.prototype.filterData=function(t,e){if(t===this._dataZoomModel){var n=this._dimName,i=this.getTargetSeriesModels(),r=t.get("filterMode"),o=this._valueWindow;"none"!==r&&tM(i,(function(t){var e=t.getData(),i=e.mapDimensionsAll(n);i.length&&("weakFilter"===r?e.filterSelf((function(t){for(var n,r,a,s=0;so[1];if(u&&!h&&!c)return!0;u&&(a=!0),h&&(n=!0),c&&(r=!0)}return a&&n&&r})):tM(i,(function(n){if("empty"===r)t.setData(e=e.map(n,(function(t){return function(t){return t>=o[0]&&t<=o[1]}(t)?t:NaN})));else{var i={};i[n]=o,e.selectRange(i)}})),tM(i,(function(t){e.setApproximateExtent(o,t)})))}))}},t.prototype._updateMinMaxSpan=function(){var t=this._minMaxSpan={},e=this._dataZoomModel,n=this._dataExtent;tM(["min","max"],(function(i){var r=e.get(i+"Span"),o=e.get(i+"ValueSpan");null!=o&&(o=this.getAxisModel().axis.scale.parse(o)),null!=o?r=Vi(n[0]+o,n,[0,100],!0):null!=r&&(o=Vi(r,[0,100],n,!0)-n[0]),t[i+"Span"]=r,t[i+"ValueSpan"]=o}),this)},t.prototype._setAxisModel=function(){var t=this.getAxisModel(),e=this._percentWindow,n=this._valueWindow;if(e){var i=Yi(n,[0,500]);i=Math.min(i,20);var r=t.axis.scale.rawExtentInfo;0!==e[0]&&r.setDeterminedMinMax("min",+n[0].toFixed(i)),100!==e[1]&&r.setDeterminedMinMax("max",+n[1].toFixed(i)),r.freeze()}},t}();var iM={getTargetSeries:function(t){function e(e){t.eachComponent("dataZoom",(function(n){n.eachTargetAxis((function(i,r){var o=t.getComponent(GS(i),r);e(i,r,o,n)}))}))}e((function(t,e,n,i){n.__dzAxisProxy=null}));var n=[];e((function(e,i,r,o){r.__dzAxisProxy||(r.__dzAxisProxy=new nM(e,i,o,t),n.push(r.__dzAxisProxy))}));var i=ut();return P(n,(function(t){P(t.getTargetSeriesModels(),(function(t){i.set(t.uid,t)}))})),i},overallReset:function(t,e){t.eachComponent("dataZoom",(function(t){t.eachTargetAxis((function(e,n){t.getAxisProxy(e,n).reset(t)})),t.eachTargetAxis((function(n,i){t.getAxisProxy(n,i).filterData(t,e)}))})),t.eachComponent("dataZoom",(function(t){var e=t.findRepresentativeAxisProxy();if(e){var n=e.getDataPercentWindow(),i=e.getDataValueWindow();t.setCalculatedRange({start:n[0],end:n[1],startValue:i[0],endValue:i[1]})}}))}};var rM=!1;function oM(t){rM||(rM=!0,t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,iM),function(t){t.registerAction("dataZoom",(function(t,e){P(WS(e,t),(function(e){e.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})}))}))}(t),t.registerSubTypeDefaulter("dataZoom",(function(){return"slider"})))}function aM(t){t.registerComponentModel(jS),t.registerComponentView(KS),oM(t)}var sM=function(){},lM={};function uM(t,e){lM[t]=e}function hM(t){return lM[t]}var cM=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.optionUpdated=function(){t.prototype.optionUpdated.apply(this,arguments);var e=this.ecModel;P(this.option.feature,(function(t,n){var i=hM(n);i&&(i.getDefaultOption&&(i.defaultOption=i.getDefaultOption(e)),S(t,i.defaultOption))}))},e.type="toolbox",e.layoutMode={type:"box",ignoreSize:!0},e.defaultOption={show:!0,z:6,zlevel:0,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1}},e}(vc);function pM(t,e){var n=jh(e.get("padding")),i=e.getItemStyle(["color","opacity"]);return i.fill=e.get("backgroundColor"),t=new ja({shape:{x:t.x-n[3],y:t.y-n[0],width:t.width+n[1]+n[3],height:t.height+n[0]+n[2],r:e.get("borderRadius")},style:i,silent:!0,z2:-1})}var dM=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.render=function(t,e,n,i){var r=this.group;if(r.removeAll(),t.get("show")){var o=+t.get("itemSize"),a=t.get("feature")||{},s=this._features||(this._features={}),l=[];P(a,(function(t,e){l.push(e)})),new Dv(this._featureNames||[],l).add(u).update(u).remove(z(u,null)).execute(),this._featureNames=l,function(t,e,n){var i=e.getBoxLayoutParams(),r=e.get("padding"),o={width:n.getWidth(),height:n.getHeight()},a=hc(i,o,r);uc(e.get("orient"),t,e.get("itemGap"),a.width,a.height),cc(t,i,o,r)}(r,t,n),r.add(pM(r.getBoundingRect(),t)),r.eachChild((function(t){var e=t.__title,i=t.ensureState("emphasis"),a=i.textConfig||(i.textConfig={}),s=t.getTextContent(),l=s&&s.states.emphasis;if(l&&!F(l)&&e){var u=l.style||(l.style={}),h=On(e,$a.makeFont(u)),c=t.x+r.x,p=!1;t.y+r.y+o+h.height>n.getHeight()&&(a.position="top",p=!0);var d=p?-5-h.height:o+8;c+h.width/2>n.getWidth()?(a.position=["100%",d],u.align="right"):c-h.width/2<0&&(a.position=[0,d],u.align="left")}}))}function u(u,h){var c,p=l[u],d=l[h],f=a[p],g=new oh(f,t,t.ecModel);if(i&&null!=i.newTitle&&i.featureName===p&&(f.title=i.newTitle),p&&!d){if(function(t){return 0===t.indexOf("my")}(p))c={onclick:g.option.onclick,featureName:p};else{var y=hM(p);if(!y)return;c=new y}s[p]=c}else if(!(c=s[d]))return;if(c.uid=sh("toolbox-feature"),c.model=g,c.ecModel=e,c.api=n,c instanceof sM){if(!p&&d)return void(c.dispose&&c.dispose(e,n));if(!g.get("show")||c.unusable)return void(c.remove&&c.remove(e,n))}!function(i,a,s){var l,u,h=i.getModel("iconStyle"),c=i.getModel(["emphasis","iconStyle"]),p=a instanceof sM&&a.getIcons?a.getIcons():i.get("icon"),d=i.get("title")||{};"string"==typeof p?(l={})[s]=p:l=p;"string"==typeof d?(u={})[s]=d:u=d;var f=i.iconPaths={};P(l,(function(s,l){var p=Pu(s,{},{x:-o/2,y:-o/2,width:o,height:o});p.setStyle(h.getItemStyle()),p.ensureState("emphasis").style=c.getItemStyle();var d=new $a({style:{text:u[l],align:c.get("textAlign"),borderRadius:c.get("textBorderRadius"),padding:c.get("textPadding"),fill:null},ignore:!0});p.setTextContent(d);var g=t.getModel("tooltip");g&&g.get("show")&&(p.tooltip=T({content:u[l],formatter:g.get("formatter",!0)||function(){return u[l]},formatterParams:{componentType:"toolbox",name:l,title:u[l],$vars:["name","title"]},position:g.get("position",!0)||"bottom"},g.option)),p.__title=u[l],p.on("mouseover",(function(){var e=c.getItemStyle(),n="vertical"===t.get("orient")?null==t.get("right")?"right":"left":null==t.get("bottom")?"bottom":"top";d.setStyle({fill:c.get("textFill")||e.fill||e.stroke||"#000",backgroundColor:c.get("textBackgroundColor")}),p.setTextConfig({position:c.get("textPosition")||n}),d.ignore=!t.get("showTitle"),Ls(this)})).on("mouseout",(function(){"emphasis"!==i.get(["iconStatus",l])&&Ps(this),d.hide()})),("emphasis"===i.get(["iconStatus",l])?Ls:Ps)(p),r.add(p),p.on("click",B(a.onclick,a,e,n,l)),f[l]=p}))}(g,c,p),g.setIconStatus=function(t,e){var n=this.option,i=this.iconPaths;n.iconStatus=n.iconStatus||{},n.iconStatus[t]=e,i[t]&&("emphasis"===e?Ls:Ps)(i[t])},c instanceof sM&&c.render&&c.render(g,e,n,i)}},e.prototype.updateView=function(t,e,n,i){P(this._features,(function(t){t instanceof sM&&t.updateView&&t.updateView(t.model,e,n,i)}))},e.prototype.remove=function(t,e){P(this._features,(function(n){n instanceof sM&&n.remove&&n.remove(t,e)})),this.group.removeAll()},e.prototype.dispose=function(t,e){P(this._features,(function(n){n instanceof sM&&n.dispose&&n.dispose(t,e)}))},e.type="toolbox",e}(Fd);var fM=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.onclick=function(t,e){var n=this.model,i=n.get("name")||t.get("title.0.text")||"echarts",r="svg"===e.getZr().painter.getType(),o=r?"svg":n.get("type",!0)||"png",s=e.getConnectedDataURL({type:o,backgroundColor:n.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:n.get("connectedBackgroundColor"),excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")});if("function"!=typeof MouseEvent||!a.browser.newEdge&&(a.browser.ie||a.browser.edge))if(window.navigator.msSaveOrOpenBlob||r){var l=s.split(","),u=l[0].indexOf("base64")>-1,h=r?decodeURIComponent(l[1]):l[1];u&&(h=atob(h));var c=i+"."+o;if(window.navigator.msSaveOrOpenBlob){for(var p=h.length,d=new Uint8Array(p);p--;)d[p]=h.charCodeAt(p);var f=new Blob([d]);window.navigator.msSaveOrOpenBlob(f,c)}else{var g=document.createElement("iframe");document.body.appendChild(g);var y=g.contentWindow,v=y.document;v.open("image/svg+xml","replace"),v.write(h),v.close(),y.focus(),v.execCommand("SaveAs",!0,c),document.body.removeChild(g)}}else{var m=n.get("lang"),_='',x=window.open();x.document.write(_),x.document.title=i}else{var b=document.createElement("a");b.download=i+"."+o,b.target="_blank",b.href=s;var w=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});b.dispatchEvent(w)}},e.getDefaultOption=function(t){return{show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:t.getLocale(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],pixelRatio:1,lang:t.getLocale(["toolbox","saveAsImage","lang"])}},e}(sM);fM.prototype.unusable=!a.canvasSupported;var gM="__ec_magicType_stack__",yM=[["line","bar"],["stack"]],vM=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getIcons=function(){var t=this.model,e=t.get("icon"),n={};return P(t.get("type"),(function(t){e[t]&&(n[t]=e[t])})),n},e.getDefaultOption=function(t){return{show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:t.getLocale(["toolbox","magicType","title"]),option:{},seriesIndex:{}}},e.prototype.onclick=function(t,e,n){var i=this.model,r=i.get(["seriesIndex",n]);if(mM[n]){var o,a={series:[]};P(yM,(function(t){A(t,n)>=0&&P(t,(function(t){i.setIconStatus(t,"normal")}))})),i.setIconStatus(n,"emphasis"),t.eachComponent({mainType:"series",query:null==r?null:{seriesIndex:r}},(function(t){var e=t.subType,r=t.id,o=mM[n](e,r,t,i);o&&(C(o,t.option),a.series.push(o));var s=t.coordinateSystem;if(s&&"cartesian2d"===s.type&&("line"===n||"bar"===n)){var l=s.getAxesByScale("ordinal")[0];if(l){var u=l.dim+"Axis",h=t.getReferringComponents(u,Sr).models[0].componentIndex;a[u]=a[u]||[];for(var c=0;c<=h;c++)a[u][h]=a[u][h]||{};a[u][h].boundaryGap="bar"===n}}})),"stack"===n&&(o=S({stack:i.option.title.tiled,tiled:i.option.title.stack},i.option.title)),e.dispatchAction({type:"changeMagicType",currentType:n,newOption:a,newTitle:o,featureName:"magicType"})}},e}(sM),mM={line:function(t,e,n,i){if("bar"===t)return S({id:e,type:"line",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get(["option","line"])||{},!0)},bar:function(t,e,n,i){if("line"===t)return S({id:e,type:"bar",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get(["option","bar"])||{},!0)},stack:function(t,e,n,i){var r=n.get("stack")===gM;if("line"===t||"bar"===t)return i.setIconStatus("stack",r?"normal":"emphasis"),S({id:e,stack:r?"":gM},i.get(["option","stack"])||{},!0)}};gv({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},(function(t,e){e.mergeOption(t.newOption)}));var _M=new Array(60).join("-"),xM="\t";function bM(t){return t.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}var wM=new RegExp("[\t]+","g");function SM(t,e){var n=t.split(new RegExp("\n*"+_M+"\n*","g")),i={series:[]};return P(n,(function(t,n){if(function(t){if(t.slice(0,t.indexOf("\n")).indexOf(xM)>=0)return!0}(t)){var r=function(t){for(var e=t.split(/\n+/g),n=[],i=O(bM(e.shift()).split(wM),(function(t){return{name:t,data:[]}})),r=0;r6}(t)||o){if(a&&!o){"single"===s.brushMode&&$M(t);var l=w(s);l.brushType=fT(l.brushType,a),l.panelId=a===OM?null:a.panelId,o=t._creatingCover=WM(t,l),t._covers.push(o)}if(o){var u=vT[fT(t._brushType,a)];o.__brushOption.range=u.getCreatingRange(hT(t,o,t._track)),i&&(UM(t,o),u.updateCommon(t,o)),YM(t,o),r={isEnd:i}}}else i&&"single"===s.brushMode&&s.removeOnClick&&qM(t,e,n)&&$M(t)&&(r={isEnd:i,removeOnClick:!0});return r}function fT(t,e){return"auto"===t?e.defaultBrushType:t}var gT={mousedown:function(t){if(this._dragging)yT(this,t);else if(!t.target||!t.target.draggable){cT(t);var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);this._creatingCover=null,(this._creatingPanel=qM(this,t,e))&&(this._dragging=!0,this._track=[e.slice()])}},mousemove:function(t){var e=t.offsetX,n=t.offsetY,i=this.group.transformCoordToLocal(e,n);if(function(t,e,n){if(t._brushType&&!function(t,e,n){var i=t._zr;return e<0||e>i.getWidth()||n<0||n>i.getHeight()}(t,e.offsetX,e.offsetY)){var i=t._zr,r=t._covers,o=qM(t,e,n);if(!t._dragging)for(var a=0;a=0)&&t(r,i._targetInfoList)}))}return t.prototype.setOutputRanges=function(t,e){return this.matchOutputRanges(t,e,(function(t,e,n){if((t.coordRanges||(t.coordRanges=[])).push(e),!t.coordRange){t.coordRange=e;var i=PT[t.brushType](0,n,e);t.__rangeOffset={offset:RT[t.brushType](i.values,t.range,[1,1]),xyMinMax:i.xyMinMax}}})),t},t.prototype.matchOutputRanges=function(t,e,n){P(t,(function(t){var i=this.findTargetInfo(t,e);i&&!0!==i&&P(i.coordSyses,(function(i){var r=PT[t.brushType](1,i,t.range);n(t,r.values,i,e)}))}),this)},t.prototype.setInputRanges=function(t,e){P(t,(function(t){var n,i,r,o,a,s=this.findTargetInfo(t,e);if(t.range=t.range||[],s&&!0!==s){t.panelId=s.panelId;var l=PT[t.brushType](0,s.coordSys,t.coordRange),u=t.__rangeOffset;t.range=u?RT[t.brushType](l.values,u.offset,(n=l.xyMinMax,i=u.xyMinMax,r=ET(n),o=ET(i),a=[r[0]/o[0],r[1]/o[1]],isNaN(a[0])&&(a[0]=1),isNaN(a[1])&&(a[1]=1),a)):l.values}}),this)},t.prototype.makePanelOpts=function(t,e){return O(this._targetInfoList,(function(n){var i=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:e?e(n):null,clipPath:xT(i),isTargetByCursor:wT(i,t,n.coordSysModel),getLinearBrushOtherExtent:bT(i)}}))},t.prototype.controlSeries=function(t,e,n){var i=this.findTargetInfo(t,n);return!0===i||i&&A(i.coordSyses,e.coordinateSystem)>=0},t.prototype.findTargetInfo=function(t,e){for(var n=this._targetInfoList,i=AT(e,t),r=0;rt[1]&&t.reverse(),t}function AT(t,e){return wr(t,e,{includeMainTypes:TT})}var DT={grid:function(t,e){var n=t.xAxisModels,i=t.yAxisModels,r=t.gridModels,o=ut(),a={},s={};(n||i||r)&&(P(n,(function(t){var e=t.axis.grid.model;o.set(e.id,e),a[e.id]=!0})),P(i,(function(t){var e=t.axis.grid.model;o.set(e.id,e),s[e.id]=!0})),P(r,(function(t){o.set(t.id,t),a[t.id]=!0,s[t.id]=!0})),o.each((function(t){var r=t.coordinateSystem,o=[];P(r.getCartesians(),(function(t,e){(A(n,t.getAxis("x").model)>=0||A(i,t.getAxis("y").model)>=0)&&o.push(t)})),e.push({panelId:"grid--"+t.id,gridModel:t,coordSysModel:t,coordSys:o[0],coordSyses:o,getPanelRect:LT.grid,xAxisDeclared:a[t.id],yAxisDeclared:s[t.id]})})))},geo:function(t,e){P(t.geoModels,(function(t){var n=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:n,coordSyses:[n],getPanelRect:LT.geo})}))}},kT=[function(t,e){var n=t.xAxisModel,i=t.yAxisModel,r=t.gridModel;return!r&&n&&(r=n.axis.grid.model),!r&&i&&(r=i.axis.grid.model),r&&r===e.gridModel},function(t,e){var n=t.geoModel;return n&&n===e.geoModel}],LT={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(Tu(t)),e}},PT={lineX:z(OT,0),lineY:z(OT,1),rect:function(t,e,n){var i=e[MT[t]]([n[0][0],n[1][0]]),r=e[MT[t]]([n[0][1],n[1][1]]),o=[IT([i[0],r[0]]),IT([i[1],r[1]])];return{values:o,xyMinMax:o}},polygon:function(t,e,n){var i=[[1/0,-1/0],[1/0,-1/0]];return{values:O(n,(function(n){var r=e[MT[t]](n);return i[0][0]=Math.min(i[0][0],r[0]),i[1][0]=Math.min(i[1][0],r[1]),i[0][1]=Math.max(i[0][1],r[0]),i[1][1]=Math.max(i[1][1],r[1]),r})),xyMinMax:i}}};function OT(t,e,n,i){var r=n.getAxis(["x","y"][t]),o=IT(O([0,1],(function(t){return e?r.coordToData(r.toLocalCoord(i[t])):r.toGlobalCoord(r.dataToCoord(i[t]))}))),a=[];return a[t]=o,a[1-t]=[NaN,NaN],{values:o,xyMinMax:a}}var RT={lineX:z(NT,0),lineY:z(NT,1),rect:function(t,e,n){return[[t[0][0]-n[0]*e[0][0],t[0][1]-n[0]*e[0][1]],[t[1][0]-n[1]*e[1][0],t[1][1]-n[1]*e[1][1]]]},polygon:function(t,e,n){return O(t,(function(t,i){return[t[0]-n[0]*e[i][0],t[1]-n[1]*e[i][1]]}))}};function NT(t,e,n,i){return[e[0]-i[t]*n[0],e[1]-i[t]*n[1]]}function ET(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}var BT,zT,VT=P,FT=lr+"toolbox-dataZoom_",HT=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.render=function(t,e,n,i){this.brushController||(this.brushController=new GM(n.getZr()),this.brushController.on("brush",B(this._onBrush,this)).mount()),function(t,e,n,i,r){var o=n.isZoomActive;i&&"takeGlobalCursor"===i.type&&(o="dataZoomSelect"===i.key&&i.dataZoomSelectActive);n.isZoomActive=o,t.setIconStatus("zoom",o?"emphasis":"normal");var a=new CT(WT(t),e,{include:["grid"]}).makePanelOpts(r,(function(t){return t.xAxisDeclared&&!t.yAxisDeclared?"lineX":!t.xAxisDeclared&&t.yAxisDeclared?"lineY":"rect"}));n.brushController.setPanels(a).enableBrush(!(!o||!a.length)&&{brushType:"auto",brushStyle:t.getModel("brushStyle").getItemStyle()})}(t,e,this,i,n),function(t,e){t.setIconStatus("back",function(t){return AM(t).length}(e)>1?"emphasis":"normal")}(t,e)},e.prototype.onclick=function(t,e,n){GT[n].call(this)},e.prototype.remove=function(t,e){this.brushController.unmount()},e.prototype.dispose=function(t,e){this.brushController.dispose()},e.prototype._onBrush=function(t){var e=t.areas;if(t.isEnd&&e.length){var n={},i=this.ecModel;this.brushController.updateCovers([]),new CT(WT(this.model),i,{include:["grid"]}).matchOutputRanges(e,i,(function(t,e,n){if("cartesian2d"===n.type){var i=t.brushType;"rect"===i?(r("x",n,e[0]),r("y",n,e[1])):r({lineX:"x",lineY:"y"}[i],n,e)}})),function(t,e){var n=AM(t);CM(e,(function(e,i){for(var r=n.length-1;r>=0&&!n[r][i];r--);if(r<0){var o=t.queryComponents({mainType:"dataZoom",subType:"select",id:i})[0];if(o){var a=o.getPercentRange();n[0][i]={dataZoomId:i,start:a[0],end:a[1]}}}})),n.push(e)}(i,n),this._dispatchZoomAction(n)}function r(t,e,r){var o=e.getAxis(t),a=o.model,s=function(t,e,n){var i;return n.eachComponent({mainType:"dataZoom",subType:"select"},(function(n){n.getAxisModel(t,e.componentIndex)&&(i=n)})),i}(t,a,i),l=s.findRepresentativeAxisProxy(a).getMinMaxSpan();null==l.minValueSpan&&null==l.maxValueSpan||(r=$S(0,r.slice(),o.scale.getExtent(),0,l.minValueSpan,l.maxValueSpan)),s&&(n[s.id]={dataZoomId:s.id,startValue:r[0],endValue:r[1]})}},e.prototype._dispatchZoomAction=function(t){var e=[];VT(t,(function(t,n){e.push(w(t))})),e.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:e})},e.getDefaultOption=function(t){return{show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:t.getLocale(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:"rgba(210,219,238,0.2)"}}},e}(sM),GT={zoom:function(){var t=!this.isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(function(t){var e=AM(t),n=e[e.length-1];e.length>1&&e.pop();var i={};return CM(n,(function(t,n){for(var r=e.length-1;r>=0;r--)if(t=e[r][n]){i[n]=t;break}})),i}(this.ecModel))}};function WT(t){var e={xAxisIndex:t.get("xAxisIndex",!0),yAxisIndex:t.get("yAxisIndex",!0),xAxisId:t.get("xAxisId",!0),yAxisId:t.get("yAxisId",!0)};return null==e.xAxisIndex&&null==e.xAxisId&&(e.xAxisIndex="all"),null==e.yAxisIndex&&null==e.yAxisId&&(e.yAxisIndex="all"),e}BT="dataZoom",zT=function(t){var e=t.getComponent("toolbox",0);if(e){var n=e.getModel(["feature","dataZoom"]),i=[],r=wr(t,WT(n));return VT(r.xAxisModels,(function(t){return o(t,"xAxis","xAxisIndex")})),VT(r.yAxisModels,(function(t){return o(t,"yAxis","yAxisIndex")})),i}function o(t,e,r){var o=t.componentIndex,a={type:"select",$fromToolbox:!0,filterMode:n.get("filterMode",!0)||"filter",id:FT+e+o};a[r]=o,i.push(a)}},it(null==Vc.get(BT)&&zT),Vc.set(BT,zT);var UT=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.type="tooltip",e.dependencies=["axisPointer"],e.defaultOption={zlevel:0,z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},e}(vc);function YT(t){var e=t.get("confine");return null!=e?!!e:"richText"===t.get("renderMode")}var XT=["-ms-","-moz-","-o-","-webkit-",""];function ZT(t,e,n){var i=[],r=t.get("transitionDuration"),o=t.get("backgroundColor"),s=t.get("shadowBlur"),l=t.get("shadowColor"),u=t.get("shadowOffsetX"),h=t.get("shadowOffsetY"),c=t.getModel("textStyle"),p=Id(t,"html"),d=u+"px "+h+"px "+s+"px "+l;return i.push("box-shadow:"+d),e&&r&&i.push(function(t,e){var n="cubic-bezier(0.23, 1, 0.32, 1)",i="opacity "+t/2+"s "+n+",visibility "+t/2+"s "+n;return e||(i+=",left "+t+"s "+n+",top "+t+"s "+n),O(XT,(function(t){return t+"transition:"+i})).join(";")}(r,n)),o&&(a.canvasSupported?i.push("background-Color:"+o):(i.push("background-Color:#"+Xe(o)),i.push("filter:alpha(opacity=70)"))),P(["width","color","radius"],(function(e){var n="border-"+e,r=Zh(n),o=t.get(r);null!=o&&i.push(n+":"+o+("color"===e?"":"px"))})),i.push(function(t){var e=[],n=t.get("fontSize"),i=t.getTextColor();i&&e.push("color:"+i),e.push("font:"+t.getFont()),n&&e.push("line-height:"+Math.round(3*n/2)+"px");var r=t.get("textShadowColor"),o=t.get("textShadowBlur")||0,a=t.get("textShadowOffsetX")||0,s=t.get("textShadowOffsetY")||0;return r&&o&&e.push("text-shadow:"+a+"px "+s+"px "+o+"px "+r),P(["decoration","align"],(function(n){var i=t.get(n);i&&e.push("text-"+n+":"+i)})),e.join(";")}(c)),null!=p&&i.push("padding:"+jh(p).join("px ")+"px"),i.join(";")+";"}function jT(t,e,n,i,r){var o=e&&e.painter;if(n){var a=o&&o.getViewportRoot();a&&function(t,e,n,i,r){Ft(Vt,e,i,r,!0)&&Ft(t,n,Vt[0],Vt[1])}(t,a,document.body,i,r)}else{t[0]=i,t[1]=r;var s=o&&o.getViewportRootOffset();s&&(t[0]+=s.offsetLeft,t[1]+=s.offsetTop)}t[2]=t[0]/e.getWidth(),t[3]=t[1]/e.getHeight()}var qT=function(){function t(t,e,n){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._firstShow=!0,this._longHide=!0,a.wxa)return null;var i=document.createElement("div");i.domBelongToZr=!0,this.el=i;var r=this._zr=e.getZr(),o=this._appendToBody=n&&n.appendToBody;jT(this._styleCoord,r,o,e.getWidth()/2,e.getHeight()/2),o?document.body.appendChild(i):t.appendChild(i),this._container=t;var s=this;i.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},i.onmousemove=function(t){if(t=t||window.event,!s._enterable){var e=r.handler;jt(r.painter.getViewportRoot(),t,!0),e.dispatch("mousemove",t)}},i.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return t.prototype.update=function(t){var e=this._container,n=e.currentStyle||document.defaultView.getComputedStyle(e),i=e.style;"absolute"!==i.position&&"absolute"!==n.position&&(i.position="relative"),t.get("alwaysShowContent")&&this._moveIfResized(),this.el.className=t.get("className")||""},t.prototype.show=function(t,e){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,i=this._styleCoord,r=n.offsetHeight/2;e=ic(e),n.style.cssText="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+ZT(t,!this._firstShow,this._longHide)+";left:"+i[0]+"px;top:"+(i[1]-r)+"px;border-color: "+e+";"+(t.get("extraCssText")||""),n.style.display=n.innerHTML?"block":"none",n.style.pointerEvents=this._enterable?"auto":"none",this._show=!0,this._firstShow=!1,this._longHide=!1},t.prototype.setContent=function(t,e,n,i,r){if(null!=t){var o=this.el;if(H(r)&&"item"===n.get("trigger")&&!YT(n)&&(t+=function(t,e,n){if(!H(n)||"inside"===n)return"";e=ic(e);var i,r="left"===(i=n)?"right":"right"===i?"left":"top"===i?"bottom":"top",o="",a="";return A(["left","right"],r)>-1?(o=r+":-6px;top:50%;",a="translateY(-50%) rotate("+("left"===r?-225:-45)+"deg)"):(o=r+":-6px;left:50%;",a="translateX(-50%) rotate("+("top"===r?225:45)+"deg)"),'
    '}(n.get("backgroundColor"),i,r)),H(t))o.innerHTML=t;else if(t){o.innerHTML="",V(t)||(t=[t]);for(var a=0;a=0?this._tryShow(n,i):"leave"===e&&this._hide(i))}),this))},e.prototype._keepShow=function(){var t=this._tooltipModel,e=this._ecModel,n=this._api;if(null!=this._lastX&&null!=this._lastY&&"none"!==t.get("triggerOn")){var i=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout((function(){!n.isDisposed()&&i.manuallyShowTip(t,e,n,{x:i._lastX,y:i._lastY,dataByCoordSys:i._lastDataByCoordSys})}))}},e.prototype.manuallyShowTip=function(t,e,n,i){if(i.from!==this.uid&&!a.node){var r=aC(i,n);this._ticket="";var o=i.dataByCoordSys;if(i.tooltip&&null!=i.x&&null!=i.y){var s=iC;s.x=i.x,s.y=i.y,s.update(),s.tooltip=i.tooltip,this._tryShow({offsetX:i.x,offsetY:i.y,target:s},r)}else if(o)this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,dataByCoordSys:o,tooltipOption:i.tooltipOption},r);else if(null!=i.seriesIndex){if(this._manuallyAxisShowTip(t,e,n,i))return;var l=wS(i,e),u=l.point[0],h=l.point[1];null!=u&&null!=h&&this._tryShow({offsetX:u,offsetY:h,position:i.position,target:l.el},r)}else null!=i.x&&null!=i.y&&(n.dispatchAction({type:"updateAxisPointer",x:i.x,y:i.y}),this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,target:n.getZr().findHover(i.x,i.y).target},r))}},e.prototype.manuallyHideTip=function(t,e,n,i){var r=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&r.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,i.from!==this.uid&&this._hide(aC(i,n))},e.prototype._manuallyAxisShowTip=function(t,e,n,i){var r=i.seriesIndex,o=i.dataIndex,a=e.getComponent("axisPointer").coordSysAxesInfo;if(null!=r&&null!=o&&null!=a){var s=e.getSeriesByIndex(r);if(s)if("axis"===oC([s.getData().getItemModel(o),s,(s.coordinateSystem||{}).model,t]).get("trigger"))return n.dispatchAction({type:"updateAxisPointer",seriesIndex:r,dataIndex:o,position:i.position}),!0}},e.prototype._tryShow=function(t,e){var n=t.target;if(this._tooltipModel){this._lastX=t.offsetX,this._lastY=t.offsetY;var i=t.dataByCoordSys;i&&i.length?this._showAxisTooltip(i,t):n&&Sg(n,(function(t){return null!=os(t).dataIndex}),!0)?(this._lastDataByCoordSys=null,this._showSeriesItemTooltip(t,n,e)):n&&n.tooltip?(this._lastDataByCoordSys=null,this._showComponentItemTooltip(t,n,e)):(this._lastDataByCoordSys=null,this._hide(e))}},e.prototype._showOrMove=function(t,e){var n=t.get("showDelay");e=B(e,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(e,n):e()},e.prototype._showAxisTooltip=function(t,e){var n=this._ecModel,i=this._tooltipModel,r=[e.offsetX,e.offsetY],o=oC([e.tooltipOption,i]),a=this._renderMode,s=[],l=xd("section",{blocks:[],noHeader:!0}),u=[],h=new Ad;eC(t,(function(t){eC(t.dataByAxis,(function(t){var e=n.getComponent(t.axisDim+"Axis",t.axisIndex),i=t.value;if(e&&null!=i){var r=lS(i,e.axis,n,t.seriesDataIndices,t.valueLabelOpt),o=xd("section",{header:r,noHeader:!rt(r),sortBlocks:!0,blocks:[]});l.blocks.push(o),P(t.seriesDataIndices,(function(l){var c=n.getSeriesByIndex(l.seriesIndex),p=l.dataIndexInside,d=c.getDataParams(p);d.axisDim=t.axisDim,d.axisIndex=t.axisIndex,d.axisType=t.axisType,d.axisId=t.axisId,d.axisValue=c_(e.axis,{value:i}),d.axisValueLabel=r,d.marker=h.makeTooltipMarker("item",ic(d.color),a);var f=Qp(c.formatTooltip(p,!0,null));f.markupFragment&&o.blocks.push(f.markupFragment),f.markupText&&u.push(f.markupText),s.push(d)}))}}))})),l.blocks.reverse(),u.reverse();var c=e.position,p=o.get("order"),d=Sd(l,h,a,p,n.get("useUTC"),o.get("textStyle"));d&&u.unshift(d);var f="richText"===a?"\n\n":"
    ",g=u.join(f);this._showOrMove(o,(function(){this._updateContentNotChangedOnAxis(t)?this._updatePosition(o,c,r[0],r[1],this._tooltipContent,s):this._showTooltipContent(o,g,s,Math.random()+"",r[0],r[1],c,null,h)}))},e.prototype._showSeriesItemTooltip=function(t,e,n){var i=Sg(e,(function(t){return null!=os(t).dataIndex}),!0),r=this._ecModel,o=os(i),a=o.seriesIndex,s=r.getSeriesByIndex(a),l=o.dataModel||s,u=o.dataIndex,h=o.dataType,c=l.getData(h),p=this._renderMode,d=oC([c.getItemModel(u),l,s&&(s.coordinateSystem||{}).model,this._tooltipModel]),f=d.get("trigger");if(null==f||"item"===f){var g=l.getDataParams(u,h),y=new Ad;g.marker=y.makeTooltipMarker("item",ic(g.color),p);var v=Qp(l.formatTooltip(u,!1,h)),m=d.get("order"),_=v.markupFragment?Sd(v.markupFragment,y,p,m,r.get("useUTC"),d.get("textStyle")):v.markupText,x="item_"+l.name+"_"+u;this._showOrMove(d,(function(){this._showTooltipContent(d,_,g,x,t.offsetX,t.offsetY,t.position,t.target,y)})),n({type:"showTip",dataIndexInside:u,dataIndex:c.getRawIndex(u),seriesIndex:a,from:this.uid})}},e.prototype._showComponentItemTooltip=function(t,e,n){var i=e.tooltip;if(H(i)){i={content:i,formatter:i}}var r=new oh(i,this._tooltipModel,this._ecModel),o=r.get("content"),a=Math.random()+"",s=new Ad;this._showOrMove(r,(function(){this._showTooltipContent(r,o,r.get("formatterParams")||{},a,t.offsetX,t.offsetY,t.position,e,s)})),n({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(t,e,n,i,r,o,a,s,l){if(this._ticket="",t.get("showContent")&&t.get("show")){var u=this._tooltipContent,h=t.get("formatter");a=a||t.get("position");var c=e,p=this._getNearestPoint([r,o],n,t.get("trigger"),t.get("borderColor"));if(h&&H(h)){var d=t.ecModel.get("useUTC"),f=V(n)?n[0]:n;c=h,f&&f.axisType&&f.axisType.indexOf("time")>=0&&(c=Dh(f.axisValue,c,d)),c=ec(c,n,!0)}else if(F(h)){var g=tC((function(e,i){e===this._ticket&&(u.setContent(i,l,t,p.color,a),this._updatePosition(t,a,r,o,u,n,s))}),this);this._ticket=i,c=h(n,i,g)}u.setContent(c,l,t,p.color,a),u.show(t,p.color),this._updatePosition(t,a,r,o,u,n,s)}},e.prototype._getNearestPoint=function(t,e,n,i){return"axis"===n||V(e)?{color:i||("html"===this._renderMode?"#fff":"none")}:V(e)?void 0:{color:i||e.color||e.borderColor}},e.prototype._updatePosition=function(t,e,n,i,r,o,a){var s=this._api.getWidth(),l=this._api.getHeight();e=e||t.get("position");var u=r.getSize(),h=t.get("align"),c=t.get("verticalAlign"),p=a&&a.getBoundingRect().clone();if(a&&p.applyTransform(a.transform),F(e)&&(e=e([n,i],o,r.el,p,{viewSize:[s,l],contentSize:u.slice()})),V(e))n=nC(e[0],s),i=nC(e[1],l);else if(U(e)){var d=e;d.width=u[0],d.height=u[1];var f=hc(d,{width:s,height:l});n=f.x,i=f.y,h=null,c=null}else if(H(e)&&a){var g=function(t,e,n){var i=n[0],r=n[1],o=10,a=5,s=0,l=0,u=e.width,h=e.height;switch(t){case"inside":s=e.x+u/2-i/2,l=e.y+h/2-r/2;break;case"top":s=e.x+u/2-i/2,l=e.y-r-o;break;case"bottom":s=e.x+u/2-i/2,l=e.y+h+o;break;case"left":s=e.x-i-o-a,l=e.y+h/2-r/2;break;case"right":s=e.x+u+o+a,l=e.y+h/2-r/2}return[s,l]}(e,p,u);n=g[0],i=g[1]}else{g=function(t,e,n,i,r,o,a){var s=n.getOuterSize(),l=s.width,u=s.height;null!=o&&(t+l+o+2>i?t-=l+o:t+=o);null!=a&&(e+u+a>r?e-=u+a:e+=a);return[t,e]}(n,i,r,s,l,h?null:20,c?null:20);n=g[0],i=g[1]}if(h&&(n-=sC(h)?u[0]/2:"right"===h?u[0]:0),c&&(i-=sC(c)?u[1]/2:"bottom"===c?u[1]:0),YT(t)){g=function(t,e,n,i,r){var o=n.getOuterSize(),a=o.width,s=o.height;return t=Math.min(t+a,i)-a,e=Math.min(e+s,r)-s,t=Math.max(t,0),e=Math.max(e,0),[t,e]}(n,i,r,s,l);n=g[0],i=g[1]}r.moveTo(n,i)},e.prototype._updateContentNotChangedOnAxis=function(t){var e=this._lastDataByCoordSys,n=!!e&&e.length===t.length;return n&&eC(e,(function(e,i){var r=e.dataByAxis||[],o=(t[i]||{}).dataByAxis||[];(n=n&&r.length===o.length)&&eC(r,(function(t,e){var i=o[e]||{},r=t.seriesDataIndices||[],a=i.seriesDataIndices||[];(n=n&&t.value===i.value&&t.axisType===i.axisType&&t.axisId===i.axisId&&r.length===a.length)&&eC(r,(function(t,e){var i=a[e];n=n&&t.seriesIndex===i.seriesIndex&&t.dataIndex===i.dataIndex}))}))})),this._lastDataByCoordSys=t,!!n},e.prototype._hide=function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},e.prototype.dispose=function(t,e){a.node||(this._tooltipContent.dispose(),xS("itemTooltip",e))},e.type="tooltip",e}(Fd);function oC(t){for(var e=t.pop();t.length;){var n=t.pop();n&&(n instanceof oh&&(n=n.get("tooltip",!0)),H(n)&&(n={formatter:n}),e=new oh(n,e,e.ecModel))}return e}function aC(t,e){return t.dispatchAction||B(e.dispatchAction,e)}function sC(t){return"center"===t||"middle"===t}var lC=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.layoutMode={type:"box",ignoreSize:!0},n}return n(e,t),e.type="title",e.defaultOption={zlevel:0,z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},e}(vc),uC=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n){if(this.group.removeAll(),t.get("show")){var i=this.group,r=t.getModel("textStyle"),o=t.getModel("subtextStyle"),a=t.get("textAlign"),s=Q(t.get("textBaseline"),t.get("textVerticalAlign")),l=new $a({style:Hu(r,{text:t.get("text"),fill:r.getTextColor()},{disableBox:!0}),z2:10}),u=l.getBoundingRect(),h=t.get("subtext"),c=new $a({style:Hu(o,{text:h,fill:o.getTextColor(),y:u.height+t.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),p=t.get("link"),d=t.get("sublink"),f=t.get("triggerEvent",!0);l.silent=!p&&!f,c.silent=!d&&!f,p&&l.on("click",(function(){rc(p,"_"+t.get("target"))})),d&&c.on("click",(function(){rc(d,"_"+t.get("subtarget"))})),os(l).eventData=os(c).eventData=f?{componentType:"title",componentIndex:t.componentIndex}:null,i.add(l),h&&i.add(c);var g=i.getBoundingRect(),y=t.getBoxLayoutParams();y.width=g.width,y.height=g.height;var v=hc(y,{width:n.getWidth(),height:n.getHeight()},t.get("padding"));a||("middle"===(a=t.get("left")||t.get("right"))&&(a="center"),"right"===a?v.x+=v.width:"center"===a&&(v.x+=v.width/2)),s||("center"===(s=t.get("top")||t.get("bottom"))&&(s="middle"),"bottom"===s?v.y+=v.height:"middle"===s&&(v.y+=v.height/2),s=s||"top"),i.x=v.x,i.y=v.y,i.markRedraw();var m={align:a,verticalAlign:s};l.setStyle(m),c.setStyle(m),g=i.getBoundingRect();var _=v.margin,x=t.getItemStyle(["color","opacity"]);x.fill=t.get("backgroundColor");var b=new ja({shape:{x:g.x-_[3],y:g.y-_[0],width:g.width+_[1]+_[3],height:g.height+_[0]+_[2],r:t.get("borderRadius")},style:x,subPixelOptimize:!0,silent:!0});i.add(b)}},e.type="title",e}(Fd);function hC(t){hr(t,"label",["show"])}var cC=xr(),pC=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.createdBySelf=!1,n}return n(e,t),e.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n),this._mergeOption(t,n,!1,!0)},e.prototype.isAnimationEnabled=function(){if(a.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},e.prototype.mergeOption=function(t,e){this._mergeOption(t,e,!1,!1)},e.prototype._mergeOption=function(t,e,n,i){var r=this.mainType;n||e.eachSeries((function(t){var n=t.get(this.mainType,!0),o=cC(t)[r];n&&n.data?(o?o._mergeOption(n,e,!0):(i&&hC(n),P(n.data,(function(t){t instanceof Array?(hC(t[0]),hC(t[1])):hC(t)})),T(o=this.createMarkerModelFromSeries(n,this,e),{mainType:this.mainType,seriesIndex:t.seriesIndex,name:t.name,createdBySelf:!0}),o.__hostSeries=t),cC(t)[r]=o):cC(t)[r]=null}),this)},e.prototype.formatTooltip=function(t,e,n){var i=this.getData(),r=this.getRawValue(t),o=i.getName(t);return xd("section",{header:this.name,blocks:[xd("nameValue",{name:o,value:r,noName:!o,noValue:null==r})]})},e.prototype.getData=function(){return this._data},e.prototype.setData=function(t){this._data=t},e.getMarkerModelFromSeries=function(t,e){return cC(t)[e]},e.type="marker",e.dependencies=["series","grid","polar","geo"],e}(vc);k(pC,Jp.prototype);var dC=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.createMarkerModelFromSeries=function(t,n,i){return new e(t,n,i)},e.type="markPoint",e.defaultOption={zlevel:0,z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}},e}(pC);function fC(t,e,n,i,r,o){var a=[],s=hm(e,i)?e.getCalculationInfo("stackResultDimension"):i,l=xC(e,s,t),u=e.indicesOfNearest(s,l)[0];a[r]=e.get(n,u),a[o]=e.get(s,u);var h=e.get(i,u),c=Wi(e.get(i,u));return(c=Math.min(c,20))>=0&&(a[o]=+a[o].toFixed(c)),[a,h]}var gC={min:z(fC,"min"),max:z(fC,"max"),average:z(fC,"average"),median:z(fC,"median")};function yC(t,e){var n=t.getData(),i=t.coordinateSystem;if(e&&!function(t){return!isNaN(parseFloat(t.x))&&!isNaN(parseFloat(t.y))}(e)&&!V(e.coord)&&i){var r=i.dimensions,o=vC(e,n,i,t);if((e=w(e)).type&&gC[e.type]&&o.baseAxis&&o.valueAxis){var a=A(r,o.baseAxis.dim),s=A(r,o.valueAxis.dim),l=gC[e.type](n,o.baseDataDim,o.valueDataDim,a,s);e.coord=l[0],e.value=l[1]}else{for(var u=[null!=e.xAxis?e.xAxis:e.radiusAxis,null!=e.yAxis?e.yAxis:e.angleAxis],h=0;h<2;h++)gC[u[h]]&&(u[h]=xC(n,n.mapDimension(r[h]),u[h]));e.coord=u}}return e}function vC(t,e,n,i){var r={};return null!=t.valueIndex||null!=t.valueDim?(r.valueDataDim=null!=t.valueIndex?e.getDimension(t.valueIndex):t.valueDim,r.valueAxis=n.getAxis(function(t,e){var n=t.getData(),i=n.dimensions;e=n.getDimension(e);for(var r=0;r0&&(m[0]=-m[0],m[1]=-m[1]);var x=v[0]<0?-1:1;if("start"!==i.__position&&"end"!==i.__position){var b=-Math.atan2(v[1],v[0]);u[0].8?"left":h[0]<-.8?"right":"center",p=h[1]>.8?"top":h[1]<-.8?"bottom":"middle";break;case"start":i.x=-h[0]*f+l[0],i.y=-h[1]*g+l[1],c=h[0]>.8?"right":h[0]<-.8?"left":"center",p=h[1]>.8?"bottom":h[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":i.x=f*x+l[0],i.y=l[1]+w,c=v[0]<0?"right":"left",i.originX=-f*x,i.originY=-w;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":i.x=_[0],i.y=_[1]+w,c="center",i.originY=-w;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":i.x=-f*x+u[0],i.y=u[1]+w,c=v[0]>=0?"right":"left",i.originX=f*x,i.originY=-w}i.scaleX=i.scaleY=r,i.setStyle({verticalAlign:i.__verticalAlign||p,align:i.__align||c})}}}function S(t,e){var n=t.__specifiedRotation;if(null==n){var i=a.tangentAt(e);t.attr("rotation",(1===e?-1:1)*Math.PI/2-Math.atan2(i[1],i[0]))}else t.attr("rotation",n)}},e}(ki),EC=function(){function t(t){this.group=new ki,this._LineCtor=t||NC}return t.prototype.isPersistent=function(){return!0},t.prototype.updateData=function(t){var e=this,n=this,i=n.group,r=n._lineData;n._lineData=t,r||i.removeAll();var o=BC(t);t.diff(r).add((function(n){e._doAdd(t,n,o)})).update((function(n,i){e._doUpdate(r,t,i,n,o)})).remove((function(t){i.remove(r.getItemGraphicEl(t))})).execute()},t.prototype.updateLayout=function(){var t=this._lineData;t&&t.eachItemGraphicEl((function(e,n){e.updateLayout(t,n)}),this)},t.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=BC(t),this._lineData=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(t,e){function n(t){t.isGroup||function(t){return t.animators&&t.animators.length>0}(t)||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}for(var i=t.start;i=0&&"number"==typeof l&&(l=+l.toFixed(Math.min(f,20))),p.coord[h]=d.coord[h]=l,r=[p,d,{type:a,valueIndex:i.valueIndex,value:l}]}else r=[]}var g=[yC(t,r[0]),yC(t,r[1]),T({},r[2])];return g[2].type=g[2].type||null,S(g[2],g[0]),S(g[2],g[1]),g};function GC(t){return!isNaN(t)&&!isFinite(t)}function WC(t,e,n,i){var r=1-t,o=i.dimensions[t];return GC(e[r])&&GC(n[r])&&e[t]===n[t]&&i.getAxis(o).containData(e[t])}function UC(t,e){if("cartesian2d"===t.type){var n=e[0].coord,i=e[1].coord;if(n&&i&&(WC(1,n,i,t)||WC(0,n,i,t)))return!0}return mC(t,e[0])&&mC(t,e[1])}function YC(t,e,n,i,r){var o,a=i.coordinateSystem,s=t.getItemModel(e),l=Fi(s.get("x"),r.getWidth()),u=Fi(s.get("y"),r.getHeight());if(isNaN(l)||isNaN(u)){if(i.getMarkerPosition)o=i.getMarkerPosition(t.getValues(t.dimensions,e));else{var h=a.dimensions,c=t.get(h[0],e),p=t.get(h[1],e);o=a.dataToPoint([c,p])}if(hb(a,"cartesian2d")){var d=a.getAxis("x"),f=a.getAxis("y");h=a.dimensions;GC(t.get(h[0],e))?o[0]=d.toGlobalCoord(d.getExtent()[n?0:1]):GC(t.get(h[1],e))&&(o[1]=f.toGlobalCoord(f.getExtent()[n?0:1]))}isNaN(l)||(o[0]=l),isNaN(u)||(o[1]=u)}else o=[l,u];t.setItemLayout(e,o)}var XC=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.updateTransform=function(t,e,n){e.eachSeries((function(t){var e=pC.getMarkerModelFromSeries(t,"markLine");if(e){var i=e.getData(),r=FC(e).from,o=FC(e).to;r.each((function(e){YC(r,e,!0,t,n),YC(o,e,!1,t,n)})),i.each((function(t){i.setItemLayout(t,[r.getItemLayout(t),o.getItemLayout(t)])})),this.markerGroupMap.get(t.id).updateLayout()}}),this)},e.prototype.renderSeries=function(t,e,n,i){var r=t.coordinateSystem,o=t.id,a=t.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,new EC);this.group.add(l.group);var u=function(t,e,n){var i;i=t?O(t&&t.dimensions,(function(t){return C({name:t},e.getData().getDimensionInfo(e.getData().mapDimension(t))||{})})):[{name:"value",type:"float"}];var r=new nm(i,n),o=new nm(i,n),a=new nm([],n),s=O(n.get("data"),z(HC,e,t,n));t&&(s=N(s,z(UC,t)));var l=t?_C:function(t){return t.value};return r.initData(O(s,(function(t){return t[0]})),null,l),o.initData(O(s,(function(t){return t[1]})),null,l),a.initData(O(s,(function(t){return t[2]}))),a.hasItemOption=!0,{from:r,to:o,line:a}}(r,t,e),h=u.from,c=u.to,p=u.line;FC(e).from=h,FC(e).to=c,e.setData(p);var d=e.get("symbol"),f=e.get("symbolSize");function g(e,n,r){var o=e.getItemModel(n);YC(e,n,r,t,i);var s=o.getModel("itemStyle").getItemStyle();null==s.fill&&(s.fill=Ff(a,"color")),e.setItemVisual(n,{symbolRotate:o.get("symbolRotate"),symbolSize:o.get("symbolSize")||f[r?0:1],symbol:o.get("symbol",!0)||d[r?0:1],style:s})}V(d)||(d=[d,d]),V(f)||(f=[f,f]),u.from.each((function(t){g(h,t,!0),g(c,t,!1)})),p.each((function(t){var e=p.getItemModel(t).getModel("lineStyle").getLineStyle();p.setItemLayout(t,[h.getItemLayout(t),c.getItemLayout(t)]),null==e.stroke&&(e.stroke=h.getItemVisual(t,"style").fill),p.setItemVisual(t,{fromSymbolRotate:h.getItemVisual(t,"symbolRotate"),fromSymbolSize:h.getItemVisual(t,"symbolSize"),fromSymbol:h.getItemVisual(t,"symbol"),toSymbolRotate:c.getItemVisual(t,"symbolRotate"),toSymbolSize:c.getItemVisual(t,"symbolSize"),toSymbol:c.getItemVisual(t,"symbol"),style:e})})),l.updateData(p),u.line.eachItemGraphicEl((function(t,n){t.traverse((function(t){os(t).dataModel=e}))})),this.markKeep(l),l.group.silent=e.get("silent")||t.get("silent")},e.type="markLine",e}(wC);var ZC=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.createMarkerModelFromSeries=function(t,n,i){return new e(t,n,i)},e.type="markArea",e.defaultOption={zlevel:0,z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},e}(pC),jC=xr(),qC=function(t,e,n,i){var r=yC(t,i[0]),o=yC(t,i[1]),a=r.coord,s=o.coord;a[0]=J(a[0],-1/0),a[1]=J(a[1],-1/0),s[0]=J(s[0],1/0),s[1]=J(s[1],1/0);var l=M([{},r,o]);return l.coord=[r.coord,o.coord],l.x0=r.x,l.y0=r.y,l.x1=o.x,l.y1=o.y,l};function KC(t){return!isNaN(t)&&!isFinite(t)}function $C(t,e,n,i){var r=1-t;return KC(e[r])&&KC(n[r])}function JC(t,e){var n=e.coord[0],i=e.coord[1];return!!(hb(t,"cartesian2d")&&n&&i&&($C(1,n,i)||$C(0,n,i)))||(mC(t,{coord:n,x:e.x0,y:e.y0})||mC(t,{coord:i,x:e.x1,y:e.y1}))}function QC(t,e,n,i,r){var o,a=i.coordinateSystem,s=t.getItemModel(e),l=Fi(s.get(n[0]),r.getWidth()),u=Fi(s.get(n[1]),r.getHeight());if(isNaN(l)||isNaN(u)){if(i.getMarkerPosition)o=i.getMarkerPosition(t.getValues(n,e));else{var h=[d=t.get(n[0],e),f=t.get(n[1],e)];a.clampData&&a.clampData(h,h),o=a.dataToPoint(h,!0)}if(hb(a,"cartesian2d")){var c=a.getAxis("x"),p=a.getAxis("y"),d=t.get(n[0],e),f=t.get(n[1],e);KC(d)?o[0]=c.toGlobalCoord(c.getExtent()["x0"===n[0]?0:1]):KC(f)&&(o[1]=p.toGlobalCoord(p.getExtent()["y0"===n[1]?0:1]))}isNaN(l)||(o[0]=l),isNaN(u)||(o[1]=u)}else o=[l,u];return o}var tI=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],eI=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.updateTransform=function(t,e,n){e.eachSeries((function(t){var e=pC.getMarkerModelFromSeries(t,"markArea");if(e){var i=e.getData();i.each((function(e){var r=O(tI,(function(r){return QC(i,e,r,t,n)}));i.setItemLayout(e,r),i.getItemGraphicEl(e).setShape("points",r)}))}}),this)},e.prototype.renderSeries=function(t,e,n,i){var r=t.coordinateSystem,o=t.id,a=t.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,{group:new ki});this.group.add(l.group),this.markKeep(l);var u=function(t,e,n){var i,r,o=["x0","y0","x1","y1"];t?(i=O(t&&t.dimensions,(function(t){var n=e.getData();return C({name:t},n.getDimensionInfo(n.mapDimension(t))||{})})),r=new nm(O(o,(function(t,e){return{name:t,type:i[e%2].type}})),n)):r=new nm(i=[{name:"value",type:"float"}],n);var a=O(n.get("data"),z(qC,e,t,n));t&&(a=N(a,z(JC,t)));var s=t?function(t,e,n,i){return t.coord[Math.floor(i/2)][i%2]}:function(t){return t.value};return r.initData(a,null,s),r.hasItemOption=!0,r}(r,t,e);e.setData(u),u.each((function(e){var n=O(tI,(function(n){return QC(u,e,n,t,i)})),o=!0;P(tI,(function(t){if(o){var n=u.get(t[0],e),i=u.get(t[1],e);(KC(n)||r.getAxis("x").containData(n))&&(KC(i)||r.getAxis("y").containData(i))&&(o=!1)}})),u.setItemLayout(e,{points:n,allClipped:o});var s=u.getItemModel(e).getModel("itemStyle").getItemStyle(),l=Ff(a,"color");s.fill||(s.fill=l,"string"==typeof s.fill&&(s.fill=$e(s.fill,.4))),s.stroke||(s.stroke=l),u.setItemVisual(e,"style",s)})),u.diff(jC(l).data).add((function(t){var e=u.getItemLayout(t);if(!e.allClipped){var n=new Nl({shape:{points:e.points}});u.setItemGraphicEl(t,n),l.group.add(n)}})).update((function(t,n){var i=jC(l).data.getItemGraphicEl(n),r=u.getItemLayout(t);r.allClipped?i&&l.group.remove(i):(i?_u(i,{shape:{points:r.points}},e,t):i=new Nl({shape:{points:r.points}}),u.setItemGraphicEl(t,i),l.group.add(i))})).remove((function(t){var e=jC(l).data.getItemGraphicEl(t);l.group.remove(e)})).execute(),u.eachItemGraphicEl((function(t,n){var i=u.getItemModel(n),r=u.getItemVisual(n,"style");t.useStyle(u.getItemVisual(n,"style")),Vu(t,Fu(i),{labelFetcher:e,labelDataIndex:n,defaultText:u.getName(n)||"",inheritColor:"string"==typeof r.fill?$e(r.fill,1):"#000"}),Us(t,i),Hs(t),os(t).dataModel=e})),jC(l).data=u,l.group.silent=e.get("silent")||t.get("silent")},e.type="markArea",e}(wC);var nI=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.layoutMode={type:"box",ignoreSize:!0},n}return n(e,t),e.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n),t.selected=t.selected||{},this._updateSelector(t)},e.prototype.mergeOption=function(e,n){t.prototype.mergeOption.call(this,e,n),this._updateSelector(e)},e.prototype._updateSelector=function(t){var e=t.selector,n=this.ecModel;!0===e&&(e=t.selector=["all","inverse"]),V(e)&&P(e,(function(t,i){H(t)&&(t={type:t}),e[i]=S(t,function(t,e){return"all"===e?{type:"all",title:t.getLocale(["legend","selector","all"])}:"inverse"===e?{type:"inverse",title:t.getLocale(["legend","selector","inverse"])}:void 0}(n,t.type))}))},e.prototype.optionUpdated=function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&"single"===this.get("selectedMode")){for(var e=!1,n=0;n=0},e.prototype.getOrient=function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},e.type="legend.plain",e.dependencies=["series"],e.defaultOption={zlevel:0,z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",itemStyle:{borderWidth:0},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:" sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},e}(vc),iI=z,rI=P,oI=ki,aI=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.newlineDisabled=!1,n}return n(e,t),e.prototype.init=function(){this.group.add(this._contentGroup=new oI),this.group.add(this._selectorGroup=new oI),this._isFirstRender=!0},e.prototype.getContentGroup=function(){return this._contentGroup},e.prototype.getSelectorGroup=function(){return this._selectorGroup},e.prototype.render=function(t,e,n){var i=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),t.get("show",!0)){var r=t.get("align"),o=t.get("orient");r&&"auto"!==r||(r="right"===t.get("left")&&"vertical"===o?"right":"left");var a=t.get("selector",!0),s=t.get("selectorPosition",!0);!a||s&&"auto"!==s||(s="horizontal"===o?"end":"start"),this.renderInner(r,t,e,n,a,o,s);var l=t.getBoxLayoutParams(),u={width:n.getWidth(),height:n.getHeight()},h=t.get("padding"),c=hc(l,u,h),p=this.layoutInner(t,r,c,i,a,s),d=hc(C({width:p.width,height:p.height},l),u,h);this.group.x=d.x-p.x,this.group.y=d.y-p.y,this.group.markRedraw(),this.group.add(this._backgroundEl=pM(p,t))}},e.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},e.prototype.renderInner=function(t,e,n,i,r,o,a){var s=this.getContentGroup(),l=ut(),u=e.get("selectedMode"),h=[];n.eachRawSeries((function(t){!t.get("legendHoverLink")&&h.push(t.id)})),rI(e.getData(),(function(r,o){var a=r.get("name");if(!this.newlineDisabled&&(""===a||"\n"===a)){var c=new oI;return c.newline=!0,void s.add(c)}var p=n.getSeriesByName(a)[0];if(!l.get(a)){if(p){var d=p.getData(),f=d.getVisual("style"),g=f[d.getVisual("drawType")]||f.fill,y=f.stroke,v=f.decal,m=d.getVisual("legendSymbol")||"roundRect",_=d.getVisual("symbol");this._createItem(a,o,r,e,m,_,t,g,y,v,u).on("click",iI(lI,a,null,i,h)).on("mouseover",iI(hI,p.name,null,i,h)).on("mouseout",iI(cI,p.name,null,i,h)),l.set(a,!0)}else n.eachRawSeries((function(n){if(!l.get(a)&&n.legendVisualProvider){var s=n.legendVisualProvider;if(!s.containName(a))return;var c=s.indexOfName(a),p=s.getItemVisual(c,"style"),d=p.stroke,f=p.decal,g=p.fill,y=We(p.fill);y&&0===y[3]&&(y[3]=.2,g=Je(y,"rgba"));this._createItem(a,o,r,e,"roundRect",null,t,g,d,f,u).on("click",iI(lI,null,a,i,h)).on("mouseover",iI(hI,null,a,i,h)).on("mouseout",iI(cI,null,a,i,h)),l.set(a,!0)}}),this);0}}),this),r&&this._createSelector(r,e,i,o,a)},e.prototype._createSelector=function(t,e,n,i,r){var o=this.getSelectorGroup();rI(t,(function(t){var i=t.type,r=new $a({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:"all"===i?"legendAllSelect":"legendInverseSelect"})}});o.add(r),Vu(r,{normal:e.getModel("selectorLabel"),emphasis:e.getModel(["emphasis","selectorLabel"])},{defaultText:t.title}),Hs(r)}))},e.prototype._createItem=function(t,e,n,i,r,o,a,s,l,u,h){var c=i.get("itemWidth"),p=i.get("itemHeight"),d=i.get("inactiveColor"),f=i.get("inactiveBorderColor"),g=i.get("symbolKeepAspect"),y=i.getModel("itemStyle"),v=i.isSelected(t),m=new oI,_=n.getModel("textStyle"),x=n.get("icon"),b=n.getModel("tooltip"),w=b.parentModel,S=Rg(r=x||r,0,0,c,p,v?s:d,null==g||g);if(m.add(sI(S,r,y,l,f,u,v)),!x&&o&&(o!==r||"none"===o)){var M=.8*p;"none"===o&&(o="circle");var C=Rg(o,(c-M)/2,(p-M)/2,M,M,v?s:d,null==g||g);m.add(sI(C,o,y,l,f,u,v))}var I="left"===a?c+5:-5,A=a,D=i.get("formatter"),k=t;"string"==typeof D&&D?k=D.replace("{name}",null!=t?t:""):"function"==typeof D&&(k=D(t)),m.add(new $a({style:Hu(_,{text:k,x:I,y:p/2,fill:v?_.getTextColor():d,align:A,verticalAlign:"middle"})}));var L=new ja({shape:m.getBoundingRect(),invisible:!0});if(b.get("show")){var P={componentType:"legend",legendIndex:i.componentIndex,name:t,$vars:["name"]};L.tooltip=T({content:t,formatter:w.get("formatter",!0)||function(t){return t.name},formatterParams:P},b.option)}return m.add(L),m.eachChild((function(t){t.silent=!0})),L.silent=!h,this.getContentGroup().add(m),Hs(m),m.__legendDataIndex=e,m},e.prototype.layoutInner=function(t,e,n,i,r,o){var a=this.getContentGroup(),s=this.getSelectorGroup();uc(t.get("orient"),a,t.get("itemGap"),n.width,n.height);var l=a.getBoundingRect(),u=[-l.x,-l.y];if(s.markRedraw(),a.markRedraw(),r){uc("horizontal",s,t.get("selectorItemGap",!0));var h=s.getBoundingRect(),c=[-h.x,-h.y],p=t.get("selectorButtonGap",!0),d=t.getOrient().index,f=0===d?"width":"height",g=0===d?"height":"width",y=0===d?"y":"x";"end"===o?c[d]+=l[f]+p:u[d]+=h[f]+p,c[1-d]+=l[g]/2-h[g]/2,s.x=c[0],s.y=c[1],a.x=u[0],a.y=u[1];var v={x:0,y:0};return v[f]=l[f]+p+h[f],v[g]=Math.max(l[g],h[g]),v[y]=Math.min(0,h[y]+c[1-d]),v}return a.x=u[0],a.y=u[1],this.group.getBoundingRect()},e.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},e.type="legend.plain",e}(Fd);function sI(t,e,n,i,r,o,a){var s;return"line"!==e&&e.indexOf("empty")<0?(s=n.getItemStyle(),t.style.stroke=i,t.style.decal=o,a||(s.stroke=r)):s=n.getItemStyle(["borderWidth","borderColor"]),t.setStyle(s),t}function lI(t,e,n,i){cI(t,e,n,i),n.dispatchAction({type:"legendToggleSelect",name:null!=t?t:e}),hI(t,e,n,i)}function uI(t){for(var e,n=t.getZr().storage.getDisplayList(),i=0,r=n.length;in[r],f=[-c.x,-c.y];e||(f[i]=l[s]);var g=[0,0],y=[-p.x,-p.y],v=Q(t.get("pageButtonGap",!0),t.get("itemGap",!0));d&&("end"===t.get("pageButtonPosition",!0)?y[i]+=n[r]-p[r]:g[i]+=p[r]+v);y[1-i]+=c[o]/2-p[o]/2,l.setPosition(f),u.setPosition(g),h.setPosition(y);var m={x:0,y:0};if(m[r]=d?n[r]:c[r],m[o]=Math.max(c[o],p[o]),m[a]=Math.min(0,p[a]+y[1-i]),u.__rectSize=n[r],d){var _={x:0,y:0};_[r]=Math.max(n[r]-p[r]-v,0),_[o]=m[o],u.setClipPath(new ja({shape:_})),u.__rectSize=_[r]}else h.eachChild((function(t){t.attr({invisible:!0,silent:!0})}));var x=this._getPageInfo(t);return null!=x.pageIndex&&_u(l,{x:x.contentPosition[0],y:x.contentPosition[1]},d?t:null),this._updatePageInfoView(t,x),m},e.prototype._pageGo=function(t,e,n){var i=this._getPageInfo(e)[t];null!=i&&n.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:e.id})},e.prototype._updatePageInfoView=function(t,e){var n=this._controllerGroup;P(["pagePrev","pageNext"],(function(i){var r=null!=e[i+"DataIndex"],o=n.childOfName(i);o&&(o.setStyle("fill",r?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),o.cursor=r?"pointer":"default")}));var i=n.childOfName("pageText"),r=t.get("pageFormatter"),o=e.pageIndex,a=null!=o?o+1:0,s=e.pageCount;i&&r&&i.setStyle("text",H(r)?r.replace("{current}",null==a?"":a+"").replace("{total}",null==s?"":s+""):r({current:a,total:s}))},e.prototype._getPageInfo=function(t){var e=t.get("scrollDataIndex",!0),n=this.getContentGroup(),i=this._containerGroup.__rectSize,r=t.getOrient().index,o=mI[r],a=_I[r],s=this._findTargetItemIndex(e),l=n.children(),u=l[s],h=l.length,c=h?1:0,p={contentPosition:[n.x,n.y],pageCount:c,pageIndex:c-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!u)return p;var d=m(u);p.contentPosition[r]=-d.s;for(var f=s+1,g=d,y=d,v=null;f<=h;++f)(!(v=m(l[f]))&&y.e>g.s+i||v&&!_(v,g.s))&&(g=y.i>g.i?y:v)&&(null==p.pageNextDataIndex&&(p.pageNextDataIndex=g.i),++p.pageCount),y=v;for(f=s-1,g=d,y=d,v=null;f>=-1;--f)(v=m(l[f]))&&_(y,v.s)||!(g.i=e&&t.s<=e+i}},e.prototype._findTargetItemIndex=function(t){return this._showController?(this.getContentGroup().eachChild((function(i,r){var o=i.__legendDataIndex;null==n&&null!=o&&(n=r),o===t&&(e=r)})),null!=e?e:n):0;var e,n},e.type="legend.scroll",e}(aI);function bI(t){Cv(fI),t.registerComponentModel(gI),t.registerComponentView(xI),function(t){t.registerAction("legendScroll","legendscroll",(function(t,e){var n=t.scrollDataIndex;null!=n&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},(function(t){t.setScrollDataIndex(n)}))}))}(t)}var wI=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.type="dataZoom.inside",e.defaultOption=lh(XS.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),e}(XS),SI=function(t){function e(e){var n=t.call(this)||this;n._zr=e;var i=B(n._mousedownHandler,n),r=B(n._mousemoveHandler,n),o=B(n._mouseupHandler,n),a=B(n._mousewheelHandler,n),s=B(n._pinchHandler,n);return n.enable=function(t,n){this.disable(),this._opt=C(w(n)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),null==t&&(t=!0),!0!==t&&"move"!==t&&"pan"!==t||(e.on("mousedown",i),e.on("mousemove",r),e.on("mouseup",o)),!0!==t&&"scale"!==t&&"zoom"!==t||(e.on("mousewheel",a),e.on("pinch",s))},n.disable=function(){e.off("mousedown",i),e.off("mousemove",r),e.off("mouseup",o),e.off("mousewheel",a),e.off("pinch",s)},n}return n(e,t),e.prototype.isDragging=function(){return this._dragging},e.prototype.isPinching=function(){return this._pinching},e.prototype.setPointerChecker=function(t){this.pointerChecker=t},e.prototype.dispose=function(){this.disable()},e.prototype._mousedownHandler=function(t){if(!($t(t)||t.target&&t.target.draggable)){var e=t.offsetX,n=t.offsetY;this.pointerChecker&&this.pointerChecker(t,e,n)&&(this._x=e,this._y=n,this._dragging=!0)}},e.prototype._mousemoveHandler=function(t){if(this._dragging&&CI("moveOnMouseMove",t,this._opt)&&"pinch"!==t.gestureEvent&&!LM(this._zr,"globalPan")){var e=t.offsetX,n=t.offsetY,i=this._x,r=this._y,o=e-i,a=n-r;this._x=e,this._y=n,this._opt.preventDefaultMouseMove&&Kt(t.event),TI(this,"pan","moveOnMouseMove",t,{dx:o,dy:a,oldX:i,oldY:r,newX:e,newY:n,isAvailableBehavior:null})}},e.prototype._mouseupHandler=function(t){$t(t)||(this._dragging=!1)},e.prototype._mousewheelHandler=function(t){var e=CI("zoomOnMouseWheel",t,this._opt),n=CI("moveOnMouseWheel",t,this._opt),i=t.wheelDelta,r=Math.abs(i),o=t.offsetX,a=t.offsetY;if(0!==i&&(e||n)){if(e){var s=r>3?1.4:r>1?1.2:1.1;MI(this,"zoom","zoomOnMouseWheel",t,{scale:i>0?s:1/s,originX:o,originY:a,isAvailableBehavior:null})}if(n){var l=Math.abs(i);MI(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:(i>0?1:-1)*(l>3?.4:l>1?.15:.05),originX:o,originY:a,isAvailableBehavior:null})}}},e.prototype._pinchHandler=function(t){LM(this._zr,"globalPan")||MI(this,"zoom",null,t,{scale:t.pinchScale>1?1.1:1/1.1,originX:t.pinchX,originY:t.pinchY,isAvailableBehavior:null})},e}(Nt);function MI(t,e,n,i,r){t.pointerChecker&&t.pointerChecker(i,r.originX,r.originY)&&(Kt(i.event),TI(t,e,n,i,r))}function TI(t,e,n,i,r){r.isAvailableBehavior=B(CI,null,n,i),t.trigger(e,r)}function CI(t,e,n){var i=n[t];return!t||i&&(!H(i)||e.event[i+"Key"])}var II=xr();function AI(t,e,n){II(t).coordSysRecordMap.each((function(t){var i=t.dataZoomInfoMap.get(e.uid);i&&(i.getRange=n)}))}function DI(t,e){if(e){t.removeKey(e.model.uid);var n=e.controller;n&&n.dispose()}}function kI(t,e){t.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:e})}function LI(t,e,n,i){return t.coordinateSystem.containPoint([n,i])}function PI(t){t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,(function(t,e){var n=II(e),i=n.coordSysRecordMap||(n.coordSysRecordMap=ut());i.each((function(t){t.dataZoomInfoMap=null})),t.eachComponent({mainType:"dataZoom",subType:"inside"},(function(t){P(US(t).infoList,(function(n){var r=n.model.uid,o=i.get(r)||i.set(r,function(t,e){var n={model:e,containsPoint:z(LI,e),dispatchAction:z(kI,t),dataZoomInfoMap:null,controller:null},i=n.controller=new SI(t.getZr());return P(["pan","zoom","scrollMove"],(function(t){i.on(t,(function(e){var i=[];n.dataZoomInfoMap.each((function(r){if(e.isAvailableBehavior(r.model.option)){var o=(r.getRange||{})[t],a=o&&o(r.dzReferCoordSysInfo,n.model.mainType,n.controller,e);!r.model.get("disabled",!0)&&a&&i.push({dataZoomId:r.model.id,start:a[0],end:a[1]})}})),i.length&&n.dispatchAction(i)}))})),n}(e,n.model));(o.dataZoomInfoMap||(o.dataZoomInfoMap=ut())).set(t.uid,{dzReferCoordSysInfo:n,model:t,getRange:null})}))})),i.each((function(t){var e,n=t.controller,r=t.dataZoomInfoMap;if(r){var o=r.keys()[0];null!=o&&(e=r.get(o))}if(e){var a=function(t){var e,n="type_",i={type_true:2,type_move:1,type_false:0,type_undefined:-1},r=!0;return t.each((function(t){var o=t.model,a=!o.get("disabled",!0)&&(!o.get("zoomLock",!0)||"move");i[n+a]>i[n+e]&&(e=a),r=r&&o.get("preventDefaultMouseMove",!0)})),{controlType:e,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!r}}}(r);n.enable(a.controlType,a.opt),n.setPointerChecker(t.containsPoint),tf(t,"dispatchAction",e.model.get("throttle",!0),"fixRate")}else DI(i,t)}))}))}var OI=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="dataZoom.inside",e}return n(e,t),e.prototype.render=function(e,n,i){t.prototype.render.apply(this,arguments),e.noTarget()?this._clear():(this.range=e.getPercentRange(),AI(i,e,{pan:B(RI.pan,this),zoom:B(RI.zoom,this),scrollMove:B(RI.scrollMove,this)}))},e.prototype.dispose=function(){this._clear(),t.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){!function(t,e){for(var n=II(t).coordSysRecordMap,i=n.keys(),r=0;r0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(o[1]-o[0])+o[0],u=Math.max(1/i.scale,0);o[0]=(o[0]-l)*u+l,o[1]=(o[1]-l)*u+l;var h=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return $S(0,o,[0,100],0,h.minSpan,h.maxSpan),this.range=o,r[0]!==o[0]||r[1]!==o[1]?o:void 0}},pan:NI((function(t,e,n,i,r,o){var a=EI[i]([o.oldX,o.oldY],[o.newX,o.newY],e,r,n);return a.signal*(t[1]-t[0])*a.pixel/a.pixelLength})),scrollMove:NI((function(t,e,n,i,r,o){return EI[i]([0,0],[o.scrollDelta,o.scrollDelta],e,r,n).signal*(t[1]-t[0])*o.scrollDelta}))};function NI(t){return function(e,n,i,r){var o=this.range,a=o.slice(),s=e.axisModels[0];if(s)return $S(t(a,s,e,n,i,r),a,[0,100],"all"),this.range=a,o[0]!==a[0]||o[1]!==a[1]?a:void 0}}var EI={grid:function(t,e,n,i,r){var o=n.axis,a={},s=r.model.coordinateSystem.getRect();return t=t||[0,0],"x"===o.dim?(a.pixel=e[0]-t[0],a.pixelLength=s.width,a.pixelStart=s.x,a.signal=o.inverse?1:-1):(a.pixel=e[1]-t[1],a.pixelLength=s.height,a.pixelStart=s.y,a.signal=o.inverse?-1:1),a},polar:function(t,e,n,i,r){var o=n.axis,a={},s=r.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return t=t?s.pointToCoord(t):[0,0],e=s.pointToCoord(e),"radiusAxis"===n.mainType?(a.pixel=e[0]-t[0],a.pixelLength=l[1]-l[0],a.pixelStart=l[0],a.signal=o.inverse?1:-1):(a.pixel=e[1]-t[1],a.pixelLength=u[1]-u[0],a.pixelStart=u[0],a.signal=o.inverse?-1:1),a},singleAxis:function(t,e,n,i,r){var o=n.axis,a=r.model.coordinateSystem.getRect(),s={};return t=t||[0,0],"horizontal"===o.orient?(s.pixel=e[0]-t[0],s.pixelLength=a.width,s.pixelStart=a.x,s.signal=o.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixelLength=a.height,s.pixelStart=a.y,s.signal=o.inverse?-1:1),s}};function BI(t){oM(t),t.registerComponentModel(wI),t.registerComponentView(OI),PI(t)}var zI=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.type="dataZoom.slider",e.layoutMode="box",e.defaultOption=lh(XS.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),e}(XS),VI=ja,FI="horizontal",HI="vertical",GI=["line","bar","candlestick","scatter"],WI={easing:"cubicOut",duration:100},UI=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._displayables={},n}return n(e,t),e.prototype.init=function(t,e){this.api=e,this._onBrush=B(this._onBrush,this),this._onBrushEnd=B(this._onBrushEnd,this)},e.prototype.render=function(e,n,i,r){if(t.prototype.render.apply(this,arguments),tf(this,"_dispatchZoomAction",e.get("throttle"),"fixRate"),this._orient=e.getOrient(),!1!==e.get("show")){if(e.noTarget())return this._clear(),void this.group.removeAll();r&&"dataZoom"===r.type&&r.from===this.uid||this._buildView(),this._updateView()}else this.group.removeAll()},e.prototype.dispose=function(){this._clear(),t.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){var t,e,n;(n=(t=this)[e="_dispatchZoomAction"])&&n[Kd]&&(t[e]=n[Kd]);var i=this.api.getZr();i.off("mousemove",this._onBrush),i.off("mouseup",this._onBrushEnd)},e.prototype._buildView=function(){var t=this.group;t.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var e=this._displayables.sliderGroup=new ki;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(e),this._positionGroup()},e.prototype._resetLocation=function(){var t=this.dataZoomModel,e=this.api,n=t.get("brushSelect")?7:0,i=this._findCoordRect(),r={width:e.getWidth(),height:e.getHeight()},o=this._orient===FI?{right:r.width-i.x-i.width,top:r.height-30-7-n,width:i.width,height:30}:{right:7,top:i.y,width:30,height:i.height},a=fc(t.option);P(["right","top","width","height"],(function(t){"ph"===a[t]&&(a[t]=o[t])}));var s=hc(a,r);this._location={x:s.x,y:s.y},this._size=[s.width,s.height],this._orient===HI&&this._size.reverse()},e.prototype._positionGroup=function(){var t=this.group,e=this._location,n=this._orient,i=this.dataZoomModel.getFirstTargetAxisModel(),r=i&&i.get("inverse"),o=this._displayables.sliderGroup,a=(this._dataShadowInfo||{}).otherAxisInverse;o.attr(n!==FI||r?n===FI&&r?{scaleY:a?1:-1,scaleX:-1}:n!==HI||r?{scaleY:a?-1:1,scaleX:-1,rotation:Math.PI/2}:{scaleY:a?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:a?1:-1,scaleX:1});var s=t.getBoundingRect([o]);t.x=e.x-s.x,t.y=e.y-s.y,t.markRedraw()},e.prototype._getViewExtent=function(){return[0,this._size[0]]},e.prototype._renderBackground=function(){var t=this.dataZoomModel,e=this._size,n=this._displayables.sliderGroup,i=t.get("brushSelect");n.add(new VI({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")},z2:-40}));var r=new VI({shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:"transparent"},z2:0,onclick:B(this._onClickPanel,this)}),o=this.api.getZr();i?(r.on("mousedown",this._onBrushStart,this),r.cursor="crosshair",o.on("mousemove",this._onBrush),o.on("mouseup",this._onBrushEnd)):(o.off("mousemove",this._onBrush),o.off("mouseup",this._onBrushEnd)),n.add(r)},e.prototype._renderDataShadow=function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],t){var e=this._size,n=t.series,i=n.getRawData(),r=n.getShadowDim?n.getShadowDim():t.otherDim;if(null!=r){var o=i.getDataExtent(r),a=.3*(o[1]-o[0]);o=[o[0]-a,o[1]+a];var s,l=[0,e[1]],u=[0,e[0]],h=[[e[0],0],[0,0]],c=[],p=u[1]/(i.count()-1),d=0,f=Math.round(i.count()/e[0]);i.each([r],(function(t,e){if(f>0&&e%f)d+=p;else{var n=null==t||isNaN(t)||""===t,i=n?0:Vi(t,o,l,!0);n&&!s&&e?(h.push([h[h.length-1][0],0]),c.push([c[c.length-1][0],0])):!n&&s&&(h.push([d,0]),c.push([d,0])),h.push([d,i]),c.push([d,i]),d+=p,s=n}}));for(var g=this.dataZoomModel,y=0;y<3;y++){var v=m(1===y);this._displayables.sliderGroup.add(v),this._displayables.dataShadowSegs.push(v)}}}function m(t){var e=g.getModel(t?"selectedDataBackground":"dataBackground"),n=new ki,i=new Nl({shape:{points:h},segmentIgnoreThreshold:1,style:e.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),r=new Bl({shape:{points:c},segmentIgnoreThreshold:1,style:e.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return n.add(i),n.add(r),n}},e.prototype._prepareDataShadowInfo=function(){var t=this.dataZoomModel,e=t.get("showDataShadow");if(!1!==e){var n,i=this.ecModel;return t.eachTargetAxis((function(r,o){P(t.getAxisProxy(r,o).getTargetSeriesModels(),(function(t){if(!(n||!0!==e&&A(GI,t.get("type"))<0)){var a,s=i.getComponent(GS(r),o).axis,l={x:"y",y:"x",radius:"angle",angle:"radius"}[r],u=t.coordinateSystem;null!=l&&u.getOtherAxis&&(a=u.getOtherAxis(s).inverse),l=t.getData().mapDimension(l),n={thisAxis:s,series:t,thisDim:r,otherDim:l,otherAxisInverse:a}}}),this)}),this),n}},e.prototype._renderHandle=function(){var t=this.group,e=this._displayables,n=e.handles=[null,null],i=e.handleLabels=[null,null],r=this._displayables.sliderGroup,o=this._size,a=this.dataZoomModel,s=this.api,l=a.get("borderRadius")||0,u=a.get("brushSelect"),h=e.filler=new VI({silent:u,style:{fill:a.get("fillerColor")},textConfig:{position:"inside"}});r.add(h),r.add(new VI({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:o[0],height:o[1],r:l},style:{stroke:a.get("dataBackgroundColor")||a.get("borderColor"),lineWidth:1,fill:"rgba(0,0,0,0)"}})),P([0,1],(function(e){var o=a.get("handleIcon");!Lg[o]&&o.indexOf("path://")<0&&(o="path://"+o);var s=Rg(o,-1,0,2,2,null,!0);s.attr({cursor:YI(this._orient),draggable:!0,drift:B(this._onDragMove,this,e),ondragend:B(this._onDragEnd,this),onmouseover:B(this._showDataInfo,this,!0),onmouseout:B(this._showDataInfo,this,!1),z2:5});var l=s.getBoundingRect(),u=a.get("handleSize");this._handleHeight=Fi(u,this._size[1]),this._handleWidth=l.width/l.height*this._handleHeight,s.setStyle(a.getModel("handleStyle").getItemStyle()),s.style.strokeNoScale=!0,s.rectHover=!0,s.ensureState("emphasis").style=a.getModel(["emphasis","handleStyle"]).getItemStyle(),Hs(s);var h=a.get("handleColor");null!=h&&(s.style.fill=h),r.add(n[e]=s);var c=a.getModel("textStyle");t.add(i[e]=new $a({silent:!0,invisible:!0,style:{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:c.getTextColor(),font:c.getFont()},z2:10}))}),this);var c=h;if(u){var p=Fi(a.get("moveHandleSize"),o[1]),d=e.moveHandle=new ja({style:a.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:o[1]-.5,height:p}}),f=.8*p,g=e.moveHandleIcon=Rg(a.get("moveHandleIcon"),-f/2,-f/2,f,f,"#fff",!0);g.silent=!0,g.y=o[1]+p/2-.5,d.ensureState("emphasis").style=a.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var y=Math.min(o[1]/2,Math.max(p,10));(c=e.moveZone=new ja({invisible:!0,shape:{y:o[1]-y,height:p+y}})).on("mouseover",(function(){s.enterEmphasis(d)})).on("mouseout",(function(){s.leaveEmphasis(d)})),r.add(d),r.add(g),r.add(c)}c.attr({draggable:!0,cursor:YI(this._orient),drift:B(this._onDragMove,this,"all"),ondragstart:B(this._showDataInfo,this,!0),ondragend:B(this._onDragEnd,this),onmouseover:B(this._showDataInfo,this,!0),onmouseout:B(this._showDataInfo,this,!1)})},e.prototype._resetInterval=function(){var t=this._range=this.dataZoomModel.getPercentRange(),e=this._getViewExtent();this._handleEnds=[Vi(t[0],[0,100],e,!0),Vi(t[1],[0,100],e,!0)]},e.prototype._updateInterval=function(t,e){var n=this.dataZoomModel,i=this._handleEnds,r=this._getViewExtent(),o=n.findRepresentativeAxisProxy().getMinMaxSpan(),a=[0,100];$S(e,i,r,n.get("zoomLock")?"all":t,null!=o.minSpan?Vi(o.minSpan,a,r,!0):null,null!=o.maxSpan?Vi(o.maxSpan,a,r,!0):null);var s=this._range,l=this._range=Gi([Vi(i[0],r,a,!0),Vi(i[1],r,a,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},e.prototype._updateView=function(t){var e=this._displayables,n=this._handleEnds,i=Gi(n.slice()),r=this._size;P([0,1],(function(t){var i=e.handles[t],o=this._handleHeight;i.attr({scaleX:o/2,scaleY:o/2,x:n[t]+(t?-1:1),y:r[1]/2-o/2})}),this),e.filler.setShape({x:i[0],y:0,width:i[1]-i[0],height:r[1]});var o={x:i[0],width:i[1]-i[0]};e.moveHandle&&(e.moveHandle.setShape(o),e.moveZone.setShape(o),e.moveZone.getBoundingRect(),e.moveHandleIcon&&e.moveHandleIcon.attr("x",o.x+o.width/2));for(var a=e.dataShadowSegs,s=[0,i[0],i[1],r[0]],l=0;le[0]||n[1]<0||n[1]>e[1])){var i=this._handleEnds,r=(i[0]+i[1])/2,o=this._updateInterval("all",n[0]-r);this._updateView(),o&&this._dispatchZoomAction(!1)}},e.prototype._onBrushStart=function(t){var e=t.offsetX,n=t.offsetY;this._brushStart=new mn(e,n),this._brushing=!0,this._brushStartTime=+new Date},e.prototype._onBrushEnd=function(t){if(this._brushing){var e=this._displayables.brushRect;if(this._brushing=!1,e){e.attr("ignore",!0);var n=e.shape;if(!(+new Date-this._brushStartTime<200&&Math.abs(n.width)<5)){var i=this._getViewExtent(),r=[0,100];this._range=Gi([Vi(n.x,i,r,!0),Vi(n.x+n.width,i,r,!0)]),this._handleEnds=[n.x,n.x+n.width],this._updateView(),this._dispatchZoomAction(!1)}}}},e.prototype._onBrush=function(t){this._brushing&&(Kt(t.event),this._updateBrushRect(t.offsetX,t.offsetY))},e.prototype._updateBrushRect=function(t,e){var n=this._displayables,i=this.dataZoomModel,r=n.brushRect;r||(r=n.brushRect=new VI({silent:!0,style:i.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(r)),r.attr("ignore",!1);var o=this._brushStart,a=this._displayables.sliderGroup,s=a.transformCoordToLocal(t,e),l=a.transformCoordToLocal(o.x,o.y),u=this._size;s[0]=Math.max(Math.min(u[0],s[0]),0),r.setShape({x:l[0],y:0,width:s[0]-l[0],height:u[1]})},e.prototype._dispatchZoomAction=function(t){var e=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:t?WI:null,start:e[0],end:e[1]})},e.prototype._findCoordRect=function(){var t,e=US(this.dataZoomModel).infoList;if(!t&&e.length){var n=e[0].model.coordinateSystem;t=n.getRect&&n.getRect()}if(!t){var i=this.api.getWidth(),r=this.api.getHeight();t={x:.2*i,y:.2*r,width:.6*i,height:.6*r}}return t},e.type="dataZoom.slider",e}(qS);function YI(t){return"vertical"===t?"ns-resize":"ew-resize"}function XI(t){t.registerComponentModel(zI),t.registerComponentView(UI),oM(t)}var ZI={label:{enabled:!0},decal:{show:!1}},jI=xr(),qI={};function KI(t,e){var n=t.getModel("aria");if(n.get("enabled")){var i=w(ZI);S(i.label,t.getLocaleModel().get("aria"),!1),S(n.option,i,!1),function(){if(n.getModel("decal").get("show")){var e=ut();t.eachSeries((function(t){if(t.useColorPaletteOnData){var n=e.get(t.type);n||(n={},e.set(t.type,n)),jI(t).scope=n}})),t.eachRawSeries((function(e){if(!t.isSeriesFiltered(e))if("function"!=typeof e.enableAriaDecal){var n=e.getData();if(e.useColorPaletteOnData){var i=e.getRawData(),r={},o=jI(e).scope;n.each((function(t){var e=n.getRawIndex(t);r[e]=t}));var a=i.count();i.each((function(t){var s=r[t],l=i.getName(t)||t+"",h=Xc(e.ecModel,l,o,a),c=n.getItemVisual(s,"decal");n.setItemVisual(s,"decal",u(c,h))}))}else{var s=Xc(e.ecModel,e.name,qI,t.getSeriesCount()),l=n.getVisual("decal");n.setVisual("decal",u(l,s))}}else e.enableAriaDecal();function u(t,e){var n=t?T(T({},e),t):e;return n.dirty=!0,n}}))}}(),function(){var i=t.getLocaleModel().get("aria"),o=n.getModel("label");if(o.option=C(o.option,i),!o.get("enabled"))return;var a=e.getZr().dom;if(o.get("description"))return void a.setAttribute("aria-label",o.get("description"));var s,l=t.getSeriesCount(),u=o.get(["data","maxCount"])||10,h=o.get(["series","maxCount"])||10,c=Math.min(l,h);if(l<1)return;var p=function(){var e=t.get("title");e&&e.length&&(e=e[0]);return e&&e.text}();if(p){var d=o.get(["general","withTitle"]);s=r(d,{title:p})}else s=o.get(["general","withoutTitle"]);var f=[],g=l>1?o.get(["series","multiple","prefix"]):o.get(["series","single","prefix"]);s+=r(g,{seriesCount:l}),t.eachSeries((function(e,n){if(n1?o.get(["series","multiple",a]):o.get(["series","single",a]),{seriesId:e.seriesIndex,seriesName:e.get("name"),seriesType:(_=e.subType,t.getLocaleModel().get(["series","typeNames"])[_]||"自定义图")});var s=e.getData();if(s.count()>u)i+=r(o.get(["data","partialData"]),{displayCnt:u});else i+=o.get(["data","allData"]);for(var h=[],p=0;p0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},t.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},t.prototype.wakeUp=function(){this.animation.start(),this._stillFrameAccum=0},t.prototype.refreshHover=function(){this._needsRefreshHover=!0},t.prototype.refreshHoverImmediately=function(){this._needsRefreshHover=!1,this.painter.refreshHover&&"canvas"===this.painter.getType()&&this.painter.refreshHover()},t.prototype.resize=function(t){t=t||{},this.painter.resize(t.width,t.height),this.handler.resize()},t.prototype.clearAnimation=function(){this.animation.clear()},t.prototype.getWidth=function(){return this.painter.getWidth()},t.prototype.getHeight=function(){return this.painter.getHeight()},t.prototype.setCursorStyle=function(t){this.handler.setCursorStyle(t)},t.prototype.findHover=function(t,e){return this.handler.findHover(t,e)},t.prototype.on=function(t,e,n){return this.handler.on(t,e,n),this},t.prototype.off=function(t,e){this.handler.off(t,e)},t.prototype.trigger=function(t,e){this.handler.trigger(t,e)},t.prototype.clear=function(){for(var t=this.storage.getRoots(),e=0;e0){if(t<=r)return a;if(t>=o)return s}else{if(t>=r)return a;if(t<=o)return s}else{if(t===r)return a;if(t===o)return s}return(t-r)/l*u+a}function Br(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%"}return Z(t)?(n=t,n.replace(/^\s+|\s+$/g,"")).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t;var n}function Vr(t,e,n){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),n?t:+t}function Fr(t){return t.sort((function(t,e){return t-e})),t}function Hr(t){if(t=+t,isNaN(t))return 0;if(t>1e-14)for(var e=1,n=0;n<15;n++,e*=10)if(Math.round(t*e)/e===t)return n;return Wr(t)}function Wr(t){var e=t.toString().toLowerCase(),n=e.indexOf("e"),i=n>0?+e.slice(n+1):0,r=n>0?n:e.length,o=e.indexOf("."),a=o<0?0:r-1-o;return Math.max(0,a-i)}function Gr(t,e){var n=Math.log,i=Math.LN10,r=Math.floor(n(t[1]-t[0])/i),o=Math.round(n(Math.abs(e[1]-e[0]))/i),a=Math.min(Math.max(-r+o,0),20);return isFinite(a)?a:20}function Ur(t,e){var n=B(t,(function(t,e){return t+(isNaN(e)?0:e)}),0);if(0===n)return[];for(var i=Math.pow(10,e),r=E(t,(function(t){return(isNaN(t)?0:t)/n*i*100})),o=100*i,a=E(r,(function(t){return Math.floor(t)})),s=B(a,(function(t,e){return t+e}),0),l=E(r,(function(t,e){return t-a[e]}));su&&(u=l[c],h=c);++a[h],l[h]=0,++s}return E(a,(function(t){return t/i}))}function Zr(t,e){var n=Math.max(Hr(t),Hr(e)),i=t+e;return n>20?i:Vr(i,n)}function Yr(t){var e=2*Math.PI;return(t%e+e)%e}function Xr(t){return t>-1e-4&&t=10&&e++,e}function Qr(t,e){var n=$r(t),i=Math.pow(10,n),r=t/i;return t=(e?r<1.5?1:r<2.5?2:r<4?3:r<7?5:10:r<1?1:r<2?2:r<3?3:r<5?5:10)*i,n>=-20?+t.toFixed(n<0?-n:0):t}function Jr(t){var e=parseFloat(t);return e==t&&(0!==e||!Z(t)||t.indexOf("x")<=0)?e:NaN}function to(t){return!isNaN(Jr(t))}function eo(){return Math.round(9*Math.random())}function no(t,e){return 0===e?t:no(e,t%e)}function io(t,e){return null==t?e:null==e?t:t*e/no(t,e)}"undefined"!=typeof console&&console.warn&&console.log;function ro(t){0}function oo(t){throw new Error(t)}function ao(t,e,n){return(e-t)*n+t}var so="series\0",lo="\0_ec_\0";function uo(t){return t instanceof Array?t:null==t?[]:[t]}function ho(t,e,n){if(t){t[e]=t[e]||{},t.emphasis=t.emphasis||{},t.emphasis[e]=t.emphasis[e]||{};for(var i=0,r=n.length;i=0||r&&L(r,s)<0)){var l=n.getShallow(s,e);null!=l&&(o[t[a][0]]=l)}}return o}}var Fo=Vo([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),Ho=function(){function t(){}return t.prototype.getAreaStyle=function(t,e){return Fo(this,t,e)},t}(),Wo=new kn(50);function Go(t){if("string"==typeof t){var e=Wo.get(t);return e&&e.image}return t}function Uo(t,e,n,i,r){if(t){if("string"==typeof t){if(e&&e.__zrImageSrc===t||!n)return e;var o=Wo.get(t),a={hostEl:n,cb:i,cbPayload:r};return o?!Yo(e=o.image)&&o.pending.push(a):((e=h.loadImage(t,Zo,Zo)).__zrImageSrc=t,Wo.put(t,e.__cachedImgObj={image:e,pending:[a]})),e}return t}return e}function Zo(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e=a;l++)s-=a;var u=cr(n,e);return u>s&&(n="",u=0),s=t-u,r.ellipsis=n,r.ellipsisWidth=u,r.contentWidth=s,r.containerWidth=t,r}function Ko(t,e){var n=e.containerWidth,i=e.font,r=e.contentWidth;if(!n)return"";var o=cr(t,i);if(o<=n)return t;for(var a=0;;a++){if(o<=r||a>=e.maxIterations){t+=e.ellipsis;break}var s=0===a?$o(t,r,e.ascCharWidth,e.cnCharWidth):o>0?Math.floor(t.length*r/o):0;o=cr(t=t.substr(0,s),i)}return""===t&&(t=e.placeholder),t}function $o(t,e,n,i){for(var r=0,o=0,a=t.length;o0&&f+i.accumWidth>i.width&&(o=e.split("\n"),c=!0),i.accumWidth=f}else{var g=ra(e,h,i.width,i.breakAll,i.accumWidth);i.accumWidth=g.accumWidth+d,a=g.linesWidths,o=g.lines}}else o=e.split("\n");for(var v=0;v=32&&e<=591||e>=880&&e<=4351||e>=4608&&e<=5119||e>=7680&&e<=8303}(t)||!!na[t]}function ra(t,e,n,i,r){for(var o=[],a=[],s="",l="",u=0,h=0,c=0;cn:r+h+d>n)?h?(s||l)&&(f?(s||(s=l,l="",h=u=0),o.push(s),a.push(h-u),l+=p,s="",h=u+=d):(l&&(s+=l,l="",u=0),o.push(s),a.push(h),s=p,h=d)):f?(o.push(l),a.push(u),l=p,u=d):(o.push(p),a.push(d)):(h+=d,f?(l+=p,u+=d):(l&&(s+=l,l="",u=0),s+=p))}else l&&(s+=l,h+=u),o.push(s),a.push(h),s="",l="",u=0,h=0}return o.length||s||(s=t,l="",u=0),l&&(s+=l),s&&(o.push(s),a.push(h)),1===o.length&&(h+=r),{accumWidth:h,lines:o,linesWidths:a}}var oa="__zr_style_"+Math.round(10*Math.random()),aa={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},sa={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};aa[oa]=!0;var la=["z","z2","invisible"],ua=["invisible"],ha=function(t){function e(e){return t.call(this,e)||this}var i;return n(e,t),e.prototype._init=function(e){for(var n=F(e),i=0;i1e-4)return s[0]=t-n,s[1]=e-i,l[0]=t+n,void(l[1]=e+i);if(ma[0]=va(r)*n+t,ma[1]=ga(r)*i+e,_a[0]=va(o)*n+t,_a[1]=ga(o)*i+e,u(s,ma,_a),h(l,ma,_a),(r%=ya)<0&&(r+=ya),(o%=ya)<0&&(o+=ya),r>o&&!a?o+=ya:rr&&(xa[0]=va(d)*n+t,xa[1]=ga(d)*i+e,u(s,xa,s),h(l,xa,l))}var Ta={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Da=[],ka=[],Aa=[],Pa=[],La=[],Oa=[],Ra=Math.min,Na=Math.max,za=Math.cos,Ea=Math.sin,Ba=Math.abs,Va=Math.PI,Fa=2*Va,Ha="undefined"!=typeof Float32Array,Wa=[];function Ga(t){return Math.round(t/Va*1e8)/1e8%2*Va}var Ua=function(){function t(t){this.dpr=1,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._len=0,t&&(this._saveData=!1),this._saveData&&(this.data=[])}return t.prototype.increaseVersion=function(){this._version++},t.prototype.getVersion=function(){return this._version},t.prototype.setScale=function(t,e,n){(n=n||0)>0&&(this._ux=Ba(n/$i/t)||0,this._uy=Ba(n/$i/e)||0)},t.prototype.setDPR=function(t){this.dpr=t},t.prototype.setContext=function(t){this._ctx=t},t.prototype.getContext=function(){return this._ctx},t.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},t.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},t.prototype.moveTo=function(t,e){return this._drawPendingPt(),this.addData(Ta.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},t.prototype.lineTo=function(t,e){var n=Ba(t-this._xi),i=Ba(e-this._yi),r=n>this._ux||i>this._uy;if(this.addData(Ta.L,t,e),this._ctx&&r&&this._ctx.lineTo(t,e),r)this._xi=t,this._yi=e,this._pendingPtDist=0;else{var o=n*n+i*i;o>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=e,this._pendingPtDist=o)}return this},t.prototype.bezierCurveTo=function(t,e,n,i,r,o){return this._drawPendingPt(),this.addData(Ta.C,t,e,n,i,r,o),this._ctx&&this._ctx.bezierCurveTo(t,e,n,i,r,o),this._xi=r,this._yi=o,this},t.prototype.quadraticCurveTo=function(t,e,n,i){return this._drawPendingPt(),this.addData(Ta.Q,t,e,n,i),this._ctx&&this._ctx.quadraticCurveTo(t,e,n,i),this._xi=n,this._yi=i,this},t.prototype.arc=function(t,e,n,i,r,o){this._drawPendingPt(),Wa[0]=i,Wa[1]=r,function(t,e){var n=Ga(t[0]);n<0&&(n+=Fa);var i=n-t[0],r=t[1];r+=i,!e&&r-n>=Fa?r=n+Fa:e&&n-r>=Fa?r=n-Fa:!e&&n>r?r=n+(Fa-Ga(n-r)):e&&nu.length&&(this._expandData(),u=this.data);for(var h=0;h0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},t.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var t=[],e=0;e11&&(this.data=new Float32Array(t)))}},t.prototype.getBoundingRect=function(){Aa[0]=Aa[1]=La[0]=La[1]=Number.MAX_VALUE,Pa[0]=Pa[1]=Oa[0]=Oa[1]=-Number.MAX_VALUE;var t,e=this.data,n=0,i=0,r=0,o=0;for(t=0;tn||Ba(v)>i||c===e-1)&&(f=Math.sqrt(k*k+v*v),r=g,o=_);break;case Ta.C:var y=t[c++],m=t[c++],_=(g=t[c++],t[c++]),x=t[c++],w=t[c++];f=mn(r,o,y,m,g,_,x,w,10),r=x,o=w;break;case Ta.Q:f=Sn(r,o,y=t[c++],m=t[c++],g=t[c++],_=t[c++],10),r=g,o=_;break;case Ta.A:var b=t[c++],S=t[c++],M=t[c++],C=t[c++],I=t[c++],T=t[c++],D=T+I;c+=1;t[c++];d&&(a=za(I)*M+b,s=Ea(I)*C+S),f=Na(M,C)*Ra(Fa,Math.abs(T)),r=za(D)*M+b,o=Ea(D)*C+S;break;case Ta.R:a=r=t[c++],s=o=t[c++],f=2*t[c++]+2*t[c++];break;case Ta.Z:var k=a-r;v=s-o;f=Math.sqrt(k*k+v*v),r=a,o=s}f>=0&&(l[h++]=f,u+=f)}return this._pathLen=u,u},t.prototype.rebuildPath=function(t,e){var n,i,r,o,a,s,l,u,h,c,p=this.data,d=this._ux,f=this._uy,g=this._len,v=e<1,y=0,m=0,_=0;if(!v||(this._pathSegLen||this._calculateLength(),l=this._pathSegLen,u=e*this._pathLen))t:for(var x=0;x0&&(t.lineTo(h,c),_=0),w){case Ta.M:n=r=p[x++],i=o=p[x++],t.moveTo(r,o);break;case Ta.L:a=p[x++],s=p[x++];var S=Ba(a-r),M=Ba(s-o);if(S>d||M>f){if(v){if(y+(j=l[m++])>u){var C=(u-y)/j;t.lineTo(r*(1-C)+a*C,o*(1-C)+s*C);break t}y+=j}t.lineTo(a,s),r=a,o=s,_=0}else{var I=S*S+M*M;I>_&&(h=a,c=s,_=I)}break;case Ta.C:var T=p[x++],D=p[x++],k=p[x++],A=p[x++],P=p[x++],L=p[x++];if(v){if(y+(j=l[m++])>u){yn(r,T,k,P,C=(u-y)/j,Da),yn(o,D,A,L,C,ka),t.bezierCurveTo(Da[1],ka[1],Da[2],ka[2],Da[3],ka[3]);break t}y+=j}t.bezierCurveTo(T,D,k,A,P,L),r=P,o=L;break;case Ta.Q:T=p[x++],D=p[x++],k=p[x++],A=p[x++];if(v){if(y+(j=l[m++])>u){bn(r,T,k,C=(u-y)/j,Da),bn(o,D,A,C,ka),t.quadraticCurveTo(Da[1],ka[1],Da[2],ka[2]);break t}y+=j}t.quadraticCurveTo(T,D,k,A),r=k,o=A;break;case Ta.A:var O=p[x++],R=p[x++],N=p[x++],z=p[x++],E=p[x++],B=p[x++],V=p[x++],F=!p[x++],H=N>z?N:z,W=Ba(N-z)>.001,G=E+B,U=!1;if(v)y+(j=l[m++])>u&&(G=E+B*(u-y)/j,U=!0),y+=j;if(W&&t.ellipse?t.ellipse(O,R,N,z,V,E,G,F):t.arc(O,R,H,E,G,F),U)break t;b&&(n=za(E)*N+O,i=Ea(E)*z+R),r=za(G)*N+O,o=Ea(G)*z+R;break;case Ta.R:n=r=p[x],i=o=p[x+1],a=p[x++],s=p[x++];var Z=p[x++],Y=p[x++];if(v){if(y+(j=l[m++])>u){var X=u-y;t.moveTo(a,s),t.lineTo(a+Ra(X,Z),s),(X-=Z)>0&&t.lineTo(a+Z,s+Ra(X,Y)),(X-=Y)>0&&t.lineTo(a+Na(Z-X,0),s+Y),(X-=Z)>0&&t.lineTo(a,s+Na(Y-X,0));break t}y+=j}t.rect(a,s,Z,Y);break;case Ta.Z:if(v){var j;if(y+(j=l[m++])>u){C=(u-y)/j;t.lineTo(r*(1-C)+n*C,o*(1-C)+i*C);break t}y+=j}t.closePath(),r=n,o=i}}},t.prototype.clone=function(){var e=new t,n=this.data;return e.data=n.slice?n.slice():Array.prototype.slice.call(n),e._len=this._len,e},t.CMD=Ta,t.initDefaultProps=function(){var e=t.prototype;e._saveData=!0,e._ux=0,e._uy=0,e._pendingPtDist=0,e._version=0}(),t}();function Za(t,e,n,i,r,o,a){if(0===r)return!1;var s=r,l=0;if(a>e+s&&a>i+s||at+s&&o>n+s||oe+c&&h>i+c&&h>o+c&&h>s+c||ht+c&&u>n+c&&u>r+c&&u>a+c||u=0&&fe+u&&l>i+u&&l>o+u||lt+u&&s>n+u&&s>r+u||s=0&&vn||h+ur&&(r+=Ka);var p=Math.atan2(l,s);return p<0&&(p+=Ka),p>=i&&p<=r||p+Ka>=i&&p+Ka<=r}function Qa(t,e,n,i,r,o){if(o>e&&o>i||or?s:0}var Ja=Ua.CMD,ts=2*Math.PI;var es=[-1,-1,-1],ns=[-1,-1];function is(t,e,n,i,r,o,a,s,l,u){if(u>e&&u>i&&u>o&&u>s||u1&&(h=void 0,h=ns[0],ns[0]=ns[1],ns[1]=h),f=dn(e,i,o,s,ns[0]),d>1&&(g=dn(e,i,o,s,ns[1]))),2===d?ye&&s>i&&s>o||s=0&&h<=1&&(r[l++]=h);else{var u=a*a-4*o*s;if(cn(u))(h=-a/(2*o))>=0&&h<=1&&(r[l++]=h);else if(u>0){var h,c=nn(u),p=(-a-c)/(2*o);(h=(-a+c)/(2*o))>=0&&h<=1&&(r[l++]=h),p>=0&&p<=1&&(r[l++]=p)}}return l}(e,i,o,s,es);if(0===l)return 0;var u=wn(e,i,o);if(u>=0&&u<=1){for(var h=0,c=_n(e,i,o,u),p=0;pn||s<-n)return 0;var l=Math.sqrt(n*n-s*s);es[0]=-l,es[1]=l;var u=Math.abs(i-r);if(u<1e-4)return 0;if(u>=ts-1e-4){i=0,r=ts;var h=o?1:-1;return a>=es[0]+t&&a<=es[1]+t?h:0}if(i>r){var c=i;i=r,r=c}i<0&&(i+=ts,r+=ts);for(var p=0,d=0;d<2;d++){var f=es[d];if(f+t>a){var g=Math.atan2(s,f);h=o?1:-1;g<0&&(g=ts+g),(g>=i&&g<=r||g+ts>=i&&g+ts<=r)&&(g>Math.PI/2&&g<1.5*Math.PI&&(h=-h),p+=h)}}return p}function as(t,e,n,i,r){for(var o,a,s,l,u=t.data,h=t.len(),c=0,p=0,d=0,f=0,g=0,v=0;v1&&(n||(c+=Qa(p,d,f,g,i,r))),m&&(f=p=u[v],g=d=u[v+1]),y){case Ja.M:p=f=u[v++],d=g=u[v++];break;case Ja.L:if(n){if(Za(p,d,u[v],u[v+1],e,i,r))return!0}else c+=Qa(p,d,u[v],u[v+1],i,r)||0;p=u[v++],d=u[v++];break;case Ja.C:if(n){if(Ya(p,d,u[v++],u[v++],u[v++],u[v++],u[v],u[v+1],e,i,r))return!0}else c+=is(p,d,u[v++],u[v++],u[v++],u[v++],u[v],u[v+1],i,r)||0;p=u[v++],d=u[v++];break;case Ja.Q:if(n){if(Xa(p,d,u[v++],u[v++],u[v],u[v+1],e,i,r))return!0}else c+=rs(p,d,u[v++],u[v++],u[v],u[v+1],i,r)||0;p=u[v++],d=u[v++];break;case Ja.A:var _=u[v++],x=u[v++],w=u[v++],b=u[v++],S=u[v++],M=u[v++];v+=1;var C=!!(1-u[v++]);o=Math.cos(S)*w+_,a=Math.sin(S)*b+x,m?(f=o,g=a):c+=Qa(p,d,o,a,i,r);var I=(i-_)*b/w+_;if(n){if($a(_,x,b,S,S+M,C,e,I,r))return!0}else c+=os(_,x,b,S,S+M,C,I,r);p=Math.cos(S+M)*w+_,d=Math.sin(S+M)*b+x;break;case Ja.R:if(f=p=u[v++],g=d=u[v++],o=f+u[v++],a=g+u[v++],n){if(Za(f,g,o,g,e,i,r)||Za(o,g,o,a,e,i,r)||Za(o,a,f,a,e,i,r)||Za(f,a,f,g,e,i,r))return!0}else c+=Qa(o,g,o,a,i,r),c+=Qa(f,a,f,g,i,r);break;case Ja.Z:if(n){if(Za(p,d,f,g,e,i,r))return!0}else c+=Qa(p,d,f,g,i,r);p=f,d=g}}return n||(s=d,l=g,Math.abs(s-l)<1e-4)||(c+=Qa(p,d,f,g,i,r)||0),0!==c}var ss=A({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},aa),ls={style:A({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},sa.style)},us=lr.concat(["invisible","culling","z","z2","zlevel","parent"]),hs=function(t){function e(e){return t.call(this,e)||this}var i;return n(e,t),e.prototype.update=function(){var n=this;t.prototype.update.call(this);var i=this.style;if(i.decal){var r=this._decalEl=this._decalEl||new e;r.buildPath===e.prototype.buildPath&&(r.buildPath=function(t){n.buildPath(t,n.shape)}),r.silent=!0;var o=r.style;for(var a in i)o[a]!==i[a]&&(o[a]=i[a]);o.fill=i.fill?i.decal:null,o.decal=null,o.shadowColor=null,i.strokeFirst&&(o.stroke=null);for(var s=0;s.5?Qi:e>.2?"#eee":Ji}if(t)return Ji}return Qi},e.prototype.getInsideTextStroke=function(t){var e=this.style.fill;if(Z(e)){var n=this.__zr;if(!(!n||!n.isDarkMode())===$n(t,0)<.4)return e}},e.prototype.buildPath=function(t,e,n){},e.prototype.pathUpdated=function(){this.__dirty&=-5},e.prototype.getUpdatedPathProxy=function(t){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,t),this.path},e.prototype.createPathProxy=function(){this.path=new Ua(!1)},e.prototype.hasStroke=function(){var t=this.style,e=t.stroke;return!(null==e||"none"===e||!(t.lineWidth>0))},e.prototype.hasFill=function(){var t=this.style.fill;return null!=t&&"none"!==t},e.prototype.getBoundingRect=function(){var t=this._rect,e=this.style,n=!t;if(n){var i=!1;this.path||(i=!0,this.createPathProxy());var r=this.path;(i||4&this.__dirty)&&(r.beginPath(),this.buildPath(r,this.shape,!1),this.pathUpdated()),t=r.getBoundingRect()}if(this._rect=t,this.hasStroke()&&this.path&&this.path.len()>0){var o=this._rectStroke||(this._rectStroke=t.clone());if(this.__dirty||n){o.copy(t);var a=e.strokeNoScale?this.getLineScale():1,s=e.lineWidth;if(!this.hasFill()){var l=this.strokeContainThreshold;s=Math.max(s,null==l?4:l)}a>1e-10&&(o.width+=s/a,o.height+=s/a,o.x-=s/a/2,o.y-=s/a/2)}return o}return t},e.prototype.contain=function(t,e){var n=this.transformCoordToLocal(t,e),i=this.getBoundingRect(),r=this.style;if(t=n[0],e=n[1],i.contain(t,e)){var o=this.path;if(this.hasStroke()){var a=r.lineWidth,s=r.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(this.hasFill()||(a=Math.max(a,this.strokeContainThreshold)),function(t,e,n,i){return as(t,e,!0,n,i)}(o,a/s,t,e)))return!0}if(this.hasFill())return function(t,e,n){return as(t,0,!1,e,n)}(o,t,e)}return!1},e.prototype.dirtyShape=function(){this.__dirty|=4,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},e.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},e.prototype.animateShape=function(t){return this.animate("shape",t)},e.prototype.updateDuringAnimation=function(t){"style"===t?this.dirtyStyle():"shape"===t?this.dirtyShape():this.markRedraw()},e.prototype.attrKV=function(e,n){"shape"===e?this.setShape(n):t.prototype.attrKV.call(this,e,n)},e.prototype.setShape=function(t,e){var n=this.shape;return n||(n=this.shape={}),"string"==typeof t?n[t]=e:k(n,t),this.dirtyShape(),this},e.prototype.shapeChanged=function(){return!!(4&this.__dirty)},e.prototype.createStyle=function(t){return yt(ss,t)},e.prototype._innerSaveToNormal=function(e){t.prototype._innerSaveToNormal.call(this,e);var n=this._normalState;e.shape&&!n.shape&&(n.shape=k({},this.shape))},e.prototype._applyStateObj=function(e,n,i,r,o,a){t.prototype._applyStateObj.call(this,e,n,i,r,o,a);var s,l=!(n&&r);if(n&&n.shape?o?r?s=n.shape:(s=k({},i.shape),k(s,n.shape)):(s=k({},r?this.shape:i.shape),k(s,n.shape)):l&&(s=i.shape),s)if(o){this.shape=k({},this.shape);for(var u={},h=F(s),c=0;c0},e.prototype.hasFill=function(){var t=this.style.fill;return null!=t&&"none"!==t},e.prototype.createStyle=function(t){return yt(cs,t)},e.prototype.setBoundingRect=function(t){this._rect=t},e.prototype.getBoundingRect=function(){var t=this.style;if(!this._rect){var e=t.text;null!=e?e+="":e="";var n=dr(e,t.font,t.textAlign,t.textBaseline);if(n.x+=t.x||0,n.y+=t.y||0,this.hasStroke()){var i=t.lineWidth;n.x-=i/2,n.y-=i/2,n.width+=i,n.height+=i}this._rect=n}return this._rect},e.initDefaultProps=void(e.prototype.dirtyRectTolerance=10),e}(ha);ps.prototype.type="tspan";var ds=A({x:0,y:0},aa),fs={style:A({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},sa.style)};var gs=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.createStyle=function(t){return yt(ds,t)},e.prototype._getSize=function(t){var e=this.style,n=e[t];if(null!=n)return n;var i,r=(i=e.image)&&"string"!=typeof i&&i.width&&i.height?e.image:this.__image;if(!r)return 0;var o="width"===t?"height":"width",a=e[o];return null==a?r[t]:r[t]/r[o]*a},e.prototype.getWidth=function(){return this._getSize("width")},e.prototype.getHeight=function(){return this._getSize("height")},e.prototype.getAnimationStyleProps=function(){return fs},e.prototype.getBoundingRect=function(){var t=this.style;return this._rect||(this._rect=new Le(t.x||0,t.y||0,this.getWidth(),this.getHeight())),this._rect},e}(ha);gs.prototype.type="image";var vs=Math.round;function ys(t,e,n){if(e){var i=e.x1,r=e.x2,o=e.y1,a=e.y2;t.x1=i,t.x2=r,t.y1=o,t.y2=a;var s=n&&n.lineWidth;return s?(vs(2*i)===vs(2*r)&&(t.x1=t.x2=_s(i,s,!0)),vs(2*o)===vs(2*a)&&(t.y1=t.y2=_s(o,s,!0)),t):t}}function ms(t,e,n){if(e){var i=e.x,r=e.y,o=e.width,a=e.height;t.x=i,t.y=r,t.width=o,t.height=a;var s=n&&n.lineWidth;return s?(t.x=_s(i,s,!0),t.y=_s(r,s,!0),t.width=Math.max(_s(i+o,s,!1)-t.x,0===o?0:1),t.height=Math.max(_s(r+a,s,!1)-t.y,0===a?0:1),t):t}}function _s(t,e,n){if(!e)return t;var i=vs(2*t);return(i+vs(e))%2==0?i/2:(i+(n?1:-1))/2}var xs=function(){this.x=0,this.y=0,this.width=0,this.height=0},ws={},bs=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getDefaultShape=function(){return new xs},e.prototype.buildPath=function(t,e){var n,i,r,o;if(this.subPixelOptimize){var a=ms(ws,e,this.style);n=a.x,i=a.y,r=a.width,o=a.height,a.r=e.r,e=a}else n=e.x,i=e.y,r=e.width,o=e.height;e.r?function(t,e){var n,i,r,o,a,s=e.x,l=e.y,u=e.width,h=e.height,c=e.r;u<0&&(s+=u,u=-u),h<0&&(l+=h,h=-h),"number"==typeof c?n=i=r=o=c:c instanceof Array?1===c.length?n=i=r=o=c[0]:2===c.length?(n=r=c[0],i=o=c[1]):3===c.length?(n=c[0],i=o=c[1],r=c[2]):(n=c[0],i=c[1],r=c[2],o=c[3]):n=i=r=o=0,n+i>u&&(n*=u/(a=n+i),i*=u/a),r+o>u&&(r*=u/(a=r+o),o*=u/a),i+r>h&&(i*=h/(a=i+r),r*=h/a),n+o>h&&(n*=h/(a=n+o),o*=h/a),t.moveTo(s+n,l),t.lineTo(s+u-i,l),0!==i&&t.arc(s+u-i,l+i,i,-Math.PI/2,0),t.lineTo(s+u,l+h-r),0!==r&&t.arc(s+u-r,l+h-r,r,0,Math.PI/2),t.lineTo(s+o,l+h),0!==o&&t.arc(s+o,l+h-o,o,Math.PI/2,Math.PI),t.lineTo(s,l+n),0!==n&&t.arc(s+n,l+n,n,Math.PI,1.5*Math.PI)}(t,e):t.rect(n,i,r,o)},e.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},e}(hs);bs.prototype.type="rect";var Ss={fill:"#000"},Ms={style:A({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},sa.style)},Cs=function(t){function e(e){var n=t.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=Ss,n.attr(e),n}return n(e,t),e.prototype.childrenRef=function(){return this._children},e.prototype.update=function(){t.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var e=0;ed&&h){var f=Math.floor(d/l);n=n.slice(0,f)}if(t&&a&&null!=c)for(var g=qo(c,o,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),v=0;v0,I=null!=t.width&&("truncate"===t.overflow||"break"===t.overflow||"breakAll"===t.overflow),T=i.calculatedLineHeight,D=0;Dl&&ea(n,t.substring(l,u),e,s),ea(n,i[2],e,s,i[1]),l=Xo.lastIndex}lo){w>0?(m.tokens=m.tokens.slice(0,w),v(m,x,_),n.lines=n.lines.slice(0,y+1)):n.lines=n.lines.slice(0,y);break t}var T=b.width,D=null==T||"auto"===T;if("string"==typeof T&&"%"===T.charAt(T.length-1))L.percentWidth=T,h.push(L),L.contentWidth=cr(L.text,C);else{if(D){var k=b.backgroundColor,A=k&&k.image;A&&Yo(A=Go(A))&&(L.width=Math.max(L.width,A.width*I/A.height))}var P=f&&null!=r?r-x:null;null!=P&&P=0&&"right"===(T=_[I]).align;)this._placeToken(T,t,w,f,C,"right",v),b-=T.width,C-=T.width,I--;for(M+=(n-(M-d)-(g-C)-b)/2;S<=I;)T=_[S],this._placeToken(T,t,w,f,M+T.width/2,"center",v),M+=T.width,S++;f+=w}},e.prototype._placeToken=function(t,e,n,i,r,o,s){var l=e.rich[t.styleName]||{};l.text=t.text;var u=t.verticalAlign,h=i+n/2;"top"===u?h=i+t.height/2:"bottom"===u&&(h=i+n-t.height/2),!t.isLineHolder&&Es(l)&&this._renderBackground(l,e,"right"===o?r-t.width:"center"===o?r-t.width/2:r,h-t.height/2,t.width,t.height);var c=!!l.backgroundColor,p=t.textPadding;p&&(r=Ns(r,o,p),h-=t.height/2-p[0]-t.innerHeight/2);var d=this._getOrCreateChild(ps),f=d.createStyle();d.useStyle(f);var g=this._defaultStyle,v=!1,y=0,m=Rs("fill"in l?l.fill:"fill"in e?e.fill:(v=!0,g.fill)),_=Os("stroke"in l?l.stroke:"stroke"in e?e.stroke:c||s||g.autoStroke&&!v?null:(y=2,g.stroke)),x=l.textShadowBlur>0||e.textShadowBlur>0;f.text=t.text,f.x=r,f.y=h,x&&(f.shadowBlur=l.textShadowBlur||e.textShadowBlur||0,f.shadowColor=l.textShadowColor||e.textShadowColor||"transparent",f.shadowOffsetX=l.textShadowOffsetX||e.textShadowOffsetX||0,f.shadowOffsetY=l.textShadowOffsetY||e.textShadowOffsetY||0),f.textAlign=o,f.textBaseline="middle",f.font=t.font||a,f.opacity=rt(l.opacity,e.opacity,1),As(f,l),_&&(f.lineWidth=rt(l.lineWidth,e.lineWidth,y),f.lineDash=it(l.lineDash,e.lineDash),f.lineDashOffset=e.lineDashOffset||0,f.stroke=_),m&&(f.fill=m);var w=t.contentWidth,b=t.contentHeight;d.setBoundingRect(new Le(fr(f.x,w,f.textAlign),gr(f.y,b,f.textBaseline),w,b))},e.prototype._renderBackground=function(t,e,n,i,r,o){var a,s,l,u=t.backgroundColor,h=t.borderWidth,c=t.borderColor,p=u&&u.image,d=u&&!p,f=t.borderRadius,g=this;if(d||t.lineHeight||h&&c){(a=this._getOrCreateChild(bs)).useStyle(a.createStyle()),a.style.fill=null;var v=a.shape;v.x=n,v.y=i,v.width=r,v.height=o,v.r=f,a.dirtyShape()}if(d)(l=a.style).fill=u||null,l.fillOpacity=it(t.fillOpacity,1);else if(p){(s=this._getOrCreateChild(gs)).onload=function(){g.dirtyStyle()};var y=s.style;y.image=u.image,y.x=n,y.y=i,y.width=r,y.height=o}h&&c&&((l=a.style).lineWidth=h,l.stroke=c,l.strokeOpacity=it(t.strokeOpacity,1),l.lineDash=t.borderDash,l.lineDashOffset=t.borderDashOffset||0,a.strokeContainThreshold=0,a.hasFill()&&a.hasStroke()&&(l.strokeFirst=!0,l.lineWidth*=2));var m=(a||s).style;m.shadowBlur=t.shadowBlur||0,m.shadowColor=t.shadowColor||"transparent",m.shadowOffsetX=t.shadowOffsetX||0,m.shadowOffsetY=t.shadowOffsetY||0,m.opacity=rt(t.opacity,e.opacity,1)},e.makeFont=function(t){var e="";return Ps(t)&&(e=[t.fontStyle,t.fontWeight,ks(t.fontSize),t.fontFamily||"sans-serif"].join(" ")),e&<(e)||t.textFont||t.font},e}(ha),Is={left:!0,right:1,center:1},Ts={top:1,bottom:1,middle:1},Ds=["fontStyle","fontWeight","fontSize","fontFamily"];function ks(t){return"string"!=typeof t||-1===t.indexOf("px")&&-1===t.indexOf("rem")&&-1===t.indexOf("em")?isNaN(+t)?"12px":t+"px":t}function As(t,e){for(var n=0;n=0,o=!1;if(t instanceof hs){var a=Hs(t),s=r&&a.selectFill||a.normalFill,l=r&&a.selectStroke||a.normalStroke;if(Ks(s)||Ks(l)){var u=(i=i||{}).style||{};"inherit"===u.fill?(o=!0,i=k({},i),(u=k({},u)).fill=s):!Ks(u.fill)&&Ks(s)?(o=!0,i=k({},i),(u=k({},u)).fill=Qs(s)):!Ks(u.stroke)&&Ks(l)&&(o||(i=k({},i),u=k({},u)),u.stroke=Qs(l)),i.style=u}}if(i&&null==i.z2){o||(i=k({},i));var h=t.z2EmphasisLift;i.z2=t.z2+(null!=h?h:10)}return i}(this,0,e,n);if("blur"===t)return function(t,e,n){var i=L(t.currentStates,e)>=0,r=t.style.opacity,o=i?null:function(t,e,n,i){for(var r=t.style,o={},a=0;a0){var o={dataIndex:r,seriesIndex:t.seriesIndex};null!=i&&(o.dataType=i),e.push(o)}}))})),e}function Il(t,e,n){Pl(t,!0),sl(t,hl),function(t,e,n){var i=Bs(t);null!=e?(i.focus=e,i.blurScope=n):i.focus&&(i.focus=null)}(t,e,n)}function Tl(t,e,n,i){i?function(t){Pl(t,!1)}(t):Il(t,e,n)}var Dl=["emphasis","blur","select"],kl={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function Al(t,e,n,i){n=n||"itemStyle";for(var r=0;r1&&(a*=Vl(f),s*=Vl(f));var g=(r===o?-1:1)*Vl((a*a*(s*s)-a*a*(d*d)-s*s*(p*p))/(a*a*(d*d)+s*s*(p*p)))||0,v=g*a*d/s,y=g*-s*p/a,m=(t+n)/2+Hl(c)*v-Fl(c)*y,_=(e+i)/2+Fl(c)*v+Hl(c)*y,x=Zl([1,0],[(p-v)/a,(d-y)/s]),w=[(p-v)/a,(d-y)/s],b=[(-1*p-v)/a,(-1*d-y)/s],S=Zl(w,b);if(Ul(w,b)<=-1&&(S=Wl),Ul(w,b)>=1&&(S=0),S<0){var M=Math.round(S/Wl*1e6)/1e6;S=2*Wl+M%2*Wl}h.addData(u,m,_,a,s,x,S,c,o)}var Xl=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,jl=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;var ql=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.applyTransform=function(t){},e}(hs);function Kl(t){return null!=t.setData}function $l(t,e){var n=function(t){var e=new Ua;if(!t)return e;var n,i=0,r=0,o=i,a=r,s=Ua.CMD,l=t.match(Xl);if(!l)return e;for(var u=0;uA*A+P*P&&(M=I,C=T),{cx:M,cy:C,x0:-h,y0:-c,x1:M*(r/w-1),y1:C*(r/w-1)}}function fu(t,e){var n,i=hu(e.r,0),r=hu(e.r0||0,0),o=i>0;if(o||r>0){if(o||(i=r,r=0),r>i){var a=i;i=r,r=a}var s=e.startAngle,l=e.endAngle;if(!isNaN(s)&&!isNaN(l)){var u=e.cx,h=e.cy,c=!!e.clockwise,p=lu(l-s),d=p>iu&&p%iu;if(d>pu&&(p=d),i>pu)if(p>iu-pu)t.moveTo(u+i*ou(s),h+i*ru(s)),t.arc(u,h,i,s,l,!c),r>pu&&(t.moveTo(u+r*ou(l),h+r*ru(l)),t.arc(u,h,r,l,s,c));else{var f=void 0,g=void 0,v=void 0,y=void 0,m=void 0,_=void 0,x=void 0,w=void 0,b=void 0,S=void 0,M=void 0,C=void 0,I=void 0,T=void 0,D=void 0,k=void 0,A=i*ou(s),P=i*ru(s),L=r*ou(l),O=r*ru(l),R=p>pu;if(R){var N=e.cornerRadius;N&&(n=function(t){var e;if(G(t)){var n=t.length;if(!n)return t;e=1===n?[t[0],t[0],0,0]:2===n?[t[0],t[0],t[1],t[1]]:3===n?t.concat(t[2]):t}else e=[t,t,t,t];return e}(N),f=n[0],g=n[1],v=n[2],y=n[3]);var z=lu(i-r)/2;if(m=cu(z,v),_=cu(z,y),x=cu(z,f),w=cu(z,g),M=b=hu(m,_),C=S=hu(x,w),(b>pu||S>pu)&&(I=i*ou(l),T=i*ru(l),D=r*ou(s),k=r*ru(s),ppu){var Z=cu(v,M),Y=cu(y,M),X=du(D,k,A,P,i,Z,c),j=du(I,T,L,O,i,Y,c);t.moveTo(u+X.cx+X.x0,h+X.cy+X.y0),M0&&t.arc(u+X.cx,h+X.cy,Z,su(X.y0,X.x0),su(X.y1,X.x1),!c),t.arc(u,h,i,su(X.cy+X.y1,X.cx+X.x1),su(j.cy+j.y1,j.cx+j.x1),!c),Y>0&&t.arc(u+j.cx,h+j.cy,Y,su(j.y1,j.x1),su(j.y0,j.x0),!c))}else t.moveTo(u+A,h+P),t.arc(u,h,i,s,l,!c);else t.moveTo(u+A,h+P);if(r>pu&&R)if(C>pu){Z=cu(f,C),X=du(L,O,I,T,r,-(Y=cu(g,C)),c),j=du(A,P,D,k,r,-Z,c);t.lineTo(u+X.cx+X.x0,h+X.cy+X.y0),C0&&t.arc(u+X.cx,h+X.cy,Y,su(X.y0,X.x0),su(X.y1,X.x1),!c),t.arc(u,h,r,su(X.cy+X.y1,X.cx+X.x1),su(j.cy+j.y1,j.cx+j.x1),c),Z>0&&t.arc(u+j.cx,h+j.cy,Z,su(j.y1,j.x1),su(j.y0,j.x0),!c))}else t.lineTo(u+L,h+O),t.arc(u,h,r,l,s,c);else t.lineTo(u+L,h+O)}else t.moveTo(u,h);t.closePath()}}}var gu=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0,this.cornerRadius=0},vu=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getDefaultShape=function(){return new gu},e.prototype.buildPath=function(t,e){fu(t,e)},e.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},e}(hs);vu.prototype.type="sector";var yu=function(){this.cx=0,this.cy=0,this.r=0,this.r0=0},mu=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getDefaultShape=function(){return new yu},e.prototype.buildPath=function(t,e){var n=e.cx,i=e.cy,r=2*Math.PI;t.moveTo(n+e.r,i),t.arc(n,i,e.r,0,r,!1),t.moveTo(n+e.r0,i),t.arc(n,i,e.r0,0,r,!0)},e}(hs);function _u(t,e,n){var i=e.smooth,r=e.points;if(r&&r.length>=2){if(i){var o=function(t,e,n,i){var r,o,a,s,l=[],u=[],h=[],c=[];if(i){a=[1/0,1/0],s=[-1/0,-1/0];for(var p=0,d=t.length;pBu[1]){if(a=!1,r)return a;var u=Math.abs(Bu[0]-Eu[1]),h=Math.abs(Eu[0]-Bu[1]);Math.min(u,h)>i.len()&&(u0){var c={duration:h.duration,delay:h.delay||0,easing:h.easing,done:o,force:!!o||!!a,setToFinal:!u,scope:t,during:a};l?e.animateFrom(n,c):e.animateTo(n,c)}else e.stopAnimation(),!l&&e.attr(n),a&&a(1),o&&o()}function Xu(t,e,n,i,r,o){Yu("update",t,e,n,i,r,o)}function ju(t,e,n,i,r,o){Yu("enter",t,e,n,i,r,o)}function qu(t){if(!t.__zr)return!0;for(var e=0;eMath.abs(o[1])?o[0]>0?"right":"left":o[1]>0?"bottom":"top"}function mh(t){return!t.isGroup}function _h(t,e,n){if(t&&e){var i,r=(i={},t.traverse((function(t){mh(t)&&t.anid&&(i[t.anid]=t)})),i);e.traverse((function(t){if(mh(t)&&t.anid){var e=r[t.anid];if(e){var i=o(t);t.attr(o(e)),Xu(t,i,n,Bs(t).dataIndex)}}}))}function o(t){var e={x:t.x,y:t.y,rotation:t.rotation};return function(t){return null!=t.shape}(t)&&(e.shape=k({},t.shape)),e}}function xh(t,e){return E(t,(function(t){var n=t[0];n=th(n,e.x),n=eh(n,e.x+e.width);var i=t[1];return i=th(i,e.y),[n,i=eh(i,e.y+e.height)]}))}function wh(t,e){var n=th(t.x,e.x),i=eh(t.x+t.width,e.x+e.width),r=th(t.y,e.y),o=eh(t.y+t.height,e.y+e.height);if(i>=n&&o>=r)return{x:n,y:r,width:i-n,height:o-r}}function bh(t,e,n){var i=k({rectHover:!0},e),r=i.style={strokeNoScale:!0};if(n=n||{x:-1,y:-1,width:2,height:2},t)return 0===t.indexOf("image://")?(r.image=t.slice(8),A(r,n),new gs(i)):lh(t.replace("path://",""),i,n,"center")}function Sh(t,e,n,i,r,o,a,s){var l,u=n-t,h=i-e,c=a-r,p=s-o,d=Mh(c,p,u,h);if((l=d)<=1e-6&&l>=-1e-6)return!1;var f=t-r,g=e-o,v=Mh(f,g,u,h)/d;if(v<0||v>1)return!1;var y=Mh(f,g,c,p)/d;return!(y<0||y>1)}function Mh(t,e,n,i){return t*i-n*e}function Ch(t){var e=t.itemTooltipOption,n=t.componentModel,i=t.itemName,r=Z(e)?{formatter:e}:e,o=n.mainType,a=n.componentIndex,s={componentType:o,name:i,$vars:["name"]};s[o+"Index"]=a;var l=t.formatterParamsExtra;l&&z(F(l),(function(t){_t(s,t)||(s[t]=l[t],s.$vars.push(t))}));var u=Bs(t.el);u.componentMainType=o,u.componentIndex=a,u.tooltipConfig={name:i,option:A({content:i,formatterParams:s},r)}}function Ih(t,e){var n;t.isGroup&&(n=e(t)),n||t.traverse(e)}function Th(t,e){if(t)if(G(t))for(var n=0;n-1?nc:rc;function lc(t,e){t=t.toUpperCase(),ac[t]=new Qh(e),oc[t]=e}lc(ic,{time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}}),lc(nc,{time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}});var uc=1e3,hc=6e4,cc=36e5,pc=864e5,dc=31536e6,fc={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}",none:"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}"},gc="{yyyy}-{MM}-{dd}",vc={year:"{yyyy}",month:"{yyyy}-{MM}",day:gc,hour:gc+" "+fc.hour,minute:gc+" "+fc.minute,second:gc+" "+fc.second,millisecond:fc.none},yc=["year","month","day","hour","minute","second","millisecond"],mc=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function _c(t,e){return"0000".substr(0,e-(t+="").length)+t}function xc(t){switch(t){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return t}}function wc(t){return t===xc(t)}function bc(t,e,n,i){var r=qr(t),o=r[Cc(n)](),a=r[Ic(n)]()+1,s=Math.floor((a-1)/3)+1,l=r[Tc(n)](),u=r["get"+(n?"UTC":"")+"Day"](),h=r[Dc(n)](),c=(h-1)%12+1,p=r[kc(n)](),d=r[Ac(n)](),f=r[Pc(n)](),g=i instanceof Qh?i:function(t){return ac[t]}(i||sc)||ac[rc],v=g.getModel("time"),y=v.get("month"),m=v.get("monthAbbr"),_=v.get("dayOfWeek"),x=v.get("dayOfWeekAbbr");return(e||"").replace(/{yyyy}/g,o+"").replace(/{yy}/g,o%100+"").replace(/{Q}/g,s+"").replace(/{MMMM}/g,y[a-1]).replace(/{MMM}/g,m[a-1]).replace(/{MM}/g,_c(a,2)).replace(/{M}/g,a+"").replace(/{dd}/g,_c(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,_[u]).replace(/{ee}/g,x[u]).replace(/{e}/g,u+"").replace(/{HH}/g,_c(h,2)).replace(/{H}/g,h+"").replace(/{hh}/g,_c(c+"",2)).replace(/{h}/g,c+"").replace(/{mm}/g,_c(p,2)).replace(/{m}/g,p+"").replace(/{ss}/g,_c(d,2)).replace(/{s}/g,d+"").replace(/{SSS}/g,_c(f,3)).replace(/{S}/g,f+"")}function Sc(t,e){var n=qr(t),i=n[Ic(e)]()+1,r=n[Tc(e)](),o=n[Dc(e)](),a=n[kc(e)](),s=n[Ac(e)](),l=0===n[Pc(e)](),u=l&&0===s,h=u&&0===a,c=h&&0===o,p=c&&1===r;return p&&1===i?"year":p?"month":c?"day":h?"hour":u?"minute":l?"second":"millisecond"}function Mc(t,e,n){var i=X(t)?qr(t):t;switch(e=e||Sc(t,n)){case"year":return i[Cc(n)]();case"half-year":return i[Ic(n)]()>=6?1:0;case"quarter":return Math.floor((i[Ic(n)]()+1)/4);case"month":return i[Ic(n)]();case"day":return i[Tc(n)]();case"half-day":return i[Dc(n)]()/24;case"hour":return i[Dc(n)]();case"minute":return i[kc(n)]();case"second":return i[Ac(n)]();case"millisecond":return i[Pc(n)]()}}function Cc(t){return t?"getUTCFullYear":"getFullYear"}function Ic(t){return t?"getUTCMonth":"getMonth"}function Tc(t){return t?"getUTCDate":"getDate"}function Dc(t){return t?"getUTCHours":"getHours"}function kc(t){return t?"getUTCMinutes":"getMinutes"}function Ac(t){return t?"getUTCSeconds":"getSeconds"}function Pc(t){return t?"getUTCMilliseconds":"getMilliseconds"}function Lc(t){return t?"setUTCFullYear":"setFullYear"}function Oc(t){return t?"setUTCMonth":"setMonth"}function Rc(t){return t?"setUTCDate":"setDate"}function Nc(t){return t?"setUTCHours":"setHours"}function zc(t){return t?"setUTCMinutes":"setMinutes"}function Ec(t){return t?"setUTCSeconds":"setSeconds"}function Bc(t){return t?"setUTCMilliseconds":"setMilliseconds"}function Vc(t){if(!to(t))return Z(t)?t:"-";var e=(t+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}function Fc(t,e){return t=(t||"").toLowerCase().replace(/-(.)/g,(function(t,e){return e.toUpperCase()})),e&&t&&(t=t.charAt(0).toUpperCase()+t.slice(1)),t}var Hc=at;function Wc(t,e,n){function i(t){return t&<(t)?t:"-"}function r(t){return!(null==t||isNaN(t)||!isFinite(t))}var o="time"===e,a=t instanceof Date;if(o||a){var s=o?qr(t):t;if(!isNaN(+s))return bc(s,"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}",n);if(a)return"-"}if("ordinal"===e)return Y(t)?i(t):X(t)&&r(t)?t+"":"-";var l=Jr(t);return r(l)?Vc(l):Y(t)?i(t):"boolean"==typeof t?t+"":"-"}var Gc=["a","b","c","d","e","f","g"],Uc=function(t,e){return"{"+t+(null==e?"":e)+"}"};function Zc(t,e,n){G(e)||(e=[e]);var i=e.length;if(!i)return"";for(var r=e[0].$vars||[],o=0;o':'':{renderMode:o,content:"{"+(n.markerId||"markerX")+"|} ",style:"subItem"===r?{width:4,height:4,borderRadius:2,backgroundColor:i}:{width:10,height:10,borderRadius:5,backgroundColor:i}}:""}function Xc(t,e){return e=e||"transparent",Z(t)?t:j(t)&&t.colorStops&&(t.colorStops[0]||{}).color||e}function jc(t,e){if("_blank"===e||"blank"===e){var n=window.open();n.opener=null,n.location.href=t}else window.open(t,e)}var qc=z,Kc=["left","right","top","bottom","width","height"],$c=[["width","left","right"],["height","top","bottom"]];function Qc(t,e,n,i,r){var o=0,a=0;null==i&&(i=1/0),null==r&&(r=1/0);var s=0;e.eachChild((function(l,u){var h,c,p=l.getBoundingRect(),d=e.childAt(u+1),f=d&&d.getBoundingRect();if("horizontal"===t){var g=p.width+(f?-f.x+p.x:0);(h=o+g)>i||l.newline?(o=0,h=g,a+=s+n,s=p.height):s=Math.max(s,p.height)}else{var v=p.height+(f?-f.y+p.y:0);(c=a+v)>r||l.newline?(o+=s+n,a=0,c=v,s=p.width):s=Math.max(s,p.width)}l.newline||(l.x=o,l.y=a,l.markRedraw(),"horizontal"===t?o=h+n:a=c+n)}))}var Jc=Qc;W(Qc,"vertical"),W(Qc,"horizontal");function tp(t,e,n){n=Hc(n||0);var i=e.width,r=e.height,o=Br(t.left,i),a=Br(t.top,r),s=Br(t.right,i),l=Br(t.bottom,r),u=Br(t.width,i),h=Br(t.height,r),c=n[2]+n[0],p=n[1]+n[3],d=t.aspect;switch(isNaN(u)&&(u=i-s-p-o),isNaN(h)&&(h=r-l-c-a),null!=d&&(isNaN(u)&&isNaN(h)&&(d>i/r?u=.8*i:h=.8*r),isNaN(u)&&(u=d*h),isNaN(h)&&(h=u/d)),isNaN(o)&&(o=i-s-u-p),isNaN(a)&&(a=r-l-h-c),t.left||t.right){case"center":o=i/2-u/2-n[3];break;case"right":o=i-u-p}switch(t.top||t.bottom){case"middle":case"center":a=r/2-h/2-n[0];break;case"bottom":a=r-h-c}o=o||0,a=a||0,isNaN(u)&&(u=i-p-o-(s||0)),isNaN(h)&&(h=r-c-a-(l||0));var f=new Le(o+n[3],a+n[0],u,h);return f.margin=n,f}function ep(t,e,n,i,r,o){var a,s=!r||!r.hv||r.hv[0],l=!r||!r.hv||r.hv[1],u=r&&r.boundingMode||"all";if((o=o||t).x=t.x,o.y=t.y,!s&&!l)return!1;if("raw"===u)a="group"===t.type?new Le(0,0,+e.width||0,+e.height||0):t.getBoundingRect();else if(a=t.getBoundingRect(),t.needLocalTransform()){var h=t.getLocalTransform();(a=a.clone()).applyTransform(h)}var c=tp(A({width:a.width,height:a.height},e),n,i),p=s?c.x-a.x:0,d=l?c.y-a.y:0;return"raw"===u?(o.x=p,o.y=d):(o.x+=p,o.y+=d),o===t&&t.markRedraw(),!0}function np(t){var e=t.layoutMode||t.constructor.layoutMode;return j(e)?e:e?{type:e}:null}function ip(t,e,n){var i=n&&n.ignoreSize;!G(i)&&(i=[i,i]);var r=a($c[0],0),o=a($c[1],1);function a(n,r){var o={},a=0,u={},h=0;if(qc(n,(function(e){u[e]=t[e]})),qc(n,(function(t){s(e,t)&&(o[t]=u[t]=e[t]),l(o,t)&&a++,l(u,t)&&h++})),i[r])return l(e,n[1])?u[n[2]]=null:l(e,n[2])&&(u[n[1]]=null),u;if(2!==h&&a){if(a>=2)return o;for(var c=0;c=0;a--)o=T(o,n[a],!0);e.defaultOption=o}return e.defaultOption},e.prototype.getReferringComponents=function(t,e){var n=t+"Index",i=t+"Id";return Do(this.ecModel,t,{index:this.get(n,!0),id:this.get(i,!0)},e)},e.prototype.getBoxLayoutParams=function(){var t=this;return{left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")}},e.prototype.getZLevelKey=function(){return""},e.prototype.setZLevel=function(t){this.option.zlevel=t},e.protoInitialize=function(){var t=e.prototype;t.type="component",t.id="",t.name="",t.mainType="",t.subType="",t.componentIndex=0}(),e}(Qh);Ro(sp,Qh),Bo(sp),function(t){var e={};t.registerSubTypeDefaulter=function(t,n){var i=Lo(t);e[i.main]=n},t.determineSubType=function(n,i){var r=i.type;if(!r){var o=Lo(n).main;t.hasSubTypes(n)&&e[o]&&(r=e[o](i))}return r}}(sp),function(t,e){function n(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}t.topologicalTravel=function(t,i,r,o){if(t.length){var a=function(t){var i={},r=[];return z(t,(function(o){var a=n(i,o),s=function(t,e){var n=[];return z(t,(function(t){L(e,t)>=0&&n.push(t)})),n}(a.originalDeps=e(o),t);a.entryCount=s.length,0===a.entryCount&&r.push(o),z(s,(function(t){L(a.predecessor,t)<0&&a.predecessor.push(t);var e=n(i,t);L(e.successor,t)<0&&e.successor.push(o)}))})),{graph:i,noEntryList:r}}(i),s=a.graph,l=a.noEntryList,u={};for(z(t,(function(t){u[t]=!0}));l.length;){var h=l.pop(),c=s[h],p=!!u[h];p&&(r.call(o,h,c.originalDeps.slice()),delete u[h]),z(c.successor,p?f:d)}z(u,(function(){var t="";throw new Error(t)}))}function d(t){s[t].entryCount--,0===s[t].entryCount&&l.push(t)}function f(t){u[t]=!0,d(t)}}}(sp,(function(t){var e=[];z(sp.getClassesByMainType(t),(function(t){e=e.concat(t.dependencies||t.prototype.dependencies||[])})),e=E(e,(function(t){return Lo(t).main})),"dataset"!==t&&L(e,"dataset")<=0&&e.unshift("dataset");return e}));var lp="";"undefined"!=typeof navigator&&(lp=navigator.platform||"");var up="rgba(0, 0, 0, 0.2)",hp={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:up,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:up,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:up,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:up,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:up,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:up,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:lp.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1},cp=gt(["tooltip","label","itemName","itemId","itemGroupId","seriesName"]),pp="original",dp="arrayRows",fp="objectRows",gp="keyedColumns",vp="typedArray",yp="unknown",mp="column",_p="row",xp=1,wp=2,bp=3,Sp=bo();function Mp(t,e,n){var i={},r=Ip(e);if(!r||!t)return i;var o,a,s=[],l=[],u=e.ecModel,h=Sp(u).datasetMap,c=r.uid+"_"+n.seriesLayoutBy;z(t=t.slice(),(function(e,n){var r=j(e)?e:t[n]={name:e};"ordinal"===r.type&&null==o&&(o=n,a=f(r)),i[r.name]=[]}));var p=h.get(c)||h.set(c,{categoryWayDim:a,valueWayDim:0});function d(t,e,n){for(var i=0;ie)return t[i];return t[n-1]}(i,a):n;if((h=h||n)&&h.length){var c=h[l];return r&&(u[r]=c),s.paletteIdx=(l+1)%h.length,c}}var Bp="\0_ec_inner";var Vp=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.init=function(t,e,n,i,r,o){i=i||{},this.option=null,this._theme=new Qh(i),this._locale=new Qh(r),this._optionManager=o},e.prototype.setOption=function(t,e,n){var i=Wp(e);this._optionManager.setOption(t,n,i),this._resetOption(null,i)},e.prototype.resetOption=function(t,e){return this._resetOption(t,Wp(e))},e.prototype._resetOption=function(t,e){var n=!1,i=this._optionManager;if(!t||"recreate"===t){var r=i.mountOption("recreate"===t);0,this.option&&"recreate"!==t?(this.restoreData(),this._mergeOption(r,e)):Lp(this,r),n=!0}if("timeline"!==t&&"media"!==t||this.restoreData(),!t||"recreate"===t||"timeline"===t){var o=i.getTimelineOption(this);o&&(n=!0,this._mergeOption(o,e))}if(!t||"recreate"===t||"media"===t){var a=i.getMediaOption(this);a.length&&z(a,(function(t){n=!0,this._mergeOption(t,e)}),this)}return n},e.prototype.mergeOption=function(t){this._mergeOption(t,null)},e.prototype._mergeOption=function(t,e){var n=this.option,i=this._componentsMap,r=this._componentsCount,o=[],a=gt(),s=e&&e.replaceMergeMainTypeMap;Sp(this).datasetMap=gt(),z(t,(function(t,e){null!=t&&(sp.hasClass(e)?e&&(o.push(e),a.set(e,!0)):n[e]=null==n[e]?I(t):T(n[e],t,!0))})),s&&s.each((function(t,e){sp.hasClass(e)&&!a.get(e)&&(o.push(e),a.set(e,!0))})),sp.topologicalTravel(o,sp.getAllClassMainTypes(),(function(e){var o=function(t,e,n){var i=kp.get(e);if(!i)return n;var r=i(t);return r?n.concat(r):n}(this,e,uo(t[e])),a=i.get(e),l=a?s&&s.get(e)?"replaceMerge":"normalMerge":"replaceAll",u=go(a,o,l);(function(t,e,n){z(t,(function(t){var i=t.newOption;j(i)&&(t.keyInfo.mainType=e,t.keyInfo.subType=function(t,e,n,i){return e.type?e.type:n?n.subType:i.determineSubType(t,e)}(e,i,t.existing,n))}))})(u,e,sp),n[e]=null,i.set(e,null),r.set(e,0);var h,c=[],p=[],d=0;z(u,(function(t,n){var i=t.existing,r=t.newOption;if(r){var o="series"===e,a=sp.getClass(e,t.keyInfo.subType,!o);if(!a)return;if("tooltip"===e){if(h)return void 0;h=!0}if(i&&i.constructor===a)i.name=t.keyInfo.name,i.mergeOption(r,this),i.optionUpdated(r,!1);else{var s=k({componentIndex:n},t.keyInfo);k(i=new a(r,this,this,s),s),t.brandNew&&(i.__requireNewView=!0),i.init(r,this,this),i.optionUpdated(null,!0)}}else i&&(i.mergeOption({},this),i.optionUpdated({},!1));i?(c.push(i.option),p.push(i),d++):(c.push(void 0),p.push(void 0))}),this),n[e]=c,i.set(e,p),r.set(e,d),"series"===e&&Ap(this)}),this),this._seriesIndices||Ap(this)},e.prototype.getOption=function(){var t=I(this.option);return z(t,(function(e,n){if(sp.hasClass(n)){for(var i=uo(e),r=i.length,o=!1,a=r-1;a>=0;a--)i[a]&&!xo(i[a])?o=!0:(i[a]=null,!o&&r--);i.length=r,t[n]=i}})),delete t[Bp],t},e.prototype.getTheme=function(){return this._theme},e.prototype.getLocaleModel=function(){return this._locale},e.prototype.setUpdatePayload=function(t){this._payload=t},e.prototype.getUpdatePayload=function(){return this._payload},e.prototype.getComponent=function(t,e){var n=this._componentsMap.get(t);if(n){var i=n[e||0];if(i)return i;if(null==e)for(var r=0;r=e:"max"===n?t<=e:t===e})(i[a],t,o)||(r=!1)}})),r}var Kp=z,$p=j,Qp=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function Jp(t){var e=t&&t.itemStyle;if(e)for(var n=0,i=Qp.length;n=0;g--){var v=t[g];if(s||(p=v.data.rawIndexOf(v.stackedByDimension,c)),p>=0){var y=v.data.getByRawIndex(v.stackResultDimension,p);if("all"===l||"positive"===l&&y>0||"negative"===l&&y<0||"samesign"===l&&d>=0&&y>0||"samesign"===l&&d<=0&&y<0){d=Zr(d,y),f=y;break}}}return i[0]=d,i[1]=f,i}))}))}var yd,md,_d,xd,wd,bd=function(t){this.data=t.data||(t.sourceFormat===gp?{}:[]),this.sourceFormat=t.sourceFormat||yp,this.seriesLayoutBy=t.seriesLayoutBy||mp,this.startIndex=t.startIndex||0,this.dimensionsDetectedCount=t.dimensionsDetectedCount,this.metaRawOption=t.metaRawOption;var e=this.dimensionsDefine=t.dimensionsDefine;if(e)for(var n=0;nu&&(u=d)}s[0]=l,s[1]=u}},i=function(){return this._data?this._data.length/this._dimSize:0};function r(t){for(var e=0;e=0&&(s=o.interpolatedValue[l])}return null!=s?s+"":""})):void 0},t.prototype.getRawValue=function(t,e){return Hd(this.getData(e),t)},t.prototype.formatTooltip=function(t,e,n){},t}();function Ud(t){var e,n;return j(t)?t.type&&(n=t):e=t,{text:e,frag:n}}function Zd(t){return new Yd(t)}var Yd=function(){function t(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0}return t.prototype.perform=function(t){var e,n=this._upstream,i=t&&t.skip;if(this._dirty&&n){var r=this.context;r.data=r.outputData=n.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!i&&(e=this._plan(this.context));var o,a=h(this._modBy),s=this._modDataCount||0,l=h(t&&t.modBy),u=t&&t.modDataCount||0;function h(t){return!(t>=1)&&(t=1),t}a===l&&s===u||(e="reset"),(this._dirty||"reset"===e)&&(this._dirty=!1,o=this._doReset(i)),this._modBy=l,this._modDataCount=u;var c=t&&t.step;if(this._dueEnd=n?n._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var p=this._dueIndex,d=Math.min(null!=c?this._dueIndex+c:1/0,this._dueEnd);if(!i&&(o||p1&&i>0?s:a}};return o;function a(){return e=t?null:oi?-this._resultLT:0},t}(),Kd=function(){function t(){}return t.prototype.getRawData=function(){throw new Error("not supported")},t.prototype.getRawDataItem=function(t){throw new Error("not supported")},t.prototype.cloneRawData=function(){},t.prototype.getDimensionInfo=function(t){},t.prototype.cloneAllDimensionInfo=function(){},t.prototype.count=function(){},t.prototype.retrieveValue=function(t,e){},t.prototype.retrieveValueFromItem=function(t,e){},t.prototype.convertValue=function(t,e){return jd(t,e)},t}();function $d(t){var e=t.sourceFormat;if(!rf(e)){var n="";0,oo(n)}return t.data}function Qd(t){var e=t.sourceFormat,n=t.data;if(!rf(e)){var i="";0,oo(i)}if(e===dp){for(var r=[],o=0,a=n.length;o65535?sf:lf}function df(t,e,n,i,r){var o=cf[n||"float"];if(r){var a=t[e],s=a&&a.length;if(s!==i){for(var l=new o(i),u=0;ug[1]&&(g[1]=f)}return this._rawCount=this._count=s,{start:a,end:s}},t.prototype._initDataFromProvider=function(t,e,n){for(var i=this._provider,r=this._chunks,o=this._dimensions,a=o.length,s=this._rawExtent,l=E(o,(function(t){return t.property})),u=0;uv[1]&&(v[1]=g)}}!i.persistent&&i.clean&&i.clean(),this._rawCount=this._count=e,this._extent=[]},t.prototype.count=function(){return this._count},t.prototype.get=function(t,e){if(!(e>=0&&e=0&&e=this._rawCount||t<0)return-1;if(!this._indices)return t;var e=this._indices,n=e[t];if(null!=n&&nt))return o;r=o-1}}return-1},t.prototype.indicesOfNearest=function(t,e,n){var i=this._chunks[t],r=[];if(!i)return r;null==n&&(n=1/0);for(var o=1/0,a=-1,s=0,l=0,u=this.count();l=0&&a<0)&&(o=c,a=h,s=0),h===a&&(r[s++]=l))}return r.length=s,r},t.prototype.getIndices=function(){var t,e=this._indices;if(e){var n=e.constructor,i=this._count;if(n===Array){t=new n(i);for(var r=0;r=u&&_<=h||isNaN(_))&&(a[s++]=d),d++}p=!0}else if(2===r){f=c[i[0]];var v=c[i[1]],y=t[i[1]][0],m=t[i[1]][1];for(g=0;g=u&&_<=h||isNaN(_))&&(x>=y&&x<=m||isNaN(x))&&(a[s++]=d),d++}p=!0}}if(!p)if(1===r)for(g=0;g=u&&_<=h||isNaN(_))&&(a[s++]=w)}else for(g=0;gt[M][1])&&(b=!1)}b&&(a[s++]=e.getRawIndex(g))}return sv[1]&&(v[1]=g)}}}},t.prototype.lttbDownSample=function(t,e){var n,i,r,o=this.clone([t],!0),a=o._chunks[t],s=this.count(),l=0,u=Math.floor(1/e),h=this.getRawIndex(0),c=new(pf(this._rawCount))(Math.min(2*(Math.ceil(s/u)+2),s));c[l++]=h;for(var p=1;pn&&(n=i,r=C)}M>0&&Mu-d&&(s=u-d,a.length=s);for(var f=0;fh[1]&&(h[1]=v),c[p++]=y}return r._count=p,r._indices=c,r._updateGetRawIdx(),r},t.prototype.each=function(t,e){if(this._count)for(var n=t.length,i=this._chunks,r=0,o=this.count();ra&&(a=l)}return i=[o,a],this._extent[t]=i,i},t.prototype.getRawDataItem=function(t){var e=this.getRawIndex(t);if(this._provider.persistent)return this._provider.getItem(e);for(var n=[],i=this._chunks,r=0;r=0?this._indices[t]:-1},t.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},t.internalField=function(){function t(t,e,n,i){return jd(t[i],this._dimensions[i])}of={arrayRows:t,objectRows:function(t,e,n,i){return jd(t[e],this._dimensions[i])},keyedColumns:t,original:function(t,e,n,i){var r=t&&(null==t.value?t:t.value);return jd(r instanceof Array?r[i]:r,this._dimensions[i])},typedArray:function(t,e,n,i){return t[i]}}}(),t}(),gf=function(){function t(t){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=t}return t.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},t.prototype._setLocalSource=function(t,e){this._sourceList=t,this._upstreamSignList=e,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},t.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},t.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},t.prototype._createSource=function(){this._setLocalSource([],[]);var t,e,n=this._sourceHost,i=this._getUpstreamSourceManagers(),r=!!i.length;if(yf(n)){var o=n,a=void 0,s=void 0,l=void 0;if(r){var u=i[0];u.prepareSource(),a=(l=u.getSource()).data,s=l.sourceFormat,e=[u._getVersionSign()]}else s=K(a=o.get("data",!0))?vp:pp,e=[];var h=this._getSourceMetaRawOption()||{},c=l&&l.metaRawOption||{},p=it(h.seriesLayoutBy,c.seriesLayoutBy)||null,d=it(h.sourceHeader,c.sourceHeader),f=it(h.dimensions,c.dimensions);t=p!==c.seriesLayoutBy||!!d!=!!c.sourceHeader||f?[Md(a,{seriesLayoutBy:p,sourceHeader:d,dimensions:f},s)]:[]}else{var g=n;if(r){var v=this._applyTransform(i);t=v.sourceList,e=v.upstreamSignList}else{t=[Md(g.get("source",!0),this._getSourceMetaRawOption(),null)],e=[]}}this._setLocalSource(t,e)},t.prototype._applyTransform=function(t){var e,n=this._sourceHost,i=n.get("transform",!0),r=n.get("fromTransformResult",!0);if(null!=r){var o="";1!==t.length&&mf(o)}var a,s=[],l=[];return z(t,(function(t){t.prepareSource();var e=t.getSource(r||0),n="";null==r||e||mf(n),s.push(e),l.push(t._getVersionSign())})),i?e=function(t,e,n){var i=uo(t),r=i.length,o="";r||oo(o);for(var a=0,s=r;a1||n>0&&!t.noHeader;return z(t.blocks,(function(t){var n=If(t);n>=e&&(e=n+ +(i&&(!n||Mf(t)&&!t.noHeader)))})),e}return 0}function Tf(t,e,n,i){var r,o=e.noHeader,a=(r=If(e),{html:wf[r],richText:bf[r]}),s=[],l=e.blocks||[];st(!l||G(l)),l=l||[];var u=t.orderMode;if(e.sortBlocks&&u){l=l.slice();var h={valueAsc:"asc",valueDesc:"desc"};if(_t(h,u)){var c=new qd(h[u],null);l.sort((function(t,e){return c.evaluate(t.sortParam,e.sortParam)}))}else"seriesDesc"===u&&l.reverse()}z(l,(function(n,r){var o=e.valueFormatter,l=Cf(n)(o?k(k({},t),{valueFormatter:o}):t,n,r>0?a.html:0,i);null!=l&&s.push(l)}));var p="richText"===t.renderMode?s.join(a.richText):Af(s.join(""),o?n:a.html);if(o)return p;var d=Wc(e.header,"ordinal",t.useUTC),f=xf(i,t.renderMode).nameStyle;return"richText"===t.renderMode?Pf(t,d,f)+a.richText+p:Af('
    '+te(d)+"
    "+p,n)}function Df(t,e,n,i){var r=t.renderMode,o=e.noName,a=e.noValue,s=!e.markerType,l=e.name,u=t.useUTC,h=e.valueFormatter||t.valueFormatter||function(t){return E(t=G(t)?t:[t],(function(t,e){return Wc(t,G(d)?d[e]:d,u)}))};if(!o||!a){var c=s?"":t.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||"#333",r),p=o?"":Wc(l,"ordinal",u),d=e.valueType,f=a?[]:h(e.value),g=!s||!o,v=!s&&o,y=xf(i,r),m=y.nameStyle,_=y.valueStyle;return"richText"===r?(s?"":c)+(o?"":Pf(t,p,m))+(a?"":function(t,e,n,i,r){var o=[r],a=i?10:20;return n&&o.push({padding:[0,0,0,a],align:"right"}),t.markupStyleCreator.wrapRichTextStyle(G(e)?e.join(" "):e,o)}(t,f,g,v,_)):Af((s?"":c)+(o?"":function(t,e,n){return''+te(t)+""}(p,!s,m))+(a?"":function(t,e,n,i){var r=n?"10px":"20px",o=e?"float:right;margin-left:"+r:"";return t=G(t)?t:[t],''+E(t,(function(t){return te(t)})).join("  ")+""}(f,g,v,_)),n)}}function kf(t,e,n,i,r,o){if(t)return Cf(t)({useUTC:r,renderMode:n,orderMode:i,markupStyleCreator:e,valueFormatter:t.valueFormatter},t,0,o)}function Af(t,e){return'
    '+t+'
    '}function Pf(t,e,n){return t.markupStyleCreator.wrapRichTextStyle(e,n)}function Lf(t,e){var n=t.get("padding");return null!=n?n:"richText"===e?[8,10]:10}var Of=function(){function t(){this.richTextStyles={},this._nextStyleNameId=eo()}return t.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},t.prototype.makeTooltipMarker=function(t,e,n){var i="richText"===n?this._generateStyleName():null,r=Yc({color:e,type:t,renderMode:n,markerId:i});return Z(r)?r:(this.richTextStyles[i]=r.style,r.content)},t.prototype.wrapRichTextStyle=function(t,e){var n={};G(e)?z(e,(function(t){return k(n,t)})):k(n,e);var i=this._generateStyleName();return this.richTextStyles[i]=n,"{"+i+"|"+t+"}"},t}();function Rf(t){var e,n,i,r,o=t.series,a=t.dataIndex,s=t.multipleSeries,l=o.getData(),u=l.mapDimensionsAll("defaultedTooltip"),h=u.length,c=o.getRawValue(a),p=G(c),d=function(t,e){return Xc(t.getData().getItemVisual(e,"style")[t.visualDrawType])}(o,a);if(h>1||p&&!h){var f=function(t,e,n,i,r){var o=e.getData(),a=B(t,(function(t,e,n){var i=o.getDimensionInfo(n);return t||i&&!1!==i.tooltip&&null!=i.displayName}),!1),s=[],l=[],u=[];function h(t,e){var n=o.getDimensionInfo(e);n&&!1!==n.otherDims.tooltip&&(a?u.push(Sf("nameValue",{markerType:"subItem",markerColor:r,name:n.displayName,value:t,valueType:n.type})):(s.push(t),l.push(n.type)))}return i.length?z(i,(function(t){h(Hd(o,n,t),t)})):z(t,h),{inlineValues:s,inlineValueTypes:l,blocks:u}}(c,o,a,u,d);e=f.inlineValues,n=f.inlineValueTypes,i=f.blocks,r=f.inlineValues[0]}else if(h){var g=l.getDimensionInfo(u[0]);r=e=Hd(l,a,u[0]),n=g.type}else r=e=p?c[0]:c;var v=_o(o),y=v&&o.name||"",m=l.getName(a),_=s?y:m;return Sf("section",{header:y,noHeader:s||!v,sortParam:r,blocks:[Sf("nameValue",{markerType:"item",markerColor:d,name:_,noName:!lt(_),value:e,valueType:n})].concat(i||[])})}var Nf=bo();function zf(t,e){return t.getName(e)||t.getId(e)}var Ef=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._selectedDataIndicesMap={},e}return n(e,t),e.prototype.init=function(t,e,n){this.seriesIndex=this.componentIndex,this.dataTask=Zd({count:Vf,reset:Ff}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,n),(Nf(this).sourceManager=new gf(this)).prepareSource();var i=this.getInitialData(t,n);Wf(i,this),this.dataTask.context.data=i,Nf(this).dataBeforeProcessed=i,Bf(this),this._initSelectedMapFromData(i)},e.prototype.mergeDefaultAndTheme=function(t,e){var n=np(this),i=n?rp(t):{},r=this.subType;sp.hasClass(r)&&(r+="Series"),T(t,e.getTheme().get(this.subType)),T(t,this.getDefaultOption()),ho(t,"label",["show"]),this.fillDataTextStyle(t.data),n&&ip(t,i,n)},e.prototype.mergeOption=function(t,e){t=T(this.option,t,!0),this.fillDataTextStyle(t.data);var n=np(this);n&&ip(this.option,t,n);var i=Nf(this).sourceManager;i.dirty(),i.prepareSource();var r=this.getInitialData(t,e);Wf(r,this),this.dataTask.dirty(),this.dataTask.context.data=r,Nf(this).dataBeforeProcessed=r,Bf(this),this._initSelectedMapFromData(r)},e.prototype.fillDataTextStyle=function(t){if(t&&!K(t))for(var e=["show"],n=0;nthis.getShallow("animationThreshold")&&(e=!1),!!e},e.prototype.restoreData=function(){this.dataTask.dirty()},e.prototype.getColorFromPalette=function(t,e,n){var i=this.ecModel,r=Np.prototype.getColorFromPalette.call(this,t,e,n);return r||(r=i.getColorFromPalette(t,e,n)),r},e.prototype.coordDimToDataDim=function(t){return this.getRawData().mapDimensionsAll(t)},e.prototype.getProgressive=function(){return this.get("progressive")},e.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},e.prototype.select=function(t,e){this._innerSelect(this.getData(e),t)},e.prototype.unselect=function(t,e){var n=this.option.selectedMap;if(n){var i=this.option.selectedMode,r=this.getData(e);if("series"===i||"all"===n)return this.option.selectedMap={},void(this._selectedDataIndicesMap={});for(var o=0;o=0&&n.push(r)}return n},e.prototype.isSelected=function(t,e){var n=this.option.selectedMap;if(!n)return!1;var i=this.getData(e);return("all"===n||n[zf(i,t)])&&!i.getItemModel(t).get(["select","disabled"])},e.prototype.isUniversalTransitionEnabled=function(){if(this.__universalTransitionEnabled)return!0;var t=this.option.universalTransition;return!!t&&(!0===t||t&&t.enabled)},e.prototype._innerSelect=function(t,e){var n,i,r=this.option,o=r.selectedMode,a=e.length;if(o&&a)if("series"===o)r.selectedMap="all";else if("multiple"===o){j(r.selectedMap)||(r.selectedMap={});for(var s=r.selectedMap,l=0;l0&&this._innerSelect(t,e)}},e.registerClass=function(t){return sp.registerClass(t)},e.protoInitialize=function(){var t=e.prototype;t.type="series.__base__",t.seriesIndex=0,t.ignoreStyleOnData=!1,t.hasSymbolVisual=!1,t.defaultSymbol="circle",t.visualStyleAccessPath="itemStyle",t.visualDrawType="fill"}(),e}(sp);function Bf(t){var e=t.name;_o(t)||(t.name=function(t){var e=t.getRawData(),n=e.mapDimensionsAll("seriesName"),i=[];return z(n,(function(t){var n=e.getDimensionInfo(t);n.displayName&&i.push(n.displayName)})),i.join(" ")}(t)||e)}function Vf(t){return t.model.getRawData().count()}function Ff(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),Hf}function Hf(t,e){e.outputData&&t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function Wf(t,e){z(vt(t.CHANGABLE_METHODS,t.DOWNSAMPLE_METHODS),(function(n){t.wrapMethod(n,W(Gf,e))}))}function Gf(t,e){var n=Uf(t);return n&&n.setOutputEnd((e||this).count()),e}function Uf(t){var e=(t.ecModel||{}).scheduler,n=e&&e.getPipeline(t.uid);if(n){var i=n.currentTask;if(i){var r=i.agentStubMap;r&&(i=r.get(t.uid))}return i}}R(Ef,Gd),R(Ef,Np),Ro(Ef,sp);var Zf=function(){function t(){this.group=new kr,this.uid=tc("viewComponent")}return t.prototype.init=function(t,e){},t.prototype.render=function(t,e,n,i){},t.prototype.dispose=function(t,e){},t.prototype.updateView=function(t,e,n,i){},t.prototype.updateLayout=function(t,e,n,i){},t.prototype.updateVisual=function(t,e,n,i){},t.prototype.toggleBlurSeries=function(t,e,n){},t.prototype.eachRendered=function(t){var e=this.group;e&&e.traverse(t)},t}();function Yf(){var t=bo();return function(e){var n=t(e),i=e.pipelineContext,r=!!n.large,o=!!n.progressiveRender,a=n.large=!(!i||!i.large),s=n.progressiveRender=!(!i||!i.progressiveRender);return!(r===a&&o===s)&&"reset"}}Oo(Zf),Bo(Zf);var Xf=bo(),jf=Yf(),qf=function(){function t(){this.group=new kr,this.uid=tc("viewChart"),this.renderTask=Zd({plan:Qf,reset:Jf}),this.renderTask.context={view:this}}return t.prototype.init=function(t,e){},t.prototype.render=function(t,e,n,i){0},t.prototype.highlight=function(t,e,n,i){var r=t.getData(i&&i.dataType);r&&$f(r,i,"emphasis")},t.prototype.downplay=function(t,e,n,i){var r=t.getData(i&&i.dataType);r&&$f(r,i,"normal")},t.prototype.remove=function(t,e){this.group.removeAll()},t.prototype.dispose=function(t,e){},t.prototype.updateView=function(t,e,n,i){this.render(t,e,n,i)},t.prototype.updateLayout=function(t,e,n,i){this.render(t,e,n,i)},t.prototype.updateVisual=function(t,e,n,i){this.render(t,e,n,i)},t.prototype.eachRendered=function(t){Th(this.group,t)},t.markUpdateMethod=function(t,e){Xf(t).updateMethod=e},t.protoInitialize=void(t.prototype.type="chart"),t}();function Kf(t,e,n){t&&Ll(t)&&("emphasis"===e?dl:fl)(t,n)}function $f(t,e,n){var i=wo(t,e),r=e&&null!=e.highlightKey?function(t){var e=Fs[t];return null==e&&Vs<=32&&(e=Fs[t]=Vs++),e}(e.highlightKey):null;null!=i?z(uo(i),(function(e){Kf(t.getItemGraphicEl(e),n,r)})):t.eachItemGraphicEl((function(t){Kf(t,n,r)}))}function Qf(t){return jf(t.model)}function Jf(t){var e=t.model,n=t.ecModel,i=t.api,r=t.payload,o=e.pipelineContext.progressiveRender,a=t.view,s=r&&Xf(r).updateMethod,l=o?"incrementalPrepareRender":s&&a[s]?s:"render";return"render"!==l&&a[l](e,n,i,r),tg[l]}Oo(qf),Bo(qf);var tg={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},eg="\0__throttleOriginMethod",ng="\0__throttleRate",ig="\0__throttleType";function rg(t,e,n){var i,r,o,a,s,l=0,u=0,h=null;function c(){u=(new Date).getTime(),h=null,t.apply(o,a||[])}e=e||0;var p=function(){for(var t=[],p=0;p=0?c():h=setTimeout(c,-r),l=i};return p.clear=function(){h&&(clearTimeout(h),h=null)},p.debounceNextCall=function(t){s=t},p}function og(t,e,n,i){var r=t[e];if(r){var o=r[eg]||r,a=r[ig];if(r[ng]!==n||a!==i){if(null==n||!i)return t[e]=o;(r=t[e]=rg(o,n,"debounce"===i))[eg]=o,r[ig]=i,r[ng]=n}return r}}function ag(t,e){var n=t[e];n&&n[eg]&&(n.clear&&n.clear(),t[e]=n[eg])}var sg=bo(),lg={itemStyle:Vo(qh,!0),lineStyle:Vo(Yh,!0)},ug={lineStyle:"stroke",itemStyle:"fill"};function hg(t,e){var n=t.visualStyleMapper||lg[e];return n||(console.warn("Unknown style type '"+e+"'."),lg.itemStyle)}function cg(t,e){var n=t.visualDrawType||ug[e];return n||(console.warn("Unknown style type '"+e+"'."),"fill")}var pg={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var n=t.getData(),i=t.visualStyleAccessPath||"itemStyle",r=t.getModel(i),o=hg(t,i)(r),a=r.getShallow("decal");a&&(n.setVisual("decal",a),a.dirty=!0);var s=cg(t,i),l=o[s],u=U(l)?l:null,h="auto"===o.fill||"auto"===o.stroke;if(!o[s]||u||h){var c=t.getColorFromPalette(t.name,null,e.getSeriesCount());o[s]||(o[s]=c,n.setVisual("colorFromPalette",!0)),o.fill="auto"===o.fill||U(o.fill)?c:o.fill,o.stroke="auto"===o.stroke||U(o.stroke)?c:o.stroke}if(n.setVisual("style",o),n.setVisual("drawType",s),!e.isSeriesFiltered(t)&&u)return n.setVisual("colorFromPalette",!1),{dataEach:function(e,n){var i=t.getDataParams(n),r=k({},o);r[s]=u(i),e.setItemVisual(n,"style",r)}}}},dg=new Qh,fg={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(!t.ignoreStyleOnData&&!e.isSeriesFiltered(t)){var n=t.getData(),i=t.visualStyleAccessPath||"itemStyle",r=hg(t,i),o=n.getVisual("drawType");return{dataEach:n.hasItemOption?function(t,e){var n=t.getRawDataItem(e);if(n&&n[i]){dg.option=n[i];var a=r(dg);k(t.ensureUniqueItemVisual(e,"style"),a),dg.option.decal&&(t.setItemVisual(e,"decal",dg.option.decal),dg.option.decal.dirty=!0),o in a&&t.setItemVisual(e,"colorFromPalette",!1)}}:null}}}},gg={performRawSeries:!0,overallReset:function(t){var e=gt();t.eachSeries((function(t){var n=t.getColorBy();if(!t.isColorBySeries()){var i=t.type+"-"+n,r=e.get(i);r||(r={},e.set(i,r)),sg(t).scope=r}})),t.eachSeries((function(e){if(!e.isColorBySeries()&&!t.isSeriesFiltered(e)){var n=e.getRawData(),i={},r=e.getData(),o=sg(e).scope,a=e.visualStyleAccessPath||"itemStyle",s=cg(e,a);r.each((function(t){var e=r.getRawIndex(t);i[e]=t})),n.each((function(t){var a=i[t];if(r.getItemVisual(a,"colorFromPalette")){var l=r.ensureUniqueItemVisual(a,"style"),u=n.getName(t)||t+"",h=n.count();l[s]=e.getColorFromPalette(u,o,h)}}))}}))}},vg=Math.PI;var yg=function(){function t(t,e,n,i){this._stageTaskMap=gt(),this.ecInstance=t,this.api=e,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}return t.prototype.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each((function(t){var e=t.overallTask;e&&e.dirty()}))},t.prototype.getPerformArgs=function(t,e){if(t.__pipeline){var n=this._pipelineMap.get(t.__pipeline.id),i=n.context,r=!e&&n.progressiveEnabled&&(!i||i.progressiveRender)&&t.__idxInPipeline>n.blockIndex?n.step:null,o=i&&i.modDataCount;return{step:r,modBy:null!=o?Math.ceil(o/r):null,modDataCount:o}}},t.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},t.prototype.updateStreamModes=function(t,e){var n=this._pipelineMap.get(t.uid),i=t.getData().count(),r=n.progressiveEnabled&&e.incrementalPrepareRender&&i>=n.threshold,o=t.get("large")&&i>=t.get("largeThreshold"),a="mod"===t.get("progressiveChunkMode")?i:null;t.pipelineContext=n.context={progressiveRender:r,modDataCount:a,large:o}},t.prototype.restorePipelines=function(t){var e=this,n=e._pipelineMap=gt();t.eachSeries((function(t){var i=t.getProgressive(),r=t.uid;n.set(r,{id:r,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:i&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),e._pipe(t,t.dataTask)}))},t.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.api.getModel(),n=this.api;z(this._allHandlers,(function(i){var r=t.get(i.uid)||t.set(i.uid,{}),o="";st(!(i.reset&&i.overallReset),o),i.reset&&this._createSeriesStageTask(i,r,e,n),i.overallReset&&this._createOverallStageTask(i,r,e,n)}),this)},t.prototype.prepareView=function(t,e,n,i){var r=t.renderTask,o=r.context;o.model=e,o.ecModel=n,o.api=i,r.__block=!t.incrementalPrepareRender,this._pipe(e,r)},t.prototype.performDataProcessorTasks=function(t,e){this._performStageTasks(this._dataProcessorHandlers,t,e,{block:!0})},t.prototype.performVisualTasks=function(t,e,n){this._performStageTasks(this._visualHandlers,t,e,n)},t.prototype._performStageTasks=function(t,e,n,i){i=i||{};var r=!1,o=this;function a(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}z(t,(function(t,s){if(!i.visualType||i.visualType===t.visualType){var l=o._stageTaskMap.get(t.uid),u=l.seriesTaskMap,h=l.overallTask;if(h){var c,p=h.agentStubMap;p.each((function(t){a(i,t)&&(t.dirty(),c=!0)})),c&&h.dirty(),o.updatePayload(h,n);var d=o.getPerformArgs(h,i.block);p.each((function(t){t.perform(d)})),h.perform(d)&&(r=!0)}else u&&u.each((function(s,l){a(i,s)&&s.dirty();var u=o.getPerformArgs(s,i.block);u.skip=!t.performRawSeries&&e.isSeriesFiltered(s.context.model),o.updatePayload(s,n),s.perform(u)&&(r=!0)}))}})),this.unfinished=r||this.unfinished},t.prototype.performSeriesTasks=function(t){var e;t.eachSeries((function(t){e=t.dataTask.perform()||e})),this.unfinished=e||this.unfinished},t.prototype.plan=function(){this._pipelineMap.each((function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)}))},t.prototype.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)},t.prototype._createSeriesStageTask=function(t,e,n,i){var r=this,o=e.seriesTaskMap,a=e.seriesTaskMap=gt(),s=t.seriesType,l=t.getTargetSeries;function u(e){var s=e.uid,l=a.set(s,o&&o.get(s)||Zd({plan:bg,reset:Sg,count:Ig}));l.context={model:e,ecModel:n,api:i,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:r},r._pipe(e,l)}t.createOnAllSeries?n.eachRawSeries(u):s?n.eachRawSeriesByType(s,u):l&&l(n,i).each(u)},t.prototype._createOverallStageTask=function(t,e,n,i){var r=this,o=e.overallTask=e.overallTask||Zd({reset:mg});o.context={ecModel:n,api:i,overallReset:t.overallReset,scheduler:r};var a=o.agentStubMap,s=o.agentStubMap=gt(),l=t.seriesType,u=t.getTargetSeries,h=!0,c=!1,p="";function d(t){var e=t.uid,n=s.set(e,a&&a.get(e)||(c=!0,Zd({reset:_g,onDirty:wg})));n.context={model:t,overallProgress:h},n.agent=o,n.__block=h,r._pipe(t,n)}st(!t.createOnAllSeries,p),l?n.eachRawSeriesByType(l,d):u?u(n,i).each(d):(h=!1,z(n.getSeries(),d)),c&&o.dirty()},t.prototype._pipe=function(t,e){var n=t.uid,i=this._pipelineMap.get(n);!i.head&&(i.head=e),i.tail&&i.tail.pipe(e),i.tail=e,e.__idxInPipeline=i.count++,e.__pipeline=i},t.wrapStageHandler=function(t,e){return U(t)&&(t={overallReset:t,seriesType:Tg(t)}),t.uid=tc("stageHandler"),e&&(t.visualType=e),t},t}();function mg(t){t.overallReset(t.ecModel,t.api,t.payload)}function _g(t){return t.overallProgress&&xg}function xg(){this.agent.dirty(),this.getDownstream().dirty()}function wg(){this.agent&&this.agent.dirty()}function bg(t){return t.plan?t.plan(t.model,t.ecModel,t.api,t.payload):null}function Sg(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=uo(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?E(e,(function(t,e){return Cg(e)})):Mg}var Mg=Cg(0);function Cg(t){return function(e,n){var i=n.data,r=n.resetDefines[t];if(r&&r.dataEach)for(var o=e.start;o0&&h===r.length-u.length){var c=r.slice(0,h);"data"!==c&&(e.mainType=c,e[u.toLowerCase()]=t,s=!0)}}a.hasOwnProperty(r)&&(n[r]=t,s=!0),s||(i[r]=t)}))}return{cptQuery:e,dataQuery:n,otherQuery:i}},t.prototype.filter=function(t,e){var n=this.eventInfo;if(!n)return!0;var i=n.targetEl,r=n.packedEvent,o=n.model,a=n.view;if(!o||!a)return!0;var s=e.cptQuery,l=e.dataQuery;return u(s,o,"mainType")&&u(s,o,"subType")&&u(s,o,"index","componentIndex")&&u(s,o,"name")&&u(s,o,"id")&&u(l,r,"name")&&u(l,r,"dataIndex")&&u(l,r,"dataType")&&(!a.filterForExposedEvent||a.filterForExposedEvent(t,e.otherQuery,i,r));function u(t,e,n,i){return null==t[n]||e[i||n]===t[n]}},t.prototype.afterTrigger=function(){this.eventInfo=null},t}(),Fg=["symbol","symbolSize","symbolRotate","symbolOffset"],Hg=Fg.concat(["symbolKeepAspect"]),Wg={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var n=t.getData();if(t.legendIcon&&n.setVisual("legendIcon",t.legendIcon),t.hasSymbolVisual){for(var i={},r={},o=!1,a=0;a=0&&sv(l)?l:.5,t.createRadialGradient(a,s,0,a,s,l)}(t,e,n):function(t,e,n){var i=null==e.x?0:e.x,r=null==e.x2?1:e.x2,o=null==e.y?0:e.y,a=null==e.y2?0:e.y2;return e.global||(i=i*n.width+n.x,r=r*n.width+n.x,o=o*n.height+n.y,a=a*n.height+n.y),i=sv(i)?i:0,r=sv(r)?r:1,o=sv(o)?o:0,a=sv(a)?a:0,t.createLinearGradient(i,o,r,a)}(t,e,n),r=e.colorStops,o=0;o0&&(e=i.lineDash,n=i.lineWidth,e&&"solid"!==e&&n>0?"dashed"===e?[4*n,2*n]:"dotted"===e?[n]:X(e)?[e]:G(e)?e:null:null),o=i.lineDashOffset;if(r){var a=i.strokeNoScale&&t.getLineScale?t.getLineScale():1;a&&1!==a&&(r=E(r,(function(t){return t/a})),o/=a)}return[r,o]}var pv=new Ua(!0);function dv(t){var e=t.stroke;return!(null==e||"none"===e||!(t.lineWidth>0))}function fv(t){return"string"==typeof t&&"none"!==t}function gv(t){var e=t.fill;return null!=e&&"none"!==e}function vv(t,e){if(null!=e.fillOpacity&&1!==e.fillOpacity){var n=t.globalAlpha;t.globalAlpha=e.fillOpacity*e.opacity,t.fill(),t.globalAlpha=n}else t.fill()}function yv(t,e){if(null!=e.strokeOpacity&&1!==e.strokeOpacity){var n=t.globalAlpha;t.globalAlpha=e.strokeOpacity*e.opacity,t.stroke(),t.globalAlpha=n}else t.stroke()}function mv(t,e,n){var i=Uo(e.image,e.__image,n);if(Yo(i)){var r=t.createPattern(i,e.repeat||"repeat");if("function"==typeof DOMMatrix&&r&&r.setTransform){var o=new DOMMatrix;o.translateSelf(e.x||0,e.y||0),o.rotateSelf(0,0,(e.rotation||0)*wt),o.scaleSelf(e.scaleX||1,e.scaleY||1),r.setTransform(o)}return r}}var _v=["shadowBlur","shadowOffsetX","shadowOffsetY"],xv=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function wv(t,e,n,i,r){var o=!1;if(!i&&e===(n=n||{}))return!1;if(i||e.opacity!==n.opacity){Mv(t,r),o=!0;var a=Math.max(Math.min(e.opacity,1),0);t.globalAlpha=isNaN(a)?aa.opacity:a}(i||e.blend!==n.blend)&&(o||(Mv(t,r),o=!0),t.globalCompositeOperation=e.blend||aa.blend);for(var s=0;s<_v.length;s++){var l=_v[s];(i||e[l]!==n[l])&&(o||(Mv(t,r),o=!0),t[l]=t.dpr*(e[l]||0))}return(i||e.shadowColor!==n.shadowColor)&&(o||(Mv(t,r),o=!0),t.shadowColor=e.shadowColor||aa.shadowColor),o}function bv(t,e,n,i,r){var o=Cv(e,r.inHover),a=i?null:n&&Cv(n,r.inHover)||{};if(o===a)return!1;var s=wv(t,o,a,i,r);if((i||o.fill!==a.fill)&&(s||(Mv(t,r),s=!0),fv(o.fill)&&(t.fillStyle=o.fill)),(i||o.stroke!==a.stroke)&&(s||(Mv(t,r),s=!0),fv(o.stroke)&&(t.strokeStyle=o.stroke)),(i||o.opacity!==a.opacity)&&(s||(Mv(t,r),s=!0),t.globalAlpha=null==o.opacity?1:o.opacity),e.hasStroke()){var l=o.lineWidth/(o.strokeNoScale&&e.getLineScale?e.getLineScale():1);t.lineWidth!==l&&(s||(Mv(t,r),s=!0),t.lineWidth=l)}for(var u=0;u0&&t.unfinished);t.unfinished||this._zr.flush()}}},e.prototype.getDom=function(){return this._dom},e.prototype.getId=function(){return this.id},e.prototype.getZr=function(){return this._zr},e.prototype.isSSR=function(){return this._ssr},e.prototype.setOption=function(t,e,n){if(!this[Hv])if(this._disposed)my(this.id);else{var i,r,o;if(j(e)&&(n=e.lazyUpdate,i=e.silent,r=e.replaceMerge,o=e.transition,e=e.notMerge),this[Hv]=!0,!this._model||e){var a=new jp(this._api),s=this._theme,l=this._model=new Vp;l.scheduler=this._scheduler,l.ssr=this._ssr,l.init(null,null,null,s,this._locale,a)}this._model.setOption(t,{replaceMerge:r},by);var u={seriesTransition:o,optionChanged:!0};if(n)this[Wv]={silent:i,updateParams:u},this[Hv]=!1,this.getZr().wakeUp();else{try{qv(this),Qv.update.call(this,null,u)}catch(t){throw this[Wv]=null,this[Hv]=!1,t}this._ssr||this._zr.flush(),this[Wv]=null,this[Hv]=!1,ny.call(this,i),iy.call(this,i)}}},e.prototype.setTheme=function(){ro()},e.prototype.getModel=function(){return this._model},e.prototype.getOption=function(){return this._model&&this._model.getOption()},e.prototype.getWidth=function(){return this._zr.getWidth()},e.prototype.getHeight=function(){return this._zr.getHeight()},e.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||r.hasGlobalWindow&&window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(t){return this.renderToCanvas(t)},e.prototype.renderToCanvas=function(t){t=t||{};var e=this._zr.painter;return e.getRenderedCanvas({backgroundColor:t.backgroundColor||this._model.get("backgroundColor"),pixelRatio:t.pixelRatio||this.getDevicePixelRatio()})},e.prototype.renderToSVGString=function(t){t=t||{};var e=this._zr.painter;return e.renderToString({useViewBox:t.useViewBox})},e.prototype.getSvgDataURL=function(){if(r.svgSupported){var t=this._zr;return z(t.storage.getDisplayList(),(function(t){t.stopAnimation(null,!0)})),t.painter.toDataURL()}},e.prototype.getDataURL=function(t){if(!this._disposed){var e=(t=t||{}).excludeComponents,n=this._model,i=[],r=this;z(e,(function(t){n.eachComponent({mainType:t},(function(t){var e=r._componentsMap[t.__viewId];e.group.ignore||(i.push(e),e.group.ignore=!0)}))}));var o="svg"===this._zr.painter.getType()?this.getSvgDataURL():this.renderToCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return z(i,(function(t){t.group.ignore=!1})),o}my(this.id)},e.prototype.getConnectedDataURL=function(t){if(!this._disposed){var e="svg"===t.type,n=this.group,i=Math.min,r=Math.max,o=1/0;if(Ty[n]){var a=o,s=o,l=-1/0,u=-1/0,c=[],p=t&&t.pixelRatio||this.getDevicePixelRatio();z(Iy,(function(o,h){if(o.group===n){var p=e?o.getZr().painter.getSvgDom().innerHTML:o.renderToCanvas(I(t)),d=o.getDom().getBoundingClientRect();a=i(d.left,a),s=i(d.top,s),l=r(d.right,l),u=r(d.bottom,u),c.push({dom:p,left:d.left,top:d.top})}}));var d=(l*=p)-(a*=p),f=(u*=p)-(s*=p),g=h.createCanvas(),v=Or(g,{renderer:e?"svg":"canvas"});if(v.resize({width:d,height:f}),e){var y="";return z(c,(function(t){var e=t.left-a,n=t.top-s;y+=''+t.dom+""})),v.painter.getSvgRoot().innerHTML=y,t.connectedBackgroundColor&&v.painter.setBackgroundColor(t.connectedBackgroundColor),v.refreshImmediately(),v.painter.toDataURL()}return t.connectedBackgroundColor&&v.add(new bs({shape:{x:0,y:0,width:d,height:f},style:{fill:t.connectedBackgroundColor}})),z(c,(function(t){var e=new gs({style:{x:t.left*p-a,y:t.top*p-s,image:t.dom}});v.add(e)})),v.refreshImmediately(),g.toDataURL("image/"+(t&&t.type||"png"))}return this.getDataURL(t)}my(this.id)},e.prototype.convertToPixel=function(t,e){return Jv(this,"convertToPixel",t,e)},e.prototype.convertFromPixel=function(t,e){return Jv(this,"convertFromPixel",t,e)},e.prototype.containPixel=function(t,e){var n;if(!this._disposed)return z(Mo(this._model,t),(function(t,i){i.indexOf("Models")>=0&&z(t,(function(t){var r=t.coordinateSystem;if(r&&r.containPoint)n=n||!!r.containPoint(e);else if("seriesModels"===i){var o=this._chartsMap[t.__viewId];o&&o.containPoint&&(n=n||o.containPoint(e,t))}else 0}),this)}),this),!!n;my(this.id)},e.prototype.getVisual=function(t,e){var n=Mo(this._model,t,{defaultMainType:"series"}),i=n.seriesModel;var r=i.getData(),o=n.hasOwnProperty("dataIndexInside")?n.dataIndexInside:n.hasOwnProperty("dataIndex")?r.indexOfRawIndex(n.dataIndex):null;return null!=o?function(t,e,n){switch(n){case"color":return t.getItemVisual(e,"style")[t.getVisual("drawType")];case"opacity":return t.getItemVisual(e,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return t.getItemVisual(e,n)}}(r,o,e):Ug(r,e)},e.prototype.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},e.prototype.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]},e.prototype._initEvents=function(){var t,e,n,i=this;z(yy,(function(t){var e=function(e){var n,r=i.getModel(),o=e.target,a="globalout"===t;if(a?n={}:o&&Yg(o,(function(t){var e=Bs(t);if(e&&null!=e.dataIndex){var i=e.dataModel||r.getSeriesByIndex(e.seriesIndex);return n=i&&i.getDataParams(e.dataIndex,e.dataType)||{},!0}if(e.eventData)return n=k({},e.eventData),!0}),!0),n){var s=n.componentType,l=n.componentIndex;"markLine"!==s&&"markPoint"!==s&&"markArea"!==s||(s="series",l=n.seriesIndex);var u=s&&null!=l&&r.getComponent(s,l),h=u&&i["series"===u.mainType?"_chartsMap":"_componentsMap"][u.__viewId];0,n.event=e,n.type=t,i._$eventProcessor.eventInfo={targetEl:o,packedEvent:n,model:u,view:h},i.trigger(t,n)}};e.zrEventfulCallAtLast=!0,i._zr.on(t,e,i)})),z(xy,(function(t,e){i._messageCenter.on(e,(function(t){this.trigger(e,t)}),i)})),z(["selectchanged"],(function(t){i._messageCenter.on(t,(function(e){this.trigger(t,e)}),i)})),t=this._messageCenter,e=this,n=this._api,t.on("selectchanged",(function(t){var i=n.getModel();t.isFromClick?(Zg("map","selectchanged",e,i,t),Zg("pie","selectchanged",e,i,t)):"select"===t.fromAction?(Zg("map","selected",e,i,t),Zg("pie","selected",e,i,t)):"unselect"===t.fromAction&&(Zg("map","unselected",e,i,t),Zg("pie","unselected",e,i,t))}))},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){this._disposed?my(this.id):this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed)my(this.id);else{this._disposed=!0,this.getDom()&&ko(this.getDom(),Ay,"");var t=this,e=t._api,n=t._model;z(t._componentsViews,(function(t){t.dispose(n,e)})),z(t._chartsViews,(function(t){t.dispose(n,e)})),t._zr.dispose(),t._dom=t._model=t._chartsMap=t._componentsMap=t._chartsViews=t._componentsViews=t._scheduler=t._api=t._zr=t._throttledZrFlush=t._theme=t._coordSysMgr=t._messageCenter=null,delete Iy[t.id]}},e.prototype.resize=function(t){if(!this[Hv])if(this._disposed)my(this.id);else{this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),e){var n=e.resetOption("media"),i=t&&t.silent;this[Wv]&&(null==i&&(i=this[Wv].silent),n=!0,this[Wv]=null),this[Hv]=!0;try{n&&qv(this),Qv.update.call(this,{type:"resize",animation:k({duration:0},t&&t.animation)})}catch(t){throw this[Hv]=!1,t}this[Hv]=!1,ny.call(this,i),iy.call(this,i)}}},e.prototype.showLoading=function(t,e){if(this._disposed)my(this.id);else if(j(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),Cy[t]){var n=Cy[t](this._api,e),i=this._zr;this._loadingFX=n,i.add(n)}},e.prototype.hideLoading=function(){this._disposed?my(this.id):(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},e.prototype.makeActionFromEvent=function(t){var e=k({},t);return e.type=xy[t.type],e},e.prototype.dispatchAction=function(t,e){if(this._disposed)my(this.id);else if(j(e)||(e={silent:!!e}),_y[t.type]&&this._model)if(this[Hv])this._pendingActions.push(t);else{var n=e.silent;ey.call(this,t,n);var i=e.flush;i?this._zr.flush():!1!==i&&r.browser.weChat&&this._throttledZrFlush(),ny.call(this,n),iy.call(this,n)}},e.prototype.updateLabelLayout=function(){Nv.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},e.prototype.appendData=function(t){if(this._disposed)my(this.id);else{var e=t.seriesIndex,n=this.getModel().getSeriesByIndex(e);0,n.appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp()}},e.internalField=function(){function t(t){t.clearColorPalette(),t.eachSeries((function(t){t.clearColorPalette()}))}function e(t){for(var e=[],n=t.currentStates,i=0;i0?{duration:o,delay:i.get("delay"),easing:i.get("easing")}:null;n.eachRendered((function(t){if(t.states&&t.states.emphasis){if(qu(t))return;if(t instanceof hs&&function(t){var e=Hs(t);e.normalFill=t.style.fill,e.normalStroke=t.style.stroke;var n=t.states.select||{};e.selectFill=n.style&&n.style.fill||null,e.selectStroke=n.style&&n.style.stroke||null}(t),t.__dirty){var n=t.prevStates;n&&t.useStates(n)}if(r){t.stateTransition=a;var i=t.getTextContent(),o=t.getTextGuideLine();i&&(i.stateTransition=a),o&&(o.stateTransition=a)}t.__dirty&&e(t)}}))}qv=function(t){var e=t._scheduler;e.restorePipelines(t._model),e.prepareStageTasks(),Kv(t,!0),Kv(t,!1),e.plan()},Kv=function(t,e){for(var n=t._model,i=t._scheduler,r=e?t._componentsViews:t._chartsViews,o=e?t._componentsMap:t._chartsMap,a=t._zr,s=t._api,l=0;le.get("hoverLayerThreshold")&&!r.node&&!r.worker&&e.eachSeries((function(e){if(!e.preventUsingHoverLayer){var n=t._chartsMap[e.__viewId];n.__alive&&n.eachRendered((function(t){t.states.emphasis&&(t.states.emphasis.hoverLayer=!0)}))}}))}(t,e),Nv.trigger("series:afterupdate",e,n,l)},cy=function(t){t[Gv]=!0,t.getZr().wakeUp()},py=function(t){t[Gv]&&(t.getZr().storage.traverse((function(t){qu(t)||e(t)})),t[Gv]=!1)},uy=function(t){return new(function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return n(i,e),i.prototype.getCoordinateSystems=function(){return t._coordSysMgr.getCoordinateSystems()},i.prototype.getComponentByElement=function(e){for(;e;){var n=e.__ecComponentInfo;if(null!=n)return t._model.getComponent(n.mainType,n.index);e=e.parent}},i.prototype.enterEmphasis=function(e,n){dl(e,n),cy(t)},i.prototype.leaveEmphasis=function(e,n){fl(e,n),cy(t)},i.prototype.enterBlur=function(e){gl(e),cy(t)},i.prototype.leaveBlur=function(e){vl(e),cy(t)},i.prototype.enterSelect=function(e){yl(e),cy(t)},i.prototype.leaveSelect=function(e){ml(e),cy(t)},i.prototype.getModel=function(){return t.getModel()},i.prototype.getViewOfComponentModel=function(e){return t.getViewOfComponentModel(e)},i.prototype.getViewOfSeriesModel=function(e){return t.getViewOfSeriesModel(e)},i}(Up))(t)},hy=function(t){function e(t,e){for(var n=0;n=0)){Uy.push(n);var o=yg.wrapStageHandler(n,r);o.__prio=e,o.__raw=n,t.push(o)}}function Yy(t,e){Cy[t]=e}function Xy(t,e,n){var i=Ev("registerMap");i&&i(t,e,n)}var jy=function(t){var e=(t=I(t)).type,n="";e||oo(n);var i=e.split(":");2!==i.length&&oo(n);var r=!1;"echarts"===i[0]&&(e=i[1],r=!0),t.__isBuiltIn=r,ef.set(e,t)};Gy(Bv,pg),Gy(Vv,fg),Gy(Vv,gg),Gy(Bv,Wg),Gy(Vv,Gg),Gy(7e3,(function(t,e){t.eachRawSeries((function(n){if(!t.isSeriesFiltered(n)){var i=n.getData();i.hasItemVisual()&&i.each((function(t){var n=i.getItemVisual(t,"decal");n&&(i.ensureUniqueItemVisual(t,"style").decal=Pv(n,e))}));var r=i.getVisual("decal");if(r)i.getVisual("style").decal=Pv(r,e)}}))})),Ny(gd),zy(900,(function(t){var e=gt();t.eachSeries((function(t){var n=t.get("stack");if(n){var i=e.get(n)||e.set(n,[]),r=t.getData(),o={stackResultDimension:r.getCalculationInfo("stackResultDimension"),stackedOverDimension:r.getCalculationInfo("stackedOverDimension"),stackedDimension:r.getCalculationInfo("stackedDimension"),stackedByDimension:r.getCalculationInfo("stackedByDimension"),isStackedByIndex:r.getCalculationInfo("isStackedByIndex"),data:r,seriesModel:t};if(!o.stackedDimension||!o.isStackedByIndex&&!o.stackedByDimension)return;i.length&&r.setCalculationInfo("stackedOnSeries",i[i.length-1].seriesModel),i.push(o)}})),e.each(vd)})),Yy("default",(function(t,e){A(e=e||{},{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var n=new kr,i=new bs({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});n.add(i);var r,o=new Cs({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily},zlevel:e.zlevel,z:10001}),a=new bs({style:{fill:"none"},textContent:o,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});return n.add(a),e.showSpinner&&((r=new Lu({shape:{startAngle:-vg/2,endAngle:-vg/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001})).animateShape(!0).when(1e3,{endAngle:3*vg/2}).start("circularInOut"),r.animateShape(!0).when(1e3,{startAngle:3*vg/2}).delay(300).start("circularInOut"),n.add(r)),n.resize=function(){var n=o.getBoundingRect().width,s=e.showSpinner?e.spinnerRadius:0,l=(t.getWidth()-2*s-(e.showSpinner&&n?10:0)-n)/2-(e.showSpinner&&n?0:5+n/2)+(e.showSpinner?0:n/2)+(n?0:s),u=t.getHeight()/2;e.showSpinner&&r.setShape({cx:l,cy:u}),a.setShape({x:l-s,y:u-s,width:2*s,height:2*s}),i.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},n.resize(),n})),Fy({type:Zs,event:Zs,update:Zs},xt),Fy({type:Ys,event:Ys,update:Ys},xt),Fy({type:Xs,event:Xs,update:Xs},xt),Fy({type:js,event:js,update:js},xt),Fy({type:qs,event:qs,update:qs},xt),Ry("light",Og),Ry("dark",Bg);var qy=[],Ky={registerPreprocessor:Ny,registerProcessor:zy,registerPostInit:Ey,registerPostUpdate:By,registerUpdateLifecycle:Vy,registerAction:Fy,registerCoordinateSystem:Hy,registerLayout:Wy,registerVisual:Gy,registerTransform:jy,registerLoading:Yy,registerMap:Xy,registerImpl:function(t,e){zv[t]=e},PRIORITY:Fv,ComponentModel:sp,ComponentView:Zf,SeriesModel:Ef,ChartView:qf,registerComponentModel:function(t){sp.registerClass(t)},registerComponentView:function(t){Zf.registerClass(t)},registerSeriesModel:function(t){Ef.registerClass(t)},registerChartView:function(t){qf.registerClass(t)},registerSubTypeDefaulter:function(t,e){sp.registerSubTypeDefaulter(t,e)},registerPainter:function(t,e){Rr(t,e)}};function $y(t){G(t)?z(t,(function(t){$y(t)})):L(qy,t)>=0||(qy.push(t),U(t)&&(t={install:t}),t.install(Ky))}function Qy(t){return null==t?0:t.length||1}function Jy(t){return t}var tm=function(){function t(t,e,n,i,r,o){this._old=t,this._new=e,this._oldKeyGetter=n||Jy,this._newKeyGetter=i||Jy,this.context=r,this._diffModeMultiple="multiple"===o}return t.prototype.add=function(t){return this._add=t,this},t.prototype.update=function(t){return this._update=t,this},t.prototype.updateManyToOne=function(t){return this._updateManyToOne=t,this},t.prototype.updateOneToMany=function(t){return this._updateOneToMany=t,this},t.prototype.updateManyToMany=function(t){return this._updateManyToMany=t,this},t.prototype.remove=function(t){return this._remove=t,this},t.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},t.prototype._executeOneToOne=function(){var t=this._old,e=this._new,n={},i=new Array(t.length),r=new Array(e.length);this._initIndexMap(t,null,i,"_oldKeyGetter"),this._initIndexMap(e,n,r,"_newKeyGetter");for(var o=0;o1){var u=s.shift();1===s.length&&(n[a]=s[0]),this._update&&this._update(u,o)}else 1===l?(n[a]=null,this._update&&this._update(s,o)):this._remove&&this._remove(o)}this._performRestAdd(r,n)},t.prototype._executeMultiple=function(){var t=this._old,e=this._new,n={},i={},r=[],o=[];this._initIndexMap(t,n,r,"_oldKeyGetter"),this._initIndexMap(e,i,o,"_newKeyGetter");for(var a=0;a1&&1===c)this._updateManyToOne&&this._updateManyToOne(u,l),i[s]=null;else if(1===h&&c>1)this._updateOneToMany&&this._updateOneToMany(u,l),i[s]=null;else if(1===h&&1===c)this._update&&this._update(u,l),i[s]=null;else if(h>1&&c>1)this._updateManyToMany&&this._updateManyToMany(u,l),i[s]=null;else if(h>1)for(var p=0;p1)for(var a=0;a30}var cm,pm,dm,fm,gm,vm,ym,mm=j,_m=E,xm="undefined"==typeof Int32Array?Array:Int32Array,wm=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],bm=["_approximateExtent"],Sm=function(){function t(t,e){var n;this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","lttbDownSample"];var i=!1;sm(t)?(n=t.dimensions,this._dimOmitted=t.isDimensionOmitted(),this._schema=t):(i=!0,n=t),n=n||["x","y"];for(var r={},o=[],a={},s=!1,l={},u=0;u=e)){var n=this._store.getProvider();this._updateOrdinalMeta();var i=this._nameList,r=this._idList;if(n.getSource().sourceFormat===pp&&!n.pure)for(var o=[],a=t;a0},t.prototype.ensureUniqueItemVisual=function(t,e){var n=this._itemVisuals,i=n[t];i||(i=n[t]={});var r=i[e];return null==r&&(G(r=this.getVisual(e))?r=r.slice():mm(r)&&(r=k({},r)),i[e]=r),r},t.prototype.setItemVisual=function(t,e,n){var i=this._itemVisuals[t]||{};this._itemVisuals[t]=i,mm(e)?k(i,e):i[e]=n},t.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},t.prototype.setLayout=function(t,e){mm(t)?k(this._layout,t):this._layout[t]=e},t.prototype.getLayout=function(t){return this._layout[t]},t.prototype.getItemLayout=function(t){return this._itemLayouts[t]},t.prototype.setItemLayout=function(t,e,n){this._itemLayouts[t]=n?k(this._itemLayouts[t]||{},e):e},t.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},t.prototype.setItemGraphicEl=function(t,e){!function(t,e,n,i){if(i){var r=Bs(i);r.dataIndex=n,r.dataType=e,r.seriesIndex=t,"group"===i.type&&i.traverse((function(i){var r=Bs(i);r.seriesIndex=t,r.dataIndex=n,r.dataType=e}))}}(this.hostModel&&this.hostModel.seriesIndex,this.dataType,t,e),this._graphicEls[t]=e},t.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},t.prototype.eachItemGraphicEl=function(t,e){z(this._graphicEls,(function(n,i){n&&t&&t.call(e,n,i)}))},t.prototype.cloneShallow=function(e){return e||(e=new t(this._schema?this._schema:_m(this.dimensions,this._getDimInfo,this),this.hostModel)),gm(e,this),e._store=this._store,e},t.prototype.wrapMethod=function(t,e){var n=this[t];U(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var t=n.apply(this,arguments);return e.apply(this,[t].concat(ot(arguments)))})},t.internalField=(cm=function(t){var e=t._invertedIndicesMap;z(e,(function(n,i){var r=t._dimInfos[i],o=r.ordinalMeta,a=t._store;if(o){n=e[i]=new xm(o.categories.length);for(var s=0;s1&&(s+="__ec__"+u),i[e]=s}})),t}();function Mm(t,e){Sd(t)||(t=Cd(t));var n=(e=e||{}).coordDimensions||[],i=e.dimensionsDefine||t.dimensionsDefine||[],r=gt(),o=[],a=function(t,e,n,i){var r=Math.max(t.dimensionsDetectedCount||1,e.length,n.length,i||0);return z(e,(function(t){var e;j(t)&&(e=t.dimsDef)&&(r=Math.max(r,e.length))})),r}(t,n,i,e.dimensionsCount),s=e.canOmitUnusedDimensions&&hm(a),l=i===t.dimensionsDefine,u=l?um(t):lm(i),h=e.encodeDefine;!h&&e.encodeDefaulter&&(h=e.encodeDefaulter(t,a));for(var c=gt(h),p=new uf(a),d=0;d0&&(i.name=r+(o-1)),o++,e.set(r,o)}}(o),new am({source:t,dimensions:o,fullDimensionCount:a,dimensionOmitted:s})}function Cm(t,e,n){if(n||e.hasKey(t)){for(var i=0;e.hasKey(t+i);)i++;t+=i}return e.set(t,!0),t}var Im=function(t){this.coordSysDims=[],this.axisMap=gt(),this.categoryAxisMap=gt(),this.coordSysName=t};var Tm={cartesian2d:function(t,e,n,i){var r=t.getReferringComponents("xAxis",Io).models[0],o=t.getReferringComponents("yAxis",Io).models[0];e.coordSysDims=["x","y"],n.set("x",r),n.set("y",o),Dm(r)&&(i.set("x",r),e.firstCategoryDimIndex=0),Dm(o)&&(i.set("y",o),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=1))},singleAxis:function(t,e,n,i){var r=t.getReferringComponents("singleAxis",Io).models[0];e.coordSysDims=["single"],n.set("single",r),Dm(r)&&(i.set("single",r),e.firstCategoryDimIndex=0)},polar:function(t,e,n,i){var r=t.getReferringComponents("polar",Io).models[0],o=r.findAxisModel("radiusAxis"),a=r.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],n.set("radius",o),n.set("angle",a),Dm(o)&&(i.set("radius",o),e.firstCategoryDimIndex=0),Dm(a)&&(i.set("angle",a),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=1))},geo:function(t,e,n,i){e.coordSysDims=["lng","lat"]},parallel:function(t,e,n,i){var r=t.ecModel,o=r.getComponent("parallel",t.get("parallelIndex")),a=e.coordSysDims=o.dimensions.slice();z(o.parallelAxisIndex,(function(t,o){var s=r.getComponent("parallelAxis",t),l=a[o];n.set(l,s),Dm(s)&&(i.set(l,s),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=o))}))}};function Dm(t){return"category"===t.get("type")}function km(t,e,n){var i,r,o,a=(n=n||{}).byIndex,s=n.stackedCoordDimension;!function(t){return!sm(t.schema)}(e)?(r=e.schema,i=r.dimensions,o=e.store):i=e;var l,u,h,c,p=!(!t||!t.get("stack"));if(z(i,(function(t,e){Z(t)&&(i[e]=t={name:t}),p&&!t.isExtraCoord&&(a||l||!t.ordinalMeta||(l=t),u||"ordinal"===t.type||"time"===t.type||s&&s!==t.coordDim||(u=t))})),!u||a||l||(a=!0),u){h="__\0ecstackresult_"+t.id,c="__\0ecstackedover_"+t.id,l&&(l.createInvertedIndices=!0);var d=u.coordDim,f=u.type,g=0;z(i,(function(t){t.coordDim===d&&g++}));var v={name:h,coordDim:d,coordDimIndex:g,type:f,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length},y={name:c,coordDim:c,coordDimIndex:g+1,type:f,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length+1};r?(o&&(v.storeDimIndex=o.ensureCalculationDimension(c,f),y.storeDimIndex=o.ensureCalculationDimension(h,f)),r.appendCalculationDimension(v),r.appendCalculationDimension(y)):(i.push(v),i.push(y))}return{stackedDimension:u&&u.name,stackedByDimension:l&&l.name,isStackedByIndex:a,stackedOverDimension:c,stackResultDimension:h}}function Am(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function Pm(t,e){return Am(t,e)?t.getCalculationInfo("stackResultDimension"):e}function Lm(t,e,n){n=n||{};var i,r=e.getSourceManager(),o=!1;t?(o=!0,i=Cd(t)):o=(i=r.getSource()).sourceFormat===pp;var a=function(t){var e=t.get("coordinateSystem"),n=new Im(e),i=Tm[e];if(i)return i(t,n,n.axisMap,n.categoryAxisMap),n}(e),s=function(t,e){var n,i=t.get("coordinateSystem"),r=Yp.get(i);return e&&e.coordSysDims&&(n=E(e.coordSysDims,(function(t){var n={name:t},i=e.axisMap.get(t);if(i){var r=i.get("type");n.type=function(t){return"category"===t?"ordinal":"time"===t?"time":"float"}(r)}return n}))),n||(n=r&&(r.getDimensionsInfo?r.getDimensionsInfo():r.dimensions.slice())||["x","y"]),n}(e,a),l=n.useEncodeDefaulter,u=U(l)?l:l?W(Mp,s,e):null,h=Mm(i,{coordDimensions:s,generateCoord:n.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!o}),c=function(t,e,n){var i,r;return n&&z(t,(function(t,o){var a=t.coordDim,s=n.categoryAxisMap.get(a);s&&(null==i&&(i=o),t.ordinalMeta=s.getOrdinalMeta(),e&&(t.createInvertedIndices=!0)),null!=t.otherDims.itemName&&(r=!0)})),r||null==i||(t[i].otherDims.itemName=0),i}(h.dimensions,n.createInvertedIndices,a),p=o?null:r.getSharedDataStore(h),d=km(e,{schema:h,store:p}),f=new Sm(h,e);f.setCalculationInfo(d);var g=null!=c&&function(t){if(t.sourceFormat===pp){return!G(po(function(t){var e=0;for(;ee[1]&&(e[1]=t[1])},t.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e)},t.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},t.prototype.isBlank=function(){return this._isBlank},t.prototype.setBlank=function(t){this._isBlank=t},t}();Bo(Om);var Rm=0,Nm=function(){function t(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++Rm}return t.createByAxisModel=function(e){var n=e.option,i=n.data,r=i&&E(i,zm);return new t({categories:r,needCollect:!r,deduplication:!1!==n.dedplication})},t.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},t.prototype.parseAndCollect=function(t){var e,n=this._needCollect;if(!Z(t)&&!n)return t;if(n&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var i=this._getOrCreateMap();return null==(e=i.get(t))&&(n?(e=this.categories.length,this.categories[e]=t,i.set(t,e)):e=NaN),e},t.prototype._getOrCreateMap=function(){return this._map||(this._map=gt(this.categories))},t}();function zm(t){return j(t)&&null!=t.value?t.value:t+""}function Em(t){return"interval"===t.type||"log"===t.type}function Bm(t,e,n,i){var r={},o=t[1]-t[0],a=r.interval=Qr(o/e,!0);null!=n&&ai&&(a=r.interval=i);var s=r.intervalPrecision=Fm(a);return function(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),Hm(t,0,e),Hm(t,1,e),t[0]>t[1]&&(t[0]=t[1])}(r.niceTickExtent=[Vr(Math.ceil(t[0]/a)*a,s),Vr(Math.floor(t[1]/a)*a,s)],t),r}function Vm(t){var e=Math.pow(10,$r(t)),n=t/e;return n?2===n?n=3:3===n?n=5:n*=2:n=1,Vr(n*e)}function Fm(t){return Hr(t)+2}function Hm(t,e,n){t[e]=Math.max(Math.min(t[e],n[1]),n[0])}function Wm(t,e){return t>=e[0]&&t<=e[1]}function Gm(t,e){return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])}function Um(t,e){return t*(e[1]-e[0])+e[0]}var Zm=function(t){function e(e){var n=t.call(this,e)||this;n.type="ordinal";var i=n.getSetting("ordinalMeta");return i||(i=new Nm({})),G(i)&&(i=new Nm({categories:E(i,(function(t){return j(t)?t.value:t}))})),n._ordinalMeta=i,n._extent=n.getSetting("extent")||[0,i.categories.length-1],n}return n(e,t),e.prototype.parse=function(t){return null==t?NaN:Z(t)?this._ordinalMeta.getOrdinal(t):Math.round(t)},e.prototype.contain=function(t){return Wm(t=this.parse(t),this._extent)&&null!=this._ordinalMeta.categories[t]},e.prototype.normalize=function(t){return Gm(t=this._getTickNumber(this.parse(t)),this._extent)},e.prototype.scale=function(t){return t=Math.round(Um(t,this._extent)),this.getRawOrdinalNumber(t)},e.prototype.getTicks=function(){for(var t=[],e=this._extent,n=e[0];n<=e[1];)t.push({value:n}),n++;return t},e.prototype.getMinorTicks=function(t){},e.prototype.setSortInfo=function(t){if(null!=t){for(var e=t.ordinalNumbers,n=this._ordinalNumbersByTick=[],i=this._ticksByOrdinalNumber=[],r=0,o=this._ordinalMeta.categories.length,a=Math.min(o,e.length);r=0&&t=0&&t=t},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.calcNiceTicks=function(){},e.prototype.calcNiceExtent=function(){},e.type="ordinal",e}(Om);Om.registerClass(Zm);var Ym=Vr,Xm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="interval",e._interval=0,e._intervalPrecision=2,e}return n(e,t),e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return Wm(t,this._extent)},e.prototype.normalize=function(t){return Gm(t,this._extent)},e.prototype.scale=function(t){return Um(t,this._extent)},e.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=parseFloat(t)),isNaN(e)||(n[1]=parseFloat(e))},e.prototype.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1]),this.setExtent(e[0],e[1])},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=Fm(t)},e.prototype.getTicks=function(t){var e=this._interval,n=this._extent,i=this._niceExtent,r=this._intervalPrecision,o=[];if(!e)return o;n[0]1e4)return[];var s=o.length?o[o.length-1].value:i[1];return n[1]>s&&(t?o.push({value:Ym(s+e,r)}):o.push({value:n[1]})),o},e.prototype.getMinorTicks=function(t){for(var e=this.getTicks(!0),n=[],i=this.getExtent(),r=1;ri[0]&&h0&&(o=null===o?s:Math.min(o,s))}n[i]=o}}return n}(t),n=[];return z(t,(function(t){var i,r=t.coordinateSystem.getBaseAxis(),o=r.getExtent();if("category"===r.type)i=r.getBandWidth();else if("value"===r.type||"time"===r.type){var a=r.dim+"_"+r.index,s=e[a],l=Math.abs(o[1]-o[0]),u=r.scale.getExtent(),h=Math.abs(u[1]-u[0]);i=s?l/h*s:l}else{var c=t.getData();i=Math.abs(o[1]-o[0])/c.count()}var p=Br(t.get("barWidth"),i),d=Br(t.get("barMaxWidth"),i),f=Br(t.get("barMinWidth")||(i_(t)?.5:1),i),g=t.get("barGap"),v=t.get("barCategoryGap");n.push({bandWidth:i,barWidth:p,barMaxWidth:d,barMinWidth:f,barGap:g,barCategoryGap:v,axisKey:Qm(r),stackId:$m(t)})})),function(t){var e={};z(t,(function(t,n){var i=t.axisKey,r=t.bandWidth,o=e[i]||{bandWidth:r,remainedWidth:r,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},a=o.stacks;e[i]=o;var s=t.stackId;a[s]||o.autoWidthCount++,a[s]=a[s]||{width:0,maxWidth:0};var l=t.barWidth;l&&!a[s].width&&(a[s].width=l,l=Math.min(o.remainedWidth,l),o.remainedWidth-=l);var u=t.barMaxWidth;u&&(a[s].maxWidth=u);var h=t.barMinWidth;h&&(a[s].minWidth=h);var c=t.barGap;null!=c&&(o.gap=c);var p=t.barCategoryGap;null!=p&&(o.categoryGap=p)}));var n={};return z(e,(function(t,e){n[e]={};var i=t.stacks,r=t.bandWidth,o=t.categoryGap;if(null==o){var a=F(i).length;o=Math.max(35-4*a,15)+"%"}var s=Br(o,r),l=Br(t.gap,1),u=t.remainedWidth,h=t.autoWidthCount,c=(u-s)/(h+(h-1)*l);c=Math.max(c,0),z(i,(function(t){var e=t.maxWidth,n=t.minWidth;if(t.width){i=t.width;e&&(i=Math.min(i,e)),n&&(i=Math.max(i,n)),t.width=i,u-=i+l*i,h--}else{var i=c;e&&ei&&(i=n),i!==c&&(t.width=i,u-=i+l*i,h--)}})),c=(u-s)/(h+(h-1)*l),c=Math.max(c,0);var p,d=0;z(i,(function(t,e){t.width||(t.width=c),p=t,d+=t.width*(1+l)})),p&&(d-=p.width*l);var f=-d/2;z(i,(function(t,i){n[e][i]=n[e][i]||{bandWidth:r,offset:f,width:t.width},f+=t.width*(1+l)}))})),n}(n)}function e_(t,e){var n=Jm(t,e),i=t_(n);z(n,(function(t){var e=t.getData(),n=t.coordinateSystem.getBaseAxis(),r=$m(t),o=i[Qm(n)][r],a=o.offset,s=o.width;e.setLayout({bandWidth:o.bandWidth,offset:a,size:s})}))}function n_(t){return t.coordinateSystem&&"cartesian2d"===t.coordinateSystem.type}function i_(t){return t.pipelineContext&&t.pipelineContext.large}var r_=function(t){function e(e){var n=t.call(this,e)||this;return n.type="time",n}return n(e,t),e.prototype.getLabel=function(t){var e=this.getSetting("useUTC");return bc(t.value,vc[function(t){switch(t){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}(xc(this._minLevelUnit))]||vc.second,e,this.getSetting("locale"))},e.prototype.getFormattedLabel=function(t,e,n){var i=this.getSetting("useUTC");return function(t,e,n,i,r){var o=null;if(Z(n))o=n;else if(U(n))o=n(t.value,e,{level:t.level});else{var a=k({},fc);if(t.level>0)for(var s=0;s=0;--s)if(l[u]){o=l[u];break}o=o||a.none}if(G(o)){var h=null==t.level?0:t.level>=0?t.level:o.length+t.level;o=o[h=Math.min(h,o.length-1)]}}return bc(new Date(t.value),o,r,i)}(t,e,n,this.getSetting("locale"),i)},e.prototype.getTicks=function(){var t=this._interval,e=this._extent,n=[];if(!t)return n;n.push({value:e[0],level:0});var i=this.getSetting("useUTC"),r=function(t,e,n,i){var r=1e4,o=mc,a=0;function s(t,e,n,r,o,a,s){for(var l=new Date(e),u=e,h=l[r]();u1&&0===u&&o.unshift({value:o[0].value-p})}}for(u=0;u=i[0]&&y<=i[1]&&c++)}var m=(i[1]-i[0])/e;if(c>1.5*m&&p>m/1.5)break;if(u.push(g),c>m||t===o[d])break}h=[]}}0;var _=V(E(u,(function(t){return V(t,(function(t){return t.value>=i[0]&&t.value<=i[1]&&!t.notAdd}))})),(function(t){return t.length>0})),x=[],w=_.length-1;for(d=0;d<_.length;++d)for(var b=_[d],S=0;Sn&&(this._approxInterval=n);var o=o_.length,a=Math.min(function(t,e,n,i){for(;n>>1;t[r][1]16?16:t>7.5?7:t>3.5?4:t>1.5?2:1}function s_(t){return(t/=2592e6)>6?6:t>3?3:t>2?2:1}function l_(t){return(t/=cc)>12?12:t>6?6:t>3.5?4:t>2?2:1}function u_(t,e){return(t/=e?hc:uc)>30?30:t>20?20:t>15?15:t>10?10:t>5?5:t>2?2:1}function h_(t){return Qr(t,!0)}function c_(t,e,n){var i=new Date(t);switch(xc(e)){case"year":case"month":i[Oc(n)](0);case"day":i[Rc(n)](1);case"hour":i[Nc(n)](0);case"minute":i[zc(n)](0);case"second":i[Ec(n)](0),i[Bc(n)](0)}return i.getTime()}Om.registerClass(r_);var p_=Om.prototype,d_=Xm.prototype,f_=Vr,g_=Math.floor,v_=Math.ceil,y_=Math.pow,m_=Math.log,__=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="log",e.base=10,e._originalScale=new Xm,e._interval=0,e}return n(e,t),e.prototype.getTicks=function(t){var e=this._originalScale,n=this._extent,i=e.getExtent();return E(d_.getTicks.call(this,t),(function(t){var e=t.value,r=Vr(y_(this.base,e));return r=e===n[0]&&this._fixMin?w_(r,i[0]):r,{value:r=e===n[1]&&this._fixMax?w_(r,i[1]):r}}),this)},e.prototype.setExtent=function(t,e){var n=m_(this.base);t=m_(Math.max(0,t))/n,e=m_(Math.max(0,e))/n,d_.setExtent.call(this,t,e)},e.prototype.getExtent=function(){var t=this.base,e=p_.getExtent.call(this);e[0]=y_(t,e[0]),e[1]=y_(t,e[1]);var n=this._originalScale.getExtent();return this._fixMin&&(e[0]=w_(e[0],n[0])),this._fixMax&&(e[1]=w_(e[1],n[1])),e},e.prototype.unionExtent=function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=m_(t[0])/m_(e),t[1]=m_(t[1])/m_(e),p_.unionExtent.call(this,t)},e.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},e.prototype.calcNiceTicks=function(t){t=t||10;var e=this._extent,n=e[1]-e[0];if(!(n===1/0||n<=0)){var i=Kr(n);for(t/n*i<=.5&&(i*=10);!isNaN(i)&&Math.abs(i)<1&&Math.abs(i)>0;)i*=10;var r=[Vr(v_(e[0]/i)*i),Vr(g_(e[1]/i)*i)];this._interval=i,this._niceExtent=r}},e.prototype.calcNiceExtent=function(t){d_.calcNiceExtent.call(this,t),this._fixMin=t.fixMin,this._fixMax=t.fixMax},e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return Wm(t=m_(t)/m_(this.base),this._extent)},e.prototype.normalize=function(t){return Gm(t=m_(t)/m_(this.base),this._extent)},e.prototype.scale=function(t){return t=Um(t,this._extent),y_(this.base,t)},e.type="log",e}(Om),x_=__.prototype;function w_(t,e){return f_(t,Hr(e))}x_.getMinorTicks=d_.getMinorTicks,x_.getLabel=d_.getLabel,Om.registerClass(__);var b_=function(){function t(t,e,n){this._prepareParams(t,e,n)}return t.prototype._prepareParams=function(t,e,n){n[1]0&&s>0&&!l&&(a=0),a<0&&s<0&&!u&&(s=0));var c=this._determinedMin,p=this._determinedMax;return null!=c&&(a=c,l=!0),null!=p&&(s=p,u=!0),{min:a,max:s,minFixed:l,maxFixed:u,isBlank:h}},t.prototype.modifyDataMinMax=function(t,e){this[M_[t]]=e},t.prototype.setDeterminedMinMax=function(t,e){var n=S_[t];this[n]=e},t.prototype.freeze=function(){this.frozen=!0},t}(),S_={min:"_determinedMin",max:"_determinedMax"},M_={min:"_dataMin",max:"_dataMax"};function C_(t,e,n){var i=t.rawExtentInfo;return i||(i=new b_(t,e,n),t.rawExtentInfo=i,i)}function I_(t,e){return null==e?null:et(e)?NaN:t.parse(e)}function T_(t,e){var n=t.type,i=C_(t,e,t.getExtent()).calculate();t.setBlank(i.isBlank);var r=i.min,o=i.max,a=e.ecModel;if(a&&"time"===n){var s=Jm("bar",a),l=!1;if(z(s,(function(t){l=l||t.getBaseAxis()===e.axis})),l){var u=t_(s),h=function(t,e,n,i){var r=n.axis.getExtent(),o=r[1]-r[0],a=function(t,e,n){if(t&&e){var i=t[Qm(e)];return null!=i&&null!=n?i[$m(n)]:i}}(i,n.axis);if(void 0===a)return{min:t,max:e};var s=1/0;z(a,(function(t){s=Math.min(t.offset,s)}));var l=-1/0;z(a,(function(t){l=Math.max(t.offset+t.width,l)})),s=Math.abs(s),l=Math.abs(l);var u=s+l,h=e-t,c=h/(1-(s+l)/o)-h;return e+=c*(l/u),t-=c*(s/u),{min:t,max:e}}(r,o,e,u);r=h.min,o=h.max}}return{extent:[r,o],fixMin:i.minFixed,fixMax:i.maxFixed}}function D_(t,e){var n=e,i=T_(t,n),r=i.extent,o=n.get("splitNumber");t instanceof __&&(t.base=n.get("logBase"));var a=t.type,s=n.get("interval"),l="interval"===a||"time"===a;t.setExtent(r[0],r[1]),t.calcNiceExtent({splitNumber:o,fixMin:i.fixMin,fixMax:i.fixMax,minInterval:l?n.get("minInterval"):null,maxInterval:l?n.get("maxInterval"):null}),null!=s&&t.setInterval&&t.setInterval(s)}function k_(t,e){if(e=e||t.get("type"))switch(e){case"category":return new Zm({ordinalMeta:t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),extent:[1/0,-1/0]});case"time":return new r_({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new(Om.getClass(e)||Xm)}}function A_(t){var e,n,i=t.getLabelModel().get("formatter"),r="category"===t.type?t.scale.getExtent()[0]:null;return"time"===t.scale.type?(n=i,function(e,i){return t.scale.getFormattedLabel(e,i,n)}):Z(i)?function(e){return function(n){var i=t.scale.getLabel(n);return e.replace("{value}",null!=i?i:"")}}(i):U(i)?(e=i,function(n,i){return null!=r&&(i=n.value-r),e(P_(t,n),i,null!=n.level?{level:n.level}:null)}):function(e){return t.scale.getLabel(e)}}function P_(t,e){return"category"===t.type?t.scale.getLabel(e):e.value}function L_(t,e){var n=e*Math.PI/180,i=t.width,r=t.height,o=i*Math.abs(Math.cos(n))+Math.abs(r*Math.sin(n)),a=i*Math.abs(Math.sin(n))+Math.abs(r*Math.cos(n));return new Le(t.x,t.y,o,a)}function O_(t){var e=t.get("interval");return null==e?"auto":e}function R_(t){return"category"===t.type&&0===O_(t.getLabelModel())}function N_(t,e){var n={};return z(t.mapDimensionsAll(e),(function(e){n[Pm(t,e)]=!0})),F(n)}var z_=function(){function t(){}return t.prototype.getNeedCrossZero=function(){return!this.option.scale},t.prototype.getCoordSysModel=function(){},t}();var E_={isDimensionStacked:Am,enableDataStack:km,getStackedDimension:Pm};var B_=Object.freeze({__proto__:null,createList:function(t){return Lm(null,t)},getLayoutRect:tp,dataStack:E_,createScale:function(t,e){var n=e;e instanceof Qh||(n=new Qh(e));var i=k_(n);return i.setExtent(t[0],t[1]),D_(i,n),i},mixinAxisModelCommonMethods:function(t){R(t,z_)},getECData:Bs,createTextStyle:function(t,e){return Oh(t,null,null,"normal"!==(e=e||{}).state)},createDimensions:function(t,e){return Mm(t,e).dimensions},createSymbol:rv,enableHoverEmphasis:Il});function V_(t,e){return Math.abs(t-e)<1e-8}function F_(t,e,n){var i=0,r=t[0];if(!r)return!1;for(var o=1;on&&(t=r,n=a)}if(t)return function(t){for(var e=0,n=0,i=0,r=t.length,o=t[r-1][0],a=t[r-1][1],s=0;s>1^-(1&s),l=l>>1^-(1&l),r=s+=r,o=l+=o,i.push([s/n,l/n])}return i}function K_(t,e){return E(V((t=function(t){if(!t.UTF8Encoding)return t;var e=t,n=e.UTF8Scale;return null==n&&(n=1024),z(e.features,(function(t){var e=t.geometry,i=e.encodeOffsets,r=e.coordinates;if(i)switch(e.type){case"LineString":e.coordinates=q_(r,i,n);break;case"Polygon":case"MultiLineString":j_(r,i,n);break;case"MultiPolygon":z(r,(function(t,e){return j_(t,i[e],n)}))}})),e.UTF8Encoding=!1,e}(t)).features,(function(t){return t.geometry&&t.properties&&t.geometry.coordinates.length>0})),(function(t){var n=t.properties,i=t.geometry,r=[];switch(i.type){case"Polygon":var o=i.coordinates;r.push(new Z_(o[0],o.slice(1)));break;case"MultiPolygon":z(i.coordinates,(function(t){t[0]&&r.push(new Z_(t[0],t.slice(1)))}));break;case"LineString":r.push(new Y_([i.coordinates]));break;case"MultiLineString":r.push(new Y_(i.coordinates))}var a=new X_(n[e||"name"],r,n.cp);return a.properties=n,a}))}var $_=Object.freeze({__proto__:null,linearMap:Er,round:Vr,asc:Fr,getPrecision:Hr,getPrecisionSafe:Wr,getPixelPrecision:Gr,getPercentWithPrecision:function(t,e,n){return t[e]&&Ur(t,n)[e]||0},MAX_SAFE_INTEGER:9007199254740991,remRadian:Yr,isRadianAroundZero:Xr,parseDate:qr,quantity:Kr,quantityExponent:$r,nice:Qr,quantile:function(t,e){var n=(t.length-1)*e+1,i=Math.floor(n),r=+t[i-1],o=n-i;return o?r+o*(t[i]-r):r},reformIntervals:function(t){t.sort((function(t,e){return s(t,e,0)?-1:1}));for(var e=-1/0,n=1,i=0;i1&&h/l>2&&(u=Math.round(Math.ceil(u/l)*l));var c=R_(t),p=a.get("showMinLabel")||c,d=a.get("showMaxLabel")||c;p&&u!==o[0]&&g(o[0]);for(var f=u;f<=o[1];f+=l)g(f);function g(t){var e={value:t};s.push(n?t:{formattedLabel:i(e),rawLabel:r.getLabel(e),tickValue:t})}return d&&f-l!==o[1]&&g(o[1]),s}function hx(t,e,n){var i=t.scale,r=A_(t),o=[];return z(i.getTicks(),(function(t){var a=i.getLabel(t),s=t.value;e(t.value,a)&&o.push(n?s:{formattedLabel:r(t),rawLabel:a,tickValue:s})})),o}var cx=[0,1],px=function(){function t(t,e,n){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=e,this._extent=n||[0,0]}return t.prototype.contain=function(t){var e=this._extent,n=Math.min(e[0],e[1]),i=Math.max(e[0],e[1]);return t>=n&&t<=i},t.prototype.containData=function(t){return this.scale.contain(t)},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.getPixelPrecision=function(t){return Gr(t||this.scale.getExtent(),this._extent)},t.prototype.setExtent=function(t,e){var n=this._extent;n[0]=t,n[1]=e},t.prototype.dataToCoord=function(t,e){var n=this._extent,i=this.scale;return t=i.normalize(t),this.onBand&&"ordinal"===i.type&&dx(n=n.slice(),i.count()),Er(t,cx,n,e)},t.prototype.coordToData=function(t,e){var n=this._extent,i=this.scale;this.onBand&&"ordinal"===i.type&&dx(n=n.slice(),i.count());var r=Er(t,n,cx,e);return this.scale.scale(r)},t.prototype.pointToData=function(t,e){},t.prototype.getTicksCoords=function(t){var e=(t=t||{}).tickModel||this.getTickModel(),n=E(rx(this,e).ticks,(function(t){return{coord:this.dataToCoord("ordinal"===this.scale.type?this.scale.getRawOrdinalNumber(t):t),tickValue:t}}),this);return function(t,e,n,i){var r=e.length;if(!t.onBand||n||!r)return;var o,a,s=t.getExtent();if(1===r)e[0].coord=s[0],o=e[1]={coord:s[0]};else{var l=e[r-1].tickValue-e[0].tickValue,u=(e[r-1].coord-e[0].coord)/l;z(e,(function(t){t.coord-=u/2})),a=1+t.scale.getExtent()[1]-e[r-1].tickValue,o={coord:e[r-1].coord+u*a},e.push(o)}var h=s[0]>s[1];c(e[0].coord,s[0])&&(i?e[0].coord=s[0]:e.shift());i&&c(s[0],e[0].coord)&&e.unshift({coord:s[0]});c(s[1],o.coord)&&(i?o.coord=s[1]:e.pop());i&&c(o.coord,s[1])&&e.push({coord:s[1]});function c(t,e){return t=Vr(t),e=Vr(e),h?t>e:t0&&t<100||(t=5),E(this.scale.getMinorTicks(t),(function(t){return E(t,(function(t){return{coord:this.dataToCoord(t),tickValue:t}}),this)}),this)},t.prototype.getViewLabels=function(){return ix(this).labels},t.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},t.prototype.getTickModel=function(){return this.model.getModel("axisTick")},t.prototype.getBandWidth=function(){var t=this._extent,e=this.scale.getExtent(),n=e[1]-e[0]+(this.onBand?1:0);0===n&&(n=1);var i=Math.abs(t[1]-t[0]);return Math.abs(i)/n},t.prototype.calculateCategoryInterval=function(){return function(t){var e=function(t){var e=t.getLabelModel();return{axisRotate:t.getRotate?t.getRotate():t.isHorizontal&&!t.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}(t),n=A_(t),i=(e.axisRotate-e.labelRotate)/180*Math.PI,r=t.scale,o=r.getExtent(),a=r.count();if(o[1]-o[0]<1)return 0;var s=1;a>40&&(s=Math.max(1,Math.floor(a/40)));for(var l=o[0],u=t.dataToCoord(l+1)-t.dataToCoord(l),h=Math.abs(u*Math.cos(i)),c=Math.abs(u*Math.sin(i)),p=0,d=0;l<=o[1];l+=s){var f,g,v=dr(n({value:l}),e.font,"center","top");f=1.3*v.width,g=1.3*v.height,p=Math.max(p,f,7),d=Math.max(d,g,7)}var y=p/h,m=d/c;isNaN(y)&&(y=1/0),isNaN(m)&&(m=1/0);var _=Math.max(0,Math.floor(Math.min(y,m))),x=nx(t.model),w=t.getExtent(),b=x.lastAutoInterval,S=x.lastTickCount;return null!=b&&null!=S&&Math.abs(b-_)<=1&&Math.abs(S-a)<=1&&b>_&&x.axisExtent0===w[0]&&x.axisExtent1===w[1]?_=b:(x.lastTickCount=a,x.lastAutoInterval=_,x.axisExtent0=w[0],x.axisExtent1=w[1]),_}(this)},t}();function dx(t,e){var n=(t[1]-t[0])/e/2;t[0]+=n,t[1]-=n}function fx(t,e,n,i,r,o,a,s){var l=r-t,u=o-e,h=n-t,c=i-e,p=Math.sqrt(h*h+c*c),d=(l*(h/=p)+u*(c/=p))/p;s&&(d=Math.min(Math.max(d,0),1)),d*=p;var f=a[0]=t+d*h,g=a[1]=e+d*c;return Math.sqrt((f-r)*(f-r)+(g-o)*(g-o))}var gx=new Se,vx=new Se,yx=new Se,mx=new Se,_x=new Se,xx=[],bx=new Se;function Sx(t,e){if(e<=180&&e>0){e=e/180*Math.PI,gx.fromArray(t[0]),vx.fromArray(t[1]),yx.fromArray(t[2]),Se.sub(mx,gx,vx),Se.sub(_x,yx,vx);var n=mx.len(),i=_x.len();if(!(n<.001||i<.001)){mx.scale(1/n),_x.scale(1/i);var r=mx.dot(_x);if(Math.cos(e)1&&Se.copy(bx,yx),bx.toArray(t[1])}}}}function Mx(t,e,n){if(n<=180&&n>0){n=n/180*Math.PI,gx.fromArray(t[0]),vx.fromArray(t[1]),yx.fromArray(t[2]),Se.sub(mx,vx,gx),Se.sub(_x,yx,vx);var i=mx.len(),r=_x.len();if(!(i<.001||r<.001))if(mx.scale(1/i),_x.scale(1/r),mx.dot(e)=a)Se.copy(bx,yx);else{bx.scaleAndAdd(_x,o/Math.tan(Math.PI/2-s));var l=yx.x!==vx.x?(bx.x-vx.x)/(yx.x-vx.x):(bx.y-vx.y)/(yx.y-vx.y);if(isNaN(l))return;l<0?Se.copy(bx,vx):l>1&&Se.copy(bx,yx)}bx.toArray(t[1])}}}function Cx(t,e,n,i){var r="normal"===n,o=r?t:t.ensureState(n);o.ignore=e;var a=i.get("smooth");a&&!0===a&&(a=.3),o.shape=o.shape||{},a>0&&(o.shape.smooth=a);var s=i.getModel("lineStyle").getLineStyle();r?t.useStyle(s):o.style=s}function Ix(t,e){var n=e.smooth,i=e.points;if(i)if(t.moveTo(i[0][0],i[0][1]),n>0&&i.length>=3){var r=Rt(i[0],i[1]),o=Rt(i[1],i[2]);if(!r||!o)return t.lineTo(i[1][0],i[1][1]),void t.lineTo(i[2][0],i[2][1]);var a=Math.min(r,o)*n,s=Et([],i[1],i[0],a/r),l=Et([],i[1],i[2],a/o),u=Et([],s,l,.5);t.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),t.bezierCurveTo(l[0],l[1],l[0],l[1],i[2][0],i[2][1])}else for(var h=1;h0&&o&&x(-h/a,0,a);var f,g,v=t[0],y=t[a-1];return m(),f<0&&w(-f,.8),g<0&&w(g,.8),m(),_(f,g,1),_(g,f,-1),m(),f<0&&b(-f),g<0&&b(g),u}function m(){f=v.rect[e]-i,g=r-y.rect[e]-y.rect[n]}function _(t,e,n){if(t<0){var i=Math.min(e,-t);if(i>0){x(i*n,0,a);var r=i+t;r<0&&w(-r*n,1)}else w(-t*n,1)}}function x(n,i,r){0!==n&&(u=!0);for(var o=i;o0)for(l=0;l0;l--)x(-o[l-1]*c,l,a)}}function b(t){var e=t<0?-1:1;t=Math.abs(t);for(var n=Math.ceil(t/(a-1)),i=0;i0?x(n,0,i+1):x(-n,a-i-1,a),(t-=n)<=0)return}}(t,"y","height",e,n,i)}var Dx=Math.sin,kx=Math.cos,Ax=Math.PI,Px=2*Math.PI,Lx=180/Ax,Ox=function(){function t(){}return t.prototype.reset=function(t){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,t||4)},t.prototype.moveTo=function(t,e){this._add("M",t,e)},t.prototype.lineTo=function(t,e){this._add("L",t,e)},t.prototype.bezierCurveTo=function(t,e,n,i,r,o){this._add("C",t,e,n,i,r,o)},t.prototype.quadraticCurveTo=function(t,e,n,i){this._add("Q",t,e,n,i)},t.prototype.arc=function(t,e,n,i,r,o){this.ellipse(t,e,n,n,0,i,r,o)},t.prototype.ellipse=function(t,e,n,i,r,o,a,s){var l=a-o,u=!s,h=Math.abs(l),c=ni(h-Px)||(u?l>=Px:-l>=Px),p=l>0?l%Px:l%Px+Px,d=!1;d=!!c||!ni(h)&&p>=Ax==!!u;var f=t+n*kx(o),g=e+i*Dx(o);this._start&&this._add("M",f,g);var v=Math.round(r*Lx);if(c){var y=1/this._p,m=(u?1:-1)*(Px-y);this._add("A",n,i,v,1,+u,t+n*kx(o+m),e+i*Dx(o+m)),y>.01&&this._add("A",n,i,v,0,+u,f,g)}else{var _=t+n*kx(a),x=e+i*Dx(a);this._add("A",n,i,v,+d,+u,_,x)}},t.prototype.rect=function(t,e,n,i){this._add("M",t,e),this._add("l",n,0),this._add("l",0,i),this._add("l",-n,0),this._add("Z")},t.prototype.closePath=function(){this._d.length>0&&this._add("Z")},t.prototype._add=function(t,e,n,i,r,o,a,s,l){for(var u=[],h=this._p,c=1;c"}(r,o)+("style"!==r?te(a):a||"")+(i?""+n+E(i,(function(e){return t(e)})).join(n)+n:"")+("")}(t)}function Ux(t){return{zrId:t,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssClassIdx:0,cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function Zx(t,e,n,i){return Wx("svg","root",{width:t,height:e,xmlns:Vx,"xmlns:xlink":Fx,version:"1.1",baseProfile:"full",viewBox:!!i&&"0 0 "+t+" "+e},n)}var Yx={cubicIn:"0.32,0,0.67,0",cubicOut:"0.33,1,0.68,1",cubicInOut:"0.65,0,0.35,1",quadraticIn:"0.11,0,0.5,0",quadraticOut:"0.5,1,0.89,1",quadraticInOut:"0.45,0,0.55,1",quarticIn:"0.5,0,0.75,0",quarticOut:"0.25,1,0.5,1",quarticInOut:"0.76,0,0.24,1",quinticIn:"0.64,0,0.78,0",quinticOut:"0.22,1,0.36,1",quinticInOut:"0.83,0,0.17,1",sinusoidalIn:"0.12,0,0.39,0",sinusoidalOut:"0.61,1,0.88,1",sinusoidalInOut:"0.37,0,0.63,1",exponentialIn:"0.7,0,0.84,0",exponentialOut:"0.16,1,0.3,1",exponentialInOut:"0.87,0,0.13,1",circularIn:"0.55,0,1,0.45",circularOut:"0,0.55,0.45,1",circularInOut:"0.85,0,0.15,1"},Xx="transform-origin";function jx(t,e,n){var i=k({},t.shape);k(i,e),t.buildPath(n,i);var r=new Ox;return r.reset(pi(t)),n.rebuildPath(r,1),r.generateStr(),r.getStr()}function qx(t,e){var n=e.originX,i=e.originY;(n||i)&&(t[Xx]=n+"px "+i+"px")}var Kx={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function $x(t,e){var n=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[n]=t,n}function Qx(t){return Z(t)?Yx[t]?"cubic-bezier("+Yx[t]+")":Cn(t)?t:"":""}function Jx(t,e,n,i){var r=t.animators,o=r.length,a=[];if(t instanceof Ou){var s=function(t,e,n){var i,r,o=t.shape.paths,a={};if(z(o,(function(t){var e=Ux(n.zrId);e.animation=!0,Jx(t,{},e,!0);var o=e.cssAnims,s=e.cssNodes,l=F(o),u=l.length;if(u){var h=o[r=l[u-1]];for(var c in h){var p=h[c];a[c]=a[c]||{d:""},a[c].d+=p.d||""}for(var d in s){var f=s[d].animation;f.indexOf(r)>=0&&(i=f)}}})),i){e.d=!1;var s=$x(a,n);return i.replace(r,s)}}(t,e,n);if(s)a.push(s);else if(!o)return}else if(!o)return;for(var l={},u=0;u0})).length)return $x(h,n)+" "+r[0]+" both"}for(var v in l){(s=g(l[v]))&&a.push(s)}if(a.length){var y=n.zrId+"-cls-"+n.cssClassIdx++;n.cssNodes["."+y]={animation:a.join(",")},e.class=y}}var tw=Math.round;function ew(t){return t&&Z(t.src)}function nw(t){return t&&U(t.toDataURL)}function iw(t,e,n,i){Bx((function(r,o){var a="fill"===r||"stroke"===r;a&&hi(o)?dw(e,t,r,i):a&&si(o)?fw(n,t,r,i):t[r]=o}),e,n,!1),function(t,e,n){var i=t.style;if(function(t){return t&&(t.shadowBlur||t.shadowOffsetX||t.shadowOffsetY)}(i)){var r=function(t){var e=t.style,n=t.getGlobalScale();return[e.shadowColor,(e.shadowBlur||0).toFixed(2),(e.shadowOffsetX||0).toFixed(2),(e.shadowOffsetY||0).toFixed(2),n[0],n[1]].join(",")}(t),o=n.shadowCache,a=o[r];if(!a){var s=t.getGlobalScale(),l=s[0],u=s[1];if(!l||!u)return;var h=i.shadowOffsetX||0,c=i.shadowOffsetY||0,p=i.shadowBlur,d=ti(i.shadowColor),f=d.opacity,g=d.color,v=p/2/l+" "+p/2/u;a=n.zrId+"-s"+n.shadowIdx++,n.defs[a]=Wx("filter",a,{id:a,x:"-100%",y:"-100%",width:"300%",height:"300%"},[Wx("feDropShadow","",{dx:h/l,dy:c/u,stdDeviation:v,"flood-color":g,"flood-opacity":f})]),o[r]=a}e.filter=ci(a)}}(n,t,i)}function rw(t){return ni(t[0]-1)&&ni(t[1])&&ni(t[2])&&ni(t[3]-1)}function ow(t,e,n){if(e&&(!function(t){return ni(t[4])&&ni(t[5])}(e)||!rw(e))){var i=n?10:1e4;t.transform=rw(e)?"translate("+tw(e[4]*i)/i+" "+tw(e[5]*i)/i+")":function(t){return"matrix("+ii(t[0])+","+ii(t[1])+","+ii(t[2])+","+ii(t[3])+","+ri(t[4])+","+ri(t[5])+")"}(e)}}function aw(t,e,n){for(var i=t.points,r=[],o=0;ol?kw(t,null==n[c+1]?null:n[c+1].elm,n,s,c):Aw(t,e,a,l))}(n,i,r):Cw(r)?(Cw(t.text)&&bw(n,""),kw(n,null,r,0,r.length-1)):Cw(i)?Aw(n,i,0,i.length-1):Cw(t.text)&&bw(n,""):t.text!==e.text&&(Cw(i)&&Aw(n,i,0,i.length-1),bw(n,e.text)))}var Ow=0,Rw=function(){function t(t,e,n){if(this.type="svg",this.refreshHover=Nw("refreshHover"),this.configLayer=Nw("configLayer"),this.storage=e,this._opts=n=k({},n),this.root=t,this._id="zr"+Ow++,this._oldVNode=Zx(n.width,n.height),t&&!n.ssr){var i=this._viewport=document.createElement("div");i.style.cssText="position:relative;overflow:hidden";var r=this._svgDom=this._oldVNode.elm=Hx("svg");Pw(null,this._oldVNode),i.appendChild(r),t.appendChild(i)}this.resize(n.width,n.height)}return t.prototype.getType=function(){return this.type},t.prototype.getViewportRoot=function(){return this._viewport},t.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},t.prototype.getSvgDom=function(){return this._svgDom},t.prototype.refresh=function(){if(this.root){var t=this.renderToVNode({willUpdate:!0});t.attrs.style="position:absolute;left:0;top:0;user-select:none",function(t,e){if(Tw(t,e))Lw(t,e);else{var n=t.elm,i=xw(n);Dw(e),null!==i&&(yw(i,e.elm,ww(n)),Aw(i,[t],0,0))}}(this._oldVNode,t),this._oldVNode=t}},t.prototype.renderOneToVNode=function(t){return pw(t,Ux(this._id))},t.prototype.renderToVNode=function(t){t=t||{};var e=this.storage.getDisplayList(!0),n=this._width,i=this._height,r=Ux(this._id);r.animation=t.animation,r.willUpdate=t.willUpdate,r.compress=t.compress;var o=[],a=this._bgVNode=function(t,e,n,i){var r;if(n&&"none"!==n)if(r=Wx("rect","bg",{width:t,height:e,x:"0",y:"0",id:"0"}),hi(n))dw({fill:n},r.attrs,"fill",i);else if(si(n))fw({style:{fill:n},dirty:xt,getBoundingRect:function(){return{width:t,height:e}}},r.attrs,"fill",i);else{var o=ti(n),a=o.color,s=o.opacity;r.attrs.fill=a,s<1&&(r.attrs["fill-opacity"]=s)}return r}(n,i,this._backgroundColor,r);a&&o.push(a);var s=t.compress?null:this._mainVNode=Wx("g","main",{},[]);this._paintList(e,r,s?s.children:o),s&&o.push(s);var l=E(F(r.defs),(function(t){return r.defs[t]}));if(l.length&&o.push(Wx("defs","defs",{},l)),t.animation){var u=function(t,e,n){var i=(n=n||{}).newline?"\n":"",r=" {"+i,o=i+"}",a=E(F(t),(function(e){return e+r+E(F(t[e]),(function(n){return n+":"+t[e][n]+";"})).join(i)+o})).join(i),s=E(F(e),(function(t){return"@keyframes "+t+r+E(F(e[t]),(function(n){return n+r+E(F(e[t][n]),(function(i){var r=e[t][n][i];return"d"===i&&(r='path("'+r+'")'),i+":"+r+";"})).join(i)+o})).join(i)+o})).join(i);return a||s?[""].join(i):""}(r.cssNodes,r.cssAnims,{newline:!0});if(u){var h=Wx("style","stl",{},[],u);o.push(h)}}return Zx(n,i,o,t.useViewBox)},t.prototype.renderToString=function(t){return t=t||{},Gx(this.renderToVNode({animation:it(t.cssAnimation,!0),willUpdate:!1,compress:!0,useViewBox:it(t.useViewBox,!0)}),{newline:!0})},t.prototype.setBackgroundColor=function(t){this._backgroundColor=t},t.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},t.prototype._paintList=function(t,e,n){for(var i,r,o=t.length,a=[],s=0,l=0,u=0;u=0&&(!c||!r||c[f]!==r[f]);f--);for(var g=d-1;g>f;g--)i=a[--s-1];for(var v=f+1;v=a)}}for(var h=this.__startIndex;h15)break}n.prevElClipPaths&&u.restore()};if(p)if(0===p.length)s=l.__endIndex;else for(var x=d.dpr,w=0;w0&&t>i[0]){for(s=0;st);s++);a=n[i[s]]}if(i.splice(s+1,0,t),n[t]=e,!e.virtual)if(a){var l=a.dom;l.nextSibling?o.insertBefore(e.dom,l.nextSibling):o.appendChild(e.dom)}else o.firstChild?o.insertBefore(e.dom,o.firstChild):o.appendChild(e.dom);e.__painter=this}},t.prototype.eachLayer=function(t,e){for(var n=this._zlevelList,i=0;i0?Fw:0),this._needsManuallyCompositing),u.__builtin__||C("ZLevel "+l+" has been used by unkown layer "+u.id),u!==o&&(u.__used=!0,u.__startIndex!==r&&(u.__dirty=!0),u.__startIndex=r,u.incremental?u.__drawIndex=-1:u.__drawIndex=r,e(r),o=u),1&s.__dirty&&!s.__inHover&&(u.__dirty=!0,u.incremental&&u.__drawIndex<0&&(u.__drawIndex=r))}e(r),this.eachBuiltinLayer((function(t,e){!t.__used&&t.getElementCount()>0&&(t.__dirty=!0,t.__startIndex=t.__endIndex=t.__drawIndex=0),t.__dirty&&t.__drawIndex<0&&(t.__drawIndex=t.__startIndex)}))},t.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},t.prototype._clearLayer=function(t){t.clear()},t.prototype.setBackgroundColor=function(t){this._backgroundColor=t,z(this._layers,(function(t){t.setUnpainted()}))},t.prototype.configLayer=function(t,e){if(e){var n=this._layerConfig;n[t]?T(n[t],e,!0):n[t]=e;for(var i=0;i-1&&(s.style.stroke=s.style.fill,s.style.fill="#fff",s.style.lineWidth=2),e},e.type="series.line",e.dependencies=["grid","polar"],e.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},e}(Ef);function Gw(t,e){var n=t.mapDimensionsAll("defaultedLabel"),i=n.length;if(1===i){var r=Hd(t,e,n[0]);return null!=r?r+"":null}if(i){for(var o=[],a=0;a=0&&i.push(e[o])}return i.join(" ")}var Zw=function(t){function e(e,n,i,r){var o=t.call(this)||this;return o.updateData(e,n,i,r),o}return n(e,t),e.prototype._createSymbol=function(t,e,n,i,r){this.removeAll();var o=rv(t,-1,-1,2,2,null,r);o.attr({z2:100,culling:!0,scaleX:i[0]/2,scaleY:i[1]/2}),o.drift=Yw,this._symbolType=t,this.add(o)},e.prototype.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(null,t)},e.prototype.getSymbolType=function(){return this._symbolType},e.prototype.getSymbolPath=function(){return this.childAt(0)},e.prototype.highlight=function(){dl(this.childAt(0))},e.prototype.downplay=function(){fl(this.childAt(0))},e.prototype.setZ=function(t,e){var n=this.childAt(0);n.zlevel=t,n.z=e},e.prototype.setDraggable=function(t,e){var n=this.childAt(0);n.draggable=t,n.cursor=!e&&t?"move":n.cursor},e.prototype.updateData=function(t,n,i,r){this.silent=!1;var o=t.getItemVisual(n,"symbol")||"circle",a=t.hostModel,s=e.getSymbolSize(t,n),l=o!==this._symbolType,u=r&&r.disableAnimation;if(l){var h=t.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,t,n,s,h)}else{(p=this.childAt(0)).silent=!1;var c={scaleX:s[0]/2,scaleY:s[1]/2};u?p.attr(c):Xu(p,c,a,n),Ju(p)}if(this._updateCommon(t,n,s,i,r),l){var p=this.childAt(0);if(!u){c={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:p.style.opacity}};p.scaleX=p.scaleY=0,p.style.opacity=0,ju(p,c,a,n)}}u&&this.childAt(0).stopAnimation("leave")},e.prototype._updateCommon=function(t,e,n,i,r){var o,a,s,l,u,h,c,p,d,f=this.childAt(0),g=t.hostModel;if(i&&(o=i.emphasisItemStyle,a=i.blurItemStyle,s=i.selectItemStyle,l=i.focus,u=i.blurScope,c=i.labelStatesModels,p=i.hoverScale,d=i.cursorStyle,h=i.emphasisDisabled),!i||t.hasItemOption){var v=i&&i.itemModel?i.itemModel:t.getItemModel(e),y=v.getModel("emphasis");o=y.getModel("itemStyle").getItemStyle(),s=v.getModel(["select","itemStyle"]).getItemStyle(),a=v.getModel(["blur","itemStyle"]).getItemStyle(),l=y.get("focus"),u=y.get("blurScope"),h=y.get("disabled"),c=Lh(v),p=y.getShallow("scale"),d=v.getShallow("cursor")}var m=t.getItemVisual(e,"symbolRotate");f.attr("rotation",(m||0)*Math.PI/180||0);var _=av(t.getItemVisual(e,"symbolOffset"),n);_&&(f.x=_[0],f.y=_[1]),d&&f.attr("cursor",d);var x=t.getItemVisual(e,"style"),w=x.fill;if(f instanceof gs){var b=f.style;f.useStyle(k({image:b.image,x:b.x,y:b.y,width:b.width,height:b.height},x))}else f.__isEmptyBrush?f.useStyle(k({},x)):f.useStyle(x),f.style.decal=null,f.setColor(w,r&&r.symbolInnerColor),f.style.strokeNoScale=!0;var S=t.getItemVisual(e,"liftZ"),M=this._z2;null!=S?null==M&&(this._z2=f.z2,f.z2+=S):null!=M&&(f.z2=M,this._z2=null);var C=r&&r.useNameLabel;Ph(f,c,{labelFetcher:g,labelDataIndex:e,defaultText:function(e){return C?t.getName(e):Gw(t,e)},inheritColor:w,defaultOpacity:x.opacity}),this._sizeX=n[0]/2,this._sizeY=n[1]/2;var I=f.ensureState("emphasis");I.style=o,f.ensureState("select").style=s,f.ensureState("blur").style=a;var T=null==p||!0===p?Math.max(1.1,3/this._sizeY):isFinite(p)&&p>0?+p:1;I.scaleX=this._sizeX*T,I.scaleY=this._sizeY*T,this.setSymbolScale(1),Tl(this,l,u,h)},e.prototype.setSymbolScale=function(t){this.scaleX=this.scaleY=t},e.prototype.fadeOut=function(t,e,n){var i=this.childAt(0),r=Bs(this).dataIndex,o=n&&n.animation;if(this.silent=i.silent=!0,n&&n.fadeLabel){var a=i.getTextContent();a&&Ku(a,{style:{opacity:0}},e,{dataIndex:r,removeOpt:o,cb:function(){i.removeTextContent()}})}else i.removeTextContent();Ku(i,{style:{opacity:0},scaleX:0,scaleY:0},e,{dataIndex:r,cb:t,removeOpt:o})},e.getSymbolSize=function(t,e){return ov(t.getItemVisual(e,"symbolSize"))},e}(kr);function Yw(t,e){this.parent.drift(t,e)}function Xw(t,e,n,i){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(i.isIgnore&&i.isIgnore(n))&&!(i.clipShape&&!i.clipShape.contain(e[0],e[1]))&&"none"!==t.getItemVisual(n,"symbol")}function jw(t){return null==t||j(t)||(t={isIgnore:t}),t||{}}function qw(t){var e=t.hostModel,n=e.getModel("emphasis");return{emphasisItemStyle:n.getModel("itemStyle").getItemStyle(),blurItemStyle:e.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:e.getModel(["select","itemStyle"]).getItemStyle(),focus:n.get("focus"),blurScope:n.get("blurScope"),emphasisDisabled:n.get("disabled"),hoverScale:n.get("scale"),labelStatesModels:Lh(e),cursorStyle:e.get("cursor")}}var Kw=function(){function t(t){this.group=new kr,this._SymbolCtor=t||Zw}return t.prototype.updateData=function(t,e){this._progressiveEls=null,e=jw(e);var n=this.group,i=t.hostModel,r=this._data,o=this._SymbolCtor,a=e.disableAnimation,s=qw(t),l={disableAnimation:a},u=e.getSymbolPoint||function(e){return t.getItemLayout(e)};r||n.removeAll(),t.diff(r).add((function(i){var r=u(i);if(Xw(t,r,i,e)){var a=new o(t,i,s,l);a.setPosition(r),t.setItemGraphicEl(i,a),n.add(a)}})).update((function(h,c){var p=r.getItemGraphicEl(c),d=u(h);if(Xw(t,d,h,e)){var f=t.getItemVisual(h,"symbol")||"circle",g=p&&p.getSymbolType&&p.getSymbolType();if(!p||g&&g!==f)n.remove(p),(p=new o(t,h,s,l)).setPosition(d);else{p.updateData(t,h,s,l);var v={x:d[0],y:d[1]};a?p.attr(v):Xu(p,v,i)}n.add(p),t.setItemGraphicEl(h,p)}else n.remove(p)})).remove((function(t){var e=r.getItemGraphicEl(t);e&&e.fadeOut((function(){n.remove(e)}),i)})).execute(),this._getSymbolPoint=u,this._data=t},t.prototype.updateLayout=function(){var t=this,e=this._data;e&&e.eachItemGraphicEl((function(e,n){var i=t._getSymbolPoint(n);e.setPosition(i),e.markRedraw()}))},t.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=qw(t),this._data=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(t,e,n){function i(t){t.isGroup||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}this._progressiveEls=[],n=jw(n);for(var r=t.start;r0?n=i[0]:i[1]<0&&(n=i[1]);return n}(r,n),a=i.dim,s=r.dim,l=e.mapDimension(s),u=e.mapDimension(a),h="x"===s||"radius"===s?1:0,c=E(t.dimensions,(function(t){return e.mapDimension(t)})),p=!1,d=e.getCalculationInfo("stackResultDimension");return Am(e,c[0])&&(p=!0,c[0]=d),Am(e,c[1])&&(p=!0,c[1]=d),{dataDimsForPoint:c,valueStart:o,valueAxisDim:s,baseAxisDim:a,stacked:!!p,valueDim:l,baseDim:u,baseDataOffset:h,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function Qw(t,e,n,i){var r=NaN;t.stacked&&(r=n.get(n.getCalculationInfo("stackedOverDimension"),i)),isNaN(r)&&(r=t.valueStart);var o=t.baseDataOffset,a=[];return a[o]=n.get(t.baseDim,i),a[1-o]=r,e.dataToPoint(a)}var Jw=Math.min,tb=Math.max;function eb(t,e){return isNaN(t)||isNaN(e)}function nb(t,e,n,i,r,o,a,s,l){for(var u,h,c,p,d,f,g=n,v=0;v=r||g<0)break;if(eb(y,m)){if(l){g+=o;continue}break}if(g===n)t[o>0?"moveTo":"lineTo"](y,m),c=y,p=m;else{var _=y-u,x=m-h;if(_*_+x*x<.5){g+=o;continue}if(a>0){for(var w=g+o,b=e[2*w],S=e[2*w+1];b===y&&S===m&&v=i||eb(b,S))d=y,f=m;else{I=b-u,T=S-h;var A=y-u,P=b-y,L=m-h,O=S-m,R=void 0,N=void 0;if("x"===s){var z=I>0?1:-1;d=y-z*(R=Math.abs(A))*a,f=m,D=y+z*(N=Math.abs(P))*a,k=m}else if("y"===s){var E=T>0?1:-1;d=y,f=m-E*(R=Math.abs(L))*a,D=y,k=m+E*(N=Math.abs(O))*a}else R=Math.sqrt(A*A+L*L),d=y-I*a*(1-(C=(N=Math.sqrt(P*P+O*O))/(N+R))),f=m-T*a*(1-C),k=m+T*a*C,D=Jw(D=y+I*a*C,tb(b,y)),k=Jw(k,tb(S,m)),D=tb(D,Jw(b,y)),f=m-(T=(k=tb(k,Jw(S,m)))-m)*R/N,d=Jw(d=y-(I=D-y)*R/N,tb(u,y)),f=Jw(f,tb(h,m)),D=y+(I=y-(d=tb(d,Jw(u,y))))*N/R,k=m+(T=m-(f=tb(f,Jw(h,m))))*N/R}t.bezierCurveTo(c,p,d,f,y,m),c=D,p=k}else t.lineTo(y,m)}u=y,h=m,g+=o}return v}var ib=function(){this.smooth=0,this.smoothConstraint=!0},rb=function(t){function e(e){var n=t.call(this,e)||this;return n.type="ec-polyline",n}return n(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new ib},e.prototype.buildPath=function(t,e){var n=e.points,i=0,r=n.length/2;if(e.connectNulls){for(;r>0&&eb(n[2*r-2],n[2*r-1]);r--);for(;i=0){var v=a?(h-i)*g+i:(u-n)*g+n;return a?[t,v]:[v,t]}n=u,i=h;break;case o.C:u=r[l++],h=r[l++],c=r[l++],p=r[l++],d=r[l++],f=r[l++];var y=a?gn(n,u,c,d,t,s):gn(i,h,p,f,t,s);if(y>0)for(var m=0;m=0){v=a?dn(i,h,p,f,_):dn(n,u,c,d,_);return a?[t,v]:[v,t]}}n=d,i=f}}},e}(hs),ob=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e}(ib),ab=function(t){function e(e){var n=t.call(this,e)||this;return n.type="ec-polygon",n}return n(e,t),e.prototype.getDefaultShape=function(){return new ob},e.prototype.buildPath=function(t,e){var n=e.points,i=e.stackedOnPoints,r=0,o=n.length/2,a=e.smoothMonotone;if(e.connectNulls){for(;o>0&&eb(n[2*o-2],n[2*o-1]);o--);for(;r=0;a--){var s=t.getDimensionInfo(i[a].dimension);if("x"===(r=s&&s.coordDim)||"y"===r){o=i[a];break}}if(o){var l=e.getAxis(r),u=E(o.stops,(function(t){return{coord:l.toGlobalCoord(l.dataToCoord(t.value)),color:t.color}})),h=u.length,c=o.outerColors.slice();h&&u[0].coord>u[h-1].coord&&(u.reverse(),c.reverse());var p=function(t,e){var n,i,r=[],o=t.length;function a(t,e,n){var i=t.coord;return{coord:n,color:Xn((n-i)/(e.coord-i),[t.color,e.color])}}for(var s=0;se){i?r.push(a(i,l,e)):n&&r.push(a(n,l,0),a(n,l,e));break}n&&(r.push(a(n,l,0)),n=null),r.push(l),i=l}}return r}(u,"x"===r?n.getWidth():n.getHeight()),d=p.length;if(!d&&h)return u[0].coord<0?c[1]?c[1]:u[h-1].color:c[0]?c[0]:u[0].color;var f=p[0].coord-10,g=p[d-1].coord+10,v=g-f;if(v<.001)return"transparent";z(p,(function(t){t.offset=(t.coord-f)/v})),p.push({offset:d?p[d-1].offset:.5,color:c[1]||"transparent"}),p.unshift({offset:d?p[0].offset:.5,color:c[0]||"transparent"});var y=new Nu(0,0,0,0,p,!0);return y[r]=f,y[r+"2"]=g,y}}}function vb(t,e,n){var i=t.get("showAllSymbol"),r="auto"===i;if(!i||r){var o=n.getAxesByScale("ordinal")[0];if(o&&(!r||!function(t,e){var n=t.getExtent(),i=Math.abs(n[1]-n[0])/t.scale.count();isNaN(i)&&(i=0);for(var r=e.count(),o=Math.max(1,Math.round(r/5)),a=0;ai)return!1;return!0}(o,e))){var a=e.mapDimension(o.dim),s={};return z(o.getViewLabels(),(function(t){var e=o.scale.getRawOrdinalNumber(t.tickValue);s[e]=1})),function(t){return!s.hasOwnProperty(e.get(a,t))}}}}function yb(t,e){return[t[2*e],t[2*e+1]]}function mb(t){if(t.get(["endLabel","show"]))return!0;for(var e=0;e0&&"bolder"===t.get(["emphasis","lineStyle","width"]))&&(d.getState("emphasis").style.lineWidth=+d.style.lineWidth+1);Bs(d).seriesIndex=t.seriesIndex,Tl(d,P,L,O);var R=db(t.get("smooth")),N=t.get("smoothMonotone");if(d.setShape({smooth:R,smoothMonotone:N,connectNulls:b}),f){var z=a.getCalculationInfo("stackedOnSeries"),E=0;f.useStyle(A(l.getAreaStyle(),{fill:T,opacity:.7,lineJoin:"bevel",decal:a.getVisual("style").decal})),z&&(E=db(z.get("smooth"))),f.setShape({smooth:R,stackedOnSmooth:E,smoothMonotone:N,connectNulls:b}),Al(f,t,"areaStyle"),Bs(f).seriesIndex=t.seriesIndex,Tl(f,P,L,O)}var B=function(t){i._changePolyState(t)};a.eachItemGraphicEl((function(t){t&&(t.onHoverStateChange=B)})),this._polyline.onHoverStateChange=B,this._data=a,this._coordSys=r,this._stackedOnPoints=x,this._points=u,this._step=I,this._valueOrigin=m,t.get("triggerLineEvent")&&(this.packEventData(t,d),f&&this.packEventData(t,f))},e.prototype.packEventData=function(t,e){Bs(e).eventData={componentType:"series",componentSubType:"line",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"line"}},e.prototype.highlight=function(t,e,n,i){var r=t.getData(),o=wo(r,i);if(this._changePolyState("emphasis"),!(o instanceof Array)&&null!=o&&o>=0){var a=r.getLayout("points"),s=r.getItemGraphicEl(o);if(!s){var l=a[2*o],u=a[2*o+1];if(isNaN(l)||isNaN(u))return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(l,u))return;var h=t.get("zlevel")||0,c=t.get("z")||0;(s=new Zw(r,o)).x=l,s.y=u,s.setZ(h,c);var p=s.getSymbolPath().getTextContent();p&&(p.zlevel=h,p.z=c,p.z2=this._polyline.z2+1),s.__temp=!0,r.setItemGraphicEl(o,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else qf.prototype.highlight.call(this,t,e,n,i)},e.prototype.downplay=function(t,e,n,i){var r=t.getData(),o=wo(r,i);if(this._changePolyState("normal"),null!=o&&o>=0){var a=r.getItemGraphicEl(o);a&&(a.__temp?(r.setItemGraphicEl(o,null),this.group.remove(a)):a.downplay())}else qf.prototype.downplay.call(this,t,e,n,i)},e.prototype._changePolyState=function(t){var e=this._polygon;ll(this._polyline,t),e&&ll(e,t)},e.prototype._newPolyline=function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new rb({shape:{points:t},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(e),this._polyline=e,e},e.prototype._newPolygon=function(t,e){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new ab({shape:{points:t,stackedOnPoints:e},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},e.prototype._initSymbolLabelAnimation=function(t,e,n){var i,r,o=e.getBaseAxis(),a=o.inverse;"cartesian2d"===e.type?(i=o.isHorizontal(),r=!1):"polar"===e.type&&(i="angle"===o.dim,r=!0);var s=t.hostModel,l=s.get("animationDuration");U(l)&&(l=l(null));var u=s.get("animationDelay")||0,h=U(u)?u(null):u;t.eachItemGraphicEl((function(t,o){var s=t;if(s){var c=[t.x,t.y],p=void 0,d=void 0,f=void 0;if(n)if(r){var g=n,v=e.pointToCoord(c);i?(p=g.startAngle,d=g.endAngle,f=-v[1]/180*Math.PI):(p=g.r0,d=g.r,f=v[0])}else{var y=n;i?(p=y.x,d=y.x+y.width,f=t.x):(p=y.y+y.height,d=y.y,f=t.y)}var m=d===p?0:(f-p)/(d-p);a&&(m=1-m);var _=U(u)?u(o):l*m+h,x=s.getSymbolPath(),w=x.getTextContent();s.attr({scaleX:0,scaleY:0}),s.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:_}),w&&w.animateFrom({style:{opacity:0}},{duration:300,delay:_}),x.disableLabelAnimation=!0}}))},e.prototype._initOrUpdateEndLabel=function(t,e,n){var i=t.getModel("endLabel");if(mb(t)){var r=t.getData(),o=this._polyline,a=r.getLayout("points");if(!a)return o.removeTextContent(),void(this._endLabel=null);var s=this._endLabel;s||((s=this._endLabel=new Cs({z2:200})).ignoreClip=!0,o.setTextContent(this._endLabel),o.disableLabelAnimation=!0);var l=function(t){for(var e,n,i=t.length/2;i>0&&(e=t[2*i-2],n=t[2*i-1],isNaN(e)||isNaN(n));i--);return i-1}(a);l>=0&&(Ph(o,Lh(t,"endLabel"),{inheritColor:n,labelFetcher:t,labelDataIndex:l,defaultText:function(t,e,n){return null!=n?Uw(r,n):Gw(r,t)},enableTextSetter:!0},function(t,e){var n=e.getBaseAxis(),i=n.isHorizontal(),r=n.inverse,o=i?r?"right":"left":"center",a=i?"middle":r?"top":"bottom";return{normal:{align:t.get("align")||o,verticalAlign:t.get("verticalAlign")||a}}}(i,e)),o.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(t,e,n,i,r,o,a){var s=this._endLabel,l=this._polyline;if(s){t<1&&null==i.originalX&&(i.originalX=s.x,i.originalY=s.y);var u=n.getLayout("points"),h=n.hostModel,c=h.get("connectNulls"),p=o.get("precision"),d=o.get("distance")||0,f=a.getBaseAxis(),g=f.isHorizontal(),v=f.inverse,y=e.shape,m=v?g?y.x:y.y+y.height:g?y.x+y.width:y.y,_=(g?d:0)*(v?-1:1),x=(g?0:-d)*(v?-1:1),w=g?"x":"y",b=function(t,e,n){for(var i,r,o=t.length/2,a="x"===n?0:1,s=0,l=-1,u=0;u=e||i>=e&&r<=e){l=u;break}s=u,i=r}else i=r;return{range:[s,l],t:(e-i)/(r-i)}}(u,m,w),S=b.range,M=S[1]-S[0],C=void 0;if(M>=1){if(M>1&&!c){var I=yb(u,S[0]);s.attr({x:I[0]+_,y:I[1]+x}),r&&(C=h.getRawValue(S[0]))}else{(I=l.getPointOn(m,w))&&s.attr({x:I[0]+_,y:I[1]+x});var T=h.getRawValue(S[0]),D=h.getRawValue(S[1]);r&&(C=function(t,e,n,i,r){var o=null==e||"auto"===e;if(null==i)return i;if(X(i))return Vr(f=ao(n||0,i,r),o?Math.max(Hr(n||0),Hr(i)):e);if(Z(i))return r<1?n:i;for(var a=[],s=n,l=i,u=Math.max(s?s.length:0,l.length),h=0;h0?S[0]:0;I=yb(u,k);r&&(C=h.getRawValue(k)),s.attr({x:I[0]+_,y:I[1]+x})}r&&Vh(s).setLabelText(C)}},e.prototype._doUpdateAnimation=function(t,e,n,i,r,o,a){var s=this._polyline,l=this._polygon,u=t.hostModel,h=function(t,e,n,i,r,o,a,s){for(var l=function(t,e){var n=[];return e.diff(t).add((function(t){n.push({cmd:"+",idx:t})})).update((function(t,e){n.push({cmd:"=",idx:e,idx1:t})})).remove((function(t){n.push({cmd:"-",idx:t})})).execute(),n}(t,e),u=[],h=[],c=[],p=[],d=[],f=[],g=[],v=$w(r,e,a),y=t.getLayout("points")||[],m=e.getLayout("points")||[],_=0;_3e3||l&&pb(p,f)>3e3)return s.stopAnimation(),s.setShape({points:d}),void(l&&(l.stopAnimation(),l.setShape({points:d,stackedOnPoints:f})));s.shape.__points=h.current,s.shape.points=c;var g={shape:{points:d}};h.current!==c&&(g.shape.__points=h.next),s.stopAnimation(),Xu(s,g,u),l&&(l.setShape({points:c,stackedOnPoints:p}),l.stopAnimation(),Xu(l,{shape:{stackedOnPoints:f}},u),s.shape.points!==l.shape.points&&(l.shape.points=s.shape.points));for(var v=[],y=h.status,m=0;me&&(e=t[n]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,n=0;n10&&"cartesian2d"===o.type&&r){var s=o.getBaseAxis(),l=o.getOtherAxis(s),u=s.getExtent(),h=n.getDevicePixelRatio(),c=Math.abs(u[1]-u[0])*(h||1),p=Math.round(a/c);if(isFinite(p)&&p>1){"lttb"===r&&t.setData(i.lttbDownSample(i.mapDimension(l.dim),1/p));var d=void 0;Z(r)?d=bb[r]:U(r)&&(d=r),d&&t.setData(i.downSample(i.mapDimension(l.dim),1/p,d,Sb))}}}}}var Cb=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.getInitialData=function(t,e){return Lm(null,this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(t,e,n){var i=this.coordinateSystem;if(i&&i.clampData){var r=i.clampData(t),o=i.dataToPoint(r);if(n)z(i.getAxes(),(function(t,n){if("category"===t.type&&null!=e){var i=t.getTicksCoords(),a=r[n],s="x1"===e[n]||"y1"===e[n];if(s&&(a+=1),i.length<2)return;if(2===i.length)return void(o[n]=t.toGlobalCoord(t.getExtent()[s?1:0]));for(var l=void 0,u=void 0,h=1,c=0;ca){u=(p+l)/2;break}1===c&&(h=d-i[0].tickValue)}null==u&&(l?l&&(u=i[i.length-1].coord):u=i[0].coord),o[n]=t.toGlobalCoord(u)}}));else{var a=this.getData(),s=a.getLayout("offset"),l=a.getLayout("size"),u=i.getBaseAxis().isHorizontal()?0:1;o[u]+=s+l/2}return o}return[NaN,NaN]},e.type="series.__base_bar__",e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},e}(Ef);Ef.registerClass(Cb);var Ib=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.getInitialData=function(){return Lm(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},e.prototype.getProgressive=function(){return!!this.get("large")&&this.get("progressive")},e.prototype.getProgressiveThreshold=function(){var t=this.get("progressiveThreshold"),e=this.get("largeThreshold");return e>t&&(t=e),t},e.prototype.brushSelector=function(t,e,n){return n.rect(e.getItemLayout(t))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=ec(Cb.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),e}(Cb),Tb=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},Db=function(t){function e(e){var n=t.call(this,e)||this;return n.type="sausage",n}return n(e,t),e.prototype.getDefaultShape=function(){return new Tb},e.prototype.buildPath=function(t,e){var n=e.cx,i=e.cy,r=Math.max(e.r0||0,0),o=Math.max(e.r,0),a=.5*(o-r),s=r+a,l=e.startAngle,u=e.endAngle,h=e.clockwise,c=2*Math.PI,p=h?u-lo)return!0;o=u}return!1},e.prototype._isOrderDifferentInView=function(t,e){for(var n=e.scale,i=n.getExtent(),r=Math.max(0,i[0]),o=Math.min(i[1],n.getOrdinalMeta().categories.length-1);r<=o;++r)if(t.ordinalNumbers[r]!==n.getRawOrdinalNumber(r))return!0},e.prototype._updateSortWithinSameData=function(t,e,n,i){if(this._isOrderChangedWithinSameData(t,e,n)){var r=this._dataSort(t,n,e);this._isOrderDifferentInView(r,n)&&(this._removeOnRenderedListener(i),i.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:r}))}},e.prototype._dispatchInitSort=function(t,e,n){var i=e.baseAxis,r=this._dataSort(t,i,(function(n){return t.get(t.mapDimension(e.otherAxis.dim),n)}));n.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",isInitSort:!0,axisId:i.index,sortInfo:r})},e.prototype.remove=function(t,e){this._clear(this._model),this._removeOnRenderedListener(e)},e.prototype.dispose=function(t,e){this._removeOnRenderedListener(e)},e.prototype._removeOnRenderedListener=function(t){this._onRendered&&(t.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(t){var e=this.group,n=this._data;t&&t.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl((function(e){Qu(e,t,Bs(e).dataIndex)}))):e.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type="bar",e}(qf),Nb={cartesian2d:function(t,e){var n=e.width<0?-1:1,i=e.height<0?-1:1;n<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height);var r=t.x+t.width,o=t.y+t.height,a=Lb(e.x,t.x),s=Ob(e.x+e.width,r),l=Lb(e.y,t.y),u=Ob(e.y+e.height,o),h=sr?s:a,e.y=c&&l>o?u:l,e.width=h?0:s-a,e.height=c?0:u-l,n<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height),h||c},polar:function(t,e){var n=e.r0<=e.r?1:-1;if(n<0){var i=e.r;e.r=e.r0,e.r0=i}var r=Ob(e.r,t.r),o=Lb(e.r0,t.r0);e.r=r,e.r0=o;var a=r-o<0;if(n<0){i=e.r;e.r=e.r0,e.r0=i}return a}},zb={cartesian2d:function(t,e,n,i,r,o,a,s,l){var u=new bs({shape:k({},i),z2:1});(u.__dataIndex=n,u.name="item",o)&&(u.shape[r?"height":"width"]=0);return u},polar:function(t,e,n,i,r,o,a,s,l){var u=!r&&l?Db:vu,h=new u({shape:i,z2:1});h.name="item";var c,p,d=Gb(r);if(h.calculateTextPosition=(c=d,p=({isRoundCap:u===Db}||{}).isRoundCap,function(t,e,n){var i=e.position;if(!i||i instanceof Array)return mr(t,e,n);var r=c(i),o=null!=e.distance?e.distance:5,a=this.shape,s=a.cx,l=a.cy,u=a.r,h=a.r0,d=(u+h)/2,f=a.startAngle,g=a.endAngle,v=(f+g)/2,y=p?Math.abs(u-h)/2:0,m=Math.cos,_=Math.sin,x=s+u*m(f),w=l+u*_(f),b="left",S="top";switch(r){case"startArc":x=s+(h-o)*m(v),w=l+(h-o)*_(v),b="center",S="top";break;case"insideStartArc":x=s+(h+o)*m(v),w=l+(h+o)*_(v),b="center",S="bottom";break;case"startAngle":x=s+d*m(f)+kb(f,o+y,!1),w=l+d*_(f)+Ab(f,o+y,!1),b="right",S="middle";break;case"insideStartAngle":x=s+d*m(f)+kb(f,-o+y,!1),w=l+d*_(f)+Ab(f,-o+y,!1),b="left",S="middle";break;case"middle":x=s+d*m(v),w=l+d*_(v),b="center",S="middle";break;case"endArc":x=s+(u+o)*m(v),w=l+(u+o)*_(v),b="center",S="bottom";break;case"insideEndArc":x=s+(u-o)*m(v),w=l+(u-o)*_(v),b="center",S="top";break;case"endAngle":x=s+d*m(g)+kb(g,o+y,!0),w=l+d*_(g)+Ab(g,o+y,!0),b="left",S="middle";break;case"insideEndAngle":x=s+d*m(g)+kb(g,-o+y,!0),w=l+d*_(g)+Ab(g,-o+y,!0),b="right",S="middle";break;default:return mr(t,e,n)}return(t=t||{}).x=x,t.y=w,t.align=b,t.verticalAlign=S,t}),o){var f=r?"r":"endAngle",g={};h.shape[f]=r?i.r0:i.startAngle,g[f]=i[f],(s?Xu:ju)(h,{shape:g},o)}return h}};function Eb(t,e,n,i,r,o,a,s){var l,u;o?(u={x:i.x,width:i.width},l={y:i.y,height:i.height}):(u={y:i.y,height:i.height},l={x:i.x,width:i.width}),s||(a?Xu:ju)(n,{shape:l},e,r,null),(a?Xu:ju)(n,{shape:u},e?t.baseAxis.model:null,r)}function Bb(t,e){for(var n=0;n0?1:-1,a=i.height>0?1:-1;return{x:i.x+o*r/2,y:i.y+a*r/2,width:i.width-o*r,height:i.height-a*r}},polar:function(t,e,n){var i=t.getItemLayout(e);return{cx:i.cx,cy:i.cy,r0:i.r0,r:i.r,startAngle:i.startAngle,endAngle:i.endAngle,clockwise:i.clockwise}}};function Gb(t){return function(t){var e=t?"Arc":"Angle";return function(t){switch(t){case"start":case"insideStart":case"end":case"insideEnd":return t+e;default:return t}}}(t)}function Ub(t,e,n,i,r,o,a,s){var l=e.getItemVisual(n,"style");if(s){if(!o.get("roundCap")){var u=t.shape;k(u,Pb(i.getModel("itemStyle"),u,!0)),t.setShape(u)}}else{var h=i.get(["itemStyle","borderRadius"])||0;t.setShape("r",h)}t.useStyle(l);var c=i.getShallow("cursor");c&&t.attr("cursor",c);var p=s?a?r.r>=r.r0?"endArc":"startArc":r.endAngle>=r.startAngle?"endAngle":"startAngle":a?r.height>=0?"bottom":"top":r.width>=0?"right":"left",d=Lh(i);Ph(t,d,{labelFetcher:o,labelDataIndex:n,defaultText:Gw(o.getData(),n),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:p});var f=t.getTextContent();if(s&&f){var g=i.get(["label","position"]);t.textConfig.inside="middle"===g||null,function(t,e,n,i){if(X(i))t.setTextConfig({rotation:i});else if(G(e))t.setTextConfig({rotation:0});else{var r,o=t.shape,a=o.clockwise?o.startAngle:o.endAngle,s=o.clockwise?o.endAngle:o.startAngle,l=(a+s)/2,u=n(e);switch(u){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":r=l;break;case"startAngle":case"insideStartAngle":r=a;break;case"endAngle":case"insideEndAngle":r=s;break;default:return void t.setTextConfig({rotation:0})}var h=1.5*Math.PI-r;"middle"===u&&h>Math.PI/2&&h<1.5*Math.PI&&(h-=Math.PI),t.setTextConfig({rotation:h})}}(t,"outside"===g?p:g,Gb(a),i.get(["label","rotate"]))}!function(t,e,n,i){if(t){var r=Vh(t);r.prevValue=r.value,r.value=n;var o=e.normal;r.valueAnimation=o.get("valueAnimation"),r.valueAnimation&&(r.precision=o.get("precision"),r.defaultInterpolatedText=i,r.statesModels=e)}}(f,d,o.getRawValue(n),(function(t){return Uw(e,t)}));var v=i.getModel(["emphasis"]);Tl(t,v.get("focus"),v.get("blurScope"),v.get("disabled")),Al(t,i),function(t){return null!=t.startAngle&&null!=t.endAngle&&t.startAngle===t.endAngle}(r)&&(t.style.fill="none",t.style.stroke="none",z(t.states,(function(t){t.style&&(t.style.fill=t.style.stroke="none")})))}var Zb=function(){},Yb=function(t){function e(e){var n=t.call(this,e)||this;return n.type="largeBar",n}return n(e,t),e.prototype.getDefaultShape=function(){return new Zb},e.prototype.buildPath=function(t,e){for(var n=e.points,i=this.baseDimIdx,r=1-this.baseDimIdx,o=[],a=[],s=this.barWidth,l=0;l=s[0]&&e<=s[0]+l[0]&&n>=s[1]&&n<=s[1]+l[1])return a[h]}return-1}(this,t.offsetX,t.offsetY);Bs(this).dataIndex=e>=0?e:null}),30,!1);function qb(t,e,n){if(ub(n,"cartesian2d")){var i=e,r=n.getArea();return{x:t?i.x:r.x,y:t?r.y:i.y,width:t?i.width:r.width,height:t?r.height:i.height}}var o=e;return{cx:(r=n.getArea()).cx,cy:r.cy,r0:t?r.r0:o.r0,r:t?r.r:o.r,startAngle:t?o.startAngle:0,endAngle:t?o.endAngle:2*Math.PI}}var Kb=2*Math.PI,$b=Math.PI/180;function Qb(t,e){return tp(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function Jb(t,e){var n=Qb(t,e),i=t.get("center"),r=t.get("radius");G(r)||(r=[0,r]);var o,a,s=Br(n.width,e.getWidth()),l=Br(n.height,e.getHeight()),u=Math.min(s,l),h=Br(r[0],u/2),c=Br(r[1],u/2),p=t.coordinateSystem;if(p){var d=p.dataToPoint(i);o=d[0]||0,a=d[1]||0}else G(i)||(i=[i,i]),o=Br(i[0],s)+n.x,a=Br(i[1],l)+n.y;return{cx:o,cy:a,r0:h,r:c}}function tS(t,e,n){e.eachSeriesByType(t,(function(t){var e=t.getData(),i=e.mapDimension("value"),r=Qb(t,n),o=Jb(t,n),a=o.cx,s=o.cy,l=o.r,u=o.r0,h=-t.get("startAngle")*$b,c=t.get("minAngle")*$b,p=0;e.each(i,(function(t){!isNaN(t)&&p++}));var d=e.getSum(i),f=Math.PI/(d||p)*2,g=t.get("clockwise"),v=t.get("roseType"),y=t.get("stillShowZeroSum"),m=e.getDataExtent(i);m[0]=0;var _=Kb,x=0,w=h,b=g?1:-1;if(e.setLayout({viewRect:r,r:l}),e.each(i,(function(t,n){var i;if(isNaN(t))e.setItemLayout(n,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:g,cx:a,cy:s,r0:u,r:v?NaN:l});else{(i="area"!==v?0===d&&y?f:t*f:Kb/p)n?a:o,h=Math.abs(l.label.y-n);if(h>=u.maxY){var c=l.label.x-e-l.len2*r,p=i+l.len,f=Math.abs(c)t.unconstrainedWidth?null:d:null;i.setStyle("width",f)}var g=i.getBoundingRect();o.width=g.width;var v=(i.style.margin||0)+2.1;o.height=g.height+v,o.y-=(o.height-c)/2}}}function rS(t){return"center"===t.position}function oS(t){var e,n,i=t.getData(),r=[],o=!1,a=(t.get("minShowLabelAngle")||0)*eS,s=i.getLayout("viewRect"),l=i.getLayout("r"),u=s.width,h=s.x,c=s.y,p=s.height;function d(t){t.ignore=!0}i.each((function(t){var s=i.getItemGraphicEl(t),c=s.shape,p=s.getTextContent(),f=s.getTextGuideLine(),g=i.getItemModel(t),v=g.getModel("label"),y=v.get("position")||g.get(["emphasis","label","position"]),m=v.get("distanceToLabelLine"),_=v.get("alignTo"),x=Br(v.get("edgeDistance"),u),w=v.get("bleedMargin"),b=g.getModel("labelLine"),S=b.get("length");S=Br(S,u);var M=b.get("length2");if(M=Br(M,u),Math.abs(c.endAngle-c.startAngle)0?"right":"left":A>0?"left":"right"}var V=Math.PI,F=0,H=v.get("rotate");if(X(H))F=H*(V/180);else if("center"===y)F=0;else if("radial"===H||!0===H){F=A<0?-k+V:-k}else if("tangential"===H&&"outside"!==y&&"outer"!==y){var W=Math.atan2(A,P);W<0&&(W=2*V+W),P>0&&(W=V+W),F=W-V}if(o=!!F,p.x=C,p.y=I,p.rotation=F,p.setStyle({verticalAlign:"middle"}),L){p.setStyle({align:D});var G=p.states.select;G&&(G.x+=p.x,G.y+=p.y)}else{var U=p.getBoundingRect().clone();U.applyTransform(p.getComputedTransform());var Z=(p.style.margin||0)+2.1;U.y-=Z/2,U.height+=Z,r.push({label:p,labelLine:f,position:y,len:S,len2:M,minTurnAngle:b.get("minTurnAngle"),maxSurfaceAngle:b.get("maxSurfaceAngle"),surfaceNormal:new Se(A,P),linePoints:T,textAlign:D,labelDistance:m,labelAlignTo:_,edgeDistance:x,bleedMargin:w,rect:U,unconstrainedWidth:U.width,labelStyleWidth:p.style.width})}s.setTextConfig({inside:L})}})),!o&&t.get("avoidLabelOverlap")&&function(t,e,n,i,r,o,a,s){for(var l=[],u=[],h=Number.MAX_VALUE,c=-Number.MAX_VALUE,p=0;p0){for(var l=o.getItemLayout(0),u=1;isNaN(l&&l.startAngle)&&u=n.r0}},e.type="pie",e}(qf);var lS=function(){function t(t,e){this._getDataWithEncodedVisual=t,this._getRawData=e}return t.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},t.prototype.containName=function(t){return this._getRawData().indexOfName(t)>=0},t.prototype.indexOfName=function(t){return this._getDataWithEncodedVisual().indexOfName(t)},t.prototype.getItemVisual=function(t,e){return this._getDataWithEncodedVisual().getItemVisual(t,e)},t}(),uS=bo(),hS=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new lS(H(this.getData,this),H(this.getRawData,this)),this._defaultLabelLine(e)},e.prototype.mergeOption=function(){t.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){return function(t,e,n){e=G(e)&&{coordDimensions:e}||k({encodeDefine:t.getEncode()},e);var i=t.getSource(),r=Mm(i,e).dimensions,o=new Sm(r,t);return o.initData(i,n),o}(this,{coordDimensions:["value"],encodeDefaulter:W(Cp,this)})},e.prototype.getDataParams=function(e){var n=this.getData(),i=uS(n),r=i.seats;if(!r){var o=[];n.each(n.mapDimension("value"),(function(t){o.push(t)})),r=i.seats=Ur(o,n.hostModel.get("percentPrecision"))}var a=t.prototype.getDataParams.call(this,e);return a.percent=r[e]||0,a.$vars.push("percent"),a},e.prototype._defaultLabelLine=function(t){ho(t,"labelLine",["show"]);var e=t.labelLine,n=t.emphasis.labelLine;e.show=e.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},e.type="series.pie",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},e}(Ef);var cS=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hasSymbolVisual=!0,n}return n(e,t),e.prototype.getInitialData=function(t,e){return Lm(null,this,{useEncodeDefaulter:!0})},e.prototype.getProgressive=function(){var t=this.option.progressive;return null==t?this.option.large?5e3:this.get("progressive"):t},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?1e4:this.get("progressiveThreshold"):t},e.prototype.brushSelector=function(t,e,n){return n.point(e.getItemLayout(t))},e.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},e.type="series.scatter",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:"#212121"}},universalTransition:{divideShape:"clone"}},e}(Ef),pS=function(){},dS=function(t){function e(e){var n=t.call(this,e)||this;return n._off=0,n.hoverDataIdx=-1,n}return n(e,t),e.prototype.getDefaultShape=function(){return new pS},e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.buildPath=function(t,e){var n,i=e.points,r=e.size,o=this.symbolProxy,a=o.shape,s=t.getContext?t.getContext():t,l=s&&r[0]<4,u=this.softClipShape;if(l)this._ctx=s;else{for(this._ctx=null,n=this._off;n=0;s--){var l=2*s,u=i[l]-o/2,h=i[l+1]-a/2;if(t>=u&&e>=h&&t<=u+o&&e<=h+a)return s}return-1},e.prototype.contain=function(t,e){var n=this.transformCoordToLocal(t,e),i=this.getBoundingRect();return t=n[0],e=n[1],i.contain(t,e)?(this.hoverDataIdx=this.findDataIndex(t,e))>=0:(this.hoverDataIdx=-1,!1)},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var e=this.shape,n=e.points,i=e.size,r=i[0],o=i[1],a=1/0,s=1/0,l=-1/0,u=-1/0,h=0;h=0&&(l.dataIndex=n+(t.startIndex||0))}))},t.prototype.remove=function(){this._clear()},t.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},t}(),gS=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n){var i=t.getData();this._updateSymbolDraw(i,t).updateData(i,{clipShape:this._getClipShape(t)}),this._finished=!0},e.prototype.incrementalPrepareRender=function(t,e,n){var i=t.getData();this._updateSymbolDraw(i,t).incrementalPrepareUpdate(i),this._finished=!1},e.prototype.incrementalRender=function(t,e,n){this._symbolDraw.incrementalUpdate(t,e.getData(),{clipShape:this._getClipShape(e)}),this._finished=t.end===e.getData().count()},e.prototype.updateTransform=function(t,e,n){var i=t.getData();if(this.group.dirty(),!this._finished||i.count()>1e4)return{update:!0};var r=wb("").reset(t,e,n);r.progress&&r.progress({start:0,end:i.count(),count:i.count()},i),this._symbolDraw.updateLayout(i)},e.prototype.eachRendered=function(t){this._symbolDraw&&this._symbolDraw.eachRendered(t)},e.prototype._getClipShape=function(t){var e=t.coordinateSystem,n=e&&e.getArea&&e.getArea();return t.get("clip",!0)?n:null},e.prototype._updateSymbolDraw=function(t,e){var n=this._symbolDraw,i=e.pipelineContext.large;return n&&i===this._isLargeDraw||(n&&n.remove(),n=this._symbolDraw=i?new fS:new Kw,this._isLargeDraw=i,this.group.removeAll()),this.group.add(n.group),n},e.prototype.remove=function(t,e){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},e.prototype.dispose=function(){},e.type="scatter",e}(qf),vS=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},e}(sp),yS=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Io).models[0]},e.type="cartesian2dAxis",e}(sp);R(yS,z_);var mS={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},_S=T({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},mS),xS=T({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},mS),wS={category:_S,value:xS,time:T({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},xS),log:A({logBase:10},xS)},bS={value:1,category:1,time:1,log:1};function SS(t,e,i,r){z(bS,(function(o,a){var s=T(T({},wS[a],!0),r,!0),l=function(t){function i(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e+"Axis."+a,n}return n(i,t),i.prototype.mergeDefaultAndTheme=function(t,e){var n=np(this),i=n?rp(t):{};T(t,e.getTheme().get(a+"Axis")),T(t,this.getDefaultOption()),t.type=MS(t),n&&ip(t,i,n)},i.prototype.optionUpdated=function(){"category"===this.option.type&&(this.__ordinalMeta=Nm.createByAxisModel(this))},i.prototype.getCategories=function(t){var e=this.option;if("category"===e.type)return t?e.data:this.__ordinalMeta.categories},i.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},i.type=e+"Axis."+a,i.defaultOption=s,i}(i);t.registerComponentModel(l)})),t.registerSubTypeDefaulter(e+"Axis",MS)}function MS(t){return t.type||(t.data?"category":"value")}var CS=function(){function t(t){this.type="cartesian",this._dimList=[],this._axes={},this.name=t||""}return t.prototype.getAxis=function(t){return this._axes[t]},t.prototype.getAxes=function(){return E(this._dimList,(function(t){return this._axes[t]}),this)},t.prototype.getAxesByScale=function(t){return t=t.toLowerCase(),V(this.getAxes(),(function(e){return e.scale.type===t}))},t.prototype.addAxis=function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},t}(),IS=["x","y"];function TS(t){return"interval"===t.type||"time"===t.type}var DS=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="cartesian2d",e.dimensions=IS,e}return n(e,t),e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var t=this.getAxis("x").scale,e=this.getAxis("y").scale;if(TS(t)&&TS(e)){var n=t.getExtent(),i=e.getExtent(),r=this.dataToPoint([n[0],i[0]]),o=this.dataToPoint([n[1],i[1]]),a=n[1]-n[0],s=i[1]-i[0];if(a&&s){var l=(o[0]-r[0])/a,u=(o[1]-r[1])/s,h=r[0]-n[0]*l,c=r[1]-i[0]*u,p=this._transform=[l,0,0,u,h,c];this._invTransform=we([],p)}}},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},e.prototype.containPoint=function(t){var e=this.getAxis("x"),n=this.getAxis("y");return e.contain(e.toLocalCoord(t[0]))&&n.contain(n.toLocalCoord(t[1]))},e.prototype.containData=function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},e.prototype.containZone=function(t,e){var n=this.dataToPoint(t),i=this.dataToPoint(e),r=this.getArea(),o=new Le(n[0],n[1],i[0]-n[0],i[1]-n[1]);return r.intersect(o)},e.prototype.dataToPoint=function(t,e,n){n=n||[];var i=t[0],r=t[1];if(this._transform&&null!=i&&isFinite(i)&&null!=r&&isFinite(r))return Bt(n,t,this._transform);var o=this.getAxis("x"),a=this.getAxis("y");return n[0]=o.toGlobalCoord(o.dataToCoord(i,e)),n[1]=a.toGlobalCoord(a.dataToCoord(r,e)),n},e.prototype.clampData=function(t,e){var n=this.getAxis("x").scale,i=this.getAxis("y").scale,r=n.getExtent(),o=i.getExtent(),a=n.parse(t[0]),s=i.parse(t[1]);return(e=e||[])[0]=Math.min(Math.max(Math.min(r[0],r[1]),a),Math.max(r[0],r[1])),e[1]=Math.min(Math.max(Math.min(o[0],o[1]),s),Math.max(o[0],o[1])),e},e.prototype.pointToData=function(t,e){var n=[];if(this._invTransform)return Bt(n,t,this._invTransform);var i=this.getAxis("x"),r=this.getAxis("y");return n[0]=i.coordToData(i.toLocalCoord(t[0]),e),n[1]=r.coordToData(r.toLocalCoord(t[1]),e),n},e.prototype.getOtherAxis=function(t){return this.getAxis("x"===t.dim?"y":"x")},e.prototype.getArea=function(){var t=this.getAxis("x").getGlobalExtent(),e=this.getAxis("y").getGlobalExtent(),n=Math.min(t[0],t[1]),i=Math.min(e[0],e[1]),r=Math.max(t[0],t[1])-n,o=Math.max(e[0],e[1])-i;return new Le(n,i,r,o)},e}(CS),kS=function(t){function e(e,n,i,r,o){var a=t.call(this,e,n,i)||this;return a.index=0,a.type=r||"value",a.position=o||"bottom",a}return n(e,t),e.prototype.isHorizontal=function(){var t=this.position;return"top"===t||"bottom"===t},e.prototype.getGlobalExtent=function(t){var e=this.getExtent();return e[0]=this.toGlobalCoord(e[0]),e[1]=this.toGlobalCoord(e[1]),t&&e[0]>e[1]&&e.reverse(),e},e.prototype.pointToData=function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},e.prototype.setCategorySortInfo=function(t){if("category"!==this.type)return!1;this.model.option.categorySortInfo=t,this.scale.setSortInfo(t)},e}(px);function AS(t,e,n){n=n||{};var i=t.coordinateSystem,r=e.axis,o={},a=r.getAxesOnZeroOf()[0],s=r.position,l=a?"onZero":s,u=r.dim,h=i.getRect(),c=[h.x,h.x+h.width,h.y,h.y+h.height],p={left:0,right:1,top:0,bottom:1,onZero:2},d=e.get("offset")||0,f="x"===u?[c[2]-d,c[3]+d]:[c[0]-d,c[1]+d];if(a){var g=a.toGlobalCoord(a.dataToCoord(0));f[p.onZero]=Math.max(Math.min(g,f[1]),f[0])}o.position=["y"===u?f[p[l]]:c[0],"x"===u?f[p[l]]:c[3]],o.rotation=Math.PI/2*("x"===u?0:1);o.labelDirection=o.tickDirection=o.nameDirection={top:-1,bottom:1,left:-1,right:1}[s],o.labelOffset=a?f[p[s]]-f[p.onZero]:0,e.get(["axisTick","inside"])&&(o.tickDirection=-o.tickDirection),nt(n.labelInside,e.get(["axisLabel","inside"]))&&(o.labelDirection=-o.labelDirection);var v=e.get(["axisLabel","rotate"]);return o.labelRotate="top"===l?-v:v,o.z2=1,o}function PS(t){return"cartesian2d"===t.get("coordinateSystem")}function LS(t){var e={xAxisModel:null,yAxisModel:null};return z(e,(function(n,i){var r=i.replace(/Model$/,""),o=t.getReferringComponents(r,Io).models[0];e[i]=o})),e}var OS=Math.log;function RS(t,e,n){var i=Xm.prototype,r=i.getTicks.call(n),o=i.getTicks.call(n,!0),a=r.length-1,s=i.getInterval.call(n),l=T_(t,e),u=l.extent,h=l.fixMin,c=l.fixMax;if("log"===t.type){var p=OS(t.base);u=[OS(u[0])/p,OS(u[1])/p]}t.setExtent(u[0],u[1]),t.calcNiceExtent({splitNumber:a,fixMin:h,fixMax:c});var d=i.getExtent.call(t);h&&(u[0]=d[0]),c&&(u[1]=d[1]);var f=i.getInterval.call(t),g=u[0],v=u[1];if(h&&c)f=(v-g)/a;else if(h)for(v=u[0]+f*a;vu[0]&&isFinite(g)&&isFinite(u[0]);)f=Vm(f),g=u[1]-f*a;else{t.getTicks().length-1>a&&(f=Vm(f));var y=f*a;(g=Vr((v=Math.ceil(u[1]/f)*f)-y))<0&&u[0]>=0?(g=0,v=Vr(y)):v>0&&u[1]<=0&&(v=0,g=-Vr(y))}var m=(r[0].value-o[0].value)/s,_=(r[a].value-o[a].value)/s;i.setExtent.call(t,g+f*m,v+f*_),i.setInterval.call(t,f),(m||_)&&i.setNiceExtent.call(t,g+f,v-f)}var NS=function(){function t(t,e,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=IS,this._initCartesian(t,e,n),this.model=t}return t.prototype.getRect=function(){return this._rect},t.prototype.update=function(t,e){var n=this._axesMap;function i(t){var e,n=F(t),i=n.length;if(i){for(var r=[],o=i-1;o>=0;o--){var a=t[+n[o]],s=a.model,l=a.scale;Em(l)&&s.get("alignTicks")&&null==s.get("interval")?r.push(a):(D_(l,s),Em(l)&&(e=a))}r.length&&(e||D_((e=r.pop()).scale,e.model),z(r,(function(t){RS(t.scale,t.model,e.scale)})))}}this._updateScale(t,this.model),i(n.x),i(n.y);var r={};z(n.x,(function(t){ES(n,"y",t,r)})),z(n.y,(function(t){ES(n,"x",t,r)})),this.resize(this.model,e)},t.prototype.resize=function(t,e,n){var i=t.getBoxLayoutParams(),r=!n&&t.get("containLabel"),o=tp(i,{width:e.getWidth(),height:e.getHeight()});this._rect=o;var a=this._axesList;function s(){z(a,(function(t){var e=t.isHorizontal(),n=e?[0,o.width]:[0,o.height],i=t.inverse?1:0;t.setExtent(n[i],n[1-i]),function(t,e){var n=t.getExtent(),i=n[0]+n[1];t.toGlobalCoord="x"===t.dim?function(t){return t+e}:function(t){return i-t+e},t.toLocalCoord="x"===t.dim?function(t){return t-e}:function(t){return i-t+e}}(t,e?o.x:o.y)}))}s(),r&&(z(a,(function(t){if(!t.model.get(["axisLabel","inside"])){var e=function(t){var e=t.model,n=t.scale;if(e.get(["axisLabel","show"])&&!n.isBlank()){var i,r,o=n.getExtent();r=n instanceof Zm?n.count():(i=n.getTicks()).length;var a,s=t.getLabelModel(),l=A_(t),u=1;r>40&&(u=Math.ceil(r/40));for(var h=0;h0&&i>0||n<0&&i<0)}(t)}var VS=Math.PI,FS=function(){function t(t,e){this.group=new kr,this.opt=e,this.axisModel=t,A(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});var n=new kr({x:e.position[0],y:e.position[1],rotation:e.rotation});n.updateTransform(),this._transformGroup=n}return t.prototype.hasBuilder=function(t){return!!HS[t]},t.prototype.add=function(t){HS[t](this.opt,this.axisModel,this.group,this._transformGroup)},t.prototype.getGroup=function(){return this.group},t.innerTextLayout=function(t,e,n){var i,r,o=Yr(e-t);return Xr(o)?(r=n>0?"top":"bottom",i="center"):Xr(o-VS)?(r=n>0?"bottom":"top",i="center"):(r="middle",i=o>0&&o0?"right":"left":n>0?"left":"right"),{rotation:o,textAlign:i,textVerticalAlign:r}},t.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},t.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)},t}(),HS={axisLine:function(t,e,n,i){var r=e.get(["axisLine","show"]);if("auto"===r&&t.handleAutoShown&&(r=t.handleAutoShown("axisLine")),r){var o=e.axis.getExtent(),a=i.transform,s=[o[0],0],l=[o[1],0],u=s[0]>l[0];a&&(Bt(s,s,a),Bt(l,l,a));var h=k({lineCap:"round"},e.getModel(["axisLine","lineStyle"]).getLineStyle()),c=new Iu({shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:h,strokeContainThreshold:t.strokeContainThreshold||5,silent:!0,z2:1});dh(c.shape,c.style.lineWidth),c.anid="line",n.add(c);var p=e.get(["axisLine","symbol"]);if(null!=p){var d=e.get(["axisLine","symbolSize"]);Z(p)&&(p=[p,p]),(Z(d)||X(d))&&(d=[d,d]);var f=av(e.get(["axisLine","symbolOffset"])||0,d),g=d[0],v=d[1];z([{rotate:t.rotation+Math.PI/2,offset:f[0],r:0},{rotate:t.rotation-Math.PI/2,offset:f[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],(function(e,i){if("none"!==p[i]&&null!=p[i]){var r=rv(p[i],-g/2,-v/2,g,v,h.stroke,!0),o=e.r+e.offset,a=u?l:s;r.attr({rotation:e.rotate,x:a[0]+o*Math.cos(t.rotation),y:a[1]-o*Math.sin(t.rotation),silent:!0,z2:11}),n.add(r)}}))}}},axisTickLabel:function(t,e,n,i){var r=function(t,e,n,i){var r=n.axis,o=n.getModel("axisTick"),a=o.get("show");"auto"===a&&i.handleAutoShown&&(a=i.handleAutoShown("axisTick"));if(!a||r.scale.isBlank())return;for(var s=o.getModel("lineStyle"),l=i.tickDirection*o.get("length"),u=ZS(r.getTicksCoords(),e.transform,l,A(s.getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])}),"ticks"),h=0;hc[1]?-1:1,d=["start"===s?c[0]-p*h:"end"===s?c[1]+p*h:(c[0]+c[1])/2,US(s)?t.labelOffset+l*h:0],f=e.get("nameRotate");null!=f&&(f=f*VS/180),US(s)?o=FS.innerTextLayout(t.rotation,null!=f?f:t.rotation,l):(o=function(t,e,n,i){var r,o,a=Yr(n-t),s=i[0]>i[1],l="start"===e&&!s||"start"!==e&&s;Xr(a-VS/2)?(o=l?"bottom":"top",r="center"):Xr(a-1.5*VS)?(o=l?"top":"bottom",r="center"):(o="middle",r=a<1.5*VS&&a>VS/2?l?"left":"right":l?"right":"left");return{rotation:a,textAlign:r,textVerticalAlign:o}}(t.rotation,s,f||0,c),null!=(a=t.axisNameAvailableWidth)&&(a=Math.abs(a/Math.sin(o.rotation)),!isFinite(a)&&(a=null)));var g=u.getFont(),v=e.get("nameTruncate",!0)||{},y=v.ellipsis,m=nt(t.nameTruncateMaxWidth,v.maxWidth,a),_=new Cs({x:d[0],y:d[1],rotation:o.rotation,silent:FS.isLabelSilent(e),style:Oh(u,{text:r,font:g,overflow:"truncate",width:m,ellipsis:y,fill:u.getTextColor()||e.get(["axisLine","lineStyle","color"]),align:u.get("align")||o.textAlign,verticalAlign:u.get("verticalAlign")||o.textVerticalAlign}),z2:1});if(Ch({el:_,componentModel:e,itemName:r}),_.__fullText=r,_.anid="name",e.get("triggerEvent")){var x=FS.makeAxisEventDataBase(e);x.targetType="axisName",x.name=r,Bs(_).eventData=x}i.add(_),_.updateTransform(),n.add(_),_.decomposeTransform()}}};function WS(t){t&&(t.ignore=!0)}function GS(t,e){var n=t&&t.getBoundingRect().clone(),i=e&&e.getBoundingRect().clone();if(n&&i){var r=ge([]);return _e(r,r,-t.rotation),n.applyTransform(ye([],r,t.getLocalTransform())),i.applyTransform(ye([],r,e.getLocalTransform())),n.intersect(i)}}function US(t){return"middle"===t||"center"===t}function ZS(t,e,n,i,r){for(var o=[],a=[],s=[],l=0;l=0||t===e}function jS(t){var e=qS(t);if(e){var n=e.axisPointerModel,i=e.axis.scale,r=n.option,o=n.get("status"),a=n.get("value");null!=a&&(a=i.parse(a));var s=KS(n);null==o&&(r.status=s?"show":"hide");var l=i.getExtent().slice();l[0]>l[1]&&l.reverse(),(null==a||a>l[1])&&(a=l[1]),aa)return!0;if(o){var s=qS(t).seriesDataCount,l=i.getExtent();return Math.abs(l[0]-l[1])/s>a}return!1}return!0===n},t.prototype.makeElOption=function(t,e,n,i,r){},t.prototype.createPointerEl=function(t,e,n,i){var r=e.pointer;if(r){var o=hM(t).pointerEl=new Dh[r.type](cM(e.pointer));t.add(o)}},t.prototype.createLabelEl=function(t,e,n,i){if(e.label){var r=hM(t).labelEl=new Cs(cM(e.label));t.add(r),vM(r,i)}},t.prototype.updatePointerEl=function(t,e,n){var i=hM(t).pointerEl;i&&e.pointer&&(i.setStyle(e.pointer.style),n(i,{shape:e.pointer.shape}))},t.prototype.updateLabelEl=function(t,e,n,i){var r=hM(t).labelEl;r&&(r.setStyle(e.label.style),n(r,{x:e.label.x,y:e.label.y}),vM(r,i))},t.prototype._renderHandle=function(t){if(!this._dragging&&this.updateHandleTransform){var e,n=this._axisPointerModel,i=this._api.getZr(),r=this._handle,o=n.getModel("handle"),a=n.get("status");if(!o.get("show")||!a||"hide"===a)return r&&i.remove(r),void(this._handle=null);this._handle||(e=!0,r=this._handle=bh(o.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){ue(t.event)},onmousedown:pM(this._onHandleDragMove,this,0,0),drift:pM(this._onHandleDragMove,this),ondragend:pM(this._onHandleDragEnd,this)}),i.add(r)),mM(r,n,!1),r.setStyle(o.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=o.get("size");G(s)||(s=[s,s]),r.scaleX=s[0]/2,r.scaleY=s[1]/2,og(this,"_doDispatchAxisPointer",o.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,e)}},t.prototype._moveHandleToValue=function(t,e){fM(this._axisPointerModel,!e&&this._moveAnimation,this._handle,yM(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},t.prototype._onHandleDragMove=function(t,e){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(yM(n),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(yM(i)),hM(n).lastProp=null,this._doDispatchAxisPointer()}},t.prototype._doDispatchAxisPointer=function(){if(this._handle){var t=this._payloadInfo,e=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:e.axis.dim,axisIndex:e.componentIndex}]})}},t.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var t=this._axisPointerModel.get("value");this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"})}},t.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),n=this._group,i=this._handle;e&&n&&(this._lastGraphicKey=null,n&&e.remove(n),i&&e.remove(i),this._group=null,this._handle=null,this._payloadInfo=null),ag(this,"_doDispatchAxisPointer")},t.prototype.doClear=function(){},t.prototype.buildLabel=function(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}},t}();function fM(t,e,n,i){gM(hM(n).lastProp,i)||(hM(n).lastProp=i,e?Xu(n,i,t):(n.stopAnimation(),n.attr(i)))}function gM(t,e){if(j(t)&&j(e)){var n=!0;return z(e,(function(e,i){n=n&&gM(t[i],e)})),!!n}return t===e}function vM(t,e){t[e.get(["label","show"])?"show":"hide"]()}function yM(t){return{x:t.x||0,y:t.y||0,rotation:t.rotation||0}}function mM(t,e,n){var i=e.get("z"),r=e.get("zlevel");t&&t.traverse((function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=r&&(t.zlevel=r),t.silent=n)}))}function _M(t,e,n,i,r){var o=xM(n.get("value"),e.axis,e.ecModel,n.get("seriesDataIndices"),{precision:n.get(["label","precision"]),formatter:n.get(["label","formatter"])}),a=n.getModel("label"),s=Hc(a.get("padding")||0),l=a.getFont(),u=dr(o,l),h=r.position,c=u.width+s[1]+s[3],p=u.height+s[0]+s[2],d=r.align;"right"===d&&(h[0]-=c),"center"===d&&(h[0]-=c/2);var f=r.verticalAlign;"bottom"===f&&(h[1]-=p),"middle"===f&&(h[1]-=p/2),function(t,e,n,i){var r=i.getWidth(),o=i.getHeight();t[0]=Math.min(t[0]+e,r)-e,t[1]=Math.min(t[1]+n,o)-n,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}(h,c,p,i);var g=a.get("backgroundColor");g&&"auto"!==g||(g=e.get(["axisLine","lineStyle","color"])),t.label={x:h[0],y:h[1],style:Oh(a,{text:o,font:l,fill:a.getTextColor(),padding:s,backgroundColor:g}),z2:10}}function xM(t,e,n,i,r){t=e.scale.parse(t);var o=e.scale.getLabel({value:t},{precision:r.precision}),a=r.formatter;if(a){var s={value:P_(e,{value:t}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};z(i,(function(t){var e=n.getSeriesByIndex(t.seriesIndex),i=t.dataIndexInside,r=e&&e.getDataParams(i);r&&s.seriesData.push(r)})),Z(a)?o=a.replace("{value}",o):U(a)&&(o=a(s))}return o}function wM(t,e,n){var i=[1,0,0,1,0,0];return _e(i,i,n.rotation),me(i,i,n.position),vh([t.dataToCoord(e),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],i)}var bM=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.makeElOption=function(t,e,n,i,r){var o=n.axis,a=o.grid,s=i.get("type"),l=SM(a,o).getOtherAxis(o).getGlobalExtent(),u=o.toGlobalCoord(o.dataToCoord(e,!0));if(s&&"none"!==s){var h=function(t){var e,n=t.get("type"),i=t.getModel(n+"Style");return"line"===n?(e=i.getLineStyle()).fill=null:"shadow"===n&&((e=i.getAreaStyle()).stroke=null),e}(i),c=MM[s](o,u,l);c.style=h,t.graphicKey=c.type,t.pointer=c}!function(t,e,n,i,r,o){var a=FS.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=r.get(["label","margin"]),_M(e,i,r,o,{position:wM(i.axis,t,n),align:a.textAlign,verticalAlign:a.textVerticalAlign})}(e,t,AS(a.model,n),n,i,r)},e.prototype.getHandleTransform=function(t,e,n){var i=AS(e.axis.grid.model,e,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var r=wM(e.axis,t,i);return{x:r[0],y:r[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,e,n,i){var r=n.axis,o=r.grid,a=r.getGlobalExtent(!0),s=SM(o,r).getOtherAxis(r).getGlobalExtent(),l="x"===r.dim?0:1,u=[t.x,t.y];u[l]+=e[l],u[l]=Math.min(a[1],u[l]),u[l]=Math.max(a[0],u[l]);var h=(s[1]+s[0])/2,c=[h,h];c[l]=u[l];return{x:u[0],y:u[1],rotation:t.rotation,cursorPoint:c,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][l]}},e}(dM);function SM(t,e){var n={};return n[e.dim+"AxisIndex"]=e.index,t.getCartesian(n)}var MM={line:function(t,e,n){var i,r,o;return{type:"Line",subPixelOptimize:!0,shape:(i=[e,n[0]],r=[e,n[1]],o=CM(t),{x1:i[o=o||0],y1:i[1-o],x2:r[o],y2:r[1-o]})}},shadow:function(t,e,n){var i,r,o,a=Math.max(1,t.getBandWidth()),s=n[1]-n[0];return{type:"Rect",shape:(i=[e-a/2,n[0]],r=[a,s],o=CM(t),{x:i[o=o||0],y:i[1-o],width:r[o],height:r[1-o]})}}};function CM(t){return"x"===t.dim?0:1}var IM=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.type="axisPointer",e.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},e}(sp),TM=bo(),DM=z;function kM(t,e,n){if(!r.node){var i=e.getZr();TM(i).records||(TM(i).records={}),function(t,e){if(TM(t).initialized)return;function n(n,i){t.on(n,(function(n){var r=function(t){var e={showTip:[],hideTip:[]},n=function(i){var r=e[i.type];r?r.push(i):(i.dispatchAction=n,t.dispatchAction(i))};return{dispatchAction:n,pendings:e}}(e);DM(TM(t).records,(function(t){t&&i(t,n,r.dispatchAction)})),function(t,e){var n,i=t.showTip.length,r=t.hideTip.length;i?n=t.showTip[i-1]:r&&(n=t.hideTip[r-1]);n&&(n.dispatchAction=null,e.dispatchAction(n))}(r.pendings,e)}))}TM(t).initialized=!0,n("click",W(PM,"click")),n("mousemove",W(PM,"mousemove")),n("globalout",AM)}(i,e),(TM(i).records[t]||(TM(i).records[t]={})).handler=n}}function AM(t,e,n){t.handler("leave",null,n)}function PM(t,e,n,i){e.handler(t,n,i)}function LM(t,e){if(!r.node){var n=e.getZr();(TM(n).records||{})[t]&&(TM(n).records[t]=null)}}var OM=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n){var i=e.getComponent("tooltip"),r=t.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";kM("axisPointer",n,(function(t,e,n){"none"!==r&&("leave"===t||r.indexOf(t)>=0)&&n({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})}))},e.prototype.remove=function(t,e){LM("axisPointer",e)},e.prototype.dispose=function(t,e){LM("axisPointer",e)},e.type="axisPointer",e}(Zf);function RM(t,e){var n,i=[],r=t.seriesIndex;if(null==r||!(n=e.getSeriesByIndex(r)))return{point:[]};var o=n.getData(),a=wo(o,t);if(null==a||a<0||G(a))return{point:[]};var s=o.getItemGraphicEl(a),l=n.coordinateSystem;if(n.getTooltipPosition)i=n.getTooltipPosition(a)||[];else if(l&&l.dataToPoint)if(t.isStacked){var u=l.getBaseAxis(),h=l.getOtherAxis(u).dim,c=u.dim,p="x"===h||"radius"===h?1:0,d=o.mapDimension(c),f=[];f[p]=o.get(d,a),f[1-p]=o.get(o.getCalculationInfo("stackResultDimension"),a),i=l.dataToPoint(f)||[]}else i=l.dataToPoint(o.getValues(E(l.dimensions,(function(t){return o.mapDimension(t)})),a))||[];else if(s){var g=s.getBoundingRect().clone();g.applyTransform(s.transform),i=[g.x+g.width/2,g.y+g.height/2]}return{point:i,el:s}}var NM=bo();function zM(t,e,n){var i=t.currTrigger,r=[t.x,t.y],o=t,a=t.dispatchAction||H(n.dispatchAction,n),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){HM(r)&&(r=RM({seriesIndex:o.seriesIndex,dataIndex:o.dataIndex},e).point);var l=HM(r),u=o.axesInfo,h=s.axesInfo,c="leave"===i||HM(r),p={},d={},f={list:[],map:{}},g={showPointer:W(BM,d),showTooltip:W(VM,f)};z(s.coordSysMap,(function(t,e){var n=l||t.containPoint(r);z(s.coordSysAxesInfo[e],(function(t,e){var i=t.axis,o=function(t,e){for(var n=0;n<(t||[]).length;n++){var i=t[n];if(e.axis.dim===i.axisDim&&e.axis.model.componentIndex===i.axisIndex)return i}}(u,t);if(!c&&n&&(!u||o)){var a=o&&o.value;null!=a||l||(a=i.pointToData(r)),null!=a&&EM(t,a,g,!1,p)}}))}));var v={};return z(h,(function(t,e){var n=t.linkGroup;n&&!d[e]&&z(n.axesInfo,(function(e,i){var r=d[i];if(e!==t&&r){var o=r.value;n.mapper&&(o=t.axis.scale.parse(n.mapper(o,FM(e),FM(t)))),v[t.key]=o}}))})),z(v,(function(t,e){EM(h[e],t,g,!0,p)})),function(t,e,n){var i=n.axesInfo=[];z(e,(function(e,n){var r=e.axisPointerModel.option,o=t[n];o?(!e.useHandle&&(r.status="show"),r.value=o.value,r.seriesDataIndices=(o.payloadBatch||[]).slice()):!e.useHandle&&(r.status="hide"),"show"===r.status&&i.push({axisDim:e.axis.dim,axisIndex:e.axis.model.componentIndex,value:r.value})}))}(d,h,p),function(t,e,n,i){if(HM(e)||!t.list.length)return void i({type:"hideTip"});var r=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};i({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:r.dataIndexInside,dataIndex:r.dataIndex,seriesIndex:r.seriesIndex,dataByCoordSys:t.list})}(f,r,t,a),function(t,e,n){var i=n.getZr(),r="axisPointerLastHighlights",o=NM(i)[r]||{},a=NM(i)[r]={};z(t,(function(t,e){var n=t.axisPointerModel.option;"show"===n.status&&z(n.seriesDataIndices,(function(t){var e=t.seriesIndex+" | "+t.dataIndex;a[e]=t}))}));var s=[],l=[];z(o,(function(t,e){!a[e]&&l.push(t)})),z(a,(function(t,e){!o[e]&&s.push(t)})),l.length&&n.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&n.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}(h,0,n),p}}function EM(t,e,n,i,r){var o=t.axis;if(!o.scale.isBlank()&&o.containData(e))if(t.involveSeries){var a=function(t,e){var n=e.axis,i=n.dim,r=t,o=[],a=Number.MAX_VALUE,s=-1;return z(e.seriesModels,(function(e,l){var u,h,c=e.getData().mapDimensionsAll(i);if(e.getAxisTooltipData){var p=e.getAxisTooltipData(c,t,n);h=p.dataIndices,u=p.nestestValue}else{if(!(h=e.getData().indicesOfNearest(c[0],t,"category"===n.type?.5:null)).length)return;u=e.getData().get(c[0],h[0])}if(null!=u&&isFinite(u)){var d=t-u,f=Math.abs(d);f<=a&&((f=0&&s<0)&&(a=f,s=d,r=u,o.length=0),z(h,(function(t){o.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})})))}})),{payloadBatch:o,snapToValue:r}}(e,t),s=a.payloadBatch,l=a.snapToValue;s[0]&&null==r.seriesIndex&&k(r,s[0]),!i&&t.snap&&o.containData(l)&&null!=l&&(e=l),n.showPointer(t,e,s),n.showTooltip(t,a,l)}else n.showPointer(t,e)}function BM(t,e,n,i){t[e.key]={value:n,payloadBatch:i}}function VM(t,e,n,i){var r=n.payloadBatch,o=e.axis,a=o.model,s=e.axisPointerModel;if(e.triggerTooltip&&r.length){var l=e.coordSys.model,u=$S(l),h=t.map[u];h||(h=t.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},t.list.push(h)),h.dataByAxis.push({axisDim:o.dim,axisIndex:a.componentIndex,axisType:a.type,axisId:a.id,value:i,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:r.slice()})}}function FM(t){var e=t.axis.model,n={},i=n.axisDim=t.axis.dim;return n.axisIndex=n[i+"AxisIndex"]=e.componentIndex,n.axisName=n[i+"AxisName"]=e.name,n.axisId=n[i+"AxisId"]=e.id,n}function HM(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}function WM(t){JS.registerAxisPointerClass("CartesianAxisPointer",bM),t.registerComponentModel(IM),t.registerComponentView(OM),t.registerPreprocessor((function(t){if(t){(!t.axisPointer||0===t.axisPointer.length)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!G(e)&&(t.axisPointer.link=[e])}})),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,(function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=YS(t,e)})),t.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},zM)}function GM(t,e){var n;return z(e,(function(e){null!=t[e]&&"auto"!==t[e]&&(n=!0)})),n}var UM=["transition","enterFrom","leaveTo"],ZM=UM.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function YM(t,e,n){if(n&&(!t[n]&&e[n]&&(t[n]={}),t=t[n],e=e[n]),t&&e)for(var i=n?UM:ZM,r=0;r0&&(a.during=s?H(oC,{el:e,userDuring:s}):null,a.setToFinal=!0,a.scope=t),k(a,n[o]),a}function tC(t,e,n,i){var r=(i=i||{}).dataIndex,o=i.isInit,a=i.clearStyle,s=n.isAnimationEnabled(),l=QM(t),u=e.style;l.userDuring=e.during;var h={},c={};if(function(t,e,n){for(var i=0;i=0)){var c=t.getAnimationStyleProps(),p=c?c.style:null;if(p){!r&&(r=i.style={});var d=F(n);for(u=0;u0&&t.animateFrom(p,d)}else!function(t,e,n,i,r){if(r){var o=JM("update",t,e,i,n);o.duration>0&&t.animateFrom(r,o)}}(t,e,r||0,n,h);eC(t,e),u?t.dirty():t.markRedraw()}function eC(t,e){for(var n=QM(t).leaveToProps,i=0;i<$M.length;i++){var r=$M[i],o=r?e[r]:e;o&&o.leaveTo&&(n||(n=QM(t).leaveToProps={}),r&&(n[r]=n[r]||{}),k(r?n[r]:n,o.leaveTo))}}function nC(t){return"all"===t}var iC={},rC={setTransform:function(t,e){return iC.el[t]=e,this},getTransform:function(t){return iC.el[t]},setShape:function(t,e){var n=iC.el;return(n.shape||(n.shape={}))[t]=e,n.dirtyShape&&n.dirtyShape(),this},getShape:function(t){var e=iC.el.shape;if(e)return e[t]},setStyle:function(t,e){var n=iC.el,i=n.style;return i&&(i[t]=e,n.dirtyStyle&&n.dirtyStyle()),this},getStyle:function(t){var e=iC.el.style;if(e)return e[t]},setExtra:function(t,e){return(iC.el.extra||(iC.el.extra={}))[t]=e,this},getExtra:function(t){var e=iC.el.extra;if(e)return e[t]}};function oC(){var t=this,e=t.el;if(e){var n=QM(e).userDuring,i=t.userDuring;n===i?(iC.el=e,i(rC)):t.el=t.userDuring=null}}function aC(t,e,n,i){var r=n[t];if(r){var o,a=e[t];if(a){var s=n.transition,l=r.transition;if(l)if(!o&&(o=i[t]={}),nC(l))k(o,a);else for(var u=uo(l),h=0;h=0){!o&&(o=i[t]={});var p=F(a);for(h=0;h=0;l--){var p,d,f;if(f=null!=(d=mo((p=n[l]).id,null))?r.get(d):null){var g=f.parent,v=(c=dC(g),{}),y=ep(f,p,g===i?{width:o,height:a}:{width:c.width,height:c.height},null,{hv:p.hv,boundingMode:p.bounding},v);if(!dC(f).isNew&&y){for(var m=p.transition,_={},x=0;x=0)?_[w]=b:f[w]=b}Xu(f,_,t,0)}else f.attr(v)}}},e.prototype._clear=function(){var t=this,e=this._elMap;e.each((function(n){yC(n,dC(n).option,e,t._lastGraphicModel)})),this._elMap=gt()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e}(Zf);function gC(t){var e=_t(pC,t)?pC[t]:sh(t);var n=new e({});return dC(n).type=t,n}function vC(t,e,n,i){var r=gC(n);return e.add(r),i.set(t,r),dC(r).id=t,dC(r).isNew=!0,r}function yC(t,e,n,i){t&&t.parent&&("group"===t.type&&t.traverse((function(t){yC(t,e,n,i)})),function(t,e,n,i){if(t){var r=t.parent,o=QM(t).leaveToProps;if(o){var a=JM("update",t,e,n,0);a.done=function(){r.remove(t),i&&i()},t.animateTo(o,a)}else r.remove(t),i&&i()}}(t,e,i),n.removeKey(dC(t).id))}function mC(t,e,n,i){t.isGroup||z([["cursor",ha.prototype.cursor],["zlevel",i||0],["z",n||0],["z2",0]],(function(n){var i=n[0];_t(e,i)?t[i]=it(e[i],n[1]):null==t[i]&&(t[i]=n[1])})),z(F(e),(function(n){if(0===n.indexOf("on")){var i=e[n];t[n]=U(i)?i:null}})),_t(e,"draggable")&&(t.draggable=e.draggable),null!=e.name&&(t.name=e.name),null!=e.id&&(t.id=e.id)}var _C=["x","y","radius","angle","single"],xC=["cartesian2d","polar","singleAxis"];function wC(t){return t+"Axis"}function bC(t,e){var n,i=gt(),r=[],o=gt();t.eachComponent({mainType:"dataZoom",query:e},(function(t){o.get(t.uid)||s(t)}));do{n=!1,t.eachComponent("dataZoom",a)}while(n);function a(t){!o.get(t.uid)&&function(t){var e=!1;return t.eachTargetAxis((function(t,n){var r=i.get(t);r&&r[n]&&(e=!0)})),e}(t)&&(s(t),n=!0)}function s(t){o.set(t.uid,!0),r.push(t),t.eachTargetAxis((function(t,e){(i.get(t)||i.set(t,[]))[e]=!0}))}return r}function SC(t){var e=t.ecModel,n={infoList:[],infoMap:gt()};return t.eachTargetAxis((function(t,i){var r=e.getComponent(wC(t),i);if(r){var o=r.getCoordSysModel();if(o){var a=o.uid,s=n.infoMap.get(a);s||(s={model:o,axisModels:[]},n.infoList.push(s),n.infoMap.set(a,s)),s.axisModels.push(r)}}})),n}var MC=function(){function t(){this.indexList=[],this.indexMap=[]}return t.prototype.add=function(t){this.indexMap[t]||(this.indexList.push(t),this.indexMap[t]=!0)},t}(),CC=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._autoThrottle=!0,n._noTarget=!0,n._rangePropMode=["percent","percent"],n}return n(e,t),e.prototype.init=function(t,e,n){var i=IC(t);this.settledOption=i,this.mergeDefaultAndTheme(t,n),this._doInit(i)},e.prototype.mergeOption=function(t){var e=IC(t);T(this.option,t,!0),T(this.settledOption,e,!0),this._doInit(e)},e.prototype._doInit=function(t){var e=this.option;this._setDefaultThrottle(t),this._updateRangeUse(t);var n=this.settledOption;z([["start","startValue"],["end","endValue"]],(function(t,i){"value"===this._rangePropMode[i]&&(e[t[0]]=n[t[0]]=null)}),this),this._resetTarget()},e.prototype._resetTarget=function(){var t=this.get("orient",!0),e=this._targetAxisInfoMap=gt();this._fillSpecifiedTargetAxis(e)?this._orient=t||this._makeAutoOrientByTargetAxis():(this._orient=t||"horizontal",this._fillAutoTargetAxisByOrient(e,this._orient)),this._noTarget=!0,e.each((function(t){t.indexList.length&&(this._noTarget=!1)}),this)},e.prototype._fillSpecifiedTargetAxis=function(t){var e=!1;return z(_C,(function(n){var i=this.getReferringComponents(wC(n),To);if(i.specified){e=!0;var r=new MC;z(i.models,(function(t){r.add(t.componentIndex)})),t.set(n,r)}}),this),e},e.prototype._fillAutoTargetAxisByOrient=function(t,e){var n=this.ecModel,i=!0;if(i){var r="vertical"===e?"y":"x";o(n.findComponents({mainType:r+"Axis"}),r)}i&&o(n.findComponents({mainType:"singleAxis",filter:function(t){return t.get("orient",!0)===e}}),"single");function o(e,n){var r=e[0];if(r){var o=new MC;if(o.add(r.componentIndex),t.set(n,o),i=!1,"x"===n||"y"===n){var a=r.getReferringComponents("grid",Io).models[0];a&&z(e,(function(t){r.componentIndex!==t.componentIndex&&a===t.getReferringComponents("grid",Io).models[0]&&o.add(t.componentIndex)}))}}}i&&z(_C,(function(e){if(i){var r=n.findComponents({mainType:wC(e),filter:function(t){return"category"===t.get("type",!0)}});if(r[0]){var o=new MC;o.add(r[0].componentIndex),t.set(e,o),i=!1}}}),this)},e.prototype._makeAutoOrientByTargetAxis=function(){var t;return this.eachTargetAxis((function(e){!t&&(t=e)}),this),"y"===t?"vertical":"horizontal"},e.prototype._setDefaultThrottle=function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var e=this.ecModel.option;this.option.throttle=e.animation&&e.animationDurationUpdate>0?100:20}},e.prototype._updateRangeUse=function(t){var e=this._rangePropMode,n=this.get("rangeMode");z([["start","startValue"],["end","endValue"]],(function(i,r){var o=null!=t[i[0]],a=null!=t[i[1]];o&&!a?e[r]="percent":!o&&a?e[r]="value":n?e[r]=n[r]:o&&(e[r]="percent")}))},e.prototype.noTarget=function(){return this._noTarget},e.prototype.getFirstTargetAxisModel=function(){var t;return this.eachTargetAxis((function(e,n){null==t&&(t=this.ecModel.getComponent(wC(e),n))}),this),t},e.prototype.eachTargetAxis=function(t,e){this._targetAxisInfoMap.each((function(n,i){z(n.indexList,(function(n){t.call(e,i,n)}))}))},e.prototype.getAxisProxy=function(t,e){var n=this.getAxisModel(t,e);if(n)return n.__dzAxisProxy},e.prototype.getAxisModel=function(t,e){var n=this._targetAxisInfoMap.get(t);if(n&&n.indexMap[e])return this.ecModel.getComponent(wC(t),e)},e.prototype.setRawRange=function(t){var e=this.option,n=this.settledOption;z([["start","startValue"],["end","endValue"]],(function(i){null==t[i[0]]&&null==t[i[1]]||(e[i[0]]=n[i[0]]=t[i[0]],e[i[1]]=n[i[1]]=t[i[1]])}),this),this._updateRangeUse(t)},e.prototype.setCalculatedRange=function(t){var e=this.option;z(["start","startValue","end","endValue"],(function(n){e[n]=t[n]}))},e.prototype.getPercentRange=function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},e.prototype.getValueRange=function(t,e){if(null!=t||null!=e)return this.getAxisProxy(t,e).getDataValueWindow();var n=this.findRepresentativeAxisProxy();return n?n.getDataValueWindow():void 0},e.prototype.findRepresentativeAxisProxy=function(t){if(t)return t.__dzAxisProxy;for(var e,n=this._targetAxisInfoMap.keys(),i=0;io&&(e[1-i]=e[i]+u.sign*o),e}function PC(t,e){var n=t[e]-t[1-e];return{span:Math.abs(n),sign:n>0?-1:n<0?1:e?-1:1}}function LC(t,e){return Math.min(null!=e[1]?e[1]:1/0,Math.max(null!=e[0]?e[0]:-1/0,t))}var OC=z,RC=Fr,NC=function(){function t(t,e,n,i){this._dimName=t,this._axisIndex=e,this.ecModel=i,this._dataZoomModel=n}return t.prototype.hostedBy=function(t){return this._dataZoomModel===t},t.prototype.getDataValueWindow=function(){return this._valueWindow.slice()},t.prototype.getDataPercentWindow=function(){return this._percentWindow.slice()},t.prototype.getTargetSeriesModels=function(){var t=[];return this.ecModel.eachSeries((function(e){if(function(t){var e=t.get("coordinateSystem");return L(xC,e)>=0}(e)){var n=wC(this._dimName),i=e.getReferringComponents(n,Io).models[0];i&&this._axisIndex===i.componentIndex&&t.push(e)}}),this),t},t.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},t.prototype.getMinMaxSpan=function(){return I(this._minMaxSpan)},t.prototype.calculateDataWindow=function(t){var e,n=this._dataExtent,i=this.getAxisModel().axis.scale,r=this._dataZoomModel.getRangePropMode(),o=[0,100],a=[],s=[];OC(["start","end"],(function(l,u){var h=t[l],c=t[l+"Value"];"percent"===r[u]?(null==h&&(h=o[u]),c=i.parse(Er(h,o,n))):(e=!0,h=Er(c=null==c?n[u]:i.parse(c),n,o)),s[u]=null==c||isNaN(c)?n[u]:c,a[u]=null==h||isNaN(h)?o[u]:h})),RC(s),RC(a);var l=this._minMaxSpan;function u(t,e,n,r,o){var a=o?"Span":"ValueSpan";AC(0,t,n,"all",l["min"+a],l["max"+a]);for(var s=0;s<2;s++)e[s]=Er(t[s],n,r,!0),o&&(e[s]=i.parse(e[s]))}return e?u(s,a,n,o,!1):u(a,s,o,n,!0),{valueWindow:s,percentWindow:a}},t.prototype.reset=function(t){if(t===this._dataZoomModel){var e=this.getTargetSeriesModels();this._dataExtent=function(t,e,n){var i=[1/0,-1/0];OC(n,(function(t){!function(t,e,n){e&&z(N_(e,n),(function(n){var i=e.getApproximateExtent(n);i[0]t[1]&&(t[1]=i[1])}))}(i,t.getData(),e)}));var r=t.getAxisModel(),o=C_(r.axis.scale,r,i).calculate();return[o.min,o.max]}(this,this._dimName,e),this._updateMinMaxSpan();var n=this.calculateDataWindow(t.settledOption);this._valueWindow=n.valueWindow,this._percentWindow=n.percentWindow,this._setAxisModel()}},t.prototype.filterData=function(t,e){if(t===this._dataZoomModel){var n=this._dimName,i=this.getTargetSeriesModels(),r=t.get("filterMode"),o=this._valueWindow;"none"!==r&&OC(i,(function(t){var e=t.getData(),i=e.mapDimensionsAll(n);if(i.length){if("weakFilter"===r){var a=e.getStore(),s=E(i,(function(t){return e.getDimensionIndex(t)}),e);e.filterSelf((function(t){for(var e,n,r,l=0;lo[1];if(h&&!c&&!p)return!0;h&&(r=!0),c&&(e=!0),p&&(n=!0)}return r&&e&&n}))}else OC(i,(function(n){if("empty"===r)t.setData(e=e.map(n,(function(t){return function(t){return t>=o[0]&&t<=o[1]}(t)?t:NaN})));else{var i={};i[n]=o,e.selectRange(i)}}));OC(i,(function(t){e.setApproximateExtent(o,t)}))}}))}},t.prototype._updateMinMaxSpan=function(){var t=this._minMaxSpan={},e=this._dataZoomModel,n=this._dataExtent;OC(["min","max"],(function(i){var r=e.get(i+"Span"),o=e.get(i+"ValueSpan");null!=o&&(o=this.getAxisModel().axis.scale.parse(o)),null!=o?r=Er(n[0]+o,n,[0,100],!0):null!=r&&(o=Er(r,[0,100],n,!0)-n[0]),t[i+"Span"]=r,t[i+"ValueSpan"]=o}),this)},t.prototype._setAxisModel=function(){var t=this.getAxisModel(),e=this._percentWindow,n=this._valueWindow;if(e){var i=Gr(n,[0,500]);i=Math.min(i,20);var r=t.axis.scale.rawExtentInfo;0!==e[0]&&r.setDeterminedMinMax("min",+n[0].toFixed(i)),100!==e[1]&&r.setDeterminedMinMax("max",+n[1].toFixed(i)),r.freeze()}},t}();var zC={getTargetSeries:function(t){function e(e){t.eachComponent("dataZoom",(function(n){n.eachTargetAxis((function(i,r){var o=t.getComponent(wC(i),r);e(i,r,o,n)}))}))}e((function(t,e,n,i){n.__dzAxisProxy=null}));var n=[];e((function(e,i,r,o){r.__dzAxisProxy||(r.__dzAxisProxy=new NC(e,i,o,t),n.push(r.__dzAxisProxy))}));var i=gt();return z(n,(function(t){z(t.getTargetSeriesModels(),(function(t){i.set(t.uid,t)}))})),i},overallReset:function(t,e){t.eachComponent("dataZoom",(function(t){t.eachTargetAxis((function(e,n){t.getAxisProxy(e,n).reset(t)})),t.eachTargetAxis((function(n,i){t.getAxisProxy(n,i).filterData(t,e)}))})),t.eachComponent("dataZoom",(function(t){var e=t.findRepresentativeAxisProxy();if(e){var n=e.getDataPercentWindow(),i=e.getDataValueWindow();t.setCalculatedRange({start:n[0],end:n[1],startValue:i[0],endValue:i[1]})}}))}};var EC=!1;function BC(t){EC||(EC=!0,t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,zC),function(t){t.registerAction("dataZoom",(function(t,e){z(bC(e,t),(function(e){e.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})}))}))}(t),t.registerSubTypeDefaulter("dataZoom",(function(){return"slider"})))}function VC(t){t.registerComponentModel(TC),t.registerComponentView(kC),BC(t)}var FC=function(){},HC={};function WC(t,e){HC[t]=e}function GC(t){return HC[t]}var UC=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.optionUpdated=function(){t.prototype.optionUpdated.apply(this,arguments);var e=this.ecModel;z(this.option.feature,(function(t,n){var i=GC(n);i&&(i.getDefaultOption&&(i.defaultOption=i.getDefaultOption(e)),T(t,i.defaultOption))}))},e.type="toolbox",e.layoutMode={type:"box",ignoreSize:!0},e.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1,position:"bottom"}},e}(sp);function ZC(t,e){var n=Hc(e.get("padding")),i=e.getItemStyle(["color","opacity"]);return i.fill=e.get("backgroundColor"),t=new bs({shape:{x:t.x-n[3],y:t.y-n[0],width:t.width+n[1]+n[3],height:t.height+n[0]+n[2],r:e.get("borderRadius")},style:i,silent:!0,z2:-1})}var YC=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.render=function(t,e,n,i){var r=this.group;if(r.removeAll(),t.get("show")){var o=+t.get("itemSize"),a="vertical"===t.get("orient"),s=t.get("feature")||{},l=this._features||(this._features={}),u=[];z(s,(function(t,e){u.push(e)})),new tm(this._featureNames||[],u).add(h).update(h).remove(W(h,null)).execute(),this._featureNames=u,function(t,e,n){var i=e.getBoxLayoutParams(),r=e.get("padding"),o={width:n.getWidth(),height:n.getHeight()},a=tp(i,o,r);Jc(e.get("orient"),t,e.get("itemGap"),a.width,a.height),ep(t,i,o,r)}(r,t,n),r.add(ZC(r.getBoundingRect(),t)),a||r.eachChild((function(t){var e=t.__title,i=t.ensureState("emphasis"),a=i.textConfig||(i.textConfig={}),s=t.getTextContent(),l=s&&s.ensureState("emphasis");if(l&&!U(l)&&e){var u=l.style||(l.style={}),h=dr(e,Cs.makeFont(u)),c=t.x+r.x,p=!1;t.y+r.y+o+h.height>n.getHeight()&&(a.position="top",p=!0);var d=p?-5-h.height:o+10;c+h.width/2>n.getWidth()?(a.position=["100%",d],u.align="right"):c-h.width/2<0&&(a.position=[0,d],u.align="left")}}))}function h(h,c){var p,d=u[h],f=u[c],g=s[d],v=new Qh(g,t,t.ecModel);if(i&&null!=i.newTitle&&i.featureName===d&&(g.title=i.newTitle),d&&!f){if(function(t){return 0===t.indexOf("my")}(d))p={onclick:v.option.onclick,featureName:d};else{var y=GC(d);if(!y)return;p=new y}l[d]=p}else if(!(p=l[f]))return;p.uid=tc("toolbox-feature"),p.model=v,p.ecModel=e,p.api=n;var m=p instanceof FC;d||!f?!v.get("show")||m&&p.unusable?m&&p.remove&&p.remove(e,n):(!function(i,s,l){var u,h,c=i.getModel("iconStyle"),p=i.getModel(["emphasis","iconStyle"]),d=s instanceof FC&&s.getIcons?s.getIcons():i.get("icon"),f=i.get("title")||{};Z(d)?(u={})[l]=d:u=d;Z(f)?(h={})[l]=f:h=f;var g=i.iconPaths={};z(u,(function(l,u){var d=bh(l,{},{x:-o/2,y:-o/2,width:o,height:o});d.setStyle(c.getItemStyle()),d.ensureState("emphasis").style=p.getItemStyle();var f=new Cs({style:{text:h[u],align:p.get("textAlign"),borderRadius:p.get("textBorderRadius"),padding:p.get("textPadding"),fill:null},ignore:!0});d.setTextContent(f),Ch({el:d,componentModel:t,itemName:u,formatterParamsExtra:{title:h[u]}}),d.__title=h[u],d.on("mouseover",(function(){var e=p.getItemStyle(),i=a?null==t.get("right")&&"right"!==t.get("left")?"right":"left":null==t.get("bottom")&&"bottom"!==t.get("top")?"bottom":"top";f.setStyle({fill:p.get("textFill")||e.fill||e.stroke||"#000",backgroundColor:p.get("textBackgroundColor")}),d.setTextConfig({position:p.get("textPosition")||i}),f.ignore=!t.get("showTitle"),n.enterEmphasis(this)})).on("mouseout",(function(){"emphasis"!==i.get(["iconStatus",u])&&n.leaveEmphasis(this),f.hide()})),("emphasis"===i.get(["iconStatus",u])?dl:fl)(d),r.add(d),d.on("click",H(s.onclick,s,e,n,u)),g[u]=d}))}(v,p,d),v.setIconStatus=function(t,e){var n=this.option,i=this.iconPaths;n.iconStatus=n.iconStatus||{},n.iconStatus[t]=e,i[t]&&("emphasis"===e?dl:fl)(i[t])},p instanceof FC&&p.render&&p.render(v,e,n,i)):m&&p.dispose&&p.dispose(e,n)}},e.prototype.updateView=function(t,e,n,i){z(this._features,(function(t){t instanceof FC&&t.updateView&&t.updateView(t.model,e,n,i)}))},e.prototype.remove=function(t,e){z(this._features,(function(n){n instanceof FC&&n.remove&&n.remove(t,e)})),this.group.removeAll()},e.prototype.dispose=function(t,e){z(this._features,(function(n){n instanceof FC&&n.dispose&&n.dispose(t,e)}))},e.type="toolbox",e}(Zf);var XC=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.onclick=function(t,e){var n=this.model,i=n.get("name")||t.get("title.0.text")||"echarts",o="svg"===e.getZr().painter.getType(),a=o?"svg":n.get("type",!0)||"png",s=e.getConnectedDataURL({type:a,backgroundColor:n.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:n.get("connectedBackgroundColor"),excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")}),l=r.browser;if(U(MouseEvent)&&(l.newEdge||!l.ie&&!l.edge)){var u=document.createElement("a");u.download=i+"."+a,u.target="_blank",u.href=s;var h=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});u.dispatchEvent(h)}else if(window.navigator.msSaveOrOpenBlob||o){var c=s.split(","),p=c[0].indexOf("base64")>-1,d=o?decodeURIComponent(c[1]):c[1];p&&(d=window.atob(d));var f=i+"."+a;if(window.navigator.msSaveOrOpenBlob){for(var g=d.length,v=new Uint8Array(g);g--;)v[g]=d.charCodeAt(g);var y=new Blob([v]);window.navigator.msSaveOrOpenBlob(y,f)}else{var m=document.createElement("iframe");document.body.appendChild(m);var _=m.contentWindow,x=_.document;x.open("image/svg+xml","replace"),x.write(d),x.close(),_.focus(),x.execCommand("SaveAs",!0,f),document.body.removeChild(m)}}else{var w=n.get("lang"),b='',S=window.open();S.document.write(b),S.document.title=i}},e.getDefaultOption=function(t){return{show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:t.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],lang:t.getLocaleModel().get(["toolbox","saveAsImage","lang"])}},e}(FC),jC="__ec_magicType_stack__",qC=[["line","bar"],["stack"]],KC=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getIcons=function(){var t=this.model,e=t.get("icon"),n={};return z(t.get("type"),(function(t){e[t]&&(n[t]=e[t])})),n},e.getDefaultOption=function(t){return{show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:t.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}}},e.prototype.onclick=function(t,e,n){var i=this.model,r=i.get(["seriesIndex",n]);if($C[n]){var o,a={series:[]};z(qC,(function(t){L(t,n)>=0&&z(t,(function(t){i.setIconStatus(t,"normal")}))})),i.setIconStatus(n,"emphasis"),t.eachComponent({mainType:"series",query:null==r?null:{seriesIndex:r}},(function(t){var e=t.subType,r=t.id,o=$C[n](e,r,t,i);o&&(A(o,t.option),a.series.push(o));var s=t.coordinateSystem;if(s&&"cartesian2d"===s.type&&("line"===n||"bar"===n)){var l=s.getAxesByScale("ordinal")[0];if(l){var u=l.dim+"Axis",h=t.getReferringComponents(u,Io).models[0].componentIndex;a[u]=a[u]||[];for(var c=0;c<=h;c++)a[u][h]=a[u][h]||{};a[u][h].boundaryGap="bar"===n}}}));var s=n;"stack"===n&&(o=T({stack:i.option.title.tiled,tiled:i.option.title.stack},i.option.title),"emphasis"!==i.get(["iconStatus",n])&&(s="tiled")),e.dispatchAction({type:"changeMagicType",currentType:s,newOption:a,newTitle:o,featureName:"magicType"})}},e}(FC),$C={line:function(t,e,n,i){if("bar"===t)return T({id:e,type:"line",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get(["option","line"])||{},!0)},bar:function(t,e,n,i){if("line"===t)return T({id:e,type:"bar",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get(["option","bar"])||{},!0)},stack:function(t,e,n,i){var r=n.get("stack")===jC;if("line"===t||"bar"===t)return i.setIconStatus("stack",r?"normal":"emphasis"),T({id:e,stack:r?"":jC},i.get(["option","stack"])||{},!0)}};Fy({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},(function(t,e){e.mergeOption(t.newOption)}));var QC=new Array(60).join("-"),JC="\t";function tI(t){return t.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}var eI=new RegExp("[\t]+","g");function nI(t,e){var n=t.split(new RegExp("\n*"+QC+"\n*","g")),i={series:[]};return z(n,(function(t,n){if(function(t){if(t.slice(0,t.indexOf("\n")).indexOf(JC)>=0)return!0}(t)){var r=function(t){for(var e=t.split(/\n+/g),n=[],i=E(tI(e.shift()).split(eI),(function(t){return{name:t,data:[]}})),r=0;r6}(t)||o){if(a&&!o){"single"===s.brushMode&&AI(t);var l=I(s);l.brushType=XI(l.brushType,a),l.panelId=a===pI?null:a.panelId,o=t._creatingCover=bI(t,l),t._covers.push(o)}if(o){var u=KI[XI(t._brushType,a)];o.__brushOption.range=u.getCreatingRange(GI(t,o,t._track)),i&&(SI(t,o),u.updateCommon(t,o)),MI(t,o),r={isEnd:i}}}else i&&"single"===s.brushMode&&s.removeOnClick&&DI(t,e,n)&&AI(t)&&(r={isEnd:i,removeOnClick:!0});return r}function XI(t,e){return"auto"===t?e.defaultBrushType:t}var jI={mousedown:function(t){if(this._dragging)qI(this,t);else if(!t.target||!t.target.draggable){UI(t);var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);this._creatingCover=null,(this._creatingPanel=DI(this,t,e))&&(this._dragging=!0,this._track=[e.slice()])}},mousemove:function(t){var e=t.offsetX,n=t.offsetY,i=this.group.transformCoordToLocal(e,n);if(function(t,e,n){if(t._brushType&&!function(t,e,n){var i=t._zr;return e<0||e>i.getWidth()||n<0||n>i.getHeight()}(t,e.offsetX,e.offsetY)){var i=t._zr,r=t._covers,o=DI(t,e,n);if(!t._dragging)for(var a=0;a=0)&&t(r,i._targetInfoList)}))}return t.prototype.setOutputRanges=function(t,e){return this.matchOutputRanges(t,e,(function(t,e,n){if((t.coordRanges||(t.coordRanges=[])).push(e),!t.coordRange){t.coordRange=e;var i=hT[t.brushType](0,n,e);t.__rangeOffset={offset:pT[t.brushType](i.values,t.range,[1,1]),xyMinMax:i.xyMinMax}}})),t},t.prototype.matchOutputRanges=function(t,e,n){z(t,(function(t){var i=this.findTargetInfo(t,e);i&&!0!==i&&z(i.coordSyses,(function(i){var r=hT[t.brushType](1,i,t.range,!0);n(t,r.values,i,e)}))}),this)},t.prototype.setInputRanges=function(t,e){z(t,(function(t){var n,i,r,o,a,s=this.findTargetInfo(t,e);if(t.range=t.range||[],s&&!0!==s){t.panelId=s.panelId;var l=hT[t.brushType](0,s.coordSys,t.coordRange),u=t.__rangeOffset;t.range=u?pT[t.brushType](l.values,u.offset,(n=l.xyMinMax,i=u.xyMinMax,r=fT(n),o=fT(i),a=[r[0]/o[0],r[1]/o[1]],isNaN(a[0])&&(a[0]=1),isNaN(a[1])&&(a[1]=1),a)):l.values}}),this)},t.prototype.makePanelOpts=function(t,e){return E(this._targetInfoList,(function(n){var i=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:e?e(n):null,clipPath:JI(i),isTargetByCursor:eT(i,t,n.coordSysModel),getLinearBrushOtherExtent:tT(i)}}))},t.prototype.controlSeries=function(t,e,n){var i=this.findTargetInfo(t,n);return!0===i||i&&L(i.coordSyses,e.coordinateSystem)>=0},t.prototype.findTargetInfo=function(t,e){for(var n=this._targetInfoList,i=aT(e,t),r=0;rt[1]&&t.reverse(),t}function aT(t,e){return Mo(t,e,{includeMainTypes:iT})}var sT={grid:function(t,e){var n=t.xAxisModels,i=t.yAxisModels,r=t.gridModels,o=gt(),a={},s={};(n||i||r)&&(z(n,(function(t){var e=t.axis.grid.model;o.set(e.id,e),a[e.id]=!0})),z(i,(function(t){var e=t.axis.grid.model;o.set(e.id,e),s[e.id]=!0})),z(r,(function(t){o.set(t.id,t),a[t.id]=!0,s[t.id]=!0})),o.each((function(t){var r=t.coordinateSystem,o=[];z(r.getCartesians(),(function(t,e){(L(n,t.getAxis("x").model)>=0||L(i,t.getAxis("y").model)>=0)&&o.push(t)})),e.push({panelId:"grid--"+t.id,gridModel:t,coordSysModel:t,coordSys:o[0],coordSyses:o,getPanelRect:uT.grid,xAxisDeclared:a[t.id],yAxisDeclared:s[t.id]})})))},geo:function(t,e){z(t.geoModels,(function(t){var n=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:n,coordSyses:[n],getPanelRect:uT.geo})}))}},lT=[function(t,e){var n=t.xAxisModel,i=t.yAxisModel,r=t.gridModel;return!r&&n&&(r=n.axis.grid.model),!r&&i&&(r=i.axis.grid.model),r&&r===e.gridModel},function(t,e){var n=t.geoModel;return n&&n===e.geoModel}],uT={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(gh(t)),e}},hT={lineX:W(cT,0),lineY:W(cT,1),rect:function(t,e,n,i){var r=t?e.pointToData([n[0][0],n[1][0]],i):e.dataToPoint([n[0][0],n[1][0]],i),o=t?e.pointToData([n[0][1],n[1][1]],i):e.dataToPoint([n[0][1],n[1][1]],i),a=[oT([r[0],o[0]]),oT([r[1],o[1]])];return{values:a,xyMinMax:a}},polygon:function(t,e,n,i){var r=[[1/0,-1/0],[1/0,-1/0]];return{values:E(n,(function(n){var o=t?e.pointToData(n,i):e.dataToPoint(n,i);return r[0][0]=Math.min(r[0][0],o[0]),r[1][0]=Math.min(r[1][0],o[1]),r[0][1]=Math.max(r[0][1],o[0]),r[1][1]=Math.max(r[1][1],o[1]),o})),xyMinMax:r}}};function cT(t,e,n,i){var r=n.getAxis(["x","y"][t]),o=oT(E([0,1],(function(t){return e?r.coordToData(r.toLocalCoord(i[t]),!0):r.toGlobalCoord(r.dataToCoord(i[t]))}))),a=[];return a[t]=o,a[1-t]=[NaN,NaN],{values:o,xyMinMax:a}}var pT={lineX:W(dT,0),lineY:W(dT,1),rect:function(t,e,n){return[[t[0][0]-n[0]*e[0][0],t[0][1]-n[0]*e[0][1]],[t[1][0]-n[1]*e[1][0],t[1][1]-n[1]*e[1][1]]]},polygon:function(t,e,n){return E(t,(function(t,i){return[t[0]-n[0]*e[i][0],t[1]-n[1]*e[i][1]]}))}};function dT(t,e,n,i){return[e[0]-i[t]*n[0],e[1]-i[t]*n[1]]}function fT(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}var gT,vT,yT=z,mT=lo+"toolbox-dataZoom_",_T=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.render=function(t,e,n,i){this._brushController||(this._brushController=new wI(n.getZr()),this._brushController.on("brush",H(this._onBrush,this)).mount()),function(t,e,n,i,r){var o=n._isZoomActive;i&&"takeGlobalCursor"===i.type&&(o="dataZoomSelect"===i.key&&i.dataZoomSelectActive);n._isZoomActive=o,t.setIconStatus("zoom",o?"emphasis":"normal");var a=new rT(wT(t),e,{include:["grid"]}),s=a.makePanelOpts(r,(function(t){return t.xAxisDeclared&&!t.yAxisDeclared?"lineX":!t.xAxisDeclared&&t.yAxisDeclared?"lineY":"rect"}));n._brushController.setPanels(s).enableBrush(!(!o||!s.length)&&{brushType:"auto",brushStyle:t.getModel("brushStyle").getItemStyle()})}(t,e,this,i,n),function(t,e){t.setIconStatus("back",function(t){return sI(t).length}(e)>1?"emphasis":"normal")}(t,e)},e.prototype.onclick=function(t,e,n){xT[n].call(this)},e.prototype.remove=function(t,e){this._brushController&&this._brushController.unmount()},e.prototype.dispose=function(t,e){this._brushController&&this._brushController.dispose()},e.prototype._onBrush=function(t){var e=t.areas;if(t.isEnd&&e.length){var n={},i=this.ecModel;this._brushController.updateCovers([]),new rT(wT(this.model),i,{include:["grid"]}).matchOutputRanges(e,i,(function(t,e,n){if("cartesian2d"===n.type){var i=t.brushType;"rect"===i?(r("x",n,e[0]),r("y",n,e[1])):r({lineX:"x",lineY:"y"}[i],n,e)}})),function(t,e){var n=sI(t);oI(e,(function(e,i){for(var r=n.length-1;r>=0&&!n[r][i];r--);if(r<0){var o=t.queryComponents({mainType:"dataZoom",subType:"select",id:i})[0];if(o){var a=o.getPercentRange();n[0][i]={dataZoomId:i,start:a[0],end:a[1]}}}})),n.push(e)}(i,n),this._dispatchZoomAction(n)}function r(t,e,r){var o=e.getAxis(t),a=o.model,s=function(t,e,n){var i;return n.eachComponent({mainType:"dataZoom",subType:"select"},(function(n){n.getAxisModel(t,e.componentIndex)&&(i=n)})),i}(t,a,i),l=s.findRepresentativeAxisProxy(a).getMinMaxSpan();null==l.minValueSpan&&null==l.maxValueSpan||(r=AC(0,r.slice(),o.scale.getExtent(),0,l.minValueSpan,l.maxValueSpan)),s&&(n[s.id]={dataZoomId:s.id,startValue:r[0],endValue:r[1]})}},e.prototype._dispatchZoomAction=function(t){var e=[];yT(t,(function(t,n){e.push(I(t))})),e.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:e})},e.getDefaultOption=function(t){return{show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:t.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:"rgba(210,219,238,0.2)"}}},e}(FC),xT={zoom:function(){var t=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(function(t){var e=sI(t),n=e[e.length-1];e.length>1&&e.pop();var i={};return oI(n,(function(t,n){for(var r=e.length-1;r>=0;r--)if(t=e[r][n]){i[n]=t;break}})),i}(this.ecModel))}};function wT(t){var e={xAxisIndex:t.get("xAxisIndex",!0),yAxisIndex:t.get("yAxisIndex",!0),xAxisId:t.get("xAxisId",!0),yAxisId:t.get("yAxisId",!0)};return null==e.xAxisIndex&&null==e.xAxisId&&(e.xAxisIndex="all"),null==e.yAxisIndex&&null==e.yAxisId&&(e.yAxisIndex="all"),e}gT="dataZoom",vT=function(t){var e=t.getComponent("toolbox",0),n=["feature","dataZoom"];if(e&&null!=e.get(n)){var i=e.getModel(n),r=[],o=Mo(t,wT(i));return yT(o.xAxisModels,(function(t){return a(t,"xAxis","xAxisIndex")})),yT(o.yAxisModels,(function(t){return a(t,"yAxis","yAxisIndex")})),r}function a(t,e,n){var o=t.componentIndex,a={type:"select",$fromToolbox:!0,filterMode:i.get("filterMode",!0)||"filter",id:mT+e+o};a[n]=o,r.push(a)}},st(null==kp.get(gT)&&vT),kp.set(gT,vT);var bT=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.type="tooltip",e.dependencies=["axisPointer"],e.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},e}(sp);function ST(t){var e=t.get("confine");return null!=e?!!e:"richText"===t.get("renderMode")}function MT(t){if(r.domSupported)for(var e=document.documentElement.style,n=0,i=t.length;n-1?(u+="top:50%",h+="translateY(-50%) rotate("+(a="left"===s?-225:-45)+"deg)"):(u+="left:50%",h+="translateX(-50%) rotate("+(a="top"===s?225:45)+"deg)");var c=a*Math.PI/180,p=l+r,d=p*Math.abs(Math.cos(c))+p*Math.abs(Math.sin(c)),f=e+" solid "+r+"px;";return'
    '}(n,i,r)),Z(t))o.innerHTML=t+a;else if(t){o.innerHTML="",G(t)||(t=[t]);for(var s=0;s=0?this._tryShow(n,i):"leave"===e&&this._hide(i))}),this))},e.prototype._keepShow=function(){var t=this._tooltipModel,e=this._ecModel,n=this._api,i=t.get("triggerOn");if(null!=this._lastX&&null!=this._lastY&&"none"!==i&&"click"!==i){var r=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout((function(){!n.isDisposed()&&r.manuallyShowTip(t,e,n,{x:r._lastX,y:r._lastY,dataByCoordSys:r._lastDataByCoordSys})}))}},e.prototype.manuallyShowTip=function(t,e,n,i){if(i.from!==this.uid&&!r.node&&n.getDom()){var o=HT(i,n);this._ticket="";var a=i.dataByCoordSys,s=function(t,e,n){var i=Co(t).queryOptionMap,r=i.keys()[0];if(!r||"series"===r)return;var o=Do(e,r,i.get(r),{useDefault:!1,enableAll:!1,enableNone:!1}),a=o.models[0];if(!a)return;var s,l=n.getViewOfComponentModel(a);if(l.group.traverse((function(e){var n=Bs(e).tooltipConfig;if(n&&n.name===t.name)return s=e,!0})),s)return{componentMainType:r,componentIndex:a.componentIndex,el:s}}(i,e,n);if(s){var l=s.el.getBoundingRect().clone();l.applyTransform(s.el.transform),this._tryShow({offsetX:l.x+l.width/2,offsetY:l.y+l.height/2,target:s.el,position:i.position,positionDefault:"bottom"},o)}else if(i.tooltip&&null!=i.x&&null!=i.y){var u=BT;u.x=i.x,u.y=i.y,u.update(),Bs(u).tooltipConfig={name:null,option:i.tooltip},this._tryShow({offsetX:i.x,offsetY:i.y,target:u},o)}else if(a)this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,dataByCoordSys:a,tooltipOption:i.tooltipOption},o);else if(null!=i.seriesIndex){if(this._manuallyAxisShowTip(t,e,n,i))return;var h=RM(i,e),c=h.point[0],p=h.point[1];null!=c&&null!=p&&this._tryShow({offsetX:c,offsetY:p,target:h.el,position:i.position,positionDefault:"bottom"},o)}else null!=i.x&&null!=i.y&&(n.dispatchAction({type:"updateAxisPointer",x:i.x,y:i.y}),this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,target:n.getZr().findHover(i.x,i.y).target},o))}},e.prototype.manuallyHideTip=function(t,e,n,i){var r=this._tooltipContent;this._tooltipModel&&r.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,i.from!==this.uid&&this._hide(HT(i,n))},e.prototype._manuallyAxisShowTip=function(t,e,n,i){var r=i.seriesIndex,o=i.dataIndex,a=e.getComponent("axisPointer").coordSysAxesInfo;if(null!=r&&null!=o&&null!=a){var s=e.getSeriesByIndex(r);if(s)if("axis"===FT([s.getData().getItemModel(o),s,(s.coordinateSystem||{}).model],this._tooltipModel).get("trigger"))return n.dispatchAction({type:"updateAxisPointer",seriesIndex:r,dataIndex:o,position:i.position}),!0}},e.prototype._tryShow=function(t,e){var n=t.target;if(this._tooltipModel){this._lastX=t.offsetX,this._lastY=t.offsetY;var i=t.dataByCoordSys;if(i&&i.length)this._showAxisTooltip(i,t);else if(n){var r,o;this._lastDataByCoordSys=null,Yg(n,(function(t){return null!=Bs(t).dataIndex?(r=t,!0):null!=Bs(t).tooltipConfig?(o=t,!0):void 0}),!0),r?this._showSeriesItemTooltip(t,r,e):o?this._showComponentItemTooltip(t,o,e):this._hide(e)}else this._lastDataByCoordSys=null,this._hide(e)}},e.prototype._showOrMove=function(t,e){var n=t.get("showDelay");e=H(e,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(e,n):e()},e.prototype._showAxisTooltip=function(t,e){var n=this._ecModel,i=this._tooltipModel,r=[e.offsetX,e.offsetY],o=FT([e.tooltipOption],i),a=this._renderMode,s=[],l=Sf("section",{blocks:[],noHeader:!0}),u=[],h=new Of;z(t,(function(t){z(t.dataByAxis,(function(t){var e=n.getComponent(t.axisDim+"Axis",t.axisIndex),r=t.value;if(e&&null!=r){var o=xM(r,e.axis,n,t.seriesDataIndices,t.valueLabelOpt),c=Sf("section",{header:o,noHeader:!lt(o),sortBlocks:!0,blocks:[]});l.blocks.push(c),z(t.seriesDataIndices,(function(l){var p=n.getSeriesByIndex(l.seriesIndex),d=l.dataIndexInside,f=p.getDataParams(d);if(!(f.dataIndex<0)){f.axisDim=t.axisDim,f.axisIndex=t.axisIndex,f.axisType=t.axisType,f.axisId=t.axisId,f.axisValue=P_(e.axis,{value:r}),f.axisValueLabel=o,f.marker=h.makeTooltipMarker("item",Xc(f.color),a);var g=Ud(p.formatTooltip(d,!0,null)),v=g.frag;if(v){var y=FT([p],i).get("valueFormatter");c.blocks.push(y?k({valueFormatter:y},v):v)}g.text&&u.push(g.text),s.push(f)}}))}}))})),l.blocks.reverse(),u.reverse();var c=e.position,p=o.get("order"),d=kf(l,h,a,p,n.get("useUTC"),o.get("textStyle"));d&&u.unshift(d);var f="richText"===a?"\n\n":"
    ",g=u.join(f);this._showOrMove(o,(function(){this._updateContentNotChangedOnAxis(t,s)?this._updatePosition(o,c,r[0],r[1],this._tooltipContent,s):this._showTooltipContent(o,g,s,Math.random()+"",r[0],r[1],c,null,h)}))},e.prototype._showSeriesItemTooltip=function(t,e,n){var i=this._ecModel,r=Bs(e),o=r.seriesIndex,a=i.getSeriesByIndex(o),s=r.dataModel||a,l=r.dataIndex,u=r.dataType,h=s.getData(u),c=this._renderMode,p=t.positionDefault,d=FT([h.getItemModel(l),s,a&&(a.coordinateSystem||{}).model],this._tooltipModel,p?{position:p}:null),f=d.get("trigger");if(null==f||"item"===f){var g=s.getDataParams(l,u),v=new Of;g.marker=v.makeTooltipMarker("item",Xc(g.color),c);var y=Ud(s.formatTooltip(l,!1,u)),m=d.get("order"),_=d.get("valueFormatter"),x=y.frag,w=x?kf(_?k({valueFormatter:_},x):x,v,c,m,i.get("useUTC"),d.get("textStyle")):y.text,b="item_"+s.name+"_"+l;this._showOrMove(d,(function(){this._showTooltipContent(d,w,g,b,t.offsetX,t.offsetY,t.position,t.target,v)})),n({type:"showTip",dataIndexInside:l,dataIndex:h.getRawIndex(l),seriesIndex:o,from:this.uid})}},e.prototype._showComponentItemTooltip=function(t,e,n){var i=Bs(e),r=i.tooltipConfig.option||{};if(Z(r)){r={content:r,formatter:r}}var o=[r],a=this._ecModel.getComponent(i.componentMainType,i.componentIndex);a&&o.push(a),o.push({formatter:r.content});var s=t.positionDefault,l=FT(o,this._tooltipModel,s?{position:s}:null),u=l.get("content"),h=Math.random()+"",c=new Of;this._showOrMove(l,(function(){var n=I(l.get("formatterParams")||{});this._showTooltipContent(l,u,n,h,t.offsetX,t.offsetY,t.position,e,c)})),n({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(t,e,n,i,r,o,a,s,l){if(this._ticket="",t.get("showContent")&&t.get("show")){var u=this._tooltipContent;u.setEnterable(t.get("enterable"));var h=t.get("formatter");a=a||t.get("position");var c=e,p=this._getNearestPoint([r,o],n,t.get("trigger"),t.get("borderColor")).color;if(h)if(Z(h)){var d=t.ecModel.get("useUTC"),f=G(n)?n[0]:n;c=h,f&&f.axisType&&f.axisType.indexOf("time")>=0&&(c=bc(f.axisValue,c,d)),c=Zc(c,n,!0)}else if(U(h)){var g=H((function(e,i){e===this._ticket&&(u.setContent(i,l,t,p,a),this._updatePosition(t,a,r,o,u,n,s))}),this);this._ticket=i,c=h(n,i,g)}else c=h;u.setContent(c,l,t,p,a),u.show(t,p),this._updatePosition(t,a,r,o,u,n,s)}},e.prototype._getNearestPoint=function(t,e,n,i){return"axis"===n||G(e)?{color:i||("html"===this._renderMode?"#fff":"none")}:G(e)?void 0:{color:i||e.color||e.borderColor}},e.prototype._updatePosition=function(t,e,n,i,r,o,a){var s=this._api.getWidth(),l=this._api.getHeight();e=e||t.get("position");var u=r.getSize(),h=t.get("align"),c=t.get("verticalAlign"),p=a&&a.getBoundingRect().clone();if(a&&p.applyTransform(a.transform),U(e)&&(e=e([n,i],o,r.el,p,{viewSize:[s,l],contentSize:u.slice()})),G(e))n=Br(e[0],s),i=Br(e[1],l);else if(j(e)){var d=e;d.width=u[0],d.height=u[1];var f=tp(d,{width:s,height:l});n=f.x,i=f.y,h=null,c=null}else if(Z(e)&&a){var g=function(t,e,n,i){var r=n[0],o=n[1],a=Math.ceil(Math.SQRT2*i)+8,s=0,l=0,u=e.width,h=e.height;switch(t){case"inside":s=e.x+u/2-r/2,l=e.y+h/2-o/2;break;case"top":s=e.x+u/2-r/2,l=e.y-o-a;break;case"bottom":s=e.x+u/2-r/2,l=e.y+h+a;break;case"left":s=e.x-r-a,l=e.y+h/2-o/2;break;case"right":s=e.x+u+a,l=e.y+h/2-o/2}return[s,l]}(e,p,u,t.get("borderWidth"));n=g[0],i=g[1]}else{g=function(t,e,n,i,r,o,a){var s=n.getSize(),l=s[0],u=s[1];null!=o&&(t+l+o+2>i?t-=l+o:t+=o);null!=a&&(e+u+a>r?e-=u+a:e+=a);return[t,e]}(n,i,r,s,l,h?null:20,c?null:20);n=g[0],i=g[1]}if(h&&(n-=WT(h)?u[0]/2:"right"===h?u[0]:0),c&&(i-=WT(c)?u[1]/2:"bottom"===c?u[1]:0),ST(t)){g=function(t,e,n,i,r){var o=n.getSize(),a=o[0],s=o[1];return t=Math.min(t+a,i)-a,e=Math.min(e+s,r)-s,t=Math.max(t,0),e=Math.max(e,0),[t,e]}(n,i,r,s,l);n=g[0],i=g[1]}r.moveTo(n,i)},e.prototype._updateContentNotChangedOnAxis=function(t,e){var n=this._lastDataByCoordSys,i=this._cbParamsList,r=!!n&&n.length===t.length;return r&&z(n,(function(n,o){var a=n.dataByAxis||[],s=(t[o]||{}).dataByAxis||[];(r=r&&a.length===s.length)&&z(a,(function(t,n){var o=s[n]||{},a=t.seriesDataIndices||[],l=o.seriesDataIndices||[];(r=r&&t.value===o.value&&t.axisType===o.axisType&&t.axisId===o.axisId&&a.length===l.length)&&z(a,(function(t,e){var n=l[e];r=r&&t.seriesIndex===n.seriesIndex&&t.dataIndex===n.dataIndex})),i&&z(t.seriesDataIndices,(function(t){var n=t.seriesIndex,o=e[n],a=i[n];o&&a&&a.data!==o.data&&(r=!1)}))}))})),this._lastDataByCoordSys=t,this._cbParamsList=e,!!r},e.prototype._hide=function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},e.prototype.dispose=function(t,e){!r.node&&e.getDom()&&(ag(this,"_updatePosition"),this._tooltipContent.dispose(),LM("itemTooltip",e))},e.type="tooltip",e}(Zf);function FT(t,e,n){var i,r=e.ecModel;n?(i=new Qh(n,r,r),i=new Qh(e.option,i,r)):i=e;for(var o=t.length-1;o>=0;o--){var a=t[o];a&&(a instanceof Qh&&(a=a.get("tooltip",!0)),Z(a)&&(a={formatter:a}),a&&(i=new Qh(a,i,r)))}return i}function HT(t,e){return t.dispatchAction||H(e.dispatchAction,e)}function WT(t){return"center"===t||"middle"===t}var GT=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.layoutMode={type:"box",ignoreSize:!0},n}return n(e,t),e.type="title",e.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},e}(sp),UT=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n){if(this.group.removeAll(),t.get("show")){var i=this.group,r=t.getModel("textStyle"),o=t.getModel("subtextStyle"),a=t.get("textAlign"),s=it(t.get("textBaseline"),t.get("textVerticalAlign")),l=new Cs({style:Oh(r,{text:t.get("text"),fill:r.getTextColor()},{disableBox:!0}),z2:10}),u=l.getBoundingRect(),h=t.get("subtext"),c=new Cs({style:Oh(o,{text:h,fill:o.getTextColor(),y:u.height+t.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),p=t.get("link"),d=t.get("sublink"),f=t.get("triggerEvent",!0);l.silent=!p&&!f,c.silent=!d&&!f,p&&l.on("click",(function(){jc(p,"_"+t.get("target"))})),d&&c.on("click",(function(){jc(d,"_"+t.get("subtarget"))})),Bs(l).eventData=Bs(c).eventData=f?{componentType:"title",componentIndex:t.componentIndex}:null,i.add(l),h&&i.add(c);var g=i.getBoundingRect(),v=t.getBoxLayoutParams();v.width=g.width,v.height=g.height;var y=tp(v,{width:n.getWidth(),height:n.getHeight()},t.get("padding"));a||("middle"===(a=t.get("left")||t.get("right"))&&(a="center"),"right"===a?y.x+=y.width:"center"===a&&(y.x+=y.width/2)),s||("center"===(s=t.get("top")||t.get("bottom"))&&(s="middle"),"bottom"===s?y.y+=y.height:"middle"===s&&(y.y+=y.height/2),s=s||"top"),i.x=y.x,i.y=y.y,i.markRedraw();var m={align:a,verticalAlign:s};l.setStyle(m),c.setStyle(m),g=i.getBoundingRect();var _=y.margin,x=t.getItemStyle(["color","opacity"]);x.fill=t.get("backgroundColor");var w=new bs({shape:{x:g.x-_[3],y:g.y-_[0],width:g.width+_[1]+_[3],height:g.height+_[0]+_[2],r:t.get("borderRadius")},style:x,subPixelOptimize:!0,silent:!0});i.add(w)}},e.type="title",e}(Zf);function ZT(t,e){if(!t)return!1;for(var n=G(t)?t:[t],i=0;i=0&&(a[o]=+a[o].toFixed(c)),[a,h]}var QT={min:W($T,"min"),max:W($T,"max"),average:W($T,"average"),median:W($T,"median")};function JT(t,e){if(e){var n=t.getData(),i=t.coordinateSystem,r=i&&i.dimensions;if(!function(t){return!isNaN(parseFloat(t.x))&&!isNaN(parseFloat(t.y))}(e)&&!G(e.coord)&&G(r)){var o=tD(e,n,i,t);if((e=I(e)).type&&QT[e.type]&&o.baseAxis&&o.valueAxis){var a=L(r,o.baseAxis.dim),s=L(r,o.valueAxis.dim),l=QT[e.type](n,o.baseDataDim,o.valueDataDim,a,s);e.coord=l[0],e.value=l[1]}else e.coord=[null!=e.xAxis?e.xAxis:e.radiusAxis,null!=e.yAxis?e.yAxis:e.angleAxis]}if(null!=e.coord&&G(r))for(var u=e.coord,h=0;h<2;h++)QT[u[h]]&&(u[h]=iD(n,n.mapDimension(r[h]),u[h]));else e.coord=[];return e}}function tD(t,e,n,i){var r={};return null!=t.valueIndex||null!=t.valueDim?(r.valueDataDim=null!=t.valueIndex?e.getDimension(t.valueIndex):t.valueDim,r.valueAxis=n.getAxis(function(t,e){var n=t.getData().getDimensionInfo(e);return n&&n.coordDim}(i,r.valueDataDim)),r.baseAxis=n.getOtherAxis(r.valueAxis),r.baseDataDim=e.mapDimension(r.baseAxis.dim)):(r.baseAxis=i.getBaseAxis(),r.valueAxis=n.getOtherAxis(r.baseAxis),r.baseDataDim=e.mapDimension(r.baseAxis.dim),r.valueDataDim=e.mapDimension(r.valueAxis.dim)),r}function eD(t,e){return!(t&&t.containData&&e.coord&&!KT(e))||t.containData(e.coord)}function nD(t,e){return t?function(t,n,i,r){return jd(r<2?t.coord&&t.coord[r]:t.value,e[r])}:function(t,n,i,r){return jd(t.value,e[r])}}function iD(t,e,n){if("average"===n){var i=0,r=0;return t.each(e,(function(t,e){isNaN(t)||(i+=t,r++)})),i/r}return"median"===n?t.getMedian(e):t.getDataExtent(e)["max"===n?1:0]}var rD=bo(),oD=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.init=function(){this.markerGroupMap=gt()},e.prototype.render=function(t,e,n){var i=this,r=this.markerGroupMap;r.each((function(t){rD(t).keep=!1})),e.eachSeries((function(t){var r=jT.getMarkerModelFromSeries(t,i.type);r&&i.renderSeries(t,r,e,n)})),r.each((function(t){!rD(t).keep&&i.group.remove(t.group)}))},e.prototype.markKeep=function(t){rD(t).keep=!0},e.prototype.toggleBlurSeries=function(t,e){var n=this;z(t,(function(t){var i=jT.getMarkerModelFromSeries(t,n.type);i&&i.getData().eachItemGraphicEl((function(t){t&&(e?gl(t):vl(t))}))}))},e.type="marker",e}(Zf);function aD(t,e,n){var i=e.coordinateSystem;t.each((function(r){var o,a=t.getItemModel(r),s=Br(a.get("x"),n.getWidth()),l=Br(a.get("y"),n.getHeight());if(isNaN(s)||isNaN(l)){if(e.getMarkerPosition)o=e.getMarkerPosition(t.getValues(t.dimensions,r));else if(i){var u=t.get(i.dimensions[0],r),h=t.get(i.dimensions[1],r);o=i.dataToPoint([u,h])}}else o=[s,l];isNaN(s)||(o[0]=s),isNaN(l)||(o[1]=l),t.setItemLayout(r,o)}))}var sD=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.updateTransform=function(t,e,n){e.eachSeries((function(t){var e=jT.getMarkerModelFromSeries(t,"markPoint");e&&(aD(e.getData(),t,n),this.markerGroupMap.get(t.id).updateLayout())}),this)},e.prototype.renderSeries=function(t,e,n,i){var r=t.coordinateSystem,o=t.id,a=t.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,new Kw),u=function(t,e,n){var i;i=t?E(t&&t.dimensions,(function(t){return k(k({},e.getData().getDimensionInfo(e.getData().mapDimension(t))||{}),{name:t,ordinalMeta:null})})):[{name:"value",type:"float"}];var r=new Sm(i,n),o=E(n.get("data"),W(JT,e));t&&(o=V(o,W(eD,t)));var a=nD(!!t,i);return r.initData(o,null,a),r}(r,t,e);e.setData(u),aD(e.getData(),t,i),u.each((function(t){var n=u.getItemModel(t),i=n.getShallow("symbol"),r=n.getShallow("symbolSize"),o=n.getShallow("symbolRotate"),s=n.getShallow("symbolOffset"),l=n.getShallow("symbolKeepAspect");if(U(i)||U(r)||U(o)||U(s)){var h=e.getRawValue(t),c=e.getDataParams(t);U(i)&&(i=i(h,c)),U(r)&&(r=r(h,c)),U(o)&&(o=o(h,c)),U(s)&&(s=s(h,c))}var p=n.getModel("itemStyle").getItemStyle(),d=Ug(a,"color");p.fill||(p.fill=d),u.setItemVisual(t,{symbol:i,symbolSize:r,symbolRotate:o,symbolOffset:s,symbolKeepAspect:l,style:p})})),l.updateData(u),this.group.add(l.group),u.eachItemGraphicEl((function(t){t.traverse((function(t){Bs(t).dataModel=e}))})),this.markKeep(l),l.group.silent=e.get("silent")||t.get("silent")},e.type="markPoint",e}(oD);var lD=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.createMarkerModelFromSeries=function(t,n,i){return new e(t,n,i)},e.type="markLine",e.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},e}(jT),uD=Iu.prototype,hD=Au.prototype,cD=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1};!function(t){function e(){return null!==t&&t.apply(this,arguments)||this}n(e,t)}(cD);function pD(t){return isNaN(+t.cpx1)||isNaN(+t.cpy1)}var dD=function(t){function e(e){var n=t.call(this,e)||this;return n.type="ec-line",n}return n(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new cD},e.prototype.buildPath=function(t,e){pD(e)?uD.buildPath.call(this,t,e):hD.buildPath.call(this,t,e)},e.prototype.pointAt=function(t){return pD(this.shape)?uD.pointAt.call(this,t):hD.pointAt.call(this,t)},e.prototype.tangentAt=function(t){var e=this.shape,n=pD(e)?[e.x2-e.x1,e.y2-e.y1]:hD.tangentAt.call(this,t);return Lt(n,n)},e}(hs),fD=["fromSymbol","toSymbol"];function gD(t){return"_"+t+"Type"}function vD(t,e,n){var i=e.getItemVisual(n,t);if(i&&"none"!==i){var r=e.getItemVisual(n,t+"Size"),o=e.getItemVisual(n,t+"Rotate"),a=e.getItemVisual(n,t+"Offset"),s=e.getItemVisual(n,t+"KeepAspect"),l=ov(r),u=av(a||0,l),h=rv(i,-l[0]/2+u[0],-l[1]/2+u[1],l[0],l[1],null,s);return h.__specifiedRotation=null==o||isNaN(o)?void 0:+o*Math.PI/180||0,h.name=t,h}}function yD(t,e){t.x1=e[0][0],t.y1=e[0][1],t.x2=e[1][0],t.y2=e[1][1],t.percent=1;var n=e[2];n?(t.cpx1=n[0],t.cpy1=n[1]):(t.cpx1=NaN,t.cpy1=NaN)}var mD=function(t){function e(e,n,i){var r=t.call(this)||this;return r._createLine(e,n,i),r}return n(e,t),e.prototype._createLine=function(t,e,n){var i=t.hostModel,r=function(t){var e=new dD({name:"line",subPixelOptimize:!0});return yD(e.shape,t),e}(t.getItemLayout(e));r.shape.percent=0,ju(r,{shape:{percent:1}},i,e),this.add(r),z(fD,(function(n){var i=vD(n,t,e);this.add(i),this[gD(n)]=t.getItemVisual(e,n)}),this),this._updateCommonStl(t,e,n)},e.prototype.updateData=function(t,e,n){var i=t.hostModel,r=this.childOfName("line"),o=t.getItemLayout(e),a={shape:{}};yD(a.shape,o),Xu(r,a,i,e),z(fD,(function(n){var i=t.getItemVisual(e,n),r=gD(n);if(this[r]!==i){this.remove(this.childOfName(n));var o=vD(n,t,e);this.add(o)}this[r]=i}),this),this._updateCommonStl(t,e,n)},e.prototype.getLinePath=function(){return this.childAt(0)},e.prototype._updateCommonStl=function(t,e,n){var i=t.hostModel,r=this.childOfName("line"),o=n&&n.emphasisLineStyle,a=n&&n.blurLineStyle,s=n&&n.selectLineStyle,l=n&&n.labelStatesModels,u=n&&n.emphasisDisabled,h=n&&n.focus,c=n&&n.blurScope;if(!n||t.hasItemOption){var p=t.getItemModel(e),d=p.getModel("emphasis");o=d.getModel("lineStyle").getLineStyle(),a=p.getModel(["blur","lineStyle"]).getLineStyle(),s=p.getModel(["select","lineStyle"]).getLineStyle(),u=d.get("disabled"),h=d.get("focus"),c=d.get("blurScope"),l=Lh(p)}var f=t.getItemVisual(e,"style"),g=f.stroke;r.useStyle(f),r.style.fill=null,r.style.strokeNoScale=!0,r.ensureState("emphasis").style=o,r.ensureState("blur").style=a,r.ensureState("select").style=s,z(fD,(function(t){var e=this.childOfName(t);if(e){e.setColor(g),e.style.opacity=f.opacity;for(var n=0;n0&&(m[0]=-m[0],m[1]=-m[1]);var x=y[0]<0?-1:1;if("start"!==i.__position&&"end"!==i.__position){var w=-Math.atan2(y[1],y[0]);u[0].8?"left":h[0]<-.8?"right":"center",p=h[1]>.8?"top":h[1]<-.8?"bottom":"middle";break;case"start":i.x=-h[0]*f+l[0],i.y=-h[1]*g+l[1],c=h[0]>.8?"right":h[0]<-.8?"left":"center",p=h[1]>.8?"bottom":h[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":i.x=f*x+l[0],i.y=l[1]+b,c=y[0]<0?"right":"left",i.originX=-f*x,i.originY=-b;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":i.x=_[0],i.y=_[1]+b,c="center",i.originY=-b;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":i.x=-f*x+u[0],i.y=u[1]+b,c=y[0]>=0?"right":"left",i.originX=f*x,i.originY=-b}i.scaleX=i.scaleY=r,i.setStyle({verticalAlign:i.__verticalAlign||p,align:i.__align||c})}}}function S(t,e){var n=t.__specifiedRotation;if(null==n){var i=a.tangentAt(e);t.attr("rotation",(1===e?-1:1)*Math.PI/2-Math.atan2(i[1],i[0]))}else t.attr("rotation",n)}},e}(kr),_D=function(){function t(t){this.group=new kr,this._LineCtor=t||mD}return t.prototype.updateData=function(t){var e=this;this._progressiveEls=null;var n=this,i=n.group,r=n._lineData;n._lineData=t,r||i.removeAll();var o=xD(t);t.diff(r).add((function(n){e._doAdd(t,n,o)})).update((function(n,i){e._doUpdate(r,t,i,n,o)})).remove((function(t){i.remove(r.getItemGraphicEl(t))})).execute()},t.prototype.updateLayout=function(){var t=this._lineData;t&&t.eachItemGraphicEl((function(e,n){e.updateLayout(t,n)}),this)},t.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=xD(t),this._lineData=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(t,e){function n(t){t.isGroup||function(t){return t.animators&&t.animators.length>0}(t)||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}this._progressiveEls=[];for(var i=t.start;i=0&&X(l)&&(l=+l.toFixed(Math.min(f,20))),p.coord[h]=d.coord[h]=l,r=[p,d,{type:a,valueIndex:i.valueIndex,value:l}]}else r=[]}var g=[JT(t,r[0]),JT(t,r[1]),k({},r[2])];return g[2].type=g[2].type||null,T(g[2],g[0]),T(g[2],g[1]),g};function CD(t){return!isNaN(t)&&!isFinite(t)}function ID(t,e,n,i){var r=1-t,o=i.dimensions[t];return CD(e[r])&&CD(n[r])&&e[t]===n[t]&&i.getAxis(o).containData(e[t])}function TD(t,e){if("cartesian2d"===t.type){var n=e[0].coord,i=e[1].coord;if(n&&i&&(ID(1,n,i,t)||ID(0,n,i,t)))return!0}return eD(t,e[0])&&eD(t,e[1])}function DD(t,e,n,i,r){var o,a=i.coordinateSystem,s=t.getItemModel(e),l=Br(s.get("x"),r.getWidth()),u=Br(s.get("y"),r.getHeight());if(isNaN(l)||isNaN(u)){if(i.getMarkerPosition)o=i.getMarkerPosition(t.getValues(t.dimensions,e));else{var h=a.dimensions,c=t.get(h[0],e),p=t.get(h[1],e);o=a.dataToPoint([c,p])}if(ub(a,"cartesian2d")){var d=a.getAxis("x"),f=a.getAxis("y");h=a.dimensions;CD(t.get(h[0],e))?o[0]=d.toGlobalCoord(d.getExtent()[n?0:1]):CD(t.get(h[1],e))&&(o[1]=f.toGlobalCoord(f.getExtent()[n?0:1]))}isNaN(l)||(o[0]=l),isNaN(u)||(o[1]=u)}else o=[l,u];t.setItemLayout(e,o)}var kD=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.updateTransform=function(t,e,n){e.eachSeries((function(t){var e=jT.getMarkerModelFromSeries(t,"markLine");if(e){var i=e.getData(),r=SD(e).from,o=SD(e).to;r.each((function(e){DD(r,e,!0,t,n),DD(o,e,!1,t,n)})),i.each((function(t){i.setItemLayout(t,[r.getItemLayout(t),o.getItemLayout(t)])})),this.markerGroupMap.get(t.id).updateLayout()}}),this)},e.prototype.renderSeries=function(t,e,n,i){var r=t.coordinateSystem,o=t.id,a=t.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,new _D);this.group.add(l.group);var u=function(t,e,n){var i;i=t?E(t&&t.dimensions,(function(t){return k(k({},e.getData().getDimensionInfo(e.getData().mapDimension(t))||{}),{name:t,ordinalMeta:null})})):[{name:"value",type:"float"}];var r=new Sm(i,n),o=new Sm(i,n),a=new Sm([],n),s=E(n.get("data"),W(MD,e,t,n));t&&(s=V(s,W(TD,t)));var l=nD(!!t,i);return r.initData(E(s,(function(t){return t[0]})),null,l),o.initData(E(s,(function(t){return t[1]})),null,l),a.initData(E(s,(function(t){return t[2]}))),a.hasItemOption=!0,{from:r,to:o,line:a}}(r,t,e),h=u.from,c=u.to,p=u.line;SD(e).from=h,SD(e).to=c,e.setData(p);var d=e.get("symbol"),f=e.get("symbolSize"),g=e.get("symbolRotate"),v=e.get("symbolOffset");function y(e,n,r){var o=e.getItemModel(n);DD(e,n,r,t,i);var s=o.getModel("itemStyle").getItemStyle();null==s.fill&&(s.fill=Ug(a,"color")),e.setItemVisual(n,{symbolKeepAspect:o.get("symbolKeepAspect"),symbolOffset:it(o.get("symbolOffset",!0),v[r?0:1]),symbolRotate:it(o.get("symbolRotate",!0),g[r?0:1]),symbolSize:it(o.get("symbolSize"),f[r?0:1]),symbol:it(o.get("symbol",!0),d[r?0:1]),style:s})}G(d)||(d=[d,d]),G(f)||(f=[f,f]),G(g)||(g=[g,g]),G(v)||(v=[v,v]),u.from.each((function(t){y(h,t,!0),y(c,t,!1)})),p.each((function(t){var e=p.getItemModel(t).getModel("lineStyle").getLineStyle();p.setItemLayout(t,[h.getItemLayout(t),c.getItemLayout(t)]),null==e.stroke&&(e.stroke=h.getItemVisual(t,"style").fill),p.setItemVisual(t,{fromSymbolKeepAspect:h.getItemVisual(t,"symbolKeepAspect"),fromSymbolOffset:h.getItemVisual(t,"symbolOffset"),fromSymbolRotate:h.getItemVisual(t,"symbolRotate"),fromSymbolSize:h.getItemVisual(t,"symbolSize"),fromSymbol:h.getItemVisual(t,"symbol"),toSymbolKeepAspect:c.getItemVisual(t,"symbolKeepAspect"),toSymbolOffset:c.getItemVisual(t,"symbolOffset"),toSymbolRotate:c.getItemVisual(t,"symbolRotate"),toSymbolSize:c.getItemVisual(t,"symbolSize"),toSymbol:c.getItemVisual(t,"symbol"),style:e})})),l.updateData(p),u.line.eachItemGraphicEl((function(t){Bs(t).dataModel=e,t.traverse((function(t){Bs(t).dataModel=e}))})),this.markKeep(l),l.group.silent=e.get("silent")||t.get("silent")},e.type="markLine",e}(oD);var AD=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.createMarkerModelFromSeries=function(t,n,i){return new e(t,n,i)},e.type="markArea",e.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},e}(jT),PD=bo(),LD=function(t,e,n,i){var r=i[0],o=i[1];if(r&&o){var a=JT(t,r),s=JT(t,o),l=a.coord,u=s.coord;l[0]=nt(l[0],-1/0),l[1]=nt(l[1],-1/0),u[0]=nt(u[0],1/0),u[1]=nt(u[1],1/0);var h=D([{},a,s]);return h.coord=[a.coord,s.coord],h.x0=a.x,h.y0=a.y,h.x1=s.x,h.y1=s.y,h}};function OD(t){return!isNaN(t)&&!isFinite(t)}function RD(t,e,n,i){var r=1-t;return OD(e[r])&&OD(n[r])}function ND(t,e){var n=e.coord[0],i=e.coord[1],r={coord:n,x:e.x0,y:e.y0},o={coord:i,x:e.x1,y:e.y1};return ub(t,"cartesian2d")?!(!n||!i||!RD(1,n,i)&&!RD(0,n,i))||function(t,e,n){return!(t&&t.containZone&&e.coord&&n.coord&&!KT(e)&&!KT(n))||t.containZone(e.coord,n.coord)}(t,r,o):eD(t,r)||eD(t,o)}function zD(t,e,n,i,r){var o,a=i.coordinateSystem,s=t.getItemModel(e),l=Br(s.get(n[0]),r.getWidth()),u=Br(s.get(n[1]),r.getHeight());if(isNaN(l)||isNaN(u)){if(i.getMarkerPosition){var h=t.getValues(["x0","y0"],e),c=t.getValues(["x1","y1"],e),p=a.clampData(h),d=a.clampData(c),f=[];"x0"===n[0]?f[0]=p[0]>d[0]?c[0]:h[0]:f[0]=p[0]>d[0]?h[0]:c[0],"y0"===n[1]?f[1]=p[1]>d[1]?c[1]:h[1]:f[1]=p[1]>d[1]?h[1]:c[1],o=i.getMarkerPosition(f,n,!0)}else{var g=[m=t.get(n[0],e),_=t.get(n[1],e)];a.clampData&&a.clampData(g,g),o=a.dataToPoint(g,!0)}if(ub(a,"cartesian2d")){var v=a.getAxis("x"),y=a.getAxis("y"),m=t.get(n[0],e),_=t.get(n[1],e);OD(m)?o[0]=v.toGlobalCoord(v.getExtent()["x0"===n[0]?0:1]):OD(_)&&(o[1]=y.toGlobalCoord(y.getExtent()["y0"===n[1]?0:1]))}isNaN(l)||(o[0]=l),isNaN(u)||(o[1]=u)}else o=[l,u];return o}var ED=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],BD=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.updateTransform=function(t,e,n){e.eachSeries((function(t){var e=jT.getMarkerModelFromSeries(t,"markArea");if(e){var i=e.getData();i.each((function(e){var r=E(ED,(function(r){return zD(i,e,r,t,n)}));i.setItemLayout(e,r),i.getItemGraphicEl(e).setShape("points",r)}))}}),this)},e.prototype.renderSeries=function(t,e,n,i){var r=t.coordinateSystem,o=t.id,a=t.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,{group:new kr});this.group.add(l.group),this.markKeep(l);var u=function(t,e,n){var i,r,o=["x0","y0","x1","y1"];if(t){var a=E(t&&t.dimensions,(function(t){var n=e.getData();return k(k({},n.getDimensionInfo(n.mapDimension(t))||{}),{name:t,ordinalMeta:null})}));r=E(o,(function(t,e){return{name:t,type:a[e%2].type}})),i=new Sm(r,n)}else i=new Sm(r=[{name:"value",type:"float"}],n);var s=E(n.get("data"),W(LD,e,t,n));t&&(s=V(s,W(ND,t)));var l=t?function(t,e,n,i){return jd(t.coord[Math.floor(i/2)][i%2],r[i])}:function(t,e,n,i){return jd(t.value,r[i])};return i.initData(s,null,l),i.hasItemOption=!0,i}(r,t,e);e.setData(u),u.each((function(e){var n=E(ED,(function(n){return zD(u,e,n,t,i)})),o=r.getAxis("x").scale,s=r.getAxis("y").scale,l=o.getExtent(),h=s.getExtent(),c=[o.parse(u.get("x0",e)),o.parse(u.get("x1",e))],p=[s.parse(u.get("y0",e)),s.parse(u.get("y1",e))];Fr(c),Fr(p);var d=!!(l[0]>c[1]||l[1]p[1]||h[1]=0},e.prototype.getOrient=function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},e.type="legend.plain",e.dependencies=["series"],e.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},e}(sp),FD=W,HD=z,WD=kr,GD=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.newlineDisabled=!1,n}return n(e,t),e.prototype.init=function(){this.group.add(this._contentGroup=new WD),this.group.add(this._selectorGroup=new WD),this._isFirstRender=!0},e.prototype.getContentGroup=function(){return this._contentGroup},e.prototype.getSelectorGroup=function(){return this._selectorGroup},e.prototype.render=function(t,e,n){var i=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),t.get("show",!0)){var r=t.get("align"),o=t.get("orient");r&&"auto"!==r||(r="right"===t.get("left")&&"vertical"===o?"right":"left");var a=t.get("selector",!0),s=t.get("selectorPosition",!0);!a||s&&"auto"!==s||(s="horizontal"===o?"end":"start"),this.renderInner(r,t,e,n,a,o,s);var l=t.getBoxLayoutParams(),u={width:n.getWidth(),height:n.getHeight()},h=t.get("padding"),c=tp(l,u,h),p=this.layoutInner(t,r,c,i,a,s),d=tp(A({width:p.width,height:p.height},l),u,h);this.group.x=d.x-p.x,this.group.y=d.y-p.y,this.group.markRedraw(),this.group.add(this._backgroundEl=ZC(p,t))}},e.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},e.prototype.renderInner=function(t,e,n,i,r,o,a){var s=this.getContentGroup(),l=gt(),u=e.get("selectedMode"),h=[];n.eachRawSeries((function(t){!t.get("legendHoverLink")&&h.push(t.id)})),HD(e.getData(),(function(r,o){var a=r.get("name");if(!this.newlineDisabled&&(""===a||"\n"===a)){var c=new WD;return c.newline=!0,void s.add(c)}var p=n.getSeriesByName(a)[0];if(!l.get(a)){if(p){var d=p.getData(),f=d.getVisual("legendLineStyle")||{},g=d.getVisual("legendIcon"),v=d.getVisual("style");this._createItem(p,a,o,r,e,t,f,v,g,u,i).on("click",FD(UD,a,null,i,h)).on("mouseover",FD(YD,p.name,null,i,h)).on("mouseout",FD(XD,p.name,null,i,h)),l.set(a,!0)}else n.eachRawSeries((function(n){if(!l.get(a)&&n.legendVisualProvider){var s=n.legendVisualProvider;if(!s.containName(a))return;var c=s.indexOfName(a),p=s.getItemVisual(c,"style"),d=s.getItemVisual(c,"legendIcon"),f=Wn(p.fill);f&&0===f[3]&&(f[3]=.2,p=k(k({},p),{fill:Kn(f,"rgba")})),this._createItem(n,a,o,r,e,t,{},p,d,u,i).on("click",FD(UD,null,a,i,h)).on("mouseover",FD(YD,null,a,i,h)).on("mouseout",FD(XD,null,a,i,h)),l.set(a,!0)}}),this);0}}),this),r&&this._createSelector(r,e,i,o,a)},e.prototype._createSelector=function(t,e,n,i,r){var o=this.getSelectorGroup();HD(t,(function(t){var i=t.type,r=new Cs({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:"all"===i?"legendAllSelect":"legendInverseSelect"})}});o.add(r),Ph(r,{normal:e.getModel("selectorLabel"),emphasis:e.getModel(["emphasis","selectorLabel"])},{defaultText:t.title}),Il(r)}))},e.prototype._createItem=function(t,e,n,i,r,o,a,s,l,u,h){var c=t.visualDrawType,p=r.get("itemWidth"),d=r.get("itemHeight"),f=r.isSelected(e),g=i.get("symbolRotate"),v=i.get("symbolKeepAspect"),y=i.get("icon"),m=function(t,e,n,i,r,o,a){function s(t,e){"auto"===t.lineWidth&&(t.lineWidth=e.lineWidth>0?2:0),HD(t,(function(n,i){"inherit"===t[i]&&(t[i]=e[i])}))}var l=e.getModel("itemStyle"),u=l.getItemStyle(),h=0===t.lastIndexOf("empty",0)?"fill":"stroke",c=l.getShallow("decal");u.decal=c&&"inherit"!==c?Pv(c,a):i.decal,"inherit"===u.fill&&(u.fill=i[r]);"inherit"===u.stroke&&(u.stroke=i[h]);"inherit"===u.opacity&&(u.opacity=("fill"===r?i:n).opacity);s(u,i);var p=e.getModel("lineStyle"),d=p.getLineStyle();if(s(d,n),"auto"===u.fill&&(u.fill=i.fill),"auto"===u.stroke&&(u.stroke=i.fill),"auto"===d.stroke&&(d.stroke=i.fill),!o){var f=e.get("inactiveBorderWidth"),g=u[h];u.lineWidth="auto"===f?i.lineWidth>0&&g?2:0:u.lineWidth,u.fill=e.get("inactiveColor"),u.stroke=e.get("inactiveBorderColor"),d.stroke=p.get("inactiveColor"),d.lineWidth=p.get("inactiveWidth")}return{itemStyle:u,lineStyle:d}}(l=y||l||"roundRect",i,a,s,c,f,h),_=new WD,x=i.getModel("textStyle");if(!U(t.getLegendIcon)||y&&"inherit"!==y){var w="inherit"===y&&t.getData().getVisual("symbol")?"inherit"===g?t.getData().getVisual("symbolRotate"):g:0;_.add(function(t){var e=t.icon||"roundRect",n=rv(e,0,0,t.itemWidth,t.itemHeight,t.itemStyle.fill,t.symbolKeepAspect);n.setStyle(t.itemStyle),n.rotation=(t.iconRotate||0)*Math.PI/180,n.setOrigin([t.itemWidth/2,t.itemHeight/2]),e.indexOf("empty")>-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.lineWidth=2);return n}({itemWidth:p,itemHeight:d,icon:l,iconRotate:w,itemStyle:m.itemStyle,lineStyle:m.lineStyle,symbolKeepAspect:v}))}else _.add(t.getLegendIcon({itemWidth:p,itemHeight:d,icon:l,iconRotate:g,itemStyle:m.itemStyle,lineStyle:m.lineStyle,symbolKeepAspect:v}));var b="left"===o?p+5:-5,S=o,M=r.get("formatter"),C=e;Z(M)&&M?C=M.replace("{name}",null!=e?e:""):U(M)&&(C=M(e));var I=i.get("inactiveColor");_.add(new Cs({style:Oh(x,{text:C,x:b,y:d/2,fill:f?x.getTextColor():I,align:S,verticalAlign:"middle"})}));var T=new bs({shape:_.getBoundingRect(),invisible:!0}),D=i.getModel("tooltip");return D.get("show")&&Ch({el:T,componentModel:r,itemName:e,itemTooltipOption:D.option}),_.add(T),_.eachChild((function(t){t.silent=!0})),T.silent=!u,this.getContentGroup().add(_),Il(_),_.__legendDataIndex=n,_},e.prototype.layoutInner=function(t,e,n,i,r,o){var a=this.getContentGroup(),s=this.getSelectorGroup();Jc(t.get("orient"),a,t.get("itemGap"),n.width,n.height);var l=a.getBoundingRect(),u=[-l.x,-l.y];if(s.markRedraw(),a.markRedraw(),r){Jc("horizontal",s,t.get("selectorItemGap",!0));var h=s.getBoundingRect(),c=[-h.x,-h.y],p=t.get("selectorButtonGap",!0),d=t.getOrient().index,f=0===d?"width":"height",g=0===d?"height":"width",v=0===d?"y":"x";"end"===o?c[d]+=l[f]+p:u[d]+=h[f]+p,c[1-d]+=l[g]/2-h[g]/2,s.x=c[0],s.y=c[1],a.x=u[0],a.y=u[1];var y={x:0,y:0};return y[f]=l[f]+p+h[f],y[g]=Math.max(l[g],h[g]),y[v]=Math.min(0,h[v]+c[1-d]),y}return a.x=u[0],a.y=u[1],this.group.getBoundingRect()},e.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},e.type="legend.plain",e}(Zf);function UD(t,e,n,i){XD(t,e,n,i),n.dispatchAction({type:"legendToggleSelect",name:null!=t?t:e}),YD(t,e,n,i)}function ZD(t){for(var e,n=t.getZr().storage.getDisplayList(),i=0,r=n.length;in[r],f=[-c.x,-c.y];e||(f[i]=l[s]);var g=[0,0],v=[-p.x,-p.y],y=it(t.get("pageButtonGap",!0),t.get("itemGap",!0));d&&("end"===t.get("pageButtonPosition",!0)?v[i]+=n[r]-p[r]:g[i]+=p[r]+y);v[1-i]+=c[o]/2-p[o]/2,l.setPosition(f),u.setPosition(g),h.setPosition(v);var m={x:0,y:0};if(m[r]=d?n[r]:c[r],m[o]=Math.max(c[o],p[o]),m[a]=Math.min(0,p[a]+v[1-i]),u.__rectSize=n[r],d){var _={x:0,y:0};_[r]=Math.max(n[r]-p[r]-y,0),_[o]=m[o],u.setClipPath(new bs({shape:_})),u.__rectSize=_[r]}else h.eachChild((function(t){t.attr({invisible:!0,silent:!0})}));var x=this._getPageInfo(t);return null!=x.pageIndex&&Xu(l,{x:x.contentPosition[0],y:x.contentPosition[1]},d?t:null),this._updatePageInfoView(t,x),m},e.prototype._pageGo=function(t,e,n){var i=this._getPageInfo(e)[t];null!=i&&n.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:e.id})},e.prototype._updatePageInfoView=function(t,e){var n=this._controllerGroup;z(["pagePrev","pageNext"],(function(i){var r=null!=e[i+"DataIndex"],o=n.childOfName(i);o&&(o.setStyle("fill",r?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),o.cursor=r?"pointer":"default")}));var i=n.childOfName("pageText"),r=t.get("pageFormatter"),o=e.pageIndex,a=null!=o?o+1:0,s=e.pageCount;i&&r&&i.setStyle("text",Z(r)?r.replace("{current}",null==a?"":a+"").replace("{total}",null==s?"":s+""):r({current:a,total:s}))},e.prototype._getPageInfo=function(t){var e=t.get("scrollDataIndex",!0),n=this.getContentGroup(),i=this._containerGroup.__rectSize,r=t.getOrient().index,o=tk[r],a=ek[r],s=this._findTargetItemIndex(e),l=n.children(),u=l[s],h=l.length,c=h?1:0,p={contentPosition:[n.x,n.y],pageCount:c,pageIndex:c-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!u)return p;var d=m(u);p.contentPosition[r]=-d.s;for(var f=s+1,g=d,v=d,y=null;f<=h;++f)(!(y=m(l[f]))&&v.e>g.s+i||y&&!_(y,g.s))&&(g=v.i>g.i?v:y)&&(null==p.pageNextDataIndex&&(p.pageNextDataIndex=g.i),++p.pageCount),v=y;for(f=s-1,g=d,v=d,y=null;f>=-1;--f)(y=m(l[f]))&&_(v,y.s)||!(g.i=e&&t.s<=e+i}},e.prototype._findTargetItemIndex=function(t){return this._showController?(this.getContentGroup().eachChild((function(i,r){var o=i.__legendDataIndex;null==n&&null!=o&&(n=r),o===t&&(e=r)})),null!=e?e:n):0;var e,n},e.type="legend.scroll",e}(GD);function ik(t){$y(KD),t.registerComponentModel($D),t.registerComponentView(nk),function(t){t.registerAction("legendScroll","legendscroll",(function(t,e){var n=t.scrollDataIndex;null!=n&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},(function(t){t.setScrollDataIndex(n)}))}))}(t)}var rk=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.type="dataZoom.inside",e.defaultOption=ec(CC.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),e}(CC),ok=function(t){function e(e){var n=t.call(this)||this;n._zr=e;var i=H(n._mousedownHandler,n),r=H(n._mousemoveHandler,n),o=H(n._mouseupHandler,n),a=H(n._mousewheelHandler,n),s=H(n._pinchHandler,n);return n.enable=function(t,n){this.disable(),this._opt=A(I(n)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),null==t&&(t=!0),!0!==t&&"move"!==t&&"pan"!==t||(e.on("mousedown",i),e.on("mousemove",r),e.on("mouseup",o)),!0!==t&&"scale"!==t&&"zoom"!==t||(e.on("mousewheel",a),e.on("pinch",s))},n.disable=function(){e.off("mousedown",i),e.off("mousemove",r),e.off("mouseup",o),e.off("mousewheel",a),e.off("pinch",s)},n}return n(e,t),e.prototype.isDragging=function(){return this._dragging},e.prototype.isPinching=function(){return this._pinching},e.prototype.setPointerChecker=function(t){this.pointerChecker=t},e.prototype.dispose=function(){this.disable()},e.prototype._mousedownHandler=function(t){if(!he(t)){for(var e=t.target;e;){if(e.draggable)return;e=e.__hostTarget||e.parent}var n=t.offsetX,i=t.offsetY;this.pointerChecker&&this.pointerChecker(t,n,i)&&(this._x=n,this._y=i,this._dragging=!0)}},e.prototype._mousemoveHandler=function(t){if(this._dragging&&lk("moveOnMouseMove",t,this._opt)&&"pinch"!==t.gestureEvent&&!hI(this._zr,"globalPan")){var e=t.offsetX,n=t.offsetY,i=this._x,r=this._y,o=e-i,a=n-r;this._x=e,this._y=n,this._opt.preventDefaultMouseMove&&ue(t.event),sk(this,"pan","moveOnMouseMove",t,{dx:o,dy:a,oldX:i,oldY:r,newX:e,newY:n,isAvailableBehavior:null})}},e.prototype._mouseupHandler=function(t){he(t)||(this._dragging=!1)},e.prototype._mousewheelHandler=function(t){var e=lk("zoomOnMouseWheel",t,this._opt),n=lk("moveOnMouseWheel",t,this._opt),i=t.wheelDelta,r=Math.abs(i),o=t.offsetX,a=t.offsetY;if(0!==i&&(e||n)){if(e){var s=r>3?1.4:r>1?1.2:1.1;ak(this,"zoom","zoomOnMouseWheel",t,{scale:i>0?s:1/s,originX:o,originY:a,isAvailableBehavior:null})}if(n){var l=Math.abs(i);ak(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:(i>0?1:-1)*(l>3?.4:l>1?.15:.05),originX:o,originY:a,isAvailableBehavior:null})}}},e.prototype._pinchHandler=function(t){hI(this._zr,"globalPan")||ak(this,"zoom",null,t,{scale:t.pinchScale>1?1.1:1/1.1,originX:t.pinchX,originY:t.pinchY,isAvailableBehavior:null})},e}(Ut);function ak(t,e,n,i,r){t.pointerChecker&&t.pointerChecker(i,r.originX,r.originY)&&(ue(i.event),sk(t,e,n,i,r))}function sk(t,e,n,i,r){r.isAvailableBehavior=H(lk,null,n,i),t.trigger(e,r)}function lk(t,e,n){var i=n[t];return!t||i&&(!Z(i)||e.event[i+"Key"])}var uk=bo();function hk(t,e,n){uk(t).coordSysRecordMap.each((function(t){var i=t.dataZoomInfoMap.get(e.uid);i&&(i.getRange=n)}))}function ck(t,e){if(e){t.removeKey(e.model.uid);var n=e.controller;n&&n.dispose()}}function pk(t,e){t.isDisposed()||t.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:e})}function dk(t,e,n,i){return t.coordinateSystem.containPoint([n,i])}function fk(t){t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,(function(t,e){var n=uk(e),i=n.coordSysRecordMap||(n.coordSysRecordMap=gt());i.each((function(t){t.dataZoomInfoMap=null})),t.eachComponent({mainType:"dataZoom",subType:"inside"},(function(t){z(SC(t).infoList,(function(n){var r=n.model.uid,o=i.get(r)||i.set(r,function(t,e){var n={model:e,containsPoint:W(dk,e),dispatchAction:W(pk,t),dataZoomInfoMap:null,controller:null},i=n.controller=new ok(t.getZr());return z(["pan","zoom","scrollMove"],(function(t){i.on(t,(function(e){var i=[];n.dataZoomInfoMap.each((function(r){if(e.isAvailableBehavior(r.model.option)){var o=(r.getRange||{})[t],a=o&&o(r.dzReferCoordSysInfo,n.model.mainType,n.controller,e);!r.model.get("disabled",!0)&&a&&i.push({dataZoomId:r.model.id,start:a[0],end:a[1]})}})),i.length&&n.dispatchAction(i)}))})),n}(e,n.model));(o.dataZoomInfoMap||(o.dataZoomInfoMap=gt())).set(t.uid,{dzReferCoordSysInfo:n,model:t,getRange:null})}))})),i.each((function(t){var e,n=t.controller,r=t.dataZoomInfoMap;if(r){var o=r.keys()[0];null!=o&&(e=r.get(o))}if(e){var a=function(t){var e,n="type_",i={type_true:2,type_move:1,type_false:0,type_undefined:-1},r=!0;return t.each((function(t){var o=t.model,a=!o.get("disabled",!0)&&(!o.get("zoomLock",!0)||"move");i[n+a]>i[n+e]&&(e=a),r=r&&o.get("preventDefaultMouseMove",!0)})),{controlType:e,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!r}}}(r);n.enable(a.controlType,a.opt),n.setPointerChecker(t.containsPoint),og(t,"dispatchAction",e.model.get("throttle",!0),"fixRate")}else ck(i,t)}))}))}var gk=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="dataZoom.inside",e}return n(e,t),e.prototype.render=function(e,n,i){t.prototype.render.apply(this,arguments),e.noTarget()?this._clear():(this.range=e.getPercentRange(),hk(i,e,{pan:H(vk.pan,this),zoom:H(vk.zoom,this),scrollMove:H(vk.scrollMove,this)}))},e.prototype.dispose=function(){this._clear(),t.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){!function(t,e){for(var n=uk(t).coordSysRecordMap,i=n.keys(),r=0;r0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(o[1]-o[0])+o[0],u=Math.max(1/i.scale,0);o[0]=(o[0]-l)*u+l,o[1]=(o[1]-l)*u+l;var h=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return AC(0,o,[0,100],0,h.minSpan,h.maxSpan),this.range=o,r[0]!==o[0]||r[1]!==o[1]?o:void 0}},pan:yk((function(t,e,n,i,r,o){var a=mk[i]([o.oldX,o.oldY],[o.newX,o.newY],e,r,n);return a.signal*(t[1]-t[0])*a.pixel/a.pixelLength})),scrollMove:yk((function(t,e,n,i,r,o){return mk[i]([0,0],[o.scrollDelta,o.scrollDelta],e,r,n).signal*(t[1]-t[0])*o.scrollDelta}))};function yk(t){return function(e,n,i,r){var o=this.range,a=o.slice(),s=e.axisModels[0];if(s)return AC(t(a,s,e,n,i,r),a,[0,100],"all"),this.range=a,o[0]!==a[0]||o[1]!==a[1]?a:void 0}}var mk={grid:function(t,e,n,i,r){var o=n.axis,a={},s=r.model.coordinateSystem.getRect();return t=t||[0,0],"x"===o.dim?(a.pixel=e[0]-t[0],a.pixelLength=s.width,a.pixelStart=s.x,a.signal=o.inverse?1:-1):(a.pixel=e[1]-t[1],a.pixelLength=s.height,a.pixelStart=s.y,a.signal=o.inverse?-1:1),a},polar:function(t,e,n,i,r){var o=n.axis,a={},s=r.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return t=t?s.pointToCoord(t):[0,0],e=s.pointToCoord(e),"radiusAxis"===n.mainType?(a.pixel=e[0]-t[0],a.pixelLength=l[1]-l[0],a.pixelStart=l[0],a.signal=o.inverse?1:-1):(a.pixel=e[1]-t[1],a.pixelLength=u[1]-u[0],a.pixelStart=u[0],a.signal=o.inverse?-1:1),a},singleAxis:function(t,e,n,i,r){var o=n.axis,a=r.model.coordinateSystem.getRect(),s={};return t=t||[0,0],"horizontal"===o.orient?(s.pixel=e[0]-t[0],s.pixelLength=a.width,s.pixelStart=a.x,s.signal=o.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixelLength=a.height,s.pixelStart=a.y,s.signal=o.inverse?-1:1),s}};function _k(t){BC(t),t.registerComponentModel(rk),t.registerComponentView(gk),fk(t)}var xk=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.type="dataZoom.slider",e.layoutMode="box",e.defaultOption=ec(CC.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),e}(CC),wk=bs,bk="horizontal",Sk="vertical",Mk=["line","bar","candlestick","scatter"],Ck={easing:"cubicOut",duration:100,delay:0},Ik=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._displayables={},n}return n(e,t),e.prototype.init=function(t,e){this.api=e,this._onBrush=H(this._onBrush,this),this._onBrushEnd=H(this._onBrushEnd,this)},e.prototype.render=function(e,n,i,r){if(t.prototype.render.apply(this,arguments),og(this,"_dispatchZoomAction",e.get("throttle"),"fixRate"),this._orient=e.getOrient(),!1!==e.get("show")){if(e.noTarget())return this._clear(),void this.group.removeAll();r&&"dataZoom"===r.type&&r.from===this.uid||this._buildView(),this._updateView()}else this.group.removeAll()},e.prototype.dispose=function(){this._clear(),t.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){ag(this,"_dispatchZoomAction");var t=this.api.getZr();t.off("mousemove",this._onBrush),t.off("mouseup",this._onBrushEnd)},e.prototype._buildView=function(){var t=this.group;t.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var e=this._displayables.sliderGroup=new kr;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(e),this._positionGroup()},e.prototype._resetLocation=function(){var t=this.dataZoomModel,e=this.api,n=t.get("brushSelect")?7:0,i=this._findCoordRect(),r={width:e.getWidth(),height:e.getHeight()},o=this._orient===bk?{right:r.width-i.x-i.width,top:r.height-30-7-n,width:i.width,height:30}:{right:7,top:i.y,width:30,height:i.height},a=rp(t.option);z(["right","top","width","height"],(function(t){"ph"===a[t]&&(a[t]=o[t])}));var s=tp(a,r);this._location={x:s.x,y:s.y},this._size=[s.width,s.height],this._orient===Sk&&this._size.reverse()},e.prototype._positionGroup=function(){var t=this.group,e=this._location,n=this._orient,i=this.dataZoomModel.getFirstTargetAxisModel(),r=i&&i.get("inverse"),o=this._displayables.sliderGroup,a=(this._dataShadowInfo||{}).otherAxisInverse;o.attr(n!==bk||r?n===bk&&r?{scaleY:a?1:-1,scaleX:-1}:n!==Sk||r?{scaleY:a?-1:1,scaleX:-1,rotation:Math.PI/2}:{scaleY:a?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:a?1:-1,scaleX:1});var s=t.getBoundingRect([o]);t.x=e.x-s.x,t.y=e.y-s.y,t.markRedraw()},e.prototype._getViewExtent=function(){return[0,this._size[0]]},e.prototype._renderBackground=function(){var t=this.dataZoomModel,e=this._size,n=this._displayables.sliderGroup,i=t.get("brushSelect");n.add(new wk({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")},z2:-40}));var r=new wk({shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:"transparent"},z2:0,onclick:H(this._onClickPanel,this)}),o=this.api.getZr();i?(r.on("mousedown",this._onBrushStart,this),r.cursor="crosshair",o.on("mousemove",this._onBrush),o.on("mouseup",this._onBrushEnd)):(o.off("mousemove",this._onBrush),o.off("mouseup",this._onBrushEnd)),n.add(r)},e.prototype._renderDataShadow=function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],t){var e=this._size,n=this._shadowSize||[],i=t.series,r=i.getRawData(),o=i.getShadowDim&&i.getShadowDim(),a=o&&r.getDimensionInfo(o)?i.getShadowDim():t.otherDim;if(null!=a){var s=this._shadowPolygonPts,l=this._shadowPolylinePts;if(r!==this._shadowData||a!==this._shadowDim||e[0]!==n[0]||e[1]!==n[1]){var u=r.getDataExtent(a),h=.3*(u[1]-u[0]);u=[u[0]-h,u[1]+h];var c,p=[0,e[1]],d=[0,e[0]],f=[[e[0],0],[0,0]],g=[],v=d[1]/(r.count()-1),y=0,m=Math.round(r.count()/e[0]);r.each([a],(function(t,e){if(m>0&&e%m)y+=v;else{var n=null==t||isNaN(t)||""===t,i=n?0:Er(t,u,p,!0);n&&!c&&e?(f.push([f[f.length-1][0],0]),g.push([g[g.length-1][0],0])):!n&&c&&(f.push([y,0]),g.push([y,0])),f.push([y,i]),g.push([y,i]),y+=v,c=n}})),s=this._shadowPolygonPts=f,l=this._shadowPolylinePts=g}this._shadowData=r,this._shadowDim=a,this._shadowSize=[e[0],e[1]];for(var _=this.dataZoomModel,x=0;x<3;x++){var w=b(1===x);this._displayables.sliderGroup.add(w),this._displayables.dataShadowSegs.push(w)}}}function b(t){var e=_.getModel(t?"selectedDataBackground":"dataBackground"),n=new kr,i=new wu({shape:{points:s},segmentIgnoreThreshold:1,style:e.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),r=new Su({shape:{points:l},segmentIgnoreThreshold:1,style:e.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return n.add(i),n.add(r),n}},e.prototype._prepareDataShadowInfo=function(){var t=this.dataZoomModel,e=t.get("showDataShadow");if(!1!==e){var n,i=this.ecModel;return t.eachTargetAxis((function(r,o){z(t.getAxisProxy(r,o).getTargetSeriesModels(),(function(t){if(!(n||!0!==e&&L(Mk,t.get("type"))<0)){var a,s=i.getComponent(wC(r),o).axis,l=function(t){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[t]}(r),u=t.coordinateSystem;null!=l&&u.getOtherAxis&&(a=u.getOtherAxis(s).inverse),l=t.getData().mapDimension(l),n={thisAxis:s,series:t,thisDim:r,otherDim:l,otherAxisInverse:a}}}),this)}),this),n}},e.prototype._renderHandle=function(){var t=this.group,e=this._displayables,n=e.handles=[null,null],i=e.handleLabels=[null,null],r=this._displayables.sliderGroup,o=this._size,a=this.dataZoomModel,s=this.api,l=a.get("borderRadius")||0,u=a.get("brushSelect"),h=e.filler=new wk({silent:u,style:{fill:a.get("fillerColor")},textConfig:{position:"inside"}});r.add(h),r.add(new wk({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:o[0],height:o[1],r:l},style:{stroke:a.get("dataBackgroundColor")||a.get("borderColor"),lineWidth:1,fill:"rgba(0,0,0,0)"}})),z([0,1],(function(e){var o=a.get("handleIcon");!ev[o]&&o.indexOf("path://")<0&&o.indexOf("image://")<0&&(o="path://"+o);var s=rv(o,-1,0,2,2,null,!0);s.attr({cursor:Tk(this._orient),draggable:!0,drift:H(this._onDragMove,this,e),ondragend:H(this._onDragEnd,this),onmouseover:H(this._showDataInfo,this,!0),onmouseout:H(this._showDataInfo,this,!1),z2:5});var l=s.getBoundingRect(),u=a.get("handleSize");this._handleHeight=Br(u,this._size[1]),this._handleWidth=l.width/l.height*this._handleHeight,s.setStyle(a.getModel("handleStyle").getItemStyle()),s.style.strokeNoScale=!0,s.rectHover=!0,s.ensureState("emphasis").style=a.getModel(["emphasis","handleStyle"]).getItemStyle(),Il(s);var h=a.get("handleColor");null!=h&&(s.style.fill=h),r.add(n[e]=s);var c=a.getModel("textStyle");t.add(i[e]=new Cs({silent:!0,invisible:!0,style:Oh(c,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:c.getTextColor(),font:c.getFont()}),z2:10}))}),this);var c=h;if(u){var p=Br(a.get("moveHandleSize"),o[1]),d=e.moveHandle=new bs({style:a.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:o[1]-.5,height:p}}),f=.8*p,g=e.moveHandleIcon=rv(a.get("moveHandleIcon"),-f/2,-f/2,f,f,"#fff",!0);g.silent=!0,g.y=o[1]+p/2-.5,d.ensureState("emphasis").style=a.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var v=Math.min(o[1]/2,Math.max(p,10));(c=e.moveZone=new bs({invisible:!0,shape:{y:o[1]-v,height:p+v}})).on("mouseover",(function(){s.enterEmphasis(d)})).on("mouseout",(function(){s.leaveEmphasis(d)})),r.add(d),r.add(g),r.add(c)}c.attr({draggable:!0,cursor:Tk(this._orient),drift:H(this._onDragMove,this,"all"),ondragstart:H(this._showDataInfo,this,!0),ondragend:H(this._onDragEnd,this),onmouseover:H(this._showDataInfo,this,!0),onmouseout:H(this._showDataInfo,this,!1)})},e.prototype._resetInterval=function(){var t=this._range=this.dataZoomModel.getPercentRange(),e=this._getViewExtent();this._handleEnds=[Er(t[0],[0,100],e,!0),Er(t[1],[0,100],e,!0)]},e.prototype._updateInterval=function(t,e){var n=this.dataZoomModel,i=this._handleEnds,r=this._getViewExtent(),o=n.findRepresentativeAxisProxy().getMinMaxSpan(),a=[0,100];AC(e,i,r,n.get("zoomLock")?"all":t,null!=o.minSpan?Er(o.minSpan,a,r,!0):null,null!=o.maxSpan?Er(o.maxSpan,a,r,!0):null);var s=this._range,l=this._range=Fr([Er(i[0],r,a,!0),Er(i[1],r,a,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},e.prototype._updateView=function(t){var e=this._displayables,n=this._handleEnds,i=Fr(n.slice()),r=this._size;z([0,1],(function(t){var i=e.handles[t],o=this._handleHeight;i.attr({scaleX:o/2,scaleY:o/2,x:n[t]+(t?-1:1),y:r[1]/2-o/2})}),this),e.filler.setShape({x:i[0],y:0,width:i[1]-i[0],height:r[1]});var o={x:i[0],width:i[1]-i[0]};e.moveHandle&&(e.moveHandle.setShape(o),e.moveZone.setShape(o),e.moveZone.getBoundingRect(),e.moveHandleIcon&&e.moveHandleIcon.attr("x",o.x+o.width/2));for(var a=e.dataShadowSegs,s=[0,i[0],i[1],r[0]],l=0;le[0]||n[1]<0||n[1]>e[1])){var i=this._handleEnds,r=(i[0]+i[1])/2,o=this._updateInterval("all",n[0]-r);this._updateView(),o&&this._dispatchZoomAction(!1)}},e.prototype._onBrushStart=function(t){var e=t.offsetX,n=t.offsetY;this._brushStart=new Se(e,n),this._brushing=!0,this._brushStartTime=+new Date},e.prototype._onBrushEnd=function(t){if(this._brushing){var e=this._displayables.brushRect;if(this._brushing=!1,e){e.attr("ignore",!0);var n=e.shape;if(!(+new Date-this._brushStartTime<200&&Math.abs(n.width)<5)){var i=this._getViewExtent(),r=[0,100];this._range=Fr([Er(n.x,i,r,!0),Er(n.x+n.width,i,r,!0)]),this._handleEnds=[n.x,n.x+n.width],this._updateView(),this._dispatchZoomAction(!1)}}}},e.prototype._onBrush=function(t){this._brushing&&(ue(t.event),this._updateBrushRect(t.offsetX,t.offsetY))},e.prototype._updateBrushRect=function(t,e){var n=this._displayables,i=this.dataZoomModel,r=n.brushRect;r||(r=n.brushRect=new wk({silent:!0,style:i.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(r)),r.attr("ignore",!1);var o=this._brushStart,a=this._displayables.sliderGroup,s=a.transformCoordToLocal(t,e),l=a.transformCoordToLocal(o.x,o.y),u=this._size;s[0]=Math.max(Math.min(u[0],s[0]),0),r.setShape({x:l[0],y:0,width:s[0]-l[0],height:u[1]})},e.prototype._dispatchZoomAction=function(t){var e=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:t?Ck:null,start:e[0],end:e[1]})},e.prototype._findCoordRect=function(){var t,e=SC(this.dataZoomModel).infoList;if(!t&&e.length){var n=e[0].model.coordinateSystem;t=n.getRect&&n.getRect()}if(!t){var i=this.api.getWidth(),r=this.api.getHeight();t={x:.2*i,y:.2*r,width:.6*i,height:.6*r}}return t},e.type="dataZoom.slider",e}(DC);function Tk(t){return"vertical"===t?"ns-resize":"ew-resize"}function Dk(t){t.registerComponentModel(xk),t.registerComponentView(Ik),BC(t)}var kk={label:{enabled:!0},decal:{show:!1}},Ak=bo(),Pk={};function Lk(t,e){var n=t.getModel("aria");if(n.get("enabled")){var i=I(kk);T(i.label,t.getLocaleModel().get("aria"),!1),T(n.option,i,!1),function(){if(n.getModel("decal").get("show")){var e=gt();t.eachSeries((function(t){if(!t.isColorBySeries()){var n=e.get(t.type);n||(n={},e.set(t.type,n)),Ak(t).scope=n}})),t.eachRawSeries((function(e){if(!t.isSeriesFiltered(e))if(U(e.enableAriaDecal))e.enableAriaDecal();else{var n=e.getData();if(e.isColorBySeries()){var i=zp(e.ecModel,e.name,Pk,t.getSeriesCount()),r=n.getVisual("decal");n.setVisual("decal",u(r,i))}else{var o=e.getRawData(),a={},s=Ak(e).scope;n.each((function(t){var e=n.getRawIndex(t);a[e]=t}));var l=o.count();o.each((function(t){var i=a[t],r=o.getName(t)||t+"",h=zp(e.ecModel,r,s,l),c=n.getItemVisual(i,"decal");n.setItemVisual(i,"decal",u(c,h))}))}}function u(t,e){var n=t?k(k({},e),t):e;return n.dirty=!0,n}}))}}(),function(){var i=t.getLocaleModel().get("aria"),o=n.getModel("label");if(o.option=A(o.option,i),!o.get("enabled"))return;var a=e.getZr().dom;if(o.get("description"))return void a.setAttribute("aria-label",o.get("description"));var s,l=t.getSeriesCount(),u=o.get(["data","maxCount"])||10,h=o.get(["series","maxCount"])||10,c=Math.min(l,h);if(l<1)return;var p=function(){var e=t.get("title");e&&e.length&&(e=e[0]);return e&&e.text}();s=p?r(o.get(["general","withTitle"]),{title:p}):o.get(["general","withoutTitle"]);var d=[];s+=r(l>1?o.get(["series","multiple","prefix"]):o.get(["series","single","prefix"]),{seriesCount:l}),t.eachSeries((function(e,n){if(n1?o.get(["series","multiple",a]):o.get(["series","single",a]),{seriesId:e.seriesIndex,seriesName:e.get("name"),seriesType:(_=e.subType,t.getLocaleModel().get(["series","typeNames"])[_]||"自定义图")});var s=e.getData();if(s.count()>u)i+=r(o.get(["data","partialData"]),{displayCnt:u});else i+=o.get(["data","allData"]);for(var h=o.get(["data","separator","middle"]),p=o.get(["data","separator","end"]),f=[],g=0;g
    '); - document.write('
    '); + document.write('
    '); document.write((typeof IMGDIR == 'undefined' ? '' : '
    ') + '
    0%
    '); document.write('
    '); $('outer_' + s.slideId).onclick = s.imageLink; diff --git a/upload/static/js/forum_viewthread.js b/upload/static/js/forum_viewthread.js index 6fb0f674..cf607f63 100644 --- a/upload/static/js/forum_viewthread.js +++ b/upload/static/js/forum_viewthread.js @@ -28,9 +28,9 @@ function attachimgshow(pid, onlyinpost) { continue; } if(onlyinpost && !obj.getAttribute('inpost')) { - aimgcomplete++; + aimgcomplete++; continue; - } + } if(onlyinpost && obj.getAttribute('inpost') || !onlyinpost) { if(!obj.status) { obj.status = 1; @@ -233,7 +233,8 @@ function succeedhandle_fastpost(locationhref, message, param) { var pid = param['pid']; var tid = param['tid']; var from = param['from']; - if(pid) { + var reply_mod = param['reply_mod']; + if(!reply_mod) { ajaxget('forum.php?mod=viewthread&tid=' + tid + '&viewpid=' + pid + '&from=' + from, 'post_new', 'ajaxwaitid', '', null, 'fastpostappendreply()'); if(replyreload) { var reloadpids = replyreload.split(','); @@ -244,7 +245,7 @@ function succeedhandle_fastpost(locationhref, message, param) { $('fastpostreturn').className = ''; } else { if(!message) { - message = 'โพสต์ของคุณต้องรอการตรวจสอบจากผู้ดูแลระบบก่อน ถึงจะแสดงผลได้'; + message = 'การตอบกระทู้ในส่วนนี้จำเป็นต้องผ่านกระบวนการตรวจสอบก่อน โพสต์ของคุณจะปรากฏหลังจากผ่านการตรวจสอบเรียบร้อยแล้ว'; } $('post_new').style.display = $('fastpostmessage').value = $('fastpostreturn').className = ''; $('fastpostreturn').innerHTML = message; @@ -734,7 +735,7 @@ function changecontentdivid(tid) { } function showmobilebbs(obj) { - var content = '

    ดาวน์โหลดแอพฯสำหรับอุปกรณ์พกพา{lang close}

    สำหรับ Andriod สแกน QR โค้ดจะสามารถดาวน์โหลดโดยตรงไปยังอุปกรณ์

    โทรศัพท์มือถือหรืออุปกรณ์พกพา ที่มีระบบปฏิบัติการเป็นแอนดรอยด์ ทุกรุ่น ทุกยี่ห้อ

    สำหรับ iPhone สแกน QR โค้ดจะสามารถดาวน์โหลดโดยตรงไปยังอุปกรณ์

    สามารถใช้งานได้ทั้ง ไอโฟน และ ไอแพด

    '; + var content = '

    แอปพลิเคชันการโพสต์ในเว็บบอร์ดบนมือถือ{lang close}

    สำหรับ Andriod สแกน QR โค้ดจะสามารถดาวน์โหลดโดยตรงไปยังอุปกรณ์

    โทรศัพท์มือถือหรืออุปกรณ์พกพา ที่มีระบบปฏิบัติการเป็นแอนดรอยด์ ทุกรุ่น ทุกยี่ห้อ

    สำหรับ iPhone สแกน QR โค้ดจะสามารถดาวน์โหลดโดยตรงไปยังอุปกรณ์

    สามารถใช้งานได้ทั้ง ไอโฟน และ ไอแพด

    '; showWindow('mobilebbs', content, 'html'); } @@ -745,7 +746,7 @@ function succeedhandle_vfastpost(url, message, param) { } function vmessage() { - var vf_tips = '#ตอบกลับด่วนกระทู้นี้#'; + var vf_tips = '#ตอบกลับแบบด่วนที่นี่#'; $('vmessage').value = vf_tips; $('vmessage').style.color = '#CDCDCD'; $('vmessage').onclick = function() { diff --git a/upload/static/js/mobile/common.js b/upload/static/js/mobile/common.js index 4599d283..d44457e1 100644 --- a/upload/static/js/mobile/common.js +++ b/upload/static/js/mobile/common.js @@ -27,6 +27,7 @@ var page = { var nextpage = qSel('div.pg .nxt') ? qSel('div.pg .nxt').href : undefined; var lastpage = qSel('div.pg label span') ? (qSel('div.pg label span').innerText.replace(/[^\d]/g, '') || 0) : 0; var curpage = qSel('div.pg input') ? qSel('div.pg input').value : 1; + var multipage_url = getID('multipage_url') ? getID('multipage_url').value : undefined; if(!lastpage) { prevpage = qSel('div.pg .pgb a') ? qSel('div.pg .pgb a').href : undefined; @@ -61,7 +62,14 @@ var page = { pgobj.innerHTML = 'หน้าที่แล้ว'+ selector +'หน้าถัดไป'; qSel('#dumppage').addEventListener('change', function() { var href = (prevpage || nextpage); - window.location.href = href.replace(/page=\d+/, 'page=' + this.value); + var newhref = href.replace(/page=\d+/, 'page=' + this.value); + if (newhref == href) { + newhref = href.replace(/(forum|thread|article|group|blog)-(\d+)-(\d+)(-(\d+))?\.html/i, '$1-$2-' + this.value + '$4.html'); + if (newhref == href && multipage_url != undefined) { + newhref = multipage_url.replace(/{page}/i, this.value); + } + } + window.location.href = newhref; }); }, }; @@ -148,7 +156,7 @@ var img = { if(is_err_t) { var parentnode = obj.parent(); parentnode.find('.loading').remove(); - parentnode.append('
    รีโหลดใหม่
    '); + parentnode.append('
    แตะเพื่อดึงข้อมูลใหม่
    '); parentnode.find('.error_text').one('click', function() { obj.attr('load', 0).find('.error_text').remove(); parentnode.append('
    '); @@ -260,7 +268,7 @@ var formdialog = { evalscript(s.lastChild.firstChild.nodeValue); }) .error(function() { - popup.open('พบความผิดปกติจากการส่งข้อมูล ไม่สามารถดำเนินการตามคำขอของคุณได้', 'alert'); + popup.open('เกิดข้อผิดพลาดในการส่งแบบฟอร์ม ไม่สามารถทำคำขอของคุณเสร็จสมบูรณ์ได้', 'alert'); }); return false; }); diff --git a/upload/template/default/common/common.css b/upload/template/default/common/common.css index 991eea92..8e88985b 100644 --- a/upload/template/default/common/common.css +++ b/upload/template/default/common/common.css @@ -103,7 +103,7 @@ CSS 写作注意事项: :focus { outline-color: {MENUBGCOLOR}; } label { cursor: pointer; } /* 消除修改DOCTYPE为HTML5以后造成的img基线问题 */ - img, svg { vertical-align: bottom; } + img.boardlogo, img.user_avatar, .slideimage img { vertical-align: middle; } /* Name: mod_float Level: Global diff --git a/upload/template/default/common/module.css b/upload/template/default/common/module.css index 41225489..d6c6b8a2 100644 --- a/upload/template/default/common/module.css +++ b/upload/template/default/common/module.css @@ -446,6 +446,7 @@ Created & Modified by Alice, Monkey, Lushnis, Pony, Dfox & DragonLee. .fl_g dl { margin-left: 31px; padding-left: 10px; } .fl_g dt { font-weight: 700; } .fl_row td { border-top: 1px dashed {COMMONBORDER}; } + .fl_icn img, .fl_icn svg , .fl_icn_g img, .fl_icn_g svg { vertical-align: middle; } /* 圈子分类列表 */ .flt {} @@ -1959,7 +1960,7 @@ body { background: none !important; } .pbw strong { font-weight: 400; } .pbw p { color: #000; } .p_pop span { display: none; } -#nv_search #ft { margin: 20px; text-align: center; } +#nv_search #ft.w { margin: 20px; text-align: center; } .pg { float: none; } #myspace_menu li a, #navs_menu li a { background-repeat: no-repeat; background-position: -200px 0; } /** end **/ diff --git a/upload/template/default/touch/forum/discuzcode.htm b/upload/template/default/touch/forum/discuzcode.htm index 24200f5a..ead8c46a 100644 --- a/upload/template/default/touch/forum/discuzcode.htm +++ b/upload/template/default/touch/forum/discuzcode.htm @@ -17,8 +17,9 @@ } function tpl_codedisp($code) { + $randomid = 'code_'.random(3); } -
    1. $code
    +
    1. $code
    {lang discuzcode_copyclipboard}
    {eval } @@ -96,16 +97,16 @@ $aidencode = packaids($attach); $is_archive = $_G['forum_thread']['is_archived'] ? "&fid=".$_G['fid']."&archiveid=".$_G['forum_thread']['archiveid'] : ''; $pluginhook = !empty($_G['setting']['pluginhooks']['viewthread_attach_extra'][$attach['aid']]) ? $_G['setting']['pluginhooks']['viewthread_attach_extra'][$attach['aid']] : ''; +$guestviewthumb = !empty($_G['setting']['guestviewthumb']['flag']) && !$_G['uid']; +$mobileguestviewthumburl = $guestviewthumb ? ($attach['attachimg'] && $_G['setting']['showimages'] && (((!$attach['price'] || $attach['payed']) && ($_G['group']['allowgetimage'] || $_G['uid'] == $attach['uid'])) || ($guestviewthumb)) ? getforumimg($attach['aid'], 0, $_G['setting']['guestviewthumb']['width'], $_G['setting']['guestviewthumb']['height'], 1) : '') : ''; } - - - -
  • $attach['imgalt'] - $pluginhook -
  • - - + + +
  • $attach['imgalt'] + $pluginhook +
  • + @@ -159,4 +160,4 @@ +}--> \ No newline at end of file diff --git a/upload/template/default/touch/forum/forumdisplay_fastpost.htm b/upload/template/default/touch/forum/forumdisplay_fastpost.htm index cdf2245b..bc143da7 100644 --- a/upload/template/default/touch/forum/forumdisplay_fastpost.htm +++ b/upload/template/default/touch/forum/forumdisplay_fastpost.htm @@ -83,7 +83,8 @@ function succeedhandle_fastpost(locationhref, message, param) { var pid = param['pid']; var tid = param['tid']; - if(pid) { + var reply_mod = param['reply_mod']; + if(!reply_mod) { $.ajax({ type:'POST', url:'forum.php?mod=viewthread&tid=' + tid + '&viewpid=' + pid + '&mobile=2', diff --git a/upload/template/default/touch/home/space_profile.htm b/upload/template/default/touch/home/space_profile.htm index 60df9787..dfd12a79 100644 --- a/upload/template/default/touch/home/space_profile.htm +++ b/upload/template/default/touch/home/space_profile.htm @@ -47,10 +47,10 @@

    $space['username']

      -
    • {lang mythread}{lang mobthread}{lang mobta}
    • +
    • {lang mythread}{lang mobthread}{lang mobta}
    • -
    • {lang blog}{lang my}{lang blog}{lang mobta}
    • +
    • {lang blog}{lang my}{lang blog}{lang mobta}
    • {lang myfavorite}
    • diff --git a/upload/uc_client/model/note.php b/upload/uc_client/model/note.php index 6f1d8f42..e193a37e 100644 --- a/upload/uc_client/model/note.php +++ b/upload/uc_client/model/note.php @@ -118,7 +118,7 @@ function sendone($appid, $noteid = 0, $note = '') { } $this->base->load('misc'); $apifilename = isset($app['apifilename']) && $app['apifilename'] ? $app['apifilename'] : 'uc.php'; - if(UC_STANDALONE && @include UC_ROOT.'./extend_client.php') { + if(((defined('UC_STANDALONE') && !empty(constant('UC_STANDALONE'))) || (defined('IN_DISCUZ') && in_array($note['operation'], array('deleteuser', 'renameuser', 'updatepw')))) && @include UC_ROOT.'./extend_client.php') { $uc_note = new uc_note_handler(); $method = $note['operation']; if(is_string($method) && !empty($method)) { diff --git a/upload/uc_client/release/release.php b/upload/uc_client/release/release.php index 62423fd7..f3f05ca2 100644 --- a/upload/uc_client/release/release.php +++ b/upload/uc_client/release/release.php @@ -2,5 +2,5 @@ if(!defined('UC_CLIENT_VERSION')) { define('UC_CLIENT_VERSION', '1.7.0'); - define('UC_CLIENT_RELEASE', '20230520'); + define('UC_CLIENT_RELEASE', '20230726'); } \ No newline at end of file diff --git a/upload/uc_server/control/admin/ucfiles.md5 b/upload/uc_server/control/admin/ucfiles.md5 index bd9aa52d..930c990c 100644 --- a/upload/uc_server/control/admin/ucfiles.md5 +++ b/upload/uc_server/control/admin/ucfiles.md5 @@ -218,7 +218,7 @@ c8323955b8b6a4393372de9e122853a3 *js/calendar.js 0e8249b8c83ab93350d6864e106da182 *js/common.js 7215ee9c7d9dc229d2921a40e899ec5f *js/index.htm 904fbd9ee2c415bbee0fa4f9ccce4f83 *js/pm_editor.js -c517ab970aaff7f9131d9656f3bc9ea1 *release/release.php +3b92fbadd4365beb6f0762ed5b1016c1 *release/release.php f5ca4573eda7e4e57c93e7f56893b354 *view/default/admin.lang.php 5de71114c9c4e1db2a69abab5b7428b1 *view/default/admin_admin.htm d05e6869168a47c29e4a07226f344314 *view/default/admin_app.htm diff --git a/upload/uc_server/release/release.php b/upload/uc_server/release/release.php index 49c66734..fbf46162 100644 --- a/upload/uc_server/release/release.php +++ b/upload/uc_server/release/release.php @@ -2,5 +2,5 @@ if(!defined('UC_SERVER_VERSION')) { define('UC_SERVER_VERSION', '1.7.0'); - define('UC_SERVER_RELEASE', '20230520'); + define('UC_SERVER_RELEASE', '20230726'); } \ No newline at end of file