Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@🤖爱看机器人@eyJsYXN0X2NoYXB0ZXJfcnVsZSI6IiIsInRpdGxlIjoi8J+klueIseeci+acuuWZqOS6uiIsImF1dGhvciI6Ikx1RmVpIiwidXJsIjoiaGlrZXI6Ly9lbXB0eSMjZnlwYWdlIiwidmVyc2lvbiI6MSwiY29sX3R5cGUiOiJtb3ZpZV8zIiwiY2xhc3NfbmFtZSI6IiIsInR5cGUiOiJ2aWRlbyIsImNsYXNzX3VybCI6IiIsImFyZWFfbmFtZSI6IiIsImFyZWFfdXJsIjoiIiwic29ydF9uYW1lIjoiIiwieWVhcl9uYW1lIjoiIiwic29ydF91cmwiOiIiLCJ5ZWFyX3VybCI6IiIsImZpbmRfcnVsZSI6ImpzOlxyXG5cclxuLy8gbGV0IHRlc3RfZnVuID0gJC5yZXF1aXJlKFwiaGlrZXI6Ly9wYWdlL3Rlc3RcIikudGVzdF9mdW5cclxuXHJcbi8vIHRlc3RfZnVuKClcclxudmFyIGxhbGEgPSBcIjY2NmZkc2ZmZHNmXCJcclxuZXZhbChyZXF1aXJlKFwiaGlrZXI6Ly9wYWdlL3Rlc3RcIikpXHJcbmZjKFwiaHR0cHM6Ly93d3cuYmFpZHUuY29tXCIpXHJcblxyXG5cclxudmFyIHRydWVfdXJsID0gJydcclxudmFyIHJlcyA9IFtdXHJcbnZhciBwcmVzID0gW11cclxudmFyIGN1cnJlbnRfcGFnZSA9ICcwJ1xyXG52YXIgY3VycmVudF9jbGFzcyA9ICfng63pl6gnXHJcbnB1dE15VmFyKCdpc19kZXRhaWxfY2FjaGUnLCAnMCcpXHJcbnZhciBzZWxlY3RfZml4X2l0ZW1fbnVtID0gZ2V0TXlWYXIoJ3NlbGVjdF9maXhfaXRlbV9udW0nLCAnMCcpXHJcbnZhciBzZWxlY3RfZHluX2l0ZW1fbnVtID0gZ2V0TXlWYXIoJ3NlbGVjdF9keW5faXRlbV9udW0nLCAnMCcpXHJcblxyXG52YXIgc2Vjb25kX3RhYnNfYXJyID0gW1xyXG4gICAgWyflhajpg6gnLCAn55S15b2xJywgJ+eUteinhuWJpyddLFxyXG4gICAgW1xyXG4gICAgICAgICfng63pl6gnLFxyXG4gICAgICAgICfmnIDmlrAnLFxyXG4gICAgICAgICfnu4/lhbgnLFxyXG4gICAgICAgICfosYbnk6Ppq5jliIYnLFxyXG4gICAgICAgICflhrfpl6jkvbPniYcnLFxyXG4gICAgICAgICfljY7or60nLFxyXG4gICAgICAgICfmrKfnvo4nLFxyXG4gICAgICAgICfpn6nlm70nLFxyXG4gICAgICAgICfml6XmnKwnLFxyXG4gICAgICAgICfliqjkvZwnLFxyXG4gICAgICAgICfllpzliacnLFxyXG4gICAgICAgICfniLHmg4UnLFxyXG4gICAgICAgICfnp5HlubsnLFxyXG4gICAgICAgICfmgqznlpEnLFxyXG4gICAgICAgICfmgZDmgJYnLFxyXG4gICAgICAgICfmlofoibonLFxyXG4gICAgICAgICfosYbnk6N0b3AyNTAnLFxyXG4gICAgXSxcclxuICAgIFsn54Ot6ZeoJywgJ+e+juWJpycsICfoi7HliacnLCAn6Z+p5YmnJywgJ+aXpeWJpycsICflm73kuqfliacnLCAn5riv5YmnJywgJ+aXpeacrOWKqOeUuycsICfnu7zoibonLCAn57qq5b2V54mHJ10sXHJcbiAgICBbJ+ixhueTo+S4gOWRqOeUteW9seWPo+eikeamnCcsICfosYbnk6PlhajnkIPlj6PnopHliafpm4bmppwnLCAn6LGG55Oj5Y2O6K+t5Y+j56KR5qacJywgJ+ixhueTo+WbveWGhee7vOiJuuWPo+eikeamnCcsICfosYbnk6Plm73lpJbnu7zoibrlj6PnopHmppwnXSxcclxuICAgIFtcclxuICAgICAgICAn5YWo6YOoJyxcclxuICAgICAgICAn5Ymn5oOFJyxcclxuICAgICAgICAn5oOF5oSfJyxcclxuICAgICAgICAn5rK75oSIJyxcclxuICAgICAgICAn6aKB5aWWJyxcclx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1bmN0aW9uIChfMHhmNzQ2OTYsIF8weDRkMzJhZikge1xcclxcbiAgICAgICAgY29uc3QgXzB4NDVlMDg0ID0gW1xcclxcbiAgICAgICAgICAgICc3MDcxNTJ5b3doT3YnLFxcclxcbiAgICAgICAgICAgICdnZXRFbGVtZW50QnlJZCcsXFxyXFxuICAgICAgICAgICAgJzg1NTkzNkNHYWN6dCcsXFxyXFxuICAgICAgICAgICAgJ2xlbmd0aCcsXFxyXFxuICAgICAgICAgICAgJzI5NjY4MzFHQ0dwdm4nLFxcclxcbiAgICAgICAgICAgICc2MTEyNjZuZmNURWYnLFxcclxcbiAgICAgICAgICAgICd2YWx1ZScsXFxyXFxuICAgICAgICAgICAgJ3N1YnN0cmluZycsXFxyXFxuICAgICAgICAgICAgJzE1ODA2MzBHbmdtbUEnLFxcclxcbiAgICAgICAgICAgICcxMTd1dndmbHcnLFxcclxcbiAgICAgICAgICAgICdqb2luJyxcXHJcXG4gICAgICAgICAgICAnY3VycmVudF9pZCcsXFxyXFxuICAgICAgICAgICAgJzU2NTQ0OEFwa2hpZycsXFxyXFxuICAgICAgICAgICAgJzIzMDkySndteXRXJyxcXHJcXG4gICAgICAgIF1cXHJcXG4gICAgICAgIF8weGY3NDY5NiA9IF8weGY3NDY5NiAtIDB4MWE4XFxyXFxuICAgICAgICBsZXQgXzB4Y2JmYTI4ID0gXzB4NDVlMDg0W18weGY3NDY5Nl1cXHJcXG4gICAgICAgIHJldHVybiBfMHhjYmZhMjhcXHJcXG4gICAgfVxcclxcblxcclxcbiAgICBsZXQgXzB4MzUxNjJkID0gY3VycmVudF9pZCxcXHJcXG4gICAgICAgIF8weGYyNTY3OCA9IGVfdG9rZW5cXHJcXG4gICAgaWYgKCFfMHgzNTE2MmQgfHwgIV8weGYyNTY3OCkgcmV0dXJuXFxyXFxuICAgIGxldCBfMHgzODgyYTMgPSBfMHgzNTE2MmRbJ2xlbmd0aCddLFxcclxcbiAgICAgICAgXzB4NTJhMDk3ID0gXzB4MzUx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cuYWlrYW5ib3QuY29tJyArXFxyXFxuICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VEb21Gb3JIdG1sKGxpc3RbaXRlbV0sICdhJiZocmVmJykgK1xcclxcbiAgICAgICAgICAgICAgICAgICAgICAgICcjaW1tZXJzaXZlVGhlbWUjJywgLy/pk77mjqVcXHJcXG4gICAgICAgICAgICAgICAgfSlcXHJcXG4gICAgICAgICAgICB9XFxyXFxuICAgICAgICAgICAgYnJlYWtcXHJcXG4gICAgICAgIGNhc2UgJzQnOlxcclxcbiAgICAgICAgICAgIGxpc3QgPSBwYXJzZURvbUZvckFycmF5KGh0bWwsICdib2R5JiYjc2VhcmNoLXJlc3VsdCYmLm1lZGlhJylcXHJcXG4gICAgICAgICAgICBmb3IgKHZhciBpdGVtIGluIGxpc3QpIHtcXHJcXG4gICAgICAgICAgICAgICAgcmVzLnB1c2goe1xcclxcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IHBhcnNlRG9tRm9ySHRtbChsaXN0W2l0ZW1dLCAnLnRpdGxlLXRleHQmJlRleHQnKSwgLy/moIfpophcXHJcXG4gICAgICAgICAgICAgICAgICAgIGRlc2M6ICcnLCAvL+WPjOmHjeaPj+i/sFxcclxcbiAgICAgICAgICAgICAgICAgICAgcGljX3VybDogcGFyc2VEb20obGlzdFtpdGVtXSwgJ2ltZyYmZGF0YS1zcmMnKSArICdAUmVmZXJlcj1odHRwczovL3d3dy5haWthbmJvdC5jb20nLCAvL+WbvueJh1xcclxcbiAgICAgICAgICAgICAgICAgICAgdXJsOlxcclxcbiAgICAgICAgICAgICAgICAgICAgICAgICdoaWtlcjovL2VtcHR5IyMjJyArXFxyXFxuICAgICAgICAgICAgICAgICAgICAgICAgJ2h0dHBzOi8vd3d3LmFpa2FuYm90LmNvbScgK1xcclxcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlRG9tRm9ySHRtbChsaXN0W2l0ZW1dLCAnYSYmaHJlZicpICtcXHJcXG4gICAgICAgICAgICAgICAgICAgICAgICAnI2ltbWVyc2l2ZVRoZW1lIycsIC8v6ZO+5o6lXFxyXFxuICAgICAgICAgICAgICAgIH0pXFxyXFxuICAgICAgICAgICAgfVxcclxcbiAgICAgICAgICAgIGJyZWFrXFxyXFxuICAgICAgICBkZWZhdWx0OlxcclxcbiAgICAgICAgICAgIGxpc3QgPSBwYXJzZURvbUZvckFycmF5KGh0bWwsICdib2R5JiYuY29sLXhzLTQuY29sLXNtLTMnKVxcclxcbiAgICAgICAgICAgIGlmIChzZWxlY3RfbnVtID09ICcwJykge1xcclxcbiAgICAgICAgICAgICAgICBpZiAoc2VsZWN0X3NlY29uZF9udW0gPT0gJzAnKSB7XFxyXFxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoc2VsZWN0X3NlY29uZF9udW0gPT0gJzEnKSB7XFxyXFxuICAgICAgICAgICAgICAgICAgICBsaXN0ID0gbGlzdC5zbGljZSgwLCAxMilcXHJcXG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChzZWxlY3Rfc2Vjb25kX251bSA9PSAnMicpIHtcXHJcXG4gICAgICAgICAgICAgICAgICAgIGxpc3QgPSBsaXN0LnNsaWNlKDEyLCBsaXN0Lmxlbmd0aClcXHJcXG4gICAgICAgICAgICAgICAgfVxcclxcbiAgICAgICAgICAgIH1cXHJcXG4gICAgICAgICAgICBmb3IgKHZhciBpdGVtIGluIGxpc3QpIHtcXHJcXG4gICAgICAgICAgICAgICAgcmVzLnB1c2goe1xcclxcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IHBhcnNlRG9tRm9ySHRtbChsaXN0W2l0ZW1dLCAncCYmVGV4dCcpLCAvL+agh+mimFxcclxcbiAgICAgICAgICAgICAgICAgICAgZGVzYzogJycsIC8v5Y+M6YeN5o+P6L+wXFxyXFxuICAgICAgICAgICAgICAgICAgICBwaWNfdXJsOiBwYXJzZURvbShsaXN0W2l0ZW1dLCAnaW1nJiZkYXRhLXNyYycpICsgJ0BSZWZlcmVyPWh0dHBzOi8vd3d3LmFpa2FuYm90LmNvbScsIC8v5Zu+54mHXFxyXFxuICAgICAgICAgICAgICAgICAgICB1cmw6XFxyXFxuICAgICAgICAgICAgICAgICAgICAgICAgJ2hpa2VyOi8vZW1wdHkjIyMnICtcXHJcXG4gICAgICAgICAgICAgICAgICAgICAgICAnaHR0cHM6Ly93d3cuYWlrYW5ib3QuY29tJyArXFxyXFxuICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VEb21Gb3JIdG1sKGxpc3RbaXRlbV0sICdhJiZocmVmJykgK1xcclxcbiAgICAgICAgICAgICAgICAgICAgICAgICcjaW1tZXJzaXZlVGhlbWUjJywgLy/pk77mjqVcXHJcXG4gICAgICAgICAgICAgICAgfSlcXHJcXG4gICAgICAgICAgICB9XFxyXFxuICAgIH1cXHJcXG5cXHJcXG4gICAgcmV0dXJuIHJlc1xcclxcbn1cXHJcXG5cIn0se1wiY29sX3R5cGVcIjpcIm1vdmllXzNcIixcIm5hbWVcIjpcImR5bmFtaWNfdGFiXCIsXCJwYXRoXCI6XCJkeW5hbWljX3RhYlwiLFwicnVsZVwiOlwiZnVuY3Rpb24gZHluYW1pY190YWIoc2VsZWN0X251bSwgc2Vjb25kX3RhYnMsIHJlcykge1xcclxcbiAgICAvLyByZXMucHVzaCh7XFxyXFxuICAgIC8vICAgICB0aXRsZTogJyAnLFxcclxcbiAgICAvLyAgICAgdXJsOiBcXFwiI25vSGlzdG9yeSNoaWtlcjovL2VtcHR5J1xcXCIsXFxyXFxuICAgIC8vICAgICBjb2xfdHlwZTogJ2ZsZXhfYnV0dG9uJyxcXHJcXG4gICAgLy8gfSlcXHJcXG4gICAgc2Vjb25kX3RhYnMgPSBzZWNvbmRfdGFic1tzZWxlY3RfbnVtXVxcclxcbiAgICBsZXQgYXJyX2NvbG9yID0gW11cXHJcXG4gICAgZm9yIChsZXQgaSBpbiBzZWNvbmRfdGFicykge1xcclxcbiAgICAgICAgYXJyX2NvbG9yLnB1c2goJyMwMDAwMDAnKVxcclxcbiAgICB9XFxyXFxuICAgIGFycl9jb2xvcltnZXRNeVZhcignc2VsZWN0X2R5bl9pdGVtX251bScsICcwJyldID0gJyNlYjc0MDInXFxyXFxuICAgIGZvciAobGV0IHRhYl9pdGVtIGluIHNlY29uZF90YWJzKSB7XFxyXFxuICAgICAgICByZXMucHVzaCh7XFxyXFxuICAgICAgICAgICAgdGl0bGU6XFxyXFxuICAgICAgICAgICAgICAgICfigJjigJjigJnigJk8c3BhbiBzdHlsZT1cXFwiY29sb3I6JyArXFxyXFxuICAgICAgICAgICAgICAgIGFycl9jb2xvclt0YWJfaXRlbV0gK1xcclxcbiAgICAgICAgICAgICAgICAnXFxcIj4nICtcXHJcXG4gICAgICAgICAgICAgICAgc2Vjb25kX3RhYnNbdGFiX2l0ZW1dICtcXHJcXG4gICAgICAgICAgICAgICAgJzwvc3Bhbj4nLFxcclxcbiAgICAgICAgICAgIHVybDpcXHJcXG4gICAgICAgICAgICAgICAgXFxcIkBsYXp5UnVsZT0uanM6cHV0TXlWYXIoJ3NlbGVjdF9keW5faXRlbV9udW0nLCAnXFxcIiArXFxyXFxuICAgICAgICAgICAgICAgIHRhYl9pdGVtICtcXHJcXG4gICAgICAgICAgICAgICAgXFxcIicpOyByZWZyZXNoUGFnZSgpOyAnI25vSGlzdG9yeSNoaWtlcjovL2VtcHR5J1xcXCIsXFxyXFxuICAgICAgICAgICAgY29sX3R5cGU6ICdzY3JvbGxfYnV0dG9uJyxcXHJcXG4gICAgICAgICAgICAvLyBjb2xfdHlwZTogJ2ljb25fNScsXFxyXFxuICAgICAgICB9KVxcclxcbiAgICB9XFxyXFxuXFxyXFxuICAgIC8vIHN3aXRjaCAoc2VsZWN0X251bSkge1xcclxcbiAgICAvLyAgICAgY2FzZSAnMSc6XFxyXFxuICAgIC8vICAgICAgICAgZHluYW1pY190YWJfZ2VuZXJhdGlvbihzZWNvbmRfdGFicywgcmVzKVxcclxcbiAgICAvLyAgICAgICAgIGJyZWFrXFxyXF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tcXHJcXG4gICAgICAgICAgICBsZXQgcHQgPSBwdGVybVtpdGVtMl0uc3BsaXQoJyQnKVxcclxcbiAgICAgICAgICAgIHNvdXJjZV9yZXMucHVzaCh7XFxyXFxuICAgICAgICAgICAgICAgIHRpdGxlOiAn4oCY4oCY4oCZ4oCZPHNwYW4gc3R5bGU9XFxcImNvbG9yOicgKyAnIzAwMDAwMCcgKyAnXFxcIj48c21hbGw+JyArIHB0WzBdICsgJzwvc21hbGw+PC9zcGFuPicsXFxyXFxuICAgICAgICAgICAgICAgIC8vIHVybDogcHRbMV0sXFxyXFxuICAgICAgICAgICAgICAgIC8vIHVybDogJCgpLmxhenlSdWxlKChwdXJsKT0+e1xcclxcbiAgICAgICAgICAgICAgICB1cmw6ICQoZHNldCwgMSwgJ+aYr+WQpuW4puW8ueW5leaSreaUvicpLnNlbGVjdChcXHJcXG4gICAgICAgICAgICAgICAgICAgIChwbGF5X3VybCwgZXBpc29kZSwgZHNldCwgZHNlbCkgPT4ge1xcclxcbiAgICAgICAgICAgICAgICAgICAgICAgIGV2YWwoSlNPTi5wYXJzZShyZXF1ZXN0KCdoaWtlcjovL3BhZ2UvZ2V0X2Rhbm11JykpLnJ1bGUpXFxyXFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHNlbGVjdF9pbmRleCA9IGRzZXQuaW5kZXhPZihpbnB1dCkgLSAxXFxyXFxuICAgICAgICAgICAgICAgICAgICAgICAgZXBpc29kZSA9IGVwaXNvZGUucmVwbGFjZSgn56ysJywgJycpLnJlcGxhY2UoJ+mbhicsICcnKVxcclxcbiAgICAgICAgICAgICAgICAgICAgICAgIGVwaXNvZGUgPSBlcGlzb2RlLm1hdGNoKC8oWzEtOV1cXFxcZCopJC9tKVxcclxcbiAgICAgICAgICAgICAgICAgICAgICAgIGVwaXNvZGUgPSBlcGlzb2RlID8gTnVtYmVyKGVwaXNvZGVbMV0pIDogMFxcclxcblxcclxcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzZWxlY3RfaW5kZXggPT0gLTEpIHtcXHJcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHBsYXlfdXJsXFxyXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXHJcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG9mZmljYWxfdXJsID0gZ2V0X29mZmljYWxfbGluayhkc2VsW3NlbGVjdF9pbmRleF0sIGVwaXNvZGUpXFxyXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBkbV91cmwgPSAkLnJlcXVpcmUoJ2hpa2VyOi8vcGFnZS9kbUZ1bj9ydWxlPWRt55uS5a2QJykuZG1Sb3V0ZShvZmZpY2FsX3VybClcXHJcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGxheV91cmwgPSB7XFxyXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmxzOiBbcGxheV91cmxdLFxcclxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGFubXU6IGRtX3VybCxcXHJcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcclxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gcGxheV91cmxcXHJcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxyXFxuXFxyXFxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gJC5sb2coXFxcIuS9oOmAieS6hlxcXCIgKyBzZWxlY3RfaW5kZXggKyBcXFwiIFxcXCIgKyBpbnB1dClcXHJcXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBzd2l0Y2ggKGlucHV0KSB7XFxyXFxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gICAgIGNhc2UgJ+ebtOaOpeaSreaUvic6XFxyXFxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gICAgICAgICByZXR1cm4gcGxheV91cmxcXHJcXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyAgICAgZGVmYXVsdDpcXHJcXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyAgICAgICAgIHJldHVybiBwbGF5X3VybFxcclxcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIH1cXHJcXG4gICAgICAgICAgICAgICAgICAgIH0sXFxyXFxuICAgICAgICAgICAgICAgICAgICBwdFsxXSxcXHJcXG4gICAgICAgICAgICAgICAgICAgIHB0WzBdLFxcclxcbiAgICAgICAgICAgICAgICAgICAgZHNldCxcXHJcXG4gICAgICAgICAgICAgICAgICAgIGRzZWxcXHJcXG4gICAgICAgICAgICAgICAgKSxcXHJcXG4gICAgICAgICAgICAgICAgLy8gJC5sb2coaGFoYSlcXHJcXG4gICAgICAgICAgICAgICAgLy8gbGV0IHBsYXlfdXJsID0gcHVybFxcclxcbiAgICAgICAgICAgICAgICAvLyByZXR1cm4gcGxheV91cmxcXHJcXG4gICAgICAgICAgICAgICAgLy8gfSwgcHRbMV0pLFxcclxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3RleHRfMycsXFxyXFxuICAgICAgICAgICAgfSlcXHJcXG4gICAgICAgIH1cXHJcXG5cXHJcXG4gICAgICAgIHNvdWNjZV9vYmplY3RbJ3NvdXJjZV9uYW1lJ10gPSBKU09OLnBhcnNlKGxpbmVMaXN0W2l0ZW1dLnJlc0RhdGEpWzBdLmZsYWdcXHJcXG4gICAgICAgIHNvdWNjZV9vYmplY3RbSlNPTi5wYXJzZShsaW5lTGlzdFtpdGVtXS5yZXNEYXRhKVswXS5mbGFnXSA9IHNvdXJjZV9yZXNcXHJcXG4gICAgICAgIHJlcy5wdXNoKHNvdWNjZV9vYmplY3QpXFxyXFxuICAgIH1cXHJcXG59XFxyXFxuXFxyXFxuZnVuY3Rpb24gc291cmNlX3RhYihzZWxlY3RfbnVtLCBzb3VyY2VfcmVzLCByZXMpIHtcXHJcXG4gICAgc2VsZWN0X3NvdXJjZSA9IHNvdXJjZV9yZXNbc2VsZWN0X251bV1cXHJcXG4gICAgbGV0IGFycl9jb2xvciA9IFtdXFxyXFxuICAgIGZvciAobGV0IGkgaW4gc291cmNlX3Jlcykge1xcclxcbiAgICAgICAgYXJyX2NvbG9yLnB1c2goJyMwMDAwMDAnKVxcclxcbiAgICB9XFxyXFxuICAgIGFycl9jb2xvcltnZXRNeVZhcignc2VsZWN0X3NvdXJjZV9udW0nLCAnMCcpXSA9ICcjZWI3NDAyJ1xcclxcblxcclxcbiAgICBmb3IgKGxldCB0YWJfaXRlbSBpbiBzb3VyY2VfcmVzKSB7XFxyXFxuICAgICAgICByZXMucHVzaCh7XFxyXFxuICAgICAgICAgICAgdGl0bGU6XFxyXFxuICAgICAgICAgICAgICAgICfigJjigJjigJnigJk8c3BhbiBzdHlsZT1cXFwiY29sb3I6JyArXFxyXFxuICAgICAgICAgICAgICAgIGFycl9jb2xvclt0YWJfaXRlbV0gK1xcclxcbiAgICAgICAgICAgICAgICAnXFxcIj4nICtcXHJcXG4gICAgICAgICAgICAgICAgdmlkZW9fc291cmNlc19uYW1lW3NvdXJjZV9yZXNbdGFiX2l0ZW1dLnNvdXJjZV9uYW1lXSArXFxyXFxuICAgICAgICAgICAgICAgICcoJyArXFxyXFxuICAgICAgICAgICAgICAgIHNvdXJjZV9yZXNbdGFiX2l0ZW1dW3NvdXJjZV9yZXNbdGFiX2l0ZW1dLnNvdXJjZV9uYW1lXS5sZW5ndGggK1xcclxcbiAgICAgICAgICAgICAgICAnKTwvc3Bhbj4nLFxcclxcbiAgICAgICAgICAgIHVybDpcXHJcXG4gICAgICAgICAgICAgICAgXFxcIkBsYXp5UnVsZT0uanM6cHV0TXlWYXIoJ3NlbGVjdF9zb3VyY2VfbnVtJywgJ1xcXCIgK1xcclxcbiAgICAgICAgICAgICAgICB0YWJfaXRlbSArXFxyXFxuICAgICAgICAgICAgICAgIFxcXCInKTsgcHV0TXlWYXIoJ2lzX2RldGFpbF9jYWNoZScsICcxJyk7IHJlZnJlc2hQYWdlKCk7ICcjbm9IaXN0b3J5I2hpa2VyOi8vZW1wdHkn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